@playcraft/common 0.1.87 → 0.1.88

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.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Device viewport presets shared by the frontend preview and artifact QA (single source).
3
+ * Display helpers that depend on the preview UI stay in `packages/frontend/src/lib/preview-devices.ts`.
4
+ */
5
+ export type PreviewOrientation = 'portrait' | 'landscape';
6
+ export type PreviewDeviceGroup = 'mobile' | 'foldable' | 'tablet' | 'display';
7
+ export type PreviewViewport = {
8
+ width: number;
9
+ height: number;
10
+ };
11
+ export type PreviewDevice = PreviewViewport & {
12
+ id: string;
13
+ group: PreviewDeviceGroup;
14
+ unfolded?: PreviewViewport;
15
+ fixedLandscape?: boolean;
16
+ framed?: boolean;
17
+ };
18
+ export declare const PREVIEW_DEVICES: readonly PreviewDevice[];
19
+ export declare const PREVIEW_DEVICE_GROUPS: readonly PreviewDeviceGroup[];
20
+ //# sourceMappingURL=preview-devices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-devices.d.ts","sourceRoot":"","sources":["../../src/preview/preview-devices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,WAAW,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC9E,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAMF,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EA8BnD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EAK9D,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Device viewport presets shared by the frontend preview and artifact QA (single source).
3
+ * Display helpers that depend on the preview UI stay in `packages/frontend/src/lib/preview-devices.ts`.
4
+ */
5
+ // Viewport dimensions in CSS pixels.
6
+ // Chrome DevTools device table, checked 2026-10-15:
7
+ // https://github.com/ChromeDevTools/devtools-frontend/blob/main/front_end/models/emulation/EmulatedDevices.ts
8
+ // These presets change the viewport, not the browser identity or pixel density.
9
+ export const PREVIEW_DEVICES = [
10
+ { id: 'iphoneSE', group: 'mobile', width: 375, height: 667 },
11
+ { id: 'iphone17', group: 'mobile', width: 393, height: 852, framed: true },
12
+ { id: 'iphone17Pro', group: 'mobile', width: 402, height: 874, framed: true },
13
+ { id: 'iphone16', group: 'mobile', width: 393, height: 852 },
14
+ { id: 'iphone16ProMax', group: 'mobile', width: 440, height: 956 },
15
+ { id: 'pixel9', group: 'mobile', width: 412, height: 924 },
16
+ { id: 'pixel9Pro', group: 'mobile', width: 427, height: 952 },
17
+ { id: 'pixel10', group: 'mobile', width: 412, height: 924 },
18
+ { id: 'galaxyA55', group: 'mobile', width: 360, height: 800 },
19
+ {
20
+ id: 'pixel9ProFold',
21
+ group: 'foldable',
22
+ width: 412,
23
+ height: 922,
24
+ unfolded: { width: 836, height: 842 },
25
+ },
26
+ {
27
+ id: 'galaxyZFold6',
28
+ group: 'foldable',
29
+ width: 412,
30
+ height: 968,
31
+ unfolded: { width: 744, height: 860 },
32
+ },
33
+ { id: 'ipadMini', group: 'tablet', width: 768, height: 1024 },
34
+ { id: 'ipadAir', group: 'tablet', width: 820, height: 1180 },
35
+ { id: 'ipadPro11', group: 'tablet', width: 834, height: 1194 },
36
+ { id: 'ipadPro13', group: 'tablet', width: 1032, height: 1376 },
37
+ { id: 'surfacePro10', group: 'tablet', width: 960, height: 1440 },
38
+ { id: 'nestHubMax', group: 'display', width: 1280, height: 800, fixedLandscape: true },
39
+ ];
40
+ export const PREVIEW_DEVICE_GROUPS = [
41
+ 'mobile',
42
+ 'foldable',
43
+ 'tablet',
44
+ 'display',
45
+ ];
46
+ //# sourceMappingURL=preview-devices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-devices.js","sourceRoot":"","sources":["../../src/preview/preview-devices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,qCAAqC;AACrC,oDAAoD;AACpD,8GAA8G;AAC9G,gFAAgF;AAChF,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IAC5D,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE;IAC1E,EAAE,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE;IAC7E,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IAC5D,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IAClE,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IAC1D,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IAC7D,EAAE,EAAE,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AI,EAAE;CACvF,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAkC;IAClE,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,SAAS;CACV,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcraft/common",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -145,6 +145,10 @@
145
145
  "types": "./dist/preview/phone-preview-dimensions.d.ts",
146
146
  "default": "./dist/preview/phone-preview-dimensions.js"
147
147
  },
148
+ "./preview/preview-devices": {
149
+ "types": "./dist/preview/preview-devices.d.ts",
150
+ "default": "./dist/preview/preview-devices.js"
151
+ },
148
152
  "./agent-messages": {
149
153
  "types": "./dist/agent-messages/index.d.ts",
150
154
  "default": "./dist/agent-messages/index.js"