vviinn-widgets 0.6.6 → 0.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 (83) hide show
  1. package/dist/cjs/{Semigroup-748445c3.js → Rectangle-3098312c.js} +250 -2
  2. package/dist/cjs/cropper-handler_24.cjs.entry.js +366 -4710
  3. package/dist/cjs/image-view.cjs.entry.js +1 -2
  4. package/dist/cjs/{request-872bf8c7.js → imageSearch.store-ef352f42.js} +238 -49
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/{products.worker-54203f98.js → products.worker-90bc4c31.js} +1 -1
  7. package/dist/cjs/{vpr-slider-04b4d931.js → vpr-slider-106e880d.js} +2 -2
  8. package/dist/cjs/vpr-slider.cjs.entry.js +1 -1
  9. package/dist/cjs/vviinn-vpr-widget.cjs.entry.js +17 -16
  10. package/dist/cjs/vviinn-widgets.cjs.js +1 -1
  11. package/dist/collection/analytics/GeneralAnalytics.js +7 -6
  12. package/dist/collection/components/image-search/search-filters/search-filters.js +1 -1
  13. package/dist/collection/components/vpr-slider/vpr-slider.js +1 -1
  14. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.css +5 -1
  15. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +3 -0
  16. package/dist/collection/components/vviinn-error/vviinn-error.css +5 -0
  17. package/dist/collection/components/vviinn-error/vviinn-error.js +1 -0
  18. package/dist/collection/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.js +17 -0
  19. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +24 -0
  20. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +1 -0
  21. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +99 -1
  22. package/dist/collection/components/vviinn-slider/vviinn-slider.js +17 -2
  23. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +2 -0
  24. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +23 -3
  25. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +15 -5
  26. package/dist/esm/Rectangle-d1903b92.js +490 -0
  27. package/dist/esm/cropper-handler_24.entry.js +227 -4571
  28. package/dist/esm/image-view.entry.js +1 -2
  29. package/dist/esm/{request-f98d709b.js → imageSearch.store-2a574c1e.js} +204 -4
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/esm/{products.worker-50d048dc.js → products.worker-907f7cec.js} +1 -1
  32. package/dist/esm/{vpr-slider-5b58499d.js → vpr-slider-acd997b5.js} +2 -2
  33. package/dist/esm/vpr-slider.entry.js +1 -1
  34. package/dist/esm/vviinn-vpr-widget.entry.js +3 -2
  35. package/dist/esm/vviinn-widgets.js +1 -1
  36. package/dist/types/analytics/GeneralAnalytics.d.ts +1 -1
  37. package/dist/types/analytics/ProductAnalytics.d.ts +3 -3
  38. package/dist/types/components/vviinn-example-images/vviinn-example-image/vviinn-example-image.d.ts +1 -0
  39. package/dist/types/components/vviinn-example-images/vviinn-example-images.d.ts +2 -0
  40. package/dist/types/components/vviinn-product-card/vviinn-product-card.d.ts +13 -0
  41. package/dist/types/components/vviinn-slider/vviinn-slider.d.ts +3 -1
  42. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +2 -0
  43. package/dist/types/components.d.ts +16 -0
  44. package/dist/vviinn-widgets/{p-8d6143ef.js → p-2987891f.js} +1 -1
  45. package/dist/vviinn-widgets/{p-11dd224a.js → p-37fe0fb6.js} +1 -1
  46. package/dist/vviinn-widgets/p-49c06bf3.js +1 -0
  47. package/dist/vviinn-widgets/p-552782fa.entry.js +1 -0
  48. package/dist/vviinn-widgets/p-7774e8c6.entry.js +1 -0
  49. package/dist/vviinn-widgets/p-997f6e67.js +1 -0
  50. package/dist/vviinn-widgets/p-ca5385a1.entry.js +1 -0
  51. package/dist/vviinn-widgets/p-e65cbbaa.entry.js +1 -0
  52. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  53. package/package.json +1 -1
  54. package/www/build/{p-8d6143ef.js → p-2987891f.js} +1 -1
  55. package/www/build/{p-11dd224a.js → p-37fe0fb6.js} +1 -1
  56. package/www/build/p-3bf0bb23.css +5 -0
  57. package/www/build/p-49c06bf3.js +1 -0
  58. package/www/build/p-552782fa.entry.js +1 -0
  59. package/www/build/p-7774e8c6.entry.js +1 -0
  60. package/www/build/p-950f2e3d.js +125 -0
  61. package/www/build/p-997f6e67.js +1 -0
  62. package/www/build/p-ca5385a1.entry.js +1 -0
  63. package/www/build/p-e65cbbaa.entry.js +1 -0
  64. package/www/build/vviinn-widgets.esm.js +1 -1
  65. package/www/index.html +2 -6
  66. package/dist/cjs/Rectangle-59de550c.js +0 -254
  67. package/dist/esm/Rectangle-8d040942.js +0 -241
  68. package/dist/esm/Semigroup-c4d9fc8c.js +0 -252
  69. package/dist/vviinn-widgets/p-126e8e0b.entry.js +0 -1
  70. package/dist/vviinn-widgets/p-1b7c8fed.js +0 -1
  71. package/dist/vviinn-widgets/p-56678fbb.entry.js +0 -1
  72. package/dist/vviinn-widgets/p-6783d30d.entry.js +0 -1
  73. package/dist/vviinn-widgets/p-9763a28f.js +0 -1
  74. package/dist/vviinn-widgets/p-ad8161f7.entry.js +0 -1
  75. package/dist/vviinn-widgets/p-ce380673.js +0 -1
  76. package/www/build/p-126e8e0b.entry.js +0 -1
  77. package/www/build/p-1b7c8fed.js +0 -1
  78. package/www/build/p-56678fbb.entry.js +0 -1
  79. package/www/build/p-6783d30d.entry.js +0 -1
  80. package/www/build/p-9763a28f.js +0 -1
  81. package/www/build/p-a20061f2.css +0 -1
  82. package/www/build/p-ad8161f7.entry.js +0 -1
  83. package/www/build/p-ce380673.js +0 -1
@@ -251,20 +251,268 @@ var semigroupSum = {
251
251
  concat: function (x, y) { return x + y; }
252
252
  };
253
253
 
254
+ const semigroupDiff = {
255
+ concat: (x, y) => x - y,
256
+ };
257
+
258
+ const fromRectangle$1 = ({ x, y }) => {
259
+ return {
260
+ x,
261
+ y,
262
+ };
263
+ };
264
+ const fromMouseEvent = ({ clientX, clientY }) => {
265
+ return {
266
+ x: clientX,
267
+ y: clientY,
268
+ };
269
+ };
270
+ const pointDiffSemigroup = getStructSemigroup({
271
+ x: semigroupDiff,
272
+ y: semigroupDiff,
273
+ });
274
+ const pointSumSemigroup = getStructSemigroup({
275
+ x: semigroupSum,
276
+ y: semigroupSum,
277
+ });
278
+
279
+ var HandlerDirection;
280
+ (function (HandlerDirection) {
281
+ HandlerDirection[HandlerDirection["East"] = 0] = "East";
282
+ HandlerDirection[HandlerDirection["North"] = 1] = "North";
283
+ HandlerDirection[HandlerDirection["NorthEast"] = 2] = "NorthEast";
284
+ HandlerDirection[HandlerDirection["NorthWest"] = 3] = "NorthWest";
285
+ HandlerDirection[HandlerDirection["South"] = 4] = "South";
286
+ HandlerDirection[HandlerDirection["SouthEast"] = 5] = "SouthEast";
287
+ HandlerDirection[HandlerDirection["SouthWest"] = 6] = "SouthWest";
288
+ HandlerDirection[HandlerDirection["West"] = 7] = "West";
289
+ })(HandlerDirection || (HandlerDirection = {}));
290
+ const getCursorValue = (direction) => {
291
+ switch (direction) {
292
+ case HandlerDirection.East:
293
+ return "e-resize";
294
+ case HandlerDirection.North:
295
+ return "n-resize";
296
+ case HandlerDirection.NorthEast:
297
+ return "ne-resize";
298
+ case HandlerDirection.NorthWest:
299
+ return "nw-resize";
300
+ case HandlerDirection.South:
301
+ return "s-resize";
302
+ case HandlerDirection.SouthEast:
303
+ return "se-resize";
304
+ case HandlerDirection.SouthWest:
305
+ return "sw-resize";
306
+ case HandlerDirection.West:
307
+ return "w-resize";
308
+ default:
309
+ return "pointer";
310
+ }
311
+ };
312
+ const fromRectangle = (r) => [
313
+ {
314
+ position: fromRectangle$1(r),
315
+ direction: HandlerDirection.NorthWest,
316
+ },
317
+ {
318
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
319
+ x: r.width * 0.5,
320
+ y: 0,
321
+ }),
322
+ direction: HandlerDirection.North,
323
+ },
324
+ {
325
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
326
+ x: r.width,
327
+ y: 0,
328
+ }),
329
+ direction: HandlerDirection.NorthEast,
330
+ },
331
+ {
332
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
333
+ x: 0,
334
+ y: r.height * 0.5,
335
+ }),
336
+ direction: HandlerDirection.West,
337
+ },
338
+ {
339
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
340
+ x: r.width,
341
+ y: r.height * 0.5,
342
+ }),
343
+ direction: HandlerDirection.East,
344
+ },
345
+ {
346
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
347
+ x: 0,
348
+ y: r.height,
349
+ }),
350
+ direction: HandlerDirection.SouthWest,
351
+ },
352
+ {
353
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
354
+ x: r.width * 0.5,
355
+ y: r.height,
356
+ }),
357
+ direction: HandlerDirection.South,
358
+ },
359
+ {
360
+ position: pointSumSemigroup.concat(fromRectangle$1(r), {
361
+ x: r.width,
362
+ y: r.height,
363
+ }),
364
+ direction: HandlerDirection.SouthEast,
365
+ },
366
+ ];
367
+
368
+ var ObjectMemberName;
369
+ (function (ObjectMemberName) {
370
+ ObjectMemberName["eform"] = "eform";
371
+ ObjectMemberName["etype"] = "etype";
372
+ ObjectMemberName["form"] = "form";
373
+ ObjectMemberName["href"] = "href";
374
+ ObjectMemberName["method"] = "method";
375
+ ObjectMemberName["accepts"] = "accepts";
376
+ ObjectMemberName["produces"] = "produces";
377
+ ObjectMemberName["rel"] = "rel";
378
+ ObjectMemberName["type"] = "type";
379
+ ObjectMemberName["value"] = "value";
380
+ })(ObjectMemberName || (ObjectMemberName = {}));
381
+ const foldValueObject = (i) => {
382
+ switch (i.type) {
383
+ case "array": {
384
+ return i.value.map(foldValueObject);
385
+ }
386
+ default: {
387
+ return i.value;
388
+ }
389
+ }
390
+ };
391
+
392
+ const move = (origin, position) => {
393
+ const originPosition = fromRectangle$1(origin);
394
+ const newPosition = pointSumSemigroup.concat(originPosition, position);
395
+ return Object.assign(Object.assign({}, newPosition), { width: origin.width, height: origin.height });
396
+ };
397
+ const transformNorthEast = (origin, handler) => {
398
+ const newPosition = pointSumSemigroup.concat(fromRectangle$1(origin), {
399
+ x: 0,
400
+ y: handler.position.y,
401
+ });
402
+ return Object.assign(Object.assign({}, newPosition), { width: origin.width + handler.position.x, height: origin.height - handler.position.y });
403
+ };
404
+ const transformNorthWest = (origin, handler) => {
405
+ const newPosition = pointSumSemigroup.concat(fromRectangle$1(origin), handler.position);
406
+ return Object.assign(Object.assign({}, newPosition), { width: origin.width - handler.position.x, height: origin.height - handler.position.y });
407
+ };
408
+ const transformNorth = (origin, handler) => {
409
+ const newPosition = pointSumSemigroup.concat(fromRectangle$1(origin), {
410
+ x: 0,
411
+ y: handler.position.y,
412
+ });
413
+ return Object.assign(Object.assign({}, newPosition), { width: origin.width, height: origin.height - handler.position.y });
414
+ };
415
+ const transformEast = (origin, handler) => {
416
+ return Object.assign(Object.assign({}, origin), { width: origin.width + handler.position.x, height: origin.height });
417
+ };
418
+ const transformWest = (origin, handler) => {
419
+ const newPosition = pointSumSemigroup.concat(fromRectangle$1(origin), {
420
+ x: handler.position.x,
421
+ y: 0,
422
+ });
423
+ return Object.assign(Object.assign({}, newPosition), { width: origin.width - handler.position.x, height: origin.height });
424
+ };
425
+ const transformSouth = (origin, handler) => {
426
+ return Object.assign(Object.assign({}, origin), { width: origin.width, height: origin.height + handler.position.y });
427
+ };
428
+ const transformSouthEast = (origin, handler) => {
429
+ return Object.assign(Object.assign({}, origin), { width: origin.width + handler.position.x, height: origin.height + handler.position.y });
430
+ };
431
+ const transformSouthWest = (origin, handler) => {
432
+ const newPosition = pointSumSemigroup.concat(fromRectangle$1(origin), {
433
+ x: handler.position.x,
434
+ y: 0,
435
+ });
436
+ return Object.assign(Object.assign({}, newPosition), { width: origin.width - handler.position.x, height: origin.height + handler.position.y });
437
+ };
438
+ const transform = (origin, handler) => {
439
+ switch (handler.direction) {
440
+ case HandlerDirection.North:
441
+ return transformNorth(origin, handler);
442
+ case HandlerDirection.NorthEast:
443
+ return transformNorthEast(origin, handler);
444
+ case HandlerDirection.NorthWest:
445
+ return transformNorthWest(origin, handler);
446
+ case HandlerDirection.East:
447
+ return transformEast(origin, handler);
448
+ case HandlerDirection.West:
449
+ return transformWest(origin, handler);
450
+ case HandlerDirection.South:
451
+ return transformSouth(origin, handler);
452
+ case HandlerDirection.SouthEast:
453
+ return transformSouthEast(origin, handler);
454
+ case HandlerDirection.SouthWest:
455
+ return transformSouthWest(origin, handler);
456
+ }
457
+ };
458
+ const fromImage = (image) => {
459
+ return {
460
+ x: 0,
461
+ y: 0,
462
+ width: image.width,
463
+ height: image.height,
464
+ };
465
+ };
466
+ const fromAlt = (r) => {
467
+ return Object.assign({ x: r.left, y: r.top }, r);
468
+ };
469
+ const scaleWithSized = (s) => (r) => {
470
+ return {
471
+ x: r.x * s.width,
472
+ y: r.y * s.height,
473
+ width: r.width * s.width,
474
+ height: r.height * s.height,
475
+ };
476
+ };
477
+ const divideOnSized = (s) => (r) => {
478
+ return {
479
+ x: r.x / s.width,
480
+ y: r.y / s.height,
481
+ width: r.width / s.width,
482
+ height: r.height / s.height,
483
+ };
484
+ };
485
+ const center = (r) => {
486
+ return {
487
+ x: r.x + r.width * 0.5,
488
+ y: r.y + r.height * 0.5,
489
+ };
490
+ };
491
+
492
+ exports.center = center;
493
+ exports.divideOnSized = divideOnSized;
254
494
  exports.emptyReadonlyArray = emptyReadonlyArray;
255
495
  exports.first = first;
256
496
  exports.flow = flow;
257
- exports.getStructSemigroup = getStructSemigroup;
497
+ exports.foldValueObject = foldValueObject;
498
+ exports.fromAlt = fromAlt;
499
+ exports.fromImage = fromImage;
500
+ exports.fromMouseEvent = fromMouseEvent;
501
+ exports.fromRectangle = fromRectangle;
502
+ exports.getCursorValue = getCursorValue;
258
503
  exports.identity = identity;
259
504
  exports.isLeft = isLeft;
260
505
  exports.isNone = isNone;
261
506
  exports.isSome = isSome;
262
507
  exports.last = last;
263
508
  exports.left = left;
509
+ exports.move = move;
264
510
  exports.none = none;
265
511
  exports.pipe = pipe;
512
+ exports.pointDiffSemigroup = pointDiffSemigroup;
266
513
  exports.right = right;
267
- exports.semigroupSum = semigroupSum;
514
+ exports.scaleWithSized = scaleWithSized;
268
515
  exports.some = some;
269
516
  exports.struct = struct;
517
+ exports.transform = transform;
270
518
  exports.tuple = tuple;