infinity-forge 0.53.9 → 0.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/sites/context/scripts/component.js +2 -2
  2. package/dist/sites/context/scripts/component.js.map +1 -1
  3. package/dist/ui/components/carousel/index.d.ts +3 -3
  4. package/dist/ui/components/carousel/index.js +4 -4
  5. package/dist/ui/components/carousel/index.js.map +1 -1
  6. package/dist/ui/components/carousel/swiper/modules/effect-fade.js +8 -8
  7. package/dist/ui/components/carousel/swiper/modules/effect-fade.js.map +1 -1
  8. package/dist/ui/components/carousel/swiper/modules/free-mode.js +7 -7
  9. package/dist/ui/components/carousel/swiper/modules/free-mode.js.map +1 -1
  10. package/dist/ui/components/carousel/swiper/modules/navigation.js +12 -12
  11. package/dist/ui/components/carousel/swiper/modules/navigation.js.map +1 -1
  12. package/dist/ui/components/carousel/swiper/modules/pagination.js +22 -22
  13. package/dist/ui/components/carousel/swiper/modules/pagination.js.map +1 -1
  14. package/dist/ui/components/carousel/swiper/modules/virtual.js +5 -5
  15. package/dist/ui/components/carousel/swiper/modules/virtual.js.map +1 -1
  16. package/dist/ui/components/carousel/swiper/react/context.d.ts +5 -0
  17. package/dist/ui/components/carousel/swiper/react/context.js +15 -0
  18. package/dist/ui/components/carousel/swiper/react/context.js.map +1 -0
  19. package/dist/ui/components/carousel/swiper/react/get-children.d.ts +10 -0
  20. package/dist/ui/components/carousel/swiper/react/get-children.js +54 -0
  21. package/dist/ui/components/carousel/swiper/react/get-children.js.map +1 -0
  22. package/dist/ui/components/carousel/swiper/react/swiper-slide.d.ts +3 -0
  23. package/dist/ui/components/carousel/swiper/react/swiper-slide.js +88 -0
  24. package/dist/ui/components/carousel/swiper/react/swiper-slide.js.map +1 -0
  25. package/dist/ui/components/carousel/swiper/react/swiper.d.ts +3 -0
  26. package/dist/ui/components/carousel/swiper/react/swiper.js +210 -0
  27. package/dist/ui/components/carousel/swiper/react/swiper.js.map +1 -0
  28. package/dist/ui/components/carousel/swiper/react/use-isomorphic-layout-effect.d.ts +2 -0
  29. package/dist/ui/components/carousel/swiper/react/use-isomorphic-layout-effect.js +12 -0
  30. package/dist/ui/components/carousel/swiper/react/use-isomorphic-layout-effect.js.map +1 -0
  31. package/dist/ui/components/carousel/swiper/react/virtual.d.ts +12 -0
  32. package/dist/ui/components/carousel/swiper/react/virtual.js +48 -0
  33. package/dist/ui/components/carousel/swiper/react/virtual.js.map +1 -0
  34. package/package.json +3 -3
@@ -0,0 +1,2 @@
1
+ declare function useIsomorphicLayoutEffect(callback: any, deps: any): void;
2
+ export { useIsomorphicLayoutEffect };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useIsomorphicLayoutEffect = void 0;
4
+ var react_1 = require("react");
5
+ function useIsomorphicLayoutEffect(callback, deps) {
6
+ // eslint-disable-next-line
7
+ if (typeof window === 'undefined')
8
+ return (0, react_1.useEffect)(callback, deps);
9
+ return (0, react_1.useLayoutEffect)(callback, deps);
10
+ }
11
+ exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
12
+ //# sourceMappingURL=use-isomorphic-layout-effect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-isomorphic-layout-effect.js","sourceRoot":"","sources":["../../../../../../src/ui/components/carousel/swiper/react/use-isomorphic-layout-effect.tsx"],"names":[],"mappings":";;;AAAA,+BAAmD;AAEnD,SAAS,yBAAyB,CAAC,QAAQ,EAAE,IAAI;IAC/C,2BAA2B;IAC3B,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,IAAA,iBAAS,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACpE,OAAO,IAAA,uBAAe,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC;AAEQ,8DAAyB"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ declare function renderVirtual(swiper: any, slides: any, virtualData: any): React.DetailedReactHTMLElement<{
3
+ swiper: any;
4
+ style: {
5
+ [x: string]: string;
6
+ top?: undefined;
7
+ } | {
8
+ top: string;
9
+ };
10
+ key: any;
11
+ }, HTMLElement>[];
12
+ export { renderVirtual };
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.renderVirtual = void 0;
7
+ // @ts-nocheck
8
+ var react_1 = __importDefault(require("react"));
9
+ function renderVirtual(swiper, slides, virtualData) {
10
+ var _a;
11
+ if (!virtualData)
12
+ return null;
13
+ var getSlideIndex = function (index) {
14
+ var slideIndex = index;
15
+ if (index < 0) {
16
+ slideIndex = slides.length + index;
17
+ }
18
+ else if (slideIndex >= slides.length) {
19
+ // eslint-disable-next-line
20
+ slideIndex = slideIndex - slides.length;
21
+ }
22
+ return slideIndex;
23
+ };
24
+ var style = swiper.isHorizontal()
25
+ ? (_a = {},
26
+ _a[swiper.rtlTranslate ? 'right' : 'left'] = "".concat(virtualData.offset, "px"),
27
+ _a) : {
28
+ top: "".concat(virtualData.offset, "px"),
29
+ };
30
+ var from = virtualData.from, to = virtualData.to;
31
+ var loopFrom = swiper.params.loop ? -slides.length : 0;
32
+ var loopTo = swiper.params.loop ? slides.length * 2 : slides.length;
33
+ var slidesToRender = [];
34
+ for (var i = loopFrom; i < loopTo; i += 1) {
35
+ if (i >= from && i <= to) {
36
+ slidesToRender.push(slides[getSlideIndex(i)]);
37
+ }
38
+ }
39
+ return slidesToRender.map(function (child, index) {
40
+ return react_1.default.cloneElement(child, {
41
+ swiper: swiper,
42
+ style: style,
43
+ key: child.props.virtualIndex || child.key || "slide-".concat(index),
44
+ });
45
+ });
46
+ }
47
+ exports.renderVirtual = renderVirtual;
48
+ //# sourceMappingURL=virtual.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtual.js","sourceRoot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AE,CAAC,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;YACzB,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IACD,OAAO,cAAc,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,KAAK;QACrC,OAAO,eAAK,CAAC,YAAY,CAAC,KAAK,EAAE;YAC/B,MAAM,QAAA;YACN,KAAK,OAAA;YACL,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,GAAG,IAAI,gBAAS,KAAK,CAAE;SAC/D,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAEQ,sCAAa"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "infinity-forge",
3
- "version": "0.53.9",
3
+ "version": "0.54.1",
4
4
  "description": "codie Library",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.js",
5
+ "main": "./dist/index",
6
+ "module": "./dist/index",
7
7
  "types": "./dist/index.d.ts",
8
8
  "repository": {
9
9
  "type": "git",