Merge branch 'develop' into annotations
This commit is contained in:
commit
b33a739f54
1392 changed files with 11722 additions and 8413 deletions
|
@ -22,7 +22,7 @@
|
|||
</a><a
|
||||
href="#contributors-"
|
||||
title="All Contributors"
|
||||
><img src="https://img.shields.io/badge/all_contributors-103-pink.svg"
|
||||
><img src="https://img.shields.io/badge/all_contributors-106-pink.svg"
|
||||
alt="All Contributors"/>
|
||||
</a></p><p align='center'><a
|
||||
href="https://twitter.com/freesewing_org"
|
||||
|
@ -172,115 +172,120 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Chantalbijoux"><img src="https://avatars.githubusercontent.com/u/39673694?v=4?s=100" width="100px;" alt="Chantal Lapointe"/><br /><sub><b>Chantal Lapointe</b></sub></a><br /><a href="#translation-Chantalbijoux" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dpiquet"><img src="https://avatars.githubusercontent.com/u/4688628?v=4?s=100" width="100px;" alt="Damien PIQUET"/><br /><sub><b>Damien PIQUET</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=dpiquet" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.darigovresearch.com/"><img src="https://avatars.githubusercontent.com/u/30328618?v=4?s=100" width="100px;" alt="Darigov Research"/><br /><sub><b>Darigov Research</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=darigovresearch" title="Documentation">📖</a> <a href="#ideas-darigovresearch" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/clegganator259"><img src="https://avatars.githubusercontent.com/u/3974250?v=4?s=100" width="100px;" alt="David Clegg"/><br /><sub><b>David Clegg</b></sub></a><br /><a href="#design-clegganator259" title="Design">🎨</a> <a href="https://github.com/freesewing/freesewing/commits?author=clegganator259" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ElenaFdR"><img src="https://avatars.githubusercontent.com/u/5113815?v=4?s=100" width="100px;" alt="Elena FdR"/><br /><sub><b>Elena FdR</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=ElenaFdR" title="Documentation">📖</a> <a href="#blog-ElenaFdR" title="Blogposts">📝</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://emmanuelnyachoke.com/"><img src="https://avatars.githubusercontent.com/u/1908926?v=4?s=100" width="100px;" alt="Emmanuel Nyachoke"/><br /><sub><b>Emmanuel Nyachoke</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=enyachoke" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=enyachoke" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://enochriese.com"><img src="https://avatars.githubusercontent.com/u/5298929?v=4?s=100" width="100px;" alt="Enoch Riese"/><br /><sub><b>Enoch Riese</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=eriese" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/EvEkSwed"><img src="https://avatars.githubusercontent.com/u/39723451?v=4?s=100" width="100px;" alt="EvEkSwed"/><br /><sub><b>EvEkSwed</b></sub></a><br /><a href="#translation-EvEkSwed" title="Translation">🌍</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/EvEkSwed"><img src="https://avatars.githubusercontent.com/u/39723451?v=4?s=100" width="100px;" alt="EvEkSwed"/><br /><sub><b>EvEkSwed</b></sub></a><br /><a href="#translation-EvEkSwed" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Fantastik-Maman"><img src="https://avatars.githubusercontent.com/u/39785382?v=4?s=100" width="100px;" alt="Fantastik-Maman"/><br /><sub><b>Fantastik-Maman</b></sub></a><br /><a href="#translation-Fantastik-Maman" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.forresto.com/"><img src="https://avatars.githubusercontent.com/u/395307?v=4?s=100" width="100px;" alt="Forrest O."/><br /><sub><b>Forrest O.</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=forresto" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/fmatray"><img src="https://avatars.githubusercontent.com/u/8267716?v=4?s=100" width="100px;" alt="Frédéric"/><br /><sub><b>Frédéric</b></sub></a><br /><a href="#translation-fmatray" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/glennfmatthews/"><img src="https://avatars.githubusercontent.com/u/5603551?v=4?s=100" width="100px;" alt="Glenn Matthews"/><br /><sub><b>Glenn Matthews</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=glennmatthews" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://greg.technology/"><img src="https://avatars.githubusercontent.com/u/1017304?v=4?s=100" width="100px;" alt="Greg Sadetsky"/><br /><sub><b>Greg Sadetsky</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=gregsadetsky" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://kirby.zone"><img src="https://avatars.githubusercontent.com/u/75245963?v=4?s=100" width="100px;" alt="Igor Couto"/><br /><sub><b>Igor Couto</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3Aiocouto" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://bandism.net/"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt="Ikko Ashimine"/><br /><sub><b>Ikko Ashimine</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=eltociear" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://bandism.net/"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt="Ikko Ashimine"/><br /><sub><b>Ikko Ashimine</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=eltociear" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Irapeke"><img src="https://avatars.githubusercontent.com/u/39604334?v=4?s=100" width="100px;" alt="Irapeke"/><br /><sub><b>Irapeke</b></sub></a><br /><a href="#translation-Irapeke" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jsawo"><img src="https://avatars.githubusercontent.com/u/1294706?v=4?s=100" width="100px;" alt="Jacek Sawoszczuk"/><br /><sub><b>Jacek Sawoszczuk</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jsawo" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jgfichte"><img src="https://avatars.githubusercontent.com/u/1787162?v=4?s=100" width="100px;" alt="Jason Williams"/><br /><sub><b>Jason Williams</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jgfichte" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jejacks0n"><img src="https://avatars.githubusercontent.com/u/13765?v=4?s=100" width="100px;" alt="Jeremy Jackson"/><br /><sub><b>Jeremy Jackson</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jejacks0n" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://jeroenhoek.nl"><img src="https://avatars.githubusercontent.com/u/683699?v=4?s=100" width="100px;" alt="Jeroen Hoek"/><br /><sub><b>Jeroen Hoek</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jdhoek" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/joeschofield0"><img src="https://avatars.githubusercontent.com/u/47668691?v=4?s=100" width="100px;" alt="Joe Schofield"/><br /><sub><b>Joe Schofield</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=joeschofield0" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Joebidido"><img src="https://avatars.githubusercontent.com/u/39796210?v=4?s=100" width="100px;" alt="Joebidido"/><br /><sub><b>Joebidido</b></sub></a><br /><a href="#translation-Joebidido" title="Translation">🌍</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Joebidido"><img src="https://avatars.githubusercontent.com/u/39796210?v=4?s=100" width="100px;" alt="Joebidido"/><br /><sub><b>Joebidido</b></sub></a><br /><a href="#translation-Joebidido" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://joost.at/"><img src="https://avatars.githubusercontent.com/u/1708494?v=4?s=100" width="100px;" alt="Joost De Cock"/><br /><sub><b>Joost De Cock</b></sub></a><br /><a href="#maintenance-joostdecock" title="Maintenance">🚧</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/joshessman"><img src="https://avatars.githubusercontent.com/u/9941074?v=4?s=100" width="100px;" alt="Josh Essman"/><br /><sub><b>Josh Essman</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=joshessman" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.earth.li/~kake/"><img src="https://avatars.githubusercontent.com/u/1956810?v=4?s=100" width="100px;" alt="Kake"/><br /><sub><b>Kake</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=KakeLP" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/kapunahele"><img src="https://avatars.githubusercontent.com/u/4116963?v=4?s=100" width="100px;" alt="Kapunahele Wong"/><br /><sub><b>Kapunahele Wong</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=kapunahelewong" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tangerineshark"><img src="https://avatars.githubusercontent.com/u/70777269?v=4?s=100" width="100px;" alt="Karen"/><br /><sub><b>Karen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=tangerineshark" title="Documentation">📖</a> <a href="#eventOrganizing-tangerineshark" title="Event Organizing">📋</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mcgnly"><img src="https://avatars.githubusercontent.com/u/5653631?v=4?s=100" width="100px;" alt="Katie McGinley"/><br /><sub><b>Katie McGinley</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=mcgnly" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.kieranklaassen.com/"><img src="https://avatars.githubusercontent.com/u/209089?v=4?s=100" width="100px;" alt="Kieran Klaassen"/><br /><sub><b>Kieran Klaassen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=kieranklaassen" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.kieranklaassen.com/"><img src="https://avatars.githubusercontent.com/u/209089?v=4?s=100" width="100px;" alt="Kieran Klaassen"/><br /><sub><b>Kieran Klaassen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=kieranklaassen" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Kittycatou"><img src="https://avatars.githubusercontent.com/u/48165583?v=4?s=100" width="100px;" alt="Kittycatou"/><br /><sub><b>Kittycatou</b></sub></a><br /><a href="#translation-Kittycatou" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.krishoward.org/"><img src="https://avatars.githubusercontent.com/u/5946286?v=4?s=100" width="100px;" alt="Kris"/><br /><sub><b>Kris</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=web-goddess" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kristinruben"><img src="https://avatars.githubusercontent.com/u/17237479?v=4?s=100" width="100px;" alt="Kristin Ruben"/><br /><sub><b>Kristin Ruben</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=kristinruben" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Loudepeuter"><img src="https://avatars.githubusercontent.com/u/38081954?v=4?s=100" width="100px;" alt="Loudepeuter"/><br /><sub><b>Loudepeuter</b></sub></a><br /><a href="#translation-Loudepeuter" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lucibytes"><img src="https://avatars.githubusercontent.com/u/77203781?v=4?s=100" width="100px;" alt="Lucian"/><br /><sub><b>Lucian</b></sub></a><br /><a href="#eventOrganizing-lucibytes" title="Event Organizing">📋</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MA-TATAS"><img src="https://avatars.githubusercontent.com/u/125549564?v=4?s=100" width="100px;" alt="MA-TATAS"/><br /><sub><b>MA-TATAS</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=MA-TATAS" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/manufakturedelweiss"><img src="https://avatars.githubusercontent.com/u/38063391?v=4?s=100" width="100px;" alt="Marcus"/><br /><sub><b>Marcus</b></sub></a><br /><a href="#translation-manufakturedelweiss" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/luizfzs"><img src="https://avatars.githubusercontent.com/u/6039675?v=4?s=100" width="100px;" alt="Luiz Saggioro"/><br /><sub><b>Luiz Saggioro</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=luizfzs" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MA-TATAS"><img src="https://avatars.githubusercontent.com/u/125549564?v=4?s=100" width="100px;" alt="MA-TATAS"/><br /><sub><b>MA-TATAS</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=MA-TATAS" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/manufakturedelweiss"><img src="https://avatars.githubusercontent.com/u/38063391?v=4?s=100" width="100px;" alt="Marcus"/><br /><sub><b>Marcus</b></sub></a><br /><a href="#translation-manufakturedelweiss" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/martintribo"><img src="https://avatars.githubusercontent.com/u/1613442?v=4?s=100" width="100px;" alt="Martin Tribo"/><br /><sub><b>Martin Tribo</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=martintribo" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nadege"><img src="https://avatars.githubusercontent.com/u/3792171?v=4?s=100" width="100px;" alt="Nadege Michel"/><br /><sub><b>Nadege Michel</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nadege" title="Tests">⚠️</a> <a href="https://github.com/freesewing/freesewing/commits?author=nadege" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nataliasayang"><img src="https://avatars.githubusercontent.com/u/48160791?v=4?s=100" width="100px;" alt="Natalia"/><br /><sub><b>Natalia</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nataliasayang" title="Code">💻</a> <a href="#design-nataliasayang" title="Design">🎨</a> <a href="#blog-nataliasayang" title="Blogposts">📝</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://yergler.net/"><img src="https://avatars.githubusercontent.com/u/510875?v=4?s=100" width="100px;" alt="Nathan Yergler"/><br /><sub><b>Nathan Yergler</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nyergler" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nicholasdower"><img src="https://avatars.githubusercontent.com/u/9117775?v=4?s=100" width="100px;" alt="Nick Dower"/><br /><sub><b>Nick Dower</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nicholasdower" title="Documentation">📖</a> <a href="https://github.com/freesewing/freesewing/commits?author=nicholasdower" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/issues?q=author%3Anicholasdower" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nchilada"><img src="https://avatars.githubusercontent.com/u/692925?v=4?s=100" width="100px;" alt="Nikhil Chelliah"/><br /><sub><b>Nikhil Chelliah</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nchilada" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/OysteinHoiby"><img src="https://avatars.githubusercontent.com/u/49735055?v=4?s=100" width="100px;" alt="OysteinHoiby"/><br /><sub><b>OysteinHoiby</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=OysteinHoiby" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nchilada"><img src="https://avatars.githubusercontent.com/u/692925?v=4?s=100" width="100px;" alt="Nikhil Chelliah"/><br /><sub><b>Nikhil Chelliah</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nchilada" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/OysteinHoiby"><img src="https://avatars.githubusercontent.com/u/49735055?v=4?s=100" width="100px;" alt="OysteinHoiby"/><br /><sub><b>OysteinHoiby</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=OysteinHoiby" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://pat.forringer.com/"><img src="https://avatars.githubusercontent.com/u/136456?v=4?s=100" width="100px;" alt="Patrick Forringer"/><br /><sub><b>Patrick Forringer</b></sub></a><br /><a href="#plugin-destos" title="Plugin/utility libraries">🔌</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://pd75.github.io/"><img src="https://avatars.githubusercontent.com/u/10294795?v=4?s=100" width="100px;" alt="Paul"/><br /><sub><b>Paul</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=PD75" title="Documentation">📖</a> <a href="#blog-PD75" title="Blogposts">📝</a> <a href="#translation-PD75" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/phillipthelen"><img src="https://avatars.githubusercontent.com/u/298062?v=4?s=100" width="100px;" alt="Phillip Thelen"/><br /><sub><b>Phillip Thelen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=phillipthelen" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Pixieish"><img src="https://avatars.githubusercontent.com/u/32991415?v=4?s=100" width="100px;" alt="Pixieish"/><br /><sub><b>Pixieish</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=Pixieish" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.uza.be/persoon/prof-dr-sorcha-ni-dhubhghaill"><img src="https://avatars.githubusercontent.com/u/30624634?v=4?s=100" width="100px;" alt="Prof. dr. Sorcha Ní Dhubhghaill"/><br /><sub><b>Prof. dr. Sorcha Ní Dhubhghaill</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=sorchanidhubhghaill" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/QuentinFelix"><img src="https://avatars.githubusercontent.com/u/5288091?v=4?s=100" width="100px;" alt="Quentin FELIX"/><br /><sub><b>Quentin FELIX</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=QuentinFelix" title="Code">💻</a> <a href="#design-QuentinFelix" title="Design">🎨</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RikHekker"><img src="https://avatars.githubusercontent.com/u/31843274?v=4?s=100" width="100px;" alt="Rik Hekker"/><br /><sub><b>Rik Hekker</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3ARikHekker" title="Bug reports">🐛</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/QuentinFelix"><img src="https://avatars.githubusercontent.com/u/5288091?v=4?s=100" width="100px;" alt="Quentin FELIX"/><br /><sub><b>Quentin FELIX</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=QuentinFelix" title="Code">💻</a> <a href="#design-QuentinFelix" title="Design">🎨</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RikHekker"><img src="https://avatars.githubusercontent.com/u/31843274?v=4?s=100" width="100px;" alt="Rik Hekker"/><br /><sub><b>Rik Hekker</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3ARikHekker" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://resume.livingston-gray.com/faq.html"><img src="https://avatars.githubusercontent.com/u/6462?v=4?s=100" width="100px;" alt="Sam Livingston-Gray"/><br /><sub><b>Sam Livingston-Gray</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=geeksam" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sannek"><img src="https://avatars.githubusercontent.com/u/17491062?v=4?s=100" width="100px;" alt="Sanne"/><br /><sub><b>Sanne</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=sannek" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=sannek" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Tyrannogina"><img src="https://avatars.githubusercontent.com/u/19556565?v=4?s=100" width="100px;" alt="Sara Latorre"/><br /><sub><b>Sara Latorre</b></sub></a><br /><a href="#translation-Tyrannogina" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SeaZeeZee"><img src="https://avatars.githubusercontent.com/u/86711383?v=4?s=100" width="100px;" alt="SeaZeeZee"/><br /><sub><b>SeaZeeZee</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=SeaZeeZee" title="Documentation">📖</a> <a href="https://github.com/freesewing/freesewing/commits?author=SeaZeeZee" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SimonbJohnson"><img src="https://avatars.githubusercontent.com/u/2110742?v=4?s=100" width="100px;" alt="SimonbJohnson"/><br /><sub><b>SimonbJohnson</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3ASimonbJohnson" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SirCharlotte"><img src="https://avatars.githubusercontent.com/u/63847870?v=4?s=100" width="100px;" alt="SirCharlotte"/><br /><sub><b>SirCharlotte</b></sub></a><br /><a href="#translation-SirCharlotte" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.instagram.com/celine_mge/"><img src="https://avatars.githubusercontent.com/u/57619777?v=4?s=100" width="100px;" alt="Slylele"/><br /><sub><b>Slylele</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=Slylele" title="Documentation">📖</a> <a href="#translation-Slylele" title="Translation">🌍</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SirCharlotte"><img src="https://avatars.githubusercontent.com/u/63847870?v=4?s=100" width="100px;" alt="SirCharlotte"/><br /><sub><b>SirCharlotte</b></sub></a><br /><a href="#translation-SirCharlotte" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://www.instagram.com/celine_mge/"><img src="https://avatars.githubusercontent.com/u/57619777?v=4?s=100" width="100px;" alt="Slylele"/><br /><sub><b>Slylele</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=Slylele" title="Documentation">📖</a> <a href="#translation-Slylele" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Soazillon"><img src="https://avatars.githubusercontent.com/u/40845940?v=4?s=100" width="100px;" alt="Soazillon"/><br /><sub><b>Soazillon</b></sub></a><br /><a href="#translation-Soazillon" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SoneaTheBest"><img src="https://avatars.githubusercontent.com/u/64635425?v=4?s=100" width="100px;" alt="SoneaTheBest"/><br /><sub><b>SoneaTheBest</b></sub></a><br /><a href="#translation-SoneaTheBest" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://metafly.info/"><img src="https://avatars.githubusercontent.com/u/961256?v=4?s=100" width="100px;" alt="Stefan Sydow"/><br /><sub><b>Stefan Sydow</b></sub></a><br /><a href="#translation-stsydow" title="Translation">🌍</a> <a href="https://github.com/freesewing/freesewing/commits?author=stsydow" title="Documentation">📖</a> <a href="https://github.com/freesewing/freesewing/commits?author=stsydow" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TriploidTree"><img src="https://avatars.githubusercontent.com/u/4170521?v=4?s=100" width="100px;" alt="Tríona"/><br /><sub><b>Tríona</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=TriploidTree" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/theUnmutual"><img src="https://avatars.githubusercontent.com/u/22374635?v=4?s=100" width="100px;" alt="Unmutual"/><br /><sub><b>Unmutual</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=theUnmutual" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/woutervdub"><img src="https://avatars.githubusercontent.com/u/24414629?v=4?s=100" width="100px;" alt="Wouter van Wageningen"/><br /><sub><b>Wouter van Wageningen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=woutervdub" title="Code">💻</a> <a href="#design-woutervdub" title="Design">🎨</a> <a href="#tool-woutervdub" title="Tools">🔧</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/amysews"><img src="https://avatars.githubusercontent.com/u/25280778?v=4?s=100" width="100px;" alt="amysews"/><br /><sub><b>amysews</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=amysews" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/woutervdub"><img src="https://avatars.githubusercontent.com/u/24414629?v=4?s=100" width="100px;" alt="Wouter van Wageningen"/><br /><sub><b>Wouter van Wageningen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=woutervdub" title="Code">💻</a> <a href="#design-woutervdub" title="Design">🎨</a> <a href="#tool-woutervdub" title="Tools">🔧</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/amysews"><img src="https://avatars.githubusercontent.com/u/25280778?v=4?s=100" width="100px;" alt="amysews"/><br /><sub><b>amysews</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=amysews" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/anna-puk"><img src="https://avatars.githubusercontent.com/u/100537439?v=4?s=100" width="100px;" alt="anna-puk"/><br /><sub><b>anna-puk</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=anna-puk" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/beautifulsummermoon"><img src="https://avatars.githubusercontent.com/u/40396388?v=4?s=100" width="100px;" alt="beautifulsummermoon"/><br /><sub><b>beautifulsummermoon</b></sub></a><br /><a href="#translation-beautifulsummermoon" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/berce"><img src="https://avatars.githubusercontent.com/u/10439709?v=4?s=100" width="100px;" alt="berce"/><br /><sub><b>berce</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=berce" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/biou"><img src="https://avatars.githubusercontent.com/u/1340376?v=4?s=100" width="100px;" alt="biou"/><br /><sub><b>biou</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=biou" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bobgeorgethe3rd"><img src="https://avatars.githubusercontent.com/u/16866285?v=4?s=100" width="100px;" alt="bobgeorgethe3rd"/><br /><sub><b>bobgeorgethe3rd</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=bobgeorgethe3rd" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=bobgeorgethe3rd" title="Documentation">📖</a> <a href="#design-bobgeorgethe3rd" title="Design">🎨</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/brmlyklr"><img src="https://avatars.githubusercontent.com/u/22308713?v=4?s=100" width="100px;" alt="brmlyklr"/><br /><sub><b>brmlyklr</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=brmlyklr" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.chrisbarrett.fr"><img src="https://avatars.githubusercontent.com/u/2373249?v=4?s=100" width="100px;" alt="chri5b"/><br /><sub><b>chri5b</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=chri5b" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=chri5b" title="Tests">⚠️</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/brmlyklr"><img src="https://avatars.githubusercontent.com/u/22308713?v=4?s=100" width="100px;" alt="brmlyklr"/><br /><sub><b>brmlyklr</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=brmlyklr" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://www.chrisbarrett.fr"><img src="https://avatars.githubusercontent.com/u/2373249?v=4?s=100" width="100px;" alt="chri5b"/><br /><sub><b>chri5b</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=chri5b" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=chri5b" title="Tests">⚠️</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dingcycle"><img src="https://avatars.githubusercontent.com/u/1681985?v=4?s=100" width="100px;" alt="dingcycle"/><br /><sub><b>dingcycle</b></sub></a><br /><a href="#translation-dingcycle" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/drowned-in-books"><img src="https://avatars.githubusercontent.com/u/100040772?v=4?s=100" width="100px;" alt="drowned-in-books"/><br /><sub><b>drowned-in-books</b></sub></a><br /><a href="#question-drowned-in-books" title="Answering Questions">💬</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/econo202"><img src="https://avatars.githubusercontent.com/u/34138153?v=4?s=100" width="100px;" alt="econo202"/><br /><sub><b>econo202</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=econo202" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ericamattos"><img src="https://avatars.githubusercontent.com/u/4341417?v=4?s=100" width="100px;" alt="ericamattos"/><br /><sub><b>ericamattos</b></sub></a><br /><a href="#translation-ericamattos" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/fightingrabbit"><img src="https://avatars.githubusercontent.com/u/25751445?v=4?s=100" width="100px;" alt="fightingrabbit"/><br /><sub><b>fightingrabbit</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=fightingrabbit" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/DocSpencer77"><img src="https://avatars.githubusercontent.com/u/43393580?v=4?s=100" width="100px;" alt="gaylyndie"/><br /><sub><b>gaylyndie</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=DocSpencer77" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/grimlokason"><img src="https://avatars.githubusercontent.com/u/5112238?v=4?s=100" width="100px;" alt="grimlokason"/><br /><sub><b>grimlokason</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=grimlokason" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/DocSpencer77"><img src="https://avatars.githubusercontent.com/u/43393580?v=4?s=100" width="100px;" alt="gaylyndie"/><br /><sub><b>gaylyndie</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=DocSpencer77" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/grimlokason"><img src="https://avatars.githubusercontent.com/u/5112238?v=4?s=100" width="100px;" alt="grimlokason"/><br /><sub><b>grimlokason</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=grimlokason" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://weblog.redisdead.net"><img src="https://avatars.githubusercontent.com/u/6494414?v=4?s=100" width="100px;" alt="hellgy"/><br /><sub><b>hellgy</b></sub></a><br /><a href="#design-hellgy" title="Design">🎨</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jackseye"><img src="https://avatars.githubusercontent.com/u/27834526?v=4?s=100" width="100px;" alt="jackseye"/><br /><sub><b>jackseye</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jackseye" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/marckiesel"><img src="https://avatars.githubusercontent.com/u/39653780?v=4?s=100" width="100px;" alt="marckiesel"/><br /><sub><b>marckiesel</b></sub></a><br /><a href="#translation-marckiesel" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://tech.lgbt/@mergerg"><img src="https://avatars.githubusercontent.com/u/64447714?v=4?s=100" width="100px;" alt="mergerg"/><br /><sub><b>mergerg</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=raphaelsiz" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Mesil"><img src="https://avatars.githubusercontent.com/u/14284175?v=4?s=100" width="100px;" alt="mesil"/><br /><sub><b>mesil</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3Amesil" title="Bug reports">🐛</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/starfetch"><img src="https://avatars.githubusercontent.com/u/80041179?v=4?s=100" width="100px;" alt="starfetch"/><br /><sub><b>starfetch</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=starfetch" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=starfetch" title="Documentation">📖</a> <a href="#translation-starfetch" title="Translation">🌍</a> <a href="#design-starfetch" title="Design">🎨</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/timorl"><img src="https://avatars.githubusercontent.com/u/4363804?v=4?s=100" width="100px;" alt="timorl"/><br /><sub><b>timorl</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=timorl" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ttimearl"><img src="https://avatars.githubusercontent.com/u/77916590?v=4?s=100" width="100px;" alt="ttimearl"/><br /><sub><b>ttimearl</b></sub></a><br /><a href="#content-ttimearl" title="Content">🖋</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/chrisgloom"><img src="https://avatars.githubusercontent.com/u/15905991?v=4?s=100" width="100px;" alt="tuesgloomsday"/><br /><sub><b>tuesgloomsday</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=chrisgloom" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/valadaptive"><img src="https://avatars.githubusercontent.com/u/79560998?v=4?s=100" width="100px;" alt="valadaptive"/><br /><sub><b>valadaptive</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=valadaptive" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/viocky"><img src="https://avatars.githubusercontent.com/u/39279173?v=4?s=100" width="100px;" alt="viocky"/><br /><sub><b>viocky</b></sub></a><br /><a href="#translation-viocky" title="Translation">🌍</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/woolishboy"><img src="https://avatars.githubusercontent.com/u/57816321?v=4?s=100" width="100px;" alt="woolishboy"/><br /><sub><b>woolishboy</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=woolishboy" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cloutiy"><img src="https://avatars.githubusercontent.com/u/8433147?v=4?s=100" width="100px;" alt="yc"/><br /><sub><b>yc</b></sub></a><br /><a href="#translation-cloutiy" title="Translation">🌍</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// This file is auto-generated | All changes you make will be overwritten.
|
||||
export const name = '@freesewing/core'
|
||||
export const version = '3.0.0-alpha.4'
|
||||
export const version = '3.0.0-alpha.8'
|
||||
export const data = { name, version }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@freesewing/core",
|
||||
"version": "3.0.0-alpha.4",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"description": "A library for creating made-to-measure sewing patterns",
|
||||
"author": "Joost De Cock <joost@joost.at> (https://github.com/joostdecock)",
|
||||
"homepage": "https://freesewing.org/",
|
||||
|
@ -50,7 +50,7 @@
|
|||
},
|
||||
"peerDependencies": {},
|
||||
"dependencies": {
|
||||
"bezier-js": "6.1.0",
|
||||
"bezier-js": "6.1.3",
|
||||
"bin-pack-with-constraints": "1.0.1",
|
||||
"hooks": "0.3.2",
|
||||
"lodash.get": "4.4.2",
|
||||
|
@ -59,9 +59,9 @@
|
|||
"lodash.clonedeep": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "8.34.0",
|
||||
"eslint": "8.38.0",
|
||||
"nyc": "15.1.0",
|
||||
"mocha": "10.0.0",
|
||||
"mocha": "10.2.0",
|
||||
"chai": "4.2.0",
|
||||
"sinon": "^15.0.1"
|
||||
},
|
||||
|
|
|
@ -7,6 +7,7 @@ import { Point } from './point.mjs'
|
|||
import { Path } from './path.mjs'
|
||||
import { Snippet } from './snippet.mjs'
|
||||
import { Store } from './store.mjs'
|
||||
import { hidePresets } from './pattern-config.mjs'
|
||||
import {
|
||||
beamIntersectsCircle,
|
||||
beamIntersectsX,
|
||||
|
@ -47,6 +48,8 @@ export {
|
|||
Store,
|
||||
version,
|
||||
Bezier,
|
||||
//consts
|
||||
hidePresets,
|
||||
// Utils
|
||||
beamIntersectsCircle,
|
||||
beamIntersectsX,
|
||||
|
|
|
@ -135,15 +135,6 @@ Part.prototype.shorthand = function () {
|
|||
utils: utils,
|
||||
Bezier: Bezier,
|
||||
}
|
||||
// Add top-level store methods and add a part name parameter
|
||||
const partName = this.name
|
||||
for (const [key, method] of Object.entries(this.context.store)) {
|
||||
if (typeof method === 'function')
|
||||
shorthand[key] = function (...args) {
|
||||
return method(partName, ...args)
|
||||
}
|
||||
}
|
||||
|
||||
// We'll need this
|
||||
let self = this
|
||||
|
||||
|
|
|
@ -192,7 +192,8 @@ Path.prototype.clean = function () {
|
|||
|
||||
if (ops.length < this.ops.length) this.ops = ops
|
||||
|
||||
return this
|
||||
// A path with not drawing operations or only a move is not path at all
|
||||
return ops.length === 0 || (ops.length === 1 && ops[0].type === 'move') ? false : this
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1310,7 +1311,10 @@ function __pathOffset(path, distance) {
|
|||
{ x: cp2.x, y: cp2.y },
|
||||
{ x: op.to.x, y: op.to.y }
|
||||
)
|
||||
for (let bezier of b.offset(distance)) offset.push(__asPath(bezier, path.log))
|
||||
for (let bezier of b.offset(distance)) {
|
||||
const segment = __asPath(bezier, path.log)
|
||||
if (segment) offset.push(segment)
|
||||
}
|
||||
} else if (op.type === 'close') closed = true
|
||||
if (op.to) current = op.to
|
||||
if (!start) start = current
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
import { __addNonEnumProp } from './utils.mjs'
|
||||
|
||||
export const hidePresets = {
|
||||
HIDE_ALL: {
|
||||
self: true,
|
||||
from: true,
|
||||
after: true,
|
||||
inherited: true,
|
||||
},
|
||||
HIDE_TREE: {
|
||||
from: true,
|
||||
inherited: true,
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name of the given plugin config
|
||||
*
|
||||
|
@ -46,12 +59,16 @@ export function PatternConfig(pattern) {
|
|||
__addNonEnumProp(this, '__mutated', {
|
||||
optionDistance: {},
|
||||
partDistance: {},
|
||||
hideDistance: {},
|
||||
})
|
||||
|
||||
/** @type {Object} tracking for dependency hiding */
|
||||
__addNonEnumProp(this, '__hiding', {
|
||||
all: {},
|
||||
deps: {},
|
||||
from: {},
|
||||
after: {},
|
||||
inherited: {},
|
||||
always: {},
|
||||
never: {},
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -133,14 +150,15 @@ PatternConfig.prototype.asConfig = function () {
|
|||
PatternConfig.prototype.__addPart = function (depChain) {
|
||||
// the current part is the head of the chain
|
||||
const part = depChain[0]
|
||||
// the longer the chain, the deeper the part is down it
|
||||
const distance = depChain.length
|
||||
|
||||
// only process a part that hasn't already been processed
|
||||
if (!this.parts[part.name]) this.parts[part.name] = Object.freeze(part)
|
||||
else return
|
||||
|
||||
// if it hasn't been registered with a distance, do that now
|
||||
if (typeof this.__mutated.partDistance[part.name] === 'undefined') {
|
||||
this.__mutated.partDistance[part.name] = distance
|
||||
// the longer the chain, the deeper the part is down it
|
||||
this.__mutated.partDistance[part.name] = depChain.length
|
||||
|
||||
if (DISTANCE_DEBUG)
|
||||
this.store.log.debug(
|
||||
|
@ -149,11 +167,7 @@ PatternConfig.prototype.__addPart = function (depChain) {
|
|||
}
|
||||
|
||||
// Handle various hiding possibilities
|
||||
if (part.hide || part.hideAll) this.partHide[part.name] = true
|
||||
if (part.hideDependencies) this.__hiding.deps[part.name] = true
|
||||
if (part.hideAll) {
|
||||
this.__hiding.all[part.name] = true
|
||||
}
|
||||
this.__resolvePartHiding(part)
|
||||
|
||||
// resolve its dependencies
|
||||
this.__resolvePartDependencies(depChain)
|
||||
|
@ -188,7 +202,7 @@ PatternConfig.prototype.__addPartOptions = function (part) {
|
|||
if (!part.options) return this
|
||||
|
||||
// get the part's option priority
|
||||
const partDistance = this.__mutated.partDistance?.[part.name] || 0
|
||||
const partDistance = this.__mutated.partDistance?.[part.name]
|
||||
|
||||
// loop through options
|
||||
for (const optionName in part.options) {
|
||||
|
@ -325,7 +339,60 @@ PatternConfig.prototype.__addPartPlugins = function (part) {
|
|||
|
||||
// the two types of dependencies
|
||||
const depTypes = ['from', 'after']
|
||||
// the two lists of special istructions
|
||||
const exceptionTypes = ['never', 'always']
|
||||
/**
|
||||
* Resolve the hiding configuration of this part
|
||||
* This method does not hide dependencies,
|
||||
* but it does hide or unhide parts listed in `never` and `always` in the config
|
||||
* according to this part's options priority
|
||||
* @param {Part} part the part whose config should be resolved
|
||||
* @private
|
||||
*/
|
||||
PatternConfig.prototype.__resolvePartHiding = function (part) {
|
||||
// get the config
|
||||
let hide = part.hide
|
||||
// if it's a string, get the preset by that name
|
||||
if (typeof hide === 'string') hide = hidePresets[hide]
|
||||
// no config, nothing to do
|
||||
if (!hide) return
|
||||
|
||||
// get the part's option priority
|
||||
const partDistance = this.__mutated.partDistance?.[part.name]
|
||||
// get the current distances that dictate if this part should never or always be hidden
|
||||
const neverDistance = this.__hiding.never[part.name] || Infinity
|
||||
const alwaysDistance = this.__hiding.always[part.name] || Infinity
|
||||
|
||||
// if the part is configured to hide, and it takes priority over other instructions, hide it
|
||||
if (hide.self && (neverDistance > partDistance || alwaysDistance <= neverDistance))
|
||||
this.partHide[part.name] = true
|
||||
|
||||
// for each exception list, starting with never
|
||||
exceptionTypes.forEach((e, i) => {
|
||||
// if there are instructions for this list
|
||||
if (hide[e]) {
|
||||
// each part in the list
|
||||
hide[e].forEach((p) => {
|
||||
// get the current distance of a call to never or always hide this part
|
||||
const otherDistance = this.__hiding[exceptionTypes[Math.abs(i - 1)]][p] || Infinity
|
||||
|
||||
// if a current command is less important than this one,
|
||||
if (otherDistance > partDistance) {
|
||||
const thisDistance = this.__hiding[e][p] || Infinity
|
||||
// record the new priority
|
||||
this.__hiding[e][p] = Math.min(thisDistance, partDistance)
|
||||
// hide or show the part
|
||||
this.partHide[p] = i == 1
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// add the dependency hiding instructions if they haven't already been set
|
||||
depTypes.concat('inherited').forEach((k) => {
|
||||
if (this.__hiding[k][part.name] === undefined) this.__hiding[k][part.name] = hide[k]
|
||||
})
|
||||
}
|
||||
/**
|
||||
* Recursively register part dependencies
|
||||
* triggers {@link __addPart} on new parts found during resolution
|
||||
|
@ -364,9 +431,11 @@ PatternConfig.prototype.__resolvePartDependencies = function (depChain) {
|
|||
this.__addPart([dot, ...depChain])
|
||||
} else {
|
||||
// if it's already registered, recursion won't happen, but we still need to add its resolved dependencies to all parts in the chain
|
||||
this.resolvedDependencies[dot.name].forEach((r) => {
|
||||
depChain.forEach((c) => this.__addDependency('resolvedDependencies', c.name, r))
|
||||
})
|
||||
// this.resolvedDependencies[dot.name].forEach((r) => {
|
||||
// depChain.forEach((c) => this.__resolvePartDependencies('resolvedDependencies', c.name, r))
|
||||
// })
|
||||
this.__resolvePartDependencies([dot, ...depChain])
|
||||
// and check for stricter hiding policies
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -399,14 +468,24 @@ PatternConfig.prototype.__addDependency = function (dependencyList, partName, de
|
|||
* @private
|
||||
*/
|
||||
PatternConfig.prototype.__handlePartDependencyOfType = function (part, depName, depType) {
|
||||
switch (depType) {
|
||||
case 'from':
|
||||
this.__setFromHide(part, depName)
|
||||
this.inject[part.name] = depName
|
||||
break
|
||||
case 'after':
|
||||
this.__setAfterHide(part, depName)
|
||||
// if this dependency should be hidden based on dependency type, and doesn't already have an instruction, hide it
|
||||
if (this.__hiding[depType][part.name] === true && this.partHide[depName] === undefined) {
|
||||
this.partHide[depName] = true
|
||||
}
|
||||
|
||||
// get the part's inherited hide instructions
|
||||
const hideInherited = this.__hiding.inherited[part.name]
|
||||
// for from dependencies
|
||||
if (depType === 'from') {
|
||||
// inject the dependency into the part
|
||||
this.inject[part.name] = depName
|
||||
// hide after dependencies if inherited dependencies should hide
|
||||
this.__hiding.after[depName] = hideInherited
|
||||
}
|
||||
|
||||
// for all depependency types, from and inherited are dictated by the dependendent part's policy
|
||||
this.__hiding.from[depName] = hideInherited
|
||||
this.__hiding.inherited[depName] = hideInherited
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -455,42 +534,3 @@ PatternConfig.prototype.__resolveDraftOrder = function () {
|
|||
|
||||
return this.__draftOrder
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets visibility of a 'from' dependency based on its config
|
||||
*
|
||||
* @private
|
||||
* @param {Part} part - The part of which this is a dependency
|
||||
* @param {string} depName - The name of the dependency
|
||||
* @return {Pattern} this - The Pattern instance
|
||||
*/
|
||||
PatternConfig.prototype.__setFromHide = function (part, depName) {
|
||||
if (this.__hiding.deps[part.name]) {
|
||||
this.partHide[depName] = true
|
||||
this.__hiding.deps[depName] = true
|
||||
}
|
||||
if (this.__hiding.all[part.name]) {
|
||||
this.partHide[depName] = true
|
||||
this.__hiding.all[depName] = true
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets visibility of an 'after' dependency based on its config
|
||||
*
|
||||
* @private
|
||||
* @param {Part} part - The part of which this is a dependency
|
||||
* @param {string} depName - The name of the dependency
|
||||
* @param {int} set - The index of the set in the list of settings
|
||||
* @return {Pattern} this - The Pattern instance
|
||||
*/
|
||||
PatternConfig.prototype.__setAfterHide = function (part, depName) {
|
||||
if (this.__hiding.all[part.name]) {
|
||||
this.partHide[depName] = true
|
||||
this.__hiding.all[depName] = true
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
|
|
@ -160,9 +160,13 @@ Pattern.prototype.createPartForSet = function (partName, set = 0) {
|
|||
Pattern.prototype.draftPartForSet = function (partName, set) {
|
||||
if (typeof this.config.parts?.[partName]?.draft === 'function') {
|
||||
this.activePart = partName
|
||||
this.setStores[set].set('activePart', partName)
|
||||
try {
|
||||
this.__runHooks('prePartDraft')
|
||||
const result = this.config.parts[partName].draft(this.parts[set][partName].shorthand())
|
||||
if (!this.__wants(partName, set)) {
|
||||
result.hide()
|
||||
}
|
||||
this.__runHooks('postPartDraft')
|
||||
if (typeof result === 'undefined') {
|
||||
this.setStores[set].log.error(
|
||||
|
|
|
@ -814,191 +814,6 @@ describe('Pattern', () => {
|
|||
expect(count).to.equal(2)
|
||||
})
|
||||
|
||||
describe('Hiding parts', () => {
|
||||
const blankDraft = ({ part }) => part
|
||||
const afterPart = {
|
||||
name: 'afterPart',
|
||||
draft: blankDraft,
|
||||
}
|
||||
const fromPart = {
|
||||
name: 'fromPart',
|
||||
draft: blankDraft,
|
||||
}
|
||||
describe('{hide: true}', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
hide: true,
|
||||
draft: blankDraft,
|
||||
}
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [mainPart],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('Should hide the part', () => {
|
||||
expect(pattern.__isPartHidden('mainPart')).to.be.true
|
||||
})
|
||||
|
||||
it("Should not hide the part's dependencies", () => {
|
||||
expect(pattern.__isPartHidden('fromPart')).to.be.false
|
||||
expect(pattern.__isPartHidden('afterPart')).to.be.false
|
||||
})
|
||||
|
||||
describe('Nested Parts', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const grandChild = {
|
||||
name: 'grandChild',
|
||||
from: mainPart,
|
||||
hide: true,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [grandChild],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('should not hide nested `from` dependencies', () => {
|
||||
expect(pattern.__isPartHidden('fromPart')).to.be.false
|
||||
expect(pattern.__isPartHidden('mainPart')).to.be.false
|
||||
})
|
||||
|
||||
it('should not hide nested `after` dependencies', () => {
|
||||
expect(pattern.__isPartHidden('afterPart')).to.be.false
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('{hideDependencies: true}', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
hideDependencies: true,
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [mainPart],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('Should not hide the part', () => {
|
||||
expect(pattern.__isPartHidden('mainPart')).to.be.false
|
||||
})
|
||||
it("Should hide the part's `from` dependencies", () => {
|
||||
expect(pattern.__isPartHidden('fromPart')).to.be.true
|
||||
})
|
||||
it("Should not hide the part's `after` dependencies", () => {
|
||||
expect(pattern.__isPartHidden('afterPart')).to.be.false
|
||||
})
|
||||
|
||||
describe('Nested Parts', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const grandChild = {
|
||||
name: 'grandChild',
|
||||
from: mainPart,
|
||||
hideDependencies: true,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [grandChild],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('should hide nested `from` dependencies', () => {
|
||||
expect(pattern.__isPartHidden('fromPart')).to.be.true
|
||||
expect(pattern.__isPartHidden('mainPart')).to.be.true
|
||||
})
|
||||
|
||||
it('should not hide nested `after` dependencies', () => {
|
||||
expect(pattern.__isPartHidden('afterPart')).to.be.false
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('{hideAll: true}', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
hideAll: true,
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [mainPart],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('Should hide the part', () => {
|
||||
expect(pattern.__isPartHidden('mainPart')).to.be.true
|
||||
})
|
||||
it("Should hide the part's `from` dependencies", () => {
|
||||
expect(pattern.__isPartHidden('fromPart')).to.be.true
|
||||
})
|
||||
it("Should hide the part's `after` dependencies", () => {
|
||||
expect(pattern.__isPartHidden('afterPart')).to.be.true
|
||||
})
|
||||
|
||||
describe('Nested Parts', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const grandChild = {
|
||||
name: 'grandChild',
|
||||
from: mainPart,
|
||||
hideAll: true,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [grandChild],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('should hide nested `from` dependencies', () => {
|
||||
expect(pattern.__isPartHidden('fromPart')).to.be.true
|
||||
expect(pattern.__isPartHidden('mainPart')).to.be.true
|
||||
})
|
||||
|
||||
it('should hide nested `after` dependencies', () => {
|
||||
expect(pattern.__isPartHidden('afterPart')).to.be.true
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('Should check whether created parts get the pattern context', () => {
|
||||
let partContext
|
||||
const plugin = {
|
||||
|
|
526
packages/core/tests/pattern-part-hiding.test.mjs
Normal file
526
packages/core/tests/pattern-part-hiding.test.mjs
Normal file
|
@ -0,0 +1,526 @@
|
|||
import chai from 'chai'
|
||||
import { Design, hidePresets } from '../src/index.mjs'
|
||||
|
||||
const expect = chai.expect
|
||||
function hidePartMatcher(partName) {
|
||||
const isHidden = this._obj.__isPartHidden(partName)
|
||||
if (!this._obj.config.parts[partName]) {
|
||||
throw new chai.AssertionError(`expected part \`${partName}\` to exist in pattern`)
|
||||
}
|
||||
this.assert(
|
||||
isHidden,
|
||||
`expected part ${partName} to be hidden, but it is shown`,
|
||||
`expected part ${partName} to NOT be hidden, but it is hidden`
|
||||
)
|
||||
}
|
||||
|
||||
function hidePartsMatcher(...partNames) {
|
||||
const hiddens = partNames.map((n) => {
|
||||
if (!this._obj.config.parts[n]) {
|
||||
throw new chai.AssertionError(`expected part \`${n}\` to exist in pattern`)
|
||||
}
|
||||
return this._obj.__isPartHidden(n)
|
||||
})
|
||||
|
||||
this.assert(
|
||||
hiddens.every((v) => v === true),
|
||||
`expected parts [${partNames}] to be hidden, but hide check returns [${hiddens}]`,
|
||||
`expected parts [${partNames}] to NOT be hidden, but hide check returns [${hiddens}]`
|
||||
)
|
||||
}
|
||||
|
||||
chai.Assertion.addMethod('hidePart', hidePartMatcher)
|
||||
chai.Assertion.addMethod('hideParts', hidePartsMatcher)
|
||||
|
||||
const blankDraft = ({ part }) => part
|
||||
const blankPart = (name, config = {}) => ({
|
||||
name,
|
||||
draft: blankDraft,
|
||||
...config,
|
||||
})
|
||||
|
||||
describe('Hiding parts', () => {
|
||||
const afterPart = blankPart('afterPart')
|
||||
const fromPart = blankPart('fromPart')
|
||||
|
||||
describe('With {hide: {self: true}}', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
hide: { self: true },
|
||||
draft: blankDraft,
|
||||
}
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [mainPart],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('Should hide the part', () => {
|
||||
expect(pattern).to.hidePart('mainPart')
|
||||
})
|
||||
|
||||
it("Should NOT hide the part's dependencies", () => {
|
||||
expect(pattern).not.to.hidePart('fromPart', 'afterPart')
|
||||
})
|
||||
|
||||
describe('Inherited Parts', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const grandChild = {
|
||||
name: 'grandChild',
|
||||
from: mainPart,
|
||||
hide: { self: true },
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [grandChild],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('Should NOT hide inherited `from` dependencies', () => {
|
||||
expect(pattern).not.to.hideParts('fromPart', 'mainPart')
|
||||
})
|
||||
|
||||
it('Should NOT hide inherited `after` dependencies', () => {
|
||||
expect(pattern).not.to.hidePart('afterPart')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('With {hide: {from: true}}', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
hide: { from: true },
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
draft: blankDraft,
|
||||
}
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [mainPart],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('Should NOT hide the part', () => {
|
||||
expect(pattern).not.to.hidePart('mainPart')
|
||||
})
|
||||
it("Should hide the part's `from` dependencies", () => {
|
||||
expect(pattern).to.hidePart('fromPart')
|
||||
})
|
||||
it("Should NOT hide the part's `after` dependencies", () => {
|
||||
expect(pattern).not.to.hidePart('afterPart')
|
||||
})
|
||||
|
||||
describe('Inherited Parts', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const grandChild = {
|
||||
name: 'grandChild',
|
||||
from: mainPart,
|
||||
hide: { from: true },
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [grandChild],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it("Should hide the part's `from` dependencies", () => {
|
||||
expect(pattern).to.hidePart('mainPart')
|
||||
})
|
||||
|
||||
it('Should NOT hide inherited `from` dependencies', () => {
|
||||
expect(pattern).not.to.hidePart('fromPart')
|
||||
})
|
||||
|
||||
it('Should NOT hide inherited `after` dependencies', () => {
|
||||
expect(pattern).not.to.hidePart('afterPart')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('With {hide: {after: true}}', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
hide: { after: true },
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [mainPart],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('Should NOT hide the part', () => {
|
||||
expect(pattern).not.to.hidePart('mainPart')
|
||||
})
|
||||
it("Should NOT hide the part's `from` dependencies", () => {
|
||||
expect(pattern).not.to.hidePart('fromPart')
|
||||
})
|
||||
it("Should hide the part's `after` dependencies", () => {
|
||||
expect(pattern).to.hidePart('afterPart')
|
||||
})
|
||||
|
||||
describe('Inherited Parts', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
after: afterPart,
|
||||
from: fromPart,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const grandChild = {
|
||||
name: 'grandChild',
|
||||
from: mainPart,
|
||||
hide: { after: true },
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [grandChild],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('Should NOT hide inherited `from` dependencies', () => {
|
||||
expect(pattern).not.to.hidePart('fromPart')
|
||||
})
|
||||
|
||||
it('Should NOT hide inherited `after` dependencies', () => {
|
||||
expect(pattern).not.to.hidePart('afterPart')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('With {hide: {inherited: true}}', () => {
|
||||
const grandParent = blankPart('grandParent', { from: fromPart, after: afterPart })
|
||||
const parentAfter = blankPart('parentAfter')
|
||||
const parent = blankPart('parent', { from: grandParent, after: parentAfter })
|
||||
const mainAfterFrom = blankPart('mainAfterFrom')
|
||||
const mainAfterAfter = blankPart('mainAfterAfter')
|
||||
const mainAfter = blankPart('mainAfter', { after: mainAfterAfter, from: mainAfterFrom })
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
from: parent,
|
||||
after: mainAfter,
|
||||
hide: { inherited: true },
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [mainPart],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
it('Should NOT hide the part', () => {
|
||||
expect(pattern).not.to.hidePart('mainPart')
|
||||
})
|
||||
|
||||
it('Should NOT hide the `from` dependency', () => {
|
||||
expect(pattern).not.to.hidePart('parent')
|
||||
})
|
||||
|
||||
it('Should NOT hide the `after` dependency', () => {
|
||||
expect(pattern).not.to.hidePart('mainAfter')
|
||||
})
|
||||
|
||||
it('Should NOT hide the `after` dependencies of `after` dependencies', () => {
|
||||
expect(pattern).not.to.hidePart('mainAfterAfter')
|
||||
})
|
||||
|
||||
it('Should hide the `from` dependencies of `after` dependencies', () => {
|
||||
expect(pattern).to.hidePart('mainAfterFrom')
|
||||
})
|
||||
|
||||
it('Should hide the `after` dependencies of `from` dependencies', () => {
|
||||
expect(pattern).to.hideParts('afterPart', 'parentAfter')
|
||||
})
|
||||
|
||||
it('Should hide the `from` dependencies of `from` dependencies', () => {
|
||||
expect(pattern).to.hideParts('fromPart', 'grandParent')
|
||||
})
|
||||
})
|
||||
|
||||
describe("With {hide: {always: ['partname']} }", () => {
|
||||
it('Should hide the given part', () => {
|
||||
const mainPart = blankPart('mainPart', {
|
||||
after: afterPart,
|
||||
hide: {
|
||||
always: ['afterPart'],
|
||||
},
|
||||
})
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [mainPart],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).to.hidePart('afterPart')
|
||||
})
|
||||
|
||||
it("Should NOT hide the given part if a higher-level part includes it in {hide: {never: ['partName']} }", () => {
|
||||
const grandParent = blankPart('grandParent')
|
||||
const parent = blankPart('parent', {
|
||||
from: grandParent,
|
||||
hide: { always: ['grandParent'] },
|
||||
})
|
||||
const main1 = blankPart('main1', {
|
||||
from: parent,
|
||||
hide: { from: true, never: ['grandParent'] },
|
||||
})
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [main1],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).not.to.hidePart('grandParent')
|
||||
})
|
||||
})
|
||||
|
||||
describe("With {hide: {never: ['partName']} }", () => {
|
||||
it('Should NOT hide the given part even if another setting would hide it', () => {
|
||||
const parent = blankPart('parent')
|
||||
const main1 = blankPart('main1', {
|
||||
from: parent,
|
||||
hide: { from: true, never: ['parent'] },
|
||||
})
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [main1],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).not.to.hidePart('parent')
|
||||
})
|
||||
|
||||
it("Should hide the given part if a higher-level part includes it in {hide: {always: ['partName']} }", () => {
|
||||
const grandParent = blankPart('grandParent')
|
||||
const parent = blankPart('parent', {
|
||||
from: grandParent,
|
||||
hide: { never: ['grandParent'] },
|
||||
})
|
||||
const main1 = blankPart('main1', {
|
||||
from: parent,
|
||||
hide: { from: true, always: ['grandParent'] },
|
||||
})
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [main1],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).to.hidePart('grandParent')
|
||||
})
|
||||
})
|
||||
|
||||
describe('HIDE_ALL', () => {
|
||||
const grandParent = blankPart('grandParent')
|
||||
const parent = blankPart('parent', {
|
||||
from: grandParent,
|
||||
})
|
||||
|
||||
it('Should behave like `{self: true, after: true, from: true, inherited: true}`', () => {
|
||||
const main1 = blankPart('main1', {
|
||||
from: parent,
|
||||
after: afterPart,
|
||||
hide: hidePresets.HIDE_ALL,
|
||||
})
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [main1],
|
||||
})
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).to.hideParts('grandParent', 'parent', 'main1', 'afterPart')
|
||||
})
|
||||
it('Should work when passed as a string', () => {
|
||||
const main1 = blankPart('main1', {
|
||||
from: parent,
|
||||
after: afterPart,
|
||||
hide: 'HIDE_ALL',
|
||||
})
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [main1],
|
||||
})
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).to.hideParts('grandParent', 'parent', 'main1', 'afterPart')
|
||||
})
|
||||
})
|
||||
|
||||
describe('HIDE_TREE', () => {
|
||||
const grandParent = blankPart('grandParent', { from: fromPart, after: afterPart })
|
||||
const parentAfter = blankPart('parentAfter')
|
||||
const parent = blankPart('parent', { from: grandParent, after: parentAfter })
|
||||
const mainAfterFrom = blankPart('mainAfterFrom')
|
||||
const mainAfterAfter = blankPart('mainAfterAfter')
|
||||
const mainAfter = blankPart('mainAfter', { after: mainAfterAfter, from: mainAfterFrom })
|
||||
|
||||
it('Should behave like `{from: true, inherited: true}`', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
from: parent,
|
||||
after: mainAfter,
|
||||
hide: hidePresets.HIDE_TREE,
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [mainPart],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).to.hideParts(
|
||||
'grandParent',
|
||||
'fromPart',
|
||||
'afterPart',
|
||||
'parentAfter',
|
||||
`mainAfterFrom`,
|
||||
`parent`
|
||||
)
|
||||
expect(pattern).to.not.hideParts('mainPart', 'mainAfter', 'mainAfterAfter')
|
||||
})
|
||||
it('Should work when passed as a string', () => {
|
||||
const mainPart = {
|
||||
name: 'mainPart',
|
||||
from: parent,
|
||||
after: mainAfter,
|
||||
hide: 'HIDE_TREE',
|
||||
draft: blankDraft,
|
||||
}
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [mainPart],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).to.hideParts(
|
||||
'grandParent',
|
||||
'fromPart',
|
||||
'afterPart',
|
||||
'parentAfter',
|
||||
`mainAfterFrom`,
|
||||
`parent`
|
||||
)
|
||||
expect(pattern).to.not.hideParts('mainPart', 'mainAfter', 'mainAfterAfter')
|
||||
})
|
||||
})
|
||||
describe('With complex inheritance', () => {
|
||||
it('Should use the strictest hiding configuration given by toplevel parts', () => {
|
||||
const greatGrandParent = blankPart('greatGrandParent')
|
||||
const grandParent = blankPart('grandParent', { from: greatGrandParent })
|
||||
const parent = blankPart('parent', { from: grandParent })
|
||||
const main1 = blankPart('main1', {
|
||||
from: parent,
|
||||
})
|
||||
const main2 = blankPart('main2', {
|
||||
from: parent,
|
||||
hide: { from: true, inherited: true },
|
||||
})
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [main1, main2],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).to.hideParts('parent', 'grandParent', 'greatGrandParent')
|
||||
})
|
||||
it('Should use inherited configurations that are not overridden', () => {
|
||||
const greatGrandParent = blankPart('greatGrandParent')
|
||||
const grandParent = blankPart('grandParent', { from: greatGrandParent })
|
||||
const parent = blankPart('parent', {
|
||||
from: grandParent,
|
||||
hide: { inherited: true },
|
||||
})
|
||||
const main1 = blankPart('main1', {
|
||||
from: parent,
|
||||
hide: { from: true },
|
||||
})
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [main1],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).to.hidePart('greatGrandParent')
|
||||
})
|
||||
it('Should override inherited hiding configurations', () => {
|
||||
const greatGrandParent = blankPart('greatGrandParent')
|
||||
const grandParent = blankPart('grandParent', { from: greatGrandParent })
|
||||
const parent = blankPart('parent', {
|
||||
from: grandParent,
|
||||
hide: { inherited: true },
|
||||
})
|
||||
const main1 = blankPart('main1', {
|
||||
from: parent,
|
||||
hide: { from: true, inherited: false },
|
||||
})
|
||||
|
||||
const Test = new Design({
|
||||
name: 'test',
|
||||
parts: [main1],
|
||||
})
|
||||
|
||||
const pattern = new Test()
|
||||
pattern.__init()
|
||||
|
||||
expect(pattern).not.to.hidePart('greatGrandParent')
|
||||
})
|
||||
})
|
||||
})
|
|
@ -74,41 +74,6 @@ describe('Store', () => {
|
|||
expect(pattern.setStores[0].get('test.message.info')).to.equal('hello info')
|
||||
})
|
||||
|
||||
it('Should make top-level plugin methods available via shorthand', () => {
|
||||
const plugin = {
|
||||
name: 'test',
|
||||
version: 1,
|
||||
store: [
|
||||
[
|
||||
'methodA',
|
||||
function (store, name, msg) {
|
||||
store.set(['test', name, 'a'], msg)
|
||||
},
|
||||
],
|
||||
[
|
||||
'methodB',
|
||||
function (store, name, msg) {
|
||||
store.set(['test', name, 'b'], msg)
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
||||
const part = {
|
||||
name: 'example_part',
|
||||
plugins: [plugin],
|
||||
draft: ({ methodA, methodB, part }) => {
|
||||
methodA('hello A')
|
||||
methodB('hello B')
|
||||
return part
|
||||
},
|
||||
}
|
||||
const Test = new Design({ parts: [part] })
|
||||
const pattern = new Test()
|
||||
pattern.draft()
|
||||
expect(pattern.setStores[0].get('test.example_part.a')).to.equal('hello A')
|
||||
expect(pattern.setStores[0].get('test.example_part.b')).to.equal('hello B')
|
||||
})
|
||||
|
||||
it('Should log a warning when trying to extend a protected method via the constructor', () => {
|
||||
const store = new Store([['get', () => false]])
|
||||
expect(store.logs.warning.length).to.equal(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue