@bravostudioai/react 0.1.13 → 0.1.14
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 +612 -596
- package/dist/components.js.map +1 -1
- package/dist/contexts/EncoreActionContext.js.map +1 -1
- package/dist/src/components.d.ts.map +1 -1
- package/dist/src/contexts/EncoreActionContext.d.ts +1 -0
- package/dist/src/contexts/EncoreActionContext.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components.tsx +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncoreActionContext.js","sources":["../../src/contexts/EncoreActionContext.ts"],"sourcesContent":["import React from \"react\";\n\nexport type EncoreActionPayload = {\n bravo: {\n cancel: () => void;\n action: any;\n };\n};\n\ntype EncoreActionContextType = {\n onAction?: (payload: EncoreActionPayload) => void | Promise<void>;\n};\n\nconst EncoreActionContext = React.createContext<EncoreActionContextType>({});\n\nexport default EncoreActionContext;\n
|
|
1
|
+
{"version":3,"file":"EncoreActionContext.js","sources":["../../src/contexts/EncoreActionContext.ts"],"sourcesContent":["import React from \"react\";\n\nexport type EncoreActionPayload = {\n bravo: {\n cancel: () => void;\n action: any;\n componentId?: string; // ID of the component that triggered the action\n };\n};\n\ntype EncoreActionContextType = {\n onAction?: (payload: EncoreActionPayload) => void | Promise<void>;\n};\n\nconst EncoreActionContext = React.createContext<EncoreActionContextType>({});\n\nexport default EncoreActionContext;\n"],"names":["EncoreActionContext","React"],"mappings":";AAcA,MAAMA,IAAsBC,EAAM,cAAuC,CAAA,CAAE;"}
|
|
@@ -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;AAwjGf,QAAA,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAoDxD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncoreActionContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/EncoreActionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,IAAI,CAAC;QACnB,MAAM,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"EncoreActionContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/EncoreActionContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,IAAI,CAAC;QACnB,MAAM,EAAE,GAAG,CAAC;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE,CAAC;AAEF,QAAA,MAAM,mBAAmB,wCAAmD,CAAC;AAE7E,eAAe,mBAAmB,CAAC"}
|
package/package.json
CHANGED
package/src/components.tsx
CHANGED
|
@@ -401,6 +401,12 @@ const useEncoreStyle = (
|
|
|
401
401
|
result.width = style.layout.size.x * scale;
|
|
402
402
|
}
|
|
403
403
|
|
|
404
|
+
// HUG sizing: explicitly do NOT set width
|
|
405
|
+
// Let flex layout determine width based on content
|
|
406
|
+
if (style.layout?.layoutSizingHorizontal === "HUG") {
|
|
407
|
+
// Don't set result.width
|
|
408
|
+
}
|
|
409
|
+
|
|
404
410
|
if (style.layout?.layoutSizingVertical === "FIXED") {
|
|
405
411
|
const scale = pageContext.scaleFactor ?? 1;
|
|
406
412
|
result.height = style.layout.size.y * scale;
|