1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-14 01:24:19 +02:00

Merge branch 'main' into main-jd-remove-unused-npm-watch-scripts

This commit is contained in:
Julien Déramond
2025-08-10 19:40:05 +02:00
committed by GitHub
9 changed files with 174 additions and 150 deletions

View File

@@ -29,16 +29,16 @@ jobs:
persist-credentials: false persist-credentials: false
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4 uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
with: with:
config-file: ./.github/codeql/codeql-config.yml config-file: ./.github/codeql/codeql-config.yml
languages: "javascript" languages: "javascript"
queries: +security-and-quality queries: +security-and-quality
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4 uses: github/codeql-action/autobuild@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4 uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
with: with:
category: "/language:javascript" category: "/language:javascript"

View File

@@ -73,6 +73,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional). # Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard # Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning" - name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4 uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View File

@@ -11,6 +11,7 @@ import fs from 'node:fs/promises'
import path from 'node:path' import path from 'node:path'
import { fileURLToPath } from 'node:url' import { fileURLToPath } from 'node:url'
import sh from 'shelljs' import sh from 'shelljs'
import { format } from 'prettier'
const __dirname = path.dirname(fileURLToPath(import.meta.url)) const __dirname = path.dirname(fileURLToPath(import.meta.url))
@@ -83,7 +84,9 @@ for (const file of staticJsFiles) {
sh.rm(`${distFolder}/index.html`) sh.rm(`${distFolder}/index.html`)
// get all examples' HTML files // get all examples' HTML files
for (const file of sh.find(`${distFolder}/**/*.html`)) { const htmlFiles = sh.find(`${distFolder}/**/*.html`)
const formatPromises = htmlFiles.map(async file => {
const fileContents = sh.cat(file) const fileContents = sh.cat(file)
.toString() .toString()
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../') .replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
@@ -91,8 +94,24 @@ for (const file of sh.find(`${distFolder}/**/*.html`)) {
.replace(/(<link href="\.\.\/[^"]*"[^>]*) integrity="[^"]*"/g, '$1') .replace(/(<link href="\.\.\/[^"]*"[^>]*) integrity="[^"]*"/g, '$1')
.replace(/<link[^>]*href="\.\.\/assets\/img\/favicons\/[^"]*"[^>]*>/g, '') .replace(/<link[^>]*href="\.\.\/assets\/img\/favicons\/[^"]*"[^>]*>/g, '')
.replace(/(<script src="\.\.\/[^"]*"[^>]*) integrity="[^"]*"/g, '$1') .replace(/(<script src="\.\.\/[^"]*"[^>]*) integrity="[^"]*"/g, '$1')
new sh.ShellString(fileContents).to(file)
} let formattedHTML
try {
formattedHTML = await format(fileContents, {
parser: 'html',
filepath: file
})
} catch (error) {
console.error(`\nError formatting ${file}:`)
console.error(`Message: ${error.message}`)
console.error('\nSkipping formatting for this file...\n')
formattedHTML = fileContents
}
new sh.ShellString(formattedHTML).to(file)
})
await Promise.all(formatPromises)
// create the zip file // create the zip file
sh.exec(`zip -qr9 "${distFolder}.zip" "${distFolder}"`) sh.exec(`zip -qr9 "${distFolder}.zip" "${distFolder}"`)

230
package-lock.json generated
View File

@@ -37,7 +37,7 @@
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/mime": "^4.0.0", "@types/mime": "^4.0.0",
"@types/prismjs": "^1.26.5", "@types/prismjs": "^1.26.5",
"astro": "^5.12.8", "astro": "^5.12.9",
"astro-auto-import": "^0.4.4", "astro-auto-import": "^0.4.4",
"autoprefixer": "^10.4.21", "autoprefixer": "^10.4.21",
"bundlewatch": "^0.4.1", "bundlewatch": "^0.4.1",
@@ -86,12 +86,12 @@
"sass": "1.78.0", "sass": "1.78.0",
"sass-true": "^9.0.0", "sass-true": "^9.0.0",
"shelljs": "^0.10.0", "shelljs": "^0.10.0",
"stylelint": "^16.23.0", "stylelint": "^16.23.1",
"stylelint-config-twbs-bootstrap": "^16.1.0", "stylelint-config-twbs-bootstrap": "^16.1.0",
"terser": "^5.43.1", "terser": "^5.43.1",
"unist-util-visit": "^5.0.0", "unist-util-visit": "^5.0.0",
"vnu-jar": "24.10.17", "vnu-jar": "24.10.17",
"zod": "^4.0.14" "zod": "^4.0.17"
}, },
"peerDependencies": { "peerDependencies": {
"@popperjs/core": "^2.11.8" "@popperjs/core": "^2.11.8"
@@ -4090,65 +4090,65 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@shikijs/core": { "node_modules/@shikijs/core": {
"version": "3.9.1", "version": "3.9.2",
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.9.1.tgz", "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.9.2.tgz",
"integrity": "sha512-W5Vwen0KJCtR7KFRo+3JLGAqLUPsfW7e+wZ4yaRBGIogwI9ZlnkpRm9ZV8JtfzMxOkIwZwMmmN0hNErLtm3AYg==", "integrity": "sha512-3q/mzmw09B2B6PgFNeiaN8pkNOixWS726IHmJEpjDAcneDPMQmUg2cweT9cWXY4XcyQS3i6mOOUgQz9RRUP6HA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "3.9.1", "@shikijs/types": "3.9.2",
"@shikijs/vscode-textmate": "^10.0.2", "@shikijs/vscode-textmate": "^10.0.2",
"@types/hast": "^3.0.4", "@types/hast": "^3.0.4",
"hast-util-to-html": "^9.0.5" "hast-util-to-html": "^9.0.5"
} }
}, },
"node_modules/@shikijs/engine-javascript": { "node_modules/@shikijs/engine-javascript": {
"version": "3.9.1", "version": "3.9.2",
"resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.9.1.tgz", "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.9.2.tgz",
"integrity": "sha512-4hGenxYpAmtALryKsdli2K58F0s7RBYpj/RSDcAAGfRM6eTEGI5cZnt86mr+d9/4BaZ5sH5s4p3VU5irIdhj9Q==", "integrity": "sha512-kUTRVKPsB/28H5Ko6qEsyudBiWEDLst+Sfi+hwr59E0GLHV0h8RfgbQU7fdN5Lt9A8R1ulRiZyTvAizkROjwDA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "3.9.1", "@shikijs/types": "3.9.2",
"@shikijs/vscode-textmate": "^10.0.2", "@shikijs/vscode-textmate": "^10.0.2",
"oniguruma-to-es": "^4.3.3" "oniguruma-to-es": "^4.3.3"
} }
}, },
"node_modules/@shikijs/engine-oniguruma": { "node_modules/@shikijs/engine-oniguruma": {
"version": "3.9.1", "version": "3.9.2",
"resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.9.1.tgz", "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.9.2.tgz",
"integrity": "sha512-WPlL/xqviwS3te4unSGGGfflKsuHLMI6tPdNYvgz/IygcBT6UiwDFSzjBKyebwi5GGSlXsjjdoJLIBnAplmEZw==", "integrity": "sha512-Vn/w5oyQ6TUgTVDIC/BrpXwIlfK6V6kGWDVVz2eRkF2v13YoENUvaNwxMsQU/t6oCuZKzqp9vqtEtEzKl9VegA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "3.9.1", "@shikijs/types": "3.9.2",
"@shikijs/vscode-textmate": "^10.0.2" "@shikijs/vscode-textmate": "^10.0.2"
} }
}, },
"node_modules/@shikijs/langs": { "node_modules/@shikijs/langs": {
"version": "3.9.1", "version": "3.9.2",
"resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.9.1.tgz", "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.9.2.tgz",
"integrity": "sha512-Vyy2Yv9PP3Veh3VSsIvNncOR+O93wFsNYgN2B6cCCJlS7H9SKFYc55edsqernsg8WT/zam1cfB6llJsQWLnVhA==", "integrity": "sha512-X1Q6wRRQXY7HqAuX3I8WjMscjeGjqXCg/Sve7J2GWFORXkSrXud23UECqTBIdCSNKJioFtmUGJQNKtlMMZMn0w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "3.9.1" "@shikijs/types": "3.9.2"
} }
}, },
"node_modules/@shikijs/themes": { "node_modules/@shikijs/themes": {
"version": "3.9.1", "version": "3.9.2",
"resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.9.1.tgz", "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.9.2.tgz",
"integrity": "sha512-zAykkGECNICCMXpKeVvq04yqwaSuAIvrf8MjsU5bzskfg4XreU+O0B5wdNCYRixoB9snd3YlZ373WV5E/g5T9A==", "integrity": "sha512-6z5lBPBMRfLyyEsgf6uJDHPa6NAGVzFJqH4EAZ+03+7sedYir2yJBRu2uPZOKmj43GyhVHWHvyduLDAwJQfDjA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "3.9.1" "@shikijs/types": "3.9.2"
} }
}, },
"node_modules/@shikijs/types": { "node_modules/@shikijs/types": {
"version": "3.9.1", "version": "3.9.2",
"resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.9.1.tgz", "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.9.2.tgz",
"integrity": "sha512-rqM3T7a0iM1oPKz9iaH/cVgNX9Vz1HERcUcXJ94/fulgVdwqfnhXzGxO4bLrAnh/o5CPLy3IcYedogfV+Ns0Qg==", "integrity": "sha512-/M5L0Uc2ljyn2jKvj4Yiah7ow/W+DJSglVafvWAJ/b8AZDeeRAdMu3c2riDzB7N42VD+jSnWxeP9AKtd4TfYVw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -4401,9 +4401,9 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "18.19.121", "version": "18.19.122",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.121.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.122.tgz",
"integrity": "sha512-bHOrbyztmyYIi4f1R0s17QsPs1uyyYnGcXeZoGEd227oZjry0q6XQBQxd82X1I57zEfwO8h9Xo+Kl5gX1d9MwQ==", "integrity": "sha512-yzegtT82dwTNEe/9y+CM8cgb42WrUfMMCg2QqSddzO1J6uPmBD7qKCZ7dOHZP2Yrpm/kb0eqdNMn2MUyEiqBmA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -4456,14 +4456,14 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/@volar/kit": { "node_modules/@volar/kit": {
"version": "2.4.22", "version": "2.4.23",
"resolved": "https://registry.npmjs.org/@volar/kit/-/kit-2.4.22.tgz", "resolved": "https://registry.npmjs.org/@volar/kit/-/kit-2.4.23.tgz",
"integrity": "sha512-o2LhNb2PLCUJ6v2XSqN7m+pJt+SE0QW1U2E52jnS8yZ03ohcGOOuFJdH1VlZgCBk0RlwO4xp0OaDoTtyTvMTrw==", "integrity": "sha512-YuUIzo9zwC2IkN7FStIcVl1YS9w5vkSFEZfPvnu0IbIMaR9WHhc9ZxvlT+91vrcSoRY469H2jwbrGqpG7m1KaQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@volar/language-service": "2.4.22", "@volar/language-service": "2.4.23",
"@volar/typescript": "2.4.22", "@volar/typescript": "2.4.23",
"typesafe-path": "^0.2.2", "typesafe-path": "^0.2.2",
"vscode-languageserver-textdocument": "^1.0.11", "vscode-languageserver-textdocument": "^1.0.11",
"vscode-uri": "^3.0.8" "vscode-uri": "^3.0.8"
@@ -4473,25 +4473,25 @@
} }
}, },
"node_modules/@volar/language-core": { "node_modules/@volar/language-core": {
"version": "2.4.22", "version": "2.4.23",
"resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.22.tgz", "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.23.tgz",
"integrity": "sha512-gp4M7Di5KgNyIyO903wTClYBavRt6UyFNpc5LWfyZr1lBsTUY+QrVZfmbNF2aCyfklBOVk9YC4p+zkwoyT7ECg==", "integrity": "sha512-hEEd5ET/oSmBC6pi1j6NaNYRWoAiDhINbT8rmwtINugR39loROSlufGdYMF9TaKGfz+ViGs1Idi3mAhnuPcoGQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@volar/source-map": "2.4.22" "@volar/source-map": "2.4.23"
} }
}, },
"node_modules/@volar/language-server": { "node_modules/@volar/language-server": {
"version": "2.4.22", "version": "2.4.23",
"resolved": "https://registry.npmjs.org/@volar/language-server/-/language-server-2.4.22.tgz", "resolved": "https://registry.npmjs.org/@volar/language-server/-/language-server-2.4.23.tgz",
"integrity": "sha512-THIGWcQsEJKZU7SjVKPcy4MIamX4qpusKErj33ru7fi2WcD+FmFjYY/F2LIk/C15xEcb34JT1uZBlbO2dfzYSQ==", "integrity": "sha512-k0iO+tybMGMMyrNdWOxgFkP0XJTdbH0w+WZlM54RzJU3WZSjHEupwL30klpM7ep4FO6qyQa03h+VcGHD4Q8gEg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@volar/language-core": "2.4.22", "@volar/language-core": "2.4.23",
"@volar/language-service": "2.4.22", "@volar/language-service": "2.4.23",
"@volar/typescript": "2.4.22", "@volar/typescript": "2.4.23",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"request-light": "^0.7.0", "request-light": "^0.7.0",
"vscode-languageserver": "^9.0.1", "vscode-languageserver": "^9.0.1",
@@ -4501,33 +4501,33 @@
} }
}, },
"node_modules/@volar/language-service": { "node_modules/@volar/language-service": {
"version": "2.4.22", "version": "2.4.23",
"resolved": "https://registry.npmjs.org/@volar/language-service/-/language-service-2.4.22.tgz", "resolved": "https://registry.npmjs.org/@volar/language-service/-/language-service-2.4.23.tgz",
"integrity": "sha512-8TmvOf/6uqaJMBVQIP9kgVpRzMrqLI3nCmWuSIPAldlmwjZTOiN17GA4AL4sTFJUg61xCSyMQWbProNFQ88yew==", "integrity": "sha512-h5mU9DZ/6u3LCB9xomJtorNG6awBNnk9VuCioGsp6UtFiM8amvS5FcsaC3dabdL9zO0z+Gq9vIEMb/5u9K6jGQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@volar/language-core": "2.4.22", "@volar/language-core": "2.4.23",
"vscode-languageserver-protocol": "^3.17.5", "vscode-languageserver-protocol": "^3.17.5",
"vscode-languageserver-textdocument": "^1.0.11", "vscode-languageserver-textdocument": "^1.0.11",
"vscode-uri": "^3.0.8" "vscode-uri": "^3.0.8"
} }
}, },
"node_modules/@volar/source-map": { "node_modules/@volar/source-map": {
"version": "2.4.22", "version": "2.4.23",
"resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.22.tgz", "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.23.tgz",
"integrity": "sha512-L2nVr/1vei0xKRgO2tYVXtJYd09HTRjaZi418e85Q+QdbbqA8h7bBjfNyPPSsjnrOO4l4kaAo78c8SQUAdHvgA==", "integrity": "sha512-Z1Uc8IB57Lm6k7q6KIDu/p+JWtf3xsXJqAX/5r18hYOTpJyBn0KXUR8oTJ4WFYOcDzWC9n3IflGgHowx6U6z9Q==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@volar/typescript": { "node_modules/@volar/typescript": {
"version": "2.4.22", "version": "2.4.23",
"resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.22.tgz", "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.23.tgz",
"integrity": "sha512-6ZczlJW1/GWTrNnkmZxJp4qyBt/SGVlcTuCWpI5zLrdPdCZsj66Aff9ZsfFaT3TyjG8zVYgBMYPuCm/eRkpcpQ==", "integrity": "sha512-lAB5zJghWxVPqfcStmAP1ZqQacMpe90UrP5RJ3arDyrhy4aCUQqmxPPLB2PWDKugvylmO41ljK7vZ+t6INMTag==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@volar/language-core": "2.4.22", "@volar/language-core": "2.4.23",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"vscode-uri": "^3.0.8" "vscode-uri": "^3.0.8"
} }
@@ -4954,9 +4954,9 @@
} }
}, },
"node_modules/astro": { "node_modules/astro": {
"version": "5.12.8", "version": "5.12.9",
"resolved": "https://registry.npmjs.org/astro/-/astro-5.12.8.tgz", "resolved": "https://registry.npmjs.org/astro/-/astro-5.12.9.tgz",
"integrity": "sha512-KkJ7FR+c2SyZYlpakm48XBiuQcRsrVtdjG5LN5an0givI/tLik+ePJ4/g3qrAVhYMjJOxBA2YgFQxANPiWB+Mw==", "integrity": "sha512-cZ7kZ61jyE5nwSrFKSRyf5Gds+uJELqQxJFqMkcgiWQvhWZJUSShn8Uz3yc9WLyLw5Kim5P5un9SkJSGogfEZQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -5171,14 +5171,14 @@
} }
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "0.30.0", "version": "0.30.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.30.0.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-0.30.1.tgz",
"integrity": "sha512-Z4F3LjCgfjZz8BMYalWdMgAQUnEtKDmpwNHjh/C8pQZWde32TF64cqnSeyL3xD/aTIASRU30RHTNzRiV/NpGMg==", "integrity": "sha512-2XabsR1u0/B6OoKy57/xJmPkQiUvdoV93oW4ww+Xjee7C2er/O5U77lvqycDkT2VQDtfjYcjw8ZV8GDaoqwjHQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.4", "follow-redirects": "^1.15.4",
"form-data": "^4.0.0", "form-data": "^4.0.4",
"proxy-from-env": "^1.1.0" "proxy-from-env": "^1.1.0"
} }
}, },
@@ -5455,9 +5455,9 @@
} }
}, },
"node_modules/browserslist": { "node_modules/browserslist": {
"version": "4.25.1", "version": "4.25.2",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.2.tgz",
"integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==", "integrity": "sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -5475,8 +5475,8 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"caniuse-lite": "^1.0.30001726", "caniuse-lite": "^1.0.30001733",
"electron-to-chromium": "^1.5.173", "electron-to-chromium": "^1.5.199",
"node-releases": "^2.0.19", "node-releases": "^2.0.19",
"update-browserslist-db": "^1.1.3" "update-browserslist-db": "^1.1.3"
}, },
@@ -5639,9 +5639,9 @@
} }
}, },
"node_modules/cacheable/node_modules/keyv": { "node_modules/cacheable/node_modules/keyv": {
"version": "5.4.0", "version": "5.5.0",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-5.4.0.tgz", "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.5.0.tgz",
"integrity": "sha512-TMckyVjEoacG5IteUpUrOBsFORtheqziVyyY2dLUwg1jwTb8u48LX4TgmtogkNl9Y9unaEJ1luj10fGyjMGFOQ==", "integrity": "sha512-QG7qR2tijh1ftOvClut4YKKg1iW6cx3GZsKoGyJPxHkGWK9oJhG9P3j5deP0QQOGDowBMVQFaP+Vm4NpGYvmIQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -5722,9 +5722,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001731", "version": "1.0.30001733",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001731.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001733.tgz",
"integrity": "sha512-lDdp2/wrOmTRWuoB5DpfNkC0rJDU8DqRa6nYL6HK6sytw70QMopt/NIc/9SM7ylItlBWfACXk0tEn37UWM/+mg==", "integrity": "sha512-e4QKw/O2Kavj2VQTKZWrwzkt3IxOmIlU6ajRb6LP64LHpBo1J67k2Hi4Vu/TgJWsNtynurfS0uK3MaUTCPfu5Q==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -5767,9 +5767,9 @@
} }
}, },
"node_modules/chalk": { "node_modules/chalk": {
"version": "5.4.1", "version": "5.5.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.5.0.tgz",
"integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "integrity": "sha512-1tm8DTaJhPBG3bIkVeZt1iZM9GfSX2lzOeDVZH9R9ffRHpmHvxZ/QhgQH/aDTkswQVt+YHdXAdS/In/30OjCbg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -6312,9 +6312,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/core-js-compat": { "node_modules/core-js-compat": {
"version": "3.44.0", "version": "3.45.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.44.0.tgz", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.45.0.tgz",
"integrity": "sha512-JepmAj2zfl6ogy34qfWtcE7nHKAJnKsQFRn++scjVS2bZFllwptzw61BZcZFYBPpUznLfAvh0LGhxKppk04ClA==", "integrity": "sha512-gRoVMBawZg0OnxaVv3zpqLLxaHmsubEGyTnqdpI/CEBvX4JadI1dMSHxagThprYRtSVbuQxvi6iUatdPxohHpA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -6952,9 +6952,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.194", "version": "1.5.199",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.194.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.199.tgz",
"integrity": "sha512-SdnWJwSUot04UR51I2oPD8kuP2VI37/CADR1OHsFOUzZIvfWJBO6q11k5P/uKNyTT3cdOsnyjkrZ+DDShqYqJA==", "integrity": "sha512-3gl0S7zQd88kCAZRO/DnxtBKuhMO4h0EaQIN3YgZfV6+pW+5+bf2AdQeHNESCoaQqo/gjGVYEf2YM4O5HJQqpQ==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
@@ -8346,9 +8346,9 @@
} }
}, },
"node_modules/fs-extra": { "node_modules/fs-extra": {
"version": "11.3.0", "version": "11.3.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.1.tgz",
"integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", "integrity": "sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -13463,9 +13463,9 @@
} }
}, },
"node_modules/node-fetch-native": { "node_modules/node-fetch-native": {
"version": "1.6.6", "version": "1.6.7",
"resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.6.tgz", "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz",
"integrity": "sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==", "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
@@ -16318,18 +16318,18 @@
} }
}, },
"node_modules/shiki": { "node_modules/shiki": {
"version": "3.9.1", "version": "3.9.2",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-3.9.1.tgz", "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.9.2.tgz",
"integrity": "sha512-HogZ8nMnv9VAQMrG+P7BleJFhrKHm3fi6CYyHRbUu61gJ0lpqLr6ecYEui31IYG1Cn9Bad7N2vf332iXHnn0bQ==", "integrity": "sha512-t6NKl5e/zGTvw/IyftLcumolgOczhuroqwXngDeMqJ3h3EQiTY/7wmfgPlsmloD8oYfqkEDqxiaH37Pjm1zUhQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/core": "3.9.1", "@shikijs/core": "3.9.2",
"@shikijs/engine-javascript": "3.9.1", "@shikijs/engine-javascript": "3.9.2",
"@shikijs/engine-oniguruma": "3.9.1", "@shikijs/engine-oniguruma": "3.9.2",
"@shikijs/langs": "3.9.1", "@shikijs/langs": "3.9.2",
"@shikijs/themes": "3.9.1", "@shikijs/themes": "3.9.2",
"@shikijs/types": "3.9.1", "@shikijs/types": "3.9.2",
"@shikijs/vscode-textmate": "^10.0.2", "@shikijs/vscode-textmate": "^10.0.2",
"@types/hast": "^3.0.4" "@types/hast": "^3.0.4"
} }
@@ -16541,9 +16541,9 @@
} }
}, },
"node_modules/smol-toml": { "node_modules/smol-toml": {
"version": "1.4.1", "version": "1.4.2",
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.4.1.tgz", "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.4.2.tgz",
"integrity": "sha512-CxdwHXyYTONGHThDbq5XdwbFsuY4wlClRGejfE2NtwUtiHYsP1QtNsHb/hnj31jKYSchztJsaA8pSQoVzkfCFg==", "integrity": "sha512-rInDH6lCNiEyn3+hH8KVGFdbjc099j47+OSgbMrfDYX1CmXLfdKd7qi6IfcWj2wFxvSVkuI46M+wPGYfEOEj6g==",
"dev": true, "dev": true,
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"engines": { "engines": {
@@ -16733,9 +16733,9 @@
} }
}, },
"node_modules/spdx-license-ids": { "node_modules/spdx-license-ids": {
"version": "3.0.21", "version": "3.0.22",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz",
"integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==",
"dev": true, "dev": true,
"license": "CC0-1.0" "license": "CC0-1.0"
}, },
@@ -17096,9 +17096,9 @@
} }
}, },
"node_modules/stylelint": { "node_modules/stylelint": {
"version": "16.23.0", "version": "16.23.1",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.23.0.tgz", "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.23.1.tgz",
"integrity": "sha512-69T5aS2LUY306ekt1Q1oaSPwz/jaG9HjyMix3UMrai1iEbuOafBe2Dh8xlyczrxFAy89qcKyZWWtc42XLx3Bbw==", "integrity": "sha512-dNvDTsKV1U2YtiUDfe9d2gp902veFeo3ecCWdGlmLm2WFrAV0+L5LoOj/qHSBABQwMsZPJwfC4bf39mQm1S5zw==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -17662,9 +17662,9 @@
} }
}, },
"node_modules/tmp": { "node_modules/tmp": {
"version": "0.2.3", "version": "0.2.5",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz",
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -19318,9 +19318,9 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/yaml": { "node_modules/yaml": {
"version": "2.8.0", "version": "2.8.1",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz",
"integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==",
"dev": true, "dev": true,
"license": "ISC", "license": "ISC",
"bin": { "bin": {
@@ -19548,9 +19548,9 @@
} }
}, },
"node_modules/zod": { "node_modules/zod": {
"version": "4.0.14", "version": "4.0.17",
"resolved": "https://registry.npmjs.org/zod/-/zod-4.0.14.tgz", "resolved": "https://registry.npmjs.org/zod/-/zod-4.0.17.tgz",
"integrity": "sha512-nGFJTnJN6cM2v9kXL+SOBq3AtjQby3Mv5ySGFof5UGRHrRioSJ5iG680cYNjE/yWk671nROcpPj4hAS8nyLhSw==", "integrity": "sha512-1PHjlYRevNxxdy2JZ8JcNAw7rX8V9P1AKkP+x/xZfxB0K5FYfuV+Ug6P/6NVSR2jHQ+FzDDoDHS04nYUsOIyLQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"funding": { "funding": {

View File

@@ -125,7 +125,7 @@
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/mime": "^4.0.0", "@types/mime": "^4.0.0",
"@types/prismjs": "^1.26.5", "@types/prismjs": "^1.26.5",
"astro": "^5.12.8", "astro": "^5.12.9",
"astro-auto-import": "^0.4.4", "astro-auto-import": "^0.4.4",
"autoprefixer": "^10.4.21", "autoprefixer": "^10.4.21",
"bundlewatch": "^0.4.1", "bundlewatch": "^0.4.1",
@@ -174,12 +174,12 @@
"sass": "1.78.0", "sass": "1.78.0",
"sass-true": "^9.0.0", "sass-true": "^9.0.0",
"shelljs": "^0.10.0", "shelljs": "^0.10.0",
"stylelint": "^16.23.0", "stylelint": "^16.23.1",
"stylelint-config-twbs-bootstrap": "^16.1.0", "stylelint-config-twbs-bootstrap": "^16.1.0",
"terser": "^5.43.1", "terser": "^5.43.1",
"unist-util-visit": "^5.0.0", "unist-util-visit": "^5.0.0",
"vnu-jar": "24.10.17", "vnu-jar": "24.10.17",
"zod": "^4.0.14" "zod": "^4.0.17"
}, },
"files": [ "files": [
"dist/{css,js}/*.{css,js,map}", "dist/{css,js}/*.{css,js,map}",

View File

@@ -1209,8 +1209,7 @@ import Placeholder from "@shortcodes/Placeholder.astro"
<nav class="navbar navbar-expand-lg bg-body-tertiary"> <nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="#"> <a class="navbar-brand" href="#">
<img src=${getVersionedDocsPath('/assets/brand/bootstrap-logo-white.svg')} width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy" <img src="${getVersionedDocsPath('/assets/brand/bootstrap-logo-white.svg')}" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy" style="filter: invert(1) grayscale(100%) brightness(200%);">
style="filter: invert(1) grayscale(100%) brightness(200%);">
</a> </a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="تبديل التنقل"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="تبديل التنقل">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
@@ -1249,7 +1248,7 @@ import Placeholder from "@shortcodes/Placeholder.astro"
<nav class="navbar navbar-expand-lg navbar-dark bg-primary mt-5"> <nav class="navbar navbar-expand-lg navbar-dark bg-primary mt-5">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="#"> <a class="navbar-brand" href="#">
<img src=${getVersionedDocsPath('/assets/brand/bootstrap-logo-white.svg')} width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy"> <img src="${getVersionedDocsPath('/assets/brand/bootstrap-logo-white.svg')}" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy">
</a> </a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent2" aria-controls="navbarSupportedContent2" aria-expanded="false" aria-label="تبديل التنقل"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent2" aria-controls="navbarSupportedContent2" aria-expanded="false" aria-label="تبديل التنقل">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>

View File

@@ -1187,8 +1187,7 @@ export const body_class = 'bg-body-tertiary'
<nav class="navbar navbar-expand-lg bg-body-tertiary"> <nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="#"> <a class="navbar-brand" href="#">
<img src=${getVersionedDocsPath('/assets/brand/bootstrap-logo-white.svg')} width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy" <img src="${getVersionedDocsPath('/assets/brand/bootstrap-logo-white.svg')}" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy" style="filter: invert(1) grayscale(100%) brightness(200%);">
style="filter: invert(1) grayscale(100%) brightness(200%);">
</a> </a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
@@ -1227,7 +1226,7 @@ export const body_class = 'bg-body-tertiary'
<nav class="navbar navbar-expand-lg navbar-dark bg-primary mt-5"> <nav class="navbar navbar-expand-lg navbar-dark bg-primary mt-5">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="#"> <a class="navbar-brand" href="#">
<img src=${getVersionedDocsPath('/assets/brand/bootstrap-logo-white.svg')} width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy"> <img src="${getVersionedDocsPath('/assets/brand/bootstrap-logo-white.svg')}" width="38" height="30" class="d-inline-block align-top" alt="Bootstrap" loading="lazy">
</a> </a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent2" aria-controls="navbarSupportedContent2" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent2" aria-controls="navbarSupportedContent2" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>

View File

@@ -33,15 +33,20 @@ interface Props {
* This takes precedence over the `code` prop. * This takes precedence over the `code` prop.
*/ */
filePath?: string filePath?: string
/**
* Defines if the `<Code>` component is nested inside an `<Example>` component or not.
* @default false
*/
nestedInExample?: boolean
} }
const { class: className, code, containerClass, fileMatch, filePath, lang } = Astro.props const { class: className, code, containerClass, fileMatch, filePath, lang, nestedInExample = false } = Astro.props
let codeToDisplay = filePath let codeToDisplay = filePath
? fs.readFileSync(path.join(process.cwd(), filePath), 'utf8') ? fs.readFileSync(path.join(process.cwd(), filePath), 'utf8')
: Array.isArray(code) : Array.isArray(code)
? code.join('\n') ? code.join('\n')
: code : code
if (filePath && fileMatch && codeToDisplay) { if (filePath && fileMatch && codeToDisplay) {
const match = codeToDisplay.match(new RegExp(fileMatch)) const match = codeToDisplay.match(new RegExp(fileMatch))
@@ -130,19 +135,23 @@ if (filePath && fileMatch && codeToDisplay) {
}) })
</script> </script>
<div class:list={['bd-code-snippet', containerClass]}> <div class:list={[{ 'bd-code-snippet': !nestedInExample }, containerClass]}>
{ {
Astro.slots.has('pre') ? ( nestedInExample
<slot name="pre" /> ? (<></>)
) : ( : Astro.slots.has('pre')
<div class="bd-clipboard"> ? (
<button type="button" class="btn-clipboard"> <slot name="pre" />
<svg class="bi" role="img" aria-label="Copy"> )
<use xlink:href="#clipboard" /> : (
</svg> <div class="bd-clipboard">
</button> <button type="button" class="btn-clipboard">
</div> <svg class="bi" role="img" aria-label="Copy">
) <use xlink:href="#clipboard" />
</svg>
</button>
</div>
)
} }
<div class="highlight"> <div class="highlight">
{ {

View File

@@ -1,6 +1,6 @@
--- ---
import { replacePlaceholdersInHtml } from '@libs/placeholder' import { replacePlaceholdersInHtml } from '@libs/placeholder'
import { Prism } from '@astrojs/prism' import Code from '@components/shortcodes/Code.astro'
interface Props { interface Props {
/** /**
@@ -96,9 +96,7 @@ const simplifiedMarkup = markup
</div> </div>
</div> </div>
)} )}
<div class="highlight"> <Code code={simplifiedMarkup} lang={lang} nestedInExample={true} />
<Prism code={simplifiedMarkup} lang={lang} />
</div>
</> </>
) )
} }