@m3ui-vue/m3ui-vue 1.5.0 → 1.6.0
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/dist/API.md +43 -32
- package/dist/{MButton-D_uxtJa-.js → MButton-CPghlKb0.js} +8 -9
- package/dist/MButton-CPghlKb0.js.map +1 -0
- package/dist/{MDialog-DT4KAPmn.js → MDialog-X50At1Gk.js} +38 -44
- package/dist/MDialog-X50At1Gk.js.map +1 -0
- package/dist/{MIcon-Bxh9j135.js → MIcon-DpajuUTJ.js} +2 -3
- package/dist/MIcon-DpajuUTJ.js.map +1 -0
- package/dist/{MIconButton-DoNotQ9v.js → MIconButton-BBggVwBV.js} +5 -6
- package/dist/MIconButton-BBggVwBV.js.map +1 -0
- package/dist/{MListItem-CwYrxpPZ.js → MListItem-DVi1j1QI.js} +8 -14
- package/dist/MListItem-DVi1j1QI.js.map +1 -0
- package/dist/{MLoadingIndicator-DhzECYRI.js → MLoadingIndicator-vooA3110.js} +3 -4
- package/dist/MLoadingIndicator-vooA3110.js.map +1 -0
- package/dist/{MMenuItem-Bih0h4-n.js → MMenuItem-CRNZkVVr.js} +13 -25
- package/dist/MMenuItem-CRNZkVVr.js.map +1 -0
- package/dist/{MProgressBar-BCoruxA-.js → MProgressBar-BWly1UKN.js} +3 -8
- package/dist/MProgressBar-BWly1UKN.js.map +1 -0
- package/dist/{MSeekBar-DQPF5FTp.js → MSeekBar-BL2W5_rD.js} +4 -5
- package/dist/MSeekBar-BL2W5_rD.js.map +1 -0
- package/dist/{MSegmentedButton-DL9JtJFX.js → MSegmentedButton-BEB4gXLA.js} +3 -4
- package/dist/MSegmentedButton-BEB4gXLA.js.map +1 -0
- package/dist/{MSlider-BvoMZTy9.js → MSlider-B9NcKTmZ.js} +22 -23
- package/dist/MSlider-B9NcKTmZ.js.map +1 -0
- package/dist/{MSpinner-CgcCQhS9.js → MSpinner-_XpTRkAg.js} +3 -4
- package/dist/MSpinner-_XpTRkAg.js.map +1 -0
- package/dist/{MTextField-B72dwF6V.js → MTextField-DpcPmR5B.js} +119 -89
- package/dist/MTextField-DpcPmR5B.js.map +1 -0
- package/dist/{MTooltip-YyF1CO75.js → MTooltip-BL3jPYPT.js} +10 -12
- package/dist/MTooltip-BL3jPYPT.js.map +1 -0
- package/dist/THIRD_PARTY_LICENSES.md +2 -2
- package/dist/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
- package/dist/{_storageKeys-CYXsUBwK.js → _storageKeys-C4W_4xK4.js} +2 -3
- package/dist/_storageKeys-C4W_4xK4.js.map +1 -0
- package/dist/{_useEscapeStack-CjndQhqg.js → _useEscapeStack-C5-BYr8y.js} +2 -3
- package/dist/_useEscapeStack-C5-BYr8y.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/barcode.js +1 -2
- package/dist/barcode.js.map +1 -1
- package/dist/chart.js +2 -4
- package/dist/chart.js.map +1 -1
- package/dist/code-editor.js +22 -23
- package/dist/code-editor.js.map +1 -1
- package/dist/{common-0dgrgaPL.js → common-kIb6A2Qu.js} +8 -37
- package/dist/common-kIb6A2Qu.js.map +1 -0
- package/dist/components/MAbsolute.vue.d.ts +5 -3
- package/dist/components/MAlert.vue.d.ts +8 -6
- package/dist/components/MAppBar.vue.d.ts +9 -7
- package/dist/components/MAppBarWithSearch.vue.d.ts +15 -13
- package/dist/components/MAppLayout.vue.d.ts +13 -11
- package/dist/components/MAspectRatio.vue.d.ts +5 -3
- package/dist/components/MAudioPlayer.vue.d.ts +22 -20
- package/dist/components/MAutocomplete.vue.d.ts +1 -1
- package/dist/components/MAvailabilityCalendar.vue.d.ts +19 -17
- package/dist/components/MBadge.vue.d.ts +6 -4
- package/dist/components/MBar.vue.d.ts +14 -12
- package/dist/components/MBarcode.vue.d.ts +5 -3
- package/dist/components/MBeforeAfter.vue.d.ts +12 -10
- package/dist/components/MBodyMap.vue.d.ts +1 -1
- package/dist/components/MBottomAppBar.vue.d.ts +10 -8
- package/dist/components/MBottomSheet.vue.d.ts +8 -6
- package/dist/components/MBottomSheetScaffold.vue.d.ts +9 -7
- package/dist/components/MBox.vue.d.ts +6 -4
- package/dist/components/MButton.vue.d.ts +7 -5
- package/dist/components/MCard.vue.d.ts +12 -10
- package/dist/components/MCenter.vue.d.ts +5 -3
- package/dist/components/MChatBubble.vue.d.ts +6 -4
- package/dist/components/MCheckbox.vue.d.ts +5 -3
- package/dist/components/MChip.vue.d.ts +9 -7
- package/dist/components/MCircleProgressBar.vue.d.ts +6 -4
- package/dist/components/MCodeEditor.vue.d.ts +5 -3
- package/dist/components/MContainer.vue.d.ts +6 -4
- package/dist/components/MContextMenu.vue.d.ts +8 -6
- package/dist/components/MCopyButton.vue.d.ts +1 -1
- package/dist/components/MDataTable.vue.d.ts +21 -19
- package/dist/components/MDialog.vue.d.ts +21 -19
- package/dist/components/MDragHandle.vue.d.ts +1 -1
- package/dist/components/MDrawCanvas.vue.d.ts +5 -3
- package/dist/components/MDrawToolbar.vue.d.ts +7 -5
- package/dist/components/MEmptyState.vue.d.ts +5 -3
- package/dist/components/MExpansionPanel.vue.d.ts +6 -4
- package/dist/components/MExportButton.vue.d.ts +7 -5
- package/dist/components/MFab.vue.d.ts +11 -9
- package/dist/components/MFabMenu.vue.d.ts +3 -3
- package/dist/components/MFixed.vue.d.ts +5 -3
- package/dist/components/MFlex.vue.d.ts +7 -5
- package/dist/components/MFloorPlan.vue.d.ts +3 -3
- package/dist/components/MFloorPlanInspector.vue.d.ts +32 -30
- package/dist/components/MFloorPlanToolbar.vue.d.ts +2 -2
- package/dist/components/MFlow.vue.d.ts +4 -4
- package/dist/components/MFlowControls.vue.d.ts +6 -4
- package/dist/components/MFlowHandle.vue.d.ts +1 -1
- package/dist/components/MFlowNode.vue.d.ts +11 -9
- package/dist/components/MFooter.vue.d.ts +12 -10
- package/dist/components/MFullscreen.vue.d.ts +5 -3
- package/dist/components/MGantt.vue.d.ts +33 -31
- package/dist/components/MGanttControls.vue.d.ts +8 -6
- package/dist/components/MGrid.vue.d.ts +6 -4
- package/dist/components/MIcon.vue.d.ts +5 -0
- package/dist/components/MIconButton.vue.d.ts +1 -1
- package/dist/components/MImageCropper.vue.d.ts +14 -12
- package/dist/components/MInfiniteScroll.vue.d.ts +11 -9
- package/dist/components/MList.vue.d.ts +5 -3
- package/dist/components/MListGroup.vue.d.ts +7 -5
- package/dist/components/MListItem.vue.d.ts +21 -19
- package/dist/components/MListSubheader.vue.d.ts +5 -3
- package/dist/components/MLoadingOverlay.vue.d.ts +10 -8
- package/dist/components/MMap.vue.d.ts +14 -6
- package/dist/components/MMapControl.vue.d.ts +12 -10
- package/dist/components/MMapFeatureInfo.vue.d.ts +11 -9
- package/dist/components/MMapIdentify.vue.d.ts +9 -7
- package/dist/components/MMapLayers.vue.d.ts +13 -11
- package/dist/components/MMapMarker.vue.d.ts +7 -5
- package/dist/components/MMapPopup.vue.d.ts +5 -3
- package/dist/components/MMasonry.vue.d.ts +5 -3
- package/dist/components/MMenu.vue.d.ts +12 -10
- package/dist/components/MMenuItem.vue.d.ts +11 -9
- package/dist/components/MMultiAutocomplete.vue.d.ts +1 -1
- package/dist/components/MMultiSelect.vue.d.ts +6 -4
- package/dist/components/MNavigationDrawer.vue.d.ts +14 -12
- package/dist/components/MNavigationRail.vue.d.ts +7 -5
- package/dist/components/MOdontogram.vue.d.ts +1 -1
- package/dist/components/MOrderBook.vue.d.ts +1 -1
- package/dist/components/MOverlay.vue.d.ts +5 -3
- package/dist/components/MPdfViewer.vue.d.ts +4 -4
- package/dist/components/MPhoneInput.vue.d.ts +11 -9
- package/dist/components/MPosKeypad.vue.d.ts +18 -16
- package/dist/components/MProgressBar.vue.d.ts +1 -1
- package/dist/components/MPullToRefresh.vue.d.ts +5 -3
- package/dist/components/MQRCode.vue.d.ts +7 -5
- package/dist/components/MRadioGroup.vue.d.ts +1 -1
- package/dist/components/MReceipt.vue.d.ts +2 -2
- package/dist/components/MRelative.vue.d.ts +5 -3
- package/dist/components/MResourceTimeline.vue.d.ts +31 -29
- package/dist/components/MResponsive.vue.d.ts +5 -3
- package/dist/components/MResult.vue.d.ts +7 -5
- package/dist/components/MScrollable.vue.d.ts +7 -5
- package/dist/components/MSearchBar.vue.d.ts +13 -11
- package/dist/components/MSearchField.vue.d.ts +7 -5
- package/dist/components/MSection.vue.d.ts +11 -9
- package/dist/components/MSeekBar.vue.d.ts +3 -3
- package/dist/components/MSelect.vue.d.ts +1 -1
- package/dist/components/MShader.vue.d.ts +11 -9
- package/dist/components/MShortNavigationBar.vue.d.ts +1 -1
- package/dist/components/MSideSheet.vue.d.ts +9 -7
- package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +2 -2
- package/dist/components/MSlider.vue.d.ts +3 -3
- package/dist/components/MSparkline.vue.d.ts +1 -1
- package/dist/components/MSplitButton.vue.d.ts +7 -5
- package/dist/components/MSplitter.vue.d.ts +9 -7
- package/dist/components/MSpotlightSearch.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +8 -6
- package/dist/components/MStatCard.vue.d.ts +5 -3
- package/dist/components/MStepper.vue.d.ts +5 -3
- package/dist/components/MSticky.vue.d.ts +5 -3
- package/dist/components/MSubtitle.vue.d.ts +6 -4
- package/dist/components/MSwipeToDismiss.vue.d.ts +11 -9
- package/dist/components/MTable.vue.d.ts +17 -15
- package/dist/components/MText.vue.d.ts +5 -3
- package/dist/components/MTextField.vue.d.ts +6 -4
- package/dist/components/MTimePickerModal.vue.d.ts +1 -1
- package/dist/components/MTitle.vue.d.ts +6 -4
- package/dist/components/MToggleButton.vue.d.ts +5 -3
- package/dist/components/MToolbar.vue.d.ts +24 -22
- package/dist/components/MTooltip.vue.d.ts +10 -8
- package/dist/components/MTopAppBar.vue.d.ts +22 -20
- package/dist/components/MTour.vue.d.ts +28 -26
- package/dist/components/MTransition.vue.d.ts +5 -3
- package/dist/components/MTree.vue.d.ts +6 -4
- package/dist/components/MTreeTable.vue.d.ts +21 -19
- package/dist/components/MTypewriter.vue.d.ts +6 -4
- package/dist/components/MVirtualTable.vue.d.ts +8 -6
- package/dist/components/_MMapLayerItem.vue.d.ts +8 -6
- package/dist/components/_MPdfPage.vue.d.ts +2 -2
- package/dist/components/_MToolbarFab.vue.d.ts +5 -3
- package/dist/components/_MTreeNode.vue.d.ts +13 -11
- package/dist/composables/_fieldLayout.d.ts +47 -0
- package/dist/composables/useMap.d.ts +8 -0
- package/dist/{dist-CrjSW5DN.js → dist-Bj5kEq8G.js} +4 -6
- package/dist/dist-Bj5kEq8G.js.map +1 -0
- package/dist/draw.js +62 -82
- package/dist/draw.js.map +1 -1
- package/dist/{emoji-names-de-BphO5XpV.js → emoji-names-de-Cu3OSpp6.js} +2 -3
- package/dist/emoji-names-de-Cu3OSpp6.js.map +1 -0
- package/dist/{emoji-names-en-9ZvMRvzi.js → emoji-names-en-BNX1pM9h.js} +2 -3
- package/dist/emoji-names-en-BNX1pM9h.js.map +1 -0
- package/dist/{emoji-names-es-DvfWU3Pj.js → emoji-names-es-C_Dafg4D.js} +2 -3
- package/dist/emoji-names-es-C_Dafg4D.js.map +1 -0
- package/dist/{emoji-names-fr-B-jhUlsP.js → emoji-names-fr-D4HTMFuM.js} +2 -3
- package/dist/emoji-names-fr-D4HTMFuM.js.map +1 -0
- package/dist/{emoji-names-ja-l8cMFJo1.js → emoji-names-ja-BCql-Sj6.js} +2 -3
- package/dist/emoji-names-ja-BCql-Sj6.js.map +1 -0
- package/dist/{emoji-names-ko-YP-o9G0c.js → emoji-names-ko-CT8L52nn.js} +2 -3
- package/dist/emoji-names-ko-CT8L52nn.js.map +1 -0
- package/dist/{emoji-names-pt-DGj_Js4M.js → emoji-names-pt-DHiwPiL-.js} +2 -3
- package/dist/emoji-names-pt-DHiwPiL-.js.map +1 -0
- package/dist/{emoji-names-zh-Dzecwtw_.js → emoji-names-zh-L3FXVief.js} +2 -3
- package/dist/emoji-names-zh-L3FXVief.js.map +1 -0
- package/dist/flow.js +351 -374
- package/dist/flow.js.map +1 -1
- package/dist/{flowPaths-CcWOKY4Z.js → flowPaths-BaH7yaUM.js} +3 -8
- package/dist/flowPaths-BaH7yaUM.js.map +1 -0
- package/dist/gantt.js +272 -333
- package/dist/gantt.js.map +1 -1
- package/dist/locales/index.js +1 -2
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +4085 -4277
- package/dist/m3ui.js.map +1 -1
- package/dist/map.d.ts +1 -1
- package/dist/map.js +521 -520
- package/dist/map.js.map +1 -1
- package/dist/markdown.js +3 -4
- package/dist/markdown.js.map +1 -1
- package/dist/{material-color-utilities-C_iikgRm.js → material-color-utilities-CEFytLsr.js} +15 -32
- package/dist/material-color-utilities-CEFytLsr.js.map +1 -0
- package/dist/media.js +80 -94
- package/dist/media.js.map +1 -1
- package/dist/{motion-DZiXG09o.js → motion-BcejVTeX.js} +2 -3
- package/dist/motion-BcejVTeX.js.map +1 -0
- package/dist/pdf.js +103 -115
- package/dist/pdf.js.map +1 -1
- package/dist/qrcode.js +1 -2
- package/dist/qrcode.js.map +1 -1
- package/dist/rich-text-editor.js +33 -34
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/terminal.js +2 -3
- package/dist/terminal.js.map +1 -1
- package/dist/{useLocale-DLcG3qPC.js → useLocale-COav9m8C.js} +2 -3
- package/dist/useLocale-COav9m8C.js.map +1 -0
- package/dist/{useThemeTokens-DQQcaWbE.js → useThemeTokens-DyAdPQB0.js} +6 -10
- package/dist/useThemeTokens-DyAdPQB0.js.map +1 -0
- package/package.json +32 -32
- package/src/__tests__/MFab.test.ts +10 -1
- package/src/__tests__/MMap.test.ts +16 -1
- package/src/__tests__/_fakeMaplibre.ts +2 -0
- package/src/__tests__/fieldOverflow.test.ts +118 -0
- package/src/components/MAutocomplete.vue +21 -24
- package/src/components/MColorPicker.vue +3 -3
- package/src/components/MDatePicker.vue +4 -4
- package/src/components/MDateRangePicker.vue +4 -4
- package/src/components/MMap.vue +12 -3
- package/src/components/MMapMeasure.vue +3 -1
- package/src/components/MMaskField.vue +16 -24
- package/src/components/MMultiAutocomplete.vue +19 -25
- package/src/components/MMultiSelect.vue +20 -27
- package/src/components/MNumberField.vue +16 -26
- package/src/components/MPinInput.vue +3 -2
- package/src/components/MSearchBar.vue +2 -2
- package/src/components/MSelect.vue +16 -22
- package/src/components/MTagInput.vue +19 -26
- package/src/components/MTextField.vue +18 -46
- package/src/components/MTimePicker.vue +4 -4
- package/src/composables/_fieldLayout.ts +117 -0
- package/src/composables/useMap.ts +17 -0
- package/src/composables/useMapLayers.ts +4 -1
- package/src/map.ts +1 -1
- package/dist/MButton-D_uxtJa-.js.map +0 -1
- package/dist/MDialog-DT4KAPmn.js.map +0 -1
- package/dist/MIcon-Bxh9j135.js.map +0 -1
- package/dist/MIconButton-DoNotQ9v.js.map +0 -1
- package/dist/MListItem-CwYrxpPZ.js.map +0 -1
- package/dist/MLoadingIndicator-DhzECYRI.js.map +0 -1
- package/dist/MMenuItem-Bih0h4-n.js.map +0 -1
- package/dist/MProgressBar-BCoruxA-.js.map +0 -1
- package/dist/MSeekBar-DQPF5FTp.js.map +0 -1
- package/dist/MSegmentedButton-DL9JtJFX.js.map +0 -1
- package/dist/MSlider-BvoMZTy9.js.map +0 -1
- package/dist/MSpinner-CgcCQhS9.js.map +0 -1
- package/dist/MTextField-B72dwF6V.js.map +0 -1
- package/dist/MTooltip-YyF1CO75.js.map +0 -1
- package/dist/_storageKeys-CYXsUBwK.js.map +0 -1
- package/dist/_useEscapeStack-CjndQhqg.js.map +0 -1
- package/dist/common-0dgrgaPL.js.map +0 -1
- package/dist/dist-CrjSW5DN.js.map +0 -1
- package/dist/emoji-names-de-BphO5XpV.js.map +0 -1
- package/dist/emoji-names-en-9ZvMRvzi.js.map +0 -1
- package/dist/emoji-names-es-DvfWU3Pj.js.map +0 -1
- package/dist/emoji-names-fr-B-jhUlsP.js.map +0 -1
- package/dist/emoji-names-ja-l8cMFJo1.js.map +0 -1
- package/dist/emoji-names-ko-YP-o9G0c.js.map +0 -1
- package/dist/emoji-names-pt-DGj_Js4M.js.map +0 -1
- package/dist/emoji-names-zh-Dzecwtw_.js.map +0 -1
- package/dist/flowPaths-CcWOKY4Z.js.map +0 -1
- package/dist/material-color-utilities-C_iikgRm.js.map +0 -1
- package/dist/motion-DZiXG09o.js.map +0 -1
- package/dist/useLocale-DLcG3qPC.js.map +0 -1
- package/dist/useThemeTokens-DQQcaWbE.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/composables/motion.ts
|
|
2
2
|
var e = {
|
|
3
3
|
standard: {
|
|
4
4
|
fastSpatial: {
|
|
@@ -144,7 +144,6 @@ function r(e, t, n, r) {
|
|
|
144
144
|
return 3 * a * (1 - a) ** 2 * t + 3 * a ** 2 * (1 - a) * r + a ** 3;
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
//#endregion
|
|
148
147
|
export { e as i, n, t as r, r as t };
|
|
149
148
|
|
|
150
|
-
//# sourceMappingURL=motion-
|
|
149
|
+
//# sourceMappingURL=motion-BcejVTeX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion-BcejVTeX.js","names":["motionSprings","motionEasings","motionDurations","cubicBezier","t","u","i","x","x1","x2","dx","y1","y2"],"sources":["../src/composables/motion.ts"],"sourcesContent":["// Material 3's motion tokens for your own animations, from androidx's MotionTokens, StandardMotionTokens and\n// ExpressiveMotionTokens. The same easings and durations are CSS variables in theme.css (`--ease-*`, which\n// Tailwind turns into `ease-*` utilities, and `--duration-*`); the springs only make sense in JS, with\n// `useSpring` (exported next to these) or your own loop. No imports here: _useSpring builds on this file.\n\n/** A spring: dampingRatio 1 settles without overshoot, lower bounces; higher stiffness is faster */\nexport interface SpringSpec { dampingRatio: number; stiffness: number }\n\n/**\n * Spring specs of the two motion schemes. Spatial springs move things (position, size, shape); effects springs\n * change color and opacity and never overshoot. Standard is the default scheme; Expressive is bouncier, for\n * Expressive components and moments that should feel lively.\n */\nexport const motionSprings = {\n standard: {\n fastSpatial: { dampingRatio: 0.9, stiffness: 1400 },\n defaultSpatial: { dampingRatio: 0.9, stiffness: 700 },\n slowSpatial: { dampingRatio: 0.9, stiffness: 300 },\n fastEffects: { dampingRatio: 1, stiffness: 3800 },\n defaultEffects: { dampingRatio: 1, stiffness: 1600 },\n slowEffects: { dampingRatio: 1, stiffness: 800 },\n },\n expressive: {\n fastSpatial: { dampingRatio: 0.6, stiffness: 800 },\n defaultSpatial: { dampingRatio: 0.8, stiffness: 380 },\n slowSpatial: { dampingRatio: 0.8, stiffness: 200 },\n fastEffects: { dampingRatio: 1, stiffness: 3800 },\n defaultEffects: { dampingRatio: 1, stiffness: 1600 },\n slowEffects: { dampingRatio: 1, stiffness: 800 },\n },\n} as const satisfies Record<'standard' | 'expressive', Record<string, SpringSpec>>\n\n/** Easing curves as cubic-bezier control points [x1, y1, x2, y2] (theme.css has them as `--ease-*`) */\nexport const motionEasings = {\n emphasized: [0.2, 0, 0, 1],\n emphasizedDecelerate: [0.05, 0.7, 0.1, 1],\n emphasizedAccelerate: [0.3, 0, 0.8, 0.15],\n standard: [0.2, 0, 0, 1],\n standardDecelerate: [0, 0, 0, 1],\n standardAccelerate: [0.3, 0, 1, 1],\n legacy: [0.4, 0, 0.2, 1],\n legacyDecelerate: [0, 0, 0.2, 1],\n legacyAccelerate: [0.4, 0, 1, 1],\n linear: [0, 0, 1, 1],\n} as const satisfies Record<string, readonly [number, number, number, number]>\n\n/** Durations in ms (theme.css has them as `--duration-short-1` … `--duration-extra-long-4`) */\nexport const motionDurations = {\n short1: 50, short2: 100, short3: 150, short4: 200,\n medium1: 250, medium2: 300, medium3: 350, medium4: 400,\n long1: 450, long2: 500, long3: 550, long4: 600,\n extraLong1: 700, extraLong2: 800, extraLong3: 900, extraLong4: 1000,\n} as const\n\n/**\n * A cubic-bezier easing as a function of progress (0–1), e.g. `cubicBezier(...motionEasings.emphasized)`, for\n * JS-driven tweens and for mapping a fraction through a curve\n */\nexport function cubicBezier(x1: number, y1: number, x2: number, y2: number): (t: number) => number {\n return (t: number) => {\n if (t <= 0) return 0\n if (t >= 1) return 1\n // Solve x(u) = t for the curve parameter u (Newton), then return y(u)\n let u = t\n for (let i = 0; i < 8; i++) {\n const x = 3 * u * (1 - u) ** 2 * x1 + 3 * u ** 2 * (1 - u) * x2 + u ** 3 - t\n const dx = 3 * (1 - u) ** 2 * x1 + 6 * u * (1 - u) * (x2 - x1) + 3 * u ** 2 * (1 - x2)\n if (Math.abs(dx) < 1e-6) break\n u -= x / dx\n }\n return 3 * u * (1 - u) ** 2 * y1 + 3 * u ** 2 * (1 - u) * y2 + u ** 3\n }\n}\n"],"mappings":";AAaA,IAAaA,IAAgB;CAC3B,UAAU;EACR,aAAa;GAAE,cAAc;GAAK,WAAW;EAAK;EAClD,gBAAgB;GAAE,cAAc;GAAK,WAAW;EAAI;EACpD,aAAa;GAAE,cAAc;GAAK,WAAW;EAAI;EACjD,aAAa;GAAE,cAAc;GAAG,WAAW;EAAK;EAChD,gBAAgB;GAAE,cAAc;GAAG,WAAW;EAAK;EACnD,aAAa;GAAE,cAAc;GAAG,WAAW;EAAI;CACjD;CACA,YAAY;EACV,aAAa;GAAE,cAAc;GAAK,WAAW;EAAI;EACjD,gBAAgB;GAAE,cAAc;GAAK,WAAW;EAAI;EACpD,aAAa;GAAE,cAAc;GAAK,WAAW;EAAI;EACjD,aAAa;GAAE,cAAc;GAAG,WAAW;EAAK;EAChD,gBAAgB;GAAE,cAAc;GAAG,WAAW;EAAK;EACnD,aAAa;GAAE,cAAc;GAAG,WAAW;EAAI;CACjD;AACF,GAGaC,IAAgB;CAC3B,YAAY;EAAC;EAAK;EAAG;EAAG;CAAC;CACzB,sBAAsB;EAAC;EAAM;EAAK;EAAK;CAAC;CACxC,sBAAsB;EAAC;EAAK;EAAG;EAAK;CAAI;CACxC,UAAU;EAAC;EAAK;EAAG;EAAG;CAAC;CACvB,oBAAoB;EAAC;EAAG;EAAG;EAAG;CAAC;CAC/B,oBAAoB;EAAC;EAAK;EAAG;EAAG;CAAC;CACjC,QAAQ;EAAC;EAAK;EAAG;EAAK;CAAC;CACvB,kBAAkB;EAAC;EAAG;EAAG;EAAK;CAAC;CAC/B,kBAAkB;EAAC;EAAK;EAAG;EAAG;CAAC;CAC/B,QAAQ;EAAC;EAAG;EAAG;EAAG;CAAC;AACrB,GAGaC,IAAkB;CAC7B,QAAQ;CAAI,QAAQ;CAAK,QAAQ;CAAK,QAAQ;CAC9C,SAAS;CAAK,SAAS;CAAK,SAAS;CAAK,SAAS;CACnD,OAAO;CAAK,OAAO;CAAK,OAAO;CAAK,OAAO;CAC3C,YAAY;CAAK,YAAY;CAAK,YAAY;CAAK,YAAY;AACjE;AAMA,SAAgBC,EAAY,GAAY,GAAY,GAAY,GAAmC;CACjG,QAAQ,MAAc;EACpB,IAAIC,KAAK,GAAG,OAAO;EACnB,IAAIA,KAAK,GAAG,OAAO;EAEnB,IAAIC,IAAID;EACR,KAAK,IAAIE,IAAI,GAAGA,IAAI,GAAG,KAAK;GAC1B,IAAMC,IAAI,IAAIF,KAAK,IAAIA,MAAM,IAAIG,IAAK,IAAIH,KAAK,KAAK,IAAIA,KAAKI,IAAKJ,KAAK,IAAID,GACrEM,IAAK,KAAK,IAAIL,MAAM,IAAIG,IAAK,IAAIH,KAAK,IAAIA,MAAMI,IAAKD,KAAM,IAAIH,KAAK,KAAK,IAAII;GACnF,IAAI,KAAK,IAAIC,CAAE,IAAI,MAAM;GACzB,KAAKH,IAAIG;EACX;EACA,OAAO,IAAIL,KAAK,IAAIA,MAAM,IAAIM,IAAK,IAAIN,KAAK,KAAK,IAAIA,KAAKO,IAAKP,KAAK;CACtE;AACF"}
|
package/dist/pdf.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { i as e } from "./useLocale-
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { t as n } from "./
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import { t as s } from "./
|
|
8
|
-
import { t as c } from "./
|
|
1
|
+
import { i as e } from "./useLocale-COav9m8C.js";
|
|
2
|
+
import { t } from "./MIcon-DpajuUTJ.js";
|
|
3
|
+
import { t as n } from "./MIconButton-BBggVwBV.js";
|
|
4
|
+
import { n as r, t as i } from "./MMenuItem-CRNZkVVr.js";
|
|
5
|
+
import { t as a } from "./MProgressBar-BWly1UKN.js";
|
|
6
|
+
import { t as o } from "./MTextField-DpcPmR5B.js";
|
|
7
|
+
import { t as s } from "./MButton-CPghlKb0.js";
|
|
8
|
+
import { t as c } from "./MLoadingIndicator-vooA3110.js";
|
|
9
9
|
import { Fragment as l, Transition as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, getCurrentScope as ee, mergeProps as te, nextTick as y, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as ne, onMounted as re, onScopeDispose as S, openBlock as C, reactive as ie, ref as w, renderList as T, renderSlot as ae, resolveDynamicComponent as oe, shallowRef as E, toDisplayString as D, toValue as O, unref as k, vModelText as se, watch as A, withCtx as j, withDirectives as ce, withKeys as le, withModifiers as ue } from "vue";
|
|
10
|
-
|
|
10
|
+
// src/composables/usePdf.ts
|
|
11
11
|
var M;
|
|
12
12
|
function N(e) {
|
|
13
13
|
M = e;
|
|
@@ -40,41 +40,40 @@ function de(e, t = {}) {
|
|
|
40
40
|
}
|
|
41
41
|
async function y(e) {
|
|
42
42
|
let u = ++g;
|
|
43
|
-
if (te(), o.value = null, a.value = 0, !e || typeof window > "u")
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
43
|
+
if (te(), o.value = null, a.value = 0, !e || typeof window > "u") i.value = !1;
|
|
44
|
+
else {
|
|
45
|
+
i.value = !0;
|
|
46
|
+
try {
|
|
47
|
+
let o = await F(t.workerSrc);
|
|
48
|
+
if (u !== g) return;
|
|
49
|
+
r.value = o;
|
|
50
|
+
let d, f;
|
|
51
|
+
if (typeof e == "string" || e instanceof URL ? f = String(e) : d = e instanceof Blob ? new Uint8Array(await e.arrayBuffer()) : new Uint8Array(e instanceof ArrayBuffer ? e.slice(0) : e.slice()), u !== g) return;
|
|
52
|
+
m = o.getDocument({
|
|
53
|
+
url: f,
|
|
54
|
+
data: d,
|
|
55
|
+
password: O(t.password),
|
|
56
|
+
withCredentials: t.withCredentials
|
|
57
|
+
}), m.onProgress = ({ loaded: e, total: t }) => {
|
|
58
|
+
u === g && t && (a.value = Math.min(1, e / t));
|
|
59
|
+
}, m.onPassword = (e, t) => {
|
|
60
|
+
u === g && (h = e, c.value = t === o.PasswordResponses.INCORRECT_PASSWORD, s.value = !0);
|
|
61
|
+
};
|
|
62
|
+
let p = m, _ = await p.promise;
|
|
63
|
+
if (u !== g) {
|
|
64
|
+
p.destroy();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
s.value = !1, c.value = !1, a.value = 1;
|
|
68
|
+
let v = (await _.getPage(1)).getViewport({ scale: 1 });
|
|
69
|
+
l.value = Array.from({ length: _.numPages }, () => ({
|
|
70
|
+
width: v.width,
|
|
71
|
+
height: v.height
|
|
72
|
+
})), n.value = _, i.value = !1, b(_, u), ne(_, u), re(_, o, u);
|
|
73
|
+
} catch (e) {
|
|
74
|
+
if (u !== g) return;
|
|
75
|
+
o.value = e instanceof Error ? e : Error(String(e)), i.value = !1;
|
|
68
76
|
}
|
|
69
|
-
s.value = !1, c.value = !1, a.value = 1;
|
|
70
|
-
let v = (await _.getPage(1)).getViewport({ scale: 1 });
|
|
71
|
-
l.value = Array.from({ length: _.numPages }, () => ({
|
|
72
|
-
width: v.width,
|
|
73
|
-
height: v.height
|
|
74
|
-
})), n.value = _, i.value = !1, b(_, u), ne(_, u), re(_, o, u);
|
|
75
|
-
} catch (e) {
|
|
76
|
-
if (u !== g) return;
|
|
77
|
-
o.value = e instanceof Error ? e : Error(String(e)), i.value = !1;
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
async function b(e, t) {
|
|
@@ -236,8 +235,7 @@ function de(e, t = {}) {
|
|
|
236
235
|
print: se
|
|
237
236
|
};
|
|
238
237
|
}
|
|
239
|
-
|
|
240
|
-
//#region src/components/_MPdfPage.vue?vue&type=script&setup=true&lang.ts
|
|
238
|
+
// src/components/_MPdfPage.vue?vue&type=script&setup=true&lang.ts
|
|
241
239
|
var R = ["data-page"], fe = [
|
|
242
240
|
"href",
|
|
243
241
|
"target",
|
|
@@ -283,7 +281,7 @@ var R = ["data-page"], fe = [
|
|
|
283
281
|
"text-selection",
|
|
284
282
|
"rendered"
|
|
285
283
|
],
|
|
286
|
-
setup(e, { expose:
|
|
284
|
+
setup(e, { expose: n, emit: r }) {
|
|
287
285
|
let i = e, a = r, o = w(), s = w(), c = w(), u = E(null), f = E(null);
|
|
288
286
|
function g(e) {
|
|
289
287
|
return e.getViewport({
|
|
@@ -497,7 +495,7 @@ var R = ["data-page"], fe = [
|
|
|
497
495
|
}
|
|
498
496
|
if (!U.value) return;
|
|
499
497
|
let t = U.value;
|
|
500
|
-
U.value = null,
|
|
498
|
+
U.value = null, t.length < 2 || a("add", {
|
|
501
499
|
id: F(),
|
|
502
500
|
type: "ink",
|
|
503
501
|
page: i.page,
|
|
@@ -570,10 +568,10 @@ var R = ["data-page"], fe = [
|
|
|
570
568
|
u.value && (f.value = g(u.value)), clearTimeout(re), re = setTimeout(te, 140);
|
|
571
569
|
}), ne(() => {
|
|
572
570
|
clearTimeout(re), y();
|
|
573
|
-
}),
|
|
571
|
+
}), n({
|
|
574
572
|
root: o,
|
|
575
573
|
currentHit: k
|
|
576
|
-
}), (
|
|
574
|
+
}), (n, r) => (C(), m("div", {
|
|
577
575
|
ref_key: "root",
|
|
578
576
|
ref: o,
|
|
579
577
|
class: "m3-pdf-page relative bg-white shadow-elevation-1",
|
|
@@ -665,23 +663,23 @@ var R = ["data-page"], fe = [
|
|
|
665
663
|
"stroke-linejoin": "round"
|
|
666
664
|
}, null, 8, he)) : p("", !0)
|
|
667
665
|
], 42, z)),
|
|
668
|
-
(C(!0), m(l, null, T(N.value, (
|
|
666
|
+
(C(!0), m(l, null, T(N.value, (n) => (C(), m(l, { key: `n-${n.a.id}` }, ["x" in n ? (C(), m("button", {
|
|
669
667
|
key: 0,
|
|
670
668
|
type: "button",
|
|
671
|
-
class: b(["m3-pdf-note absolute flex size-7 -translate-x-1/2 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full shadow-elevation-2 outline-none focus-visible:ring-2 focus-visible:ring-primary", { "ring-2 ring-primary":
|
|
669
|
+
class: b(["m3-pdf-note absolute flex size-7 -translate-x-1/2 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full shadow-elevation-2 outline-none focus-visible:ring-2 focus-visible:ring-primary", { "ring-2 ring-primary": n.a.id === e.selectedId }]),
|
|
672
670
|
style: x({
|
|
673
|
-
left: `${
|
|
674
|
-
top: `${
|
|
675
|
-
backgroundColor:
|
|
671
|
+
left: `${n.x}px`,
|
|
672
|
+
top: `${n.y}px`,
|
|
673
|
+
backgroundColor: n.a.color
|
|
676
674
|
}),
|
|
677
|
-
"aria-label":
|
|
678
|
-
onClick: (
|
|
679
|
-
|
|
680
|
-
id:
|
|
681
|
-
anchor:
|
|
675
|
+
"aria-label": n.a.text || "Note",
|
|
676
|
+
onClick: (t) => {
|
|
677
|
+
t.stopPropagation(), e.tool === "eraser" ? a("erase", n.a.id) : a("select", {
|
|
678
|
+
id: n.a.id,
|
|
679
|
+
anchor: t.currentTarget.getBoundingClientRect()
|
|
682
680
|
});
|
|
683
681
|
}
|
|
684
|
-
}, [_(
|
|
682
|
+
}, [_(t, {
|
|
685
683
|
name: "sticky_note_2",
|
|
686
684
|
size: 16,
|
|
687
685
|
filled: "",
|
|
@@ -771,8 +769,7 @@ function st(e, t) {
|
|
|
771
769
|
paths: c
|
|
772
770
|
} : null : e;
|
|
773
771
|
}
|
|
774
|
-
|
|
775
|
-
//#region src/components/MPdfViewer.vue
|
|
772
|
+
// src/components/MPdfViewer.vue
|
|
776
773
|
var W = /* @__PURE__ */ v({
|
|
777
774
|
inheritAttrs: !1,
|
|
778
775
|
__name: "MPdfViewer",
|
|
@@ -903,11 +900,7 @@ var W = /* @__PURE__ */ v({
|
|
|
903
900
|
}), ft, pt = w(!1), mt = null;
|
|
904
901
|
function ht() {
|
|
905
902
|
let e = I.value;
|
|
906
|
-
|
|
907
|
-
mt = null;
|
|
908
|
-
return;
|
|
909
|
-
}
|
|
910
|
-
mt = null, pt.value = !0, clearTimeout(ft), ft = setTimeout(() => pt.value = !1, 1200);
|
|
903
|
+
ct.value = e.scrollTop, ut(), mt !== null && Math.abs(e.scrollTop - mt) < 1 ? mt = null : (mt = null, pt.value = !0, clearTimeout(ft), ft = setTimeout(() => pt.value = !1, 1200));
|
|
911
904
|
}
|
|
912
905
|
function K(e, t, n = !1) {
|
|
913
906
|
let r = I.value, i = W.value.boxes[e - 1];
|
|
@@ -1063,7 +1056,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1063
1056
|
e instanceof HTMLElement && (e.dataset.page = String(t), Kt?.observe(e));
|
|
1064
1057
|
}
|
|
1065
1058
|
A([X, P.doc], async ([e, t]) => {
|
|
1066
|
-
Kt?.disconnect(), Wt.clear(),
|
|
1059
|
+
Kt?.disconnect(), Wt.clear(), e === "thumbnails" && t && typeof IntersectionObserver < "u" && (await y(), Kt = new IntersectionObserver((e) => {
|
|
1067
1060
|
for (let t of e) {
|
|
1068
1061
|
if (!t.isIntersecting) continue;
|
|
1069
1062
|
let e = Number(t.target.dataset.page);
|
|
@@ -1201,16 +1194,12 @@ var W = /* @__PURE__ */ v({
|
|
|
1201
1194
|
};
|
|
1202
1195
|
}), $ = w(null);
|
|
1203
1196
|
function Sn(e) {
|
|
1204
|
-
|
|
1205
|
-
$.value = null;
|
|
1206
|
-
return;
|
|
1207
|
-
}
|
|
1208
|
-
Z.value = null, $.value = {
|
|
1197
|
+
!e || !O.annotate ? $.value = null : (Z.value = null, $.value = {
|
|
1209
1198
|
page: e.page,
|
|
1210
1199
|
rects: e.rects,
|
|
1211
1200
|
quote: e.quote,
|
|
1212
1201
|
...vn(e.anchor)
|
|
1213
|
-
};
|
|
1202
|
+
});
|
|
1214
1203
|
}
|
|
1215
1204
|
function Cn() {
|
|
1216
1205
|
let e = $.value;
|
|
@@ -1265,7 +1254,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1265
1254
|
else if (rn.value) on();
|
|
1266
1255
|
else return;
|
|
1267
1256
|
e.stopPropagation();
|
|
1268
|
-
} else !t && (e.key === "Delete" || e.key === "Backspace") && Z.value ? mn(Z.value.id) :
|
|
1257
|
+
} else !t && (e.key === "Delete" || e.key === "Backspace") && Z.value ? mn(Z.value.id) : t || n || e.key !== "PageDown" && e.key !== "PageUp" || (e.preventDefault(), K(Math.max(1, Math.min(P.numPages.value, G.value + (e.key === "PageDown" ? 1 : -1)))));
|
|
1269
1258
|
}
|
|
1270
1259
|
let Nn = w("");
|
|
1271
1260
|
A(G, (e) => {
|
|
@@ -1284,7 +1273,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1284
1273
|
let e = I.value;
|
|
1285
1274
|
e.addEventListener("wheel", yt, { passive: !1 }), Et = new ResizeObserver(() => {
|
|
1286
1275
|
let t = W.value.boxes, n = R.value / 3, r = t.length ? lt(e.scrollTop + n) : -1, i = r >= 0 ? (e.scrollTop + n - t[r].top) / t[r].height : 0;
|
|
1287
|
-
L.value = e.clientWidth, R.value = e.clientHeight, fe.value = F.value?.clientWidth ?? fe.value,
|
|
1276
|
+
L.value = e.clientWidth, R.value = e.clientHeight, fe.value = F.value?.clientWidth ?? fe.value, r < 0 || y(() => {
|
|
1288
1277
|
let t = W.value.boxes[r];
|
|
1289
1278
|
if (!t) return;
|
|
1290
1279
|
let a = Math.round(t.top + i * t.height - n);
|
|
@@ -1339,7 +1328,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1339
1328
|
onKeydown: Mn
|
|
1340
1329
|
}), [
|
|
1341
1330
|
v.toolbar ? (C(), m("div", ye, [
|
|
1342
|
-
_(
|
|
1331
|
+
_(n, {
|
|
1343
1332
|
icon: X.value ? "left_panel_close" : "left_panel_open",
|
|
1344
1333
|
label: k(N).pdfThumbnails,
|
|
1345
1334
|
disabled: !k(P).doc.value,
|
|
@@ -1360,20 +1349,20 @@ var W = /* @__PURE__ */ v({
|
|
|
1360
1349
|
onBlur: Pn
|
|
1361
1350
|
}, null, 40, Se), [[se, Nn.value]]), h("span", Ce, "/ " + D(k(P).numPages.value), 1)])),
|
|
1362
1351
|
z.value ? p("", !0) : (C(), m("div", we, [
|
|
1363
|
-
_(
|
|
1352
|
+
_(n, {
|
|
1364
1353
|
icon: "remove",
|
|
1365
1354
|
label: k(N).pdfZoomOut,
|
|
1366
1355
|
size: "xs",
|
|
1367
1356
|
onClick: d[2] ||= (e) => vt(-1)
|
|
1368
1357
|
}, null, 8, ["label"]),
|
|
1369
|
-
_(
|
|
1358
|
+
_(r, { align: "right" }, {
|
|
1370
1359
|
trigger: j(() => [h("button", {
|
|
1371
1360
|
type: "button",
|
|
1372
1361
|
class: "h-8 min-w-14 cursor-pointer rounded-full px-2 text-label-large tabular-nums hover:bg-on-surface/8",
|
|
1373
1362
|
"aria-label": k(N).pdfZoom
|
|
1374
1363
|
}, D(_e.value) + "%", 9, Te)]),
|
|
1375
1364
|
default: j(() => [
|
|
1376
|
-
_(
|
|
1365
|
+
_(i, {
|
|
1377
1366
|
icon: "fit_width",
|
|
1378
1367
|
selected: me.value === "fit-width",
|
|
1379
1368
|
onClick: d[3] ||= (e) => q("fit-width")
|
|
@@ -1381,7 +1370,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1381
1370
|
default: j(() => [g(D(k(N).pdfFitWidth), 1)]),
|
|
1382
1371
|
_: 1
|
|
1383
1372
|
}, 8, ["selected"]),
|
|
1384
|
-
_(
|
|
1373
|
+
_(i, {
|
|
1385
1374
|
icon: "fit_page",
|
|
1386
1375
|
selected: me.value === "fit-page",
|
|
1387
1376
|
onClick: d[4] ||= (e) => q("fit-page")
|
|
@@ -1389,7 +1378,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1389
1378
|
default: j(() => [g(D(k(N).pdfFitPage), 1)]),
|
|
1390
1379
|
_: 1
|
|
1391
1380
|
}, 8, ["selected"]),
|
|
1392
|
-
(C(), m(l, null, T(_t, (e) => _(
|
|
1381
|
+
(C(), m(l, null, T(_t, (e) => _(i, {
|
|
1393
1382
|
key: e,
|
|
1394
1383
|
selected: me.value === e,
|
|
1395
1384
|
onClick: (t) => q(e)
|
|
@@ -1400,42 +1389,42 @@ var W = /* @__PURE__ */ v({
|
|
|
1400
1389
|
]),
|
|
1401
1390
|
_: 1
|
|
1402
1391
|
}),
|
|
1403
|
-
_(
|
|
1392
|
+
_(n, {
|
|
1404
1393
|
icon: "add",
|
|
1405
1394
|
label: k(N).pdfZoomIn,
|
|
1406
1395
|
size: "xs",
|
|
1407
1396
|
onClick: d[5] ||= (e) => vt(1)
|
|
1408
1397
|
}, null, 8, ["label"])
|
|
1409
1398
|
])),
|
|
1410
|
-
_(
|
|
1399
|
+
_(n, {
|
|
1411
1400
|
icon: "search",
|
|
1412
1401
|
label: k(N).pdfSearch,
|
|
1413
1402
|
checked: Ot.value,
|
|
1414
1403
|
"onUpdate:checked": d[6] ||= (e) => e ? Bt() : Vt()
|
|
1415
1404
|
}, null, 8, ["label", "checked"]),
|
|
1416
1405
|
ae(e.$slots, "actions", { pdf: k(P) }),
|
|
1417
|
-
_(
|
|
1418
|
-
trigger: j(() => [_(
|
|
1406
|
+
_(r, { align: "right" }, {
|
|
1407
|
+
trigger: j(() => [_(n, {
|
|
1419
1408
|
icon: "more_vert",
|
|
1420
1409
|
label: k(N).pdfMore
|
|
1421
1410
|
}, null, 8, ["label"])]),
|
|
1422
1411
|
default: j(() => [
|
|
1423
1412
|
z.value ? (C(), m(l, { key: 0 }, [
|
|
1424
|
-
_(
|
|
1413
|
+
_(i, {
|
|
1425
1414
|
icon: "zoom_in",
|
|
1426
1415
|
onClick: d[7] ||= (e) => vt(1)
|
|
1427
1416
|
}, {
|
|
1428
1417
|
default: j(() => [g(D(k(N).pdfZoomIn), 1)]),
|
|
1429
1418
|
_: 1
|
|
1430
1419
|
}),
|
|
1431
|
-
_(
|
|
1420
|
+
_(i, {
|
|
1432
1421
|
icon: "zoom_out",
|
|
1433
1422
|
onClick: d[8] ||= (e) => vt(-1)
|
|
1434
1423
|
}, {
|
|
1435
1424
|
default: j(() => [g(D(k(N).pdfZoomOut), 1)]),
|
|
1436
1425
|
_: 1
|
|
1437
1426
|
}),
|
|
1438
|
-
_(
|
|
1427
|
+
_(i, {
|
|
1439
1428
|
icon: "fit_width",
|
|
1440
1429
|
onClick: d[9] ||= (e) => q("fit-width")
|
|
1441
1430
|
}, {
|
|
@@ -1443,7 +1432,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1443
1432
|
_: 1
|
|
1444
1433
|
})
|
|
1445
1434
|
], 64)) : p("", !0),
|
|
1446
|
-
_(
|
|
1435
|
+
_(i, {
|
|
1447
1436
|
icon: "list",
|
|
1448
1437
|
disabled: !k(P).outline.value.length,
|
|
1449
1438
|
onClick: d[10] ||= (e) => Ut("outline")
|
|
@@ -1451,14 +1440,14 @@ var W = /* @__PURE__ */ v({
|
|
|
1451
1440
|
default: j(() => [g(D(k(N).pdfOutline), 1)]),
|
|
1452
1441
|
_: 1
|
|
1453
1442
|
}, 8, ["disabled"]),
|
|
1454
|
-
_(
|
|
1443
|
+
_(i, {
|
|
1455
1444
|
icon: "rotate_right",
|
|
1456
1445
|
onClick: Dt
|
|
1457
1446
|
}, {
|
|
1458
1447
|
default: j(() => [g(D(k(N).pdfRotate), 1)]),
|
|
1459
1448
|
_: 1
|
|
1460
1449
|
}),
|
|
1461
|
-
v.downloadable ? (C(), f(
|
|
1450
|
+
v.downloadable ? (C(), f(i, {
|
|
1462
1451
|
key: 1,
|
|
1463
1452
|
icon: "download",
|
|
1464
1453
|
onClick: d[11] ||= (e) => k(P).download(v.fileName)
|
|
@@ -1466,7 +1455,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1466
1455
|
default: j(() => [g(D(k(N).pdfDownload), 1)]),
|
|
1467
1456
|
_: 1
|
|
1468
1457
|
})) : p("", !0),
|
|
1469
|
-
v.downloadable ? (C(), f(
|
|
1458
|
+
v.downloadable ? (C(), f(i, {
|
|
1470
1459
|
key: 2,
|
|
1471
1460
|
icon: "print",
|
|
1472
1461
|
onClick: d[12] ||= (e) => k(P).print()
|
|
@@ -1474,7 +1463,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1474
1463
|
default: j(() => [g(D(k(N).pdfPrint), 1)]),
|
|
1475
1464
|
_: 1
|
|
1476
1465
|
})) : p("", !0),
|
|
1477
|
-
_(
|
|
1466
|
+
_(i, {
|
|
1478
1467
|
icon: kn.value ? "fullscreen_exit" : "fullscreen",
|
|
1479
1468
|
onClick: An
|
|
1480
1469
|
}, {
|
|
@@ -1485,7 +1474,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1485
1474
|
_: 1
|
|
1486
1475
|
})
|
|
1487
1476
|
], 64)) : p("", !0),
|
|
1488
|
-
k(P).loading.value ? (C(), f(
|
|
1477
|
+
k(P).loading.value ? (C(), f(a, {
|
|
1489
1478
|
key: 1,
|
|
1490
1479
|
value: k(P).progress.value ? k(P).progress.value * 100 : void 0,
|
|
1491
1480
|
indeterminate: !k(P).progress.value,
|
|
@@ -1494,7 +1483,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1494
1483
|
])) : p("", !0),
|
|
1495
1484
|
_(u, { name: "m3-pdf-drop" }, {
|
|
1496
1485
|
default: j(() => [Ot.value ? (C(), m("div", Ee, [h("div", De, [
|
|
1497
|
-
_(
|
|
1486
|
+
_(t, {
|
|
1498
1487
|
name: "search",
|
|
1499
1488
|
size: 20,
|
|
1500
1489
|
class: "text-on-surface-variant"
|
|
@@ -1508,21 +1497,21 @@ var W = /* @__PURE__ */ v({
|
|
|
1508
1497
|
onKeydown: d[14] ||= le(ue((e) => Pt(Y.value + (e.shiftKey ? -1 : 1)), ["prevent"]), ["enter"])
|
|
1509
1498
|
}, null, 40, Oe), [[se, kt.value]]),
|
|
1510
1499
|
h("span", ke, D(Ht.value), 1),
|
|
1511
|
-
_(
|
|
1500
|
+
_(n, {
|
|
1512
1501
|
icon: "keyboard_arrow_up",
|
|
1513
1502
|
label: k(N).pdfSearchPrevious,
|
|
1514
1503
|
size: "xs",
|
|
1515
1504
|
disabled: !J.value.length,
|
|
1516
1505
|
onClick: d[15] ||= (e) => Pt(Y.value - 1)
|
|
1517
1506
|
}, null, 8, ["label", "disabled"]),
|
|
1518
|
-
_(
|
|
1507
|
+
_(n, {
|
|
1519
1508
|
icon: "keyboard_arrow_down",
|
|
1520
1509
|
label: k(N).pdfSearchNext,
|
|
1521
1510
|
size: "xs",
|
|
1522
1511
|
disabled: !J.value.length,
|
|
1523
1512
|
onClick: d[16] ||= (e) => Pt(Y.value + 1)
|
|
1524
1513
|
}, null, 8, ["label", "disabled"])
|
|
1525
|
-
]), _(
|
|
1514
|
+
]), _(n, {
|
|
1526
1515
|
icon: "close",
|
|
1527
1516
|
label: k(N).close,
|
|
1528
1517
|
onClick: Vt
|
|
@@ -1585,7 +1574,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1585
1574
|
class: "flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full text-on-surface-variant hover:bg-on-surface/8",
|
|
1586
1575
|
"aria-label": Yt.has(e.key) ? k(N).collapse : k(N).expand,
|
|
1587
1576
|
onClick: (t) => Zt(e.key)
|
|
1588
|
-
}, [_(
|
|
1577
|
+
}, [_(t, {
|
|
1589
1578
|
name: Yt.has(e.key) ? "expand_more" : "chevron_right",
|
|
1590
1579
|
size: 20
|
|
1591
1580
|
}, null, 8, ["name"])], 8, Le)) : (C(), m("span", Re)), (C(), f(oe(e.url ? "a" : "button"), {
|
|
@@ -1667,13 +1656,13 @@ var W = /* @__PURE__ */ v({
|
|
|
1667
1656
|
class: "flex w-full max-w-sm flex-col items-center gap-4 rounded-xl bg-surface-container-low p-6 text-center shadow-elevation-1",
|
|
1668
1657
|
onSubmit: ue(In, ["prevent"])
|
|
1669
1658
|
}, [
|
|
1670
|
-
_(
|
|
1659
|
+
_(t, {
|
|
1671
1660
|
name: "lock",
|
|
1672
1661
|
size: 32,
|
|
1673
1662
|
class: "text-primary"
|
|
1674
1663
|
}),
|
|
1675
1664
|
h("p", Ue, D(k(N).pdfPassword), 1),
|
|
1676
|
-
_(
|
|
1665
|
+
_(o, {
|
|
1677
1666
|
modelValue: Fn.value,
|
|
1678
1667
|
"onUpdate:modelValue": d[18] ||= (e) => Fn.value = e,
|
|
1679
1668
|
type: "password",
|
|
@@ -1688,7 +1677,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1688
1677
|
"error",
|
|
1689
1678
|
"error-label"
|
|
1690
1679
|
]),
|
|
1691
|
-
_(
|
|
1680
|
+
_(s, {
|
|
1692
1681
|
type: "submit",
|
|
1693
1682
|
disabled: !Fn.value,
|
|
1694
1683
|
class: "self-end"
|
|
@@ -1697,14 +1686,14 @@ var W = /* @__PURE__ */ v({
|
|
|
1697
1686
|
_: 1
|
|
1698
1687
|
}, 8, ["disabled"])
|
|
1699
1688
|
], 32)])) : k(P).error.value ? (C(), m("div", We, [
|
|
1700
|
-
_(
|
|
1689
|
+
_(t, {
|
|
1701
1690
|
name: "error",
|
|
1702
1691
|
size: 32,
|
|
1703
1692
|
class: "text-error"
|
|
1704
1693
|
}),
|
|
1705
1694
|
h("p", Ge, D(k(N).pdfError), 1),
|
|
1706
1695
|
h("p", Ke, D(k(P).error.value.message), 1)
|
|
1707
|
-
])) : k(P).loading.value ? (C(), m("div", qe, [_(
|
|
1696
|
+
])) : k(P).loading.value ? (C(), m("div", qe, [_(c, { label: k(N).pdfLoading }, null, 8, ["label"])])) : (C(), m("div", Je, [ae(e.$slots, "empty")]))], 34),
|
|
1708
1697
|
_(u, { name: "m3-pdf-fade" }, {
|
|
1709
1698
|
default: j(() => [k(P).doc.value && (pt.value || Dn.value) && k(P).numPages.value > 1 ? (C(), m("div", Ye, [h("div", {
|
|
1710
1699
|
class: "absolute right-1 flex items-center gap-2",
|
|
@@ -1723,7 +1712,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1723
1712
|
class: "absolute right-4 bottom-4 flex size-14 cursor-pointer items-center justify-center rounded-lg bg-primary-container text-on-primary-container shadow-elevation-3 transition-shadow outline-none hover:shadow-elevation-4 focus-visible:ring-2 focus-visible:ring-primary",
|
|
1724
1713
|
"aria-label": k(N).pdfAnnotate,
|
|
1725
1714
|
onClick: an
|
|
1726
|
-
}, [_(
|
|
1715
|
+
}, [_(t, {
|
|
1727
1716
|
name: "edit",
|
|
1728
1717
|
size: 24
|
|
1729
1718
|
})], 8, Qe)) : p("", !0)]),
|
|
@@ -1735,7 +1724,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1735
1724
|
role: "toolbar",
|
|
1736
1725
|
"aria-label": k(N).pdfAnnotate
|
|
1737
1726
|
}, [
|
|
1738
|
-
(C(!0), m(l, null, T(Rn.value, (e) => (C(), f(
|
|
1727
|
+
(C(!0), m(l, null, T(Rn.value, (e) => (C(), f(n, {
|
|
1739
1728
|
key: e.id,
|
|
1740
1729
|
icon: e.icon,
|
|
1741
1730
|
label: e.label,
|
|
@@ -1776,13 +1765,13 @@ var W = /* @__PURE__ */ v({
|
|
|
1776
1765
|
})
|
|
1777
1766
|
}, null, 4)], 10, nt))), 128))], 64)) : p("", !0),
|
|
1778
1767
|
d[26] ||= h("span", { class: "mx-1 h-6 w-px shrink-0 bg-outline-variant" }, null, -1),
|
|
1779
|
-
_(
|
|
1768
|
+
_(n, {
|
|
1780
1769
|
icon: "undo",
|
|
1781
1770
|
label: k(N).pdfUndo,
|
|
1782
1771
|
disabled: !dn.value,
|
|
1783
1772
|
onClick: fn
|
|
1784
1773
|
}, null, 8, ["label", "disabled"]),
|
|
1785
|
-
_(
|
|
1774
|
+
_(n, {
|
|
1786
1775
|
icon: "close",
|
|
1787
1776
|
label: k(N).close,
|
|
1788
1777
|
onClick: on
|
|
@@ -1796,7 +1785,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1796
1785
|
key: 1,
|
|
1797
1786
|
class: "absolute z-40 flex justify-center",
|
|
1798
1787
|
style: x(xn.value)
|
|
1799
|
-
}, [h("div", rt, [_(
|
|
1788
|
+
}, [h("div", rt, [_(s, {
|
|
1800
1789
|
variant: "text",
|
|
1801
1790
|
icon: "content_copy",
|
|
1802
1791
|
size: "sm",
|
|
@@ -1804,7 +1793,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1804
1793
|
}, {
|
|
1805
1794
|
default: j(() => [g(D(k(N).pdfCopy), 1)]),
|
|
1806
1795
|
_: 1
|
|
1807
|
-
}), _(
|
|
1796
|
+
}), _(s, {
|
|
1808
1797
|
variant: "text",
|
|
1809
1798
|
icon: "ink_highlighter",
|
|
1810
1799
|
size: "sm",
|
|
@@ -1824,7 +1813,7 @@ var W = /* @__PURE__ */ v({
|
|
|
1824
1813
|
class: "line-clamp-3 border-l-4 pl-2 text-body-medium text-on-surface-variant",
|
|
1825
1814
|
style: x({ borderColor: Q.value.color })
|
|
1826
1815
|
}, D(Q.value.quote), 5)) : p("", !0),
|
|
1827
|
-
_(
|
|
1816
|
+
_(o, {
|
|
1828
1817
|
"model-value": Q.value.text ?? "",
|
|
1829
1818
|
label: Q.value.type === "note" ? k(N).pdfNotePlaceholder : k(N).pdfAddComment,
|
|
1830
1819
|
multiline: "",
|
|
@@ -1848,13 +1837,13 @@ var W = /* @__PURE__ */ v({
|
|
|
1848
1837
|
style: x({ backgroundColor: e })
|
|
1849
1838
|
}, null, 6)], 8, ot))), 128)),
|
|
1850
1839
|
d[27] ||= h("span", { class: "flex-1" }, null, -1),
|
|
1851
|
-
_(
|
|
1840
|
+
_(n, {
|
|
1852
1841
|
icon: "delete",
|
|
1853
1842
|
label: k(N).pdfDelete,
|
|
1854
1843
|
size: "xs",
|
|
1855
1844
|
onClick: d[20] ||= (e) => mn(Q.value.id)
|
|
1856
1845
|
}, null, 8, ["label"]),
|
|
1857
|
-
_(
|
|
1846
|
+
_(n, {
|
|
1858
1847
|
icon: "check",
|
|
1859
1848
|
label: k(N).close,
|
|
1860
1849
|
size: "xs",
|
|
@@ -1865,7 +1854,6 @@ var W = /* @__PURE__ */ v({
|
|
|
1865
1854
|
], 16, ve));
|
|
1866
1855
|
}
|
|
1867
1856
|
});
|
|
1868
|
-
//#endregion
|
|
1869
1857
|
export { W as MPdfViewer, N as setPdfWorker, de as usePdf };
|
|
1870
1858
|
|
|
1871
1859
|
//# sourceMappingURL=pdf.js.map
|