Skip to content

Commit 2a0f496

Browse files
committed
Merge branch 'main' into pr/coaxial/2384
2 parents f6cd70e + 814c737 commit 2a0f496

284 files changed

Lines changed: 13275 additions & 5451 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/marketplace.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "slidev-plugins",
3+
"owner": {
4+
"name": "Anthony Fu",
5+
"url": "https://github.com/antfu"
6+
},
7+
"metadata": {
8+
"description": "Claude Code plugins for the Slidev presentation framework"
9+
},
10+
"plugins": [
11+
{
12+
"name": "slidev",
13+
"source": "./",
14+
"description": "Claude Code skill for creating and presenting Slidev slidedecks"
15+
}
16+
]
17+
}

.claude-plugin/plugin.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "slidev",
3+
"version": "1.0.0",
4+
"description": "Claude Code skill for creating and presenting Slidev slidedecks",
5+
"author": {
6+
"name": "Anthony Fu",
7+
"url": "https://github.com/antfu"
8+
},
9+
"repository": "https://github.com/slidevjs/slidev",
10+
"license": "MIT",
11+
"keywords": ["presentations", "slides", "markdown", "vue", "developer-tools"]
12+
}

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
timeout-minutes: 10
1717

1818
steps:
19-
- uses: actions/checkout@v5
19+
- uses: actions/checkout@v6
2020

2121
- name: Use Node.js lts/*
2222
uses: actions/setup-node@v6

.github/workflows/cr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v5
11+
uses: actions/checkout@v6
1212

1313
- uses: actions/setup-node@v6
1414
with:

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v5
16+
- uses: actions/checkout@v6
1717
with:
1818
fetch-depth: 0
1919

@@ -36,5 +36,5 @@ jobs:
3636
run: pnpm run publish
3737
working-directory: ./packages/vscode
3838
env:
39-
VSCE_TOKEN: ${{secrets.VSCE_TOKEN}}
40-
OVSX_TOKEN: ${{secrets.OVSX_TOKEN}}
39+
VSCE_TOKEN: ${{secrets.VSCE_PAT}}
40+
OVSX_TOKEN: ${{secrets.OVSX_PAT}}

.github/workflows/smoke.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
git config --global core.autocrlf false
2424
git config --global core.eol lf
2525
26-
- uses: actions/checkout@v5
26+
- uses: actions/checkout@v6
2727

28-
- name: Use Node.js 20.x
28+
- name: Use Node.js
2929
uses: actions/setup-node@v6
3030
with:
31-
node-version: 20.x
31+
node-version: lts/*
3232

3333
- name: Setup
3434
run: npm i -g @antfu/ni
@@ -45,7 +45,7 @@ jobs:
4545
run: node ./scripts/pack.mjs /tmp/slidev-pkgs
4646

4747
- name: Upload artifacts
48-
uses: actions/upload-artifact@v4
48+
uses: actions/upload-artifact@v6
4949
with:
5050
name: slidev-packages
5151
path: /tmp/slidev-pkgs
@@ -66,12 +66,12 @@ jobs:
6666
git config --global core.autocrlf false
6767
git config --global core.eol lf
6868
69-
- uses: actions/checkout@v5
69+
- uses: actions/checkout@v6
7070

71-
- name: Use Node.js 20.x
71+
- name: Use Node.js lts/*
7272
uses: actions/setup-node@v6
7373
with:
74-
node-version: 20.x
74+
node-version: lts/*
7575

7676
- name: Setup
7777
run: npm i -g @antfu/ni
@@ -83,7 +83,7 @@ jobs:
8383
run: nci
8484

8585
- name: Download artifacts
86-
uses: actions/download-artifact@v6
86+
uses: actions/download-artifact@v7
8787
with:
8888
name: slidev-packages
8989
path: /tmp/slidev-pkgs
@@ -121,7 +121,7 @@ jobs:
121121
working-directory: ../temp/slidev-project
122122

123123
- name: E2E Smoke Test
124-
uses: cypress-io/github-action@v4
124+
uses: cypress-io/github-action@v7
125125
if: ${{ matrix.os != 'windows-latest' }}
126126
with:
127127
install-command: echo
@@ -146,7 +146,7 @@ jobs:
146146

147147
# Commented out because it's not working
148148
# - name: E2E test in global mode
149-
# uses: cypress-io/github-action@v4
149+
# uses: cypress-io/github-action@v7
150150
# if: ${{ matrix.os != 'windows' }}
151151
# with:
152152
# project: ${{ github.workspace }}

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
git config --global core.autocrlf false
3030
git config --global core.eol lf
3131
32-
- uses: actions/checkout@v5
32+
- uses: actions/checkout@v6
3333

3434
- name: Use Node.js ${{ matrix.node-version }}
3535
uses: actions/setup-node@v6
@@ -55,7 +55,7 @@ jobs:
5555
timeout-minutes: 20
5656

5757
steps:
58-
- uses: actions/checkout@v5
58+
- uses: actions/checkout@v6
5959

6060
- uses: actions/setup-node@v6
6161
with:
@@ -74,7 +74,7 @@ jobs:
7474
run: cp pnpm-lock.yaml package-lock.json
7575

7676
- name: Cypress
77-
uses: cypress-io/github-action@v6
77+
uses: cypress-io/github-action@v7
7878
with:
7979
install-command: echo
8080
build: nr build

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*-export
99
*.local
1010
*.pdf
11+
.env
1112
assets/demo
1213
components.d.ts
1314
composable-vue-cn
@@ -21,6 +22,9 @@ packages/create-app/template/pages
2122
packages/create-app/template/slides.md
2223
packages/create-app/template/snippets
2324
packages/slidev/README.md
25+
packages/slidev/skills
2426
packages/vscode/syntaxes/codeblock-patch.json
2527
slides-export.md
2628
*slides-export.pptx
29+
.agents
30+
.claude

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Presentation <b>slide</b>s for <b>dev</b>elopers 🧑‍💻👩‍💻👨‍
6262

6363
### Init Project Locally
6464

65-
Install [Node.js >=18](https://nodejs.org/) and run the following command:
65+
Install [Node.js >= 20.12.0](https://nodejs.org/) and run the following command:
6666

6767
```bash
6868
npm init slidev

cypress/e2e/examples/basic.spec.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,61 @@ context('Basic', () => {
257257
cy.get('#slideshow .slidev-page-13 .cy-wrapdecorate > ul > .slidev-vclick-target:not(.slidev-vclick-hidden)')
258258
.should('have.text', 'AEFZ')
259259
})
260+
261+
it('click animation presets', () => {
262+
goPage(14)
263+
264+
// Check animation classes are set on mount
265+
cy.get('#slideshow .slidev-page-14 .cy-animation-presets .slidev-vclick-target').eq(0).should('have.class', 'slidev-vclick-anim-fade').and('have.class', 'slidev-vclick-anim-up')
266+
cy.get('#slideshow .slidev-page-14 .cy-animation-presets .slidev-vclick-target').eq(1).should('have.class', 'slidev-vclick-anim-scale')
267+
cy.get('#slideshow .slidev-page-14 .cy-animation-presets .slidev-vclick-target').eq(2).should('have.class', 'slidev-vclick-anim-none')
268+
269+
// After clicks, elements become visible
270+
cy.rightArrow()
271+
cy.get('#slideshow .slidev-page-14 .cy-animation-presets .slidev-vclick-target:not(.slidev-vclick-hidden)')
272+
.should('have.text', 'fade-up')
273+
274+
cy.rightArrow()
275+
cy.get('#slideshow .slidev-page-14 .cy-animation-presets .slidev-vclick-target:not(.slidev-vclick-hidden)')
276+
.should('have.length', 2)
277+
278+
cy.rightArrow()
279+
cy.get('#slideshow .slidev-page-14 .cy-animation-presets .slidev-vclick-target:not(.slidev-vclick-hidden)')
280+
.should('have.length', 3)
281+
})
282+
283+
it('click animation from frontmatter', () => {
284+
goPage(15)
285+
286+
cy.get('#slideshow .slidev-page-15 .cy-animation-frontmatter .slidev-vclick-target')
287+
.should('have.class', 'slidev-vclick-anim-fade')
288+
.and('have.class', 'slidev-vclick-anim-down')
289+
290+
cy.rightArrow()
291+
cy.get('#slideshow .slidev-page-15 .cy-animation-frontmatter .slidev-vclick-target:not(.slidev-vclick-hidden)')
292+
.should('have.text', 'from-frontmatter')
293+
})
294+
295+
it('click animation hierarchy and override', () => {
296+
goPage(16)
297+
298+
const targets = '#slideshow .slidev-page-16 .cy-animation-hierarchy .slidev-vclick-target'
299+
300+
// custom frontmatter still gets reflected for elements without modifiers
301+
cy.get(targets).eq(0).should('have.class', 'slidev-vclick-anim-foo')
302+
303+
// element modifiers override slide frontmatter preset
304+
cy.get(targets).eq(1).should('not.have.class', 'slidev-vclick-anim-foo').and('have.class', 'slidev-vclick-anim-fade').and('have.class', 'slidev-vclick-anim-right')
305+
306+
// none modifier also overrides slide frontmatter preset
307+
cy.get(targets).eq(2).should('not.have.class', 'slidev-vclick-anim-foo').and('have.class', 'slidev-vclick-anim-none').invoke('css', 'transition').should('match', /^none/)
308+
309+
// another valid modifier should also override invalid frontmatter
310+
cy.get(targets).eq(3).should('not.have.class', 'slidev-vclick-anim-foo').and('have.class', 'slidev-vclick-anim-scale')
311+
312+
// reveal sequence remains functional with mixed presets
313+
cy.rightArrow(4)
314+
cy.get(`${targets}:not(.slidev-vclick-hidden)`)
315+
.should('have.length', 4)
316+
})
260317
})

0 commit comments

Comments
 (0)