@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,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pluginMeasurement = require("@embedpdf/plugin-measurement");
|
|
4
|
+
const vue = require("vue");
|
|
5
|
+
const capabilities = require("./capabilities-DVNJmgy7.cjs");
|
|
6
|
+
const state = require("./state-M22NDJQo.cjs");
|
|
7
|
+
function useMeasurement() {
|
|
8
|
+
return capabilities.useCapability(pluginMeasurement.MeasurementToken);
|
|
9
|
+
}
|
|
10
|
+
function useMeasurementEvent(select, handler) {
|
|
11
|
+
capabilities.useCapabilityEvent(pluginMeasurement.MeasurementToken, select, handler);
|
|
12
|
+
}
|
|
13
|
+
const useMeasurementState = state.stateComposable(pluginMeasurement.measurementState);
|
|
14
|
+
const useMeasurementSettings = state.settingsComposable(pluginMeasurement.MeasurementToken);
|
|
15
|
+
function usePageScale(page) {
|
|
16
|
+
const scope = capabilities.useDocumentScope();
|
|
17
|
+
return capabilities.useKernelValue((kernel) => {
|
|
18
|
+
var _a;
|
|
19
|
+
const wanted = vue.toValue(page);
|
|
20
|
+
if (wanted === null) return null;
|
|
21
|
+
return ((_a = kernel.tryCapability(pluginMeasurement.MeasurementToken, scope.value ?? void 0)) == null ? void 0 : _a.getPageScale(wanted)) ?? pluginMeasurement.NO_PAGE_SCALE;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function useMeasurementReadout(ref) {
|
|
25
|
+
return capabilities.useOptionalSelector(
|
|
26
|
+
pluginMeasurement.MeasurementToken,
|
|
27
|
+
(measurement) => measurement.getReadout(vue.toValue(ref)),
|
|
28
|
+
pluginMeasurement.NO_READOUT
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
exports.useMeasurement = useMeasurement;
|
|
32
|
+
exports.useMeasurementEvent = useMeasurementEvent;
|
|
33
|
+
exports.useMeasurementReadout = useMeasurementReadout;
|
|
34
|
+
exports.useMeasurementSettings = useMeasurementSettings;
|
|
35
|
+
exports.useMeasurementState = useMeasurementState;
|
|
36
|
+
exports.usePageScale = usePageScale;
|
|
37
|
+
Object.keys(pluginMeasurement).forEach((k) => {
|
|
38
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: () => pluginMeasurement[k]
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=measurement.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measurement.cjs","sources":["../src/measurement.ts"],"sourcesContent":["/**\n * @embedpdf/vue/measurement: the Vue view of `@embedpdf/plugin-measurement`.\n * The four composables every plugin has, plus one per page scale and one per\n * measurement, so a template updates only for its own page or measurement.\n * Every one works before a document opens.\n *\n * const measurement = useMeasurement();\n * const scale = usePageScale(0); // the cover's, as a ref\n * const readout = useMeasurementReadout(() => props.annotation); // { kind, value, label }\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-measurement';\nimport { toValue } from 'vue';\nimport type { MaybeRefOrGetter, Ref } from 'vue';\nimport type { EventHook, PageRef } from '@embedpdf/core';\nimport {\n MeasurementToken,\n measurementState,\n NO_PAGE_SCALE,\n NO_READOUT,\n} from '@embedpdf/plugin-measurement';\nimport type {\n AnnotationRef,\n MeasurementCapability,\n MeasurementReadout,\n MeasurementUnavailable,\n PageScale,\n} from '@embedpdf/plugin-measurement';\nimport { useCapability, useCapabilityEvent, useOptionalSelector } from './runtime/capabilities';\nimport { useDocumentScope, useKernelValue } from './runtime/kernel';\nimport { settingsComposable, stateComposable } from './state';\n\n/**\n * The measurement API (scales, calibration, readouts, creating measurements)\n * of the nearest `<DocumentScope>`'s document, else the active one. The object\n * never changes; outside a document every method throws `not-ready`.\n */\nexport function useMeasurement(): MeasurementCapability {\n return useCapability(MeasurementToken);\n}\n\n/** Subscribe to one measurement event while the component lives: `useMeasurementEvent((measurement) => measurement.onScaleChanged, handler)`. */\nexport function useMeasurementEvent<Event>(\n select: (measurement: MeasurementCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(MeasurementToken, select, handler);\n}\n\n/**\n * The measurement state as refs: whether a scale change runs, the\n * calibration request waiting for its length, and the last change's reports\n * (the page's State table, declared once in `measurementState`). With a\n * selector, one ref that updates only when the value it picks changes.\n */\nexport const useMeasurementState = stateComposable(measurementState);\n\n/** The measurement settings (`defaultScale`, `presets`), with or without a document, as refs. Takes a selector. */\nexport const useMeasurementSettings = settingsComposable(MeasurementToken);\n\n/**\n * A page's measurement scale (its ref or its index; a getter to follow a\n * prop), as a ref: for a scale bar or a \"1:100\" badge. Accepts `null` (no\n * current page) and answers `null` then, so chrome can stay mounted without\n * inventing a page.\n */\nexport function usePageScale(page: MaybeRefOrGetter<PageRef | number>): Readonly<Ref<PageScale>>;\nexport function usePageScale(\n page: MaybeRefOrGetter<PageRef | number | null>,\n): Readonly<Ref<PageScale | null>>;\nexport function usePageScale(\n page: MaybeRefOrGetter<PageRef | number | null>,\n): Readonly<Ref<PageScale | null>> {\n const scope = useDocumentScope();\n // Scales are reference-stable in the plugin, so the ref updates only when this page's changes.\n return useKernelValue((kernel) => {\n const wanted = toValue(page);\n if (wanted === null) return null;\n return (\n kernel.tryCapability(MeasurementToken, scope.value ?? undefined)?.getPageScale(wanted) ??\n NO_PAGE_SCALE\n );\n });\n}\n\n/**\n * A measurement's `{ kind, value, label }` as a ref, or `{ unavailable }`\n * with why there's none. Pass a getter to follow a prop:\n * `useMeasurementReadout(() => props.annotation)`. Readouts are\n * reference-stable in the plugin, so the ref updates only when the\n * measurement's changes.\n */\nexport function useMeasurementReadout(\n ref: MaybeRefOrGetter<AnnotationRef>,\n): Readonly<Ref<MeasurementReadout | MeasurementUnavailable>> {\n return useOptionalSelector(\n MeasurementToken,\n (measurement) => measurement.getReadout(toValue(ref)),\n NO_READOUT as MeasurementReadout | MeasurementUnavailable,\n );\n}\n"],"names":["useCapability","MeasurementToken","useCapabilityEvent","stateComposable","measurementState","settingsComposable","useDocumentScope","useKernelValue","toValue","NO_PAGE_SCALE","useOptionalSelector","NO_READOUT"],"mappings":";;;;;;AAsCO,SAAS,iBAAwC;AACtD,SAAOA,aAAAA,cAAcC,kBAAAA,gBAAgB;AACvC;AAGO,SAAS,oBACd,QACA,SACM;AACNC,kCAAmBD,kBAAAA,kBAAkB,QAAQ,OAAO;AACtD;AAQO,MAAM,sBAAsBE,MAAAA,gBAAgBC,kBAAAA,gBAAgB;AAG5D,MAAM,yBAAyBC,MAAAA,mBAAmBJ,kBAAAA,gBAAgB;AAYlE,SAAS,aACd,MACiC;AACjC,QAAM,QAAQK,aAAAA,iBAAA;AAEd,SAAOC,aAAAA,eAAe,CAAC,WAAW;;AAChC,UAAM,SAASC,IAAAA,QAAQ,IAAI;AAC3B,QAAI,WAAW,KAAM,QAAO;AAC5B,aACE,YAAO,cAAcP,kBAAAA,kBAAkB,MAAM,SAAS,MAAS,MAA/D,mBAAkE,aAAa,YAC/EQ,kBAAAA;AAAAA,EAEJ,CAAC;AACH;AASO,SAAS,sBACd,KAC4D;AAC5D,SAAOC,aAAAA;AAAAA,IACLT,kBAAAA;AAAAA,IACA,CAAC,gBAAgB,YAAY,WAAWO,IAAAA,QAAQ,GAAG,CAAC;AAAA,IACpDG,kBAAAA;AAAAA,EAAA;AAEJ;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/measurement: the Vue view of `@embedpdf/plugin-measurement`.
|
|
3
|
+
* The four composables every plugin has, plus one per page scale and one per
|
|
4
|
+
* measurement, so a template updates only for its own page or measurement.
|
|
5
|
+
* Every one works before a document opens.
|
|
6
|
+
*
|
|
7
|
+
* const measurement = useMeasurement();
|
|
8
|
+
* const scale = usePageScale(0); // the cover's, as a ref
|
|
9
|
+
* const readout = useMeasurementReadout(() => props.annotation); // { kind, value, label }
|
|
10
|
+
*/
|
|
11
|
+
export * from '@embedpdf/plugin-measurement';
|
|
12
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
13
|
+
import type { EventHook, PageRef } from '@embedpdf/core';
|
|
14
|
+
import type { AnnotationRef, MeasurementCapability, MeasurementReadout, MeasurementUnavailable, PageScale } from '@embedpdf/plugin-measurement';
|
|
15
|
+
/**
|
|
16
|
+
* The measurement API (scales, calibration, readouts, creating measurements)
|
|
17
|
+
* of the nearest `<DocumentScope>`'s document, else the active one. The object
|
|
18
|
+
* never changes; outside a document every method throws `not-ready`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useMeasurement(): MeasurementCapability;
|
|
21
|
+
/** Subscribe to one measurement event while the component lives: `useMeasurementEvent((measurement) => measurement.onScaleChanged, handler)`. */
|
|
22
|
+
export declare function useMeasurementEvent<Event>(select: (measurement: MeasurementCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
23
|
+
/**
|
|
24
|
+
* The measurement state as refs: whether a scale change runs, the
|
|
25
|
+
* calibration request waiting for its length, and the last change's reports
|
|
26
|
+
* (the page's State table, declared once in `measurementState`). With a
|
|
27
|
+
* selector, one ref that updates only when the value it picks changes.
|
|
28
|
+
*/
|
|
29
|
+
export declare const useMeasurementState: import("./state.cjs").StateComposable<{
|
|
30
|
+
busy: boolean;
|
|
31
|
+
calibrationRequest: import("@embedpdf/plugin-measurement").CalibrationRequest | null;
|
|
32
|
+
lastReports: readonly import("@embedpdf/plugin-measurement").ScaleChangeReport[];
|
|
33
|
+
}>;
|
|
34
|
+
/** The measurement settings (`defaultScale`, `presets`), with or without a document, as refs. Takes a selector. */
|
|
35
|
+
export declare const useMeasurementSettings: import("./state.cjs").SettingsComposable<import("@embedpdf/plugin-measurement").MeasurementSettings & object>;
|
|
36
|
+
/**
|
|
37
|
+
* A page's measurement scale (its ref or its index; a getter to follow a
|
|
38
|
+
* prop), as a ref: for a scale bar or a "1:100" badge. Accepts `null` (no
|
|
39
|
+
* current page) and answers `null` then, so chrome can stay mounted without
|
|
40
|
+
* inventing a page.
|
|
41
|
+
*/
|
|
42
|
+
export declare function usePageScale(page: MaybeRefOrGetter<PageRef | number>): Readonly<Ref<PageScale>>;
|
|
43
|
+
export declare function usePageScale(page: MaybeRefOrGetter<PageRef | number | null>): Readonly<Ref<PageScale | null>>;
|
|
44
|
+
/**
|
|
45
|
+
* A measurement's `{ kind, value, label }` as a ref, or `{ unavailable }`
|
|
46
|
+
* with why there's none. Pass a getter to follow a prop:
|
|
47
|
+
* `useMeasurementReadout(() => props.annotation)`. Readouts are
|
|
48
|
+
* reference-stable in the plugin, so the ref updates only when the
|
|
49
|
+
* measurement's changes.
|
|
50
|
+
*/
|
|
51
|
+
export declare function useMeasurementReadout(ref: MaybeRefOrGetter<AnnotationRef>): Readonly<Ref<MeasurementReadout | MeasurementUnavailable>>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/measurement: the Vue view of `@embedpdf/plugin-measurement`.
|
|
3
|
+
* The four composables every plugin has, plus one per page scale and one per
|
|
4
|
+
* measurement, so a template updates only for its own page or measurement.
|
|
5
|
+
* Every one works before a document opens.
|
|
6
|
+
*
|
|
7
|
+
* const measurement = useMeasurement();
|
|
8
|
+
* const scale = usePageScale(0); // the cover's, as a ref
|
|
9
|
+
* const readout = useMeasurementReadout(() => props.annotation); // { kind, value, label }
|
|
10
|
+
*/
|
|
11
|
+
export * from '@embedpdf/plugin-measurement';
|
|
12
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
13
|
+
import type { EventHook, PageRef } from '@embedpdf/core';
|
|
14
|
+
import type { AnnotationRef, MeasurementCapability, MeasurementReadout, MeasurementUnavailable, PageScale } from '@embedpdf/plugin-measurement';
|
|
15
|
+
/**
|
|
16
|
+
* The measurement API (scales, calibration, readouts, creating measurements)
|
|
17
|
+
* of the nearest `<DocumentScope>`'s document, else the active one. The object
|
|
18
|
+
* never changes; outside a document every method throws `not-ready`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useMeasurement(): MeasurementCapability;
|
|
21
|
+
/** Subscribe to one measurement event while the component lives: `useMeasurementEvent((measurement) => measurement.onScaleChanged, handler)`. */
|
|
22
|
+
export declare function useMeasurementEvent<Event>(select: (measurement: MeasurementCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
23
|
+
/**
|
|
24
|
+
* The measurement state as refs: whether a scale change runs, the
|
|
25
|
+
* calibration request waiting for its length, and the last change's reports
|
|
26
|
+
* (the page's State table, declared once in `measurementState`). With a
|
|
27
|
+
* selector, one ref that updates only when the value it picks changes.
|
|
28
|
+
*/
|
|
29
|
+
export declare const useMeasurementState: import("./state.js").StateComposable<{
|
|
30
|
+
busy: boolean;
|
|
31
|
+
calibrationRequest: import("@embedpdf/plugin-measurement").CalibrationRequest | null;
|
|
32
|
+
lastReports: readonly import("@embedpdf/plugin-measurement").ScaleChangeReport[];
|
|
33
|
+
}>;
|
|
34
|
+
/** The measurement settings (`defaultScale`, `presets`), with or without a document, as refs. Takes a selector. */
|
|
35
|
+
export declare const useMeasurementSettings: import("./state.js").SettingsComposable<import("@embedpdf/plugin-measurement").MeasurementSettings & object>;
|
|
36
|
+
/**
|
|
37
|
+
* A page's measurement scale (its ref or its index; a getter to follow a
|
|
38
|
+
* prop), as a ref: for a scale bar or a "1:100" badge. Accepts `null` (no
|
|
39
|
+
* current page) and answers `null` then, so chrome can stay mounted without
|
|
40
|
+
* inventing a page.
|
|
41
|
+
*/
|
|
42
|
+
export declare function usePageScale(page: MaybeRefOrGetter<PageRef | number>): Readonly<Ref<PageScale>>;
|
|
43
|
+
export declare function usePageScale(page: MaybeRefOrGetter<PageRef | number | null>): Readonly<Ref<PageScale | null>>;
|
|
44
|
+
/**
|
|
45
|
+
* A measurement's `{ kind, value, label }` as a ref, or `{ unavailable }`
|
|
46
|
+
* with why there's none. Pass a getter to follow a prop:
|
|
47
|
+
* `useMeasurementReadout(() => props.annotation)`. Readouts are
|
|
48
|
+
* reference-stable in the plugin, so the ref updates only when the
|
|
49
|
+
* measurement's changes.
|
|
50
|
+
*/
|
|
51
|
+
export declare function useMeasurementReadout(ref: MaybeRefOrGetter<AnnotationRef>): Readonly<Ref<MeasurementReadout | MeasurementUnavailable>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { MeasurementToken, NO_PAGE_SCALE, measurementState, NO_READOUT } from "@embedpdf/plugin-measurement";
|
|
2
|
+
export * from "@embedpdf/plugin-measurement";
|
|
3
|
+
import { toValue } from "vue";
|
|
4
|
+
import { a as useCapability, b as useCapabilityEvent, i as useOptionalSelector, e as useDocumentScope, g as useKernelValue } from "./capabilities-C7YzgPCX.js";
|
|
5
|
+
import { s as settingsComposable, a as stateComposable } from "./state-DZg8q3v6.js";
|
|
6
|
+
function useMeasurement() {
|
|
7
|
+
return useCapability(MeasurementToken);
|
|
8
|
+
}
|
|
9
|
+
function useMeasurementEvent(select, handler) {
|
|
10
|
+
useCapabilityEvent(MeasurementToken, select, handler);
|
|
11
|
+
}
|
|
12
|
+
const useMeasurementState = stateComposable(measurementState);
|
|
13
|
+
const useMeasurementSettings = settingsComposable(MeasurementToken);
|
|
14
|
+
function usePageScale(page) {
|
|
15
|
+
const scope = useDocumentScope();
|
|
16
|
+
return useKernelValue((kernel) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const wanted = toValue(page);
|
|
19
|
+
if (wanted === null) return null;
|
|
20
|
+
return ((_a = kernel.tryCapability(MeasurementToken, scope.value ?? void 0)) == null ? void 0 : _a.getPageScale(wanted)) ?? NO_PAGE_SCALE;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function useMeasurementReadout(ref) {
|
|
24
|
+
return useOptionalSelector(
|
|
25
|
+
MeasurementToken,
|
|
26
|
+
(measurement) => measurement.getReadout(toValue(ref)),
|
|
27
|
+
NO_READOUT
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
useMeasurement,
|
|
32
|
+
useMeasurementEvent,
|
|
33
|
+
useMeasurementReadout,
|
|
34
|
+
useMeasurementSettings,
|
|
35
|
+
useMeasurementState,
|
|
36
|
+
usePageScale
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=measurement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measurement.js","sources":["../src/measurement.ts"],"sourcesContent":["/**\n * @embedpdf/vue/measurement: the Vue view of `@embedpdf/plugin-measurement`.\n * The four composables every plugin has, plus one per page scale and one per\n * measurement, so a template updates only for its own page or measurement.\n * Every one works before a document opens.\n *\n * const measurement = useMeasurement();\n * const scale = usePageScale(0); // the cover's, as a ref\n * const readout = useMeasurementReadout(() => props.annotation); // { kind, value, label }\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-measurement';\nimport { toValue } from 'vue';\nimport type { MaybeRefOrGetter, Ref } from 'vue';\nimport type { EventHook, PageRef } from '@embedpdf/core';\nimport {\n MeasurementToken,\n measurementState,\n NO_PAGE_SCALE,\n NO_READOUT,\n} from '@embedpdf/plugin-measurement';\nimport type {\n AnnotationRef,\n MeasurementCapability,\n MeasurementReadout,\n MeasurementUnavailable,\n PageScale,\n} from '@embedpdf/plugin-measurement';\nimport { useCapability, useCapabilityEvent, useOptionalSelector } from './runtime/capabilities';\nimport { useDocumentScope, useKernelValue } from './runtime/kernel';\nimport { settingsComposable, stateComposable } from './state';\n\n/**\n * The measurement API (scales, calibration, readouts, creating measurements)\n * of the nearest `<DocumentScope>`'s document, else the active one. The object\n * never changes; outside a document every method throws `not-ready`.\n */\nexport function useMeasurement(): MeasurementCapability {\n return useCapability(MeasurementToken);\n}\n\n/** Subscribe to one measurement event while the component lives: `useMeasurementEvent((measurement) => measurement.onScaleChanged, handler)`. */\nexport function useMeasurementEvent<Event>(\n select: (measurement: MeasurementCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(MeasurementToken, select, handler);\n}\n\n/**\n * The measurement state as refs: whether a scale change runs, the\n * calibration request waiting for its length, and the last change's reports\n * (the page's State table, declared once in `measurementState`). With a\n * selector, one ref that updates only when the value it picks changes.\n */\nexport const useMeasurementState = stateComposable(measurementState);\n\n/** The measurement settings (`defaultScale`, `presets`), with or without a document, as refs. Takes a selector. */\nexport const useMeasurementSettings = settingsComposable(MeasurementToken);\n\n/**\n * A page's measurement scale (its ref or its index; a getter to follow a\n * prop), as a ref: for a scale bar or a \"1:100\" badge. Accepts `null` (no\n * current page) and answers `null` then, so chrome can stay mounted without\n * inventing a page.\n */\nexport function usePageScale(page: MaybeRefOrGetter<PageRef | number>): Readonly<Ref<PageScale>>;\nexport function usePageScale(\n page: MaybeRefOrGetter<PageRef | number | null>,\n): Readonly<Ref<PageScale | null>>;\nexport function usePageScale(\n page: MaybeRefOrGetter<PageRef | number | null>,\n): Readonly<Ref<PageScale | null>> {\n const scope = useDocumentScope();\n // Scales are reference-stable in the plugin, so the ref updates only when this page's changes.\n return useKernelValue((kernel) => {\n const wanted = toValue(page);\n if (wanted === null) return null;\n return (\n kernel.tryCapability(MeasurementToken, scope.value ?? undefined)?.getPageScale(wanted) ??\n NO_PAGE_SCALE\n );\n });\n}\n\n/**\n * A measurement's `{ kind, value, label }` as a ref, or `{ unavailable }`\n * with why there's none. Pass a getter to follow a prop:\n * `useMeasurementReadout(() => props.annotation)`. Readouts are\n * reference-stable in the plugin, so the ref updates only when the\n * measurement's changes.\n */\nexport function useMeasurementReadout(\n ref: MaybeRefOrGetter<AnnotationRef>,\n): Readonly<Ref<MeasurementReadout | MeasurementUnavailable>> {\n return useOptionalSelector(\n MeasurementToken,\n (measurement) => measurement.getReadout(toValue(ref)),\n NO_READOUT as MeasurementReadout | MeasurementUnavailable,\n );\n}\n"],"names":[],"mappings":";;;;;AAsCO,SAAS,iBAAwC;AACtD,SAAO,cAAc,gBAAgB;AACvC;AAGO,SAAS,oBACd,QACA,SACM;AACN,qBAAmB,kBAAkB,QAAQ,OAAO;AACtD;AAQO,MAAM,sBAAsB,gBAAgB,gBAAgB;AAG5D,MAAM,yBAAyB,mBAAmB,gBAAgB;AAYlE,SAAS,aACd,MACiC;AACjC,QAAM,QAAQ,iBAAA;AAEd,SAAO,eAAe,CAAC,WAAW;;AAChC,UAAM,SAAS,QAAQ,IAAI;AAC3B,QAAI,WAAW,KAAM,QAAO;AAC5B,aACE,YAAO,cAAc,kBAAkB,MAAM,SAAS,MAAS,MAA/D,mBAAkE,aAAa,YAC/E;AAAA,EAEJ,CAAC;AACH;AASO,SAAS,sBACd,KAC4D;AAC5D,SAAO;AAAA,IACL;AAAA,IACA,CAAC,gBAAgB,YAAY,WAAW,QAAQ,GAAG,CAAC;AAAA,IACpD;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pluginMetadata = require("@embedpdf/plugin-metadata");
|
|
4
|
+
const capabilities = require("./capabilities-DVNJmgy7.cjs");
|
|
5
|
+
const state = require("./state-M22NDJQo.cjs");
|
|
6
|
+
function useMetadata() {
|
|
7
|
+
return capabilities.useCapability(pluginMetadata.MetadataToken);
|
|
8
|
+
}
|
|
9
|
+
const useMetadataState = state.stateComposable(pluginMetadata.metadataState);
|
|
10
|
+
function useMetadataEvent(select, handler) {
|
|
11
|
+
capabilities.useCapabilityEvent(pluginMetadata.MetadataToken, select, handler);
|
|
12
|
+
}
|
|
13
|
+
exports.useMetadata = useMetadata;
|
|
14
|
+
exports.useMetadataEvent = useMetadataEvent;
|
|
15
|
+
exports.useMetadataState = useMetadataState;
|
|
16
|
+
Object.keys(pluginMetadata).forEach((k) => {
|
|
17
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => pluginMetadata[k]
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=metadata.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.cjs","sources":["../src/metadata.ts"],"sourcesContent":["/**\n * @embedpdf/vue/metadata: the Vue view of `@embedpdf/plugin-metadata`. The\n * plugin keeps the metadata live off the document's event stream, so the state\n * follows your own edits and other sessions' alike.\n *\n * const metadata = useMetadata();\n * const { metadata: fields, custom, status } = useMetadataState();\n * await metadata.update({ title: 'New title' }); // resolves once the state shows it\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-metadata';\nimport { MetadataToken, metadataState } from '@embedpdf/plugin-metadata';\nimport type { MetadataCapability } from '@embedpdf/plugin-metadata';\nimport type { EventHook } from '@embedpdf/core';\nimport { useCapability, useCapabilityEvent } from './runtime/capabilities';\nimport { stateComposable } from './state';\n\n/**\n * The metadata API (`update`, `custom.update`, `refresh`, `canUpdate`) 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 useMetadata(): MetadataCapability {\n return useCapability(MetadataToken);\n}\n\n/**\n * The metadata's state as refs: the standard fields, your own fields and the\n * load state (the page's State table, declared once in `metadataState`). With\n * a selector, one ref for the value it picks, which updates only when that\n * value changes.\n */\nexport const useMetadataState = stateComposable(metadataState);\n\n/** Subscribe to one metadata event while the component lives: `useMetadataEvent((metadata) => metadata.onUpdated, handler)`. */\nexport function useMetadataEvent<Event>(\n select: (metadata: MetadataCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(MetadataToken, select, handler);\n}\n"],"names":["useCapability","MetadataToken","stateComposable","metadataState","useCapabilityEvent"],"mappings":";;;;;AAuBO,SAAS,cAAkC;AAChD,SAAOA,aAAAA,cAAcC,eAAAA,aAAa;AACpC;AAQO,MAAM,mBAAmBC,MAAAA,gBAAgBC,eAAAA,aAAa;AAGtD,SAAS,iBACd,QACA,SACM;AACNC,kCAAmBH,eAAAA,eAAe,QAAQ,OAAO;AACnD;;;;;;;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/metadata: the Vue view of `@embedpdf/plugin-metadata`. The
|
|
3
|
+
* plugin keeps the metadata live off the document's event stream, so the state
|
|
4
|
+
* follows your own edits and other sessions' alike.
|
|
5
|
+
*
|
|
6
|
+
* const metadata = useMetadata();
|
|
7
|
+
* const { metadata: fields, custom, status } = useMetadataState();
|
|
8
|
+
* await metadata.update({ title: 'New title' }); // resolves once the state shows it
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-metadata';
|
|
11
|
+
import type { MetadataCapability } from '@embedpdf/plugin-metadata';
|
|
12
|
+
import type { EventHook } from '@embedpdf/core';
|
|
13
|
+
/**
|
|
14
|
+
* The metadata API (`update`, `custom.update`, `refresh`, `canUpdate`) of the
|
|
15
|
+
* nearest `<DocumentScope>`'s document, else the active one. The object never
|
|
16
|
+
* changes; outside a document every method throws `not-ready`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useMetadata(): MetadataCapability;
|
|
19
|
+
/**
|
|
20
|
+
* The metadata's state as refs: the standard fields, your own fields and the
|
|
21
|
+
* load state (the page's State table, declared once in `metadataState`). With
|
|
22
|
+
* a selector, one ref for the value it picks, which updates only when that
|
|
23
|
+
* value changes.
|
|
24
|
+
*/
|
|
25
|
+
export declare const useMetadataState: import("./state.cjs").StateComposable<{
|
|
26
|
+
metadata: import("@embedpdf/core").DocumentMetadata | null;
|
|
27
|
+
custom: import("@embedpdf/core").CustomMetadata | null;
|
|
28
|
+
status: import("@embedpdf/core").ResourceStatus;
|
|
29
|
+
}>;
|
|
30
|
+
/** Subscribe to one metadata event while the component lives: `useMetadataEvent((metadata) => metadata.onUpdated, handler)`. */
|
|
31
|
+
export declare function useMetadataEvent<Event>(select: (metadata: MetadataCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/metadata: the Vue view of `@embedpdf/plugin-metadata`. The
|
|
3
|
+
* plugin keeps the metadata live off the document's event stream, so the state
|
|
4
|
+
* follows your own edits and other sessions' alike.
|
|
5
|
+
*
|
|
6
|
+
* const metadata = useMetadata();
|
|
7
|
+
* const { metadata: fields, custom, status } = useMetadataState();
|
|
8
|
+
* await metadata.update({ title: 'New title' }); // resolves once the state shows it
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-metadata';
|
|
11
|
+
import type { MetadataCapability } from '@embedpdf/plugin-metadata';
|
|
12
|
+
import type { EventHook } from '@embedpdf/core';
|
|
13
|
+
/**
|
|
14
|
+
* The metadata API (`update`, `custom.update`, `refresh`, `canUpdate`) of the
|
|
15
|
+
* nearest `<DocumentScope>`'s document, else the active one. The object never
|
|
16
|
+
* changes; outside a document every method throws `not-ready`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useMetadata(): MetadataCapability;
|
|
19
|
+
/**
|
|
20
|
+
* The metadata's state as refs: the standard fields, your own fields and the
|
|
21
|
+
* load state (the page's State table, declared once in `metadataState`). With
|
|
22
|
+
* a selector, one ref for the value it picks, which updates only when that
|
|
23
|
+
* value changes.
|
|
24
|
+
*/
|
|
25
|
+
export declare const useMetadataState: import("./state.js").StateComposable<{
|
|
26
|
+
metadata: import("@embedpdf/core").DocumentMetadata | null;
|
|
27
|
+
custom: import("@embedpdf/core").CustomMetadata | null;
|
|
28
|
+
status: import("@embedpdf/core").ResourceStatus;
|
|
29
|
+
}>;
|
|
30
|
+
/** Subscribe to one metadata event while the component lives: `useMetadataEvent((metadata) => metadata.onUpdated, handler)`. */
|
|
31
|
+
export declare function useMetadataEvent<Event>(select: (metadata: MetadataCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
package/dist/metadata.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MetadataToken, metadataState } from "@embedpdf/plugin-metadata";
|
|
2
|
+
export * from "@embedpdf/plugin-metadata";
|
|
3
|
+
import { a as useCapability, b as useCapabilityEvent } from "./capabilities-C7YzgPCX.js";
|
|
4
|
+
import { a as stateComposable } from "./state-DZg8q3v6.js";
|
|
5
|
+
function useMetadata() {
|
|
6
|
+
return useCapability(MetadataToken);
|
|
7
|
+
}
|
|
8
|
+
const useMetadataState = stateComposable(metadataState);
|
|
9
|
+
function useMetadataEvent(select, handler) {
|
|
10
|
+
useCapabilityEvent(MetadataToken, select, handler);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
useMetadata,
|
|
14
|
+
useMetadataEvent,
|
|
15
|
+
useMetadataState
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.js","sources":["../src/metadata.ts"],"sourcesContent":["/**\n * @embedpdf/vue/metadata: the Vue view of `@embedpdf/plugin-metadata`. The\n * plugin keeps the metadata live off the document's event stream, so the state\n * follows your own edits and other sessions' alike.\n *\n * const metadata = useMetadata();\n * const { metadata: fields, custom, status } = useMetadataState();\n * await metadata.update({ title: 'New title' }); // resolves once the state shows it\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-metadata';\nimport { MetadataToken, metadataState } from '@embedpdf/plugin-metadata';\nimport type { MetadataCapability } from '@embedpdf/plugin-metadata';\nimport type { EventHook } from '@embedpdf/core';\nimport { useCapability, useCapabilityEvent } from './runtime/capabilities';\nimport { stateComposable } from './state';\n\n/**\n * The metadata API (`update`, `custom.update`, `refresh`, `canUpdate`) 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 useMetadata(): MetadataCapability {\n return useCapability(MetadataToken);\n}\n\n/**\n * The metadata's state as refs: the standard fields, your own fields and the\n * load state (the page's State table, declared once in `metadataState`). With\n * a selector, one ref for the value it picks, which updates only when that\n * value changes.\n */\nexport const useMetadataState = stateComposable(metadataState);\n\n/** Subscribe to one metadata event while the component lives: `useMetadataEvent((metadata) => metadata.onUpdated, handler)`. */\nexport function useMetadataEvent<Event>(\n select: (metadata: MetadataCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(MetadataToken, select, handler);\n}\n"],"names":[],"mappings":";;;;AAuBO,SAAS,cAAkC;AAChD,SAAO,cAAc,aAAa;AACpC;AAQO,MAAM,mBAAmB,gBAAgB,aAAa;AAGtD,SAAS,iBACd,QACA,SACM;AACN,qBAAmB,eAAe,QAAQ,OAAO;AACnD;"}
|
package/dist/outline.cjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pluginOutline = require("@embedpdf/plugin-outline");
|
|
4
|
+
const capabilities = require("./capabilities-DVNJmgy7.cjs");
|
|
5
|
+
const state = require("./state-M22NDJQo.cjs");
|
|
6
|
+
function useOutline() {
|
|
7
|
+
return capabilities.useCapability(pluginOutline.OutlineToken);
|
|
8
|
+
}
|
|
9
|
+
const useOutlineState = state.stateComposable(pluginOutline.outlineState);
|
|
10
|
+
function useOutlineEvent(select, handler) {
|
|
11
|
+
capabilities.useCapabilityEvent(pluginOutline.OutlineToken, select, handler);
|
|
12
|
+
}
|
|
13
|
+
exports.useOutline = useOutline;
|
|
14
|
+
exports.useOutlineEvent = useOutlineEvent;
|
|
15
|
+
exports.useOutlineState = useOutlineState;
|
|
16
|
+
Object.keys(pluginOutline).forEach((k) => {
|
|
17
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => pluginOutline[k]
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=outline.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outline.cjs","sources":["../src/outline.ts"],"sourcesContent":["/**\n * @embedpdf/vue/outline: the Vue view of `@embedpdf/plugin-outline`. Reading\n * the state reads the outline; the plugin keeps it live off the document's\n * event stream, and shows your own edits at once.\n *\n * const outline = useOutline();\n * const { rows, current, canEdit } = useOutlineState();\n * outline.activate(row.item.ref); // goes where the item goes, as a click does\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-outline';\nimport { OutlineToken, outlineState } from '@embedpdf/plugin-outline';\nimport type { OutlineCapability } from '@embedpdf/plugin-outline';\nimport type { EventHook } from '@embedpdf/core';\nimport { useCapability, useCapabilityEvent } from './runtime/capabilities';\nimport { stateComposable } from './state';\n\n/**\n * The outline API (expand, select, activate, create, update, move, delete) of\n * the nearest `<DocumentScope>`'s document, else the active one. The object\n * never changes; outside a document every method throws `not-ready`.\n */\nexport function useOutline(): OutlineCapability {\n return useCapability(OutlineToken);\n}\n\n/**\n * The outline's state as refs: its items, the rows a tree view shows, the item\n * for where the view is reading, the selection, the load state and whether you\n * may edit it (the page's State table, declared once in `outlineState`). With\n * a selector, one ref for the value it picks, which updates only when that\n * value changes.\n */\nexport const useOutlineState = stateComposable(outlineState);\n\n/** Subscribe to one outline event while the component lives: `useOutlineEvent((outline) => outline.onChanged, handler)`. */\nexport function useOutlineEvent<Event>(\n select: (outline: OutlineCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(OutlineToken, select, handler);\n}\n"],"names":["useCapability","OutlineToken","stateComposable","outlineState","useCapabilityEvent"],"mappings":";;;;;AAuBO,SAAS,aAAgC;AAC9C,SAAOA,aAAAA,cAAcC,cAAAA,YAAY;AACnC;AASO,MAAM,kBAAkBC,MAAAA,gBAAgBC,cAAAA,YAAY;AAGpD,SAAS,gBACd,QACA,SACM;AACNC,kCAAmBH,cAAAA,cAAc,QAAQ,OAAO;AAClD;;;;;;;;;;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/outline: the Vue view of `@embedpdf/plugin-outline`. Reading
|
|
3
|
+
* the state reads the outline; the plugin keeps it live off the document's
|
|
4
|
+
* event stream, and shows your own edits at once.
|
|
5
|
+
*
|
|
6
|
+
* const outline = useOutline();
|
|
7
|
+
* const { rows, current, canEdit } = useOutlineState();
|
|
8
|
+
* outline.activate(row.item.ref); // goes where the item goes, as a click does
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-outline';
|
|
11
|
+
import type { OutlineCapability } from '@embedpdf/plugin-outline';
|
|
12
|
+
import type { EventHook } from '@embedpdf/core';
|
|
13
|
+
/**
|
|
14
|
+
* The outline API (expand, select, activate, create, update, move, delete) of
|
|
15
|
+
* the nearest `<DocumentScope>`'s document, else the active one. The object
|
|
16
|
+
* never changes; outside a document every method throws `not-ready`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useOutline(): OutlineCapability;
|
|
19
|
+
/**
|
|
20
|
+
* The outline's state as refs: its items, the rows a tree view shows, the item
|
|
21
|
+
* for where the view is reading, the selection, the load state and whether you
|
|
22
|
+
* may edit it (the page's State table, declared once in `outlineState`). With
|
|
23
|
+
* a selector, one ref for the value it picks, which updates only when that
|
|
24
|
+
* value changes.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useOutlineState: import("./state.cjs").StateComposable<{
|
|
27
|
+
items: readonly import("@embedpdf/plugin-outline").OutlineItem<import("@embedpdf/core").PageDestination>[];
|
|
28
|
+
rows: readonly import("@embedpdf/plugin-outline").OutlineRow[];
|
|
29
|
+
current: import("@embedpdf/plugin-outline").OutlineItemRef | null;
|
|
30
|
+
selected: readonly import("@embedpdf/plugin-outline").OutlineItemRef[];
|
|
31
|
+
status: import("@embedpdf/core").ResourceStatus;
|
|
32
|
+
incomplete: boolean;
|
|
33
|
+
canEdit: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
/** Subscribe to one outline event while the component lives: `useOutlineEvent((outline) => outline.onChanged, handler)`. */
|
|
36
|
+
export declare function useOutlineEvent<Event>(select: (outline: OutlineCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/outline: the Vue view of `@embedpdf/plugin-outline`. Reading
|
|
3
|
+
* the state reads the outline; the plugin keeps it live off the document's
|
|
4
|
+
* event stream, and shows your own edits at once.
|
|
5
|
+
*
|
|
6
|
+
* const outline = useOutline();
|
|
7
|
+
* const { rows, current, canEdit } = useOutlineState();
|
|
8
|
+
* outline.activate(row.item.ref); // goes where the item goes, as a click does
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-outline';
|
|
11
|
+
import type { OutlineCapability } from '@embedpdf/plugin-outline';
|
|
12
|
+
import type { EventHook } from '@embedpdf/core';
|
|
13
|
+
/**
|
|
14
|
+
* The outline API (expand, select, activate, create, update, move, delete) of
|
|
15
|
+
* the nearest `<DocumentScope>`'s document, else the active one. The object
|
|
16
|
+
* never changes; outside a document every method throws `not-ready`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useOutline(): OutlineCapability;
|
|
19
|
+
/**
|
|
20
|
+
* The outline's state as refs: its items, the rows a tree view shows, the item
|
|
21
|
+
* for where the view is reading, the selection, the load state and whether you
|
|
22
|
+
* may edit it (the page's State table, declared once in `outlineState`). With
|
|
23
|
+
* a selector, one ref for the value it picks, which updates only when that
|
|
24
|
+
* value changes.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useOutlineState: import("./state.js").StateComposable<{
|
|
27
|
+
items: readonly import("@embedpdf/plugin-outline").OutlineItem<import("@embedpdf/core").PageDestination>[];
|
|
28
|
+
rows: readonly import("@embedpdf/plugin-outline").OutlineRow[];
|
|
29
|
+
current: import("@embedpdf/plugin-outline").OutlineItemRef | null;
|
|
30
|
+
selected: readonly import("@embedpdf/plugin-outline").OutlineItemRef[];
|
|
31
|
+
status: import("@embedpdf/core").ResourceStatus;
|
|
32
|
+
incomplete: boolean;
|
|
33
|
+
canEdit: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
/** Subscribe to one outline event while the component lives: `useOutlineEvent((outline) => outline.onChanged, handler)`. */
|
|
36
|
+
export declare function useOutlineEvent<Event>(select: (outline: OutlineCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
package/dist/outline.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OutlineToken, outlineState } from "@embedpdf/plugin-outline";
|
|
2
|
+
export * from "@embedpdf/plugin-outline";
|
|
3
|
+
import { a as useCapability, b as useCapabilityEvent } from "./capabilities-C7YzgPCX.js";
|
|
4
|
+
import { a as stateComposable } from "./state-DZg8q3v6.js";
|
|
5
|
+
function useOutline() {
|
|
6
|
+
return useCapability(OutlineToken);
|
|
7
|
+
}
|
|
8
|
+
const useOutlineState = stateComposable(outlineState);
|
|
9
|
+
function useOutlineEvent(select, handler) {
|
|
10
|
+
useCapabilityEvent(OutlineToken, select, handler);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
useOutline,
|
|
14
|
+
useOutlineEvent,
|
|
15
|
+
useOutlineState
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=outline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outline.js","sources":["../src/outline.ts"],"sourcesContent":["/**\n * @embedpdf/vue/outline: the Vue view of `@embedpdf/plugin-outline`. Reading\n * the state reads the outline; the plugin keeps it live off the document's\n * event stream, and shows your own edits at once.\n *\n * const outline = useOutline();\n * const { rows, current, canEdit } = useOutlineState();\n * outline.activate(row.item.ref); // goes where the item goes, as a click does\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-outline';\nimport { OutlineToken, outlineState } from '@embedpdf/plugin-outline';\nimport type { OutlineCapability } from '@embedpdf/plugin-outline';\nimport type { EventHook } from '@embedpdf/core';\nimport { useCapability, useCapabilityEvent } from './runtime/capabilities';\nimport { stateComposable } from './state';\n\n/**\n * The outline API (expand, select, activate, create, update, move, delete) of\n * the nearest `<DocumentScope>`'s document, else the active one. The object\n * never changes; outside a document every method throws `not-ready`.\n */\nexport function useOutline(): OutlineCapability {\n return useCapability(OutlineToken);\n}\n\n/**\n * The outline's state as refs: its items, the rows a tree view shows, the item\n * for where the view is reading, the selection, the load state and whether you\n * may edit it (the page's State table, declared once in `outlineState`). With\n * a selector, one ref for the value it picks, which updates only when that\n * value changes.\n */\nexport const useOutlineState = stateComposable(outlineState);\n\n/** Subscribe to one outline event while the component lives: `useOutlineEvent((outline) => outline.onChanged, handler)`. */\nexport function useOutlineEvent<Event>(\n select: (outline: OutlineCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(OutlineToken, select, handler);\n}\n"],"names":[],"mappings":";;;;AAuBO,SAAS,aAAgC;AAC9C,SAAO,cAAc,YAAY;AACnC;AASO,MAAM,kBAAkB,gBAAgB,YAAY;AAGpD,SAAS,gBACd,QACA,SACM;AACN,qBAAmB,cAAc,QAAQ,OAAO;AAClD;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { inject, provide } from "vue";
|
|
2
|
+
import "@embedpdf/web";
|
|
3
|
+
const PageKey = Symbol("embedpdf page");
|
|
4
|
+
function providePage(page) {
|
|
5
|
+
provide(PageKey, page);
|
|
6
|
+
}
|
|
7
|
+
function usePage() {
|
|
8
|
+
const page = inject(PageKey, null);
|
|
9
|
+
if (!page) throw new Error("usePage must be used inside a <Stage> page");
|
|
10
|
+
return page;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
providePage as p,
|
|
14
|
+
usePage as u
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=page-D9XIuLSj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-D9XIuLSj.js","sources":["../src/runtime/page.ts"],"sourcesContent":["/**\n * The page context: the seam between a page surface and its layers. A layer\n * depends only on this, never on the Stage, so the same layer works inside a\n * virtualized `<Stage>` page and on a standalone page surface. The surface\n * provides it as a ref that changes when the page's geometry does.\n */\nimport { inject, provide } from 'vue';\nimport type { InjectionKey, Ref } from 'vue';\n// Pure coordinate math from the geometry base, not from stage-core: the page\n// context stays stage-agnostic.\nimport type { PageTransform } from '@embedpdf/core-geometry';\nimport type { PageViewDemand } from '@embedpdf/plugin-render/contract';\nimport type { PageContext } from '@embedpdf/web';\n\n// Built by `makePageContext` from `@embedpdf/web`, shared with every framework.\nexport { makePageContext } from '@embedpdf/web';\n\n/** The page context. Its members are documented on `PageContext` in `@embedpdf/web`. */\nexport type PageContextValue = PageContext<PageTransform, PageViewDemand>;\n\nconst PageKey: InjectionKey<Readonly<Ref<PageContextValue>>> = Symbol('embedpdf page');\n\n/** Installed by page surfaces (`<Stage>` pages), not by app code. */\nexport function providePage(page: Readonly<Ref<PageContextValue>>): void {\n provide(PageKey, page);\n}\n\n/**\n * The page this component is drawn on, as a ref: inside a `<Stage>`'s\n * `#page` or `#page-chrome` slot. The ref is the same for the page's life;\n * its value changes when the page's geometry does (a zoom, a rotation).\n */\nexport function usePage(): Readonly<Ref<PageContextValue>> {\n const page = inject(PageKey, null);\n if (!page) throw new Error('usePage must be used inside a <Stage> page');\n return page;\n}\n"],"names":[],"mappings":";;AAoBA,MAAM,UAAyD,OAAO,eAAe;AAG9E,SAAS,YAAY,MAA6C;AACvE,UAAQ,SAAS,IAAI;AACvB;AAOO,SAAS,UAA2C;AACzD,QAAM,OAAO,OAAO,SAAS,IAAI;AACjC,MAAI,CAAC,KAAM,OAAM,IAAI,MAAM,4CAA4C;AACvE,SAAO;AACT;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
require("@embedpdf/web");
|
|
4
|
+
const PageKey = Symbol("embedpdf page");
|
|
5
|
+
function providePage(page) {
|
|
6
|
+
vue.provide(PageKey, page);
|
|
7
|
+
}
|
|
8
|
+
function usePage() {
|
|
9
|
+
const page = vue.inject(PageKey, null);
|
|
10
|
+
if (!page) throw new Error("usePage must be used inside a <Stage> page");
|
|
11
|
+
return page;
|
|
12
|
+
}
|
|
13
|
+
exports.providePage = providePage;
|
|
14
|
+
exports.usePage = usePage;
|
|
15
|
+
//# sourceMappingURL=page-Doy4_Sdz.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-Doy4_Sdz.cjs","sources":["../src/runtime/page.ts"],"sourcesContent":["/**\n * The page context: the seam between a page surface and its layers. A layer\n * depends only on this, never on the Stage, so the same layer works inside a\n * virtualized `<Stage>` page and on a standalone page surface. The surface\n * provides it as a ref that changes when the page's geometry does.\n */\nimport { inject, provide } from 'vue';\nimport type { InjectionKey, Ref } from 'vue';\n// Pure coordinate math from the geometry base, not from stage-core: the page\n// context stays stage-agnostic.\nimport type { PageTransform } from '@embedpdf/core-geometry';\nimport type { PageViewDemand } from '@embedpdf/plugin-render/contract';\nimport type { PageContext } from '@embedpdf/web';\n\n// Built by `makePageContext` from `@embedpdf/web`, shared with every framework.\nexport { makePageContext } from '@embedpdf/web';\n\n/** The page context. Its members are documented on `PageContext` in `@embedpdf/web`. */\nexport type PageContextValue = PageContext<PageTransform, PageViewDemand>;\n\nconst PageKey: InjectionKey<Readonly<Ref<PageContextValue>>> = Symbol('embedpdf page');\n\n/** Installed by page surfaces (`<Stage>` pages), not by app code. */\nexport function providePage(page: Readonly<Ref<PageContextValue>>): void {\n provide(PageKey, page);\n}\n\n/**\n * The page this component is drawn on, as a ref: inside a `<Stage>`'s\n * `#page` or `#page-chrome` slot. The ref is the same for the page's life;\n * its value changes when the page's geometry does (a zoom, a rotation).\n */\nexport function usePage(): Readonly<Ref<PageContextValue>> {\n const page = inject(PageKey, null);\n if (!page) throw new Error('usePage must be used inside a <Stage> page');\n return page;\n}\n"],"names":["provide","inject"],"mappings":";;;AAoBA,MAAM,UAAyD,OAAO,eAAe;AAG9E,SAAS,YAAY,MAA6C;AACvEA,MAAAA,QAAQ,SAAS,IAAI;AACvB;AAOO,SAAS,UAA2C;AACzD,QAAM,OAAOC,IAAAA,OAAO,SAAS,IAAI;AACjC,MAAI,CAAC,KAAM,OAAM,IAAI,MAAM,4CAA4C;AACvE,SAAO;AACT;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pluginPageEdit = require("@embedpdf/plugin-page-edit");
|
|
4
|
+
const capabilities = require("./capabilities-DVNJmgy7.cjs");
|
|
5
|
+
const state = require("./state-M22NDJQo.cjs");
|
|
6
|
+
function usePageEdit() {
|
|
7
|
+
return capabilities.useCapability(pluginPageEdit.PageEditToken);
|
|
8
|
+
}
|
|
9
|
+
const usePageEditState = state.stateComposable(pluginPageEdit.pageEditState);
|
|
10
|
+
exports.usePageEdit = usePageEdit;
|
|
11
|
+
exports.usePageEditState = usePageEditState;
|
|
12
|
+
Object.keys(pluginPageEdit).forEach((k) => {
|
|
13
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => pluginPageEdit[k]
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=page-edit.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-edit.cjs","sources":["../src/page-edit.ts"],"sourcesContent":["/**\n * @embedpdf/vue/page-edit: the Vue view of `@embedpdf/plugin-page-edit`. The\n * plugin turns a page relative to its rotation and resolves positions, so\n * this entry is the binding only:\n *\n * const pageEdit = usePageEdit();\n * const { selected, canEdit } = usePageEditState();\n * await pageEdit.rotateBy(selected.value, 90);\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-page-edit';\nimport { PageEditToken, pageEditState } from '@embedpdf/plugin-page-edit';\nimport type { PageEditCapability } from '@embedpdf/plugin-page-edit';\nimport { useCapability } from './runtime/capabilities';\nimport { stateComposable } from './state';\n\n/**\n * The page edits of the nearest `<DocumentScope>`'s document, else the active\n * one. The object never changes; outside a document every method throws\n * `not-ready`. The pages themselves come from `usePageList()`.\n */\nexport function usePageEdit(): PageEditCapability {\n return useCapability(PageEditToken);\n}\n\n/**\n * The page edits' state as refs: the selected pages and whether you may edit\n * and copy pages (the page's State table, declared once in `pageEditState`).\n * With a selector, one ref for the value it picks, which updates only when\n * that value changes.\n */\nexport const usePageEditState = stateComposable(pageEditState);\n"],"names":["useCapability","PageEditToken","stateComposable","pageEditState"],"mappings":";;;;;AAsBO,SAAS,cAAkC;AAChD,SAAOA,aAAAA,cAAcC,eAAAA,aAAa;AACpC;AAQO,MAAM,mBAAmBC,MAAAA,gBAAgBC,eAAAA,aAAa;;;;;;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/page-edit: the Vue view of `@embedpdf/plugin-page-edit`. The
|
|
3
|
+
* plugin turns a page relative to its rotation and resolves positions, so
|
|
4
|
+
* this entry is the binding only:
|
|
5
|
+
*
|
|
6
|
+
* const pageEdit = usePageEdit();
|
|
7
|
+
* const { selected, canEdit } = usePageEditState();
|
|
8
|
+
* await pageEdit.rotateBy(selected.value, 90);
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-page-edit';
|
|
11
|
+
import type { PageEditCapability } from '@embedpdf/plugin-page-edit';
|
|
12
|
+
/**
|
|
13
|
+
* The page edits of the nearest `<DocumentScope>`'s document, else the active
|
|
14
|
+
* one. The object never changes; outside a document every method throws
|
|
15
|
+
* `not-ready`. The pages themselves come from `usePageList()`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function usePageEdit(): PageEditCapability;
|
|
18
|
+
/**
|
|
19
|
+
* The page edits' state as refs: the selected pages and whether you may edit
|
|
20
|
+
* and copy pages (the page's State table, declared once in `pageEditState`).
|
|
21
|
+
* With a selector, one ref for the value it picks, which updates only when
|
|
22
|
+
* that value changes.
|
|
23
|
+
*/
|
|
24
|
+
export declare const usePageEditState: import("./state.cjs").StateComposable<{
|
|
25
|
+
selected: readonly import("@embedpdf/core").PageRef[];
|
|
26
|
+
canEdit: boolean;
|
|
27
|
+
canExtract: boolean;
|
|
28
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/page-edit: the Vue view of `@embedpdf/plugin-page-edit`. The
|
|
3
|
+
* plugin turns a page relative to its rotation and resolves positions, so
|
|
4
|
+
* this entry is the binding only:
|
|
5
|
+
*
|
|
6
|
+
* const pageEdit = usePageEdit();
|
|
7
|
+
* const { selected, canEdit } = usePageEditState();
|
|
8
|
+
* await pageEdit.rotateBy(selected.value, 90);
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-page-edit';
|
|
11
|
+
import type { PageEditCapability } from '@embedpdf/plugin-page-edit';
|
|
12
|
+
/**
|
|
13
|
+
* The page edits of the nearest `<DocumentScope>`'s document, else the active
|
|
14
|
+
* one. The object never changes; outside a document every method throws
|
|
15
|
+
* `not-ready`. The pages themselves come from `usePageList()`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function usePageEdit(): PageEditCapability;
|
|
18
|
+
/**
|
|
19
|
+
* The page edits' state as refs: the selected pages and whether you may edit
|
|
20
|
+
* and copy pages (the page's State table, declared once in `pageEditState`).
|
|
21
|
+
* With a selector, one ref for the value it picks, which updates only when
|
|
22
|
+
* that value changes.
|
|
23
|
+
*/
|
|
24
|
+
export declare const usePageEditState: import("./state.js").StateComposable<{
|
|
25
|
+
selected: readonly import("@embedpdf/core").PageRef[];
|
|
26
|
+
canEdit: boolean;
|
|
27
|
+
canExtract: boolean;
|
|
28
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PageEditToken, pageEditState } from "@embedpdf/plugin-page-edit";
|
|
2
|
+
export * from "@embedpdf/plugin-page-edit";
|
|
3
|
+
import { a as useCapability } from "./capabilities-C7YzgPCX.js";
|
|
4
|
+
import { a as stateComposable } from "./state-DZg8q3v6.js";
|
|
5
|
+
function usePageEdit() {
|
|
6
|
+
return useCapability(PageEditToken);
|
|
7
|
+
}
|
|
8
|
+
const usePageEditState = stateComposable(pageEditState);
|
|
9
|
+
export {
|
|
10
|
+
usePageEdit,
|
|
11
|
+
usePageEditState
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=page-edit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-edit.js","sources":["../src/page-edit.ts"],"sourcesContent":["/**\n * @embedpdf/vue/page-edit: the Vue view of `@embedpdf/plugin-page-edit`. The\n * plugin turns a page relative to its rotation and resolves positions, so\n * this entry is the binding only:\n *\n * const pageEdit = usePageEdit();\n * const { selected, canEdit } = usePageEditState();\n * await pageEdit.rotateBy(selected.value, 90);\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-page-edit';\nimport { PageEditToken, pageEditState } from '@embedpdf/plugin-page-edit';\nimport type { PageEditCapability } from '@embedpdf/plugin-page-edit';\nimport { useCapability } from './runtime/capabilities';\nimport { stateComposable } from './state';\n\n/**\n * The page edits of the nearest `<DocumentScope>`'s document, else the active\n * one. The object never changes; outside a document every method throws\n * `not-ready`. The pages themselves come from `usePageList()`.\n */\nexport function usePageEdit(): PageEditCapability {\n return useCapability(PageEditToken);\n}\n\n/**\n * The page edits' state as refs: the selected pages and whether you may edit\n * and copy pages (the page's State table, declared once in `pageEditState`).\n * With a selector, one ref for the value it picks, which updates only when\n * that value changes.\n */\nexport const usePageEditState = stateComposable(pageEditState);\n"],"names":[],"mappings":";;;;AAsBO,SAAS,cAAkC;AAChD,SAAO,cAAc,aAAa;AACpC;AAQO,MAAM,mBAAmB,gBAAgB,aAAa;"}
|