diff --git a/docs/README.md b/docs/README.md index 060580c8e..081d8fb10 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,9 +10,9 @@ docs/ │ ├── getting-started.md │ └── concepts │ └── sending-message.md -├── i18n/ja/ (the japanese translations) -│ ├──docusaurus-theme-classic/ (footer/navbar translations) -│ └──docusaurus-plugin-content-docs/ +├── i18n/ja-jp/ (the japanese translations) +│ ├── docusaurus-theme-classic/ (footer/navbar translations) +│ └── docusaurus-plugin-content-docs/ │ └── current/ (this folder's file names need to exactly match **/content/, but japanese content) │ ├── getting-started.md │ └── concepts @@ -24,17 +24,15 @@ docs/ │ ├── rory.png │ └── oslo.svg ├── src/ -│ ├── pages/ (stuff that isn't docs content. This is empty for every repo but homepage) +│ ├── pages/ (stuff that isn't docs content. This is empty for this repo!) │ └── theme (only contains the 404 page) ├── docusaurus.config.js (main config file. also where to set navbar/footer) -├── redirects-hashes.js (a # to / redirects script because the old site used # as pages) -└── redirects-pages.js (a redirects script for regular pages -- redirects plugin doesn't work with above script) └── sidebar.js (manually set where the content docs are in the sidebar.) ``` A cheat-sheet: * _I want to edit a doc._ `content/*/*.md` -* _I want to edit a Japanese doc._ `i18n/ja-jp/docusaurus-plugin-content-docs/current/*/*.md` +* _I want to edit a Japanese doc._ `i18n/ja-jp/docusaurus-plugin-content-docs/current/*/*.md`. See the [Japanese docs README](./docs/README.md) * _I want to change the docs sidebar._ `sidebar.js` * _I want to change the css._ Don't use this repo, use the home repo and the changes will propagate here. * _I want to change anything else._ `docusaurus.config.js` diff --git a/docs/content/index.md b/docs/content/index.md new file mode 100644 index 000000000..96bb11835 --- /dev/null +++ b/docs/content/index.md @@ -0,0 +1,21 @@ +# Bolt for JavaScript + +Bolt for JavaScript is a JavaScript framework to build Slack apps with the latest Slack platform features. Read the [Getting Started Guide](/getting-started) to set up and run your first Bolt app. + +Then, head over to the Concepts guides. They'll help you build a Bolt app for whatever use case you may have. + +## Getting help + +These docs have lots of information on Bolt for JavaScript. There's also an in-depth Reference section. Please explore! + +If you otherwise get stuck, we're here to help. The following are the best ways to get assistance working through your issue: + +* [Issue Tracker](http://github.com/slackapi/bolt-js/issues) for questions, bug reports, feature requests, and general discussion related to Bolt for JavaScript. Try searching for an existing issue before creating a new one. +* [Email](mailto:support@slack.com) our developer support team: `support@slack.com`. + +## Contributing + +These docs live within the [Bolt-JS](https://github.com/slackapi/bolt-js/) repository and are open source. + +We welcome contributions from everyone! Please check out our +[Contributor's Guide](https://github.com/slackapi/bolt-js/blob/main/.github/contributing.md) for how to contribute in a helpful and collaborative way. \ No newline at end of file diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index ea1f7c6a9..5353881ef 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -46,14 +46,26 @@ const config = { ], ], - clientModules: [ - require.resolve('./redirects-hashes.js'), - require.resolve('./redirects-pages.js'), +plugins: +['docusaurus-theme-github-codeblock', + [ + '@docusaurus/plugin-client-redirects', + { + redirects: [ + { + to: '/getting-started', + from: ['/tutorial/getting-started'], + }, + { + to: '/', + from: ['/concepts','/concepts/advanced','/concepts/basic'], + }, + ], + }, + ], + ], - plugins: - ['docusaurus-theme-github-codeblock', - ], themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ @@ -61,6 +73,11 @@ const config = { colorMode: { respectPrefersColorScheme: true, }, + docs: { + sidebar: { + autoCollapseCategories: true, + }, + }, navbar: { title: "Slack Developer Tools", logo: { diff --git a/docs/i18n/ja-jp/README.md b/docs/i18n/ja-jp/README.md new file mode 100644 index 000000000..2c7f9421a --- /dev/null +++ b/docs/i18n/ja-jp/README.md @@ -0,0 +1,122 @@ +# slack.dev + +This README describes how the Japanese documentation is created. Please read the [/docs README](./docs/README) for information on _all_ the documentation. + +[Docusaurus](https://docusaurus.io) supports using different languages. Each language is a different version of the same site. Therefore, the Japanese documentation and English documentation must have the exact same pages. + +If you add a page to the English documentation, then you must add the page to the Japanese documentation too. If you don't speak Japanese, copy the English documentation to the Japanese page. + +There will be English pages on the Japanese site if the pages are not translated yet. Japanese readers will not miss any content, but they may be confused seeing English and Japanese mixed together. Please give us your thoughts on this setup. + +Because of this, the sidebar does not need to be updated for the Japanese documentation. It's always the same as the English documentation! + +## Testing the Japanese site. + +Please read the [/docs README](./docs/README.md) for instructions. Be sure to run the site in Japanese: + +``` +npm run start -- --locale ja-jp +``` + +--- + +## Japanese documentation files + +``` +docs/ +├── content/ +│ ├── getting-started.md +│ └── concepts +│ └── sending-message.md +├── i18n/ja-jp +│ ├── code.json +│ ├── docusaurus-theme-classic/ +│ │ ├── footer.json +│ │ └── navbar.json +│ └── docusaurus-plugin-content-docs/ +│ └── current/ +│ ├── getting-started.md +│ └── concepts +│ └── sending-message.md +``` + +The Japanese documentation is in `i18n/ja-jp/`. The folder contains `docusaurus-plugin-content-docs`, `docusaurus-theme-classic`, and `code.json`. + +### `docusaurus-plugin-content-docs` + +``` +docs/ +├── content/ (English pages) +│ ├── getting-started.md +│ └── concepts +│ └── sending-message.md +├── i18n/ja-jp +│ └── docusaurus-plugin-content-docs/ +│ └── current/ (Japanese pages) +│ ├── getting-started.md +│ └── concepts +│ └── sending-message.md +``` + +The Japanese page files in `i18n/ja-jp/docusaurus-plugin-content-docs/current/` must be the same as the English page files in `docs/content/`. Please keep the file names in English (example: `sending-message.md`) + +Each page is a markdown file. If the page is not translated, it will be in English. Simply remove the English words and write Japanese to replace the page. + +Please provide a title in Japanese. It will show up in the sidebar. There are two options: + +``` +--- +title: こんにちは +--- + +# こんにちは + +``` + +[Read the Docusaurus documentation for info on writing pages in markdown](https://docusaurus.io/docs/markdown-features). + +### `docusaurus-theme-classic` + +``` +└── i18n/ja-jp + └── docusaurus-theme-classic/ + ├── footer.json + └── navbar.json +``` + +`docusaurus-theme-classic` You can translate site components (footer and navbar) for the Japanese site. Each JSON object has a `messages` and `description` value: + * `message` - The Japanese translation. It will be in English if not translated. + * `description` - What and where the message is. This stays in English. + +For example: + +``` +{ + "item.label.Hello": { + "message": "こんにちは", + "description": "The title of the page" + } +} +``` + +The JSON files are created with the `npm run write-translations -- --locale ja-jp` command. [Please read the Docusaurus documentation](https://docusaurus.io/docs/i18n/tutorial#translate-your-react-code) for more info. + +### `code.json` + +``` +└── i18n/ja-jp + └── code.json +``` + +The `code.json` file is similar to `docusaurus-theme-classic` JSON objects. `code.json` has translations provided by Docusaurus for site elements. + +For example: + +``` + "theme.CodeBlock.copy": { + "message": "コピー", + "description": "The copy button label on code blocks" + }, +``` + +Be careful changing `code.json`. If you change something in this repo, it will likely need to be changed in the other Slack.dev repos too, like the Bolt-Python repo. We want these translations to match for all Slack.dev sites. \ No newline at end of file diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/index.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/index.md new file mode 100644 index 000000000..96bb11835 --- /dev/null +++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/index.md @@ -0,0 +1,21 @@ +# Bolt for JavaScript + +Bolt for JavaScript is a JavaScript framework to build Slack apps with the latest Slack platform features. Read the [Getting Started Guide](/getting-started) to set up and run your first Bolt app. + +Then, head over to the Concepts guides. They'll help you build a Bolt app for whatever use case you may have. + +## Getting help + +These docs have lots of information on Bolt for JavaScript. There's also an in-depth Reference section. Please explore! + +If you otherwise get stuck, we're here to help. The following are the best ways to get assistance working through your issue: + +* [Issue Tracker](http://github.com/slackapi/bolt-js/issues) for questions, bug reports, feature requests, and general discussion related to Bolt for JavaScript. Try searching for an existing issue before creating a new one. +* [Email](mailto:support@slack.com) our developer support team: `support@slack.com`. + +## Contributing + +These docs live within the [Bolt-JS](https://github.com/slackapi/bolt-js/) repository and are open source. + +We welcome contributions from everyone! Please check out our +[Contributor's Guide](https://github.com/slackapi/bolt-js/blob/main/.github/contributing.md) for how to contribute in a helpful and collaborative way. \ No newline at end of file diff --git a/docs/package-lock.json b/docs/package-lock.json index 343d0077f..d3f862d5e 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -17,8 +17,7 @@ "docusaurus-theme-github-codeblock": "^2.0.2", "prism-react-renderer": "^2.3.0", "react": "^18.0.0", - "react-dom": "^18.0.0", - "tablesort": "^5.3.0" + "react-dom": "^18.0.0" }, "devDependencies": { "@docusaurus/module-type-aliases": "3.4.0", @@ -212,26 +211,26 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.9", + "version": "7.25.2", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.9", + "version": "7.25.2", "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.9", - "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-module-transforms": "^7.24.9", - "@babel/helpers": "^7.24.8", - "@babel/parser": "^7.24.8", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.8", - "@babel/types": "^7.24.9", + "@babel/generator": "^7.25.0", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-module-transforms": "^7.25.2", + "@babel/helpers": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -254,10 +253,10 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.10", + "version": "7.25.0", "license": "MIT", "dependencies": { - "@babel/types": "^7.24.9", + "@babel/types": "^7.25.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -288,10 +287,10 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.8", + "version": "7.25.2", "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.24.8", + "@babel/compat-data": "^7.25.2", "@babel/helper-validator-option": "^7.24.8", "browserslist": "^4.23.1", "lru-cache": "^5.1.1", @@ -309,17 +308,15 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.8", + "version": "7.25.0", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", "@babel/helper-member-expression-to-functions": "^7.24.8", "@babel/helper-optimise-call-expression": "^7.24.7", - "@babel/helper-replace-supers": "^7.24.7", + "@babel/helper-replace-supers": "^7.25.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/traverse": "^7.25.0", "semver": "^6.3.1" }, "engines": { @@ -337,7 +334,7 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.24.7", + "version": "7.25.2", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", @@ -372,37 +369,6 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "license": "MIT", - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-member-expression-to-functions": { "version": "7.24.8", "license": "MIT", @@ -426,14 +392,13 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.9", + "version": "7.25.2", "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-module-imports": "^7.24.7", "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.2" }, "engines": { "node": ">=6.9.0" @@ -460,12 +425,12 @@ } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.24.7", + "version": "7.25.0", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-wrap-function": "^7.24.7" + "@babel/helper-wrap-function": "^7.25.0", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -475,12 +440,12 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.24.7", + "version": "7.25.0", "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.7", - "@babel/helper-optimise-call-expression": "^7.24.7" + "@babel/helper-member-expression-to-functions": "^7.24.8", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -511,16 +476,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-string-parser": { "version": "7.24.8", "license": "MIT", @@ -543,24 +498,23 @@ } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.24.7", + "version": "7.25.0", "license": "MIT", "dependencies": { - "@babel/helper-function-name": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.8", + "version": "7.25.0", "license": "MIT", "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.8" + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -637,8 +591,11 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.8", + "version": "7.25.3", "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.2" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -647,11 +604,24 @@ } }, "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { - "version": "7.24.7", + "version": "7.25.3", "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/traverse": "^7.25.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { + "version": "7.25.0", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -661,10 +631,10 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.24.7", + "version": "7.25.0", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -689,11 +659,11 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.24.7", + "version": "7.25.0", "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -951,13 +921,13 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.24.7", + "version": "7.25.0", "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-remap-async-to-generator": "^7.24.7", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-remap-async-to-generator": "^7.25.0", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -995,10 +965,10 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.24.7", + "version": "7.25.0", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1037,16 +1007,14 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.24.8", + "version": "7.25.0", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-replace-supers": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-replace-supers": "^7.25.0", + "@babel/traverse": "^7.25.0", "globals": "^11.1.0" }, "engines": { @@ -1110,6 +1078,20 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { + "version": "7.25.0", + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.0", + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-transform-dynamic-import": { "version": "7.24.7", "license": "MIT", @@ -1167,12 +1149,12 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.24.7", + "version": "7.25.1", "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-compilation-targets": "^7.24.8", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/traverse": "^7.25.1" }, "engines": { "node": ">=6.9.0" @@ -1196,10 +1178,10 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.24.7", + "version": "7.25.2", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1265,13 +1247,13 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.24.7", + "version": "7.25.0", "license": "MIT", "dependencies": { - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" + "@babel/helper-module-transforms": "^7.25.0", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -1465,10 +1447,10 @@ } }, "node_modules/@babel/plugin-transform-react-constant-elements": { - "version": "7.24.7", + "version": "7.25.1", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -1491,14 +1473,14 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.24.7", + "version": "7.25.2", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.8", "@babel/plugin-syntax-jsx": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/types": "^7.25.2" }, "engines": { "node": ">=6.9.0" @@ -1653,12 +1635,13 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.24.8", + "version": "7.25.2", "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-create-class-features-plugin": "^7.24.8", + "@babel/helper-create-class-features-plugin": "^7.25.0", "@babel/helper-plugin-utils": "^7.24.8", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", "@babel/plugin-syntax-typescript": "^7.24.7" }, "engines": { @@ -1724,17 +1707,18 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.24.8", + "version": "7.25.3", "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.24.8", - "@babel/helper-compilation-targets": "^7.24.8", + "@babel/compat-data": "^7.25.2", + "@babel/helper-compilation-targets": "^7.25.2", "@babel/helper-plugin-utils": "^7.24.8", "@babel/helper-validator-option": "^7.24.8", - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.7", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.7", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.3", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.0", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.0", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.7", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.7", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.0", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", @@ -1755,29 +1739,30 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.24.7", - "@babel/plugin-transform-async-generator-functions": "^7.24.7", + "@babel/plugin-transform-async-generator-functions": "^7.25.0", "@babel/plugin-transform-async-to-generator": "^7.24.7", "@babel/plugin-transform-block-scoped-functions": "^7.24.7", - "@babel/plugin-transform-block-scoping": "^7.24.7", + "@babel/plugin-transform-block-scoping": "^7.25.0", "@babel/plugin-transform-class-properties": "^7.24.7", "@babel/plugin-transform-class-static-block": "^7.24.7", - "@babel/plugin-transform-classes": "^7.24.8", + "@babel/plugin-transform-classes": "^7.25.0", "@babel/plugin-transform-computed-properties": "^7.24.7", "@babel/plugin-transform-destructuring": "^7.24.8", "@babel/plugin-transform-dotall-regex": "^7.24.7", "@babel/plugin-transform-duplicate-keys": "^7.24.7", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.0", "@babel/plugin-transform-dynamic-import": "^7.24.7", "@babel/plugin-transform-exponentiation-operator": "^7.24.7", "@babel/plugin-transform-export-namespace-from": "^7.24.7", "@babel/plugin-transform-for-of": "^7.24.7", - "@babel/plugin-transform-function-name": "^7.24.7", + "@babel/plugin-transform-function-name": "^7.25.1", "@babel/plugin-transform-json-strings": "^7.24.7", - "@babel/plugin-transform-literals": "^7.24.7", + "@babel/plugin-transform-literals": "^7.25.2", "@babel/plugin-transform-logical-assignment-operators": "^7.24.7", "@babel/plugin-transform-member-expression-literals": "^7.24.7", "@babel/plugin-transform-modules-amd": "^7.24.7", "@babel/plugin-transform-modules-commonjs": "^7.24.8", - "@babel/plugin-transform-modules-systemjs": "^7.24.7", + "@babel/plugin-transform-modules-systemjs": "^7.25.0", "@babel/plugin-transform-modules-umd": "^7.24.7", "@babel/plugin-transform-named-capturing-groups-regex": "^7.24.7", "@babel/plugin-transform-new-target": "^7.24.7", @@ -1875,7 +1860,7 @@ "license": "MIT" }, "node_modules/@babel/runtime": { - "version": "7.24.8", + "version": "7.25.0", "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" @@ -1885,7 +1870,7 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.24.8", + "version": "7.25.0", "license": "MIT", "dependencies": { "core-js-pure": "^3.30.2", @@ -1896,29 +1881,26 @@ } }, "node_modules/@babel/template": { - "version": "7.24.7", + "version": "7.25.0", "license": "MIT", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.8", + "version": "7.25.3", "license": "MIT", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.8", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.8", - "@babel/types": "^7.24.8", + "@babel/generator": "^7.25.0", + "@babel/parser": "^7.25.3", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.2", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1927,7 +1909,7 @@ } }, "node_modules/@babel/types": { - "version": "7.24.9", + "version": "7.25.2", "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.24.8", @@ -3229,7 +3211,7 @@ } }, "node_modules/@types/eslint": { - "version": "8.56.10", + "version": "9.6.0", "license": "MIT", "dependencies": { "@types/estree": "*", @@ -3351,10 +3333,10 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.14.11", + "version": "22.0.2", "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.11.1" } }, "node_modules/@types/node-forge": { @@ -3465,7 +3447,7 @@ "license": "MIT" }, "node_modules/@types/ws": { - "version": "8.5.11", + "version": "8.5.12", "license": "MIT", "dependencies": { "@types/node": "*" @@ -4202,7 +4184,7 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001642", + "version": "1.0.30001645", "funding": [ { "type": "opencollective", @@ -4431,6 +4413,16 @@ "node": ">=6" } }, + "node_modules/clone-deep/node_modules/is-plain-object": { + "version": "2.0.4", + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/clsx": { "version": "2.1.1", "license": "MIT", @@ -4571,6 +4563,16 @@ "url": "https://github.com/yeoman/configstore?sponsor=1" } }, + "node_modules/configstore/node_modules/write-file-atomic": { + "version": "3.0.3", + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, "node_modules/connect-history-api-fallback": { "version": "2.0.0", "license": "MIT", @@ -5613,7 +5615,7 @@ "license": "MIT" }, "node_modules/debug": { - "version": "4.3.5", + "version": "4.3.6", "license": "MIT", "dependencies": { "ms": "2.1.2" @@ -5949,7 +5951,7 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.4.829", + "version": "1.5.4", "license": "ISC" }, "node_modules/emoji-regex": { @@ -5983,7 +5985,7 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.17.0", + "version": "5.17.1", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", @@ -6776,17 +6778,6 @@ "version": "1.0.0", "license": "ISC" }, - "node_modules/fsevents": { - "version": "2.3.3", - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "license": "MIT", @@ -7857,11 +7848,9 @@ } }, "node_modules/is-plain-object": { - "version": "2.0.4", + "version": "5.0.0", + "dev": true, "license": "MIT", - "dependencies": { - "isobject": "^3.0.1" - }, "engines": { "node": ">=0.10.0" } @@ -10397,7 +10386,7 @@ } }, "node_modules/node-releases": { - "version": "2.0.17", + "version": "2.0.18", "license": "MIT" }, "node_modules/normalize-path": { @@ -10868,7 +10857,7 @@ } }, "node_modules/postcss": { - "version": "8.4.39", + "version": "8.4.40", "funding": [ { "type": "opencollective", @@ -11331,7 +11320,7 @@ } }, "node_modules/postcss-resolve-nested-selector": { - "version": "0.1.1", + "version": "0.1.4", "dev": true, "license": "MIT" }, @@ -12304,7 +12293,7 @@ "license": "BSD-3-Clause" }, "node_modules/rtlcss": { - "version": "4.1.1", + "version": "4.2.0", "license": "MIT", "dependencies": { "escalade": "^3.1.1", @@ -12991,7 +12980,7 @@ } }, "node_modules/stylelint": { - "version": "16.7.0", + "version": "16.8.1", "dev": true, "funding": [ { @@ -13015,7 +13004,7 @@ "cosmiconfig": "^9.0.0", "css-functions-list": "^3.2.2", "css-tree": "^2.3.1", - "debug": "^4.3.5", + "debug": "^4.3.6", "fast-glob": "^3.3.2", "fastest-levenshtein": "^1.0.16", "file-entry-cache": "^9.0.0", @@ -13032,10 +13021,10 @@ "micromatch": "^4.0.7", "normalize-path": "^3.0.0", "picocolors": "^1.0.1", - "postcss": "^8.4.39", - "postcss-resolve-nested-selector": "^0.1.1", + "postcss": "^8.4.40", + "postcss-resolve-nested-selector": "^0.1.4", "postcss-safe-parser": "^7.0.0", - "postcss-selector-parser": "^6.1.0", + "postcss-selector-parser": "^6.1.1", "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", "string-width": "^4.2.3", @@ -13132,14 +13121,6 @@ "dev": true, "license": "MIT" }, - "node_modules/stylelint/node_modules/is-plain-object": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/stylelint/node_modules/resolve-from": { "version": "5.0.0", "dev": true, @@ -13148,17 +13129,6 @@ "node": ">=8" } }, - "node_modules/stylelint/node_modules/signal-exit": { - "version": "4.1.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/stylelint/node_modules/string-width": { "version": "4.2.3", "dev": true, @@ -13208,18 +13178,6 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/stylelint/node_modules/write-file-atomic": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/supports-color": { "version": "7.2.0", "license": "MIT", @@ -13323,10 +13281,6 @@ "node": ">=8" } }, - "node_modules/tablesort": { - "version": "5.3.0", - "license": "MIT" - }, "node_modules/tapable": { "version": "2.2.1", "license": "MIT", @@ -13565,7 +13519,7 @@ } }, "node_modules/typescript": { - "version": "5.5.3", + "version": "5.5.4", "license": "Apache-2.0", "peer": true, "bin": { @@ -13577,7 +13531,7 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", + "version": "6.11.1", "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { @@ -14430,13 +14384,26 @@ "license": "ISC" }, "node_modules/write-file-atomic": { - "version": "3.0.3", + "version": "5.0.1", + "dev": true, "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "4.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/ws": { diff --git a/docs/package.json b/docs/package.json index 10d8c05d8..3e423b821 100644 --- a/docs/package.json +++ b/docs/package.json @@ -23,8 +23,7 @@ "docusaurus-theme-github-codeblock": "^2.0.2", "prism-react-renderer": "^2.3.0", "react": "^18.0.0", - "react-dom": "^18.0.0", - "tablesort": "^5.3.0" + "react-dom": "^18.0.0" }, "devDependencies": { "@docusaurus/module-type-aliases": "3.4.0", @@ -47,4 +46,4 @@ "engines": { "node": ">=20.0" } -} +} \ No newline at end of file diff --git a/docs/redirects-hashes.js b/docs/redirects-hashes.js deleted file mode 100644 index c5e5f4091..000000000 --- a/docs/redirects-hashes.js +++ /dev/null @@ -1,106 +0,0 @@ -import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment"; - -if (ExecutionEnvironment.canUseDOM) { - (function () { - // List of specific URLs to handle - const urlsToHandle = [ - "/bolt-js/concepts#basic", - "/bolt-js/concepts#advanced", - "/bolt-js/concepts#message-listening", - "/bolt-js/concepts#message-sending", - "/bolt-js/concepts#event-listening", - "/bolt-js/concepts#web-api", - "/bolt-js/concepts#action-listening", - "/bolt-js/concepts#action-respond", - "/bolt-js/concepts#acknowledge", - "/bolt-js/concepts#shortcuts", - "/bolt-js/concepts#commands", - "/bolt-js/concepts#creating-modals", - "/bolt-js/concepts#updating-pushing-views", - "/bolt-js/concepts#view-submissions", - "/bolt-js/concepts#publishing-views", - "/bolt-js/concepts#options", - "/bolt-js/concepts#authenticating-oauth", - "/bolt-js/concepts#socket-mode", - "/bolt-js/concepts#error-handling", - "/bolt-js/concepts#authorization", - "/bolt-js/concepts#token-rotation", - "/bolt-js/concepts#conversation-store", - "/bolt-js/concepts#global-middleware", - "/bolt-js/concepts#listener-middleware", - "/bolt-js/concepts#context", - "/bolt-js/concepts#deferring-initialization", - "/bolt-js/concepts#logging", - "/bolt-js/concepts#custom-routes", - "/bolt-js/concepts#receiver", - "/bolt-js/concepts#creating-custom-functions", - "/bolt-js/concepts#defining-custom-functions", - "/bolt-js/concepts#listening-to-custom-functions", - "/bolt-js/concepts#responding-to-interactivity", - "/bolt-js/concepts#steps", - "/bolt-js/concepts#creating-steps", - "/bolt-js/concepts#adding-editing-steps", - "/bolt-js/concepts#saving-steps", - "/bolt-js/concepts#executing-steps", - "/bolt-js/ja-jp/concepts#message-listening", - "/bolt-js/ja-jp/concepts#message-sending", - "/bolt-js/ja-jp/concepts#event-listening", - "/bolt-js/ja-jp/concepts#web-api", - "/bolt-js/ja-jp/concepts#action-listening", - "/bolt-js/ja-jp/concepts#action-respond", - "/bolt-js/ja-jp/concepts#acknowledge", - "/bolt-js/ja-jp/concepts#shortcuts", - "/bolt-js/ja-jp/concepts#commands", - "/bolt-js/ja-jp/concepts#creating-modals", - "/bolt-js/ja-jp/concepts#updating-pushing-views", - "/bolt-js/ja-jp/concepts#view-submissions", - "/bolt-js/ja-jp/concepts#publishing-views", - "/bolt-js/ja-jp/concepts#options", - "/bolt-js/ja-jp/concepts#authenticating-oauth", - "/bolt-js/ja-jp/concepts#socket-mode", - "/bolt-js/ja-jp/concepts#error-handling", - "/bolt-js/ja-jp/concepts#authorization", - "/bolt-js/ja-jp/concepts#token-rotation", - "/bolt-js/ja-jp/concepts#conversation-store", - "/bolt-js/ja-jp/concepts#global-middleware", - "/bolt-js/ja-jp/concepts#listener-middleware", - "/bolt-js/ja-jp/concepts#context", - "/bolt-js/ja-jp/concepts#deferring-initialization", - "/bolt-js/ja-jp/concepts#logging", - "/bolt-js/ja-jp/concepts#custom-routes", - "/bolt-js/ja-jp/concepts#receiver", - "/bolt-js/ja-jp/concepts#creating-custom-functions", - "/bolt-js/ja-jp/concepts#defining-custom-functions", - "/bolt-js/ja-jp/concepts#listening-to-custom-functions", - "/bolt-js/ja-jp/concepts#responding-to-interactivity", - "/bolt-js/ja-jp/concepts#steps", - "/bolt-js/ja-jp/concepts#creating-steps", - "/bolt-js/ja-jp/concepts#adding-editing-steps", - "/bolt-js/ja-jp/concepts#saving-steps", - "/bolt-js/ja-jp/concepts#executing-steps", - ]; - - // Get the current path and hash - const currentPath = window.location.pathname; - const currentHash = window.location.hash; - - // If there is a hash fragment - if (currentHash && currentHash.includes("#")) { - // Create the full URL with hash replaced by '/' - const newPath = currentPath + currentHash.replace("#", "/"); - - // Loop through the list of URLs to handle - for (const url of urlsToHandle) { - // Check if the current path matches the URL to handle - if ( - currentPath === url.split("#")[0] && - window.location.hash === `#${url.split("#")[1]}` - ) { - // Redirect to the new path - window.location.replace(newPath); - return; // Exit after the first match - } - } - } - })(); -} diff --git a/docs/redirects-pages.js b/docs/redirects-pages.js deleted file mode 100644 index 16b0cf443..000000000 --- a/docs/redirects-pages.js +++ /dev/null @@ -1,26 +0,0 @@ -import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment"; - -if (ExecutionEnvironment.canUseDOM) { - (function () { - // List of specific paths to redirect - const redirects = { - "/bolt-js/": "/bolt-js/getting-started", - "/bolt-js/concepts/basic": "/bolt-js/getting-started", - "/bolt-js/concepts/advanced": "/bolt-js/getting-started", - "/bolt-js/tutorial/getting-started": "/bolt-js/getting-started", - "/bolt-js/ja-jp/": "/bolt-js/ja-jp/getting-started", - "/bolt-js/ja-jp/concepts/basic": "/bolt-js/ja-jp/getting-started", - "/bolt-js/ja-jp/concepts/advanced": "/bolt-js/ja-jp/getting-started", - "/bolt-js/ja-jp/tutorial/getting-started": "/bolt-js/ja-jp/getting-started", - }; - - // Get the current path - const currentPath = window.location.pathname; - - // Check if the current path matches any in the redirects list - if (redirects[currentPath]) { - // Redirect to the new path - window.location.replace(redirects[currentPath]); - } - })(); -} diff --git a/docs/sidebars.js b/docs/sidebars.js index de2b5b64b..8bdb53eeb 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -13,9 +13,10 @@ const sidebars = { // But you can create a sidebar manually sidebarJSBolt: [ { - type: 'html', - value: '

Bolt for JavaScript

', // The HTML to be rendered - defaultStyle: true, // Use the default menu item styling + type: 'doc', + id: 'index', // document ID + label: 'Bolt for JavaScript', // sidebar label + className: 'sidebar-title', }, 'getting-started', { diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 8ceae3ccb..ba657ff5b 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -25,7 +25,7 @@ --slack-dark-blue: #1264a3; --grey: #868686; - --white: #FFFFFF; + --white: #ffffff; } /* resets striped tables that hurt me eyes */ @@ -46,14 +46,14 @@ p a { [data-theme="light"] { --ifm-color-primary: var(--aubergine-active); --ifm-footer-background-color: var(--horchata); - --slack-link: var(--slack-dark-blue) + --slack-link: var(--slack-dark-blue); } [data-theme="dark"] { --ifm-color-primary: var(--aubergine-light); --ifm-navbar-background-color: var(--aubergine); --ifm-footer-background-color: var(--aubergine); - --slack-link: var(--slack-blue) + --slack-link: var(--slack-blue); } html[data-theme="dark"] { @@ -105,3 +105,9 @@ html[data-theme="dark"] .navbar-github-link::before { background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat; } + +.sidebar-title { + font-size: 1.25em; /* Adjust the size as needed */ + font-weight: bold; + color: #000; +}