@privyid/persona 0.10.0 → 0.11.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/components/avatar/Avatar.vue +1 -0
- package/dist/components/avatar/Avatar.vue.d.ts +13 -13
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/badge/Badge.vue +48 -8
- package/dist/components/badge/Badge.vue.d.ts +2 -1
- package/dist/components/badge/index.d.ts +1 -2
- package/dist/components/banner/Banner.vue +19 -7
- package/dist/components/banner/Banner.vue.d.ts +1 -1
- package/dist/components/banner/index.d.ts +1 -1
- package/dist/components/breadcrumbs/BreadcrumbItem.vue +1 -0
- package/dist/components/breadcrumbs/BreadcrumbItem.vue.d.ts +1 -1
- package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +3 -0
- package/dist/components/breadcrumbs/index.d.ts +1 -1
- package/dist/components/button/Button.vue +69 -11
- package/dist/components/button/Button.vue.d.ts +4 -4
- package/dist/components/button/index.d.ts +4 -4
- package/dist/components/button-group/ButtonGroup.vue +11 -18
- package/dist/components/button-group/index.d.ts +6 -0
- package/dist/components/button-group/index.mjs +1 -0
- package/dist/components/calendar/Calendar.vue +8 -3
- package/dist/components/calendar/Calendar.vue.d.ts +31 -31
- package/dist/components/calendar/adapter/adapter.d.ts +1 -1
- package/dist/components/calendar/adapter/date.mjs +1 -1
- package/dist/components/camera/Camera.vue +7 -3
- package/dist/components/camera/Camera.vue.d.ts +19 -19
- package/dist/components/camera/adapter/adapter.d.ts +2 -2
- package/dist/components/camera/adapter/liveness.mjs +1 -1
- package/dist/components/caption/Caption.vue +1 -0
- package/dist/components/caption/index.d.ts +1 -1
- package/dist/components/card/Card.vue +9 -3
- package/dist/components/card/Card.vue.d.ts +5 -5
- package/dist/components/card/CardSection.vue.d.ts +2 -2
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/chart/Chart.vue +1 -0
- package/dist/components/chart/ChartVal.vue.d.ts +2 -2
- package/dist/components/chart/adapter/index.d.ts +1 -1
- package/dist/components/chart/index.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.vue +14 -5
- package/dist/components/checkbox/Checkbox.vue.d.ts +13 -13
- package/dist/components/collapse/Collapse.vue +2 -1
- package/dist/components/collapse/Collapse.vue.d.ts +1 -1
- package/dist/components/contextual-bar/ContextualBar.vue +15 -3
- package/dist/components/contextual-bar/ContextualBar.vue.d.ts +11 -11
- package/dist/components/contextual-bar/index.d.ts +1 -1
- package/dist/components/cropper/Cropper.vue +3 -2
- package/dist/components/cropper/Cropper.vue.d.ts +20 -20
- package/dist/components/cropper/utils/use-pinch.mjs +10 -2
- package/dist/components/datepicker/Datepicker.vue +1 -0
- package/dist/components/datepicker/Datepicker.vue.d.ts +16 -16
- package/dist/components/dialog/Dialog.vue.d.ts +2 -2
- package/dist/components/dialog/DialogFooter.vue +2 -2
- package/dist/components/dialog/DialogFooter.vue.d.ts +7 -7
- package/dist/components/dialog/index.d.ts +11 -16
- package/dist/components/divider/Divider.vue +8 -2
- package/dist/components/dot/Dot.vue +12 -2
- package/dist/components/dot/Dot.vue.d.ts +2 -1
- package/dist/components/dot/index.d.ts +1 -2
- package/dist/components/dropdown/Dropdown.vue +2 -0
- package/dist/components/dropdown/Dropdown.vue.d.ts +8 -8
- package/dist/components/dropdown/DropdownItem.vue +5 -1
- package/dist/components/dropdown/DropdownItem.vue.d.ts +3 -3
- package/dist/components/dropdown-subitem/DropdownSubitem.vue.d.ts +3 -3
- package/dist/components/dropzone/Dropzone.vue.d.ts +12 -12
- package/dist/components/dropzone/index.d.ts +1 -1
- package/dist/components/filterbar/Filterbar.vue +7 -6
- package/dist/components/filterbar/Filterbar.vue.d.ts +3 -3
- package/dist/components/filterbar/index.d.ts +1 -1
- package/dist/components/filterbar/pinned/{Date.vue.d.ts → PinnedDate.vue.d.ts} +8 -8
- package/dist/components/filterbar/pinned/{Multiselect.vue.d.ts → PinnedMultiselect.vue.d.ts} +5 -5
- package/dist/components/filterbar/pinned/{Select.vue.d.ts → PinnedSelect.vue.d.ts} +10 -10
- package/dist/components/filterbar/pinned/{Toggle.vue.d.ts → PinnedToggle.vue.d.ts} +11 -11
- package/dist/components/form-group/FormGroup.vue +9 -4
- package/dist/components/form-group/FormGroup.vue.d.ts +2 -2
- package/dist/components/global/context.d.ts +1 -1
- package/dist/components/global/use-singleton.d.ts +2 -2
- package/dist/components/global/utils/queue.d.ts +2 -2
- package/dist/components/heading/Heading.vue +6 -0
- package/dist/components/heading/index.d.ts +3 -3
- package/dist/components/input/Input.vue +24 -16
- package/dist/components/input/Input.vue.d.ts +3 -3
- package/dist/components/input-file/InputFile.vue +13 -2
- package/dist/components/input-file/InputFile.vue.d.ts +12 -12
- package/dist/components/input-group/InputGroup.vue +55 -41
- package/dist/components/input-group/InputGroupAddon.vue +10 -11
- package/dist/components/input-group/index.d.ts +6 -0
- package/dist/components/input-group/index.mjs +1 -0
- package/dist/components/input-password/InputPassword.vue +3 -1
- package/dist/components/input-pin/InputPin.vue +3 -3
- package/dist/components/input-pin/InputPin.vue.d.ts +3 -3
- package/dist/components/input-range/InputRange.vue +8 -5
- package/dist/components/input-range/InputRange.vue.d.ts +11 -11
- package/dist/components/input-range/utils/use-drag.mjs +5 -1
- package/dist/components/label/Label.vue +34 -7
- package/dist/components/label/Label.vue.d.ts +3 -4
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/label/index.mjs +0 -0
- package/dist/components/main/Main.vue +7 -3
- package/dist/components/modal/Modal.vue +19 -6
- package/dist/components/modal/Modal.vue.d.ts +8 -8
- package/dist/components/nav/Nav.vue +24 -8
- package/dist/components/nav/Nav.vue.d.ts +2 -2
- package/dist/components/nav/NavForm.vue +1 -1
- package/dist/components/nav/NavItem.vue +2 -0
- package/dist/components/nav/NavItem.vue.d.ts +6 -6
- package/dist/components/nav/NavItemDropdown.vue.d.ts +1 -1
- package/dist/components/nav/NavSubItem.vue +4 -0
- package/dist/components/nav/NavSubItem.vue.d.ts +2 -2
- package/dist/components/nav/index.d.ts +2 -2
- package/dist/components/navbar/Navbar.vue +5 -2
- package/dist/components/navbar/Navbar.vue.d.ts +5 -5
- package/dist/components/navbar/NavbarBrand.vue +2 -1
- package/dist/components/navbar/NavbarBrand.vue.d.ts +2 -2
- package/dist/components/navbar/NavbarNav.vue +10 -5
- package/dist/components/navbar/NavbarNav.vue.d.ts +2 -2
- package/dist/components/navbar/NavbarToggle.vue +2 -1
- package/dist/components/navbar/index.d.ts +1 -1
- package/dist/components/overlay/Overlay.vue +2 -1
- package/dist/components/page/Page.vue +13 -9
- package/dist/components/page/Page.vue.d.ts +3 -3
- package/dist/components/pagination/Pagination.vue +16 -9
- package/dist/components/pagination/Pagination.vue.d.ts +5 -5
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/index.mjs +1 -1
- package/dist/components/pagination/utils/calculate-page.d.ts +1 -1
- package/dist/components/pdf-helipad/PdfHelipad.vue.d.ts +1 -1
- package/dist/components/pdf-object/PdfObject.vue +3 -1
- package/dist/components/pdf-object/PdfObject.vue.d.ts +20 -20
- package/dist/components/pdf-object/PdfObjectDebugger.vue +4 -1
- package/dist/components/pdf-object/PdfObjectDebugger.vue.d.ts +5 -5
- package/dist/components/pdf-object/index.d.ts +5 -5
- package/dist/components/pdf-object/utils/overlap.d.ts +1 -1
- package/dist/components/pdf-object/utils/position.d.ts +1 -1
- package/dist/components/pdf-text/PdfText.vue.d.ts +5 -5
- package/dist/components/pdf-viewer/PdfError.vue +20 -3
- package/dist/components/pdf-viewer/PdfLoading.vue +1 -1
- package/dist/components/pdf-viewer/PdfNavigation.vue +9 -5
- package/dist/components/pdf-viewer/PdfViewer.vue +7 -1
- package/dist/components/pdf-viewer/PdfViewer.vue.d.ts +12 -12
- package/dist/components/pdf-viewer/index.d.ts +1 -1
- package/dist/components/pdf-viewer/utils/use-viewer.d.ts +7 -7
- package/dist/components/progress/Progress.vue +15 -7
- package/dist/components/progress/Progress.vue.d.ts +2 -2
- package/dist/components/radio/Radio.vue +17 -6
- package/dist/components/radio/Radio.vue.d.ts +9 -9
- package/dist/components/radio/index.d.ts +1 -1
- package/dist/components/select/Select.vue +10 -1
- package/dist/components/select/Select.vue.d.ts +11 -11
- package/dist/components/select/adapter/async-adapter.d.ts +2 -2
- package/dist/components/sidebar/Sidebar.vue +10 -4
- package/dist/components/sidebar/Sidebar.vue.d.ts +3 -3
- package/dist/components/sidebar/SidebarBrand.vue +2 -1
- package/dist/components/sidebar/SidebarBrand.vue.d.ts +2 -2
- package/dist/components/sidebar/SidebarNav.vue +5 -17
- package/dist/components/sidebar/SidebarNav.vue.d.ts +4 -4
- package/dist/components/sidebar/index.d.ts +1 -1
- package/dist/components/sidebar-menu/SidebarMenu.vue +1 -1
- package/dist/components/sidebar-menu/SidebarMenu.vue.d.ts +4 -4
- package/dist/components/signature-draw/SignatureDraw.vue.d.ts +3 -3
- package/dist/components/signature-draw/SignatureDrawDesktop.vue +4 -1
- package/dist/components/signature-draw/SignatureDrawDesktop.vue.d.ts +3 -3
- package/dist/components/signature-draw/SignatureDrawMobile.vue +5 -0
- package/dist/components/signature-draw/SignatureDrawMobile.vue.d.ts +3 -3
- package/dist/components/signature-draw/utils/canvas.d.ts +1 -1
- package/dist/components/signature-draw/utils/smooth-line.mjs +15 -0
- package/dist/components/signature-draw/utils/use-draw.mjs +5 -1
- package/dist/components/signature-text/SignatureText.vue +9 -4
- package/dist/components/signature-text/SignatureText.vue.d.ts +17 -8
- package/dist/components/steps/Step.vue.d.ts +5 -5
- package/dist/components/steps/Steps.vue.d.ts +1 -1
- package/dist/components/steps/index.d.ts +9 -9
- package/dist/components/steps/utils/hook.d.ts +1 -1
- package/dist/components/strengthbar/Strengthbar.vue +4 -0
- package/dist/components/subheading/Subheading.vue +1 -1
- package/dist/components/subheading/Subheading.vue.d.ts +2 -2
- package/dist/components/subheading/index.d.ts +1 -1
- package/dist/components/table/Table.vue +69 -1
- package/dist/components/table/Table.vue.d.ts +18 -9
- package/dist/components/tabs/Tabs.vue +4 -1
- package/dist/components/tabs/Tabs.vue.d.ts +2 -2
- package/dist/components/text/Text.vue.d.ts +2 -2
- package/dist/components/text/index.d.ts +1 -1
- package/dist/components/textarea/Textarea.vue +8 -7
- package/dist/components/textarea/Textarea.vue.d.ts +5 -5
- package/dist/components/toast/Toast.vue +17 -3
- package/dist/components/toast/Toast.vue.d.ts +1 -1
- package/dist/components/toast/ToastContainer.vue.d.ts +4 -4
- package/dist/components/toast/index.d.ts +2 -2
- package/dist/components/toggle/Toggle.vue +17 -7
- package/dist/components/toggle/Toggle.vue.d.ts +12 -12
- package/dist/components/tooltip/Tooltip.vue +6 -2
- package/dist/components/tooltip/Tooltip.vue.d.ts +7 -7
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.mjs +1 -1
- package/dist/components/tooltip/utils/create-handler.d.ts +1 -1
- package/dist/components/tour/Tour.vue.d.ts +3 -3
- package/dist/components/tour/TourDialog.vue +9 -1
- package/dist/components/tour/TourDialog.vue.d.ts +7 -7
- package/dist/components/tour/TourHighlight.vue.d.ts +2 -2
- package/dist/components/tour/core/base.d.ts +1 -1
- package/dist/components/tour/core/base.mjs +15 -0
- package/dist/components/tour/core/step/action.d.ts +4 -4
- package/dist/components/tour/core/step.d.ts +3 -3
- package/dist/components/tour/core/step.mjs +19 -0
- package/dist/components/tour/core/story.d.ts +1 -1
- package/dist/components/tour/core/story.mjs +81 -0
- package/dist/components/tour/core/tour.d.ts +1 -1
- package/dist/components/tour/core/tour.mjs +55 -1
- package/dist/components/truncate/Truncate.vue +8 -0
- package/dist/components/utils/base64.mjs +1 -1
- package/dist/components/utils/value.d.ts +4 -4
- package/dist/components/wizard/Wizard.vue.d.ts +6 -6
- package/dist/components/wizard/WizardBody.vue.d.ts +1 -1
- package/dist/components/wizard/WizardStep.vue.d.ts +4 -4
- package/dist/module.json +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +13 -11
- package/dist/components/badge/assets/images/img-guide-badge.svg +0 -1
- package/dist/components/card/assets/images/img-card-callout-01.svg +0 -1
- package/dist/components/contextual-bar/assets/images/img-background-contextualbar.svg +0 -14
- package/dist/components/contextual-bar/assets/images/img-bg-contextualbar.svg +0 -19
- package/dist/components/cropper/assets/sample-1.jpg +0 -0
- package/dist/components/modal/assets/images/img-modal-banner-sheet.jpg +0 -0
- package/dist/components/pdf-helipad/assets/helicopter.svg +0 -1
- package/dist/components/pdf-object-text/PdfObjectText.vue +0 -170
- package/dist/components/pdf-object-text/PdfObjectText.vue.d.ts +0 -140
- package/dist/components/pdf-object-text/utils/text-to-image.d.ts +0 -51
- package/dist/components/pdf-object-text/utils/text-to-image.mjs +0 -77
- package/dist/components/pdf-viewer/assets/Calibrator-v3.pdf +8 -99519
- package/dist/components/pdf-viewer/assets/Calibrator-v3_protected.pdf +0 -0
- package/dist/components/pdf-viewer/assets/fixed-vs-fit.svg +0 -186
- package/dist/components/pdf-viewer/assets/sample-3.pdf +0 -0
- package/dist/components/pdf-viewer/assets/sample-with-sign.pdf +0 -0
- package/dist/components/pdf-viewer/assets/sample.pdf +0 -18304
- package/dist/components/sidebar/assets/images/icon-flag.svg +0 -1
- package/dist/components/sidebar/assets/images/logo-privy-icon.svg +0 -1
- package/dist/components/sidebar/assets/images/logo-privy.svg +0 -1
- package/dist/components/sidebar-menu/assets/images/img-flag.svg +0 -1
- package/dist/components/signature-draw/assets/empty-img.png +0 -0
- package/dist/components/signature-text/sample/sample-signature.png +0 -0
- /package/dist/components/filterbar/pinned/{Date.vue → PinnedDate.vue} +0 -0
- /package/dist/components/filterbar/pinned/{Multiselect.vue → PinnedMultiselect.vue} +0 -0
- /package/dist/components/filterbar/pinned/{Select.vue → PinnedSelect.vue} +0 -0
- /package/dist/components/filterbar/pinned/{Toggle.vue → PinnedToggle.vue} +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1706.667" height="853.333" preserveAspectRatio="xMidYMid meet" version="1.0" viewBox="0 0 1280 640"><metadata>Created by potrace 1.15, written by Peter Selinger 2001-2017</metadata><g fill="#000" stroke="none"><path d="M11181 5765 c-35 -8 -98 -25 -140 -39 -74 -24 -313 -90 -456 -126 -38 -10 -149 -39 -245 -64 -190 -50 -196 -52 -475 -127 -104 -28 -224 -59 -265 -69 -103 -24 -350 -87 -435 -110 -119 -33 -187 -51 -270 -71 -44 -10 -102 -25 -130 -33 -27 -8 -113 -31 -190 -51 -77 -21 -178 -48 -225 -61 -47 -12 -130 -35 -185 -49 -55 -15 -113 -31 -130 -35 -74 -20 -244 -65 -400 -105 -93 -24 -197 -51 -230 -60 -213 -57 -536 -139 -830 -210 -104 -25 -218 -53 -253 -62 -49 -13 -68 -14 -88 -4 -18 8 -36 8 -62 1 -38 -10 -125 -30 -224 -51 -50 -10 -60 -10 -75 3 -29 26 -92 38 -199 38 -175 0 -339 -39 -408 -97 -29 -24 -34 -25 -106 -18 -129 13 -202 11 -238 -9 -31 -16 -46 -16 -160 -7 -70 6 -181 15 -247 21 -66 5 -237 23 -380 40 -143 17 -386 44 -540 60 -154 16 -320 34 -370 40 -49 6 -175 19 -280 30 -448 45 -1141 121 -1275 139 -213 29 -316 40 -505 56 -464 39 -744 66 -880 85 -38 5 -116 12 -171 16 -99 6 -102 6 -109 -16 -4 -14 -2 -27 6 -36 9 -8 124 -25 344 -49 605 -65 1244 -135 1895 -206 1352 -146 1580 -171 2115 -229 303 -33 553 -60 556 -60 3 0 11 -11 17 -25 8 -18 19 -25 40 -25 16 0 31 -3 34 -6 4 -3 53 -6 111 -7 123 -2 133 -8 179 -103 43 -90 38 -108 -47 -166 -67 -46 -104 -80 -123 -114 -5 -10 -52 -27 -121 -45 -204 -52 -330 -129 -564 -348 l-88 -82 -62 3 c-42 2 -65 -1 -72 -10 -7 -9 -43 -15 -101 -17 -50 -2 -102 -9 -118 -14 -15 -6 -66 -20 -114 -31 -48 -12 -116 -28 -151 -36 -77 -18 -117 -38 -152 -75 -34 -36 -44 -36 -58 -1 -6 15 -23 41 -37 57 l-25 30 21 -42 c30 -63 26 -77 -32 -119 -64 -45 -271 -227 -543 -477 -11 -11 -89 -80 -172 -155 -84 -74 -153 -139 -153 -144 0 -16 -19 -8 -25 12 -11 33 -41 23 -89 -31 -44 -49 -56 -81 -18 -46 23 21 32 21 32 0 0 -9 -46 -64 -103 -122 -127 -131 -162 -193 -162 -292 0 -59 4 -72 34 -116 52 -76 181 -151 364 -212 105 -35 473 -95 677 -111 69 -5 270 -10 447 -10 197 0 324 -4 328 -10 9 -14 -7 -17 -238 -36 -43 -4 -80 -11 -83 -15 -8 -14 35 -49 61 -49 17 0 46 -19 89 -59 35 -32 74 -62 87 -65 70 -19 99 -30 99 -37 0 -11 -20 -15 -200 -33 -363 -38 -500 -56 -500 -67 0 -11 54 -39 77 -39 10 0 43 -25 73 -55 40 -40 62 -55 82 -55 28 0 122 -33 238 -83 73 -32 218 -86 282 -106 92 -29 236 -28 518 4 124 14 286 32 360 40 74 8 176 19 225 25 50 5 128 14 175 20 47 5 159 17 250 26 91 8 201 19 245 24 215 23 287 30 370 35 273 15 1193 76 1211 80 35 8 42 56 10 68 -6 3 -200 -8 -431 -24 -427 -29 -543 -33 -582 -23 -23 6 -42 43 -46 89 -2 27 1 30 38 37 63 12 422 37 898 62 435 24 467 28 467 61 0 35 -24 38 -238 26 -248 -14 -349 -16 -422 -6 -51 6 -57 10 -77 44 -34 59 -99 358 -87 401 4 14 6 35 5 47 -1 13 5 23 16 27 10 3 27 20 36 36 16 27 17 31 2 36 -8 4 -35 3 -60 0 -44 -7 -44 -7 -60 30 -9 21 -13 44 -11 51 6 14 159 92 500 253 236 111 241 113 405 147 91 18 218 42 282 53 64 11 128 24 141 29 14 5 105 26 204 46 165 33 350 73 1494 325 626 138 1309 286 1479 321 l155 32 22 -27 c13 -14 26 -26 29 -26 9 0 75 -50 100 -75 43 -43 224 -188 309 -249 40 -28 68 -59 103 -117 43 -71 53 -81 104 -103 32 -14 104 -37 161 -51 56 -15 150 -40 207 -56 111 -31 170 -39 116 -15 -16 7 -59 20 -95 30 -121 32 -235 68 -244 77 -17 15 26 50 119 96 50 25 91 47 93 48 3 3 -34 104 -68 185 -46 107 -150 375 -150 385 0 10 112 38 206 52 38 6 80 40 89 72 l7 24 -161 -7 c-139 -6 -161 -5 -161 8 0 8 17 84 39 168 21 84 59 241 85 348 26 107 50 209 55 225 8 26 49 191 122 489 10 44 19 83 19 88 0 4 -36 8 -80 8 l-80 0 -14 35 c-27 63 -66 56 -66 -12 0 -30 -3 -33 -29 -33 -16 0 -38 -8 -49 -17 -17 -16 -131 -265 -132 -289 -1 -5 -9 -27 -20 -49 -11 -22 -19 -43 -20 -47 0 -4 -13 -35 -29 -70 -48 -104 -68 -152 -76 -178 -4 -14 -11 -30 -16 -36 -5 -6 -15 -28 -23 -50 -7 -21 -23 -59 -34 -84 -11 -25 -36 -85 -57 -135 -20 -49 -49 -119 -64 -155 l-27 -65 -90 -7 c-49 -4 -168 -11 -264 -17 -97 -5 -188 -15 -204 -21 -25 -9 -32 -7 -60 18 -38 34 -204 208 -307 323 -89 98 -118 117 -153 101 -14 -6 -32 -23 -42 -36 -15 -24 -15 -29 1 -68 20 -51 43 -78 208 -248 86 -88 125 -136 119 -142 -6 -6 -109 -14 -229 -19 -120 -5 -294 -13 -388 -19 -93 -5 -318 -17 -500 -25 -325 -14 -530 -26 -835 -46 -241 -15 -535 -29 -772 -36 l-216 -6 -22 44 c-22 44 -58 89 -70 89 -4 0 -73 36 -155 81 -82 44 -176 93 -210 109 -71 34 -204 107 -225 124 -35 29 -85 37 -275 44 l-199 7 -13 44 c-14 48 -38 81 -60 81 -8 0 -32 -9 -54 -21 -39 -19 -42 -19 -60 -3 -10 9 -24 32 -31 52 l-13 34 -305 -7 c-168 -4 -323 -10 -345 -15 -98 -20 -275 -33 -298 -23 -12 6 -29 13 -38 16 -19 6 -29 72 -29 188 0 49 4 80 13 87 6 5 379 107 827 227 1672 445 2513 674 3090 842 162 47 385 110 495 140 110 29 247 69 305 87 120 39 261 79 475 134 165 44 343 96 351 105 17 17 -37 97 -64 96 -9 0 -46 -7 -81 -14z m-4467 -3956 c42 -33 33 -46 -36 -53 -35 -4 -78 -9 -95 -13 -26 -4 -33 -2 -33 12 0 10 22 27 63 45 34 16 65 29 68 30 4 0 18 -9 33 -21z m211 -135 c0 -11 5 -27 12 -35 11 -14 38 -118 68 -264 11 -53 14 -99 10 -137 -8 -68 6 -62 -205 -78 -74 -5 -186 -15 -248 -21 -62 -6 -116 -8 -120 -4 -4 4 -9 91 -12 193 -3 103 -8 192 -12 198 -4 6 -3 39 3 73 9 50 15 62 33 65 11 3 102 10 201 16 99 6 191 13 205 14 50 6 65 2 65 -20z m-577 -102 c3 -99 9 -95 -158 -112 -120 -11 -233 -24 -360 -40 -41 -5 -127 -14 -190 -20 -63 -6 -124 -13 -136 -15 -29 -6 -54 63 -35 98 11 21 32 27 194 56 100 18 198 37 217 42 147 37 262 61 337 68 137 13 128 19 131 -77z m-9 -190 c9 -16 16 -72 19 -143 4 -106 2 -117 -14 -123 -10 -4 -93 -11 -184 -16 -91 -6 -235 -17 -320 -25 -85 -9 -184 -15 -220 -13 l-65 3 -27 55 c-34 67 -54 179 -35 196 6 6 91 18 187 28 96 10 261 28 365 40 265 32 277 32 294 -2z m-1469 -51 c0 -5 -9 -13 -20 -16 -32 -10 -23 -33 20 -55 46 -23 49 -38 16 -69 -20 -19 -47 -25 -192 -41 -93 -11 -216 -26 -274 -34 -99 -13 -108 -12 -155 6 -69 27 -85 44 -85 90 0 33 5 41 33 58 43 27 54 25 72 -10 21 -40 48 -38 73 4 25 42 31 43 253 60 213 17 259 18 259 7z m553 -96 c17 -70 16 -154 -2 -184 -7 -10 -62 -19 -188 -32 -98 -10 -193 -19 -210 -19 l-33 0 0 81 c0 44 5 90 11 102 9 16 9 22 0 25 -17 6 -13 27 7 45 12 11 52 20 123 28 57 6 131 14 164 19 108 14 108 14 128 -65z m-1349 9 c3 -9 6 -25 6 -35 0 -18 -6 -20 -51 -17 -55 3 -78 21 -66 52 9 23 102 23 111 0z m849 -184 c6 -48 5 -66 -5 -72 -7 -5 -78 -7 -158 -5 -123 4 -156 8 -219 30 -40 14 -76 29 -80 32 -17 18 45 33 205 49 97 10 188 22 203 26 41 13 45 8 54 -60z m1447 -49 c0 -40 -19 -90 -39 -100 -18 -10 -24 -11 -586 -71 -382 -41 -671 -70 -692 -70 -18 0 -44 69 -41 105 l3 30 110 12 c143 16 482 51 665 68 80 8 195 19 255 25 61 6 152 15 204 20 52 6 96 12 99 15 10 10 22 -8 22 -34z m-2008 -20 c202 -81 291 -101 441 -101 l127 0 0 -30 c0 -17 -6 -46 -14 -65 -11 -26 -23 -36 -53 -44 -82 -21 -474 -53 -591 -49 -116 4 -119 5 -214 51 -54 26 -101 47 -106 47 -20 0 -128 53 -149 73 -15 13 -23 32 -23 54 0 31 4 36 46 54 25 12 86 25 137 30 51 5 124 13 162 18 39 4 80 9 92 10 13 0 78 -21 145 -48z m-678 -37 c16 -42 8 -54 -37 -54 -46 0 -67 13 -67 41 0 28 94 40 104 13z" transform="translate(0.000000,640.000000) scale(0.100000,-0.100000)"/></g></svg>
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<PdfObject
|
|
3
|
-
v-model:x="vX"
|
|
4
|
-
v-model:y="vY"
|
|
5
|
-
v-model:page="vPage"
|
|
6
|
-
v-model:width="vWidth"
|
|
7
|
-
v-model:height="vHeight"
|
|
8
|
-
class="pdf-object-text"
|
|
9
|
-
:moveable="!isEdit"
|
|
10
|
-
:min-width="minWidth"
|
|
11
|
-
:max-width="maxWidth"
|
|
12
|
-
:min-height="minHeight"
|
|
13
|
-
:max-height="maxHeight">
|
|
14
|
-
<p-textarea
|
|
15
|
-
v-if="isEdit"
|
|
16
|
-
v-model="vText"
|
|
17
|
-
:placeholder="placeholder"
|
|
18
|
-
@blur="isEdit = false"
|
|
19
|
-
@keydown.esc.passive="isEdit = false" />
|
|
20
|
-
<img
|
|
21
|
-
v-else
|
|
22
|
-
class="pdf-object-text__result"
|
|
23
|
-
:src="image"
|
|
24
|
-
alt="pdf-object-text result">
|
|
25
|
-
</PdfObject>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script>
|
|
29
|
-
import { useVModel } from "@vueuse/core";
|
|
30
|
-
import {
|
|
31
|
-
defineComponent,
|
|
32
|
-
inject,
|
|
33
|
-
ref,
|
|
34
|
-
watch
|
|
35
|
-
} from "vue-demi";
|
|
36
|
-
import { PDF_OBJECTS_CONTEXT, useSizeModel } from "../pdf-object";
|
|
37
|
-
import PdfObject from "../pdf-object/PdfObject.vue";
|
|
38
|
-
import pTextarea from "../textarea/Textarea.vue";
|
|
39
|
-
import { getTextWidth, toImage } from "./utils/text-to-image";
|
|
40
|
-
const OBJECT_PADDING = 12 + 1;
|
|
41
|
-
export default defineComponent({
|
|
42
|
-
components: { PdfObject, pTextarea },
|
|
43
|
-
props: {
|
|
44
|
-
x: {
|
|
45
|
-
type: Number,
|
|
46
|
-
default: void 0
|
|
47
|
-
},
|
|
48
|
-
y: {
|
|
49
|
-
type: Number,
|
|
50
|
-
default: void 0
|
|
51
|
-
},
|
|
52
|
-
page: {
|
|
53
|
-
type: Number,
|
|
54
|
-
default: void 0
|
|
55
|
-
},
|
|
56
|
-
width: {
|
|
57
|
-
type: Number,
|
|
58
|
-
default: 198
|
|
59
|
-
},
|
|
60
|
-
height: {
|
|
61
|
-
type: Number,
|
|
62
|
-
default: 106
|
|
63
|
-
},
|
|
64
|
-
minWidth: {
|
|
65
|
-
type: Number,
|
|
66
|
-
default: void 0
|
|
67
|
-
},
|
|
68
|
-
minHeight: {
|
|
69
|
-
type: Number,
|
|
70
|
-
default: void 0
|
|
71
|
-
},
|
|
72
|
-
maxWidth: {
|
|
73
|
-
type: Number,
|
|
74
|
-
default: void 0
|
|
75
|
-
},
|
|
76
|
-
maxHeight: {
|
|
77
|
-
type: Number,
|
|
78
|
-
default: void 0
|
|
79
|
-
},
|
|
80
|
-
text: {
|
|
81
|
-
type: String,
|
|
82
|
-
default: ""
|
|
83
|
-
},
|
|
84
|
-
src: {
|
|
85
|
-
type: String,
|
|
86
|
-
default: ""
|
|
87
|
-
},
|
|
88
|
-
placeholder: {
|
|
89
|
-
type: String,
|
|
90
|
-
default: "(Double Click To Edit)"
|
|
91
|
-
},
|
|
92
|
-
editable: {
|
|
93
|
-
type: Boolean,
|
|
94
|
-
default: true
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
emits: [
|
|
98
|
-
"update:x",
|
|
99
|
-
"update:y",
|
|
100
|
-
"update:page",
|
|
101
|
-
"update:width",
|
|
102
|
-
"update:height",
|
|
103
|
-
"update:text",
|
|
104
|
-
"update:src"
|
|
105
|
-
],
|
|
106
|
-
setup(props) {
|
|
107
|
-
const vX = useVModel(props, "x");
|
|
108
|
-
const vY = useVModel(props, "y");
|
|
109
|
-
const vPage = useVModel(props, "page");
|
|
110
|
-
const vText = useVModel(props, "text");
|
|
111
|
-
const { scale } = inject(PDF_OBJECTS_CONTEXT);
|
|
112
|
-
const {
|
|
113
|
-
ratio,
|
|
114
|
-
width: vWidth,
|
|
115
|
-
height: vHeight
|
|
116
|
-
} = useSizeModel(props);
|
|
117
|
-
const isEdit = ref(true);
|
|
118
|
-
const image = ref("");
|
|
119
|
-
watch(vText, (text) => {
|
|
120
|
-
const textWidth = getTextWidth({
|
|
121
|
-
width: vWidth.value,
|
|
122
|
-
height: vHeight.value,
|
|
123
|
-
text
|
|
124
|
-
});
|
|
125
|
-
if (vWidth.value - OBJECT_PADDING * 2 <= textWidth) {
|
|
126
|
-
const width = textWidth + OBJECT_PADDING * 2;
|
|
127
|
-
const height = width / ratio.value;
|
|
128
|
-
vWidth.value = width;
|
|
129
|
-
vHeight.value = height;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
watch([vWidth, vHeight, vText], ([width, height, text]) => {
|
|
133
|
-
image.value = toImage({
|
|
134
|
-
text: text || props.placeholder,
|
|
135
|
-
height,
|
|
136
|
-
width,
|
|
137
|
-
scale: scale.value,
|
|
138
|
-
padding: OBJECT_PADDING,
|
|
139
|
-
fontSize: 16,
|
|
140
|
-
lineHeight: 1.5
|
|
141
|
-
});
|
|
142
|
-
}, { immediate: true });
|
|
143
|
-
function edit() {
|
|
144
|
-
if (props.editable)
|
|
145
|
-
isEdit.value = true;
|
|
146
|
-
}
|
|
147
|
-
return {
|
|
148
|
-
isEdit,
|
|
149
|
-
vX,
|
|
150
|
-
vY,
|
|
151
|
-
vPage,
|
|
152
|
-
vWidth,
|
|
153
|
-
vHeight,
|
|
154
|
-
vText,
|
|
155
|
-
image,
|
|
156
|
-
edit
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
</script>
|
|
161
|
-
|
|
162
|
-
<style lang="postcss">
|
|
163
|
-
.pdf-object-text {
|
|
164
|
-
&__result,
|
|
165
|
-
.textarea,
|
|
166
|
-
.textarea__input {
|
|
167
|
-
@apply w-full h-full border-0;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
</style>
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue-demi").DefineComponent<{
|
|
2
|
-
x: {
|
|
3
|
-
type: NumberConstructor;
|
|
4
|
-
default: any;
|
|
5
|
-
};
|
|
6
|
-
y: {
|
|
7
|
-
type: NumberConstructor;
|
|
8
|
-
default: any;
|
|
9
|
-
};
|
|
10
|
-
page: {
|
|
11
|
-
type: NumberConstructor;
|
|
12
|
-
default: any;
|
|
13
|
-
};
|
|
14
|
-
width: {
|
|
15
|
-
type: NumberConstructor;
|
|
16
|
-
default: number;
|
|
17
|
-
};
|
|
18
|
-
height: {
|
|
19
|
-
type: NumberConstructor;
|
|
20
|
-
default: number;
|
|
21
|
-
};
|
|
22
|
-
minWidth: {
|
|
23
|
-
type: NumberConstructor;
|
|
24
|
-
default: any;
|
|
25
|
-
};
|
|
26
|
-
minHeight: {
|
|
27
|
-
type: NumberConstructor;
|
|
28
|
-
default: any;
|
|
29
|
-
};
|
|
30
|
-
maxWidth: {
|
|
31
|
-
type: NumberConstructor;
|
|
32
|
-
default: any;
|
|
33
|
-
};
|
|
34
|
-
maxHeight: {
|
|
35
|
-
type: NumberConstructor;
|
|
36
|
-
default: any;
|
|
37
|
-
};
|
|
38
|
-
text: {
|
|
39
|
-
type: StringConstructor;
|
|
40
|
-
default: string;
|
|
41
|
-
};
|
|
42
|
-
src: {
|
|
43
|
-
type: StringConstructor;
|
|
44
|
-
default: string;
|
|
45
|
-
};
|
|
46
|
-
placeholder: {
|
|
47
|
-
type: StringConstructor;
|
|
48
|
-
default: string;
|
|
49
|
-
};
|
|
50
|
-
editable: {
|
|
51
|
-
type: BooleanConstructor;
|
|
52
|
-
default: boolean;
|
|
53
|
-
};
|
|
54
|
-
}, {
|
|
55
|
-
isEdit: import("vue-demi").Ref<boolean>;
|
|
56
|
-
vX: import("vue-demi").Ref<number> | import("vue-demi").WritableComputedRef<number>;
|
|
57
|
-
vY: import("vue-demi").Ref<number> | import("vue-demi").WritableComputedRef<number>;
|
|
58
|
-
vPage: import("vue-demi").Ref<number> | import("vue-demi").WritableComputedRef<number>;
|
|
59
|
-
vWidth: import("vue-demi").Ref<number>;
|
|
60
|
-
vHeight: import("vue-demi").Ref<number>;
|
|
61
|
-
vText: import("vue-demi").Ref<string> | import("vue-demi").WritableComputedRef<string>;
|
|
62
|
-
image: import("vue-demi").Ref<string>;
|
|
63
|
-
edit: () => void;
|
|
64
|
-
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:x" | "update:y" | "update:page" | "update:width" | "update:height" | "update:text" | "update:src")[], "update:x" | "update:y" | "update:page" | "update:width" | "update:height" | "update:text" | "update:src", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
65
|
-
x: {
|
|
66
|
-
type: NumberConstructor;
|
|
67
|
-
default: any;
|
|
68
|
-
};
|
|
69
|
-
y: {
|
|
70
|
-
type: NumberConstructor;
|
|
71
|
-
default: any;
|
|
72
|
-
};
|
|
73
|
-
page: {
|
|
74
|
-
type: NumberConstructor;
|
|
75
|
-
default: any;
|
|
76
|
-
};
|
|
77
|
-
width: {
|
|
78
|
-
type: NumberConstructor;
|
|
79
|
-
default: number;
|
|
80
|
-
};
|
|
81
|
-
height: {
|
|
82
|
-
type: NumberConstructor;
|
|
83
|
-
default: number;
|
|
84
|
-
};
|
|
85
|
-
minWidth: {
|
|
86
|
-
type: NumberConstructor;
|
|
87
|
-
default: any;
|
|
88
|
-
};
|
|
89
|
-
minHeight: {
|
|
90
|
-
type: NumberConstructor;
|
|
91
|
-
default: any;
|
|
92
|
-
};
|
|
93
|
-
maxWidth: {
|
|
94
|
-
type: NumberConstructor;
|
|
95
|
-
default: any;
|
|
96
|
-
};
|
|
97
|
-
maxHeight: {
|
|
98
|
-
type: NumberConstructor;
|
|
99
|
-
default: any;
|
|
100
|
-
};
|
|
101
|
-
text: {
|
|
102
|
-
type: StringConstructor;
|
|
103
|
-
default: string;
|
|
104
|
-
};
|
|
105
|
-
src: {
|
|
106
|
-
type: StringConstructor;
|
|
107
|
-
default: string;
|
|
108
|
-
};
|
|
109
|
-
placeholder: {
|
|
110
|
-
type: StringConstructor;
|
|
111
|
-
default: string;
|
|
112
|
-
};
|
|
113
|
-
editable: {
|
|
114
|
-
type: BooleanConstructor;
|
|
115
|
-
default: boolean;
|
|
116
|
-
};
|
|
117
|
-
}>> & {
|
|
118
|
-
"onUpdate:x"?: (...args: any[]) => any;
|
|
119
|
-
"onUpdate:y"?: (...args: any[]) => any;
|
|
120
|
-
"onUpdate:page"?: (...args: any[]) => any;
|
|
121
|
-
"onUpdate:width"?: (...args: any[]) => any;
|
|
122
|
-
"onUpdate:height"?: (...args: any[]) => any;
|
|
123
|
-
"onUpdate:text"?: (...args: any[]) => any;
|
|
124
|
-
"onUpdate:src"?: (...args: any[]) => any;
|
|
125
|
-
}, {
|
|
126
|
-
src: string;
|
|
127
|
-
text: string;
|
|
128
|
-
x: number;
|
|
129
|
-
y: number;
|
|
130
|
-
width: number;
|
|
131
|
-
height: number;
|
|
132
|
-
maxHeight: number;
|
|
133
|
-
maxWidth: number;
|
|
134
|
-
page: number;
|
|
135
|
-
minHeight: number;
|
|
136
|
-
minWidth: number;
|
|
137
|
-
placeholder: string;
|
|
138
|
-
editable: boolean;
|
|
139
|
-
}>;
|
|
140
|
-
export default _default;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
interface ToImage {
|
|
2
|
-
/**
|
|
3
|
-
* Canvas's element
|
|
4
|
-
*/
|
|
5
|
-
canvas?: HTMLCanvasElement;
|
|
6
|
-
/**
|
|
7
|
-
* Text to be generated
|
|
8
|
-
*/
|
|
9
|
-
text: string;
|
|
10
|
-
/**
|
|
11
|
-
* Image width
|
|
12
|
-
*/
|
|
13
|
-
width: number;
|
|
14
|
-
/**
|
|
15
|
-
* Image height
|
|
16
|
-
*/
|
|
17
|
-
height: number;
|
|
18
|
-
/**
|
|
19
|
-
* Text color
|
|
20
|
-
* @default '#4a5362'
|
|
21
|
-
*/
|
|
22
|
-
color?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Text font size
|
|
25
|
-
* @default 16
|
|
26
|
-
*/
|
|
27
|
-
fontSize?: number;
|
|
28
|
-
/**
|
|
29
|
-
* Text font family
|
|
30
|
-
* @default 'DM Sans'
|
|
31
|
-
*/
|
|
32
|
-
fontFamily?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Text line height
|
|
35
|
-
* @default 1.65
|
|
36
|
-
*/
|
|
37
|
-
lineHeight?: number;
|
|
38
|
-
/**
|
|
39
|
-
* Text box padding
|
|
40
|
-
* @default 12
|
|
41
|
-
*/
|
|
42
|
-
padding?: number;
|
|
43
|
-
/**
|
|
44
|
-
* Render scale
|
|
45
|
-
* @default 1
|
|
46
|
-
*/
|
|
47
|
-
scale?: number;
|
|
48
|
-
}
|
|
49
|
-
export declare function toImage(options: ToImage): string;
|
|
50
|
-
export declare function getTextWidth(options: ToImage): number;
|
|
51
|
-
export {};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { createCanvas } from "../../signature-draw/utils/canvas.mjs";
|
|
2
|
-
function wrapText(context, text, x0, y0, maxWidth, lineHeight) {
|
|
3
|
-
const x = x0;
|
|
4
|
-
let line = "";
|
|
5
|
-
let lineCount = 0;
|
|
6
|
-
let y = y0;
|
|
7
|
-
let i;
|
|
8
|
-
let test;
|
|
9
|
-
let metrics;
|
|
10
|
-
for (const paragraph of text.split("\n")) {
|
|
11
|
-
const words = paragraph.split(" ");
|
|
12
|
-
for (i = 0; i < words.length; i++) {
|
|
13
|
-
test = words[i];
|
|
14
|
-
metrics = context.measureText(test);
|
|
15
|
-
while (metrics.width > maxWidth) {
|
|
16
|
-
test = test.slice(0, Math.max(0, test.length - 1));
|
|
17
|
-
metrics = context.measureText(test);
|
|
18
|
-
}
|
|
19
|
-
if (words[i] !== test) {
|
|
20
|
-
words.splice(i + 1, 0, words[i].slice(test.length));
|
|
21
|
-
words[i] = test;
|
|
22
|
-
}
|
|
23
|
-
test = `${line + words[i]} `;
|
|
24
|
-
metrics = context.measureText(test);
|
|
25
|
-
if (metrics.width > maxWidth && i > 0) {
|
|
26
|
-
context.fillText(line, x, y);
|
|
27
|
-
line = `${words[i]} `;
|
|
28
|
-
y += lineHeight;
|
|
29
|
-
lineCount += 1;
|
|
30
|
-
} else
|
|
31
|
-
line = test;
|
|
32
|
-
}
|
|
33
|
-
context.fillText(line, x, y);
|
|
34
|
-
y += lineHeight;
|
|
35
|
-
lineCount += 1;
|
|
36
|
-
line = "";
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
height: y,
|
|
40
|
-
count: lineCount
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export function toImage(options) {
|
|
44
|
-
const canvas = options.canvas ?? createCanvas(options.width, options.height);
|
|
45
|
-
const context = canvas.getContext("2d");
|
|
46
|
-
const text = options.text;
|
|
47
|
-
const width = options.width;
|
|
48
|
-
const fontFamily = options.fontFamily ?? "DM Sans";
|
|
49
|
-
const fontSize = options.fontSize ?? 16;
|
|
50
|
-
const lineHeight = options.lineHeight ?? 1.65;
|
|
51
|
-
const padding = options.padding ?? 12;
|
|
52
|
-
const color = options.color ?? "#0D1117";
|
|
53
|
-
context.font = `${fontSize}px ${JSON.stringify(fontFamily)}`;
|
|
54
|
-
context.fillStyle = color;
|
|
55
|
-
context.textBaseline = "top";
|
|
56
|
-
wrapText(
|
|
57
|
-
context,
|
|
58
|
-
text,
|
|
59
|
-
padding,
|
|
60
|
-
padding,
|
|
61
|
-
width - padding * 2 - 2,
|
|
62
|
-
fontSize * lineHeight
|
|
63
|
-
);
|
|
64
|
-
return canvas.toDataURL("image/png");
|
|
65
|
-
}
|
|
66
|
-
export function getTextWidth(options) {
|
|
67
|
-
const canvas = options.canvas ?? createCanvas(options.width, options.height);
|
|
68
|
-
const context = canvas.getContext("2d");
|
|
69
|
-
const text = options.text;
|
|
70
|
-
const fontFamily = options.fontFamily ?? "DM Sans";
|
|
71
|
-
const fontSize = options.fontSize ?? 16;
|
|
72
|
-
const color = options.color ?? "#0D1117";
|
|
73
|
-
context.font = `${fontSize}px ${JSON.stringify(fontFamily)}`;
|
|
74
|
-
context.fillStyle = color;
|
|
75
|
-
context.textBaseline = "top";
|
|
76
|
-
return Math.max(...text.split("\n").map((p) => context.measureText(p).width));
|
|
77
|
-
}
|