@privyid/persona 1.1.2 → 1.2.1-rc.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.
Files changed (504) hide show
  1. package/dist/module.d.cts +2 -0
  2. package/dist/module.d.mts +2 -27
  3. package/dist/module.json +12 -0
  4. package/dist/module.mjs +13 -92
  5. package/dist/types.d.mts +13 -0
  6. package/package.json +25 -27
  7. package/dist/components/accordion/Accordion.vue +0 -121
  8. package/dist/components/accordion/AccordionItem.vue +0 -250
  9. package/dist/components/accordion/AccordionItems.vue +0 -50
  10. package/dist/components/accordion/AccordionItems.vue.d.ts +0 -41
  11. package/dist/components/accordion/index.d.ts +0 -7
  12. package/dist/components/accordion/index.mjs +0 -3
  13. package/dist/components/aspect-ratio/index.d.ts +0 -3
  14. package/dist/components/aspect-ratio/index.mjs +0 -21
  15. package/dist/components/aspect-ratio/utils/calculate-ratio.d.ts +0 -7
  16. package/dist/components/aspect-ratio/utils/calculate-ratio.mjs +0 -10
  17. package/dist/components/aspect-ratio/utils/resize-observer.d.ts +0 -1
  18. package/dist/components/aspect-ratio/utils/resize-observer.mjs +0 -22
  19. package/dist/components/avatar/Avatar.vue +0 -193
  20. package/dist/components/avatar/AvatarGroup.vue +0 -42
  21. package/dist/components/avatar/AvatarTruncate.vue +0 -33
  22. package/dist/components/avatar/AvatarTruncate.vue.d.ts +0 -31
  23. package/dist/components/avatar/assets/avatar-old.png +0 -0
  24. package/dist/components/avatar/assets/avatar.png +0 -0
  25. package/dist/components/avatar/index.d.ts +0 -2
  26. package/dist/components/avatar/index.mjs +0 -0
  27. package/dist/components/avatar/utils/color-hash.d.ts +0 -2
  28. package/dist/components/avatar/utils/color-hash.mjs +0 -22
  29. package/dist/components/avatar/utils/create-image.d.ts +0 -5
  30. package/dist/components/avatar/utils/create-image.mjs +0 -19
  31. package/dist/components/avatar/utils/load-image.d.ts +0 -1
  32. package/dist/components/avatar/utils/load-image.mjs +0 -22
  33. package/dist/components/badge/Badge.vue +0 -218
  34. package/dist/components/badge/index.d.ts +0 -1
  35. package/dist/components/badge/index.mjs +0 -0
  36. package/dist/components/banner/Banner.vue +0 -213
  37. package/dist/components/banner/index.d.ts +0 -1
  38. package/dist/components/banner/index.mjs +0 -0
  39. package/dist/components/breadcrumbs/Breadcrumb.vue +0 -62
  40. package/dist/components/breadcrumbs/BreadcrumbItem.vue +0 -95
  41. package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +0 -78
  42. package/dist/components/breadcrumbs/index.d.ts +0 -11
  43. package/dist/components/breadcrumbs/index.mjs +0 -3
  44. package/dist/components/button/Button.vue +0 -422
  45. package/dist/components/button/index.d.ts +0 -5
  46. package/dist/components/button/index.mjs +0 -0
  47. package/dist/components/button-group/ButtonGroup.vue +0 -220
  48. package/dist/components/button-group/index.d.ts +0 -6
  49. package/dist/components/button-group/index.mjs +0 -1
  50. package/dist/components/calendar/Calendar.vue +0 -465
  51. package/dist/components/calendar/adapter/adapter.d.ts +0 -32
  52. package/dist/components/calendar/adapter/adapter.mjs +0 -43
  53. package/dist/components/calendar/adapter/date.d.ts +0 -2
  54. package/dist/components/calendar/adapter/date.mjs +0 -86
  55. package/dist/components/calendar/adapter/month.d.ts +0 -2
  56. package/dist/components/calendar/adapter/month.mjs +0 -66
  57. package/dist/components/calendar/adapter/year.d.ts +0 -2
  58. package/dist/components/calendar/adapter/year.mjs +0 -63
  59. package/dist/components/camera/Camera.vue +0 -416
  60. package/dist/components/camera/adapter/adapter.d.ts +0 -41
  61. package/dist/components/camera/adapter/adapter.mjs +0 -3
  62. package/dist/components/camera/adapter/capture.d.ts +0 -5
  63. package/dist/components/camera/adapter/capture.mjs +0 -12
  64. package/dist/components/camera/adapter/liveness.d.ts +0 -5
  65. package/dist/components/camera/adapter/liveness.mjs +0 -46
  66. package/dist/components/camera/adapter/qr-code.d.ts +0 -2
  67. package/dist/components/camera/adapter/qr-code.mjs +0 -19
  68. package/dist/components/camera/assets/shutter.wav +0 -0
  69. package/dist/components/camera/utils/motion.d.ts +0 -29
  70. package/dist/components/camera/utils/motion.mjs +0 -88
  71. package/dist/components/camera/utils/take-picture.d.ts +0 -1
  72. package/dist/components/camera/utils/take-picture.mjs +0 -14
  73. package/dist/components/caption/Caption.vue +0 -122
  74. package/dist/components/caption/index.d.ts +0 -1
  75. package/dist/components/caption/index.mjs +0 -0
  76. package/dist/components/card/Card.vue +0 -354
  77. package/dist/components/card/CardSection.vue +0 -81
  78. package/dist/components/card/index.d.ts +0 -2
  79. package/dist/components/card/index.mjs +0 -0
  80. package/dist/components/carousel/Carousel.vue +0 -202
  81. package/dist/components/carousel/CarouselBody.vue +0 -18
  82. package/dist/components/carousel/CarouselItem.vue +0 -10
  83. package/dist/components/carousel/index.d.ts +0 -4
  84. package/dist/components/carousel/index.mjs +0 -1
  85. package/dist/components/chart/Chart.vue +0 -155
  86. package/dist/components/chart/ChartSet.vue +0 -32
  87. package/dist/components/chart/ChartVal.vue +0 -36
  88. package/dist/components/chart/adapter/adapter.d.ts +0 -7
  89. package/dist/components/chart/adapter/adapter.mjs +0 -3
  90. package/dist/components/chart/adapter/bubble.d.ts +0 -2
  91. package/dist/components/chart/adapter/bubble.mjs +0 -26
  92. package/dist/components/chart/adapter/index.d.ts +0 -3
  93. package/dist/components/chart/adapter/index.mjs +0 -16
  94. package/dist/components/chart/adapter/line.d.ts +0 -2
  95. package/dist/components/chart/adapter/line.mjs +0 -66
  96. package/dist/components/chart/adapter/pie.d.ts +0 -2
  97. package/dist/components/chart/adapter/pie.mjs +0 -34
  98. package/dist/components/chart/index.d.ts +0 -2
  99. package/dist/components/chart/index.mjs +0 -0
  100. package/dist/components/chart/utils/use-chart.d.ts +0 -2
  101. package/dist/components/chart/utils/use-chart.mjs +0 -9
  102. package/dist/components/checkbox/Checkbox.vue +0 -232
  103. package/dist/components/checkbox/icon/IconCheckbox.vue +0 -13
  104. package/dist/components/checkbox/icon/IconInderteminate.vue +0 -12
  105. package/dist/components/checkbox/index.d.ts +0 -7
  106. package/dist/components/checkbox/index.mjs +0 -34
  107. package/dist/components/collapse/Collapse.vue +0 -71
  108. package/dist/components/contextual-bar/ContextualBar.vue +0 -461
  109. package/dist/components/contextual-bar/index.d.ts +0 -1
  110. package/dist/components/contextual-bar/index.mjs +0 -0
  111. package/dist/components/cropper/Cropper.vue +0 -446
  112. package/dist/components/cropper/index.d.ts +0 -1
  113. package/dist/components/cropper/index.mjs +0 -3
  114. package/dist/components/cropper/utils/crop-image.d.ts +0 -44
  115. package/dist/components/cropper/utils/crop-image.mjs +0 -43
  116. package/dist/components/cropper/utils/use-pinch.d.ts +0 -8
  117. package/dist/components/cropper/utils/use-pinch.mjs +0 -50
  118. package/dist/components/cropper/utils/use-preview.d.ts +0 -3
  119. package/dist/components/cropper/utils/use-preview.mjs +0 -21
  120. package/dist/components/cropper/utils/use-ratio.d.ts +0 -9
  121. package/dist/components/cropper/utils/use-ratio.mjs +0 -24
  122. package/dist/components/datepicker/Datepicker.vue +0 -235
  123. package/dist/components/dialog/Dialog.vue +0 -149
  124. package/dist/components/dialog/DialogFooter.vue +0 -138
  125. package/dist/components/dialog/index.d.ts +0 -52
  126. package/dist/components/dialog/index.mjs +0 -86
  127. package/dist/components/divider/Divider.vue +0 -65
  128. package/dist/components/dot/Dot.vue +0 -103
  129. package/dist/components/dot/index.d.ts +0 -1
  130. package/dist/components/dot/index.mjs +0 -0
  131. package/dist/components/dropdown/Dropdown.vue +0 -441
  132. package/dist/components/dropdown/DropdownHeader.vue +0 -33
  133. package/dist/components/dropdown/DropdownItem.vue +0 -103
  134. package/dist/components/dropdown/DropdownText.vue +0 -34
  135. package/dist/components/dropdown/index.d.ts +0 -10
  136. package/dist/components/dropdown/index.mjs +0 -1
  137. package/dist/components/dropdown/utils/use-focus.d.ts +0 -5
  138. package/dist/components/dropdown/utils/use-focus.mjs +0 -22
  139. package/dist/components/dropdown-subitem/DropdownSubitem.vue +0 -182
  140. package/dist/components/dropdown-subitem/index.d.ts +0 -12
  141. package/dist/components/dropdown-subitem/index.mjs +0 -1
  142. package/dist/components/dropzone/Dropzone.vue +0 -261
  143. package/dist/components/dropzone/index.d.ts +0 -4
  144. package/dist/components/dropzone/index.mjs +0 -0
  145. package/dist/components/dropzone/utils/accept.d.ts +0 -1
  146. package/dist/components/dropzone/utils/accept.mjs +0 -17
  147. package/dist/components/filterbar/Filterbar.vue +0 -103
  148. package/dist/components/filterbar/Filterbar.vue.d.ts +0 -40
  149. package/dist/components/filterbar/index.d.ts +0 -45
  150. package/dist/components/filterbar/index.mjs +0 -7
  151. package/dist/components/filterbar/pinned/PinnedDate.vue +0 -100
  152. package/dist/components/filterbar/pinned/PinnedDate.vue.d.ts +0 -72
  153. package/dist/components/filterbar/pinned/PinnedMultiselect.vue +0 -113
  154. package/dist/components/filterbar/pinned/PinnedMultiselect.vue.d.ts +0 -48
  155. package/dist/components/filterbar/pinned/PinnedSelect.vue +0 -100
  156. package/dist/components/filterbar/pinned/PinnedSelect.vue.d.ts +0 -47
  157. package/dist/components/filterbar/pinned/PinnedToggle.vue +0 -77
  158. package/dist/components/filterbar/pinned/PinnedToggle.vue.d.ts +0 -59
  159. package/dist/components/form-group/FormGroup.vue +0 -169
  160. package/dist/components/global/router.d.ts +0 -24
  161. package/dist/components/global/router.mjs +0 -7
  162. package/dist/components/global/store.d.ts +0 -49
  163. package/dist/components/global/store.mjs +0 -52
  164. package/dist/components/global/types.d.ts +0 -4
  165. package/dist/components/global/types.mjs +0 -0
  166. package/dist/components/global/use-singleton.d.ts +0 -21
  167. package/dist/components/global/use-singleton.mjs +0 -60
  168. package/dist/components/global/utils/queue.d.ts +0 -16
  169. package/dist/components/global/utils/queue.mjs +0 -35
  170. package/dist/components/heading/Heading.vue +0 -140
  171. package/dist/components/heading/index.d.ts +0 -3
  172. package/dist/components/heading/index.mjs +0 -0
  173. package/dist/components/input/Input.vue +0 -243
  174. package/dist/components/input/index.d.ts +0 -6
  175. package/dist/components/input/index.mjs +0 -25
  176. package/dist/components/input/utils/accept.d.ts +0 -26
  177. package/dist/components/input/utils/accept.mjs +0 -81
  178. package/dist/components/input-color/index.d.ts +0 -1
  179. package/dist/components/input-color/index.mjs +0 -0
  180. package/dist/components/input-color/inputColor.vue +0 -264
  181. package/dist/components/input-file/InputFile.vue +0 -221
  182. package/dist/components/input-group/InputGroup.vue +0 -188
  183. package/dist/components/input-group/InputGroupAddon.vue +0 -42
  184. package/dist/components/input-group/index.d.ts +0 -6
  185. package/dist/components/input-group/index.mjs +0 -1
  186. package/dist/components/input-password/InputPassword.vue +0 -110
  187. package/dist/components/input-password/index.d.ts +0 -2
  188. package/dist/components/input-password/index.mjs +0 -17
  189. package/dist/components/input-pin/InputPin.vue +0 -170
  190. package/dist/components/input-pin/index.d.ts +0 -6
  191. package/dist/components/input-pin/index.mjs +0 -3
  192. package/dist/components/input-range/InputRange.vue +0 -303
  193. package/dist/components/input-range/utils/use-drag.d.ts +0 -3
  194. package/dist/components/input-range/utils/use-drag.mjs +0 -26
  195. package/dist/components/label/Label.vue +0 -265
  196. package/dist/components/label/index.d.ts +0 -1
  197. package/dist/components/label/index.mjs +0 -0
  198. package/dist/components/list-group/ListGroup.vue +0 -75
  199. package/dist/components/list-group/ListGroupItem.vue +0 -88
  200. package/dist/components/list-group/index.d.ts +0 -1
  201. package/dist/components/list-group/index.mjs +0 -0
  202. package/dist/components/main/Main.vue +0 -66
  203. package/dist/components/markdown/index.d.ts +0 -29
  204. package/dist/components/markdown/index.mjs +0 -25
  205. package/dist/components/meta.json +0 -171
  206. package/dist/components/modal/Modal.vue +0 -546
  207. package/dist/components/modal/index.d.ts +0 -1
  208. package/dist/components/modal/index.mjs +0 -0
  209. package/dist/components/nav/Nav.vue +0 -416
  210. package/dist/components/nav/NavCollapse.vue +0 -66
  211. package/dist/components/nav/NavForm.vue +0 -23
  212. package/dist/components/nav/NavItem.vue +0 -187
  213. package/dist/components/nav/NavItemDropdown.vue +0 -120
  214. package/dist/components/nav/NavSubItem.vue +0 -194
  215. package/dist/components/nav/NavText.vue +0 -19
  216. package/dist/components/nav/index.d.ts +0 -2
  217. package/dist/components/nav/index.mjs +0 -0
  218. package/dist/components/navbar/Navbar.vue +0 -284
  219. package/dist/components/navbar/NavbarBrand.vue +0 -31
  220. package/dist/components/navbar/NavbarNav.vue +0 -114
  221. package/dist/components/navbar/NavbarToggle.vue +0 -72
  222. package/dist/components/navbar/index.d.ts +0 -9
  223. package/dist/components/navbar/index.mjs +0 -1
  224. package/dist/components/navbar-menu/NavbarNavMenu.vue +0 -59
  225. package/dist/components/notify/Notify.vue +0 -51
  226. package/dist/components/notify/NotifyGroup.vue +0 -244
  227. package/dist/components/notify/NotifyItem.vue +0 -45
  228. package/dist/components/notify/index.d.ts +0 -20
  229. package/dist/components/notify/index.mjs +0 -18
  230. package/dist/components/overlay/Overlay.vue +0 -68
  231. package/dist/components/overlay/assets/icon-white.svg +0 -1
  232. package/dist/components/overlay/index.d.ts +0 -2
  233. package/dist/components/overlay/index.mjs +0 -8
  234. package/dist/components/overlay/utils/use-loading.d.ts +0 -4
  235. package/dist/components/overlay/utils/use-loading.mjs +0 -28
  236. package/dist/components/page/Page.vue +0 -106
  237. package/dist/components/pagination/Pagination.vue +0 -415
  238. package/dist/components/pagination/index.d.ts +0 -14
  239. package/dist/components/pagination/index.mjs +0 -38
  240. package/dist/components/pagination/utils/calculate-page.d.ts +0 -11
  241. package/dist/components/pagination/utils/calculate-page.mjs +0 -48
  242. package/dist/components/pdf-helipad/PdfHelipad.vue +0 -147
  243. package/dist/components/pdf-helipad/index.d.ts +0 -7
  244. package/dist/components/pdf-helipad/index.mjs +0 -0
  245. package/dist/components/pdf-helipad/utils/use-drag.d.ts +0 -3
  246. package/dist/components/pdf-helipad/utils/use-drag.mjs +0 -38
  247. package/dist/components/pdf-object/PdfObject.vue +0 -348
  248. package/dist/components/pdf-object/PdfObjectAddon.vue +0 -55
  249. package/dist/components/pdf-object/PdfObjectDebugger.vue +0 -70
  250. package/dist/components/pdf-object/PdfObjects.vue +0 -39
  251. package/dist/components/pdf-object/index.d.ts +0 -63
  252. package/dist/components/pdf-object/index.mjs +0 -110
  253. package/dist/components/pdf-object/utils/overlap.d.ts +0 -51
  254. package/dist/components/pdf-object/utils/overlap.mjs +0 -54
  255. package/dist/components/pdf-object/utils/position.d.ts +0 -64
  256. package/dist/components/pdf-object/utils/position.mjs +0 -48
  257. package/dist/components/pdf-object/utils/use-drag.d.ts +0 -9
  258. package/dist/components/pdf-object/utils/use-drag.mjs +0 -69
  259. package/dist/components/pdf-object/utils/use-drop.d.ts +0 -7
  260. package/dist/components/pdf-object/utils/use-drop.mjs +0 -57
  261. package/dist/components/pdf-object/utils/use-resize.d.ts +0 -17
  262. package/dist/components/pdf-object/utils/use-resize.mjs +0 -90
  263. package/dist/components/pdf-object/utils/use-selector.d.ts +0 -4
  264. package/dist/components/pdf-object/utils/use-selector.mjs +0 -26
  265. package/dist/components/pdf-text/PdfText.vue +0 -138
  266. package/dist/components/pdf-text/utils/text-to-image.d.ts +0 -68
  267. package/dist/components/pdf-text/utils/text-to-image.mjs +0 -120
  268. package/dist/components/pdf-viewer/PdfError.vue +0 -74
  269. package/dist/components/pdf-viewer/PdfLoading.vue +0 -24
  270. package/dist/components/pdf-viewer/PdfNavigation.vue +0 -169
  271. package/dist/components/pdf-viewer/PdfViewer.vue +0 -377
  272. package/dist/components/pdf-viewer/assets/pdf-loading.svg +0 -1
  273. package/dist/components/pdf-viewer/index.d.ts +0 -25
  274. package/dist/components/pdf-viewer/index.mjs +0 -24
  275. package/dist/components/pdf-viewer/utils/pdfjs.d.ts +0 -68
  276. package/dist/components/pdf-viewer/utils/pdfjs.mjs +0 -54
  277. package/dist/components/pdf-viewer/utils/use-idle.d.ts +0 -2
  278. package/dist/components/pdf-viewer/utils/use-idle.mjs +0 -25
  279. package/dist/components/pdf-viewer/utils/use-sticky.d.ts +0 -6
  280. package/dist/components/pdf-viewer/utils/use-sticky.mjs +0 -49
  281. package/dist/components/pdf-viewer/utils/use-viewer.d.ts +0 -27
  282. package/dist/components/pdf-viewer/utils/use-viewer.mjs +0 -191
  283. package/dist/components/popover/Popover.vue +0 -131
  284. package/dist/components/popover/index.d.ts +0 -17
  285. package/dist/components/popover/index.mjs +0 -52
  286. package/dist/components/popup/Popup.vue +0 -428
  287. package/dist/components/popup/index.d.ts +0 -38
  288. package/dist/components/popup/index.mjs +0 -31
  289. package/dist/components/progress/Progress.vue +0 -221
  290. package/dist/components/progress/ProgressItem.vue +0 -56
  291. package/dist/components/progress/index.d.ts +0 -2
  292. package/dist/components/progress/index.mjs +0 -0
  293. package/dist/components/progress-indicator/ProgressIndicator.vue +0 -132
  294. package/dist/components/progressbar/Progressbar.vue +0 -113
  295. package/dist/components/progressbar/index.d.ts +0 -7
  296. package/dist/components/progressbar/index.mjs +0 -11
  297. package/dist/components/pspdfkit/PspdfHelipad.vue +0 -165
  298. package/dist/components/pspdfkit/PspdfObject.vue +0 -341
  299. package/dist/components/pspdfkit/PspdfObjectAddon.vue +0 -30
  300. package/dist/components/pspdfkit/PspdfObjects.vue +0 -30
  301. package/dist/components/pspdfkit/PspdfViewer.vue +0 -257
  302. package/dist/components/pspdfkit/css/custom.css +0 -345
  303. package/dist/components/pspdfkit/index.d.ts +0 -8
  304. package/dist/components/pspdfkit/index.mjs +0 -7
  305. package/dist/components/pspdfkit/utils/position.d.ts +0 -1
  306. package/dist/components/pspdfkit/utils/position.mjs +0 -5
  307. package/dist/components/pspdfkit/utils/pspdfkit.d.ts +0 -17
  308. package/dist/components/pspdfkit/utils/pspdfkit.mjs +0 -53
  309. package/dist/components/pspdfkit/utils/use-drop.d.ts +0 -2
  310. package/dist/components/pspdfkit/utils/use-drop.mjs +0 -41
  311. package/dist/components/pspdfkit/utils/use-viewer.d.ts +0 -17
  312. package/dist/components/pspdfkit/utils/use-viewer.mjs +0 -167
  313. package/dist/components/qrcode/Qrcode.vue +0 -174
  314. package/dist/components/qrcode/index.d.ts +0 -1
  315. package/dist/components/qrcode/index.mjs +0 -0
  316. package/dist/components/radio/Radio.vue +0 -304
  317. package/dist/components/radio/index.d.ts +0 -7
  318. package/dist/components/radio/index.mjs +0 -16
  319. package/dist/components/richtext/Richtext.vue +0 -295
  320. package/dist/components/richtext/RichtextToolbarAdvance.vue +0 -37
  321. package/dist/components/richtext/RichtextToolbarSimple.vue +0 -158
  322. package/dist/components/richtext/control/RichtextControlFontFamily.vue +0 -56
  323. package/dist/components/richtext/control/RichtextControlFontSize.vue +0 -81
  324. package/dist/components/richtext/control/RichtextControlHighlight.vue +0 -135
  325. package/dist/components/richtext/control/RichtextControlHistory.vue +0 -27
  326. package/dist/components/richtext/control/RichtextControlImage.vue +0 -34
  327. package/dist/components/richtext/control/RichtextControlLink.vue +0 -53
  328. package/dist/components/richtext/control/RichtextControlList.vue +0 -45
  329. package/dist/components/richtext/control/RichtextControlTable.vue +0 -106
  330. package/dist/components/richtext/control/RichtextControlTextAlign.vue +0 -90
  331. package/dist/components/richtext/control/RichtextControlTextFormat.vue +0 -49
  332. package/dist/components/richtext/control/RichtextControlTextHeading.vue +0 -101
  333. package/dist/components/richtext/index.d.ts +0 -7
  334. package/dist/components/richtext/index.mjs +0 -7
  335. package/dist/components/richtext/popup/RichtextPopupImageEdit.vue +0 -65
  336. package/dist/components/richtext/popup/RichtextPopupLinkDetail.vue +0 -95
  337. package/dist/components/richtext/popup/RichtextPopupLinkEdit.vue +0 -74
  338. package/dist/components/richtext/tiptap/image-align.d.ts +0 -43
  339. package/dist/components/richtext/tiptap/image-align.mjs +0 -60
  340. package/dist/components/ringbar/Ringbar.vue +0 -158
  341. package/dist/components/ringbar/index.d.ts +0 -1
  342. package/dist/components/ringbar/index.mjs +0 -0
  343. package/dist/components/select/Select.vue +0 -576
  344. package/dist/components/select/SelectInput.vue +0 -123
  345. package/dist/components/select/SelectTags.vue +0 -58
  346. package/dist/components/select/adapter/adapter.d.ts +0 -17
  347. package/dist/components/select/adapter/adapter.mjs +0 -20
  348. package/dist/components/select/adapter/async-adapter.d.ts +0 -17
  349. package/dist/components/select/adapter/async-adapter.mjs +0 -61
  350. package/dist/components/select/adapter/basic-adapter.d.ts +0 -5
  351. package/dist/components/select/adapter/basic-adapter.mjs +0 -13
  352. package/dist/components/select/adapter/fuzzy-adapter.d.ts +0 -2
  353. package/dist/components/select/adapter/fuzzy-adapter.mjs +0 -24
  354. package/dist/components/select/index.d.ts +0 -15
  355. package/dist/components/select/index.mjs +0 -20
  356. package/dist/components/select/utils/use-on-scroll.d.ts +0 -2
  357. package/dist/components/select/utils/use-on-scroll.mjs +0 -9
  358. package/dist/components/select/utils/use-on-typing.d.ts +0 -3
  359. package/dist/components/select/utils/use-on-typing.mjs +0 -8
  360. package/dist/components/sheet/Sheet.vue +0 -230
  361. package/dist/components/shimmer/Shimmer.vue +0 -123
  362. package/dist/components/shimmer/index.d.ts +0 -2
  363. package/dist/components/shimmer/index.mjs +0 -10
  364. package/dist/components/sidebar/Sidebar.vue +0 -249
  365. package/dist/components/sidebar/SidebarBrand.vue +0 -108
  366. package/dist/components/sidebar/SidebarContent.vue +0 -21
  367. package/dist/components/sidebar/SidebarContent.vue.d.ts +0 -16
  368. package/dist/components/sidebar/SidebarNav.vue +0 -260
  369. package/dist/components/sidebar/index.d.ts +0 -9
  370. package/dist/components/sidebar/index.mjs +0 -1
  371. package/dist/components/sidebar-menu/SidebarMenu.vue +0 -123
  372. package/dist/components/sidebar-menu/SidebarMenuItem.vue +0 -70
  373. package/dist/components/sidebar-menu/index.d.ts +0 -138
  374. package/dist/components/sidebar-menu/index.mjs +0 -44
  375. package/dist/components/signature-draw/SignatureDraw.vue +0 -101
  376. package/dist/components/signature-draw/SignatureDrawDesktop.vue +0 -165
  377. package/dist/components/signature-draw/SignatureDrawMobile.vue +0 -244
  378. package/dist/components/signature-draw/utils/canvas.d.ts +0 -41
  379. package/dist/components/signature-draw/utils/canvas.mjs +0 -55
  380. package/dist/components/signature-draw/utils/image.d.ts +0 -7
  381. package/dist/components/signature-draw/utils/image.mjs +0 -23
  382. package/dist/components/signature-draw/utils/smooth-line.d.ts +0 -36
  383. package/dist/components/signature-draw/utils/smooth-line.mjs +0 -56
  384. package/dist/components/signature-draw/utils/straight-line.d.ts +0 -8
  385. package/dist/components/signature-draw/utils/straight-line.mjs +0 -24
  386. package/dist/components/signature-draw/utils/use-draw.d.ts +0 -7
  387. package/dist/components/signature-draw/utils/use-draw.mjs +0 -29
  388. package/dist/components/signature-text/SignatureText.vue +0 -138
  389. package/dist/components/signature-text/utils/formatter.d.ts +0 -2
  390. package/dist/components/signature-text/utils/formatter.mjs +0 -8
  391. package/dist/components/signature-text/utils/generate-text.d.ts +0 -8
  392. package/dist/components/signature-text/utils/generate-text.mjs +0 -28
  393. package/dist/components/signature-text/utils/load-font.d.ts +0 -1
  394. package/dist/components/signature-text/utils/load-font.mjs +0 -22
  395. package/dist/components/spinner/Spinner.vue +0 -156
  396. package/dist/components/spinner/SpinnerRing.vue +0 -34
  397. package/dist/components/spinner/SpinnerRinggo.vue +0 -64
  398. package/dist/components/spread/Spread.vue +0 -52
  399. package/dist/components/steps/Step.vue +0 -49
  400. package/dist/components/steps/StepSlider.vue +0 -37
  401. package/dist/components/steps/StepSlider.vue.d.ts +0 -34
  402. package/dist/components/steps/Steps.vue +0 -150
  403. package/dist/components/steps/index.d.ts +0 -30
  404. package/dist/components/steps/index.mjs +0 -53
  405. package/dist/components/steps/utils/hook.d.ts +0 -10
  406. package/dist/components/steps/utils/hook.mjs +0 -35
  407. package/dist/components/strengthbar/Strengthbar.vue +0 -97
  408. package/dist/components/subheading/Subheading.vue +0 -148
  409. package/dist/components/subheading/index.d.ts +0 -1
  410. package/dist/components/subheading/index.mjs +0 -0
  411. package/dist/components/table/Table.vue +0 -391
  412. package/dist/components/table/Table.vue.d.ts +0 -174
  413. package/dist/components/table/index.d.ts +0 -49
  414. package/dist/components/table/index.mjs +0 -37
  415. package/dist/components/table-flex/TableFlex.vue +0 -341
  416. package/dist/components/table-static/TableStatic.vue +0 -458
  417. package/dist/components/table-static/TableStaticRoot.vue +0 -42
  418. package/dist/components/table-static/TableStaticSort.vue +0 -23
  419. package/dist/components/table-static/index.d.ts +0 -64
  420. package/dist/components/table-static/index.mjs +0 -24
  421. package/dist/components/tabs/Tab.vue +0 -34
  422. package/dist/components/tabs/TabContent.vue +0 -53
  423. package/dist/components/tabs/TabContent.vue.d.ts +0 -33
  424. package/dist/components/tabs/Tabs.vue +0 -234
  425. package/dist/components/text/Text.vue +0 -235
  426. package/dist/components/text/index.d.ts +0 -2
  427. package/dist/components/text/index.mjs +0 -0
  428. package/dist/components/textarea/Textarea.vue +0 -188
  429. package/dist/components/time/Time.vue +0 -257
  430. package/dist/components/time/TimeItem.vue +0 -117
  431. package/dist/components/time/index.d.ts +0 -19
  432. package/dist/components/time/index.mjs +0 -53
  433. package/dist/components/time/utils/index.d.ts +0 -9
  434. package/dist/components/time/utils/index.mjs +0 -82
  435. package/dist/components/timepicker/Timepicker.vue +0 -230
  436. package/dist/components/toast/Toast.vue +0 -269
  437. package/dist/components/toast/index.d.ts +0 -50
  438. package/dist/components/toast/index.mjs +0 -44
  439. package/dist/components/toggle/Toggle.vue +0 -239
  440. package/dist/components/tooltip/Tooltip.vue +0 -172
  441. package/dist/components/tooltip/TooltipContainer.vue +0 -89
  442. package/dist/components/tooltip/index.d.ts +0 -17
  443. package/dist/components/tooltip/index.mjs +0 -113
  444. package/dist/components/tooltip/utils/create-handler.d.ts +0 -9
  445. package/dist/components/tooltip/utils/create-handler.mjs +0 -16
  446. package/dist/components/tooltip/utils/on-hover.d.ts +0 -23
  447. package/dist/components/tooltip/utils/on-hover.mjs +0 -42
  448. package/dist/components/tooltip/utils/parse-bindings.d.ts +0 -23
  449. package/dist/components/tooltip/utils/parse-bindings.mjs +0 -47
  450. package/dist/components/tour/Tour.vue +0 -112
  451. package/dist/components/tour/TourDialog.vue +0 -207
  452. package/dist/components/tour/TourHighlight.vue +0 -58
  453. package/dist/components/tour/core/base.d.ts +0 -59
  454. package/dist/components/tour/core/base.mjs +0 -69
  455. package/dist/components/tour/core/step/action.d.ts +0 -15
  456. package/dist/components/tour/core/step/action.mjs +0 -14
  457. package/dist/components/tour/core/step/conditional.d.ts +0 -25
  458. package/dist/components/tour/core/step/conditional.mjs +0 -57
  459. package/dist/components/tour/core/step/delay.d.ts +0 -8
  460. package/dist/components/tour/core/step/delay.mjs +0 -9
  461. package/dist/components/tour/core/step/dialog.d.ts +0 -11
  462. package/dist/components/tour/core/step/dialog.mjs +0 -25
  463. package/dist/components/tour/core/step/visit.d.ts +0 -9
  464. package/dist/components/tour/core/step/visit.mjs +0 -15
  465. package/dist/components/tour/core/step.d.ts +0 -37
  466. package/dist/components/tour/core/step.mjs +0 -46
  467. package/dist/components/tour/core/story.d.ts +0 -130
  468. package/dist/components/tour/core/story.mjs +0 -166
  469. package/dist/components/tour/core/tour.d.ts +0 -126
  470. package/dist/components/tour/core/tour.mjs +0 -196
  471. package/dist/components/tour/index.d.ts +0 -3
  472. package/dist/components/tour/index.mjs +0 -4
  473. package/dist/components/tour/utils/focus.d.ts +0 -1
  474. package/dist/components/tour/utils/focus.mjs +0 -6
  475. package/dist/components/tour/utils/is-visible.d.ts +0 -1
  476. package/dist/components/tour/utils/is-visible.mjs +0 -29
  477. package/dist/components/tour/utils/wait-element.d.ts +0 -6
  478. package/dist/components/tour/utils/wait-element.mjs +0 -45
  479. package/dist/components/truncate/Truncate.vue +0 -75
  480. package/dist/components/utils/array.d.ts +0 -2
  481. package/dist/components/utils/array.mjs +0 -19
  482. package/dist/components/utils/base64.d.ts +0 -8
  483. package/dist/components/utils/base64.mjs +0 -35
  484. package/dist/components/utils/color.d.ts +0 -17
  485. package/dist/components/utils/color.mjs +0 -14
  486. package/dist/components/utils/date.d.ts +0 -22
  487. package/dist/components/utils/date.mjs +0 -14
  488. package/dist/components/utils/value.d.ts +0 -8
  489. package/dist/components/utils/value.mjs +0 -7
  490. package/dist/components/utils/vnode.d.ts +0 -15
  491. package/dist/components/utils/vnode.mjs +0 -18
  492. package/dist/components/wizard/Wizard.vue +0 -84
  493. package/dist/components/wizard/WizardBody.vue +0 -50
  494. package/dist/components/wizard/WizardHeader.vue +0 -38
  495. package/dist/components/wizard/WizardHeader.vue.d.ts +0 -16
  496. package/dist/components/wizard/WizardStep.vue +0 -31
  497. package/dist/core/index.d.ts +0 -43
  498. package/dist/core/index.mjs +0 -148
  499. package/dist/directive/index.d.ts +0 -3
  500. package/dist/directive/index.mjs +0 -12
  501. package/dist/module.cjs +0 -5
  502. package/dist/module.d.ts +0 -27
  503. package/dist/runtime/plugins/persona.d.ts +0 -2
  504. package/dist/runtime/plugins/persona.js +0 -35
@@ -1,63 +0,0 @@
1
- import type { MaybeRef } from '@vueuse/core';
2
- import type { InjectionKey, Ref } from 'vue-demi';
3
- import type { PdfViewerContext } from '../pdf-viewer';
4
- import { focus as focus_ } from '../tour/utils/focus';
5
- export interface PdfObject {
6
- id: symbol;
7
- x?: number;
8
- y?: number;
9
- page?: number;
10
- width: number;
11
- height: number;
12
- }
13
- export interface PdfObjects extends PdfViewerContext {
14
- root: Ref<HTMLDivElement>;
15
- objects: Map<symbol, PdfObject>;
16
- }
17
- export interface PdfObjectSize {
18
- width: number;
19
- height: number;
20
- minWidth?: number;
21
- minHeight?: number;
22
- maxWidth?: number;
23
- maxHeight?: number;
24
- }
25
- export type PdfObjectProp = PdfObjectSize & Omit<PdfObject, 'id'>;
26
- export declare const PDF_OBJECTS_CONTEXT: InjectionKey<PdfObjects>;
27
- export declare const PDF_OBJECT_CONTEXT: InjectionKey<ReturnType<typeof useObjectModel>>;
28
- export declare function useSizeModel(props: PdfObjectSize): {
29
- ratio: import("vue-demi").ComputedRef<number>;
30
- width: Ref<number, number>;
31
- height: Ref<number, number>;
32
- minWidth: Ref<number, number>;
33
- maxWidth: Ref<number, number>;
34
- minHeight: Ref<number, number>;
35
- maxHeight: Ref<number, number>;
36
- };
37
- /**
38
- * V-model for PDF Object
39
- * @param props PDF Object props
40
- */
41
- export declare function useObjectModel(props: PdfObjectProp): {
42
- id: symbol;
43
- x: Ref<number | undefined, number | undefined>;
44
- y: Ref<number | undefined, number | undefined>;
45
- page: any;
46
- width: Ref<number, number>;
47
- height: Ref<number, number>;
48
- minWidth: Ref<number, number>;
49
- minHeight: Ref<number, number>;
50
- maxWidth: Ref<number, number>;
51
- maxHeight: Ref<number, number>;
52
- ratio: import("vue-demi").ComputedRef<number>;
53
- };
54
- /**
55
- * Reactive page element
56
- * @param page page number
57
- */
58
- export declare function usePage(page: MaybeRef<number>): Readonly<Ref<HTMLElement, HTMLElement>>;
59
- /**
60
- * focus with debounce
61
- */
62
- export declare const focus: import("lodash").DebouncedFunc<typeof focus_>;
63
- export type AddonPositionVariant = 'top' | 'left' | 'right' | 'bottom';
@@ -1,110 +0,0 @@
1
- import {
2
- tryOnBeforeMount,
3
- tryOnBeforeUnmount,
4
- until
5
- } from "@vueuse/core";
6
- import {
7
- computed,
8
- inject,
9
- reactive,
10
- unref,
11
- ref,
12
- watch
13
- } from "vue-demi";
14
- import { useSelector } from "./utils/use-selector.mjs";
15
- import { focus as focus_ } from "../tour/utils/focus.mjs";
16
- import { useClamp } from "@vueuse/math";
17
- import { debounce, round } from "lodash-es";
18
- export const PDF_OBJECTS_CONTEXT = Symbol("PDFObjects");
19
- export const PDF_OBJECT_CONTEXT = Symbol("PDFObjects");
20
- export function useSizeModel(props) {
21
- const ratio = computed(() => round(props.width / props.height, 2));
22
- const minWidth = ref(props.minWidth ?? props.width * 0.5);
23
- const maxWidth = ref(props.maxWidth ?? props.width * 2);
24
- const minHeight = ref(props.minHeight ?? props.height * 0.5);
25
- const maxHeight = ref(props.maxHeight ?? props.height * 2);
26
- const width = useClamp(props.width, minWidth, maxWidth);
27
- const height = useClamp(props.height, minHeight, maxHeight);
28
- watch(() => props.minWidth, (value) => {
29
- if (Number.isFinite(value))
30
- minWidth.value = value;
31
- });
32
- watch(() => props.minHeight, (value) => {
33
- if (Number.isFinite(value))
34
- minHeight.value = value;
35
- });
36
- watch(() => props.maxWidth, (value) => {
37
- if (Number.isFinite(value))
38
- maxWidth.value = value;
39
- });
40
- watch(() => props.maxHeight, (value) => {
41
- if (Number.isFinite(value))
42
- maxHeight.value = value;
43
- });
44
- return {
45
- ratio,
46
- width,
47
- height,
48
- minWidth,
49
- maxWidth,
50
- minHeight,
51
- maxHeight
52
- };
53
- }
54
- export function useObjectModel(props) {
55
- const {
56
- objects,
57
- page: currentPage
58
- } = inject(PDF_OBJECTS_CONTEXT);
59
- const page = ref(props.page ?? currentPage.value);
60
- const x = ref(props.x);
61
- const y = ref(props.y);
62
- const id = Symbol("PDFObject");
63
- const {
64
- width,
65
- height,
66
- minWidth,
67
- maxWidth,
68
- minHeight,
69
- maxHeight,
70
- ratio
71
- } = useSizeModel(props);
72
- objects.set(id, reactive({
73
- id,
74
- page,
75
- x,
76
- y,
77
- width,
78
- height
79
- }));
80
- tryOnBeforeMount(() => {
81
- if (!Number.isFinite(page.value)) {
82
- until(currentPage).toBeTruthy().then(() => {
83
- page.value = currentPage.value;
84
- });
85
- }
86
- });
87
- tryOnBeforeUnmount(() => {
88
- objects.delete(id);
89
- });
90
- return {
91
- id,
92
- x,
93
- y,
94
- page,
95
- width,
96
- height,
97
- minWidth,
98
- minHeight,
99
- maxWidth,
100
- maxHeight,
101
- ratio
102
- };
103
- }
104
- export function usePage(page) {
105
- const { root } = inject(PDF_OBJECTS_CONTEXT);
106
- const pageSelector = computed(() => `.page[data-page-number="${unref(page)}"]`);
107
- const pageEl = useSelector(pageSelector, root);
108
- return pageEl;
109
- }
110
- export const focus = debounce(focus_, 100);
@@ -1,51 +0,0 @@
1
- export interface ObjectSize {
2
- width: number;
3
- height: number;
4
- }
5
- export interface ObjectPosition {
6
- x: number;
7
- y: number;
8
- }
9
- export type CheckOverlapFn = (object: ObjectPosition, objects: Iterable<ObjectPosition>) => boolean;
10
- export interface GetEmptyPositionOptions {
11
- /**
12
- * Other objects position
13
- */
14
- objects: Iterable<ObjectPosition>;
15
- /**
16
- * Object size
17
- */
18
- size: ObjectSize;
19
- /**
20
- * Offside size
21
- */
22
- offside: ObjectSize;
23
- /**
24
- * Function to check overlap
25
- */
26
- checkOverlap?: CheckOverlapFn;
27
- }
28
- /**
29
- * Check center position of reference
30
- * @param object Object which want to place
31
- * @param reference Reference place
32
- */
33
- export declare function getCenter(object: ObjectSize, reference: ObjectSize): {
34
- x: number;
35
- y: number;
36
- };
37
- /**
38
- * Check object is outside from reference
39
- * @param object
40
- * @param reference
41
- */
42
- export declare function isOffside(object: ObjectSize & ObjectPosition, reference: ObjectSize): boolean;
43
- /**
44
- * Check Overlap Fn using Map as Cache Keys
45
- * @param objects
46
- */
47
- export declare function useMapSnapshot(objects: Iterable<ObjectPosition>): CheckOverlapFn;
48
- /**
49
- * Get empty position which not colide with other objects and not outside the reference place
50
- */
51
- export declare function getEmptyPosition(options: GetEmptyPositionOptions): ObjectPosition;
@@ -1,54 +0,0 @@
1
- import { memoize } from "lodash-es";
2
- export function getCenter(object, reference) {
3
- return {
4
- x: (reference.width - object.width) / 2,
5
- y: (reference.height - object.height) / 2
6
- };
7
- }
8
- export function isOffside(object, reference) {
9
- return object.x + object.width > reference.width || object.y + object.height > reference.height;
10
- }
11
- export function useMapSnapshot(objects) {
12
- const xMap = /* @__PURE__ */ new Map();
13
- const round = memoize((value) => Math.round(value / 15) * 15);
14
- for (const object of objects) {
15
- const x = round(object.x);
16
- const y = round(object.y);
17
- const yMap = xMap.get(x) ?? /* @__PURE__ */ new Map();
18
- yMap.set(y, object);
19
- xMap.set(x, yMap);
20
- }
21
- return (object) => {
22
- const x = round(object.x);
23
- const y = round(object.y);
24
- return xMap.get(x)?.get(y) !== void 0;
25
- };
26
- }
27
- export function getEmptyPosition(options) {
28
- const checkOverlap = options.checkOverlap ?? useMapSnapshot(options.objects);
29
- const center = getCenter(options.size, options.offside);
30
- const position = {
31
- ...options.size,
32
- ...center
33
- };
34
- let found = true;
35
- let loop = 0;
36
- let deltaY = 0;
37
- do {
38
- found = true;
39
- if (isOffside(position, options.offside)) {
40
- position.y = center.y + deltaY;
41
- position.x = center.x;
42
- deltaY += 15;
43
- found = false;
44
- }
45
- if (checkOverlap(position, options.objects)) {
46
- position.x += 15;
47
- position.y += 15;
48
- found = false;
49
- }
50
- } while (!found && ++loop <= 500);
51
- if (!found)
52
- console.warn("Cannot find empty position, max iteration reach");
53
- return position;
54
- }
@@ -1,64 +0,0 @@
1
- interface ComputePosition {
2
- /**
3
- * Root container element
4
- */
5
- container: HTMLElement;
6
- /**
7
- * Reference element where the object should be placed
8
- */
9
- reference: HTMLElement;
10
- /**
11
- * Zoom scale
12
- */
13
- scale: number;
14
- /**
15
- * X Position
16
- */
17
- x: number;
18
- /**
19
- * Y Position
20
- */
21
- y: number;
22
- }
23
- interface GetPosition {
24
- /**
25
- * Root container element
26
- */
27
- container?: HTMLElement;
28
- /**
29
- * Reference element where the object should be placed
30
- */
31
- reference: HTMLElement;
32
- /**
33
- * Object element
34
- */
35
- object: HTMLElement;
36
- /**
37
- * Zoom scale
38
- */
39
- scale: number;
40
- }
41
- /**
42
- * Find nearest relative parent element
43
- * @param element Element to search
44
- * @param container Maximum search element
45
- */
46
- export declare function findRelativeParent(element: HTMLElement, container?: HTMLElement): HTMLElement | null;
47
- /**
48
- * Computed X, Y position to Top, Left position
49
- * @param context
50
- */
51
- export declare function computePosition(context: ComputePosition): {
52
- top: number;
53
- left: number;
54
- };
55
- /**
56
- * Get X, Y position from object
57
- * @param context
58
- */
59
- export declare function getPosition(context: GetPosition): {
60
- x: number;
61
- y: number;
62
- page: number;
63
- };
64
- export {};
@@ -1,48 +0,0 @@
1
- import { clamp } from "lodash-es";
2
- export function findRelativeParent(element, container = document.body) {
3
- let parent = element.parentElement;
4
- do {
5
- const { position } = window.getComputedStyle(parent);
6
- if (position === "relative" || position === "absolute")
7
- return parent;
8
- parent = parent.parentElement;
9
- } while (parent && parent !== container);
10
- return container;
11
- }
12
- export function computePosition(context) {
13
- const {
14
- container,
15
- reference,
16
- x,
17
- y,
18
- scale
19
- } = context;
20
- const refBounding = reference.getBoundingClientRect();
21
- const parent = findRelativeParent(reference, container);
22
- const parentBounding = parent.getBoundingClientRect();
23
- const zeroTop = refBounding.top - parentBounding.top + parent.scrollTop;
24
- const zeroLeft = refBounding.left - parentBounding.left + parent.scrollLeft;
25
- return {
26
- top: zeroTop + y * scale,
27
- left: zeroLeft + x * scale
28
- };
29
- }
30
- export function getPosition(context) {
31
- const {
32
- reference,
33
- object,
34
- scale
35
- } = context;
36
- const objectBounding = object.getBoundingClientRect();
37
- const refBounding = reference.getBoundingClientRect();
38
- const maxX = Math.floor((refBounding.width - objectBounding.width) / scale);
39
- const maxY = Math.floor((refBounding.height - objectBounding.height) / scale);
40
- const x = (objectBounding.left - refBounding.left) / scale;
41
- const y = (objectBounding.top - refBounding.top) / scale;
42
- const page = Number.parseInt(reference.dataset.pageNumber);
43
- return {
44
- x: clamp(x, 1, maxX - 1),
45
- y: clamp(y, 1, maxY - 1),
46
- page
47
- };
48
- }
@@ -1,9 +0,0 @@
1
- import type { InteractEvent } from '@interactjs/types';
2
- import type { Ref } from 'vue-demi';
3
- export interface DragHooks {
4
- onstart?: (event: InteractEvent) => void;
5
- onmove?: (event: InteractEvent) => void;
6
- onend?: (event: InteractEvent) => void;
7
- ontap?: (event: InteractEvent) => void;
8
- }
9
- export default function useDrag(target: Ref<HTMLElement>, hooks?: DragHooks): import("vue-demi").ShallowRef<boolean, boolean>;
@@ -1,69 +0,0 @@
1
- import {
2
- inject,
3
- onScopeDispose,
4
- shallowRef,
5
- watch
6
- } from "vue-demi";
7
- import { DROPZONE_CONTEXT_SYMBOL } from "./use-drop.mjs";
8
- export default function useDrag(target, hooks) {
9
- const enable = shallowRef(true);
10
- const instance = shallowRef();
11
- const { hoverzone } = inject(DROPZONE_CONTEXT_SYMBOL);
12
- async function init() {
13
- destroy();
14
- if (target.value) {
15
- const { default: Interact } = await import("interactjs");
16
- instance.value = Interact(target.value).draggable({
17
- inertia: true,
18
- enabled: enable.value,
19
- autoScroll: {
20
- container: target.value.parentElement,
21
- margin: 100,
22
- speed: 300
23
- },
24
- onstart: hooks.onstart,
25
- onmove: hooks.onmove,
26
- onend: hooks.onend,
27
- modifiers: [
28
- Interact.modifiers.restrict({
29
- restriction: "parent",
30
- elementRect: {
31
- top: 0,
32
- left: 0,
33
- bottom: 1,
34
- right: 1
35
- }
36
- }),
37
- Interact.modifiers.restrictRect({
38
- endOnly: true,
39
- restriction: () => {
40
- if (hoverzone.value)
41
- return Interact.getElementRect(hoverzone.value);
42
- return {
43
- top: 0,
44
- left: 0,
45
- bottom: Number.POSITIVE_INFINITY,
46
- right: Number.POSITIVE_INFINITY
47
- };
48
- }
49
- })
50
- ]
51
- }).on("tap", hooks.ontap);
52
- }
53
- }
54
- function destroy() {
55
- if (instance.value)
56
- instance.value.unset();
57
- }
58
- watch(target, async () => {
59
- await init();
60
- });
61
- watch(enable, (value) => {
62
- if (instance.value)
63
- instance.value.draggable(value);
64
- });
65
- onScopeDispose(() => {
66
- destroy();
67
- });
68
- return enable;
69
- }
@@ -1,7 +0,0 @@
1
- import type { InjectionKey, Ref } from 'vue-demi';
2
- export interface DropzoneContext {
3
- dropzone: Ref<HTMLElement>;
4
- hoverzone: Ref<HTMLElement>;
5
- }
6
- export declare const DROPZONE_CONTEXT_SYMBOL: InjectionKey<DropzoneContext>;
7
- export default function useDrop(target: Ref<HTMLElement>, dropTarget: Ref<string>): import("vue-demi").ShallowRef<boolean, boolean>;
@@ -1,57 +0,0 @@
1
- import { useMutationObserver } from "@vueuse/core";
2
- import {
3
- onScopeDispose,
4
- provide,
5
- ref,
6
- shallowRef
7
- } from "vue-demi";
8
- export const DROPZONE_CONTEXT_SYMBOL = Symbol("DropzoneContext");
9
- export default function useDrop(target, dropTarget) {
10
- const enable = shallowRef(true);
11
- const instance = shallowRef();
12
- const dropzone = ref();
13
- const hoverzone = ref();
14
- async function init() {
15
- destroy();
16
- if (target.value) {
17
- const { default: Interact } = await import("interactjs");
18
- Interact.dynamicDrop(true);
19
- instance.value = Interact(dropTarget.value, { context: target.value }).dropzone({
20
- accept: ".pdf-object",
21
- overlap: 0.95,
22
- enabled: enable.value,
23
- checker(dragEvent, event, dropped, dropzone2, dropzoneElement, draggable, draggableElement) {
24
- return dropped && (target.value?.contains(draggableElement) || draggableElement.classList.contains("pdf-object--external"));
25
- },
26
- ondragenter(event) {
27
- hoverzone.value = event.target;
28
- event.target.classList.add("hover");
29
- },
30
- ondragleave(event) {
31
- event.target.classList.remove("hover");
32
- },
33
- ondrop(event) {
34
- hoverzone.value = event.target;
35
- dropzone.value = event.target;
36
- event.target.classList.remove("hover");
37
- }
38
- });
39
- }
40
- }
41
- function destroy() {
42
- if (instance.value)
43
- instance.value.unset();
44
- }
45
- useMutationObserver(target, (mutations) => {
46
- const isChildChanged = mutations.some((mutation) => {
47
- return mutation.type === "childList" && mutation.target.matches(dropTarget.value);
48
- });
49
- if (isChildChanged)
50
- void init();
51
- }, { subtree: true, childList: true });
52
- onScopeDispose(() => {
53
- destroy();
54
- });
55
- provide(DROPZONE_CONTEXT_SYMBOL, { dropzone, hoverzone });
56
- return enable;
57
- }
@@ -1,17 +0,0 @@
1
- import type { InteractEvent } from '@interactjs/types';
2
- import type { MaybeRef } from '@vueuse/core';
3
- import type { Ref } from 'vue-demi';
4
- export interface ResizeOptions {
5
- onstart?: (event: InteractEvent) => void;
6
- onmove?: (event: InteractEvent) => void;
7
- onend?: (event: InteractEvent) => void;
8
- handleSelector?: string;
9
- reference?: MaybeRef<HTMLElement>;
10
- minWidth?: MaybeRef<number>;
11
- maxWidth?: MaybeRef<number>;
12
- minHeight?: MaybeRef<number>;
13
- maxHeight?: MaybeRef<number>;
14
- scale?: MaybeRef<number>;
15
- ratio?: MaybeRef<number>;
16
- }
17
- export default function useResize(target: Ref<HTMLElement>, options?: ResizeOptions): import("vue-demi").ShallowRef<boolean, boolean>;
@@ -1,90 +0,0 @@
1
- import {
2
- onScopeDispose,
3
- shallowRef,
4
- unref,
5
- watch
6
- } from "vue-demi";
7
- export default function useResize(target, options = {}) {
8
- const enable = shallowRef(true);
9
- const instance = shallowRef();
10
- async function init() {
11
- destroy();
12
- if (target.value) {
13
- const { default: Interact } = await import("interactjs");
14
- instance.value = Interact(target.value).resizable({
15
- enabled: enable.value,
16
- edges: {
17
- left: false,
18
- top: false,
19
- bottom: options.handleSelector ?? ".resize-handle",
20
- right: options.handleSelector ?? ".resize-handle"
21
- },
22
- onstart: options.onstart,
23
- onmove: options.onmove,
24
- onend: options.onend,
25
- modifiers: [
26
- Interact.modifiers.aspectRatio({
27
- ratio: unref(options.ratio) ?? "preserve",
28
- modifiers: [
29
- Interact.modifiers.restrictSize({
30
- min: (x, y, element) => {
31
- const scale = unref(options.scale) ?? 1;
32
- return {
33
- ...element.rect,
34
- width: unref(options.minWidth) * scale,
35
- height: unref(options.minHeight) * scale
36
- };
37
- },
38
- max: (x, y, element) => {
39
- const scale = unref(options.scale) ?? 1;
40
- return {
41
- ...element.rect,
42
- width: unref(options.maxWidth) * scale,
43
- height: unref(options.maxHeight) * scale
44
- };
45
- }
46
- }),
47
- Interact.modifiers.restrictSize({
48
- max: (x, y, element) => {
49
- const reference = unref(options.reference);
50
- if (reference) {
51
- const bounding = Interact.getElementRect(reference);
52
- if (bounding) {
53
- const width = bounding.right - element.rect.left;
54
- const height = bounding.bottom - element.rect.top;
55
- return {
56
- ...bounding,
57
- width,
58
- height
59
- };
60
- }
61
- }
62
- return {
63
- ...element.rect,
64
- width: Number.POSITIVE_INFINITY,
65
- height: Number.POSITIVE_INFINITY
66
- };
67
- }
68
- })
69
- ]
70
- })
71
- ]
72
- });
73
- }
74
- }
75
- function destroy() {
76
- if (instance.value)
77
- instance.value.unset();
78
- }
79
- watch(target, async () => {
80
- await init();
81
- });
82
- watch(enable, (value) => {
83
- if (instance.value)
84
- instance.value.draggable(value);
85
- }, { immediate: true });
86
- onScopeDispose(() => {
87
- destroy();
88
- });
89
- return enable;
90
- }
@@ -1,4 +0,0 @@
1
- import type { MaybeRef } from '@vueuse/core';
2
- import type { Ref } from 'vue-demi';
3
- export declare function useSelector<E extends HTMLElement>(selector: MaybeRef<string>, container?: MaybeRef<HTMLElement>, all?: false): Readonly<Ref<E>>;
4
- export declare function useSelector<E extends HTMLElement>(selector: MaybeRef<string>, container?: MaybeRef<HTMLElement>, all?: true): Readonly<Ref<NodeListOf<E>>>;
@@ -1,26 +0,0 @@
1
- import {
2
- tryOnMounted,
3
- useMutationObserver
4
- } from "@vueuse/core";
5
- import {
6
- watch,
7
- unref,
8
- shallowRef
9
- } from "vue-demi";
10
- export function useSelector(selector, container = document.body, all = false) {
11
- const element = shallowRef();
12
- function getElement() {
13
- element.value = all ? unref(container)?.querySelectorAll(unref(selector)) : unref(container)?.querySelector(unref(selector));
14
- }
15
- watch(() => unref(selector), () => {
16
- getElement();
17
- });
18
- useMutationObserver(container, (mutations) => {
19
- if (mutations.some((mutation) => mutation.type === "childList"))
20
- getElement();
21
- }, { childList: true, subtree: true });
22
- tryOnMounted(() => {
23
- getElement();
24
- });
25
- return element;
26
- }