@littlepartytime/dev-kit 1.6.1 → 1.6.2

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.
@@ -9,6 +9,10 @@ const INNER_R = OUTER_R - BEZEL;
9
9
  const BODY_W = SCREEN_W + BEZEL * 2;
10
10
  const BODY_H = SCREEN_H + BEZEL * 2;
11
11
 
12
+ // iPhone 14/15 safe area insets (portrait)
13
+ const SAFE_AREA_TOP = 59; // Dynamic Island
14
+ const SAFE_AREA_BOTTOM = 34; // Home Indicator
15
+
12
16
  export default function PhoneFrame({ children }: { children: React.ReactNode }) {
13
17
  const containerRef = useRef<HTMLDivElement>(null);
14
18
  const [scale, setScale] = useState(1);
@@ -74,7 +78,21 @@ export default function PhoneFrame({ children }: { children: React.ReactNode })
74
78
  contain: 'paint',
75
79
  }}
76
80
  >
77
- {children}
81
+ {/* Safe area: game content is constrained here.
82
+ contain:paint makes this the containing block for
83
+ position:fixed elements inside the game. */}
84
+ <div
85
+ className="absolute overflow-hidden"
86
+ style={{
87
+ top: SAFE_AREA_TOP,
88
+ left: 0,
89
+ right: 0,
90
+ bottom: SAFE_AREA_BOTTOM,
91
+ contain: 'paint',
92
+ }}
93
+ >
94
+ {children}
95
+ </div>
78
96
  </div>
79
97
 
80
98
  {/* Dynamic Island */}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@littlepartytime/dev-kit",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Development toolkit CLI for Little Party Time game developers",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",