Skip to content

Commit f0ac85a

Browse files
authored
Merge branch 'main' into docs/fix-triangle-diagram-clarity
2 parents 07d4bf7 + 9554b74 commit f0ac85a

File tree

10 files changed

+10475
-10367
lines changed

10 files changed

+10475
-10367
lines changed

astro.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ if (shouldSkipCompress) {
2020
export default defineConfig({
2121
site: 'https://p5js.org',
2222
compressHTML: false,
23+
legacy: {
24+
collections: true
25+
},
2326
integrations: [
2427
mermaid({autoTheme: true}),
2528
preact({

package-lock.json

Lines changed: 10414 additions & 10338 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@
2121
"test:a11y": "playwright test test/a11y"
2222
},
2323
"dependencies": {
24-
"@astrojs/check": "^0.5.5",
25-
"@astrojs/mdx": "^2.1.1",
26-
"@astrojs/preact": "^3.1.0",
27-
"@astrojs/tailwind": "^5.1.0",
28-
"@tailwindcss/typography": "^0.5.12",
29-
"astro": "^4.4.1",
24+
"@astrojs/check": "^0.9.6",
25+
"@astrojs/mdx": "^4.3.13",
26+
"@astrojs/preact": "^4.1.3",
27+
"@astrojs/tailwind": "^6.0.2",
28+
"@tailwindcss/typography": "^0.5.19",
29+
"astro": "^5.16.6",
3030
"astro-compress": "^2.2.10",
3131
"astro-mermaid": "^1.2.0",
3232
"astrojs-service-worker": "^2.0.0",
3333
"autoprefixer": "^10.4.20",
3434
"cheerio": "^1.0.0-rc.12",
35-
"cssnano": "^7.0.6",
35+
"cssnano": "^7.1.2",
3636
"fuse.js": "^7.0.0",
3737
"js-yaml": "^4.1.0",
3838
"keyword-extractor": "^0.0.28",
@@ -41,7 +41,7 @@
4141
"preact": "^10.19.5",
4242
"tailwindcss": "^3.4.1",
4343
"typescript": "^5.3.3",
44-
"vitest": "^1.3.1"
44+
"vitest": "^4.0.16"
4545
},
4646
"overrides": {
4747
"react": "npm:@preact/compat@latest",
@@ -64,7 +64,7 @@
6464
"@types/js-yaml": "^4.0.9",
6565
"@types/jsdom": "^21.1.6",
6666
"@types/lodash": "^4.17.1",
67-
"@types/node": "^20.11.19",
67+
"@types/node": "^22.13.0",
6868
"@typescript-eslint/eslint-plugin": "^7.0.2",
6969
"@typescript-eslint/parser": "^7.0.2",
7070
"@uiw/codemirror-extensions-basic-setup": "^4.21.22",

src/components/Dropdown/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ export const Dropdown = ({
152152
</div>
153153
<button
154154
onClick={() => handleOptionClick(option)}
155-
ref={(el) => (optionRefs.current[index] = el as HTMLButtonElement)}
155+
ref={el => {
156+
optionRefs.current[index] = el as HTMLButtonElement
157+
}}
156158
onBlur={handleBlur}
157159
>
158160
<span>{option.label}</span>

src/content/reference/es/p5/createImage.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: createImage
33
module: Imagen
44
submodule: Imagen
55
file: src/image/image.js
6-
description: "<p>Crea un objeto <a href="/reference/p5/p5.Image">p5.Image</a> nuevo.</p><p><code>createImage()</code> utiliza los parámetros <code>width</code> y <code>height</code> para establecer las dimensiones en píxeles del nuevo objeto<a href="/reference/p5/p5.Image">p5.Image</a>. El nuevo objeto <a href="/reference/p5/p5.Image">p5.Image</a> puede ser modificado actualizando su array de<a href="/reference/p5.Image/pixels">píxeles</a> o llamando a sus métodos<a href="/reference/p5.Image/get">get()</a> y<a href="/reference/p5.Image/set">set()</a>. El método <a href="/reference/p5.Image/loadPixels">loadPixels()</a>debe ser llamado antes de leer o modificar los valores de los píxeles. El método <a href="/reference/p5.Image/updatePixels">updatePixels()</a> debe ser llamado npara que los cambios surtan efecto.</p> <p>Nota: El nuevo objeto <a href="/reference/p5/p5.Image">p5.Image</a> es transparente por defecto.</p>"
6+
description: '<p>Crea un objeto <a href="/reference/p5/p5.Image">p5.Image</a> nuevo.</p><p><code>createImage()</code> utiliza los parámetros <code>width</code> y <code>height</code> para establecer las dimensiones en píxeles del nuevo objeto<a href="/reference/p5/p5.Image">p5.Image</a>. El nuevo objeto <a href="/reference/p5/p5.Image">p5.Image</a> puede ser modificado actualizando su array de<a href="/reference/p5.Image/pixels">píxeles</a> o llamando a sus métodos<a href="/reference/p5.Image/get">get()</a> y<a href="/reference/p5.Image/set">set()</a>. El método <a href="/reference/p5.Image/loadPixels">loadPixels()</a>debe ser llamado antes de leer o modificar los valores de los píxeles. El método <a href="/reference/p5.Image/updatePixels">updatePixels()</a> debe ser llamado npara que los cambios surtan efecto.</p> <p>Nota: El nuevo objeto <a href="/reference/p5/p5.Image">p5.Image</a> es transparente por defecto.</p>'
77
line: '15'
88
isConstructor: 'false'
99
itemtype: method

src/content/reference/es/p5/square.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ line: 1224
2727
isConstructor: false
2828
itemtype: method
2929
example:
30-
- |-
31-
30+
- |
3231
<div>
3332
<code>
3433
function setup() {
@@ -143,6 +142,6 @@ params:
143142
type: Number
144143
optional: true
145144
chainable: true
146-
145+
---
147146

148147
# square

src/scripts/builders/contribute.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,4 +322,6 @@ const buildContributorDocs = async () => {
322322
console.log("Contributor docs build completed.");
323323
};
324324

325-
buildContributorDocs();
325+
if(import.meta.main){
326+
buildContributorDocs();
327+
}

src/scripts/builders/reference.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,11 +464,13 @@ const saveMDX = async (mdxDocs: ReferenceMDXDoc[]) => {
464464
}
465465
};
466466

467-
buildReference();
468-
469467
export const testingExports = {
470468
modulePathTree,
471469
memberMethodPreviews: classMethodAndPropertyPreviews,
472470
addDocToModulePathTree,
473471
addMemberMethodPreviewsToClassDocs: addMethodAndPropertyPreviewsToClassDocs,
474472
};
473+
474+
if(import.meta.main){
475+
buildReference();
476+
}

tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
{
22
"extends": "astro/tsconfigs/strict",
3+
"include": [
4+
"./.astro/types.d.ts",
5+
"**/*"
6+
],
37
"exclude": [
48
"./dist",
59
"./in",
6-
"./.astro",
10+
// "./.astro",
711
"./src/content/examples/**/*.js",
812
"src/scripts/parsers/in",
913
"src/scripts/parsers/out"
1014
],
1115
"compilerOptions": {
16+
"lib": ["es2022"],
1217
"jsx": "react-jsx",
1318
"jsxImportSource": "preact",
1419
"allowJs": true,

vitest.config.ts

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,40 @@
1-
/// <reference types="vitest" />
2-
import { defineConfig, configDefaults } from 'vitest/config';
31
import { getViteConfig } from "astro/config";
2+
import { configDefaults } from 'vitest/config';
43
import preact from "@preact/preset-vite";
54

6-
export default getViteConfig(defineConfig({
5+
export default getViteConfig({
76
// needed to ensure react 3rd party libraries work with preact
87
plugins: [preact()],
98
resolve: {
109
mainFields: ["module"],
1110
},
1211
test: {
13-
/* for example, use global to avoid globals imports (describe, test, expect): */
14-
// globals: true,
15-
environment: "jsdom",
16-
exclude: [
17-
...configDefaults.exclude,
18-
'test/a11y/**',
19-
],
12+
projects: [
13+
{
14+
extends: true,
15+
test: {
16+
name: "DOM",
17+
environment: "jsdom",
18+
include: [
19+
"test/**/*"
20+
],
21+
exclude: [
22+
...configDefaults.exclude,
23+
"test/pages/*",
24+
"test/mocks/*",
25+
'test/a11y/**'
26+
]
27+
}
28+
},
29+
{
30+
extends: true,
31+
test: {
32+
name: "node",
33+
include: [
34+
"test/pages/*"
35+
]
36+
}
37+
}
38+
]
2039
},
21-
}));
40+
});

0 commit comments

Comments
 (0)