@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.
@@ -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\n\n"],"names":["EncoreActionContext","React"],"mappings":";AAaA,MAAMA,IAAsBC,EAAM,cAAuC,CAAA,CAAE;"}
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;AA6hGf,QAAA,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAoDxD,CAAC;AAEF,eAAe,UAAU,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"}
@@ -3,6 +3,7 @@ export type EncoreActionPayload = {
3
3
  bravo: {
4
4
  cancel: () => void;
5
5
  action: any;
6
+ componentId?: string;
6
7
  };
7
8
  };
8
9
  type EncoreActionContextType = {
@@ -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;KACb,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"}
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bravostudioai/react",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -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;