@pygmalionjs/pygmalion 0.2.17 → 0.2.18
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 +9 -1
- package/dist-lib/pygmalion.js +539 -515
- package/package.json +1 -1
- package/types.d.ts +2 -0
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.
|