Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial conversion script from Documentation.js to old format #6777

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
dc46772
Add initial conversion script from Documentation.js to old format
davepagurek Jan 28, 2024
ccd64f8
Add module/submodule info
davepagurek Feb 4, 2024
7c07ff3
Handle overloads
davepagurek Feb 4, 2024
5d92215
Update documentation to make the parser work
davepagurek Feb 5, 2024
bdedeee
Implement class properties
davepagurek Feb 10, 2024
bb80892
Use 1 for true to save characters and match the old format
davepagurek Feb 10, 2024
4be13d2
Handle consts + usage
davepagurek Feb 11, 2024
a9fb003
Also log return types and properties
davepagurek Feb 11, 2024
590490a
Fix some more cases of private classes
davepagurek Feb 11, 2024
d4f1fa4
Fix p5.Geometry ES6 method docs
davepagurek Feb 11, 2024
1ac249f
Convert TypedDict; fix overloaded params having too many items
davepagurek Feb 11, 2024
b77d912
Fix one straggler
davepagurek Feb 11, 2024
0b490b0
Convert more classes
davepagurek Feb 11, 2024
1afc553
Convert p5.Vector and handle static methods
davepagurek Feb 11, 2024
e0dd7ae
Convert p5.Camera, fix p5 prototype methods with @for tag
davepagurek Feb 11, 2024
254d3b0
Convert p5.Matrix
davepagurek Feb 11, 2024
354c0d4
Convert p5.RendererGL
davepagurek Feb 11, 2024
ba1109a
Convert p5.Shader
davepagurek Feb 11, 2024
d0ae735
Convert p5.Graphics
davepagurek Feb 11, 2024
f6f0712
Convert p5.Table, handle recursive entries
davepagurek Feb 11, 2024
aed275b
Convert p5.Color
davepagurek Feb 11, 2024
f10eaa6
Convert p5.XML
davepagurek Feb 11, 2024
bb81851
Convert p5
davepagurek Feb 11, 2024
d195e4c
Convert p5.Renderer, fix @function tags confusing the script
davepagurek Feb 11, 2024
137b920
Remove docs mentioning @constructor
davepagurek Feb 11, 2024
223c573
Merge branch 'dev-2.0' into initial-conversion-script
davepagurek Feb 11, 2024
ec917ae
Fix submodules overwriting modules
davepagurek Feb 18, 2024
936e3f1
Fix mistaken @class tags in RendererGL
davepagurek Feb 18, 2024
6d6a222
Remove more @method tags from ES6 classes
davepagurek Feb 18, 2024
36dc993
Fix broken inline code due to typo
davepagurek Feb 18, 2024
de89b2d
Handle lists
davepagurek Feb 18, 2024
0ae7925
Ensure some whitespace between <p>s
davepagurek Feb 18, 2024
b9b884e
better array handling, more consistent <p>s
davepagurek Feb 18, 2024
bdd8318
Fix nested folders not getting looked at
davepagurek Feb 18, 2024
096e885
Add entries for consts
davepagurek Feb 18, 2024
ad28d39
Output to the location the old file was in
davepagurek Feb 23, 2024
6afe0aa
Fix bit that was breaking tests
davepagurek Feb 23, 2024
2b3b0b3
Output to parameterData.json too
davepagurek Feb 24, 2024
98944e0
Get some of the error_helpers tests working
davepagurek Feb 24, 2024
50f279a
Fix validation errors not resetting
davepagurek Feb 24, 2024
8ed8db9
Fix typo in random import
davepagurek Feb 24, 2024
288ba4c
Add tests for new format changes
davepagurek Feb 24, 2024
2813514
Fix constants not showing up due to examples being omitted
davepagurek Mar 20, 2024
080521a
Convert p5.Element
davepagurek Mar 21, 2024
1f6c69b
Prevent some comments from being read as documentation
limzykenneth Apr 10, 2024
7b0a340
Add typedefs for all constants and remove all generic Constant types
davepagurek Apr 14, 2024
bb7a311
Merge branch 'dev-2.0' into initial-conversion-script
davepagurek Jul 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27,999 changes: 27,999 additions & 0 deletions docs/converted.json

Large diffs are not rendered by default.

16,154 changes: 16,154 additions & 0 deletions docs/parameterData.json.bak

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": "rollup -c",
"preview": "vite",
"dev": "grunt yui browserify:dev connect:yui watch:quick",
"docs": "documentation build ./src/app.js -o ./docs/data.json",
"docs": "documentation build ./src/**/*.js ./src/**/**/*.js -o ./docs/data.json && node ./utils/convert.js",
"test": "vitest run",
"lint": "eslint .",
"lint:fix": "eslint --fix ."
Expand Down Expand Up @@ -40,7 +40,7 @@
"core-js": "^3.6.5",
"dayjs": "^1.11.10",
"derequire": "^2.0.0",
"documentation": "^14.0.2",
"documentation": "^14.0.3",
"eslint": "^8.54.0",
"file-saver": "^1.3.8",
"gifenc": "^1.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/accessibility/describe.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const labelTableElId = '_lte_'; //Label Table Element
*
* @method describe
* @param {String} text description of the canvas.
* @param {Constant} [display] either LABEL or FALLBACK.
* @param {(FALLBACK|LABEL)} [display] either LABEL or FALLBACK.
*
* @example
* <div>
Expand Down Expand Up @@ -185,7 +185,7 @@ p5.prototype.describe = function(text, display) {
* @method describeElement
* @param {String} name name of the element.
* @param {String} text description of the element.
* @param {Constant} [display] either LABEL or FALLBACK.
* @param {(FALLBACK|LABEL)} [display] either LABEL or FALLBACK.
*
* @example
* <div>
Expand Down
4 changes: 2 additions & 2 deletions src/accessibility/outputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import p5 from '../core/main';
* to learn more about making sketches accessible.
*
* @method textOutput
* @param {Constant} [display] either FALLBACK or LABEL.
* @param {(FALLBACK|LABEL)} [display] either FALLBACK or LABEL.
*
* @example
* <div>
Expand Down Expand Up @@ -173,7 +173,7 @@ p5.prototype.textOutput = function(display) {
* to learn more about making sketches accessible.
*
* @method gridOutput
* @param {Constant} [display] either FALLBACK or LABEL.
* @param {(FALLBACK|LABEL)} [display] either FALLBACK or LABEL.
*
* @example
* <div>
Expand Down
14 changes: 5 additions & 9 deletions src/color/p5.Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import p5 from '../core/main';
import * as constants from '../core/constants';
import color_conversion from './color_conversion';

/**
/*
* CSS named colors.
* @private
*/
const namedColors = {
aliceblue: '#f0f8ff',
Expand Down Expand Up @@ -165,7 +166,7 @@ const namedColors = {
yellowgreen: '#9acd32'
};

/**
/*
* These regular expressions are used to build up the patterns for matching
* viable CSS color strings: fragmenting the regexes in this way increases the
* legibility and comprehensibility of the code.
Expand All @@ -178,8 +179,9 @@ const INTEGER = /(\d{1,3})/; // Match integers: 79, 255, etc.
const DECIMAL = /((?:\d+(?:\.\d+)?)|(?:\.\d+))/; // Match 129.6, 79, .9, etc.
const PERCENT = new RegExp(`${DECIMAL.source}%`); // Match 12.9%, 79%, .9%, etc.

/**
/*
* Full color string patterns. The capture groups are necessary.
* @private
*/
const colorPatterns = {
// Match colors in format #XXX, e.g. #416.
Expand Down Expand Up @@ -336,7 +338,6 @@ const colorPatterns = {
* instance of this class.
*
* @class p5.Color
* @constructor
* @param {p5} [pInst] pointer to p5 instance.
*
* @param {Number[]|String} vals an array containing the color values
Expand Down Expand Up @@ -370,7 +371,6 @@ p5.Color = class Color {
* `myColor.toString('#rrggbb')`, it will determine how the color string is
* formatted. By default, color strings are formatted as `'rgba(r, g, b, a)'`.
*
* @method toString
* @param {String} [format] how the color string will be formatted.
* Leaving this empty formats the string as rgba(r, g, b, a).
* '#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.
Expand Down Expand Up @@ -574,7 +574,6 @@ p5.Color = class Color {
* The range depends on the <a href="#/p5/colorMode">colorMode()</a>. In the
* default RGB mode it's between 0 and 255.
*
* @method setRed
* @param {Number} red the new red value.
*
* @example
Expand Down Expand Up @@ -616,7 +615,6 @@ p5.Color = class Color {
* The range depends on the <a href="#/p5/colorMode">colorMode()</a>. In the
* default RGB mode it's between 0 and 255.
*
* @method setGreen
* @param {Number} green the new green value.
*
* @example
Expand Down Expand Up @@ -658,7 +656,6 @@ p5.Color = class Color {
* The range depends on the <a href="#/p5/colorMode">colorMode()</a>. In the
* default RGB mode it's between 0 and 255.
*
* @method setBlue
* @param {Number} blue the new blue value.
*
* @example
Expand Down Expand Up @@ -701,7 +698,6 @@ p5.Color = class Color {
* <a href="#/p5/colorMode">colorMode()</a>. In the default RGB mode it's
* between 0 and 255.
*
* @method setAlpha
* @param {Number} alpha the new alpha value.
*
* @example
Expand Down
4 changes: 2 additions & 2 deletions src/color/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ p5.prototype.clear = function(...args) {
* created in. Changing modes doesn't affect their appearance.
*
* @method colorMode
* @param {Constant} mode either RGB, HSB or HSL, corresponding to
* @param {(RGB|HSB|HSL)} mode either RGB, HSB or HSL, corresponding to
* Red/Green/Blue and Hue/Saturation/Brightness
* (or Lightness).
* @param {Number} [max] range for all values.
Expand Down Expand Up @@ -937,7 +937,7 @@ p5.prototype.clear = function(...args) {

/**
* @method colorMode
* @param {Constant} mode
* @param {(RGB|HSB|HSL)} mode
* @param {Number} max1 range for the red or hue depending on the
* current color mode.
* @param {Number} max2 range for the green or saturation depending
Expand Down
Loading
Loading