@ubnt/store.core 9.37.0-beta.4 → 9.37.0-beta.5
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.
- package/CHANGELOG.md +4 -0
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
- package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.js +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
- package/lib/utils/nextjs/ssr/transform-css-module.d.ts +4 -2
- package/lib/utils/nextjs/ssr/transform-css-module.js +37 -8
- package/lib/utils/nextjs/ssr/transform-css-module.js.map +1 -1
- package/lib/utils/nextjs/ssr/transform-css-module.mjs +36 -7
- package/lib/utils/nextjs/ssr/transform-css-module.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/assets/close2.svg
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.2175 18.6475C4.9275 18.9375 4.9275 19.4175 5.2175 19.7075C5.5075 19.9975 5.9875 19.9975 6.2775 19.7075L12.4675 13.5175L18.6575 19.7075C18.9475 19.9975 19.4275 19.9975 19.7175 19.7075C20.0075 19.4175 20.0075 18.9375 19.7175 18.6475L13.5275 12.4675L19.7175 6.2775C20.0075 5.9875 20.0075 5.5075 19.7175 5.2175C19.4275 4.9275 18.9475 4.9275 18.6575 5.2175L12.4675 11.4075L6.2775 5.2175C5.9875 4.9275 5.5075 4.9275 5.2175 5.2175C4.9275 5.5075 4.9275 5.9875 5.2175 6.2775L11.4075 12.4675L5.2175 18.6475Z" fill="currentColor"/>
|
|
1
|
+
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.7175 18.6475C5.4275 18.9375 5.4275 19.4175 5.7175 19.7075C6.0075 19.9975 6.4875 19.9975 6.7775 19.7075L12.9675 13.5175L19.1575 19.7075C19.4475 19.9975 19.9275 19.9975 20.2175 19.7075C20.5075 19.4175 20.5075 18.9375 20.2175 18.6475L14.0275 12.4675L20.2175 6.2775C20.5075 5.9875 20.5075 5.5075 20.2175 5.2175C19.9275 4.9275 19.4475 4.9275 19.1575 5.2175L12.9675 11.4075L6.7775 5.2175C6.4875 4.9275 6.0075 4.9275 5.7175 5.2175C5.4275 5.5075 5.4275 5.9875 5.7175 6.2775L11.9075 12.4675L5.7175 18.6475Z" fill="#36373C"/>
|
|
4
3
|
</svg>
|
package/lib/assets/close3.svg
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.2175 18.6475C4.9275 18.9375 4.9275 19.4175 5.2175 19.7075C5.5075 19.9975 5.9875 19.9975 6.2775 19.7075L12.4675 13.5175L18.6575 19.7075C18.9475 19.9975 19.4275 19.9975 19.7175 19.7075C20.0075 19.4175 20.0075 18.9375 19.7175 18.6475L13.5275 12.4675L19.7175 6.2775C20.0075 5.9875 20.0075 5.5075 19.7175 5.2175C19.4275 4.9275 18.9475 4.9275 18.6575 5.2175L12.4675 11.4075L6.2775 5.2175C5.9875 4.9275 5.5075 4.9275 5.2175 5.2175C4.9275 5.5075 4.9275 5.9875 5.2175 6.2775L11.4075 12.4675L5.2175 18.6475Z" fill="currentColor"/>
|
|
3
4
|
</svg>
|
package/lib/assets/pause.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<rect x="
|
|
3
|
-
<rect x="
|
|
1
|
+
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="6" y="3" width="3" height="16" rx="1.5" fill="#393A3F"/>
|
|
3
|
+
<rect x="12" y="3" width="3" height="16" rx="1.5" fill="#393A3F"/>
|
|
4
4
|
</svg>
|
package/lib/assets/pause2.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<rect x="
|
|
3
|
-
<rect x="
|
|
1
|
+
<svg width="13" height="17" viewBox="0 0 13 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="0.232422" width="4" height="17" rx="2" fill="#393A3F"/>
|
|
3
|
+
<rect x="8.23242" width="4" height="17" rx="2" fill="#393A3F"/>
|
|
4
4
|
</svg>
|
package/lib/assets/udmPro.jpg
CHANGED
|
Binary file
|
package/lib/assets/udmPro2.jpg
CHANGED
|
Binary file
|
package/lib/assets/udmProMax.jpg
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -14,7 +14,7 @@ var FeaturesSection_styles = require('./FeaturesSection.styles.js');
|
|
|
14
14
|
var useLockBodyScrollCustom = require('../../hooks/useLockBodyScrollCustom.js');
|
|
15
15
|
var Container = require('../Container/Container.js');
|
|
16
16
|
var StyleableSvgImage = require('../StyleableSvgImage/StyleableSvgImage.js');
|
|
17
|
-
var CloseSvg = require("../../assets/
|
|
17
|
+
var CloseSvg = require("../../assets/close3.svg");
|
|
18
18
|
function _interopDefault(e) {
|
|
19
19
|
return e && e.__esModule ? e : {
|
|
20
20
|
default: e
|
|
@@ -12,7 +12,7 @@ import { WrapOuter, OverlayWrap, OverlayClose, Wrap, MetaWrap, SubHeading, Headi
|
|
|
12
12
|
import { useLockBodyScrollCustom } from '../../hooks/useLockBodyScrollCustom.mjs';
|
|
13
13
|
import { Container } from '../Container/Container.mjs';
|
|
14
14
|
import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
15
|
-
import CloseSvg__default from "../../assets/
|
|
15
|
+
import CloseSvg__default from "../../assets/close3.svg";
|
|
16
16
|
"use strict";
|
|
17
17
|
const FEATURES_DEFAULT_PLAYBACK = 500;
|
|
18
18
|
const parseTime = time => parseFloat(time.toFixed(3));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../assets/
|
|
2
|
-
export { default } from "../../../assets/
|
|
1
|
+
export * from "../../../assets/close3.svg";
|
|
2
|
+
export { default } from "../../../assets/close3.svg";
|
|
3
3
|
//# sourceMappingURL=close.svg.mjs.map
|
|
@@ -11,7 +11,7 @@ require('./assets/play.svg.js');
|
|
|
11
11
|
var MicrositeVideoSlideshow_styles = require('./MicrositeVideoSlideshow.styles.js');
|
|
12
12
|
var MicrositeSectionWrap = require('../MicrositeSectionWrap/MicrositeSectionWrap.js');
|
|
13
13
|
var PlayIcon = require("../../assets/play.svg");
|
|
14
|
-
var PauseIcon = require("../../assets/
|
|
14
|
+
var PauseIcon = require("../../assets/pause2.svg");
|
|
15
15
|
var ActiveIconBox = require("../../assets/active-icon-box.svg");
|
|
16
16
|
function _interopDefault(e) {
|
|
17
17
|
return e && e.__esModule ? e : {
|
|
@@ -9,7 +9,7 @@ import './assets/play.svg.mjs';
|
|
|
9
9
|
import { VideoBlock, Video, VideoControls, VideoInnerWrap, ProgressCircle, PlayIcon, PauseIcon, SlideRow, Slide, FeatureIconWrap, FeatureIconActiveBackground, FeatureIcon, FeatureTitle, MicrositeBuyButton } from './MicrositeVideoSlideshow.styles.mjs';
|
|
10
10
|
import { MicrositeSectionWrap } from '../MicrositeSectionWrap/MicrositeSectionWrap.mjs';
|
|
11
11
|
import PlayIcon__default from "../../assets/play.svg";
|
|
12
|
-
import PauseIcon__default from "../../assets/
|
|
12
|
+
import PauseIcon__default from "../../assets/pause2.svg";
|
|
13
13
|
import ActiveIconBox__default from "../../assets/active-icon-box.svg";
|
|
14
14
|
"use strict";
|
|
15
15
|
const MicrositeVideoSlideshow = ({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../assets/
|
|
2
|
-
export { default } from "../../../assets/
|
|
1
|
+
export * from "../../../assets/pause2.svg";
|
|
2
|
+
export { default } from "../../../assets/pause2.svg";
|
|
3
3
|
//# sourceMappingURL=pause.svg.mjs.map
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
6
|
+
var _externalAssets_pESvYnSE = require("../../../../../assets/udmPro.jpg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var _externalAssets_pESvYnSE__default = /*#__PURE__*/_interopDefault(_externalAssets_pESvYnSE);
|
|
13
13
|
Object.defineProperty(exports, "default", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function () {
|
|
16
|
-
return
|
|
16
|
+
return _externalAssets_pESvYnSE__default["default"];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
Object.keys(
|
|
19
|
+
Object.keys(_externalAssets_pESvYnSE).forEach(function (k) {
|
|
20
20
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function () {
|
|
23
|
-
return
|
|
23
|
+
return _externalAssets_pESvYnSE[k];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../assets/
|
|
1
|
+
export * from "../../../../../assets/udmPro.jpg";
|
|
2
|
+
export { default } from "../../../../../assets/udmPro.jpg";
|
|
3
3
|
//# sourceMappingURL=udmPro.jpg.mjs.map
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
6
|
+
var _externalAssets_CmLfPohF = require("../../../../../assets/udmProMax.jpg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var _externalAssets_CmLfPohF__default = /*#__PURE__*/_interopDefault(_externalAssets_CmLfPohF);
|
|
13
13
|
Object.defineProperty(exports, "default", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function () {
|
|
16
|
-
return
|
|
16
|
+
return _externalAssets_CmLfPohF__default["default"];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
Object.keys(
|
|
19
|
+
Object.keys(_externalAssets_CmLfPohF).forEach(function (k) {
|
|
20
20
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function () {
|
|
23
|
-
return
|
|
23
|
+
return _externalAssets_CmLfPohF[k];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../assets/
|
|
1
|
+
export * from "../../../../../assets/udmProMax.jpg";
|
|
2
|
+
export { default } from "../../../../../assets/udmProMax.jpg";
|
|
3
3
|
//# sourceMappingURL=udmProMax.jpg.mjs.map
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
6
|
+
var _externalAssets_BUotdZNw = require("../../../../../assets/udmProSpecial.jpg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var _externalAssets_BUotdZNw__default = /*#__PURE__*/_interopDefault(_externalAssets_BUotdZNw);
|
|
13
13
|
Object.defineProperty(exports, "default", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function () {
|
|
16
|
-
return
|
|
16
|
+
return _externalAssets_BUotdZNw__default["default"];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
Object.keys(
|
|
19
|
+
Object.keys(_externalAssets_BUotdZNw).forEach(function (k) {
|
|
20
20
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function () {
|
|
23
|
-
return
|
|
23
|
+
return _externalAssets_BUotdZNw[k];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../assets/
|
|
1
|
+
export * from "../../../../../assets/udmProSpecial.jpg";
|
|
2
|
+
export { default } from "../../../../../assets/udmProSpecial.jpg";
|
|
3
3
|
//# sourceMappingURL=udmProSpecial.jpg.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/
|
|
2
|
-
export { default } from "../../../../assets/
|
|
1
|
+
export * from "../../../../assets/udmPro2.jpg";
|
|
2
|
+
export { default } from "../../../../assets/udmPro2.jpg";
|
|
3
3
|
//# sourceMappingURL=udmPro.jpg.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/
|
|
2
|
-
export { default } from "../../../../assets/
|
|
1
|
+
export * from "../../../../assets/udmProMax2.jpg";
|
|
2
|
+
export { default } from "../../../../assets/udmProMax2.jpg";
|
|
3
3
|
//# sourceMappingURL=udmProMax.jpg.mjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var image = require("../../../../assets/
|
|
6
|
+
var image = require("../../../../assets/udmProSpecial2.jpg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../assets/
|
|
2
|
-
export { default } from "../../../../assets/
|
|
1
|
+
export * from "../../../../assets/udmProSpecial2.jpg";
|
|
2
|
+
export { default } from "../../../../assets/udmProSpecial2.jpg";
|
|
3
3
|
//# sourceMappingURL=udmProSpecial.jpg.mjs.map
|
|
@@ -22,9 +22,9 @@ var throughput = require('./properties/throughput.js');
|
|
|
22
22
|
var unifiAppSuite = require('./properties/unifiAppSuite.js');
|
|
23
23
|
var unifiDevices = require('./properties/unifiDevices.js');
|
|
24
24
|
var wanPorts = require('./properties/wanPorts.js');
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
25
|
+
var _externalAssets_CmLfPohF = require("../../../assets/udmProMax.jpg");
|
|
26
|
+
var _externalAssets_pESvYnSE = require("../../../assets/udmPro.jpg");
|
|
27
|
+
var _externalAssets_BUotdZNw = require("../../../assets/udmProSpecial.jpg");
|
|
28
28
|
var image = require("../../../assets/udw2.jpg");
|
|
29
29
|
var _externalAssets_ReJhRoVe = require("../../../assets/ucgMax2.jpg");
|
|
30
30
|
var _externalAssets_sWF40Ihh = require("../../../assets/ucgUltra2.jpg");
|
|
@@ -36,9 +36,9 @@ function _interopDefault(e) {
|
|
|
36
36
|
default: e
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
39
|
+
var _externalAssets_CmLfPohF__default = /*#__PURE__*/_interopDefault(_externalAssets_CmLfPohF);
|
|
40
|
+
var _externalAssets_pESvYnSE__default = /*#__PURE__*/_interopDefault(_externalAssets_pESvYnSE);
|
|
41
|
+
var _externalAssets_BUotdZNw__default = /*#__PURE__*/_interopDefault(_externalAssets_BUotdZNw);
|
|
42
42
|
var image__default = /*#__PURE__*/_interopDefault(image);
|
|
43
43
|
var _externalAssets_ReJhRoVe__default = /*#__PURE__*/_interopDefault(_externalAssets_ReJhRoVe);
|
|
44
44
|
var _externalAssets_sWF40Ihh__default = /*#__PURE__*/_interopDefault(_externalAssets_sWF40Ihh);
|
|
@@ -56,18 +56,18 @@ const efg = {
|
|
|
56
56
|
const udmProMax = {
|
|
57
57
|
...udmProMax$1.udmProMax,
|
|
58
58
|
description: "udmProMax.customDescription",
|
|
59
|
-
image: getImage(
|
|
59
|
+
image: getImage(_externalAssets_CmLfPohF__default["default"])
|
|
60
60
|
};
|
|
61
61
|
const udmPro = {
|
|
62
62
|
...udmPro$1.udmPro,
|
|
63
63
|
description: "udmPro.customDescription",
|
|
64
|
-
image: getImage(
|
|
64
|
+
image: getImage(_externalAssets_pESvYnSE__default["default"])
|
|
65
65
|
};
|
|
66
66
|
const udmProSpecial = {
|
|
67
67
|
...udmProSpecial$1.udmProSpecial,
|
|
68
68
|
title: "udmProSpecial.customTitle",
|
|
69
69
|
description: "udmProSpecial.customDescription",
|
|
70
|
-
image: getImage(
|
|
70
|
+
image: getImage(_externalAssets_BUotdZNw__default["default"])
|
|
71
71
|
};
|
|
72
72
|
const udw = {
|
|
73
73
|
...udw$1.udw,
|
|
@@ -20,9 +20,9 @@ import { throughput } from './properties/throughput.mjs';
|
|
|
20
20
|
import { unifiAppSuite } from './properties/unifiAppSuite.mjs';
|
|
21
21
|
import { unifiDevices } from './properties/unifiDevices.mjs';
|
|
22
22
|
import { wanPorts } from './properties/wanPorts.mjs';
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
23
|
+
import _externalAssets_CmLfPohF__default from "../../../assets/udmProMax.jpg";
|
|
24
|
+
import _externalAssets_pESvYnSE__default from "../../../assets/udmPro.jpg";
|
|
25
|
+
import _externalAssets_BUotdZNw__default from "../../../assets/udmProSpecial.jpg";
|
|
26
26
|
import image__default from "../../../assets/udw2.jpg";
|
|
27
27
|
import _externalAssets_ReJhRoVe__default from "../../../assets/ucgMax2.jpg";
|
|
28
28
|
import _externalAssets_sWF40Ihh__default from "../../../assets/ucgUltra2.jpg";
|
|
@@ -41,18 +41,18 @@ const efg = {
|
|
|
41
41
|
const udmProMax = {
|
|
42
42
|
...udmProMax$1,
|
|
43
43
|
description: "udmProMax.customDescription",
|
|
44
|
-
image: getImage(
|
|
44
|
+
image: getImage(_externalAssets_CmLfPohF__default)
|
|
45
45
|
};
|
|
46
46
|
const udmPro = {
|
|
47
47
|
...udmPro$1,
|
|
48
48
|
description: "udmPro.customDescription",
|
|
49
|
-
image: getImage(
|
|
49
|
+
image: getImage(_externalAssets_pESvYnSE__default)
|
|
50
50
|
};
|
|
51
51
|
const udmProSpecial = {
|
|
52
52
|
...udmProSpecial$1,
|
|
53
53
|
title: "udmProSpecial.customTitle",
|
|
54
54
|
description: "udmProSpecial.customDescription",
|
|
55
|
-
image: getImage(
|
|
55
|
+
image: getImage(_externalAssets_BUotdZNw__default)
|
|
56
56
|
};
|
|
57
57
|
const udw = {
|
|
58
58
|
...udw$1,
|
|
@@ -20,7 +20,7 @@ var unifiAppSuite = require('../properties/unifiAppSuite.js');
|
|
|
20
20
|
var unifiDevices = require('../properties/unifiDevices.js');
|
|
21
21
|
var unifiPowerBackup = require('../properties/unifiPowerBackup.js');
|
|
22
22
|
var wanPorts = require('../properties/wanPorts.js');
|
|
23
|
-
var image = require("../../../../assets/
|
|
23
|
+
var image = require("../../../../assets/udmPro2.jpg");
|
|
24
24
|
var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
25
25
|
var applications = require("../../../../assets/applications.svg");
|
|
26
26
|
var nextAiInspection = require('../properties/nextAiInspection.js');
|
|
@@ -18,7 +18,7 @@ import { unifiAppSuite } from '../properties/unifiAppSuite.mjs';
|
|
|
18
18
|
import { unifiDevices } from '../properties/unifiDevices.mjs';
|
|
19
19
|
import { unifiPowerBackup } from '../properties/unifiPowerBackup.mjs';
|
|
20
20
|
import { wanPorts } from '../properties/wanPorts.mjs';
|
|
21
|
-
import image__default from "../../../../assets/
|
|
21
|
+
import image__default from "../../../../assets/udmPro2.jpg";
|
|
22
22
|
import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
23
23
|
import applications__default from "../../../../assets/applications.svg";
|
|
24
24
|
import { nextAiInspection } from '../properties/nextAiInspection.mjs';
|
|
@@ -8,7 +8,7 @@ require('../../../StyleableSvgImage/index.js');
|
|
|
8
8
|
require('../../assets/applications.svg.js');
|
|
9
9
|
require('../../assets/Consoles/udmProMax.jpg.js');
|
|
10
10
|
require('../properties/index.js');
|
|
11
|
-
var image = require("../../../../assets/
|
|
11
|
+
var image = require("../../../../assets/udmProMax2.jpg");
|
|
12
12
|
var unifiAppSuite = require('../properties/unifiAppSuite.js');
|
|
13
13
|
var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
14
14
|
var applications = require("../../../../assets/applications.svg");
|
|
@@ -6,7 +6,7 @@ import '../../../StyleableSvgImage/index.mjs';
|
|
|
6
6
|
import '../../assets/applications.svg.mjs';
|
|
7
7
|
import '../../assets/Consoles/udmProMax.jpg.mjs';
|
|
8
8
|
import '../properties/index.mjs';
|
|
9
|
-
import image__default from "../../../../assets/
|
|
9
|
+
import image__default from "../../../../assets/udmProMax2.jpg";
|
|
10
10
|
import { unifiAppSuite } from '../properties/unifiAppSuite.mjs';
|
|
11
11
|
import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
12
12
|
import applications__default from "../../../../assets/applications.svg";
|
|
@@ -20,7 +20,7 @@ var unifiAppSuite = require('../properties/unifiAppSuite.js');
|
|
|
20
20
|
var unifiDevices = require('../properties/unifiDevices.js');
|
|
21
21
|
var unifiPowerBackup = require('../properties/unifiPowerBackup.js');
|
|
22
22
|
var wanPorts = require('../properties/wanPorts.js');
|
|
23
|
-
var image = require("../../../../assets/
|
|
23
|
+
var image = require("../../../../assets/udmProSpecial2.jpg");
|
|
24
24
|
var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
25
25
|
var applications = require("../../../../assets/applications.svg");
|
|
26
26
|
var nextAiInspection = require('../properties/nextAiInspection.js');
|
|
@@ -18,7 +18,7 @@ import { unifiAppSuite } from '../properties/unifiAppSuite.mjs';
|
|
|
18
18
|
import { unifiDevices } from '../properties/unifiDevices.mjs';
|
|
19
19
|
import { unifiPowerBackup } from '../properties/unifiPowerBackup.mjs';
|
|
20
20
|
import { wanPorts } from '../properties/wanPorts.mjs';
|
|
21
|
-
import image__default from "../../../../assets/
|
|
21
|
+
import image__default from "../../../../assets/udmProSpecial2.jpg";
|
|
22
22
|
import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
23
23
|
import applications__default from "../../../../assets/applications.svg";
|
|
24
24
|
import { nextAiInspection } from '../properties/nextAiInspection.mjs';
|
|
@@ -12,9 +12,9 @@ require('./assets/play.svg.js');
|
|
|
12
12
|
require('./assets/volume-off.svg.js');
|
|
13
13
|
require('./assets/volume-on.svg.js');
|
|
14
14
|
var VideoPlayer_styles = require('./VideoPlayer.styles.js');
|
|
15
|
-
var CloseIcon = require("../../assets/
|
|
15
|
+
var CloseIcon = require("../../assets/close2.svg");
|
|
16
16
|
var BackIcon = require("../../assets/back.svg");
|
|
17
|
-
var PauseIcon = require("../../assets/
|
|
17
|
+
var PauseIcon = require("../../assets/pause.svg");
|
|
18
18
|
var PlayIcon = require("../../assets/play.svg");
|
|
19
19
|
var VolumeOffIcon = require("../../assets/volume-off.svg");
|
|
20
20
|
var VolumeOnIcon = require("../../assets/volume-on.svg");
|
|
@@ -10,9 +10,9 @@ import './assets/play.svg.mjs';
|
|
|
10
10
|
import './assets/volume-off.svg.mjs';
|
|
11
11
|
import './assets/volume-on.svg.mjs';
|
|
12
12
|
import { Wrap, IconWrap, Icon, Video, ControlWrap, TimelineWrap, Timeline, Controls, LeftSide, IconButton, VolumeWrap, VolumeSliderWrap, VolumeSlider, Time, Center, RightSide } from './VideoPlayer.styles.mjs';
|
|
13
|
-
import CloseIcon__default from "../../assets/
|
|
13
|
+
import CloseIcon__default from "../../assets/close2.svg";
|
|
14
14
|
import BackIcon__default from "../../assets/back.svg";
|
|
15
|
-
import PauseIcon__default from "../../assets/
|
|
15
|
+
import PauseIcon__default from "../../assets/pause.svg";
|
|
16
16
|
import PlayIcon__default from "../../assets/play.svg";
|
|
17
17
|
import VolumeOffIcon__default from "../../assets/volume-off.svg";
|
|
18
18
|
import VolumeOnIcon__default from "../../assets/volume-on.svg";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../assets/
|
|
2
|
-
export { default } from "../../../assets/
|
|
1
|
+
export * from "../../../assets/close2.svg";
|
|
2
|
+
export { default } from "../../../assets/close2.svg";
|
|
3
3
|
//# sourceMappingURL=close.svg.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../assets/
|
|
2
|
-
export { default } from "../../../assets/
|
|
1
|
+
export * from "../../../assets/pause.svg";
|
|
2
|
+
export { default } from "../../../assets/pause.svg";
|
|
3
3
|
//# sourceMappingURL=pause.svg.mjs.map
|
|
@@ -3,8 +3,10 @@ type Plugin = PluginObj<{
|
|
|
3
3
|
defaultImportName: null | string;
|
|
4
4
|
}>;
|
|
5
5
|
/**
|
|
6
|
-
* Currently this plugin won't:
|
|
7
|
-
* - Handle existing source maps correctly and would strip from the output: "//#
|
|
6
|
+
* FIXME: Currently this plugin won't:
|
|
7
|
+
* - Handle existing source maps correctly and would strip from the output: "//#
|
|
8
|
+
* sourceMappingURL=BubbleContainer.module.css.js.map"
|
|
9
|
+
* - CSS modules contain 2 arguments that are the same string, need to extend script to convert that as well
|
|
8
10
|
*/
|
|
9
11
|
export declare const transformCssModule: () => Plugin;
|
|
10
12
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var t = require('@babel/types');
|
|
4
4
|
var crypto = require('node:crypto');
|
|
5
5
|
function _interopDefault(e) {
|
|
6
6
|
return e && e.__esModule ? e : {
|
|
@@ -26,7 +26,7 @@ function _interopNamespace(e) {
|
|
|
26
26
|
n["default"] = e;
|
|
27
27
|
return Object.freeze(n);
|
|
28
28
|
}
|
|
29
|
-
var
|
|
29
|
+
var t__namespace = /*#__PURE__*/_interopNamespace(t);
|
|
30
30
|
var crypto__default = /*#__PURE__*/_interopDefault(crypto);
|
|
31
31
|
"use strict";
|
|
32
32
|
function generateMd5(input) {
|
|
@@ -48,7 +48,7 @@ const transformCssModule = () => {
|
|
|
48
48
|
if (!importSource.endsWith("style-inject.es.js")) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
const defaultSpecifier = path.node.specifiers.find(specifier =>
|
|
51
|
+
const defaultSpecifier = path.node.specifiers.find(specifier => t__namespace.isImportDefaultSpecifier(specifier));
|
|
52
52
|
if (defaultSpecifier) {
|
|
53
53
|
state["defaultImportName"] = defaultSpecifier.local.name;
|
|
54
54
|
} else {
|
|
@@ -61,17 +61,46 @@ const transformCssModule = () => {
|
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
63
|
const callee = path.node.callee;
|
|
64
|
-
if (
|
|
64
|
+
if (t__namespace.isIdentifier(callee) && callee.name === state["defaultImportName"]) {
|
|
65
65
|
const args = path.node.arguments;
|
|
66
66
|
if (!(args.length >= 1 && args.length <= 2)) {
|
|
67
67
|
throw new Error("Unexpected number of arguments");
|
|
68
68
|
}
|
|
69
|
-
if (!(
|
|
69
|
+
if (!((t__namespace.isStringLiteral(args[0]) || t__namespace.isIdentifier(args[0])) && (!args[1] || t__namespace.isStringLiteral(args[1])))) {
|
|
70
70
|
throw new Error("Unexpected argument types");
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
let cssString = "";
|
|
73
|
+
if (t__namespace.isStringLiteral(args[0])) {
|
|
74
|
+
cssString = args[0].value;
|
|
75
|
+
let reusedVariable = null;
|
|
76
|
+
path.scope.path.traverse({
|
|
77
|
+
VariableDeclarator(variablePath) {
|
|
78
|
+
const {
|
|
79
|
+
id,
|
|
80
|
+
init
|
|
81
|
+
} = variablePath.node;
|
|
82
|
+
if (t__namespace.isStringLiteral(init, {
|
|
83
|
+
value: cssString
|
|
84
|
+
})) {
|
|
85
|
+
reusedVariable = id;
|
|
86
|
+
variablePath.stop();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
if (reusedVariable) {
|
|
91
|
+
path.node.arguments[0] = reusedVariable;
|
|
92
|
+
}
|
|
93
|
+
} else if (t__namespace.isIdentifier(args[0])) {
|
|
94
|
+
const binding = path.scope.getBinding(args[0].name);
|
|
95
|
+
if (binding && t__namespace.isVariableDeclarator(binding.path.node) && t__namespace.isStringLiteral(binding.path.node.init)) {
|
|
96
|
+
cssString = binding.path.node.init.value;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (!cssString) {
|
|
100
|
+
throw new Error("Invalid first argument value");
|
|
101
|
+
}
|
|
102
|
+
const hash = generateMd5(cssString);
|
|
103
|
+
const hashArg = t__namespace.stringLiteral(hash);
|
|
75
104
|
if (args.length > 1) {
|
|
76
105
|
args[1] = hashArg;
|
|
77
106
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-css-module.js","sources":["../../../../src/utils/nextjs/ssr/transform-css-module.ts"],"sourcesContent":["import type { PluginObj } from \"@babel/core\";\nimport * as
|
|
1
|
+
{"version":3,"file":"transform-css-module.js","sources":["../../../../src/utils/nextjs/ssr/transform-css-module.ts"],"sourcesContent":["import type { PluginObj } from \"@babel/core\";\nimport * as t from \"@babel/types\";\nimport crypto from \"node:crypto\";\n\nfunction generateMd5(input: string): string {\n return crypto.createHash(\"md5\").update(input).digest(\"hex\");\n}\n\ntype Plugin = PluginObj<{\n // Store the name of the default import identifier for \"style-inject.es.js\"\n defaultImportName: null | string;\n}>;\n\n/**\n * FIXME: Currently this plugin won't:\n * - Handle existing source maps correctly and would strip from the output: \"//#\n * sourceMappingURL=BubbleContainer.module.css.js.map\"\n * - CSS modules contain 2 arguments that are the same string, need to extend script to convert that as well\n */\nexport const transformCssModule = (): Plugin => {\n return {\n visitor: {\n // Step 0: Setup state\n Program(_path, state) {\n state[\"defaultImportName\"] = null;\n },\n // Step 1: Find the default import from \"style-inject.es.js\"\n ImportDeclaration(path, state) {\n // Skip, if the default import name is already found (assuming there is only one per-file)\n if (state[\"defaultImportName\"]) {\n return;\n }\n\n // Look for imports for \"style-inject.es.js\" file\n const importSource = path.node.source.value;\n if (!importSource.endsWith(\"style-inject.es.js\")) {\n return;\n }\n\n // Check for default import specifier\n const defaultSpecifier = path.node.specifiers.find((specifier) =>\n t.isImportDefaultSpecifier(specifier),\n ) as t.ImportDefaultSpecifier | undefined;\n\n // Store the default import name\n if (defaultSpecifier) {\n // Fail if two instances of file is found\n state[\"defaultImportName\"] = defaultSpecifier.local.name;\n } else {\n throw new Error(\n \"Import for `style-inject.es.js` file not found in file\",\n );\n }\n },\n\n // Step 2: Find all calls to the imported identifier\n CallExpression(path, state) {\n // Ignore if the default import name is not found\n if (!state[\"defaultImportName\"]) {\n return;\n }\n\n // Check if the callee is the default import identifier\n const callee = path.node.callee;\n if (\n t.isIdentifier(callee) &&\n callee.name === state[\"defaultImportName\"]\n ) {\n const args = path.node.arguments;\n\n // If arguments are not between 1 and 2, fail\n if (!(args.length >= 1 && args.length <= 2)) {\n throw new Error(\"Unexpected number of arguments\");\n }\n\n /**\n * Validates that the function arguments are:\n * 1. needs to be a string literal or variable holding string\n * 2. (optional) string literal\n */\n if (\n !(\n (t.isStringLiteral(args[0]) || t.isIdentifier(args[0])) &&\n (!args[1] || t.isStringLiteral(args[1]))\n )\n ) {\n throw new Error(\"Unexpected argument types\");\n }\n\n // CSS string\n let cssString: string = \"\";\n\n // Try to remove duplicate string literal as first argument and instead re-use the a already generated variable\n if (t.isStringLiteral(args[0])) {\n cssString = args[0].value;\n\n let reusedVariable = null;\n path.scope.path.traverse({\n VariableDeclarator(variablePath) {\n const { id, init } = variablePath.node;\n\n // Match variables initialized with the same string value.\n if (t.isStringLiteral(init, { value: cssString })) {\n reusedVariable = id;\n variablePath.stop(); // Stop traversing once a match is found.\n }\n },\n });\n\n // Replace the string literal with the existing variable reference.\n if (reusedVariable) {\n path.node.arguments[0] = reusedVariable;\n }\n } else if (t.isIdentifier(args[0])) {\n // Extract value from variable\n const binding = path.scope.getBinding(args[0].name);\n if (\n binding &&\n t.isVariableDeclarator(binding.path.node) &&\n t.isStringLiteral(binding.path.node.init)\n ) {\n cssString = binding.path.node.init.value;\n }\n }\n\n if (!cssString) {\n throw new Error(\"Invalid first argument value\");\n }\n\n // Generate MD5 hash of the first argument's value\n // TODO: Looked into that styled-components use murmurhash. Also it's possible to use sha1 for longer key\n // (less % of collision)\n const hash = generateMd5(cssString);\n\n // Add the hash as the second argument\n const hashArg = t.stringLiteral(hash);\n if (args.length > 1) {\n // If a second argument exists, replace it\n args[1] = hashArg;\n } else {\n // Otherwise, add it as a new second argument\n args.push(hashArg);\n }\n }\n },\n },\n } satisfies Plugin;\n};\n"],"names":["generateMd5","input","crypto","createHash","update","digest","transformCssModule","visitor","Program","_path","state","ImportDeclaration","path","importSource","node","source","value","endsWith","defaultSpecifier","specifiers","find","specifier","t","isImportDefaultSpecifier","local","name","Error","CallExpression","callee","isIdentifier","args","arguments","length","isStringLiteral","cssString","reusedVariable","scope","traverse","VariableDeclarator","variablePath","id","init","stop","binding","getBinding","isVariableDeclarator","hash","hashArg","stringLiteral","push"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,YAAYC,KAAuB,EAAA;EACnC,OAAAC,eAAA,CAAA,SAAA,CAAA,CAAOC,WAAW,KAAK,CAAA,CAAEC,OAAOH,KAAK,CAAA,CAAEI,OAAO,KAAK,CAAA;AAC5D;AAaO,MAAMC,qBAAqBA,CAAA,KAAc;EACvC,OAAA;IACLC,OAAS,EAAA;MAAA;MAEPC,OAAAA,CAAQC,OAAOC,KAAO,EAAA;QACpBA,KAAA,CAAM,mBAAmB,CAAI,GAAA,IAAA;MAC/B,CAAA;MAAA;MAEAC,iBAAAA,CAAkBC,MAAMF,KAAO,EAAA;QAEzB,IAAAA,KAAA,CAAM,mBAAmB,CAAG,EAAA;UAC9B;QACF;QAGM,MAAAG,YAAA,GAAeD,IAAK,CAAAE,IAAA,CAAKC,MAAO,CAAAC,KAAA;QACtC,IAAI,CAACH,YAAA,CAAaI,QAAS,CAAA,oBAAoB,CAAG,EAAA;UAChD;QACF;QAGM,MAAAC,gBAAA,GAAmBN,IAAK,CAAAE,IAAA,CAAKK,UAAW,CAAAC,IAAA,CAAMC,SAAA,IAClDC,YAAE,CAAAC,wBAAA,CAAyBF,SAAS,CAAA,CACtC;QAGA,IAAIH,gBAAkB,EAAA;UAEdR,KAAA,CAAA,mBAAmB,CAAI,GAAAQ,gBAAA,CAAiBM,KAAM,CAAAC,IAAA;QAAA,CAC/C,MAAA;UACL,MAAM,IAAIC,KAAA,CACR,wDAAA,CACF;QACF;MACF,CAAA;MAAA;MAGAC,cAAAA,CAA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BACjBD,YAAA,CAAaG,IAAK,CAAA,CAAA;gBACpB;cACF;YAAA,CACD,CAAA;YAGD,IAAIP,cAAgB,EAAA;cACbvB,IAAA,CAAAE,IAAA,CAAKiB,SAAU,CAAA,CAAC,CAAI,GAAAI,cAAA;YAC3B;qBACSb,YAAE,CAAAO,YAAA,CAAaC,IAAK,CAAA,CAAC,CAAC,CAAG,EAAA;YAElC,MAAMa,UAAU/B,IAAK,CAAAwB,KAAA,CAAMQ,WAAWd,IAAK,CAAA,CAAC,EAAEL,IAAI,CAAA;YAClD,IACEkB,OACA,IAAArB,YAAA,CAAEuB,oBAAqB,CAAAF,OAAA,CAAQ/B,IAAK,CAAAE,IAAI,CACxC,IAAAQ,YAAA,CAAEW,eAAgB,CAAAU,OAAA,CAAQ/B,IAAK,CAAAE,IAAA,CAAK2B,IAAI,CACxC,EAAA;cACYP,SAAA,GAAAS,OAAA,CAAQ/B,IAAK,CAAAE,IAAA,CAAK2B,IAAK,CAAAzB,KAAA;YACrC;UACF;UAEA,IAAI,CAACkB,SAAW,EAAA;YACR,MAAA,IAAIR,MAAM,8BAA8B,CAAA;UAChD;UAKM,MAAAoB,IAAA,GAAO9C,YAAYkC,SAAS,CAAA;UAG5B,MAAAa,OAAA,GAAUzB,YAAE,CAAA0B,aAAA,CAAcF,IAAI,CAAA;UAChC,IAAAhB,IAAA,CAAKE,SAAS,CAAG,EAAA;YAEnBF,IAAA,CAAK,CAAC,CAAI,GAAAiB,OAAA;UAAA,CACL,MAAA;YAELjB,IAAA,CAAKmB,KAAKF,OAAO,CAAA;UACnB;QACF;MACF;IACF;EAAA,CACF;AACF,CAAA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as t from '@babel/types';
|
|
2
2
|
import crypto from 'node:crypto';
|
|
3
3
|
"use strict";
|
|
4
4
|
function generateMd5(input) {
|
|
@@ -20,7 +20,7 @@ const transformCssModule = () => {
|
|
|
20
20
|
if (!importSource.endsWith("style-inject.es.js")) {
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
const defaultSpecifier = path.node.specifiers.find(specifier =>
|
|
23
|
+
const defaultSpecifier = path.node.specifiers.find(specifier => t.isImportDefaultSpecifier(specifier));
|
|
24
24
|
if (defaultSpecifier) {
|
|
25
25
|
state["defaultImportName"] = defaultSpecifier.local.name;
|
|
26
26
|
} else {
|
|
@@ -33,17 +33,46 @@ const transformCssModule = () => {
|
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
const callee = path.node.callee;
|
|
36
|
-
if (
|
|
36
|
+
if (t.isIdentifier(callee) && callee.name === state["defaultImportName"]) {
|
|
37
37
|
const args = path.node.arguments;
|
|
38
38
|
if (!(args.length >= 1 && args.length <= 2)) {
|
|
39
39
|
throw new Error("Unexpected number of arguments");
|
|
40
40
|
}
|
|
41
|
-
if (!(
|
|
41
|
+
if (!((t.isStringLiteral(args[0]) || t.isIdentifier(args[0])) && (!args[1] || t.isStringLiteral(args[1])))) {
|
|
42
42
|
throw new Error("Unexpected argument types");
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
let cssString = "";
|
|
45
|
+
if (t.isStringLiteral(args[0])) {
|
|
46
|
+
cssString = args[0].value;
|
|
47
|
+
let reusedVariable = null;
|
|
48
|
+
path.scope.path.traverse({
|
|
49
|
+
VariableDeclarator(variablePath) {
|
|
50
|
+
const {
|
|
51
|
+
id,
|
|
52
|
+
init
|
|
53
|
+
} = variablePath.node;
|
|
54
|
+
if (t.isStringLiteral(init, {
|
|
55
|
+
value: cssString
|
|
56
|
+
})) {
|
|
57
|
+
reusedVariable = id;
|
|
58
|
+
variablePath.stop();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
if (reusedVariable) {
|
|
63
|
+
path.node.arguments[0] = reusedVariable;
|
|
64
|
+
}
|
|
65
|
+
} else if (t.isIdentifier(args[0])) {
|
|
66
|
+
const binding = path.scope.getBinding(args[0].name);
|
|
67
|
+
if (binding && t.isVariableDeclarator(binding.path.node) && t.isStringLiteral(binding.path.node.init)) {
|
|
68
|
+
cssString = binding.path.node.init.value;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (!cssString) {
|
|
72
|
+
throw new Error("Invalid first argument value");
|
|
73
|
+
}
|
|
74
|
+
const hash = generateMd5(cssString);
|
|
75
|
+
const hashArg = t.stringLiteral(hash);
|
|
47
76
|
if (args.length > 1) {
|
|
48
77
|
args[1] = hashArg;
|
|
49
78
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-css-module.mjs","sources":["../../../../src/utils/nextjs/ssr/transform-css-module.ts"],"sourcesContent":["import type { PluginObj } from \"@babel/core\";\nimport * as
|
|
1
|
+
{"version":3,"file":"transform-css-module.mjs","sources":["../../../../src/utils/nextjs/ssr/transform-css-module.ts"],"sourcesContent":["import type { PluginObj } from \"@babel/core\";\nimport * as t from \"@babel/types\";\nimport crypto from \"node:crypto\";\n\nfunction generateMd5(input: string): string {\n return crypto.createHash(\"md5\").update(input).digest(\"hex\");\n}\n\ntype Plugin = PluginObj<{\n // Store the name of the default import identifier for \"style-inject.es.js\"\n defaultImportName: null | string;\n}>;\n\n/**\n * FIXME: Currently this plugin won't:\n * - Handle existing source maps correctly and would strip from the output: \"//#\n * sourceMappingURL=BubbleContainer.module.css.js.map\"\n * - CSS modules contain 2 arguments that are the same string, need to extend script to convert that as well\n */\nexport const transformCssModule = (): Plugin => {\n return {\n visitor: {\n // Step 0: Setup state\n Program(_path, state) {\n state[\"defaultImportName\"] = null;\n },\n // Step 1: Find the default import from \"style-inject.es.js\"\n ImportDeclaration(path, state) {\n // Skip, if the default import name is already found (assuming there is only one per-file)\n if (state[\"defaultImportName\"]) {\n return;\n }\n\n // Look for imports for \"style-inject.es.js\" file\n const importSource = path.node.source.value;\n if (!importSource.endsWith(\"style-inject.es.js\")) {\n return;\n }\n\n // Check for default import specifier\n const defaultSpecifier = path.node.specifiers.find((specifier) =>\n t.isImportDefaultSpecifier(specifier),\n ) as t.ImportDefaultSpecifier | undefined;\n\n // Store the default import name\n if (defaultSpecifier) {\n // Fail if two instances of file is found\n state[\"defaultImportName\"] = defaultSpecifier.local.name;\n } else {\n throw new Error(\n \"Import for `style-inject.es.js` file not found in file\",\n );\n }\n },\n\n // Step 2: Find all calls to the imported identifier\n CallExpression(path, state) {\n // Ignore if the default import name is not found\n if (!state[\"defaultImportName\"]) {\n return;\n }\n\n // Check if the callee is the default import identifier\n const callee = path.node.callee;\n if (\n t.isIdentifier(callee) &&\n callee.name === state[\"defaultImportName\"]\n ) {\n const args = path.node.arguments;\n\n // If arguments are not between 1 and 2, fail\n if (!(args.length >= 1 && args.length <= 2)) {\n throw new Error(\"Unexpected number of arguments\");\n }\n\n /**\n * Validates that the function arguments are:\n * 1. needs to be a string literal or variable holding string\n * 2. (optional) string literal\n */\n if (\n !(\n (t.isStringLiteral(args[0]) || t.isIdentifier(args[0])) &&\n (!args[1] || t.isStringLiteral(args[1]))\n )\n ) {\n throw new Error(\"Unexpected argument types\");\n }\n\n // CSS string\n let cssString: string = \"\";\n\n // Try to remove duplicate string literal as first argument and instead re-use the a already generated variable\n if (t.isStringLiteral(args[0])) {\n cssString = args[0].value;\n\n let reusedVariable = null;\n path.scope.path.traverse({\n VariableDeclarator(variablePath) {\n const { id, init } = variablePath.node;\n\n // Match variables initialized with the same string value.\n if (t.isStringLiteral(init, { value: cssString })) {\n reusedVariable = id;\n variablePath.stop(); // Stop traversing once a match is found.\n }\n },\n });\n\n // Replace the string literal with the existing variable reference.\n if (reusedVariable) {\n path.node.arguments[0] = reusedVariable;\n }\n } else if (t.isIdentifier(args[0])) {\n // Extract value from variable\n const binding = path.scope.getBinding(args[0].name);\n if (\n binding &&\n t.isVariableDeclarator(binding.path.node) &&\n t.isStringLiteral(binding.path.node.init)\n ) {\n cssString = binding.path.node.init.value;\n }\n }\n\n if (!cssString) {\n throw new Error(\"Invalid first argument value\");\n }\n\n // Generate MD5 hash of the first argument's value\n // TODO: Looked into that styled-components use murmurhash. Also it's possible to use sha1 for longer key\n // (less % of collision)\n const hash = generateMd5(cssString);\n\n // Add the hash as the second argument\n const hashArg = t.stringLiteral(hash);\n if (args.length > 1) {\n // If a second argument exists, replace it\n args[1] = hashArg;\n } else {\n // Otherwise, add it as a new second argument\n args.push(hashArg);\n }\n }\n },\n },\n } satisfies Plugin;\n};\n"],"names":["generateMd5","input","crypto","createHash","update","digest","transformCssModule","visitor","Program","_path","state","ImportDeclaration","path","importSource","node","source","value","endsWith","defaultSpecifier","specifiers","find","specifier","t","isImportDefaultSpecifier","local","name","Error","CallExpression","callee","isIdentifier","args","arguments","length","isStringLiteral","cssString","reusedVariable","scope","traverse","VariableDeclarator","variablePath","id","init","stop","binding","getBinding","isVariableDeclarator","hash","hashArg","stringLiteral","push"],"mappings":";;;AAIA,SAASA,YAAYC,KAAuB,EAAA;EACnC,OAAAC,MAAA,CAAOC,WAAW,KAAK,CAAA,CAAEC,OAAOH,KAAK,CAAA,CAAEI,OAAO,KAAK,CAAA;AAC5D;AAaO,MAAMC,qBAAqBA,CAAA,KAAc;EACvC,OAAA;IACLC,OAAS,EAAA;MAAA;MAEPC,OAAAA,CAAQC,OAAOC,KAAO,EAAA;QACpBA,KAAA,CAAM,mBAAmB,CAAI,GAAA,IAAA;MAC/B,CAAA;MAAA;MAEAC,iBAAAA,CAAkBC,MAAMF,KAAO,EAAA;QAEzB,IAAAA,KAAA,CAAM,mBAAmB,CAAG,EAAA;UAC9B;QACF;QAGM,MAAAG,YAAA,GAAeD,IAAK,CAAAE,IAAA,CAAKC,MAAO,CAAAC,KAAA;QACtC,IAAI,CAACH,YAAA,CAAaI,QAAS,CAAA,oBAAoB,CAAG,EAAA;UAChD;QACF;QAGM,MAAAC,gBAAA,GAAmBN,IAAK,CAAAE,IAAA,CAAKK,UAAW,CAAAC,IAAA,CAAMC,SAAA,IAClDC,CAAE,CAAAC,wBAAA,CAAyB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