Skip to content

Commit e964dde

Browse files
committed
Update package configurations and enhance documentation
- Changed package names in package.json and docs/package.json for consistency. - Updated GitHub Actions workflows to improve permissions and node version.
1 parent e293313 commit e964dde

File tree

8 files changed

+54
-51
lines changed

8 files changed

+54
-51
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"access": "restricted",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
10-
"ignore": []
10+
"ignore": ["expressive-code-fullscreen/docs"]
1111
}

.github/workflows/deploy.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
11
name: Deploy to GitHub Pages
2+
permissions: {}
23

34
on:
4-
# Trigger the workflow every time you push to the `main` branch
5-
# Using a different branch name? Replace `main` with your branch’s name
65
push:
7-
branches: [ main ]
8-
# Allows you to run this workflow manually from the Actions tab on GitHub.
6+
branches: [main]
97
workflow_dispatch:
108

11-
# Allow this job to clone the repo and create a page deployment
12-
permissions:
13-
contents: read
14-
pages: write
15-
id-token: write
16-
179
jobs:
1810
build:
1911
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
2014
steps:
21-
- uses: actions/checkout@v4
22-
- uses: pnpm/action-setup@v3
23-
- uses: actions/setup-node@v4
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
persist-credentials: false
18+
19+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
20+
21+
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
2422
with:
25-
node-version: 20
23+
node-version: 24
2624
cache: pnpm
25+
2726
- run: pnpm i
2827
- run: pnpm build
2928
- run: pnpm build:docs
30-
- uses: actions/upload-pages-artifact@v3
29+
30+
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
3131
with:
3232
path: docs/dist/
33-
33+
3434
deploy:
3535
needs: build
3636
runs-on: ubuntu-latest
37+
permissions:
38+
pages: write
39+
id-token: write
3740
environment:
3841
name: github-pages
3942
url: ${{ steps.deployment.outputs.page_url }}
4043
steps:
4144
- name: Deploy to GitHub Pages
4245
id: deployment
43-
uses: actions/deploy-pages@v4
46+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

.github/workflows/release.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,38 @@
1-
name: release
1+
name: Release
2+
permissions: {}
23

34
on:
45
push:
5-
branches:
6-
- main
7-
8-
permissions:
9-
contents: write
10-
pull-requests: write
11-
id-token: write
6+
branches: [main]
127

138
jobs:
149
release:
1510
name: Release
1611
if: ${{ github.repository_owner == 'frostybee' }}
1712
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
id-token: write
1817
steps:
19-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2019
with:
21-
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
22-
fetch-depth: 0
20+
persist-credentials: false
2321

24-
- uses: pnpm/action-setup@v3
22+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
2523

26-
- uses: actions/setup-node@v4
24+
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
2725
with:
28-
node-version: 20
26+
node-version: 24
2927
cache: pnpm
3028

3129
- run: pnpm i
3230

33-
- uses: changesets/action@v1
31+
- uses: changesets/action@c8bada60c408975afd63a545b55a9b674fc1694d # v1.4.9
3432
with:
3533
version: pnpm run ci-version
3634
publish: pnpm run ci-publish
37-
commit: '[ci] release'
38-
title: '[ci] release'
35+
commit: "[ci] release"
36+
title: "[ci] release"
3937
env:
4038
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42-
43-

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@expressive-code-fullscreen/docs",
2+
"name": "expressive-code-fullscreen/docs",
33
"version": "0.1.3",
44
"license": "MIT",
55
"description": "Documentation for the Expressive Code Fullscreen plugin.",

docs/src/content/docs/features.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Once installed, the plugin **will automatically** add a fullscreen **toggle butt
2424

2525
## Features
2626

27-
- **Fullscreen viewing** - View code blocks in a distraction-free fullscreen overlay
28-
- **Font size controls** - Adjust text size with intuitive +/- buttons
29-
- **Keyboard shortcuts** - Press `Esc` to exit, use Tab for navigation
30-
- **Accessibility** - Full ARIA support and screen reader compatibility
31-
- **Customizable themes** - Extensive styling options for colors and appearance
32-
- **Browser back button support** - Natural navigation experience
33-
- **Persistent font size** - Remembers your preferred font size
27+
- View code blocks in a distraction-free fullscreen overlay.
28+
- Adjust text size with +/- buttons.
29+
- Press `Esc` to exit fullscreen, use `Tab` to navigate.
30+
- Accessible with ARIA support and screen reader compatibility.
31+
- Customize colors and appearance to match your site.
32+
- Exit fullscreen with the browser back button.
33+
- Your preferred font size is remembered across sessions.

docs/src/content/docs/index.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ hero:
2121
actions:
2222
- text: Get Started
2323
link: /expressive-code-fullscreen/getting-started/
24-
icon: right-arrow
24+
icon: rocket
25+
- text: Star on GitHub
26+
link: https://github.com/frostybee/expressive-code-collapsible
27+
icon: star
28+
variant: secondary
2529
---
2630

2731
import { Card, CardGrid } from '@astrojs/starlight/components'

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"private": true,
2727
"scripts": {
2828
"build": "pnpm -F expressive-code-fullscreen build",
29-
"build:docs": "pnpm -F @expressive-code-fullscreen/docs build",
30-
"start:docs": "pnpm -F @expressive-code-fullscreen/docs start",
29+
"build:docs": "pnpm -F expressive-code-fullscreen/docs build",
30+
"start:docs": "pnpm -F expressive-code-fullscreen/docs start",
3131
"ci-version": "changeset version && pnpm install --no-frozen-lockfile",
3232
"ci-publish": "pnpm build && changeset publish"
3333
}

packages/expressive-code-fullscreen/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ export function pluginFullscreen(options: FullscreenPluginOptions = {}) {
336336
337337
/* Push button down slightly for titled non-terminal blocks */
338338
.expressive-code.has-title:not(.is-terminal) figcaption .cb-fullscreen__button {
339-
margin-top: 0.25rem;
339+
margin-top: 0.2rem;
340340
}
341341
342342
/* Override hover effects for header buttons - keep them stable */
@@ -923,7 +923,8 @@ export function pluginFullscreen(options: FullscreenPluginOptions = {}) {
923923
const originalButton = fullscreenState.originalCodeBlock.querySelector('.cb-fullscreen__button');
924924
if (originalButton) {
925925
originalButton.setAttribute('aria-expanded', 'false');
926-
originalButton.blur();
926+
// Return focus to the button for keyboard users
927+
originalButton.focus();
927928
}
928929
}
929930

0 commit comments

Comments
 (0)