@pygmalionjs/pygmalion 0.2.18 → 0.2.20
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.
- package/README.ko.md +19 -0
- package/README.md +39 -0
- package/dist-lib/{App-CiSnd2mV.js → App-BncfvzKi.js} +2609 -2562
- package/dist-lib/pygmalion.js +837 -834
- package/dist-lib/style.css +1 -1
- package/dist-lib/testing.js +1 -1
- package/node/dev-mirror.mjs +228 -11
- package/node/preview-artifact-plugin.mjs +0 -0
- package/node/storyboard-capture-runtime.mjs +37 -7
- package/node/vite.mjs +9 -4
- package/package.json +1 -1
- package/storyboard.d.ts +19 -7
- package/types.d.ts +19 -0
package/README.ko.md
CHANGED
|
@@ -86,6 +86,25 @@ export default defineConfig({
|
|
|
86
86
|
`PYGMALION_PREVIEW_MODE=1`을 사용하면 통합 플러그인이 재귀적으로 실행되지
|
|
87
87
|
않습니다.
|
|
88
88
|
|
|
89
|
+
## 지원하는 폭에서 프레임 확인하기
|
|
90
|
+
|
|
91
|
+
프레임은 모서리를 끌거나 W/H 입력으로 크기를 바꿉니다. 여기에 애플리케이션이
|
|
92
|
+
실제로 보장하는 폭에 이름을 붙여 두면, 그 입력 옆에 버튼으로 놓입니다. 숫자를
|
|
93
|
+
외우지 않아도 폭 사이를 오갈 수 있습니다.
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
<PygmalionEditor
|
|
97
|
+
viewportPresets={[
|
|
98
|
+
{ label: '480', width: 480, height: 800, description: '지원 최소 폭' },
|
|
99
|
+
{ label: '기본', width: 1280, height: 800 },
|
|
100
|
+
]}
|
|
101
|
+
/>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`height`를 빼면 폭만 바꾸고 높이는 그대로 둡니다. 프레임이 그 크기에 있는 동안
|
|
105
|
+
버튼은 눌린 상태로 보이고, **Reset to default size**는 여전히 매니페스트가 선언한
|
|
106
|
+
뷰포트로 되돌립니다.
|
|
107
|
+
|
|
89
108
|
## 화면과 시나리오 등록
|
|
90
109
|
|
|
91
110
|
애플리케이션별 라우트, fixture, 인증, 목 데이터, 화면 이름은 호스트가
|
package/README.md
CHANGED
|
@@ -154,6 +154,45 @@ unapplied edits, `switchSource` refuses rather than leave the canvas on a
|
|
|
154
154
|
revision those edits were never written against — apply or revert them first, or
|
|
155
155
|
pass `{ discardEdits: true }`.
|
|
156
156
|
|
|
157
|
+
## Check a frame at the widths you support
|
|
158
|
+
|
|
159
|
+
A frame resizes by corner drag or by the W/H boxes. Name the widths your
|
|
160
|
+
application actually guarantees and they become one-click buttons next to those
|
|
161
|
+
boxes, so moving between them costs nothing to remember:
|
|
162
|
+
|
|
163
|
+
```tsx
|
|
164
|
+
<PygmalionEditor
|
|
165
|
+
viewportPresets={[
|
|
166
|
+
{ label: '480', width: 480, height: 800, description: 'Minimum supported width' },
|
|
167
|
+
{ label: 'Default', width: 1280, height: 800 },
|
|
168
|
+
]}
|
|
169
|
+
/>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Omit `height` to change width alone and leave the frame's height as it is. The
|
|
173
|
+
button reads as active while the frame sits at that size, and **Reset to default
|
|
174
|
+
size** still returns the frame to the viewport its manifest authored.
|
|
175
|
+
|
|
176
|
+
### Screens that never stop moving
|
|
177
|
+
|
|
178
|
+
A capture waits for the document to hold still. A screen with an elapsed clock, a
|
|
179
|
+
level meter, or a marquee never does, so it fails on `stabilize` no matter how
|
|
180
|
+
long it waits. Declare those regions and their mutations stop counting as churn:
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
captureStoryboardCase({
|
|
184
|
+
// ...
|
|
185
|
+
stability: {
|
|
186
|
+
volatileSelectors: ['[data-testid="elapsed-time"]', '[data-live-meter]'],
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
The wait itself samples every 100ms and needs three identical samples, up to a
|
|
192
|
+
4s ceiling — wide enough for a screen that repaints on a one-second beat.
|
|
193
|
+
`attempts`, `requiredStableSamples`, `intervalMs`, and `minimumWaitMs` are
|
|
194
|
+
adjustable for anything slower.
|
|
195
|
+
|
|
157
196
|
## Register screens and scenarios
|
|
158
197
|
|
|
159
198
|
The host owns application-specific routes, fixtures, authentication, mock data,
|