@present-day/device 0.0.0-stage → 0.2.0

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,226 @@
1
+ /* src/core/styles.css */
2
+ .pd-device {
3
+ container-type: inline-size;
4
+ display: block;
5
+ position: relative;
6
+ width: 100%;
7
+ max-width: var(--pd-device-max-width, none);
8
+ }
9
+ .pd-device-body {
10
+ display: block;
11
+ position: relative;
12
+ padding: calc(var(--pd-device-bezel) * 1cqi);
13
+ border-radius: calc(var(--pd-device-radius) * 1cqi);
14
+ background: var(--pd-device-color, #1c1c1e);
15
+ box-shadow:
16
+ inset 0 0 0 0.25cqi rgb(255 255 255 / 0.08),
17
+ 0 0 0 1px var(--pd-device-edge, hsl(0 0% 50% / 0.25)),
18
+ var(--pd-device-shadow, 0 24px 48px -24px rgb(0 0 0 / 0.45));
19
+ }
20
+ .pd-device-screen {
21
+ display: block;
22
+ position: relative;
23
+ overflow: hidden;
24
+ isolation: isolate;
25
+ aspect-ratio: var(--pd-device-aspect);
26
+ border-radius: calc(var(--pd-device-screen-radius) * 1cqi);
27
+ background: var(--pd-device-screen-color, #000);
28
+ }
29
+ .pd-device-fill {
30
+ position: absolute;
31
+ inset: 0;
32
+ display: block;
33
+ width: 100%;
34
+ height: 100%;
35
+ }
36
+ img.pd-device-fill {
37
+ object-fit: cover;
38
+ object-position: top;
39
+ }
40
+ .pd-device-viewport {
41
+ position: absolute;
42
+ top: 0;
43
+ left: 0;
44
+ border: 0;
45
+ transform-origin: 0 0;
46
+ transform: scale(var(--pd-device-scale, 1));
47
+ }
48
+ .pd-device-screen:not([data-scaled]) .pd-device-viewport {
49
+ visibility: hidden;
50
+ }
51
+ .pd-device-content {
52
+ isolation: isolate;
53
+ }
54
+ .pd-device[data-interactive=false] .pd-device-content {
55
+ pointer-events: none;
56
+ }
57
+ .pd-device-island {
58
+ position: absolute;
59
+ z-index: 2;
60
+ top: calc(var(--pd-device-island-top) * 1cqi);
61
+ left: 50%;
62
+ width: calc(var(--pd-device-island-width) * 1cqi);
63
+ height: calc(var(--pd-device-island-height) * 1cqi);
64
+ translate: -50% 0;
65
+ border-radius: 999px;
66
+ background: #000;
67
+ pointer-events: none;
68
+ }
69
+ .pd-device-hole {
70
+ position: absolute;
71
+ z-index: 2;
72
+ top: calc(var(--pd-device-hole-top) * 1cqi);
73
+ left: calc((var(--pd-device-hole-x) - var(--pd-device-bezel)) * 1cqi);
74
+ width: calc(var(--pd-device-hole-size) * 1cqi);
75
+ height: calc(var(--pd-device-hole-size) * 1cqi);
76
+ translate: -50% 0;
77
+ border-radius: 50%;
78
+ background: #000;
79
+ pointer-events: none;
80
+ }
81
+ .pd-device-screen[data-safe-area=reserve] > .pd-device-fill.pd-device-content,
82
+ .pd-device-screen[data-safe-area=reserve] > img.pd-device-fill {
83
+ top: calc(var(--pd-device-safe-top) * 1cqi);
84
+ height: calc(100% - (var(--pd-device-safe-top) + var(--pd-device-safe-bottom)) * 1cqi);
85
+ }
86
+ .pd-device-screen[data-safe-area=reserve] > .pd-device-viewport {
87
+ top: calc(var(--pd-device-safe-top) * 1cqi);
88
+ }
89
+ .pd-device-status,
90
+ .pd-device-home {
91
+ --pd-device-ink: #000;
92
+ position: absolute;
93
+ z-index: 1;
94
+ left: 0;
95
+ right: 0;
96
+ pointer-events: none;
97
+ }
98
+ .pd-device-status[data-style=light],
99
+ .pd-device-home[data-style=light] {
100
+ --pd-device-ink: #fff;
101
+ }
102
+ .pd-device-status[data-mode=reserve],
103
+ .pd-device-home[data-mode=reserve] {
104
+ background: var(--pd-device-status-color, #fff);
105
+ }
106
+ .pd-device-status[data-mode=reserve][data-style=light],
107
+ .pd-device-home[data-mode=reserve][data-style=light] {
108
+ background: var(--pd-device-status-color, #000);
109
+ }
110
+ .pd-device-status {
111
+ top: 0;
112
+ height: calc(var(--pd-device-safe-top) * 1cqi);
113
+ color: var(--pd-device-ink);
114
+ font:
115
+ 600 calc(var(--pd-device-status-font) * 1cqi) / 1 system-ui,
116
+ -apple-system,
117
+ sans-serif;
118
+ font-variant-numeric: tabular-nums;
119
+ }
120
+ .pd-device-status-time,
121
+ .pd-device-status-icons {
122
+ position: absolute;
123
+ top: calc(var(--pd-device-status-center) * 1cqi);
124
+ translate: -50% -50%;
125
+ }
126
+ .pd-device-status-time {
127
+ left: calc(var(--pd-device-status-time) * 1cqi);
128
+ }
129
+ .pd-device-status-icons {
130
+ right: calc(var(--pd-device-status-icons) * 1cqi);
131
+ translate: 50% -50%;
132
+ display: flex;
133
+ align-items: center;
134
+ gap: 0.35em;
135
+ height: 0.7em;
136
+ }
137
+ .pd-device-status-signal {
138
+ width: 1.05em;
139
+ height: 0.7em;
140
+ background:
141
+ linear-gradient(
142
+ to right,
143
+ var(--pd-device-ink) 0 18%,
144
+ transparent 18% 27%,
145
+ var(--pd-device-ink) 27% 45%,
146
+ transparent 45% 55%,
147
+ var(--pd-device-ink) 55% 73%,
148
+ transparent 73% 82%,
149
+ var(--pd-device-ink) 82%);
150
+ clip-path: polygon(0 75%, 18% 75%, 18% 55%, 27% 55%, 27% 38%, 45% 38%, 45% 20%, 55% 20%, 55% 0, 100% 0, 100% 100%, 0 100%);
151
+ }
152
+ .pd-device-status-wifi {
153
+ width: 0.95em;
154
+ height: 0.7em;
155
+ background: var(--pd-device-ink);
156
+ clip-path: polygon(50% 100%, 0 28%, 18% 12%, 50% 0, 82% 12%, 100% 28%);
157
+ border-radius: 50% 50% 0 0;
158
+ }
159
+ .pd-device-status-battery {
160
+ position: relative;
161
+ width: 1.55em;
162
+ height: 0.75em;
163
+ border: 0.08em solid var(--pd-device-ink);
164
+ border-radius: 0.22em;
165
+ opacity: 0.95;
166
+ }
167
+ .pd-device-status-battery::before {
168
+ content: "";
169
+ position: absolute;
170
+ inset: 0.08em;
171
+ border-radius: 0.12em;
172
+ background: var(--pd-device-ink);
173
+ }
174
+ .pd-device-status-battery::after {
175
+ content: "";
176
+ position: absolute;
177
+ left: 100%;
178
+ top: 30%;
179
+ width: 0.08em;
180
+ height: 40%;
181
+ margin-left: 0.06em;
182
+ border-radius: 0 0.1em 0.1em 0;
183
+ background: var(--pd-device-ink);
184
+ }
185
+ .pd-device-home {
186
+ bottom: 0;
187
+ height: calc(var(--pd-device-safe-bottom) * 1cqi);
188
+ }
189
+ .pd-device-home::after {
190
+ content: "";
191
+ position: absolute;
192
+ left: 50%;
193
+ bottom: calc(var(--pd-device-home-bottom) * 1cqi);
194
+ width: calc(var(--pd-device-home-width) * 1cqi);
195
+ height: calc(var(--pd-device-home-height) * 1cqi);
196
+ translate: -50% 0;
197
+ border-radius: 999px;
198
+ background: var(--pd-device-ink);
199
+ }
200
+ .pd-device-button {
201
+ position: absolute;
202
+ display: block;
203
+ background: var(--pd-device-color, #1c1c1e);
204
+ }
205
+ .pd-device-button[data-side=left],
206
+ .pd-device-button[data-side=right] {
207
+ top: var(--pd-device-button-start);
208
+ height: var(--pd-device-button-length);
209
+ width: calc(var(--pd-device-button-depth) * 1cqi);
210
+ }
211
+ .pd-device-button[data-side=left] {
212
+ right: 100%;
213
+ border-radius: 2px 0 0 2px;
214
+ }
215
+ .pd-device-button[data-side=right] {
216
+ left: 100%;
217
+ border-radius: 0 2px 2px 0;
218
+ }
219
+ .pd-device-button[data-side=top] {
220
+ bottom: 100%;
221
+ left: var(--pd-device-button-start);
222
+ width: var(--pd-device-button-length);
223
+ height: calc(var(--pd-device-button-depth) * 1cqi);
224
+ border-radius: 2px 2px 0 0;
225
+ }
226
+ /*# sourceMappingURL=styles.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/styles.css"],"sourcesContent":["/*\n * @present-day/device. Every measurement comes from custom properties set by\n * deviceVars() (lengths in percent of the device width, used as cqi), so the\n * proportions live in one place: src/core/devices.ts.\n *\n * Theme it with:\n * --pd-device-color body and buttons\n * --pd-device-screen-color behind the content while it loads\n * --pd-device-edge hairline around the body, for dark pages\n * --pd-device-shadow drop shadow\n * --pd-device-status-color the status bar and home bands with safeArea=\"reserve\"\n */\n\n.pd-device {\n /* cqi below is a percent of this element's width. */\n container-type: inline-size;\n display: block;\n position: relative;\n width: 100%;\n max-width: var(--pd-device-max-width, none);\n}\n\n.pd-device-body {\n display: block;\n position: relative;\n padding: calc(var(--pd-device-bezel) * 1cqi);\n border-radius: calc(var(--pd-device-radius) * 1cqi);\n background: var(--pd-device-color, #1c1c1e);\n box-shadow:\n inset 0 0 0 0.25cqi rgb(255 255 255 / 0.08),\n 0 0 0 1px var(--pd-device-edge, hsl(0 0% 50% / 0.25)),\n var(--pd-device-shadow, 0 24px 48px -24px rgb(0 0 0 / 0.45));\n}\n\n.pd-device-screen {\n display: block;\n position: relative;\n overflow: hidden;\n /* Keeps the rounded clip on a transformed iframe in Safari. */\n isolation: isolate;\n aspect-ratio: var(--pd-device-aspect);\n border-radius: calc(var(--pd-device-screen-radius) * 1cqi);\n background: var(--pd-device-screen-color, #000);\n}\n\n/* Content drawn at the screen's own size: a screenshot, an overlay. */\n.pd-device-fill {\n position: absolute;\n inset: 0;\n display: block;\n width: 100%;\n height: 100%;\n}\nimg.pd-device-fill {\n object-fit: cover;\n object-position: top;\n}\n\n/* Content laid out at the device's viewport (an iframe), scaled to the screen. */\n.pd-device-viewport {\n position: absolute;\n top: 0;\n left: 0;\n border: 0;\n transform-origin: 0 0;\n transform: scale(var(--pd-device-scale, 1));\n}\n/* Until the screen is measured the scale is unknown; don't flash it at 1:1. */\n.pd-device-screen:not([data-scaled]) .pd-device-viewport {\n visibility: hidden;\n}\n\n/* Keeps content's own z-indexes below the status bar and cutout. */\n.pd-device-content {\n isolation: isolate;\n}\n\n.pd-device[data-interactive=\"false\"] .pd-device-content {\n pointer-events: none;\n}\n\n.pd-device-island {\n position: absolute;\n z-index: 2;\n top: calc(var(--pd-device-island-top) * 1cqi);\n left: 50%;\n width: calc(var(--pd-device-island-width) * 1cqi);\n height: calc(var(--pd-device-island-height) * 1cqi);\n translate: -50% 0;\n border-radius: 999px;\n background: #000;\n pointer-events: none;\n}\n\n.pd-device-hole {\n position: absolute;\n z-index: 2;\n top: calc(var(--pd-device-hole-top) * 1cqi);\n left: calc((var(--pd-device-hole-x) - var(--pd-device-bezel)) * 1cqi);\n width: calc(var(--pd-device-hole-size) * 1cqi);\n height: calc(var(--pd-device-hole-size) * 1cqi);\n translate: -50% 0;\n border-radius: 50%;\n background: #000;\n pointer-events: none;\n}\n\n/* reserve: content sits between the status bar and the home bands. */\n.pd-device-screen[data-safe-area=\"reserve\"] > .pd-device-fill.pd-device-content,\n.pd-device-screen[data-safe-area=\"reserve\"] > img.pd-device-fill {\n top: calc(var(--pd-device-safe-top) * 1cqi);\n height: calc(\n 100% -\n (var(--pd-device-safe-top) + var(--pd-device-safe-bottom)) *\n 1cqi\n );\n}\n.pd-device-screen[data-safe-area=\"reserve\"] > .pd-device-viewport {\n top: calc(var(--pd-device-safe-top) * 1cqi);\n}\n\n.pd-device-status,\n.pd-device-home {\n --pd-device-ink: #000;\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n pointer-events: none;\n}\n.pd-device-status[data-style=\"light\"],\n.pd-device-home[data-style=\"light\"] {\n --pd-device-ink: #fff;\n}\n.pd-device-status[data-mode=\"reserve\"],\n.pd-device-home[data-mode=\"reserve\"] {\n background: var(--pd-device-status-color, #fff);\n}\n.pd-device-status[data-mode=\"reserve\"][data-style=\"light\"],\n.pd-device-home[data-mode=\"reserve\"][data-style=\"light\"] {\n background: var(--pd-device-status-color, #000);\n}\n\n.pd-device-status {\n top: 0;\n height: calc(var(--pd-device-safe-top) * 1cqi);\n color: var(--pd-device-ink);\n font:\n 600 calc(var(--pd-device-status-font) * 1cqi) / 1 system-ui,\n -apple-system,\n sans-serif;\n font-variant-numeric: tabular-nums;\n}\n.pd-device-status-time,\n.pd-device-status-icons {\n position: absolute;\n top: calc(var(--pd-device-status-center) * 1cqi);\n translate: -50% -50%;\n}\n.pd-device-status-time {\n left: calc(var(--pd-device-status-time) * 1cqi);\n}\n.pd-device-status-icons {\n right: calc(var(--pd-device-status-icons) * 1cqi);\n translate: 50% -50%;\n display: flex;\n align-items: center;\n gap: 0.35em;\n height: 0.7em;\n}\n.pd-device-status-signal {\n width: 1.05em;\n height: 0.7em;\n background: linear-gradient(\n to right,\n var(--pd-device-ink) 0 18%,\n transparent 18% 27%,\n var(--pd-device-ink) 27% 45%,\n transparent 45% 55%,\n var(--pd-device-ink) 55% 73%,\n transparent 73% 82%,\n var(--pd-device-ink) 82%\n );\n clip-path: polygon(\n 0 75%,\n 18% 75%,\n 18% 55%,\n 27% 55%,\n 27% 38%,\n 45% 38%,\n 45% 20%,\n 55% 20%,\n 55% 0,\n 100% 0,\n 100% 100%,\n 0 100%\n );\n}\n.pd-device-status-wifi {\n width: 0.95em;\n height: 0.7em;\n background: var(--pd-device-ink);\n clip-path: polygon(50% 100%, 0 28%, 18% 12%, 50% 0, 82% 12%, 100% 28%);\n border-radius: 50% 50% 0 0;\n}\n.pd-device-status-battery {\n position: relative;\n width: 1.55em;\n height: 0.75em;\n border: 0.08em solid var(--pd-device-ink);\n border-radius: 0.22em;\n opacity: 0.95;\n}\n.pd-device-status-battery::before {\n content: \"\";\n position: absolute;\n inset: 0.08em;\n border-radius: 0.12em;\n background: var(--pd-device-ink);\n}\n.pd-device-status-battery::after {\n content: \"\";\n position: absolute;\n left: 100%;\n top: 30%;\n width: 0.08em;\n height: 40%;\n margin-left: 0.06em;\n border-radius: 0 0.1em 0.1em 0;\n background: var(--pd-device-ink);\n}\n\n.pd-device-home {\n bottom: 0;\n height: calc(var(--pd-device-safe-bottom) * 1cqi);\n}\n.pd-device-home::after {\n content: \"\";\n position: absolute;\n left: 50%;\n bottom: calc(var(--pd-device-home-bottom) * 1cqi);\n width: calc(var(--pd-device-home-width) * 1cqi);\n height: calc(var(--pd-device-home-height) * 1cqi);\n translate: -50% 0;\n border-radius: 999px;\n background: var(--pd-device-ink);\n}\n\n.pd-device-button {\n position: absolute;\n display: block;\n background: var(--pd-device-color, #1c1c1e);\n}\n.pd-device-button[data-side=\"left\"],\n.pd-device-button[data-side=\"right\"] {\n top: var(--pd-device-button-start);\n height: var(--pd-device-button-length);\n width: calc(var(--pd-device-button-depth) * 1cqi);\n}\n.pd-device-button[data-side=\"left\"] {\n right: 100%;\n border-radius: 2px 0 0 2px;\n}\n.pd-device-button[data-side=\"right\"] {\n left: 100%;\n border-radius: 0 2px 2px 0;\n}\n.pd-device-button[data-side=\"top\"] {\n bottom: 100%;\n left: var(--pd-device-button-start);\n width: var(--pd-device-button-length);\n height: calc(var(--pd-device-button-depth) * 1cqi);\n border-radius: 2px 2px 0 0;\n}\n"],"mappings":";AAaA,CAAC;AAEC,kBAAgB;AAChB,WAAS;AACT,YAAU;AACV,SAAO;AACP,aAAW,IAAI,qBAAqB,EAAE;AACxC;AAEA,CAAC;AACC,WAAS;AACT,YAAU;AACV,WAAS,KAAK,IAAI,mBAAmB,EAAE;AACvC,iBAAe,KAAK,IAAI,oBAAoB,EAAE;AAC9C,cAAY,IAAI,iBAAiB,EAAE;AACnC;AAAA,IACE,MAAM,EAAE,EAAE,EAAE,QAAQ,IAAI,IAAI,IAAI,IAAI,EAAE,KAAK;AAAA,IAC3C,EAAE,EAAE,EAAE,IAAI,IAAI,gBAAgB,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,MAAM;AAAA,IACrD,IAAI,kBAAkB,EAAE,EAAE,KAAK,KAAK,MAAM,IAAI,EAAE,EAAE,EAAE,EAAE;AAC1D;AAEA,CAAC;AACC,WAAS;AACT,YAAU;AACV,YAAU;AAEV,aAAW;AACX,gBAAc,IAAI;AAClB,iBAAe,KAAK,IAAI,2BAA2B,EAAE;AACrD,cAAY,IAAI,wBAAwB,EAAE;AAC5C;AAGA,CAAC;AACC,YAAU;AACV,SAAO;AACP,WAAS;AACT,SAAO;AACP,UAAQ;AACV;AACA,GAAG,CAPF;AAQC,cAAY;AACZ,mBAAiB;AACnB;AAGA,CAAC;AACC,YAAU;AACV,OAAK;AACL,QAAM;AACN,UA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SAAO,IAAI;AACX,UAAQ,KAAK,IAAI,0BAA0B,EAAE;AAC7C,iBAAe,IAAI,IAAI,EAAE;AAC3B;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,98 @@
1
1
  {
2
2
  "name": "@present-day/device",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Phone and tablet frames for screenshots, embedded pages and live content, drawn in CSS from one set of proportions",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/index.d.mts",
12
+ "default": "./dist/index.mjs"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ }
18
+ },
19
+ "./core": {
20
+ "import": {
21
+ "types": "./dist/core.d.mts",
22
+ "default": "./dist/core.mjs"
23
+ },
24
+ "require": {
25
+ "types": "./dist/core.d.ts",
26
+ "default": "./dist/core.js"
27
+ }
28
+ },
29
+ "./styles.css": "./dist/styles.css"
30
+ },
31
+ "files": [
32
+ "dist"
33
+ ],
34
+ "sideEffects": [
35
+ "**/*.css"
36
+ ],
37
+ "packageManager": "bun@1.4.3",
38
+ "scripts": {
39
+ "storybook": "storybook dev -p 6006",
40
+ "storybook:build": "storybook build",
41
+ "build": "tsup",
42
+ "dev": "tsup --watch",
43
+ "prepublishOnly": "bun run build",
44
+ "lint": "biome check .",
45
+ "format": "biome check --write .",
46
+ "type-check": "tsc --noEmit",
47
+ "test": "vitest run",
48
+ "test:watch": "vitest"
49
+ },
50
+ "keywords": [
51
+ "react",
52
+ "device",
53
+ "mockup",
54
+ "phone",
55
+ "iphone",
56
+ "frame",
57
+ "screenshot",
58
+ "iframe"
59
+ ],
60
+ "author": "Present Day",
61
+ "license": "MIT",
62
+ "repository": {
63
+ "type": "git",
64
+ "url": "git+https://github.com/present-day/device.git"
65
+ },
66
+ "bugs": {
67
+ "url": "https://github.com/present-day/device/issues"
68
+ },
69
+ "homepage": "https://github.com/present-day/device#readme",
70
+ "publishConfig": {
71
+ "access": "public"
72
+ },
73
+ "peerDependencies": {
74
+ "react": ">=18.0.0",
75
+ "react-dom": ">=18.0.0"
76
+ },
77
+ "dependencies": {
78
+ "clsx": "^2.1.1"
79
+ },
80
+ "devDependencies": {
81
+ "@biomejs/biome": "^2.4.12",
82
+ "@storybook/addon-a11y": "^10.6.0",
83
+ "@storybook/react-vite": "^10.6.0",
84
+ "@testing-library/jest-dom": "^6.9.1",
85
+ "@testing-library/react": "^16.3.2",
86
+ "@types/node": "^26.6.2",
87
+ "@types/react": "^19.3.0",
88
+ "@types/react-dom": "^19.3.0",
89
+ "happy-dom": "^20.9.0",
90
+ "react": "^19.3.0",
91
+ "react-dom": "^19.3.0",
92
+ "storybook": "^10.6.0",
93
+ "tsup": "^8.5.1",
94
+ "typescript": "^6.0.3",
95
+ "vite": "^8.3.0",
96
+ "vitest": "^4.1.6"
97
+ }
98
+ }