@farcaster/snap-hono 2.0.5 → 2.0.6

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.
@@ -304,8 +304,8 @@ function renderElement(key, spec, accent) {
304
304
  const gapMap = isHorizontal ? hGap : vGap;
305
305
  const gapVal = gapMap[String(p.gap ?? "md")] ?? (isHorizontal ? "8px" : "16px");
306
306
  const dir = isHorizontal ? "row" : "column";
307
- const wrap = isHorizontal ? "flex-wrap:wrap;" : "";
308
- const align = isHorizontal ? "align-items:center;" : "";
307
+ const wrapStyle = isHorizontal ? "flex-wrap:nowrap;" : "";
308
+ const alignItems = isHorizontal ? "align-items:stretch;" : "";
309
309
  const justifyMap = {
310
310
  start: "flex-start",
311
311
  center: "center",
@@ -315,7 +315,7 @@ function renderElement(key, spec, accent) {
315
315
  };
316
316
  const jc = p.justify ? justifyMap[String(p.justify)] : undefined;
317
317
  const childIds = el.children ?? [];
318
- let html = `<div style="display:flex;width:100%;flex-direction:${dir};gap:${gapVal};${wrap}${align}${jc ? `justify-content:${jc};` : ""}">`;
318
+ let html = `<div style="display:flex;width:100%;min-width:0;box-sizing:border-box;flex-direction:${dir};gap:${gapVal};${wrapStyle}${alignItems}${jc ? `justify-content:${jc};` : ""}">`;
319
319
  for (const childKey of childIds) {
320
320
  const flex = isHorizontal ? "flex:1;min-width:0;" : "";
321
321
  html += `<div style="${flex}">${renderElement(childKey, spec, accent)}</div>`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farcaster/snap-hono",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Hono integration for Farcaster Snap servers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@resvg/resvg-wasm": "^2.6.2",
30
30
  "satori": "^0.10.0",
31
- "@farcaster/snap": "2.1.1"
31
+ "@farcaster/snap": "2.1.2"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "hono": ">=4.0.0"
@@ -395,8 +395,8 @@ function renderElement(key: string, spec: SnapSpec, accent: string): string {
395
395
  const gapVal =
396
396
  gapMap[String(p.gap ?? "md")] ?? (isHorizontal ? "8px" : "16px");
397
397
  const dir = isHorizontal ? "row" : "column";
398
- const wrap = isHorizontal ? "flex-wrap:wrap;" : "";
399
- const align = isHorizontal ? "align-items:center;" : "";
398
+ const wrapStyle = isHorizontal ? "flex-wrap:nowrap;" : "";
399
+ const alignItems = isHorizontal ? "align-items:stretch;" : "";
400
400
  const justifyMap: Record<string, string> = {
401
401
  start: "flex-start",
402
402
  center: "center",
@@ -406,7 +406,7 @@ function renderElement(key: string, spec: SnapSpec, accent: string): string {
406
406
  };
407
407
  const jc = p.justify ? justifyMap[String(p.justify)] : undefined;
408
408
  const childIds = el.children ?? [];
409
- let html = `<div style="display:flex;width:100%;flex-direction:${dir};gap:${gapVal};${wrap}${align}${
409
+ let html = `<div style="display:flex;width:100%;min-width:0;box-sizing:border-box;flex-direction:${dir};gap:${gapVal};${wrapStyle}${alignItems}${
410
410
  jc ? `justify-content:${jc};` : ""
411
411
  }">`;
412
412
  for (const childKey of childIds) {