Skip to content

Commit 13bb03c

Browse files
authored
Merge branch 'main' into main
2 parents 891bebf + d74d6cd commit 13bb03c

107 files changed

Lines changed: 3487 additions & 3798 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.

.github/workflows/dependabot.yml

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

2121
- name: Dependabot metadata
2222
id: dependabot-metadata
23-
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
23+
uses: dependabot/fetch-metadata@ffa630c65fa7e0ecfa0625b5ceda64399aea1b36 # v3.0.0
2424
with:
2525
github-token: "${{ steps.app-token.outputs.token }}"
2626

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
uses: ./.github/actions/webpack-persistent-cache
9797

9898
- name: Cypress run
99-
uses: cypress-io/github-action@82482149c343a5dee155d22104111b9319f9dd45 # v7.1.6
99+
uses: cypress-io/github-action@783cb3f07983868532cabaedaa1e6c00ff4786a8 # v7.1.9
100100
with:
101101
browser: chrome
102102
config-file: cypress.config.js

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The content is available under the [Creative Commons BY 4.0][license-url] licens
4949

5050
## Special Thanks
5151

52-
If you want reach from us at webpack, contact us and we can arrange something in return for your donations!
52+
If you want to reach us at webpack, contact us and we can arrange something in return for your donations!
5353

5454
_Vercel_ has given us a Pro account.
5555

cypress/e2e/click-menu-scroll-top.cy.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ describe("Click menu", () => {
77
// note that there's no hash in url
88
cy.get('[data-testid="contributors"]').scrollIntoView();
99

10-
const selector = '.sidebar-item__title[href="/concepts/modules/"]';
10+
const selector =
11+
'[data-testid="sidebar-item-title"][href="/concepts/modules/"]';
1112

1213
cy.get(selector).click();
1314
cy.window().then((win) => {

cypress/e2e/pr_4435.cy.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ describe("Open page in new tab", { scrollBehavior: false }, () => {
1010
},
1111
});
1212
// wait for page content to load before asserting scroll
13-
cy.get('.sidebar-item__title[href="/concepts/plugins/"]').should("exist");
13+
cy.get(
14+
'[data-testid="sidebar-item-title"][href="/concepts/plugins/"]',
15+
).should("exist");
1416
// there's one call in Page.jsx when componentDidMount
1517
cy.window().should((win) => {
1618
expect(win.scrollTo).to.be.calledOnce;
1719
});
1820

19-
const selector = '.sidebar-item__title[href="/concepts/plugins/"]';
21+
const selector =
22+
'[data-testid="sidebar-item-title"][href="/concepts/plugins/"]';
2023

2124
// we click the menu
2225
cy.get(selector).click();

jest.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ export default {
33
testEnvironment: "node",
44
setupFiles: ["./src/setupTests.js"],
55
transform: {
6-
"^.+\\.jsx?$": "babel-jest",
6+
"^.+\\.(m|c)?jsx?$": "babel-jest",
77
},
88
moduleNameMapper: {
99
"\\.(scss|css)$": "<rootDir>/src/components/__mocks__/styleMock.js",
1010
"\\.svg$": "<rootDir>/src/components/__mocks__/svgMock.js",
11+
"\\.(png|jpg|jpeg|ico)$": "<rootDir>/src/components/__mocks__/fileMock.js",
1112
},
1213
moduleFileExtensions: [
1314
"js",

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"main": "n/a",
2323
"scripts": {
2424
"clean-dist": "rimraf ./dist",
25-
"clean-printable": "rimraf src/content/**/printable.mdx",
25+
"clean-printable": "rimraf \"src/content/**/printable.mdx\"",
2626
"preclean": "run-s clean-dist clean-printable",
27-
"clean": "rimraf src/content/**/_*.mdx src/**/_*.json repositories/*.json",
27+
"clean": "rimraf \"src/content/**/_*.mdx\" \"src/**/_*.json\" \"repositories/*.json\"",
2828
"start": "npm run clean-dist && webpack serve --config webpack.dev.mjs --env dev --progress --config-node-env development",
2929
"content": "node src/scripts/build-content-tree.mjs ./src/content ./src/_content.json",
3030
"bundle-analyze": "run-s clean fetch content && webpack --config webpack.prod.mjs --config-node-env production && run-s printable content && webpack --config webpack.ssg.mjs --config-node-env production --env ssg --profile --json > stats.json && webpack-bundle-analyzer stats.json",
@@ -64,7 +64,7 @@
6464
"*.{md,mdx}": [
6565
"npm run lint:markdown"
6666
],
67-
"*.{js,mjs,jsx,css,scss,md,mdx,json}": [
67+
"*.{js,mjs,jsx,css,md,mdx,json}": [
6868
"prettier --write"
6969
]
7070
},
@@ -75,6 +75,7 @@
7575
"dependencies": {
7676
"@docsearch/react": "^4.6.0",
7777
"@react-spring/web": "^10.0.3",
78+
"clsx": "^2.1.1",
7879
"path-browserify": "^1.0.1",
7980
"prop-types": "^15.8.1",
8081
"react": "^19.2.4",
@@ -84,6 +85,7 @@
8485
"react-router-dom": "^7.13.1",
8586
"react-tiny-popover": "^8.1.6",
8687
"react-use": "^17.6.0",
88+
"tailwind-merge": "^3.5.0",
8789
"webpack-pwa-manifest": "^4.3.0",
8890
"workbox-window": "^7.4.0"
8991
},
@@ -131,7 +133,6 @@
131133
"mdast-util-to-string": "^4.0.0",
132134
"mini-css-extract-plugin": "^2.10.1",
133135
"mkdirp": "^3.0.1",
134-
"modularscale-sass": "^3.0.3",
135136
"npm-run-all": "^4.1.1",
136137
"postcss": "^8.5.8",
137138
"postcss-loader": "^8.2.0",
@@ -148,8 +149,6 @@
148149
"remark-gfm": "^4.0.1",
149150
"remark-html": "^16.0.1",
150151
"rimraf": "^6.1.2",
151-
"sass": "^1.97.3",
152-
"sass-loader": "^16.0.6",
153152
"sirv-cli": "^3.0.1",
154153
"sitemap-static": "^0.4.2",
155154
"static-site-generator-webpack-plugin": "^3.4.1",

src/components/CodeBlockWithCopy/CodeBlockWithCopy.jsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PropTypes from "prop-types";
22
import { useEffect, useRef, useState } from "react";
3-
import "./CodeBlockWithCopy.scss";
3+
import { cn } from "../../utilities/cn.mjs";
44

55
export default function CodeBlockWithCopy({ children }) {
66
const preRef = useRef(null);
@@ -115,10 +115,22 @@ export default function CodeBlockWithCopy({ children }) {
115115
);
116116

117117
return (
118-
<div className="code-block-wrapper">
118+
<div className="code-block-wrapper relative mb-6 group">
119119
<button
120120
onClick={handleCopy}
121-
className={`copy-button ${copyStatus}`}
121+
className={cn(
122+
"copy-button",
123+
"absolute top-2 right-2 z-10 px-[0.7rem] py-[0.4rem] rounded-[0.35rem] border-none cursor-pointer text-xs font-medium text-slate-200",
124+
"opacity-0 group-hover:opacity-100",
125+
"transition-[background-color,transform,opacity] duration-200",
126+
"active:scale-95",
127+
"focus-visible:outline-none focus-visible:opacity-100",
128+
copyStatus === "copied"
129+
? "bg-green-600 hover:bg-green-700"
130+
: copyStatus === "error"
131+
? "bg-red-500 hover:bg-red-700"
132+
: "bg-[#175d96] hover:bg-[#2f85d0]",
133+
)}
122134
aria-label="Copy code to clipboard"
123135
>
124136
{copyStatus === "copied"

src/components/CodeBlockWithCopy/CodeBlockWithCopy.scss

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/components/Configuration/Configuration.scss

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)