@se-studio/core-ui 1.0.3 → 1.0.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/dist/CmsRendererConfig.d.ts +6 -6
- package/dist/CmsRendererConfig.d.ts.map +1 -1
- package/dist/components/Animation.d.ts +3 -0
- package/dist/components/Animation.d.ts.map +1 -0
- package/dist/components/Animation.js +2 -0
- package/dist/components/Animation.js.map +1 -0
- package/dist/components/AnimationComponent.d.ts +7 -11
- package/dist/components/AnimationComponent.d.ts.map +1 -1
- package/dist/components/AnimationComponent.js +15 -3
- package/dist/components/AnimationComponent.js.map +1 -1
- package/dist/components/AnimationServer.d.ts +9 -0
- package/dist/components/AnimationServer.d.ts.map +1 -0
- package/dist/components/AnimationServer.js +34 -0
- package/dist/components/AnimationServer.js.map +1 -0
- package/dist/components/CmsCollection.d.ts +10 -14
- package/dist/components/CmsCollection.d.ts.map +1 -1
- package/dist/components/CmsCollection.js +19 -22
- package/dist/components/CmsCollection.js.map +1 -1
- package/dist/components/CmsComponent.d.ts +10 -14
- package/dist/components/CmsComponent.d.ts.map +1 -1
- package/dist/components/CmsComponent.js +19 -11
- package/dist/components/CmsComponent.js.map +1 -1
- package/dist/components/CmsContent.d.ts +5 -0
- package/dist/components/CmsContent.d.ts.map +1 -1
- package/dist/components/CmsContent.js.map +1 -1
- package/dist/components/CmsEmbeddedContent.d.ts +6 -0
- package/dist/components/CmsEmbeddedContent.d.ts.map +1 -0
- package/dist/components/{EmbeddedContent.js → CmsEmbeddedContent.js} +9 -10
- package/dist/components/CmsEmbeddedContent.js.map +1 -0
- package/dist/components/CmsExternalComponent.d.ts +10 -14
- package/dist/components/CmsExternalComponent.d.ts.map +1 -1
- package/dist/components/CmsExternalComponent.js +19 -21
- package/dist/components/CmsExternalComponent.js.map +1 -1
- package/dist/components/ExternalVideoComponent.d.ts +9 -0
- package/dist/components/ExternalVideoComponent.d.ts.map +1 -0
- package/dist/components/ExternalVideoComponent.js +32 -0
- package/dist/components/ExternalVideoComponent.js.map +1 -0
- package/dist/components/ExternalVideoServer.d.ts +9 -0
- package/dist/components/ExternalVideoServer.d.ts.map +1 -0
- package/dist/components/ExternalVideoServer.js +26 -0
- package/dist/components/ExternalVideoServer.js.map +1 -0
- package/dist/components/ExternalVimeoEmbed.d.ts +10 -0
- package/dist/components/ExternalVimeoEmbed.d.ts.map +1 -0
- package/dist/components/ExternalVimeoEmbed.js +18 -0
- package/dist/components/ExternalVimeoEmbed.js.map +1 -0
- package/dist/components/ExternalYouTubeEmbed.d.ts +9 -0
- package/dist/components/ExternalYouTubeEmbed.d.ts.map +1 -0
- package/dist/components/ExternalYouTubeEmbed.js +17 -0
- package/dist/components/ExternalYouTubeEmbed.js.map +1 -0
- package/dist/components/{LocalVideo.d.ts → LocalVideoServer.d.ts} +3 -3
- package/dist/components/LocalVideoServer.d.ts.map +1 -0
- package/dist/components/{LocalVideo.js → LocalVideoServer.js} +3 -3
- package/dist/components/LocalVideoServer.js.map +1 -0
- package/dist/components/VideoComponent.d.ts.map +1 -1
- package/dist/components/VideoComponent.js +7 -3
- package/dist/components/VideoComponent.js.map +1 -1
- package/dist/components/VisualComponent.d.ts.map +1 -1
- package/dist/components/VisualComponent.js +2 -2
- package/dist/components/VisualComponent.js.map +1 -1
- package/dist/components/svg.d.ts +3 -0
- package/dist/components/svg.d.ts.map +1 -0
- package/dist/components/svg.js +64 -0
- package/dist/components/svg.js.map +1 -0
- package/dist/elements/RtfOrString.d.ts +1 -0
- package/dist/elements/RtfOrString.d.ts.map +1 -1
- package/dist/elements/RtfOrString.js +2 -2
- package/dist/elements/RtfOrString.js.map +1 -1
- package/dist/index.d.ts +4 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/rtf/rtf.d.ts +2 -1
- package/dist/rtf/rtf.d.ts.map +1 -1
- package/dist/rtf/rtf.js +9 -7
- package/dist/rtf/rtf.js.map +1 -1
- package/package.json +9 -8
- package/dist/components/EmbeddedContent.d.ts +0 -10
- package/dist/components/EmbeddedContent.d.ts.map +0 -1
- package/dist/components/EmbeddedContent.js.map +0 -1
- package/dist/components/LocalVideo.d.ts.map +0 -1
- package/dist/components/LocalVideo.js.map +0 -1
- package/dist/embeddable/BuildEmbed.d.ts +0 -6
- package/dist/embeddable/BuildEmbed.d.ts.map +0 -1
- package/dist/embeddable/BuildEmbed.js +0 -15
- package/dist/embeddable/BuildEmbed.js.map +0 -1
- package/dist/embeddable/EmbeddableContext.d.ts +0 -14
- package/dist/embeddable/EmbeddableContext.d.ts.map +0 -1
- package/dist/embeddable/EmbeddableContext.js +0 -2
- package/dist/embeddable/EmbeddableContext.js.map +0 -1
- package/dist/embeddable/EmbeddableMaps.d.ts +0 -7
- package/dist/embeddable/EmbeddableMaps.d.ts.map +0 -1
- package/dist/embeddable/EmbeddableMaps.js +0 -7
- package/dist/embeddable/EmbeddableMaps.js.map +0 -1
|
@@ -10,34 +10,32 @@ const ExternalComponentTypeError = ({ information, availableTypes, showInProduct
|
|
|
10
10
|
borderRadius: '4px',
|
|
11
11
|
}, children: [_jsx("h3", { style: { color: '#856404', marginBottom: '0.5rem' }, children: "Unknown External Component Type" }), _jsxs("div", { style: { fontSize: '0.875rem' }, children: [_jsxs("p", { children: [_jsx("strong", { children: "External Component Type:" }), " ", String(information.externalType)] }), _jsxs("p", { children: [_jsx("strong", { children: "External Component ID:" }), " ", information.id] }), _jsxs("p", { children: [_jsx("strong", { children: "Available Types:" }), " ", availableTypes.join(', ')] }), _jsx("p", { style: { color: '#856404', marginTop: '0.5rem' }, children: "This external component type is not registered in CollectionMap. Using Generic fallback." })] })] }));
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
const { showUnknownTypeErrors } = rendererConfig;
|
|
15
|
-
const Element =
|
|
13
|
+
export const CmsExternalComponent = ({ information, contentContext, rendererConfig, }) => {
|
|
14
|
+
const { showUnknownTypeErrors, externalComponentMap } = rendererConfig;
|
|
15
|
+
const Element = externalComponentMap[information.externalType];
|
|
16
16
|
if (Element) {
|
|
17
17
|
const result = (_jsx(Element, { information: information, contentContext: contentContext, rendererConfig: rendererConfig }));
|
|
18
18
|
return result;
|
|
19
19
|
}
|
|
20
|
-
const availableTypes = Object.keys(
|
|
21
|
-
console.log(`Unknown external component type: ${String(information.
|
|
20
|
+
const availableTypes = Object.keys(externalComponentMap);
|
|
21
|
+
console.log(`Unknown external component type: ${String(information.externalType)} (ID: ${information.id}). Available types:`, availableTypes.join(','));
|
|
22
|
+
const shouldShowError = showUnknownTypeErrors ||
|
|
23
|
+
(typeof process !== 'undefined' && process.env?.NODE_ENV === 'development');
|
|
24
|
+
const result = (_jsx(_Fragment, { children: shouldShowError && (_jsx(ExternalComponentTypeError, { information: information, availableTypes: availableTypes, showInProduction: showUnknownTypeErrors })) }));
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
export const CmsEmbeddedExternalComponent = ({ information, rendererConfig, ...props }) => {
|
|
28
|
+
const { showUnknownTypeErrors, embeddedExternalComponentMap } = rendererConfig;
|
|
29
|
+
const Element = embeddedExternalComponentMap[information.externalType];
|
|
30
|
+
if (Element) {
|
|
31
|
+
const result = _jsx(Element, { information: information, rendererConfig: rendererConfig, ...props });
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
const availableTypes = Object.keys(embeddedExternalComponentMap);
|
|
35
|
+
console.log(`Unknown embedded external component type: ${String(information.externalType)} (ID: ${information.id}). Available types:`, availableTypes.join(','));
|
|
22
36
|
const shouldShowError = showUnknownTypeErrors ||
|
|
23
37
|
(typeof process !== 'undefined' && process.env?.NODE_ENV === 'development');
|
|
24
38
|
const result = (_jsx(_Fragment, { children: shouldShowError && (_jsx(ExternalComponentTypeError, { information: information, availableTypes: availableTypes, showInProduction: showUnknownTypeErrors })) }));
|
|
25
39
|
return result;
|
|
26
|
-
}
|
|
27
|
-
export function CmsEmbeddedExternalComponent({ information, contentContext, rendererConfig, }) {
|
|
28
|
-
return ExternalComponent({
|
|
29
|
-
information,
|
|
30
|
-
contentContext,
|
|
31
|
-
rendererConfig,
|
|
32
|
-
map: rendererConfig.externalComponentMap,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
export const CmsExternalComponent = ({ information, contentContext, rendererConfig, }) => {
|
|
36
|
-
return ExternalComponent({
|
|
37
|
-
information,
|
|
38
|
-
contentContext,
|
|
39
|
-
rendererConfig,
|
|
40
|
-
map: rendererConfig.externalComponentMap,
|
|
41
|
-
});
|
|
42
40
|
};
|
|
43
41
|
//# sourceMappingURL=CmsExternalComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsExternalComponent.js","sourceRoot":"","sources":["../../src/components/CmsExternalComponent.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CmsExternalComponent.js","sourceRoot":"","sources":["../../src/components/CmsExternalComponent.tsx"],"names":[],"mappings":";AA0EA,MAAM,0BAA0B,GAAG,CAAC,EAClC,WAAW,EACX,cAAc,EACd,gBAAgB,GAAG,KAAK,GAKzB,EAAE,EAAE;IACH,IAAI,CAAC,gBAAgB,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,QAAQ,KAAK,YAAY;QAC/F,OAAO,IAAI,CAAC;IAEd,OAAO,CACL,eACE,KAAK,EAAE;YACL,MAAM,EAAE,kBAAkB;YAC1B,UAAU,EAAE,SAAS;YACrB,OAAO,EAAE,MAAM;YACf,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,KAAK;SACpB,aAED,aAAI,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,gDAAsC,EAC7F,eAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,aAClC,wBACE,wDAAyC,OAAE,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,IACzE,EACJ,wBACE,sDAAuC,OAAE,WAAW,CAAC,EAAE,IACrD,E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AErC,CAAC,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAChD,MAAM,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,GAAG,cAAc,CAAC;IAE/E,MAAM,OAAO,GAAG,4BAA4B,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAEvE,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,MAAM,GAAG,KAAC,OAAO,IAAC,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,KAAM,KAAK,GAAI,CAAC;QAEhG,OAAO,MAAM,CAAC;IAChB,CAAC;IAGD,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;IACjE,OAAO,CAAC,GAAG,CACT,6CAA6C,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,WAAW,CAAC,EAAE,qBAAqB,EACzH,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CACzB,CAAC;IAGF,MAAM,eAAe,GACnB,qBAAqB;QACrB,CAAC,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,QAAQ,KAAK,aAAa,CAAC,CAAC;IAE9E,MAAM,MAAM,GAAG,CACb,4BACG,eAAe,IAAI,CAClB,KAAC,0BAA0B,IACzB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,qBAAqB,GACvC,CACH,GACA,CACJ,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IAnalyticsContext, IExternalVideo } from '@se-studio/core-data-types';
|
|
2
|
+
import type { IVideoProps } from './Video';
|
|
3
|
+
declare function ExternalVideoComponent({ video, autoPlay, loop, fullPlayer, priority, analyticsContext, componentLabel, ...props }: {
|
|
4
|
+
video: IExternalVideo;
|
|
5
|
+
analyticsContext: IAnalyticsContext | null | undefined;
|
|
6
|
+
componentLabel: string | null | undefined;
|
|
7
|
+
} & IVideoProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ExternalVideoComponent;
|
|
9
|
+
//# sourceMappingURL=ExternalVideoComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalVideoComponent.d.ts","sourceRoot":"","sources":["../../src/components/ExternalVideoComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAkB3C,iBAAS,sBAAsB,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,UAAiB,EACjB,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,GAAG,KAAK,EACT,EAAE;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC;IACvD,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,GAAG,WAAW,2CAsCd;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import ExternalVimeoEmbed from './ExternalVimeoEmbed';
|
|
3
|
+
import { ExternalYoutubeEmbed } from './ExternalYouTubeEmbed';
|
|
4
|
+
function tryGetYouTubeId(url) {
|
|
5
|
+
if (!url.includes('youtube.com')) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
const match = url.match(/v=([^&]+)/);
|
|
9
|
+
return match ? match[1] : null;
|
|
10
|
+
}
|
|
11
|
+
function tryGetVimeoId(url) {
|
|
12
|
+
if (!url.includes('vimeo.com')) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
const match = url.match(/vimeo\.com\/(?:video\/)?(\d+)/);
|
|
16
|
+
return match ? match[1] : null;
|
|
17
|
+
}
|
|
18
|
+
function ExternalVideoComponent({ video, autoPlay, loop, fullPlayer = true, priority, analyticsContext, componentLabel, ...props }) {
|
|
19
|
+
const realAutoPlay = autoPlay ?? video.autoPlay ?? undefined;
|
|
20
|
+
const realLoop = loop ?? video.loop ?? undefined;
|
|
21
|
+
const youTubeId = tryGetYouTubeId(video.external);
|
|
22
|
+
if (youTubeId) {
|
|
23
|
+
return (_jsx(ExternalYoutubeEmbed, { video: video, autoPlay: realAutoPlay, loop: realLoop, youTubeId: youTubeId, analyticsContext: analyticsContext, componentLabel: componentLabel, ...props }));
|
|
24
|
+
}
|
|
25
|
+
const vimeoId = tryGetVimeoId(video.external);
|
|
26
|
+
if (vimeoId) {
|
|
27
|
+
return (_jsx(ExternalVimeoEmbed, { video: video, autoPlay: realAutoPlay, loop: realLoop, vimeoId: vimeoId, analyticsContext: analyticsContext, componentLabel: componentLabel, ...props }));
|
|
28
|
+
}
|
|
29
|
+
return (_jsxs("div", { className: props.className, style: props.style, children: ["Video Component", _jsxs("pre", { children: [JSON.stringify(video, null, 2), " "] })] }));
|
|
30
|
+
}
|
|
31
|
+
export default ExternalVideoComponent;
|
|
32
|
+
//# sourceMappingURL=ExternalVideoComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalVideoComponent.js","sourceRoot":"","sources":["../../src/components/ExternalVideoComponent.tsx"],"names":[],"mappings":";AACA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,SAAS,eAAe,CAAC,GAAW;IAClC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACrC,OAAO,KAAK,CAAC,CAAC,CAAC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AAgB,EAClC,cAAc,EAAE,cAAc,KAC1B,KAAK,GACT,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,gCAEjD,0BAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,SAAQ,IACxC,CACP,CAAC;AACJ,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IAnalyticsContext, IExternalVideo } from '@se-studio/core-data-types';
|
|
2
|
+
import type { IVideoProps } from './Video';
|
|
3
|
+
declare const ExternalVideoServer: React.FC<{
|
|
4
|
+
video: IExternalVideo;
|
|
5
|
+
analyticsContext: IAnalyticsContext | null | undefined;
|
|
6
|
+
componentLabel: string | null | undefined;
|
|
7
|
+
} & IVideoProps>;
|
|
8
|
+
export default ExternalVideoServer;
|
|
9
|
+
//# sourceMappingURL=ExternalVideoServer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalVideoServer.d.ts","sourceRoot":"","sources":["../../src/components/ExternalVideoServer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAqB3C,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CACjC;IACE,KAAK,EAAE,cAAc,CAAC;IACtB,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC;IACvD,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,GAAG,WAAW,CAKhB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { extract } from '@extractus/oembed-extractor';
|
|
3
|
+
import ExternalVideoComponent from './ExternalVideoComponent';
|
|
4
|
+
async function tryExtractVideoData(id, url) {
|
|
5
|
+
if (url) {
|
|
6
|
+
try {
|
|
7
|
+
const oembed = await extract(url);
|
|
8
|
+
if (oembed.type === 'video') {
|
|
9
|
+
return oembed;
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
catch (_error) {
|
|
14
|
+
console.log(`Error extracting video for id: ${id}, url: ${url}`);
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
const ExternalVideoServer = async ({ video, ...props }) => {
|
|
21
|
+
const embed = await tryExtractVideoData(video.id, video.external);
|
|
22
|
+
const updatedVideo = { ...video, embed };
|
|
23
|
+
return _jsx(ExternalVideoComponent, { video: updatedVideo, ...props });
|
|
24
|
+
};
|
|
25
|
+
export default ExternalVideoServer;
|
|
26
|
+
//# sourceMappingURL=ExternalVideoServer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalVideoServer.js","sourceRoot":"","sources":["../../src/components/ExternalVideoServer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAsB,MAAM,6BAA6B,CAAC;AAE1E,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAG9D,KAAK,UAAU,mBAAmB,CAChC,EAAU,EACV,GAAmB;IAEnB,IAAI,GAAG,EAAE,CAAC;QACR,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;YAClC,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;gBAC5B,OAAO,MAAuB,CAAC;YACjC,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,UAAU,GAAG,EAAE,CAAC,CAAC;YACjE,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,mBAAmB,GAMrB,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAChC,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAClE,MAAM,YAAY,GAAmB,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC;IACzD,OAAO,KAAC,sBAAsB,IAAC,KAAK,EAAE,YAAY,KAAM,KAAK,GAAI,CAAC;AACpE,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAnalyticsContext, IExternalVideo } from '@se-studio/core-data-types';
|
|
2
|
+
import type { IVideoProps } from './Video';
|
|
3
|
+
export declare function ExternalVimeoEmbed({ video, style, className, vimeoId, analyticsContext, componentLabel, autoPlay, loop, ...props }: {
|
|
4
|
+
video: IExternalVideo;
|
|
5
|
+
vimeoId: string;
|
|
6
|
+
analyticsContext: IAnalyticsContext | null | undefined;
|
|
7
|
+
componentLabel: string | null | undefined;
|
|
8
|
+
} & IVideoProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default ExternalVimeoEmbed;
|
|
10
|
+
//# sourceMappingURL=ExternalVimeoEmbed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalVimeoEmbed.d.ts","sourceRoot":"","sources":["../../src/components/ExternalVimeoEmbed.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3C,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,KAAK,EACL,SAAS,EACT,OAAO,EACP,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,IAAI,EACJ,GAAG,KAAK,EACT,EAAE;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC;IACvD,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,GAAG,WAAW,2CAoCd;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { calculateCropDetails } from './Visual';
|
|
5
|
+
export function ExternalVimeoEmbed({ video, style, className, vimeoId, analyticsContext, componentLabel, autoPlay, loop, ...props }) {
|
|
6
|
+
const cropProperties = calculateCropDetails(video);
|
|
7
|
+
const embed = video.embed;
|
|
8
|
+
const fullStyle = {
|
|
9
|
+
...style,
|
|
10
|
+
...cropProperties,
|
|
11
|
+
aspectRatio: embed ? `${embed.width / embed.height}` : undefined,
|
|
12
|
+
};
|
|
13
|
+
return (_jsx("div", { className: className, style: fullStyle, children: _jsx("lite-vimeo", { videoid: vimeoId, title: video.name, className: "h-full w-full", autoload: true, autoplay: autoPlay, ...props, children: video.poster && (_jsx(Image, { slot: "image", src: video.poster, alt: video.name, width: video.width ?? 1920, height: video.height ?? 1080, style: {
|
|
14
|
+
objectFit: 'cover',
|
|
15
|
+
}, sizes: "100vw", className: "h-full w-full" })) }) }));
|
|
16
|
+
}
|
|
17
|
+
export default ExternalVimeoEmbed;
|
|
18
|
+
//# sourceMappingURL=ExternalVimeoEmbed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalVimeoEmbed.js","sourceRoot":"","sources":["../../src/components/ExternalVimeoEmbed.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;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|
2
|
+
import type { IVideoProps } from './Video';
|
|
3
|
+
export declare function ExternalYoutubeEmbed({ video, style, className, youTubeId, analyticsContext, componentLabel, autoPlay, loop, ...props }: {
|
|
4
|
+
video: IExternalVideo;
|
|
5
|
+
youTubeId: string;
|
|
6
|
+
analyticsContext: IAnalyticsContext | null | undefined;
|
|
7
|
+
componentLabel: string | null | undefined;
|
|
8
|
+
} & IVideoProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=ExternalYouTubeEmbed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalYouTubeEmbed.d.ts","sourceRoot":"","sources":["../../src/components/ExternalYouTubeEmbed.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3C,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,KAAK,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,IAAI,EACJ,GAAG,KAAK,EACT,EAAE;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC;IACvD,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,GAAG,WAAW,2CAsCd"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { calculateCropDetails } from './Visual';
|
|
5
|
+
export function ExternalYoutubeEmbed({ video, style, className, youTubeId, analyticsContext, componentLabel, autoPlay, loop, ...props }) {
|
|
6
|
+
const embed = video.embed;
|
|
7
|
+
const cropProperties = calculateCropDetails(video);
|
|
8
|
+
const fullStyle = {
|
|
9
|
+
...style,
|
|
10
|
+
...cropProperties,
|
|
11
|
+
aspectRatio: embed ? `${embed.width / embed.height}` : undefined,
|
|
12
|
+
};
|
|
13
|
+
return (_jsx("div", { className: className, style: fullStyle, children: _jsx("lite-youtube", { videoId: youTubeId, title: video.name, posterQuality: "maxresdefault", className: "h-full w-full", params: "rel=0", autoload: true, autopause: true, ...props, children: video.poster && (_jsx(Image, { slot: "image", src: video.poster, alt: video.name, width: video.width ?? 1920, height: video.height ?? 1080, style: {
|
|
14
|
+
objectFit: 'cover',
|
|
15
|
+
}, sizes: "100vw", className: "h-full w-full" })) }) }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ExternalYouTubeEmbed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExternalYouTubeEmbed.js","sourceRoot":"","sources":["../../src/components/ExternalYouTubeEmbed.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,MAAM,YAAY,CAAC;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,UAAU,oBAAoB,CAAC,EACnC,KAAK,EACL,KAAK,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,IAAI,EACJ,GAAG,KAAK,EAMK;IACb,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1B,MAAM,cAAc,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACnD,MAAM,SAAS,GAAkB;QAC/B,GAAG,KAAK;QACR,GAAG,cAAc;QACjB,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS;KACjE,CAAC;IAEF,OAAO,CACL,cAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,YACzC,uBACE,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,KAAK,CAAC,IAAI,EACjB,aAAa,EAAC,eAAe,EAC7B,SAAS,EAAC,eAAe,EACzB,MAAM,EAAC,OAAO,EACd,QAAQ,QACR,SAAS,WACL,KAAK,YAER,KAAK,CAAC,MAAM,IAAI,CACf,KAAC,KAAK,IACJ,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,KAAK,CAAC,MAAM,EACjB,GAAG,EAAE,KAAK,CAAC,IAAI,EACf,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI,EAC1B,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,IAAI,EAC5B,KAAK,EAAE;oBACL,SAAS,EAAE,OAAO;iBACnB,EACD,KAAK,EAAC,OAAO,EACb,SAAS,EAAC,eAAe,GACzB,CACH,GACY,GACX,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { IAnalyticsContext, ILocalVideo } from '@se-studio/core-data-types';
|
|
2
2
|
import type { IVideoProps } from './Video';
|
|
3
|
-
declare const
|
|
3
|
+
declare const LocalVideoServer: React.FC<{
|
|
4
4
|
video: ILocalVideo;
|
|
5
5
|
analyticsContext: IAnalyticsContext | null | undefined;
|
|
6
6
|
componentLabel: string | null | undefined;
|
|
7
7
|
} & IVideoProps>;
|
|
8
|
-
export default
|
|
9
|
-
//# sourceMappingURL=
|
|
8
|
+
export default LocalVideoServer;
|
|
9
|
+
//# sourceMappingURL=LocalVideoServer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalVideoServer.d.ts","sourceRoot":"","sources":["../../src/components/LocalVideoServer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAqC3C,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAC9B;IACE,KAAK,EAAE,WAAW,CAAC;IACnB,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC;IACvD,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,GAAG,WAAW,CAoChB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -23,9 +23,9 @@ async function tryGetVideoMetadata(url) {
|
|
|
23
23
|
}
|
|
24
24
|
return undefined;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const LocalVideoServer = async ({ video, visualSizes, autoPlay, loop, muted, controls, style, poster, loading, priority, noPoster, }) => {
|
|
27
27
|
const videoMetadata = await tryGetVideoMetadata(video.preview.videoUrl);
|
|
28
28
|
return (_jsx(ImageKitVideo, { url: video.preview.videoUrl, videoPrefix: video.videoPrefix, width: videoMetadata?.width, height: videoMetadata?.height, visualSizes: visualSizes, autoPlay: video.autoPlay ?? autoPlay, loop: video.loop ?? loop, muted: muted, controls: !video.hideControls && controls, style: style, poster: video.poster ?? poster, dontCrop: video.dontCrop, verticalCropPosition: video.verticalCropPosition, horizontalCropPosition: video.horizontalCropPosition, loading: loading, priority: priority, noPoster: noPoster }));
|
|
29
29
|
};
|
|
30
|
-
export default
|
|
31
|
-
//# sourceMappingURL=
|
|
30
|
+
export default LocalVideoServer;
|
|
31
|
+
//# sourceMappingURL=LocalVideoServer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalVideoServer.js","sourceRoot":"","sources":["../../src/components/LocalVideoServer.tsx"],"names":[],"mappings":";AACA,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAYlD,KAAK,UAAU,mBAAmB,CAAC,GAAW;IAC5C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;IAC7C,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;IACpD,IAAI,CAAC,WAAW,IAAI,CAAC,UAAU,EAAE,C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,WAAW,EACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,QAAQ,EACpC,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,IAAI,EACxB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,KAAK,CAAC,YAAY,IAAI,QAAQ,EACzC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,MAAM,EAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,oBAAoB,EAAE,KAAK,CAAC,oBAAoB,EAChD,sBAAsB,EAAE,KAAK,CAAC,sBAAsB,EACpD,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoComponent.d.ts","sourceRoot":"","sources":["../../src/components/VideoComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"VideoComponent.d.ts","sourceRoot":"","sources":["../../src/components/VideoComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,WAAW,EAGjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,iBAAS,cAAc,CAAC,EACtB,KAAK,EACL,GAAG,KAAK,EACT,EAAE;IACD,KAAK,EAAE,WAAW,GAAG,cAAc,GAAG,UAAU,CAAC;IACjD,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAAC;IACvD,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,GAAG,WAAW,2CAcd;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { isLocalVideo, } from '@se-studio/core-data-types';
|
|
3
|
-
import
|
|
2
|
+
import { isExternalVideo, isLocalVideo, } from '@se-studio/core-data-types';
|
|
3
|
+
import ExternalVideoServer from './ExternalVideoServer';
|
|
4
|
+
import LocalVideoServer from './LocalVideoServer';
|
|
4
5
|
function VideoComponent({ video, ...props }) {
|
|
5
6
|
if (isLocalVideo(video)) {
|
|
6
|
-
return _jsx(
|
|
7
|
+
return _jsx(LocalVideoServer, { video: video, ...props });
|
|
8
|
+
}
|
|
9
|
+
if (isExternalVideo(video)) {
|
|
10
|
+
return _jsx(ExternalVideoServer, { video: video, ...props });
|
|
7
11
|
}
|
|
8
12
|
return (_jsxs("div", { className: props.className, style: props.style, children: ["Video Component", _jsxs("pre", { children: [JSON.stringify(video, null, 2), " "] })] }));
|
|
9
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoComponent.js","sourceRoot":"","sources":["../../src/components/VideoComponent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAKL,YAAY,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"VideoComponent.js","sourceRoot":"","sources":["../../src/components/VideoComponent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAKL,eAAe,EACf,YAAY,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAGlD,SAAS,cAAc,CAAC,EACtB,KAAK,EACL,GAAG,KAAK,EAKK;IACb,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,KAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,KAAM,KAAK,GAAI,CAAC;IACvD,CAAC;IAED,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,KAAC,mBAAmB,IAAC,KAAK,EAAE,KAAK,KAAM,KAAK,GAAI,CAAC;IAC1D,CAAC;IACD,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,gCAEjD,0BAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,SAAQ,IACxC,CACP,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualComponent.d.ts","sourceRoot":"","sources":["../../src/components/VisualComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"VisualComponent.d.ts","sourceRoot":"","sources":["../../src/components/VisualComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,YAAY,CAqD/D,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { UnsupportedWarning } from '../utils/UnsupportedWarning';
|
|
3
|
-
import
|
|
3
|
+
import AnimationServer from './AnimationServer';
|
|
4
4
|
import ImageComponent from './ImageComponent';
|
|
5
5
|
import VideoComponent from './VideoComponent';
|
|
6
6
|
export const Visual = ({ visual, muted, controls, autoPlay, visualSizes, fullPlayer, loop, loopDelay, analyticsContext, componentLabel, ...props }) => {
|
|
7
7
|
const { animation, image, video } = visual;
|
|
8
8
|
if (animation) {
|
|
9
|
-
return (_jsx(
|
|
9
|
+
return (_jsx(AnimationServer, { animation: animation, autoPlay: autoPlay, loop: loop, loopDelay: loopDelay, analyticsContext: analyticsContext, componentLabel: componentLabel, ...props }));
|
|
10
10
|
}
|
|
11
11
|
if (video) {
|
|
12
12
|
return (_jsx(VideoComponent, { video: video, autoPlay: autoPlay, muted: muted, controls: controls, visualSizes: visualSizes, fullPlayer: fullPlayer, loop: loop, analyticsContext: analyticsContext, componentLabel: componentLabel, ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualComponent.js","sourceRoot":"","sources":["../../src/components/VisualComponent.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"VisualComponent.js","sourceRoot":"","sources":["../../src/components/VisualComponent.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAG9C,MAAM,CAAC,MAAM,MAAM,GAAiD,CAAC,EACnE,MAAM,EACN,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,UAAU,EACV,IAAI,EACJ,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAC3C,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CACL,KAAC,eAAe,IACd,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,KAC1B,KAAK,GACT,CACH,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CACL,KAAC,cAAc,IACb,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,KAC1B,KAAK,GACT,CACH,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,KAAM,KAAK,GAAI,CAAC;IAC/E,CAAC;IAED,OAAO,CACL,KAAC,kBAAkB,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,8CAE7C,CACtB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../src/components/svg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AA6D3C,wBAAgB,gDAAgD,CAC9D,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,EACtC,cAAc,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,GAC/C,MAAM,CAIR"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
function convertObjectPosition(objectPosition) {
|
|
2
|
+
if (typeof objectPosition === 'string') {
|
|
3
|
+
const split = objectPosition.split(' ');
|
|
4
|
+
if (split.length === 1) {
|
|
5
|
+
switch (split[0]) {
|
|
6
|
+
case 'top':
|
|
7
|
+
return 'xMidYMin';
|
|
8
|
+
case 'bottom':
|
|
9
|
+
return 'xMidYMax';
|
|
10
|
+
case 'left':
|
|
11
|
+
return 'xMinYMid';
|
|
12
|
+
case 'right':
|
|
13
|
+
return 'xMaxYMax';
|
|
14
|
+
default:
|
|
15
|
+
return 'xMidYMid';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (split.length === 2) {
|
|
19
|
+
let first = 'Mid';
|
|
20
|
+
let firstIsX = true;
|
|
21
|
+
let second = 'Mid';
|
|
22
|
+
for (let i = 0; i < split.length; i++) {
|
|
23
|
+
let isX = true;
|
|
24
|
+
let value;
|
|
25
|
+
switch (split[i]) {
|
|
26
|
+
case 'top':
|
|
27
|
+
value = 'Min';
|
|
28
|
+
isX = false;
|
|
29
|
+
break;
|
|
30
|
+
case 'bottom':
|
|
31
|
+
value = 'Max';
|
|
32
|
+
isX = false;
|
|
33
|
+
break;
|
|
34
|
+
case 'left':
|
|
35
|
+
value = 'Min';
|
|
36
|
+
break;
|
|
37
|
+
case 'right':
|
|
38
|
+
value = 'Max';
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
value = 'Mid';
|
|
42
|
+
}
|
|
43
|
+
if (i === 0) {
|
|
44
|
+
first = value;
|
|
45
|
+
firstIsX = !isX;
|
|
46
|
+
}
|
|
47
|
+
if (i === 1) {
|
|
48
|
+
second = value;
|
|
49
|
+
if (isX)
|
|
50
|
+
firstIsX = false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const position = `x${firstIsX ? first : second}Y${firstIsX ? second : first}`;
|
|
54
|
+
return position;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return 'xMidYMid';
|
|
58
|
+
}
|
|
59
|
+
export function convertObjectFitAndPositionToPreserveAspectRatio(objectFit, objectPosition) {
|
|
60
|
+
const sliceOrMeet = objectFit === 'cover' ? 'slice' : 'meet';
|
|
61
|
+
const position = convertObjectPosition(objectPosition);
|
|
62
|
+
return `${position} ${sliceOrMeet}`;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.js","sourceRoot":"","sources":["../../src/components/svg.ts"],"names":[],"mappings":"AAEA,SAAS,qBAAqB,CAAC,cAAgD;IAC7E,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,QAAQ,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjB,KAAK,KAAK;oBACR,OAAO,UAAU,CAAC;gBACpB,KAAK,QAAQ;oBACX,OAAO,UAAU,CAAC;gBACpB,KAAK,MAAM;oBACT,OAAO,UAAU,CAAC;gBACpB,KAAK,OAAO;oBACV,OAAO,UAAU,CAAC;gBACpB;oBACE,OAAO,UAAU,CAAC;YACtB,CAAC;QACH,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,IAAI,KAAK,GAAG,KAAK,CAAC;YAClB,IAAI,QAAQ,GAAG,IAAI,CAAC;YACpB,IAAI,MAAM,GAAG,KAAK,CAAC;YACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACtC,IAAI,GAAG,GAAG,IAAI,CAAC;gBACf,IAAI,KAAa,CAAC;gBAClB,QAAQ,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;oBACjB,KAAK,KAAK;wBACR,KAAK,GAAG,KAAK,CAAC;wBACd,GAAG,GAAG,KAAK,CAAC;wBACZ,MAAM;o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O,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,KAAK,iBAAiB,EAAO,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,cAAc,CAAC,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"RtfOrString.d.ts","sourceRoot":"","sources":["../../src/elements/RtfOrString.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,KAAK,iBAAiB,EAAO,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,CAiCA,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { RTF } from '@se-studio/core-ui';
|
|
3
|
-
export const RtfOrString = ({ id, content, className, style, rendererConfig, contentContext, ...other }) => {
|
|
3
|
+
export const RtfOrString = ({ id, content, className, style, rendererConfig, contentContext, embeddedPositionClassName = 'w-full col-span-full', ...other }) => {
|
|
4
4
|
if (typeof content === 'string') {
|
|
5
5
|
return (_jsx("div", { className: className, style: style, ...other, children: content }));
|
|
6
6
|
}
|
|
7
7
|
const json = content.json;
|
|
8
8
|
if (json) {
|
|
9
|
-
return (_jsx(RTF, { content: json, className: className, style: style, rendererConfig: rendererConfig, contentContext: contentContext, ...other }));
|
|
9
|
+
return (_jsx(RTF, { content: json, className: className, style: style, rendererConfig: rendererConfig, contentContext: contentContext, embeddedPositionClassName: embeddedPositionClassName, ...other }));
|
|
10
10
|
}
|
|
11
11
|
return null;
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RtfOrString.js","sourceRoot":"","sources":["../../src/elements/RtfOrString.tsx"],"names":[],"mappings":";AAEA,OAAO,EAA0B,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAGjE,MAAM,CAAC,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"RtfOrString.js","sourceRoot":"","sources":["../../src/elements/RtfOrString.tsx"],"names":[],"mappings":";AAEA,OAAO,EAA0B,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAGjE,MAAM,CAAC,MAAM,WAAW,GAQnB,CAAC,EACJ,EAAE,EACF,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,cAAc,EACd,yBAAyB,GAAG,sBAAsB,EAClD,GAAG,KAAK,EACT,EAA6B,EAAE;IAC9B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,CACL,cAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,YAC/C,OAAO,GACJ,CACP,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAI,OAA+B,CAAC,IAAI,CAAC;IACnD,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,CACL,KAAC,GAAG,IACF,OAAO,EAAE,IAAI,EACb,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,EAC9B,yBAAyB,EAAE,yBAAyB,KAChD,KAAK,GACT,CACH,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
export type { CmsRendererConfig, CmsRendererTypes } from './CmsRendererConfig';
|
|
2
2
|
export { ClientMonitor } from './components/ClientMonitor.js';
|
|
3
|
-
export type { CollectionMap, CollectionRenderer } from './components/CmsCollection';
|
|
3
|
+
export type { CollectionMap, CollectionRenderer, CollectionRendererProps, EmbeddedCollectionMap, EmbeddedCollectionRenderer, } from './components/CmsCollection';
|
|
4
4
|
export { CmsCollection } from './components/CmsCollection';
|
|
5
|
-
export type { ComponentMap, ComponentRenderer } from './components/CmsComponent';
|
|
5
|
+
export type { ComponentMap, ComponentRenderer, ComponentRendererProps, EmbeddedComponentMap, EmbeddedComponentRenderer, } from './components/CmsComponent';
|
|
6
6
|
export { CmsComponent } from './components/CmsComponent';
|
|
7
7
|
export type { InternalLinkRenderer, VisualComponentRenderer, } from './components/CmsContent';
|
|
8
8
|
export { CmsContent } from './components/CmsContent';
|
|
9
|
-
export
|
|
9
|
+
export { CmsEmbeddedContent } from './components/CmsEmbeddedContent';
|
|
10
|
+
export type { EmbeddedExternalComponentMap, EmbeddedExternalComponentRenderer, ExternalComponentMap, ExternalComponentRenderer, ExternalComponentRendererProps, } from './components/CmsExternalComponent';
|
|
10
11
|
export { Preview } from './components/Preview.js';
|
|
11
12
|
export type { IVisualProps } from './components/Visual';
|
|
12
13
|
export { calculateCropDetails, calculateImagePriority, calculateImageWidthStyleVariable, } from './components/Visual';
|
|
@@ -14,10 +15,6 @@ export { Visual } from './components/VisualComponent';
|
|
|
14
15
|
export { RtfOrString } from './elements/RtfOrString';
|
|
15
16
|
export { UtmLink } from './elements/UtmLink';
|
|
16
17
|
export { UtmLinkOrDiv } from './elements/UtmLinkOrDiv';
|
|
17
|
-
export { BuildEmbedFromCollectionConfig, BuildEmbedFromComponentConfig, } from './embeddable/BuildEmbed';
|
|
18
|
-
export type { IEmbeddableCollectionContext, IEmbeddableComponentContext, } from './embeddable/EmbeddableContext';
|
|
19
|
-
export type { EmbeddableCollectionMap, EmbeddableComponentMap, } from './embeddable/EmbeddableMaps';
|
|
20
|
-
export { isCollectionEmbeddable, isComponentEmbeddable, } from './embeddable/EmbeddableMaps';
|
|
21
18
|
export { BackgroundMedia } from './framework/BackgroundMedia';
|
|
22
19
|
export { ComponentErrorIndicator } from './framework/ComponentErrorIndicator';
|
|
23
20
|
export { showComponentError, showInlineError } from './framework/componentErrors';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,2BAA2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AY,EACV,YAAY,EACZ,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,sBAAsB,EACtB,iCAAiC,EACjC,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,14 +2,13 @@ export { ClientMonitor } from './components/ClientMonitor.js';
|
|
|
2
2
|
export { CmsCollection } from './components/CmsCollection';
|
|
3
3
|
export { CmsComponent } from './components/CmsComponent';
|
|
4
4
|
export { CmsContent } from './components/CmsContent';
|
|
5
|
+
export { CmsEmbeddedContent } from './components/CmsEmbeddedContent';
|
|
5
6
|
export { Preview } from './components/Preview.js';
|
|
6
7
|
export { calculateCropDetails, calculateImagePriority, calculateImageWidthStyleVariable, } from './components/Visual';
|
|
7
8
|
export { Visual } from './components/VisualComponent';
|
|
8
9
|
export { RtfOrString } from './elements/RtfOrString';
|
|
9
10
|
export { UtmLink } from './elements/UtmLink';
|
|
10
11
|
export { UtmLinkOrDiv } from './elements/UtmLinkOrDiv';
|
|
11
|
-
export { BuildEmbedFromCollectionConfig, BuildEmbedFromComponentConfig, } from './embeddable/BuildEmbed';
|
|
12
|
-
export { isCollectionEmbeddable, isComponentEmbeddable, } from './embeddable/EmbeddableMaps';
|
|
13
12
|
export { BackgroundMedia } from './framework/BackgroundMedia';
|
|
14
13
|
export { ComponentErrorIndicator } from './framework/ComponentErrorIndicator';
|
|
15
14
|
export { showComponentError, showInlineError } from './framework/componentErrors';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAS9D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKzD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AASrE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGlD,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,gCAAgC,GACjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAYhC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/rtf/rtf.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type RTFProps = {
|
|
|
6
6
|
content: Document;
|
|
7
7
|
rendererConfig?: CmsRendererConfig;
|
|
8
8
|
contentContext?: IContentContext;
|
|
9
|
+
embeddedPositionClassName?: string;
|
|
9
10
|
} & Omit<HTMLAttributes<HTMLElement>, 'content'>;
|
|
10
|
-
export declare function RTF({ content, className, style, rendererConfig, contentContext, ...other }: RTFProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function RTF({ content, className, style, rendererConfig, contentContext, embeddedPositionClassName, ...other }: RTFProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
//# sourceMappingURL=rtf.d.ts.map
|
package/dist/rtf/rtf.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rtf.d.ts","sourceRoot":"","sources":["../../src/rtf/rtf.tsx"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,QAAQ,EAGd,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAW,MAAM,4BAA4B,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"rtf.d.ts","sourceRoot":"","sources":["../../src/rtf/rtf.tsx"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,QAAQ,EAGd,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAW,MAAM,4BAA4B,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA8F9D,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,QAAQ,CAAC;IAClB,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAC;AAEjD,wBAAgB,GAAG,CAAC,EAClB,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,GAAG,KAAK,EACT,EAAE,QAAQ,2CAOV"}
|