vviinn-widgets 2.5.2 → 2.7.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 (116) hide show
  1. package/dist/cjs/{app-globals-d15b4c2c.js → app-globals-047a582c.js} +1 -1
  2. package/dist/cjs/{highlight-box_22.cjs.entry.js → cropper-handler_27.cjs.entry.js} +473 -85
  3. package/dist/cjs/{customized-slots-0c0d0665.js → customized-slots-cb722e68.js} +1 -1
  4. package/dist/cjs/{index-0f5516a6.js → index-bd771524.js} +1 -1
  5. package/dist/cjs/{imageSearch.store-865c23f4.js → index-d07466b9.js} +14707 -11093
  6. package/dist/cjs/{index-31b9cb7a.js → index-fcafbfe5.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +3 -3
  8. package/dist/cjs/{vviinn-carousel_3.cjs.entry.js → vviinn-carousel_2.cjs.entry.js} +35 -208
  9. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +5 -3
  10. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +7 -2
  11. package/dist/cjs/vviinn-vps-button.cjs.entry.js +4 -4
  12. package/dist/cjs/vviinn-widgets.cjs.js +3 -3
  13. package/dist/collection/campaign/VCSCampaignService.js +4 -2
  14. package/dist/collection/campaign/VPRCampaignService.js +4 -2
  15. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +21 -1
  16. package/dist/collection/components/vviinn-vpr-button/stories/args.js +6 -0
  17. package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +2 -0
  18. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +23 -0
  19. package/dist/collection/components/vviinn-vpr-widget/stories/args.js +7 -0
  20. package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +12 -13
  21. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +28 -1
  22. package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +9 -5
  23. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +18 -1
  24. package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +11 -7
  25. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +23 -0
  26. package/dist/collection/searchSession/searchSession.js +6 -1
  27. package/dist/collection/store/imageSearch.store.js +2 -7
  28. package/dist/esm/{app-globals-6f6aa89e.js → app-globals-68b1d848.js} +1 -1
  29. package/dist/esm/{highlight-box_22.entry.js → cropper-handler_27.entry.js} +404 -21
  30. package/dist/esm/{customized-slots-6b427dda.js → customized-slots-95a05ceb.js} +1 -1
  31. package/dist/esm/{imageSearch.store-0ae87235.js → index-33fe5a25.js} +14832 -11234
  32. package/dist/esm/{index-59f44eaa.js → index-75a1f589.js} +1 -1
  33. package/dist/esm/{index-ac05c460.js → index-f9df412f.js} +2 -2
  34. package/dist/esm/loader.js +3 -3
  35. package/dist/esm/{vviinn-carousel_3.entry.js → vviinn-carousel_2.entry.js} +15 -187
  36. package/dist/esm/vviinn-recommendations-sidebar.entry.js +5 -3
  37. package/dist/esm/vviinn-vpr-button.entry.js +7 -2
  38. package/dist/esm/vviinn-vps-button.entry.js +4 -4
  39. package/dist/esm/vviinn-widgets.js +3 -3
  40. package/dist/types/campaign/CampaignService.d.ts +1 -1
  41. package/dist/types/campaign/VCSCampaignService.d.ts +2 -1
  42. package/dist/types/campaign/VPRCampaignService.d.ts +2 -1
  43. package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +2 -0
  44. package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +6 -0
  45. package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +6 -0
  46. package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +2 -0
  47. package/dist/types/components/vviinn-vpr-widget/stories/args.d.ts +6 -0
  48. package/dist/types/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.d.ts +6 -0
  49. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +3 -0
  50. package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +2 -0
  51. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +2 -0
  52. package/dist/types/components.d.ts +40 -0
  53. package/dist/types/searchSession/searchSession.d.ts +2 -1
  54. package/dist/types/store/imageSearch.store.d.ts +7 -6
  55. package/dist/vviinn-widgets/{p-bad1809f.js → p-4e55513e.js} +1 -1
  56. package/dist/vviinn-widgets/p-5358970c.entry.js +1 -0
  57. package/{www/build/p-c36546fa.js → dist/vviinn-widgets/p-66015ad7.js} +1 -1
  58. package/dist/vviinn-widgets/p-669a156c.entry.js +1 -0
  59. package/dist/vviinn-widgets/p-8080679b.entry.js +1 -0
  60. package/dist/vviinn-widgets/p-9de1b0e7.js +1 -0
  61. package/dist/vviinn-widgets/{p-ee46fc83.js → p-b254eee7.js} +1 -1
  62. package/dist/vviinn-widgets/p-c1cd51ef.entry.js +1 -0
  63. package/dist/vviinn-widgets/p-e32c30d4.entry.js +1 -0
  64. package/dist/vviinn-widgets/{p-118ac907.js → p-f6e59cb2.js} +1 -1
  65. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  66. package/package.json +3 -3
  67. package/www/build/{p-bad1809f.js → p-4e55513e.js} +1 -1
  68. package/www/build/p-5358970c.entry.js +1 -0
  69. package/{dist/vviinn-widgets/p-c36546fa.js → www/build/p-66015ad7.js} +1 -1
  70. package/www/build/p-669a156c.entry.js +1 -0
  71. package/www/build/p-8080679b.entry.js +1 -0
  72. package/www/build/p-9de1b0e7.js +1 -0
  73. package/www/build/{p-ee46fc83.js → p-b254eee7.js} +1 -1
  74. package/www/build/p-c1cd51ef.entry.js +1 -0
  75. package/www/build/p-e32c30d4.entry.js +1 -0
  76. package/www/build/p-eb8f77e4.js +1 -0
  77. package/www/build/{p-118ac907.js → p-f6e59cb2.js} +1 -1
  78. package/www/build/vviinn-widgets.esm.js +1 -1
  79. package/www/index.html +1 -1
  80. package/dist/cjs/Handler-176539c8.js +0 -331
  81. package/dist/cjs/cropper-handler.cjs.entry.js +0 -27
  82. package/dist/cjs/index-0eb3036a.js +0 -3235
  83. package/dist/cjs/vviinn-error.cjs.entry.js +0 -19
  84. package/dist/cjs/vviinn-preloader.cjs.entry.js +0 -26
  85. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +0 -167
  86. package/dist/esm/Handler-f9b8735c.js +0 -309
  87. package/dist/esm/cropper-handler.entry.js +0 -23
  88. package/dist/esm/index-2e296af4.js +0 -3224
  89. package/dist/esm/vviinn-error.entry.js +0 -15
  90. package/dist/esm/vviinn-preloader.entry.js +0 -22
  91. package/dist/esm/vviinn-vps-widget.entry.js +0 -163
  92. package/dist/vviinn-widgets/p-11f61564.js +0 -1
  93. package/dist/vviinn-widgets/p-39fdc5c9.entry.js +0 -1
  94. package/dist/vviinn-widgets/p-762dc067.entry.js +0 -1
  95. package/dist/vviinn-widgets/p-7e2f542c.js +0 -1
  96. package/dist/vviinn-widgets/p-8d56e795.entry.js +0 -1
  97. package/dist/vviinn-widgets/p-8f955b15.entry.js +0 -1
  98. package/dist/vviinn-widgets/p-9654fe35.entry.js +0 -1
  99. package/dist/vviinn-widgets/p-9e5adc42.js +0 -1
  100. package/dist/vviinn-widgets/p-b3731705.entry.js +0 -1
  101. package/dist/vviinn-widgets/p-d991330b.entry.js +0 -1
  102. package/dist/vviinn-widgets/p-da9c933b.entry.js +0 -1
  103. package/dist/vviinn-widgets/p-f41e25f0.entry.js +0 -1
  104. package/www/build/p-11f61564.js +0 -1
  105. package/www/build/p-39fdc5c9.entry.js +0 -1
  106. package/www/build/p-762dc067.entry.js +0 -1
  107. package/www/build/p-7e2f542c.js +0 -1
  108. package/www/build/p-8d56e795.entry.js +0 -1
  109. package/www/build/p-8f955b15.entry.js +0 -1
  110. package/www/build/p-9654fe35.entry.js +0 -1
  111. package/www/build/p-9e5adc42.js +0 -1
  112. package/www/build/p-b3731705.entry.js +0 -1
  113. package/www/build/p-cfd998c1.js +0 -1
  114. package/www/build/p-d991330b.entry.js +0 -1
  115. package/www/build/p-da9c933b.entry.js +0 -1
  116. package/www/build/p-f41e25f0.entry.js +0 -1
@@ -1 +1 @@
1
- import{p as e,b as i}from"./p-bad1809f.js";import{g as r}from"./p-c36546fa.js";(()=>{const i=import.meta.url,r={};return""!==i&&(r.resourcesUrl=new URL(".",i).href),e(r)})().then((e=>(r(),i([["p-8f955b15",[[1,"cropper-handler",{handler:[16],disabled:[4]}]]],["p-8d56e795",[[1,"vviinn-error"]]],["p-9654fe35",[[1,"vviinn-preloader"]]],["p-da9c933b",[[1,"vviinn-vpr-widget",{blockTitle:[1,"block-title"],imageRatio:[2,"image-ratio"],imageWidth:[2,"image-width"],productId:[1,"product-id"],token:[1],currencySign:[1,"currency-sign"],pricePrefix:[1,"price-prefix"],mode:[1],campaignType:[1,"campaign-type"],locale:[1],apiPath:[1,"api-path"],useCarousel:[4,"use-carousel"],showScroll:[4,"show-scroll"],cssUrl:[1,"css-url"],recommendations:[32],loaded:[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{mode:[1],imageWidth:[2,"image-width"],showScroll:[4,"show-scroll"],recommendations:[16],moveDirection:[32],contentGroups:[32],activeContentGroup:[32]}],[1,"vviinn-product-card",{brand:[1],currency:[1],deeplink:[1],image:[1],imageRatio:[2,"image-ratio"],imageWidth:[2,"image-width"],locale:[1],price:[2],pricePrefix:[1,"price-prefix"],productId:[1,"product-id"],productTitle:[1,"product-title"],productType:[1,"product-type"],salePrice:[2,"sale-price"],responsive:[4],dimmedBackground:[4,"dimmed-background"],index:[2],imageLoaded:[32]}]]],["p-39fdc5c9",[[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{active:[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{filter:[16],selectedCategoryId:[32],hideFilters:[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{disabled:[4],handleMove:[32]}],[1,"vviinn-example-image",{src:[1],width:[2],height:[2],selected:[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{detectedObject:[16],position:[32]}],[1,"vviinn-modal",{active:[1540],slider:[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{showBullets:[4,"show-bullets"],position:[514],showArrows:[4,"show-arrows"],elementsCount:[32],internalPosition:[32],swipeStartPosition:[32]}]]],["p-d991330b",[[1,"vviinn-vps-widget",{token:[1],apiPath:[1,"api-path"],active:[1028],currencySign:[1,"currency-sign"],locale:[1],slidePosition:[32],width:[32],wrongImageFormat:[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]]]],["p-762dc067",[[1,"vviinn-vps-button",{token:[1],currencySign:[1,"currency-sign"],locale:[1],apiPath:[1,"api-path"],pressed:[32]},[[0,"modalClosed","handleModalClosed"]]]]],["p-f41e25f0",[[1,"vviinn-recommendations-sidebar",{sidebarTitle:[1,"sidebar-title"],token:[1],productId:[1,"product-id"],position:[1],sourceImage:[1,"source-image"],widgetScrollbar:[4,"widget-scrollbar"],state:[32]},[[16,"click","bodyClickListener"]]]]],["p-b3731705",[[1,"vviinn-vpr-button",{token:[1],productId:[1,"product-id"],position:[1],sourceImage:[1,"source-image"],sidebarTitle:[1,"sidebar-title"],modalScrollbar:[4,"modal-scrollbar"]}]]]],e))));
1
+ import{p as e,b as i}from"./p-4e55513e.js";import{g as a}from"./p-66015ad7.js";(()=>{const i=import.meta.url,a={};return""!==i&&(a.resourcesUrl=new URL(".",i).href),e(a)})().then((e=>(a(),i([["p-669a156c",[[1,"vviinn-vps-widget",{token:[1],apiPath:[1,"api-path"],active:[1028],currencySign:[1,"currency-sign"],locale:[1],campaignId:[1,"campaign-id"],slidePosition:[32],width:[32],wrongImageFormat:[32]},[[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"],[0,"cropperChanged","trachSearchAreaChanges"],[0,"detectedObjectClicked","trackDetectedObject"],[0,"filterSelected","trackFilter"]]],[1,"vviinn-image-view"],[1,"vviinn-onboarding"],[1,"vviinn-example-images",null,[[0,"exampleImageSelected","handleImageSelection"],[0,"exampleImageError","handleImageSelectionError"]]],[1,"vviinn-overlayed-modal",{active:[4]}],[1,"vviinn-empty-results"],[1,"vviinn-image-selector"],[1,"vviinn-server-error"],[1,"vviinn-wrong-format"],[1,"search-filters",{filter:[16],selectedCategoryId:[32],hideFilters:[32]}],[1,"vviinn-privacy-badge"],[1,"vviinn-teaser"],[1,"image-cropper",{disabled:[4],handleMove:[32]}],[1,"vviinn-example-image",{src:[1],width:[2],height:[2],selected:[32]}],[1,"highlight-box"],[1,"vviinn-detected-object",{detectedObject:[16],position:[32]}],[1,"vviinn-modal",{active:[1540],slider:[32]}],[1,"vviinn-onboarding-card-1"],[1,"vviinn-onboarding-card-2"],[1,"vviinn-onboarding-card-3"],[1,"vviinn-overlay"],[1,"vviinn-slide"],[1,"vviinn-slider",{showBullets:[4,"show-bullets"],position:[514],showArrows:[4,"show-arrows"],elementsCount:[32],internalPosition:[32],swipeStartPosition:[32]}],[1,"cropper-handler",{handler:[16],disabled:[4]}],[1,"vviinn-error"],[1,"vviinn-preloader"],[1,"vviinn-product-card",{brand:[1],currency:[1],deeplink:[1],image:[1],imageRatio:[2,"image-ratio"],imageWidth:[2,"image-width"],locale:[1],price:[2],pricePrefix:[1,"price-prefix"],productId:[1,"product-id"],productTitle:[1,"product-title"],productType:[1,"product-type"],salePrice:[2,"sale-price"],responsive:[4],dimmedBackground:[4,"dimmed-background"],index:[2],imageLoaded:[32]}]]],["p-e32c30d4",[[1,"vviinn-vps-button",{token:[1],currencySign:[1,"currency-sign"],locale:[1],campaignId:[1,"campaign-id"],apiPath:[1,"api-path"],pressed:[32]},[[0,"modalClosed","handleModalClosed"]]]]],["p-c1cd51ef",[[1,"vviinn-vpr-widget",{blockTitle:[1,"block-title"],imageRatio:[2,"image-ratio"],imageWidth:[2,"image-width"],productId:[1,"product-id"],token:[1],currencySign:[1,"currency-sign"],pricePrefix:[1,"price-prefix"],mode:[1],campaignType:[1,"campaign-type"],locale:[1],campaigns:[1],apiPath:[1,"api-path"],useCarousel:[4,"use-carousel"],showScroll:[4,"show-scroll"],cssUrl:[1,"css-url"],recommendations:[32],loaded:[32]},[[0,"productImageLoaded","handleImageLoading"],[0,"recommendationView","trackRecommendationView"],[0,"recommendationClick","trackRecommendationClick"]]],[0,"vviinn-carousel",{mode:[1],imageWidth:[2,"image-width"],showScroll:[4,"show-scroll"],recommendations:[16],moveDirection:[32],contentGroups:[32],activeContentGroup:[32]}]]],["p-5358970c",[[1,"vviinn-recommendations-sidebar",{sidebarTitle:[1,"sidebar-title"],token:[1],productId:[1,"product-id"],position:[1],sourceImage:[1,"source-image"],widgetScrollbar:[4,"widget-scrollbar"],campaigns:[1],state:[32]},[[16,"click","bodyClickListener"]]]]],["p-8080679b",[[1,"vviinn-vpr-button",{token:[1],productId:[1,"product-id"],position:[1],sourceImage:[1,"source-image"],sidebarTitle:[1,"sidebar-title"],modalScrollbar:[4,"modal-scrollbar"],campaigns:[1]}]]]],e))));
package/www/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Stencil Component Starter</title> <link rel="preconnect" href="https://cdn.vviinn.com"> <link rel="preconnect" href="https://d1rgjmn2wmqeif.cloudfront.net"> <link rel="modulepreload" href="/build/p-cfd998c1.js"><script type="module" src="/build/p-cfd998c1.js" data-stencil data-resources-url="/build/" data-stencil-namespace="vviinn-widgets"></script> <script nomodule="" src="/build/vviinn-widgets.js" data-stencil></script> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin=""> <link href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400&amp;display=swap" rel="stylesheet"> </head> <body> <vviinn-vpr-widget token="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOjEwNSwianRpIjoiMWJkY2I3ZWQtZTI4OS00ODBjLWI5NDItMjhhNGMwNzRmODgxIiwic2NvcGVzIjpbInZwciIsInZwcyIsInZwYyJdfQ.yZhH8r594NydsXsQjS5e1d_OfvnCoGHUj94OVq6kL61ywGsjsY97bOXlTYP9Q9uRCQX_3LRxnS6J7PULV99ndKfwnayNp0PnKnZ02KPMQ8Mb-8reqZBsvsrgrqb-9xvT3itJluFOnXI9FAlQ5s3XNzdt3OQ85eisOXTDNf60Bjc" product-id="FEX1005" block-title="" aria-hidden="false" mode="grid" show-scroll="false" css-url="https://storage.googleapis.com/aiaas-merchant-assets/production/105/css/1169b48d-6f9f-4304-b452-c223a9bacaac.css"></vviinn-vpr-widget> </body></html>
1
+ <!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>Stencil Component Starter</title> <link rel="preconnect" href="https://cdn.vviinn.com"> <link rel="preconnect" href="https://d1rgjmn2wmqeif.cloudfront.net"> <link rel="modulepreload" href="/build/p-eb8f77e4.js"><script type="module" src="/build/p-eb8f77e4.js" data-stencil data-resources-url="/build/" data-stencil-namespace="vviinn-widgets"></script> <script nomodule="" src="/build/vviinn-widgets.js" data-stencil></script> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin=""> <link href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400&amp;display=swap" rel="stylesheet"> </head> <body> <vviinn-vps-widget active="true" token="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOjEwNSwianRpIjoiMWJkY2I3ZWQtZTI4OS00ODBjLWI5NDItMjhhNGMwNzRmODgxIiwic2NvcGVzIjpbInZwciIsInZwcyIsInZwYyJdfQ.yZhH8r594NydsXsQjS5e1d_OfvnCoGHUj94OVq6kL61ywGsjsY97bOXlTYP9Q9uRCQX_3LRxnS6J7PULV99ndKfwnayNp0PnKnZ02KPMQ8Mb-8reqZBsvsrgrqb-9xvT3itJluFOnXI9FAlQ5s3XNzdt3OQ85eisOXTDNf60Bjc" product-id="FEX1005" block-title="" mode="grid" show-scroll="false" css-url="https://storage.googleapis.com/aiaas-merchant-assets/production/105/css/1169b48d-6f9f-4304-b452-c223a9bacaac.css" campaign-id="23"></vviinn-vps-widget> </body></html>
@@ -1,331 +0,0 @@
1
- 'use strict';
2
-
3
- // -------------------------------------------------------------------------------------
4
- /**
5
- * @since 2.0.0
6
- */
7
- function identity(a) {
8
- return a;
9
- }
10
- function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
11
- switch (arguments.length) {
12
- case 1:
13
- return ab;
14
- case 2:
15
- return function () {
16
- return bc(ab.apply(this, arguments));
17
- };
18
- case 3:
19
- return function () {
20
- return cd(bc(ab.apply(this, arguments)));
21
- };
22
- case 4:
23
- return function () {
24
- return de(cd(bc(ab.apply(this, arguments))));
25
- };
26
- case 5:
27
- return function () {
28
- return ef(de(cd(bc(ab.apply(this, arguments)))));
29
- };
30
- case 6:
31
- return function () {
32
- return fg(ef(de(cd(bc(ab.apply(this, arguments))))));
33
- };
34
- case 7:
35
- return function () {
36
- return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));
37
- };
38
- case 8:
39
- return function () {
40
- return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));
41
- };
42
- case 9:
43
- return function () {
44
- return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));
45
- };
46
- }
47
- return;
48
- }
49
- /**
50
- * @since 2.0.0
51
- */
52
- function tuple() {
53
- var t = [];
54
- for (var _i = 0; _i < arguments.length; _i++) {
55
- t[_i] = arguments[_i];
56
- }
57
- return t;
58
- }
59
- function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
60
- switch (arguments.length) {
61
- case 1:
62
- return a;
63
- case 2:
64
- return ab(a);
65
- case 3:
66
- return bc(ab(a));
67
- case 4:
68
- return cd(bc(ab(a)));
69
- case 5:
70
- return de(cd(bc(ab(a))));
71
- case 6:
72
- return ef(de(cd(bc(ab(a)))));
73
- case 7:
74
- return fg(ef(de(cd(bc(ab(a))))));
75
- case 8:
76
- return gh(fg(ef(de(cd(bc(ab(a)))))));
77
- case 9:
78
- return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
79
- default: {
80
- var ret = arguments[0];
81
- for (var i = 1; i < arguments.length; i++) {
82
- ret = arguments[i](ret);
83
- }
84
- return ret;
85
- }
86
- }
87
- }
88
-
89
- // -------------------------------------------------------------------------------------
90
- // Option
91
- // -------------------------------------------------------------------------------------
92
- /** @internal */
93
- var isNone = function (fa) { return fa._tag === 'None'; };
94
- /** @internal */
95
- var isSome = function (fa) { return fa._tag === 'Some'; };
96
- /** @internal */
97
- var none = { _tag: 'None' };
98
- /** @internal */
99
- var some = function (a) { return ({ _tag: 'Some', value: a }); };
100
- // -------------------------------------------------------------------------------------
101
- // Either
102
- // -------------------------------------------------------------------------------------
103
- /** @internal */
104
- var isLeft = function (ma) { return ma._tag === 'Left'; };
105
- /** @internal */
106
- var left = function (e) { return ({ _tag: 'Left', left: e }); };
107
- /** @internal */
108
- var right = function (a) { return ({ _tag: 'Right', right: a }); };
109
- // -------------------------------------------------------------------------------------
110
- // Record
111
- // -------------------------------------------------------------------------------------
112
- /** @internal */
113
- var has = Object.prototype.hasOwnProperty;
114
-
115
- /**
116
- * If a type `A` can form a `Semigroup` it has an **associative** binary operation.
117
- *
118
- * ```ts
119
- * interface Semigroup<A> {
120
- * readonly concat: (x: A, y: A) => A
121
- * }
122
- * ```
123
- *
124
- * Associativity means the following equality must hold for any choice of `x`, `y`, and `z`.
125
- *
126
- * ```ts
127
- * concat(x, concat(y, z)) = concat(concat(x, y), z)
128
- * ```
129
- *
130
- * A common example of a semigroup is the type `string` with the operation `+`.
131
- *
132
- * ```ts
133
- * import { Semigroup } from 'fp-ts/Semigroup'
134
- *
135
- * const semigroupString: Semigroup<string> = {
136
- * concat: (x, y) => x + y
137
- * }
138
- *
139
- * const x = 'x'
140
- * const y = 'y'
141
- * const z = 'z'
142
- *
143
- * semigroupString.concat(x, y) // 'xy'
144
- *
145
- * semigroupString.concat(x, semigroupString.concat(y, z)) // 'xyz'
146
- *
147
- * semigroupString.concat(semigroupString.concat(x, y), z) // 'xyz'
148
- * ```
149
- *
150
- * *Adapted from https://typelevel.org/cats*
151
- *
152
- * @since 2.0.0
153
- */
154
- /**
155
- * Given a struct of semigroups returns a semigroup for the struct.
156
- *
157
- * @example
158
- * import { struct } from 'fp-ts/Semigroup'
159
- * import * as N from 'fp-ts/number'
160
- *
161
- * interface Point {
162
- * readonly x: number
163
- * readonly y: number
164
- * }
165
- *
166
- * const S = struct<Point>({
167
- * x: N.SemigroupSum,
168
- * y: N.SemigroupSum
169
- * })
170
- *
171
- * assert.deepStrictEqual(S.concat({ x: 1, y: 2 }, { x: 3, y: 4 }), { x: 4, y: 6 })
172
- *
173
- * @category combinators
174
- * @since 2.10.0
175
- */
176
- var struct = function (semigroups) { return ({
177
- concat: function (first, second) {
178
- var r = {};
179
- for (var k in semigroups) {
180
- if (has.call(semigroups, k)) {
181
- r[k] = semigroups[k].concat(first[k], second[k]);
182
- }
183
- }
184
- return r;
185
- }
186
- }); };
187
- // -------------------------------------------------------------------------------------
188
- // instances
189
- // -------------------------------------------------------------------------------------
190
- /**
191
- * Always return the first argument.
192
- *
193
- * @example
194
- * import * as S from 'fp-ts/Semigroup'
195
- *
196
- * assert.deepStrictEqual(S.first<number>().concat(1, 2), 1)
197
- *
198
- * @category instances
199
- * @since 2.10.0
200
- */
201
- var first = function () { return ({ concat: identity }); };
202
- /**
203
- * Always return the last argument.
204
- *
205
- * @example
206
- * import * as S from 'fp-ts/Semigroup'
207
- *
208
- * assert.deepStrictEqual(S.last<number>().concat(1, 2), 2)
209
- *
210
- * @category instances
211
- * @since 2.10.0
212
- */
213
- var last = function () { return ({ concat: function (_, y) { return y; } }); };
214
- /**
215
- * Use [`SemigroupSum`](./number.ts.html#SemigroupSum) instead.
216
- *
217
- * @category instances
218
- * @since 2.0.0
219
- * @deprecated
220
- */
221
- var semigroupSum = {
222
- concat: function (x, y) { return x + y; }
223
- };
224
-
225
- const semigroupDiff = {
226
- concat: (x, y) => x - y,
227
- };
228
-
229
- const fromRectangle$1 = ({ x, y }) => {
230
- return {
231
- x,
232
- y,
233
- };
234
- };
235
- const fromMouseEvent = ({ clientX, clientY }) => {
236
- return {
237
- x: clientX,
238
- y: clientY,
239
- };
240
- };
241
- const pointDiffSemigroup = struct({
242
- x: semigroupDiff,
243
- y: semigroupDiff,
244
- });
245
- const pointSumSemigroup = struct({
246
- x: semigroupSum,
247
- y: semigroupSum,
248
- });
249
-
250
- exports.HandlerDirection = void 0;
251
- (function (HandlerDirection) {
252
- HandlerDirection[HandlerDirection["East"] = 0] = "East";
253
- HandlerDirection[HandlerDirection["North"] = 1] = "North";
254
- HandlerDirection[HandlerDirection["NorthEast"] = 2] = "NorthEast";
255
- HandlerDirection[HandlerDirection["NorthWest"] = 3] = "NorthWest";
256
- HandlerDirection[HandlerDirection["South"] = 4] = "South";
257
- HandlerDirection[HandlerDirection["SouthEast"] = 5] = "SouthEast";
258
- HandlerDirection[HandlerDirection["SouthWest"] = 6] = "SouthWest";
259
- HandlerDirection[HandlerDirection["West"] = 7] = "West";
260
- })(exports.HandlerDirection || (exports.HandlerDirection = {}));
261
- const getCursorValue = (direction) => {
262
- switch (direction) {
263
- case exports.HandlerDirection.East:
264
- return "e-resize";
265
- case exports.HandlerDirection.North:
266
- return "n-resize";
267
- case exports.HandlerDirection.NorthEast:
268
- return "ne-resize";
269
- case exports.HandlerDirection.NorthWest:
270
- return "nw-resize";
271
- case exports.HandlerDirection.South:
272
- return "s-resize";
273
- case exports.HandlerDirection.SouthEast:
274
- return "se-resize";
275
- case exports.HandlerDirection.SouthWest:
276
- return "sw-resize";
277
- case exports.HandlerDirection.West:
278
- return "w-resize";
279
- default:
280
- return "pointer";
281
- }
282
- };
283
- const fromRectangle = (r) => [
284
- {
285
- position: fromRectangle$1(r),
286
- direction: exports.HandlerDirection.NorthWest,
287
- },
288
- {
289
- position: pointSumSemigroup.concat(fromRectangle$1(r), {
290
- x: r.width,
291
- y: 0,
292
- }),
293
- direction: exports.HandlerDirection.NorthEast,
294
- },
295
- {
296
- position: pointSumSemigroup.concat(fromRectangle$1(r), {
297
- x: 0,
298
- y: r.height,
299
- }),
300
- direction: exports.HandlerDirection.SouthWest,
301
- },
302
- {
303
- position: pointSumSemigroup.concat(fromRectangle$1(r), {
304
- x: r.width,
305
- y: r.height,
306
- }),
307
- direction: exports.HandlerDirection.SouthEast,
308
- },
309
- ];
310
-
311
- exports.first = first;
312
- exports.flow = flow;
313
- exports.fromMouseEvent = fromMouseEvent;
314
- exports.fromRectangle = fromRectangle$1;
315
- exports.fromRectangle$1 = fromRectangle;
316
- exports.getCursorValue = getCursorValue;
317
- exports.has = has;
318
- exports.identity = identity;
319
- exports.isLeft = isLeft;
320
- exports.isNone = isNone;
321
- exports.isSome = isSome;
322
- exports.last = last;
323
- exports.left = left;
324
- exports.none = none;
325
- exports.pipe = pipe;
326
- exports.pointDiffSemigroup = pointDiffSemigroup;
327
- exports.pointSumSemigroup = pointSumSemigroup;
328
- exports.right = right;
329
- exports.some = some;
330
- exports.struct = struct;
331
- exports.tuple = tuple;
@@ -1,27 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-0f5516a6.js');
6
- const Handler = require('./Handler-176539c8.js');
7
-
8
- const cropperHandlerCss = ":host{--size:20px;background:transparent;border:4px solid white;box-sizing:content-box;display:block;height:var(--size);touch-action:none;position:absolute;width:var(--size);z-index:4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.disabled){opacity:0.25}:host(.nw-resize){border-bottom:none;border-right:none;top:0;left:0}:host(.ne-resize){border-left:none;border-bottom:none;right:0;top:0}:host(.sw-resize){border-right:none;border-top:none;left:0;bottom:0}:host(.se-resize){border-left:none;border-top:none;bottom:0;right:0}";
9
-
10
- let CropperHandler = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.disabled = false;
14
- }
15
- render() {
16
- return (index.h(index.Host, { part: `handle ${Handler.getCursorValue(this.handler.direction)}`, class: {
17
- disabled: this.disabled,
18
- [Handler.getCursorValue(this.handler.direction)]: true,
19
- }, style: {
20
- "--size": "20px",
21
- cursor: Handler.getCursorValue(this.handler.direction),
22
- }, draggable: false }));
23
- }
24
- };
25
- CropperHandler.style = cropperHandlerCss;
26
-
27
- exports.cropper_handler = CropperHandler;