@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
package/dist/render.js
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { RenderToken as RenderToken$1 } from "@embedpdf/plugin-render";
|
|
2
|
+
export * from "@embedpdf/plugin-render";
|
|
3
|
+
import { h as useOptionalCapability, g as useKernelValue, i as useOptionalSelector, a as useCapability, b as useCapabilityEvent } from "./capabilities-C7YzgPCX.js";
|
|
4
|
+
import { s as settingsComposable } from "./state-DZg8q3v6.js";
|
|
5
|
+
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, normalizeStyle, shallowRef, unref, Fragment, renderList, createBlock, createCommentVNode, createElementVNode } from "vue";
|
|
6
|
+
import { samePageViewDemand, RenderToken } from "@embedpdf/plugin-render/contract/host";
|
|
7
|
+
import { bindPaintedImage, pictureLayerOptionsOf, partsDrawnTwice } from "@embedpdf/web";
|
|
8
|
+
import { d as devWarn } from "./dev-CtMlvxjZ.js";
|
|
9
|
+
import { u as usePaintedParts } from "./page-layers-rlh4-1qr.js";
|
|
10
|
+
import { u as usePage } from "./page-D9XIuLSj.js";
|
|
11
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "TileImage",
|
|
13
|
+
props: {
|
|
14
|
+
source: {},
|
|
15
|
+
view: {},
|
|
16
|
+
page: {},
|
|
17
|
+
viewScale: {}
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const image = ref(null);
|
|
22
|
+
watch(
|
|
23
|
+
[image, () => props.source.handle],
|
|
24
|
+
([element, handle], _previous, onCleanup) => {
|
|
25
|
+
if (!element) return;
|
|
26
|
+
const { view, page, source } = props;
|
|
27
|
+
onCleanup(
|
|
28
|
+
bindPaintedImage(element, handle, {
|
|
29
|
+
onPainted: () => view.markPainted(page, source.key),
|
|
30
|
+
onUnpainted: () => view.markUnpainted(page, source.key)
|
|
31
|
+
})
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
{ immediate: true, flush: "post" }
|
|
35
|
+
);
|
|
36
|
+
function checkSize(event) {
|
|
37
|
+
const naturalWidth = event.currentTarget.naturalWidth;
|
|
38
|
+
if (naturalWidth <= 0) return;
|
|
39
|
+
const expected = Math.round(props.source.rect.width * props.source.scale);
|
|
40
|
+
if (Math.abs(naturalWidth - expected) > 1) {
|
|
41
|
+
devWarn(
|
|
42
|
+
"tile-size",
|
|
43
|
+
`tile bitmap ${naturalWidth}px wide does not match its rect (expected ~${expected}px) — stale raster identity? key=${props.source.key}`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const style = computed(() => {
|
|
48
|
+
const { rect, z } = props.source;
|
|
49
|
+
const scale = props.viewScale;
|
|
50
|
+
return {
|
|
51
|
+
position: "absolute",
|
|
52
|
+
left: `${rect.x * scale}px`,
|
|
53
|
+
top: `${rect.y * scale}px`,
|
|
54
|
+
width: `${rect.width * scale}px`,
|
|
55
|
+
height: `${rect.height * scale}px`,
|
|
56
|
+
zIndex: z
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
return (_ctx, _cache) => {
|
|
60
|
+
return openBlock(), createElementBlock("img", {
|
|
61
|
+
ref_key: "image",
|
|
62
|
+
ref: image,
|
|
63
|
+
alt: "",
|
|
64
|
+
draggable: "false",
|
|
65
|
+
style: normalizeStyle(style.value),
|
|
66
|
+
onLoad: checkSize
|
|
67
|
+
}, null, 36);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
72
|
+
__name: "TilePlane",
|
|
73
|
+
props: {
|
|
74
|
+
layers: {}
|
|
75
|
+
},
|
|
76
|
+
setup(__props) {
|
|
77
|
+
const props = __props;
|
|
78
|
+
const page = usePage();
|
|
79
|
+
const render = useOptionalCapability(RenderToken);
|
|
80
|
+
const view = shallowRef(null);
|
|
81
|
+
const pageRef = computed(() => page.value.ref);
|
|
82
|
+
const viewId = computed(() => page.value.view);
|
|
83
|
+
watch(
|
|
84
|
+
[view, pageRef],
|
|
85
|
+
([handle, ref2], _previous, onCleanup) => {
|
|
86
|
+
if (handle) onCleanup(() => handle.release(ref2));
|
|
87
|
+
},
|
|
88
|
+
{ immediate: true }
|
|
89
|
+
);
|
|
90
|
+
watch(
|
|
91
|
+
[render, viewId],
|
|
92
|
+
([lens, id], _previous, onCleanup) => {
|
|
93
|
+
if (!lens) {
|
|
94
|
+
view.value = null;
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const handle = lens.createViewDemand(id);
|
|
98
|
+
view.value = handle;
|
|
99
|
+
onCleanup(() => handle.dispose());
|
|
100
|
+
},
|
|
101
|
+
{ immediate: true }
|
|
102
|
+
);
|
|
103
|
+
const demand = useKernelValue(
|
|
104
|
+
() => {
|
|
105
|
+
var _a, _b;
|
|
106
|
+
return ((_b = (_a = page.value).getViewDemand) == null ? void 0 : _b.call(_a)) ?? { desiredDeviceWidth: page.value.transform.deviceWidth };
|
|
107
|
+
},
|
|
108
|
+
samePageViewDemand
|
|
109
|
+
);
|
|
110
|
+
watch(
|
|
111
|
+
[view, demand, pageRef, () => props.layers],
|
|
112
|
+
([handle, wanted, ref2, layers]) => {
|
|
113
|
+
handle == null ? void 0 : handle.setDemand(ref2, wanted, layers);
|
|
114
|
+
},
|
|
115
|
+
{ immediate: true }
|
|
116
|
+
);
|
|
117
|
+
const plan = useKernelValue(() => {
|
|
118
|
+
var _a;
|
|
119
|
+
return ((_a = view.value) == null ? void 0 : _a.getPlan(pageRef.value)) ?? null;
|
|
120
|
+
});
|
|
121
|
+
const planeStyle = computed(
|
|
122
|
+
() => ({
|
|
123
|
+
position: "absolute",
|
|
124
|
+
left: 0,
|
|
125
|
+
top: 0,
|
|
126
|
+
width: `${page.value.transform.contentWidth}px`,
|
|
127
|
+
height: `${page.value.transform.contentHeight}px`,
|
|
128
|
+
pointerEvents: "none",
|
|
129
|
+
// Tiles carry z ranks (coarse under fine) while generations mix, mid-zoom.
|
|
130
|
+
// A stacking context of its own keeps those ranks inside the plane, below
|
|
131
|
+
// annotations, page chrome and menus.
|
|
132
|
+
isolation: "isolate"
|
|
133
|
+
})
|
|
134
|
+
);
|
|
135
|
+
return (_ctx, _cache) => {
|
|
136
|
+
return view.value && unref(plan) && unref(plan).paint.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
137
|
+
key: 0,
|
|
138
|
+
style: normalizeStyle(planeStyle.value)
|
|
139
|
+
}, [
|
|
140
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(plan).paint, (source) => {
|
|
141
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
142
|
+
key: source.key,
|
|
143
|
+
source,
|
|
144
|
+
view: view.value,
|
|
145
|
+
page: unref(page).ref,
|
|
146
|
+
"view-scale": unref(page).transform.viewScale
|
|
147
|
+
}, null, 8, ["source", "view", "page", "view-scale"]);
|
|
148
|
+
}), 128))
|
|
149
|
+
], 4)) : createCommentVNode("", true);
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
154
|
+
__name: "RenderLayer",
|
|
155
|
+
props: {
|
|
156
|
+
annotations: { type: Boolean, default: void 0 },
|
|
157
|
+
formFields: { type: Boolean, default: void 0 },
|
|
158
|
+
tiles: { type: Boolean, default: true }
|
|
159
|
+
},
|
|
160
|
+
setup(__props) {
|
|
161
|
+
const props = __props;
|
|
162
|
+
const page = usePage();
|
|
163
|
+
const render = useOptionalCapability(RenderToken);
|
|
164
|
+
const NO_PAINT = { tiles: false };
|
|
165
|
+
const settings = useOptionalSelector(RenderToken, (lens) => lens.getPaintSettings(), NO_PAINT);
|
|
166
|
+
const pageRef = computed(() => page.value.ref);
|
|
167
|
+
const parts = computed(() => ({ annotations: props.annotations, formFields: props.formFields }));
|
|
168
|
+
const painted = usePaintedParts(pageRef);
|
|
169
|
+
const may = useOptionalSelector(RenderToken, (lens) => lens.getLayerRights(), null);
|
|
170
|
+
const layers = computed(
|
|
171
|
+
() => painted.value && may.value ? pictureLayerOptionsOf(painted.value, parts.value, may.value) : null
|
|
172
|
+
);
|
|
173
|
+
watch([painted, parts], ([current, asked]) => {
|
|
174
|
+
if (current && partsDrawnTwice(current, asked).length > 0) {
|
|
175
|
+
devWarn(
|
|
176
|
+
"render-layer-draws-what-a-layer-paints",
|
|
177
|
+
"<RenderLayer :annotations> or <RenderLayer :form-fields> draws what an <AnnotationLayer> or a <FormLayer> on the page paints too, so it shows twice. Leave the prop out: the picture leaves out what a layer paints."
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
const sourceKey = useOptionalSelector(
|
|
182
|
+
RenderToken,
|
|
183
|
+
(lens) => layers.value ? lens.getSourceKey(page.value.ref, {
|
|
184
|
+
scale: page.value.transform.renderScale,
|
|
185
|
+
...layers.value
|
|
186
|
+
}) : null,
|
|
187
|
+
null
|
|
188
|
+
);
|
|
189
|
+
const image = ref(null);
|
|
190
|
+
watch(
|
|
191
|
+
[render, pageRef, sourceKey, layers],
|
|
192
|
+
([lens, shown, _key, drawn], _previous, onCleanup) => {
|
|
193
|
+
if (!lens || !drawn) return;
|
|
194
|
+
const controller = new AbortController();
|
|
195
|
+
let revoke;
|
|
196
|
+
onCleanup(() => {
|
|
197
|
+
controller.abort();
|
|
198
|
+
revoke == null ? void 0 : revoke();
|
|
199
|
+
});
|
|
200
|
+
void (async () => {
|
|
201
|
+
try {
|
|
202
|
+
const picture = await lens.renderSource(shown, {
|
|
203
|
+
scale: page.value.transform.renderScale,
|
|
204
|
+
...drawn,
|
|
205
|
+
view: page.value.view,
|
|
206
|
+
signal: controller.signal
|
|
207
|
+
});
|
|
208
|
+
const object = await picture.objectUrl().abortWith(controller.signal);
|
|
209
|
+
if (controller.signal.aborted) {
|
|
210
|
+
object.revoke();
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
revoke = object.revoke;
|
|
214
|
+
if (image.value) image.value.src = object.url;
|
|
215
|
+
} catch {
|
|
216
|
+
}
|
|
217
|
+
})();
|
|
218
|
+
},
|
|
219
|
+
{ immediate: true, flush: "post" }
|
|
220
|
+
);
|
|
221
|
+
return (_ctx, _cache) => {
|
|
222
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
223
|
+
createElementVNode("img", {
|
|
224
|
+
ref_key: "image",
|
|
225
|
+
ref: image,
|
|
226
|
+
alt: "",
|
|
227
|
+
draggable: "false",
|
|
228
|
+
style: {
|
|
229
|
+
position: "absolute",
|
|
230
|
+
inset: 0,
|
|
231
|
+
width: "100%",
|
|
232
|
+
height: "100%",
|
|
233
|
+
pointerEvents: "none"
|
|
234
|
+
}
|
|
235
|
+
}, null, 512),
|
|
236
|
+
__props.tiles && unref(settings).tiles && layers.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
237
|
+
key: 0,
|
|
238
|
+
layers: layers.value
|
|
239
|
+
}, null, 8, ["layers"])) : createCommentVNode("", true)
|
|
240
|
+
], 64);
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
function useRender() {
|
|
245
|
+
return useCapability(RenderToken$1);
|
|
246
|
+
}
|
|
247
|
+
const useRenderSettings = settingsComposable(RenderToken$1);
|
|
248
|
+
function useRenderEvent(select, handler) {
|
|
249
|
+
useCapabilityEvent(RenderToken$1, select, handler);
|
|
250
|
+
}
|
|
251
|
+
export {
|
|
252
|
+
_sfc_main as RenderLayer,
|
|
253
|
+
useRender,
|
|
254
|
+
useRenderEvent,
|
|
255
|
+
useRenderSettings
|
|
256
|
+
};
|
|
257
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sources":["../src/render/TileImage.vue","../src/render/TilePlane.vue","../src/render/RenderLayer.vue","../src/render.ts"],"sourcesContent":["<!--\n One tile: its place in view space, and the shared browser image binding,\n which hides the image until it is complete, reports painted after its first\n chance to be shown, and reports the inverse when it leaves.\n-->\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport type { CSSProperties } from 'vue';\nimport type { PageRef } from '@embedpdf/core';\nimport type { TilePaintSource, ViewDemand } from '@embedpdf/plugin-render/contract/host';\nimport { bindPaintedImage } from '@embedpdf/web';\nimport { devWarn } from '../dev';\n\nconst props = defineProps<{\n source: TilePaintSource;\n /** The view's tile surface, told when this tile is painted and when it leaves. */\n view: ViewDemand;\n page: PageRef;\n /** View px per page point. */\n viewScale: number;\n}>();\n\nconst image = ref<HTMLImageElement | null>(null);\n\n// The handle is the bitmap's identity; the reports go to the view that planned it.\nwatch(\n [image, () => props.source.handle],\n ([element, handle], _previous, onCleanup) => {\n if (!element) return;\n const { view, page, source } = props;\n onCleanup(\n bindPaintedImage(element, handle, {\n onPainted: () => view.markPainted(page, source.key),\n onUnpainted: () => view.markUnpainted(page, source.key),\n }),\n );\n },\n { immediate: true, flush: 'post' },\n);\n\n/** A raster whose size disagrees with its rect would be stretched into place: a stale picture. */\nfunction checkSize(event: Event) {\n const naturalWidth = (event.currentTarget as HTMLImageElement).naturalWidth;\n if (naturalWidth <= 0) return;\n const expected = Math.round(props.source.rect.width * props.source.scale);\n if (Math.abs(naturalWidth - expected) > 1) {\n devWarn(\n 'tile-size',\n `tile bitmap ${naturalWidth}px wide does not match its rect ` +\n `(expected ~${expected}px) — stale raster identity? key=${props.source.key}`,\n );\n }\n}\n\nconst style = computed((): CSSProperties => {\n const { rect, z } = props.source;\n const scale = props.viewScale;\n return {\n position: 'absolute',\n left: `${rect.x * scale}px`,\n top: `${rect.y * scale}px`,\n width: `${rect.width * scale}px`,\n height: `${rect.height * scale}px`,\n zIndex: z,\n };\n});\n</script>\n\n<template>\n <img ref=\"image\" alt=\"\" draggable=\"false\" :style=\"style\" @load=\"checkSize\" />\n</template>\n","<!--\n The sharp plane above the base picture: the plugin's tile plan for this view,\n as keyed <img>s. Each tile reports painted after its first chance to be shown\n (and the inverse when it leaves), so coarser tiles are released only once\n their replacement can really be composited.\n\n Tiles are placed in view (CSS px) space, never in page points under a scaled\n container: browsers round layout lengths to 1/64 CSS px before transforms\n apply, so a point-space rect under a ×25 zoom would be off by 0.4px or more\n per tile, showing seams. In view space the rounding stays 1/64 px at every zoom.\n-->\n<script setup lang=\"ts\">\nimport { computed, shallowRef, watch } from 'vue';\nimport type { CSSProperties } from 'vue';\nimport { RenderToken, samePageViewDemand } from '@embedpdf/plugin-render/contract/host';\nimport type { PageLayerOptions, ViewDemand } from '@embedpdf/plugin-render/contract/host';\nimport { useOptionalCapability } from '../runtime/capabilities';\nimport { useKernelValue } from '../runtime/kernel';\nimport { usePage } from '../runtime/page';\nimport TileImage from './TileImage.vue';\n\nconst props = defineProps<{ layers: PageLayerOptions }>();\n\nconst page = usePage();\nconst render = useOptionalCapability(RenderToken);\n\n// This view's tile surface: planned per view and page, so a thumbnail rail's\n// demand can't disturb the main view's tiles. The handle is shared per view\n// and counted: one `dispose` for every `createViewDemand`.\nconst view = shallowRef<ViewDemand | null>(null);\n\n// Which page and which view this plane plans for. The page context is a new\n// value on every zoom; these change only when the page or the view does, so\n// the handle and the page's claim on it follow ownership, never the camera.\nconst pageRef = computed(() => page.value.ref);\nconst viewId = computed(() => page.value.view);\n\n// Declared before the handle's own watcher, so on unmount the page is released\n// before the handle is disposed. Releasing stops in-flight fetches; resolved\n// pictures stay cached.\nwatch(\n [view, pageRef],\n ([handle, ref], _previous, onCleanup) => {\n if (handle) onCleanup(() => handle.release(ref));\n },\n { immediate: true },\n);\nwatch(\n [render, viewId],\n ([lens, id], _previous, onCleanup) => {\n if (!lens) {\n view.value = null;\n return;\n }\n const handle = lens.createViewDemand(id);\n view.value = handle;\n onCleanup(() => handle.dispose());\n },\n { immediate: true },\n);\n\n// The demand: the host's live view (a Stage page's visible part) or the whole\n// page. Read on every kernel change, so a pan re-plans; level settling is the\n// plugin's.\nconst demand = useKernelValue(\n () => page.value.getViewDemand?.() ?? { desiredDeviceWidth: page.value.transform.deviceWidth },\n samePageViewDemand,\n);\n\n// Demand in, plan out: setting the demand is the one call that fetches and\n// re-plans; reading the plan is pure. Before the render, so a camera move\n// re-plans in the same update.\nwatch(\n [view, demand, pageRef, () => props.layers],\n ([handle, wanted, ref, layers]) => {\n handle?.setDemand(ref, wanted, layers);\n },\n { immediate: true },\n);\nconst plan = useKernelValue(() => view.value?.getPlan(pageRef.value) ?? null);\n\nconst planeStyle = computed(\n (): CSSProperties => ({\n position: 'absolute',\n left: 0,\n top: 0,\n width: `${page.value.transform.contentWidth}px`,\n height: `${page.value.transform.contentHeight}px`,\n pointerEvents: 'none',\n // Tiles carry z ranks (coarse under fine) while generations mix, mid-zoom.\n // A stacking context of its own keeps those ranks inside the plane, below\n // annotations, page chrome and menus.\n isolation: 'isolate',\n }),\n);\n</script>\n\n<template>\n <div v-if=\"view && plan && plan.paint.length > 0\" :style=\"planeStyle\">\n <TileImage\n v-for=\"source in plan.paint\"\n :key=\"source.key\"\n :source=\"source\"\n :view=\"view\"\n :page=\"page.ref\"\n :view-scale=\"page.transform.viewScale\"\n />\n </div>\n</template>\n","<!--\n <RenderLayer>: the page's picture, in two planes. The base plane is a\n whole-page <img> at the plugin's resolved size, always there, the instant\n backdrop. The tile plane above it paints the plugin's tile plan when the view\n wants more pixels than the base may spend; a thumbnail-sized view engages\n none. The layer only paints: every decision (sizes, tiles, caching, release)\n is the render plugin's, and anything mid-gesture scales with CSS until the\n plugin hands down new pixels.\n-->\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { RenderToken } from '@embedpdf/plugin-render/contract/host';\nimport type { PaintSettings } from '@embedpdf/plugin-render/contract/host';\nimport { partsDrawnTwice, pictureLayerOptionsOf } from '@embedpdf/web';\nimport { devWarn } from '../dev';\nimport { usePaintedParts } from '../page-layers';\nimport { useOptionalCapability, useOptionalSelector } from '../runtime/capabilities';\nimport { usePage } from '../runtime/page';\nimport TilePlane from './TilePlane.vue';\n\nconst props = withDefaults(\n defineProps<{\n /**\n * Draw the annotations into the page's picture (`true`) or leave them out\n * (`false`). Left unset, the picture leaves them to an `<AnnotationLayer>`\n * on the page, and otherwise draws them when the user may read them.\n */\n annotations?: boolean;\n /** The same for the form fields, which a `<FormLayer>` paints. */\n formFields?: boolean;\n /**\n * Mount the tile plane. Whether it spends anything is the plugin's\n * arithmetic: leave it on, and pass `false` only for a view that must never\n * tile, even at deep zoom.\n */\n tiles?: boolean;\n }>(),\n // Unset stays unset: a boolean prop would otherwise read `false`.\n { annotations: undefined, formFields: undefined, tiles: true },\n);\n\nconst page = usePage();\n// The layer is a host of the render plugin: it paints conformed sources. The\n// host lens is the same runtime token, typed wider.\nconst render = useOptionalCapability(RenderToken);\nconst NO_PAINT: PaintSettings = { tiles: false };\n// The same object until a setting it reads changes.\nconst settings = useOptionalSelector(RenderToken, (lens) => lens.getPaintSettings(), NO_PAINT);\n\nconst pageRef = computed(() => page.value.ref);\nconst parts = computed(() => ({ annotations: props.annotations, formFields: props.formFields }));\nconst painted = usePaintedParts(pageRef);\nconst may = useOptionalSelector(RenderToken, (lens) => lens.getLayerRights(), null);\n/** The parts the picture draws; `null` until the page's layers have said what they paint. */\nconst layers = computed(() =>\n painted.value && may.value ? pictureLayerOptionsOf(painted.value, parts.value, may.value) : null,\n);\nwatch([painted, parts], ([current, asked]) => {\n if (current && partsDrawnTwice(current, asked).length > 0) {\n devWarn(\n 'render-layer-draws-what-a-layer-paints',\n '<RenderLayer :annotations> or <RenderLayer :form-fields> draws what an <AnnotationLayer> ' +\n 'or a <FormLayer> on the page paints too, so it shows twice. Leave the prop out: the ' +\n 'picture leaves out what a layer paints.',\n );\n }\n});\n\n// The raster's identity: its conformed width, the parts it draws and the\n// page's epoch. Above the budget it stays put while zooming, so the deep-zoom\n// backdrop never fetches again.\nconst sourceKey = useOptionalSelector(\n RenderToken,\n (lens) =>\n layers.value\n ? lens.getSourceKey(page.value.ref, {\n scale: page.value.transform.renderScale,\n ...layers.value,\n })\n : null,\n null,\n);\n\nconst image = ref<HTMLImageElement | null>(null);\nwatch(\n [render, pageRef, sourceKey, layers],\n ([lens, shown, _key, drawn], _previous, onCleanup) => {\n if (!lens || !drawn) return;\n const controller = new AbortController();\n let revoke: (() => void) | undefined;\n onCleanup(() => {\n controller.abort();\n revoke?.();\n });\n void (async () => {\n try {\n // The plugin conforms this to its resolved size and collapses asks for\n // the same key, so any scale that maps to this key asks for this key.\n const picture = await lens.renderSource(shown, {\n scale: page.value.transform.renderScale,\n ...drawn,\n view: page.value.view,\n signal: controller.signal,\n });\n const object = await picture.objectUrl().abortWith(controller.signal);\n if (controller.signal.aborted) {\n object.revoke();\n return;\n }\n revoke = object.revoke;\n // Set on a lasting element: the browser keeps the old picture until the\n // new one decodes, and never asks for the old URL again, so revoking it\n // on cleanup is safe.\n if (image.value) image.value.src = object.url;\n } catch {\n // Aborted (the view moved, or the layer unmounted), or the render failed.\n }\n })();\n },\n { immediate: true, flush: 'post' },\n);\n</script>\n\n<template>\n <img\n ref=\"image\"\n alt=\"\"\n draggable=\"false\"\n :style=\"{\n position: 'absolute',\n inset: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n }\"\n />\n <TilePlane v-if=\"tiles && settings.tiles && layers\" :layers=\"layers\" />\n</template>\n","/**\n * @embedpdf/vue/render: the Vue view of `@embedpdf/plugin-render`.\n * `<RenderLayer>` draws a page; `useRender()` renders pages yourself, for\n * previews and exports; `useRenderSettings()` and `useRenderEvent()` read and\n * follow the plugin.\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-render';\nimport { RenderToken } from '@embedpdf/plugin-render';\nimport type { RenderCapability } from '@embedpdf/plugin-render';\nimport type { EventHook } from '@embedpdf/core';\nimport { useCapability, useCapabilityEvent } from './runtime/capabilities';\nimport { settingsComposable } from './state';\n\nexport { default as RenderLayer } from './render/RenderLayer.vue';\n\n/** The render API (renderPage, renderThumbnail, invalidation, settings) for app code. The object never changes. */\nexport function useRender(): RenderCapability {\n return useCapability(RenderToken);\n}\n\n/** The render settings (`fullPage`, `tiles`, `format`, …), with or without a document, as refs. Takes a selector. */\nexport const useRenderSettings = settingsComposable(RenderToken);\n\n/** Subscribe to one render event while the component lives: `useRenderEvent((render) => render.onInvalidated, handler)`. */\nexport function useRenderEvent<Event>(\n select: (render: RenderCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(RenderToken, select, handler);\n}\n"],"names":["_createElementBlock","ref","_unref","_openBlock","_Fragment","_renderList","_createBlock","TileImage","_createElementVNode","TilePlane","RenderToken"],"mappings":";;;;;;;;;;;;;;;;;;;AAaA,UAAM,QAAQ;AASd,UAAM,QAAQ,IAA6B,IAAI;AAG/C;AAAA,MACE,CAAC,OAAO,MAAM,MAAM,OAAO,MAAM;AAAA,MACjC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,cAAc;AAC3C,YAAI,CAAC,QAAS;AACd,cAAM,EAAE,MAAM,MAAM,OAAA,IAAW;AAC/B;AAAA,UACE,iBAAiB,SA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eACd,QACA,SACM;AACN,qBAAmBA,eAAa,QAAQ,OAAO;AACjD;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FailedDocumentInfo, LockedDocumentInfo } from '@embedpdf/core';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
/** Rendered while the document is ready. */
|
|
4
|
+
default?(): unknown;
|
|
5
|
+
/** Shown while this subtree has no document: none is open, or it's still opening. */
|
|
6
|
+
fallback?(): unknown;
|
|
7
|
+
/** Shown while the document waits for its password; `#fallback` without it. */
|
|
8
|
+
locked?(props: {
|
|
9
|
+
document: LockedDocumentInfo;
|
|
10
|
+
}): unknown;
|
|
11
|
+
/** Shown when the document couldn't be opened, with why; `#fallback` without it. */
|
|
12
|
+
error?(props: {
|
|
13
|
+
document: FailedDocumentInfo;
|
|
14
|
+
}): unknown;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FailedDocumentInfo, LockedDocumentInfo } from '@embedpdf/core';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
/** Rendered while the document is ready. */
|
|
4
|
+
default?(): unknown;
|
|
5
|
+
/** Shown while this subtree has no document: none is open, or it's still opening. */
|
|
6
|
+
fallback?(): unknown;
|
|
7
|
+
/** Shown while the document waits for its password; `#fallback` without it. */
|
|
8
|
+
locked?(props: {
|
|
9
|
+
document: LockedDocumentInfo;
|
|
10
|
+
}): unknown;
|
|
11
|
+
/** Shown when the document couldn't be opened, with why; `#fallback` without it. */
|
|
12
|
+
error?(props: {
|
|
13
|
+
document: FailedDocumentInfo;
|
|
14
|
+
}): unknown;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The document's id. */
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {
|
|
6
|
+
default?(): unknown;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: 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>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The document's id. */
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {
|
|
6
|
+
default?(): unknown;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: 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>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Kernel } from '@embedpdf/core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The kernel, created and started by its owner. Read once. */
|
|
4
|
+
kernel: Kernel;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
default?(): unknown;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: 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>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Kernel } from '@embedpdf/core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The kernel, created and started by its owner. Read once. */
|
|
4
|
+
kernel: Kernel;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
default?(): unknown;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: 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>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SvgShape } from '@embedpdf/web';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
shapes: readonly SvgShape[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SvgShape } from '@embedpdf/web';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
shapes: readonly SvgShape[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { AnyPlugin, Engine, EngineFactory, Identity, InitialDocument, Kernel, ViewerPageSettings } from '@embedpdf/core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* The engine, as an instance or a function. An instance is borrowed: the
|
|
5
|
+
* viewer uses it and never destroys it (a module-level `localEngine()`
|
|
6
|
+
* shared by every viewer). A function is the viewer's own: it calls it when
|
|
7
|
+
* it mounts and destroys the engine when it unmounts. Read once.
|
|
8
|
+
*/
|
|
9
|
+
engine: Engine | EngineFactory;
|
|
10
|
+
/** The plugins, created once next to the engine. Read once. */
|
|
11
|
+
plugins: AnyPlugin[];
|
|
12
|
+
/** Documents to open when the viewer starts, with optional tab names. Read once. */
|
|
13
|
+
initialDocuments?: InitialDocument[];
|
|
14
|
+
/**
|
|
15
|
+
* Who the user is, for every document opened without an `identity` of its
|
|
16
|
+
* own (which replaces this one). Documents opened after a change use the new
|
|
17
|
+
* value; open ones keep theirs. The local engine only: the cloud engine reads
|
|
18
|
+
* it from the document's token.
|
|
19
|
+
*/
|
|
20
|
+
identity?: Identity;
|
|
21
|
+
/**
|
|
22
|
+
* What the user may do, as permissions, in every document opened without a
|
|
23
|
+
* `scope` of its own. Left out, they may do everything. Changes reach the
|
|
24
|
+
* documents opened after them, as `identity`.
|
|
25
|
+
*/
|
|
26
|
+
scope?: readonly string[];
|
|
27
|
+
/** The color every part without a color of its own follows. CSS `--epdf-accent` wins over it. */
|
|
28
|
+
accent?: string;
|
|
29
|
+
/** How pages look: `background` before the picture arrives, and the `shadow` under each page. */
|
|
30
|
+
page?: Partial<ViewerPageSettings>;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_Slots = {
|
|
33
|
+
/** The viewer's content, mounted once the kernel has started. */
|
|
34
|
+
default?(): unknown;
|
|
35
|
+
/** Shown while the kernel starts; the composables already work in it. */
|
|
36
|
+
fallback?(): unknown;
|
|
37
|
+
/** Shown when the kernel couldn't be created or started. Without it, a failed start shows nothing. */
|
|
38
|
+
error?(props: {
|
|
39
|
+
error: unknown;
|
|
40
|
+
}): unknown;
|
|
41
|
+
};
|
|
42
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
43
|
+
/** The started kernel; null before it starts and after a failed start. */
|
|
44
|
+
kernel: import("vue").ComputedRef<Kernel | null>;
|
|
45
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
46
|
+
ready: (kernel: Kernel) => any;
|
|
47
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
48
|
+
onReady?: ((kernel: Kernel) => any) | undefined;
|
|
49
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
51
|
+
declare const _default: typeof __VLS_export;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { AnyPlugin, Engine, EngineFactory, Identity, InitialDocument, Kernel, ViewerPageSettings } from '@embedpdf/core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* The engine, as an instance or a function. An instance is borrowed: the
|
|
5
|
+
* viewer uses it and never destroys it (a module-level `localEngine()`
|
|
6
|
+
* shared by every viewer). A function is the viewer's own: it calls it when
|
|
7
|
+
* it mounts and destroys the engine when it unmounts. Read once.
|
|
8
|
+
*/
|
|
9
|
+
engine: Engine | EngineFactory;
|
|
10
|
+
/** The plugins, created once next to the engine. Read once. */
|
|
11
|
+
plugins: AnyPlugin[];
|
|
12
|
+
/** Documents to open when the viewer starts, with optional tab names. Read once. */
|
|
13
|
+
initialDocuments?: InitialDocument[];
|
|
14
|
+
/**
|
|
15
|
+
* Who the user is, for every document opened without an `identity` of its
|
|
16
|
+
* own (which replaces this one). Documents opened after a change use the new
|
|
17
|
+
* value; open ones keep theirs. The local engine only: the cloud engine reads
|
|
18
|
+
* it from the document's token.
|
|
19
|
+
*/
|
|
20
|
+
identity?: Identity;
|
|
21
|
+
/**
|
|
22
|
+
* What the user may do, as permissions, in every document opened without a
|
|
23
|
+
* `scope` of its own. Left out, they may do everything. Changes reach the
|
|
24
|
+
* documents opened after them, as `identity`.
|
|
25
|
+
*/
|
|
26
|
+
scope?: readonly string[];
|
|
27
|
+
/** The color every part without a color of its own follows. CSS `--epdf-accent` wins over it. */
|
|
28
|
+
accent?: string;
|
|
29
|
+
/** How pages look: `background` before the picture arrives, and the `shadow` under each page. */
|
|
30
|
+
page?: Partial<ViewerPageSettings>;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_Slots = {
|
|
33
|
+
/** The viewer's content, mounted once the kernel has started. */
|
|
34
|
+
default?(): unknown;
|
|
35
|
+
/** Shown while the kernel starts; the composables already work in it. */
|
|
36
|
+
fallback?(): unknown;
|
|
37
|
+
/** Shown when the kernel couldn't be created or started. Without it, a failed start shows nothing. */
|
|
38
|
+
error?(props: {
|
|
39
|
+
error: unknown;
|
|
40
|
+
}): unknown;
|
|
41
|
+
};
|
|
42
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
43
|
+
/** The started kernel; null before it starts and after a failed start. */
|
|
44
|
+
kernel: import("vue").ComputedRef<Kernel | null>;
|
|
45
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
46
|
+
ready: (kernel: Kernel) => any;
|
|
47
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
48
|
+
onReady?: ((kernel: Kernel) => any) | undefined;
|
|
49
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
51
|
+
declare const _default: typeof __VLS_export;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import type { CapabilityToken, EventHook } from '@embedpdf/core';
|
|
3
|
+
/**
|
|
4
|
+
* Like {@link useCapability}, but a ref that is null while the token can't
|
|
5
|
+
* resolve: no plugin, no document, or a document that isn't ready yet. It
|
|
6
|
+
* changes when the subtree's document does, so a `watch` on it rebinds.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useOptionalCapability<Capability>(token: MaybeRefOrGetter<CapabilityToken<Capability>>): Readonly<Ref<Capability | null>>;
|
|
9
|
+
/**
|
|
10
|
+
* The capability a subtree resolves to, as a ref: the document's while one is
|
|
11
|
+
* ready, else the stand-in for a document plugin. A token no plugin provides
|
|
12
|
+
* throws here, at setup: that is a setup mistake.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useCapabilityRef<Capability>(token: MaybeRefOrGetter<CapabilityToken<Capability>>): Readonly<Ref<Capability>>;
|
|
15
|
+
/**
|
|
16
|
+
* A plugin's API for this subtree: `const stage = useCapability(StageToken)`,
|
|
17
|
+
* then `stage.zoomIn()` in a handler or a template. The object stays the same
|
|
18
|
+
* for the component's life and always calls the capability of the document in
|
|
19
|
+
* scope, so it is safe to keep in a closure. A read (`stage.getZoomLevel()`)
|
|
20
|
+
* in a template or a computed updates when its answer changes.
|
|
21
|
+
*
|
|
22
|
+
* Outside a document (none open, not ready yet, or none in scope), a document
|
|
23
|
+
* plugin's members belong to its stand-in: reading one never throws, so chrome
|
|
24
|
+
* renders before the first document opens, and calling one refuses with
|
|
25
|
+
* `PluginError('not-ready')`: a method that returns a promise rejects, the
|
|
26
|
+
* others throw.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useCapability<Capability>(token: MaybeRefOrGetter<CapabilityToken<Capability>>): Capability;
|
|
29
|
+
/**
|
|
30
|
+
* A value read from a capability, as a ref. Strict: while the token can't
|
|
31
|
+
* resolve, reading it throws the kernel's reason (`no document`, `document is
|
|
32
|
+
* loading`), for code that knows a document exists, such as anything inside a
|
|
33
|
+
* `<DocumentGate>`. {@link useOptionalSelector} is its total twin.
|
|
34
|
+
*/
|
|
35
|
+
export declare function useSelector<Capability, Value>(token: MaybeRefOrGetter<CapabilityToken<Capability>>, select: (capability: Capability) => Value, isEqual?: (left: Value, right: Value) => boolean): Readonly<Ref<Value>>;
|
|
36
|
+
/**
|
|
37
|
+
* Null-safe {@link useSelector}: `fallback` whenever the token can't resolve
|
|
38
|
+
* (no provider, or a document-scoped token with no document). For chrome that
|
|
39
|
+
* stays mounted across the empty workspace (a zoom readout, a mode band). A
|
|
40
|
+
* read through a capability whose document closed a moment ago is `fallback`
|
|
41
|
+
* too.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useOptionalSelector<Capability, Value>(token: MaybeRefOrGetter<CapabilityToken<Capability>>, select: (capability: Capability) => Value, fallback: Value, isEqual?: (left: Value, right: Value) => boolean): Readonly<Ref<Value>>;
|
|
44
|
+
/**
|
|
45
|
+
* Subscribe to a capability's {@link EventHook} while the component lives:
|
|
46
|
+
* `useCapabilityEvent(ActionsToken, (actions) => actions.onExecuted, handler)`.
|
|
47
|
+
* Events carry occurrences, never state (a late subscriber that needs the
|
|
48
|
+
* current value uses a selector). It subscribes to the document in scope, again
|
|
49
|
+
* when that document changes, and ends with the component. Null-safe: with no
|
|
50
|
+
* plugin or no document there is no subscription.
|
|
51
|
+
*/
|
|
52
|
+
export declare function useCapabilityEvent<Capability, Event>(token: MaybeRefOrGetter<CapabilityToken<Capability>>, select: (capability: Capability) => EventHook<Event>, handler: (event: Event) => void): void;
|