screenci 0.0.70 → 0.0.72

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 (108) hide show
  1. package/README.md +13 -13
  2. package/dist/cli.d.ts +9 -0
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +184 -5
  5. package/dist/cli.js.map +1 -1
  6. package/dist/docs/manifest.d.ts +34 -34
  7. package/dist/docs/manifest.d.ts.map +1 -1
  8. package/dist/docs/manifest.js +20 -12
  9. package/dist/docs/manifest.js.map +1 -1
  10. package/dist/docs/video-sources/installation.screenci.js +13 -12
  11. package/dist/docs/video-sources/installation.screenci.js.map +1 -1
  12. package/dist/docs/video-sources/landing.screenci.js +16 -9
  13. package/dist/docs/video-sources/landing.screenci.js.map +1 -1
  14. package/dist/docs/video-sources/locator-highlight-animated.screenci.js +14 -26
  15. package/dist/docs/video-sources/locator-highlight-animated.screenci.js.map +1 -1
  16. package/dist/docs/video-sources/locator-highlight-still.screenci.js +5 -10
  17. package/dist/docs/video-sources/locator-highlight-still.screenci.js.map +1 -1
  18. package/dist/docs/video-sources/product-pitch.screenci.js +97 -32
  19. package/dist/docs/video-sources/product-pitch.screenci.js.map +1 -1
  20. package/dist/docs/video-sources/public-urls.screenci.js +16 -9
  21. package/dist/docs/video-sources/public-urls.screenci.js.map +1 -1
  22. package/dist/docs/video-sources/studio.screenci.js +42 -27
  23. package/dist/docs/video-sources/studio.screenci.js.map +1 -1
  24. package/dist/docs/videos.d.ts +4 -15
  25. package/dist/docs/videos.d.ts.map +1 -1
  26. package/dist/docs/videos.js +6 -22
  27. package/dist/docs/videos.js.map +1 -1
  28. package/dist/index.d.ts +7 -5
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +3 -4
  31. package/dist/index.js.map +1 -1
  32. package/dist/src/asset.d.ts +8 -23
  33. package/dist/src/asset.d.ts.map +1 -1
  34. package/dist/src/asset.js +10 -32
  35. package/dist/src/asset.js.map +1 -1
  36. package/dist/src/audio.d.ts +6 -24
  37. package/dist/src/audio.d.ts.map +1 -1
  38. package/dist/src/audio.js +10 -35
  39. package/dist/src/audio.js.map +1 -1
  40. package/dist/src/builder.d.ts +214 -0
  41. package/dist/src/builder.d.ts.map +1 -0
  42. package/dist/src/builder.js +212 -0
  43. package/dist/src/builder.js.map +1 -0
  44. package/dist/src/cue.d.ts +40 -123
  45. package/dist/src/cue.d.ts.map +1 -1
  46. package/dist/src/cue.js +190 -30
  47. package/dist/src/cue.js.map +1 -1
  48. package/dist/src/events.d.ts +80 -15
  49. package/dist/src/events.d.ts.map +1 -1
  50. package/dist/src/events.js +72 -6
  51. package/dist/src/events.js.map +1 -1
  52. package/dist/src/init.d.ts.map +1 -1
  53. package/dist/src/init.js +26 -14
  54. package/dist/src/init.js.map +1 -1
  55. package/dist/src/locales.d.ts +19 -0
  56. package/dist/src/locales.d.ts.map +1 -0
  57. package/dist/src/locales.js +60 -0
  58. package/dist/src/locales.js.map +1 -0
  59. package/dist/src/localize.d.ts +135 -0
  60. package/dist/src/localize.d.ts.map +1 -0
  61. package/dist/src/localize.js +195 -0
  62. package/dist/src/localize.js.map +1 -0
  63. package/dist/src/localizeRuntime.d.ts +53 -0
  64. package/dist/src/localizeRuntime.d.ts.map +1 -0
  65. package/dist/src/localizeRuntime.js +79 -0
  66. package/dist/src/localizeRuntime.js.map +1 -0
  67. package/dist/src/recordingData.d.ts +5 -4
  68. package/dist/src/recordingData.d.ts.map +1 -1
  69. package/dist/src/runtimeContext.d.ts +3 -4
  70. package/dist/src/runtimeContext.d.ts.map +1 -1
  71. package/dist/src/runtimeContext.js.map +1 -1
  72. package/dist/src/runtimeMode.d.ts +47 -0
  73. package/dist/src/runtimeMode.d.ts.map +1 -1
  74. package/dist/src/runtimeMode.js +124 -0
  75. package/dist/src/runtimeMode.js.map +1 -1
  76. package/dist/src/screenshot.d.ts +56 -2
  77. package/dist/src/screenshot.d.ts.map +1 -1
  78. package/dist/src/screenshot.js +47 -10
  79. package/dist/src/screenshot.js.map +1 -1
  80. package/dist/src/stillCapture.d.ts +2 -3
  81. package/dist/src/stillCapture.d.ts.map +1 -1
  82. package/dist/src/stillCapture.js.map +1 -1
  83. package/dist/src/studio.d.ts +55 -22
  84. package/dist/src/studio.d.ts.map +1 -1
  85. package/dist/src/studio.js +38 -12
  86. package/dist/src/studio.js.map +1 -1
  87. package/dist/src/types.d.ts +18 -5
  88. package/dist/src/types.d.ts.map +1 -1
  89. package/dist/src/types.js.map +1 -1
  90. package/dist/src/video.d.ts +149 -13
  91. package/dist/src/video.d.ts.map +1 -1
  92. package/dist/src/video.js +91 -24
  93. package/dist/src/video.js.map +1 -1
  94. package/dist/src/voiceConfig.d.ts +110 -0
  95. package/dist/src/voiceConfig.d.ts.map +1 -0
  96. package/dist/src/voiceConfig.js +2 -0
  97. package/dist/src/voiceConfig.js.map +1 -0
  98. package/dist/src/voices.d.ts +27 -23
  99. package/dist/src/voices.d.ts.map +1 -1
  100. package/dist/src/voices.js +7 -4
  101. package/dist/src/voices.js.map +1 -1
  102. package/dist/tsconfig.tsbuildinfo +1 -1
  103. package/package.json +1 -1
  104. package/skills/screenci/SKILL.md +39 -30
  105. package/dist/docs/video-sources/cli.screenci.d.ts +0 -2
  106. package/dist/docs/video-sources/cli.screenci.d.ts.map +0 -1
  107. package/dist/docs/video-sources/cli.screenci.js +0 -36
  108. package/dist/docs/video-sources/cli.screenci.js.map +0 -1
@@ -50,36 +50,40 @@ ScreenCI uses Playwright-style `.screenci.ts` files and adds recording-specific
50
50
  - `hide()` removes setup and loading sections from the final recording.
51
51
  - `autoZoom()` follows navigation, click-driven, and broader interaction sequences with smooth camera motion. Use it sparingly, and start with its default options unless the user explicitly asks for different zoom behavior or the flow clearly needs a targeted override.
52
52
  - `zoomTo()` and `resetZoom()` are better for forms and other steady editing sections where the camera should stay fixed while the user types, selects, toggles, and confirms within one area.
53
- - `createNarration()` is mandatory for every video: define it in every `.screenci.ts` file and include spoken narration throughout the demo. The opening narration should first state the purpose of the video, then continue with the explanation or walkthrough. Define the map once, then call `await narration.key()` for the common case where the full line should run before moving on. Use `await narration.key.start()` when narration should overlap with the next action, and `await narration.key.end()` only to close that same active cue later, especially before visible navigation or route changes.
53
+ - `video.localize({ narration })` is mandatory for every video: declare narration in every `.screenci.ts` file and include spoken narration throughout the demo. The opening narration should first state the purpose of the video, then continue with the explanation or walkthrough. The body receives the `narration` marker object: call `await narration.key()` for the common case where the full line should run before moving on. Use `await narration.key.start()` when narration should overlap with the next action, and `await narration.key.end()` only to close that same active cue later, especially before visible navigation or route changes. Voice is set in the same localize spec via `voice` (one config for all languages, or a per-language map), and a single cue can override it with the `{ cue, voice }` object form.
54
54
  - Narration text can include inline speech-control tags such as `[pronounce: screen see eye]`, `[short pause]`, `[medium pause]`, and `[long pause]` when a word needs guided pronunciation or an intentional pause. When narration includes a URL or domain name, add a pronunciation guide or rewrite the line so it will be spoken clearly. Example: `screenci.com [pronounce: screen see eye dot com]`.
55
55
 
56
56
  Example:
57
57
 
58
58
  ```ts
59
- const narration = createNarration({
60
- intro:
61
- 'This video shows how to update your billing details and save the changes.',
62
- explainForm:
63
- 'We start on the billing page and update the company name, email, and tax ID.',
64
- saving: 'Now we save the changes and wait for the confirmation message.',
65
- nextPage:
66
- 'Next, we open the invoices section to confirm the new billing details are in use.',
59
+ video.localize({
60
+ narration: {
61
+ en: {
62
+ intro:
63
+ 'This video shows how to update your billing details and save the changes.',
64
+ explainForm:
65
+ 'We start on the billing page and update the company name, email, and tax ID.',
66
+ saving: 'Now we save the changes and wait for the confirmation message.',
67
+ nextPage:
68
+ 'Next, we open the invoices section to confirm the new billing details are in use.',
69
+ },
70
+ },
71
+ })('Update billing details', async ({ page, narration }) => {
72
+ await narration.intro()
73
+ await narration.explainForm()
74
+ await narration.saving.start()
75
+ await page.getByRole('button', { name: 'Save changes' }).click()
76
+ await narration.saving.end()
77
+ await narration.nextPage()
78
+ await page.getByRole('link', { name: 'Invoices' }).click()
67
79
  })
68
-
69
- await narration.intro()
70
- await narration.explainForm()
71
- await narration.saving.start()
72
- await page.getByRole('button', { name: 'Save changes' }).click()
73
- await narration.saving.end()
74
- await narration.nextPage()
75
- await page.getByRole('link', { name: 'Invoices' }).click()
76
80
  ```
77
81
 
78
82
  ## Required Conventions
79
83
 
80
84
  **Every video MUST follow these conventions:**
81
85
 
82
- - **Narration on every video (required, no exceptions)** — always define `createNarration({ ... })` and add narration to every `.screenci.ts` file. Videos without narration are not acceptable.
86
+ - **Narration on every video (required, no exceptions)** — always declare `video.localize({ narration: { ... } })` and add narration to every `.screenci.ts` file. Videos without narration are not acceptable.
83
87
  - **Open with the video's purpose** — the first spoken narration should clearly state what the video is for before moving into the step-by-step explanation.
84
88
  - **Guide pronunciation for URLs and domains** — if narration says a URL, domain, product name, or other term that a voice model might read incorrectly, add a `[pronounce: ...]` hint or phrase it in a clearly spoken way.
85
89
  - **Start on the requested page** — the visible video should always begin on the page the user requested.
@@ -153,22 +157,27 @@ How to handle the non-interactive case (this is the common case for agents):
153
157
  1. Start from the existing initialized ScreenCI package. Early on, surface the sign-in link to the user (printed by `screenci init`, or by running `npx screenci record` once, or from `screenci/.screenci/link-session.json`) and ask them to sign in while you build the video. The link is valid for 24 hours and only needs to be used before the final recording.
154
158
  2. Add or edit `.screenci.ts` files in `videos/`.
155
159
  Remove `videos/example.screenci.ts` if you are creating new videos and do not need the starter video.
156
- For narration, define `const narration = createNarration({ ... })` near the top of the file and trigger lines with `await narration.someKey()` when the full line should finish before moving on. Use `await narration.someKey.start()` only when narration should overlap with the next action, and `await narration.someKey.end()` only to close that same active cue later. This is especially important before visible navigation or page changes. Use inline tags like `[pronounce: ...]` and `[short pause]` inside cue text when needed, especially for URLs and domains such as `screenci.com [pronounce: screen see eye dot com]`.
160
+ For narration, declare it on the test with `video.localize({ narration: { en: { ... } } })` and trigger lines from the `narration` fixture with `await narration.someKey()` when the full line should finish before moving on. Use `await narration.someKey.start()` only when narration should overlap with the next action, and `await narration.someKey.end()` only to close that same active cue later. This is especially important before visible navigation or page changes. Use inline tags like `[pronounce: ...]` and `[short pause]` inside cue text when needed, especially for URLs and domains such as `screenci.com [pronounce: screen see eye dot com]`.
157
161
  Example:
158
162
 
159
163
  ```ts
160
- const narration = createNarration({
161
- intro: 'This video shows how to export a monthly sales report.',
162
- filters:
163
- 'First, we set the report range and select the sales channel filters.',
164
- export: 'Then we export the report and wait for the download to start.',
164
+ video.localize({
165
+ narration: {
166
+ en: {
167
+ intro: 'This video shows how to export a monthly sales report.',
168
+ filters:
169
+ 'First, we set the report range and select the sales channel filters.',
170
+ export:
171
+ 'Then we export the report and wait for the download to start.',
172
+ },
173
+ },
174
+ })('Export sales report', async ({ page, narration }) => {
175
+ await narration.intro()
176
+ await narration.filters()
177
+ await narration.export.start()
178
+ await page.getByRole('button', { name: 'Export CSV' }).click()
179
+ await narration.export.end()
165
180
  })
166
-
167
- await narration.intro()
168
- await narration.filters()
169
- await narration.export.start()
170
- await page.getByRole('button', { name: 'Export CSV' }).click()
171
- await narration.export.end()
172
181
  ```
173
182
 
174
183
  3. Run `npx screenci test` until it passes.
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cli.screenci.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.screenci.d.ts","sourceRoot":"","sources":["../../../docs/video-sources/cli.screenci.ts"],"names":[],"mappings":""}
@@ -1,36 +0,0 @@
1
- import { autoZoom, createNarration, hide, resetZoom, video, voices, zoomTo, } from 'screenci';
2
- const narration = createNarration({
3
- voice: { name: voices.Sophie },
4
- en: {
5
- intro: 'This video introduces the CLI reference and the most common ScreenCI commands.',
6
- source: 'The page includes the ScreenCI source used to walk through the reference.',
7
- focus: 'One of the key command sections covers screenci test and the normal local iteration loop.',
8
- next: 'The same reference also covers the final screenci record flow.',
9
- },
10
- });
11
- video('CLI reference walkthrough', async ({ page }) => {
12
- await hide(async () => {
13
- await page.goto('https://screenci.com/docs/reference/cli');
14
- await page.waitForLoadState('networkidle');
15
- });
16
- await narration.intro();
17
- await narration.source.start();
18
- await autoZoom(async () => {
19
- await page.getByText('Show source').first().click();
20
- });
21
- await narration.source.end();
22
- await narration.focus();
23
- await zoomTo(page.getByRole('heading', { name: /screenci test \[playwrightArgs/ }));
24
- await page.waitForTimeout(700);
25
- await resetZoom();
26
- await narration.next();
27
- await autoZoom(async () => {
28
- await page
29
- .getByRole('heading', { name: /screenci record \[playwrightArgs/ })
30
- .scrollIntoViewIfNeeded();
31
- });
32
- await zoomTo(page.getByRole('heading', { name: /screenci record \[playwrightArgs/ }));
33
- await page.waitForTimeout(700);
34
- await resetZoom();
35
- });
36
- //# sourceMappingURL=cli.screenci.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.screenci.js","sourceRoot":"","sources":["../../../docs/video-sources/cli.screenci.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAM,GACP,MAAM,UAAU,CAAA;AAEjB,MAAM,SAAS,GAAG,eAAe,CAAC;IAChC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;IAC9B,EAAE,EAAE;QACF,KAAK,EACH,gFAAgF;QAClF,MAAM,EACJ,2EAA2E;QAC7E,KAAK,EACH,2FAA2F;QAC7F,IAAI,EAAE,gEAAgE;KACvE;CACF,CAAC,CAAA;AAEF,KAAK,CAAC,2BAA2B,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACpD,MAAM,IAAI,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,IAAI,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAA;QAC1D,MAAM,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;IAEF,MAAM,SAAS,CAAC,KAAK,EAAE,CAAA;IACvB,MAAM,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;IAC9B,MAAM,QAAQ,CAAC,KAAK,IAAI,EAAE;QACxB,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAA;IACrD,CAAC,CAAC,CAAA;IACF,MAAM,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,CAAA;IAE5B,MAAM,SAAS,CAAC,KAAK,EAAE,CAAA;IACvB,MAAM,MAAM,CACV,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,gCAAgC,EAAE,CAAC,CACtE,CAAA;IACD,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAA;IAC9B,MAAM,SAAS,EAAE,CAAA;IAEjB,MAAM,SAAS,CAAC,IAAI,EAAE,CAAA;IACtB,MAAM,QAAQ,CAAC,KAAK,IAAI,EAAE;QACxB,MAAM,IAAI;aACP,SAAS,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,kCAAkC,EAAE,CAAC;aAClE,sBAAsB,EAAE,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,MAAM,MAAM,CACV,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,kCAAkC,EAAE,CAAC,CACxE,CAAA;IACD,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAA;IAC9B,MAAM,SAAS,EAAE,CAAA;AACnB,CAAC,CAAC,CAAA"}