@bravostudioai/react 0.1.42 → 0.1.45
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/components.js +298 -283
- package/dist/components.js.map +1 -1
- package/dist/src/components.d.ts.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/src/components.tsx +40 -4
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/components.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/components.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,MAAM,OAAO,CAAC;AAkvGf,QAAA,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAwDxD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "0.1.
|
|
1
|
+
export declare const PACKAGE_VERSION = "0.1.45";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = \"0.1.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = \"0.1.45\";\n"],"names":["PACKAGE_VERSION"],"mappings":"AAAO,MAAMA,IAAkB;"}
|
package/package.json
CHANGED
package/src/components.tsx
CHANGED
|
@@ -145,6 +145,14 @@ const useEncoreStyle = (
|
|
|
145
145
|
const containerHeight =
|
|
146
146
|
containerContext.dimensions?.height ?? viewport.height;
|
|
147
147
|
|
|
148
|
+
// DEBUG: Trace GRID mode
|
|
149
|
+
if (style.layout?.mode === "GRID") {
|
|
150
|
+
console.log("[DEBUG] GRID MODE DETECTED", {
|
|
151
|
+
id: "unknown", // style object doesn't have ID context here easily without prop drill
|
|
152
|
+
layout: style.layout,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
148
156
|
// Check if this node has layout sizing directives (even if mode is null)
|
|
149
157
|
const hasLayoutSizing =
|
|
150
158
|
style.layout?.layoutSizingHorizontal || style.layout?.layoutSizingVertical;
|
|
@@ -285,8 +293,9 @@ const useEncoreStyle = (
|
|
|
285
293
|
return mapping[figmaValue] || figmaValue.toLowerCase().replace(/_/g, "-");
|
|
286
294
|
};
|
|
287
295
|
|
|
288
|
-
if (style.layout.mode == "HORIZONTAL") {
|
|
296
|
+
if (style.layout.mode == "HORIZONTAL" || style.layout.mode == "GRID") {
|
|
289
297
|
result.flexDirection = "row";
|
|
298
|
+
|
|
290
299
|
if (style.layout.flexWrap) {
|
|
291
300
|
result.flexWrap = style.layout.flexWrap;
|
|
292
301
|
}
|
|
@@ -306,7 +315,12 @@ const useEncoreStyle = (
|
|
|
306
315
|
// Set flexWrap: if wrap is explicitly "NO_WRAP", use "nowrap", otherwise default to "wrap" for layouts that need it
|
|
307
316
|
// Set flexWrap: default to "nowrap" to match Figma's default behavior
|
|
308
317
|
// Only wrap if explicitly requested
|
|
309
|
-
|
|
318
|
+
// Only wrap if explicitly requested or if mode is GRID
|
|
319
|
+
if (
|
|
320
|
+
style.layout.wrap === "WRAP" ||
|
|
321
|
+
style.layout.flexWrap === "wrap" ||
|
|
322
|
+
style.layout.mode === "GRID"
|
|
323
|
+
) {
|
|
310
324
|
result.flexWrap = "wrap";
|
|
311
325
|
} else if (style.layout.flexWrap) {
|
|
312
326
|
result.flexWrap = style.layout.flexWrap;
|
|
@@ -368,7 +382,12 @@ const useEncoreStyle = (
|
|
|
368
382
|
}
|
|
369
383
|
|
|
370
384
|
if (style.layout?.layoutSizingHorizontal === "FILL") {
|
|
371
|
-
|
|
385
|
+
// Only set width 100% if NOT in a flex container.
|
|
386
|
+
// In a flex container, 'FILL' should be handled by flex-grow (Row) or align-self (Col).
|
|
387
|
+
// Setting width 100% explicitly forces it to take full width which breaks horizontal layouts.
|
|
388
|
+
if (!parentIsFlex) {
|
|
389
|
+
result.width = "100%";
|
|
390
|
+
}
|
|
372
391
|
}
|
|
373
392
|
|
|
374
393
|
if (style.layout?.layoutSizingHorizontal === "FIXED") {
|
|
@@ -1932,10 +1951,26 @@ const ContainerComponent = ({
|
|
|
1932
1951
|
debug: false,
|
|
1933
1952
|
});
|
|
1934
1953
|
|
|
1954
|
+
if (id === "01KF5PAFET1VY5E81B68GQ9BFQ") {
|
|
1955
|
+
console.log("[DEBUG] Embed Container Render", {
|
|
1956
|
+
id,
|
|
1957
|
+
style,
|
|
1958
|
+
computedStyle: style,
|
|
1959
|
+
layout: nodeData.style.layout,
|
|
1960
|
+
hasPositioning: !!nodeData.style.positioning,
|
|
1961
|
+
});
|
|
1962
|
+
// Force a simpler layout for debugging
|
|
1963
|
+
// style.position = 'relative';
|
|
1964
|
+
// style.zIndex = 1;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1935
1967
|
const isFlex = !!nodeData.style.layout?.mode;
|
|
1936
1968
|
// Determine flex direction for passing to children via context
|
|
1937
1969
|
const flexDirection =
|
|
1938
|
-
nodeData.style.layout?.mode === "HORIZONTAL"
|
|
1970
|
+
nodeData.style.layout?.mode === "HORIZONTAL" ||
|
|
1971
|
+
nodeData.style.layout?.mode === "GRID"
|
|
1972
|
+
? "row"
|
|
1973
|
+
: "column";
|
|
1939
1974
|
// Only set default 100% if we don't have explicit dimensions from layout.size
|
|
1940
1975
|
// Explicit dimensions are set by useEncoreStyle when layoutSizing is FIXED
|
|
1941
1976
|
const hasExplicitWidth = style.width !== undefined;
|
|
@@ -3266,6 +3301,7 @@ const EmbedComponent: React.FC<ComponentProps> = ({
|
|
|
3266
3301
|
flexDirection: "column",
|
|
3267
3302
|
// Reset positioning if provided by wrapper
|
|
3268
3303
|
position: "absolute",
|
|
3304
|
+
zIndex: 10,
|
|
3269
3305
|
}}
|
|
3270
3306
|
data-type="EmbedComponent"
|
|
3271
3307
|
data-id={id}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = "0.1.
|
|
1
|
+
export const PACKAGE_VERSION = "0.1.45";
|