From 48f339e669acd10ca51d70f65cae1d9839d5b1d1 Mon Sep 17 00:00:00 2001 From: Zihua Li Date: Sun, 5 Nov 2023 17:32:24 +0800 Subject: [PATCH 01/17] Update CHANGELOG for 2.0 beta --- CHANGELOG.md | 116 ++++++++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e58c44c35f..80c2bd6c74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,62 @@ -# 2.0.0 - -In progress. Please see the [Upgrading to 2.0](http://quilljs.com/guides/upgrading-to-2-0/) guide. +# 2.0.0-dev.1 ~ 2.0.0-dev.4 + +In the 2.0 release, Quill has been significantly modernized. Leveraging the latest browser-supported APIs, Quill now delivers a more efficient and reliable editing experience. + +### Major Improvements + +- Nested Quill support [#3590](https://github.com/quilljs/quill/pull/3590) +- Improved IME and spell corrector support [#3807](https://github.com/quilljs/quill/pull/3807) +- Semantic cleanups for TEXT_CHANGE event [#3778](https://github.com/quilljs/quill/pull/3778) +- **History**: Record selection in history module [#3823](https://github.com/quilljs/quill/pull/3823) +- Auto detect scrolling container [#3840](https://github.com/quilljs/quill/pull/3840) + +### Performance Improvements + +Quill 2.0 includes many performance optimizations, +the most important of which is the improved rendering speed for large content. + +- Improve inserting performance [#3815](https://github.com/quilljs/quill/pull/3815) +- Avoid fetching selections when possible [#3538](https://github.com/quilljs/quill/pull/3538) +- No need to setContents when container is empty [#3539](https://github.com/quilljs/quill/pull/3539) + +### Code Modernization + +- Migrated to TypeScript +- Provided official TypeScript declarations +- Migrated to Vitest for unit testing +- Migrated to Playwright for E2E testing +- Migrated website to Gatsby + +### All Changes + +- Fix UI node interactions with line-level navigation shortcuts [#3898](https://github.com/quilljs/quill/pull/3898) +- Use `<strike>` instead of `<s>` for Strike format [Commit](https://github.com/quilljs/quill/commit/16427683890374ed5acba96765757c44f5d5f2f5) +- **Keyboard**: Backspace will keep the format when previous line is empty [#3013](https://github.com/quilljs/quill/pull/3013) +- **Keyboard**: Discontinue inline formats on enter [#3428](https://github.com/quilljs/quill/pull/3428) +- Fix length mismatch when copying code [#3028](https://github.com/quilljs/quill/pull/3028) +- Keep list numbers continuous when separated by certain elements [#3086](https://github.com/quilljs/quill/pull/3086) +- Header/paragraph doesn't reset list numbering in Firefox [#3272](https://github.com/quilljs/quill/pull/3272) +- Fix `Quill#setContents()` on block embed ending [Commit](https://github.com/quilljs/quill/commit/84d22342d5e3eb33453d4601d2c7f55d26b47495) +- Track all implicit newline indexes and shift for delete [Commit](https://github.com/quilljs/quill/commit/cf101f681158a48b1b477c1544680cc9614425ae) +- **Clipboard**: Fix pasting in checklist does not preserve indentation [#3064](https://github.com/quilljs/quill/pull/3064) +- **Clipboard**: Prefer file over html when uploading [Commit](https://github.com/quilljs/quill/commit/e164f12603f646d919c853a7db02137399dbf696) +- **Clipboard**: Keep newlines in pre tag [#3687](https://github.com/quilljs/quill/pull/3687) +- **Clipboard**: Cut across lines shouldn't affect the formatting of the line above [#3286](https://github.com/quilljs/quill/pull/3286) +- getLeaf() should ignore non-leaf blots [#3489](https://github.com/quilljs/quill/pull/3489) +- **Selection**: Fix getBounds of empty text nodes [#3491](https://github.com/quilljs/quill/pull/3491) +- Keep cursor unlinked to avoid elements being pushed down inside [#3534](https://github.com/quilljs/quill/pull/3534) +- Fix combineFormats with multiple values repeated [#3336](https://github.com/quilljs/quill/issues/3336) +- Fix selection-change not firing on DOM mutations [#3591](https://github.com/quilljs/quill/pull/3591) +- Improve Tab handling in code block [#3593](https://github.com/quilljs/quill/pull/3593) +- Add SMS to link protocol whitelist [#2851](https://github.com/quilljs/quill/pull/2851) +- Fix embed inherits formats unexpectedly [#3783](https://github.com/quilljs/quill/pull/3783) +- Fix HTML and Delta not matching [#3784](https://github.com/quilljs/quill/pull/3784) +- Fix inline embed insertions with applyDelta() [#3793](https://github.com/quilljs/quill/pull/3793) +- Fix inserting newlines into formatted text [#3582](https://github.com/quilljs/quill/pull/3582) +- **History**: Pass source for history actions [#3514](https://github.com/quilljs/quill/pull/3514) +- **History**: Handle native undo/redo [#3115](https://github.com/quilljs/quill/pull/3115) +- Fix block embed attributor errors [#3825](https://github.com/quilljs/quill/pull/3825) +- **Clipboard**: getHTML() should include outer tag when range is entire line [#3850](https://github.com/quilljs/quill/pull/3850) # 1.3.6 @@ -9,11 +65,10 @@ In progress. Please see the [Upgrading to 2.0](http://quilljs.com/guides/upgradi Thanks to [@berylw](https://github.com/berylw) and [@erinsinger93](https://github.com/erinsinger93) for contributions to this release! - # 1.3.5 - Fix indent preservation of a checked checklist item [#1818](https://github.com/quilljs/quill/issues/1818) -- * added as a shortcut to trigger bullet list formatting [#1819](https://github.com/quilljs/quill/pull/1819) +- - added as a shortcut to trigger bullet list formatting [#1819](https://github.com/quilljs/quill/pull/1819) - Fix pasting text-align styles [#1873](https://github.com/quilljs/quill/issues/1873) - Fix cursor position after dangerouslyPasteHTML [#1886](https://github.com/quilljs/quill/issues/1886) - Fix value of history stack in text-change handler [#1906](https://github.com/quilljs/quill/pull/1906) @@ -21,7 +76,6 @@ Thanks to [@berylw](https://github.com/berylw) and [@erinsinger93](https://githu Thank you [@araruna](https://github.com/araruna), [@bryanrsmith](https://github.com/bryanrsmith), [@haugstrup](https://github.com/haugstrup), [@icylace](https://github.com/icylace), [@leimig](https://github.com/leimig), [@LFDM](https://github.com/LFDM), [@nikparo](https://github.com/nikparo), [@rafpaf](https://github.com/rafpaf) and [@vk2sky](https://github.com/vk2sky) for your contributions to this release. - # 1.3.4 - Loosen dependency specification [#1748](https://github.com/quilljs/quill/issues/1748) @@ -29,7 +83,6 @@ Thank you [@araruna](https://github.com/araruna), [@bryanrsmith](https://github. Thanks to [@danfuzz](https://github.com/danfuzz) and [@SoftVision-CarmenFat](https://github.com/SoftVision-CarmenFat) for contributions to this release! - # 1.3.3 - Fix `getFormat` with no parameters while editor is not focused [#1548](https://github.com/quilljs/quill/issues/1548) @@ -38,10 +91,8 @@ Thanks to [@danfuzz](https://github.com/danfuzz) and [@SoftVision-CarmenFat](htt - Fix list creation keyboard shortcuts [#1723](https://github.com/quilljs/quill/issues/1723) - Show KaTex rendering errors [#1738](https://github.com/quilljs/quill/pull/1738) - Thank you [@altschuler](https://github.com/altschuler), [@arrocke](https://github.com/arrocke), [@guillaumepotier](https://github.com/guillaumepotier), [@sferoze](https://github.com/sferoze) and [@volser](https://github.com/volser) for your contributions to this release. - # 1.3.2 - Pasting into code block should always paste as code [#1624](https://github.com/quilljs/quill/issues/1624) @@ -52,7 +103,6 @@ Thank you [@altschuler](https://github.com/altschuler), [@arrocke](https://githu Thanks to [@abramz](https://github.com/abramz), [@amitm02](https://github.com/amitm02), [@eamodio](https://github.com/eamodio), [@HWliao](https://github.com/HWliao), [@mmitis](https://github.com/mmitis), [@nelsonpecora](https://github.com/nelsonpecora), [@nipunjain87](https://github.com/nipunjain87), and [@ValueBerry](https://github.com/ValueBerry) for contributions to this release! - # 1.3.1 - Fix placeholder when emptying text [#1594](https://github.com/quilljs/quill/issues/1594) @@ -60,7 +110,6 @@ Thanks to [@abramz](https://github.com/abramz), [@amitm02](https://github.com/am Thank you [@Natim](https://github.com/Natim) and [@stephenLYao](https://github.com/stephenLYao) for your contributions to this release. - # 1.3.0 Add `matchVisual` [configuration](https://quilljs.com/docs/modules/clipboard/#configuration) to Clipboard. @@ -79,7 +128,6 @@ Add `matchVisual` [configuration](https://quilljs.com/docs/modules/clipboard/#co Thanks to [@alexkrolick](https://github.com/alexkrolick), [@amitm02](https://github.com/amitm02), [@Christilut](https://github.com/Christilut), [@danielschwartz](https://github.com/danielschwartz), [@emanuelbsilva](https://github.com/emanuelbsilva), [@ersommer](https://github.com/ersommer), [@fiurrr](https://github.com/fiurrr), [@jackmu95](https://github.com/jackmu95), [@jmzhang](https://github.com/jmzhang), [@mdpye](https://github.com/mdpye), [@ralrom](https://github.com/ralrom), [@sferoze](https://github.com/sferoze), [@simon-at-fugu](https://github.com/simon-at-fugu), and [@yogadzx](https://github.com/yogadzx) for contributions to this release! - # 1.2.6 - Disable Grammarly by default [#574](https://github.com/quilljs/quill/issues/574) @@ -89,7 +137,6 @@ Thanks to [@alexkrolick](https://github.com/alexkrolick), [@amitm02](https://git Thank you [@amitm02](https://github.com/amitm02), [@benbro](https://github.com/benbro) [@nickbaum](https://github.com/nickbaum), [@stalniy](https://github.com/stalniy) and [@ygrishajev](https://github.com/ygrishajev) for your contributions to this release. - # 1.2.5 - Fix cursor shifting to be exclusive of user cursor [#1367](https://github.com/quilljs/quill/issues/1367) @@ -102,7 +149,6 @@ Thank you [@amitm02](https://github.com/amitm02), [@benbro](https://github.com/b Thanks to [@aliciawood](https://github.com/aliciawood), [@benbro](https://github.com/benbro), [@denis-aes](https://github.com/denis-aes), [@despreju](https://github.com/despreju), [@GlenKPeterson](https://github.com/GlenKPeterson), [@haugstrup](https://github.com/haugstrup), [@jziggas](https://github.com/jziggas), [@RobAley](https://github.com/RobAley), [@sheley1998](https://github.com/sheley1998), [@silverprize](https://github.com/silverprize), and [@yairy](https://github.com/yairy) for contributions to this release! - # 1.2.4 - Fix pasting nested list [#906](https://github.com/quilljs/quill/issues/906) @@ -117,7 +163,6 @@ Thanks to [@aliciawood](https://github.com/aliciawood), [@benbro](https://github Thanks to [@bigggge](https://github.com/bigggge), [@CoenWarmer](https://github.com/CoenWarmer), [@cutteroid](https://github.com/cutteroid), [@jay-cox](https://github.com/jay-cox), [@kiewic](https://github.com/kiewic), [@kloots](https://github.com/kloots), [@MichaelTontchev](https://github.com/MichaelTontchev), [@montlebalm](https://github.com/montlebalm), [@RichardNeill](https://github.com/RichardNeill), and [@vasconita](https://github.com/vasconita) for your contributions to this release. - # 1.2.3 - Fix scrolling when appending new lines [#1276](https://github.com/quilljs/quill/issues/1276) [#1361](https://github.com/quilljs/quill/issues/1361) @@ -126,14 +171,12 @@ Thanks to [@bigggge](https://github.com/bigggge), [@CoenWarmer](https://github.c Thank you [@artaommahe](https://github.com/artaommahe), [@c-w](https://github.com/c-w), [@EladBet](https://github.com/EladBet), [@emenoh](https://github.com/emenoh), and [@montlebalm](https://github.com/montlebalm) for contributions to this release! - # 1.2.2 - Fix backspace/delete on Windows/Ubuntu [#1334](https://github.com/quilljs/quill/issues/1334) Thanks to [@dinusuresh](https://github.com/dinusuresh) for your contributions to this release. - # 1.2.1 - Fix link removal on Snow theme [#1259](https://github.com/quilljs/quill/issues/1259) @@ -142,7 +185,6 @@ Thanks to [@dinusuresh](https://github.com/dinusuresh) for your contributions to Thank you [@danielschwartz](https://github.com/@danielschwartz), [@JedWatson](https://github.com/@JedWatson), [@montlebalm](https://github.com/@montlebalm), and [@simi](https://github.com/@simi) for contributions to this release! - # 1.2.0 Add concept of experimental APIs: they are APIs meant to try out support for use cases we would like to address, but gives flexibility to find the right API interface. As such they are not covered by Semantic Versioning. Several are added to start things off: `find`, `getIndex`, `getLeaf`, `getLine`, `getLines`. @@ -151,7 +193,6 @@ Add concept of experimental APIs: they are APIs meant to try out support for use Thanks to [@haugstrup](https://github.com/haugstrup) for your contributions to this release. - # 1.1.10 - Preserve user selection on API changes [#1152](https://github.com/quilljs/quill/issues/1152) @@ -161,7 +202,6 @@ Thanks to [@haugstrup](https://github.com/haugstrup) for your contributions to t Thank you [@benbro](https://github.com/benbro), [@haugstrup](https://github.com/haugstrup), [@peterweck](https://github.com/peterweck) and [@sbevels](https://github.com/sbevels) for contributions to this release! - # 1.1.9 - Flip tooltips when vertically out of bounds [#851](https://github.com/quilljs/quill/issues/851) @@ -172,7 +212,6 @@ Thank you [@benbro](https://github.com/benbro), [@haugstrup](https://github.com/ Thanks to [@amitguptagwl](https://github.com/amitguptagwl), [@antonlabunets](https://github.com/antonlabunets), [@benbro](https://github.com/benbro), [@eamodio](https://github.com/eamodio) and [@ygrishajev](https://github.com/ygrishajev) for your contributions to this release. - # 1.1.8 - Support pasting italics from Google Docs [#1185](https://github.com/quilljs/quill/issues/1185) @@ -183,7 +222,6 @@ Thanks to [@amitguptagwl](https://github.com/amitguptagwl), [@antonlabunets](htt Thank you [@adfaure](https://github.com/adfaure), [@berndschimmer](https://github.com/berndschimmer), [@CoenWarmer](https://github.com/CoenWarmer), [@montlebalm](https://github.com/montlebalm), and [@TraceyYau](https://github.com/TraceyYau) for contributions to this release! - # 1.1.7 - Fix dropdown values reverting to default [#901](https://github.com/quilljs/quill/issues/901) @@ -195,7 +233,6 @@ Thank you [@adfaure](https://github.com/adfaure), [@berndschimmer](https://githu Thanks to [@cutteroid](https://github.com/cutteroid), [@houxg](https://github.com/houxg), [@jasongisstl](https://github.com/jasongisstl), [@nikparo](https://github.com/nikparo), [@sbevels](https://github.com/sbevels), and [sferoze](https://github.com/sferoze) for your contributions to this release. - # 1.1.6 ### Features @@ -209,7 +246,6 @@ Checklists [#759](https://github.com/quilljs/quill/issues/759) support has been Thank you [@jgmediadesign](https://github.com/jgmediadesign) and [@julienbmobile](https://github.com/julienbmobile) for contributions to this release! - # 1.1.5 - Remove unnecessary type attribute in documentation [#1087](https://github.com/quilljs/quill/pull/1087) @@ -218,7 +254,6 @@ Thank you [@jgmediadesign](https://github.com/jgmediadesign) and [@julienbmobile Thank you [@jleen](https://github.com/jleen), [@kaelig](https://github.com/kaelig), and [@YouHan26](https://github.com/YouHan26) for your contributions to this release. - # 1.1.3 - Update quill-delta [delta#2](https://github.com/quilljs/delta/issues/2) @@ -226,7 +261,6 @@ Thank you [@jleen](https://github.com/jleen), [@kaelig](https://github.com/kaeli Thanks to [@eamodio](https://github.com/eamodio) and [@metsavir](https://github.com/metsavir) for contributions to this release! - # 1.1.2 - Fix setContents on already formatted text [#1065](https://github.com/quilljs/quill/issues/1065) @@ -235,7 +269,6 @@ Thanks to [@eamodio](https://github.com/eamodio) and [@metsavir](https://github. Thank you [@benbro](https://github.com/benbro), [@derickruiz](https://github.com/derickruiz), [@eamodio](https://github.com/eamodio), [@hallaathrad](https://github.com/hallaathrad), and [@philly385](https://github.com/philly385) for your contributions to this release. - # 1.1.1 ### Bug fixes @@ -250,7 +283,6 @@ Thanks to [@artaommahe](https://github.com/artaommahe), [@benbro](https://github Special thanks to [@DadaMonad](https://github.com/DadaMonad) for contributions on [fast-diff](https://github.com/jhchen/fast-diff) that enabled the [#746](https://github.com/quilljs/quill/issues/746) fix. - # 1.1.0 ### Additions @@ -273,7 +305,6 @@ So a `strict` configuration option has been added. It is true by default so the Thank you [@benbro](https://github.com/benbro), [@cutteroid](https://github.com/cutteroid), [@evansolomon](https://github.com/evansolomon), [@felipeochoa](https://github.com/felipeochoa), [jackmu95](https://github.com/jackmu95), [@joedynamite](https://github.com/joedynamite), [@lance13c](https://github.com/lance13c), [@leebenson](https://github.com/leebenson), [@maartenvanvliet](https://github.com/maartenvanvliet), [@sarbbottam](https://github.com/sarbbottam), [@viljark](https://github.com/viljark), [@w00fz](https://github.com/w00fz) for their contributions to this release. - # 1.0.6 Documentation clarifications and bug fixes. @@ -285,12 +316,10 @@ Documentation clarifications and bug fixes. Thanks to [@dropfen](https://github.com/dropfen), [@evansolomon](https://github.com/evansolomon), [@hallaathrad](https://github.com/hallaathrad), [@janyksteenbeek](https://github.com/janyksteenbeek), [@jackmu95](https://github.com/jackmu95), [@marktron](https://github.com/marktron), [@mcat-ee](https://github.com/mcat-ee), [@unhammer](https://github.com/unhammer), and [@zeke](https://github.com/zeke) for contributions to this release! - # 1.0.5 Became 1.0.6 with a build/deploy fix. - # 1.0.4 - Fix bubble theme defaults [#963](https://github.com/quilljs/quill/issues/963) @@ -301,14 +330,12 @@ Became 1.0.6 with a build/deploy fix. Thank you [jackmu95](https://github.com/jackmu95), [kristeehan](https://github.com/kristeehan), [ruffle1986](https://github.com/ruffle1986), [sergop321](https://github.com/sergop321), [sferoze](https://github.com/sferoze), and [sijad](https://github.com/sijad) for contributions to this release. - # 1.0.3 - Fix [#928](https://github.com/quilljs/quill/issues/928) Thank you [@scottmessinger](https://github.com/scottmessinger) for the bug report. - # 1.0.2 - Fix building quill.core.js [docs #11](https://github.com/quilljs/quilljs.github.io/issues/11) @@ -316,17 +343,14 @@ Thank you [@scottmessinger](https://github.com/scottmessinger) for the bug repor Thanks to [@eamodio](https://github.com/eamodio) and [@neandrake](https://github.com/neandrake) for their contributions to this release. - # 1.0.0 Quill 1.0 is released! Read the [official announcement](https://quilljs.com/blog/announcing-quill-1-0/). - # 1.0.0-rc.4 Fix one important bug [fdd920](https://github.com/quilljs/quill/commit/fdd920250c05403ed9e5d6d86826a00167ba0b09) - # 1.0.0-rc.3 A few bug fixes, one with with possibly significant implications. See the [issue #889](https://github.com/quilljs/quill/issues/889) and [commit fix](https://github.com/quilljs/quill/commit/be24c62a6234818548658fcb5e1935a0c07b4eb7) for more details. @@ -342,7 +366,6 @@ A few bug fixes, one with with possibly significant implications. See the [issue Thank you [@benbro](https://github.com/benbro), [@cgilboy](https://github.com/cgilboy), [@cutteroid](https://github.com/cutteroid), and [@routman](https://github.com/routman) for contributions to this release! - # 1.0.0-rc.2 A few bug fixes, including one significant [one](https://github.com/quilljs/quill/issues/883) @@ -355,7 +378,6 @@ A few bug fixes, including one significant [one](https://github.com/quilljs/quil Thanks to [benbro](https://github.com/benbro), [cutteroid](https://github.com/cutteroid), and [CapTec](https://github.com/CapTec) for their contributions to this release. - # 1.0.0-rc.1 A few bug fixes and performance improvements. @@ -375,7 +397,6 @@ A few bug fixes and performance improvements. Thank you [@benbro](https://github.com/benbro), [@fernandogmar](https://github.com/fernandogmar), [@sachinrekhi](https://github.com/sachinrekhi), [@sferoze](https://github.com/sferoze), and [@stalniy](https://github.com/stalniy) for contributions to this release! - # 1.0.0-rc.0 Take a look at [Quill 1.0 Release Candidate](https://quilljs.com/blog/quill-1-0-release-candidate-released/) for more details. @@ -428,7 +449,6 @@ A huge thank you to all contributors to through the beta! Special thanks goes to - [@u9520107](https://github.com/u9520107) - [@WriterStat](https://github.com/WriterStat) - # 1.0.0-beta.11 Fixed some regressive bugs from previous release. @@ -441,7 +461,6 @@ Fixed some regressive bugs from previous release. Thanks [benbro](https://github.com/benbro), [jackmu95](https://github.com/jackmu95), and [george-norris-salesforce](https://github.com/george-norris-salesforce) for the bug reports. - # 1.0.0-beta.10 Lots of bug fixes and performance improvements. @@ -471,7 +490,6 @@ Lots of bug fixes and performance improvements. Thanks to [benbro](https://github.com/benbro), [clemmy](https://github.com/clemmy), [crisbeto](https://github.com/crisbeto), [cutteroid](https://github.com/cutteroid), [jackmu95](https://github.com/jackmu95), [kylebragger](https://github.com/kylebragger), [sachinrekhi](https://github.com/sachinrekhi), [stalniy](https://github.com/stalniy), and [tOgg1](https://github.com/tOgg1) for their contributions to this release. - # 1.0.0-beta.9 Potentially the final beta before a release candidate, if no major issues are discovered. @@ -497,7 +515,6 @@ Potentially the final beta before a release candidate, if no major issues are di Thank you [@benbro](https://github.com/benbro), [@KameSama](https://github.com/KameSama), and [@sachinrekhi](https://github.com/sachinrekhi) for contributions to this release! - # 1.0.0-beta.8 Weekly beta preview release. The editor is almost ready for release candidacy but a couple cycles will be spent on the Snow and Bubble interfaces. @@ -528,12 +545,10 @@ Image insertion is being reworked in the provided Snow and Bubble themes. The ol Thanks to [benbro](https://github.com/benbro), [bram2w](https://github.com/bram2w), [clemmy](https://github.com/clemmy), [DadaMonad](https://github.com/DadaMonad), [ersommer](https://github.com/ersommer), [michaeljosephrosenthal](https://github.com/michaeljosephrosenthal), [mmorearty](https://github.com/mmorearty), [mshamaiev-intel471](https://github.com/mshamaiev-intel471), and [sachinrekhi](https://github.com/sachinrekhi) for their contributions to this release. - # 1.0.0-beta.7 Became 1.0.0-beta.8 with a fix. - # 1.0.0-beta.6 Weekly beta preview release. @@ -557,7 +572,6 @@ Weekly beta preview release. Thank you [abejdaniels](https://github.com/abejdaniels), [benbro](https://github.com/benbro), [davelozier](https://github.com/davelozier), [fernandogmar](https://github.com/fernandogmar), [KameSama](https://github.com/KameSama), and [WriterStat](https://github.com/WriterStat) for contributions to this release. - # 1.0.0-beta.5 Weekly beta preview release. @@ -576,7 +590,6 @@ Weekly beta preview release. Thanks to [benbro](https://github.com/benbro), [lukechapman](https://github.com/lukechapman), [sachinrekhi](https://github.com/sachinrekhi), and [saw](https://github.com/saw) for their contributions to this release. - # 1.0.0-beta.4 Weekly beta preview release. @@ -604,7 +617,6 @@ Weekly beta preview release. Thank you [@benbro](https://github.com/benbro), [@brynjagr](https://github.com/brynjagr), and [@sachinrekhi](https://github.com/sachinrekhi) for contributions to this release. - # 1.0.0-beta.3 Weekly beta preview release. @@ -634,7 +646,6 @@ Weekly beta preview release. Thanks to [@benbro](https://github.com/benbro), [@Cinamonas](https://github.com/Cinamonas), [@emanuelbsilva](https://github.com/emanuelbsilva), [@jasonmng](https://github.com/jasonmng), [@jonnolen](https://github.com/jonnolen), [@LucVanPelt](https://github.com/LucVanPelt), [@sachinrekhi](https://github.com/sachinrekhi), [@sagacitysite](https://github.com/sagacitysite), [@WriterStat](https://github.com/WriterStat) for their contributions to this release. - # 1.0.0-beta.2 Weekly beta preview release. Major emphasis on keyboard API and customization. @@ -665,7 +676,6 @@ Weekly beta preview release. Major emphasis on keyboard API and customization. Thanks to [@anovi](https://github.com/anovi), [@benbro](https://github.com/benbro), [@jbrowning](https://github.com/jbrowning), [@kei-ito](https://github.com/kei-ito), [@quentez](https://github.com/quentez), [@u9520107](https://github.com/u9520107) for their contributions to this release! - # 1.0.0-beta.1 Weekly beta preview release. @@ -693,12 +703,10 @@ Weekly beta preview release. Thanks to [@benbro](https://github.com/benbro) for the bug reports for this release! - # 1.0.0-beta.0 Please see the [Upgrading to 1.0](http://beta.quilljs.com/guides/upgrading-to-1-0/) guide. - # 0.20.1 Patch release for everything prior to Parchment's integration into Quill. @@ -717,18 +725,20 @@ Patch release for everything prior to Parchment's integration into Quill. Thanks to [@devtimi](https://github.com/devtimi), [@emannes](https://github.com/emannes), [@ivan-i](https://github.com/ivan-i), [@magus](https://github.com/magus), [@Nick-The-Uncharted](https://github.com/Nick-The-Uncharted), [@rlivsey](https://github.com/rlivsey), [@thomsbg](https://github.com/thomsbg), [@wallylawless](https://github.com/wallylawless) for their bug reports and pull requests! - # 0.20.0 ### Breaking Changes + - `getBounds` now returns `null` instead of throwing an error [#412](https://github.com/quilljs/quill/pull/412) ### Features + - Allow `Document` module to be `Quill.require`'d [#400](https://github.com/quilljs/quill/pull/400) - Paste manager can optionally accept a custom conversion function [#401](https://github.com/quilljs/quill/pull/401) - Undo manager can optionally only affect user initiated changes [#413](https://github.com/quilljs/quill/pull/413) ### Bug Fixes + - Retain formats between lines [#403](https://github.com/quilljs/quill/pull/403) - Fix bug that allows nested format tags [#406](https://github.com/quilljs/quill/pull/406) - Flatten nested list instead of truncating on paste [#421](https://github.com/quilljs/quill/issues/421) From d945925fb15a83415ff0b1f162f0b644994f2282 Mon Sep 17 00:00:00 2001 From: Zihua Li Date: Fri, 1 Dec 2023 13:55:24 +0800 Subject: [PATCH 02/17] Update CHANGELOG.md Co-authored-by: Scott Kingsley Clark --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80c2bd6c74..7262891e06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,7 +68,7 @@ Thanks to [@berylw](https://github.com/berylw) and [@erinsinger93](https://githu # 1.3.5 - Fix indent preservation of a checked checklist item [#1818](https://github.com/quilljs/quill/issues/1818) -- - added as a shortcut to trigger bullet list formatting [#1819](https://github.com/quilljs/quill/pull/1819) +- Added the asterisk "*" character as a shortcut to trigger bullet list formatting [#1819](https://github.com/quilljs/quill/pull/1819) - Fix pasting text-align styles [#1873](https://github.com/quilljs/quill/issues/1873) - Fix cursor position after dangerouslyPasteHTML [#1886](https://github.com/quilljs/quill/issues/1886) - Fix value of history stack in text-change handler [#1906](https://github.com/quilljs/quill/pull/1906) From 41e09d6272fa2a2c199b15293a1a0e702bd64443 Mon Sep 17 00:00:00 2001 From: Zihua Li Date: Fri, 1 Dec 2023 18:07:28 +0800 Subject: [PATCH 03/17] Update version number in CHANGELOG --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7262891e06..3d6ea4327b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 2.0.0-dev.1 ~ 2.0.0-dev.4 +# Next (2.0) In the 2.0 release, Quill has been significantly modernized. Leveraging the latest browser-supported APIs, Quill now delivers a more efficient and reliable editing experience. @@ -68,7 +68,7 @@ Thanks to [@berylw](https://github.com/berylw) and [@erinsinger93](https://githu # 1.3.5 - Fix indent preservation of a checked checklist item [#1818](https://github.com/quilljs/quill/issues/1818) -- Added the asterisk "*" character as a shortcut to trigger bullet list formatting [#1819](https://github.com/quilljs/quill/pull/1819) +- Added the asterisk "\*" character as a shortcut to trigger bullet list formatting [#1819](https://github.com/quilljs/quill/pull/1819) - Fix pasting text-align styles [#1873](https://github.com/quilljs/quill/issues/1873) - Fix cursor position after dangerouslyPasteHTML [#1886](https://github.com/quilljs/quill/issues/1886) - Fix value of history stack in text-change handler [#1906](https://github.com/quilljs/quill/pull/1906) From 5cfc2e2bd57bd96e24daba482e7cf9e4990ced76 Mon Sep 17 00:00:00 2001 From: Zihua Li Date: Wed, 6 Dec 2023 21:28:13 +0800 Subject: [PATCH 04/17] Set up npm package --- CHANGELOG.md | 4 +- package-lock.json | 325 +----------------- packages/quill/package.json | 5 +- packages/quill/scripts/build | 4 +- packages/quill/src/themes/base.ts | 5 +- .../quill/{custom.d.ts => src/types.d.ts} | 2 +- packages/quill/tsconfig.json | 4 +- packages/quill/webpack.common.ts | 2 +- packages/website/package.json | 2 +- 9 files changed, 19 insertions(+), 334 deletions(-) rename packages/quill/{custom.d.ts => src/types.d.ts} (67%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d6ea4327b..ee4897871e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ -# Next (2.0) +# v2.0.0-dev.4 -In the 2.0 release, Quill has been significantly modernized. Leveraging the latest browser-supported APIs, Quill now delivers a more efficient and reliable editing experience. +In the upcoming 2.0 release, Quill has been significantly modernized. Leveraging the latest browser-supported APIs, Quill now delivers a more efficient and reliable editing experience. ### Major Improvements diff --git a/package-lock.json b/package-lock.json index fd032a0bda..008aae40f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3053,96 +3053,6 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==" }, - "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/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", @@ -4615,16 +4525,6 @@ "@parcel/core": "^2.6.2" } }, - "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/@pkgr/utils": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", @@ -9652,12 +9552,6 @@ "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==" }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -11375,34 +11269,6 @@ "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.3", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz", @@ -13633,28 +13499,6 @@ "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==", "dev": true }, - "node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", - "dev": true, - "dependencies": { - "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": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -13671,30 +13515,6 @@ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" }, - "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": { - "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": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/global-dirs": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", @@ -15658,24 +15478,6 @@ "set-function-name": "^2.0.1" } }, - "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/javascript-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.1.0.tgz", @@ -16111,8 +15913,7 @@ "node_modules/lodash-es": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", - "dev": true + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" }, "node_modules/lodash.clonedeep": { "version": "4.5.0", @@ -17404,15 +17205,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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/mitt": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mitt/-/mitt-1.2.0.tgz", @@ -18619,31 +18411,6 @@ "node": ">=0.10.0" } }, - "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-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -22187,27 +21954,6 @@ "node": ">=8" } }, - "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/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -22315,19 +22061,6 @@ "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", @@ -25045,57 +24778,6 @@ "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/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -25480,6 +25162,7 @@ "license": "BSD-3-Clause", "dependencies": { "eventemitter3": "^4.0.7", + "lodash-es": "^4.17.21", "parchment": "^3.0.0-alpha.1", "quill-delta": "^5.1.0" }, @@ -25503,12 +25186,10 @@ "eslint-plugin-import": "^2.29.0", "eslint-plugin-jsx-a11y": "^6.8.0", "eslint-plugin-prettier": "^5.0.1", - "glob": "^10.3.10", "highlight.js": "^9.18.1", "html-loader": "^4.2.0", "html-webpack-plugin": "^5.5.3", "jsdom": "^22.1.0", - "lodash-es": "^4.17.21", "mini-css-extract-plugin": "^2.7.6", "prettier": "^3.0.3", "style-loader": "^3.3.3", @@ -25530,7 +25211,7 @@ } }, "packages/website": { - "version": "1.0.0", + "version": "2.0.0-dev.4", "license": "BSD-3-Clause", "dependencies": { "@mdx-js/mdx": "^2.1.5", diff --git a/packages/quill/package.json b/packages/quill/package.json index 83a311bc92..d4a3fce3ac 100644 --- a/packages/quill/package.json +++ b/packages/quill/package.json @@ -4,9 +4,10 @@ "description": "Your powerful, rich text editor", "author": "Jason Chen ", "homepage": "https://quilljs.com", - "main": "dist/quill.js", + "main": "quill.js", "dependencies": { "eventemitter3": "^4.0.7", + "lodash-es": "^4.17.21", "parchment": "^3.0.0-alpha.1", "quill-delta": "^5.1.0" }, @@ -30,12 +31,10 @@ "eslint-plugin-import": "^2.29.0", "eslint-plugin-jsx-a11y": "^6.8.0", "eslint-plugin-prettier": "^5.0.1", - "glob": "^10.3.10", "highlight.js": "^9.18.1", "html-loader": "^4.2.0", "html-webpack-plugin": "^5.5.3", "jsdom": "^22.1.0", - "lodash-es": "^4.17.21", "mini-css-extract-plugin": "^2.7.6", "prettier": "^3.0.3", "style-loader": "^3.3.3", diff --git a/packages/quill/scripts/build b/packages/quill/scripts/build index b4e22f7640..6c6d15e650 100755 --- a/packages/quill/scripts/build +++ b/packages/quill/scripts/build @@ -5,5 +5,7 @@ set -e DIST=dist rm -rf $DIST -npx babel src --out-dir $DIST --copy-files --no-copy-ignored --extensions .ts +npx tsc --declaration --emitDeclarationOnly --outDir $DIST +npx babel src --out-dir $DIST --copy-files --no-copy-ignored --extensions .ts --source-maps npx webpack -- --mode $1 +cp package.json $DIST diff --git a/packages/quill/src/themes/base.ts b/packages/quill/src/themes/base.ts index bf1621a86b..8d7edf63b8 100644 --- a/packages/quill/src/themes/base.ts +++ b/packages/quill/src/themes/base.ts @@ -110,7 +110,7 @@ class BaseTheme extends Theme { buildButtons( buttons: NodeListOf, - icons: Record>, + icons: Record | string>, ) { Array.from(buttons).forEach((button) => { const className = button.getAttribute('class') || ''; @@ -119,6 +119,7 @@ class BaseTheme extends Theme { name = name.slice('ql-'.length); if (icons[name] == null) return; if (name === 'direction') { + // @ts-expect-error button.innerHTML = icons[name][''] + icons[name].rtl; } else if (typeof icons[name] === 'string') { // @ts-expect-error @@ -126,7 +127,9 @@ class BaseTheme extends Theme { } else { // @ts-expect-error const value = button.value || ''; + // @ts-expect-error if (value != null && icons[name][value]) { + // @ts-expect-error button.innerHTML = icons[name][value]; } } diff --git a/packages/quill/custom.d.ts b/packages/quill/src/types.d.ts similarity index 67% rename from packages/quill/custom.d.ts rename to packages/quill/src/types.d.ts index 091d25e210..cdb2b1a9a2 100644 --- a/packages/quill/custom.d.ts +++ b/packages/quill/src/types.d.ts @@ -1,4 +1,4 @@ declare module '*.svg' { - const content: any; + const content: string; export default content; } diff --git a/packages/quill/tsconfig.json b/packages/quill/tsconfig.json index c162f66222..3fe707cb26 100644 --- a/packages/quill/tsconfig.json +++ b/packages/quill/tsconfig.json @@ -6,6 +6,7 @@ } }, "compilerOptions": { + "outDir": "./dist", "allowSyntheticDefaultImports": true, "target": "ES2020", "sourceMap": true, @@ -13,10 +14,9 @@ "declaration": false, "module": "ES2020", "moduleResolution": "node", - "noEmit": true, "strictNullChecks": true, "noImplicitAny": true, "noUnusedLocals": true }, - "include": ["./**/*"] + "include": ["src/**/*"] } diff --git a/packages/quill/webpack.common.ts b/packages/quill/webpack.common.ts index c167201b8c..1651870bde 100644 --- a/packages/quill/webpack.common.ts +++ b/packages/quill/webpack.common.ts @@ -42,7 +42,7 @@ export default { type: 'umd', export: 'default', }, - path: resolve(__dirname, 'dist/dist'), + path: resolve(__dirname, 'dist/umd'), clean: true, }, resolve: { diff --git a/packages/website/package.json b/packages/website/package.json index 8d0dfb0506..b72cc92eaa 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "0.0.0", + "version": "2.0.0-dev.4", "description": "Quill official website", "private": true, "main": "gatsby-browser.js", From bb52d80c3235bacd8c3a4aaa3259355fb2ba9ba5 Mon Sep 17 00:00:00 2001 From: Zihua Li Date: Thu, 7 Dec 2023 14:35:46 +0800 Subject: [PATCH 05/17] Consolidate build command --- packages/quill/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/quill/package.json b/packages/quill/package.json index d4a3fce3ac..68dfd72db5 100644 --- a/packages/quill/package.json +++ b/packages/quill/package.json @@ -67,8 +67,7 @@ "defaults" ], "scripts": { - "build:dev": "./scripts/build development", - "build:prod": "./scripts/build production", + "build": "./scripts/build production", "lint": "run-s lint:*", "lint:eslint": "eslint .", "lint:tsc": "tsc --noEmit --skipLibCheck", From 090c764d17eab8a3d19bb55bef3ebbe602b1c2c3 Mon Sep 17 00:00:00 2001 From: Zihua Li Date: Thu, 7 Dec 2023 16:50:51 +0800 Subject: [PATCH 06/17] Update license date --- LICENSE | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/LICENSE b/LICENSE index 71ee486bf1..3f69de2db8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2017, Slab +Copyright (c) 2017-2023, Slab Copyright (c) 2014, Jason Chen Copyright (c) 2013, salesforce.com All rights reserved. @@ -8,15 +8,15 @@ modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. + notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From 5251c7b186c4f4a3c12930074499287fd8c6208f Mon Sep 17 00:00:00 2001 From: Zihua Li Date: Thu, 7 Dec 2023 17:22:36 +0800 Subject: [PATCH 07/17] Setup source code version replacements --- package-lock.json | 14 ++++++++++++++ packages/quill/babel.config.cts | 3 +++ packages/quill/package.json | 1 + packages/quill/src/core/quill.ts | 4 +--- packages/quill/src/types.d.ts | 2 ++ packages/quill/webpack.common.ts | 5 ----- packages/quill/webpack.config.ts | 3 ++- 7 files changed, 23 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 008aae40f5..5f544c0886 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6999,6 +6999,19 @@ "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz", "integrity": "sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ==" }, + "node_modules/babel-plugin-transform-define": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-define/-/babel-plugin-transform-define-2.1.4.tgz", + "integrity": "sha512-NN9xFmyNvr4swPZkRWy+RZZoV0yHhPk/WoxpuIvcVkTyYf0xy/JTQeZVbVGX8hyJ0/NKKuxnt4BZz9No7BziVA==", + "dev": true, + "dependencies": { + "lodash": "^4.17.11", + "traverse": "0.6.6" + }, + "engines": { + "node": ">= 8.x.x" + } + }, "node_modules/babel-plugin-transform-react-remove-prop-types": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz", @@ -25179,6 +25192,7 @@ "@typescript-eslint/parser": "^6.12.0", "@vitest/browser": "^1.0.0-beta.5", "babel-loader": "^9.1.3", + "babel-plugin-transform-define": "^2.1.4", "css-loader": "^6.8.1", "eslint": "^8.54.0", "eslint-config-prettier": "^9.0.0", diff --git a/packages/quill/babel.config.cts b/packages/quill/babel.config.cts index f3cc3b97f3..103d3c502a 100644 --- a/packages/quill/babel.config.cts +++ b/packages/quill/babel.config.cts @@ -1,3 +1,6 @@ +import { version } from './package.json'; + export default { presets: ['@babel/preset-env', '@babel/preset-typescript'], + plugins: [['transform-define', { QUILL_VERSION: version }]], }; diff --git a/packages/quill/package.json b/packages/quill/package.json index 68dfd72db5..f9d409bc90 100644 --- a/packages/quill/package.json +++ b/packages/quill/package.json @@ -24,6 +24,7 @@ "@typescript-eslint/parser": "^6.12.0", "@vitest/browser": "^1.0.0-beta.5", "babel-loader": "^9.1.3", + "babel-plugin-transform-define": "^2.1.4", "css-loader": "^6.8.1", "eslint": "^8.54.0", "eslint-config-prettier": "^9.0.0", diff --git a/packages/quill/src/core/quill.ts b/packages/quill/src/core/quill.ts index f005594e98..be14f4a78b 100644 --- a/packages/quill/src/core/quill.ts +++ b/packages/quill/src/core/quill.ts @@ -60,9 +60,7 @@ class Quill { }; static events = Emitter.events; static sources = Emitter.sources; - // eslint-disable-next-line no-undef - // @ts-expect-error defined in webpack - static version = typeof QUILL_VERSION === 'undefined' ? 'dev' : QUILL_VERSION; + static version = QUILL_VERSION; static imports: Record = { delta: Delta, diff --git a/packages/quill/src/types.d.ts b/packages/quill/src/types.d.ts index cdb2b1a9a2..98f8d3518d 100644 --- a/packages/quill/src/types.d.ts +++ b/packages/quill/src/types.d.ts @@ -2,3 +2,5 @@ declare module '*.svg' { const content: string; export default content; } + +declare const QUILL_VERSION: string | undefined; diff --git a/packages/quill/webpack.common.ts b/packages/quill/webpack.common.ts index 1651870bde..fa641cf740 100644 --- a/packages/quill/webpack.common.ts +++ b/packages/quill/webpack.common.ts @@ -50,11 +50,6 @@ export default { }, module: { rules: [tsRules, stylRules, svgRules], - noParse: [ - /\/node_modules\/clone\/clone\.js$/, - /\/node_modules\/eventemitter3\/index\.js$/, - /\/node_modules\/extend\/index\.js$/, - ], }, plugins: [ new MiniCssExtractPlugin({ diff --git a/packages/quill/webpack.config.ts b/packages/quill/webpack.config.ts index 7134bedf64..6815baecf1 100644 --- a/packages/quill/webpack.config.ts +++ b/packages/quill/webpack.config.ts @@ -9,7 +9,8 @@ import 'webpack-dev-server'; const bannerPack = new BannerPlugin({ banner: [ `Quill Editor v${pkg.version}`, - 'https://quilljs.com/', + pkg.homepage, + `Copyright (c) 2017-${new Date().getFullYear()}, Slab`, 'Copyright (c) 2014, Jason Chen', 'Copyright (c) 2013, salesforce.com', ].join('\n'), From 1e21d8c5f1d5a67ef20892b727e2024861fb77bc Mon Sep 17 00:00:00 2001 From: Zihua Li Date: Thu, 7 Dec 2023 19:50:05 +0800 Subject: [PATCH 08/17] Remove unused tsconfig --- packages/quill/tsconfig.npm.json | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 packages/quill/tsconfig.npm.json diff --git a/packages/quill/tsconfig.npm.json b/packages/quill/tsconfig.npm.json deleted file mode 100644 index ea3d42ecb5..0000000000 --- a/packages/quill/tsconfig.npm.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "target": "ES6", - "noEmit": false, - "module": "ES6" - }, - "include": ["src/**/*"], - "exclude": ["*.config.*"] -} From 32771fa5a64489646ce6c53e9224d1350a080e3b Mon Sep 17 00:00:00 2001 From: Zihua Li Date: Thu, 7 Dec 2023 20:20:21 +0800 Subject: [PATCH 09/17] Update website project --- packages/quill/tsconfig.json | 2 +- packages/website/gatsby-config.js | 54 +++--- packages/website/gatsby-node.js | 46 ++--- packages/website/package.json | 1 + packages/website/src/components/Default.jsx | 35 ++-- packages/website/src/data/api.js | 55 ------ packages/website/src/data/docs.js | 88 ---------- packages/website/src/data/guides.js | 40 ----- packages/website/src/templates/doc.jsx | 53 +++--- .../website/src/templates/doc.module.scss | 32 ++++ packages/website/static/assets/css/styles.css | 161 +++++++----------- .../static/assets/fonts/sailec-bold.woff2 | Bin 0 -> 29234 bytes .../static/assets/fonts/sailec-light.woff2 | Bin 0 -> 28840 bytes .../website/static/assets/fonts/sailec.woff2 | Bin 0 -> 29516 bytes .../static/assets/fonts/sofia-pro-bold.woff2 | Bin 0 -> 42983 bytes .../static/assets/fonts/sofia-pro.woff2 | Bin 0 -> 43740 bytes 16 files changed, 192 insertions(+), 375 deletions(-) delete mode 100644 packages/website/src/data/api.js delete mode 100644 packages/website/src/data/docs.js delete mode 100644 packages/website/src/data/guides.js create mode 100644 packages/website/src/templates/doc.module.scss create mode 100755 packages/website/static/assets/fonts/sailec-bold.woff2 create mode 100755 packages/website/static/assets/fonts/sailec-light.woff2 create mode 100755 packages/website/static/assets/fonts/sailec.woff2 create mode 100755 packages/website/static/assets/fonts/sofia-pro-bold.woff2 create mode 100755 packages/website/static/assets/fonts/sofia-pro.woff2 diff --git a/packages/quill/tsconfig.json b/packages/quill/tsconfig.json index 3fe707cb26..56d25da51c 100644 --- a/packages/quill/tsconfig.json +++ b/packages/quill/tsconfig.json @@ -18,5 +18,5 @@ "noImplicitAny": true, "noUnusedLocals": true }, - "include": ["src/**/*"] + "include": ["src/**/*", "*.ts"] } diff --git a/packages/website/gatsby-config.js b/packages/website/gatsby-config.js index 616508c06d..aef82b2706 100644 --- a/packages/website/gatsby-config.js +++ b/packages/website/gatsby-config.js @@ -1,17 +1,23 @@ +const { version, homepage } = require("./package.json"); + +// https://cdn.jsdelivr.net/npm/quill@1.0.0/umd/quill.js const siteMetadata = { - version: '1.3.6', - cdn: process.env.USE_LOCAL_FILE ? '/' : '//cdn.quilljs.com/', - github: 'https://github.com/quilljs/quill/tree/develop/website/content', - quill: process.env.USE_LOCAL_FILE ? 'quill.js' : 'quill.min.js', - highlightjs: '//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0', - katex: '//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1', - url: 'https://quilljs.com', - title: 'Quill - Your powerful rich text editor', - shortTitle: 'Quill Rich Text Editor', + version, + cdn: process.env.USE_LOCAL_FILE + ? "/" + : `//cdn.jsdelivr.net/npm/quill@${version}/umd/`, + github: + "https://github.com/quilljs/quill/tree/develop/packages/website/content", + quill: process.env.USE_LOCAL_FILE ? "quill.js" : "quill.js", + highlightjs: "//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0", + katex: "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1", + url: pkg.homepage, + title: "Quill - Your powerful rich text editor", + shortTitle: "Quill Rich Text Editor", description: - 'Quill is a free, open source WYSIWYG editor built for the modern web. Completely customize it for any need with its modular architecture and expressive API.', + "Quill is a free, open source WYSIWYG editor built for the modern web. Completely customize it for any need with its modular architecture and expressive API.", shortDescription: - 'Quill is a free, open source rich text editor built for the modern web.', + "Quill is a free, open source rich text editor built for the modern web.", }; const config = { @@ -19,15 +25,15 @@ const config = { graphqlTypegen: true, plugins: [ { - resolve: 'gatsby-plugin-google-analytics', + resolve: "gatsby-plugin-google-analytics", options: { - trackingId: 'UA-19077541-2', + trackingId: "UA-19077541-2", head: true, }, }, - 'gatsby-plugin-sass', + "gatsby-plugin-sass", { - resolve: 'gatsby-plugin-react-svg', + resolve: "gatsby-plugin-react-svg", options: { rule: { include: /svg/, @@ -35,15 +41,15 @@ const config = { }, }, { - resolve: 'gatsby-source-filesystem', - options: { name: 'content', path: `${__dirname}/content` }, + resolve: "gatsby-source-filesystem", + options: { name: "content", path: `${__dirname}/content` }, }, { - resolve: 'gatsby-plugin-mdx', + resolve: "gatsby-plugin-mdx", options: { gatsbyRemarkPlugins: [ { - resolve: 'gatsby-remark-find-replace', + resolve: "gatsby-remark-find-replace", options: { replacements: Object.keys(siteMetadata).reduce((acc, key) => { acc[`{{site.${key}}}`] = siteMetadata[key]; @@ -100,9 +106,9 @@ const config = { } } `, - output: '/feed.xml', + output: "/feed.xml", title: siteMetadata.title, - match: '^/blog/', + match: "^/blog/", }, ], }, @@ -112,12 +118,12 @@ const config = { if (process.env.USE_LOCAL_FILE) { config.developMiddleware = (app) => { - const httpProxy = require('http-proxy'); + const httpProxy = require("http-proxy"); const proxy = httpProxy.createProxyServer({}); if (!process.env.npm_package_config_ports_webpack) { throw new Error( - 'config.ports.webpack should be provided when USE_LOCAL_FILE is enabled.', + "config.ports.webpack should be provided when USE_LOCAL_FILE is enabled." ); } @@ -125,7 +131,7 @@ if (process.env.USE_LOCAL_FILE) { if (/\/\d+\.\d+\.\d+/.test(req.url)) { const target = `http://localhost:${ process.env.npm_package_config_ports_webpack - }/${req.url.split('/').pop()}`; + }/${req.url.split("/").pop()}`; proxy.web(req, res, { ignorePath: true, target, diff --git a/packages/website/gatsby-node.js b/packages/website/gatsby-node.js index 57b2dc7060..f4502ca635 100644 --- a/packages/website/gatsby-node.js +++ b/packages/website/gatsby-node.js @@ -1,15 +1,15 @@ const path = require(`path`); -const { siteMetadata } = require('./gatsby-config'); -const runtime = require('react/jsx-runtime'); -const { compileMDX } = require('gatsby-plugin-mdx'); -const { renderToStaticMarkup } = require('react-dom/server'); +const { siteMetadata } = require("./gatsby-config"); +const runtime = require("react/jsx-runtime"); +const { compileMDX } = require("gatsby-plugin-mdx"); +const { renderToStaticMarkup } = require("react-dom/server"); // https://github.com/gatsbyjs/gatsby/issues/28657 exports.onCreateBabelConfig = ({ actions }) => { actions.setBabelPreset({ - name: 'babel-preset-gatsby', + name: "babel-preset-gatsby", options: { - reactRuntime: 'automatic', + reactRuntime: "automatic", }, }); }; @@ -19,20 +19,20 @@ exports.onCreateNode = async ({ node, actions, getNode, reporter, cache }) => { if (node.internal.type !== `Mdx`) return; const filePath = node.internal.contentFilePath; - let pageType = 'unknown'; - if (filePath.startsWith(path.resolve('content/guides'))) { - pageType = 'guide'; - } else if (filePath.startsWith(path.resolve('content/docs'))) { - pageType = 'doc'; - } else if (filePath.startsWith(path.resolve('content/blog'))) { - pageType = 'blog'; - } else if (filePath.startsWith(path.resolve('content/standalone'))) { - pageType = 'standalone'; + let pageType = "unknown"; + if (filePath.startsWith(path.resolve("content/guides"))) { + pageType = "guide"; + } else if (filePath.startsWith(path.resolve("content/docs"))) { + pageType = "docs"; + } else if (filePath.startsWith(path.resolve("content/blog"))) { + pageType = "blog"; + } else if (filePath.startsWith(path.resolve("content/standalone"))) { + pageType = "standalone"; } - const relativePath = path.relative(path.resolve('content'), filePath); + const relativePath = path.relative(path.resolve("content"), filePath); const extension = path.extname(filePath); - const slug = relativePath.replace(extension, ''); + const slug = relativePath.replace(extension, ""); createNodeField({ node, name: `pageType`, @@ -50,10 +50,10 @@ exports.onCreateNode = async ({ node, actions, getNode, reporter, cache }) => { }); const fileNode = getNode(node.parent); - if (fileNode && pageType === 'blog') { + if (fileNode && pageType === "blog") { const result = await compileMDX( { - source: node.body.split('{/* more */}')[0], + source: node.body.split("{/* more */}")[0], path: node.internal.contentFilePath, }, { @@ -63,10 +63,10 @@ exports.onCreateNode = async ({ node, actions, getNode, reporter, cache }) => { // Add any custom options or plugins here }, cache, - reporter, + reporter ); if (result && result.processedMDX) { - const { run } = await import('@mdx-js/mdx'); + const { run } = await import("@mdx-js/mdx"); const args = { ...runtime, }; @@ -89,7 +89,7 @@ exports.createPages = ({ graphql, actions }) => { blog: path.resolve(`src/templates/post.jsx`), standalone: path.resolve(`src/templates/standalone.jsx`), guide: docTemplate, - doc: docTemplate, + docs: docTemplate, }; return graphql( ` @@ -114,7 +114,7 @@ exports.createPages = ({ graphql, actions }) => { } } `, - { limit: 1000 }, + { limit: 1000 } ).then((result) => { if (result.errors) { throw result.errors; diff --git a/packages/website/package.json b/packages/website/package.json index b72cc92eaa..2782ead748 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -4,6 +4,7 @@ "description": "Quill official website", "private": true, "main": "gatsby-browser.js", + "homepage": "https://quilljs.com", "keywords": [], "license": "BSD-3-Clause", "scripts": { diff --git a/packages/website/src/components/Default.jsx b/packages/website/src/components/Default.jsx index cc4ff2d6f8..95c7872cfc 100644 --- a/packages/website/src/components/Default.jsx +++ b/packages/website/src/components/Default.jsx @@ -1,9 +1,9 @@ -import classNames from 'classnames'; -import { graphql, useStaticQuery } from 'gatsby'; -import { useState } from 'react'; -import Helmet from 'react-helmet'; -import LogoIcon from '../svg/logo.svg'; -import GitHub from './GitHub'; +import classNames from "classnames"; +import { graphql, useStaticQuery } from "gatsby"; +import { useState } from "react"; +import Helmet from "react-helmet"; +import LogoIcon from "../svg/logo.svg"; +import GitHub from "./GitHub"; const Default = ({ children, pageType }) => { const [isNavOpen, setIsNavOpen] = useState(false); @@ -18,13 +18,14 @@ const Default = ({ children, pageType }) => { } `); + console.log({ pageType }); return ( <>
-