Sébastien Lorber
f87a3ead46
refactor: move @theme/hooks to @docusaurus/theme-common ( #6289 )
2022-01-07 19:19:35 +01:00
Joshua Chen
cb1aa30286
refactor: enforce type import specifiers ( #6230 )
...
* refactor: enforce type import specifiers
* fix
* Upgrade esbuild
* Fix (haha)
2021-12-31 21:17:09 +08:00
Joshua Chen
e07ebadf6c
fix: make Docusaurus PnP strict mode compatible ( #6047 )
...
Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
2021-12-08 14:26:24 +01:00
Alexey Pyltsyn
63bd6b9025
refactor: define own translations in other themes ( #5849 )
...
Co-authored-by: Armano <armano2@users.noreply.github.com>
2021-11-20 16:35:27 +01:00
Joshua Chen
0374426ce3
chore: upgrade TypeScript & other ESLint related deps ( #5963 )
...
* chore: upgrade ESLint related deps
* Upgrade TS
* Fix lock
* Bump Babel
* Update config
2021-11-18 21:15:37 +08:00
Joshua Chen
d1308a8736
refactor: improve setup of type declaration files ( #5914 )
2021-11-12 17:47:27 +01:00
Joshua Chen
0e5057bdb3
refactor(live-codeblock): migrate package to TS ( #5851 )
...
* refactor(live-codeblock): migrate package to TS
* Migrate test
2021-11-02 12:28:41 +08:00
Joshua Chen
1c8b8362f7
fix(live-codeblock): render static codeblock server-side ( #5754 )
...
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-10-21 17:17:03 +02:00
Nathaniel Tucker
4a4f8497b3
fix: Don't ignore options.transforms for buble ( #5677 )
...
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-10-12 20:01:27 +02:00
Sébastien Lorber
295e77cc09
refactor(core): replace useDocusaurusContext().isClient by useIsBrowser() ( #5349 )
...
* extract separate useIsClient() hook
* for consistency, rename to `useIsBrowser`
* useless return
* improve doc for BrowserOnly
* update snapshot
* polish
2021-08-12 19:02:29 +02:00
Sébastien Lorber
a7a5ea3466
refactor: make code block shadows consistent with new admonitions ( #5215 )
2021-07-23 18:11:40 +02:00
Sébastien Lorber
9e881b46c8
fix(v2): i18n fixes ( #4466 )
2021-03-19 14:23:31 +01:00
Sébastien Lorber
60d189a91c
fix(v2): Export Joi from validation-utils package ( #4459 )
2021-03-18 19:27:51 +01:00
tokarchyn
98a4b3a65c
feat(v2): Add playgroundPosition config for live codeblock ( #4328 )
...
* docs(v2): Add configuration parameter to allow putting Result before Editor in @docusaurus/theme-live-codeblock
* update doc
* refactor as playgroundPosition
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-03-05 14:49:17 +01:00
Alexey Pyltsyn
a4b409c93b
fix(v2): make code blocks more standalone ( #4315 )
...
* refactor(v2): make code blocks styles standalone
* Rework
* Revert font size in playground headers
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-03-04 18:22:34 +01:00
Alexey Pyltsyn
0383dd1496
fix(v2): evaluate code in live editor on client only ( #4318 )
2021-03-04 17:52:53 +01:00
Sébastien Lorber
3d00613e5d
fix(v2): Code blocks should be LTR by default ( #4277 )
...
* use LTR code code blocks
* code blocks should be LTR
2021-02-23 18:47:07 +01:00
Sébastien Lorber
ab7951571e
feat(v2): Extract/translate hardcoded labels from classic theme ( #4168 )
...
* Translate theme hardcoded strings
* improve test
2021-02-03 20:06:26 +01:00
Joel M
41ac4468de
fix(v2): allow async/await in live code editor ( #3954 )
...
* transforming async functions is not implemented by buble, so just bypassing it would relieve the pain for now
2020-12-28 10:47:55 +01:00
Teik Jun
8f0c00f3d4
fix(v2): fix theme validation for prism field and add tests ( #3210 )
...
* fix(v2): fix theme validation for prism field
* chore(v2): minor changes
* chore(v2): remove unused dependencies
2020-08-05 15:27:32 +02:00
Anshul Goyal
81d855355e
feat(v2): option and config validation life cycle method for official plugins ( #2943 )
...
* add validation for blog plugin
* fix wrong default component
* fix test and add yup to package.json
* remove console.log
* add validation for classic theme and code block theme
* add yup to packages
* remove console.log
* fix build
* fix logo required
* replaced yup with joi
* fix test
* remove hapi from docusuars core
* replace joi with @hapi/joi
* fix eslint
* fix remark plugin type
* change remark plugin validation to match documentation
* move schema to it's own file
* allow unknown only on outer theme object
* fix type for schema type
* fix yarn.lock
* support both commonjs and ES modules
* add docs for new lifecycle method
2020-06-24 20:08:16 +02:00
Alexey Pyltsyn
afe9ff91a4
chore(v2): replace classnames with clsx ( #2895 )
2020-06-07 13:40:06 +08:00
Sébastien Lorber
953abd8154
feat(v2): allow adding components to react-live scope ( #2826 )
...
* feat(v2): add components to react-live scope (#2807 )
* fix admonition issue + improve react-live scope doc
* fix again admonition :(
* remove forwarding of mdx components to react-live scope (for now)
* remove useless dep
2020-06-04 15:18:42 +03:00
Alexey Pyltsyn
e57294f70f
fix(v2): set proper font for live editor ( #2835 )
2020-05-29 17:57:19 +08:00
Alexey Pyltsyn
cc688f48fc
refactor(v2): add support for dark mode to live code blocks ( #2767 )
2020-05-18 11:24:32 +08:00
Alexey Pyltsyn
d910ff118e
refactor(v2): add @theme-init alias to give access to initial components ( #2464 )
2020-05-17 22:47:05 +08:00
Alexey Pyltsyn
1f00d15c74
chore(v2): fix code style (revert previous changes)
2020-04-05 17:38:12 +03:00
Alexey Pyltsyn
6965a668cd
chore(v2): fix code style
2020-04-05 17:30:59 +03:00
Yangshun Tay
b07507c9cc
chore(v2): upgrade devDependencies ( #2538 )
...
* chore(v2): upgrade devDependencies
* chore(v2): upgrade devDependencies
* chore: prettier
2020-04-05 19:07:44 +08:00
Alexey Pyltsyn
349eee042b
refactor(v2): make better code blocks ( #2534 )
...
* refactor(v2): make better code blocks
* Update styles.module.css
Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-05 18:01:07 +08:00
Alexey Pyltsyn
7bc7241ee4
fix(v2): add rounded corners in code blocks properly ( #2533 )
2020-04-05 15:57:11 +08:00
Yangshun Tay
692ab14e4f
fix(v2): make code block nicer again ( #2526 )
2020-04-04 13:06:11 +08:00
Alexey Pyltsyn
44f9c76851
fix(v2): synchronize code block components changes ( #2509 )
2020-04-02 23:05:48 +08:00
Yangshun Tay
63997a4fbe
fix(v2): make code block nicer ( #2502 )
2020-04-02 14:12:47 +08:00
Alexey Pyltsyn
c299baa80b
fix(v2): various improvements for accessibility ( #2480 )
2020-03-29 23:35:58 +08:00
Alexey Pyltsyn
cf884f532d
fix(v2): improve code block scroll accessibility ( #2476 )
2020-03-29 12:48:34 +08:00
Kohhee Peace
5e0d11dbaf
feat(v2): add filename in CodeBlock ( #2346 )
...
* feat: add filename in CodeBlock
* Fix code to use Regex to find title from markdown and Update style
* Fix reviewed point
- Delete unnecessary template literals
- Delete unnecessary "important!" from css
* Add title in live codeblock
* Just edit code order
* Add demo for code title
* Add docs about code title in markdown-features.mdx
* Make code title height scalable
* Rename codeBlockWrapper to codeBlockContent
* Make copyButton appear when hovering codeTitle
* Fix docs description about code title
2020-03-26 01:05:18 +08:00
Alexey Pyltsyn
3052ef14e5
fix(v2): various improvements for accessibility ( #2442 )
2020-03-23 11:46:57 +08:00
Alexey Pyltsyn
6b75aafd5a
fix(v2): remove line break from end of code blocks ( #2371 )
2020-03-07 15:28:33 +08:00
Yangshun Tay
32c1a92b17
chore: yearless copyright headers for source code ( #2320 )
...
* chore: yearless copyright headers for source code
* update snapshots
2020-02-25 23:12:28 +08:00
Yangshun Tay
996b115199
misc(v2): clean up comments in code ( #2294 )
2020-02-18 21:29:23 +08:00
KohheePeace
7086c279e2
fix(v2): fix codeblock copy button not including blank lines ( #2285 )
2020-02-16 22:21:46 +08:00
Alexey Pyltsyn
bb82d0e073
fix(v2): make code blocks scrollable ( #2241 )
...
* wip
* fix(v2): make code blocks scrollable
Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-02-08 19:44:45 +08:00
Alexey Pyltsyn
ab25ee3e0f
refactor(v2): avoid to use raw theme values ( #2254 )
2020-01-31 23:42:21 +08:00
Alexey Pyltsyn
95caf833d8
fix(v2): render correct theme for live code blocks on SSR ( #2227 )
2020-01-20 11:00:04 +08:00
Yangshun Tay
08ca95af01
docs(v2): dark mode syntax highlighting ( #2153 )
2019-12-29 16:40:17 +08:00
Yangshun Tay
167f71a654
fix(v2): render correct syntax theme for current website theme ( #2150 )
2019-12-27 13:37:39 +08:00
Alexey Pyltsyn
92c68ed742
feat(v2): add support another Prism theme for dark mode ( #1984 )
...
* feat(v2): add support another Prism theme for dark mode
* add dynamically change Prism theme
* Prepare for review
* PR review changes
* feat(v2): useThemeContext
Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2019-12-25 22:52:34 +08:00
Alexey Pyltsyn
1f0eb37e19
fix(v2): add syntax highlight to generated colors ( #2114 )
2019-12-10 12:50:35 -08:00
Endi
39e9e755c3
Revert "fix(v2): remove auto wrap for code blocks ( #2048 )" ( #2071 )
...
This reverts commit 10cd99b3e4 .
2019-11-30 12:57:56 -08:00