@meduza/ui-kit-2 0.9.903 → 1.0.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.
- package/dist/EmbedBlock/EmbedBlock.types.d.ts +1 -0
- package/dist/RawHtmlBlock/RawHtmlBlock.types.d.ts +1 -0
- package/dist/RenderBlocks/RenderBlocks.types.d.ts +1 -0
- package/dist/ui-kit-2.cjs.development.js +27 -8
- package/dist/ui-kit-2.cjs.development.js.map +1 -1
- package/dist/ui-kit-2.cjs.production.min.js +1 -1
- package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
- package/dist/ui-kit-2.esm.js +27 -8
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/package.json +13 -13
- package/src/EmbedBlock/EmbedBlock.tsx +14 -2
- package/src/EmbedBlock/EmbedBlock.types.ts +1 -0
- package/src/EmbedBlock/index.tsx +5 -2
- package/src/RawHtmlBlock/RawHtmlBlock.types.ts +1 -0
- package/src/RawHtmlBlock/index.tsx +3 -1
- package/src/RenderBlocks/RenderBlocks.types.ts +1 -0
- package/src/RenderBlocks/index.tsx +3 -1
package/dist/ui-kit-2.esm.js
CHANGED
|
@@ -1157,6 +1157,7 @@ const EmbedGif = ({
|
|
|
1157
1157
|
}))));
|
|
1158
1158
|
};
|
|
1159
1159
|
|
|
1160
|
+
/* eslint-disable jsx-a11y/media-has-caption */
|
|
1160
1161
|
const EmbedBlock = ({
|
|
1161
1162
|
block,
|
|
1162
1163
|
block: {
|
|
@@ -1171,11 +1172,13 @@ const EmbedBlock = ({
|
|
|
1171
1172
|
small_url: small,
|
|
1172
1173
|
large_url: large,
|
|
1173
1174
|
gif_url: gifUrl,
|
|
1174
|
-
mp4_url: mp4Url
|
|
1175
|
+
mp4_url: mp4Url,
|
|
1176
|
+
video_file_path: videoFileUrl
|
|
1175
1177
|
}
|
|
1176
1178
|
},
|
|
1177
1179
|
styleContext,
|
|
1178
|
-
children
|
|
1180
|
+
children,
|
|
1181
|
+
platform
|
|
1179
1182
|
}) => {
|
|
1180
1183
|
const [isPopoverShown, setIsPopoverShown] = useState(false);
|
|
1181
1184
|
const style = {};
|
|
@@ -1232,6 +1235,16 @@ const EmbedBlock = ({
|
|
|
1232
1235
|
}
|
|
1233
1236
|
default:
|
|
1234
1237
|
{
|
|
1238
|
+
if (platform === 'mirror' && videoFileUrl) {
|
|
1239
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1240
|
+
className: styles$r.object
|
|
1241
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1242
|
+
className: styles$r.objectWrap
|
|
1243
|
+
}, /*#__PURE__*/React.createElement("video", {
|
|
1244
|
+
src: videoFileUrl,
|
|
1245
|
+
controls: true
|
|
1246
|
+
})));
|
|
1247
|
+
}
|
|
1235
1248
|
return /*#__PURE__*/React.createElement("div", {
|
|
1236
1249
|
className: styles$r.object
|
|
1237
1250
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1356,7 +1369,8 @@ const IframeBlock = ({
|
|
|
1356
1369
|
const EmbedBlockContainer = ({
|
|
1357
1370
|
block,
|
|
1358
1371
|
styleContext,
|
|
1359
|
-
lang
|
|
1372
|
+
lang,
|
|
1373
|
+
platform
|
|
1360
1374
|
}) => {
|
|
1361
1375
|
if (block.data && block.data.wrap_with_iframe) {
|
|
1362
1376
|
return /*#__PURE__*/React.createElement(IframeBlock, {
|
|
@@ -1367,7 +1381,8 @@ const EmbedBlockContainer = ({
|
|
|
1367
1381
|
}
|
|
1368
1382
|
return /*#__PURE__*/React.createElement(EmbedBlock, {
|
|
1369
1383
|
block: block,
|
|
1370
|
-
styleContext: styleContext
|
|
1384
|
+
styleContext: styleContext,
|
|
1385
|
+
platform: platform
|
|
1371
1386
|
});
|
|
1372
1387
|
};
|
|
1373
1388
|
|
|
@@ -2097,7 +2112,8 @@ const RenderBlocks = ({
|
|
|
2097
2112
|
isRead,
|
|
2098
2113
|
isListened,
|
|
2099
2114
|
bookmarkAction,
|
|
2100
|
-
isInBookmarks
|
|
2115
|
+
isInBookmarks,
|
|
2116
|
+
platform
|
|
2101
2117
|
}) => {
|
|
2102
2118
|
switch (block.type) {
|
|
2103
2119
|
case 'tag':
|
|
@@ -2224,7 +2240,8 @@ const RenderBlocks = ({
|
|
|
2224
2240
|
return /*#__PURE__*/React.createElement(EmbedBlockContainer, {
|
|
2225
2241
|
block: block,
|
|
2226
2242
|
styleContext: styleContext,
|
|
2227
|
-
lang: lang
|
|
2243
|
+
lang: lang,
|
|
2244
|
+
platform: platform
|
|
2228
2245
|
});
|
|
2229
2246
|
case 'grouped':
|
|
2230
2247
|
return /*#__PURE__*/React.createElement(GroupedBlock, {
|
|
@@ -2671,7 +2688,8 @@ const RawHtmlBlock = ({
|
|
|
2671
2688
|
isInBookmarks,
|
|
2672
2689
|
bookmarkAction,
|
|
2673
2690
|
lightBox,
|
|
2674
|
-
lang
|
|
2691
|
+
lang,
|
|
2692
|
+
platform
|
|
2675
2693
|
}) => {
|
|
2676
2694
|
const context = {
|
|
2677
2695
|
lightBox: lightBox || null
|
|
@@ -2739,7 +2757,8 @@ const RawHtmlBlock = ({
|
|
|
2739
2757
|
isListened: isListened,
|
|
2740
2758
|
isInBookmarks: isInBookmarks,
|
|
2741
2759
|
bookmarkAction: bookmarkAction,
|
|
2742
|
-
lang: lang
|
|
2760
|
+
lang: lang,
|
|
2761
|
+
platform: platform
|
|
2743
2762
|
}));
|
|
2744
2763
|
}
|
|
2745
2764
|
}
|