@juangadm/pre-post 1.4.0 → 1.5.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.
Files changed (62) hide show
  1. package/README.md +1 -0
  2. package/assets/labels/post.png +0 -0
  3. package/assets/labels/pre.png +0 -0
  4. package/dist/attach.d.ts +59 -0
  5. package/dist/attach.d.ts.map +1 -0
  6. package/dist/attach.js +137 -0
  7. package/dist/attach.js.map +1 -0
  8. package/dist/bin/cli.js +20 -0
  9. package/dist/bin/cli.js.map +1 -1
  10. package/dist/browser.d.ts +48 -2
  11. package/dist/browser.d.ts.map +1 -1
  12. package/dist/browser.js +60 -31
  13. package/dist/browser.js.map +1 -1
  14. package/dist/commands/doctor.d.ts +6 -0
  15. package/dist/commands/doctor.d.ts.map +1 -1
  16. package/dist/commands/doctor.js +14 -0
  17. package/dist/commands/doctor.js.map +1 -1
  18. package/dist/commands/pr.d.ts +5 -0
  19. package/dist/commands/pr.d.ts.map +1 -1
  20. package/dist/commands/pr.js +51 -19
  21. package/dist/commands/pr.js.map +1 -1
  22. package/dist/compose.d.ts +72 -0
  23. package/dist/compose.d.ts.map +1 -0
  24. package/dist/compose.js +237 -0
  25. package/dist/compose.js.map +1 -0
  26. package/dist/ffmpeg.d.ts +35 -0
  27. package/dist/ffmpeg.d.ts.map +1 -0
  28. package/dist/ffmpeg.js +143 -0
  29. package/dist/ffmpeg.js.map +1 -0
  30. package/dist/index.d.ts +4 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +2 -0
  33. package/dist/index.js.map +1 -1
  34. package/dist/moments.d.ts +83 -0
  35. package/dist/moments.d.ts.map +1 -0
  36. package/dist/moments.js +170 -0
  37. package/dist/moments.js.map +1 -0
  38. package/dist/record.d.ts +69 -0
  39. package/dist/record.d.ts.map +1 -0
  40. package/dist/record.js +223 -0
  41. package/dist/record.js.map +1 -0
  42. package/dist/report.d.ts +9 -0
  43. package/dist/report.d.ts.map +1 -1
  44. package/dist/report.js +56 -3
  45. package/dist/report.js.map +1 -1
  46. package/dist/run.d.ts +2 -0
  47. package/dist/run.d.ts.map +1 -1
  48. package/dist/run.js +2 -1
  49. package/dist/run.js.map +1 -1
  50. package/dist/timeline.d.ts +46 -0
  51. package/dist/timeline.d.ts.map +1 -0
  52. package/dist/timeline.js +80 -0
  53. package/dist/timeline.js.map +1 -0
  54. package/dist/types.d.ts +34 -0
  55. package/dist/types.d.ts.map +1 -1
  56. package/dist/types.js.map +1 -1
  57. package/dist/video.d.ts +19 -0
  58. package/dist/video.d.ts.map +1 -0
  59. package/dist/video.js +109 -0
  60. package/dist/video.js.map +1 -0
  61. package/package.json +4 -2
  62. package/skill/SKILL.md +24 -5
package/skill/SKILL.md CHANGED
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: pre-post
3
3
  description: Before/after screenshots for the current PR. Use when the user says "take before and after", "pre-post", "screenshot comparison", "visual diff", "PR screenshots", or after making visual UI changes.
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  allowed-tools:
6
- - Bash(npx -y @juangadm/pre-post@1.4.0 *)
6
+ - Bash(npx -y @juangadm/pre-post@1.5.0 *)
7
7
  - Bash(npx pre-post *)
8
8
  - Bash(pre-post *)
9
9
  ---
@@ -40,7 +40,7 @@ the Post side. Pass `--no-local-baseline` to turn it off.
40
40
  ## Run
41
41
 
42
42
  ```bash
43
- npx -y @juangadm/pre-post@1.4.0 pr
43
+ npx -y @juangadm/pre-post@1.5.0 pr
44
44
  ```
45
45
 
46
46
  The version is pinned on purpose: this file describes that release. If the run starts with
@@ -53,12 +53,30 @@ land somewhere they can see. Add `--routes /a,/b` when the user names pages expl
53
53
  `--before https://production-url` only if the run reports it cannot work out the baseline
54
54
  (it is then saved to `.pre-post.json` for next time).
55
55
 
56
+ ## Video: Moments
57
+
58
+ When the change **moves or reacts** (a menu or dialog opening, a hover or focus state, a
59
+ transition, form feedback), also record it: write Moments to a file outside the repo and
60
+ add `--moments <file>`. Static changes need none; screenshots cover them.
61
+
62
+ ```json
63
+ { "moments": [{ "name": "Open the account menu", "route": "/settings",
64
+ "steps": [{ "hover": "Account" }, { "click": "Account" }] }] }
65
+ ```
66
+
67
+ Steps are `click`, `hover`, `press`, `type` (`["Email", "a@b.co"]`), `scroll` and `wait` (ms),
68
+ naming targets by the text on screen. One interaction per Moment, under 15s, most important
69
+ first; three at most are recorded. "Couldn't find … on Post" means the target text is wrong:
70
+ fix it from the code and re-run once. Guide: https://github.com/juangadm/pre-post/blob/main/docs/video.md
71
+
56
72
  ## What it posts
57
73
 
58
74
  The visual changes go at the **top of the PR description**, in a delimited block that
59
75
  re-runs replace in place — the author's own text is never touched. If the PR cannot be
60
76
  edited (a fork, a read-only token) it falls back to a single sticky comment.
61
77
 
78
+ Moments come first, one clip each. If they could not play inline, the PR says why; relay that line.
79
+
62
80
  Each changed route shows **Pre beside Post**, per viewport, full pages in a `<details>`. No
63
81
  overlay, no percentage. A page that moved says `Content shifted down 48px`; relay as written. A pure move
64
82
  ("Nothing else changed.") shows the full pages with no crop and no `<details>`, by design.
@@ -67,7 +85,8 @@ overlay, no percentage. A page that moved says `Content shifted down 48px`; rela
67
85
 
68
86
  When anything changed, the command prints `Sheet: <path>`: one image with Pre beside Post for
69
87
  every change. If you can send files to the user, send that one file, even when the PR was
70
- updated. Someone following you from a phone sees it there before they open GitHub.
88
+ updated. Someone following you from a phone sees it there before they open GitHub. Each clip
89
+ is printed as `Video: <path>`; send those too.
71
90
 
72
91
  ## Rules
73
92
 
@@ -102,5 +121,5 @@ updated. Someone following you from a phone sees it there before they open GitHu
102
121
  To run on every PR without anyone invoking it, point the user to the GitHub Action guide
103
122
  (https://github.com/juangadm/pre-post/blob/main/docs/github-action.md). It posts with GitHub's own token, which also covers work done in cloud sessions.
104
123
 
105
- Login-protected sites: `npx -y @juangadm/pre-post@1.4.0 login https://site` opens a browser
124
+ Login-protected sites: `npx -y @juangadm/pre-post@1.5.0 login https://site` opens a browser
106
125
  once; the saved session is reused automatically.