@privyid/persona 1.2.1 → 1.2.2-dev.1

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 (659) hide show
  1. package/dist/components/accordion/Accordion.vue +111 -0
  2. package/dist/components/accordion/Accordion.vue.d.ts +80 -0
  3. package/dist/components/accordion/AccordionItem.vue +224 -0
  4. package/dist/components/accordion/AccordionItem.vue.d.ts +121 -0
  5. package/dist/components/accordion/AccordionItems.vue +50 -0
  6. package/dist/components/accordion/AccordionItems.vue.d.ts +41 -0
  7. package/dist/components/accordion/index.d.ts +7 -0
  8. package/dist/components/accordion/index.mjs +3 -0
  9. package/dist/components/aspect-ratio/index.d.ts +3 -0
  10. package/dist/components/aspect-ratio/index.mjs +21 -0
  11. package/dist/components/aspect-ratio/utils/calculate-ratio.d.ts +7 -0
  12. package/dist/components/aspect-ratio/utils/calculate-ratio.mjs +10 -0
  13. package/dist/components/aspect-ratio/utils/resize-observer.d.ts +1 -0
  14. package/dist/components/aspect-ratio/utils/resize-observer.mjs +22 -0
  15. package/dist/components/avatar/Avatar.vue +167 -0
  16. package/dist/components/avatar/Avatar.vue.d.ts +91 -0
  17. package/dist/components/avatar/AvatarGroup.vue +39 -0
  18. package/dist/components/avatar/AvatarGroup.vue.d.ts +40 -0
  19. package/dist/components/avatar/AvatarTruncate.vue +33 -0
  20. package/dist/components/avatar/AvatarTruncate.vue.d.ts +31 -0
  21. package/dist/components/avatar/assets/avatar-old.png +0 -0
  22. package/dist/components/avatar/assets/avatar.png +0 -0
  23. package/dist/components/avatar/index.d.ts +2 -0
  24. package/dist/components/avatar/index.mjs +0 -0
  25. package/dist/components/avatar/utils/color-hash.d.ts +2 -0
  26. package/dist/components/avatar/utils/color-hash.mjs +22 -0
  27. package/dist/components/avatar/utils/create-image.d.ts +5 -0
  28. package/dist/components/avatar/utils/create-image.mjs +19 -0
  29. package/dist/components/avatar/utils/load-image.d.ts +1 -0
  30. package/dist/components/avatar/utils/load-image.mjs +22 -0
  31. package/dist/components/badge/Badge.vue +210 -0
  32. package/dist/components/badge/Badge.vue.d.ts +41 -0
  33. package/dist/components/badge/index.d.ts +1 -0
  34. package/dist/components/badge/index.mjs +0 -0
  35. package/dist/components/banner/Banner.vue +183 -0
  36. package/dist/components/banner/Banner.vue.d.ts +91 -0
  37. package/dist/components/banner/index.d.ts +1 -0
  38. package/dist/components/banner/index.mjs +0 -0
  39. package/dist/components/breadcrumbs/Breadcrumb.vue +55 -0
  40. package/dist/components/breadcrumbs/Breadcrumb.vue.d.ts +59 -0
  41. package/dist/components/breadcrumbs/BreadcrumbItem.vue +83 -0
  42. package/dist/components/breadcrumbs/BreadcrumbItem.vue.d.ts +40 -0
  43. package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +73 -0
  44. package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue.d.ts +38 -0
  45. package/dist/components/breadcrumbs/index.d.ts +11 -0
  46. package/dist/components/breadcrumbs/index.mjs +3 -0
  47. package/dist/components/button/Button.vue +391 -0
  48. package/dist/components/button/Button.vue.d.ts +108 -0
  49. package/dist/components/button/index.d.ts +5 -0
  50. package/dist/components/button/index.mjs +0 -0
  51. package/dist/components/button-group/ButtonGroup.vue +211 -0
  52. package/dist/components/button-group/ButtonGroup.vue.d.ts +40 -0
  53. package/dist/components/button-group/index.d.ts +6 -0
  54. package/dist/components/button-group/index.mjs +1 -0
  55. package/dist/components/calendar/Calendar.vue +396 -0
  56. package/dist/components/calendar/Calendar.vue.d.ts +120 -0
  57. package/dist/components/calendar/adapter/adapter.d.ts +32 -0
  58. package/dist/components/calendar/adapter/adapter.mjs +43 -0
  59. package/dist/components/calendar/adapter/date.d.ts +2 -0
  60. package/dist/components/calendar/adapter/date.mjs +86 -0
  61. package/dist/components/calendar/adapter/month.d.ts +2 -0
  62. package/dist/components/calendar/adapter/month.mjs +66 -0
  63. package/dist/components/calendar/adapter/year.d.ts +2 -0
  64. package/dist/components/calendar/adapter/year.mjs +63 -0
  65. package/dist/components/camera/Camera.vue +356 -0
  66. package/dist/components/camera/Camera.vue.d.ts +123 -0
  67. package/dist/components/camera/adapter/adapter.d.ts +41 -0
  68. package/dist/components/camera/adapter/adapter.mjs +3 -0
  69. package/dist/components/camera/adapter/capture.d.ts +5 -0
  70. package/dist/components/camera/adapter/capture.mjs +12 -0
  71. package/dist/components/camera/adapter/liveness.d.ts +5 -0
  72. package/dist/components/camera/adapter/liveness.mjs +46 -0
  73. package/dist/components/camera/adapter/qr-code.d.ts +2 -0
  74. package/dist/components/camera/adapter/qr-code.mjs +19 -0
  75. package/dist/components/camera/assets/shutter.wav +0 -0
  76. package/dist/components/camera/utils/motion.d.ts +29 -0
  77. package/dist/components/camera/utils/motion.mjs +88 -0
  78. package/dist/components/camera/utils/take-picture.d.ts +1 -0
  79. package/dist/components/camera/utils/take-picture.mjs +14 -0
  80. package/dist/components/caption/Caption.vue +112 -0
  81. package/dist/components/caption/Caption.vue.d.ts +50 -0
  82. package/dist/components/caption/index.d.ts +1 -0
  83. package/dist/components/caption/index.mjs +0 -0
  84. package/dist/components/card/Card.vue +330 -0
  85. package/dist/components/card/Card.vue.d.ts +118 -0
  86. package/dist/components/card/CardSection.vue +69 -0
  87. package/dist/components/card/CardSection.vue.d.ts +56 -0
  88. package/dist/components/card/index.d.ts +2 -0
  89. package/dist/components/card/index.mjs +0 -0
  90. package/dist/components/carousel/Carousel.vue +177 -0
  91. package/dist/components/carousel/Carousel.vue.d.ts +123 -0
  92. package/dist/components/carousel/CarouselBody.vue +16 -0
  93. package/dist/components/carousel/CarouselBody.vue.d.ts +17 -0
  94. package/dist/components/carousel/CarouselItem.vue +10 -0
  95. package/dist/components/carousel/CarouselItem.vue.d.ts +17 -0
  96. package/dist/components/carousel/index.d.ts +4 -0
  97. package/dist/components/carousel/index.mjs +1 -0
  98. package/dist/components/chart/Chart.vue +129 -0
  99. package/dist/components/chart/Chart.vue.d.ts +63 -0
  100. package/dist/components/chart/ChartSet.vue +28 -0
  101. package/dist/components/chart/ChartSet.vue.d.ts +57 -0
  102. package/dist/components/chart/ChartVal.vue +32 -0
  103. package/dist/components/chart/ChartVal.vue.d.ts +67 -0
  104. package/dist/components/chart/adapter/adapter.d.ts +7 -0
  105. package/dist/components/chart/adapter/adapter.mjs +3 -0
  106. package/dist/components/chart/adapter/bubble.d.ts +2 -0
  107. package/dist/components/chart/adapter/bubble.mjs +26 -0
  108. package/dist/components/chart/adapter/index.d.ts +3 -0
  109. package/dist/components/chart/adapter/index.mjs +16 -0
  110. package/dist/components/chart/adapter/line.d.ts +2 -0
  111. package/dist/components/chart/adapter/line.mjs +66 -0
  112. package/dist/components/chart/adapter/pie.d.ts +2 -0
  113. package/dist/components/chart/adapter/pie.mjs +34 -0
  114. package/dist/components/chart/index.d.ts +2 -0
  115. package/dist/components/chart/index.mjs +0 -0
  116. package/dist/components/chart/utils/use-chart.d.ts +2 -0
  117. package/dist/components/chart/utils/use-chart.mjs +9 -0
  118. package/dist/components/checkbox/Checkbox.vue +213 -0
  119. package/dist/components/checkbox/Checkbox.vue.d.ts +105 -0
  120. package/dist/components/checkbox/icon/IconCheckbox.vue +13 -0
  121. package/dist/components/checkbox/icon/IconCheckbox.vue.d.ts +2 -0
  122. package/dist/components/checkbox/icon/IconInderteminate.vue +12 -0
  123. package/dist/components/checkbox/icon/IconInderteminate.vue.d.ts +2 -0
  124. package/dist/components/checkbox/index.d.ts +7 -0
  125. package/dist/components/checkbox/index.mjs +34 -0
  126. package/dist/components/collapse/Collapse.vue +58 -0
  127. package/dist/components/collapse/Collapse.vue.d.ts +42 -0
  128. package/dist/components/contextual-bar/ContextualBar.vue +433 -0
  129. package/dist/components/contextual-bar/ContextualBar.vue.d.ts +124 -0
  130. package/dist/components/contextual-bar/index.d.ts +1 -0
  131. package/dist/components/contextual-bar/index.mjs +0 -0
  132. package/dist/components/cropper/Cropper.vue +382 -0
  133. package/dist/components/cropper/Cropper.vue.d.ts +195 -0
  134. package/dist/components/cropper/index.d.ts +1 -0
  135. package/dist/components/cropper/index.mjs +3 -0
  136. package/dist/components/cropper/utils/crop-image.d.ts +44 -0
  137. package/dist/components/cropper/utils/crop-image.mjs +43 -0
  138. package/dist/components/cropper/utils/use-pinch.d.ts +8 -0
  139. package/dist/components/cropper/utils/use-pinch.mjs +50 -0
  140. package/dist/components/cropper/utils/use-preview.d.ts +3 -0
  141. package/dist/components/cropper/utils/use-preview.mjs +21 -0
  142. package/dist/components/cropper/utils/use-ratio.d.ts +9 -0
  143. package/dist/components/cropper/utils/use-ratio.mjs +24 -0
  144. package/dist/components/datepicker/Datepicker.vue +204 -0
  145. package/dist/components/datepicker/Datepicker.vue.d.ts +181 -0
  146. package/dist/components/dialog/Dialog.vue +130 -0
  147. package/dist/components/dialog/Dialog.vue.d.ts +8 -0
  148. package/dist/components/dialog/DialogFooter.vue +121 -0
  149. package/dist/components/dialog/DialogFooter.vue.d.ts +132 -0
  150. package/dist/components/dialog/index.d.ts +52 -0
  151. package/dist/components/dialog/index.mjs +86 -0
  152. package/dist/components/divider/Divider.vue +61 -0
  153. package/dist/components/divider/Divider.vue.d.ts +14 -0
  154. package/dist/components/dot/Dot.vue +95 -0
  155. package/dist/components/dot/Dot.vue.d.ts +26 -0
  156. package/dist/components/dot/index.d.ts +1 -0
  157. package/dist/components/dot/index.mjs +0 -0
  158. package/dist/components/dropdown/Dropdown.vue +381 -0
  159. package/dist/components/dropdown/Dropdown.vue.d.ts +301 -0
  160. package/dist/components/dropdown/DropdownHeader.vue +33 -0
  161. package/dist/components/dropdown/DropdownHeader.vue.d.ts +18 -0
  162. package/dist/components/dropdown/DropdownItem.vue +87 -0
  163. package/dist/components/dropdown/DropdownItem.vue.d.ts +62 -0
  164. package/dist/components/dropdown/DropdownText.vue +34 -0
  165. package/dist/components/dropdown/DropdownText.vue.d.ts +17 -0
  166. package/dist/components/dropdown/index.d.ts +10 -0
  167. package/dist/components/dropdown/index.mjs +1 -0
  168. package/dist/components/dropdown/utils/use-focus.d.ts +5 -0
  169. package/dist/components/dropdown/utils/use-focus.mjs +22 -0
  170. package/dist/components/dropdown-subitem/DropdownSubitem.vue +153 -0
  171. package/dist/components/dropdown-subitem/DropdownSubitem.vue.d.ts +58 -0
  172. package/dist/components/dropdown-subitem/index.d.ts +12 -0
  173. package/dist/components/dropdown-subitem/index.mjs +1 -0
  174. package/dist/components/dropzone/Dropzone.vue +205 -0
  175. package/dist/components/dropzone/Dropzone.vue.d.ts +139 -0
  176. package/dist/components/dropzone/index.d.ts +4 -0
  177. package/dist/components/dropzone/index.mjs +0 -0
  178. package/dist/components/dropzone/utils/accept.d.ts +1 -0
  179. package/dist/components/dropzone/utils/accept.mjs +17 -0
  180. package/dist/components/filterbar/Filterbar.vue +103 -0
  181. package/dist/components/filterbar/Filterbar.vue.d.ts +2495 -0
  182. package/dist/components/filterbar/index.d.ts +45 -0
  183. package/dist/components/filterbar/index.mjs +7 -0
  184. package/dist/components/filterbar/pinned/PinnedDate.vue +100 -0
  185. package/dist/components/filterbar/pinned/PinnedDate.vue.d.ts +508 -0
  186. package/dist/components/filterbar/pinned/PinnedMultiselect.vue +113 -0
  187. package/dist/components/filterbar/pinned/PinnedMultiselect.vue.d.ts +675 -0
  188. package/dist/components/filterbar/pinned/PinnedSelect.vue +100 -0
  189. package/dist/components/filterbar/pinned/PinnedSelect.vue.d.ts +607 -0
  190. package/dist/components/filterbar/pinned/PinnedToggle.vue +77 -0
  191. package/dist/components/filterbar/pinned/PinnedToggle.vue.d.ts +220 -0
  192. package/dist/components/form-group/FormGroup.vue +155 -0
  193. package/dist/components/form-group/FormGroup.vue.d.ts +105 -0
  194. package/dist/components/global/router.d.ts +24 -0
  195. package/dist/components/global/router.mjs +7 -0
  196. package/dist/components/global/store.d.ts +49 -0
  197. package/dist/components/global/store.mjs +52 -0
  198. package/dist/components/global/types.d.ts +4 -0
  199. package/dist/components/global/types.mjs +0 -0
  200. package/dist/components/global/use-singleton.d.ts +21 -0
  201. package/dist/components/global/use-singleton.mjs +60 -0
  202. package/dist/components/global/utils/queue.d.ts +16 -0
  203. package/dist/components/global/utils/queue.mjs +35 -0
  204. package/dist/components/heading/Heading.vue +128 -0
  205. package/dist/components/heading/Heading.vue.d.ts +49 -0
  206. package/dist/components/heading/index.d.ts +3 -0
  207. package/dist/components/heading/index.mjs +0 -0
  208. package/dist/components/input/Input.vue +215 -0
  209. package/dist/components/input/Input.vue.d.ts +111 -0
  210. package/dist/components/input/index.d.ts +6 -0
  211. package/dist/components/input/index.mjs +25 -0
  212. package/dist/components/input/utils/accept.d.ts +26 -0
  213. package/dist/components/input/utils/accept.mjs +81 -0
  214. package/dist/components/input-color/index.d.ts +1 -0
  215. package/dist/components/input-color/index.mjs +0 -0
  216. package/dist/components/input-color/inputColor.vue +245 -0
  217. package/dist/components/input-color/inputColor.vue.d.ts +88 -0
  218. package/dist/components/input-file/InputFile.vue +195 -0
  219. package/dist/components/input-file/InputFile.vue.d.ts +755 -0
  220. package/dist/components/input-group/InputGroup.vue +177 -0
  221. package/dist/components/input-group/InputGroup.vue.d.ts +58 -0
  222. package/dist/components/input-group/InputGroupAddon.vue +42 -0
  223. package/dist/components/input-group/InputGroupAddon.vue.d.ts +17 -0
  224. package/dist/components/input-group/index.d.ts +6 -0
  225. package/dist/components/input-group/index.mjs +1 -0
  226. package/dist/components/input-password/InputPassword.vue +100 -0
  227. package/dist/components/input-password/InputPassword.vue.d.ts +86 -0
  228. package/dist/components/input-password/index.d.ts +2 -0
  229. package/dist/components/input-password/index.mjs +17 -0
  230. package/dist/components/input-pin/InputPin.vue +142 -0
  231. package/dist/components/input-pin/InputPin.vue.d.ts +77 -0
  232. package/dist/components/input-pin/index.d.ts +6 -0
  233. package/dist/components/input-pin/index.mjs +3 -0
  234. package/dist/components/input-range/InputRange.vue +253 -0
  235. package/dist/components/input-range/InputRange.vue.d.ts +106 -0
  236. package/dist/components/input-range/utils/use-drag.d.ts +3 -0
  237. package/dist/components/input-range/utils/use-drag.mjs +26 -0
  238. package/dist/components/label/Label.vue +249 -0
  239. package/dist/components/label/Label.vue.d.ts +63 -0
  240. package/dist/components/label/index.d.ts +1 -0
  241. package/dist/components/label/index.mjs +0 -0
  242. package/dist/components/list-group/ListGroup.vue +73 -0
  243. package/dist/components/list-group/ListGroup.vue.d.ts +56 -0
  244. package/dist/components/list-group/ListGroupItem.vue +79 -0
  245. package/dist/components/list-group/ListGroupItem.vue.d.ts +49 -0
  246. package/dist/components/list-group/index.d.ts +1 -0
  247. package/dist/components/list-group/index.mjs +0 -0
  248. package/dist/components/main/Main.vue +66 -0
  249. package/dist/components/main/Main.vue.d.ts +17 -0
  250. package/dist/components/markdown/index.d.ts +29 -0
  251. package/dist/components/markdown/index.mjs +25 -0
  252. package/dist/components/meta.json +171 -0
  253. package/dist/components/modal/Modal.vue +514 -0
  254. package/dist/components/modal/Modal.vue.d.ts +196 -0
  255. package/dist/components/modal/index.d.ts +1 -0
  256. package/dist/components/modal/index.mjs +0 -0
  257. package/dist/components/nav/Nav.vue +403 -0
  258. package/dist/components/nav/Nav.vue.d.ts +104 -0
  259. package/dist/components/nav/NavCollapse.vue +60 -0
  260. package/dist/components/nav/NavCollapse.vue.d.ts +164 -0
  261. package/dist/components/nav/NavForm.vue +23 -0
  262. package/dist/components/nav/NavForm.vue.d.ts +17 -0
  263. package/dist/components/nav/NavItem.vue +165 -0
  264. package/dist/components/nav/NavItem.vue.d.ts +80 -0
  265. package/dist/components/nav/NavItemDropdown.vue +104 -0
  266. package/dist/components/nav/NavItemDropdown.vue.d.ts +122 -0
  267. package/dist/components/nav/NavSubItem.vue +178 -0
  268. package/dist/components/nav/NavSubItem.vue.d.ts +45 -0
  269. package/dist/components/nav/NavText.vue +19 -0
  270. package/dist/components/nav/NavText.vue.d.ts +17 -0
  271. package/dist/components/nav/index.d.ts +2 -0
  272. package/dist/components/nav/index.mjs +0 -0
  273. package/dist/components/navbar/Navbar.vue +270 -0
  274. package/dist/components/navbar/Navbar.vue.d.ts +70 -0
  275. package/dist/components/navbar/NavbarBrand.vue +30 -0
  276. package/dist/components/navbar/NavbarBrand.vue.d.ts +29 -0
  277. package/dist/components/navbar/NavbarNav.vue +110 -0
  278. package/dist/components/navbar/NavbarNav.vue.d.ts +31 -0
  279. package/dist/components/navbar/NavbarToggle.vue +67 -0
  280. package/dist/components/navbar/NavbarToggle.vue.d.ts +19 -0
  281. package/dist/components/navbar/index.d.ts +9 -0
  282. package/dist/components/navbar/index.mjs +1 -0
  283. package/dist/components/navbar-menu/NavbarNavMenu.vue +56 -0
  284. package/dist/components/navbar-menu/NavbarNavMenu.vue.d.ts +16 -0
  285. package/dist/components/notify/Notify.vue +36 -0
  286. package/dist/components/notify/Notify.vue.d.ts +6 -0
  287. package/dist/components/notify/NotifyGroup.vue +214 -0
  288. package/dist/components/notify/NotifyGroup.vue.d.ts +34 -0
  289. package/dist/components/notify/NotifyItem.vue +33 -0
  290. package/dist/components/notify/NotifyItem.vue.d.ts +22 -0
  291. package/dist/components/notify/index.d.ts +20 -0
  292. package/dist/components/notify/index.mjs +18 -0
  293. package/dist/components/overlay/Overlay.vue +63 -0
  294. package/dist/components/overlay/Overlay.vue.d.ts +19 -0
  295. package/dist/components/overlay/assets/icon-white.svg +1 -0
  296. package/dist/components/overlay/index.d.ts +2 -0
  297. package/dist/components/overlay/index.mjs +8 -0
  298. package/dist/components/overlay/utils/use-loading.d.ts +4 -0
  299. package/dist/components/overlay/utils/use-loading.mjs +28 -0
  300. package/dist/components/page/Page.vue +93 -0
  301. package/dist/components/page/Page.vue.d.ts +54 -0
  302. package/dist/components/pagination/Pagination.vue +373 -0
  303. package/dist/components/pagination/Pagination.vue.d.ts +261 -0
  304. package/dist/components/pagination/index.d.ts +14 -0
  305. package/dist/components/pagination/index.mjs +38 -0
  306. package/dist/components/pagination/utils/calculate-page.d.ts +11 -0
  307. package/dist/components/pagination/utils/calculate-page.mjs +48 -0
  308. package/dist/components/pdf-helipad/PdfHelipad.vue +129 -0
  309. package/dist/components/pdf-helipad/PdfHelipad.vue.d.ts +68 -0
  310. package/dist/components/pdf-helipad/index.d.ts +7 -0
  311. package/dist/components/pdf-helipad/index.mjs +0 -0
  312. package/dist/components/pdf-helipad/utils/use-drag.d.ts +3 -0
  313. package/dist/components/pdf-helipad/utils/use-drag.mjs +38 -0
  314. package/dist/components/pdf-object/PdfObject.vue +304 -0
  315. package/dist/components/pdf-object/PdfObject.vue.d.ts +151 -0
  316. package/dist/components/pdf-object/PdfObjectAddon.vue +49 -0
  317. package/dist/components/pdf-object/PdfObjectAddon.vue.d.ts +31 -0
  318. package/dist/components/pdf-object/PdfObjectDebugger.vue +66 -0
  319. package/dist/components/pdf-object/PdfObjectDebugger.vue.d.ts +2 -0
  320. package/dist/components/pdf-object/PdfObjects.vue +35 -0
  321. package/dist/components/pdf-object/PdfObjects.vue.d.ts +31 -0
  322. package/dist/components/pdf-object/index.d.ts +63 -0
  323. package/dist/components/pdf-object/index.mjs +110 -0
  324. package/dist/components/pdf-object/utils/overlap.d.ts +51 -0
  325. package/dist/components/pdf-object/utils/overlap.mjs +54 -0
  326. package/dist/components/pdf-object/utils/position.d.ts +64 -0
  327. package/dist/components/pdf-object/utils/position.mjs +48 -0
  328. package/dist/components/pdf-object/utils/use-drag.d.ts +9 -0
  329. package/dist/components/pdf-object/utils/use-drag.mjs +69 -0
  330. package/dist/components/pdf-object/utils/use-drop.d.ts +7 -0
  331. package/dist/components/pdf-object/utils/use-drop.mjs +57 -0
  332. package/dist/components/pdf-object/utils/use-resize.d.ts +17 -0
  333. package/dist/components/pdf-object/utils/use-resize.mjs +90 -0
  334. package/dist/components/pdf-object/utils/use-selector.d.ts +4 -0
  335. package/dist/components/pdf-object/utils/use-selector.mjs +26 -0
  336. package/dist/components/pdf-text/PdfText.vue +125 -0
  337. package/dist/components/pdf-text/PdfText.vue.d.ts +170 -0
  338. package/dist/components/pdf-text/utils/text-to-image.d.ts +68 -0
  339. package/dist/components/pdf-text/utils/text-to-image.mjs +120 -0
  340. package/dist/components/pdf-viewer/PdfError.vue +70 -0
  341. package/dist/components/pdf-viewer/PdfError.vue.d.ts +24 -0
  342. package/dist/components/pdf-viewer/PdfLoading.vue +24 -0
  343. package/dist/components/pdf-viewer/PdfLoading.vue.d.ts +2 -0
  344. package/dist/components/pdf-viewer/PdfNavigation.vue +165 -0
  345. package/dist/components/pdf-viewer/PdfNavigation.vue.d.ts +49 -0
  346. package/dist/components/pdf-viewer/PdfViewer.vue +319 -0
  347. package/dist/components/pdf-viewer/PdfViewer.vue.d.ts +187 -0
  348. package/dist/components/pdf-viewer/assets/pdf-loading.svg +1 -0
  349. package/dist/components/pdf-viewer/index.d.ts +25 -0
  350. package/dist/components/pdf-viewer/index.mjs +24 -0
  351. package/dist/components/pdf-viewer/utils/pdfjs.d.ts +69 -0
  352. package/dist/components/pdf-viewer/utils/pdfjs.mjs +76 -0
  353. package/dist/components/pdf-viewer/utils/use-idle.d.ts +2 -0
  354. package/dist/components/pdf-viewer/utils/use-idle.mjs +25 -0
  355. package/dist/components/pdf-viewer/utils/use-sticky.d.ts +6 -0
  356. package/dist/components/pdf-viewer/utils/use-sticky.mjs +49 -0
  357. package/dist/components/pdf-viewer/utils/use-viewer.d.ts +27 -0
  358. package/dist/components/pdf-viewer/utils/use-viewer.mjs +193 -0
  359. package/dist/components/popover/Popover.vue +109 -0
  360. package/dist/components/popover/Popover.vue.d.ts +209 -0
  361. package/dist/components/popover/index.d.ts +17 -0
  362. package/dist/components/popover/index.mjs +52 -0
  363. package/dist/components/popup/Popup.vue +412 -0
  364. package/dist/components/popup/Popup.vue.d.ts +112 -0
  365. package/dist/components/popup/index.d.ts +39 -0
  366. package/dist/components/popup/index.mjs +31 -0
  367. package/dist/components/progress/Progress.vue +198 -0
  368. package/dist/components/progress/Progress.vue.d.ts +53 -0
  369. package/dist/components/progress/ProgressItem.vue +46 -0
  370. package/dist/components/progress/ProgressItem.vue.d.ts +43 -0
  371. package/dist/components/progress/index.d.ts +2 -0
  372. package/dist/components/progress/index.mjs +0 -0
  373. package/dist/components/progress-indicator/ProgressIndicator.vue +114 -0
  374. package/dist/components/progress-indicator/ProgressIndicator.vue.d.ts +40 -0
  375. package/dist/components/progressbar/Progressbar.vue +105 -0
  376. package/dist/components/progressbar/Progressbar.vue.d.ts +59 -0
  377. package/dist/components/progressbar/index.d.ts +7 -0
  378. package/dist/components/progressbar/index.mjs +11 -0
  379. package/dist/components/pspdfkit/PspdfHelipad.vue +142 -0
  380. package/dist/components/pspdfkit/PspdfHelipad.vue.d.ts +68 -0
  381. package/dist/components/pspdfkit/PspdfObject.vue +291 -0
  382. package/dist/components/pspdfkit/PspdfObject.vue.d.ts +151 -0
  383. package/dist/components/pspdfkit/PspdfObjectAddon.vue +24 -0
  384. package/dist/components/pspdfkit/PspdfObjectAddon.vue.d.ts +31 -0
  385. package/dist/components/pspdfkit/PspdfObjects.vue +27 -0
  386. package/dist/components/pspdfkit/PspdfObjects.vue.d.ts +19 -0
  387. package/dist/components/pspdfkit/PspdfViewer.vue +223 -0
  388. package/dist/components/pspdfkit/PspdfViewer.vue.d.ts +142 -0
  389. package/dist/components/pspdfkit/css/custom.css +1 -0
  390. package/dist/components/pspdfkit/index.d.ts +8 -0
  391. package/dist/components/pspdfkit/index.mjs +7 -0
  392. package/dist/components/pspdfkit/utils/position.d.ts +1 -0
  393. package/dist/components/pspdfkit/utils/position.mjs +5 -0
  394. package/dist/components/pspdfkit/utils/pspdfkit.d.ts +17 -0
  395. package/dist/components/pspdfkit/utils/pspdfkit.mjs +53 -0
  396. package/dist/components/pspdfkit/utils/use-drop.d.ts +2 -0
  397. package/dist/components/pspdfkit/utils/use-drop.mjs +41 -0
  398. package/dist/components/pspdfkit/utils/use-viewer.d.ts +17 -0
  399. package/dist/components/pspdfkit/utils/use-viewer.mjs +167 -0
  400. package/dist/components/qrcode/Qrcode.vue +150 -0
  401. package/dist/components/qrcode/Qrcode.vue.d.ts +145 -0
  402. package/dist/components/qrcode/index.d.ts +1 -0
  403. package/dist/components/qrcode/index.mjs +0 -0
  404. package/dist/components/radio/Radio.vue +285 -0
  405. package/dist/components/radio/Radio.vue.d.ts +97 -0
  406. package/dist/components/radio/index.d.ts +7 -0
  407. package/dist/components/radio/index.mjs +16 -0
  408. package/dist/components/richtext/Richtext.vue +271 -0
  409. package/dist/components/richtext/Richtext.vue.d.ts +78 -0
  410. package/dist/components/richtext/RichtextToolbarAdvance.vue +37 -0
  411. package/dist/components/richtext/RichtextToolbarAdvance.vue.d.ts +2 -0
  412. package/dist/components/richtext/RichtextToolbarSimple.vue +146 -0
  413. package/dist/components/richtext/RichtextToolbarSimple.vue.d.ts +2 -0
  414. package/dist/components/richtext/control/RichtextControlFontFamily.vue +52 -0
  415. package/dist/components/richtext/control/RichtextControlFontFamily.vue.d.ts +2 -0
  416. package/dist/components/richtext/control/RichtextControlFontSize.vue +74 -0
  417. package/dist/components/richtext/control/RichtextControlFontSize.vue.d.ts +2 -0
  418. package/dist/components/richtext/control/RichtextControlHighlight.vue +127 -0
  419. package/dist/components/richtext/control/RichtextControlHighlight.vue.d.ts +2 -0
  420. package/dist/components/richtext/control/RichtextControlHistory.vue +26 -0
  421. package/dist/components/richtext/control/RichtextControlHistory.vue.d.ts +2 -0
  422. package/dist/components/richtext/control/RichtextControlImage.vue +32 -0
  423. package/dist/components/richtext/control/RichtextControlImage.vue.d.ts +2 -0
  424. package/dist/components/richtext/control/RichtextControlLink.vue +44 -0
  425. package/dist/components/richtext/control/RichtextControlLink.vue.d.ts +2 -0
  426. package/dist/components/richtext/control/RichtextControlList.vue +43 -0
  427. package/dist/components/richtext/control/RichtextControlList.vue.d.ts +2 -0
  428. package/dist/components/richtext/control/RichtextControlTable.vue +90 -0
  429. package/dist/components/richtext/control/RichtextControlTable.vue.d.ts +2 -0
  430. package/dist/components/richtext/control/RichtextControlTextAlign.vue +78 -0
  431. package/dist/components/richtext/control/RichtextControlTextAlign.vue.d.ts +2 -0
  432. package/dist/components/richtext/control/RichtextControlTextFormat.vue +48 -0
  433. package/dist/components/richtext/control/RichtextControlTextFormat.vue.d.ts +2 -0
  434. package/dist/components/richtext/control/RichtextControlTextHeading.vue +93 -0
  435. package/dist/components/richtext/control/RichtextControlTextHeading.vue.d.ts +2 -0
  436. package/dist/components/richtext/index.d.ts +7 -0
  437. package/dist/components/richtext/index.mjs +7 -0
  438. package/dist/components/richtext/popup/RichtextPopupImageEdit.vue +64 -0
  439. package/dist/components/richtext/popup/RichtextPopupImageEdit.vue.d.ts +2 -0
  440. package/dist/components/richtext/popup/RichtextPopupLinkDetail.vue +79 -0
  441. package/dist/components/richtext/popup/RichtextPopupLinkDetail.vue.d.ts +2 -0
  442. package/dist/components/richtext/popup/RichtextPopupLinkEdit.vue +64 -0
  443. package/dist/components/richtext/popup/RichtextPopupLinkEdit.vue.d.ts +22 -0
  444. package/dist/components/richtext/tiptap/image-align.d.ts +43 -0
  445. package/dist/components/richtext/tiptap/image-align.mjs +60 -0
  446. package/dist/components/ringbar/Ringbar.vue +148 -0
  447. package/dist/components/ringbar/Ringbar.vue.d.ts +62 -0
  448. package/dist/components/ringbar/index.d.ts +1 -0
  449. package/dist/components/ringbar/index.mjs +0 -0
  450. package/dist/components/select/Select.vue +499 -0
  451. package/dist/components/select/Select.vue.d.ts +753 -0
  452. package/dist/components/select/SelectInput.vue +101 -0
  453. package/dist/components/select/SelectInput.vue.d.ts +71 -0
  454. package/dist/components/select/SelectTags.vue +53 -0
  455. package/dist/components/select/SelectTags.vue.d.ts +34 -0
  456. package/dist/components/select/adapter/adapter.d.ts +17 -0
  457. package/dist/components/select/adapter/adapter.mjs +20 -0
  458. package/dist/components/select/adapter/async-adapter.d.ts +17 -0
  459. package/dist/components/select/adapter/async-adapter.mjs +61 -0
  460. package/dist/components/select/adapter/basic-adapter.d.ts +5 -0
  461. package/dist/components/select/adapter/basic-adapter.mjs +13 -0
  462. package/dist/components/select/adapter/fuzzy-adapter.d.ts +2 -0
  463. package/dist/components/select/adapter/fuzzy-adapter.mjs +24 -0
  464. package/dist/components/select/index.d.ts +15 -0
  465. package/dist/components/select/index.mjs +20 -0
  466. package/dist/components/select/utils/use-on-scroll.d.ts +2 -0
  467. package/dist/components/select/utils/use-on-scroll.mjs +9 -0
  468. package/dist/components/select/utils/use-on-typing.d.ts +3 -0
  469. package/dist/components/select/utils/use-on-typing.mjs +8 -0
  470. package/dist/components/sheet/Sheet.vue +210 -0
  471. package/dist/components/sheet/Sheet.vue.d.ts +79 -0
  472. package/dist/components/shimmer/Shimmer.vue +121 -0
  473. package/dist/components/shimmer/Shimmer.vue.d.ts +47 -0
  474. package/dist/components/shimmer/index.d.ts +2 -0
  475. package/dist/components/shimmer/index.mjs +10 -0
  476. package/dist/components/sidebar/Sidebar.vue +225 -0
  477. package/dist/components/sidebar/Sidebar.vue.d.ts +99 -0
  478. package/dist/components/sidebar/SidebarBrand.vue +101 -0
  479. package/dist/components/sidebar/SidebarBrand.vue.d.ts +52 -0
  480. package/dist/components/sidebar/SidebarContent.vue +21 -0
  481. package/dist/components/sidebar/SidebarContent.vue.d.ts +16 -0
  482. package/dist/components/sidebar/SidebarNav.vue +254 -0
  483. package/dist/components/sidebar/SidebarNav.vue.d.ts +77 -0
  484. package/dist/components/sidebar/index.d.ts +9 -0
  485. package/dist/components/sidebar/index.mjs +1 -0
  486. package/dist/components/sidebar-menu/SidebarMenu.vue +112 -0
  487. package/dist/components/sidebar-menu/SidebarMenu.vue.d.ts +112 -0
  488. package/dist/components/sidebar-menu/SidebarMenuItem.vue +67 -0
  489. package/dist/components/sidebar-menu/SidebarMenuItem.vue.d.ts +25 -0
  490. package/dist/components/sidebar-menu/index.d.ts +138 -0
  491. package/dist/components/sidebar-menu/index.mjs +44 -0
  492. package/dist/components/signature-draw/SignatureDraw.vue +91 -0
  493. package/dist/components/signature-draw/SignatureDraw.vue.d.ts +98 -0
  494. package/dist/components/signature-draw/SignatureDrawDesktop.vue +148 -0
  495. package/dist/components/signature-draw/SignatureDrawDesktop.vue.d.ts +76 -0
  496. package/dist/components/signature-draw/SignatureDrawMobile.vue +212 -0
  497. package/dist/components/signature-draw/SignatureDrawMobile.vue.d.ts +94 -0
  498. package/dist/components/signature-draw/utils/canvas.d.ts +41 -0
  499. package/dist/components/signature-draw/utils/canvas.mjs +55 -0
  500. package/dist/components/signature-draw/utils/image.d.ts +7 -0
  501. package/dist/components/signature-draw/utils/image.mjs +23 -0
  502. package/dist/components/signature-draw/utils/smooth-line.d.ts +36 -0
  503. package/dist/components/signature-draw/utils/smooth-line.mjs +56 -0
  504. package/dist/components/signature-draw/utils/straight-line.d.ts +8 -0
  505. package/dist/components/signature-draw/utils/straight-line.mjs +24 -0
  506. package/dist/components/signature-draw/utils/use-draw.d.ts +7 -0
  507. package/dist/components/signature-draw/utils/use-draw.mjs +29 -0
  508. package/dist/components/signature-text/SignatureText.vue +114 -0
  509. package/dist/components/signature-text/SignatureText.vue.d.ts +98 -0
  510. package/dist/components/signature-text/utils/formatter.d.ts +2 -0
  511. package/dist/components/signature-text/utils/formatter.mjs +8 -0
  512. package/dist/components/signature-text/utils/generate-text.d.ts +8 -0
  513. package/dist/components/signature-text/utils/generate-text.mjs +28 -0
  514. package/dist/components/signature-text/utils/load-font.d.ts +1 -0
  515. package/dist/components/signature-text/utils/load-font.mjs +22 -0
  516. package/dist/components/spinner/Spinner.vue +156 -0
  517. package/dist/components/spinner/Spinner.vue.d.ts +2 -0
  518. package/dist/components/spinner/SpinnerRing.vue +34 -0
  519. package/dist/components/spinner/SpinnerRing.vue.d.ts +2 -0
  520. package/dist/components/spinner/SpinnerRinggo.vue +61 -0
  521. package/dist/components/spinner/SpinnerRinggo.vue.d.ts +2 -0
  522. package/dist/components/spread/Spread.vue +52 -0
  523. package/dist/components/spread/Spread.vue.d.ts +29 -0
  524. package/dist/components/steps/Step.vue +42 -0
  525. package/dist/components/steps/Step.vue.d.ts +48 -0
  526. package/dist/components/steps/StepSlider.vue +37 -0
  527. package/dist/components/steps/StepSlider.vue.d.ts +34 -0
  528. package/dist/components/steps/Steps.vue +116 -0
  529. package/dist/components/steps/Steps.vue.d.ts +100 -0
  530. package/dist/components/steps/index.d.ts +30 -0
  531. package/dist/components/steps/index.mjs +53 -0
  532. package/dist/components/steps/utils/hook.d.ts +10 -0
  533. package/dist/components/steps/utils/hook.mjs +35 -0
  534. package/dist/components/strengthbar/Strengthbar.vue +90 -0
  535. package/dist/components/strengthbar/Strengthbar.vue.d.ts +41 -0
  536. package/dist/components/subheading/Subheading.vue +137 -0
  537. package/dist/components/subheading/Subheading.vue.d.ts +59 -0
  538. package/dist/components/subheading/index.d.ts +1 -0
  539. package/dist/components/subheading/index.mjs +0 -0
  540. package/dist/components/table/Table.vue +391 -0
  541. package/dist/components/table/Table.vue.d.ts +337 -0
  542. package/dist/components/table/index.d.ts +49 -0
  543. package/dist/components/table/index.mjs +37 -0
  544. package/dist/components/table-flex/TableFlex.vue +309 -0
  545. package/dist/components/table-flex/TableFlex.vue.d.ts +77 -0
  546. package/dist/components/table-static/TableStatic.vue +406 -0
  547. package/dist/components/table-static/TableStatic.vue.d.ts +90 -0
  548. package/dist/components/table-static/TableStaticRoot.vue +39 -0
  549. package/dist/components/table-static/TableStaticRoot.vue.d.ts +40 -0
  550. package/dist/components/table-static/TableStaticSort.vue +22 -0
  551. package/dist/components/table-static/TableStaticSort.vue.d.ts +14 -0
  552. package/dist/components/table-static/index.d.ts +64 -0
  553. package/dist/components/table-static/index.mjs +24 -0
  554. package/dist/components/tabs/Tab.vue +26 -0
  555. package/dist/components/tabs/Tab.vue.d.ts +45 -0
  556. package/dist/components/tabs/TabContent.vue +53 -0
  557. package/dist/components/tabs/TabContent.vue.d.ts +33 -0
  558. package/dist/components/tabs/Tabs.vue +209 -0
  559. package/dist/components/tabs/Tabs.vue.d.ts +96 -0
  560. package/dist/components/text/Text.vue +220 -0
  561. package/dist/components/text/Text.vue.d.ts +69 -0
  562. package/dist/components/text/index.d.ts +2 -0
  563. package/dist/components/text/index.mjs +0 -0
  564. package/dist/components/textarea/Textarea.vue +162 -0
  565. package/dist/components/textarea/Textarea.vue.d.ts +112 -0
  566. package/dist/components/time/Time.vue +222 -0
  567. package/dist/components/time/Time.vue.d.ts +104 -0
  568. package/dist/components/time/TimeItem.vue +96 -0
  569. package/dist/components/time/TimeItem.vue.d.ts +61 -0
  570. package/dist/components/time/index.d.ts +19 -0
  571. package/dist/components/time/index.mjs +53 -0
  572. package/dist/components/time/utils/index.d.ts +9 -0
  573. package/dist/components/time/utils/index.mjs +82 -0
  574. package/dist/components/timepicker/Timepicker.vue +204 -0
  575. package/dist/components/timepicker/Timepicker.vue.d.ts +182 -0
  576. package/dist/components/toast/Toast.vue +247 -0
  577. package/dist/components/toast/Toast.vue.d.ts +118 -0
  578. package/dist/components/toast/index.d.ts +50 -0
  579. package/dist/components/toast/index.mjs +44 -0
  580. package/dist/components/toggle/Toggle.vue +216 -0
  581. package/dist/components/toggle/Toggle.vue.d.ts +145 -0
  582. package/dist/components/tooltip/Tooltip.vue +154 -0
  583. package/dist/components/tooltip/Tooltip.vue.d.ts +68 -0
  584. package/dist/components/tooltip/TooltipContainer.vue +74 -0
  585. package/dist/components/tooltip/TooltipContainer.vue.d.ts +16 -0
  586. package/dist/components/tooltip/index.d.ts +17 -0
  587. package/dist/components/tooltip/index.mjs +113 -0
  588. package/dist/components/tooltip/utils/create-handler.d.ts +9 -0
  589. package/dist/components/tooltip/utils/create-handler.mjs +16 -0
  590. package/dist/components/tooltip/utils/on-hover.d.ts +23 -0
  591. package/dist/components/tooltip/utils/on-hover.mjs +42 -0
  592. package/dist/components/tooltip/utils/parse-bindings.d.ts +23 -0
  593. package/dist/components/tooltip/utils/parse-bindings.mjs +47 -0
  594. package/dist/components/tour/Tour.vue +99 -0
  595. package/dist/components/tour/Tour.vue.d.ts +9 -0
  596. package/dist/components/tour/TourDialog.vue +201 -0
  597. package/dist/components/tour/TourDialog.vue.d.ts +112 -0
  598. package/dist/components/tour/TourHighlight.vue +51 -0
  599. package/dist/components/tour/TourHighlight.vue.d.ts +15 -0
  600. package/dist/components/tour/core/base.d.ts +59 -0
  601. package/dist/components/tour/core/base.mjs +69 -0
  602. package/dist/components/tour/core/step/action.d.ts +15 -0
  603. package/dist/components/tour/core/step/action.mjs +14 -0
  604. package/dist/components/tour/core/step/conditional.d.ts +25 -0
  605. package/dist/components/tour/core/step/conditional.mjs +57 -0
  606. package/dist/components/tour/core/step/delay.d.ts +8 -0
  607. package/dist/components/tour/core/step/delay.mjs +9 -0
  608. package/dist/components/tour/core/step/dialog.d.ts +11 -0
  609. package/dist/components/tour/core/step/dialog.mjs +25 -0
  610. package/dist/components/tour/core/step/visit.d.ts +9 -0
  611. package/dist/components/tour/core/step/visit.mjs +15 -0
  612. package/dist/components/tour/core/step.d.ts +37 -0
  613. package/dist/components/tour/core/step.mjs +46 -0
  614. package/dist/components/tour/core/story.d.ts +130 -0
  615. package/dist/components/tour/core/story.mjs +166 -0
  616. package/dist/components/tour/core/tour.d.ts +126 -0
  617. package/dist/components/tour/core/tour.mjs +196 -0
  618. package/dist/components/tour/index.d.ts +3 -0
  619. package/dist/components/tour/index.mjs +4 -0
  620. package/dist/components/tour/utils/focus.d.ts +1 -0
  621. package/dist/components/tour/utils/focus.mjs +6 -0
  622. package/dist/components/tour/utils/is-visible.d.ts +1 -0
  623. package/dist/components/tour/utils/is-visible.mjs +29 -0
  624. package/dist/components/tour/utils/wait-element.d.ts +6 -0
  625. package/dist/components/tour/utils/wait-element.mjs +45 -0
  626. package/dist/components/truncate/Truncate.vue +69 -0
  627. package/dist/components/truncate/Truncate.vue.d.ts +68 -0
  628. package/dist/components/utils/array.d.ts +2 -0
  629. package/dist/components/utils/array.mjs +19 -0
  630. package/dist/components/utils/base64.d.ts +8 -0
  631. package/dist/components/utils/base64.mjs +35 -0
  632. package/dist/components/utils/color.d.ts +17 -0
  633. package/dist/components/utils/color.mjs +14 -0
  634. package/dist/components/utils/date.d.ts +22 -0
  635. package/dist/components/utils/date.mjs +14 -0
  636. package/dist/components/utils/value.d.ts +8 -0
  637. package/dist/components/utils/value.mjs +7 -0
  638. package/dist/components/utils/vnode.d.ts +15 -0
  639. package/dist/components/utils/vnode.mjs +18 -0
  640. package/dist/components/wizard/Wizard.vue +76 -0
  641. package/dist/components/wizard/Wizard.vue.d.ts +91 -0
  642. package/dist/components/wizard/WizardBody.vue +38 -0
  643. package/dist/components/wizard/WizardBody.vue.d.ts +36 -0
  644. package/dist/components/wizard/WizardHeader.vue +38 -0
  645. package/dist/components/wizard/WizardHeader.vue.d.ts +16 -0
  646. package/dist/components/wizard/WizardStep.vue +22 -0
  647. package/dist/components/wizard/WizardStep.vue.d.ts +55 -0
  648. package/dist/core/index.d.ts +43 -0
  649. package/dist/core/index.mjs +148 -0
  650. package/dist/directive/index.d.ts +3 -0
  651. package/dist/directive/index.mjs +12 -0
  652. package/dist/module.d.mts +28 -2
  653. package/dist/module.json +1 -1
  654. package/dist/module.mjs +97 -13
  655. package/dist/runtime/plugins/persona.d.ts +2 -0
  656. package/dist/runtime/plugins/persona.js +35 -0
  657. package/dist/types.d.mts +4 -8
  658. package/package.json +1 -4
  659. package/dist/module.d.cts +0 -2
@@ -0,0 +1,46 @@
1
+ import { fromBase64 } from "../../utils/base64.mjs";
2
+ import {
3
+ createTemplate,
4
+ motionDetection,
5
+ MOTION_AREA_SIZE,
6
+ MOTION_FPS,
7
+ MOTION_THRESHOLD,
8
+ takeSample
9
+ } from "../utils/motion.mjs";
10
+ import { takePicture } from "../utils/take-picture.mjs";
11
+ import { defineAdapter } from "./adapter.mjs";
12
+ export default defineAdapter({
13
+ meta: {
14
+ mask: "round",
15
+ mirror: true,
16
+ facingMode: "user"
17
+ },
18
+ async run({ video, toast, meta, modifier }) {
19
+ return await new Promise((resolve) => {
20
+ const isMirrored = !!(meta.value.mirror && meta.value.mirror !== "preview");
21
+ const photoA = takePicture(video.value, isMirrored);
22
+ const canvas = document.createElement("canvas");
23
+ canvas.width = MOTION_AREA_SIZE;
24
+ canvas.height = MOTION_AREA_SIZE;
25
+ let template;
26
+ const interval = setInterval(function processFrame() {
27
+ if (video.value) {
28
+ const imageData = takeSample(canvas, video.value);
29
+ if (!template)
30
+ template = createTemplate(imageData);
31
+ else if (motionDetection(imageData, template) > MOTION_THRESHOLD) {
32
+ const photoB = takePicture(video.value, isMirrored);
33
+ const result = modifier.value.base64 ? [photoB, photoA] : [fromBase64(photoB), fromBase64(photoA)];
34
+ clearInterval(interval);
35
+ toast("");
36
+ resolve({
37
+ preview: photoB,
38
+ result
39
+ });
40
+ }
41
+ }
42
+ }, 1e3 / MOTION_FPS);
43
+ toast("Move your head slowly. Your photo will be taken automatically");
44
+ });
45
+ }
46
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("./adapter").Adapter;
2
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { defineAdapter } from "./adapter.mjs";
2
+ import { takePicture } from "../utils/take-picture.mjs";
3
+ export default defineAdapter({
4
+ meta: {
5
+ mask: "square",
6
+ facingMode: "environment",
7
+ autoStart: true
8
+ },
9
+ async run({ video, toast, meta }) {
10
+ const isMirrored = !!(meta.value.mirror && meta.value.mirror !== "preview");
11
+ const { BrowserQRCodeReader } = await import("@zxing/browser");
12
+ const reader = new BrowserQRCodeReader();
13
+ const result = await reader.decodeOnceFromVideoElement(video.value);
14
+ const image = takePicture(video.value, isMirrored);
15
+ const text = result.getText();
16
+ toast(text);
17
+ return { preview: image, result: text };
18
+ }
19
+ });
@@ -0,0 +1,29 @@
1
+ export interface MotionTemplate {
2
+ centerX: number;
3
+ centerY: number;
4
+ width: number;
5
+ height: number;
6
+ xPos: number;
7
+ yPos: number;
8
+ buffer: Uint8ClampedArray;
9
+ }
10
+ export declare const MOTION_THRESHOLD = 40;
11
+ export declare const MOTION_FPS = 15;
12
+ export declare const MOTION_AREA_SIZE = 160;
13
+ /**
14
+ * Capture and create sample image from HTML Video Element
15
+ * @param canvas Canvas 2d context
16
+ * @param video Html Video element
17
+ */
18
+ export declare function takeSample(canvas: HTMLCanvasElement, video: HTMLVideoElement): ImageData;
19
+ /**
20
+ * create motion template
21
+ * @param imageData sample imagedata
22
+ */
23
+ export declare function createTemplate(imageData: ImageData): MotionTemplate;
24
+ /**
25
+ * Compare image with Motion template and return the movement distance
26
+ * @param imageData new sample's imagedata
27
+ * @param template motion template to compare
28
+ */
29
+ export declare function motionDetection(imageData: ImageData, template: MotionTemplate): number;
@@ -0,0 +1,88 @@
1
+ export const MOTION_THRESHOLD = 40;
2
+ export const MOTION_FPS = 15;
3
+ export const MOTION_AREA_SIZE = 160;
4
+ export function takeSample(canvas, video) {
5
+ const context = canvas.getContext("2d", { willReadFrequently: true });
6
+ context.drawImage(
7
+ video,
8
+ video.videoWidth / 2 - MOTION_AREA_SIZE,
9
+ video.videoHeight / 2 - MOTION_AREA_SIZE,
10
+ MOTION_AREA_SIZE,
11
+ MOTION_AREA_SIZE,
12
+ 0,
13
+ 0,
14
+ MOTION_AREA_SIZE,
15
+ MOTION_AREA_SIZE
16
+ );
17
+ return context.getImageData(0, 0, canvas.width, canvas.height);
18
+ }
19
+ export function createTemplate(imageData) {
20
+ const centerX = imageData.width / 2;
21
+ const centerY = imageData.height / 2;
22
+ const width = imageData.width / 4;
23
+ const height = imageData.height / 4;
24
+ const xPos = centerX - width / 2;
25
+ const yPos = centerY - height / 2;
26
+ const buffer = new Uint8ClampedArray(width * height);
27
+ const template = {
28
+ centerX,
29
+ centerY,
30
+ width,
31
+ height,
32
+ xPos,
33
+ yPos,
34
+ buffer
35
+ };
36
+ const p = imageData.data;
37
+ let counter = 0;
38
+ for (let y = template.yPos; y < template.yPos + template.height; y++) {
39
+ let bufferIndex = y * imageData.width * 4 + template.xPos * 4 + 1;
40
+ for (let x = template.xPos; x < template.xPos + template.width; x++) {
41
+ template.buffer[counter++] = p[bufferIndex];
42
+ bufferIndex += 4;
43
+ }
44
+ }
45
+ return template;
46
+ }
47
+ export function motionDetection(imageData, template) {
48
+ let bestHitX = 0;
49
+ let bestHitY = 0;
50
+ let maxCorr = 0;
51
+ const searchWidth = imageData.width / 4;
52
+ const searchHeight = imageData.height / 4;
53
+ const p = imageData.data;
54
+ for (let y = template.centerY - searchHeight; y <= template.centerY + searchHeight - template.height; y++) {
55
+ for (let x = template.centerX - searchWidth; x <= template.centerX + searchWidth - template.width; x++) {
56
+ let nominator = 0;
57
+ let denominator = 0;
58
+ let templateIndex = 0;
59
+ for (let ty = 0; ty < template.height; ty++) {
60
+ let bufferIndex = x * 4 + 1 + (y + ty) * imageData.width * 4;
61
+ for (let tx = 0; tx < template.width; tx++) {
62
+ const imagepixel = p[bufferIndex];
63
+ nominator += template.buffer[templateIndex++] * imagepixel;
64
+ denominator += imagepixel * imagepixel;
65
+ bufferIndex += 4;
66
+ }
67
+ }
68
+ let ncc = 0;
69
+ if (denominator > 0)
70
+ ncc = nominator * nominator / denominator;
71
+ if (ncc > maxCorr) {
72
+ maxCorr = ncc;
73
+ bestHitX = x;
74
+ bestHitY = y;
75
+ }
76
+ }
77
+ }
78
+ const distX = bestHitX - template.xPos;
79
+ const distY = bestHitY - template.yPos;
80
+ const movementDiff = Math.hypot(distX, distY);
81
+ const maxDistX = searchWidth - template.width / 2;
82
+ const maxDistY = searchHeight - template.height / 2;
83
+ const maximumMovement = Math.hypot(maxDistX, maxDistY);
84
+ let movementPercentage = movementDiff / maximumMovement * 100;
85
+ if (movementPercentage > 100)
86
+ movementPercentage = 100;
87
+ return movementPercentage;
88
+ }
@@ -0,0 +1 @@
1
+ export declare function takePicture(video: HTMLVideoElement, mirror?: boolean): string;
@@ -0,0 +1,14 @@
1
+ export function takePicture(video, mirror = false) {
2
+ const canvas = document.createElement("canvas");
3
+ const context = canvas.getContext("2d");
4
+ canvas.width = video.videoWidth;
5
+ canvas.height = video.videoHeight;
6
+ if (mirror) {
7
+ context.save();
8
+ context.scale(-1, 1);
9
+ context.drawImage(video, 0, 0, canvas.width * -1, canvas.height);
10
+ context.restore();
11
+ } else
12
+ context.drawImage(video, 0, 0, canvas.width, canvas.height);
13
+ return canvas.toDataURL("image/jpeg");
14
+ }
@@ -0,0 +1,112 @@
1
+ <template>
2
+ <span
3
+ data-testid="caption"
4
+ :class="classNames">
5
+ <slot />
6
+ </span>
7
+ </template>
8
+
9
+ <script setup>
10
+ import { computed } from "vue";
11
+ const props = defineProps({
12
+ weight: {
13
+ type: String,
14
+ default: "normal"
15
+ },
16
+ transform: {
17
+ type: String,
18
+ default: "normalcase"
19
+ },
20
+ size: {
21
+ type: String,
22
+ default: "xs"
23
+ }
24
+ });
25
+ const classNames = computed(() => {
26
+ const result = ["caption"];
27
+ if (props.transform)
28
+ result.push(`caption--${props.transform}`);
29
+ if (props.weight)
30
+ result.push(`caption--${props.weight}`);
31
+ if (props.size)
32
+ result.push(`caption--${props.size}`);
33
+ return result;
34
+ });
35
+ </script>
36
+
37
+ <style lang="postcss">
38
+ .caption {
39
+ @apply block text-xs tracking-wide;
40
+
41
+ &:not([class^='text-'], [class*='text-']) {
42
+ @apply text-muted;
43
+ @apply dark:text-dark-muted;
44
+ }
45
+
46
+ /**
47
+ * Caption in tiny size
48
+ */
49
+ &--tn {
50
+ @apply text-tn tracking-wider;
51
+ }
52
+
53
+ /**
54
+ * Weight of caption
55
+ */
56
+ &--thin {
57
+ @apply font-thin;
58
+ }
59
+
60
+ &--extralight {
61
+ @apply font-extralight;
62
+ }
63
+
64
+ &--light {
65
+ @apply font-light;
66
+ }
67
+
68
+ &--normal {
69
+ @apply font-normal;
70
+ }
71
+
72
+ &--semibold {
73
+ @apply font-semibold;
74
+ }
75
+
76
+ &--medium {
77
+ @apply font-medium;
78
+ }
79
+
80
+ &--bold {
81
+ @apply font-bold;
82
+ }
83
+
84
+ &--extrabold {
85
+ @apply font-extrabold;
86
+ }
87
+
88
+ &--black {
89
+ @apply font-black;
90
+ }
91
+
92
+ /**
93
+ * Text transform
94
+ * of caption
95
+ */
96
+ &--normalcase {
97
+ @apply normal-case;
98
+ }
99
+
100
+ &--lowercase {
101
+ @apply lowercase;
102
+ }
103
+
104
+ &--capitalize {
105
+ @apply capitalize;
106
+ }
107
+
108
+ &--uppercase {
109
+ @apply uppercase;
110
+ }
111
+ }
112
+ </style>
@@ -0,0 +1,50 @@
1
+ import type { PropType } from 'vue';
2
+ import type { WeightVariant, TransformVariant } from '../heading';
3
+ import type { SizeVariant } from '.';
4
+ declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
6
+ slots: {
7
+ default?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ rootEl: HTMLSpanElement;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
14
+ weight: {
15
+ type: PropType<WeightVariant>;
16
+ default: string;
17
+ };
18
+ transform: {
19
+ type: PropType<TransformVariant>;
20
+ default: string;
21
+ };
22
+ size: {
23
+ type: PropType<SizeVariant>;
24
+ default: string;
25
+ };
26
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
+ weight: {
28
+ type: PropType<WeightVariant>;
29
+ default: string;
30
+ };
31
+ transform: {
32
+ type: PropType<TransformVariant>;
33
+ default: string;
34
+ };
35
+ size: {
36
+ type: PropType<SizeVariant>;
37
+ default: string;
38
+ };
39
+ }>> & Readonly<{}>, {
40
+ size: SizeVariant;
41
+ weight: WeightVariant;
42
+ transform: TransformVariant;
43
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
44
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
45
+ export default _default;
46
+ type __VLS_WithTemplateSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };
@@ -0,0 +1 @@
1
+ export type SizeVariant = 'xs' | 'tn';
File without changes
@@ -0,0 +1,330 @@
1
+ <template>
2
+ <component
3
+ :is="elementNames"
4
+ v-if="show"
5
+ data-testid="card"
6
+ :class="classNames">
7
+ <header
8
+ v-if="$slots.header"
9
+ data-testid="card-header"
10
+ class="card__header">
11
+ <slot name="header" />
12
+ </header>
13
+
14
+ <header
15
+ v-else-if="title"
16
+ class="card__header card__header--default">
17
+ <Heading element="h6">
18
+ {{ title }}
19
+ </Heading>
20
+
21
+ <span
22
+ v-if="$slots.action && !callout"
23
+ data-testid="card-header-action"
24
+ class="card__header__action">
25
+ <slot name="action" />
26
+ </span>
27
+
28
+ <span
29
+ v-if="dismissable && callout"
30
+ data-testid="card-callout-dismiss"
31
+ class="card__header__dismiss"
32
+ @click="close()">
33
+ <IconClose />
34
+ </span>
35
+ </header>
36
+
37
+ <div
38
+ v-if="!sectioned"
39
+ data-testid="card-body"
40
+ class="card__body"
41
+ :class="bodyClass">
42
+ <slot />
43
+ </div>
44
+ <slot v-else />
45
+
46
+ <footer
47
+ v-if="$slots.footer"
48
+ data-testid="card-footer"
49
+ class="card__footer">
50
+ <slot name="footer" />
51
+ </footer>
52
+ </component>
53
+ </template>
54
+
55
+ <script setup>
56
+ import { computed, ref } from "vue";
57
+ import IconClose from "@privyid/persona-icon/vue/close/16.vue";
58
+ import Heading from "../heading/Heading.vue";
59
+ const props = defineProps({
60
+ element: {
61
+ type: String,
62
+ default: "section"
63
+ },
64
+ title: {
65
+ type: String,
66
+ default: void 0
67
+ },
68
+ sectioned: {
69
+ type: Boolean,
70
+ default: false
71
+ },
72
+ disabled: {
73
+ type: Boolean,
74
+ default: false
75
+ },
76
+ readonly: {
77
+ type: Boolean,
78
+ default: false
79
+ },
80
+ callout: {
81
+ type: Boolean,
82
+ default: false
83
+ },
84
+ dismissable: {
85
+ type: Boolean,
86
+ default: true
87
+ },
88
+ bodyClass: {
89
+ type: [String, Array],
90
+ default: void 0
91
+ },
92
+ spacing: {
93
+ type: String,
94
+ default: "md"
95
+ }
96
+ });
97
+ const emit = defineEmits(["dismissed"]);
98
+ const show = ref(true);
99
+ const classNames = computed(() => {
100
+ const result = ["card"];
101
+ if (props.sectioned)
102
+ result.push("card--sectioned");
103
+ if (props.disabled)
104
+ result.push("card--disabled");
105
+ if (props.readonly)
106
+ result.push("card--readonly");
107
+ if (props.callout)
108
+ result.push("card--callout");
109
+ if (props.spacing)
110
+ result.push(`card--spacing-${props.spacing}`);
111
+ return result;
112
+ });
113
+ const elementNames = computed(() => {
114
+ return props.element;
115
+ });
116
+ function close() {
117
+ show.value = false;
118
+ emit("dismissed");
119
+ }
120
+ defineExpose({ close });
121
+ defineSlots();
122
+ </script>
123
+
124
+ <style lang="postcss">
125
+ /**
126
+ * Component Name: Card
127
+ * Component URI : https : //www.figma.com/file/JIYmbyRYZHc9bnVp6Npm9K/B-A-S-E-%2F-Components?node-id=294%3A5079
128
+ * Date Created : May 22, 2022
129
+ * Last Update : Nov 08, 2024
130
+ */
131
+ .card {
132
+ --p-card-padding-x: theme(spacing.6);
133
+ --p-card-padding-y: theme(spacing.6);
134
+ --p-card-bg: theme(backgroundColor.default.DEFAULT);
135
+ --p-card-bg-dark: theme(backgroundColor.dark.default.DEFAULT);
136
+ --p-card-border: theme(borderColor.default.DEFAULT);
137
+ --p-card-border-dark: theme(borderColor.dark.default.DEFAULT);
138
+ --p-card-color: theme(textColor.default);
139
+ --p-card-color-dark: theme(textColor.dark.default);
140
+ --p-card-border-radius: theme(borderRadius.md);
141
+ --p-card-inside-border-radius: theme(borderRadius.DEFAULT);
142
+
143
+ @apply border bg-[color:var(--p-card-bg)] border-[color:var(--p-card-border)] text-[color:var(--p-card-color)] rounded-[var(--p-card-border-radius)];
144
+ @apply dark:bg-[color:var(--p-card-bg-dark)] dark:border-[color:var(--p-card-border-dark)] dark:text-[color:var(--p-card-color-dark)];
145
+
146
+ /**
147
+ * Card inside card
148
+ * has 8px rounded
149
+ */
150
+ .card {
151
+ @apply rounded-[var(--p-card-inside-border-radius)];
152
+ }
153
+
154
+ &&--spacing {
155
+ &-sm {
156
+ --p-card-padding-x: theme(spacing.4);
157
+ --p-card-padding-y: theme(spacing.4);
158
+ }
159
+
160
+ &-md {
161
+ --p-card-padding-x: theme(spacing.6);
162
+ --p-card-padding-y: theme(spacing.6);
163
+ }
164
+
165
+ &-lg {
166
+ --p-card-padding-x: theme(spacing.9);
167
+ --p-card-padding-y: theme(spacing.9);
168
+ }
169
+
170
+ &-xl {
171
+ --p-card-padding-x: theme(spacing.12);
172
+ --p-card-padding-y: theme(spacing.12);
173
+ }
174
+ }
175
+
176
+ /*
177
+ * Card Body & Card Header
178
+ * by default have 24px (1.5rem) padding
179
+ */
180
+ &__header,
181
+ &__body {
182
+ @apply pt-[var(--p-card-padding-y)] px-[var(--p-card-padding-x)];
183
+ }
184
+
185
+ &__body {
186
+ @apply pb-[var(--p-card-padding-y)];
187
+
188
+ > .card__section {
189
+ @apply pt-0;
190
+ }
191
+
192
+ .card__section {
193
+ @apply border-b border-subtle-alpha;
194
+ @apply dark:border-dark-subtle-alpha;
195
+
196
+ /**
197
+ * Adding border-top in the first element
198
+ * of Card Sub-Section and provide 24px (1.5rem)
199
+ * of margin-top
200
+ */
201
+ &:first-child {
202
+ @apply border-t mt-[var(--p-card-padding-y)];
203
+ }
204
+
205
+ &:last-child {
206
+ /**
207
+ * Remove padding-bottom of Card Body
208
+ * from the last element of Card Sub-Section
209
+ */
210
+ .card__body {
211
+ @apply pb-0;
212
+ }
213
+ }
214
+
215
+ /**
216
+ * Remove padding-left-right Card Body
217
+ * in Card Sub-Section
218
+ */
219
+ .card__body {
220
+ @apply px-0;
221
+ }
222
+ }
223
+ }
224
+
225
+ /**
226
+ * If Card have Section,
227
+ * padding of card-body-top-parent set to 0
228
+ */
229
+ &&--sectioned {
230
+ &:has(.card__section--readonly) {
231
+ .card__section:first-child:where(.card__section--readonly) {
232
+ @apply rounded-t-[var(--p-card-border-radius)];
233
+ }
234
+
235
+ .card__section:last-child:where(.card__section--readonly) {
236
+ @apply rounded-b-[var(--p-card-border-radius)];
237
+ }
238
+ }
239
+ > .card__body {
240
+ @apply p-0;
241
+ }
242
+ }
243
+
244
+ /**
245
+ * Give background muted
246
+ * If Card disabled
247
+ */
248
+ &&--disabled {
249
+ @apply opacity-50 cursor-not-allowed;
250
+ }
251
+
252
+ /**
253
+ * Give background base
254
+ * when Card are readonly
255
+ */
256
+ &&--readonly {
257
+ @apply bg-ground cursor-not-allowed;
258
+ @apply dark:bg-dark-ground;
259
+ }
260
+
261
+ /**
262
+ * Provide box-shadow when
263
+ * Card Callout is enable
264
+ */
265
+ &&--callout {
266
+ @apply shadow-sm;
267
+ }
268
+
269
+ &__header {
270
+ .heading {
271
+ @apply font-medium leading-none;
272
+ }
273
+
274
+ &&--default {
275
+ @apply flex justify-between items-center;
276
+ }
277
+
278
+ &,
279
+ &__action {
280
+ a {
281
+ &:not(.btn) {
282
+ @apply text-xs;
283
+ }
284
+
285
+ + a {
286
+ @apply pl-3;
287
+ }
288
+ }
289
+ }
290
+
291
+ &__dismiss {
292
+ @apply text-default/30 hover:text-default/50 hover:cursor-pointer;
293
+ @apply dark:text-dark-default/30 hover:dark:text-dark-default/50;
294
+ }
295
+
296
+ + .card__body,
297
+ + .card__section > .card__body {
298
+ @apply pt-4;
299
+ }
300
+ }
301
+
302
+ &__section {
303
+ @apply border-b border-subtle-alpha;
304
+ @apply dark:border-dark-subtle-alpha;
305
+
306
+ &:last-child {
307
+ @apply border-b-0;
308
+ }
309
+
310
+ &&--disabled,
311
+ &.card--disabled {
312
+ @apply opacity-50 cursor-not-allowed;
313
+ }
314
+
315
+ &&--readonly,
316
+ &.card--readonly {
317
+ @apply bg-ground cursor-not-allowed;
318
+ @apply dark:bg-dark-ground;
319
+ }
320
+
321
+ &.card--disabled {
322
+ @apply px-[var(--p-card-padding-x)] pb-[var(--p-card-padding-y)];
323
+ }
324
+ }
325
+
326
+ &__footer {
327
+ @apply pb-[var(--p-card-padding-y)] px-[var(--p-card-padding-x)] pt-8;
328
+ }
329
+ }
330
+ </style>