@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,11 @@
|
|
|
1
|
+
import type { FormWidgetItem } from '@embedpdf/plugin-form';
|
|
2
|
+
import type { FormColors } from '@embedpdf/web';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
item: Extract<FormWidgetItem, {
|
|
5
|
+
control: 'text';
|
|
6
|
+
}>;
|
|
7
|
+
colors: FormColors;
|
|
8
|
+
};
|
|
9
|
+
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>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FormWidgetItem } from '@embedpdf/plugin-form';
|
|
2
|
+
import type { FormColors } from '@embedpdf/web';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
item: Extract<FormWidgetItem, {
|
|
5
|
+
control: 'text';
|
|
6
|
+
}>;
|
|
7
|
+
colors: FormColors;
|
|
8
|
+
};
|
|
9
|
+
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>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FormWidgetItem } from '@embedpdf/plugin-form';
|
|
2
|
+
import type { FormColors } from '@embedpdf/web';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
item: Extract<FormWidgetItem, {
|
|
5
|
+
control: 'toggle';
|
|
6
|
+
}>;
|
|
7
|
+
colors: FormColors;
|
|
8
|
+
};
|
|
9
|
+
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>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FormWidgetItem } from '@embedpdf/plugin-form';
|
|
2
|
+
import type { FormColors } from '@embedpdf/web';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
item: Extract<FormWidgetItem, {
|
|
5
|
+
control: 'toggle';
|
|
6
|
+
}>;
|
|
7
|
+
colors: FormColors;
|
|
8
|
+
};
|
|
9
|
+
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>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import type { EventHook } from '@embedpdf/core';
|
|
3
|
+
import type { AnnotationRef } from '@embedpdf/plugin-annotation/contract';
|
|
4
|
+
import type { FormCapability, FormFieldRef, FormFieldValue } from '@embedpdf/plugin-form';
|
|
5
|
+
import type { FormColors } from '@embedpdf/web';
|
|
6
|
+
/**
|
|
7
|
+
* The form API for the document in scope: reading, filling, form data and
|
|
8
|
+
* building. The object never changes, so it's safe to keep in a closure; keep
|
|
9
|
+
* it whole (`form.setValue(…)`), since a member taken out of it once stays the
|
|
10
|
+
* one of that moment.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useForm(): FormCapability;
|
|
13
|
+
/** Subscribe to one form event while the component lives: `useFormEvent((form) => form.onValueChanged, handler)`. */
|
|
14
|
+
export declare function useFormEvent<Event>(select: (form: FormCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
15
|
+
/**
|
|
16
|
+
* The form's state as refs: every field (`fields`), whether it's read
|
|
17
|
+
* (`status`), what kind of form the document has (`formKind`), and the field
|
|
18
|
+
* of the selected widget in design mode (`selectedField`), declared once in
|
|
19
|
+
* `formState`. With a selector, one ref that updates only when the value it
|
|
20
|
+
* picks changes. Empty without a document.
|
|
21
|
+
*/
|
|
22
|
+
export declare const useFormState: import("../index.cjs").StateComposable<{
|
|
23
|
+
fields: readonly import("@embedpdf/plugin-form").FormFieldDTO[];
|
|
24
|
+
status: import("@embedpdf/core").ResourceStatus;
|
|
25
|
+
formKind: import("@embedpdf/plugin-form").FormKind;
|
|
26
|
+
selectedField: import("@embedpdf/plugin-form").FormFieldDTO | null;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* The form settings (`validation`, `focus`, `fields`) as refs, or one ref for
|
|
30
|
+
* the value `select` picks. They belong to the plugin, so they read without a
|
|
31
|
+
* document; change them with `useForm().updateSettings()`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const useFormSettings: import("../index.cjs").SettingsComposable<import("@embedpdf/plugin-form").FormSettings & object>;
|
|
34
|
+
/**
|
|
35
|
+
* One field's value, in the shape `setValue()` takes, or `null`: a ref that
|
|
36
|
+
* updates only when that field's value changes (the plugin keeps one value
|
|
37
|
+
* object per field while it stays the same). `field` may be a ref or a
|
|
38
|
+
* getter, and the ref follows it. `null` without a document.
|
|
39
|
+
*/
|
|
40
|
+
export declare function useFormValue(field: MaybeRefOrGetter<FormFieldRef>): Readonly<Ref<FormFieldValue | null>>;
|
|
41
|
+
/**
|
|
42
|
+
* The colors the viewer draws fields with: the form settings over the
|
|
43
|
+
* viewer's accent, each behind its `--epdf-form-*` CSS variable.
|
|
44
|
+
*/
|
|
45
|
+
export declare function useFormColors(): Readonly<Ref<FormColors>>;
|
|
46
|
+
/**
|
|
47
|
+
* A click on a widget runs its `/A` action. ISO 32000 puts the activate
|
|
48
|
+
* action on the widget, whatever its field, and many forms ship "buttons" as
|
|
49
|
+
* read-only text fields with an `/A` that Acrobat runs; a widget without one
|
|
50
|
+
* is inert. `widget` is read at the click, so it is the item's current one.
|
|
51
|
+
*/
|
|
52
|
+
export declare function useWidgetActivation(widget: () => AnnotationRef | null): () => void;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import type { EventHook } from '@embedpdf/core';
|
|
3
|
+
import type { AnnotationRef } from '@embedpdf/plugin-annotation/contract';
|
|
4
|
+
import type { FormCapability, FormFieldRef, FormFieldValue } from '@embedpdf/plugin-form';
|
|
5
|
+
import type { FormColors } from '@embedpdf/web';
|
|
6
|
+
/**
|
|
7
|
+
* The form API for the document in scope: reading, filling, form data and
|
|
8
|
+
* building. The object never changes, so it's safe to keep in a closure; keep
|
|
9
|
+
* it whole (`form.setValue(…)`), since a member taken out of it once stays the
|
|
10
|
+
* one of that moment.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useForm(): FormCapability;
|
|
13
|
+
/** Subscribe to one form event while the component lives: `useFormEvent((form) => form.onValueChanged, handler)`. */
|
|
14
|
+
export declare function useFormEvent<Event>(select: (form: FormCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
15
|
+
/**
|
|
16
|
+
* The form's state as refs: every field (`fields`), whether it's read
|
|
17
|
+
* (`status`), what kind of form the document has (`formKind`), and the field
|
|
18
|
+
* of the selected widget in design mode (`selectedField`), declared once in
|
|
19
|
+
* `formState`. With a selector, one ref that updates only when the value it
|
|
20
|
+
* picks changes. Empty without a document.
|
|
21
|
+
*/
|
|
22
|
+
export declare const useFormState: import("../index.js").StateComposable<{
|
|
23
|
+
fields: readonly import("@embedpdf/plugin-form").FormFieldDTO[];
|
|
24
|
+
status: import("@embedpdf/core").ResourceStatus;
|
|
25
|
+
formKind: import("@embedpdf/plugin-form").FormKind;
|
|
26
|
+
selectedField: import("@embedpdf/plugin-form").FormFieldDTO | null;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* The form settings (`validation`, `focus`, `fields`) as refs, or one ref for
|
|
30
|
+
* the value `select` picks. They belong to the plugin, so they read without a
|
|
31
|
+
* document; change them with `useForm().updateSettings()`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const useFormSettings: import("../index.js").SettingsComposable<import("@embedpdf/plugin-form").FormSettings & object>;
|
|
34
|
+
/**
|
|
35
|
+
* One field's value, in the shape `setValue()` takes, or `null`: a ref that
|
|
36
|
+
* updates only when that field's value changes (the plugin keeps one value
|
|
37
|
+
* object per field while it stays the same). `field` may be a ref or a
|
|
38
|
+
* getter, and the ref follows it. `null` without a document.
|
|
39
|
+
*/
|
|
40
|
+
export declare function useFormValue(field: MaybeRefOrGetter<FormFieldRef>): Readonly<Ref<FormFieldValue | null>>;
|
|
41
|
+
/**
|
|
42
|
+
* The colors the viewer draws fields with: the form settings over the
|
|
43
|
+
* viewer's accent, each behind its `--epdf-form-*` CSS variable.
|
|
44
|
+
*/
|
|
45
|
+
export declare function useFormColors(): Readonly<Ref<FormColors>>;
|
|
46
|
+
/**
|
|
47
|
+
* A click on a widget runs its `/A` action. ISO 32000 puts the activate
|
|
48
|
+
* action on the widget, whatever its field, and many forms ship "buttons" as
|
|
49
|
+
* read-only text fields with an `/A` that Acrobat runs; a widget without one
|
|
50
|
+
* is inert. `widget` is read at the click, so it is the item's current one.
|
|
51
|
+
*/
|
|
52
|
+
export declare function useWidgetActivation(widget: () => AnnotationRef | null): () => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CSSProperties, Ref } from 'vue';
|
|
2
|
+
import type { FormWidgetItem } from '@embedpdf/plugin-form';
|
|
3
|
+
import type { FormColors, PixelRect } from '@embedpdf/web';
|
|
4
|
+
/** A control's box: bind `element` with `ref`, and `style` on the same element. */
|
|
5
|
+
export interface WidgetBox {
|
|
6
|
+
/** The box element, for the template's `ref`. */
|
|
7
|
+
readonly element: Ref<HTMLDivElement | null>;
|
|
8
|
+
/** Where the widget is on the page, in view px. */
|
|
9
|
+
readonly frame: Readonly<Ref<PixelRect>>;
|
|
10
|
+
/** The box's place, and its edge when the field has no border of its own. */
|
|
11
|
+
readonly style: Readonly<Ref<CSSProperties>>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The box of one widget. `edge: false` leaves out the edge for controls that
|
|
15
|
+
* draw their own (a list box) or never have one (a button).
|
|
16
|
+
*
|
|
17
|
+
* The box keeps every press that starts in it from the page below: the Stage
|
|
18
|
+
* listens natively on an ancestor, and a press reaching it would start the
|
|
19
|
+
* active tool's gesture or end an edit as a click outside. Vue's listeners are
|
|
20
|
+
* native too, but the box stops it with `isolatePointerDown`, the same call
|
|
21
|
+
* every framework's form layer makes. The widget's pointer and focus events
|
|
22
|
+
* (its `/AA` actions: enter, exit, down, up, focus, blur) go to the form
|
|
23
|
+
* plugin from native listeners on the box (`bindWidgetEvents`), never the
|
|
24
|
+
* control inside: "may edit this field" and "may receive PDF action events"
|
|
25
|
+
* are different rights, and a session that may not fill still sees hover
|
|
26
|
+
* tooltips. Its own `pointerdown` listener sits on the same element as the
|
|
27
|
+
* isolation, so the stopped press still reaches the field's "mouse down"
|
|
28
|
+
* action. Focus is `focusin`/`focusout`, so a control's own blur (where a
|
|
29
|
+
* text field starts its commit) runs before the box sends "blur", and a blur
|
|
30
|
+
* script sees the committed value.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useWidgetBox(item: () => FormWidgetItem, colors: () => FormColors, options?: {
|
|
33
|
+
edge?: boolean;
|
|
34
|
+
}): WidgetBox;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CSSProperties, Ref } from 'vue';
|
|
2
|
+
import type { FormWidgetItem } from '@embedpdf/plugin-form';
|
|
3
|
+
import type { FormColors, PixelRect } from '@embedpdf/web';
|
|
4
|
+
/** A control's box: bind `element` with `ref`, and `style` on the same element. */
|
|
5
|
+
export interface WidgetBox {
|
|
6
|
+
/** The box element, for the template's `ref`. */
|
|
7
|
+
readonly element: Ref<HTMLDivElement | null>;
|
|
8
|
+
/** Where the widget is on the page, in view px. */
|
|
9
|
+
readonly frame: Readonly<Ref<PixelRect>>;
|
|
10
|
+
/** The box's place, and its edge when the field has no border of its own. */
|
|
11
|
+
readonly style: Readonly<Ref<CSSProperties>>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The box of one widget. `edge: false` leaves out the edge for controls that
|
|
15
|
+
* draw their own (a list box) or never have one (a button).
|
|
16
|
+
*
|
|
17
|
+
* The box keeps every press that starts in it from the page below: the Stage
|
|
18
|
+
* listens natively on an ancestor, and a press reaching it would start the
|
|
19
|
+
* active tool's gesture or end an edit as a click outside. Vue's listeners are
|
|
20
|
+
* native too, but the box stops it with `isolatePointerDown`, the same call
|
|
21
|
+
* every framework's form layer makes. The widget's pointer and focus events
|
|
22
|
+
* (its `/AA` actions: enter, exit, down, up, focus, blur) go to the form
|
|
23
|
+
* plugin from native listeners on the box (`bindWidgetEvents`), never the
|
|
24
|
+
* control inside: "may edit this field" and "may receive PDF action events"
|
|
25
|
+
* are different rights, and a session that may not fill still sees hover
|
|
26
|
+
* tooltips. Its own `pointerdown` listener sits on the same element as the
|
|
27
|
+
* isolation, so the stopped press still reaches the field's "mouse down"
|
|
28
|
+
* action. Focus is `focusin`/`focusout`, so a control's own blur (where a
|
|
29
|
+
* text field starts its commit) runs before the box sends "blur", and a blur
|
|
30
|
+
* script sees the committed value.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useWidgetBox(item: () => FormWidgetItem, colors: () => FormColors, options?: {
|
|
33
|
+
edge?: boolean;
|
|
34
|
+
}): WidgetBox;
|
package/dist/form.cjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pluginForm = require("@embedpdf/plugin-form");
|
|
4
|
+
const FormLayer_vue_vue_type_script_setup_true_lang = require("./FormLayer.vue_vue_type_script_setup_true_lang-BA0_VwFc.cjs");
|
|
5
|
+
exports.FormLayer = FormLayer_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
6
|
+
exports.useForm = FormLayer_vue_vue_type_script_setup_true_lang.useForm;
|
|
7
|
+
exports.useFormEvent = FormLayer_vue_vue_type_script_setup_true_lang.useFormEvent;
|
|
8
|
+
exports.useFormSettings = FormLayer_vue_vue_type_script_setup_true_lang.useFormSettings;
|
|
9
|
+
exports.useFormState = FormLayer_vue_vue_type_script_setup_true_lang.useFormState;
|
|
10
|
+
exports.useFormValue = FormLayer_vue_vue_type_script_setup_true_lang.useFormValue;
|
|
11
|
+
Object.keys(pluginForm).forEach((k) => {
|
|
12
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => pluginForm[k]
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=form.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
package/dist/form.d.cts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/form: the Vue surface of `@embedpdf/plugin-form`.
|
|
3
|
+
*
|
|
4
|
+
* `<FormLayer>` puts a real HTML control over each field of its page, for
|
|
5
|
+
* people to fill in; `useForm()` reads, fills and builds the form from code;
|
|
6
|
+
* `useFormState()` and `useFormValue()` follow the fields and one field's
|
|
7
|
+
* value as refs, `useFormSettings()` the settings, and `useFormEvent()` the
|
|
8
|
+
* plugin's events.
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-form';
|
|
11
|
+
export { default as FormLayer } from './form/FormLayer.vue.cjs';
|
|
12
|
+
export { useForm, useFormEvent, useFormSettings, useFormState, useFormValue, } from './form/composables.cjs';
|
package/dist/form.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/form: the Vue surface of `@embedpdf/plugin-form`.
|
|
3
|
+
*
|
|
4
|
+
* `<FormLayer>` puts a real HTML control over each field of its page, for
|
|
5
|
+
* people to fill in; `useForm()` reads, fills and builds the form from code;
|
|
6
|
+
* `useFormState()` and `useFormValue()` follow the fields and one field's
|
|
7
|
+
* value as refs, `useFormSettings()` the settings, and `useFormEvent()` the
|
|
8
|
+
* plugin's events.
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-form';
|
|
11
|
+
export { default as FormLayer } from './form/FormLayer.vue.js';
|
|
12
|
+
export { useForm, useFormEvent, useFormSettings, useFormState, useFormValue, } from './form/composables.js';
|
package/dist/form.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "@embedpdf/plugin-form";
|
|
2
|
+
import { _, u, a, b, c, d } from "./FormLayer.vue_vue_type_script_setup_true_lang-DUqft-xs.js";
|
|
3
|
+
export {
|
|
4
|
+
_ as FormLayer,
|
|
5
|
+
u as useForm,
|
|
6
|
+
a as useFormEvent,
|
|
7
|
+
b as useFormSettings,
|
|
8
|
+
c as useFormState,
|
|
9
|
+
d as useFormValue
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=form.js.map
|
package/dist/form.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/history.cjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pluginHistory = require("@embedpdf/plugin-history");
|
|
4
|
+
const capabilities = require("./capabilities-DVNJmgy7.cjs");
|
|
5
|
+
const state = require("./state-M22NDJQo.cjs");
|
|
6
|
+
function useHistory() {
|
|
7
|
+
return capabilities.useCapability(pluginHistory.HistoryToken);
|
|
8
|
+
}
|
|
9
|
+
const useHistoryState = state.stateComposable(pluginHistory.historyState);
|
|
10
|
+
function useHistoryEvent(select, handler) {
|
|
11
|
+
capabilities.useCapabilityEvent(pluginHistory.HistoryToken, select, handler);
|
|
12
|
+
}
|
|
13
|
+
exports.useHistory = useHistory;
|
|
14
|
+
exports.useHistoryEvent = useHistoryEvent;
|
|
15
|
+
exports.useHistoryState = useHistoryState;
|
|
16
|
+
Object.keys(pluginHistory).forEach((k) => {
|
|
17
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => pluginHistory[k]
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=history.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.cjs","sources":["../src/history.ts"],"sourcesContent":["/**\n * @embedpdf/vue/history: the Vue view of `@embedpdf/plugin-history`, undo and\n * redo of what you change through the viewer, one history per open document.\n * An action shows undone at once, even while it is still on its way.\n *\n * const history = useHistory();\n * const { canUndo, undoLabel } = useHistoryState();\n * <button :disabled=\"!canUndo\" @click=\"history.undo()\">Undo</button>\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-history';\nimport { HistoryToken, historyState } from '@embedpdf/plugin-history';\nimport type { HistoryCapability } from '@embedpdf/plugin-history';\nimport type { EventHook } from '@embedpdf/core';\nimport { useCapability, useCapabilityEvent } from './runtime/capabilities';\nimport { stateComposable } from './state';\n\n/**\n * The history API (`undo`, `redo`, `canUndo`, `canRedo`, the labels, `clear`) of the nearest\n * `<DocumentScope>`'s document, else the active one. The object never changes; outside a\n * document every method throws `not-ready`.\n */\nexport function useHistory(): HistoryCapability {\n return useCapability(HistoryToken);\n}\n\n/**\n * Whether undo and redo can run, and what they would undo and redo, as refs (the page's State\n * table, declared once in `historyState`). With a selector, one ref for the value it picks,\n * which updates only when that value changes.\n */\nexport const useHistoryState = stateComposable(historyState);\n\n/** Subscribe to one history event while the component lives: `useHistoryEvent((history) => history.onUndone, handler)`. */\nexport function useHistoryEvent<Event>(\n select: (history: HistoryCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(HistoryToken, select, handler);\n}\n"],"names":["useCapability","HistoryToken","stateComposable","historyState","useCapabilityEvent"],"mappings":";;;;;AAuBO,SAAS,aAAgC;AAC9C,SAAOA,aAAAA,cAAcC,cAAAA,YAAY;AACnC;AAOO,MAAM,kBAAkBC,MAAAA,gBAAgBC,cAAAA,YAAY;AAGpD,SAAS,gBACd,QACA,SACM;AACNC,kCAAmBH,cAAAA,cAAc,QAAQ,OAAO;AAClD;;;;;;;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/history: the Vue view of `@embedpdf/plugin-history`, undo and
|
|
3
|
+
* redo of what you change through the viewer, one history per open document.
|
|
4
|
+
* An action shows undone at once, even while it is still on its way.
|
|
5
|
+
*
|
|
6
|
+
* const history = useHistory();
|
|
7
|
+
* const { canUndo, undoLabel } = useHistoryState();
|
|
8
|
+
* <button :disabled="!canUndo" @click="history.undo()">Undo</button>
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-history';
|
|
11
|
+
import type { HistoryCapability } from '@embedpdf/plugin-history';
|
|
12
|
+
import type { EventHook } from '@embedpdf/core';
|
|
13
|
+
/**
|
|
14
|
+
* The history API (`undo`, `redo`, `canUndo`, `canRedo`, the labels, `clear`) of the nearest
|
|
15
|
+
* `<DocumentScope>`'s document, else the active one. The object never changes; outside a
|
|
16
|
+
* document every method throws `not-ready`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useHistory(): HistoryCapability;
|
|
19
|
+
/**
|
|
20
|
+
* Whether undo and redo can run, and what they would undo and redo, as refs (the page's State
|
|
21
|
+
* table, declared once in `historyState`). With a selector, one ref for the value it picks,
|
|
22
|
+
* which updates only when that value changes.
|
|
23
|
+
*/
|
|
24
|
+
export declare const useHistoryState: import("./state.cjs").StateComposable<{
|
|
25
|
+
canUndo: boolean;
|
|
26
|
+
canRedo: boolean;
|
|
27
|
+
undoLabel: import("@embedpdf/core").ChangeLabel | null;
|
|
28
|
+
redoLabel: import("@embedpdf/core").ChangeLabel | null;
|
|
29
|
+
}>;
|
|
30
|
+
/** Subscribe to one history event while the component lives: `useHistoryEvent((history) => history.onUndone, handler)`. */
|
|
31
|
+
export declare function useHistoryEvent<Event>(select: (history: HistoryCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/history: the Vue view of `@embedpdf/plugin-history`, undo and
|
|
3
|
+
* redo of what you change through the viewer, one history per open document.
|
|
4
|
+
* An action shows undone at once, even while it is still on its way.
|
|
5
|
+
*
|
|
6
|
+
* const history = useHistory();
|
|
7
|
+
* const { canUndo, undoLabel } = useHistoryState();
|
|
8
|
+
* <button :disabled="!canUndo" @click="history.undo()">Undo</button>
|
|
9
|
+
*/
|
|
10
|
+
export * from '@embedpdf/plugin-history';
|
|
11
|
+
import type { HistoryCapability } from '@embedpdf/plugin-history';
|
|
12
|
+
import type { EventHook } from '@embedpdf/core';
|
|
13
|
+
/**
|
|
14
|
+
* The history API (`undo`, `redo`, `canUndo`, `canRedo`, the labels, `clear`) of the nearest
|
|
15
|
+
* `<DocumentScope>`'s document, else the active one. The object never changes; outside a
|
|
16
|
+
* document every method throws `not-ready`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useHistory(): HistoryCapability;
|
|
19
|
+
/**
|
|
20
|
+
* Whether undo and redo can run, and what they would undo and redo, as refs (the page's State
|
|
21
|
+
* table, declared once in `historyState`). With a selector, one ref for the value it picks,
|
|
22
|
+
* which updates only when that value changes.
|
|
23
|
+
*/
|
|
24
|
+
export declare const useHistoryState: import("./state.js").StateComposable<{
|
|
25
|
+
canUndo: boolean;
|
|
26
|
+
canRedo: boolean;
|
|
27
|
+
undoLabel: import("@embedpdf/core").ChangeLabel | null;
|
|
28
|
+
redoLabel: import("@embedpdf/core").ChangeLabel | null;
|
|
29
|
+
}>;
|
|
30
|
+
/** Subscribe to one history event while the component lives: `useHistoryEvent((history) => history.onUndone, handler)`. */
|
|
31
|
+
export declare function useHistoryEvent<Event>(select: (history: HistoryCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
package/dist/history.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HistoryToken, historyState } from "@embedpdf/plugin-history";
|
|
2
|
+
export * from "@embedpdf/plugin-history";
|
|
3
|
+
import { a as useCapability, b as useCapabilityEvent } from "./capabilities-C7YzgPCX.js";
|
|
4
|
+
import { a as stateComposable } from "./state-DZg8q3v6.js";
|
|
5
|
+
function useHistory() {
|
|
6
|
+
return useCapability(HistoryToken);
|
|
7
|
+
}
|
|
8
|
+
const useHistoryState = stateComposable(historyState);
|
|
9
|
+
function useHistoryEvent(select, handler) {
|
|
10
|
+
useCapabilityEvent(HistoryToken, select, handler);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
useHistory,
|
|
14
|
+
useHistoryEvent,
|
|
15
|
+
useHistoryState
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.js","sources":["../src/history.ts"],"sourcesContent":["/**\n * @embedpdf/vue/history: the Vue view of `@embedpdf/plugin-history`, undo and\n * redo of what you change through the viewer, one history per open document.\n * An action shows undone at once, even while it is still on its way.\n *\n * const history = useHistory();\n * const { canUndo, undoLabel } = useHistoryState();\n * <button :disabled=\"!canUndo\" @click=\"history.undo()\">Undo</button>\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-history';\nimport { HistoryToken, historyState } from '@embedpdf/plugin-history';\nimport type { HistoryCapability } from '@embedpdf/plugin-history';\nimport type { EventHook } from '@embedpdf/core';\nimport { useCapability, useCapabilityEvent } from './runtime/capabilities';\nimport { stateComposable } from './state';\n\n/**\n * The history API (`undo`, `redo`, `canUndo`, `canRedo`, the labels, `clear`) of the nearest\n * `<DocumentScope>`'s document, else the active one. The object never changes; outside a\n * document every method throws `not-ready`.\n */\nexport function useHistory(): HistoryCapability {\n return useCapability(HistoryToken);\n}\n\n/**\n * Whether undo and redo can run, and what they would undo and redo, as refs (the page's State\n * table, declared once in `historyState`). With a selector, one ref for the value it picks,\n * which updates only when that value changes.\n */\nexport const useHistoryState = stateComposable(historyState);\n\n/** Subscribe to one history event while the component lives: `useHistoryEvent((history) => history.onUndone, handler)`. */\nexport function useHistoryEvent<Event>(\n select: (history: HistoryCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(HistoryToken, select, handler);\n}\n"],"names":[],"mappings":";;;;AAuBO,SAAS,aAAgC;AAC9C,SAAO,cAAc,YAAY;AACnC;AAOO,MAAM,kBAAkB,gBAAgB,YAAY;AAGpD,SAAS,gBACd,QACA,SACM;AACN,qBAAmB,cAAc,QAAQ,OAAO;AAClD;"}
|
package/dist/i18n.cjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pluginI18n = require("@embedpdf/plugin-i18n");
|
|
4
|
+
const capabilities = require("./capabilities-DVNJmgy7.cjs");
|
|
5
|
+
const state = require("./state-M22NDJQo.cjs");
|
|
6
|
+
function useI18n() {
|
|
7
|
+
return capabilities.useCapability(pluginI18n.I18nToken);
|
|
8
|
+
}
|
|
9
|
+
function useI18nEvent(select, handler) {
|
|
10
|
+
capabilities.useCapabilityEvent(pluginI18n.I18nToken, select, handler);
|
|
11
|
+
}
|
|
12
|
+
const useI18nState = state.stateComposable(pluginI18n.i18nState);
|
|
13
|
+
const useI18nSettings = state.settingsComposable(pluginI18n.I18nToken);
|
|
14
|
+
function useT() {
|
|
15
|
+
const translator = capabilities.useSelector(pluginI18n.I18nToken, (i18n) => i18n.getTranslator());
|
|
16
|
+
return (key, options) => translator.value(key, options);
|
|
17
|
+
}
|
|
18
|
+
exports.useI18n = useI18n;
|
|
19
|
+
exports.useI18nEvent = useI18nEvent;
|
|
20
|
+
exports.useI18nSettings = useI18nSettings;
|
|
21
|
+
exports.useI18nState = useI18nState;
|
|
22
|
+
exports.useT = useT;
|
|
23
|
+
Object.keys(pluginI18n).forEach((k) => {
|
|
24
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: () => pluginI18n[k]
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=i18n.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.cjs","sources":["../src/i18n.ts"],"sourcesContent":["/**\n * @embedpdf/vue/i18n: the Vue surface of `@embedpdf/plugin-i18n`. The plugin\n * belongs to the workspace and needs no engine, so these composables work from\n * the first frame, before a document opens: a loading screen and a password\n * prompt translate too.\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-i18n';\nimport { I18nToken, i18nState } from '@embedpdf/plugin-i18n';\nimport type { I18nCapability, TranslateOptions } from '@embedpdf/plugin-i18n';\nimport type { EventHook } from '@embedpdf/core';\nimport { useCapability, useCapabilityEvent, useSelector } from './runtime/capabilities';\nimport { settingsComposable, stateComposable } from './state';\n\n/** The i18n API: `t`, `setLocale`, `addTranslations`, `registerLocale`, the settings calls. The object never changes. */\nexport function useI18n(): I18nCapability {\n return useCapability(I18nToken);\n}\n\n/** Subscribe to one i18n event while the component lives: `useI18nEvent((i18n) => i18n.onLocaleChanged, handler)`. */\nexport function useI18nEvent<Event>(\n select: (i18n: I18nCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(I18nToken, select, handler);\n}\n\n/**\n * The current language, how it reads, every language you can switch to, and\n * the one loading, as refs (the translations page's State table, declared once\n * in `i18nState`). With a selector, one ref, which updates only when what it\n * picks changes.\n */\nexport const useI18nState = stateComposable(i18nState);\n\n/** The i18n settings (`locale`, `fallbackLocale`, `locales`, `loaders`) as refs. Takes a selector. */\nexport const useI18nSettings = settingsComposable(I18nToken);\n\n/**\n * A translate function that reads the language reactively: a template, a\n * computed or a `watch` that calls it updates when the language or the strings\n * change. The function itself never changes, so it can be kept anywhere.\n *\n * const t = useT();\n * <span>{{ t('search.results', { params: { count } }) }}</span>\n */\nexport function useT(): (key: string, options?: TranslateOptions) => string {\n // The plugin hands out a new translator when the language or the strings change;\n // reading the ref inside the call is what makes the caller depend on it.\n const translator = useSelector(I18nToken, (i18n) => i18n.getTranslator());\n return (key, options) => translator.value(key, options);\n}\n"],"names":["useCapability","I18nToken","useCapabilityEvent","stateComposable","i18nState","settingsComposable","useSelector"],"mappings":";;;;;AAgBO,SAAS,UAA0B;AACxC,SAAOA,aAAAA,cAAcC,WAAAA,SAAS;AAChC;AAGO,SAAS,aACd,QACA,SACM;AACNC,kCAAmBD,WAAAA,WAAW,QAAQ,OAAO;AAC/C;AAQO,MAAM,eAAeE,MAAAA,gBAAgBC,WAAAA,SAAS;AAG9C,MAAM,kBAAkBC,MAAAA,mBAAmBJ,WAAAA,SAAS;AAUpD,SAAS,OAA4D;AAG1E,QAAM,aAAaK,aAAAA,YAAYL,WAAAA,WAAW,CAAC,SAAS,KAAK,eAAe;AACxE,SAAO,CAAC,KAAK,YAAY,WAAW,MAAM,KAAK,OAAO;AACxD;;;;;;;;;;;;"}
|
package/dist/i18n.d.cts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/i18n: the Vue surface of `@embedpdf/plugin-i18n`. The plugin
|
|
3
|
+
* belongs to the workspace and needs no engine, so these composables work from
|
|
4
|
+
* the first frame, before a document opens: a loading screen and a password
|
|
5
|
+
* prompt translate too.
|
|
6
|
+
*/
|
|
7
|
+
export * from '@embedpdf/plugin-i18n';
|
|
8
|
+
import type { I18nCapability, TranslateOptions } from '@embedpdf/plugin-i18n';
|
|
9
|
+
import type { EventHook } from '@embedpdf/core';
|
|
10
|
+
/** The i18n API: `t`, `setLocale`, `addTranslations`, `registerLocale`, the settings calls. The object never changes. */
|
|
11
|
+
export declare function useI18n(): I18nCapability;
|
|
12
|
+
/** Subscribe to one i18n event while the component lives: `useI18nEvent((i18n) => i18n.onLocaleChanged, handler)`. */
|
|
13
|
+
export declare function useI18nEvent<Event>(select: (i18n: I18nCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
14
|
+
/**
|
|
15
|
+
* The current language, how it reads, every language you can switch to, and
|
|
16
|
+
* the one loading, as refs (the translations page's State table, declared once
|
|
17
|
+
* in `i18nState`). With a selector, one ref, which updates only when what it
|
|
18
|
+
* picks changes.
|
|
19
|
+
*/
|
|
20
|
+
export declare const useI18nState: import("./state.cjs").StateComposable<{
|
|
21
|
+
locale: string;
|
|
22
|
+
direction: import("@embedpdf/plugin-i18n").TextDirection;
|
|
23
|
+
locales: readonly import("@embedpdf/plugin-i18n").LocaleInfo[];
|
|
24
|
+
loading: string | null;
|
|
25
|
+
}>;
|
|
26
|
+
/** The i18n settings (`locale`, `fallbackLocale`, `locales`, `loaders`) as refs. Takes a selector. */
|
|
27
|
+
export declare const useI18nSettings: import("./state.cjs").SettingsComposable<import("@embedpdf/plugin-i18n").I18nSettings & object>;
|
|
28
|
+
/**
|
|
29
|
+
* A translate function that reads the language reactively: a template, a
|
|
30
|
+
* computed or a `watch` that calls it updates when the language or the strings
|
|
31
|
+
* change. The function itself never changes, so it can be kept anywhere.
|
|
32
|
+
*
|
|
33
|
+
* const t = useT();
|
|
34
|
+
* <span>{{ t('search.results', { params: { count } }) }}</span>
|
|
35
|
+
*/
|
|
36
|
+
export declare function useT(): (key: string, options?: TranslateOptions) => string;
|
package/dist/i18n.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @embedpdf/vue/i18n: the Vue surface of `@embedpdf/plugin-i18n`. The plugin
|
|
3
|
+
* belongs to the workspace and needs no engine, so these composables work from
|
|
4
|
+
* the first frame, before a document opens: a loading screen and a password
|
|
5
|
+
* prompt translate too.
|
|
6
|
+
*/
|
|
7
|
+
export * from '@embedpdf/plugin-i18n';
|
|
8
|
+
import type { I18nCapability, TranslateOptions } from '@embedpdf/plugin-i18n';
|
|
9
|
+
import type { EventHook } from '@embedpdf/core';
|
|
10
|
+
/** The i18n API: `t`, `setLocale`, `addTranslations`, `registerLocale`, the settings calls. The object never changes. */
|
|
11
|
+
export declare function useI18n(): I18nCapability;
|
|
12
|
+
/** Subscribe to one i18n event while the component lives: `useI18nEvent((i18n) => i18n.onLocaleChanged, handler)`. */
|
|
13
|
+
export declare function useI18nEvent<Event>(select: (i18n: I18nCapability) => EventHook<Event>, handler: (event: Event) => void): void;
|
|
14
|
+
/**
|
|
15
|
+
* The current language, how it reads, every language you can switch to, and
|
|
16
|
+
* the one loading, as refs (the translations page's State table, declared once
|
|
17
|
+
* in `i18nState`). With a selector, one ref, which updates only when what it
|
|
18
|
+
* picks changes.
|
|
19
|
+
*/
|
|
20
|
+
export declare const useI18nState: import("./state.js").StateComposable<{
|
|
21
|
+
locale: string;
|
|
22
|
+
direction: import("@embedpdf/plugin-i18n").TextDirection;
|
|
23
|
+
locales: readonly import("@embedpdf/plugin-i18n").LocaleInfo[];
|
|
24
|
+
loading: string | null;
|
|
25
|
+
}>;
|
|
26
|
+
/** The i18n settings (`locale`, `fallbackLocale`, `locales`, `loaders`) as refs. Takes a selector. */
|
|
27
|
+
export declare const useI18nSettings: import("./state.js").SettingsComposable<import("@embedpdf/plugin-i18n").I18nSettings & object>;
|
|
28
|
+
/**
|
|
29
|
+
* A translate function that reads the language reactively: a template, a
|
|
30
|
+
* computed or a `watch` that calls it updates when the language or the strings
|
|
31
|
+
* change. The function itself never changes, so it can be kept anywhere.
|
|
32
|
+
*
|
|
33
|
+
* const t = useT();
|
|
34
|
+
* <span>{{ t('search.results', { params: { count } }) }}</span>
|
|
35
|
+
*/
|
|
36
|
+
export declare function useT(): (key: string, options?: TranslateOptions) => string;
|
package/dist/i18n.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { I18nToken, i18nState } from "@embedpdf/plugin-i18n";
|
|
2
|
+
export * from "@embedpdf/plugin-i18n";
|
|
3
|
+
import { a as useCapability, b as useCapabilityEvent, j as useSelector } from "./capabilities-C7YzgPCX.js";
|
|
4
|
+
import { s as settingsComposable, a as stateComposable } from "./state-DZg8q3v6.js";
|
|
5
|
+
function useI18n() {
|
|
6
|
+
return useCapability(I18nToken);
|
|
7
|
+
}
|
|
8
|
+
function useI18nEvent(select, handler) {
|
|
9
|
+
useCapabilityEvent(I18nToken, select, handler);
|
|
10
|
+
}
|
|
11
|
+
const useI18nState = stateComposable(i18nState);
|
|
12
|
+
const useI18nSettings = settingsComposable(I18nToken);
|
|
13
|
+
function useT() {
|
|
14
|
+
const translator = useSelector(I18nToken, (i18n) => i18n.getTranslator());
|
|
15
|
+
return (key, options) => translator.value(key, options);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
useI18n,
|
|
19
|
+
useI18nEvent,
|
|
20
|
+
useI18nSettings,
|
|
21
|
+
useI18nState,
|
|
22
|
+
useT
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=i18n.js.map
|
package/dist/i18n.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","sources":["../src/i18n.ts"],"sourcesContent":["/**\n * @embedpdf/vue/i18n: the Vue surface of `@embedpdf/plugin-i18n`. The plugin\n * belongs to the workspace and needs no engine, so these composables work from\n * the first frame, before a document opens: a loading screen and a password\n * prompt translate too.\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-i18n';\nimport { I18nToken, i18nState } from '@embedpdf/plugin-i18n';\nimport type { I18nCapability, TranslateOptions } from '@embedpdf/plugin-i18n';\nimport type { EventHook } from '@embedpdf/core';\nimport { useCapability, useCapabilityEvent, useSelector } from './runtime/capabilities';\nimport { settingsComposable, stateComposable } from './state';\n\n/** The i18n API: `t`, `setLocale`, `addTranslations`, `registerLocale`, the settings calls. The object never changes. */\nexport function useI18n(): I18nCapability {\n return useCapability(I18nToken);\n}\n\n/** Subscribe to one i18n event while the component lives: `useI18nEvent((i18n) => i18n.onLocaleChanged, handler)`. */\nexport function useI18nEvent<Event>(\n select: (i18n: I18nCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(I18nToken, select, handler);\n}\n\n/**\n * The current language, how it reads, every language you can switch to, and\n * the one loading, as refs (the translations page's State table, declared once\n * in `i18nState`). With a selector, one ref, which updates only when what it\n * picks changes.\n */\nexport const useI18nState = stateComposable(i18nState);\n\n/** The i18n settings (`locale`, `fallbackLocale`, `locales`, `loaders`) as refs. Takes a selector. */\nexport const useI18nSettings = settingsComposable(I18nToken);\n\n/**\n * A translate function that reads the language reactively: a template, a\n * computed or a `watch` that calls it updates when the language or the strings\n * change. The function itself never changes, so it can be kept anywhere.\n *\n * const t = useT();\n * <span>{{ t('search.results', { params: { count } }) }}</span>\n */\nexport function useT(): (key: string, options?: TranslateOptions) => string {\n // The plugin hands out a new translator when the language or the strings change;\n // reading the ref inside the call is what makes the caller depend on it.\n const translator = useSelector(I18nToken, (i18n) => i18n.getTranslator());\n return (key, options) => translator.value(key, options);\n}\n"],"names":[],"mappings":";;;;AAgBO,SAAS,UAA0B;AACxC,SAAO,cAAc,SAAS;AAChC;AAGO,SAAS,aACd,QACA,SACM;AACN,qBAAmB,WAAW,QAAQ,OAAO;AAC/C;AAQO,MAAM,eAAe,gBAAgB,SAAS;AAG9C,MAAM,kBAAkB,mBAAmB,SAAS;AAUpD,SAAS,OAA4D;AAG1E,QAAM,aAAa,YAAY,WAAW,CAAC,SAAS,KAAK,eAAe;AACxE,SAAO,CAAC,KAAK,YAAY,WAAW,MAAM,KAAK,OAAO;AACxD;"}
|