@embedpdf/vue 0.0.0-stage → 3.0.0-next.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +192 -0
- package/README.md +258 -2
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-BEImlFso.cjs +124 -0
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-BEImlFso.cjs.map +1 -0
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-Brhh5jyF.js +125 -0
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-Brhh5jyF.js.map +1 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-BwtHXw73.cjs +20 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-BwtHXw73.cjs.map +1 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-Ulkr3a6R.js +21 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-Ulkr3a6R.js.map +1 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-CtTu1FGX.js +191 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-CtTu1FGX.js.map +1 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-loLSm4lV.cjs +190 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-loLSm4lV.cjs.map +1 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-BA0_VwFc.cjs +682 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-BA0_VwFc.cjs.map +1 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-DUqft-xs.js +683 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-DUqft-xs.js.map +1 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-C5-eQD34.cjs +174 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-C5-eQD34.cjs.map +1 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-EzLaOP3g.js +175 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-EzLaOP3g.js.map +1 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-CJt3vdBW.js +33 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-CJt3vdBW.js.map +1 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-Cw29c8Oa.cjs +32 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-Cw29c8Oa.cjs.map +1 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-CjrpumX2.cjs +151 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-CjrpumX2.cjs.map +1 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-O4AFc0_R.js +152 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-O4AFc0_R.js.map +1 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-DrOORC1H.cjs +480 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-DrOORC1H.cjs.map +1 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-HbCryx1B.js +481 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-HbCryx1B.js.map +1 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-BlLIPH1B.js +118 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-BlLIPH1B.js.map +1 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-CQozZCvB.cjs +117 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-CQozZCvB.cjs.map +1 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C4TUDuyu.js +302 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C4TUDuyu.js.map +1 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C8T9q6Kb.cjs +301 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C8T9q6Kb.cjs.map +1 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-D_c-wINF.cjs +38 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-D_c-wINF.cjs.map +1 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-fOTs4aqv.js +39 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-fOTs4aqv.js.map +1 -0
- package/dist/actions.cjs +42 -0
- package/dist/actions.cjs.map +1 -0
- package/dist/actions.d.cts +41 -0
- package/dist/actions.d.ts +41 -0
- package/dist/actions.js +37 -0
- package/dist/actions.js.map +1 -0
- package/dist/anchored/Anchored.vue.d.cts +40 -0
- package/dist/anchored/Anchored.vue.d.ts +40 -0
- package/dist/anchored/AnchoredScope.vue.d.cts +17 -0
- package/dist/anchored/AnchoredScope.vue.d.ts +17 -0
- package/dist/anchored/PlacedAnchored.vue.d.cts +19 -0
- package/dist/anchored/PlacedAnchored.vue.d.ts +19 -0
- package/dist/anchored/projector.d.cts +32 -0
- package/dist/anchored/projector.d.ts +32 -0
- package/dist/anchored.cjs +13 -0
- package/dist/anchored.cjs.map +1 -0
- package/dist/anchored.d.cts +15 -0
- package/dist/anchored.d.ts +15 -0
- package/dist/anchored.js +13 -0
- package/dist/anchored.js.map +1 -0
- package/dist/annotation/AnnotationChrome.vue.d.cts +20 -0
- package/dist/annotation/AnnotationChrome.vue.d.ts +20 -0
- package/dist/annotation/AnnotationDraftMenu.vue.d.cts +26 -0
- package/dist/annotation/AnnotationDraftMenu.vue.d.ts +26 -0
- package/dist/annotation/AnnotationFrame.vue.d.cts +25 -0
- package/dist/annotation/AnnotationFrame.vue.d.ts +25 -0
- package/dist/annotation/AnnotationLayer.vue.d.cts +23 -0
- package/dist/annotation/AnnotationLayer.vue.d.ts +23 -0
- package/dist/annotation/AnnotationLook.vue.d.cts +21 -0
- package/dist/annotation/AnnotationLook.vue.d.ts +21 -0
- package/dist/annotation/AnnotationMenu.vue.d.cts +23 -0
- package/dist/annotation/AnnotationMenu.vue.d.ts +23 -0
- package/dist/annotation/AnnotationRotationBadge.vue.d.cts +26 -0
- package/dist/annotation/AnnotationRotationBadge.vue.d.ts +26 -0
- package/dist/annotation/AnnotationScene.vue.d.cts +7 -0
- package/dist/annotation/AnnotationScene.vue.d.ts +7 -0
- package/dist/annotation/FreeTextBox.vue.d.cts +9 -0
- package/dist/annotation/FreeTextBox.vue.d.ts +9 -0
- package/dist/annotation/NativeDrawing.vue.d.cts +10 -0
- package/dist/annotation/NativeDrawing.vue.d.ts +10 -0
- package/dist/annotation/StampGhost.vue.d.cts +7 -0
- package/dist/annotation/StampGhost.vue.d.ts +7 -0
- package/dist/annotation/composables.d.cts +76 -0
- package/dist/annotation/composables.d.ts +76 -0
- package/dist/annotation/state.d.cts +19 -0
- package/dist/annotation/state.d.ts +19 -0
- package/dist/annotation/text-box.d.cts +27 -0
- package/dist/annotation/text-box.d.ts +27 -0
- package/dist/annotation/types.d.cts +154 -0
- package/dist/annotation/types.d.ts +154 -0
- package/dist/annotation.cjs +29 -0
- package/dist/annotation.cjs.map +1 -0
- package/dist/annotation.d.cts +35 -0
- package/dist/annotation.d.ts +35 -0
- package/dist/annotation.js +23 -0
- package/dist/annotation.js.map +1 -0
- package/dist/capabilities-C7YzgPCX.js +164 -0
- package/dist/capabilities-C7YzgPCX.js.map +1 -0
- package/dist/capabilities-DVNJmgy7.cjs +163 -0
- package/dist/capabilities-DVNJmgy7.cjs.map +1 -0
- package/dist/commands.cjs +81 -0
- package/dist/commands.cjs.map +1 -0
- package/dist/commands.d.cts +61 -0
- package/dist/commands.d.ts +61 -0
- package/dist/commands.js +76 -0
- package/dist/commands.js.map +1 -0
- package/dist/composables-BGBsNDf9.cjs +25 -0
- package/dist/composables-BGBsNDf9.cjs.map +1 -0
- package/dist/composables-BuHvnUlo.cjs +1003 -0
- package/dist/composables-BuHvnUlo.cjs.map +1 -0
- package/dist/composables-CIkhKwAg.js +1004 -0
- package/dist/composables-CIkhKwAg.js.map +1 -0
- package/dist/composables-DwsZdg06.js +26 -0
- package/dist/composables-DwsZdg06.js.map +1 -0
- package/dist/dev-CtMlvxjZ.js +17 -0
- package/dist/dev-CtMlvxjZ.js.map +1 -0
- package/dist/dev-eeIS2B4c.cjs +16 -0
- package/dist/dev-eeIS2B4c.cjs.map +1 -0
- package/dist/dev.d.cts +11 -0
- package/dist/dev.d.ts +11 -0
- package/dist/documents-DUu5H4yH.js +34 -0
- package/dist/documents-DUu5H4yH.js.map +1 -0
- package/dist/documents-TQ1fMdWI.cjs +33 -0
- package/dist/documents-TQ1fMdWI.cjs.map +1 -0
- package/dist/form/ButtonControl.vue.d.cts +11 -0
- package/dist/form/ButtonControl.vue.d.ts +11 -0
- package/dist/form/ComboControl.vue.d.cts +11 -0
- package/dist/form/ComboControl.vue.d.ts +11 -0
- package/dist/form/FieldPictures.vue.d.cts +3 -0
- package/dist/form/FieldPictures.vue.d.ts +3 -0
- package/dist/form/FormFocusRing.vue.d.cts +8 -0
- package/dist/form/FormFocusRing.vue.d.ts +8 -0
- package/dist/form/FormLayer.vue.d.cts +3 -0
- package/dist/form/FormLayer.vue.d.ts +3 -0
- package/dist/form/ListControl.vue.d.cts +11 -0
- package/dist/form/ListControl.vue.d.ts +11 -0
- package/dist/form/NativeListBox.vue.d.cts +27 -0
- package/dist/form/NativeListBox.vue.d.ts +27 -0
- package/dist/form/SignatureControl.vue.d.cts +11 -0
- package/dist/form/SignatureControl.vue.d.ts +11 -0
- package/dist/form/TextControl.vue.d.cts +11 -0
- package/dist/form/TextControl.vue.d.ts +11 -0
- package/dist/form/ToggleControl.vue.d.cts +11 -0
- package/dist/form/ToggleControl.vue.d.ts +11 -0
- package/dist/form/composables.d.cts +52 -0
- package/dist/form/composables.d.ts +52 -0
- package/dist/form/widget-box.d.cts +34 -0
- package/dist/form/widget-box.d.ts +34 -0
- package/dist/form.cjs +17 -0
- package/dist/form.cjs.map +1 -0
- package/dist/form.d.cts +12 -0
- package/dist/form.d.ts +12 -0
- package/dist/form.js +11 -0
- package/dist/form.js.map +1 -0
- package/dist/history.cjs +22 -0
- package/dist/history.cjs.map +1 -0
- package/dist/history.d.cts +31 -0
- package/dist/history.d.ts +31 -0
- package/dist/history.js +17 -0
- package/dist/history.js.map +1 -0
- package/dist/i18n.cjs +29 -0
- package/dist/i18n.cjs.map +1 -0
- package/dist/i18n.d.cts +36 -0
- package/dist/i18n.d.ts +36 -0
- package/dist/i18n.js +24 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.cjs +391 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +223 -0
- package/dist/index.js.map +1 -0
- package/dist/interaction/PagePointerSource.vue.d.cts +3 -0
- package/dist/interaction/PagePointerSource.vue.d.ts +3 -0
- package/dist/interaction.cjs +63 -0
- package/dist/interaction.cjs.map +1 -0
- package/dist/interaction.d.cts +40 -0
- package/dist/interaction.d.ts +40 -0
- package/dist/interaction.js +47 -0
- package/dist/interaction.js.map +1 -0
- package/dist/link/LinkAnchor.vue.d.cts +9 -0
- package/dist/link/LinkAnchor.vue.d.ts +9 -0
- package/dist/link/LinkLayer.vue.d.cts +22 -0
- package/dist/link/LinkLayer.vue.d.ts +22 -0
- package/dist/link/composables.d.cts +29 -0
- package/dist/link/composables.d.ts +29 -0
- package/dist/link.cjs +14 -0
- package/dist/link.cjs.map +1 -0
- package/dist/link.d.cts +11 -0
- package/dist/link.d.ts +11 -0
- package/dist/link.js +8 -0
- package/dist/link.js.map +1 -0
- package/dist/measurement.cjs +43 -0
- package/dist/measurement.cjs.map +1 -0
- package/dist/measurement.d.cts +51 -0
- package/dist/measurement.d.ts +51 -0
- package/dist/measurement.js +38 -0
- package/dist/measurement.js.map +1 -0
- package/dist/metadata.cjs +22 -0
- package/dist/metadata.cjs.map +1 -0
- package/dist/metadata.d.cts +31 -0
- package/dist/metadata.d.ts +31 -0
- package/dist/metadata.js +17 -0
- package/dist/metadata.js.map +1 -0
- package/dist/page-D9XIuLSj.js +16 -0
- package/dist/page-D9XIuLSj.js.map +1 -0
- package/dist/page-Doy4_Sdz.cjs +15 -0
- package/dist/page-Doy4_Sdz.cjs.map +1 -0
- package/dist/page-edit.cjs +15 -0
- package/dist/page-edit.cjs.map +1 -0
- package/dist/page-edit.d.cts +16 -0
- package/dist/page-edit.d.ts +16 -0
- package/dist/page-edit.js +10 -0
- package/dist/page-edit.js.map +1 -0
- package/dist/page-layers-c-CJYAUO.cjs +30 -0
- package/dist/page-layers-c-CJYAUO.cjs.map +1 -0
- package/dist/page-layers-rlh4-1qr.js +31 -0
- package/dist/page-layers-rlh4-1qr.js.map +1 -0
- package/dist/page-layers.d.cts +21 -0
- package/dist/page-layers.d.ts +21 -0
- package/dist/page-view/PageView.vue.d.cts +42 -0
- package/dist/page-view/PageView.vue.d.ts +42 -0
- package/dist/page-view.cjs +5 -0
- package/dist/page-view.cjs.map +1 -0
- package/dist/page-view.d.cts +10 -0
- package/dist/page-view.d.ts +10 -0
- package/dist/page-view.js +5 -0
- package/dist/page-view.js.map +1 -0
- package/dist/projector-CDZn1kh1.js +32 -0
- package/dist/projector-CDZn1kh1.js.map +1 -0
- package/dist/projector-Cf7879sx.cjs +31 -0
- package/dist/projector-Cf7879sx.cjs.map +1 -0
- package/dist/redaction.cjs +34 -0
- package/dist/redaction.cjs.map +1 -0
- package/dist/redaction.d.cts +44 -0
- package/dist/redaction.d.ts +44 -0
- package/dist/redaction.js +29 -0
- package/dist/redaction.js.map +1 -0
- package/dist/render/RenderLayer.vue.d.cts +23 -0
- package/dist/render/RenderLayer.vue.d.ts +23 -0
- package/dist/render/TileImage.vue.d.cts +13 -0
- package/dist/render/TileImage.vue.d.ts +13 -0
- package/dist/render/TilePlane.vue.d.cts +7 -0
- package/dist/render/TilePlane.vue.d.ts +7 -0
- package/dist/render.cjs +262 -0
- package/dist/render.cjs.map +1 -0
- package/dist/render.d.cts +16 -0
- package/dist/render.d.ts +16 -0
- package/dist/render.js +257 -0
- package/dist/render.js.map +1 -0
- package/dist/runtime/DocumentGate.vue.d.cts +24 -0
- package/dist/runtime/DocumentGate.vue.d.ts +24 -0
- package/dist/runtime/DocumentScope.vue.d.cts +16 -0
- package/dist/runtime/DocumentScope.vue.d.ts +16 -0
- package/dist/runtime/KernelProvider.vue.d.cts +17 -0
- package/dist/runtime/KernelProvider.vue.d.ts +17 -0
- package/dist/runtime/SvgShapes.vue.d.cts +7 -0
- package/dist/runtime/SvgShapes.vue.d.ts +7 -0
- package/dist/runtime/Viewer.vue.d.cts +57 -0
- package/dist/runtime/Viewer.vue.d.ts +57 -0
- package/dist/runtime/capabilities.d.cts +52 -0
- package/dist/runtime/capabilities.d.ts +52 -0
- package/dist/runtime/documents.d.cts +42 -0
- package/dist/runtime/documents.d.ts +42 -0
- package/dist/runtime/kernel.d.cts +36 -0
- package/dist/runtime/kernel.d.ts +36 -0
- package/dist/runtime/page.d.cts +15 -0
- package/dist/runtime/page.d.ts +15 -0
- package/dist/runtime/refs.d.cts +12 -0
- package/dist/runtime/refs.d.ts +12 -0
- package/dist/runtime/surface-box.d.cts +12 -0
- package/dist/runtime/surface-box.d.ts +12 -0
- package/dist/runtime.cjs +53 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.d.cts +24 -0
- package/dist/runtime.d.ts +24 -0
- package/dist/runtime.js +38 -0
- package/dist/runtime.js.map +1 -0
- package/dist/scope-BQA4toWB.cjs +17 -0
- package/dist/scope-BQA4toWB.cjs.map +1 -0
- package/dist/scope-BgdCqnYb.js +18 -0
- package/dist/scope-BgdCqnYb.js.map +1 -0
- package/dist/search/SearchLayer.vue.d.cts +17 -0
- package/dist/search/SearchLayer.vue.d.ts +17 -0
- package/dist/search/composables.d.cts +31 -0
- package/dist/search/composables.d.ts +31 -0
- package/dist/search.cjs +17 -0
- package/dist/search.cjs.map +1 -0
- package/dist/search.d.cts +10 -0
- package/dist/search.d.ts +10 -0
- package/dist/search.js +11 -0
- package/dist/search.js.map +1 -0
- package/dist/selection/SelectionClipboard.vue.d.cts +24 -0
- package/dist/selection/SelectionClipboard.vue.d.ts +24 -0
- package/dist/selection/SelectionHandles.vue.d.cts +8 -0
- package/dist/selection/SelectionHandles.vue.d.ts +8 -0
- package/dist/selection/SelectionLayer.vue.d.cts +3 -0
- package/dist/selection/SelectionLayer.vue.d.ts +3 -0
- package/dist/selection/SelectionMenu.vue.d.cts +23 -0
- package/dist/selection/SelectionMenu.vue.d.ts +23 -0
- package/dist/selection/composables.d.cts +24 -0
- package/dist/selection/composables.d.ts +24 -0
- package/dist/selection.cjs +24 -0
- package/dist/selection.cjs.map +1 -0
- package/dist/selection.d.cts +16 -0
- package/dist/selection.d.ts +16 -0
- package/dist/selection.js +15 -0
- package/dist/selection.js.map +1 -0
- package/dist/shell.cjs +72 -0
- package/dist/shell.cjs.map +1 -0
- package/dist/shell.d.cts +56 -0
- package/dist/shell.d.ts +56 -0
- package/dist/shell.js +67 -0
- package/dist/shell.js.map +1 -0
- package/dist/signature/composables.d.cts +39 -0
- package/dist/signature/composables.d.ts +39 -0
- package/dist/signature.cjs +16 -0
- package/dist/signature.cjs.map +1 -0
- package/dist/signature.d.cts +15 -0
- package/dist/signature.d.ts +15 -0
- package/dist/signature.js +10 -0
- package/dist/signature.js.map +1 -0
- package/dist/stage/PageSurface.vue.d.cts +29 -0
- package/dist/stage/PageSurface.vue.d.ts +29 -0
- package/dist/stage/Scrollbar.vue.d.cts +32 -0
- package/dist/stage/Scrollbar.vue.d.ts +32 -0
- package/dist/stage/Stage.vue.d.cts +44 -0
- package/dist/stage/Stage.vue.d.ts +44 -0
- package/dist/stage/StageScope.vue.d.cts +17 -0
- package/dist/stage/StageScope.vue.d.ts +17 -0
- package/dist/stage/composables.d.cts +41 -0
- package/dist/stage/composables.d.ts +41 -0
- package/dist/stage/scope.d.cts +12 -0
- package/dist/stage/scope.d.ts +12 -0
- package/dist/stage.cjs +21 -0
- package/dist/stage.cjs.map +1 -0
- package/dist/stage.d.cts +17 -0
- package/dist/stage.d.ts +17 -0
- package/dist/stage.js +15 -0
- package/dist/stage.js.map +1 -0
- package/dist/stamp.cjs +68 -0
- package/dist/stamp.cjs.map +1 -0
- package/dist/stamp.d.cts +61 -0
- package/dist/stamp.d.ts +61 -0
- package/dist/stamp.js +61 -0
- package/dist/stamp.js.map +1 -0
- package/dist/state-DZg8q3v6.js +52 -0
- package/dist/state-DZg8q3v6.js.map +1 -0
- package/dist/state-M22NDJQo.cjs +51 -0
- package/dist/state-M22NDJQo.cjs.map +1 -0
- package/dist/state.d.cts +32 -0
- package/dist/state.d.ts +32 -0
- package/dist/strip-BSDB39Xh.cjs +743 -0
- package/dist/strip-BSDB39Xh.cjs.map +1 -0
- package/dist/strip-C3wLonKB.js +744 -0
- package/dist/strip-C3wLonKB.js.map +1 -0
- package/dist/surface-box-B9oa4YoG.js +12 -0
- package/dist/surface-box-B9oa4YoG.js.map +1 -0
- package/dist/surface-box-C7EvUOXp.cjs +11 -0
- package/dist/surface-box-C7EvUOXp.cjs.map +1 -0
- package/dist/theme.d.cts +13 -0
- package/dist/theme.d.ts +13 -0
- package/dist/toolbar/DefaultCollapsed.vue.d.cts +9 -0
- package/dist/toolbar/DefaultCollapsed.vue.d.ts +9 -0
- package/dist/toolbar/DefaultCommand.vue.d.cts +8 -0
- package/dist/toolbar/DefaultCommand.vue.d.ts +8 -0
- package/dist/toolbar/DefaultGroupTrigger.vue.d.cts +9 -0
- package/dist/toolbar/DefaultGroupTrigger.vue.d.ts +9 -0
- package/dist/toolbar/DefaultOverflowMenu.vue.d.cts +9 -0
- package/dist/toolbar/DefaultOverflowMenu.vue.d.ts +9 -0
- package/dist/toolbar/DefaultOverflowTrigger.vue.d.cts +10 -0
- package/dist/toolbar/DefaultOverflowTrigger.vue.d.ts +10 -0
- package/dist/toolbar/Measured.vue.d.cts +21 -0
- package/dist/toolbar/Measured.vue.d.ts +21 -0
- package/dist/toolbar/NativeSlotSocket.vue.d.cts +22 -0
- package/dist/toolbar/NativeSlotSocket.vue.d.ts +22 -0
- package/dist/toolbar/Toolbar.vue.d.cts +82 -0
- package/dist/toolbar/Toolbar.vue.d.ts +82 -0
- package/dist/toolbar/ToolbarPart.vue.d.cts +42 -0
- package/dist/toolbar/ToolbarPart.vue.d.ts +42 -0
- package/dist/toolbar/paint.d.cts +3 -0
- package/dist/toolbar/paint.d.ts +3 -0
- package/dist/toolbar/strip.d.cts +14 -0
- package/dist/toolbar/strip.d.ts +14 -0
- package/dist/toolbar/views.d.cts +15 -0
- package/dist/toolbar/views.d.ts +15 -0
- package/dist/toolbar.cjs +27 -0
- package/dist/toolbar.cjs.map +1 -0
- package/dist/toolbar.d.cts +14 -0
- package/dist/toolbar.d.ts +14 -0
- package/dist/toolbar.js +12 -0
- package/dist/toolbar.js.map +1 -0
- package/dist/view-manager.cjs +22 -0
- package/dist/view-manager.cjs.map +1 -0
- package/dist/view-manager.d.cts +24 -0
- package/dist/view-manager.d.ts +24 -0
- package/dist/view-manager.js +17 -0
- package/dist/view-manager.js.map +1 -0
- package/package.json +169 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/search: the Vue surface of `@embedpdf/plugin-search`.
|
|
3
|
+
*
|
|
4
|
+
* `<SearchLayer>` paints the matches on a page; search is driven from your own
|
|
5
|
+
* chrome with `useSearch()`, shown with `useSearchState()` and
|
|
6
|
+
* `useSearchHits()`, and followed with `useSearchEvent()`.
|
|
7
|
+
*/
|
|
8
|
+
export * from '@embedpdf/plugin-search';
|
|
9
|
+
export { default as SearchLayer } from './search/SearchLayer.vue.cjs';
|
|
10
|
+
export { useSearch, useSearchEvent, useSearchHits, useSearchSettings, useSearchState, } from './search/composables.cjs';
|
package/dist/search.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/search: the Vue surface of `@embedpdf/plugin-search`.
|
|
3
|
+
*
|
|
4
|
+
* `<SearchLayer>` paints the matches on a page; search is driven from your own
|
|
5
|
+
* chrome with `useSearch()`, shown with `useSearchState()` and
|
|
6
|
+
* `useSearchHits()`, and followed with `useSearchEvent()`.
|
|
7
|
+
*/
|
|
8
|
+
export * from '@embedpdf/plugin-search';
|
|
9
|
+
export { default as SearchLayer } from './search/SearchLayer.vue.js';
|
|
10
|
+
export { useSearch, useSearchEvent, useSearchHits, useSearchSettings, useSearchState, } from './search/composables.js';
|
package/dist/search.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "@embedpdf/plugin-search";
|
|
2
|
+
import { _, u, a, b, c, d } from "./SearchLayer.vue_vue_type_script_setup_true_lang-BlLIPH1B.js";
|
|
3
|
+
export {
|
|
4
|
+
_ as SearchLayer,
|
|
5
|
+
u as useSearch,
|
|
6
|
+
a as useSearchEvent,
|
|
7
|
+
b as useSearchHits,
|
|
8
|
+
c as useSearchSettings,
|
|
9
|
+
d as useSearchState
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Fetch the selected text as soon as the selection settles (default true).
|
|
5
|
+
* The browser's `copy` event must be answered at once, so without it only
|
|
6
|
+
* Ctrl+C / Cmd+C copies, a moment later.
|
|
7
|
+
*/
|
|
8
|
+
prefetch?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Copy only while focus is inside this element (a template ref), for a
|
|
11
|
+
* page with more than one viewer. Copying works once it has mounted.
|
|
12
|
+
* Default: anywhere on the page.
|
|
13
|
+
*/
|
|
14
|
+
target?: MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
refused: () => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onRefused?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
prefetch: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Fetch the selected text as soon as the selection settles (default true).
|
|
5
|
+
* The browser's `copy` event must be answered at once, so without it only
|
|
6
|
+
* Ctrl+C / Cmd+C copies, a moment later.
|
|
7
|
+
*/
|
|
8
|
+
prefetch?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Copy only while focus is inside this element (a template ref), for a
|
|
11
|
+
* page with more than one viewer. Copying works once it has mounted.
|
|
12
|
+
* Default: anywhere on the page.
|
|
13
|
+
*/
|
|
14
|
+
target?: MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
refused: () => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onRefused?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
prefetch: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StageTokenProp } from '../stage/scope.cjs';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The stage view this overlay belongs to. Default: the enclosing `<Stage>`'s. */
|
|
4
|
+
token?: StageTokenProp;
|
|
5
|
+
};
|
|
6
|
+
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>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StageTokenProp } from '../stage/scope.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The stage view this overlay belongs to. Default: the enclosing `<Stage>`'s. */
|
|
4
|
+
token?: StageTokenProp;
|
|
5
|
+
};
|
|
6
|
+
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>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AnchoredPlacement } from '@embedpdf/web';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Gap in screen px between the selection and the menu. Default 8. */
|
|
4
|
+
gap?: number;
|
|
5
|
+
/** Where the menu sits around the selection. Default `'top'`. */
|
|
6
|
+
placement?: AnchoredPlacement;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_Slots = {
|
|
9
|
+
/** The menu: compose it from `useSelection()`, `copySelection`, an annotation call. */
|
|
10
|
+
default?(): unknown;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
+
gap: number;
|
|
14
|
+
placement: AnchoredPlacement;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AnchoredPlacement } from '@embedpdf/web';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Gap in screen px between the selection and the menu. Default 8. */
|
|
4
|
+
gap?: number;
|
|
5
|
+
/** Where the menu sits around the selection. Default `'top'`. */
|
|
6
|
+
placement?: AnchoredPlacement;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_Slots = {
|
|
9
|
+
/** The menu: compose it from `useSelection()`, `copySelection`, an annotation call. */
|
|
10
|
+
default?(): unknown;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
+
gap: number;
|
|
14
|
+
placement: AnchoredPlacement;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SelectionCapability } from '@embedpdf/plugin-selection';
|
|
2
|
+
import type { EventHook } from '@embedpdf/core';
|
|
3
|
+
/**
|
|
4
|
+
* The selection API (`select()`, `readText()`, `canCopy()`, …) for your
|
|
5
|
+
* chrome: toolbars, context menus, automation. The object never changes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useSelection(): SelectionCapability;
|
|
8
|
+
/** Subscribe to one selection event while the component lives: `useSelectionEvent((selection) => selection.onCommitted, handler)`. */
|
|
9
|
+
export declare function useSelectionEvent<Event>(select: (selection: SelectionCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
10
|
+
/**
|
|
11
|
+
* The selection's state as refs: whether anything is selected, whether the
|
|
12
|
+
* user is still selecting, the range and the pages it's on (the page's State
|
|
13
|
+
* table, declared once in `selectionState`). With a selector, one ref that
|
|
14
|
+
* updates only when the value it picks changes. The empty state without a
|
|
15
|
+
* document.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useSelectionState: import("../index.cjs").StateComposable<{
|
|
18
|
+
hasSelection: boolean;
|
|
19
|
+
isSelecting: boolean;
|
|
20
|
+
range: import("@embedpdf/plugin-selection").TextRange | null;
|
|
21
|
+
pages: readonly import("@embedpdf/core").PageRef[];
|
|
22
|
+
}>;
|
|
23
|
+
/** The selection settings (`dragThreshold`, `color`, `handles`), with or without a document, as refs. Takes a selector. */
|
|
24
|
+
export declare const useSelectionSettings: import("../index.cjs").SettingsComposable<import("@embedpdf/plugin-selection").SelectionSettings & object>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SelectionCapability } from '@embedpdf/plugin-selection';
|
|
2
|
+
import type { EventHook } from '@embedpdf/core';
|
|
3
|
+
/**
|
|
4
|
+
* The selection API (`select()`, `readText()`, `canCopy()`, …) for your
|
|
5
|
+
* chrome: toolbars, context menus, automation. The object never changes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useSelection(): SelectionCapability;
|
|
8
|
+
/** Subscribe to one selection event while the component lives: `useSelectionEvent((selection) => selection.onCommitted, handler)`. */
|
|
9
|
+
export declare function useSelectionEvent<Event>(select: (selection: SelectionCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
10
|
+
/**
|
|
11
|
+
* The selection's state as refs: whether anything is selected, whether the
|
|
12
|
+
* user is still selecting, the range and the pages it's on (the page's State
|
|
13
|
+
* table, declared once in `selectionState`). With a selector, one ref that
|
|
14
|
+
* updates only when the value it picks changes. The empty state without a
|
|
15
|
+
* document.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useSelectionState: import("../index.js").StateComposable<{
|
|
18
|
+
hasSelection: boolean;
|
|
19
|
+
isSelecting: boolean;
|
|
20
|
+
range: import("@embedpdf/plugin-selection").TextRange | null;
|
|
21
|
+
pages: readonly import("@embedpdf/core").PageRef[];
|
|
22
|
+
}>;
|
|
23
|
+
/** The selection settings (`dragThreshold`, `color`, `handles`), with or without a document, as refs. Takes a selector. */
|
|
24
|
+
export declare const useSelectionSettings: import("../index.js").SettingsComposable<import("@embedpdf/plugin-selection").SelectionSettings & object>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pluginSelection = require("@embedpdf/plugin-selection");
|
|
4
|
+
const web = require("@embedpdf/web");
|
|
5
|
+
const SelectionClipboard_vue_vue_type_script_setup_true_lang = require("./SelectionClipboard.vue_vue_type_script_setup_true_lang-C8T9q6Kb.cjs");
|
|
6
|
+
Object.defineProperty(exports, "copySelection", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: () => web.copySelection
|
|
9
|
+
});
|
|
10
|
+
exports.SelectionClipboard = SelectionClipboard_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
11
|
+
exports.SelectionHandles = SelectionClipboard_vue_vue_type_script_setup_true_lang._sfc_main$1;
|
|
12
|
+
exports.SelectionLayer = SelectionClipboard_vue_vue_type_script_setup_true_lang._sfc_main$2;
|
|
13
|
+
exports.SelectionMenu = SelectionClipboard_vue_vue_type_script_setup_true_lang._sfc_main$3;
|
|
14
|
+
exports.useSelection = SelectionClipboard_vue_vue_type_script_setup_true_lang.useSelection;
|
|
15
|
+
exports.useSelectionEvent = SelectionClipboard_vue_vue_type_script_setup_true_lang.useSelectionEvent;
|
|
16
|
+
exports.useSelectionSettings = SelectionClipboard_vue_vue_type_script_setup_true_lang.useSelectionSettings;
|
|
17
|
+
exports.useSelectionState = SelectionClipboard_vue_vue_type_script_setup_true_lang.useSelectionState;
|
|
18
|
+
Object.keys(pluginSelection).forEach((k) => {
|
|
19
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: () => pluginSelection[k]
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=selection.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/selection: the Vue surface of `@embedpdf/plugin-selection`.
|
|
3
|
+
*
|
|
4
|
+
* `<SelectionLayer>` paints the selected text on a page, `<SelectionMenu>`
|
|
5
|
+
* floats your menu over it, `<SelectionHandles>` adds the grips touch screens
|
|
6
|
+
* need, and `<SelectionClipboard>` wires Ctrl+C / Cmd+C. The composables are
|
|
7
|
+
* the plugin's four: `useSelection()`, `useSelectionState()`,
|
|
8
|
+
* `useSelectionSettings()` and `useSelectionEvent()`.
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-selection';
|
|
11
|
+
export { copySelection } from '@embedpdf/web';
|
|
12
|
+
export { default as SelectionLayer } from './selection/SelectionLayer.vue.cjs';
|
|
13
|
+
export { default as SelectionMenu } from './selection/SelectionMenu.vue.cjs';
|
|
14
|
+
export { default as SelectionHandles } from './selection/SelectionHandles.vue.cjs';
|
|
15
|
+
export { default as SelectionClipboard } from './selection/SelectionClipboard.vue.cjs';
|
|
16
|
+
export { useSelection, useSelectionEvent, useSelectionSettings, useSelectionState, } from './selection/composables.cjs';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/selection: the Vue surface of `@embedpdf/plugin-selection`.
|
|
3
|
+
*
|
|
4
|
+
* `<SelectionLayer>` paints the selected text on a page, `<SelectionMenu>`
|
|
5
|
+
* floats your menu over it, `<SelectionHandles>` adds the grips touch screens
|
|
6
|
+
* need, and `<SelectionClipboard>` wires Ctrl+C / Cmd+C. The composables are
|
|
7
|
+
* the plugin's four: `useSelection()`, `useSelectionState()`,
|
|
8
|
+
* `useSelectionSettings()` and `useSelectionEvent()`.
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-selection';
|
|
11
|
+
export { copySelection } from '@embedpdf/web';
|
|
12
|
+
export { default as SelectionLayer } from './selection/SelectionLayer.vue.js';
|
|
13
|
+
export { default as SelectionMenu } from './selection/SelectionMenu.vue.js';
|
|
14
|
+
export { default as SelectionHandles } from './selection/SelectionHandles.vue.js';
|
|
15
|
+
export { default as SelectionClipboard } from './selection/SelectionClipboard.vue.js';
|
|
16
|
+
export { useSelection, useSelectionEvent, useSelectionSettings, useSelectionState, } from './selection/composables.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "@embedpdf/plugin-selection";
|
|
2
|
+
import { copySelection } from "@embedpdf/web";
|
|
3
|
+
import { _, a, b, c, u, d, e, f } from "./SelectionClipboard.vue_vue_type_script_setup_true_lang-C4TUDuyu.js";
|
|
4
|
+
export {
|
|
5
|
+
_ as SelectionClipboard,
|
|
6
|
+
a as SelectionHandles,
|
|
7
|
+
b as SelectionLayer,
|
|
8
|
+
c as SelectionMenu,
|
|
9
|
+
copySelection,
|
|
10
|
+
u as useSelection,
|
|
11
|
+
d as useSelectionEvent,
|
|
12
|
+
e as useSelectionSettings,
|
|
13
|
+
f as useSelectionState
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=selection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/dist/shell.cjs
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pluginShell = require("@embedpdf/plugin-shell");
|
|
4
|
+
const vue = require("vue");
|
|
5
|
+
const web = require("@embedpdf/web");
|
|
6
|
+
const capabilities = require("./capabilities-DVNJmgy7.cjs");
|
|
7
|
+
const state = require("./state-M22NDJQo.cjs");
|
|
8
|
+
function useShell() {
|
|
9
|
+
return capabilities.useCapability(pluginShell.ShellToken);
|
|
10
|
+
}
|
|
11
|
+
function useShellEvent(select, handler) {
|
|
12
|
+
capabilities.useCapabilityEvent(pluginShell.ShellToken, select, handler);
|
|
13
|
+
}
|
|
14
|
+
const useShellState = state.stateComposable(pluginShell.shellState);
|
|
15
|
+
const NO_PROPS = Object.freeze({});
|
|
16
|
+
function useSurface(id) {
|
|
17
|
+
const shell = capabilities.useOptionalCapability(pluginShell.ShellToken);
|
|
18
|
+
const isOpen = capabilities.useOptionalSelector(pluginShell.ShellToken, (current) => current.isOpen(vue.toValue(id)), false);
|
|
19
|
+
const props = capabilities.useOptionalSelector(
|
|
20
|
+
pluginShell.ShellToken,
|
|
21
|
+
(current) => {
|
|
22
|
+
var _a;
|
|
23
|
+
return ((_a = current.getSurface(vue.toValue(id))) == null ? void 0 : _a.props) ?? NO_PROPS;
|
|
24
|
+
},
|
|
25
|
+
NO_PROPS
|
|
26
|
+
);
|
|
27
|
+
return Object.freeze({
|
|
28
|
+
isOpen,
|
|
29
|
+
props,
|
|
30
|
+
open: (options) => {
|
|
31
|
+
var _a;
|
|
32
|
+
return (_a = shell.value) == null ? void 0 : _a.open(vue.toValue(id), options);
|
|
33
|
+
},
|
|
34
|
+
close: () => {
|
|
35
|
+
var _a;
|
|
36
|
+
return (_a = shell.value) == null ? void 0 : _a.close(vue.toValue(id));
|
|
37
|
+
},
|
|
38
|
+
toggle: (options) => {
|
|
39
|
+
var _a;
|
|
40
|
+
return (_a = shell.value) == null ? void 0 : _a.toggle(vue.toValue(id), options);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function useSurfaceFocus(id, element, options = {}) {
|
|
45
|
+
const shell = capabilities.useOptionalCapability(pluginShell.ShellToken);
|
|
46
|
+
const request = capabilities.useOptionalSelector(
|
|
47
|
+
pluginShell.ShellToken,
|
|
48
|
+
(current) => {
|
|
49
|
+
var _a;
|
|
50
|
+
return ((_a = current.getSurface(vue.toValue(id))) == null ? void 0 : _a.focusRequest) ?? 0;
|
|
51
|
+
},
|
|
52
|
+
0
|
|
53
|
+
);
|
|
54
|
+
const follower = web.createSurfaceFocusFollower();
|
|
55
|
+
vue.watch(
|
|
56
|
+
() => [vue.toValue(element) ?? null, shell.value, request.value],
|
|
57
|
+
([target, current, value]) => follower.follow(target, current, value, options),
|
|
58
|
+
{ flush: "post", immediate: true }
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
exports.useShell = useShell;
|
|
62
|
+
exports.useShellEvent = useShellEvent;
|
|
63
|
+
exports.useShellState = useShellState;
|
|
64
|
+
exports.useSurface = useSurface;
|
|
65
|
+
exports.useSurfaceFocus = useSurfaceFocus;
|
|
66
|
+
Object.keys(pluginShell).forEach((k) => {
|
|
67
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: () => pluginShell[k]
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=shell.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.cjs","sources":["../src/shell.ts"],"sourcesContent":["/**\n * @embedpdf/vue/shell: the Vue surface of `@embedpdf/plugin-shell`. The app\n * owns every surface's DOM; these composables bind its open/closed state to the\n * kernel, so commands can drive it and an app can save and restore it.\n *\n * They work without a document: shell state is per document, and chrome that\n * uses it (panel buttons, menu anchors) stays mounted across the empty\n * workspace. With no document every surface reads as closed, no menu as open,\n * and `useSurface`'s verbs do nothing; `useShell()` is then the stand-in, whose\n * methods throw `not-ready`.\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-shell';\nimport { toValue, watch } from 'vue';\nimport type { MaybeRefOrGetter, Ref } from 'vue';\nimport { ShellToken, shellState } from '@embedpdf/plugin-shell';\nimport type { OpenSurfaceOptions, ShellCapability, SurfaceProps } from '@embedpdf/plugin-shell';\nimport type { EventHook } from '@embedpdf/core';\nimport { createSurfaceFocusFollower, type SurfaceFocusOptions } from '@embedpdf/web';\nimport {\n useCapability,\n useCapabilityEvent,\n useOptionalCapability,\n useOptionalSelector,\n} from './runtime/capabilities';\nimport { stateComposable } from './state';\n\n/** The shell API: open and close panels, dialogs and menus. Without a document its methods throw `not-ready`. */\nexport function useShell(): ShellCapability {\n return useCapability(ShellToken);\n}\n\n/** Subscribe to one shell event while the component lives: `useShellEvent((shell) => shell.onSurfaceOpened, handler)`. */\nexport function useShellEvent<Event>(\n select: (shell: ShellCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(ShellToken, select, handler);\n}\n\n/**\n * Which panels, dialogs and menus are open, as refs (the page's State table,\n * declared once in `shellState`). With a selector, one ref, which updates only\n * when what it picks changes. Without a document nothing is open.\n */\nexport const useShellState = stateComposable(shellState);\n\n/** One surface, as {@link useSurface} gives it: its state as refs, and the verbs. */\nexport interface SurfaceHandle {\n /** Whether the surface is open. */\n readonly isOpen: Readonly<Ref<boolean>>;\n /** The props the surface was opened with, or updated to; empty when it has none. */\n readonly props: Readonly<Ref<SurfaceProps>>;\n open(options?: OpenSurfaceOptions): void;\n close(): void;\n toggle(options?: OpenSurfaceOptions): void;\n}\n\nconst NO_PROPS: SurfaceProps = Object.freeze({});\n\n/**\n * One named surface (a panel, a dialog, an overlay) of this subtree's\n * document: `const { isOpen, toggle } = useSurface('comments')`. Its state is\n * refs, so destructuring keeps them reactive; pass a getter for an id that\n * changes. Reads as closed, and its verbs do nothing, while no document is open.\n */\nexport function useSurface(id: MaybeRefOrGetter<string>): SurfaceHandle {\n const shell = useOptionalCapability(ShellToken);\n const isOpen = useOptionalSelector(ShellToken, (current) => current.isOpen(toValue(id)), false);\n const props = useOptionalSelector(\n ShellToken,\n (current) => current.getSurface(toValue(id))?.props ?? NO_PROPS,\n NO_PROPS,\n );\n return Object.freeze({\n isOpen,\n props,\n open: (options?: OpenSurfaceOptions) => shell.value?.open(toValue(id), options),\n close: () => shell.value?.close(toValue(id)),\n toggle: (options?: OpenSurfaceOptions) => shell.value?.toggle(toValue(id), options),\n });\n}\n\nexport type { SurfaceFocusOptions };\n\n/**\n * Put the cursor in an element when the surface `id` asks for it: on every\n * `open(id, { focus: true })`, a command whose panel says `focus` among them, and\n * when the element mounts while the request is up (the panel opened, or its code\n * loaded, because of it). A plain open never moves it. `element` is a template\n * ref (`useTemplateRef('field')`); `select` selects an input's text, so typing\n * replaces it. Reads the surface of this subtree's document.\n */\nexport function useSurfaceFocus(\n id: MaybeRefOrGetter<string>,\n element: MaybeRefOrGetter<HTMLElement | null | undefined>,\n options: SurfaceFocusOptions = {},\n): void {\n const shell = useOptionalCapability(ShellToken);\n const request = useOptionalSelector(\n ShellToken,\n (current) => current.getSurface(toValue(id))?.focusRequest ?? 0,\n 0,\n );\n const follower = createSurfaceFocusFollower();\n // After the DOM updates, so an element that has just mounted is there to take focus.\n watch(\n () => [toValue(element) ?? null, shell.value, request.value] as const,\n ([target, current, value]) => follower.follow(target, current, value, options),\n { flush: 'post', immediate: true },\n );\n}\n"],"names":["useCapability","ShellToken","useCapabilityEvent","stateComposable","shellState","useOptionalCapability","useOptionalSelector","toValue","createSurfaceFocusFollower","watch"],"mappings":";;;;;;;AA6BO,SAAS,WAA4B;AAC1C,SAAOA,aAAAA,cAAcC,YAAAA,UAAU;AACjC;AAGO,SAAS,cACd,QACA,SACM;AACNC,kCAAmBD,YAAAA,YAAY,QAAQ,OAAO;AAChD;AAOO,MAAM,gBAAgBE,MAAAA,gBAAgBC,YAAAA,UAAU;AAavD,MAAM,WAAyB,OAAO,OAAO,EAAE;AAQxC,SAAS,WAAW,IAA6C;AACtE,QAAM,QAAQC,aAAAA,sBAAsBJ,sBAAU;AAC9C,QAAM,SAASK,aAAAA,oBAAoBL,YAAAA,YAAY,CAAC,YAAY,QAAQ,OAAOM,IAAAA,QAAQ,EAAE,CAAC,GAAG,KAAK;AAC9F,QAAM,QAAQD,aAAAA;AAAAA,IACZL,YAAAA;AAAAA,IACA,CAAC;;AAAY,4BAAQ,WAAWM,IAAAA,QAAQ,EAAE,CAAC,MAA9B,mBAAiC,UAAS;AAAA;AAAA,IACvD;AAAA,EAAA;AAEF,SAAO,OAAO,OAAO;AAAA,IACnB;AAAA,IACA;AAAA,IACA,MAAM,CAAC,YAAA;;AAAiC,yBAAM,UAAN,mBAAa,KAAKA,IAAAA,QAAQ,EAAE,GAAG;AAAA;AAAA,IACvE,OAAO,MAAA;;AAAM,yBAAM,UAAN,mBAAa,MAAMA,IAAAA,QAAQ,EAAE;AAAA;AAAA,IAC1C,QAAQ,CAAC,YAAA;;AAAiC,yBAAM,UAAN,mBAAa,OAAOA,IAAAA,QAAQ,EAAE,GAAG;AAAA;AAAA,EAAO,CACnF;AACH;AAYO,SAAS,gBACd,IACA,SACA,UAA+B,CAAA,GACzB;AACN,QAAM,QAAQF,aAAAA,sBAAsBJ,sBAAU;AAC9C,QAAM,UAAUK,aAAAA;AAAAA,IACdL,YAAAA;AAAAA,IACA,CAAC;;AAAY,4BAAQ,WAAWM,IAAAA,QAAQ,EAAE,CAAC,MAA9B,mBAAiC,iBAAgB;AAAA;AAAA,IAC9D;AAAA,EAAA;AAEF,QAAM,WAAWC,IAAAA,2BAAA;AAEjBC,MAAAA;AAAAA,IACE,MAAM,CAACF,IAAAA,QAAQ,OAAO,KAAK,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,IAC3D,CAAC,CAAC,QAAQ,SAAS,KAAK,MAAM,SAAS,OAAO,QAAQ,SAAS,OAAO,OAAO;AAAA,IAC7E,EAAE,OAAO,QAAQ,WAAW,KAAA;AAAA,EAAK;AAErC;;;;;;;;;;;;"}
|
package/dist/shell.d.cts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/shell: the Vue surface of `@embedpdf/plugin-shell`. The app
|
|
3
|
+
* owns every surface's DOM; these composables bind its open/closed state to the
|
|
4
|
+
* kernel, so commands can drive it and an app can save and restore it.
|
|
5
|
+
*
|
|
6
|
+
* They work without a document: shell state is per document, and chrome that
|
|
7
|
+
* uses it (panel buttons, menu anchors) stays mounted across the empty
|
|
8
|
+
* workspace. With no document every surface reads as closed, no menu as open,
|
|
9
|
+
* and `useSurface`'s verbs do nothing; `useShell()` is then the stand-in, whose
|
|
10
|
+
* methods throw `not-ready`.
|
|
11
|
+
*/
|
|
12
|
+
export * from '@embedpdf/plugin-shell';
|
|
13
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
14
|
+
import type { OpenSurfaceOptions, ShellCapability, SurfaceProps } from '@embedpdf/plugin-shell';
|
|
15
|
+
import type { EventHook } from '@embedpdf/core';
|
|
16
|
+
import { type SurfaceFocusOptions } from '@embedpdf/web';
|
|
17
|
+
/** The shell API: open and close panels, dialogs and menus. Without a document its methods throw `not-ready`. */
|
|
18
|
+
export declare function useShell(): ShellCapability;
|
|
19
|
+
/** Subscribe to one shell event while the component lives: `useShellEvent((shell) => shell.onSurfaceOpened, handler)`. */
|
|
20
|
+
export declare function useShellEvent<Event>(select: (shell: ShellCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
21
|
+
/**
|
|
22
|
+
* Which panels, dialogs and menus are open, as refs (the page's State table,
|
|
23
|
+
* declared once in `shellState`). With a selector, one ref, which updates only
|
|
24
|
+
* when what it picks changes. Without a document nothing is open.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useShellState: import("./state.cjs").StateComposable<{
|
|
27
|
+
openSurfaces: readonly import("@embedpdf/plugin-shell").SurfaceState[];
|
|
28
|
+
openMenus: readonly string[];
|
|
29
|
+
}>;
|
|
30
|
+
/** One surface, as {@link useSurface} gives it: its state as refs, and the verbs. */
|
|
31
|
+
export interface SurfaceHandle {
|
|
32
|
+
/** Whether the surface is open. */
|
|
33
|
+
readonly isOpen: Readonly<Ref<boolean>>;
|
|
34
|
+
/** The props the surface was opened with, or updated to; empty when it has none. */
|
|
35
|
+
readonly props: Readonly<Ref<SurfaceProps>>;
|
|
36
|
+
open(options?: OpenSurfaceOptions): void;
|
|
37
|
+
close(): void;
|
|
38
|
+
toggle(options?: OpenSurfaceOptions): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* One named surface (a panel, a dialog, an overlay) of this subtree's
|
|
42
|
+
* document: `const { isOpen, toggle } = useSurface('comments')`. Its state is
|
|
43
|
+
* refs, so destructuring keeps them reactive; pass a getter for an id that
|
|
44
|
+
* changes. Reads as closed, and its verbs do nothing, while no document is open.
|
|
45
|
+
*/
|
|
46
|
+
export declare function useSurface(id: MaybeRefOrGetter<string>): SurfaceHandle;
|
|
47
|
+
export type { SurfaceFocusOptions };
|
|
48
|
+
/**
|
|
49
|
+
* Put the cursor in an element when the surface `id` asks for it: on every
|
|
50
|
+
* `open(id, { focus: true })`, a command whose panel says `focus` among them, and
|
|
51
|
+
* when the element mounts while the request is up (the panel opened, or its code
|
|
52
|
+
* loaded, because of it). A plain open never moves it. `element` is a template
|
|
53
|
+
* ref (`useTemplateRef('field')`); `select` selects an input's text, so typing
|
|
54
|
+
* replaces it. Reads the surface of this subtree's document.
|
|
55
|
+
*/
|
|
56
|
+
export declare function useSurfaceFocus(id: MaybeRefOrGetter<string>, element: MaybeRefOrGetter<HTMLElement | null | undefined>, options?: SurfaceFocusOptions): void;
|
package/dist/shell.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/shell: the Vue surface of `@embedpdf/plugin-shell`. The app
|
|
3
|
+
* owns every surface's DOM; these composables bind its open/closed state to the
|
|
4
|
+
* kernel, so commands can drive it and an app can save and restore it.
|
|
5
|
+
*
|
|
6
|
+
* They work without a document: shell state is per document, and chrome that
|
|
7
|
+
* uses it (panel buttons, menu anchors) stays mounted across the empty
|
|
8
|
+
* workspace. With no document every surface reads as closed, no menu as open,
|
|
9
|
+
* and `useSurface`'s verbs do nothing; `useShell()` is then the stand-in, whose
|
|
10
|
+
* methods throw `not-ready`.
|
|
11
|
+
*/
|
|
12
|
+
export * from '@embedpdf/plugin-shell';
|
|
13
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
14
|
+
import type { OpenSurfaceOptions, ShellCapability, SurfaceProps } from '@embedpdf/plugin-shell';
|
|
15
|
+
import type { EventHook } from '@embedpdf/core';
|
|
16
|
+
import { type SurfaceFocusOptions } from '@embedpdf/web';
|
|
17
|
+
/** The shell API: open and close panels, dialogs and menus. Without a document its methods throw `not-ready`. */
|
|
18
|
+
export declare function useShell(): ShellCapability;
|
|
19
|
+
/** Subscribe to one shell event while the component lives: `useShellEvent((shell) => shell.onSurfaceOpened, handler)`. */
|
|
20
|
+
export declare function useShellEvent<Event>(select: (shell: ShellCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
21
|
+
/**
|
|
22
|
+
* Which panels, dialogs and menus are open, as refs (the page's State table,
|
|
23
|
+
* declared once in `shellState`). With a selector, one ref, which updates only
|
|
24
|
+
* when what it picks changes. Without a document nothing is open.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useShellState: import("./state.js").StateComposable<{
|
|
27
|
+
openSurfaces: readonly import("@embedpdf/plugin-shell").SurfaceState[];
|
|
28
|
+
openMenus: readonly string[];
|
|
29
|
+
}>;
|
|
30
|
+
/** One surface, as {@link useSurface} gives it: its state as refs, and the verbs. */
|
|
31
|
+
export interface SurfaceHandle {
|
|
32
|
+
/** Whether the surface is open. */
|
|
33
|
+
readonly isOpen: Readonly<Ref<boolean>>;
|
|
34
|
+
/** The props the surface was opened with, or updated to; empty when it has none. */
|
|
35
|
+
readonly props: Readonly<Ref<SurfaceProps>>;
|
|
36
|
+
open(options?: OpenSurfaceOptions): void;
|
|
37
|
+
close(): void;
|
|
38
|
+
toggle(options?: OpenSurfaceOptions): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* One named surface (a panel, a dialog, an overlay) of this subtree's
|
|
42
|
+
* document: `const { isOpen, toggle } = useSurface('comments')`. Its state is
|
|
43
|
+
* refs, so destructuring keeps them reactive; pass a getter for an id that
|
|
44
|
+
* changes. Reads as closed, and its verbs do nothing, while no document is open.
|
|
45
|
+
*/
|
|
46
|
+
export declare function useSurface(id: MaybeRefOrGetter<string>): SurfaceHandle;
|
|
47
|
+
export type { SurfaceFocusOptions };
|
|
48
|
+
/**
|
|
49
|
+
* Put the cursor in an element when the surface `id` asks for it: on every
|
|
50
|
+
* `open(id, { focus: true })`, a command whose panel says `focus` among them, and
|
|
51
|
+
* when the element mounts while the request is up (the panel opened, or its code
|
|
52
|
+
* loaded, because of it). A plain open never moves it. `element` is a template
|
|
53
|
+
* ref (`useTemplateRef('field')`); `select` selects an input's text, so typing
|
|
54
|
+
* replaces it. Reads the surface of this subtree's document.
|
|
55
|
+
*/
|
|
56
|
+
export declare function useSurfaceFocus(id: MaybeRefOrGetter<string>, element: MaybeRefOrGetter<HTMLElement | null | undefined>, options?: SurfaceFocusOptions): void;
|
package/dist/shell.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ShellToken, shellState } from "@embedpdf/plugin-shell";
|
|
2
|
+
export * from "@embedpdf/plugin-shell";
|
|
3
|
+
import { toValue, watch } from "vue";
|
|
4
|
+
import { createSurfaceFocusFollower } from "@embedpdf/web";
|
|
5
|
+
import { a as useCapability, b as useCapabilityEvent, h as useOptionalCapability, i as useOptionalSelector } from "./capabilities-C7YzgPCX.js";
|
|
6
|
+
import { a as stateComposable } from "./state-DZg8q3v6.js";
|
|
7
|
+
function useShell() {
|
|
8
|
+
return useCapability(ShellToken);
|
|
9
|
+
}
|
|
10
|
+
function useShellEvent(select, handler) {
|
|
11
|
+
useCapabilityEvent(ShellToken, select, handler);
|
|
12
|
+
}
|
|
13
|
+
const useShellState = stateComposable(shellState);
|
|
14
|
+
const NO_PROPS = Object.freeze({});
|
|
15
|
+
function useSurface(id) {
|
|
16
|
+
const shell = useOptionalCapability(ShellToken);
|
|
17
|
+
const isOpen = useOptionalSelector(ShellToken, (current) => current.isOpen(toValue(id)), false);
|
|
18
|
+
const props = useOptionalSelector(
|
|
19
|
+
ShellToken,
|
|
20
|
+
(current) => {
|
|
21
|
+
var _a;
|
|
22
|
+
return ((_a = current.getSurface(toValue(id))) == null ? void 0 : _a.props) ?? NO_PROPS;
|
|
23
|
+
},
|
|
24
|
+
NO_PROPS
|
|
25
|
+
);
|
|
26
|
+
return Object.freeze({
|
|
27
|
+
isOpen,
|
|
28
|
+
props,
|
|
29
|
+
open: (options) => {
|
|
30
|
+
var _a;
|
|
31
|
+
return (_a = shell.value) == null ? void 0 : _a.open(toValue(id), options);
|
|
32
|
+
},
|
|
33
|
+
close: () => {
|
|
34
|
+
var _a;
|
|
35
|
+
return (_a = shell.value) == null ? void 0 : _a.close(toValue(id));
|
|
36
|
+
},
|
|
37
|
+
toggle: (options) => {
|
|
38
|
+
var _a;
|
|
39
|
+
return (_a = shell.value) == null ? void 0 : _a.toggle(toValue(id), options);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function useSurfaceFocus(id, element, options = {}) {
|
|
44
|
+
const shell = useOptionalCapability(ShellToken);
|
|
45
|
+
const request = useOptionalSelector(
|
|
46
|
+
ShellToken,
|
|
47
|
+
(current) => {
|
|
48
|
+
var _a;
|
|
49
|
+
return ((_a = current.getSurface(toValue(id))) == null ? void 0 : _a.focusRequest) ?? 0;
|
|
50
|
+
},
|
|
51
|
+
0
|
|
52
|
+
);
|
|
53
|
+
const follower = createSurfaceFocusFollower();
|
|
54
|
+
watch(
|
|
55
|
+
() => [toValue(element) ?? null, shell.value, request.value],
|
|
56
|
+
([target, current, value]) => follower.follow(target, current, value, options),
|
|
57
|
+
{ flush: "post", immediate: true }
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
useShell,
|
|
62
|
+
useShellEvent,
|
|
63
|
+
useShellState,
|
|
64
|
+
useSurface,
|
|
65
|
+
useSurfaceFocus
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.js","sources":["../src/shell.ts"],"sourcesContent":["/**\n * @embedpdf/vue/shell: the Vue surface of `@embedpdf/plugin-shell`. The app\n * owns every surface's DOM; these composables bind its open/closed state to the\n * kernel, so commands can drive it and an app can save and restore it.\n *\n * They work without a document: shell state is per document, and chrome that\n * uses it (panel buttons, menu anchors) stays mounted across the empty\n * workspace. With no document every surface reads as closed, no menu as open,\n * and `useSurface`'s verbs do nothing; `useShell()` is then the stand-in, whose\n * methods throw `not-ready`.\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-shell';\nimport { toValue, watch } from 'vue';\nimport type { MaybeRefOrGetter, Ref } from 'vue';\nimport { ShellToken, shellState } from '@embedpdf/plugin-shell';\nimport type { OpenSurfaceOptions, ShellCapability, SurfaceProps } from '@embedpdf/plugin-shell';\nimport type { EventHook } from '@embedpdf/core';\nimport { createSurfaceFocusFollower, type SurfaceFocusOptions } from '@embedpdf/web';\nimport {\n useCapability,\n useCapabilityEvent,\n useOptionalCapability,\n useOptionalSelector,\n} from './runtime/capabilities';\nimport { stateComposable } from './state';\n\n/** The shell API: open and close panels, dialogs and menus. Without a document its methods throw `not-ready`. */\nexport function useShell(): ShellCapability {\n return useCapability(ShellToken);\n}\n\n/** Subscribe to one shell event while the component lives: `useShellEvent((shell) => shell.onSurfaceOpened, handler)`. */\nexport function useShellEvent<Event>(\n select: (shell: ShellCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(ShellToken, select, handler);\n}\n\n/**\n * Which panels, dialogs and menus are open, as refs (the page's State table,\n * declared once in `shellState`). With a selector, one ref, which updates only\n * when what it picks changes. Without a document nothing is open.\n */\nexport const useShellState = stateComposable(shellState);\n\n/** One surface, as {@link useSurface} gives it: its state as refs, and the verbs. */\nexport interface SurfaceHandle {\n /** Whether the surface is open. */\n readonly isOpen: Readonly<Ref<boolean>>;\n /** The props the surface was opened with, or updated to; empty when it has none. */\n readonly props: Readonly<Ref<SurfaceProps>>;\n open(options?: OpenSurfaceOptions): void;\n close(): void;\n toggle(options?: OpenSurfaceOptions): void;\n}\n\nconst NO_PROPS: SurfaceProps = Object.freeze({});\n\n/**\n * One named surface (a panel, a dialog, an overlay) of this subtree's\n * document: `const { isOpen, toggle } = useSurface('comments')`. Its state is\n * refs, so destructuring keeps them reactive; pass a getter for an id that\n * changes. Reads as closed, and its verbs do nothing, while no document is open.\n */\nexport function useSurface(id: MaybeRefOrGetter<string>): SurfaceHandle {\n const shell = useOptionalCapability(ShellToken);\n const isOpen = useOptionalSelector(ShellToken, (current) => current.isOpen(toValue(id)), false);\n const props = useOptionalSelector(\n ShellToken,\n (current) => current.getSurface(toValue(id))?.props ?? NO_PROPS,\n NO_PROPS,\n );\n return Object.freeze({\n isOpen,\n props,\n open: (options?: OpenSurfaceOptions) => shell.value?.open(toValue(id), options),\n close: () => shell.value?.close(toValue(id)),\n toggle: (options?: OpenSurfaceOptions) => shell.value?.toggle(toValue(id), options),\n });\n}\n\nexport type { SurfaceFocusOptions };\n\n/**\n * Put the cursor in an element when the surface `id` asks for it: on every\n * `open(id, { focus: true })`, a command whose panel says `focus` among them, and\n * when the element mounts while the request is up (the panel opened, or its code\n * loaded, because of it). A plain open never moves it. `element` is a template\n * ref (`useTemplateRef('field')`); `select` selects an input's text, so typing\n * replaces it. Reads the surface of this subtree's document.\n */\nexport function useSurfaceFocus(\n id: MaybeRefOrGetter<string>,\n element: MaybeRefOrGetter<HTMLElement | null | undefined>,\n options: SurfaceFocusOptions = {},\n): void {\n const shell = useOptionalCapability(ShellToken);\n const request = useOptionalSelector(\n ShellToken,\n (current) => current.getSurface(toValue(id))?.focusRequest ?? 0,\n 0,\n );\n const follower = createSurfaceFocusFollower();\n // After the DOM updates, so an element that has just mounted is there to take focus.\n watch(\n () => [toValue(element) ?? null, shell.value, request.value] as const,\n ([target, current, value]) => follower.follow(target, current, value, options),\n { flush: 'post', immediate: true },\n );\n}\n"],"names":[],"mappings":";;;;;;AA6BO,SAAS,WAA4B;AAC1C,SAAO,cAAc,UAAU;AACjC;AAGO,SAAS,cACd,QACA,SACM;AACN,qBAAmB,YAAY,QAAQ,OAAO;AAChD;AAOO,MAAM,gBAAgB,gBAAgB,UAAU;AAavD,MAAM,WAAyB,OAAO,OAAO,EAAE;AAQxC,SAAS,WAAW,IAA6C;AACtE,QAAM,QAAQ,sBAAsB,UAAU;AAC9C,QAAM,SAAS,oBAAoB,YAAY,CAAC,YAAY,QAAQ,OAAO,QAAQ,EAAE,CAAC,GAAG,KAAK;AAC9F,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA,CAAC;;AAAY,4BAAQ,WAAW,QAAQ,EAAE,CAAC,MAA9B,mBAAiC,UAAS;AAAA;AAAA,IACvD;AAAA,EAAA;AAEF,SAAO,OAAO,OAAO;AAAA,IACnB;AAAA,IACA;AAAA,IACA,MAAM,CAAC,YAAA;;AAAiC,yBAAM,UAAN,mBAAa,KAAK,QAAQ,EAAE,GAAG;AAAA;AAAA,IACvE,OAAO,MAAA;;AAAM,yBAAM,UAAN,mBAAa,MAAM,QAAQ,EAAE;AAAA;AAAA,IAC1C,QAAQ,CAAC,YAAA;;AAAiC,yBAAM,UAAN,mBAAa,OAAO,QAAQ,EAAE,GAAG;AAAA;AAAA,EAAO,CACnF;AACH;AAYO,SAAS,gBACd,IACA,SACA,UAA+B,CAAA,GACzB;AACN,QAAM,QAAQ,sBAAsB,UAAU;AAC9C,QAAM,UAAU;AAAA,IACd;AAAA,IACA,CAAC;;AAAY,4BAAQ,WAAW,QAAQ,EAAE,CAAC,MAA9B,mBAAiC,iBAAgB;AAAA;AAAA,IAC9D;AAAA,EAAA;AAEF,QAAM,WAAW,2BAAA;AAEjB;AAAA,IACE,MAAM,CAAC,QAAQ,OAAO,KAAK,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,IAC3D,CAAC,CAAC,QAAQ,SAAS,KAAK,MAAM,SAAS,OAAO,QAAQ,SAAS,OAAO,OAAO;AAAA,IAC7E,EAAE,OAAO,QAAQ,WAAW,KAAA;AAAA,EAAK;AAErC;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { EventHook } from '@embedpdf/core';
|
|
3
|
+
import { signatureState } from '@embedpdf/plugin-signature';
|
|
4
|
+
import type { SignatureCapability, SignerRow } from '@embedpdf/plugin-signature';
|
|
5
|
+
import type { StateComposable } from '../state.cjs';
|
|
6
|
+
/**
|
|
7
|
+
* The signature API for the document in scope: sign, place a mark, fill or
|
|
8
|
+
* clear a field, check the signatures. The object never changes, so it's
|
|
9
|
+
* safe to keep in a closure; keep it whole (`signature.sign(…)`), since a
|
|
10
|
+
* member taken out of it once stays the one of that moment.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useSignature(): SignatureCapability;
|
|
13
|
+
/**
|
|
14
|
+
* The signatures' state as refs: the signed fields with their verdicts
|
|
15
|
+
* (`signatures`), what they allow, the `target`, whether a signing runs
|
|
16
|
+
* (`busy`), a two-step signing in progress, and whether they're read,
|
|
17
|
+
* declared once in `signatureState`. With a selector, one ref that updates
|
|
18
|
+
* only when the value it picks changes. Empty without a document.
|
|
19
|
+
*
|
|
20
|
+
* Typed through the declaration, so the published types name it from
|
|
21
|
+
* `@embedpdf/plugin-signature`, a dependency of this package, and not from the
|
|
22
|
+
* engine package `protection`'s type comes from, which isn't one.
|
|
23
|
+
*/
|
|
24
|
+
export declare const useSignatureState: StateComposable<ReturnType<typeof signatureState.read>>;
|
|
25
|
+
/**
|
|
26
|
+
* The signature settings (`key`, `mode`, `trust`, `allowCertify`) as refs, or
|
|
27
|
+
* one ref for the value `select` picks. They belong to the plugin, so they
|
|
28
|
+
* read without a document.
|
|
29
|
+
*/
|
|
30
|
+
export declare const useSignatureSettings: import("../index.cjs").SettingsComposable<import("@embedpdf/plugin-signature").SignatureSettings & object>;
|
|
31
|
+
/** Subscribe to one signature event while the component lives: `useSignatureEvent((signature) => signature.onSigned, handler)`. */
|
|
32
|
+
export declare function useSignatureEvent<Event>(select: (signature: SignatureCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
33
|
+
/**
|
|
34
|
+
* The people whose marks this browser holds, one row per library of kind
|
|
35
|
+
* `signatures`, for a picker, as a ref: `const rows = useSignerRows()`.
|
|
36
|
+
* Derived from the stamp plugin, so it needs `stampPlugin()`: rename, delete
|
|
37
|
+
* and export are the library verbs, and nothing is stored beyond the file.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useSignerRows(): Readonly<Ref<readonly SignerRow[]>>;
|