@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,743 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const coreUi = require("@embedpdf/core-ui");
|
|
4
|
+
const host = require("@embedpdf/plugin-commands/contract/host");
|
|
5
|
+
const contract = require("@embedpdf/plugin-commands/contract");
|
|
6
|
+
const web = require("@embedpdf/web");
|
|
7
|
+
const capabilities = require("./capabilities-DVNJmgy7.cjs");
|
|
8
|
+
const SURFACE = web.paintDefault("toolbar-surface");
|
|
9
|
+
const BORDER = web.paintDefault("toolbar-border");
|
|
10
|
+
const ACTIVE = web.paintDefault("toolbar-active");
|
|
11
|
+
const _hoisted_1$5 = ["role", "aria-checked", "disabled", "onClick"];
|
|
12
|
+
const _hoisted_2$2 = { key: 0 };
|
|
13
|
+
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
+
__name: "DefaultOverflowMenu",
|
|
15
|
+
props: {
|
|
16
|
+
view: {},
|
|
17
|
+
orientation: {}
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const menu = vue.ref(null);
|
|
22
|
+
vue.watch(
|
|
23
|
+
[menu, () => props.view.isOpen],
|
|
24
|
+
([element, isOpen], _previous, onCleanup) => {
|
|
25
|
+
if (!isOpen || !element) return;
|
|
26
|
+
const container = element.parentElement ?? element;
|
|
27
|
+
const trigger = web.focusablesIn(container).find((candidate) => !element.contains(candidate)) ?? null;
|
|
28
|
+
const close = () => props.view.close();
|
|
29
|
+
const stopOutside = web.observeOutsidePress(container, close);
|
|
30
|
+
const detachKeys = web.attachMenuKeys(element, { trigger, close });
|
|
31
|
+
onCleanup(() => {
|
|
32
|
+
stopOutside();
|
|
33
|
+
detachKeys();
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
{ immediate: true, flush: "post" }
|
|
37
|
+
);
|
|
38
|
+
const placement = vue.computed(
|
|
39
|
+
() => props.orientation === "vertical" ? { top: 0, insetInlineStart: "100%" } : { top: "100%", insetInlineEnd: 0 }
|
|
40
|
+
);
|
|
41
|
+
const sections = vue.computed(
|
|
42
|
+
() => props.view.sections.map((section) => ({
|
|
43
|
+
radio: section.role === "radio",
|
|
44
|
+
rows: section.rows.flatMap((row) => {
|
|
45
|
+
const command = props.view.resolve(row.command);
|
|
46
|
+
return command ? [{ row, command }] : [];
|
|
47
|
+
})
|
|
48
|
+
}))
|
|
49
|
+
);
|
|
50
|
+
function choose(row) {
|
|
51
|
+
props.view.execute(row.command);
|
|
52
|
+
if (row.type !== "submenu") props.view.close();
|
|
53
|
+
}
|
|
54
|
+
return (_ctx, _cache) => {
|
|
55
|
+
return __props.view.isOpen ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
56
|
+
key: 0,
|
|
57
|
+
ref_key: "menu",
|
|
58
|
+
ref: menu,
|
|
59
|
+
role: "menu",
|
|
60
|
+
style: vue.normalizeStyle({
|
|
61
|
+
position: "absolute",
|
|
62
|
+
...placement.value,
|
|
63
|
+
zIndex: 41,
|
|
64
|
+
minWidth: "200px",
|
|
65
|
+
padding: "4px",
|
|
66
|
+
background: vue.unref(SURFACE),
|
|
67
|
+
border: `1px solid ${vue.unref(BORDER)}`,
|
|
68
|
+
borderRadius: "6px",
|
|
69
|
+
boxShadow: "0 4px 16px rgba(0,0,0,0.15)"
|
|
70
|
+
})
|
|
71
|
+
}, [
|
|
72
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sections.value, (section, index) => {
|
|
73
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index }, [
|
|
74
|
+
index > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
75
|
+
key: 0,
|
|
76
|
+
style: vue.normalizeStyle({ height: "1px", background: vue.unref(BORDER), margin: "4px 0" })
|
|
77
|
+
}, null, 4)) : vue.createCommentVNode("", true),
|
|
78
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(section.rows, ({ row, command }) => {
|
|
79
|
+
return vue.openBlock(), vue.createElementBlock("button", {
|
|
80
|
+
key: row.command,
|
|
81
|
+
type: "button",
|
|
82
|
+
role: section.radio ? "menuitemradio" : "menuitem",
|
|
83
|
+
"aria-checked": section.radio ? command.active : void 0,
|
|
84
|
+
disabled: !command.enabled,
|
|
85
|
+
tabindex: "-1",
|
|
86
|
+
style: vue.normalizeStyle({
|
|
87
|
+
display: "flex",
|
|
88
|
+
width: "100%",
|
|
89
|
+
alignItems: "center",
|
|
90
|
+
justifyContent: "space-between",
|
|
91
|
+
gap: "16px",
|
|
92
|
+
padding: "6px 8px",
|
|
93
|
+
border: "none",
|
|
94
|
+
color: "inherit",
|
|
95
|
+
font: "inherit",
|
|
96
|
+
background: "transparent",
|
|
97
|
+
cursor: command.enabled ? "pointer" : "default",
|
|
98
|
+
opacity: command.enabled ? 1 : 0.4,
|
|
99
|
+
whiteSpace: "nowrap"
|
|
100
|
+
}),
|
|
101
|
+
onClick: ($event) => choose(row)
|
|
102
|
+
}, [
|
|
103
|
+
vue.createElementVNode("span", null, vue.toDisplayString(command.active && section.radio ? "• " : "") + vue.toDisplayString(command.label), 1),
|
|
104
|
+
row.type === "submenu" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$2, "▸")) : vue.createCommentVNode("", true)
|
|
105
|
+
], 12, _hoisted_1$5);
|
|
106
|
+
}), 128))
|
|
107
|
+
], 64);
|
|
108
|
+
}), 128))
|
|
109
|
+
], 4)) : vue.createCommentVNode("", true);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
const _hoisted_1$4 = ["aria-expanded"];
|
|
114
|
+
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
115
|
+
__name: "DefaultOverflowTrigger",
|
|
116
|
+
props: {
|
|
117
|
+
isOpen: { type: Boolean }
|
|
118
|
+
},
|
|
119
|
+
emits: ["toggle"],
|
|
120
|
+
setup(__props, { emit: __emit }) {
|
|
121
|
+
const emit = __emit;
|
|
122
|
+
return (_ctx, _cache) => {
|
|
123
|
+
return vue.openBlock(), vue.createElementBlock("button", {
|
|
124
|
+
type: "button",
|
|
125
|
+
"aria-haspopup": "menu",
|
|
126
|
+
"aria-expanded": __props.isOpen,
|
|
127
|
+
title: "More",
|
|
128
|
+
style: vue.normalizeStyle({
|
|
129
|
+
display: "inline-flex",
|
|
130
|
+
alignItems: "center",
|
|
131
|
+
padding: "4px 8px",
|
|
132
|
+
color: "inherit",
|
|
133
|
+
font: "inherit",
|
|
134
|
+
border: `1px solid ${vue.unref(BORDER)}`,
|
|
135
|
+
borderRadius: "4px",
|
|
136
|
+
background: __props.isOpen ? vue.unref(ACTIVE) : "transparent",
|
|
137
|
+
cursor: "pointer"
|
|
138
|
+
}),
|
|
139
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("toggle"))
|
|
140
|
+
}, " ⋯ ", 12, _hoisted_1$4);
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
145
|
+
__name: "Measured",
|
|
146
|
+
props: {
|
|
147
|
+
measureKey: {},
|
|
148
|
+
orientation: {}
|
|
149
|
+
},
|
|
150
|
+
emits: ["length"],
|
|
151
|
+
setup(__props, { emit: __emit }) {
|
|
152
|
+
const props = __props;
|
|
153
|
+
const emit = __emit;
|
|
154
|
+
const element = vue.ref(null);
|
|
155
|
+
vue.watch(
|
|
156
|
+
[element, () => props.measureKey, () => props.orientation],
|
|
157
|
+
([measured, key, orientation], _previous, onCleanup) => {
|
|
158
|
+
if (measured) {
|
|
159
|
+
onCleanup(web.observeLength(measured, orientation, (length) => emit("length", key, length)));
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{ immediate: true, flush: "post" }
|
|
163
|
+
);
|
|
164
|
+
return (_ctx, _cache) => {
|
|
165
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
166
|
+
ref_key: "element",
|
|
167
|
+
ref: element,
|
|
168
|
+
style: { display: "inline-flex", flexShrink: 0 }
|
|
169
|
+
}, [
|
|
170
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
171
|
+
], 512);
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
const _hoisted_1$3 = ["value"];
|
|
176
|
+
const _hoisted_2$1 = ["value", "disabled"];
|
|
177
|
+
const _hoisted_3 = {
|
|
178
|
+
key: 1,
|
|
179
|
+
style: { position: "relative", display: "inline-flex" }
|
|
180
|
+
};
|
|
181
|
+
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
182
|
+
__name: "DefaultCollapsed",
|
|
183
|
+
props: {
|
|
184
|
+
view: {},
|
|
185
|
+
orientation: {}
|
|
186
|
+
},
|
|
187
|
+
setup(__props) {
|
|
188
|
+
const props = __props;
|
|
189
|
+
const active = vue.computed(() => {
|
|
190
|
+
var _a;
|
|
191
|
+
return ((_a = props.view.commands.find((command) => command.active)) == null ? void 0 : _a.id) ?? "";
|
|
192
|
+
});
|
|
193
|
+
const isOpen = vue.ref(false);
|
|
194
|
+
const menu = vue.computed(() => coreUi.groupMenuView(props.view, isOpen.value, () => isOpen.value = false));
|
|
195
|
+
function onChange(event) {
|
|
196
|
+
props.view.execute(event.target.value);
|
|
197
|
+
}
|
|
198
|
+
return (_ctx, _cache) => {
|
|
199
|
+
return __props.view.collapse === "select" ? (vue.openBlock(), vue.createElementBlock("select", {
|
|
200
|
+
key: 0,
|
|
201
|
+
value: active.value,
|
|
202
|
+
style: vue.normalizeStyle({
|
|
203
|
+
padding: "4px 6px",
|
|
204
|
+
font: "inherit",
|
|
205
|
+
borderRadius: "4px",
|
|
206
|
+
border: `1px solid ${vue.unref(BORDER)}`,
|
|
207
|
+
background: vue.unref(SURFACE)
|
|
208
|
+
}),
|
|
209
|
+
onChange
|
|
210
|
+
}, [
|
|
211
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.view.commands, (command) => {
|
|
212
|
+
return vue.openBlock(), vue.createElementBlock("option", {
|
|
213
|
+
key: command.id,
|
|
214
|
+
value: command.id,
|
|
215
|
+
disabled: !command.enabled
|
|
216
|
+
}, vue.toDisplayString(command.label), 9, _hoisted_2$1);
|
|
217
|
+
}), 128))
|
|
218
|
+
], 44, _hoisted_1$3)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, [
|
|
219
|
+
vue.createVNode(_sfc_main$7, {
|
|
220
|
+
"is-open": isOpen.value,
|
|
221
|
+
onToggle: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
|
|
222
|
+
}, null, 8, ["is-open"]),
|
|
223
|
+
vue.createVNode(_sfc_main$8, {
|
|
224
|
+
view: menu.value,
|
|
225
|
+
orientation: __props.orientation
|
|
226
|
+
}, null, 8, ["view", "orientation"])
|
|
227
|
+
]));
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
const _hoisted_1$2 = ["disabled", "aria-pressed", "aria-haspopup", "title"];
|
|
232
|
+
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
233
|
+
__name: "DefaultCommand",
|
|
234
|
+
props: {
|
|
235
|
+
command: {},
|
|
236
|
+
run: { type: Function }
|
|
237
|
+
},
|
|
238
|
+
setup(__props) {
|
|
239
|
+
return (_ctx, _cache) => {
|
|
240
|
+
return vue.openBlock(), vue.createElementBlock("button", {
|
|
241
|
+
type: "button",
|
|
242
|
+
disabled: !__props.command.enabled,
|
|
243
|
+
"aria-pressed": __props.command.active || void 0,
|
|
244
|
+
"aria-haspopup": __props.command.menu ? "menu" : void 0,
|
|
245
|
+
title: __props.command.label,
|
|
246
|
+
style: vue.normalizeStyle({
|
|
247
|
+
display: "inline-flex",
|
|
248
|
+
alignItems: "center",
|
|
249
|
+
gap: "4px",
|
|
250
|
+
padding: "4px 8px",
|
|
251
|
+
whiteSpace: "nowrap",
|
|
252
|
+
color: "inherit",
|
|
253
|
+
font: "inherit",
|
|
254
|
+
background: __props.command.active ? vue.unref(ACTIVE) : "transparent",
|
|
255
|
+
border: `1px solid ${vue.unref(BORDER)}`,
|
|
256
|
+
borderRadius: "4px",
|
|
257
|
+
cursor: __props.command.enabled ? "pointer" : "default",
|
|
258
|
+
opacity: __props.command.enabled ? 1 : 0.4
|
|
259
|
+
}),
|
|
260
|
+
onClick: _cache[0] || (_cache[0] = ($event) => __props.run())
|
|
261
|
+
}, vue.toDisplayString(__props.command.label), 13, _hoisted_1$2);
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
const _hoisted_1$1 = { style: { position: "relative", display: "inline-flex" } };
|
|
266
|
+
const _hoisted_2 = ["aria-expanded"];
|
|
267
|
+
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
268
|
+
__name: "DefaultGroupTrigger",
|
|
269
|
+
props: {
|
|
270
|
+
view: {},
|
|
271
|
+
orientation: {}
|
|
272
|
+
},
|
|
273
|
+
setup(__props) {
|
|
274
|
+
const props = __props;
|
|
275
|
+
const isOpen = vue.ref(false);
|
|
276
|
+
const someActive = vue.computed(() => props.view.commands.some((command) => command.active));
|
|
277
|
+
const menu = vue.computed(() => coreUi.groupMenuView(props.view, isOpen.value, () => isOpen.value = false));
|
|
278
|
+
return (_ctx, _cache) => {
|
|
279
|
+
return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$1, [
|
|
280
|
+
vue.createElementVNode("button", {
|
|
281
|
+
type: "button",
|
|
282
|
+
"aria-haspopup": "menu",
|
|
283
|
+
"aria-expanded": isOpen.value,
|
|
284
|
+
title: "More",
|
|
285
|
+
style: vue.normalizeStyle({
|
|
286
|
+
display: "inline-flex",
|
|
287
|
+
alignItems: "center",
|
|
288
|
+
padding: "4px 6px",
|
|
289
|
+
color: "inherit",
|
|
290
|
+
font: "inherit",
|
|
291
|
+
border: `1px solid ${vue.unref(BORDER)}`,
|
|
292
|
+
borderRadius: "4px",
|
|
293
|
+
background: isOpen.value || someActive.value ? vue.unref(ACTIVE) : "transparent",
|
|
294
|
+
cursor: "pointer"
|
|
295
|
+
}),
|
|
296
|
+
onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
|
|
297
|
+
}, " ▾ ", 12, _hoisted_2),
|
|
298
|
+
vue.createVNode(_sfc_main$8, {
|
|
299
|
+
view: menu.value,
|
|
300
|
+
orientation: __props.orientation
|
|
301
|
+
}, null, 8, ["view", "orientation"])
|
|
302
|
+
]);
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
307
|
+
__name: "NativeSlotSocket",
|
|
308
|
+
props: {
|
|
309
|
+
name: {},
|
|
310
|
+
measureKey: {},
|
|
311
|
+
orientation: {}
|
|
312
|
+
},
|
|
313
|
+
emits: ["length"],
|
|
314
|
+
setup(__props, { emit: __emit }) {
|
|
315
|
+
const props = __props;
|
|
316
|
+
const emit = __emit;
|
|
317
|
+
const socket = vue.ref(null);
|
|
318
|
+
vue.watch(
|
|
319
|
+
[socket, () => props.measureKey, () => props.orientation],
|
|
320
|
+
([element, key, orientation], _previous, onCleanup) => {
|
|
321
|
+
if (element) {
|
|
322
|
+
onCleanup(web.observeLength(element, orientation, (length) => emit("length", key, length)));
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{ immediate: true, flush: "post" }
|
|
326
|
+
);
|
|
327
|
+
return (_ctx, _cache) => {
|
|
328
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent("slot"), {
|
|
329
|
+
ref_key: "socket",
|
|
330
|
+
ref: socket,
|
|
331
|
+
name: __props.name,
|
|
332
|
+
style: { display: "inline-flex", alignItems: "center", flexShrink: 0 }
|
|
333
|
+
}, {
|
|
334
|
+
default: vue.withCtx(() => [
|
|
335
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
336
|
+
]),
|
|
337
|
+
_: 3
|
|
338
|
+
}, 8, ["name"]);
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
343
|
+
__name: "ToolbarPart",
|
|
344
|
+
props: {
|
|
345
|
+
part: {},
|
|
346
|
+
layer: {},
|
|
347
|
+
orientation: {}
|
|
348
|
+
},
|
|
349
|
+
emits: ["length"],
|
|
350
|
+
setup(__props, { emit: __emit }) {
|
|
351
|
+
const props = __props;
|
|
352
|
+
const emit = __emit;
|
|
353
|
+
const measure = (length) => {
|
|
354
|
+
if (props.part.kind === "custom") emit("length", props.part.measureKey, length);
|
|
355
|
+
};
|
|
356
|
+
return (_ctx, _cache) => {
|
|
357
|
+
return __props.part.kind === "command" ? vue.renderSlot(_ctx.$slots, "command", {
|
|
358
|
+
command: __props.part.command,
|
|
359
|
+
variant: __props.part.variant,
|
|
360
|
+
run: __props.part.run
|
|
361
|
+
}, () => [
|
|
362
|
+
vue.createVNode(_sfc_main$4, {
|
|
363
|
+
command: __props.part.command,
|
|
364
|
+
run: __props.part.run
|
|
365
|
+
}, null, 8, ["command", "run"])
|
|
366
|
+
], void 0, 0) : __props.part.kind === "custom" && _ctx.$slots.custom ? vue.renderSlot(_ctx.$slots, "custom", vue.normalizeProps(vue.guardReactiveProps({ name: __props.part.name, variant: __props.part.variant, layer: __props.layer, measure })), () => [
|
|
367
|
+
__props.part.terminal ? vue.renderSlot(_ctx.$slots, "command", {
|
|
368
|
+
command: __props.part.terminal,
|
|
369
|
+
variant: "icon",
|
|
370
|
+
run: __props.part.runTerminal
|
|
371
|
+
}, () => [
|
|
372
|
+
vue.createVNode(_sfc_main$4, {
|
|
373
|
+
command: __props.part.terminal,
|
|
374
|
+
run: __props.part.runTerminal
|
|
375
|
+
}, null, 8, ["command", "run"])
|
|
376
|
+
], void 0, 0) : vue.createCommentVNode("", true)
|
|
377
|
+
], void 0, 1) : __props.part.kind === "custom" ? (vue.openBlock(), vue.createBlock(_sfc_main$2, {
|
|
378
|
+
key: 2,
|
|
379
|
+
name: __props.part.name,
|
|
380
|
+
"measure-key": __props.part.measureKey,
|
|
381
|
+
orientation: __props.orientation,
|
|
382
|
+
onLength: _cache[0] || (_cache[0] = (key, length) => emit("length", key, length))
|
|
383
|
+
}, {
|
|
384
|
+
default: vue.withCtx(() => [
|
|
385
|
+
__props.part.terminal ? vue.renderSlot(_ctx.$slots, "command", {
|
|
386
|
+
command: __props.part.terminal,
|
|
387
|
+
variant: "icon",
|
|
388
|
+
run: __props.part.runTerminal
|
|
389
|
+
}, () => [
|
|
390
|
+
vue.createVNode(_sfc_main$4, {
|
|
391
|
+
command: __props.part.terminal,
|
|
392
|
+
run: __props.part.runTerminal
|
|
393
|
+
}, null, 8, ["command", "run"])
|
|
394
|
+
], void 0, 0) : vue.createCommentVNode("", true)
|
|
395
|
+
]),
|
|
396
|
+
_: 3
|
|
397
|
+
}, 8, ["name", "measure-key", "orientation"])) : __props.part.kind === "collapsed" ? vue.renderSlot(_ctx.$slots, "collapsed", {
|
|
398
|
+
view: __props.part.view
|
|
399
|
+
}, () => [
|
|
400
|
+
vue.createVNode(_sfc_main$5, {
|
|
401
|
+
view: __props.part.view,
|
|
402
|
+
orientation: __props.orientation
|
|
403
|
+
}, null, 8, ["view", "orientation"])
|
|
404
|
+
], void 0, 3) : vue.renderSlot(_ctx.$slots, "group-trigger", {
|
|
405
|
+
view: __props.part.view
|
|
406
|
+
}, () => [
|
|
407
|
+
vue.createVNode(_sfc_main$3, {
|
|
408
|
+
view: __props.part.view,
|
|
409
|
+
orientation: __props.orientation
|
|
410
|
+
}, null, 8, ["view", "orientation"])
|
|
411
|
+
], void 0, 4);
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
const _hoisted_1 = ["aria-orientation", "aria-label"];
|
|
416
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
417
|
+
__name: "Toolbar",
|
|
418
|
+
props: {
|
|
419
|
+
bar: {},
|
|
420
|
+
orientation: { default: "horizontal" },
|
|
421
|
+
gap: { default: 8 },
|
|
422
|
+
separatorWidth: { default: 1 },
|
|
423
|
+
"aria-label": {}
|
|
424
|
+
},
|
|
425
|
+
setup(__props) {
|
|
426
|
+
const props = __props;
|
|
427
|
+
const slots = vue.useSlots();
|
|
428
|
+
const { track } = capabilities.useViewerBinding();
|
|
429
|
+
const commands = capabilities.useCapability(host.CommandsToken);
|
|
430
|
+
const documentId = capabilities.useDocumentId();
|
|
431
|
+
const vertical = vue.computed(() => props.orientation === "vertical");
|
|
432
|
+
const ariaLabel = vue.computed(
|
|
433
|
+
() => props.ariaLabel
|
|
434
|
+
);
|
|
435
|
+
const container = vue.ref(null);
|
|
436
|
+
const containerLength = vue.ref(0);
|
|
437
|
+
vue.watch(
|
|
438
|
+
[container, () => props.orientation],
|
|
439
|
+
([element, orientation], _previous, onCleanup) => {
|
|
440
|
+
if (element) {
|
|
441
|
+
onCleanup(
|
|
442
|
+
web.observeContentLength(element, orientation, (length) => containerLength.value = length)
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
{ immediate: true, flush: "post" }
|
|
447
|
+
);
|
|
448
|
+
const lengths = web.createToolbarLengths();
|
|
449
|
+
const measured = vue.ref(0);
|
|
450
|
+
function onLength(key, length) {
|
|
451
|
+
if (lengths.report(props.orientation, key, length)) measured.value += 1;
|
|
452
|
+
}
|
|
453
|
+
let roving = null;
|
|
454
|
+
vue.watch(
|
|
455
|
+
[container, () => props.orientation],
|
|
456
|
+
([element, orientation], _previous, onCleanup) => {
|
|
457
|
+
if (!element) return;
|
|
458
|
+
const focus = web.attachToolbarFocus(element, orientation);
|
|
459
|
+
roving = focus;
|
|
460
|
+
onCleanup(() => {
|
|
461
|
+
focus.detach();
|
|
462
|
+
roving = null;
|
|
463
|
+
});
|
|
464
|
+
},
|
|
465
|
+
{ immediate: true, flush: "post" }
|
|
466
|
+
);
|
|
467
|
+
vue.onUpdated(() => roving == null ? void 0 : roving.refresh());
|
|
468
|
+
const normalized = vue.computed(() => coreUi.normalizeBar(props.bar));
|
|
469
|
+
const resolve = (id) => commands.resolveCommand(id, documentId.value ?? void 0);
|
|
470
|
+
const execute = (id) => void commands.execute(id, { documentId: documentId.value ?? void 0 });
|
|
471
|
+
const layout = vue.computed(() => {
|
|
472
|
+
track();
|
|
473
|
+
void measured.value;
|
|
474
|
+
return coreUi.layoutToolbar({
|
|
475
|
+
bar: normalized.value,
|
|
476
|
+
resolve,
|
|
477
|
+
unregistered: contract.unregisteredCommand,
|
|
478
|
+
execute,
|
|
479
|
+
menuTarget: (id) => commands.getMenuTarget(id),
|
|
480
|
+
metrics: lengths.metrics(props.orientation, props.gap, props.separatorWidth),
|
|
481
|
+
measureKey: web.toolbarMeasureKey,
|
|
482
|
+
containerLength: containerLength.value,
|
|
483
|
+
orientation: props.orientation
|
|
484
|
+
});
|
|
485
|
+
});
|
|
486
|
+
const overflowOpen = vue.ref(false);
|
|
487
|
+
const toggleOverflow = () => overflowOpen.value = !overflowOpen.value;
|
|
488
|
+
const noop = () => {
|
|
489
|
+
};
|
|
490
|
+
vue.watch(
|
|
491
|
+
() => layout.value.hasOverflow,
|
|
492
|
+
(hasOverflow) => {
|
|
493
|
+
if (!hasOverflow) overflowOpen.value = false;
|
|
494
|
+
}
|
|
495
|
+
);
|
|
496
|
+
const overflowView = vue.computed(
|
|
497
|
+
() => ({
|
|
498
|
+
sections: layout.value.overflow,
|
|
499
|
+
isOpen: overflowOpen.value,
|
|
500
|
+
close: () => overflowOpen.value = false,
|
|
501
|
+
resolve,
|
|
502
|
+
execute
|
|
503
|
+
})
|
|
504
|
+
);
|
|
505
|
+
const sectionStyle = (name) => ({
|
|
506
|
+
display: "flex",
|
|
507
|
+
flexDirection: vertical.value ? "column" : "row",
|
|
508
|
+
alignItems: "center",
|
|
509
|
+
gap: `${props.gap}px`,
|
|
510
|
+
flex: "0 0 auto",
|
|
511
|
+
...name !== "center" ? null : vertical.value ? { marginTop: "auto", marginBottom: "auto" } : { marginLeft: "auto", marginRight: "auto" }
|
|
512
|
+
});
|
|
513
|
+
const separatorStyle = vue.computed(() => ({
|
|
514
|
+
...vertical.value ? { height: "1px" } : { width: "1px" },
|
|
515
|
+
alignSelf: "stretch",
|
|
516
|
+
background: "currentColor",
|
|
517
|
+
opacity: 0.2
|
|
518
|
+
}));
|
|
519
|
+
const TOOLBAR_ITEM = { [web.TOOLBAR_ITEM_ATTRIBUTE]: "" };
|
|
520
|
+
const ITEM_STYLE = { display: "contents" };
|
|
521
|
+
function draws(content) {
|
|
522
|
+
return (Array.isArray(content) ? content : [content]).some((node) => {
|
|
523
|
+
if (node === null || node === void 0 || typeof node === "boolean") return false;
|
|
524
|
+
if (!vue.isVNode(node)) return true;
|
|
525
|
+
if (node.type === vue.Comment) return false;
|
|
526
|
+
if (node.type === vue.Fragment) return draws(node.children);
|
|
527
|
+
return true;
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
function measuredHere(part) {
|
|
531
|
+
if (part.kind !== "custom") return true;
|
|
532
|
+
const custom = slots.custom;
|
|
533
|
+
if (!custom) return false;
|
|
534
|
+
const scope = { name: part.name, variant: part.variant, measure: noop };
|
|
535
|
+
return draws(custom({ ...scope, layer: "measure" })) || !draws(custom({ ...scope, layer: "live" }));
|
|
536
|
+
}
|
|
537
|
+
const measureLayerStyle = vue.computed(() => ({
|
|
538
|
+
position: "absolute",
|
|
539
|
+
left: 0,
|
|
540
|
+
top: 0,
|
|
541
|
+
height: 0,
|
|
542
|
+
overflow: "hidden",
|
|
543
|
+
visibility: "hidden",
|
|
544
|
+
pointerEvents: "none",
|
|
545
|
+
display: "flex",
|
|
546
|
+
whiteSpace: "nowrap",
|
|
547
|
+
...vertical.value ? { flexDirection: "column", alignItems: "flex-start" } : null
|
|
548
|
+
}));
|
|
549
|
+
return (_ctx, _cache) => {
|
|
550
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
551
|
+
ref_key: "container",
|
|
552
|
+
ref: container,
|
|
553
|
+
role: "toolbar",
|
|
554
|
+
"aria-orientation": __props.orientation,
|
|
555
|
+
"aria-label": ariaLabel.value,
|
|
556
|
+
style: vue.normalizeStyle({
|
|
557
|
+
position: "relative",
|
|
558
|
+
display: "flex",
|
|
559
|
+
flexDirection: vertical.value ? "column" : "row",
|
|
560
|
+
alignItems: "center"
|
|
561
|
+
})
|
|
562
|
+
}, [
|
|
563
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(layout.value.sections, (section) => {
|
|
564
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
565
|
+
key: section.name,
|
|
566
|
+
style: vue.normalizeStyle(sectionStyle(section.name))
|
|
567
|
+
}, [
|
|
568
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(section.groups, (group, index) => {
|
|
569
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
570
|
+
key: group.id
|
|
571
|
+
}, [
|
|
572
|
+
index > 0 ? vue.renderSlot(_ctx.$slots, "separator", {}, () => [
|
|
573
|
+
vue.createElementVNode("span", {
|
|
574
|
+
style: vue.normalizeStyle(separatorStyle.value)
|
|
575
|
+
}, null, 4)
|
|
576
|
+
], void 0, 0) : vue.createCommentVNode("", true),
|
|
577
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group.parts, (part) => {
|
|
578
|
+
return vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
579
|
+
key: part.key
|
|
580
|
+
}, { ref_for: true }, TOOLBAR_ITEM, { style: ITEM_STYLE }), [
|
|
581
|
+
vue.createVNode(_sfc_main$1, {
|
|
582
|
+
part,
|
|
583
|
+
layer: "live",
|
|
584
|
+
orientation: __props.orientation,
|
|
585
|
+
onLength
|
|
586
|
+
}, vue.createSlots({ _: 2 }, [
|
|
587
|
+
_ctx.$slots.command ? {
|
|
588
|
+
name: "command",
|
|
589
|
+
fn: vue.withCtx((scope) => [
|
|
590
|
+
vue.renderSlot(_ctx.$slots, "command", vue.mergeProps({ ref_for: true }, scope))
|
|
591
|
+
]),
|
|
592
|
+
key: "0"
|
|
593
|
+
} : void 0,
|
|
594
|
+
_ctx.$slots.custom ? {
|
|
595
|
+
name: "custom",
|
|
596
|
+
fn: vue.withCtx((scope) => [
|
|
597
|
+
vue.renderSlot(_ctx.$slots, "custom", vue.mergeProps({ ref_for: true }, scope))
|
|
598
|
+
]),
|
|
599
|
+
key: "1"
|
|
600
|
+
} : void 0,
|
|
601
|
+
_ctx.$slots.collapsed ? {
|
|
602
|
+
name: "collapsed",
|
|
603
|
+
fn: vue.withCtx((scope) => [
|
|
604
|
+
vue.renderSlot(_ctx.$slots, "collapsed", vue.mergeProps({ ref_for: true }, scope))
|
|
605
|
+
]),
|
|
606
|
+
key: "2"
|
|
607
|
+
} : void 0,
|
|
608
|
+
_ctx.$slots["group-trigger"] ? {
|
|
609
|
+
name: "group-trigger",
|
|
610
|
+
fn: vue.withCtx((scope) => [
|
|
611
|
+
vue.renderSlot(_ctx.$slots, "group-trigger", vue.mergeProps({ ref_for: true }, scope))
|
|
612
|
+
]),
|
|
613
|
+
key: "3"
|
|
614
|
+
} : void 0
|
|
615
|
+
]), 1032, ["part", "orientation"])
|
|
616
|
+
], 16);
|
|
617
|
+
}), 128))
|
|
618
|
+
], 64);
|
|
619
|
+
}), 128)),
|
|
620
|
+
section.name === "end" && layout.value.hasOverflow ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
621
|
+
key: 0,
|
|
622
|
+
ref_for: true
|
|
623
|
+
}, TOOLBAR_ITEM, { style: { position: "relative", display: "inline-flex" } }), [
|
|
624
|
+
vue.renderSlot(_ctx.$slots, "overflow-trigger", {
|
|
625
|
+
isOpen: overflowOpen.value,
|
|
626
|
+
toggle: toggleOverflow
|
|
627
|
+
}, () => [
|
|
628
|
+
vue.createVNode(_sfc_main$7, {
|
|
629
|
+
"is-open": overflowOpen.value,
|
|
630
|
+
onToggle: toggleOverflow
|
|
631
|
+
}, null, 8, ["is-open"])
|
|
632
|
+
]),
|
|
633
|
+
vue.renderSlot(_ctx.$slots, "overflow-menu", { view: overflowView.value }, () => [
|
|
634
|
+
vue.createVNode(_sfc_main$8, {
|
|
635
|
+
view: overflowView.value,
|
|
636
|
+
orientation: __props.orientation
|
|
637
|
+
}, null, 8, ["view", "orientation"])
|
|
638
|
+
])
|
|
639
|
+
], 16)) : vue.createCommentVNode("", true)
|
|
640
|
+
], 4);
|
|
641
|
+
}), 128)),
|
|
642
|
+
vue.createElementVNode("div", {
|
|
643
|
+
"aria-hidden": "true",
|
|
644
|
+
inert: "",
|
|
645
|
+
style: vue.normalizeStyle(measureLayerStyle.value)
|
|
646
|
+
}, [
|
|
647
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(layout.value.measured, (part) => {
|
|
648
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
649
|
+
key: part.measureKey
|
|
650
|
+
}, [
|
|
651
|
+
measuredHere(part) ? (vue.openBlock(), vue.createBlock(_sfc_main$6, {
|
|
652
|
+
key: 0,
|
|
653
|
+
"measure-key": part.measureKey,
|
|
654
|
+
orientation: __props.orientation,
|
|
655
|
+
onLength
|
|
656
|
+
}, {
|
|
657
|
+
default: vue.withCtx(() => [
|
|
658
|
+
vue.createVNode(_sfc_main$1, {
|
|
659
|
+
part,
|
|
660
|
+
layer: "measure",
|
|
661
|
+
orientation: __props.orientation,
|
|
662
|
+
onLength
|
|
663
|
+
}, vue.createSlots({ _: 2 }, [
|
|
664
|
+
_ctx.$slots.command ? {
|
|
665
|
+
name: "command",
|
|
666
|
+
fn: vue.withCtx((scope) => [
|
|
667
|
+
vue.renderSlot(_ctx.$slots, "command", vue.mergeProps({ ref_for: true }, scope))
|
|
668
|
+
]),
|
|
669
|
+
key: "0"
|
|
670
|
+
} : void 0,
|
|
671
|
+
_ctx.$slots.custom ? {
|
|
672
|
+
name: "custom",
|
|
673
|
+
fn: vue.withCtx((scope) => [
|
|
674
|
+
vue.renderSlot(_ctx.$slots, "custom", vue.mergeProps({ ref_for: true }, scope))
|
|
675
|
+
]),
|
|
676
|
+
key: "1"
|
|
677
|
+
} : void 0,
|
|
678
|
+
_ctx.$slots.collapsed ? {
|
|
679
|
+
name: "collapsed",
|
|
680
|
+
fn: vue.withCtx((scope) => [
|
|
681
|
+
vue.renderSlot(_ctx.$slots, "collapsed", vue.mergeProps({ ref_for: true }, scope))
|
|
682
|
+
]),
|
|
683
|
+
key: "2"
|
|
684
|
+
} : void 0,
|
|
685
|
+
_ctx.$slots["group-trigger"] ? {
|
|
686
|
+
name: "group-trigger",
|
|
687
|
+
fn: vue.withCtx((scope) => [
|
|
688
|
+
vue.renderSlot(_ctx.$slots, "group-trigger", vue.mergeProps({ ref_for: true }, scope))
|
|
689
|
+
]),
|
|
690
|
+
key: "3"
|
|
691
|
+
} : void 0
|
|
692
|
+
]), 1032, ["part", "orientation"])
|
|
693
|
+
]),
|
|
694
|
+
_: 2
|
|
695
|
+
}, 1032, ["measure-key", "orientation"])) : vue.createCommentVNode("", true)
|
|
696
|
+
], 64);
|
|
697
|
+
}), 128)),
|
|
698
|
+
vue.createVNode(_sfc_main$6, {
|
|
699
|
+
"measure-key": vue.unref(web.toolbarMeasureKey).overflowTrigger,
|
|
700
|
+
orientation: __props.orientation,
|
|
701
|
+
onLength
|
|
702
|
+
}, {
|
|
703
|
+
default: vue.withCtx(() => [
|
|
704
|
+
vue.renderSlot(_ctx.$slots, "overflow-trigger", {
|
|
705
|
+
isOpen: false,
|
|
706
|
+
toggle: noop
|
|
707
|
+
}, () => [
|
|
708
|
+
vue.createVNode(_sfc_main$7, { "is-open": false })
|
|
709
|
+
])
|
|
710
|
+
]),
|
|
711
|
+
_: 3
|
|
712
|
+
}, 8, ["measure-key", "orientation"])
|
|
713
|
+
], 4)
|
|
714
|
+
], 12, _hoisted_1);
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
const sameGroups = (left, right) => coreUi.sameStripGroups(left, right, contract.resolvedCommandsEqual);
|
|
719
|
+
const NO_GROUPS = Object.freeze([]);
|
|
720
|
+
function useStripView(bar) {
|
|
721
|
+
const commands = capabilities.useCapability(host.CommandsToken);
|
|
722
|
+
const documentId = capabilities.useDocumentId();
|
|
723
|
+
const normalized = vue.computed(() => {
|
|
724
|
+
const schema = vue.toValue(bar);
|
|
725
|
+
return schema ? coreUi.normalizeBar(schema) : null;
|
|
726
|
+
});
|
|
727
|
+
const groups = capabilities.useKernelValue(
|
|
728
|
+
() => normalized.value ? coreUi.stripGroupsOf(
|
|
729
|
+
normalized.value,
|
|
730
|
+
(id) => commands.resolveCommand(id, documentId.value ?? void 0)
|
|
731
|
+
) : NO_GROUPS,
|
|
732
|
+
sameGroups
|
|
733
|
+
);
|
|
734
|
+
return vue.computed(
|
|
735
|
+
() => groups.value.length === 0 ? null : {
|
|
736
|
+
groups: groups.value,
|
|
737
|
+
execute: (id) => void commands.execute(id, { documentId: documentId.value ?? void 0 })
|
|
738
|
+
}
|
|
739
|
+
);
|
|
740
|
+
}
|
|
741
|
+
exports._sfc_main = _sfc_main;
|
|
742
|
+
exports.useStripView = useStripView;
|
|
743
|
+
//# sourceMappingURL=strip-BSDB39Xh.cjs.map
|