@iamdangavin/claude-skill-vitepress-docs 3.1.0 → 3.1.5
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.
|
@@ -123,6 +123,10 @@ for (const cap of captures) {
|
|
|
123
123
|
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
|
|
124
124
|
await page.goto(cap.url, { waitUntil: 'load', timeout: 60000 });
|
|
125
125
|
await page.waitForTimeout(cap.settle);
|
|
126
|
+
await page.evaluate(() => {
|
|
127
|
+
const el = document.getElementById('devtools-indicator');
|
|
128
|
+
if (el) el.style.setProperty('display', 'none', 'important');
|
|
129
|
+
});
|
|
126
130
|
await page.screenshot({ path: cap.path, fullPage: false });
|
|
127
131
|
await page.close();
|
|
128
132
|
console.log('Captured', cap.path);
|
|
@@ -134,6 +138,8 @@ SCRIPT
|
|
|
134
138
|
|
|
135
139
|
Adjust `settle` based on stack: WordPress/non-SPA → `500`, Next.js/SPA → `2000`–`4000`.
|
|
136
140
|
|
|
141
|
+
The `devtools-indicator` hide call is safe to include for all stacks — it's a no-op when the element doesn't exist. It specifically targets the Next.js Turbopack dev tools badge (`id="devtools-indicator"`) which is injected at runtime during development and would otherwise appear in every capture.
|
|
142
|
+
|
|
137
143
|
After the batch completes, display each captured image inline with the Read tool for verification.
|
|
138
144
|
|
|
139
145
|
---
|
|
@@ -174,12 +180,33 @@ const context = await browser.newContext({
|
|
|
174
180
|
});
|
|
175
181
|
const page = await context.newPage();
|
|
176
182
|
|
|
183
|
+
// Inject visible cursor overlay for video recordings
|
|
184
|
+
await page.addInitScript(() => {
|
|
185
|
+
const dot = document.createElement('div')
|
|
186
|
+
dot.style.cssText = [
|
|
187
|
+
'position:fixed', 'width:24px', 'height:24px',
|
|
188
|
+
'background:#7C3AED', 'border:12px solid rgba(196,181,253,0.55)',
|
|
189
|
+
'border-radius:50%', 'pointer-events:none', 'z-index:2147483647',
|
|
190
|
+
'transform:translate(-50%,-50%)', 'transition:left 0.05s,top 0.05s',
|
|
191
|
+
'box-sizing:content-box'
|
|
192
|
+
].join(';')
|
|
193
|
+
document.addEventListener('DOMContentLoaded', () => document.body.appendChild(dot))
|
|
194
|
+
document.addEventListener('mousemove', e => {
|
|
195
|
+
dot.style.left = e.clientX + 'px'
|
|
196
|
+
dot.style.top = e.clientY + 'px'
|
|
197
|
+
})
|
|
198
|
+
});
|
|
199
|
+
|
|
177
200
|
const t0 = Date.now();
|
|
178
201
|
const elapsed = () => (Date.now() - t0) / 1000;
|
|
179
202
|
const stepTimings = [];
|
|
180
203
|
|
|
181
204
|
await page.goto(`${BASE_URL}${CAPTURE_URL}`, { waitUntil: 'load', timeout: 60000 });
|
|
182
205
|
await page.waitForTimeout(800);
|
|
206
|
+
await page.evaluate(() => {
|
|
207
|
+
const el = document.getElementById('devtools-indicator');
|
|
208
|
+
if (el) el.style.setProperty('display', 'none', 'important');
|
|
209
|
+
});
|
|
183
210
|
|
|
184
211
|
// STEPS — substituted from manifest steps array:
|
|
185
212
|
// stepTimings.push({ caption: 'CAPTION', time: elapsed() }); await page.click('SELECTOR'); await page.waitForTimeout(MS);
|
|
@@ -597,7 +597,7 @@ const highlightedResponse = computed(() =>
|
|
|
597
597
|
preload="metadata"
|
|
598
598
|
@timeupdate="onTimeUpdate"
|
|
599
599
|
>
|
|
600
|
-
<track v-if="vtt" kind="
|
|
600
|
+
<track v-if="vtt" kind="captions" :src="vtt" default label="Steps" />
|
|
601
601
|
</video>
|
|
602
602
|
</div>
|
|
603
603
|
<ol v-if="steps && steps.length" class="vd__steps">
|
|
@@ -616,7 +616,7 @@ const highlightedResponse = computed(() =>
|
|
|
616
616
|
</template>
|
|
617
617
|
|
|
618
618
|
<script setup>
|
|
619
|
-
import { ref } from 'vue'
|
|
619
|
+
import { ref, onMounted } from 'vue'
|
|
620
620
|
|
|
621
621
|
const props = defineProps({
|
|
622
622
|
src: { type: String, required: true },
|
|
@@ -626,9 +626,19 @@ const props = defineProps({
|
|
|
626
626
|
steps: { type: Array, default: () => [] },
|
|
627
627
|
})
|
|
628
628
|
|
|
629
|
-
const videoEl
|
|
629
|
+
const videoEl = ref(null)
|
|
630
630
|
const activeStep = ref(-1)
|
|
631
631
|
|
|
632
|
+
onMounted(() => {
|
|
633
|
+
if (!videoEl.value || !props.vtt) return
|
|
634
|
+
videoEl.value.addEventListener('loadedmetadata', () => {
|
|
635
|
+
const tracks = videoEl.value.textTracks
|
|
636
|
+
for (let i = 0; i < tracks.length; i++) {
|
|
637
|
+
tracks[i].mode = 'showing'
|
|
638
|
+
}
|
|
639
|
+
})
|
|
640
|
+
})
|
|
641
|
+
|
|
632
642
|
const onTimeUpdate = () => {
|
|
633
643
|
if (!props.steps.length || !videoEl.value) return
|
|
634
644
|
const t = videoEl.value.currentTime
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iamdangavin/claude-skill-vitepress-docs",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5",
|
|
4
4
|
"description": "Installs the vitedocs: Claude Code skill suite — VitePress docs setup, generate, screenshot, sync, brand, and update.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|