Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
506 commits
Select commit Hold shift + click to select a range
cadc86d
Add new docs changeset. ignore docs/examples from changeset
techniq Feb 18, 2026
17481a9
cleanup changeset
techniq Feb 18, 2026
13281d0
Version Packages (next) (#791)
github-actions[bot] Feb 18, 2026
eedaca4
Setup OIDC publishing
techniq Feb 18, 2026
abf8745
Fix @dagrejs/dagre "module is not defined" SSR error
techniq Feb 19, 2026
fccfaf4
update deps
techniq Feb 19, 2026
f223aee
update content-collection and eslint
techniq Feb 19, 2026
51ed59d
Update Svelte to 5.51.5 (before rollup issue of 5.52.0)
techniq Feb 19, 2026
d35216e
Rename collections => content after updating content-collections
techniq Feb 19, 2026
d6db150
Update dagre 1.1.8 => 2.0.4, fix CJS/ESM build and dev issues
techniq Feb 19, 2026
e14d7c7
fix: Workaround Svelte 5.52+ regression (Parse failure: Expected '{',…
techniq Feb 19, 2026
300e7dd
Version Packages (next) (#792)
github-actions[bot] Feb 19, 2026
751002e
Update examples to latest `layerchart@next` release
techniq Feb 19, 2026
ea1eee6
Merge branch 'next' of https://github.com/techniq/layerchart into next
techniq Feb 19, 2026
fb1aa0e
fix direct loading of example after enabling SSR
techniq Feb 20, 2026
89b267d
Improve loading boundary display
techniq Feb 20, 2026
4a0cbea
Fix SSR display of examples browse info
techniq Feb 20, 2026
76337a3
Improve display of Search with SSR
techniq Feb 20, 2026
9b0bc70
Disable SSR for examples page
techniq Feb 20, 2026
9513216
initial pass Auto-Showcase (#798)
cycle4passion Mar 5, 2026
1422855
Use a dedicated github token instead of the provided GITHUB_TOKEN for…
techniq Mar 7, 2026
0c2d44e
Enable full page prerender for showcase
techniq Mar 7, 2026
5d84279
Fix some rehydration errors due to nested `<a>` tags
techniq Mar 7, 2026
3dab67e
Add conditional rendering for edit link and remove style to hide it
techniq Mar 9, 2026
b05a264
Add star counts to featured/supporter/highlighted sites and fix dedup…
techniq Mar 9, 2026
706ba9c
Correctly set llms.txt base url based on deployed origin (use next.la…
techniq Mar 12, 2026
bc472d7
on the README.md. The NPM badges were formatted incorrectly causing a…
cycle4passion Mar 15, 2026
e7cf1b7
Move "Become a sponsor" link to the correct location
techniq Mar 16, 2026
f60f482
Merge branch 'next' of https://github.com/techniq/layerchart into next
techniq Mar 16, 2026
ac0a5ba
Update deps (include Svelte UX, fixing MenuField chevron)
techniq Mar 21, 2026
d89513c
Downgrade unocss examle from Vite 8 => 7 (not compat yet)
techniq Mar 21, 2026
f6f7778
Update deps
techniq Mar 21, 2026
0d35cae
fix(TooltipContext): correct hit detection by accounting for chart p…
blowindblo Mar 26, 2026
cf67868
State improvements (#663)
techniq Mar 31, 2026
4c9eac2
Fix changeset
techniq Mar 31, 2026
4a93215
Version Packages (next) (#807)
github-actions[bot] Mar 31, 2026
dd4932a
Improve primitive geo docs
techniq Mar 31, 2026
714fad6
fix(ChartState): Don't create spurious implicit series when mark acce…
techniq Mar 31, 2026
f7fe3e3
Version Packages (next) (#808)
github-actions[bot] Mar 31, 2026
4bc9846
Fix Spline/gradient.threshold example
techniq Apr 1, 2026
adcf92a
feat(Raster, Contour): support bounded geo raster overlays with proje…
techniq Apr 1, 2026
8a2d4b0
fix(LinearGradient, RadialGradient): Register as `group` instead of `…
techniq Apr 1, 2026
aedbf02
Add gauge, speedometer, and clock Arc examples
techniq Apr 1, 2026
1c7afa1
add waterfall example
techniq Apr 1, 2026
cc83739
Add gauge-gradient example and improve speedometer
techniq Apr 1, 2026
078bc8d
feat(Text): Add `format` prop and tween numeric `value` when `motion`…
techniq Apr 1, 2026
05eecaa
Add comapny and proramming language bar chart race examples
techniq Apr 1, 2026
deb9d70
improve gauge gradient example
techniq Apr 1, 2026
230651a
generate catalog and screenshots
techniq Apr 1, 2026
3186880
Update frontpage examples
techniq Apr 1, 2026
8ffc5da
dynamic-smart-labels (#799)
cycle4passion Apr 1, 2026
5ae89bb
Add squares to markers (#805)
cycle4passion Apr 1, 2026
42df576
feat: Month component (#671)
techniq Apr 1, 2026
ccbef88
feat(Chart, BrushState): Add band scale (categorical) support for tra…
techniq Apr 1, 2026
9bdd4c4
Support `tickSpacing` for band scales on Axis, thinning tick labels w…
techniq Apr 1, 2026
bbbb5f8
Allow passing `null` to ignore tickSpacing for band scales
techniq Apr 1, 2026
00c31da
update catalog and screenshots
techniq Apr 1, 2026
d980aa1
Add "Best match" group to search results for title matches
techniq Apr 2, 2026
8076129
Fix searching before index is loaded
techniq Apr 2, 2026
9d22650
fix(GeoPath): Fix canvas tooltip by conditionally passing onclick to …
techniq Apr 2, 2026
5d8103c
fix(TransformContext): Reactively sync `processTranslate` and `disabl…
techniq Apr 2, 2026
cca8196
fix(Chart): Enable scroll zoom for globe projections by including `sc…
techniq Apr 2, 2026
796f066
feat(Chart): In projection mode, `scaleExtent` and `translateExtent` …
techniq Apr 2, 2026
b87ae66
Add GeoProjection/true-size to easily compare countries and us state …
techniq Apr 2, 2026
6566f57
perf: Optimize primitive component instantiation (~3-5x faster for Re…
techniq Apr 2, 2026
2badfaa
fix(bench): Reduce primitives benchmark to prevent browser tab crash …
techniq Apr 2, 2026
1274e2c
feat(Spline): Support function-valued `stroke`, `fill`, and `opacity`…
techniq Apr 2, 2026
036b3d7
Update catalog and screenshots
techniq Apr 2, 2026
0fb5400
Version Packages (next) (#810)
github-actions[bot] Apr 2, 2026
1d888f8
fix(Axis): Default `tickSpacing` to `null` for band scales, showing a…
techniq Apr 3, 2026
f00228c
Add interpolating projections examples
techniq Apr 3, 2026
17e310e
fix(Axis): Default `tickSpacing` to `null` for categorical band scale…
techniq Apr 3, 2026
adcd155
Support custom example title and description via <script module> exports
techniq Apr 3, 2026
435d3bd
fix(Spline): Make motion prop reactive so toggling between tween/none…
techniq Apr 3, 2026
f279660
feat: New Trail component for variable-width lines
techniq Apr 3, 2026
f7b9dbe
generate catalog and screenshots
techniq Apr 3, 2026
7178eaa
Version Packages (next) (#812)
github-actions[bot] Apr 4, 2026
ece062c
Add examples to frontpage
techniq Apr 4, 2026
f1f9952
Merge branch 'next' of https://github.com/techniq/layerchart into next
techniq Apr 4, 2026
ad022e7
Ignore bench tests when running `pnpm test:unit`
techniq Apr 6, 2026
e974a50
fix: Skip mark x/y/data from domain/series calculation when geo proje…
techniq Apr 6, 2026
9bef7ac
SSR chart images (#813)
techniq Apr 7, 2026
c33b74c
GeoRaster component (#815)
techniq Apr 7, 2026
c8a7c4d
Version Packages (next) (#814)
github-actions[bot] Apr 7, 2026
81757bf
feat(Labels): Add `middle` placement and change `center` to center wi…
techniq Apr 7, 2026
d505f8e
New ArcLabel component (#817)
techniq Apr 8, 2026
81c7d67
Default `PieChart labels` to `placement="callout"
techniq Apr 8, 2026
194b550
Remove ArcChart/labels and just use ArcChart/series-labels example in…
techniq Apr 8, 2026
4dad826
update catalog and images
techniq Apr 8, 2026
1cf8cc6
Legends (new CircleLegend and GeoLegend) and value indicator (tooltip…
techniq Apr 8, 2026
1fc2b94
update catalog and screenshots
techniq Apr 8, 2026
79b643d
persist-series-brush (#819)
cycle4passion Apr 9, 2026
b625487
update catalog and images
techniq Apr 9, 2026
85076f1
Version Packages (next) (#816)
github-actions[bot] Apr 9, 2026
8f676ef
feat: Support pre-projected topologies in `GeoLegend` via `referenceS…
techniq Apr 9, 2026
93e3b09
Version Packages (next) (#820)
github-actions[bot] Apr 9, 2026
7851939
Upgrade deps
techniq Apr 12, 2026
1be8c7d
fix: Skip known routes when resolving individual example pages in com…
techniq Apr 12, 2026
baa5525
fix: Move top-level await to <script module> in example components to…
techniq Apr 12, 2026
4350937
fix: Restore bind:this on example component for Data button
techniq Apr 12, 2026
970ae27
Update `compound-common-scale-with-extra-marks` to only show support …
techniq Apr 12, 2026
83aa90f
Fix build
techniq Apr 12, 2026
9b0267d
feat: New `GeoClipPath` component for clipping content to GeoJSON bou…
techniq Apr 12, 2026
b538c96
Update catalog and screenshots
techniq Apr 12, 2026
781f21e
feat(Text): Add `segments` prop to `Text` component for inline mixed-…
techniq Apr 12, 2026
e6af86a
Update catalog and screenshots
techniq Apr 12, 2026
c8faeb7
fix: Pie and Arc components now correctly use Chart's `xRange` prop f…
techniq Apr 13, 2026
226223b
Update test after fixing Arc xRange handling
techniq Apr 13, 2026
9247725
Fix Canvas support for some Partition examples by using Text componen…
techniq Apr 13, 2026
4a83def
fix(ArcLabel): Support rotation in Canvas mode
techniq Apr 13, 2026
b736509
cell-punchcard (#826)
cycle4passion Apr 13, 2026
e795e9a
Change SVG for download (#822)
cycle4passion Apr 13, 2026
5bab8e7
Motion examples using showField.svelte do not show/start until in vie…
cycle4passion Apr 13, 2026
8d8572f
math-formula (#824)
cycle4passion Apr 13, 2026
6ac6eca
Fix Cloudflare Pages deploy by externalizing mathjs from SSR bundle
techniq Apr 13, 2026
1d9bb45
Improve Hull and Contour docs
techniq Apr 13, 2026
0bc8bda
fix(docs): dynamically import mathjs to avoid Cloudflare Workers depl…
techniq Apr 13, 2026
9095cb9
feat(Hull): Add CommonStyleProps (fill, fillOpacity, stroke, strokeOp…
techniq Apr 13, 2026
4d24f42
Update catalog and screenshots
techniq Apr 13, 2026
365f05b
feat(Tooltip): Portal tooltip to body by default to fix overflow clip…
techniq Apr 13, 2026
4bbf39c
Version Packages (next) (#827)
github-actions[bot] Apr 13, 2026
8ea7f62
Update catalog and screenshots
techniq Apr 13, 2026
379c766
Fix searching example for "true"
techniq Apr 13, 2026
ef9c17f
Add GeoProjection/true-size-globe example
techniq Apr 13, 2026
fb1cb66
Add GeoPath/paint-brush-selection
techniq Apr 14, 2026
395d3f9
Update catalog and screenshots
techniq Apr 14, 2026
950131e
Add pan/zoom to pain-brush-selection example
techniq Apr 14, 2026
91e37ed
Correct layer support for ArcLabel, *ClipPath, Contour, Group, and To…
techniq Apr 14, 2026
baccd4d
fix clipped-area-on-tooltip example
techniq Apr 14, 2026
fc18730
feat(Bar, Bars): Support `<Html>` layer
techniq Apr 14, 2026
1bac9f3
Update ChartClipPath layer support
techniq Apr 14, 2026
219a522
feat(Line, Rect, Circle, Text): Multi-layer compatible `dashArray` an…
techniq Apr 14, 2026
35c9d00
feat(ClipPath, RectClipPath, CircleClipPath, GeoClipPath): HTML layer…
techniq Apr 14, 2026
ed7729c
docs: derive example layer toggle from used components
techniq Apr 14, 2026
27e7067
feat(ClipPath, RectClipPath, CircleClipPath, GeoClipPath): Add `inver…
techniq Apr 14, 2026
0652782
update catalog and screenshots
techniq Apr 14, 2026
dae0fb7
docs: Update ClipPath docs with `clip` snippet and `useId` examples
techniq Apr 15, 2026
49288fa
Add text selectable/copyable feature to layers table
techniq Apr 15, 2026
dc52e62
feat(Tree, Link, Connector): Add radial support (#831)
techniq Apr 16, 2026
b4e0f95
update catalog and screenshots
techniq Apr 16, 2026
f7d9ec5
Delay screenshots motion (#833)
cycle4passion Apr 17, 2026
4f5f1c9
strong-webkit-fix (#832)
cycle4passion Apr 17, 2026
7e70384
Version Packages (next) (#829)
github-actions[bot] Apr 17, 2026
62f8154
fix(Pattern): Restore canvas layer support by registering as a `group…
techniq Apr 17, 2026
3d74f13
feat(Pattern): Support `<Html>` layer by producing CSS `repeating-lin…
techniq Apr 17, 2026
1fd5b8b
fix(Rect, Circle, Ellipse): On the `<Html>` layer, default `border-wi…
techniq Apr 17, 2026
9fb2c97
feat(Circle, Ellipse): Support pattern/gradient `fill` values on the …
techniq Apr 17, 2026
99c25b2
prettier
techniq Apr 17, 2026
70b004d
Version Packages (next) (#834)
github-actions[bot] Apr 17, 2026
4274694
fix screenshot delay logic
techniq Apr 17, 2026
26f9634
fix(AnnotationRange): Don't extend past chart bounds when `x` is omit…
techniq Apr 17, 2026
2a8ec5e
docs(Text/Segments): Fix Html styling
techniq Apr 17, 2026
02ed9d4
Merge branch 'next' of https://github.com/techniq/layerchart into next
techniq Apr 17, 2026
0790c42
fix typo
techniq Apr 17, 2026
9e75063
update catalog and screenshots
techniq Apr 17, 2026
6b15467
fix(Spline): Restore `series.props.opacity` (and other style props) p…
techniq Apr 17, 2026
c9ff70b
fix(ChartState): Don't filter explicit `x1Domain`/`y1Domain` by visib…
techniq Apr 17, 2026
f09e4cb
update screenshots
techniq Apr 17, 2026
88bf924
Version Packages (next) (#835)
github-actions[bot] Apr 17, 2026
a2fb33c
docs(releases): Auto-fetch releases on publish. Trigger prod deploy o…
techniq Apr 19, 2026
c06f8f5
docs(releases): Move generated output to a new `docs/generated/` dir …
techniq Apr 19, 2026
8f98b4a
fix-header-link-onhover (#836)
cycle4passion Apr 19, 2026
724f9e7
getting-start-text (#837)
cycle4passion Apr 19, 2026
23004c8
Improve code examples in release notes (including diff)
techniq Apr 19, 2026
8c40094
Merge branch 'next' of https://github.com/techniq/layerchart into next
techniq Apr 19, 2026
f1485aa
docs(search): support multi-word queries
techniq Apr 19, 2026
e9bb3da
docs(search): support `tags` export on examples
techniq Apr 19, 2026
2a1dc05
fix(Text): Allow negative string values (e.g. `y="-6"`) in position p…
techniq Apr 19, 2026
5fdc05d
fix(Connector, Link): Orient d3 step curves by `orientation`
techniq Apr 19, 2026
507a747
feat(Connector): Add `'swoop'` connector type
techniq Apr 19, 2026
07b03a9
breaking: Merge `Connector` into `Link`, remove `Connector` component
techniq Apr 19, 2026
4ed67f7
add links and types examples
techniq Apr 19, 2026
bb9ceaa
fix(Chart): Explicit `<Chart data>` now takes precedence over marks' …
techniq Apr 20, 2026
6220129
fix domain handling
techniq Apr 20, 2026
7f94421
feat(tooltipContext, Voronoi): Add `x`/`y` accessor overrides and def…
techniq Apr 20, 2026
593bb38
add bended arrows/link example
techniq Apr 20, 2026
83b042b
generate catalog and screenshots
techniq Apr 20, 2026
af929eb
add more Link related components
techniq Apr 20, 2026
309b6df
Remove Connector from Path related
techniq Apr 20, 2026
77315dd
feat(AnnotationPoint): Add `link` prop for ring-note style callouts
techniq Apr 20, 2026
d5f7ab1
feat(AnnotationPoint): Add geo support
techniq Apr 21, 2026
eb6ff18
fix(GeoPath): Avoid passing `undefined` event handlers to underlying …
techniq Apr 21, 2026
646d834
feat(AnnotationLine): Add `x1`/`y1`/`x2`/`y2` props for sloped lines
techniq Apr 21, 2026
5750551
update catalog and screenshots
techniq Apr 21, 2026
b88d65f
Retry unauthenticated if the provided token is rejected
techniq Apr 21, 2026
e896788
Add AnnotationLine/playground example
techniq Apr 21, 2026
a986ec4
update catalog and screenshots
techniq Apr 21, 2026
afa67f6
Version Packages (next) (#838)
github-actions[bot] Apr 21, 2026
190fa9d
Render API descriptions via content-collections, drop /generated/api …
techniq Apr 22, 2026
b4aba8f
`pnpm dev` now run `pnpm dev` in parrallel for both packagesl/layerch…
techniq Apr 22, 2026
992b25e
add basic svelte-milestones example
techniq Apr 23, 2026
591b1ae
fix: Prevent submitting forms when clicking legend buttons (#841)
ieedan Apr 24, 2026
4fd8d40
Version Packages (next) (#842)
github-actions[bot] Apr 24, 2026
729aa6e
Merge branch 'next' of https://github.com/techniq/layerchart into next
techniq Apr 24, 2026
a6520bf
fix(docs): replace `{#await}` with `query.loading`/`current` in Stats
techniq Apr 26, 2026
08e3465
Bundle analyzer (#843)
techniq Apr 26, 2026
c30f87f
Merge branch 'next' of https://github.com/techniq/layerchart into next
techniq Apr 26, 2026
2cdf99d
Improve bundle analyzer: count sync deps, add treemap visualization
techniq Apr 26, 2026
888c990
Reduce bundle size (#845)
techniq Apr 27, 2026
723889c
chore: update bundle size baseline (#847)
github-actions[bot] Apr 27, 2026
9c074ba
Version Packages (next) (#846)
github-actions[bot] Apr 29, 2026
2c21908
Reduce bundle size: Layer-specific components (#848)
techniq Apr 29, 2026
2d8e190
chore: update bundle size baseline (#850)
github-actions[bot] Apr 29, 2026
04ae35a
Version Packages (next) (#849)
github-actions[bot] Apr 29, 2026
4d911b0
Fix API generation after refactor from bundle size changes
techniq Apr 30, 2026
7fee2ca
Move tests into component directories
techniq Apr 30, 2026
920a4de
fix typo
techniq Apr 30, 2026
58a616d
update catalog
techniq Apr 30, 2026
7d401cc
update screenshots
techniq Apr 30, 2026
2a45e2c
feat(Blur): Add Canvas support
techniq Apr 30, 2026
aea5f8b
fix CI
techniq Apr 30, 2026
3f00930
perf improvements (#855)
techniq May 1, 2026
a367caf
chore: update bundle size baseline (#854)
github-actions[bot] May 1, 2026
62ed1a1
perf(Chart): Eliminate per-instance props spread in `ChartState` (#857)
techniq May 1, 2026
c4deacb
chore: update bundle size baseline (#858)
github-actions[bot] May 1, 2026
4cc1bb4
Version Packages (next) (#853)
github-actions[bot] May 1, 2026
753b19b
fix(Chart): Don't compute `[undefined, undefined]` domain when `serie…
techniq May 1, 2026
9f636d0
feat: Dodge layout component (#862)
techniq May 5, 2026
65284e9
Update catalog and screenshots
techniq May 5, 2026
20e7a02
docs: split "layouts by industry" by year by default
techniq May 5, 2026
388adb7
fix(Spline): Allow CSS class `opacity` to fade lines on the Canvas la…
techniq May 6, 2026
ac2c589
Fix BarChart/single-dimension example when using Html layers (
techniq May 6, 2026
8500bfd
fix(canvas): Resolve `currentColor` for `fill`/`stroke` (and other st…
techniq May 6, 2026
9f9eff0
chore: update bundle size baseline (#860)
github-actions[bot] May 8, 2026
1ef145f
feat: Waffle component (#864)
techniq May 8, 2026
86cf43d
Update catalog and screenshots
techniq May 8, 2026
0d05459
Fix "View Component Source" after bundle size refactor (per-layer com…
techniq May 8, 2026
2ff3e09
fix(downloadImage / getChartImageBlob): Fix image download (container…
techniq May 8, 2026
276f672
Support toggle middle point
techniq May 9, 2026
1b75920
chore: update bundle size baseline (#865)
github-actions[bot] May 9, 2026
7a70e55
fix(Rect): Support non-uniform `corners` in data/edge mode
techniq May 9, 2026
6e10a20
Merge branch 'next' of https://github.com/techniq/layerchart into next
techniq May 9, 2026
da6fee1
Version Packages (next) (#859)
github-actions[bot] May 9, 2026
f95842c
chore: update bundle size baseline (#867)
github-actions[bot] May 10, 2026
3bf7e5e
fix(ArcChart): (Re-)disable grid by default (regression from recent r…
techniq May 18, 2026
b6bacb5
Version Packages (next) (#870)
github-actions[bot] May 18, 2026
0ca9f0b
Update deps
techniq Jun 3, 2026
1f494e5
update node versoin in CI workflows
techniq Jun 3, 2026
ab36488
fix: Remove TypeScript `as` casts from `class={...}` attributes in `P…
techniq Jun 3, 2026
62a1585
fix: Resolve `groupStackData` type errors from updated `d3-shape` typ…
techniq Jun 3, 2026
2dbbe9c
fix(ChartState): Prevent `Cannot read properties of null (reading 'ax…
techniq Jun 3, 2026
c232fe3
fix: guard against undefined accessor in printScale (#875)
ruizdiazever Jun 4, 2026
34a15d0
Version Packages (next) (#874)
github-actions[bot] Jun 4, 2026
189947d
Run bundle analysis comment as a separate workflow to allow forked PR…
techniq Jun 4, 2026
5cacbc7
Extract docs (#878)
techniq Jul 1, 2026
2edacfc
Brush constraints (#879)
techniq Jul 1, 2026
8950cf4
chore: update bundle size baseline (#871)
github-actions[bot] Jul 1, 2026
5d4f347
Version Packages (next) (#880)
github-actions[bot] Jul 1, 2026
a941d9e
Exit prerelease mode
techniq Jul 1, 2026
a5a1f5f
Version Packages (#882)
github-actions[bot] Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 9 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": [
"docs",
"daisyui-5",
"shadcn-svelte-1",
"skeleton-3",
"skeleton4",
"standalone",
"svelteux-2"
]
}
259 changes: 259 additions & 0 deletions .claude/skills/playwright-cli/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
---
name: playwright-cli
description: Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
allowed-tools: Bash(playwright-cli:*)
---

# Browser Automation with playwright-cli

## Quick start

```bash
# open new browser
playwright-cli open
# navigate to a page
playwright-cli goto https://playwright.dev
# interact with the page using refs from the snapshot
playwright-cli click e15
playwright-cli type "page.click"
playwright-cli press Enter
# take a screenshot
playwright-cli screenshot
# close the browser
playwright-cli close
```

## Commands

### Core

```bash
playwright-cli open
# open and navigate right away
playwright-cli open https://example.com/
playwright-cli goto https://playwright.dev
playwright-cli type "search query"
playwright-cli click e3
playwright-cli dblclick e7
playwright-cli fill e5 "user@example.com"
playwright-cli drag e2 e8
playwright-cli hover e4
playwright-cli select e9 "option-value"
playwright-cli upload ./document.pdf
playwright-cli check e12
playwright-cli uncheck e12
playwright-cli snapshot
playwright-cli snapshot --filename=after-click.yaml
playwright-cli eval "document.title"
playwright-cli eval "el => el.textContent" e5
playwright-cli dialog-accept
playwright-cli dialog-accept "confirmation text"
playwright-cli dialog-dismiss
playwright-cli resize 1920 1080
playwright-cli close
```

### Navigation

```bash
playwright-cli go-back
playwright-cli go-forward
playwright-cli reload
```

### Keyboard

```bash
playwright-cli press Enter
playwright-cli press ArrowDown
playwright-cli keydown Shift
playwright-cli keyup Shift
```

### Mouse

```bash
playwright-cli mousemove 150 300
playwright-cli mousedown
playwright-cli mousedown right
playwright-cli mouseup
playwright-cli mouseup right
playwright-cli mousewheel 0 100
```

### Save as

```bash
playwright-cli screenshot
playwright-cli screenshot e5
playwright-cli screenshot --filename=page.png
playwright-cli pdf --filename=page.pdf
```

### Tabs

```bash
playwright-cli tab-list
playwright-cli tab-new
playwright-cli tab-new https://example.com/page
playwright-cli tab-close
playwright-cli tab-close 2
playwright-cli tab-select 0
```

### Storage

```bash
playwright-cli state-save
playwright-cli state-save auth.json
playwright-cli state-load auth.json

# Cookies
playwright-cli cookie-list
playwright-cli cookie-list --domain=example.com
playwright-cli cookie-get session_id
playwright-cli cookie-set session_id abc123
playwright-cli cookie-set session_id abc123 --domain=example.com --httpOnly --secure
playwright-cli cookie-delete session_id
playwright-cli cookie-clear

# LocalStorage
playwright-cli localstorage-list
playwright-cli localstorage-get theme
playwright-cli localstorage-set theme dark
playwright-cli localstorage-delete theme
playwright-cli localstorage-clear

# SessionStorage
playwright-cli sessionstorage-list
playwright-cli sessionstorage-get step
playwright-cli sessionstorage-set step 3
playwright-cli sessionstorage-delete step
playwright-cli sessionstorage-clear
```

### Network

```bash
playwright-cli route "**/*.jpg" --status=404
playwright-cli route "https://api.example.com/**" --body='{"mock": true}'
playwright-cli route-list
playwright-cli unroute "**/*.jpg"
playwright-cli unroute
```

### DevTools

```bash
playwright-cli console
playwright-cli console warning
playwright-cli network
playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"
playwright-cli tracing-start
playwright-cli tracing-stop
playwright-cli video-start
playwright-cli video-stop video.webm
```

### Install

```bash
playwright-cli install --skills
playwright-cli install-browser
```

### Configuration
```bash
# Use specific browser when creating session
playwright-cli open --browser=chrome
playwright-cli open --browser=firefox
playwright-cli open --browser=webkit
playwright-cli open --browser=msedge
# Connect to browser via extension
playwright-cli open --extension

# Use persistent profile (by default profile is in-memory)
playwright-cli open --persistent
# Use persistent profile with custom directory
playwright-cli open --profile=/path/to/profile

# Start with config file
playwright-cli open --config=my-config.json

# Close the browser
playwright-cli close
# Delete user data for the default session
playwright-cli delete-data
```

### Browser Sessions

```bash
# create new browser session named "mysession" with persistent profile
playwright-cli -s=mysession open example.com --persistent
# same with manually specified profile directory (use when requested explicitly)
playwright-cli -s=mysession open example.com --profile=/path/to/profile
playwright-cli -s=mysession click e6
playwright-cli -s=mysession close # stop a named browser
playwright-cli -s=mysession delete-data # delete user data for persistent session

playwright-cli list
# Close all browsers
playwright-cli close-all
# Forcefully kill all browser processes
playwright-cli kill-all
```

## Example: Form submission

```bash
playwright-cli open https://example.com/form
playwright-cli snapshot

playwright-cli fill e1 "user@example.com"
playwright-cli fill e2 "password123"
playwright-cli click e3
playwright-cli snapshot
playwright-cli close
```

## Example: Multi-tab workflow

```bash
playwright-cli open https://example.com
playwright-cli tab-new https://example.com/other
playwright-cli tab-list
playwright-cli tab-select 0
playwright-cli snapshot
playwright-cli close
```

## Example: Debugging with DevTools

```bash
playwright-cli open https://example.com
playwright-cli click e4
playwright-cli fill e7 "test"
playwright-cli console
playwright-cli network
playwright-cli close
```

```bash
playwright-cli open https://example.com
playwright-cli tracing-start
playwright-cli click e4
playwright-cli fill e7 "test"
playwright-cli tracing-stop
playwright-cli close
```

## Specific tasks

* **Request mocking** [references/request-mocking.md](references/request-mocking.md)
* **Running Playwright code** [references/running-code.md](references/running-code.md)
* **Browser session management** [references/session-management.md](references/session-management.md)
* **Storage state (cookies, localStorage)** [references/storage-state.md](references/storage-state.md)
* **Test generation** [references/test-generation.md](references/test-generation.md)
* **Tracing** [references/tracing.md](references/tracing.md)
* **Video recording** [references/video-recording.md](references/video-recording.md)
87 changes: 87 additions & 0 deletions .claude/skills/playwright-cli/references/request-mocking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Request Mocking

Intercept, mock, modify, and block network requests.

## CLI Route Commands

```bash
# Mock with custom status
playwright-cli route "**/*.jpg" --status=404

# Mock with JSON body
playwright-cli route "**/api/users" --body='[{"id":1,"name":"Alice"}]' --content-type=application/json

# Mock with custom headers
playwright-cli route "**/api/data" --body='{"ok":true}' --header="X-Custom: value"

# Remove headers from requests
playwright-cli route "**/*" --remove-header=cookie,authorization

# List active routes
playwright-cli route-list

# Remove a route or all routes
playwright-cli unroute "**/*.jpg"
playwright-cli unroute
```

## URL Patterns

```
**/api/users - Exact path match
**/api/*/details - Wildcard in path
**/*.{png,jpg,jpeg} - Match file extensions
**/search?q=* - Match query parameters
```

## Advanced Mocking with run-code

For conditional responses, request body inspection, response modification, or delays:

### Conditional Response Based on Request

```bash
playwright-cli run-code "async page => {
await page.route('**/api/login', route => {
const body = route.request().postDataJSON();
if (body.username === 'admin') {
route.fulfill({ body: JSON.stringify({ token: 'mock-token' }) });
} else {
route.fulfill({ status: 401, body: JSON.stringify({ error: 'Invalid' }) });
}
});
}"
```

### Modify Real Response

```bash
playwright-cli run-code "async page => {
await page.route('**/api/user', async route => {
const response = await route.fetch();
const json = await response.json();
json.isPremium = true;
await route.fulfill({ response, json });
});
}"
```

### Simulate Network Failures

```bash
playwright-cli run-code "async page => {
await page.route('**/api/offline', route => route.abort('internetdisconnected'));
}"
# Options: connectionrefused, timedout, connectionreset, internetdisconnected
```

### Delayed Response

```bash
playwright-cli run-code "async page => {
await page.route('**/api/slow', async route => {
await new Promise(r => setTimeout(r, 3000));
route.fulfill({ body: JSON.stringify({ data: 'loaded' }) });
});
}"
```
Loading
Loading