@embedpdf/vue 0.0.0-stage → 3.0.0-next.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +192 -0
- package/README.md +258 -2
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-BEImlFso.cjs +124 -0
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-BEImlFso.cjs.map +1 -0
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-Brhh5jyF.js +125 -0
- package/dist/Anchored.vue_vue_type_script_setup_true_lang-Brhh5jyF.js.map +1 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-BwtHXw73.cjs +20 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-BwtHXw73.cjs.map +1 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-Ulkr3a6R.js +21 -0
- package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-Ulkr3a6R.js.map +1 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-C-7yeEGh.js +192 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-C-7yeEGh.js.map +1 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-czzeUzPl.cjs +191 -0
- package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-czzeUzPl.cjs.map +1 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-BA0_VwFc.cjs +682 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-BA0_VwFc.cjs.map +1 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-DUqft-xs.js +683 -0
- package/dist/FormLayer.vue_vue_type_script_setup_true_lang-DUqft-xs.js.map +1 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-C5-eQD34.cjs +174 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-C5-eQD34.cjs.map +1 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-EzLaOP3g.js +175 -0
- package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-EzLaOP3g.js.map +1 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-CJt3vdBW.js +33 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-CJt3vdBW.js.map +1 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-Cw29c8Oa.cjs +32 -0
- package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-Cw29c8Oa.cjs.map +1 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-CjrpumX2.cjs +151 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-CjrpumX2.cjs.map +1 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-O4AFc0_R.js +152 -0
- package/dist/PageView.vue_vue_type_script_setup_true_lang-O4AFc0_R.js.map +1 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-DrOORC1H.cjs +480 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-DrOORC1H.cjs.map +1 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-HbCryx1B.js +481 -0
- package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-HbCryx1B.js.map +1 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-BlLIPH1B.js +118 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-BlLIPH1B.js.map +1 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-CQozZCvB.cjs +117 -0
- package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-CQozZCvB.cjs.map +1 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C4TUDuyu.js +302 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C4TUDuyu.js.map +1 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C8T9q6Kb.cjs +301 -0
- package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C8T9q6Kb.cjs.map +1 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-D_c-wINF.cjs +38 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-D_c-wINF.cjs.map +1 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-fOTs4aqv.js +39 -0
- package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-fOTs4aqv.js.map +1 -0
- package/dist/actions.cjs +42 -0
- package/dist/actions.cjs.map +1 -0
- package/dist/actions.d.cts +41 -0
- package/dist/actions.d.ts +41 -0
- package/dist/actions.js +37 -0
- package/dist/actions.js.map +1 -0
- package/dist/anchored/Anchored.vue.d.cts +40 -0
- package/dist/anchored/Anchored.vue.d.ts +40 -0
- package/dist/anchored/AnchoredScope.vue.d.cts +17 -0
- package/dist/anchored/AnchoredScope.vue.d.ts +17 -0
- package/dist/anchored/PlacedAnchored.vue.d.cts +19 -0
- package/dist/anchored/PlacedAnchored.vue.d.ts +19 -0
- package/dist/anchored/projector.d.cts +32 -0
- package/dist/anchored/projector.d.ts +32 -0
- package/dist/anchored.cjs +13 -0
- package/dist/anchored.cjs.map +1 -0
- package/dist/anchored.d.cts +15 -0
- package/dist/anchored.d.ts +15 -0
- package/dist/anchored.js +13 -0
- package/dist/anchored.js.map +1 -0
- package/dist/annotation/AnnotationChrome.vue.d.cts +20 -0
- package/dist/annotation/AnnotationChrome.vue.d.ts +20 -0
- package/dist/annotation/AnnotationDraftMenu.vue.d.cts +26 -0
- package/dist/annotation/AnnotationDraftMenu.vue.d.ts +26 -0
- package/dist/annotation/AnnotationFrame.vue.d.cts +25 -0
- package/dist/annotation/AnnotationFrame.vue.d.ts +25 -0
- package/dist/annotation/AnnotationLayer.vue.d.cts +23 -0
- package/dist/annotation/AnnotationLayer.vue.d.ts +23 -0
- package/dist/annotation/AnnotationLook.vue.d.cts +21 -0
- package/dist/annotation/AnnotationLook.vue.d.ts +21 -0
- package/dist/annotation/AnnotationMenu.vue.d.cts +23 -0
- package/dist/annotation/AnnotationMenu.vue.d.ts +23 -0
- package/dist/annotation/AnnotationRotationBadge.vue.d.cts +26 -0
- package/dist/annotation/AnnotationRotationBadge.vue.d.ts +26 -0
- package/dist/annotation/AnnotationScene.vue.d.cts +7 -0
- package/dist/annotation/AnnotationScene.vue.d.ts +7 -0
- package/dist/annotation/FreeTextBox.vue.d.cts +9 -0
- package/dist/annotation/FreeTextBox.vue.d.ts +9 -0
- package/dist/annotation/NativeDrawing.vue.d.cts +10 -0
- package/dist/annotation/NativeDrawing.vue.d.ts +10 -0
- package/dist/annotation/StampGhost.vue.d.cts +7 -0
- package/dist/annotation/StampGhost.vue.d.ts +7 -0
- package/dist/annotation/composables.d.cts +76 -0
- package/dist/annotation/composables.d.ts +76 -0
- package/dist/annotation/state.d.cts +19 -0
- package/dist/annotation/state.d.ts +19 -0
- package/dist/annotation/text-box.d.cts +28 -0
- package/dist/annotation/text-box.d.ts +28 -0
- package/dist/annotation/types.d.cts +154 -0
- package/dist/annotation/types.d.ts +154 -0
- package/dist/annotation.cjs +29 -0
- package/dist/annotation.cjs.map +1 -0
- package/dist/annotation.d.cts +35 -0
- package/dist/annotation.d.ts +35 -0
- package/dist/annotation.js +23 -0
- package/dist/annotation.js.map +1 -0
- package/dist/attachment.cjs +22 -0
- package/dist/attachment.cjs.map +1 -0
- package/dist/attachment.d.cts +34 -0
- package/dist/attachment.d.ts +34 -0
- package/dist/attachment.js +17 -0
- package/dist/attachment.js.map +1 -0
- package/dist/capabilities-C7YzgPCX.js +164 -0
- package/dist/capabilities-C7YzgPCX.js.map +1 -0
- package/dist/capabilities-DVNJmgy7.cjs +163 -0
- package/dist/capabilities-DVNJmgy7.cjs.map +1 -0
- package/dist/commands.cjs +81 -0
- package/dist/commands.cjs.map +1 -0
- package/dist/commands.d.cts +61 -0
- package/dist/commands.d.ts +61 -0
- package/dist/commands.js +76 -0
- package/dist/commands.js.map +1 -0
- package/dist/composables-BGBsNDf9.cjs +25 -0
- package/dist/composables-BGBsNDf9.cjs.map +1 -0
- package/dist/composables-Bi6QvJpj.cjs +978 -0
- package/dist/composables-Bi6QvJpj.cjs.map +1 -0
- package/dist/composables-DK3lwh38.js +979 -0
- package/dist/composables-DK3lwh38.js.map +1 -0
- package/dist/composables-DwsZdg06.js +26 -0
- package/dist/composables-DwsZdg06.js.map +1 -0
- package/dist/dev-CtMlvxjZ.js +17 -0
- package/dist/dev-CtMlvxjZ.js.map +1 -0
- package/dist/dev-eeIS2B4c.cjs +16 -0
- package/dist/dev-eeIS2B4c.cjs.map +1 -0
- package/dist/dev.d.cts +11 -0
- package/dist/dev.d.ts +11 -0
- package/dist/documents-DUu5H4yH.js +34 -0
- package/dist/documents-DUu5H4yH.js.map +1 -0
- package/dist/documents-TQ1fMdWI.cjs +33 -0
- package/dist/documents-TQ1fMdWI.cjs.map +1 -0
- package/dist/form/ButtonControl.vue.d.cts +11 -0
- package/dist/form/ButtonControl.vue.d.ts +11 -0
- package/dist/form/ComboControl.vue.d.cts +11 -0
- package/dist/form/ComboControl.vue.d.ts +11 -0
- package/dist/form/FieldPictures.vue.d.cts +3 -0
- package/dist/form/FieldPictures.vue.d.ts +3 -0
- package/dist/form/FormFocusRing.vue.d.cts +8 -0
- package/dist/form/FormFocusRing.vue.d.ts +8 -0
- package/dist/form/FormLayer.vue.d.cts +3 -0
- package/dist/form/FormLayer.vue.d.ts +3 -0
- package/dist/form/ListControl.vue.d.cts +11 -0
- package/dist/form/ListControl.vue.d.ts +11 -0
- package/dist/form/NativeListBox.vue.d.cts +27 -0
- package/dist/form/NativeListBox.vue.d.ts +27 -0
- package/dist/form/SignatureControl.vue.d.cts +11 -0
- package/dist/form/SignatureControl.vue.d.ts +11 -0
- package/dist/form/TextControl.vue.d.cts +11 -0
- package/dist/form/TextControl.vue.d.ts +11 -0
- package/dist/form/ToggleControl.vue.d.cts +11 -0
- package/dist/form/ToggleControl.vue.d.ts +11 -0
- package/dist/form/composables.d.cts +52 -0
- package/dist/form/composables.d.ts +52 -0
- package/dist/form/widget-box.d.cts +34 -0
- package/dist/form/widget-box.d.ts +34 -0
- package/dist/form.cjs +17 -0
- package/dist/form.cjs.map +1 -0
- package/dist/form.d.cts +12 -0
- package/dist/form.d.ts +12 -0
- package/dist/form.js +11 -0
- package/dist/form.js.map +1 -0
- package/dist/history.cjs +22 -0
- package/dist/history.cjs.map +1 -0
- package/dist/history.d.cts +31 -0
- package/dist/history.d.ts +31 -0
- package/dist/history.js +17 -0
- package/dist/history.js.map +1 -0
- package/dist/i18n.cjs +29 -0
- package/dist/i18n.cjs.map +1 -0
- package/dist/i18n.d.cts +36 -0
- package/dist/i18n.d.ts +36 -0
- package/dist/i18n.js +24 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.cjs +414 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +234 -0
- package/dist/index.js.map +1 -0
- package/dist/interaction/PagePointerSource.vue.d.cts +3 -0
- package/dist/interaction/PagePointerSource.vue.d.ts +3 -0
- package/dist/interaction.cjs +63 -0
- package/dist/interaction.cjs.map +1 -0
- package/dist/interaction.d.cts +40 -0
- package/dist/interaction.d.ts +40 -0
- package/dist/interaction.js +47 -0
- package/dist/interaction.js.map +1 -0
- package/dist/link/LinkAnchor.vue.d.cts +9 -0
- package/dist/link/LinkAnchor.vue.d.ts +9 -0
- package/dist/link/LinkLayer.vue.d.cts +22 -0
- package/dist/link/LinkLayer.vue.d.ts +22 -0
- package/dist/link/composables.d.cts +29 -0
- package/dist/link/composables.d.ts +29 -0
- package/dist/link.cjs +14 -0
- package/dist/link.cjs.map +1 -0
- package/dist/link.d.cts +11 -0
- package/dist/link.d.ts +11 -0
- package/dist/link.js +8 -0
- package/dist/link.js.map +1 -0
- package/dist/measurement.cjs +43 -0
- package/dist/measurement.cjs.map +1 -0
- package/dist/measurement.d.cts +51 -0
- package/dist/measurement.d.ts +51 -0
- package/dist/measurement.js +38 -0
- package/dist/measurement.js.map +1 -0
- package/dist/metadata.cjs +22 -0
- package/dist/metadata.cjs.map +1 -0
- package/dist/metadata.d.cts +31 -0
- package/dist/metadata.d.ts +31 -0
- package/dist/metadata.js +17 -0
- package/dist/metadata.js.map +1 -0
- package/dist/outline.cjs +22 -0
- package/dist/outline.cjs.map +1 -0
- package/dist/outline.d.cts +36 -0
- package/dist/outline.d.ts +36 -0
- package/dist/outline.js +17 -0
- package/dist/outline.js.map +1 -0
- package/dist/page-D9XIuLSj.js +16 -0
- package/dist/page-D9XIuLSj.js.map +1 -0
- package/dist/page-Doy4_Sdz.cjs +15 -0
- package/dist/page-Doy4_Sdz.cjs.map +1 -0
- package/dist/page-edit.cjs +18 -0
- package/dist/page-edit.cjs.map +1 -0
- package/dist/page-edit.d.cts +28 -0
- package/dist/page-edit.d.ts +28 -0
- package/dist/page-edit.js +13 -0
- package/dist/page-edit.js.map +1 -0
- package/dist/page-layers-c-CJYAUO.cjs +30 -0
- package/dist/page-layers-c-CJYAUO.cjs.map +1 -0
- package/dist/page-layers-rlh4-1qr.js +31 -0
- package/dist/page-layers-rlh4-1qr.js.map +1 -0
- package/dist/page-layers.d.cts +21 -0
- package/dist/page-layers.d.ts +21 -0
- package/dist/page-view/PageView.vue.d.cts +42 -0
- package/dist/page-view/PageView.vue.d.ts +42 -0
- package/dist/page-view.cjs +5 -0
- package/dist/page-view.cjs.map +1 -0
- package/dist/page-view.d.cts +10 -0
- package/dist/page-view.d.ts +10 -0
- package/dist/page-view.js +5 -0
- package/dist/page-view.js.map +1 -0
- package/dist/projector-CDZn1kh1.js +32 -0
- package/dist/projector-CDZn1kh1.js.map +1 -0
- package/dist/projector-Cf7879sx.cjs +31 -0
- package/dist/projector-Cf7879sx.cjs.map +1 -0
- package/dist/redaction.cjs +34 -0
- package/dist/redaction.cjs.map +1 -0
- package/dist/redaction.d.cts +44 -0
- package/dist/redaction.d.ts +44 -0
- package/dist/redaction.js +29 -0
- package/dist/redaction.js.map +1 -0
- package/dist/render/RenderLayer.vue.d.cts +23 -0
- package/dist/render/RenderLayer.vue.d.ts +23 -0
- package/dist/render/TileImage.vue.d.cts +13 -0
- package/dist/render/TileImage.vue.d.ts +13 -0
- package/dist/render/TilePlane.vue.d.cts +7 -0
- package/dist/render/TilePlane.vue.d.ts +7 -0
- package/dist/render.cjs +262 -0
- package/dist/render.cjs.map +1 -0
- package/dist/render.d.cts +16 -0
- package/dist/render.d.ts +16 -0
- package/dist/render.js +257 -0
- package/dist/render.js.map +1 -0
- package/dist/runtime/DocumentGate.vue.d.cts +24 -0
- package/dist/runtime/DocumentGate.vue.d.ts +24 -0
- package/dist/runtime/DocumentScope.vue.d.cts +16 -0
- package/dist/runtime/DocumentScope.vue.d.ts +16 -0
- package/dist/runtime/KernelProvider.vue.d.cts +17 -0
- package/dist/runtime/KernelProvider.vue.d.ts +17 -0
- package/dist/runtime/SvgShapes.vue.d.cts +7 -0
- package/dist/runtime/SvgShapes.vue.d.ts +7 -0
- package/dist/runtime/Viewer.vue.d.cts +57 -0
- package/dist/runtime/Viewer.vue.d.ts +57 -0
- package/dist/runtime/capabilities.d.cts +52 -0
- package/dist/runtime/capabilities.d.ts +52 -0
- package/dist/runtime/documents.d.cts +42 -0
- package/dist/runtime/documents.d.ts +42 -0
- package/dist/runtime/kernel.d.cts +36 -0
- package/dist/runtime/kernel.d.ts +36 -0
- package/dist/runtime/page.d.cts +15 -0
- package/dist/runtime/page.d.ts +15 -0
- package/dist/runtime/refs.d.cts +12 -0
- package/dist/runtime/refs.d.ts +12 -0
- package/dist/runtime/surface-box.d.cts +12 -0
- package/dist/runtime/surface-box.d.ts +12 -0
- package/dist/runtime.cjs +53 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.d.cts +24 -0
- package/dist/runtime.d.ts +24 -0
- package/dist/runtime.js +38 -0
- package/dist/runtime.js.map +1 -0
- package/dist/scope-BQA4toWB.cjs +17 -0
- package/dist/scope-BQA4toWB.cjs.map +1 -0
- package/dist/scope-BgdCqnYb.js +18 -0
- package/dist/scope-BgdCqnYb.js.map +1 -0
- package/dist/search/SearchLayer.vue.d.cts +17 -0
- package/dist/search/SearchLayer.vue.d.ts +17 -0
- package/dist/search/composables.d.cts +31 -0
- package/dist/search/composables.d.ts +31 -0
- package/dist/search.cjs +17 -0
- package/dist/search.cjs.map +1 -0
- package/dist/search.d.cts +10 -0
- package/dist/search.d.ts +10 -0
- package/dist/search.js +11 -0
- package/dist/search.js.map +1 -0
- package/dist/selection/SelectionClipboard.vue.d.cts +24 -0
- package/dist/selection/SelectionClipboard.vue.d.ts +24 -0
- package/dist/selection/SelectionHandles.vue.d.cts +8 -0
- package/dist/selection/SelectionHandles.vue.d.ts +8 -0
- package/dist/selection/SelectionLayer.vue.d.cts +3 -0
- package/dist/selection/SelectionLayer.vue.d.ts +3 -0
- package/dist/selection/SelectionMenu.vue.d.cts +23 -0
- package/dist/selection/SelectionMenu.vue.d.ts +23 -0
- package/dist/selection/composables.d.cts +24 -0
- package/dist/selection/composables.d.ts +24 -0
- package/dist/selection.cjs +24 -0
- package/dist/selection.cjs.map +1 -0
- package/dist/selection.d.cts +16 -0
- package/dist/selection.d.ts +16 -0
- package/dist/selection.js +15 -0
- package/dist/selection.js.map +1 -0
- package/dist/shell.cjs +72 -0
- package/dist/shell.cjs.map +1 -0
- package/dist/shell.d.cts +56 -0
- package/dist/shell.d.ts +56 -0
- package/dist/shell.js +67 -0
- package/dist/shell.js.map +1 -0
- package/dist/signature/composables.d.cts +39 -0
- package/dist/signature/composables.d.ts +39 -0
- package/dist/signature.cjs +16 -0
- package/dist/signature.cjs.map +1 -0
- package/dist/signature.d.cts +15 -0
- package/dist/signature.d.ts +15 -0
- package/dist/signature.js +10 -0
- package/dist/signature.js.map +1 -0
- package/dist/stage/PageSurface.vue.d.cts +29 -0
- package/dist/stage/PageSurface.vue.d.ts +29 -0
- package/dist/stage/Scrollbar.vue.d.cts +32 -0
- package/dist/stage/Scrollbar.vue.d.ts +32 -0
- package/dist/stage/Stage.vue.d.cts +44 -0
- package/dist/stage/Stage.vue.d.ts +44 -0
- package/dist/stage/StageScope.vue.d.cts +17 -0
- package/dist/stage/StageScope.vue.d.ts +17 -0
- package/dist/stage/composables.d.cts +41 -0
- package/dist/stage/composables.d.ts +41 -0
- package/dist/stage/scope.d.cts +12 -0
- package/dist/stage/scope.d.ts +12 -0
- package/dist/stage.cjs +21 -0
- package/dist/stage.cjs.map +1 -0
- package/dist/stage.d.cts +17 -0
- package/dist/stage.d.ts +17 -0
- package/dist/stage.js +15 -0
- package/dist/stage.js.map +1 -0
- package/dist/stamp.cjs +68 -0
- package/dist/stamp.cjs.map +1 -0
- package/dist/stamp.d.cts +61 -0
- package/dist/stamp.d.ts +61 -0
- package/dist/stamp.js +61 -0
- package/dist/stamp.js.map +1 -0
- package/dist/state-DZg8q3v6.js +52 -0
- package/dist/state-DZg8q3v6.js.map +1 -0
- package/dist/state-M22NDJQo.cjs +51 -0
- package/dist/state-M22NDJQo.cjs.map +1 -0
- package/dist/state.d.cts +32 -0
- package/dist/state.d.ts +32 -0
- package/dist/strip-BSDB39Xh.cjs +743 -0
- package/dist/strip-BSDB39Xh.cjs.map +1 -0
- package/dist/strip-C3wLonKB.js +744 -0
- package/dist/strip-C3wLonKB.js.map +1 -0
- package/dist/surface-box-B9oa4YoG.js +12 -0
- package/dist/surface-box-B9oa4YoG.js.map +1 -0
- package/dist/surface-box-C7EvUOXp.cjs +11 -0
- package/dist/surface-box-C7EvUOXp.cjs.map +1 -0
- package/dist/theme.d.cts +13 -0
- package/dist/theme.d.ts +13 -0
- package/dist/toolbar/DefaultCollapsed.vue.d.cts +9 -0
- package/dist/toolbar/DefaultCollapsed.vue.d.ts +9 -0
- package/dist/toolbar/DefaultCommand.vue.d.cts +8 -0
- package/dist/toolbar/DefaultCommand.vue.d.ts +8 -0
- package/dist/toolbar/DefaultGroupTrigger.vue.d.cts +9 -0
- package/dist/toolbar/DefaultGroupTrigger.vue.d.ts +9 -0
- package/dist/toolbar/DefaultOverflowMenu.vue.d.cts +9 -0
- package/dist/toolbar/DefaultOverflowMenu.vue.d.ts +9 -0
- package/dist/toolbar/DefaultOverflowTrigger.vue.d.cts +10 -0
- package/dist/toolbar/DefaultOverflowTrigger.vue.d.ts +10 -0
- package/dist/toolbar/Measured.vue.d.cts +21 -0
- package/dist/toolbar/Measured.vue.d.ts +21 -0
- package/dist/toolbar/NativeSlotSocket.vue.d.cts +22 -0
- package/dist/toolbar/NativeSlotSocket.vue.d.ts +22 -0
- package/dist/toolbar/Toolbar.vue.d.cts +82 -0
- package/dist/toolbar/Toolbar.vue.d.ts +82 -0
- package/dist/toolbar/ToolbarPart.vue.d.cts +42 -0
- package/dist/toolbar/ToolbarPart.vue.d.ts +42 -0
- package/dist/toolbar/paint.d.cts +3 -0
- package/dist/toolbar/paint.d.ts +3 -0
- package/dist/toolbar/strip.d.cts +14 -0
- package/dist/toolbar/strip.d.ts +14 -0
- package/dist/toolbar/views.d.cts +15 -0
- package/dist/toolbar/views.d.ts +15 -0
- package/dist/toolbar.cjs +27 -0
- package/dist/toolbar.cjs.map +1 -0
- package/dist/toolbar.d.cts +14 -0
- package/dist/toolbar.d.ts +14 -0
- package/dist/toolbar.js +12 -0
- package/dist/toolbar.js.map +1 -0
- package/dist/view-manager.cjs +22 -0
- package/dist/view-manager.cjs.map +1 -0
- package/dist/view-manager.d.cts +24 -0
- package/dist/view-manager.d.ts +24 -0
- package/dist/view-manager.js +17 -0
- package/dist/view-manager.js.map +1 -0
- package/package.json +179 -3
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
import { computed, toValue, ref, watch, defineComponent, openBlock, createElementBlock, normalizeStyle, unref, createElementVNode, createCommentVNode, Fragment, renderList, toDisplayString, createVNode, shallowRef, onUnmounted, watchEffect, createBlock } from "vue";
|
|
2
|
+
import { annotationKey, shallowEqual } from "@embedpdf/core";
|
|
3
|
+
import { FormToken as FormToken$1 } from "@embedpdf/plugin-form/contract/host";
|
|
4
|
+
import { InteractionToken } from "@embedpdf/plugin-interaction/contract/host";
|
|
5
|
+
import { a as usePaintsPagePart } from "./page-layers-rlh4-1qr.js";
|
|
6
|
+
import { a as useCapability, b as useCapabilityEvent, i as useOptionalSelector, h as useOptionalCapability } from "./capabilities-C7YzgPCX.js";
|
|
7
|
+
import { u as usePage } from "./page-D9XIuLSj.js";
|
|
8
|
+
import { formColorsOf, isolatePointerDown, bindWidgetEvents, rectInPixels, widgetBoxStyleOf, FORM_CONTROL_FILL, formFocusRingStyleOf, createShownUrls, loadAppearanceUrls, pictureOrPainting, shownAppearance, svgShapesOf, createOptimisticSelection, isolateWheel, showSelectedOptions, listBoxControlStyleOf, createTextFieldEditor, createFontMounts, textFieldEditorStyleOf, pressToggle } from "@embedpdf/web";
|
|
9
|
+
import { FormToken, formState } from "@embedpdf/plugin-form";
|
|
10
|
+
import { e as useViewerSettings } from "./documents-DUu5H4yH.js";
|
|
11
|
+
import { s as settingsComposable, a as stateComposable } from "./state-DZg8q3v6.js";
|
|
12
|
+
import { MITER_LIMIT } from "@embedpdf/core-annotation";
|
|
13
|
+
import { RenderToken } from "@embedpdf/plugin-render/contract/host";
|
|
14
|
+
import { _ as _sfc_main$a } from "./SvgShapes.vue_vue_type_script_setup_true_lang-fOTs4aqv.js";
|
|
15
|
+
import { SignatureToken } from "@embedpdf/plugin-signature/contract";
|
|
16
|
+
function useForm() {
|
|
17
|
+
return useCapability(FormToken);
|
|
18
|
+
}
|
|
19
|
+
function useFormEvent(select, handler) {
|
|
20
|
+
useCapabilityEvent(FormToken, select, handler);
|
|
21
|
+
}
|
|
22
|
+
const useFormState = stateComposable(formState);
|
|
23
|
+
const useFormSettings = settingsComposable(FormToken);
|
|
24
|
+
function useFormValue(field) {
|
|
25
|
+
return useOptionalSelector(FormToken, (form) => form.getValue(toValue(field)), null);
|
|
26
|
+
}
|
|
27
|
+
function useFormColors() {
|
|
28
|
+
const accent = useViewerSettings((settings) => settings.accent);
|
|
29
|
+
const focus = useFormSettings((settings) => settings.focus);
|
|
30
|
+
const fields = useFormSettings((settings) => settings.fields);
|
|
31
|
+
return computed(() => formColorsOf({ focus: focus.value, fields: fields.value }, accent.value));
|
|
32
|
+
}
|
|
33
|
+
function useWidgetActivation(widget) {
|
|
34
|
+
const form = useCapability(FormToken$1);
|
|
35
|
+
return () => {
|
|
36
|
+
const target = widget();
|
|
37
|
+
if (target) void form.activateWidget(target);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function useWidgetBox(item, colors, options = {}) {
|
|
41
|
+
const page = usePage();
|
|
42
|
+
const form = useCapability(FormToken$1);
|
|
43
|
+
const element = ref(null);
|
|
44
|
+
const edge = options.edge ?? true;
|
|
45
|
+
watch(
|
|
46
|
+
element,
|
|
47
|
+
(box, _previous, onCleanup) => {
|
|
48
|
+
if (!box) return;
|
|
49
|
+
const release = isolatePointerDown(box);
|
|
50
|
+
const unbind = bindWidgetEvents(box, (event) => {
|
|
51
|
+
const { fieldRef, annotationRef } = item();
|
|
52
|
+
if (annotationRef) form.notifyWidgetEvent(fieldRef, annotationRef, event);
|
|
53
|
+
});
|
|
54
|
+
onCleanup(() => {
|
|
55
|
+
release();
|
|
56
|
+
unbind();
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
{ immediate: true, flush: "post" }
|
|
60
|
+
);
|
|
61
|
+
const frame = computed(() => rectInPixels(item().box, page.value.transform));
|
|
62
|
+
const style = computed(
|
|
63
|
+
() => widgetBoxStyleOf(item(), frame.value, colors(), { edge })
|
|
64
|
+
);
|
|
65
|
+
return { element, frame, style };
|
|
66
|
+
}
|
|
67
|
+
const _hoisted_1$7 = ["aria-label", "disabled"];
|
|
68
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
69
|
+
__name: "ButtonControl",
|
|
70
|
+
props: {
|
|
71
|
+
item: {},
|
|
72
|
+
colors: {}
|
|
73
|
+
},
|
|
74
|
+
setup(__props) {
|
|
75
|
+
const props = __props;
|
|
76
|
+
const activate = useWidgetActivation(() => props.item.annotationRef);
|
|
77
|
+
const { element: box, style: boxStyle } = useWidgetBox(
|
|
78
|
+
() => props.item,
|
|
79
|
+
() => props.colors,
|
|
80
|
+
{ edge: false }
|
|
81
|
+
);
|
|
82
|
+
return (_ctx, _cache) => {
|
|
83
|
+
return openBlock(), createElementBlock("div", {
|
|
84
|
+
ref_key: "box",
|
|
85
|
+
ref: box,
|
|
86
|
+
style: normalizeStyle([unref(boxStyle), { cursor: __props.item.disabled ? "default" : "pointer" }])
|
|
87
|
+
}, [
|
|
88
|
+
createElementVNode("button", {
|
|
89
|
+
type: "button",
|
|
90
|
+
"aria-label": __props.item.label,
|
|
91
|
+
disabled: __props.item.disabled,
|
|
92
|
+
style: normalizeStyle({
|
|
93
|
+
...unref(FORM_CONTROL_FILL),
|
|
94
|
+
padding: "0",
|
|
95
|
+
border: "0",
|
|
96
|
+
background: "transparent",
|
|
97
|
+
cursor: "inherit",
|
|
98
|
+
pointerEvents: __props.item.disabled ? "none" : "auto"
|
|
99
|
+
}),
|
|
100
|
+
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
101
|
+
(...args) => unref(activate) && unref(activate)(...args))
|
|
102
|
+
}, null, 12, _hoisted_1$7)
|
|
103
|
+
], 4);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
108
|
+
__name: "FormFocusRing",
|
|
109
|
+
props: {
|
|
110
|
+
visible: { type: Boolean },
|
|
111
|
+
color: {}
|
|
112
|
+
},
|
|
113
|
+
setup(__props) {
|
|
114
|
+
return (_ctx, _cache) => {
|
|
115
|
+
return __props.visible ? (openBlock(), createElementBlock("span", {
|
|
116
|
+
key: 0,
|
|
117
|
+
"aria-hidden": "true",
|
|
118
|
+
"data-embedpdf-form-focus-ring": "",
|
|
119
|
+
style: normalizeStyle(unref(formFocusRingStyleOf)(__props.color))
|
|
120
|
+
}, null, 4)) : createCommentVNode("", true);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const _hoisted_1$6 = ["value", "aria-label", "disabled"];
|
|
125
|
+
const _hoisted_2$3 = {
|
|
126
|
+
key: 0,
|
|
127
|
+
value: ""
|
|
128
|
+
};
|
|
129
|
+
const _hoisted_3 = ["value"];
|
|
130
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
131
|
+
__name: "ComboControl",
|
|
132
|
+
props: {
|
|
133
|
+
item: {},
|
|
134
|
+
colors: {}
|
|
135
|
+
},
|
|
136
|
+
setup(__props) {
|
|
137
|
+
const props = __props;
|
|
138
|
+
const form = useCapability(FormToken$1);
|
|
139
|
+
const activate = useWidgetActivation(() => props.item.annotationRef);
|
|
140
|
+
const { element: box, style: boxStyle } = useWidgetBox(
|
|
141
|
+
() => props.item,
|
|
142
|
+
() => props.colors
|
|
143
|
+
);
|
|
144
|
+
const focused = ref(false);
|
|
145
|
+
const selectionKey = computed(() => props.item.selected.join("\0"));
|
|
146
|
+
function onChange(event) {
|
|
147
|
+
const value = event.currentTarget.value;
|
|
148
|
+
void form.setValue(props.item.fieldRef, { value: value || null });
|
|
149
|
+
}
|
|
150
|
+
return (_ctx, _cache) => {
|
|
151
|
+
return openBlock(), createElementBlock("div", {
|
|
152
|
+
ref_key: "box",
|
|
153
|
+
ref: box,
|
|
154
|
+
style: normalizeStyle(unref(boxStyle)),
|
|
155
|
+
onClick: _cache[2] || (_cache[2] = //@ts-ignore
|
|
156
|
+
(...args) => unref(activate) && unref(activate)(...args))
|
|
157
|
+
}, [
|
|
158
|
+
(openBlock(), createElementBlock("select", {
|
|
159
|
+
key: selectionKey.value,
|
|
160
|
+
value: __props.item.selected[0] ?? "",
|
|
161
|
+
"aria-label": __props.item.label,
|
|
162
|
+
disabled: __props.item.disabled,
|
|
163
|
+
style: normalizeStyle({
|
|
164
|
+
...unref(FORM_CONTROL_FILL),
|
|
165
|
+
opacity: 0,
|
|
166
|
+
cursor: __props.item.disabled ? "default" : "pointer",
|
|
167
|
+
...__props.item.disabled ? { pointerEvents: "none" } : {}
|
|
168
|
+
}),
|
|
169
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => focused.value = true),
|
|
170
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => focused.value = false),
|
|
171
|
+
onChange
|
|
172
|
+
}, [
|
|
173
|
+
__props.item.selected.length === 0 ? (openBlock(), createElementBlock("option", _hoisted_2$3)) : createCommentVNode("", true),
|
|
174
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.item.options, (option, index) => {
|
|
175
|
+
return openBlock(), createElementBlock("option", {
|
|
176
|
+
key: index,
|
|
177
|
+
value: option.value
|
|
178
|
+
}, toDisplayString(option.label), 9, _hoisted_3);
|
|
179
|
+
}), 128))
|
|
180
|
+
], 44, _hoisted_1$6)),
|
|
181
|
+
createVNode(_sfc_main$8, {
|
|
182
|
+
visible: focused.value,
|
|
183
|
+
color: __props.colors.focus
|
|
184
|
+
}, null, 8, ["visible", "color"])
|
|
185
|
+
], 4);
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
const _hoisted_1$5 = ["src"];
|
|
190
|
+
const _hoisted_2$2 = ["viewBox"];
|
|
191
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
192
|
+
__name: "FieldPictures",
|
|
193
|
+
setup(__props) {
|
|
194
|
+
const NO_WIDGETS = Object.freeze([]);
|
|
195
|
+
const page = usePage();
|
|
196
|
+
const form = useOptionalCapability(FormToken$1);
|
|
197
|
+
const widgets = useOptionalSelector(
|
|
198
|
+
FormToken$1,
|
|
199
|
+
(form2) => form2.listShownWidgets(page.value.ref),
|
|
200
|
+
NO_WIDGETS,
|
|
201
|
+
shallowEqual
|
|
202
|
+
);
|
|
203
|
+
const epoch = useOptionalSelector(
|
|
204
|
+
FormToken$1,
|
|
205
|
+
(form2) => form2.getAppearanceEpoch(page.value.ref),
|
|
206
|
+
""
|
|
207
|
+
);
|
|
208
|
+
const scale = useOptionalSelector(
|
|
209
|
+
RenderToken,
|
|
210
|
+
(lens) => lens.getAppearanceScale(page.value.transform.renderScale),
|
|
211
|
+
0
|
|
212
|
+
);
|
|
213
|
+
const urls = shallowRef(null);
|
|
214
|
+
const shown = createShownUrls();
|
|
215
|
+
onUnmounted(() => shown.release());
|
|
216
|
+
watch(
|
|
217
|
+
[form, () => page.value.ref, scale, epoch],
|
|
218
|
+
([host, pageRef, at], _previous, onCleanup) => {
|
|
219
|
+
if (!host || !at) return;
|
|
220
|
+
onCleanup(
|
|
221
|
+
loadAppearanceUrls(
|
|
222
|
+
shown,
|
|
223
|
+
(signal) => host.renderAppearances(pageRef, at, signal),
|
|
224
|
+
annotationKey,
|
|
225
|
+
(loaded) => urls.value = loaded
|
|
226
|
+
)
|
|
227
|
+
);
|
|
228
|
+
},
|
|
229
|
+
{ immediate: true }
|
|
230
|
+
);
|
|
231
|
+
const looks = computed(
|
|
232
|
+
() => widgets.value.flatMap((widget) => {
|
|
233
|
+
const key = annotationKey(widget.ref);
|
|
234
|
+
const look = pictureOrPainting({
|
|
235
|
+
pending: widget.pending,
|
|
236
|
+
picture: urls.value && shownAppearance(urls.value, key, widget.appearanceState),
|
|
237
|
+
version: widget.pictureVersion,
|
|
238
|
+
loaded: urls.value !== null,
|
|
239
|
+
paint: () => {
|
|
240
|
+
var _a;
|
|
241
|
+
return ((_a = form.value) == null ? void 0 : _a.getWidgetPainting(widget.ref)) ?? null;
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
if (!look) return [];
|
|
245
|
+
if (look.kind === "picture") {
|
|
246
|
+
return [
|
|
247
|
+
{
|
|
248
|
+
kind: "picture",
|
|
249
|
+
key,
|
|
250
|
+
url: look.picture.url,
|
|
251
|
+
frame: rectInPixels(look.picture.box, page.value.transform)
|
|
252
|
+
}
|
|
253
|
+
];
|
|
254
|
+
}
|
|
255
|
+
const { x, y, width, height } = widget.rect;
|
|
256
|
+
return [
|
|
257
|
+
{
|
|
258
|
+
kind: "painting",
|
|
259
|
+
key,
|
|
260
|
+
viewBox: `${x} ${y} ${width} ${height}`,
|
|
261
|
+
shapes: svgShapesOf(look.painting.scene, { miterLimit: MITER_LIMIT }),
|
|
262
|
+
frame: rectInPixels(widget.rect, page.value.transform)
|
|
263
|
+
}
|
|
264
|
+
];
|
|
265
|
+
})
|
|
266
|
+
);
|
|
267
|
+
return (_ctx, _cache) => {
|
|
268
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(looks.value, (look) => {
|
|
269
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
270
|
+
key: look.key
|
|
271
|
+
}, [
|
|
272
|
+
look.kind === "picture" ? (openBlock(), createElementBlock("img", {
|
|
273
|
+
key: 0,
|
|
274
|
+
src: look.url,
|
|
275
|
+
alt: "",
|
|
276
|
+
draggable: "false",
|
|
277
|
+
style: normalizeStyle({
|
|
278
|
+
position: "absolute",
|
|
279
|
+
left: `${look.frame.left}px`,
|
|
280
|
+
top: `${look.frame.top}px`,
|
|
281
|
+
width: `${look.frame.width}px`,
|
|
282
|
+
height: `${look.frame.height}px`,
|
|
283
|
+
// A global `img { max-width: 100% }` reset would clamp it.
|
|
284
|
+
maxWidth: "none",
|
|
285
|
+
maxHeight: "none",
|
|
286
|
+
pointerEvents: "none"
|
|
287
|
+
})
|
|
288
|
+
}, null, 12, _hoisted_1$5)) : (openBlock(), createElementBlock("svg", {
|
|
289
|
+
key: 1,
|
|
290
|
+
viewBox: look.viewBox,
|
|
291
|
+
style: normalizeStyle({
|
|
292
|
+
position: "absolute",
|
|
293
|
+
left: `${look.frame.left}px`,
|
|
294
|
+
top: `${look.frame.top}px`,
|
|
295
|
+
width: `${look.frame.width}px`,
|
|
296
|
+
height: `${look.frame.height}px`,
|
|
297
|
+
overflow: "visible",
|
|
298
|
+
pointerEvents: "none"
|
|
299
|
+
})
|
|
300
|
+
}, [
|
|
301
|
+
createVNode(_sfc_main$a, {
|
|
302
|
+
shapes: look.shapes
|
|
303
|
+
}, null, 8, ["shapes"])
|
|
304
|
+
], 12, _hoisted_2$2))
|
|
305
|
+
], 64);
|
|
306
|
+
}), 128);
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
const _hoisted_1$4 = ["aria-label", "multiple", "size", "disabled"];
|
|
311
|
+
const _hoisted_2$1 = ["value"];
|
|
312
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
313
|
+
__name: "NativeListBox",
|
|
314
|
+
props: {
|
|
315
|
+
label: {},
|
|
316
|
+
disabled: { type: Boolean },
|
|
317
|
+
multi: { type: Boolean },
|
|
318
|
+
options: {},
|
|
319
|
+
selected: {},
|
|
320
|
+
onSelect: { type: Function }
|
|
321
|
+
},
|
|
322
|
+
emits: ["focus", "blur"],
|
|
323
|
+
setup(__props, { emit: __emit }) {
|
|
324
|
+
const props = __props;
|
|
325
|
+
const emit = __emit;
|
|
326
|
+
const selection = createOptimisticSelection(props.selected);
|
|
327
|
+
const shown = shallowRef(selection.get());
|
|
328
|
+
onUnmounted(selection.subscribe(() => shown.value = selection.get()));
|
|
329
|
+
watch(
|
|
330
|
+
() => props.selected,
|
|
331
|
+
(values) => selection.setConfirmed(values)
|
|
332
|
+
);
|
|
333
|
+
const control = ref(null);
|
|
334
|
+
watch(
|
|
335
|
+
control,
|
|
336
|
+
(element, _previous, onCleanup) => {
|
|
337
|
+
if (element) onCleanup(isolateWheel(element));
|
|
338
|
+
},
|
|
339
|
+
{ immediate: true, flush: "post" }
|
|
340
|
+
);
|
|
341
|
+
watch(
|
|
342
|
+
[control, shown, () => props.options],
|
|
343
|
+
([element, values]) => {
|
|
344
|
+
if (element) showSelectedOptions(element, values);
|
|
345
|
+
},
|
|
346
|
+
{ immediate: true, flush: "post" }
|
|
347
|
+
);
|
|
348
|
+
function onChange(event) {
|
|
349
|
+
const element = event.currentTarget;
|
|
350
|
+
selection.choose(
|
|
351
|
+
Array.from(element.selectedOptions).map((option) => option.value),
|
|
352
|
+
props.onSelect
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
return (_ctx, _cache) => {
|
|
356
|
+
return openBlock(), createElementBlock("select", {
|
|
357
|
+
ref_key: "control",
|
|
358
|
+
ref: control,
|
|
359
|
+
"aria-label": __props.label,
|
|
360
|
+
multiple: __props.multi,
|
|
361
|
+
size: Math.max(2, __props.options.length),
|
|
362
|
+
disabled: __props.disabled,
|
|
363
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => emit("focus")),
|
|
364
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur")),
|
|
365
|
+
onChange
|
|
366
|
+
}, [
|
|
367
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
|
|
368
|
+
return openBlock(), createElementBlock("option", {
|
|
369
|
+
key: index,
|
|
370
|
+
value: option.value
|
|
371
|
+
}, toDisplayString(option.label), 9, _hoisted_2$1);
|
|
372
|
+
}), 128))
|
|
373
|
+
], 40, _hoisted_1$4);
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
378
|
+
__name: "ListControl",
|
|
379
|
+
props: {
|
|
380
|
+
item: {},
|
|
381
|
+
colors: {}
|
|
382
|
+
},
|
|
383
|
+
setup(__props) {
|
|
384
|
+
const props = __props;
|
|
385
|
+
const form = useCapability(FormToken$1);
|
|
386
|
+
const activate = useWidgetActivation(() => props.item.annotationRef);
|
|
387
|
+
const {
|
|
388
|
+
element: box,
|
|
389
|
+
frame,
|
|
390
|
+
style: boxStyle
|
|
391
|
+
} = useWidgetBox(
|
|
392
|
+
() => props.item,
|
|
393
|
+
() => props.colors,
|
|
394
|
+
{ edge: false }
|
|
395
|
+
);
|
|
396
|
+
const focused = ref(false);
|
|
397
|
+
const select = (values) => form.setValue(props.item.fieldRef, { selectedValues: values });
|
|
398
|
+
const listStyle = computed(() => listBoxControlStyleOf(props.item, frame.value, props.colors));
|
|
399
|
+
return (_ctx, _cache) => {
|
|
400
|
+
return openBlock(), createElementBlock("div", {
|
|
401
|
+
ref_key: "box",
|
|
402
|
+
ref: box,
|
|
403
|
+
style: normalizeStyle(unref(boxStyle)),
|
|
404
|
+
onClick: _cache[2] || (_cache[2] = //@ts-ignore
|
|
405
|
+
(...args) => unref(activate) && unref(activate)(...args))
|
|
406
|
+
}, [
|
|
407
|
+
createVNode(_sfc_main$5, {
|
|
408
|
+
label: __props.item.label,
|
|
409
|
+
disabled: __props.item.disabled,
|
|
410
|
+
multi: __props.item.multi,
|
|
411
|
+
options: __props.item.options,
|
|
412
|
+
selected: __props.item.selected,
|
|
413
|
+
"on-select": select,
|
|
414
|
+
style: normalizeStyle(listStyle.value),
|
|
415
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => focused.value = true),
|
|
416
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => focused.value = false)
|
|
417
|
+
}, null, 8, ["label", "disabled", "multi", "options", "selected", "style"]),
|
|
418
|
+
createVNode(_sfc_main$8, {
|
|
419
|
+
visible: focused.value,
|
|
420
|
+
color: __props.colors.focus
|
|
421
|
+
}, null, 8, ["visible", "color"])
|
|
422
|
+
], 4);
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
const _hoisted_1$3 = ["aria-label", "data-signed"];
|
|
427
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
428
|
+
__name: "SignatureControl",
|
|
429
|
+
props: {
|
|
430
|
+
item: {},
|
|
431
|
+
colors: {}
|
|
432
|
+
},
|
|
433
|
+
setup(__props) {
|
|
434
|
+
const props = __props;
|
|
435
|
+
const { element: box, style: boxStyle } = useWidgetBox(
|
|
436
|
+
() => props.item,
|
|
437
|
+
() => props.colors
|
|
438
|
+
);
|
|
439
|
+
const signature = useOptionalCapability(SignatureToken);
|
|
440
|
+
const known = useOptionalSelector(
|
|
441
|
+
SignatureToken,
|
|
442
|
+
(capability) => {
|
|
443
|
+
var _a;
|
|
444
|
+
return ((_a = capability.getSignature(props.item.fieldRef)) == null ? void 0 : _a.signed) ?? null;
|
|
445
|
+
},
|
|
446
|
+
null
|
|
447
|
+
);
|
|
448
|
+
const signed = computed(() => known.value ?? props.item.signed);
|
|
449
|
+
const actionable = computed(
|
|
450
|
+
() => signature.value !== null && (signed.value || !props.item.disabled)
|
|
451
|
+
);
|
|
452
|
+
function onClick() {
|
|
453
|
+
const plugin = signature.value;
|
|
454
|
+
if (!plugin) return;
|
|
455
|
+
if (signed.value) plugin.requestInspection(props.item.fieldRef);
|
|
456
|
+
else plugin.setTarget(props.item.fieldRef);
|
|
457
|
+
}
|
|
458
|
+
return (_ctx, _cache) => {
|
|
459
|
+
return openBlock(), createElementBlock("div", {
|
|
460
|
+
ref_key: "box",
|
|
461
|
+
ref: box,
|
|
462
|
+
style: normalizeStyle([unref(boxStyle), { cursor: actionable.value ? "pointer" : "default" }])
|
|
463
|
+
}, [
|
|
464
|
+
actionable.value ? (openBlock(), createElementBlock("button", {
|
|
465
|
+
key: 0,
|
|
466
|
+
type: "button",
|
|
467
|
+
"aria-label": __props.item.label,
|
|
468
|
+
"data-signed": signed.value ? "" : void 0,
|
|
469
|
+
style: normalizeStyle({
|
|
470
|
+
...unref(FORM_CONTROL_FILL),
|
|
471
|
+
padding: "0",
|
|
472
|
+
border: "0",
|
|
473
|
+
background: "transparent",
|
|
474
|
+
cursor: "inherit"
|
|
475
|
+
}),
|
|
476
|
+
onClick
|
|
477
|
+
}, null, 12, _hoisted_1$3)) : createCommentVNode("", true)
|
|
478
|
+
], 4);
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
const _hoisted_1$2 = ["value", "maxlength", "aria-label", "disabled"];
|
|
483
|
+
const _hoisted_2 = ["type", "value", "maxlength", "aria-label", "disabled"];
|
|
484
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
485
|
+
__name: "TextControl",
|
|
486
|
+
props: {
|
|
487
|
+
item: {},
|
|
488
|
+
colors: {}
|
|
489
|
+
},
|
|
490
|
+
setup(__props) {
|
|
491
|
+
const props = __props;
|
|
492
|
+
const form = useCapability(FormToken$1);
|
|
493
|
+
const activate = useWidgetActivation(() => props.item.annotationRef);
|
|
494
|
+
const { element: box, frame, style: boxStyle } = useWidgetBox(
|
|
495
|
+
() => props.item,
|
|
496
|
+
() => props.colors
|
|
497
|
+
);
|
|
498
|
+
const editor = createTextFieldEditor(form, props.item.fieldRef, props.item.value);
|
|
499
|
+
const state = shallowRef(editor.getState());
|
|
500
|
+
onUnmounted(editor.subscribe(() => state.value = editor.getState()));
|
|
501
|
+
watch(
|
|
502
|
+
() => props.item.value,
|
|
503
|
+
(value) => editor.setValue(value)
|
|
504
|
+
);
|
|
505
|
+
const layout = computed(
|
|
506
|
+
() => props.item.annotationRef ? form.getTextEditorLayout(props.item.annotationRef, state.value.draft) : null
|
|
507
|
+
);
|
|
508
|
+
const mounts = createFontMounts();
|
|
509
|
+
onUnmounted(() => mounts.release());
|
|
510
|
+
watchEffect(() => {
|
|
511
|
+
if (layout.value) mounts.mount([layout.value.program]);
|
|
512
|
+
});
|
|
513
|
+
const editorStyle = computed(
|
|
514
|
+
() => textFieldEditorStyleOf(props.item, frame.value, props.colors, state.value.focused, layout.value)
|
|
515
|
+
);
|
|
516
|
+
const onInput = (event) => editor.input(event.target.value);
|
|
517
|
+
function onKeydown(event) {
|
|
518
|
+
if (editor.keyDown(event.key, props.item.multiline)) {
|
|
519
|
+
event.currentTarget.blur();
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
return (_ctx, _cache) => {
|
|
523
|
+
return openBlock(), createElementBlock("div", {
|
|
524
|
+
ref_key: "box",
|
|
525
|
+
ref: box,
|
|
526
|
+
style: normalizeStyle(unref(boxStyle)),
|
|
527
|
+
onClick: _cache[4] || (_cache[4] = //@ts-ignore
|
|
528
|
+
(...args) => unref(activate) && unref(activate)(...args))
|
|
529
|
+
}, [
|
|
530
|
+
__props.item.multiline ? (openBlock(), createElementBlock("textarea", {
|
|
531
|
+
key: 0,
|
|
532
|
+
value: state.value.draft,
|
|
533
|
+
maxlength: __props.item.maxLength ?? void 0,
|
|
534
|
+
"aria-label": __props.item.label,
|
|
535
|
+
disabled: __props.item.disabled,
|
|
536
|
+
style: normalizeStyle(editorStyle.value),
|
|
537
|
+
onFocus: _cache[0] || (_cache[0] = //@ts-ignore
|
|
538
|
+
(...args) => unref(editor).focus && unref(editor).focus(...args)),
|
|
539
|
+
onInput,
|
|
540
|
+
onBlur: _cache[1] || (_cache[1] = //@ts-ignore
|
|
541
|
+
(...args) => unref(editor).blur && unref(editor).blur(...args)),
|
|
542
|
+
onKeydown
|
|
543
|
+
}, null, 44, _hoisted_1$2)) : (openBlock(), createElementBlock("input", {
|
|
544
|
+
key: 1,
|
|
545
|
+
type: __props.item.password ? "password" : "text",
|
|
546
|
+
value: state.value.draft,
|
|
547
|
+
maxlength: __props.item.maxLength ?? void 0,
|
|
548
|
+
"aria-label": __props.item.label,
|
|
549
|
+
disabled: __props.item.disabled,
|
|
550
|
+
style: normalizeStyle(editorStyle.value),
|
|
551
|
+
onFocus: _cache[2] || (_cache[2] = //@ts-ignore
|
|
552
|
+
(...args) => unref(editor).focus && unref(editor).focus(...args)),
|
|
553
|
+
onInput,
|
|
554
|
+
onBlur: _cache[3] || (_cache[3] = //@ts-ignore
|
|
555
|
+
(...args) => unref(editor).blur && unref(editor).blur(...args)),
|
|
556
|
+
onKeydown
|
|
557
|
+
}, null, 44, _hoisted_2))
|
|
558
|
+
], 4);
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
const _hoisted_1$1 = ["role", "aria-checked", "aria-label", "tabindex"];
|
|
563
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
564
|
+
__name: "ToggleControl",
|
|
565
|
+
props: {
|
|
566
|
+
item: {},
|
|
567
|
+
colors: {}
|
|
568
|
+
},
|
|
569
|
+
setup(__props) {
|
|
570
|
+
const props = __props;
|
|
571
|
+
const form = useCapability(FormToken$1);
|
|
572
|
+
const activate = useWidgetActivation(() => props.item.annotationRef);
|
|
573
|
+
const { element: box, style: boxStyle } = useWidgetBox(
|
|
574
|
+
() => props.item,
|
|
575
|
+
() => props.colors
|
|
576
|
+
);
|
|
577
|
+
const focused = ref(false);
|
|
578
|
+
const press = () => pressToggle(form, props.item, activate);
|
|
579
|
+
function onKeydown(event) {
|
|
580
|
+
if (event.key !== " " && event.key !== "Enter") return;
|
|
581
|
+
event.preventDefault();
|
|
582
|
+
press();
|
|
583
|
+
}
|
|
584
|
+
return (_ctx, _cache) => {
|
|
585
|
+
return openBlock(), createElementBlock("div", {
|
|
586
|
+
ref_key: "box",
|
|
587
|
+
ref: box,
|
|
588
|
+
role: __props.item.kind === "checkbox" ? "checkbox" : "radio",
|
|
589
|
+
"aria-checked": __props.item.checked,
|
|
590
|
+
"aria-label": __props.item.label,
|
|
591
|
+
tabindex: __props.item.disabled ? -1 : 0,
|
|
592
|
+
style: normalizeStyle([unref(boxStyle), { cursor: __props.item.disabled ? "default" : "pointer", outline: "none" }]),
|
|
593
|
+
onClick: press,
|
|
594
|
+
onKeydown,
|
|
595
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => focused.value = true),
|
|
596
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => focused.value = false)
|
|
597
|
+
}, [
|
|
598
|
+
createVNode(_sfc_main$8, {
|
|
599
|
+
visible: focused.value,
|
|
600
|
+
color: __props.colors.focus
|
|
601
|
+
}, null, 8, ["visible", "color"])
|
|
602
|
+
], 44, _hoisted_1$1);
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
const _hoisted_1 = { style: { position: "absolute", inset: "0", pointerEvents: "none" } };
|
|
607
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
608
|
+
__name: "FormLayer",
|
|
609
|
+
setup(__props) {
|
|
610
|
+
const NO_WIDGETS = Object.freeze([]);
|
|
611
|
+
const page = usePage();
|
|
612
|
+
const form = useOptionalCapability(FormToken$1);
|
|
613
|
+
usePaintsPagePart(
|
|
614
|
+
computed(() => form.value ? page.value.ref : null),
|
|
615
|
+
"formFields"
|
|
616
|
+
);
|
|
617
|
+
const colors = useFormColors();
|
|
618
|
+
const active = useOptionalSelector(
|
|
619
|
+
InteractionToken,
|
|
620
|
+
(interaction) => interaction.activeToolEnables("form-fill"),
|
|
621
|
+
false
|
|
622
|
+
);
|
|
623
|
+
const items = useOptionalSelector(
|
|
624
|
+
FormToken$1,
|
|
625
|
+
(lens) => lens.listWidgets(page.value.ref),
|
|
626
|
+
NO_WIDGETS,
|
|
627
|
+
shallowEqual
|
|
628
|
+
);
|
|
629
|
+
watch(
|
|
630
|
+
[form, () => page.value.ref],
|
|
631
|
+
([lens, pageRef]) => {
|
|
632
|
+
if (lens) void lens.ensureLoaded(pageRef);
|
|
633
|
+
},
|
|
634
|
+
{ immediate: true }
|
|
635
|
+
);
|
|
636
|
+
const keyOf = (item) => `${item.key}:${item.annotObjectNumber}`;
|
|
637
|
+
return (_ctx, _cache) => {
|
|
638
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
639
|
+
createVNode(_sfc_main$6),
|
|
640
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(active) ? unref(items) : [], (item) => {
|
|
641
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
642
|
+
key: keyOf(item)
|
|
643
|
+
}, [
|
|
644
|
+
item.control === "text" ? (openBlock(), createBlock(_sfc_main$2, {
|
|
645
|
+
key: 0,
|
|
646
|
+
item,
|
|
647
|
+
colors: unref(colors)
|
|
648
|
+
}, null, 8, ["item", "colors"])) : item.control === "toggle" ? (openBlock(), createBlock(_sfc_main$1, {
|
|
649
|
+
key: 1,
|
|
650
|
+
item,
|
|
651
|
+
colors: unref(colors)
|
|
652
|
+
}, null, 8, ["item", "colors"])) : item.control === "choice" && item.kind === "list" ? (openBlock(), createBlock(_sfc_main$4, {
|
|
653
|
+
key: 2,
|
|
654
|
+
item,
|
|
655
|
+
colors: unref(colors)
|
|
656
|
+
}, null, 8, ["item", "colors"])) : item.control === "choice" ? (openBlock(), createBlock(_sfc_main$7, {
|
|
657
|
+
key: 3,
|
|
658
|
+
item,
|
|
659
|
+
colors: unref(colors)
|
|
660
|
+
}, null, 8, ["item", "colors"])) : item.control === "button" ? (openBlock(), createBlock(_sfc_main$9, {
|
|
661
|
+
key: 4,
|
|
662
|
+
item,
|
|
663
|
+
colors: unref(colors)
|
|
664
|
+
}, null, 8, ["item", "colors"])) : item.control === "signature" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
665
|
+
key: 5,
|
|
666
|
+
item,
|
|
667
|
+
colors: unref(colors)
|
|
668
|
+
}, null, 8, ["item", "colors"])) : createCommentVNode("", true)
|
|
669
|
+
], 64);
|
|
670
|
+
}), 128))
|
|
671
|
+
]);
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
export {
|
|
676
|
+
_sfc_main as _,
|
|
677
|
+
useFormEvent as a,
|
|
678
|
+
useFormSettings as b,
|
|
679
|
+
useFormState as c,
|
|
680
|
+
useFormValue as d,
|
|
681
|
+
useForm as u
|
|
682
|
+
};
|
|
683
|
+
//# sourceMappingURL=FormLayer.vue_vue_type_script_setup_true_lang-DUqft-xs.js.map
|