From 05079442122e90228f18606b12798235d51b8ada Mon Sep 17 00:00:00 2001 From: Zyie Date: Sun, 18 Feb 2024 16:34:06 +0000 Subject: [PATCH 1/4] new pixi-versions.json built from pixijs/pixijs: refs/heads/dev merge commit: b631cc57fa3b039211b0401e0317b5bdddb51167 using CodeSandbox CI build: eb03e248517a4d1345a384c6d6eb994ae210a453 --- pixi-versions.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pixi-versions.json b/pixi-versions.json index 4e3380498..01819ffde 100644 --- a/pixi-versions.json +++ b/pixi-versions.json @@ -6,7 +6,16 @@ "build": "https://pixijs.download/dev/pixi.min.js", "docs": "https://pixijs.download/release/docs/index.html", "dev": true, - "npm": "https://pkg.csb.dev/pixijs/pixijs/commit/978ae574" + "npm": "https://pkg.csb.dev/pixijs/pixijs/commit/eb03e248" + }, + { + "versionLabel": "v7.4.x", + "version": "7.4.0", + "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.4.0", + "build": "https://pixijs.download/v7.4.0/pixi.min.js", + "docs": "https://pixijs.download/v7.4.0/docs/index.html", + "npm": "7.4.0", + "latest": true }, { "versionLabel": "v7.3.x", @@ -14,8 +23,7 @@ "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.3.3", "build": "https://pixijs.download/v7.3.3/pixi.min.js", "docs": "https://pixijs.download/v7.3.3/docs/index.html", - "npm": "7.3.3", - "latest": true + "npm": "7.3.3" }, { "versionLabel": "v7.2.x", From 9058a644d8482c847b07977d0ee98238bbd44e10 Mon Sep 17 00:00:00 2001 From: bbazukun123 Date: Thu, 22 Feb 2024 13:08:57 +0000 Subject: [PATCH 2/4] Chore: Website Restructuring (#49) * Restructuring: Move Tutorial and Playground into the Docusaurus Docs Structure * Fix main container styling in coding mode for full-screen * Chore: Website Restructuring * Updated content generation scripts * Minor fixes * Chore: Website Versioning Scripts (#52) * Chore: Website Versioning * Versions page fixes * Add `Working with Content` Section on README (#54) * Added Working with Content Section on README * Quick adjustment --------- Co-authored-by: Baz Utsahajit * Chore: Create v7.x Snapshot + Make Working Docs the Pre-Release v8 (#53) * Chore: Create v7.x Snapshot + Make Working Docs the Pre-Release v8 * Tweaked Sandpack Dependencies Config * Hotfix: Restructure Source Examples and Tutorial (#55) * Hotfix: Restructure Source Examples and Tutorial * Type hotfix * Added back parcel-bundler for all pixi versions * Reverted conditioned babel core dev dependency * Chore: Upgrade Working Docs to use PixiJS v8.0.0-rc.2 and Simplify examples and tutorial source versioning (#60) * Chore: Upgrade Working Docs to use PixiJS v8.0.0-rc.1 * Simplify source versioning for examples and tutorials * Bump up to v8.0.0-rc.2 * Type fix * Add ghtoken ignore * Fix Versioned Links * Upgrade to RC4 * More Assorted fixes --------- Co-authored-by: Baz Utsahajit --------- Co-authored-by: Baz Utsahajit --------- Co-authored-by: Baz Utsahajit --------- Co-authored-by: Baz Utsahajit * Upgrade to RC4 * No footer on example pages * Update v7.x versioned docs * Use semver to pick the latest version instead of relying on the latest tag * Update Versions Page + Add devs and unmaintained versions * More readme update * Allowing user to customize pixi version label * Add the ability to manage generic snapshots * Combine gitignores into the root one * Add ability to add extra packages to the playground * Update examples config to allow multiple files * Adapt syntax highlighting on tab switches * Extract multi-file handling into a useCodeSource function * Allow active file override with '$' * Editor tutorial code change fix * Allow extra packages on tutorial + add babel plugin * Resolve conflict * Fix editor styling and persisting playground changes * Updated editor now keep persisted changes on all visible files + Fix tabs overflowing * Tabs style update and fixes * Upgrade to RC5 * Remove unused types and functions * Fix tab scroll * Bump up to RC6 * Upgrade to RC7 * Updated v7.x to latest * Upgrade to RC.9 * upgrade to RC 10 * update * undo --------- Co-authored-by: Baz Utsahajit Co-authored-by: Zyie <24736175+Zyie@users.noreply.github.com> --- .eslintrc.js | 3 + .github/workflows/update-dev.yml | 39 - .gitignore | 14 + README.md | 78 + docs/examples/.gitignore | 3 - docs/guides/basics/getting-started.md | 6 +- docs/guides/components/containers.md | 2 +- docs/guides/components/graphics.md | 4 +- docs/guides/components/interaction.md | 2 +- docs/guides/components/sprites.md | 2 +- docs/guides/components/text.md | 4 +- docs/guides/components/textures.md | 2 +- docs/pixi-version.json | 10 + docs/playground/index.md | 11 + docs/tutorials/index.md | 11 + docusaurus.config.js | 31 +- package-lock.json | 1577 +++++++++++++++-- package.json | 21 +- pixi-dev-versions.json | 18 + pixi-legacy-versions.json | 58 + pixi-versions.json | 84 +- scripts/create-docs-version-snapshot.js | 78 + scripts/generate-example-docs.js | 138 ++ scripts/generate-pixi-version-config.js | 216 +++ scripts/generate-tutorial-docs.js | 101 ++ scripts/remove-docs-version-snapshot.js | 126 ++ .../switch-snapshot-pixi-version-config.js | 119 ++ scripts/update-global-version-configs.js | 126 ++ scripts/update-pixi-version-configs.js | 91 + scripts/write-example-docs.js | 102 -- scripts/write-versions.js | 132 -- src/components/Example/index.module.scss | 17 + src/components/Example/index.tsx | 31 + .../Homepage/ClosingSection/index.tsx | 2 +- src/components/Homepage/HeroHeader/index.tsx | 2 +- .../PixiPlayground/useEditorCode.ts | 107 -- .../PixiPlayground/usePixiVersions.ts | 59 - .../PixiPlayground/MonacoEditor.tsx | 49 +- .../PixiPlayground/index.module.scss | 79 +- .../{ => Playground}/PixiPlayground/index.tsx | 44 +- .../PixiPlayground/useEditorCode.ts | 163 ++ .../PixiPlayground/usePixiVersions.ts | 24 + .../PixiPlayground/usePlaygroundURLState.ts | 41 +- .../useSandpackConfiguration.ts | 58 +- src/components/Playground/index.module.scss | 17 + src/components/Playground/index.tsx | 62 + src/components/Tutorial/index.module.scss | 1 + src/components/Tutorial/index.tsx | 37 +- src/css/custom.scss | 20 + .../meshAndShaders/mergingGeometry.js | 82 - .../meshAndShaders/sharingGeometry.js | 79 - src/data/tutorial/TutorialData.ts | 13 - src/examples/index.ts | 58 + .../v7.0.0}/advanced/collisionDetection.js | 77 +- .../v7.0.0}/advanced/mouseTrail.js | 6 +- .../v7.0.0}/advanced/scratchCard.js | 13 +- .../v7.0.0}/advanced/screenShot.js | 0 .../v7.0.0}/advanced/slots.js | 4 +- .../v7.0.0}/advanced/spinners.js | 45 +- .../v7.0.0}/advanced/starWarp.js | 5 +- .../v7.0.0}/assets/async.js | 0 .../v7.0.0}/assets/background.js | 0 .../v7.0.0}/assets/bundle.js | 38 +- .../v7.0.0}/assets/multiple.js | 0 .../v7.0.0}/assets/promise.js | 0 .../v7.0.0}/basic/blendModes.js | 0 .../v7.0.0}/basic/cacheAsBitmap.js | 12 +- .../v7.0.0}/basic/container.js | 0 .../v7.0.0}/basic/particleContainer.js | 0 .../v7.0.0}/basic/simplePlane.js | 2 +- .../v7.0.0}/basic/tinting.js | 8 +- .../v7.0.0}/basic/transparentBackground.js | 0 .../v7.0.0}/events/click.js | 0 .../v7.0.0}/events/customHitarea.js | 47 +- .../v7.0.0}/events/customMouseIcon.js | 8 +- .../v7.0.0}/events/dragging.js | 5 +- .../events/hitTestingWithSpatialHash.js | 54 +- .../v7.0.0}/events/interactivity.js | 14 +- .../v7.0.0}/events/logger.js | 37 +- .../events/nestedBoundaryWithProjection.js | 35 +- .../v7.0.0}/events/pointerTracker.js | 12 +- .../v7.0.0}/events/slider.js | 20 +- .../v7.0.0}/examplesData.json | 0 .../v7.0.0}/filtersAdvanced/custom.js | 0 .../v7.0.0}/filtersAdvanced/mouseBlending.js | 0 .../shaderToyFilterRenderTexture.js | 2 +- .../v7.0.0}/filtersBasic/blur.js | 8 +- .../v7.0.0}/filtersBasic/colorMatrix.js | 0 .../filtersBasic/displacementMapCrawlies.js | 11 +- .../filtersBasic/displacementMapFlag.js | 5 +- .../v7.0.0}/graphics/advanced.js | 18 +- .../v7.0.0}/graphics/dynamic.js | 25 +- .../v7.0.0}/graphics/simple.js | 48 +- .../examples => examples/v7.0.0}/index.ts | 114 +- .../v7.0.0}/masks/filter.js | 2 +- .../v7.0.0}/masks/graphics.js | 0 .../v7.0.0}/masks/sprite.js | 0 .../meshAndShaders/instancedGeometry.js | 25 +- .../meshAndShaders/interleavingGeometry.js | 52 +- .../v7.0.0/meshAndShaders/mergingGeometry.js | 114 ++ .../multiPassShaderGeneratedMesh.js | 40 +- .../v7.0.0}/meshAndShaders/shaderToyMesh.js | 40 +- .../v7.0.0}/meshAndShaders/sharedShader.js | 58 +- .../v7.0.0/meshAndShaders/sharingGeometry.js | 104 ++ .../meshAndShaders/texturedMeshAdvanced.js | 4 +- .../meshAndShaders/texturedMeshBasic.js | 4 +- .../v7.0.0}/meshAndShaders/triangle.js | 11 +- .../v7.0.0}/meshAndShaders/triangleColor.js | 49 +- .../meshAndShaders/triangleTextured.js | 58 +- .../v7.0.0}/meshAndShaders/uniforms.js | 40 +- .../v7.0.0}/offscreenCanvas/basic.js | 0 .../v7.0.0}/offscreenCanvas/webWorker.js | 23 +- .../sprite/animatedSpriteAnimationSpeed.js | 0 .../v7.0.0}/sprite/animatedSpriteExplosion.js | 2 +- .../v7.0.0}/sprite/animatedSpriteJet.js | 0 .../v7.0.0}/sprite/basic.js | 0 .../v7.0.0}/sprite/textureSwap.js | 0 .../v7.0.0}/sprite/tilingSprite.js | 6 +- .../v7.0.0}/sprite/video.js | 0 .../v7.0.0}/text/bitmapText.js | 12 +- .../v7.0.0}/text/fromFont.js | 0 .../v7.0.0}/text/pixiText.js | 0 .../v7.0.0}/text/webFont.js | 23 +- .../v7.0.0}/textures/gradientBasic.js | 0 .../v7.0.0}/textures/gradientResource.js | 4 +- .../v7.0.0}/textures/renderTextureAdvanced.js | 2 +- .../v7.0.0}/textures/renderTextureBasic.js | 0 .../v7.0.0}/textures/textureRotate.js | 15 +- .../v8.0.0/advanced/collisionDetection.js | 194 ++ src/examples/v8.0.0/advanced/mouseTrail.js | 111 ++ src/examples/v8.0.0/advanced/scratchCard.js | 86 + src/examples/v8.0.0/advanced/screenShot.js | 71 + src/examples/v8.0.0/advanced/slots.js | 262 +++ src/examples/v8.0.0/advanced/spinners.js | 422 +++++ src/examples/v8.0.0/advanced/starWarp.js | 97 + src/examples/v8.0.0/assets/async.js | 31 + src/examples/v8.0.0/assets/background.js | 43 + src/examples/v8.0.0/assets/bundle.js | 96 + src/examples/v8.0.0/assets/multiple.js | 37 + src/examples/v8.0.0/assets/promise.js | 32 + src/examples/v8.0.0/basic/blendModes.js | 104 ++ src/examples/v8.0.0/basic/container.js | 47 + src/examples/v8.0.0/basic/fillGradient.js | 56 + src/examples/v8.0.0/basic/meshPlane.js | 41 + .../v8.0.0/basic/particleContainer.js | 108 ++ src/examples/v8.0.0/basic/tinting.js | 98 + .../v8.0.0/basic/transparentBackground.js | 35 + src/examples/v8.0.0/events/click.js | 48 + src/examples/v8.0.0/events/customHitarea.js | 131 ++ src/examples/v8.0.0/events/customMouseIcon.js | 121 ++ src/examples/v8.0.0/events/dragging.js | 87 + .../events/hitTestingWithSpatialHash.js | 219 +++ src/examples/v8.0.0/events/interactivity.js | 127 ++ src/examples/v8.0.0/events/logger.js | 93 + .../events/nestedBoundaryWithProjection.js | 230 +++ src/examples/v8.0.0/events/pointerTracker.js | 32 + src/examples/v8.0.0/events/slider.js | 95 + src/examples/v8.0.0/examplesData.json | 105 ++ src/examples/v8.0.0/filtersAdvanced/custom.js | 58 + .../v8.0.0/filtersAdvanced/mouseBlending.js | 72 + .../shaderToyFilterRenderTexture.js | 125 ++ src/examples/v8.0.0/filtersBasic/blur.js | 60 + .../v8.0.0/filtersBasic/colorMatrix.js | 113 ++ .../filtersBasic/displacementMapCrawlies.js | 129 ++ .../filtersBasic/displacementMapFlag.js | 60 + src/examples/v8.0.0/graphics/advanced.js | 113 ++ src/examples/v8.0.0/graphics/dynamic.js | 99 ++ src/examples/v8.0.0/graphics/simple.js | 89 + src/examples/v8.0.0/index.ts | 255 +++ src/examples/v8.0.0/masks/filter.js | 54 + src/examples/v8.0.0/masks/graphics.js | 119 ++ src/examples/v8.0.0/masks/sprite.js | 62 + .../meshAndShaders/instancedGeometry.js | 84 + .../v8.0.0/meshAndShaders/mergingGeometry.js | 83 + .../multiPassShaderGeneratedMesh.js | 243 +++ .../v8.0.0/meshAndShaders/shaderToyMesh.js | 166 ++ .../v8.0.0/meshAndShaders/sharedShader.js | 117 ++ .../v8.0.0/meshAndShaders/sharingGeometry.js | 98 + .../meshAndShaders/texturedMeshAdvanced.js | 75 + .../meshAndShaders/texturedMeshBasic.js | 55 + .../v8.0.0/meshAndShaders/triangle.js | 47 + .../v8.0.0/meshAndShaders/triangleColor.js | 60 + .../v8.0.0/meshAndShaders/triangleTextured.js | 76 + .../v8.0.0/meshAndShaders/uniforms.js | 78 + src/examples/v8.0.0/offscreenCanvas/basic.js | 52 + .../v8.0.0/offscreenCanvas/webWorker.js | 84 + .../sprite/animatedSpriteAnimationSpeed.js | 55 + .../v8.0.0/sprite/animatedSpriteExplosion.js | 45 + .../v8.0.0/sprite/animatedSpriteJet.js | 48 + src/examples/v8.0.0/sprite/basic.js | 37 + src/examples/v8.0.0/sprite/textureSwap.js | 47 + src/examples/v8.0.0/sprite/tilingSprite.js | 42 + src/examples/v8.0.0/sprite/video.js | 60 + src/examples/v8.0.0/text/bitmapText.js | 31 + src/examples/v8.0.0/text/fromFont.js | 38 + src/examples/v8.0.0/text/pixiText.js | 86 + src/examples/v8.0.0/text/webFont.js | 47 + .../v8.0.0/textures/renderTextureAdvanced.js | 108 ++ .../v8.0.0/textures/renderTextureBasic.js | 57 + src/examples/v8.0.0/textures/textureRotate.js | 85 + src/pages/playground.module.css | 20 - src/pages/playground.tsx | 67 - src/pages/tutorial.tsx | 12 - src/pages/versions.tsx | 108 +- src/theme/CodeBlock/index.tsx | 2 +- src/theme/Footer/Copyright/index.js | 14 + src/theme/Footer/Layout/index.js | 24 + src/theme/Footer/LinkItem/index.js | 30 + src/theme/Footer/Links/MultiColumn/index.js | 44 + src/theme/Footer/Links/Simple/index.js | 38 + src/theme/Footer/Links/index.js | 14 + src/theme/Footer/Logo/index.js | 38 + src/theme/Footer/Logo/styles.module.css | 8 + src/theme/Footer/index.js | 35 + src/theme/Navbar/Content/index.js | 15 +- src/tutorials/index.ts | 44 + .../v7.0.0/gettingStarted}/index.ts | 12 +- .../v7.0.0/gettingStarted}/step1-code.js | 0 .../v7.0.0/gettingStarted}/step1-content.md | 0 .../v7.0.0/gettingStarted}/step2-code.js | 0 .../gettingStarted}/step2-completed-code.js | 0 .../v7.0.0/gettingStarted}/step2-content.md | 0 .../v7.0.0/gettingStarted}/step3-code.js | 0 .../gettingStarted}/step3-completed-code.js | 0 .../v7.0.0/gettingStarted}/step3-content.md | 0 .../v7.0.0/gettingStarted}/step4-code.js | 0 .../v7.0.0/gettingStarted}/step4-content.md | 0 src/tutorials/v7.0.0/index.ts | 8 + src/tutorials/v7.0.0/tutorialsData.json | 1 + src/tutorials/v8.0.0/gettingStarted/index.ts | 36 + .../v8.0.0/gettingStarted/step1-code.js | 8 + .../v8.0.0/gettingStarted/step1-content.md | 15 + .../v8.0.0/gettingStarted/step2-code.js | 8 + .../gettingStarted/step2-completed-code.js | 21 + .../v8.0.0/gettingStarted/step2-content.md | 29 + .../v8.0.0/gettingStarted/step3-code.js | 20 + .../gettingStarted/step3-completed-code.js | 29 + .../v8.0.0/gettingStarted/step3-content.md | 15 + .../v8.0.0/gettingStarted/step4-code.js | 29 + .../v8.0.0/gettingStarted/step4-content.md | 3 + src/tutorials/v8.0.0/index.ts | 8 + src/tutorials/v8.0.0/tutorialsData.json | 1 + src/utils/utils.ts | 11 + versioned_docs/version-7.x/branding.md | 68 + versioned_docs/version-7.x/examples/index.md | 17 + versioned_docs/version-7.x/faq.md | 40 + .../guides/basics/architecture-overview.md | 25 + .../guides/basics/getting-started.md | 176 ++ .../version-7.x/guides/basics/render-loop.md | 35 + .../version-7.x/guides/basics/scene-graph.md | 152 ++ .../guides/basics/what-pixijs-is-not.md | 39 + .../guides/basics/what-pixijs-is.md | 31 + .../version-7.x/guides/components/assets.md | 161 ++ .../guides/components/containers.md | 96 + .../guides/components/display-object.md | 21 + .../version-7.x/guides/components/graphics.md | 104 ++ .../guides/components/interaction.md | 110 ++ .../guides/components/sprite-sheets.md | 84 + .../version-7.x/guides/components/sprites.md | 41 + .../version-7.x/guides/components/text.md | 106 ++ .../version-7.x/guides/components/textures.md | 75 + versioned_docs/version-7.x/guides/index.md | 14 + .../guides/migrations/upgrading.md | 17 + .../version-7.x/guides/migrations/v5.md | 224 +++ .../version-7.x/guides/migrations/v6.md | 34 + .../version-7.x/guides/migrations/v7.md | 249 +++ .../guides/production/performance-tips.md | 71 + versioned_docs/version-7.x/pixi-version.json | 10 + .../version-7.x/playground/index.md | 11 + versioned_docs/version-7.x/tutorials/index.md | 11 + versioned_sidebars/version-7.x-sidebars.json | 59 + versions.json | 3 + 272 files changed, 13600 insertions(+), 1637 deletions(-) delete mode 100644 .github/workflows/update-dev.yml delete mode 100644 docs/examples/.gitignore create mode 100644 docs/pixi-version.json create mode 100644 docs/playground/index.md create mode 100644 docs/tutorials/index.md create mode 100644 pixi-dev-versions.json create mode 100644 pixi-legacy-versions.json create mode 100644 scripts/create-docs-version-snapshot.js create mode 100755 scripts/generate-example-docs.js create mode 100644 scripts/generate-pixi-version-config.js create mode 100755 scripts/generate-tutorial-docs.js create mode 100644 scripts/remove-docs-version-snapshot.js create mode 100644 scripts/switch-snapshot-pixi-version-config.js create mode 100644 scripts/update-global-version-configs.js create mode 100644 scripts/update-pixi-version-configs.js delete mode 100755 scripts/write-example-docs.js delete mode 100644 scripts/write-versions.js create mode 100644 src/components/Example/index.module.scss create mode 100644 src/components/Example/index.tsx delete mode 100644 src/components/PixiPlayground/useEditorCode.ts delete mode 100644 src/components/PixiPlayground/usePixiVersions.ts rename src/components/{ => Playground}/PixiPlayground/MonacoEditor.tsx (59%) rename src/components/{ => Playground}/PixiPlayground/index.module.scss (58%) rename src/components/{ => Playground}/PixiPlayground/index.tsx (62%) create mode 100644 src/components/Playground/PixiPlayground/useEditorCode.ts create mode 100644 src/components/Playground/PixiPlayground/usePixiVersions.ts rename src/components/{ => Playground}/PixiPlayground/usePlaygroundURLState.ts (51%) rename src/components/{ => Playground}/PixiPlayground/useSandpackConfiguration.ts (64%) create mode 100644 src/components/Playground/index.module.scss create mode 100644 src/components/Playground/index.tsx delete mode 100644 src/data/examples/meshAndShaders/mergingGeometry.js delete mode 100644 src/data/examples/meshAndShaders/sharingGeometry.js delete mode 100644 src/data/tutorial/TutorialData.ts create mode 100644 src/examples/index.ts rename src/{data/examples => examples/v7.0.0}/advanced/collisionDetection.js (69%) rename src/{data/examples => examples/v7.0.0}/advanced/mouseTrail.js (90%) rename src/{data/examples => examples/v7.0.0}/advanced/scratchCard.js (90%) rename src/{data/examples => examples/v7.0.0}/advanced/screenShot.js (100%) rename src/{data/examples => examples/v7.0.0}/advanced/slots.js (98%) rename src/{data/examples => examples/v7.0.0}/advanced/spinners.js (90%) rename src/{data/examples => examples/v7.0.0}/advanced/starWarp.js (93%) rename src/{data/examples => examples/v7.0.0}/assets/async.js (100%) rename src/{data/examples => examples/v7.0.0}/assets/background.js (100%) rename src/{data/examples => examples/v7.0.0}/assets/bundle.js (77%) rename src/{data/examples => examples/v7.0.0}/assets/multiple.js (100%) rename src/{data/examples => examples/v7.0.0}/assets/promise.js (100%) rename src/{data/examples => examples/v7.0.0}/basic/blendModes.js (100%) rename src/{data/examples => examples/v7.0.0}/basic/cacheAsBitmap.js (89%) rename src/{data/examples => examples/v7.0.0}/basic/container.js (100%) rename src/{data/examples => examples/v7.0.0}/basic/particleContainer.js (100%) rename src/{data/examples => examples/v7.0.0}/basic/simplePlane.js (92%) rename src/{data/examples => examples/v7.0.0}/basic/tinting.js (94%) rename src/{data/examples => examples/v7.0.0}/basic/transparentBackground.js (100%) rename src/{data/examples => examples/v7.0.0}/events/click.js (100%) rename src/{data/examples => examples/v7.0.0}/events/customHitarea.js (78%) rename src/{data/examples => examples/v7.0.0}/events/customMouseIcon.js (96%) rename src/{data/examples => examples/v7.0.0}/events/dragging.js (93%) rename src/{data/examples => examples/v7.0.0}/events/hitTestingWithSpatialHash.js (82%) rename src/{data/examples => examples/v7.0.0}/events/interactivity.js (91%) rename src/{data/examples => examples/v7.0.0}/events/logger.js (70%) rename src/{data/examples => examples/v7.0.0}/events/nestedBoundaryWithProjection.js (89%) rename src/{data/examples => examples/v7.0.0}/events/pointerTracker.js (75%) rename src/{data/examples => examples/v7.0.0}/events/slider.js (79%) rename src/{data/examples => examples/v7.0.0}/examplesData.json (100%) rename src/{data/examples => examples/v7.0.0}/filtersAdvanced/custom.js (100%) rename src/{data/examples => examples/v7.0.0}/filtersAdvanced/mouseBlending.js (100%) rename src/{data/examples => examples/v7.0.0}/filtersAdvanced/shaderToyFilterRenderTexture.js (98%) rename src/{data/examples => examples/v7.0.0}/filtersBasic/blur.js (84%) rename src/{data/examples => examples/v7.0.0}/filtersBasic/colorMatrix.js (100%) rename src/{data/examples => examples/v7.0.0}/filtersBasic/displacementMapCrawlies.js (92%) rename src/{data/examples => examples/v7.0.0}/filtersBasic/displacementMapFlag.js (92%) rename src/{data/examples => examples/v7.0.0}/graphics/advanced.js (85%) rename src/{data/examples => examples/v7.0.0}/graphics/dynamic.js (80%) rename src/{data/examples => examples/v7.0.0}/graphics/simple.js (67%) rename src/{data/examples => examples/v7.0.0}/index.ts (74%) rename src/{data/examples => examples/v7.0.0}/masks/filter.js (97%) rename src/{data/examples => examples/v7.0.0}/masks/graphics.js (100%) rename src/{data/examples => examples/v7.0.0}/masks/sprite.js (100%) rename src/{data/examples => examples/v7.0.0}/meshAndShaders/instancedGeometry.js (81%) rename src/{data/examples => examples/v7.0.0}/meshAndShaders/interleavingGeometry.js (54%) create mode 100644 src/examples/v7.0.0/meshAndShaders/mergingGeometry.js rename src/{data/examples => examples/v7.0.0}/meshAndShaders/multiPassShaderGeneratedMesh.js (91%) rename src/{data/examples => examples/v7.0.0}/meshAndShaders/shaderToyMesh.js (84%) rename src/{data/examples => examples/v7.0.0}/meshAndShaders/sharedShader.js (68%) create mode 100644 src/examples/v7.0.0/meshAndShaders/sharingGeometry.js rename src/{data/examples => examples/v7.0.0}/meshAndShaders/texturedMeshAdvanced.js (89%) rename src/{data/examples => examples/v7.0.0}/meshAndShaders/texturedMeshBasic.js (85%) rename src/{data/examples => examples/v7.0.0}/meshAndShaders/triangle.js (78%) rename src/{data/examples => examples/v7.0.0}/meshAndShaders/triangleColor.js (56%) rename src/{data/examples => examples/v7.0.0}/meshAndShaders/triangleTextured.js (60%) rename src/{data/examples => examples/v7.0.0}/meshAndShaders/uniforms.js (69%) rename src/{data/examples => examples/v7.0.0}/offscreenCanvas/basic.js (100%) rename src/{data/examples => examples/v7.0.0}/offscreenCanvas/webWorker.js (86%) rename src/{data/examples => examples/v7.0.0}/sprite/animatedSpriteAnimationSpeed.js (100%) rename src/{data/examples => examples/v7.0.0}/sprite/animatedSpriteExplosion.js (94%) rename src/{data/examples => examples/v7.0.0}/sprite/animatedSpriteJet.js (100%) rename src/{data/examples => examples/v7.0.0}/sprite/basic.js (100%) rename src/{data/examples => examples/v7.0.0}/sprite/textureSwap.js (100%) rename src/{data/examples => examples/v7.0.0}/sprite/tilingSprite.js (86%) rename src/{data/examples => examples/v7.0.0}/sprite/video.js (100%) rename src/{data/examples => examples/v7.0.0}/text/bitmapText.js (62%) rename src/{data/examples => examples/v7.0.0}/text/fromFont.js (100%) rename src/{data/examples => examples/v7.0.0}/text/pixiText.js (100%) rename src/{data/examples => examples/v7.0.0}/text/webFont.js (71%) rename src/{data/examples => examples/v7.0.0}/textures/gradientBasic.js (100%) rename src/{data/examples => examples/v7.0.0}/textures/gradientResource.js (95%) rename src/{data/examples => examples/v7.0.0}/textures/renderTextureAdvanced.js (98%) rename src/{data/examples => examples/v7.0.0}/textures/renderTextureBasic.js (100%) rename src/{data/examples => examples/v7.0.0}/textures/textureRotate.js (82%) create mode 100644 src/examples/v8.0.0/advanced/collisionDetection.js create mode 100644 src/examples/v8.0.0/advanced/mouseTrail.js create mode 100644 src/examples/v8.0.0/advanced/scratchCard.js create mode 100644 src/examples/v8.0.0/advanced/screenShot.js create mode 100644 src/examples/v8.0.0/advanced/slots.js create mode 100644 src/examples/v8.0.0/advanced/spinners.js create mode 100644 src/examples/v8.0.0/advanced/starWarp.js create mode 100644 src/examples/v8.0.0/assets/async.js create mode 100644 src/examples/v8.0.0/assets/background.js create mode 100644 src/examples/v8.0.0/assets/bundle.js create mode 100644 src/examples/v8.0.0/assets/multiple.js create mode 100644 src/examples/v8.0.0/assets/promise.js create mode 100644 src/examples/v8.0.0/basic/blendModes.js create mode 100644 src/examples/v8.0.0/basic/container.js create mode 100644 src/examples/v8.0.0/basic/fillGradient.js create mode 100644 src/examples/v8.0.0/basic/meshPlane.js create mode 100644 src/examples/v8.0.0/basic/particleContainer.js create mode 100644 src/examples/v8.0.0/basic/tinting.js create mode 100644 src/examples/v8.0.0/basic/transparentBackground.js create mode 100644 src/examples/v8.0.0/events/click.js create mode 100644 src/examples/v8.0.0/events/customHitarea.js create mode 100644 src/examples/v8.0.0/events/customMouseIcon.js create mode 100644 src/examples/v8.0.0/events/dragging.js create mode 100644 src/examples/v8.0.0/events/hitTestingWithSpatialHash.js create mode 100644 src/examples/v8.0.0/events/interactivity.js create mode 100644 src/examples/v8.0.0/events/logger.js create mode 100644 src/examples/v8.0.0/events/nestedBoundaryWithProjection.js create mode 100644 src/examples/v8.0.0/events/pointerTracker.js create mode 100644 src/examples/v8.0.0/events/slider.js create mode 100644 src/examples/v8.0.0/examplesData.json create mode 100644 src/examples/v8.0.0/filtersAdvanced/custom.js create mode 100644 src/examples/v8.0.0/filtersAdvanced/mouseBlending.js create mode 100644 src/examples/v8.0.0/filtersAdvanced/shaderToyFilterRenderTexture.js create mode 100644 src/examples/v8.0.0/filtersBasic/blur.js create mode 100644 src/examples/v8.0.0/filtersBasic/colorMatrix.js create mode 100644 src/examples/v8.0.0/filtersBasic/displacementMapCrawlies.js create mode 100644 src/examples/v8.0.0/filtersBasic/displacementMapFlag.js create mode 100644 src/examples/v8.0.0/graphics/advanced.js create mode 100644 src/examples/v8.0.0/graphics/dynamic.js create mode 100644 src/examples/v8.0.0/graphics/simple.js create mode 100644 src/examples/v8.0.0/index.ts create mode 100644 src/examples/v8.0.0/masks/filter.js create mode 100644 src/examples/v8.0.0/masks/graphics.js create mode 100644 src/examples/v8.0.0/masks/sprite.js create mode 100644 src/examples/v8.0.0/meshAndShaders/instancedGeometry.js create mode 100644 src/examples/v8.0.0/meshAndShaders/mergingGeometry.js create mode 100644 src/examples/v8.0.0/meshAndShaders/multiPassShaderGeneratedMesh.js create mode 100644 src/examples/v8.0.0/meshAndShaders/shaderToyMesh.js create mode 100644 src/examples/v8.0.0/meshAndShaders/sharedShader.js create mode 100644 src/examples/v8.0.0/meshAndShaders/sharingGeometry.js create mode 100644 src/examples/v8.0.0/meshAndShaders/texturedMeshAdvanced.js create mode 100644 src/examples/v8.0.0/meshAndShaders/texturedMeshBasic.js create mode 100644 src/examples/v8.0.0/meshAndShaders/triangle.js create mode 100644 src/examples/v8.0.0/meshAndShaders/triangleColor.js create mode 100644 src/examples/v8.0.0/meshAndShaders/triangleTextured.js create mode 100644 src/examples/v8.0.0/meshAndShaders/uniforms.js create mode 100644 src/examples/v8.0.0/offscreenCanvas/basic.js create mode 100644 src/examples/v8.0.0/offscreenCanvas/webWorker.js create mode 100644 src/examples/v8.0.0/sprite/animatedSpriteAnimationSpeed.js create mode 100644 src/examples/v8.0.0/sprite/animatedSpriteExplosion.js create mode 100644 src/examples/v8.0.0/sprite/animatedSpriteJet.js create mode 100644 src/examples/v8.0.0/sprite/basic.js create mode 100644 src/examples/v8.0.0/sprite/textureSwap.js create mode 100644 src/examples/v8.0.0/sprite/tilingSprite.js create mode 100644 src/examples/v8.0.0/sprite/video.js create mode 100644 src/examples/v8.0.0/text/bitmapText.js create mode 100644 src/examples/v8.0.0/text/fromFont.js create mode 100644 src/examples/v8.0.0/text/pixiText.js create mode 100644 src/examples/v8.0.0/text/webFont.js create mode 100644 src/examples/v8.0.0/textures/renderTextureAdvanced.js create mode 100644 src/examples/v8.0.0/textures/renderTextureBasic.js create mode 100644 src/examples/v8.0.0/textures/textureRotate.js delete mode 100644 src/pages/playground.module.css delete mode 100644 src/pages/playground.tsx delete mode 100644 src/pages/tutorial.tsx create mode 100644 src/theme/Footer/Copyright/index.js create mode 100644 src/theme/Footer/Layout/index.js create mode 100644 src/theme/Footer/LinkItem/index.js create mode 100644 src/theme/Footer/Links/MultiColumn/index.js create mode 100644 src/theme/Footer/Links/Simple/index.js create mode 100644 src/theme/Footer/Links/index.js create mode 100644 src/theme/Footer/Logo/index.js create mode 100644 src/theme/Footer/Logo/styles.module.css create mode 100644 src/theme/Footer/index.js create mode 100644 src/tutorials/index.ts rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/index.ts (77%) rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/step1-code.js (100%) rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/step1-content.md (100%) rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/step2-code.js (100%) rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/step2-completed-code.js (100%) rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/step2-content.md (100%) rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/step3-code.js (100%) rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/step3-completed-code.js (100%) rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/step3-content.md (100%) rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/step4-code.js (100%) rename src/{data/tutorial/getting-started => tutorials/v7.0.0/gettingStarted}/step4-content.md (100%) create mode 100644 src/tutorials/v7.0.0/index.ts create mode 100644 src/tutorials/v7.0.0/tutorialsData.json create mode 100644 src/tutorials/v8.0.0/gettingStarted/index.ts create mode 100644 src/tutorials/v8.0.0/gettingStarted/step1-code.js create mode 100644 src/tutorials/v8.0.0/gettingStarted/step1-content.md create mode 100644 src/tutorials/v8.0.0/gettingStarted/step2-code.js create mode 100644 src/tutorials/v8.0.0/gettingStarted/step2-completed-code.js create mode 100644 src/tutorials/v8.0.0/gettingStarted/step2-content.md create mode 100644 src/tutorials/v8.0.0/gettingStarted/step3-code.js create mode 100644 src/tutorials/v8.0.0/gettingStarted/step3-completed-code.js create mode 100644 src/tutorials/v8.0.0/gettingStarted/step3-content.md create mode 100644 src/tutorials/v8.0.0/gettingStarted/step4-code.js create mode 100644 src/tutorials/v8.0.0/gettingStarted/step4-content.md create mode 100644 src/tutorials/v8.0.0/index.ts create mode 100644 src/tutorials/v8.0.0/tutorialsData.json create mode 100644 src/utils/utils.ts create mode 100644 versioned_docs/version-7.x/branding.md create mode 100644 versioned_docs/version-7.x/examples/index.md create mode 100644 versioned_docs/version-7.x/faq.md create mode 100644 versioned_docs/version-7.x/guides/basics/architecture-overview.md create mode 100644 versioned_docs/version-7.x/guides/basics/getting-started.md create mode 100644 versioned_docs/version-7.x/guides/basics/render-loop.md create mode 100644 versioned_docs/version-7.x/guides/basics/scene-graph.md create mode 100644 versioned_docs/version-7.x/guides/basics/what-pixijs-is-not.md create mode 100644 versioned_docs/version-7.x/guides/basics/what-pixijs-is.md create mode 100644 versioned_docs/version-7.x/guides/components/assets.md create mode 100644 versioned_docs/version-7.x/guides/components/containers.md create mode 100644 versioned_docs/version-7.x/guides/components/display-object.md create mode 100644 versioned_docs/version-7.x/guides/components/graphics.md create mode 100644 versioned_docs/version-7.x/guides/components/interaction.md create mode 100644 versioned_docs/version-7.x/guides/components/sprite-sheets.md create mode 100644 versioned_docs/version-7.x/guides/components/sprites.md create mode 100644 versioned_docs/version-7.x/guides/components/text.md create mode 100644 versioned_docs/version-7.x/guides/components/textures.md create mode 100644 versioned_docs/version-7.x/guides/index.md create mode 100644 versioned_docs/version-7.x/guides/migrations/upgrading.md create mode 100644 versioned_docs/version-7.x/guides/migrations/v5.md create mode 100644 versioned_docs/version-7.x/guides/migrations/v6.md create mode 100644 versioned_docs/version-7.x/guides/migrations/v7.md create mode 100644 versioned_docs/version-7.x/guides/production/performance-tips.md create mode 100644 versioned_docs/version-7.x/pixi-version.json create mode 100644 versioned_docs/version-7.x/playground/index.md create mode 100644 versioned_docs/version-7.x/tutorials/index.md create mode 100644 versioned_sidebars/version-7.x-sidebars.json create mode 100644 versions.json diff --git a/.eslintrc.js b/.eslintrc.js index 4c23151cb..a9d5a539e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -37,6 +37,9 @@ module.exports = { rules: { 'no-empty-function': 0, 'no-prototype-builtins': 0, + 'no-mixed-operators': 0, + 'no-console': 0, + 'global-require': 0, 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'error', 'spaced-comment': [1, 'always', { markers: ['/'] }], diff --git a/.github/workflows/update-dev.yml b/.github/workflows/update-dev.yml deleted file mode 100644 index d7eed2ec2..000000000 --- a/.github/workflows/update-dev.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Pixi Dev Update -on: - repository_dispatch: - types: [ update-dev ] -jobs: - update-dev: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '18' - cache: 'npm' - - run: npm ci - - - name: write new pixi-versions.json - run: npm run write-versions -- ${{ github.event.client_payload.sha }} - - - name: setup git config - run: | - git config --global user.name "$GITHUB_ACTOR" - git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - env: - GIT_USER: $GITHUB_ACTOR - GIT_PASS: ${{ secrets.GITHUB_TOKEN }} - - - name: commit - run: | - git pull origin main - git add pixi-versions.json - git commit -m "new pixi-versions.json built from pixijs/pixijs: ${{ github.event.client_payload.ref }} merge commit: ${{ github.event.client_payload.pr_sha }} using CodeSandbox CI build: ${{ github.event.client_payload.sha }}" - git push origin main - - call-deploy: - needs: update-dev - uses: ./.github/workflows/reusable-deploy.yml - secrets: inherit - - diff --git a/.gitignore b/.gitignore index 8f4344a6a..14145ab32 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,16 @@ .docusaurus .cache-loader +# Generated Example and Tutorial Markdowns +/docs/tutorials/* +!/docs/tutorials/index.md +/docs/examples/* +!/docs/examples/index.md +/versioned_docs/version-*/tutorials/* +!/versioned_docs/version-*/tutorials/index.md +/versioned_docs/version-*/examples/* +!/versioned_docs/version-*/examples/index.md + # Misc .DS_Store .env.local @@ -21,3 +31,7 @@ yarn-error.log* .vscode .idea .eslintcache + +scripts/pixiVersions.json + +.ghtoken \ No newline at end of file diff --git a/README.md b/README.md index 2cf7d0dcc..9fa0b284c 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,81 @@ $ npm build This command generates static content into the `build` directory and can be served using any static contents hosting service. +### Working with Content + +Core content on the website is within the working `docs` directory and can have various versions that were snapshot and copied over into the `versioned_docs` directory. + +Core content consists of: +- Guides +- Examples +- Tutorials + +#### Guides + +These are static markdown pages that can be added and edited directly within the `docs/guides` directory. + +#### Examples + +These are markdown compilations of the JS files on the `src/examples` directory. They are also versioned to match the versions of the docs snapshots. If the exact version of the example is not found, it will fallback to the best-matched most recent version of the examples. be Only the `docs/examples/index.md` entry point can be altered, but the examples themselves should be worked on from within the `src/examples/{version}` directories. Once updated, the command below can be called to generate out the markdown compilations of the examples. + +``` +$ npm run generate-example-docs +``` + +This command will trigger example markdowns generation on all of the docs directories altogether, both the working docs directory and the versioned docs directories. + +__Note__: The examples within the docs version active on the website will be shown on the drop-down menu on the Playground page to serve as starting points for users to explore PixiJS features to their heart's content + +#### Tutorials + +These also markdown compilations of groups of files on the `src/tutorials` directory. Each tutorial group consists of a number of steps where each step contains a JS code file accompanied by an instruction markdown file, and a separate completed JS code file if there is a next step to proceed towards. These completed code can be toggled on/off from the instruction card of the corresponded step. Like the examples, these are also versioned to match the versions of the docs snapshots and will fallback to the best-matched most recent version of the tutorials if the exact version is not found. Only the `docs/tutorials/index.md` entry point can be altered, but the tutorial groups themselves should be worked on from within the `src/tutorial/{version}` directories. Once updated, the command below can be called to generate out the markdown compilations of the tutorial groups. + +``` +$ npm run generate-tutorial-docs +``` + +This command will trigger tutorial markdowns generation on all of the docs directories altogether, both the working docs directory and the versioned docs directories. + +#### Workflow + +``` +$ npm start +``` + +The local development command will also trigger the `generate-content` command which, in turns, calls the `generate-example-docs` script and `generate-tutorial-docs` script respectively. Since the compiled markdown pages contain dynamic components, changes within the examples source or the tutorials source will be reflected on hot reloads. + +However, when adding or removing tutorials or examples, please make sure to re-do `npm start` or run `generate-content` manually to keep the markdown pages of these content up-to-date. + +#### Versioning + +Docs versioning is native to Docusaurus, but to make it easier to manage it is coupled with the PixiJS version. A `pixi-version.json` is required on the working docs directory to create a versioned snapshot of the docs. This can be generated and altered using the following command: + +``` +$ npm run generate-pixi-version-config +``` + +The command will retrieve the up-to-date versions and tags from PixiJS and display out as an interactive list for selection. + +Once satisfied with the state of the working docs and wanting to create a snapshot to make way for another upcoming version, the following command can be called: + +``` +$ npm run create-docs-version-snapshot +``` + +This will copy everything from the working docs into its own directory within the `versioned_docs` directory and named correspondingly to the version number from the encapsulated `pixi-version.json`, if chosen to be created as a specific version snapshot. If chosen to be snapshot as a generic version then the version key will be simplified to `{major}.x` (eg. `7.x`). Generic version snapshot is recommended over the specific one for maintaining major docs, but for a major version where multiple versions of docs are needed then the ability to create specific version snapshots can be handy. The command will also trigger `update-global-version-config` script which adds the pixi version config to the master `pixi-versions.json` on the root and alter the version config on the `docusaurus.config.js` accordingly. Docusaurus will also add the version to its `versions.json` file on the root. + +An existing docs snapshot can be removed using the following command: + +``` +$ npm run remove-docs-version-snapshot +``` + +Or can have its pixi version config altered to another version using the command: + +``` +$ npm run switch-snapshot-pixi-version-config +``` + +where both come with an interactive list of all the snapshots for selection to be actioned on accordingly. + +The `update-pixi-version-configs` script is also called pre-build and pre-deploy to update all the outdated labels or metadata on the `pixi-version.json` config on all the docs directories. diff --git a/docs/examples/.gitignore b/docs/examples/.gitignore deleted file mode 100644 index 2b8e38bdb..000000000 --- a/docs/examples/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Examples MD are autogenerated from src/data/examples JS files -* -!index.md diff --git a/docs/guides/basics/getting-started.md b/docs/guides/basics/getting-started.md index 8c84ec24d..a58391bb2 100644 --- a/docs/guides/basics/getting-started.md +++ b/docs/guides/basics/getting-started.md @@ -91,7 +91,7 @@ What we're doing here is adding a JavaScript code block, and in that block creat When the PIXI.Application class creates the renderer, it builds a Canvas element that it will render *to*. In order to see what we draw with PixiJS, we need to add this Canvas element to the web page's DOM. Append the following line to your page's script block: -```JavaScript +```javascript document.body.appendChild(app.view); ``` @@ -105,7 +105,7 @@ There are a number of ways to draw images in PixiJS, but the simplest is by usin Before PixiJS can render an image, it needs to be loaded. Just like in any web page, image loading happens asynchronously. We'll talk a lot more about resource loading in later guides. For now, we can use a helper method on the PIXI.Sprite class to handle the image loading for us: -```JavaScript +```javascript // Magically load the PNG asynchronously let sprite = PIXI.Sprite.from('sample.png'); ``` @@ -116,7 +116,7 @@ Before PixiJS can render an image, it needs to be loaded. Just like in any web Finally, we need to add our new sprite to the stage. The stage is simply a [Container](https://pixijs.download/release/docs/PIXI.Container.html) that is the root of the scene graph. Every child of the stage container will be rendered every frame. By adding our sprite to the stage, we tell PixiJS's renderer we want to draw it. -```JavaScript +```javascript app.stage.addChild(sprite); ``` diff --git a/docs/guides/components/containers.md b/docs/guides/components/containers.md index c4bd5de39..9839140c0 100644 --- a/docs/guides/components/containers.md +++ b/docs/guides/components/containers.md @@ -10,7 +10,7 @@ However, it's a good idea _not_ to do this. Standalone Container objects are ** So that's the primary use for Containers - as groups of renderable objects in a hierarchy. -Check out the [container example code](/examples/basic/container). +Check out the [container example code](../../examples/basic/container). ## Masking diff --git a/docs/guides/components/graphics.md b/docs/guides/components/graphics.md index 5c1e0c73b..236e11946 100644 --- a/docs/guides/components/graphics.md +++ b/docs/guides/components/graphics.md @@ -4,7 +4,7 @@ In this guide, we're going to de-mystify the Graphics object, starting with how to think about what it does. -Check out the [graphics example code](/examples/graphics/simple). +Check out the [graphics example code](../../examples/graphics/simple). ## Graphics Is About Building - Not Drawing @@ -83,7 +83,7 @@ Doing so is simple. Create the object, call the various builder functions to ad You can also use a Graphics object as a complex mask. To do so, build your object and primitives as usual. Next create a PIXI.Container object that will contain the masked content, and set its `mask` property to your Graphics object. The children of the container will now be clipped to only show through inside the geometry you've created. This technique works for both WebGL and Canvas-based rendering. -Check out the [masking example code](/examples/graphics/simple). +Check out the [masking example code](../../examples/graphics/simple). ## Caveats and Gotchas diff --git a/docs/guides/components/interaction.md b/docs/guides/components/interaction.md index 3aa113495..7d98df968 100644 --- a/docs/guides/components/interaction.md +++ b/docs/guides/components/interaction.md @@ -59,7 +59,7 @@ PixiJS supports the following event types: Any DisplayObject-derived object (Sprite, Container, etc.) can become interactive simply by setting its `eventMode` property to any of the eventModes listed above. Doing so will cause the object to emit interaction events that can be responded to in order to drive your project's behavior. -Check out the [interaction example code](/examples/events/click). +Check out the [interaction example code](../../examples/events/click). To respond to clicks and taps, bind to the events fired on the object, like so: diff --git a/docs/guides/components/sprites.md b/docs/guides/components/sprites.md index db495b6b3..92ef5bb77 100644 --- a/docs/guides/components/sprites.md +++ b/docs/guides/components/sprites.md @@ -6,7 +6,7 @@ Sprites are the simplest and most common renderable object in PixiJS. They repr To create a Sprite, all you need is a Texture (check out the Texture guide). Load a PNG's URL using the PIXI.Loader class, then call `PIXI.Sprite.from(url)` and you're all set. As a convenience during prototyping, you can pass a non-loaded URL to `from()` and PixiJS will handle it, but your sprite will "pop in" after it loads if you don't pre-load your textures. -Check out the [sprite example code](/examples/sprite/basic). +Check out the [sprite example code](../../examples/sprite/basic). ## Using Sprites diff --git a/docs/guides/components/text.md b/docs/guides/components/text.md index d7a1b53c1..caf4aab69 100644 --- a/docs/guides/components/text.md +++ b/docs/guides/components/text.md @@ -14,7 +14,7 @@ In order to draw text to the screen, you use a [Text](https://pixijs.download/re So when working with PIXI.Text objects, there are two sets of options - standard display object options like position, rotation, etc that work *after* the text is rasterized internally, and text style options that are used *while* rasterizing. Because text once rendered is basically just a sprite, there's no need to review the standard options. Instead, let's focus on how text is styled. -Check out the [text example code](/examples/text/pixi-text). +Check out the [text example code](../../examples/text/pixi-text). ## Text Styles @@ -80,7 +80,7 @@ In addition to the standard PIXI.Text approach to adding text to your project, P The primary advantage of this approach is speed - changing text frequently is much cheaper and rendering each additional piece of text is much faster due to the shared source texture. -Check out the [bitmap text example code](/examples/text/bitmap-text). +Check out the [bitmap text example code](../../examples/text/bitmap-text). ## BitmapFont diff --git a/docs/guides/components/textures.md b/docs/guides/components/textures.md index 492cf2f8c..0dd4e38c9 100644 --- a/docs/guides/components/textures.md +++ b/docs/guides/components/textures.md @@ -72,4 +72,4 @@ RenderTexture: A more advanced (but very powerful!) feature is to build a Textur Each of these texture sources has caveats and nuances that we can't cover in this guide, but they should give you a feeling for the power of PixiJS's texture system. -Check out the [render texture example code](/examples/textures/render-texture-basic). +Check out the [render texture example code](../../examples/textures/render-texture-basic). diff --git a/docs/pixi-version.json b/docs/pixi-version.json new file mode 100644 index 000000000..e3f44f004 --- /dev/null +++ b/docs/pixi-version.json @@ -0,0 +1,10 @@ +{ + "versionLabel": "v8.x", + "version": "8.0.0-rc.10", + "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v8.0.0-rc.10", + "build": "https://pixijs.download/v8.0.0-rc.10/pixi.min.js", + "docs": "https://pixijs.download/v8.0.0-rc.10/docs/index.html", + "npm": "8.0.0-rc.10", + "prerelease": true, + "latest": false +} diff --git a/docs/playground/index.md b/docs/playground/index.md new file mode 100644 index 000000000..66ab04f5f --- /dev/null +++ b/docs/playground/index.md @@ -0,0 +1,11 @@ +--- +hide_title: true +pagination_next: null +pagination_prev: null +custom_edit_url: null +--- + +import Playground from '@site/src/components/Playground/index'; +import version from '../pixi-version.json'; + + \ No newline at end of file diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md new file mode 100644 index 000000000..2d1af8295 --- /dev/null +++ b/docs/tutorials/index.md @@ -0,0 +1,11 @@ +--- +pagination_next: null +pagination_prev: null +custom_edit_url: null +--- + +# Tutorials + +Welcome to the tutorials page! Here you can find hand-crafted exercises to get you started with the PixiJS. + +- [Getting Started](./getting-started.md) \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index f85b700df..ba0de3d17 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -43,8 +43,17 @@ const config = { editUrl: 'https://github.com/pixijs/pixijs.com/tree/main/', routeBasePath: '/', versions: { + '7.x': { + label: 'v7.x (Latest)', + path: '7.x', + banner: 'none', + badge: false, + }, + current: { - label: 'Latest', + label: 'v8.x', + banner: 'none', + badge: false, }, }, }, @@ -75,7 +84,7 @@ const config = { highlightSearchTermsOnTargetPage: true, docsRouteBasePath: '/', explicitSearchResultPath: true, - searchContextByPaths: ['guides', 'examples', 'blog'], + searchContextByPaths: ['guides', 'examples', 'tutorials', 'blog'], useAllContextsWithNoSearchContext: true, }, ], @@ -99,10 +108,10 @@ const config = { docId: 'guides/index', label: 'Guides', }, - // TODO: add tutorial back in { - label: 'Tutorial', - to: 'tutorial', + type: 'doc', + docId: 'tutorials/index', + label: 'Tutorials', }, { type: 'doc', @@ -116,16 +125,10 @@ const config = { position: 'left', href: `https://pixijs.download/release/docs/index.html`, }, - // TODO: add docs back in - // { - // type: 'doc', - // docId: 'api/index', - // label: 'API', - // position: 'left', - // }, { - to: 'playground', - label: 'Playground', + type: 'doc', + docId: 'playground/index', + label: 'playground', position: 'left', }, { diff --git a/package-lock.json b/package-lock.json index 9f85b6217..f58f0f500 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,9 +43,13 @@ "eslint-config-standard-with-typescript": "^30.0.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", + "glob": "^10.3.10", "husky": "^8.0.0", + "inquirer": "^8.2.6", "lint-staged": "^13.2.0", "prettier": "^2.8.4", + "recast": "^0.23.4", + "semver": "^7.5.4", "typescript": "^4.9.4" }, "engines": { @@ -3087,6 +3091,50 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "devOptional": true }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/@jest/schemas": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", @@ -3911,6 +3959,16 @@ "node": ">=14.14" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@polka/url": { "version": "1.0.0-next.21", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", @@ -5573,6 +5631,31 @@ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, + "node_modules/assert": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", + "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-nan": "^1.3.2", + "object-is": "^1.1.5", + "object.assign": "^4.1.4", + "util": "^0.12.5" + } + }, + "node_modules/ast-types": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.16.1.tgz", + "integrity": "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==", + "dev": true, + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -5779,6 +5862,26 @@ "resolved": "https://registry.npmjs.org/base16/-/base16-1.0.0.tgz", "integrity": "sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ==" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -5811,6 +5914,17 @@ "url": "https://bevry.me/fund" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/body-parser": { "version": "1.20.1", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", @@ -5939,6 +6053,30 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -6257,6 +6395,12 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "node_modules/cheerio": { "version": "1.0.0-rc.12", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", @@ -6397,6 +6541,18 @@ "node": ">=8" } }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-table3": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", @@ -6445,6 +6601,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -6500,6 +6665,15 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -7399,6 +7573,18 @@ "node": ">= 10" } }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", @@ -8357,15 +8543,6 @@ "node": ">=0.10.0" } }, - "node_modules/eslint-plugin-react/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/eslint-plugin-react/node_modules/resolve": { "version": "2.0.0-next.4", "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", @@ -8404,6 +8581,14 @@ "node": ">=8.0.0" } }, + "node_modules/eslint-scope/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, "node_modules/eslint-utils": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", @@ -8453,15 +8638,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "devOptional": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/eslint/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -8603,15 +8779,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "devOptional": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -8623,7 +8790,7 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", @@ -8631,14 +8798,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "engines": { - "node": ">=4.0" - } - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -8825,6 +8984,20 @@ "node": ">=0.10.0" } }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -8921,6 +9094,30 @@ "node": ">=0.4.0" } }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -9111,6 +9308,34 @@ "is-callable": "^1.1.3" } }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fork-ts-checker-webpack-plugin": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz", @@ -9178,6 +9403,25 @@ "node": ">=10" } }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fork-ts-checker-webpack-plugin/node_modules/schema-utils": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", @@ -9446,19 +9690,22 @@ "integrity": "sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==" }, "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -9480,15 +9727,48 @@ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" }, - "node_modules/global-dirs": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", - "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, "dependencies": { - "ini": "2.0.0" + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/global-dirs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -10268,6 +10548,26 @@ "postcss": "^8.1.0" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/ignore": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", @@ -10387,6 +10687,66 @@ "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" }, + "node_modules/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/inquirer/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/inquirer/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/internal-slot": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", @@ -10459,6 +10819,22 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-array-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", @@ -10640,6 +11016,21 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -10675,6 +11066,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -10682,6 +11082,22 @@ "optional": true, "peer": true }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -10957,6 +11373,24 @@ "node": ">=0.12" } }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jest-util": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.3.1.tgz", @@ -11547,6 +11981,34 @@ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/log-update": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", @@ -12253,6 +12715,12 @@ "multicast-dns": "cli.js" } }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, "node_modules/nan": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", @@ -12437,6 +12905,27 @@ "node": ">= 10" } }, + "node_modules/node-gyp/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "optional": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/node-gyp/node_modules/http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -12601,6 +13090,27 @@ "node": ">=14" } }, + "node_modules/node-sass/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "optional": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/nopt": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", @@ -12719,6 +13229,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -12892,6 +13418,50 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", @@ -13126,6 +13696,40 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dev": true, + "dependencies": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/path-to-regexp": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", @@ -14601,6 +15205,22 @@ "resolved": "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz", "integrity": "sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==" }, + "node_modules/recast": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.4.tgz", + "integrity": "sha512-qtEDqIZGVcSZCHniWwZWbRy79Dc6Wp3kT/UmDA2RJKBPg7+7k51aQBZirHmUGn5uvHf2rg8DkjizrN26k61ATw==", + "dev": true, + "dependencies": { + "assert": "^2.0.0", + "ast-types": "^0.16.1", + "esprima": "~4.0.0", + "source-map": "~0.6.1", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">= 4" + } + }, "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -15153,6 +15773,25 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/rtl-detect": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/rtl-detect/-/rtl-detect-1.0.4.tgz", @@ -15229,6 +15868,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -15252,9 +15900,9 @@ } }, "node_modules/rxjs": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", - "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dependencies": { "tslib": "^2.1.0" } @@ -15332,6 +15980,27 @@ "node": ">=12" } }, + "node_modules/sass-graph/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "optional": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/sass-loader": { "version": "10.4.1", "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.4.1.tgz", @@ -15466,9 +16135,9 @@ } }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -15735,6 +16404,25 @@ "node": ">=4" } }, + "node_modules/shelljs/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -16133,6 +16821,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "node_modules/string-width/node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", @@ -16229,6 +16938,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -16606,6 +17328,18 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -17384,6 +18118,19 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -17522,6 +18269,15 @@ "minimalistic-assert": "^1.0.0" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/web-namespaces": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", @@ -18047,9 +18803,9 @@ } }, "node_modules/wrap-ansi": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", - "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -18062,6 +18818,44 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", @@ -20483,6 +21277,37 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "devOptional": true }, + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "requires": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, "@jest/schemas": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", @@ -21092,6 +21917,13 @@ } } }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true + }, "@polka/url": { "version": "1.0.0-next.21", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", @@ -22373,6 +23205,28 @@ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, + "assert": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", + "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "is-nan": "^1.3.2", + "object-is": "^1.1.5", + "object.assign": "^4.1.4", + "util": "^0.12.5" + } + }, + "ast-types": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.16.1.tgz", + "integrity": "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==", + "dev": true, + "requires": { + "tslib": "^2.0.1" + } + }, "astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -22517,6 +23371,12 @@ "resolved": "https://registry.npmjs.org/base16/-/base16-1.0.0.tgz", "integrity": "sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ==" }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, "batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -22537,6 +23397,17 @@ "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.3.0.tgz", "integrity": "sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg==" }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "body-parser": { "version": "1.20.1", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", @@ -22635,6 +23506,16 @@ "update-browserslist-db": "^1.0.9" } }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -22867,6 +23748,12 @@ "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==" }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "cheerio": { "version": "1.0.0-rc.12", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", @@ -22963,6 +23850,12 @@ "restore-cursor": "^3.1.0" } }, + "cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true + }, "cli-table3": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", @@ -22999,6 +23892,12 @@ "string-width": "^5.0.0" } }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true + }, "cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -23044,6 +23943,12 @@ } } }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true + }, "clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -23677,6 +24582,15 @@ "execa": "^5.0.0" } }, + "defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, "defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", @@ -24187,12 +25101,6 @@ "estraverse": "^5.2.0" } }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "devOptional": true - }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -24466,12 +25374,6 @@ "esutils": "^2.0.2" } }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, "resolve": { "version": "2.0.0-next.4", "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", @@ -24505,6 +25407,13 @@ "requires": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + } } }, "eslint-utils": { @@ -24553,14 +25462,6 @@ "devOptional": true, "requires": { "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "devOptional": true - } } }, "esrecurse": { @@ -24569,19 +25470,12 @@ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "requires": { "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" - } } }, "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" }, "esutils": { "version": "2.0.3", @@ -24739,6 +25633,17 @@ "is-extendable": "^0.1.0" } }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -24826,6 +25731,23 @@ "xml-js": "^1.6.11" } }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + } + } + }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -24962,6 +25884,24 @@ "is-callable": "^1.1.3" } }, + "foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "dependencies": { + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } + } + }, "fork-ts-checker-webpack-plugin": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz", @@ -25005,6 +25945,19 @@ "universalify": "^2.0.0" } }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "schema-utils": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", @@ -25202,16 +26155,42 @@ "integrity": "sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==" }, "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true + } } }, "glob-parent": { @@ -25817,6 +26796,12 @@ "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", "requires": {} }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, "ignore": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", @@ -25905,6 +26890,59 @@ "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" }, + "inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "internal-slot": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", @@ -25960,6 +26998,16 @@ "is-decimal": "^1.0.0" } }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-array-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", @@ -26071,6 +27119,15 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -26093,6 +27150,12 @@ "is-path-inside": "^3.0.2" } }, + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true + }, "is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -26100,6 +27163,16 @@ "optional": true, "peer": true }, + "is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, "is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -26280,6 +27353,16 @@ "textextensions": "2" } }, + "jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, "jest-util": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.3.1.tgz", @@ -26709,6 +27792,24 @@ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "dependencies": { + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + } + } + }, "log-update": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", @@ -27230,6 +28331,12 @@ "thunky": "^1.0.2" } }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, "nan": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", @@ -27375,6 +28482,21 @@ "unique-filename": "^1.1.1" } }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "optional": true, + "peer": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -27512,6 +28634,23 @@ "sass-graph": "^4.0.1", "stdout-stream": "^1.4.0", "true-case-path": "^2.2.1" + }, + "dependencies": { + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "optional": true, + "peer": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } } }, "nopt": { @@ -27596,6 +28735,16 @@ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -27718,6 +28867,37 @@ "word-wrap": "^1.2.3" } }, + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "requires": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + } + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true + }, "p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", @@ -27887,6 +29067,30 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dev": true, + "requires": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "dev": true + }, + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true + } + } + }, "path-to-regexp": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", @@ -28905,6 +30109,19 @@ "resolved": "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz", "integrity": "sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==" }, + "recast": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.4.tgz", + "integrity": "sha512-qtEDqIZGVcSZCHniWwZWbRy79Dc6Wp3kT/UmDA2RJKBPg7+7k51aQBZirHmUGn5uvHf2rg8DkjizrN26k61ATw==", + "dev": true, + "requires": { + "assert": "^2.0.0", + "ast-types": "^0.16.1", + "esprima": "~4.0.0", + "source-map": "~0.6.1", + "tslib": "^2.0.1" + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -29318,6 +30535,21 @@ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "requires": { "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } } }, "rtl-detect": { @@ -29371,6 +30603,12 @@ } } }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -29380,9 +30618,9 @@ } }, "rxjs": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", - "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "requires": { "tslib": "^2.1.0" } @@ -29429,6 +30667,23 @@ "lodash": "^4.17.11", "scss-tokenizer": "^0.4.3", "yargs": "^17.2.1" + }, + "dependencies": { + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "optional": true, + "peer": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } } }, "sass-loader": { @@ -29522,9 +30777,9 @@ } }, "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } @@ -29748,6 +31003,21 @@ "glob": "^7.0.0", "interpret": "^1.0.0", "rechoir": "^0.6.2" + }, + "dependencies": { + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } } }, "side-channel": { @@ -30088,6 +31358,25 @@ } } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + } + } + }, "string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", @@ -30144,6 +31433,15 @@ "ansi-regex": "^5.0.1" } }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -30411,6 +31709,15 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -30947,6 +32254,19 @@ "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", "requires": {} }, + "util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -31052,6 +32372,15 @@ "minimalistic-assert": "^1.0.0" } }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, "web-namespaces": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz", @@ -31422,9 +32751,9 @@ "devOptional": true }, "wrap-ansi": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", - "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "requires": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -31451,6 +32780,36 @@ } } }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index f50771117..6f7a63f72 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,10 @@ "version": "0.0.0", "private": true, "scripts": { - "prebuild": "npm run write-example-docs", + "prebuild": "npm run update-pixi-version-configs && npm run generate-content", "build": "docusaurus build", "clear": "docusaurus clear", - "predeploy": "npm run write-example-docs", + "predeploy": "npm run update-pixi-version-configs && npm run generate-content", "deploy": "docusaurus deploy", "docusaurus": "docusaurus", "lint": "eslint . --ext .js,.mjs,.jsx,.ts,.tsx --max-warnings=0", @@ -14,14 +14,21 @@ "prettier:check": "prettier --check .", "prettify": "prettier --write .", "serve": "docusaurus serve", - "prestart": "npm run write-example-docs", + "prestart": "npm run generate-content", "start": "cross-env PIXI_VERSION=dev docusaurus start", "swizzle": "docusaurus swizzle", "types": "tsc --noEmit", "write-heading-ids": "docusaurus write-heading-ids", "write-translations": "docusaurus write-translations", - "write-example-docs": "node ./scripts/write-example-docs.js", - "write-versions": "node ./scripts/write-versions.js", + "generate-content": "npm run generate-example-docs && npm run generate-tutorial-docs", + "generate-example-docs": "node ./scripts/generate-example-docs.js", + "generate-tutorial-docs": "node ./scripts/generate-tutorial-docs.js", + "generate-pixi-version-config": "node ./scripts/generate-pixi-version-config.js", + "create-docs-version-snapshot": "npm run generate-content && node ./scripts/create-docs-version-snapshot.js", + "remove-docs-version-snapshot": "node ./scripts/remove-docs-version-snapshot.js", + "switch-snapshot-pixi-version-config": "node ./scripts/switch-snapshot-pixi-version-config.js", + "update-global-version-configs": "node ./scripts/update-global-version-configs.js", + "update-pixi-version-configs": "node ./scripts/update-pixi-version-configs.js", "prepare": "husky install" }, "husky": { @@ -84,9 +91,13 @@ "eslint-config-standard-with-typescript": "^30.0.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", + "glob": "^10.3.10", "husky": "^8.0.0", + "inquirer": "^8.2.6", "lint-staged": "^13.2.0", "prettier": "^2.8.4", + "recast": "^0.23.4", + "semver": "^7.5.4", "typescript": "^4.9.4" }, "engines": { diff --git a/pixi-dev-versions.json b/pixi-dev-versions.json new file mode 100644 index 000000000..21de0073a --- /dev/null +++ b/pixi-dev-versions.json @@ -0,0 +1,18 @@ +[ + { + "versionLabel": "dev", + "version": "dev", + "releaseNotes": "https://github.com/pixijs/pixijs/releases", + "build": "https://pixijs.download/dev/pixi.min.js", + "docs": "https://pixijs.download/dev/docs/index.html", + "dev": true + }, + { + "versionLabel": "next-v8", + "version": "next-v8", + "releaseNotes": "https://github.com/pixijs/pixijs/releases", + "build": "https://pixijs.download/next-v8/pixi.min.js", + "docs": "https://pixijs.download/next-v8/docs/index.html", + "dev": true + } +] \ No newline at end of file diff --git a/pixi-legacy-versions.json b/pixi-legacy-versions.json new file mode 100644 index 000000000..dc41ea497 --- /dev/null +++ b/pixi-legacy-versions.json @@ -0,0 +1,58 @@ +[ + { + "versionLabel": "v7.3.x", + "version": "7.3.3", + "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.3.3", + "build": "https://pixijs.download/v7.3.3/pixi.min.js", + "docs": "https://pixijs.download/v7.3.3/docs/index.html", + "npm": "7.3.3" + }, + { + "versionLabel": "v7.2.x", + "version": "7.2.4", + "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.2.4", + "build": "https://pixijs.download/v7.2.4/pixi.min.js", + "docs": "https://pixijs.download/v7.2.4/docs/index.html", + "npm": "7.2.4" + }, + { + "versionLabel": "v7.1.x", + "version": "7.1.4", + "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.1.4", + "build": "https://pixijs.download/v7.1.4/pixi.min.js", + "docs": "https://pixijs.download/v7.1.4/docs/index.html", + "npm": "7.1.4" + }, + { + "versionLabel": "v7.0.x", + "version": "7.0.5", + "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.0.5", + "build": "https://pixijs.download/v7.0.5/pixi.min.js", + "docs": "https://pixijs.download/v7.0.5/docs/index.html", + "npm": "7.0.5" + }, + { + "versionLabel": "v6.x", + "version": "6.5.10", + "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v6.5.10", + "build": "https://pixijs.download/v6.5.10/pixi.min.js", + "docs": "https://pixijs.download/v6.5.10/docs/index.html", + "npm": "6.5.10" + }, + { + "versionLabel": "v5.x", + "version": "5.3.12", + "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v5.3.12", + "build": "https://pixijs.download/v5.3.12/pixi.min.js", + "docs": "https://pixijs.download/v5.3.12/docs/index.html", + "npm": "5.3.12" + }, + { + "versionLabel": "v4.x", + "version": "4.8.9", + "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v4.8.9", + "build": "https://pixijs.download/v4.8.9/pixi.min.js", + "docs": "https://pixijs.download/v4.8.9/docs/index.html", + "npm": "4.8.9" + } +] diff --git a/pixi-versions.json b/pixi-versions.json index 01819ffde..fb9c8d368 100644 --- a/pixi-versions.json +++ b/pixi-versions.json @@ -1,76 +1,24 @@ [ { - "versionLabel": "dev", - "version": "dev", - "releaseNotes": "https://github.com/pixijs/pixijs/releases", - "build": "https://pixijs.download/dev/pixi.min.js", - "docs": "https://pixijs.download/release/docs/index.html", - "dev": true, - "npm": "https://pkg.csb.dev/pixijs/pixijs/commit/eb03e248" - }, - { - "versionLabel": "v7.4.x", + "versionLabel": "v7.x (Latest)", "version": "7.4.0", "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.4.0", "build": "https://pixijs.download/v7.4.0/pixi.min.js", "docs": "https://pixijs.download/v7.4.0/docs/index.html", "npm": "7.4.0", - "latest": true - }, - { - "versionLabel": "v7.3.x", - "version": "7.3.3", - "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.3.3", - "build": "https://pixijs.download/v7.3.3/pixi.min.js", - "docs": "https://pixijs.download/v7.3.3/docs/index.html", - "npm": "7.3.3" - }, - { - "versionLabel": "v7.2.x", - "version": "7.2.4", - "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.2.4", - "build": "https://pixijs.download/v7.2.4/pixi.min.js", - "docs": "https://pixijs.download/v7.2.4/docs/index.html", - "npm": "7.2.4" - }, - { - "versionLabel": "v7.1.x", - "version": "7.1.4", - "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.1.4", - "build": "https://pixijs.download/v7.1.4/pixi.min.js", - "docs": "https://pixijs.download/v7.1.4/docs/index.html", - "npm": "7.1.4" - }, - { - "versionLabel": "v7.0.x", - "version": "7.0.5", - "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v7.0.5", - "build": "https://pixijs.download/v7.0.5/pixi.min.js", - "docs": "https://pixijs.download/v7.0.5/docs/index.html", - "npm": "7.0.5" - }, - { - "versionLabel": "v6.x", - "version": "6.5.10", - "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v6.5.10", - "build": "https://pixijs.download/v6.5.10/pixi.min.js", - "docs": "https://pixijs.download/v6.5.10/docs/index.html", - "npm": "6.5.10" - }, - { - "versionLabel": "v5.x", - "version": "5.3.12", - "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v5.3.12", - "build": "https://pixijs.download/v5.3.12/pixi.min.js", - "docs": "https://pixijs.download/v5.3.12/docs/index.html", - "npm": "5.3.12" - }, - { - "versionLabel": "v4.x", - "version": "4.8.9", - "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v4.8.9", - "build": "https://pixijs.download/v4.8.9/pixi.min.js", - "docs": "https://pixijs.download/v4.8.9/docs/index.html", - "npm": "4.8.9" + "prerelease": false, + "latest": true, + "isCurrent": false + }, + { + "versionLabel": "v8.x", + "version": "8.0.0-rc.10", + "releaseNotes": "https://github.com/pixijs/pixijs/releases/tag/v8.0.0-rc.10", + "build": "https://pixijs.download/v8.0.0-rc.10/pixi.min.js", + "docs": "https://pixijs.download/v8.0.0-rc.10/docs/index.html", + "npm": "8.0.0-rc.10", + "prerelease": true, + "latest": false, + "isCurrent": true } -] +] \ No newline at end of file diff --git a/scripts/create-docs-version-snapshot.js b/scripts/create-docs-version-snapshot.js new file mode 100644 index 000000000..722dc4bb0 --- /dev/null +++ b/scripts/create-docs-version-snapshot.js @@ -0,0 +1,78 @@ +const { unlinkSync, existsSync, readFileSync } = require('fs'); +const shell = require('shelljs'); +const { join, resolve } = require('path'); +const inquirer = require('inquirer'); + +const docsDir = './docs'; +const versionFile = join(docsDir, 'pixi-version.json'); + +function getGenericVersion(version) +{ + return version.replace(/(\d+)(\.\d+)?(\.\d+)?(-.*)?/, '$1.x'); +} + +console.log('Creating a version snapshot of the docs...'); + +try +{ + (async () => + { + // Generate pixi-version.json if it doesn't exist + if (!existsSync(versionFile)) + { + console.log( + 'Aborting snapshot - Pixi version config not found on the working docs.', + 'please generate one first using \'npm run generate-pixi-version-config\'', + ); + + shell.exit(0); + } + + // Read pixi-version.json to get the version + const version = JSON.parse(readFileSync(versionFile, 'utf8')).version; + + // Grab the generic version as an option for user to choose as well + const genericVersion = getGenericVersion(version); + + // Let the user choose between snapshotting the specific version or the generic version + const choice = await inquirer.prompt([ + { + type: 'list', + name: 'selected', + message: 'Would you like to snapshot as a generic or a specific version?', + choices: [genericVersion, version], + default: genericVersion, + loop: false, + }, + ]); + + const selectedVersion = choice.selected; + + // Check if a snapshot of the version already exists + if (existsSync(join(docsDir, `versioned_docs/version-${selectedVersion}`))) + { + console.log( + `Aborting snapshot - Snapshot for version ${selectedVersion} already exists.`, + `Please do 'npm run overwrite-docs-version-snapshot' instead to`, + `overwrite an existing snapshot with the current docs content.`, + ); + shell.exit(0); + } + + // Run docusaurus version with the version + shell.exec(`npm run docusaurus docs:version ${selectedVersion}`); + + // Then update the global version configs accordingly + shell.exec('npm run update-global-version-configs'); + + console.log( + `** pixi version config on the working docs currently conflicts with the recent snapshot's.`, + `Please do 'npm run generate-pixi-version-config' to resolve this accordingly **`, + ); + })(); +} +catch (error) +{ + console.error('An error occurred:', error); + shell.exit(1); +} diff --git a/scripts/generate-example-docs.js b/scripts/generate-example-docs.js new file mode 100755 index 000000000..90dc92a3b --- /dev/null +++ b/scripts/generate-example-docs.js @@ -0,0 +1,138 @@ +#!/usr/bin/env node +const { join, resolve, dirname } = require('path'); +const { mkdirSync, readFileSync, rmSync, writeFileSync, readdirSync } = require('fs'); +const { valid, lte, rcompare, prerelease, major, minor, patch } = require('semver'); +const glob = require('glob'); + +const ROOT = resolve(__dirname, '..'); + +function camelCaseToSentenceCase(str) +{ + const tmp = str.replace(/([A-Z])/g, ' $1'); + + return tmp.charAt(0).toUpperCase() + tmp.slice(1); +} + +function camelCaseToSnakeCase(str) +{ + return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`); +} + +async function go() +{ + // Find all pixi-version.json files + const versionFiles = glob.sync(`${ROOT}/**/pixi-version.json`); + const EXAMPLES_PATH = resolve(ROOT, 'src', 'examples'); + + // Read the directories in the examples directory + const exampleDirectories = readdirSync(EXAMPLES_PATH, { withFileTypes: true }) + .filter((dirent) => dirent.isDirectory()) + .map((dirent) => dirent.name); + + // Perform the script on all the directories that they are in + for (const versionFile of versionFiles) + { + const DOCS_PATH = dirname(versionFile); + const EXAMPLES_MD_PATH = resolve(DOCS_PATH, 'examples'); + const pixiVersion = require(versionFile); + const VERSION = pixiVersion.version; + const isPrerelease = prerelease(`v${VERSION}`); + const versionToCompare = isPrerelease ? `v${major(VERSION)}.${minor(VERSION)}.${patch(VERSION)}` : `v${VERSION}`; + + // Filter and sort the directories to find the best match + const bestMatch = exampleDirectories + // eslint-disable-next-line no-loop-func + .filter((name) => valid(name) && lte(name, versionToCompare)) + .sort((a, b) => rcompare(a, b))[0]; + + console.log(`Generating examples for v${VERSION} using the ${bestMatch} source`); + + const EXAMPLES_JS_PATH = resolve(EXAMPLES_PATH, bestMatch); + + const examplesData = require(`${EXAMPLES_JS_PATH}/examplesData.json`); + + const directories = Object.keys(examplesData); + + const directoryData = directories.map((directoryKey) => + { + const categoryExamples = examplesData[directoryKey]; + const directoryName = camelCaseToSnakeCase(directoryKey); + const categoryTitle = camelCaseToSentenceCase(directoryKey); + + return { + categoryTitle, + directoryPath: join(EXAMPLES_MD_PATH, directoryName), + examples: categoryExamples.map((exampleData) => + { + let exampleKey = exampleData; + let usesWebWorkerLibrary = false; + let hide = false; + + if (typeof exampleData !== 'string') + { + ({ name: exampleKey, usesWebWorkerLibrary = false, hide = false } = exampleData); + } + + const mdFile = `${camelCaseToSnakeCase(exampleKey)}.md`; + const mdPath = join(EXAMPLES_MD_PATH, directoryName, mdFile); + + return { + exampleKey: `${directoryKey}.${exampleKey}`, + examplePath: mdPath, + exampleTitle: camelCaseToSentenceCase(exampleKey), + hide, + usesWebWorkerLibrary, + }; + }), + }; + }); + + directoryData.forEach(({ categoryTitle, directoryPath, examples }, index) => + { + // delete old stuff first + rmSync(directoryPath, { recursive: true, force: true }); + + // recreate directory and build everything + mkdirSync(directoryPath); + + const categoryYml = [`label: ${categoryTitle}`, `position: ${index + 1}`].join('\n'); + const categoryYmlPath = join(directoryPath, '_category_.yml'); + + writeFileSync(categoryYmlPath, categoryYml, 'utf8'); + + let sidebarPosition = 0; + + examples.forEach(({ exampleKey, examplePath, exampleTitle, hide, usesWebWorkerLibrary }) => + { + if (hide) + { + return; + } + + const webWorkerProp = usesWebWorkerLibrary ? ' usesWebWorkerLibrary' : ''; + + const mdContents = [ + '---', + 'hide_table_of_contents: true', + 'hide_edit_this_page: true', + `sidebar_position: ${sidebarPosition++}`, + 'hide_title: true', + 'custom_edit_url: null', + '---', + '', + 'import Example from \'@site/src/components/Example/index\';', + 'import version from \'../../pixi-version.json\';', + '', + `# ${exampleTitle}`, + '', + ``, + '', + ].join('\n'); + + writeFileSync(examplePath, mdContents, 'utf8'); + }); + }); + } +} + +go(); diff --git a/scripts/generate-pixi-version-config.js b/scripts/generate-pixi-version-config.js new file mode 100644 index 000000000..fa5138a3e --- /dev/null +++ b/scripts/generate-pixi-version-config.js @@ -0,0 +1,216 @@ +const { resolve } = require('path'); +const { readFileSync, existsSync } = require('fs'); +const shell = require('shelljs'); +const inquirer = require('inquirer'); +const { compareVersions } = require('compare-versions'); +const glob = require('glob'); + +const PARAM = process.argv[2]; +const ROOT = resolve(__dirname, '..'); +const PATH_FROM_ROOT = PARAM ? `versioned_docs/version-${PARAM}` : 'docs'; +const DOCS_PATH = resolve(ROOT, PATH_FROM_ROOT); +const OUT_NAME = 'pixi-version.json'; +const OUT_PATH = resolve(DOCS_PATH, OUT_NAME); +let config; + +if (existsSync(OUT_PATH)) +{ + // eslint-disable-next-line global-require + config = require(OUT_PATH); +} + +// Compile out a list of all the versions of pixi.js +shell.exec('npm view pixi.js --json > scripts/pixiVersions.json'); + +// Import the compiled list of versions +const pixiVersions = require('./pixiVersions.json'); +const tags = pixiVersions['dist-tags']; + +// Filter out alpha and beta versions and reverse the list to be in descending order +const allVersions = pixiVersions.versions + .slice() + .filter((v) => !v.includes('-alpha') && !v.includes('-beta')) + .reverse(); + +// Sort the tags by descending version number +const tagKeys = Object.keys(tags).sort((a, b) => +{ + const versionA = tags[a]; + const versionB = tags[b]; + + return compareVersions(versionB, versionA); +}); + +// Remove prerelease versions from the list if the latest version is higher +if (compareVersions(tags.prerelease, tags.latest) <= 0) +{ + tagKeys.splice(tagKeys.indexOf('prerelease'), 1); +} + +// Generate the list of options for the user to choose from +const all = '[>] all versions'; +const back = '[<] back'; +const cancel = '[x] cancel'; +const options1 = [all, ...tagKeys]; +const options2 = [back, ...allVersions]; +const intro = `${config ? 'Altering' : 'Generating'} ${PATH_FROM_ROOT}/${OUT_NAME}...\n`; +const prompt = config + ? `Config for PixiJS v${config.version} exists. Which version would you like to replace it with?` + : 'Which PixiJS version would you want to use?'; + +// Add the cancel option if a config already exists +if (config) options1.unshift(cancel); + +// Find all existing pixi-version.json files in the versioned docs directory +const versionFiles = glob.sync(`${ROOT}/versioned_docs/**/pixi-version.json`); + +// Read and parse each pixi-version.json file +const versions = versionFiles.map((file) => +{ + const data = readFileSync(file, 'utf8'); + + return JSON.parse(data); +}); + +// Check if the pixi-version.json with the supplied version already exists +async function doesVersionConfigExist(version) +{ + if (!versions.length) return false; + if (versions.find((v) => v.version === version)) + { + // Prompt the user to select a different version if it already exists + await inquirer.prompt([ + { + type: 'list', + name: 'selected', + message: '** There is already a pixi-version.json for v${version}. Please select a different version! **', + choices: ['Press ENTER to continue...'], + loop: false, + }, + ]); + + return true; + } + + return false; +} + +// async iife +(async () => +{ + let version; + let choice; + let tag; + + // Prompt the user to select a version + while (!version || choice === all || choice === back) + { + choice = await inquirer.prompt([ + { + type: 'list', + name: 'selected', + // If a config already exists, prompt the user to replace it + message: intro + prompt, + choices: options1, + // If a config already exists, default to cancel instead + default: config ? cancel : 'latest', + loop: false, + }, + ]); + + if (choice.selected === cancel) + { + shell.rm('./scripts/pixiVersions.json'); + shell.exit(0); + } + else if (choice.selected === all) + { + choice = await inquirer.prompt([ + { + type: 'list', + name: 'selected', + message: 'Which PixiJS version would you want to use?', + choices: options2, + loop: false, + }, + ]); + + if (choice.selected !== back && !(await doesVersionConfigExist(choice.selected))) + { + version = choice.selected; + // eslint-disable-next-line no-loop-func + tag = Object.entries(tags).find(([k, v]) => v === version)?.[0]; + } + } + else if (!(await doesVersionConfigExist(tags[choice.selected]))) + { + tag = choice.selected; + version = tags[tag]; + } + } + + const parts = version.split('.'); + const major = parts[0]; + const minor = parts[1]; + const patch = parts[2].split('-')[0]; + const isPrelease = parts[2].includes('-rc'); + const isLatest = version === tags.latest; + let versionLabel; + + if (isLatest) + { + versionLabel = `v${[major, 'x'].join('.')} (Latest)`; + } + else if (tag) + { + const extracted = tag.replace('latest-', ''); + + versionLabel = extracted.match(/^\d/) ? `v${extracted}` : extracted; + } + else + { + versionLabel = `v${version}`; + } + + // Prompt the user to confirm or customize the version label + versionLabel = ( + await inquirer.prompt([ + { + type: 'input', + name: 'versionLabel', + message: 'Confirm or customize the version label:', + default: versionLabel, + validate: (input) => input.trim().length > 0, + }, + ]) + ).versionLabel; + + config = { + versionLabel, + version, + releaseNotes: `https://github.com/pixijs/pixijs/releases/tag/v${version}`, + build: `https://pixijs.download/v${version}/pixi.min.js`, + docs: `https://pixijs.download/v${version}/docs/index.html`, + npm: version, + prerelease: isPrelease, + latest: isLatest, + }; + + const json = JSON.stringify(config, null, 2); + + // Generate the version config at the specified docs path + shell.exec(`echo '${json}' > ${OUT_PATH}`); + + // delete the compiled list of versions + shell.rm('./scripts/pixiVersions.json'); + + // Then update the global version configs accordingly + shell.exec('npm run update-global-version-configs'); + + console.log( + `Successfully created pixi ${config.versionLabel} (v${config.version}) config`, + `on ${PATH_FROM_ROOT}/${OUT_NAME}`, + ); + + console.log('** Please make sure to create/update versioned examples and tutorials accordingly! **'); +})(); diff --git a/scripts/generate-tutorial-docs.js b/scripts/generate-tutorial-docs.js new file mode 100755 index 000000000..3699292ee --- /dev/null +++ b/scripts/generate-tutorial-docs.js @@ -0,0 +1,101 @@ +#!/usr/bin/env node +const { join, resolve, dirname } = require('path'); +const { readdirSync, mkdirSync, readFileSync, rmSync, writeFileSync } = require('fs'); +const { valid, lte, rcompare, prerelease, major, minor, patch } = require('semver'); +const glob = require('glob'); + +const ROOT = resolve(__dirname, '..'); + +function camelCaseToSentenceCase(str) +{ + const tmp = str.replace(/([A-Z])/g, ' $1'); + + return tmp.charAt(0).toUpperCase() + tmp.slice(1); +} + +function camelCaseToSnakeCase(str) +{ + return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`); +} + +async function go() +{ + // Find all pixi-version.json files + const versionFiles = glob.sync(`${ROOT}/**/pixi-version.json`); + const TUTORIALS_PATH = resolve(ROOT, 'src', 'tutorials'); + + // Read the directories in the tutorials directory + const tutorialDirectories = readdirSync(TUTORIALS_PATH, { withFileTypes: true }) + .filter((dirent) => dirent.isDirectory()) + .map((dirent) => dirent.name); + + // Perform the script on all the directories that they are in + for (const versionFile of versionFiles) + { + const DOCS_PATH = dirname(versionFile); + const TUTORIALS_MD_PATH = resolve(DOCS_PATH, 'tutorials'); + const pixiVersion = require(versionFile); + const VERSION = pixiVersion.version; + const isPrerelease = prerelease(`v${VERSION}`); + const versionToCompare = isPrerelease ? `v${major(VERSION)}.${minor(VERSION)}.${patch(VERSION)}` : `v${VERSION}`; + + // Filter and sort the directories to find the best match + const bestMatch = tutorialDirectories + // eslint-disable-next-line no-loop-func + .filter((name) => valid(name) && lte(name, versionToCompare)) + .sort((a, b) => rcompare(a, b))[0]; + + console.log(`Generating tutorials for v${VERSION} using the ${bestMatch} source`); + + const TUTORIALS_JS_PATH = resolve(TUTORIALS_PATH, bestMatch); + + const tutorialsData = require(`${TUTORIALS_JS_PATH}/tutorialsData.json`); + + const fileData = tutorialsData.map((tutorialKey) => + { + const mdName = camelCaseToSnakeCase(tutorialKey); + const title = camelCaseToSentenceCase(tutorialKey); + + return { + tutorialKey, + title, + filePath: `${join(TUTORIALS_MD_PATH, mdName)}.md`, + }; + }); + + // delete old stuff first + readdirSync(TUTORIALS_MD_PATH, (err, files) => + { + if (err) throw err; + + for (const file of files) + { + // Keep index.md + if (file === 'index.md' || file === '.gitignore') continue; + rmSync(join(TUTORIALS_MD_PATH, file), { recursive: true, force: true }); + } + }); + + fileData.forEach(({ tutorialKey, title, filePath, hide }, index) => + { + const mdContents = [ + '---', + 'hide_title: true', + 'pagination_next: null', + 'pagination_prev: null', + 'custom_edit_url: null', + '---', + '', + 'import Tutorial from \'@site/src/components/tutorial/index\';', + 'import version from \'../pixi-version.json\';', + '', + ``, + '', + ].join('\n'); + + writeFileSync(filePath, mdContents, 'utf8'); + }); + } +} + +go(); diff --git a/scripts/remove-docs-version-snapshot.js b/scripts/remove-docs-version-snapshot.js new file mode 100644 index 000000000..7797d3614 --- /dev/null +++ b/scripts/remove-docs-version-snapshot.js @@ -0,0 +1,126 @@ +const { unlinkSync, existsSync, readFileSync, writeFileSync, rmSync } = require('fs'); +const glob = require('glob'); +const shell = require('shelljs'); +const { join, resolve } = require('path'); +const inquirer = require('inquirer'); + +const ROOT = resolve(__dirname, '..'); + +function getGenericVersion(version) +{ + return version.replace(/(\d+)(\.\d+)?(\.\d+)?(-.*)?/, '$1.x'); +} + +// Find all pixi-version.json files in the versioned docs directory +const versionFiles = glob.sync(`${ROOT}/versioned_docs/**/pixi-version.json`); + +// Exit if there isn't any version snapshot of the docs to remove +if (!versionFiles.length) +{ + console.log(`There isn\'t any version snapshot of the docs to remove.`); + shell.exit(0); +} + +// Read and parse each pixi-version.json file +const versions = versionFiles.map((file) => +{ + const data = readFileSync(file, 'utf8'); + + return JSON.parse(data); +}); + +console.log('Removing a version snapshot of the docs...'); + +// async iife +(async () => +{ + const cancel = '[x] cancel'; + + // Prompt the user to select a version + const choice = await inquirer.prompt([ + { + type: 'list', + name: 'selected', + message: 'Which version snapshot would you like to remove?', + choices: [cancel, ...versions.map((version) => version.versionLabel)], + default: cancel, + loop: false, + }, + ]); + + if (choice.selected === cancel) + { + shell.exit(0); + } + + const config = versions.find((version) => version.versionLabel === choice.selected); + + /** + * Use the docusaurus versions config to determine if the snapshot is of a generic version, + * so that correct directory and sidebar names can be referred to. + */ + const snapshotVersions = JSON.parse(readFileSync(join(ROOT, 'versions.json'), 'utf8')); + const isGenericSnapshot = !snapshotVersions.includes(config.version); + const key = isGenericSnapshot ? getGenericVersion(config.version) : config.version; + + // 1st Confirmation + const confirmation = await inquirer.prompt([ + { + type: 'list', + name: 'selected', + message: `Are you sure you want to remove ${config.versionLabel} (v${key}) snapshot?`, + choices: ['no', 'yes'], + default: 'no', + loop: false, + }, + ]); + + if (confirmation.selected === 'no') + { + shell.exit(0); + } + + // 2nd Confirmation + const input = await inquirer.prompt([ + { + type: 'input', + name: 'version', + message: `Please type version number '${key}' to remove the snapshot?`, + }, + ]); + + if (input.version !== key) + { + shell.exit(0); + } + + // Remove the selected version snapshot ---------------------------- + + // Read versions.json + const data = readFileSync(join(ROOT, 'versions.json'), 'utf8'); + + // Remove the selected version + const parsed = snapshotVersions.filter((version) => version !== key); + + // If there are no versions left, delete versions.json + if (!parsed.length) + { + unlinkSync(join(ROOT, 'versions.json')); + } + else + { + // Write the updated JSON back to versions.json + writeFileSync(join(ROOT, 'versions.json'), JSON.stringify(parsed, null, 2)); + } + + // Delete the versioned directory + rmSync(join(ROOT, 'versioned_docs', `version-${key}`), { recursive: true, force: true }); + + // Delete the versioned sidebars + rmSync(join(ROOT, 'versioned_sidebars', `version-${key}-sidebars.json`), { recursive: true, force: true }); + + console.log(`Successfully removed ${config.versionLabel} (v${key}) snapshot!`); + + // Then update the global version configs accordingly + shell.exec('npm run update-global-version-configs'); +})(); diff --git a/scripts/switch-snapshot-pixi-version-config.js b/scripts/switch-snapshot-pixi-version-config.js new file mode 100644 index 000000000..d904b1107 --- /dev/null +++ b/scripts/switch-snapshot-pixi-version-config.js @@ -0,0 +1,119 @@ +const { unlinkSync, existsSync, readFileSync, writeFileSync, rmSync } = require('fs'); +const glob = require('glob'); +const shell = require('shelljs'); +const { join, resolve } = require('path'); +const inquirer = require('inquirer'); +const { spawn } = require('child_process'); +const ROOT = resolve(__dirname, '..'); + +function getGenericVersion(version) +{ + return version.replace(/(\d+)(\.\d+)?(\.\d+)?(-.*)?/, '$1.x'); +} + +// Find all pixi-version.json files in the versioned docs directory +const versionFiles = glob.sync(`${ROOT}/versioned_docs/**/pixi-version.json`); + +// Exit if there isn't any version snapshot of the docs to update. +if (!versionFiles.length) +{ + console.log(`There isn\'t any version snapshot of the docs to update.`); + shell.exit(0); +} + +// Read and parse each pixi-version.json file +const versions = versionFiles.map((file) => +{ + const data = readFileSync(file, 'utf8'); + + return JSON.parse(data); +}); + +console.log('Switching a snapshot\'s pixi version config...'); + +// async iife +(async () => +{ + const cancel = '[x] cancel'; + + // Prompt the user to select a version + const choice = await inquirer.prompt([ + { + type: 'list', + name: 'selected', + message: 'Which version snapshot would you like to update its pixi version config?', + choices: [cancel, ...versions.map((version) => version.versionLabel)], + default: cancel, + loop: false, + }, + ]); + + if (choice.selected === cancel) + { + shell.exit(0); + } + + const config = versions.find((version) => version.versionLabel === choice.selected); + + /** + * Use the docusaurus versions config to determine if the snapshot is of a generic version, + * so that correct directory and sidebar names can be referred to. + */ + const snapshotVersions = JSON.parse(readFileSync(join(ROOT, 'versions.json'), 'utf8')); + const isGenericSnapshot = !snapshotVersions.includes(config.version); + const key = isGenericSnapshot ? getGenericVersion(config.version) : config.version; + + // Run generate-pixi-version-config script on the selected snapshot directory + const generatePixiVersionConfig = spawn('npm', ['run', 'generate-pixi-version-config', '--', key], { + stdio: 'inherit', + }); + + // Wait for generate-pixi-version-config script to finish + generatePixiVersionConfig.on('close', () => + { + const newConfig = JSON.parse(readFileSync(join(ROOT, `versioned_docs/version-${key}`, 'pixi-version.json'), 'utf8')); + + const oldVersion = config.version; + const newVersion = newConfig.version; + + // If version has changed, update versioned docs directory and sidebar name accordingly + if (newVersion !== oldVersion) + { + // For specific version snapshots, rename the versioned docs directory and sidebar to match the new version + if (!isGenericSnapshot) + { + // Rename versioned docs directory + shell.mv( + join(ROOT, `versioned_docs/version-${oldVersion}`), + join(ROOT, `versioned_docs/version-${newVersion}`), + ); + + // Rename versioned docs sidebar + shell.mv( + join(ROOT, `versioned_sidebars/version-${oldVersion}-sidebars.json`), + join(ROOT, `versioned_sidebars/version-${newVersion}-sidebars.json`), + ); + + // Update version number on versions.json + const parsed = snapshotVersions.map((version) => + { + if (version === oldVersion) + { + version = newVersion; + } + + return version; + }); + + writeFileSync(join(ROOT, 'versions.json'), JSON.stringify(parsed, null, 2)); + } + + console.log( + `Successfully switched snapshot ${config.versionLabel} (v${oldVersion})`, + `to be ${newConfig.versionLabel} v${newVersion}!`, + ); + + console.log('** Please make sure to create/update versioned examples and tutorials accordingly! **'); + } + }); +})(); diff --git a/scripts/update-global-version-configs.js b/scripts/update-global-version-configs.js new file mode 100644 index 000000000..34cd8f056 --- /dev/null +++ b/scripts/update-global-version-configs.js @@ -0,0 +1,126 @@ +const { writeFileSync, readFileSync, existsSync } = require('fs'); +const glob = require('glob'); +const recast = require('recast'); +const { join, resolve } = require('path'); + +const ROOT = resolve(__dirname, '..'); + +function getGenericVersion(version) +{ + return version.replace(/(\d+)(\.\d+)?(\.\d+)?(-.*)?/, '$1.x'); +} + +console.log('Update docusaurus version config and pixi-versions.json...\n'); + +// Find all pixi-version.json files +const versionFiles = glob.sync(`${ROOT}/**/pixi-version.json`); + +// Read and parse each pixi-version.json file +const versions = versionFiles.map((file) => +{ + const data = readFileSync(file, 'utf8'); + + return { ...JSON.parse(data), isCurrent: file === `${ROOT}/docs/pixi-version.json` }; +}); + +console.log(`Versions found:\n${versions.map((v) => `- ${v.versionLabel} (v${v.version})`).join('\n')}\n`); + +// Extract the version numbers +const versionNumbers = versions.map((version) => version.version); + +// Create a set from the version numbers +const uniqueVersionNumbers = new Set(versionNumbers); + +// Check if there are duplicate versions +if (uniqueVersionNumbers.size < versionNumbers.length) +{ + console.warn('** Warning - There are duplicate versions! Please update accordingly **\n'); +} + +// Read the docusaurus.config.js file +let code = readFileSync('docusaurus.config.js', 'utf8'); + +// Parse the JavaScript code into an AST +const ast = recast.parse(code); + +// Traverse the AST +recast.visit(ast, { + visitObjectExpression(path) + { + // Check if the node is the `versions` object + if (path.node.properties.some((prop) => prop.key.name === 'versions')) + { + // Update the `versions` object + path.node.properties = path.node.properties.map((prop) => + { + if (prop.key.name === 'versions') + { + prop.value.properties = versions.map((version) => + { + /** + * Currently, the only way to know if a snapshot is of a generic version + * is to check if the versioned_docs directory exists. + * If it doesn't exist, then it's a generic snapshot. (eg. 7.x) + * Otherwise, it's a specific snapshot. (eg. 7.3.2) + */ + const versionedDocsDir = join(ROOT, `versioned_docs/version-${version}`); + const isGenericSnapshot = !existsSync(versionedDocsDir); + const key = isGenericSnapshot ? getGenericVersion(version.version) : version.version; + + const versionProps = [ + recast.types.builders.property( + 'init', + recast.types.builders.identifier('label'), + recast.types.builders.literal(version.versionLabel), + ), + ]; + + if (!version.isCurrent) + { + versionProps.push( + recast.types.builders.property( + 'init', + recast.types.builders.identifier('path'), + recast.types.builders.literal(key), + ), + ); + } + + versionProps.push( + recast.types.builders.property( + 'init', + recast.types.builders.identifier('banner'), + recast.types.builders.literal('none'), + ), + recast.types.builders.property( + 'init', + recast.types.builders.identifier('badge'), + recast.types.builders.literal(false), + ), + ); + + return recast.types.builders.property( + 'init', + recast.types.builders.identifier(version.isCurrent ? 'current' : `'${key}'`), + recast.types.builders.objectExpression(versionProps), + ); + }); + } + + return prop; + }); + } + this.traverse(path); + }, +}); + +// Generate the modified JavaScript code +code = recast.print(ast, { quote: 'single' }).code; + +// Write the modified code back to the docusaurus.config.js file +writeFileSync('docusaurus.config.js', code); +console.log('Docusaurus version config updated successfully!'); + +// Overwrite pixi-versions.json +writeFileSync('pixi-versions.json', JSON.stringify(versions, null, 2)); +console.log('pixi-versions.json updated successfully!'); diff --git a/scripts/update-pixi-version-configs.js b/scripts/update-pixi-version-configs.js new file mode 100644 index 000000000..b08d6068b --- /dev/null +++ b/scripts/update-pixi-version-configs.js @@ -0,0 +1,91 @@ +const { resolve } = require('path'); +const { readFileSync, existsSync } = require('fs'); +const shell = require('shelljs'); +const inquirer = require('inquirer'); +const { compareVersions } = require('compare-versions'); +const glob = require('glob'); + +// Compile out a list of all the versions of pixi.js +shell.exec('npm view pixi.js --json > scripts/pixiVersions.json'); + +// Import the compiled list of versions +const pixiVersions = require('./pixiVersions.json'); +const tags = pixiVersions['dist-tags']; + +const ROOT = resolve(__dirname, '..'); + +// Find all pixi-version.json files in the versioned docs directory +const versionFiles = glob.sync(`${ROOT}/versioned_docs/**/pixi-version.json`); + +if (!versionFiles.length) +{ + console.log(`There isn\'t any pixi version config to update!`); + shell.rm('./scripts/pixiVersions.json'); + shell.exit(0); +} + +console.log('Updating any outdated pixi version configs...'); + +versionFiles.forEach((file) => +{ + const config = JSON.parse(readFileSync(file, 'utf8')); + const { version } = config; + + console.log(`Checking ${config.versionLabel} (v${version}) config`); + + const tag = Object.entries(tags).find(([k, v]) => v === version)?.[0]; + + const parts = version.split('.'); + const major = parts[0]; + const minor = parts[1]; + const patch = parts[2].split('-')[0]; + const isPrelease = parts[2].includes('-rc'); + const isLatest = version === tags.latest; + let versionLabel; + + if (isLatest) + { + versionLabel = `v${[major, 'x'].join('.')} (Latest)`; + } + else if (tag) + { + const extracted = tag.replace('latest-', ''); + + versionLabel = extracted.match(/^\d/) ? `v${extracted}` : extracted; + } + else + { + versionLabel = `v${version}`; + } + + const newConfig = { + versionLabel, + version, + releaseNotes: `https://github.com/pixijs/pixijs/releases/tag/v${version}`, + build: `https://pixijs.download/v${version}/pixi.min.js`, + docs: `https://pixijs.download/v${version}/docs/index.html`, + npm: version, + prerelease: isPrelease, + latest: isLatest, + }; + + // Log out the changes, if any. + Object.entries(config).forEach(([key, value]) => + { + if (newConfig[key] !== value) + { + console.log(`\tUpdated ${key}: ${value} -> ${newConfig[key]}`); + } + }); + + const json = JSON.stringify(newConfig, null, 2); + + // Generate the version config at the specified docs path + shell.exec(`echo '${json}' > ${file}`); +}); + +// delete the compiled list of versions +shell.rm('./scripts/pixiVersions.json'); + +// Then update the global version configs accordingly +shell.exec('npm run update-global-version-configs'); diff --git a/scripts/write-example-docs.js b/scripts/write-example-docs.js deleted file mode 100755 index c5994e8c1..000000000 --- a/scripts/write-example-docs.js +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env node -const { join, resolve } = require('path'); -const { mkdirSync, readFileSync, rmSync, writeFileSync } = require('fs'); -const examplesData = require('../src/data/examples/examplesData.json'); - -const ROOT = resolve(__dirname, '..'); -const EXAMPLES_MD_PATH = resolve(ROOT, 'docs', 'examples'); -const EXAMPLES_JS_PATH = resolve(ROOT, 'src', 'data', 'examples'); - -const camelToSnake = (str) => str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`); -const camelToTitle = (str) => -{ - const result = str.replace(/([A-Z])/g, ' $1'); - - return str.charAt(0).toUpperCase() + result.slice(1); -}; - -async function go() -{ - const directories = Object.keys(examplesData); - - const directoryData = directories.map((directoryKey) => - { - const categoryExamples = examplesData[directoryKey]; - const directoryName = camelToSnake(directoryKey); - const categoryTitle = camelToTitle(directoryKey); - - return { - categoryTitle, - directoryPath: join(EXAMPLES_MD_PATH, directoryName), - examples: categoryExamples.map((exampleData) => - { - let exampleKey = exampleData; - let usesWebWorkerLibrary = false; - let hide = false; - - if (typeof exampleData !== 'string') - { - ({ name: exampleKey, usesWebWorkerLibrary = false, hide = false } = exampleData); - } - - const jsFile = `${exampleKey}.js`; - const mdFile = `${camelToSnake(exampleKey)}.md`; - - const jsPath = resolve(EXAMPLES_JS_PATH, directoryKey, jsFile); - const mdPath = join(EXAMPLES_MD_PATH, directoryName, mdFile); - - return { - exampleSource: readFileSync(jsPath, 'utf8').trim(), - examplePath: mdPath, - exampleTitle: camelToTitle(exampleKey), - hide, - usesWebWorkerLibrary, - }; - }), - }; - }); - - directoryData.forEach(({ categoryTitle, directoryPath, examples }, index) => - { - // delete old stuff first - rmSync(directoryPath, { recursive: true, force: true }); - - // recreate directory and build everything - mkdirSync(directoryPath); - - const categoryYml = [`label: ${categoryTitle}`, `position: ${index + 1}`].join('\n'); - const categoryYmlPath = join(directoryPath, '_category_.yml'); - - writeFileSync(categoryYmlPath, categoryYml, 'utf8'); - - let sidebarPosition = 0; - - examples.forEach(({ exampleSource, examplePath, exampleTitle, hide, usesWebWorkerLibrary }) => - { - if (hide) - { - return; - } - - const webWorkerProp = usesWebWorkerLibrary ? ' usesWebWorkerLibrary' : ''; - - const mdContents = [ - '---', - 'hide_table_of_contents: true', - `sidebar_position: ${sidebarPosition++}`, - '---', - '', - `# ${exampleTitle}`, - '', - `\`\`\`js playground${webWorkerProp}`, - exampleSource, - '```', - '', - ].join('\n'); - - writeFileSync(examplePath, mdContents, 'utf8'); - }); - }); -} - -go(); diff --git a/scripts/write-versions.js b/scripts/write-versions.js deleted file mode 100644 index c567c9b79..000000000 --- a/scripts/write-versions.js +++ /dev/null @@ -1,132 +0,0 @@ -const shell = require('shelljs'); -const { compareVersions } = require('compare-versions'); - -// async iife -(async () => -{ - const devCommitSha = process.argv.slice(2)[0]; - - if (!devCommitSha) - { - console.error('Script must be run with the commit SHA for the latest merged PR to pixijs/pixijs dev!'); - process.exit(1); - } - - shell.exec('npm view pixi.js --json > scripts/pixiVersions.json'); - - const codeSandboxBaseUrl = `https://pkg.csb.dev/pixijs/pixijs/commit/${devCommitSha.substring(0, 8)}`; - - // eslint-disable-next-line global-require - const pixiVersions = require('./pixiVersions.json'); - const tags = pixiVersions['dist-tags']; - - const v4 = tags['latest-4.x']; - const v5 = tags['latest-5.3.x']; - const v6 = tags['latest-6.x']; - const latestVersion = tags.latest; - const prerelease = tags.prerelease; - const allV7s = pixiVersions.versions.filter((v) => v.startsWith('7')); - const minorV7s = new Map(); - - // loop through each minor version of v7 and add the largest to the array - for (let i = 0; i < allV7s.length; i++) - { - const v = allV7s[i]; - const minor = v.split('.')[1]; - - if (!minorV7s.has(minor)) - { - minorV7s.set(minor, v); - } - // compare the two versions - const current = minorV7s.get(minor); - - if (compareVersions(current, v) !== 1) - { - minorV7s.set(minor, v); - } - } - - // check if the prerelease version is higher than the latest v7 - const addPrelease = compareVersions(prerelease, tags.latest) > 0; - - const versions = [ - { - versionLabel: 'v4.x', - version: v4, - releaseNotes: `https://github.com/pixijs/pixijs/releases/tag/v${v4}`, - build: `https://pixijs.download/v${v4}/pixi.min.js`, - docs: `https://pixijs.download/v${v4}/docs/index.html`, - npm: v4, - }, - { - versionLabel: 'v5.x', - version: v5, - releaseNotes: `https://github.com/pixijs/pixijs/releases/tag/v${v5}`, - build: `https://pixijs.download/v${v5}/pixi.min.js`, - docs: `https://pixijs.download/v${v5}/docs/index.html`, - npm: v5, - }, - { - versionLabel: 'v6.x', - version: v6, - releaseNotes: `https://github.com/pixijs/pixijs/releases/tag/v${v6}`, - build: `https://pixijs.download/v${v6}/pixi.min.js`, - docs: `https://pixijs.download/v${v6}/docs/index.html`, - npm: v6, - }, - ]; - - minorV7s.forEach((v) => - { - if (v.includes('-')) return; - - versions.push({ - versionLabel: `v${v.split('.').slice(0, 2).join('.')}.x`, - version: v, - releaseNotes: `https://github.com/pixijs/pixijs/releases/tag/v${v}`, - build: `https://pixijs.download/v${v}/pixi.min.js`, - docs: `https://pixijs.download/v${v}/docs/index.html`, - npm: v, - }); - }); - - if (addPrelease) - { - versions.push({ - versionLabel: `v${prerelease}`, - version: prerelease, - releaseNotes: `https://github.com/pixijs/pixijs/releases/tag/v${prerelease}`, - build: `https://pixijs.download/v${prerelease}/pixi.min.js`, - docs: `https://pixijs.download/v${prerelease}/docs/index.html`, - npm: prerelease, - prerelease: true, - }); - } - - versions.push({ - versionLabel: 'dev', - version: 'dev', - releaseNotes: 'https://github.com/pixijs/pixijs/releases', - build: 'https://pixijs.download/dev/pixi.min.js', - docs: 'https://pixijs.download/release/docs/index.html', - dev: true, - npm: codeSandboxBaseUrl, - }); - - const versionsWithLatest = versions.map((version) => - { - const isLatest = version.version === latestVersion ? true : undefined; - - return { - ...version, - latest: isLatest, - }; - }); - - const json = JSON.stringify(versionsWithLatest.reverse(), null, 2); - - shell.exec(`echo '${json}' > ./pixi-versions.json`); - // delete the file - shell.rm('./scripts/pixiVersions.json'); -})(); diff --git a/src/components/Example/index.module.scss b/src/components/Example/index.module.scss new file mode 100644 index 000000000..32cfa1ddc --- /dev/null +++ b/src/components/Example/index.module.scss @@ -0,0 +1,17 @@ +.wrapper { + display: flex; + flex-wrap: wrap; + overflow: hidden; + height: calc(100vh - var(--ifm-navbar-height)); + width: 100%; + + .nav { + display: flex; + justify-content: space-between; + margin: 16px 18px; + + .select { + margin: 0 8px; + } + } +} diff --git a/src/components/Example/index.tsx b/src/components/Example/index.tsx new file mode 100644 index 000000000..25aa576c3 --- /dev/null +++ b/src/components/Example/index.tsx @@ -0,0 +1,31 @@ +import PixiPlayground from '@site/src/components/Playground/PixiPlayground'; +import type { IVersion } from '@site/src/components/Playground/PixiPlayground/usePixiVersions'; + +import styles from './index.module.scss'; +import BrowserOnly from '@docusaurus/BrowserOnly'; +import { getExampleEntry } from '@site/src/examples'; +import { extractSource } from '../Playground/PixiPlayground/useEditorCode'; + +export default function Example({ id, pixiVersion }: { id: string; pixiVersion: IVersion }) +{ + const entry = getExampleEntry(pixiVersion.version, id); + const source = (entry?.source ?? entry) as string | Record; + const { indexCode, extraFiles } = extractSource(source); + + return ( +
+ + {() => ( + + )} + +
+ ); +} diff --git a/src/components/Homepage/ClosingSection/index.tsx b/src/components/Homepage/ClosingSection/index.tsx index a08ce5019..4364131fc 100644 --- a/src/components/Homepage/ClosingSection/index.tsx +++ b/src/components/Homepage/ClosingSection/index.tsx @@ -37,7 +37,7 @@ export default function ClosingSection(): JSX.Element anim="short-up-anim" style={animShortUp(0.3, 0.7)} label="Get Started" - link="/tutorial" + link="next/tutorials" outline={true} /> diff --git a/src/components/Homepage/HeroHeader/index.tsx b/src/components/Homepage/HeroHeader/index.tsx index 98874c69a..c21a56295 100644 --- a/src/components/Homepage/HeroHeader/index.tsx +++ b/src/components/Homepage/HeroHeader/index.tsx @@ -16,7 +16,7 @@ export default function HeroHeader(): JSX.Element
  - +
diff --git a/src/components/PixiPlayground/useEditorCode.ts b/src/components/PixiPlayground/useEditorCode.ts deleted file mode 100644 index b0cda8423..000000000 --- a/src/components/PixiPlayground/useEditorCode.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { useCallback, useMemo } from 'react'; -import type { ExampleSourceEntry } from '@site/src/data/examples'; -import { getExampleOptions, getExampleEntry } from '@site/src/data/examples'; -import type { OptionGroup } from '@site/src/components/Select'; -import type { SetURLStateType } from '@site/src/components/PixiPlayground/usePlaygroundURLState'; - -export const defaultExampleId = 'sprite.basic'; -const defaultExampleOptions = getExampleOptions(); - -type UseCodeExamplesParams = { - urlSourceCode: string | undefined; - selectedOptionId: string; - setURLState: SetURLStateType; -}; - -export const useCodeExamples = ({ urlSourceCode, selectedOptionId, setURLState }: UseCodeExamplesParams) => -{ - const hasUrlHashedCode = Boolean(urlSourceCode); - - const exampleEntry = useMemo( - () => getExampleEntry(selectedOptionId), - [selectedOptionId], - ); - const { source: sourceCode, usesWebWorkerLibrary } = useMemo>( - () => - (urlSourceCode - ? { - source: urlSourceCode, - usesWebWorkerLibrary: false, - } - : (exampleEntry as ExampleSourceEntry)), - [urlSourceCode, exampleEntry], - ); - - const exampleOptions = useMemo( - () => - // Slightly hacky solution if user edits code, changes the example select to - // a custom option, so the Select still works as expected. It would probably - // be nicer to store the last loaded example somehow and put an edited star - // against it or something. - // Only show custom select option when user has edited code - (!hasUrlHashedCode - ? defaultExampleOptions - : defaultExampleOptions.concat({ - label: 'Custom Code', - options: [ - { - label: 'User Edited Code', - value: 'custom', - }, - ], - })), - [hasUrlHashedCode], - ); - - const handleOptionSelected = useCallback( - (nextSelectedId: string) => - { - if (nextSelectedId === selectedOptionId) - { - return; - } - - setURLState( - { - source: undefined, - exampleId: nextSelectedId, - }, - true, - true, - ); - }, - [selectedOptionId, setURLState], - ); - - const handleEditorCodeChanged = useCallback( - (nextSourceCode: string | undefined) => - { - // Annoyingly the Monaco Editor fires the change callback when you update the - // value prop, rather than just internal changes, so we need to check this - // change is actually a user editing code. Maybe we could remount the editor - // instead, but that feels a little brute force. - if (sourceCode === nextSourceCode) - { - return; - } - - // pushState only when editing code for the first time - setURLState( - { - source: nextSourceCode, - exampleId: 'custom', - }, - !hasUrlHashedCode, - ); - }, - [hasUrlHashedCode, setURLState, sourceCode], - ); - - return { - sourceCode, - usesWebWorkerLibrary, - exampleOptions, - handleOptionSelected, - handleEditorCodeChanged, - }; -}; diff --git a/src/components/PixiPlayground/usePixiVersions.ts b/src/components/PixiPlayground/usePixiVersions.ts deleted file mode 100644 index 4e2943a3f..000000000 --- a/src/components/PixiPlayground/usePixiVersions.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { useCallback, useMemo } from 'react'; -import versions from '@site/pixi-versions.json'; -import type { SetURLStateType } from '@site/src/components/PixiPlayground/usePlaygroundURLState'; - -export interface IVersion -{ - version: string; - versionLabel: string; - releaseNotes: string; - docs: string; - build: string; - npm: string; - prerelease?: boolean; - dev?: boolean; - latest?: boolean; -} - -const versionOptions = (versions as IVersion[]).map(({ versionLabel, version }) => ({ - label: versionLabel, - value: version, -})); - -const propEq - = (prop: string, value: any) => - (object: Record): boolean => - object[prop] === value; - -export const latestVersion = ((versions as IVersion[]).find(propEq('latest', true)) as IVersion).version; - -type UsePixiVersionsParams = { - selectedVersionId: string; - setURLState: SetURLStateType; -}; - -export const usePixiVersions = ({ selectedVersionId, setURLState }: UsePixiVersionsParams) => -{ - const handleVersionChanged = useCallback( - (nextVersionId: string) => - setURLState( - { - pixiVersion: nextVersionId, - }, - true, - true, - ), - [setURLState], - ); - - const selectedVersion = useMemo( - () => (versions as IVersion[]).find(propEq('version', selectedVersionId)) as IVersion, - [selectedVersionId], - ); - - return { - selectedVersion, - handleVersionChanged, - versionOptions, - }; -}; diff --git a/src/components/PixiPlayground/MonacoEditor.tsx b/src/components/Playground/PixiPlayground/MonacoEditor.tsx similarity index 59% rename from src/components/PixiPlayground/MonacoEditor.tsx rename to src/components/Playground/PixiPlayground/MonacoEditor.tsx index 15bbab4ff..7787b3bf6 100644 --- a/src/components/PixiPlayground/MonacoEditor.tsx +++ b/src/components/Playground/PixiPlayground/MonacoEditor.tsx @@ -2,15 +2,17 @@ import { useCallback, useEffect, useRef } from 'react'; import type { editor } from 'monaco-editor'; import { useColorMode } from '@docusaurus/theme-common'; import Editor from '@monaco-editor/react'; +import type { SandpackState } from '@codesandbox/sandpack-react'; import { FileTabs, SandpackStack, useActiveCode, useSandpack } from '@codesandbox/sandpack-react'; -export type CodeChangeCallbackType = (code: string | undefined) => void; +export type CodeChangeCallbackType = (code: string | undefined, state: SandpackState) => void; type MonacoEditorProps = { + useTabs: boolean; onChange?: CodeChangeCallbackType; }; -export default function MonacoEditor({ onChange }: MonacoEditorProps) +export default function MonacoEditor({ useTabs, onChange }: MonacoEditorProps) { const editorRef = useRef(null); @@ -53,19 +55,56 @@ export default function MonacoEditor({ onChange }: MonacoEditorProps) const { code, updateCode } = useActiveCode(); const { sandpack } = useSandpack(); + useEffect(() => + { + const tab = document.querySelector('.sp-tab-button[data-active=true]'); + + tab?.scrollIntoView(false); + }, [sandpack.activeFile]); + + const getFileExtension = (filename: string): string => + { + const parts = filename.split('.'); + + return parts[parts.length - 1]; + }; + + const getLanguage = (filename: string): string => + { + const extension = getFileExtension(filename); + + switch (extension) + { + case 'js': + return 'javascript'; + case 'ts': + return 'typescript'; + case 'html': + return 'html'; + case 'css': + return 'css'; + case 'wgsl': + return 'wgsl'; + default: + return 'plaintext'; + } + }; + + const language = getLanguage(sandpack.activeFile); + return ( - + {useTabs && } { updateCode(value || ''); - onChange?.(value); + onChange?.(value, sandpack); }} theme={colorMode === 'dark' ? 'vs-dark' : 'light'} /> diff --git a/src/components/PixiPlayground/index.module.scss b/src/components/Playground/PixiPlayground/index.module.scss similarity index 58% rename from src/components/PixiPlayground/index.module.scss rename to src/components/Playground/PixiPlayground/index.module.scss index 36decd7a2..6eafd4476 100644 --- a/src/components/PixiPlayground/index.module.scss +++ b/src/components/Playground/PixiPlayground/index.module.scss @@ -2,6 +2,7 @@ display: flex !important; flex: 1 0 100% !important; } + .tpWrapper { display: flex !important; flex: 1 0 100%; @@ -94,23 +95,79 @@ } &.example { - min-height: 720px; - @media only screen and (max-width: 1280px) { flex-direction: column; } } -} -.editorWrapper { - flex: 1 1 !important; - width: 100%; -} + .editorWrapper { + flex: 1 1 !important; + width: 100%; + overflow: auto; -.previewWrapper { - position: relative; - display: flex; - flex: 1 1 !important; + // Hide scrollbar + -ms-overflow-style: none; + scrollbar-width: none; + ::-webkit-scrollbar { + display: none; + } + + .spTabs { + padding: 0; + + .spTabButton { + position: relative; + padding: 0 1rem; + + &::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(255, 255, 255, 0.1); + opacity: 0; + transition: opacity 0.1s ease-in-out; + } + + &::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 0.25rem; + background: var(--ifm-color-primary); + opacity: 0; + } + + &[data-active='true'] { + color: var(--ifm-color-primary); + cursor: default; + pointer-events: none; + + &::after { + opacity: 1; + } + } + + &[data-active='false'] { + &:hover { + &::before { + opacity: 1; + } + } + } + } + } + } + + .previewWrapper { + position: relative; + display: flex; + flex: 1 1 !important; + } } .sandpackLoadingOverlay { diff --git a/src/components/PixiPlayground/index.tsx b/src/components/Playground/PixiPlayground/index.tsx similarity index 62% rename from src/components/PixiPlayground/index.tsx rename to src/components/Playground/PixiPlayground/index.tsx index e269bb973..2d9d7720f 100644 --- a/src/components/PixiPlayground/index.tsx +++ b/src/components/Playground/PixiPlayground/index.tsx @@ -10,14 +10,15 @@ import type { CodeChangeCallbackType } from './MonacoEditor'; import styles from './index.module.scss'; -type PlaygroundMode = 'tutorial' | 'fullscreen' | 'example'; +type BasePlaygroundMode = 'tutorial' | 'fullscreen' | 'example'; -type PlaygroundProps = { - mode: PlaygroundMode; +type BasePlaygroundProps = { + useTabs: boolean; + mode: BasePlaygroundMode; onCodeChanged?: CodeChangeCallbackType; }; -function Playground({ mode, onCodeChanged }: PlaygroundProps) +function BasePlayground({ useTabs, mode, onCodeChanged }: BasePlaygroundProps) { const { sandpack } = useSandpack(); const [showOutput, setShowOutput] = useState(false); @@ -32,7 +33,7 @@ function Playground({ mode, onCodeChanged }: PlaygroundProps) return (
- +
@@ -48,20 +49,25 @@ function Playground({ mode, onCodeChanged }: PlaygroundProps) type PixiPlaygroundProps = { code: string; extraFiles?: Record; + extraPackages?: Record; + activeFile?: string; isPixiWebWorkerVersion?: boolean; isPixiDevVersion?: boolean; pixiVersion?: string; - mode?: PlaygroundMode; + mode?: BasePlaygroundMode; onCodeChanged?: CodeChangeCallbackType; }; export default function PixiPlayground({ code, extraFiles, + extraPackages, + activeFile, isPixiWebWorkerVersion = false, isPixiDevVersion = false, pixiVersion = latestVersion, mode = 'example', + onCodeChanged, }: PixiPlaygroundProps) { const { colorMode } = useColorMode(); @@ -69,14 +75,32 @@ export default function PixiPlayground({ const { key, files, customSetup } = useSandpackConfiguration({ code, extraFiles, + extraPackages, isPixiDevVersion, isPixiWebWorkerVersion, pixiVersion, }); + // We will show the passed in extra files on the editor tabs by default + // and will hide any of them that has a key (file name) end with an '!'. + const visibleExtraFiles = Object.keys(extraFiles ?? {}) + .filter((fileName) => !fileName.endsWith('!')) + .map((fileName) => fileName.replace('*', '')) as any[]; + + // If there is no activeFile paramater passed in, we will initially show 'index.js' by default + // unless if there is an extra file that ends with an '*' + // in which case we will show that file instead. + const active + = activeFile + ?? (Object.keys(extraFiles ?? {}).find((fileName) => fileName.endsWith('*')) as any)?.replace('*', '') + ?? 'src/index.js'; + // Hack to make the examples pages full width on wide screens useContainerClassNameModifier('example', mode === 'example'); + // Hack to make the code editor pages full width on wide screens + useContainerClassNameModifier('coding', mode !== 'example'); + return ( fileName.endsWith('.js')) as any[], + visibleFiles: ['src/index.js', ...visibleExtraFiles], + activeFile: active, }} > - + ); } diff --git a/src/components/Playground/PixiPlayground/useEditorCode.ts b/src/components/Playground/PixiPlayground/useEditorCode.ts new file mode 100644 index 000000000..521273755 --- /dev/null +++ b/src/components/Playground/PixiPlayground/useEditorCode.ts @@ -0,0 +1,163 @@ +import { useCallback, useMemo } from 'react'; +import type { OptionGroup } from '@site/src/components/Select'; +import type { SetURLStateType, URLSaveState } from '@site/src/components/Playground/PixiPlayground/usePlaygroundURLState'; +import type { ExampleSourceEntry } from '@site/src/examples'; +import { getExampleEntry, getExampleOptions } from '@site/src/examples'; +import type { IVersion } from './usePixiVersions'; +import type { SandpackState } from '@codesandbox/sandpack-react'; + +export const defaultExampleId = 'sprite.basic'; + +type UseCodeExamplesParams = { + urlState: URLSaveState | undefined; + selectedOptionId: string; + setURLState: SetURLStateType; + pixiVersion: IVersion; +}; + +export const useCodeExamples = ({ urlState, selectedOptionId, setURLState, pixiVersion }: UseCodeExamplesParams) => +{ + const version = pixiVersion.version; + const defaultExampleOptions = getExampleOptions(version); + const hasUrlHashed = Boolean(urlState); + + const exampleEntry = useMemo( + () => getExampleEntry(version, selectedOptionId), + [version, selectedOptionId], + ); + const { indexCode, extraFiles, activeFile, usesWebWorkerLibrary } = useMemo<{ + indexCode: string; + extraFiles?: Record; + activeFile?: string; + usesWebWorkerLibrary: boolean; + }>(() => + { + if (!urlState) + { + const { indexCode, extraFiles } = extractSource(exampleEntry?.source ?? ''); + + return { + indexCode, + extraFiles, + usesWebWorkerLibrary: !!exampleEntry?.usesWebWorkerLibrary, + }; + } + + const { files, visibleFiles, activeFile } = urlState; + + if (!visibleFiles.length) + { + return { + indexCode: files['/src/index.js'].code, + activeFile, + usesWebWorkerLibrary: false, + }; + } + + const extraFiles = Object.entries(files) + .filter(([key]) => (/^\/src\/(?!index\.js$|styles\.css$)/).test(key)) + .reduce((acc, [key, value]) => + { + let suffix = ''; + + if (activeFile === key) suffix = '*'; + if (!visibleFiles.includes(key)) suffix = '!'; + acc[key.substring(1) + suffix] = value.code; + + return acc; + }, {} as Record); + + return { + indexCode: files['/src/index.js'].code, + extraFiles, + usesWebWorkerLibrary: false, + }; + }, [urlState, exampleEntry]); + + const exampleOptions = useMemo( + () => + // Slightly hacky solution if user edits code, changes the example select to + // a custom option, so the Select still works as expected. It would probably + // be nicer to store the last loaded example somehow and put an edited star + // against it or something. + // Only show custom select option when user has edited code + (!hasUrlHashed + ? defaultExampleOptions + : defaultExampleOptions.concat({ + label: 'Custom Code', + options: [ + { + label: 'User Edited Code', + value: 'custom', + }, + ], + })), + [defaultExampleOptions, hasUrlHashed], + ); + + const handleOptionSelected = useCallback( + (nextSelectedId: string) => + { + if (nextSelectedId === selectedOptionId) + { + return; + } + + setURLState( + { + state: undefined, + exampleId: nextSelectedId, + }, + true, + true, + ); + }, + [selectedOptionId, setURLState], + ); + + const handleEditorCodeChanged = useCallback( + (nextSourceCode: string | undefined, state: SandpackState) => + { + if (!nextSourceCode) return; + + const { files, visibleFiles, activeFile } = state; + + // Hacky solution to get the active file's code up-to-date + files[activeFile].code = nextSourceCode; + + // pushState only when editing code for the first time + setURLState( + { + state: { files, visibleFiles, activeFile }, + exampleId: 'custom', + }, + !hasUrlHashed, + ); + }, + [hasUrlHashed, setURLState], + ); + + return { + indexCode, + extraFiles, + activeFile, + usesWebWorkerLibrary, + exampleOptions, + handleOptionSelected, + handleEditorCodeChanged, + }; +}; + +export function extractSource(source: string | Record) +{ + const isMultiFile = typeof source !== 'string'; + const indexCode = isMultiFile ? source.index : source; + const extraFiles = isMultiFile + ? Object.fromEntries(Object.entries(source).filter(([key]) => key !== 'index')) + : undefined; + + return { + indexCode, + extraFiles, + }; +} diff --git a/src/components/Playground/PixiPlayground/usePixiVersions.ts b/src/components/Playground/PixiPlayground/usePixiVersions.ts new file mode 100644 index 000000000..89c1d2d4f --- /dev/null +++ b/src/components/Playground/PixiPlayground/usePixiVersions.ts @@ -0,0 +1,24 @@ +import versions from '@site/pixi-versions.json'; +import { gt } from 'semver'; + +export type IVersion = { + version: string; + versionLabel: string; + releaseNotes: string; + docs: string; + build: string; + npm: string; + prerelease?: boolean; + dev?: boolean; + latest?: boolean; +}; + +export const latestVersion = versions.reduce((latest, current) => +{ + if (gt(current.version, latest.version)) + { + return current; + } + + return latest; +}, versions[0]).version; diff --git a/src/components/PixiPlayground/usePlaygroundURLState.ts b/src/components/Playground/PixiPlayground/usePlaygroundURLState.ts similarity index 51% rename from src/components/PixiPlayground/usePlaygroundURLState.ts rename to src/components/Playground/PixiPlayground/usePlaygroundURLState.ts index ec927ea0e..92b84e804 100644 --- a/src/components/PixiPlayground/usePlaygroundURLState.ts +++ b/src/components/Playground/PixiPlayground/usePlaygroundURLState.ts @@ -2,31 +2,31 @@ import { evolve, isNil, unless } from 'ramda'; import type { DeserializeParamsType, SerializeParamsType, SetStateType } from '@site/src/hooks/useURLStateParams'; import { useURLStateParams } from '@site/src/hooks/useURLStateParams'; +export type URLSaveState = { + files: Record; + visibleFiles: string[]; + activeFile: string; +}; + type URLStateParams = { - source?: string; + state?: URLSaveState; exampleId: string; - pixiVersion: string; }; -interface Payload -{ - code: string; -} - -function encodeSource(source: string) +function encodeState(state: URLSaveState) { - const json = JSON.stringify({ code: source }); + const json = JSON.stringify(state); return btoa(json); } -function decodeSource(encodedSource: string) +function decodeState(encodedState: string) { try { - const payload: Payload = JSON.parse(atob(encodedSource)); + const state: URLSaveState = JSON.parse(atob(encodedState)); - return payload.code; + return state; } catch { @@ -34,15 +34,15 @@ function decodeSource(encodedSource: string) } } -const safeEncodeSource = unless(isNil, encodeSource); -const safeDecodeSource = unless(isNil, decodeSource); +const safeEncodeState = unless(isNil, encodeState); +const safeDecodeState = unless(isNil, decodeState); const serializeParams = evolve({ - source: safeEncodeSource, + state: safeEncodeState, }) as SerializeParamsType; const deserializeParams = evolve({ - source: safeDecodeSource, + state: safeDecodeState, }) as DeserializeParamsType; export type SetURLStateType = SetStateType; @@ -52,16 +52,15 @@ type UsePlaygroundURLStateParams = { defaultPixiVersion: string; }; -export const usePlaygroundURLState = ({ defaultExampleId, defaultPixiVersion }: UsePlaygroundURLStateParams) => +export const usePlaygroundURLState = ({ defaultExampleId }: UsePlaygroundURLStateParams) => useURLStateParams( (urlState) => { - const { source, exampleId, pixiVersion } = urlState; + const { state, exampleId } = urlState; return { - source: source ?? undefined, - exampleId: source ? 'custom' : exampleId ?? defaultExampleId, - pixiVersion: pixiVersion ?? defaultPixiVersion, + state: state ?? undefined, + exampleId: state ? 'custom' : exampleId ?? defaultExampleId, }; }, serializeParams, diff --git a/src/components/PixiPlayground/useSandpackConfiguration.ts b/src/components/Playground/PixiPlayground/useSandpackConfiguration.ts similarity index 64% rename from src/components/PixiPlayground/useSandpackConfiguration.ts rename to src/components/Playground/PixiPlayground/useSandpackConfiguration.ts index 61bcfe21e..3f24fc277 100644 --- a/src/components/PixiPlayground/useSandpackConfiguration.ts +++ b/src/components/Playground/PixiPlayground/useSandpackConfiguration.ts @@ -35,6 +35,9 @@ export const useFiles = (code: string, extraFiles?: Record) => }, ], ], + plugins: [ + '@babel/plugin-proposal-class-properties', + ], }, null, 2, @@ -64,57 +67,82 @@ type UseDependenciesParams = { isPixiWebWorkerVersion: boolean; isPixiDevVersion: boolean; pixiVersion: string; + extraPackages?: Record; }; -const useDependencies = ({ isPixiWebWorkerVersion, isPixiDevVersion, pixiVersion }: UseDependenciesParams) => +const isPreV8 = (pixiVersion: string) => Number(pixiVersion.split('.')[0]) < 8; + +const useDependencies = ({ isPixiWebWorkerVersion, isPixiDevVersion, pixiVersion, extraPackages }: UseDependenciesParams) => useMemo(() => { const pixiPackageName = isPixiWebWorkerVersion ? '@pixi/webworker' : 'pixi.js'; const getPackageVersion = (packageName: string) => (isPixiDevVersion ? `${pixiVersion}/${packageName}` : pixiVersion); - const packages = [pixiPackageName, '@pixi/graphics-extras', '@pixi/math-extras']; + const packages = [pixiPackageName]; - const dependencies = packages.reduce( - (deps, packageName) => ({ - ...deps, - [packageName]: getPackageVersion(packageName), - }), - {}, - ); + // Add these packages if we're using a version of pixi that doesn't have them built in, ie. < v8 + if (isPreV8(pixiVersion)) + { + packages.push('@pixi/graphics-extras', '@pixi/math-extras'); + } + + const dependencies = { + ...packages.reduce( + (deps, packageName) => ({ + ...deps, + [packageName]: getPackageVersion(packageName), + }), + {}, + ), + ...extraPackages, + }; return { dependenciesKey: `${pixiPackageName}-${pixiVersion}`, dependencies, }; - }, [isPixiDevVersion, isPixiWebWorkerVersion, pixiVersion]); + }, [isPixiDevVersion, isPixiWebWorkerVersion, pixiVersion, extraPackages]); type UseSandpackConfigurationParams = UseDependenciesParams & { code: string; extraFiles?: Record; + extraPackages?: Record; }; export const useSandpackConfiguration = ({ code, extraFiles, + extraPackages, isPixiWebWorkerVersion, isPixiDevVersion, pixiVersion, }: UseSandpackConfigurationParams) => { - const files = useFiles(code, extraFiles); + // We use '!' and '*' at the end of extra files' key for handling custom behaviours on the tabs + // Therefore, we need to remove these marks from the file keys before passing it to useFiles + const processedExtraFiles = Object.fromEntries( + Object.entries(extraFiles ?? {}).map(([key, value]) => [key.replace(/[!*]/g, ''), value]), + ); + const files = useFiles(code, processedExtraFiles); - const { dependenciesKey, dependencies } = useDependencies({ isPixiWebWorkerVersion, isPixiDevVersion, pixiVersion }); + const { dependenciesKey, dependencies } = useDependencies({ + isPixiWebWorkerVersion, + isPixiDevVersion, + pixiVersion, + extraPackages, + }); // TODO: adding code here is only necessary because of user edited code, otherwise we // could flip between examples easily, investigate why it bugs out during editing - const key = `${dependenciesKey}-${code}`; + const key = `${dependenciesKey}-${code}-${Object.values(extraFiles ?? {}).join('-')}`; - const customSetup = { + const customSetup: Record = { entry: 'index.html', dependencies, devDependencies: { - '@babel/core': '^7.21.3', 'parcel-bundler': '^1.6.1', + '@babel/core': '^7.21.3', + '@babel/plugin-proposal-class-properties': '^7.10.1', }, }; diff --git a/src/components/Playground/index.module.scss b/src/components/Playground/index.module.scss new file mode 100644 index 000000000..1454ac813 --- /dev/null +++ b/src/components/Playground/index.module.scss @@ -0,0 +1,17 @@ +.wrapper { + display: flex; + flex-wrap: wrap; + overflow: hidden; + height: calc(100vh - var(--ifm-navbar-height)); + width: 100vw; + + .nav { + display: flex; + justify-content: space-between; + margin: 16px 18px; + + .select { + margin: 0 8px; + } + } +} diff --git a/src/components/Playground/index.tsx b/src/components/Playground/index.tsx new file mode 100644 index 000000000..b6ede2d36 --- /dev/null +++ b/src/components/Playground/index.tsx @@ -0,0 +1,62 @@ +import PixiPlayground from '@site/src/components/Playground/PixiPlayground'; +import Select from '@site/src/components/Select'; +import { defaultExampleId, useCodeExamples } from '@site/src/components/Playground/PixiPlayground/useEditorCode'; +import type { IVersion } from '@site/src/components/Playground/PixiPlayground/usePixiVersions'; +import { usePlaygroundURLState } from '@site/src/components/Playground/PixiPlayground/usePlaygroundURLState'; + +import styles from './index.module.scss'; +import BrowserOnly from '@docusaurus/BrowserOnly'; + +export default function Playground({ pixiVersion }: { pixiVersion: IVersion }) +{ + const [urlState, setURLState] = usePlaygroundURLState({ + defaultExampleId, + defaultPixiVersion: pixiVersion.version, + }); + const { state, exampleId: selectedOptionId } = urlState; + + const { + indexCode, + extraFiles, + activeFile, + usesWebWorkerLibrary, + exampleOptions, + handleOptionSelected, + handleEditorCodeChanged, + } = useCodeExamples({ + urlState: state, + selectedOptionId, + setURLState, + pixiVersion, + }); + + return ( +
+ + {() => ( + <> +
+ -