Commit graph

211 commits

Author SHA1 Message Date
Joshua Chen
115212c2ba
docs: add theme-common to API docs 2022-05-09 23:26:10 +08:00
Sébastien Lorber
26df8c83ce
chore: prepare v2.0.0-beta.20 release (#7347) 2022-05-05 20:26:48 +02:00
Alexey Pyltsyn
6fa51890f0
chore: prepare v2.0.0-beta.19 release (#7325)
* chore: prepare v2.0.0-beta.19 release

* v2.0.0-beta.19
2022-05-04 18:38:45 +03:00
Joshua Chen
51815c12c9
feat(theme-classic): extensible code block magic comment system (#7178) 2022-05-04 12:31:13 +02:00
Joshua Chen
785fed723f
refactor(theme-classic): move all sidebar-related config under themeConfig.docs.sidebar (#7277) 2022-05-04 12:08:19 +02:00
Joshua Chen
b49ae67521
refactor(types): move non-core, non-public types out of the types package (#7293) 2022-05-03 17:15:48 +08:00
Joshua Chen
afc72480ab
refactor(eslint-plugin): migrate to TS-ESLint infrastructure (#7276)
* refactor(eslint-plugin): migrate to TS-ESLint infrastructure

* fix lock
2022-04-30 17:57:57 +08:00
Joshua Chen
710f898703
refactor(theme-classic): multiple re-arrangements (#7273)
* refactor(theme-classic): enforce collocated JSX and module CSS

* refactor
2022-04-30 12:29:54 +08:00
Sébastien Lorber
2a0f105434
refactor(theme-classic): DocPage theme refactors polish (#7268) 2022-04-29 19:34:40 +02:00
Joshua Chen
41f53718c1
fix(theme-common): allow details to not provide a summary (#7267) 2022-04-29 19:33:28 +02:00
Sébastien Lorber
3bef88232f
refactor: extract useSkipToContent() (#7269) 2022-04-29 19:16:02 +02:00
Joshua Chen
242f2e780e
chore: upgrade dependencies (#7232) 2022-04-23 11:55:01 +08:00
Alexey Pyltsyn
4e4aa6add7
feat(theme-classic): toggle code wrap button (#7036)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-04-22 14:50:27 +02:00
Joshua Chen
1412441987
fix(theme-common): do not persist color mode for OS-triggered changes (#7200)
* fix(theme-common): do not persist color mode if switch is disabled

* New setColorMode(null) API

* reset to default without RPCS
2022-04-21 23:29:08 +08:00
Joshua Chen
b154318c28
chore: upgrade dependencies (#7193) 2022-04-17 17:32:41 +08:00
Joshua Chen
fa1ce230ea
refactor: capitalize comments (#7188)
* refactor: capitalize comments

* revert...
2022-04-17 16:39:11 +08:00
Sébastien Lorber
5273a534d3
refactor(theme-classic): split CodeBlock (#7175)
* extract CodeBlockLine

* stable refactor

* stable refactor

* stable refactor

* add CodeBlockContainer

* refactor

* refactor

* do the actual split

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-15 17:58:12 +08:00
Alexey Pyltsyn
ad1526aade
refactor: control base styling of code blocks via CSS vars (#7172)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-04-14 18:16:39 +02:00
Jody Heavener
5fb0a2e274
feat(content-docs): draft docs excluded from build & sidebars (#6457)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-04-13 18:02:05 +02:00
Alexey Pyltsyn
ee4c984bc7
feat(theme-classic): code block showLineNumbers (#7007) 2022-04-13 14:42:35 +02:00
Joshua Chen
2a7820582c
chore: upgrade dependencies (#7138)
* chore: upgrade dependencies

* reorg

* update comment
2022-04-09 12:36:10 +08:00
Joshua Chen
e5bf59fd9b
refactor: mark a few client-side packages as side-effect-free (#7085)
* refactor: mark a few client-side packages as side-effect-free

* fix

* fix again

* fix...

* revert sideeffect

* revert

* fix again...

* properly fix

* fix

* properly fix
2022-04-09 09:08:18 +08:00
Alexey Pyltsyn
d5cfa5b7cf
refactor(theme-classic): fix a few margin inconsistencies (#7129)
* refactor(theme-classic): minor fixes and improvements

* Fixes after review

* Reset spacing for all children inside browser window
2022-04-09 08:27:22 +08:00
Joshua Chen
9145ae88cc
chore: disable string escaping in snapshots (#7131) 2022-04-08 11:23:19 +08:00
Joshua Chen
1156be3f20
refactor(content-{blog,docs}): unify handling of tags (#7117) 2022-04-07 15:58:21 +02:00
Joshua Chen
e610a4ac00
test: improve test coverage (#7113) 2022-04-05 14:09:19 +08:00
Joshua Chen
24c205a835
refactor: replace non-prop interface with type; allow plugin lifecycles to have sync type (#7080)
* refactor: replace non-prop interface with type; allow plugin lifecycles to have sync type

* fix
2022-03-31 19:16:07 +08:00
Joshua Chen
13e7de853e
refactor(theme-classic): extract doc-related navbar items' logic to theme-common (#7067) 2022-03-30 14:50:04 +08:00
Joshua Chen
2e79597f83
feat(theme-classic): show blog sidebar on mobile (#7012)
* feat(theme-classic): show blog sidebar on mobile

* fix

* oops

* docs

* add a little margin

* Update display.tsx

* Update content.tsx

* reformat
2022-03-30 09:15:54 +08:00
Joshua Chen
4e45e14fdd
fix(theme-common): use native scrolling when smooth behavior set in CSS (#7057)
* fix(theme-common): use native scrolling when smooth behavior set in CSS

* fix

* fix again

* fix again
2022-03-29 18:02:09 +08:00
Joshua Chen
77662260f8
refactor(core): refactor routes generation logic (#7054)
* refactor(core): refactor routes generation logic

* fixes
2022-03-29 16:37:29 +08:00
duanwilliam
b5fc9a6b6d
fix(theme): add bash style to Markdown comment styles (#7049)
* docs: fix code block line highlighting in md syntax highlighting

* properly fix

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-29 09:23:03 +08:00
Joshua Chen
755b03861c
fix(theme): only parse HTML- and JSX-style comments in MD code (#7033) 2022-03-28 09:57:04 +08:00
Joshua Chen
cb03764ce5
refactor(theme): extract plumbing code of BTT button into theme-common (#7021)
* refactor(theme): extract plumbing code of BTT button into theme-common

* oops
2022-03-26 21:05:48 +08:00
Sébastien Lorber
1b974e8b1b
refactor: split and cleanup theme/DocPage (#7006) 2022-03-25 19:58:28 +01:00
Sébastien Lorber
73deaa8bf6
chore: prepare v2.0.0-beta.18 release (#7001) 2022-03-25 16:16:38 +01:00
Joshua Chen
87592bca03
refactor: ensure all types are using index signature instead of Record (#6995)
* refactor: ensure all types are using index signature instead of Record

* kick CI
2022-03-25 18:06:30 +08:00
Joshua Chen
b456a64f61
feat(theme-common): JSDoc for all APIs (#6974)
* feat(theme-common): JSDoc for all APIs

* fix tests
2022-03-23 21:39:19 +08:00
Joshua Chen
948271a0ff
test: improve test coverage; reorder theme-common files (#6956)
* test: improve test coverage; reorder theme-common files

* no need for this
2022-03-22 15:33:55 +08:00
Joshua Chen
0a5354dc32
refactor(core): move browserContext and docusaurusContext out of client exports (#6955) 2022-03-22 14:30:14 +08:00
Joshua Chen
19942f990a
chore: migrate Jest and website to SWC (#6944)
* chore: migrate Jest and website to SWC

* ignore template
2022-03-19 20:56:30 +08:00
Sébastien Lorber
74f653dd82
refactor(theme-{classic,common}): change how site/page/search metadata is handled (#6925) 2022-03-18 18:53:00 +01:00
Sébastien Lorber
a1d333e96b
refactor(theme-{classic,common}): split navbar into smaller components + cleanup + swizzle config (#6895) 2022-03-18 16:21:53 +01:00
Alexey Pyltsyn
ecbe0b26c5
refactor(theme-{classic,common}): refactor ColorModeToggle + useColorMode() hook (#6930)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2022-03-18 15:28:35 +01:00
Sébastien Lorber
8a1421a938
feat(core,theme): useRouteContext + HtmlClassNameProvider (#6933)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
2022-03-18 10:57:32 +01:00
Joshua Chen
cc0bceab9c
chore: tighten ESLint config (#6931)
* chore: tighten ESLint config

* more refactor

* refactor push

* fix
2022-03-17 17:59:41 +08:00
Joshua Chen
8c1e518ba2
chore: do not print prototype in jest snapshot (#6908) 2022-03-13 19:34:50 +08:00
Joshua Chen
3a4b9b4c30
refactor: install eslint-plugin-regexp (#6906)
* refactor: install eslint-plugin-regexp

* simplify

* simplify

* fix
2022-03-13 18:32:17 +08:00
Joshua Chen
d85cee576d
test: improve test coverage; properly test core client APIs (#6905)
* test: improve test coverage

* fix
2022-03-12 23:15:45 +08:00
Joshua Chen
76cb012209
chore: spell-check test files (#6903) 2022-03-12 15:24:56 +08:00