vviinn-widgets 2.5.2 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/dist/types/campaign/CampaignService.d.ts +1 -1
  2. package/dist/types/campaign/VCSCampaignService.d.ts +2 -1
  3. package/dist/types/campaign/VPRCampaignService.d.ts +2 -1
  4. package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +2 -0
  5. package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +6 -0
  6. package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +6 -0
  7. package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +2 -0
  8. package/dist/types/components/vviinn-vpr-widget/stories/args.d.ts +6 -0
  9. package/dist/types/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.d.ts +6 -0
  10. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +3 -0
  11. package/dist/types/components.d.ts +24 -0
  12. package/dist/vviinn-widgets/Array-bdfc75db.js +4870 -0
  13. package/dist/vviinn-widgets/Handler-edcb46f4.js +1422 -0
  14. package/dist/vviinn-widgets/NonEmptyArray-947ab7b3.js +4411 -0
  15. package/dist/{esm/app-globals-6f6aa89e.js → vviinn-widgets/app-globals-26a61baa.js} +922 -10
  16. package/dist/{esm → vviinn-widgets}/cropper-handler.entry.js +2 -2
  17. package/dist/vviinn-widgets/css-shim-f0027935.js +4 -0
  18. package/dist/{esm/customized-slots-6b427dda.js → vviinn-widgets/customized-slots-fb9b3e5f.js} +1 -1
  19. package/dist/vviinn-widgets/dom-db0073f0.js +73 -0
  20. package/dist/vviinn-widgets/highlight-box.entry.js +41 -0
  21. package/dist/{collection/components/image-search/image-view/image-cropper/image-cropper.js → vviinn-widgets/image-cropper.entry.js} +33 -70
  22. package/dist/{esm/imageSearch.store-0ae87235.js → vviinn-widgets/imageSearch.store-15bda6de.js} +12106 -11817
  23. package/dist/{esm/index-ac05c460.js → vviinn-widgets/index-533f9255.js} +4 -2
  24. package/dist/{esm/index-2e296af4.js → vviinn-widgets/index-6c6de682.js} +639 -6
  25. package/dist/vviinn-widgets/index-89051fa8.js +3010 -0
  26. package/dist/vviinn-widgets/index.esm.js +1 -0
  27. package/dist/vviinn-widgets/number-171db649.js +1499 -0
  28. package/dist/vviinn-widgets/search-filters.entry.js +76 -0
  29. package/dist/vviinn-widgets/shadow-css-c1fdfa9f.js +389 -0
  30. package/dist/{collection/components/vviinn-carousel/vviinn-carousel.js → vviinn-widgets/vviinn-carousel.entry.js} +18 -113
  31. package/dist/vviinn-widgets/vviinn-detected-object.entry.js +54 -0
  32. package/dist/vviinn-widgets/vviinn-empty-results.entry.js +16 -0
  33. package/dist/{esm → vviinn-widgets}/vviinn-error.entry.js +1 -1
  34. package/dist/vviinn-widgets/vviinn-example-image.entry.js +38 -0
  35. package/dist/vviinn-widgets/vviinn-example-images.entry.js +28 -0
  36. package/dist/vviinn-widgets/vviinn-image-selector.entry.js +31 -0
  37. package/dist/vviinn-widgets/vviinn-image-view.entry.js +55 -0
  38. package/dist/vviinn-widgets/vviinn-modal.entry.js +30 -0
  39. package/dist/vviinn-widgets/vviinn-onboarding-card-1.entry.js +21 -0
  40. package/dist/vviinn-widgets/vviinn-onboarding-card-2.entry.js +21 -0
  41. package/dist/vviinn-widgets/vviinn-onboarding-card-3.entry.js +21 -0
  42. package/dist/vviinn-widgets/vviinn-onboarding.entry.js +20 -0
  43. package/dist/vviinn-widgets/vviinn-overlay.entry.js +15 -0
  44. package/dist/vviinn-widgets/vviinn-overlayed-modal.entry.js +18 -0
  45. package/dist/{esm → vviinn-widgets}/vviinn-preloader.entry.js +6 -3
  46. package/dist/vviinn-widgets/vviinn-privacy-badge.entry.js +20 -0
  47. package/dist/vviinn-widgets/vviinn-product-card.entry.js +184 -0
  48. package/dist/{esm → vviinn-widgets}/vviinn-recommendations-sidebar.entry.js +5 -3
  49. package/dist/vviinn-widgets/vviinn-server-error.entry.js +16 -0
  50. package/dist/vviinn-widgets/vviinn-slide.entry.js +15 -0
  51. package/dist/vviinn-widgets/vviinn-slider.entry.js +120 -0
  52. package/dist/vviinn-widgets/vviinn-teaser.entry.js +20 -0
  53. package/dist/{esm → vviinn-widgets}/vviinn-vpr-button.entry.js +7 -2
  54. package/dist/vviinn-widgets/vviinn-vpr-widget.entry.js +4588 -0
  55. package/dist/{esm → vviinn-widgets}/vviinn-vps-button.entry.js +3 -3
  56. package/dist/{esm → vviinn-widgets}/vviinn-vps-widget.entry.js +8 -5
  57. package/dist/vviinn-widgets/vviinn-widgets.css +6 -1
  58. package/dist/vviinn-widgets/vviinn-widgets.esm.js +125 -1
  59. package/dist/vviinn-widgets/vviinn-wrong-format.entry.js +16 -0
  60. package/package.json +3 -3
  61. package/www/build/Array-bdfc75db.js +4870 -0
  62. package/www/build/Handler-edcb46f4.js +1422 -0
  63. package/www/build/NonEmptyArray-947ab7b3.js +4411 -0
  64. package/{dist/cjs/app-globals-d15b4c2c.js → www/build/app-globals-26a61baa.js} +925 -15
  65. package/{dist/cjs/cropper-handler.cjs.entry.js → www/build/cropper-handler.entry.js} +7 -11
  66. package/www/build/css-shim-f0027935.js +4 -0
  67. package/{dist/cjs/customized-slots-0c0d0665.js → www/build/customized-slots-fb9b3e5f.js} +3 -6
  68. package/www/build/dom-db0073f0.js +73 -0
  69. package/www/build/highlight-box.entry.js +41 -0
  70. package/www/build/image-cropper.entry.js +118 -0
  71. package/{dist/cjs/imageSearch.store-865c23f4.js → www/build/imageSearch.store-15bda6de.js} +11902 -11647
  72. package/{dist/collection/components/vviinn-icons/index.js → www/build/index-533f9255.js} +14 -11
  73. package/{dist/cjs/index-0eb3036a.js → www/build/index-6c6de682.js} +698 -76
  74. package/www/build/index-89051fa8.js +3010 -0
  75. package/www/build/index.esm.js +1 -0
  76. package/www/build/number-171db649.js +1499 -0
  77. package/www/build/search-filters.entry.js +76 -0
  78. package/www/build/shadow-css-c1fdfa9f.js +389 -0
  79. package/www/build/vviinn-carousel.entry.js +210 -0
  80. package/www/build/vviinn-detected-object.entry.js +54 -0
  81. package/www/build/vviinn-empty-results.entry.js +16 -0
  82. package/{dist/cjs/vviinn-error.cjs.entry.js → www/build/vviinn-error.entry.js} +4 -8
  83. package/www/build/vviinn-example-image.entry.js +38 -0
  84. package/www/build/vviinn-example-images.entry.js +28 -0
  85. package/www/build/vviinn-image-selector.entry.js +31 -0
  86. package/www/build/vviinn-image-view.entry.js +55 -0
  87. package/www/build/vviinn-modal.entry.js +30 -0
  88. package/www/build/vviinn-onboarding-card-1.entry.js +21 -0
  89. package/www/build/vviinn-onboarding-card-2.entry.js +21 -0
  90. package/www/build/vviinn-onboarding-card-3.entry.js +21 -0
  91. package/www/build/vviinn-onboarding.entry.js +20 -0
  92. package/www/build/vviinn-overlay.entry.js +15 -0
  93. package/www/build/vviinn-overlayed-modal.entry.js +18 -0
  94. package/{dist/cjs/vviinn-preloader.cjs.entry.js → www/build/vviinn-preloader.entry.js} +10 -11
  95. package/www/build/vviinn-privacy-badge.entry.js +20 -0
  96. package/www/build/vviinn-product-card.entry.js +184 -0
  97. package/{dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js → www/build/vviinn-recommendations-sidebar.entry.js} +10 -12
  98. package/www/build/vviinn-server-error.entry.js +16 -0
  99. package/www/build/vviinn-slide.entry.js +15 -0
  100. package/www/build/vviinn-slider.entry.js +120 -0
  101. package/www/build/vviinn-teaser.entry.js +20 -0
  102. package/{dist/cjs/vviinn-vpr-button.cjs.entry.js → www/build/vviinn-vpr-button.entry.js} +10 -9
  103. package/www/build/vviinn-vpr-widget.entry.js +4588 -0
  104. package/www/build/vviinn-vps-button.entry.js +39 -0
  105. package/{dist/cjs/vviinn-vps-widget.cjs.entry.js → www/build/vviinn-vps-widget.entry.js} +44 -45
  106. package/www/build/vviinn-widgets.css +6 -1
  107. package/www/build/vviinn-widgets.esm.js +125 -1
  108. package/www/build/vviinn-wrong-format.entry.js +16 -0
  109. package/www/index.html +10 -1
  110. package/dist/cjs/Handler-176539c8.js +0 -331
  111. package/dist/cjs/highlight-box_22.cjs.entry.js +0 -747
  112. package/dist/cjs/index-0f5516a6.js +0 -1354
  113. package/dist/cjs/index-31b9cb7a.js +0 -39
  114. package/dist/cjs/index.cjs.js +0 -2
  115. package/dist/cjs/loader.cjs.js +0 -23
  116. package/dist/cjs/vviinn-carousel_3.cjs.entry.js +0 -1174
  117. package/dist/cjs/vviinn-vps-button.cjs.entry.js +0 -43
  118. package/dist/cjs/vviinn-widgets.cjs.js +0 -21
  119. package/dist/collection/Image/error.js +0 -14
  120. package/dist/collection/Image/form.js +0 -5
  121. package/dist/collection/Image/fromFile.js +0 -18
  122. package/dist/collection/Image/imageToB64.js +0 -9
  123. package/dist/collection/Image/index.js +0 -0
  124. package/dist/collection/Image/renderPromise.js +0 -6
  125. package/dist/collection/Image/resizeImage.js +0 -28
  126. package/dist/collection/Image/sizing.js +0 -39
  127. package/dist/collection/Image/toFile.js +0 -17
  128. package/dist/collection/analytics/GAnalytics.js +0 -32
  129. package/dist/collection/analytics/GeneralAnalytics.js +0 -9
  130. package/dist/collection/analytics/GtagAnalytics.js +0 -35
  131. package/dist/collection/analytics/ProductAnalytics.js +0 -1
  132. package/dist/collection/campaign/Campaign.js +0 -8
  133. package/dist/collection/campaign/CampaignService.js +0 -5
  134. package/dist/collection/campaign/VCSCampaign.js +0 -1
  135. package/dist/collection/campaign/VCSCampaignResponse.js +0 -1
  136. package/dist/collection/campaign/VCSCampaignService.js +0 -5
  137. package/dist/collection/campaign/VPRCampaignResponse.js +0 -1
  138. package/dist/collection/campaign/VPRCampaignService.js +0 -5
  139. package/dist/collection/collection-manifest.json +0 -43
  140. package/dist/collection/components/customized-slots.js +0 -47
  141. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.css +0 -71
  142. package/dist/collection/components/image-search/image-view/highlight-box/highlight-box.js +0 -25
  143. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.css +0 -49
  144. package/dist/collection/components/image-search/image-view/image-cropper/cropper-handler/cropper-handler.js +0 -64
  145. package/dist/collection/components/image-search/image-view/image-cropper/image-cropper.css +0 -33
  146. package/dist/collection/components/image-search/search-filters/search-filters.css +0 -120
  147. package/dist/collection/components/image-search/search-filters/search-filters.js +0 -125
  148. package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +0 -142
  149. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +0 -7
  150. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +0 -36
  151. package/dist/collection/components/vviinn-error/vviinn-error.css +0 -38
  152. package/dist/collection/components/vviinn-error/vviinn-error.js +0 -18
  153. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.css +0 -3
  154. package/dist/collection/components/vviinn-error/vviinn-server-error/vviinn-server-error.js +0 -34
  155. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.css +0 -3
  156. package/dist/collection/components/vviinn-error/vviinn-wrong-format/vviinn-wrong-format.js +0 -34
  157. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.css +0 -34
  158. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +0 -129
  159. package/dist/collection/components/vviinn-example-images/vviinn-example-images.css +0 -19
  160. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +0 -80
  161. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +0 -25
  162. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +0 -64
  163. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +0 -47
  164. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +0 -100
  165. package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +0 -31
  166. package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +0 -61
  167. package/dist/collection/components/vviinn-modal/vviinn-modal.css +0 -105
  168. package/dist/collection/components/vviinn-modal/vviinn-modal.js +0 -98
  169. package/dist/collection/components/vviinn-onboarding/onboarding-cards/onboarding-card.css +0 -41
  170. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-1/vviinn-onboarding-card-1.js +0 -26
  171. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-2/vviinn-onboarding-card-2.js +0 -26
  172. package/dist/collection/components/vviinn-onboarding/onboarding-cards/vviinn-onboarding-card-3/vviinn-onboarding-card-3.js +0 -26
  173. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.css +0 -58
  174. package/dist/collection/components/vviinn-onboarding/vviinn-onboarding.js +0 -28
  175. package/dist/collection/components/vviinn-overlay/vviinn-overlay.css +0 -33
  176. package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +0 -15
  177. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.css +0 -29
  178. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +0 -71
  179. package/dist/collection/components/vviinn-preloader/vviinn-preloader.css +0 -37
  180. package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +0 -20
  181. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +0 -19
  182. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +0 -27
  183. package/dist/collection/components/vviinn-product-card/render-helpers.js +0 -32
  184. package/dist/collection/components/vviinn-product-card/stories/args.js +0 -73
  185. package/dist/collection/components/vviinn-product-card/stories/decorators.js +0 -51
  186. package/dist/collection/components/vviinn-product-card/stories/vviinn-product-card.stories.js +0 -105
  187. package/dist/collection/components/vviinn-product-card/vviinn-product-card.css +0 -95
  188. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +0 -462
  189. package/dist/collection/components/vviinn-slider/arrow.js +0 -11
  190. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.css +0 -4
  191. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +0 -15
  192. package/dist/collection/components/vviinn-slider/vviinn-slider.css +0 -109
  193. package/dist/collection/components/vviinn-slider/vviinn-slider.js +0 -181
  194. package/dist/collection/components/vviinn-teaser/vviinn-teaser.css +0 -14
  195. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +0 -29
  196. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +0 -238
  197. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +0 -200
  198. package/dist/collection/components/vviinn-vpr-button/stories/args.js +0 -207
  199. package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +0 -89
  200. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.css +0 -35
  201. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +0 -156
  202. package/dist/collection/components/vviinn-vpr-widget/stories/args.js +0 -190
  203. package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +0 -29
  204. package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +0 -212
  205. package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +0 -11
  206. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +0 -483
  207. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.css +0 -79
  208. package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +0 -31
  209. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -3
  210. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +0 -178
  211. package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +0 -33
  212. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +0 -350
  213. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +0 -352
  214. package/dist/collection/cropper/Cropper.js +0 -1
  215. package/dist/collection/cropper/Handler.js +0 -61
  216. package/dist/collection/dom/index.js +0 -3
  217. package/dist/collection/error.js +0 -14
  218. package/dist/collection/file/index.js +0 -4
  219. package/dist/collection/geometry/Clip.js +0 -14
  220. package/dist/collection/geometry/Point.js +0 -32
  221. package/dist/collection/geometry/Rectangle.js +0 -95
  222. package/dist/collection/geometry/RectangleAlt.js +0 -1
  223. package/dist/collection/geometry/Sized.js +0 -8
  224. package/dist/collection/global.js +0 -19
  225. package/dist/collection/index.js +0 -1
  226. package/dist/collection/interfaces/generated.js +0 -5
  227. package/dist/collection/interfaces/recommendation.js +0 -1
  228. package/dist/collection/network/apiClient.js +0 -9
  229. package/dist/collection/network/ion/File.js +0 -14
  230. package/dist/collection/network/ion/Form.js +0 -64
  231. package/dist/collection/network/ion/Link.js +0 -8
  232. package/dist/collection/network/ion/ValueObject.js +0 -23
  233. package/dist/collection/network/request.js +0 -19
  234. package/dist/collection/network/utils.js +0 -37
  235. package/dist/collection/openApi/index.js +0 -27
  236. package/dist/collection/recommendation/events.js +0 -1
  237. package/dist/collection/recommendation/recommendation.js +0 -1
  238. package/dist/collection/searchSession/searchSession.js +0 -26
  239. package/dist/collection/sentry.js +0 -14
  240. package/dist/collection/slider/GridMode.js +0 -1
  241. package/dist/collection/store/file-processing.js +0 -13
  242. package/dist/collection/store/imageSearch.store.js +0 -138
  243. package/dist/collection/store/store.js +0 -3
  244. package/dist/collection/store/tracking.store.js +0 -3
  245. package/dist/collection/stories/Button.js +0 -21
  246. package/dist/collection/stories/Button.stories.js +0 -42
  247. package/dist/collection/stories/Header.js +0 -45
  248. package/dist/collection/stories/Header.stories.js +0 -15
  249. package/dist/collection/stories/Page.js +0 -61
  250. package/dist/collection/stories/Page.stories.js +0 -19
  251. package/dist/collection/stories/assets/code-brackets.svg +0 -1
  252. package/dist/collection/stories/assets/colors.svg +0 -1
  253. package/dist/collection/stories/assets/comments.svg +0 -1
  254. package/dist/collection/stories/assets/direction.svg +0 -1
  255. package/dist/collection/stories/assets/flow.svg +0 -1
  256. package/dist/collection/stories/assets/plugin.svg +0 -1
  257. package/dist/collection/stories/assets/repo.svg +0 -1
  258. package/dist/collection/stories/assets/stackalt.svg +0 -1
  259. package/dist/collection/stories/image-selector.stories.js +0 -6
  260. package/dist/collection/stories/image-view.stories.js +0 -6
  261. package/dist/collection/stories/modal.stories.js +0 -12
  262. package/dist/collection/stories/onboarding.stories.js +0 -11
  263. package/dist/collection/stories/overlay.stories.js +0 -5
  264. package/dist/collection/stories/overlayedModal.stories.js +0 -8
  265. package/dist/collection/stories/privacy-badge.stories.js +0 -11
  266. package/dist/collection/stories/slider.stories.js +0 -17
  267. package/dist/collection/stories/teaser.stories.js +0 -5
  268. package/dist/collection/stories/vps-widget.stories.js +0 -47
  269. package/dist/collection/stories/vviinn-product.stories.js +0 -19
  270. package/dist/collection/tracking/event.js +0 -3
  271. package/dist/collection/tracking/filter.js +0 -5
  272. package/dist/collection/tracking/index.js +0 -13
  273. package/dist/collection/tracking/models.js +0 -6
  274. package/dist/collection/tracking/product.js +0 -18
  275. package/dist/collection/tracking/search.js +0 -5
  276. package/dist/collection/tracking/widget.js +0 -10
  277. package/dist/collection/utils/collections/collectionsUtils.js +0 -5
  278. package/dist/collection/utils/either.js +0 -3
  279. package/dist/collection/utils/enum/enumUtils.js +0 -3
  280. package/dist/collection/utils/event/Events.js +0 -1
  281. package/dist/collection/utils/number/index.js +0 -4
  282. package/dist/collection/utils/option/option.js +0 -4
  283. package/dist/collection/utils/semigroup/semigroupDiff.js +0 -6
  284. package/dist/collection/utils/token/tokenUtils.js +0 -9
  285. package/dist/esm/Handler-f9b8735c.js +0 -309
  286. package/dist/esm/highlight-box_22.entry.js +0 -722
  287. package/dist/esm/index-59f44eaa.js +0 -1323
  288. package/dist/esm/index.js +0 -1
  289. package/dist/esm/loader.js +0 -19
  290. package/dist/esm/polyfills/core-js.js +0 -11
  291. package/dist/esm/polyfills/css-shim.js +0 -1
  292. package/dist/esm/polyfills/dom.js +0 -79
  293. package/dist/esm/polyfills/es5-html-element.js +0 -1
  294. package/dist/esm/polyfills/index.js +0 -34
  295. package/dist/esm/polyfills/system.js +0 -6
  296. package/dist/esm/vviinn-carousel_3.entry.js +0 -1168
  297. package/dist/esm/vviinn-widgets.js +0 -19
  298. package/dist/index.cjs.js +0 -1
  299. package/dist/index.js +0 -1
  300. package/dist/loader/cdn.js +0 -3
  301. package/dist/loader/index.cjs.js +0 -3
  302. package/dist/loader/index.d.ts +0 -12
  303. package/dist/loader/index.es2017.js +0 -3
  304. package/dist/loader/index.js +0 -4
  305. package/dist/loader/package.json +0 -10
  306. package/dist/vviinn-widgets/p-118ac907.js +0 -1
  307. package/dist/vviinn-widgets/p-11f61564.js +0 -1
  308. package/dist/vviinn-widgets/p-39fdc5c9.entry.js +0 -1
  309. package/dist/vviinn-widgets/p-762dc067.entry.js +0 -1
  310. package/dist/vviinn-widgets/p-7e2f542c.js +0 -1
  311. package/dist/vviinn-widgets/p-8d56e795.entry.js +0 -1
  312. package/dist/vviinn-widgets/p-8f955b15.entry.js +0 -1
  313. package/dist/vviinn-widgets/p-9654fe35.entry.js +0 -1
  314. package/dist/vviinn-widgets/p-9e5adc42.js +0 -1
  315. package/dist/vviinn-widgets/p-b3731705.entry.js +0 -1
  316. package/dist/vviinn-widgets/p-bad1809f.js +0 -1
  317. package/dist/vviinn-widgets/p-c36546fa.js +0 -15
  318. package/dist/vviinn-widgets/p-d991330b.entry.js +0 -1
  319. package/dist/vviinn-widgets/p-da9c933b.entry.js +0 -1
  320. package/dist/vviinn-widgets/p-ee46fc83.js +0 -1
  321. package/dist/vviinn-widgets/p-f41e25f0.entry.js +0 -1
  322. package/www/build/p-118ac907.js +0 -1
  323. package/www/build/p-11f61564.js +0 -1
  324. package/www/build/p-39fdc5c9.entry.js +0 -1
  325. package/www/build/p-762dc067.entry.js +0 -1
  326. package/www/build/p-7e2f542c.js +0 -1
  327. package/www/build/p-8d56e795.entry.js +0 -1
  328. package/www/build/p-8f955b15.entry.js +0 -1
  329. package/www/build/p-9654fe35.entry.js +0 -1
  330. package/www/build/p-9e5adc42.js +0 -1
  331. package/www/build/p-a67898be.css +0 -1
  332. package/www/build/p-b3731705.entry.js +0 -1
  333. package/www/build/p-bad1809f.js +0 -1
  334. package/www/build/p-c36546fa.js +0 -15
  335. package/www/build/p-cfd998c1.js +0 -1
  336. package/www/build/p-d991330b.entry.js +0 -1
  337. package/www/build/p-da9c933b.entry.js +0 -1
  338. package/www/build/p-ee46fc83.js +0 -1
  339. package/www/build/p-f41e25f0.entry.js +0 -1
@@ -1,352 +0,0 @@
1
- import { Component, Host, h, State, Prop, Element, Watch, Listen, } from "@stencil/core";
2
- import { state } from "../../store/store";
3
- import { imageSearchState } from "../../store/imageSearch.store";
4
- import * as O from "fp-ts/lib/Option";
5
- import { slotChangeListener } from "../customized-slots";
6
- import { v4 as uuidv4 } from "uuid";
7
- import { createTrackingApi } from "../../openApi";
8
- import { createFilterEvent, createProductClickVpsEvent, createProductViewVpsEvent, createSearchEvent, createWidgetVpsEvent, } from "../../tracking";
9
- /**
10
- * @prop --color-primary: color used for action button, slider bullets and selected detected object;
11
- *
12
- * @part close-button - close button on modal header.
13
- * @part secondary-action - back button on modal header.
14
- * @part title - modal window title.
15
- *
16
- * @part select-image_button
17
- *
18
- * @part product-card - product card.
19
- * @part product-card_brand - product card brand.
20
- * @part product-card_currency - currency sign. Renders after price-amount inside product card.
21
- * @part product-card_deeplink - anchor element for title. Rendered only if "deeplink" property filled.
22
- * @part product-card_image - product image inside product card.
23
- * @part product-card_image-link - anchor element for image. Rendered only if "deeplink" property filled.
24
- * @part product-card_price-amount - numeric part of price inside product card.
25
- * @part product-card_price-container - block contains all prices inside product card.
26
- * @part product-card_price-outdated - renders inside price-container when "sale-price" property filled. Contains regular price.
27
- * @part product-card_price-prefix - renders before price-amount. Can be set with "price-prefix" property or inherited from parent component.
28
- * @part product-card_price-regular - renders inside price-container when "sale-price" property is empty.
29
- * @part product-card_price-sale - renders inside price-container when "sale-price" property filled. Contains sale price.
30
- * @part product-card_title - product title
31
- * @part example-images - example images block
32
- */
33
- export class VviinnVpsWidget {
34
- constructor() {
35
- /** @internal */
36
- this.apiPath = "https://api.vviinn.com";
37
- /** When true modal window with widget will be shown */
38
- this.active = false;
39
- /** Currency sign will shown after price */
40
- this.currencySign = "€";
41
- /** Locale for currency formatting */
42
- this.locale = "de-DE";
43
- this.slidePosition = 0;
44
- this.width = 0;
45
- this.wrongImageFormat = false;
46
- this.imageSource = null;
47
- }
48
- activeWatcher(value) {
49
- if (value) {
50
- this.overflow = document.body.style.overflow;
51
- document.body.style.overflow = "hidden";
52
- this.trackOpenEvent();
53
- }
54
- else {
55
- document.body.style.overflow = this.overflow;
56
- }
57
- }
58
- trackRecommendationView({ detail }) {
59
- const recommendationViewEvent = createProductViewVpsEvent(Object.assign({ session_id: this.uiSessionId }, detail));
60
- this.trackingApi.trackEvent(recommendationViewEvent);
61
- }
62
- trackRecommendationClick({ detail }) {
63
- const recommendationClickEvent = createProductClickVpsEvent(Object.assign({ sessionId: this.uiSessionId }, detail));
64
- this.trackingApi.trackEvent(recommendationClickEvent).finally(() => {
65
- const product = imageSearchState.results.find((r) => r.productId === detail.product);
66
- if (!product || !product.deeplink)
67
- return;
68
- window.location.href = product.deeplink;
69
- });
70
- }
71
- trachSearchAreaChanges() {
72
- const searchEvent = createSearchEvent({
73
- session_id: this.uiSessionId,
74
- source: this.imageSource,
75
- search_area: "manual-selection",
76
- });
77
- this.trackingApi.trackEvent(searchEvent);
78
- }
79
- trackDetectedObject() {
80
- const searchEvent = createSearchEvent({
81
- session_id: this.uiSessionId,
82
- source: this.imageSource,
83
- search_area: "attention-point",
84
- });
85
- this.trackingApi.trackEvent(searchEvent);
86
- }
87
- trackFilter({ detail }) {
88
- const searchEvent = createFilterEvent({
89
- session_id: this.uiSessionId,
90
- source: this.imageSource,
91
- kind: "category",
92
- action: detail,
93
- });
94
- this.trackingApi.trackEvent(searchEvent);
95
- }
96
- componentWillLoad() {
97
- slotChangeListener(this, this.el);
98
- }
99
- connectedCallback() {
100
- state.apiPath = this.apiPath;
101
- state.currencySign = this.currencySign;
102
- state.locale = this.locale;
103
- imageSearchState.token = this.token;
104
- this.uiSessionId = uuidv4();
105
- }
106
- trackOpenEvent() {
107
- this.trackingApi = createTrackingApi(this.apiPath, this.token);
108
- const widgetOpenEvent = createWidgetVpsEvent({
109
- action: "open",
110
- session_id: this.uiSessionId,
111
- });
112
- this.trackingApi.trackEvent(widgetOpenEvent);
113
- }
114
- handleImageSelection(source) {
115
- this.imageSource = source;
116
- this.slidePosition = 1;
117
- const root = this.el.shadowRoot.querySelector("vviinn-overlayed-modal");
118
- const overlay = root.shadowRoot.querySelector("vviinn-overlay");
119
- const modal = overlay.querySelector("vviinn-modal");
120
- const modalBody = modal.shadowRoot.querySelector(".body");
121
- modalBody.scrollTop = 0;
122
- this.trackInitialSearch();
123
- }
124
- trackInitialSearch() {
125
- const searchEvent = createSearchEvent({
126
- session_id: this.uiSessionId,
127
- source: this.imageSource,
128
- search_area: "full",
129
- });
130
- this.trackingApi.trackEvent(searchEvent);
131
- }
132
- resetState() {
133
- this.resetScroll("onboarding-block");
134
- this.slidePosition = 0;
135
- imageSearchState.image = O.none;
136
- imageSearchState.imageUrl = O.none;
137
- imageSearchState.imageBounds = O.none;
138
- imageSearchState.searchArea = O.none;
139
- imageSearchState.results = [];
140
- imageSearchState.filters = [];
141
- imageSearchState.detectedObjects = [];
142
- imageSearchState.activeIonLink = undefined;
143
- imageSearchState.rectangleSearchForm = undefined;
144
- this.resetScroll("results-block");
145
- }
146
- haveErrors() {
147
- return this.wrongImageFormat || imageSearchState.serverError;
148
- }
149
- resetScroll(elementId, behavior = "auto") {
150
- const element = this.el.shadowRoot.getElementById(elementId);
151
- element.scroll({ top: 0, left: 0, behavior });
152
- }
153
- handleModalClose() {
154
- this.active = false;
155
- this.resetState();
156
- const elementsToReset = ["onboarding-block", "results-block"];
157
- elementsToReset.forEach((name) => this.resetScroll(name));
158
- const widgetOpenEvent = createWidgetVpsEvent({
159
- action: "close",
160
- session_id: this.uiSessionId,
161
- });
162
- this.trackingApi.trackEvent(widgetOpenEvent);
163
- }
164
- render() {
165
- return (h(Host, null,
166
- h("vviinn-overlayed-modal", { class: { "first-screen": this.slidePosition === 0 }, active: this.active, onSecondaryActionClicked: () => this.resetState(), onModalClosed: () => this.handleModalClose(), exportparts: "secondary-action, title, close-button, example-images" },
167
- h("vviinn-slider", { showBullets: false, position: this.slidePosition },
168
- h("vviinn-slide", { class: { "start-page": true } },
169
- h("div", { class: {
170
- error: this.haveErrors(),
171
- "start-page_block": true,
172
- } },
173
- h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, onActionClick: () => (this.wrongImageFormat = false) }),
174
- h("vviinn-server-error", { class: { hidden: !imageSearchState.serverError }, onActionClick: () => (imageSearchState.serverError = false) }),
175
- h("vviinn-teaser", { class: { hidden: this.haveErrors() } }),
176
- h("vviinn-image-selector", { class: { hidden: this.haveErrors() }, onImageSelected: () => this.handleImageSelection("upload"), onImageSelectedError: () => (this.wrongImageFormat = true), part: "select-image_button" },
177
- h("span", { slot: "upload-button-text", class: "upload-button-content" },
178
- h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "29", height: "28", fill: "none" },
179
- h("defs", null),
180
- h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z", "clip-rule": "evenodd" }),
181
- h("path", { fill: "#fff", "fill-rule": "evenodd", d: "M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z", "clip-rule": "evenodd" })),
182
- h("slot", { name: "vviinn-image-upload-button-text" },
183
- h("span", null, "Kamera oder Bild ausw\u00E4hlen")))),
184
- h("vviinn-privacy-badge", { class: { hidden: this.haveErrors() } })),
185
- h("div", { id: "onboarding-block", class: "start-page_block" },
186
- h("div", { class: "onboarding-wrapper" },
187
- h("vviinn-onboarding", null),
188
- h("vviinn-example-images", { part: "example-images", onImageSelected: () => this.handleImageSelection("example"), onImageSelectedError: () => this.resetScroll("onboarding-block", "smooth") })))),
189
- h("vviinn-slide", { class: { "results-page": true, active: this.slidePosition == 1 } },
190
- h("div", { class: "image-wrapper" },
191
- h("vviinn-image-view", null),
192
- h("div", { class: "filters-wrapper" },
193
- h("div", { class: "filters" }, imageSearchState.filters.map((filter) => (h("search-filters", { filter: filter })))))),
194
- h("div", { id: "results-block", class: "products-wrapper" },
195
- h("div", { class: {
196
- "nothing-found": true,
197
- hidden: imageSearchState.results.length > 0,
198
- } },
199
- h("vviinn-empty-results", null),
200
- h("vviinn-onboarding", null)),
201
- h("div", { class: {
202
- hidden: imageSearchState.results.length <= 0,
203
- products: true,
204
- } }, imageSearchState.results.map((p, i) => {
205
- var _a;
206
- return (h("vviinn-product-card", { hidden: true, productTitle: p.title, productId: p.productId, brand: p.brand, deeplink: p.deeplink, price: p.price.actual, salePrice: p.price.sale, imageWidth: 160, image: (_a = p.image.thumbnail) !== null && _a !== void 0 ? _a : p.image.original, part: "product-card", index: i }));
207
- }))))))));
208
- }
209
- static get is() { return "vviinn-vps-widget"; }
210
- static get encapsulation() { return "shadow"; }
211
- static get originalStyleUrls() { return {
212
- "$": ["vviinn-vps-widget.css"]
213
- }; }
214
- static get styleUrls() { return {
215
- "$": ["vviinn-vps-widget.css"]
216
- }; }
217
- static get properties() { return {
218
- "token": {
219
- "type": "string",
220
- "mutable": false,
221
- "complexType": {
222
- "original": "string | undefined",
223
- "resolved": "string",
224
- "references": {}
225
- },
226
- "required": false,
227
- "optional": false,
228
- "docs": {
229
- "tags": [],
230
- "text": "vviinn customer token"
231
- },
232
- "attribute": "token",
233
- "reflect": false
234
- },
235
- "apiPath": {
236
- "type": "string",
237
- "mutable": false,
238
- "complexType": {
239
- "original": "string",
240
- "resolved": "string",
241
- "references": {}
242
- },
243
- "required": false,
244
- "optional": false,
245
- "docs": {
246
- "tags": [{
247
- "text": undefined,
248
- "name": "internal"
249
- }],
250
- "text": ""
251
- },
252
- "attribute": "api-path",
253
- "reflect": false,
254
- "defaultValue": "\"https://api.vviinn.com\""
255
- },
256
- "active": {
257
- "type": "boolean",
258
- "mutable": true,
259
- "complexType": {
260
- "original": "boolean",
261
- "resolved": "boolean",
262
- "references": {}
263
- },
264
- "required": false,
265
- "optional": false,
266
- "docs": {
267
- "tags": [],
268
- "text": "When true modal window with widget will be shown"
269
- },
270
- "attribute": "active",
271
- "reflect": false,
272
- "defaultValue": "false"
273
- },
274
- "currencySign": {
275
- "type": "string",
276
- "mutable": false,
277
- "complexType": {
278
- "original": "string",
279
- "resolved": "string",
280
- "references": {}
281
- },
282
- "required": false,
283
- "optional": false,
284
- "docs": {
285
- "tags": [],
286
- "text": "Currency sign will shown after price"
287
- },
288
- "attribute": "currency-sign",
289
- "reflect": false,
290
- "defaultValue": "\"\u20AC\""
291
- },
292
- "locale": {
293
- "type": "string",
294
- "mutable": false,
295
- "complexType": {
296
- "original": "string",
297
- "resolved": "string",
298
- "references": {}
299
- },
300
- "required": false,
301
- "optional": false,
302
- "docs": {
303
- "tags": [],
304
- "text": "Locale for currency formatting"
305
- },
306
- "attribute": "locale",
307
- "reflect": false,
308
- "defaultValue": "\"de-DE\""
309
- }
310
- }; }
311
- static get states() { return {
312
- "slidePosition": {},
313
- "width": {},
314
- "wrongImageFormat": {}
315
- }; }
316
- static get elementRef() { return "el"; }
317
- static get watchers() { return [{
318
- "propName": "active",
319
- "methodName": "activeWatcher"
320
- }]; }
321
- static get listeners() { return [{
322
- "name": "recommendationView",
323
- "method": "trackRecommendationView",
324
- "target": undefined,
325
- "capture": false,
326
- "passive": false
327
- }, {
328
- "name": "recommendationClick",
329
- "method": "trackRecommendationClick",
330
- "target": undefined,
331
- "capture": false,
332
- "passive": false
333
- }, {
334
- "name": "cropperChanged",
335
- "method": "trachSearchAreaChanges",
336
- "target": undefined,
337
- "capture": false,
338
- "passive": false
339
- }, {
340
- "name": "detectedObjectClicked",
341
- "method": "trackDetectedObject",
342
- "target": undefined,
343
- "capture": false,
344
- "passive": false
345
- }, {
346
- "name": "filterSelected",
347
- "method": "trackFilter",
348
- "target": undefined,
349
- "capture": false,
350
- "passive": false
351
- }]; }
352
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,61 +0,0 @@
1
- import * as Point from "../geometry/Point";
2
- export var HandlerDirection;
3
- (function (HandlerDirection) {
4
- HandlerDirection[HandlerDirection["East"] = 0] = "East";
5
- HandlerDirection[HandlerDirection["North"] = 1] = "North";
6
- HandlerDirection[HandlerDirection["NorthEast"] = 2] = "NorthEast";
7
- HandlerDirection[HandlerDirection["NorthWest"] = 3] = "NorthWest";
8
- HandlerDirection[HandlerDirection["South"] = 4] = "South";
9
- HandlerDirection[HandlerDirection["SouthEast"] = 5] = "SouthEast";
10
- HandlerDirection[HandlerDirection["SouthWest"] = 6] = "SouthWest";
11
- HandlerDirection[HandlerDirection["West"] = 7] = "West";
12
- })(HandlerDirection || (HandlerDirection = {}));
13
- export const getCursorValue = (direction) => {
14
- switch (direction) {
15
- case HandlerDirection.East:
16
- return "e-resize";
17
- case HandlerDirection.North:
18
- return "n-resize";
19
- case HandlerDirection.NorthEast:
20
- return "ne-resize";
21
- case HandlerDirection.NorthWest:
22
- return "nw-resize";
23
- case HandlerDirection.South:
24
- return "s-resize";
25
- case HandlerDirection.SouthEast:
26
- return "se-resize";
27
- case HandlerDirection.SouthWest:
28
- return "sw-resize";
29
- case HandlerDirection.West:
30
- return "w-resize";
31
- default:
32
- return "pointer";
33
- }
34
- };
35
- export const fromRectangle = (r) => [
36
- {
37
- position: Point.fromRectangle(r),
38
- direction: HandlerDirection.NorthWest,
39
- },
40
- {
41
- position: Point.pointSumSemigroup.concat(Point.fromRectangle(r), {
42
- x: r.width,
43
- y: 0,
44
- }),
45
- direction: HandlerDirection.NorthEast,
46
- },
47
- {
48
- position: Point.pointSumSemigroup.concat(Point.fromRectangle(r), {
49
- x: 0,
50
- y: r.height,
51
- }),
52
- direction: HandlerDirection.SouthWest,
53
- },
54
- {
55
- position: Point.pointSumSemigroup.concat(Point.fromRectangle(r), {
56
- x: r.width,
57
- y: r.height,
58
- }),
59
- direction: HandlerDirection.SouthEast,
60
- },
61
- ];
@@ -1,3 +0,0 @@
1
- export const findTarget = (ev) => {
2
- return ev.target;
3
- };
@@ -1,14 +0,0 @@
1
- export const basicErrorFromResponse = (error) => {
2
- return {
3
- kind: "server",
4
- inner: error,
5
- };
6
- };
7
- export const invalidTokenError = {
8
- kind: "client",
9
- inner: "Token not exist or empty",
10
- };
11
- export const emptyApiPathError = {
12
- kind: "client",
13
- inner: "Api path empty or missing",
14
- };
@@ -1,4 +0,0 @@
1
- export const fileDoesntExistError = {
2
- kind: "app",
3
- inner: "File doesnt exist",
4
- };
@@ -1,14 +0,0 @@
1
- const fromRectangle = (shape, target) => {
2
- const top = `${shape.y}px`;
3
- const left = `${shape.x}px`;
4
- const right = `${target.width - (shape.x + shape.width)}px`;
5
- const bottom = `${target.height - (shape.y + shape.height)}px`;
6
- return {
7
- top,
8
- right,
9
- bottom,
10
- left,
11
- };
12
- };
13
- const printClip = (clip) => `inset(${clip.top} ${clip.right} ${clip.bottom} ${clip.left})`;
14
- export const getClipValue = (shape, target) => printClip(fromRectangle(shape, target));
@@ -1,32 +0,0 @@
1
- import { semigroupSum, semigroupProduct, struct } from "fp-ts/Semigroup";
2
- import { semigroupDiff } from "../utils/semigroup/semigroupDiff";
3
- export const fromRectangle = ({ x, y }) => {
4
- return {
5
- x,
6
- y,
7
- };
8
- };
9
- export const fromMouseEvent = ({ clientX, clientY }) => {
10
- return {
11
- x: clientX,
12
- y: clientY,
13
- };
14
- };
15
- export const fromTouchEvent = ({ touches }) => {
16
- return {
17
- x: touches[0].clientX,
18
- y: touches[0].clientY,
19
- };
20
- };
21
- export const pointDiffSemigroup = struct({
22
- x: semigroupDiff,
23
- y: semigroupDiff,
24
- });
25
- export const pointSumSemigroup = struct({
26
- x: semigroupSum,
27
- y: semigroupSum,
28
- });
29
- export const pointProductSemigroup = struct({
30
- x: semigroupProduct,
31
- y: semigroupProduct,
32
- });
@@ -1,95 +0,0 @@
1
- import { fromRectangle, pointSumSemigroup, pointProductSemigroup, } from "./Point";
2
- import { HandlerDirection } from "../cropper/Handler";
3
- import { sizedDivSemigroup } from "./Sized";
4
- export const move = (origin, position) => {
5
- const originPosition = fromRectangle(origin);
6
- const newPosition = pointSumSemigroup.concat(originPosition, position);
7
- return Object.assign(Object.assign({}, newPosition), { width: origin.width, height: origin.height });
8
- };
9
- const transformNorthEast = (origin, handler) => {
10
- const newPosition = pointSumSemigroup.concat(fromRectangle(origin), {
11
- x: 0,
12
- y: handler.position.y,
13
- });
14
- return Object.assign(Object.assign({}, newPosition), { width: origin.width + handler.position.x, height: origin.height - handler.position.y });
15
- };
16
- export const transformNorthWest = (origin, handler) => {
17
- const newPosition = pointSumSemigroup.concat(fromRectangle(origin), handler.position);
18
- return Object.assign(Object.assign({}, newPosition), { width: origin.width - handler.position.x, height: origin.height - handler.position.y });
19
- };
20
- const transformSouthEast = (origin, handler) => {
21
- return Object.assign(Object.assign({}, origin), { width: origin.width + handler.position.x, height: origin.height + handler.position.y });
22
- };
23
- const transformSouthWest = (origin, handler) => {
24
- const newPosition = pointSumSemigroup.concat(fromRectangle(origin), {
25
- x: handler.position.x,
26
- y: 0,
27
- });
28
- return Object.assign(Object.assign({}, newPosition), { width: origin.width - handler.position.x, height: origin.height + handler.position.y });
29
- };
30
- export const transform = (origin, handler) => {
31
- switch (handler.direction) {
32
- case HandlerDirection.NorthEast:
33
- return transformNorthEast(origin, handler);
34
- case HandlerDirection.NorthWest:
35
- return transformNorthWest(origin, handler);
36
- case HandlerDirection.SouthEast:
37
- return transformSouthEast(origin, handler);
38
- case HandlerDirection.SouthWest:
39
- return transformSouthWest(origin, handler);
40
- }
41
- };
42
- export const fromImage = (image) => {
43
- return {
44
- x: 0,
45
- y: 0,
46
- width: image.width,
47
- height: image.height,
48
- };
49
- };
50
- export const fromNaturalImage = (image) => {
51
- return {
52
- x: 0,
53
- y: 0,
54
- width: image.naturalWidth,
55
- height: image.naturalHeight,
56
- };
57
- };
58
- export const getScaleRange = (source, target) => {
59
- const difference = sizedDivSemigroup.concat(target, source);
60
- return {
61
- x: difference.width,
62
- y: difference.height,
63
- };
64
- };
65
- export const scaleSelection = (source, sourceSelection, target) => {
66
- const sourcePosition = fromRectangle(source);
67
- const scale = getScaleRange(source, target);
68
- const newPosition = pointProductSemigroup.concat(sourcePosition, scale);
69
- return Object.assign(Object.assign({}, newPosition), { width: sourceSelection.width * scale.x, height: sourceSelection.height * scale.y });
70
- };
71
- export const fromAlt = (r) => {
72
- return Object.assign({ x: r.left, y: r.top }, r);
73
- };
74
- export const scaleWithSized = (s) => (r) => {
75
- return {
76
- x: r.x * s.width,
77
- y: r.y * s.height,
78
- width: r.width * s.width,
79
- height: r.height * s.height,
80
- };
81
- };
82
- export const divideOnSized = (s) => (r) => {
83
- return {
84
- x: r.x / s.width,
85
- y: r.y / s.height,
86
- width: r.width / s.width,
87
- height: r.height / s.height,
88
- };
89
- };
90
- export const center = (r) => {
91
- return {
92
- x: r.x + r.width * 0.5,
93
- y: r.y + r.height * 0.5,
94
- };
95
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- import { semigroupDiv } from "../utils/semigroup/semigroupDiff";
2
- import { getStructSemigroup } from "fp-ts/Semigroup";
3
- import * as Ord from "fp-ts/Ord";
4
- export const sizedDivSemigroup = getStructSemigroup({
5
- width: semigroupDiv,
6
- height: semigroupDiv,
7
- });
8
- export const ordSized = Ord.contramap((s) => s.width * s.height)(Ord.ordNumber);
@@ -1,19 +0,0 @@
1
- import * as Sentry from "@sentry/browser";
2
- import { Env } from "@stencil/core";
3
- import { filterInternalExeptions } from "./sentry";
4
- const setupSentry = () => {
5
- Sentry.init({
6
- dsn: "https://70bcf561598b44148bd3cabc7c142a6c@o1015876.ingest.sentry.io/5983034",
7
- release: `${Env.packageName}@${Env.packageVersion}`,
8
- environment: Env.environment,
9
- tracesSampleRate: 0.0,
10
- maxBreadcrumbs: 4,
11
- beforeSend: filterInternalExeptions,
12
- allowUrls: [
13
- /https?:\/\/cdn\.jsdelivr\.net\/npm\/vviinn-widgets.+/
14
- ]
15
- });
16
- };
17
- export default function () {
18
- setupSentry();
19
- }
@@ -1 +0,0 @@
1
- export * from './components';
@@ -1,5 +0,0 @@
1
- /**
2
- * This file was auto-generated by openapi-typescript.
3
- * Do not make direct changes to the file.
4
- */
5
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import * as E from "fp-ts/Either";
2
- import * as TE from "fp-ts/TaskEither";
3
- import { pipe } from "fp-ts/function";
4
- import { sequenceT } from "fp-ts/Apply";
5
- import { createInitGetRequest, createInitPostRequest, getApiPath, } from "./utils";
6
- import { makeRequest } from "./request";
7
- const sequenceToEither = sequenceT(E.Apply);
8
- export const apiGet = (path, data = {}) => pipe(sequenceToEither(getApiPath(), createInitGetRequest), TE.fromEither, TE.chainW(makeRequest(path, data)));
9
- export const apiPost = (path, data = {}) => pipe(sequenceToEither(getApiPath(), createInitPostRequest), TE.fromEither, TE.chainW(makeRequest(path, data)));
@@ -1,14 +0,0 @@
1
- export const fileToB64 = async (f) => new Promise((resolve) => {
2
- const reader = new FileReader();
3
- reader.addEventListener("load", () => {
4
- resolve(reader.result);
5
- });
6
- reader.readAsDataURL(f);
7
- });
8
- export const fromFile = async (f) => {
9
- return {
10
- name: f.name,
11
- mediaType: f.type,
12
- value: await fileToB64(f),
13
- };
14
- };