@pygmalionjs/pygmalion 0.2.17 → 0.2.19

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.md CHANGED
@@ -129,9 +129,17 @@ const { sourceRefs, switchSource, mirror } = usePygmalionProject();
129
129
  worktreeRef={sourceRefs.worktreeRef}
130
130
  busy={mirror.state === 'syncing'}
131
131
  onChange={(ref) => void switchSource(ref)}
132
- />;
132
+ >
133
+ {/* Optional: your own trigger, so the control reads as part of the toolbar. */}
134
+ <span>{mirror.sourceRef ?? 'dev'}@{mirror.shortCommit}</span>
135
+ </SourceRefControl>;
133
136
  ```
134
137
 
138
+ The menu is a native select layered over that trigger, so keyboard access,
139
+ mobile behavior, and placement stay with the platform while the painted trigger
140
+ stays yours. `[data-pygmalion-source-ref]` and `[data-busy]` are available for
141
+ styling.
142
+
135
143
  `GET /__pygmalion-dev-control/refs` backs this list with local branches, remote
136
144
  tracking branches, the default revision, and the worktree ref. `loadSourceRefs()`
137
145
  reloads it after branches change.
@@ -146,6 +154,26 @@ unapplied edits, `switchSource` refuses rather than leave the canvas on a
146
154
  revision those edits were never written against — apply or revert them first, or
147
155
  pass `{ discardEdits: true }`.
148
156
 
157
+ ### Screens that never stop moving
158
+
159
+ A capture waits for the document to hold still. A screen with an elapsed clock, a
160
+ level meter, or a marquee never does, so it fails on `stabilize` no matter how
161
+ long it waits. Declare those regions and their mutations stop counting as churn:
162
+
163
+ ```ts
164
+ captureStoryboardCase({
165
+ // ...
166
+ stability: {
167
+ volatileSelectors: ['[data-testid="elapsed-time"]', '[data-live-meter]'],
168
+ },
169
+ });
170
+ ```
171
+
172
+ The wait itself samples every 100ms and needs three identical samples, up to a
173
+ 4s ceiling — wide enough for a screen that repaints on a one-second beat.
174
+ `attempts`, `requiredStableSamples`, `intervalMs`, and `minimumWaitMs` are
175
+ adjustable for anything slower.
176
+
149
177
  ## Register screens and scenarios
150
178
 
151
179
  The host owns application-specific routes, fixtures, authentication, mock data,