@arkcit/engine-react 0.3.3 → 0.3.4
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/index.js +9 -0
- package/dist/rendering.js +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1294,6 +1294,11 @@ var configurePreviewLinkBehavior = (componentProps) => {
|
|
|
1294
1294
|
};
|
|
1295
1295
|
|
|
1296
1296
|
// src/rendering/finalizeRenderedNode.tsx
|
|
1297
|
+
var RESPONSIVE_MEDIA_NODE_TYPES = /* @__PURE__ */ new Set(["Image", "Video", "EmbeddedVideo", "Cover"]);
|
|
1298
|
+
var RESPONSIVE_MEDIA_CLASS_NAME = "max-md:!w-full max-md:![flex-basis:100%!important] max-md:!h-auto";
|
|
1299
|
+
var hasExplicitStudioSizing = (studioSizing) => Boolean(
|
|
1300
|
+
studioSizing && (studioSizing.widthPct !== null || studioSizing.heightPct !== null || studioSizing.heightPx !== null)
|
|
1301
|
+
);
|
|
1297
1302
|
var finalizeRenderedNode = ({
|
|
1298
1303
|
node,
|
|
1299
1304
|
children,
|
|
@@ -1305,6 +1310,10 @@ var finalizeRenderedNode = ({
|
|
|
1305
1310
|
plans: providedPlans,
|
|
1306
1311
|
dependencies
|
|
1307
1312
|
}) => {
|
|
1313
|
+
if (RESPONSIVE_MEDIA_NODE_TYPES.has(node.type) && hasExplicitStudioSizing(studioSizing)) {
|
|
1314
|
+
const currentClassName = typeof componentProps.className === "string" ? componentProps.className : "";
|
|
1315
|
+
componentProps.className = [currentClassName, RESPONSIVE_MEDIA_CLASS_NAME].filter(Boolean).join(" ");
|
|
1316
|
+
}
|
|
1308
1317
|
const plans = providedPlans != null ? providedPlans : dependencies.resolveFinalRenderPlan({
|
|
1309
1318
|
node,
|
|
1310
1319
|
componentProps,
|
package/dist/rendering.js
CHANGED
|
@@ -174,6 +174,11 @@ var materializeBoundTable = ({
|
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
// src/rendering/finalizeRenderedNode.tsx
|
|
177
|
+
var RESPONSIVE_MEDIA_NODE_TYPES = /* @__PURE__ */ new Set(["Image", "Video", "EmbeddedVideo", "Cover"]);
|
|
178
|
+
var RESPONSIVE_MEDIA_CLASS_NAME = "max-md:!w-full max-md:![flex-basis:100%!important] max-md:!h-auto";
|
|
179
|
+
var hasExplicitStudioSizing = (studioSizing) => Boolean(
|
|
180
|
+
studioSizing && (studioSizing.widthPct !== null || studioSizing.heightPct !== null || studioSizing.heightPx !== null)
|
|
181
|
+
);
|
|
177
182
|
var finalizeRenderedNode = ({
|
|
178
183
|
node,
|
|
179
184
|
children,
|
|
@@ -185,6 +190,10 @@ var finalizeRenderedNode = ({
|
|
|
185
190
|
plans: providedPlans,
|
|
186
191
|
dependencies
|
|
187
192
|
}) => {
|
|
193
|
+
if (RESPONSIVE_MEDIA_NODE_TYPES.has(node.type) && hasExplicitStudioSizing(studioSizing)) {
|
|
194
|
+
const currentClassName = typeof componentProps.className === "string" ? componentProps.className : "";
|
|
195
|
+
componentProps.className = [currentClassName, RESPONSIVE_MEDIA_CLASS_NAME].filter(Boolean).join(" ");
|
|
196
|
+
}
|
|
188
197
|
const plans = providedPlans != null ? providedPlans : dependencies.resolveFinalRenderPlan({
|
|
189
198
|
node,
|
|
190
199
|
componentProps,
|