From ee4e01e95b3980d3654bfc8f0d44328157044d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Mon, 10 Jul 2023 17:08:32 +0800 Subject: [PATCH 001/113] Squashed 'workspace/plugins/monaco-editor/' content from commit 9c0d455 git-subtree-dir: workspace/plugins/monaco-editor git-subtree-split: 9c0d455105ccd76a02fd11e8648b727110fbe70a --- .gitignore | 24 ++ .vscode/extensions.json | 3 + LICENSE | 661 ++++++++++++++++++++++++++++++++++++++++ README.md | 40 +++ package.json | 29 ++ src/index.ts | 0 src/vite-env.d.ts | 2 + svelte.config.js | 24 ++ tsconfig.json | 47 +++ tsconfig.node.json | 9 + vite.config.ts | 77 +++++ 11 files changed, 916 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/extensions.json create mode 100644 LICENSE create mode 100644 README.md create mode 100644 package.json create mode 100644 src/index.ts create mode 100644 src/vite-env.d.ts create mode 100644 svelte.config.js create mode 100644 tsconfig.json create mode 100644 tsconfig.node.json create mode 100644 vite.config.ts diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..bdef820 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["svelte.svelte-vscode"] +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0ad25db --- /dev/null +++ b/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..09db7dd --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +> **[READ ONLY] Subtree split of the [siyuan-packages-monorepo](https://github.com/Zuoqiu-Yingyi/siyuan-packages-monorepo) [/workspace/plugins/monaco-editor](https://github.com/Zuoqiu-Yingyi/siyuan-packages-monorepo/tree/main/workspace/plugins/monaco-editor)** + +
+icon + +--- +[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?include_prereleases&style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/releases/latest) +[![GitHub Release Date](https://img.shields.io/github/release-date/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/releases/latest) +[![GitHub License](https://img.shields.io/github/license/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/blob/main/LICENSE) +[![GitHub last commit](https://img.shields.io/github/last-commit/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/commits/main) +![GitHub repo size](https://img.shields.io/github/repo-size/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor?style=flat-square) +![hits](https://hits.b3log.org/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor.svg) +[![GitHub all releases](https://img.shields.io/github/downloads/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/total?style=flat-square)](https://github.com/Zuoqiu-Yingyi/siyuan-plugin-monaco-editor/releases) + +--- +
+ +## USER GUIDE + +[简体中文](./public/README_zh_CN.md) \| [English](./public/README.md) + +## DEVELOPMENT GUIDE + +### RELEASE STEPS + +1. Update the version number in `/package.json` and `/public/plugin.json`, then commit the changes in [monorepo](https://github.com/Zuoqiu-Yingyi/siyuan-packages-monorepo). +2. Run script `./scripts/git-subtree/monaco-editor/push.ps1` with the folowing command in **monorepo root dir** to push the subtree to sub-repository (`dev` branch). + ```powershell + pwsh -f "./scripts/git-subtree/monaco-editor/push.ps1" + ``` +3. Create a pull request from `dev` branch to `main` branch in sub-repository. +4. Merge the pull request. +5. Await for the CD workflow `release-please.yml` to complete, it will create a *release pull request* in sub-repository. +6. Merge the *release pull request*, it will create a new *pre-release* with current [changelog](./CHANGELOG.md) and a new *tag* with [semantic version](https://semver.org/) in sub-repository. +7. Await for the CD workflow `build.yml` to complete, it will update the distribution files to `publish` branch in sub-repository. +8. Await for the CD workflow `release-distribution.yml` to complete, it will create a new *pre-release* with an asset named `package.zip` and a new *tag* with timestamp in sub-repository. + +## CHANGELOG + +[CHANGE LOG](./CHANGELOG.md) diff --git a/package.json b/package.json new file mode 100644 index 0000000..d926143 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "monaco-editor", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^2.4.2", + "@tsconfig/svelte": "^4.0.1", + "less": "^4.1.3", + "svelte": "^3.59.2", + "svelte-check": "^3.4.5", + "svelte-preprocess-less": "^0.4.0", + "tslib": "^2.6.0", + "typescript": "^5.1.6", + "vite": "^4.4.2" + }, + "dependencies": { + "@workspace/components": "workspace:^", + "@workspace/types": "workspace:^", + "@workspace/utils": "workspace:^", + "monaco-editor": "^0.40.0" + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts new file mode 100644 index 0000000..4078e74 --- /dev/null +++ b/src/vite-env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/svelte.config.js b/svelte.config.js new file mode 100644 index 0000000..8e95b9a --- /dev/null +++ b/svelte.config.js @@ -0,0 +1,24 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' + +export default { + // Consult https://svelte.dev/docs#compile-time-svelte-preprocess + // for more information about preprocessors + preprocess: vitePreprocess(), +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..de72301 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,47 @@ +{ + "extends": "@tsconfig/svelte/tsconfig.json", + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "resolveJsonModule": true, + /** + * Typecheck JS in `.svelte` and `.js` files by default. + * Disable checkJs if you'd like to use dynamic types in JS. + * Note that setting allowJs false does not prevent the use + * of JS in `.svelte` files. + */ + "allowJs": true, + "checkJs": true, + "isolatedModules": true, + "lib": [ + "ESNext", + "DOM" + ], + "baseUrl": "./", + "paths": { + "~/*": [ + "./*" + ], + "@/*": [ + "src/*" + ] + } + }, + "include": [ + "public/i18n/*.json", + "src/**/*.d.ts", + "src/**/*.ts", + "src/**/*.js", + "src/**/*.svelte" + ], + "exclude": [ + "node_modules", + "temp" + ], + "references": [ + { + "path": "./tsconfig.node.json" + } + ] +} diff --git a/tsconfig.node.json b/tsconfig.node.json new file mode 100644 index 0000000..494bfe0 --- /dev/null +++ b/tsconfig.node.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler" + }, + "include": ["vite.config.ts"] +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..4acf21e --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,77 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import { defineConfig } from "vite"; +import { resolve } from "path" +import { svelte } from "@sveltejs/vite-plugin-svelte"; +import { less } from "svelte-preprocess-less"; + +// https://vitejs.dev/config/ +export default defineConfig({ + base: `./`, + plugins: [ + svelte({ + preprocess: { + style: less(), + }, + }), + ], + resolve: { + alias: { + "~": resolve(__dirname, "./"), + "@": resolve(__dirname, "./src"), + } + }, + build: { + minify: true, + // sourcemap: "inline", + lib: { + entry: resolve(__dirname, "src/index.ts"), + fileName: "index", + formats: ["cjs"], + }, + rollupOptions: { + external: [ + "siyuan", + /^@electron\/.*$/, + ], + output: { + entryFileNames: chunkInfo => { + // console.log(chunkInfo); + switch (chunkInfo.name) { + case "index": + return "[name].js"; + + default: + return "assets/[name]-[hash].js"; + } + }, + assetFileNames: assetInfo => { + // console.log(chunkInfo); + switch (assetInfo.name) { + case "style.css": + case "index.css": + return "index.css"; + + default: + return "assets/[name]-[hash][extname]"; + } + }, + }, + }, + }, +}); From 8f0fb1f8e2ab44270e48c87453a4e0678cf507dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Mon, 10 Jul 2023 22:10:55 +0800 Subject: [PATCH 002/113] =?UTF-8?q?docs(custom-block):=20=E5=9C=A8=20`READ?= =?UTF-8?q?ME.md`=20=E4=B8=AD=E6=B7=BB=E5=8A=A0=E5=B8=B8=E8=A7=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20|=20Add=20Q&A=20in=20`README.md`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + workspace/plugins/custom-block/public/README.md | 6 ++++++ workspace/plugins/custom-block/public/README_zh_CN.md | 8 +++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa5e7e7..96d5eba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - 添加附属仓库 `monaco-editor` 的管理脚本 | Add management scripts for sub-repository `monaco-editor`. - 初始化仓库 | Initialize repository. +- 在 `README.md` 中添加常见问题 | Add Q&A in `README.md`. ## 2023-07-09 diff --git a/workspace/plugins/custom-block/public/README.md b/workspace/plugins/custom-block/public/README.md index e3db506..51644a5 100644 --- a/workspace/plugins/custom-block/public/README.md +++ b/workspace/plugins/custom-block/public/README.md @@ -24,6 +24,12 @@ A plugin for [SiYuan Note](https://github.com/siyuan-note/siyuan) that can use c ![preview image](https://cdn.jsdelivr.net/gh/Zuoqiu-Yingyi/siyuan-plugin-custom-block/public/preview.png) +## Q & A + +1. If I am unable to click on a block label in the list map view, how do I open the block menu? + + Use the shortcut key Shift + ↑ to select the specific block, then use the shortcut key Ctrl + / to open the block menu for that block. + ## INTRODUCTION ### Function Introduction diff --git a/workspace/plugins/custom-block/public/README_zh_CN.md b/workspace/plugins/custom-block/public/README_zh_CN.md index d59f5e6..0af7c5a 100644 --- a/workspace/plugins/custom-block/public/README_zh_CN.md +++ b/workspace/plugins/custom-block/public/README_zh_CN.md @@ -22,7 +22,13 @@ ## 预览 -![预览图片](https://cdn.jsdelivr.net/gh/Zuoqiu-Yingyi/siyuan-plugin-custom-fonts/public/preview.png) +![预览图片](https://cdn.jsdelivr.net/gh/Zuoqiu-Yingyi/siyuan-plugin-custom-block/public/preview.png) + +## 常见问题 + +1. 在列表导图视图中若无法点击块标, 如何打开块菜单? + + 使用快捷键 Shift + ↑ 选择指定的块, 然后使用快捷键 Ctrl + /打开该块的块菜单 ## 介绍 From ad85e6c314dd900f154a70e3ea38e2e94068d257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Tue, 11 Jul 2023 04:14:16 +0800 Subject: [PATCH 003/113] =?UTF-8?q?feat(monaco-editor):=20=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=20monaco=20=E7=BC=96=E8=BE=91=E5=99=A8=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=20|=20Implement=20monaco=20editor=20initiali?= =?UTF-8?q?zation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 + workspace/packages/utils/locale/language.ts | 30 ++++--- .../plugins/monaco-editor/editor/index.html | 31 +++++++ workspace/plugins/monaco-editor/index.html | 28 +++++++ workspace/plugins/monaco-editor/package.json | 6 +- .../monaco-editor/public/i18n/en_US.json | 3 + .../monaco-editor/public/i18n/zh_CHT.json | 3 + .../monaco-editor/public/i18n/zh_CN.json | 3 + .../plugins/monaco-editor/public/plugin.json | 0 .../src/components/Editor.svelte | 80 +++++++++++++++++++ .../monaco-editor/src/components/Main.svelte | 25 ++++++ workspace/plugins/monaco-editor/src/index.ts | 22 +++++ workspace/plugins/monaco-editor/src/main.ts | 61 ++++++++++++++ .../monaco-editor/src/styles/main.less | 9 +++ .../plugins/monaco-editor/src/utils/i18n.ts | 33 ++++++++ .../plugins/monaco-editor/src/utils/locale.ts | 47 +++++++++++ .../plugins/monaco-editor/vite.config.ts | 24 +++++- workspace/pnpm-lock.yaml | 69 +++++++++++++++- 18 files changed, 463 insertions(+), 15 deletions(-) create mode 100644 workspace/plugins/monaco-editor/editor/index.html create mode 100644 workspace/plugins/monaco-editor/index.html create mode 100644 workspace/plugins/monaco-editor/public/i18n/en_US.json create mode 100644 workspace/plugins/monaco-editor/public/i18n/zh_CHT.json create mode 100644 workspace/plugins/monaco-editor/public/i18n/zh_CN.json create mode 100644 workspace/plugins/monaco-editor/public/plugin.json create mode 100644 workspace/plugins/monaco-editor/src/components/Editor.svelte create mode 100644 workspace/plugins/monaco-editor/src/components/Main.svelte create mode 100644 workspace/plugins/monaco-editor/src/main.ts create mode 100644 workspace/plugins/monaco-editor/src/styles/main.less create mode 100644 workspace/plugins/monaco-editor/src/utils/i18n.ts create mode 100644 workspace/plugins/monaco-editor/src/utils/locale.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 96d5eba..652b8b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更改日志 | CHANGE LOG +## 2023-07-11 + +- 实现 monaco 编辑器初始化 | Implement monaco editor initialization. + ## 2023-07-10 - 添加附属仓库 `monaco-editor` 的管理脚本 | Add management scripts for sub-repository `monaco-editor`. diff --git a/workspace/packages/utils/locale/language.ts b/workspace/packages/utils/locale/language.ts index 770f829..d742b96 100644 --- a/workspace/packages/utils/locale/language.ts +++ b/workspace/packages/utils/locale/language.ts @@ -16,29 +16,33 @@ */ export function mapLang(lang: string, preset: string[] = []): string { - lang = lang.replaceAll("_", "-"); + lang = lang + .replaceAll("_", "-") + .toLowerCase(); switch (true) { case lang in preset: break; - case lang.startsWith("zh-CNS"): + case lang.startsWith("zh-chs"): + case lang.startsWith("zh-cns"): lang = "zh-Hans"; break; - case lang.startsWith("zh-CNT"): + case lang.startsWith("zh-cht"): + case lang.startsWith("zh-cnt"): lang = "zh-Hant"; break; - case lang.startsWith("zh-Hans"): - case lang.startsWith("zh-CN"): - case lang.startsWith("zh-SG"): + case lang.startsWith("zh-hans"): + case lang.startsWith("zh-cn"): + case lang.startsWith("zh-sg"): lang = "zh-Hans"; break; - case lang.startsWith("zh-Hant"): - case lang.startsWith("zh-TW"): - case lang.startsWith("zh-HK"): - case lang.startsWith("zh-MO"): + case lang.startsWith("zh-hant"): + case lang.startsWith("zh-tw"): + case lang.startsWith("zh-hk"): + case lang.startsWith("zh-mo"): lang = "zh-Hant"; break; @@ -49,6 +53,12 @@ export function mapLang(lang: string, preset: string[] = []): string { case lang.startsWith("en"): lang = "en"; break; + case lang.startsWith("es"): + lang = "es"; + break; + case lang.startsWith("fr"): + lang = "fr"; + break; default: break; } diff --git a/workspace/plugins/monaco-editor/editor/index.html b/workspace/plugins/monaco-editor/editor/index.html new file mode 100644 index 0000000..b089d8d --- /dev/null +++ b/workspace/plugins/monaco-editor/editor/index.html @@ -0,0 +1,31 @@ + + + + + + + + + Editor + + + + + + + diff --git a/workspace/plugins/monaco-editor/index.html b/workspace/plugins/monaco-editor/index.html new file mode 100644 index 0000000..4071fe3 --- /dev/null +++ b/workspace/plugins/monaco-editor/index.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + diff --git a/workspace/plugins/monaco-editor/package.json b/workspace/plugins/monaco-editor/package.json index d926143..2c95b22 100644 --- a/workspace/plugins/monaco-editor/package.json +++ b/workspace/plugins/monaco-editor/package.json @@ -12,15 +12,19 @@ "devDependencies": { "@sveltejs/vite-plugin-svelte": "^2.4.2", "@tsconfig/svelte": "^4.0.1", + "@types/node": "^20.4.1", "less": "^4.1.3", "svelte": "^3.59.2", "svelte-check": "^3.4.5", "svelte-preprocess-less": "^0.4.0", "tslib": "^2.6.0", "typescript": "^5.1.6", - "vite": "^4.4.2" + "vite": "^4.4.2", + "vite-plugin-monaco-editor": "^1.1.0", + "vite-plugin-static-copy": "^0.16.0" }, "dependencies": { + "@monaco-editor/loader": "^1.3.3", "@workspace/components": "workspace:^", "@workspace/types": "workspace:^", "@workspace/utils": "workspace:^", diff --git a/workspace/plugins/monaco-editor/public/i18n/en_US.json b/workspace/plugins/monaco-editor/public/i18n/en_US.json new file mode 100644 index 0000000..6e0d1a6 --- /dev/null +++ b/workspace/plugins/monaco-editor/public/i18n/en_US.json @@ -0,0 +1,3 @@ +{ + "displayName": "Code Editor" +} diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json new file mode 100644 index 0000000..50e318d --- /dev/null +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json @@ -0,0 +1,3 @@ +{ + "displayName": "代碼編輯器" +} diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json new file mode 100644 index 0000000..fcd8f06 --- /dev/null +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json @@ -0,0 +1,3 @@ +{ + "displayName": "代码编辑器" +} diff --git a/workspace/plugins/monaco-editor/public/plugin.json b/workspace/plugins/monaco-editor/public/plugin.json new file mode 100644 index 0000000..e69de29 diff --git a/workspace/plugins/monaco-editor/src/components/Editor.svelte b/workspace/plugins/monaco-editor/src/components/Editor.svelte new file mode 100644 index 0000000..2d10d85 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/components/Editor.svelte @@ -0,0 +1,80 @@ + + + + + +
+ + diff --git a/workspace/plugins/monaco-editor/src/components/Main.svelte b/workspace/plugins/monaco-editor/src/components/Main.svelte new file mode 100644 index 0000000..7152b9e --- /dev/null +++ b/workspace/plugins/monaco-editor/src/components/Main.svelte @@ -0,0 +1,25 @@ + + + + + + + diff --git a/workspace/plugins/monaco-editor/src/index.ts b/workspace/plugins/monaco-editor/src/index.ts index e69de29..ce07e9f 100644 --- a/workspace/plugins/monaco-editor/src/index.ts +++ b/workspace/plugins/monaco-editor/src/index.ts @@ -0,0 +1,22 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +/* 插件入口 */ +import siyuan from "siyuan"; + +export default class MonacoEditorPlugin extends siyuan.Plugin { +} diff --git a/workspace/plugins/monaco-editor/src/main.ts b/workspace/plugins/monaco-editor/src/main.ts new file mode 100644 index 0000000..a535a87 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/main.ts @@ -0,0 +1,61 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +/* 界面入口 */ +import Main from "./components/Main.svelte"; +import "./styles/main.less"; + +/** + * Monaco Editor 环境 + * REF: https://github.com/microsoft/monaco-editor/blob/main/docs/integrate-esm.md#using-vite + */ +self.MonacoEnvironment = { + getWorker: function (workerId, label) { + const getWorkerModule = (moduleUrl, label) => { + return new Worker(self.MonacoEnvironment.getWorkerUrl(moduleUrl, label), { + name: label, + type: "module", + }); + }; + + switch (label) { + case "json": + return getWorkerModule("/monaco-editor/esm/vs/language/json/json.worker?worker", label); + case "css": + case "scss": + case "less": + return getWorkerModule("/monaco-editor/esm/vs/language/css/css.worker?worker", label); + case "html": + case "handlebars": + case "razor": + return getWorkerModule("/monaco-editor/esm/vs/language/html/html.worker?worker", label); + case "js": + case "ts": + case "javascript": + case "typescript": + return getWorkerModule("/monaco-editor/esm/vs/language/typescript/ts.worker?worker", label); + default: + return getWorkerModule("/monaco-editor/esm/vs/editor/editor.worker?worker", label); + } + }, +}; + +const main = new Main({ + target: globalThis.document.body, + props: { + }, +}); diff --git a/workspace/plugins/monaco-editor/src/styles/main.less b/workspace/plugins/monaco-editor/src/styles/main.less new file mode 100644 index 0000000..8af11d8 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/styles/main.less @@ -0,0 +1,9 @@ +html, +body { + width: 100%; + height: 100%; + + margin: 0; + border: 0; + padding: 0; +} diff --git a/workspace/plugins/monaco-editor/src/utils/i18n.ts b/workspace/plugins/monaco-editor/src/utils/i18n.ts new file mode 100644 index 0000000..c5b0430 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/utils/i18n.ts @@ -0,0 +1,33 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import { + i18nCheck, + i18nChecks, +} from "@workspace/types/siyuan/i18n"; + +import zh_Hans from "~/public/i18n/zh_CN.json"; +import zh_Hant from "~/public/i18n/zh_CHT.json"; +import en from "~/public/i18n/en_US.json"; + +export type I18N = typeof zh_Hans; + +i18nChecks([ + i18nCheck(), + i18nCheck(), + i18nCheck(), +]); diff --git a/workspace/plugins/monaco-editor/src/utils/locale.ts b/workspace/plugins/monaco-editor/src/utils/locale.ts new file mode 100644 index 0000000..caeb549 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/utils/locale.ts @@ -0,0 +1,47 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import { mapLang } from "@workspace/utils/locale/language"; + +// REF: https://www.npmjs.com/package/monaco-editor-nls +export function mapLocale(locale: string): string { + switch (mapLang(locale)) { + case "zh-Hans": + return "zh-cn"; + case "zh-Hant": + return "zh-tw"; + + case "de": + return "de"; + case "es": + return "es"; + case "fr": + return "fr"; + case "it": + return "it"; + case "ja": + return "ja"; + case "ko": + return "ko"; + case "ru": + return "ru"; + + case "en": + default: + return "en"; + } +} diff --git a/workspace/plugins/monaco-editor/vite.config.ts b/workspace/plugins/monaco-editor/vite.config.ts index 4acf21e..9e99f71 100644 --- a/workspace/plugins/monaco-editor/vite.config.ts +++ b/workspace/plugins/monaco-editor/vite.config.ts @@ -17,27 +17,41 @@ import { defineConfig } from "vite"; import { resolve } from "path" + +import monacoEditorPlugin from 'vite-plugin-monaco-editor'; import { svelte } from "@sveltejs/vite-plugin-svelte"; import { less } from "svelte-preprocess-less"; +import { viteStaticCopy } from 'vite-plugin-static-copy' + // https://vitejs.dev/config/ export default defineConfig({ base: `./`, plugins: [ + (monacoEditorPlugin as any).default({}), svelte({ preprocess: { style: less(), }, }), + viteStaticCopy({ + targets: [ + { + src: "./node_modules/monaco-editor/min", + dest: "./libs/monaco-editor", + rename: "min", + }, + ], + }), ], resolve: { alias: { "~": resolve(__dirname, "./"), "@": resolve(__dirname, "./src"), - } + }, }, build: { - minify: true, + // minify: true, // sourcemap: "inline", lib: { entry: resolve(__dirname, "src/index.ts"), @@ -45,6 +59,10 @@ export default defineConfig({ formats: ["cjs"], }, rollupOptions: { + input: { + index: resolve(__dirname, "src/index.ts"), + editor: resolve(__dirname, "editor/index.html"), + }, external: [ "siyuan", /^@electron\/.*$/, @@ -63,7 +81,7 @@ export default defineConfig({ assetFileNames: assetInfo => { // console.log(chunkInfo); switch (assetInfo.name) { - case "style.css": + // case "style.css": case "index.css": return "index.css"; diff --git a/workspace/pnpm-lock.yaml b/workspace/pnpm-lock.yaml index 3958d21..e2a86a2 100644 --- a/workspace/pnpm-lock.yaml +++ b/workspace/pnpm-lock.yaml @@ -237,6 +237,9 @@ importers: plugins/monaco-editor: dependencies: + '@monaco-editor/loader': + specifier: ^1.3.3 + version: 1.3.3(monaco-editor@0.40.0) '@workspace/components': specifier: workspace:^ version: link:../../packages/components @@ -256,6 +259,9 @@ importers: '@tsconfig/svelte': specifier: ^4.0.1 version: 4.0.1 + '@types/node': + specifier: ^20.4.1 + version: 20.4.1 less: specifier: ^4.1.3 version: 4.1.3 @@ -277,6 +283,12 @@ importers: vite: specifier: ^4.4.2 version: 4.4.2(@types/node@20.4.1)(less@4.1.3) + vite-plugin-monaco-editor: + specifier: ^1.1.0 + version: 1.1.0(monaco-editor@0.40.0) + vite-plugin-static-copy: + specifier: ^0.16.0 + version: 0.16.0(vite@4.4.2) plugins/open-api: dependencies: @@ -1153,6 +1165,15 @@ packages: '@lumino/algorithm': 2.0.0 dev: true + /@monaco-editor/loader@1.3.3(monaco-editor@0.40.0): + resolution: {integrity: sha512-6KKF4CTzcJiS8BJwtxtfyYt9shBiEv32ateQ9T4UVogwn4HM/uPo9iJd2Dmbkpz8CM6Y0PDUpjnZzCwC+eYo2Q==} + peerDependencies: + monaco-editor: '>= 0.21.0 < 1' + dependencies: + monaco-editor: 0.40.0 + state-local: 1.0.7 + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2533,6 +2554,15 @@ packages: mime-types: 2.1.35 dev: false + /fs-extra@11.1.1: + resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true @@ -2820,6 +2850,14 @@ packages: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.0 + optionalDependencies: + graceful-fs: 4.2.11 + dev: true + /jsonpointer@5.0.1: resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} engines: {node: '>=0.10.0'} @@ -3057,7 +3095,6 @@ packages: /monaco-editor@0.40.0: resolution: {integrity: sha512-1wymccLEuFSMBvCk/jT1YDW/GuxMLYwnFwF9CDyYCxoTw2Pt379J3FUhwy9c43j51JdcxVPjwk0jm0EVDsBS2g==} - dev: false /mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} @@ -3526,6 +3563,10 @@ packages: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true + /state-local@1.0.7: + resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==} + dev: false + /std-env@3.3.3: resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==} dev: true @@ -3995,6 +4036,11 @@ packages: resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} dev: true + /universalify@2.0.0: + resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + engines: {node: '>= 10.0.0'} + dev: true + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -4064,6 +4110,27 @@ packages: - terser dev: true + /vite-plugin-monaco-editor@1.1.0(monaco-editor@0.40.0): + resolution: {integrity: sha512-IvtUqZotrRoVqwT0PBBDIZPNraya3BxN/bfcNfnxZ5rkJiGcNtO5eAOWWSgT7zullIAEqQwxMU83yL9J5k7gww==} + peerDependencies: + monaco-editor: '>=0.33.0' + dependencies: + monaco-editor: 0.40.0 + dev: true + + /vite-plugin-static-copy@0.16.0(vite@4.4.2): + resolution: {integrity: sha512-dMVEg5Z2SwYRgQnHZaeokvSKB4p/TOTf65JU4sP3U6ccSBsukqdtDOjpmT+xzTFHAA8WJjcS31RMLjUdWQCBzw==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 + dependencies: + chokidar: 3.5.3 + fast-glob: 3.3.0 + fs-extra: 11.1.1 + picocolors: 1.0.0 + vite: 4.4.2(@types/node@20.4.1)(less@4.1.3) + dev: true + /vite@4.3.9(less@4.1.3): resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==} engines: {node: ^14.18.0 || >=16.0.0} From 3f0dccef945a2fbf3c35084e85e622a70af185e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Tue, 11 Jul 2023 17:09:25 +0800 Subject: [PATCH 004/113] =?UTF-8?q?perf(custom-block):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=88=97=E8=A1=A8=E5=AF=BC=E5=9B=BE=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=20|=20Optimize=20list=20mind-map=20view.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../plugins/custom-block/public/README.md | 38 ++++----- .../custom-block/public/README_zh_CN.md | 38 ++++----- .../custom-block/src/configs/default.ts | 19 ++++- .../styles/custom-block-list-view-map.less | 84 ++++++++++--------- .../custom-block/src/styles/define.less | 3 + 6 files changed, 104 insertions(+), 79 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 652b8b9..f2dc3e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 2023-07-11 - 实现 monaco 编辑器初始化 | Implement monaco editor initialization. +- 优化列表导图视图 | Optimize list mind-map view. ## 2023-07-10 diff --git a/workspace/plugins/custom-block/public/README.md b/workspace/plugins/custom-block/public/README.md index 51644a5..e2570e5 100644 --- a/workspace/plugins/custom-block/public/README.md +++ b/workspace/plugins/custom-block/public/README.md @@ -36,25 +36,25 @@ A plugin for [SiYuan Note](https://github.com/siyuan-note/siyuan) that can use c Use Block Menu > Plugins > Custom Block Styles to configure the supported styles for the selected block. -| Menu Item Name | Block Attribute | Function Introduction | Document Block | Super Block | Quote Block | List Block | List Item | Heading Block | Paragraph Block | Formula Block | Table Block | Code Block | HTML Block | Divider | Audio Block | Video Block | Iframe Block | Widget Block | Embed Block | -| --------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------: | :---------: | :---------: | :--------: | :-------: | :-----------: | :-------------: | :-----------: | :---------: | :--------: | :--------: | :-----: | :---------: | :---------: | :----------: | :----------: | :---------: | -| Block Style | `style` | Customize the `style` attribute of the block
For more details, please refer to: [style - HTML: HyperText Markup Language \| MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style) |
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Full Width | `block-width`:`full` | Set the width of the block to the width of the document | | | | | | | | | | | | | ✔ | ✔ | ✔ | ✔ | | -| Full Screen | None | Display the block in full screen | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | -| Danmaku | `block-render`:`danmaku` | Document Block: Display all blocks in this document as danmaku
Other Blocks: Display the block as danmaku | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Scroll Display | `block-render`:`scroll` | Document Block: Display vertical scrollbar for blocks that exceed a certain height in this document
Other Blocks: Display vertical scrollbar for the block if it exceeds a certain height | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Display Block ID | `block-render`:`id` | Document Block: Display block ID for all blocks in this document
Other Blocks: Display block ID for the block and its subblocks | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Display Block Index | `block-render`:`index` | Display the index of top-level blocks in the document | ✔ | | | | | | | | | | | | | | | | | -| Display Block Content | `block-render`:`content` | Document Block: Display hidden content for all blocks in this document
Other Blocks: Display hidden content for all blocks within the block
Display link address for hyperlinks
Display formula text for inline formulas
Display note text for inline notes
Display formula text for formula blocks
Display corresponding text for other renderable blocks | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | | | | | ✔ | | -| Display Block Outline | `block-render`:`outline` | Document Block: Display outline for all blocks in this document
Other Blocks: Display outline for this block | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Layout Mode | `block-writing-mode`:`vertical-rl`
`block-writing-mode`:`vertical-lr` | Document Block: Switch the writing mode for all blocks in this document
Other Blocks: Switch the writing mode for the block and its subblocks
`vertical-rl`: Display text vertically from right to left
`vertical-lr`: Display text vertically from left to right | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | ✔ | | | | | | | | | -| Table - Default Width | None | Default style
Columns in the table without manually adjusted width will not wrap | | | | | | | | | ✔ | | | | | | | | | -| Table - Auto Width | `block-table-width`:`auto` | Table maximum width is the same as the width of the document
Content in table cells wraps automatically | | | | | | | | | ✔ | | | | | | | | | -| Table - Equal Width | `block-table-width`:`equal` | All table cells have fixed width | | | | | | | | | ✔ | | | | | | | | | -| List - Default View | None | Default style
Document Block: Display all lists in this document as an outline
List Block: Display the list as an outline | | | ✔ | | | | | | | | | | | | | | | -| List - Mindmap View | `block-list-view`:`map` | Document Block: Display all lists in this document as a mind map
List Block: Display the list as a mind map | | | ✔ | | | | | | | | | | | | | | | -| List - Table View | `block-list-view`:`table` | Document Block: Display all lists in this document as a table
List Block: Display the list as a table | | | ✔ | | | | | | | | | | | | | | | -| List - Board View | `block-list-view`:`board` | Document Block: Display all lists in this document as a board
List Block: Display the list as a board | | | ✔ | | | | | | | | | | | | | | | +| Menu Item Name | Block Attribute | Function Introduction | Document Block | Super Block | Quote Block | List Block | List Item | Heading Block | Paragraph Block | Formula Block | Table Block | Code Block | HTML Block | Divider | Audio Block | Video Block | Iframe Block | Widget Block | Embed Block | +| --------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----------------------------------------------------------------------------: | :---------: | :---------: | :--------: | :-------: | :-----------: | :-------------: | :-----------: | :---------: | :--------: | :--------: | :-----: | :---------: | :---------: | :----------: | :----------: | :---------: | +| Block Style | `style` | Customize the `style` attribute of the block
For more details, please refer to: [style - HTML: HyperText Markup Language | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style) |
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Full Width | `block-width`:`full` | Set the width of the block to the width of the document | | | | | | | | | | | | | ✔ | ✔ | ✔ | ✔ | | +| Full Screen | None | Display the block in full screen | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Danmaku | `block-render`:`danmaku` | Document Block: Display all blocks in this document as danmaku
Other Blocks: Display the block as danmaku | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Scroll Display | `block-render`:`scroll` | Document Block: Display vertical scrollbar for blocks that exceed a certain height in this document
Other Blocks: Display vertical scrollbar for the block if it exceeds a certain height | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Display Block ID | `block-render`:`id` | Document Block: Display block ID for all blocks in this document
Other Blocks: Display block ID for the block and its subblocks | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Display Block Index | `block-render`:`index` | Display the index of top-level blocks in the document | ✔ | | | | | | | | | | | | | | | | | +| Display Block Content | `block-render`:`content` | Document Block: Display hidden content for all blocks in this document
Other Blocks: Display hidden content for all blocks within the block
Display link address for hyperlinks
Display formula text for inline formulas
Display note text for inline notes
Display formula text for formula blocks
Display corresponding text for other renderable blocks | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | | | |
| ✔ | +| Display Block Outline | `block-render`:`outline` | Document Block: Display outline for all blocks in this document
Other Blocks: Display outline for this block | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Layout Mode | `block-writing-mode`:`vertical-rl`
`block-writing-mode`:`vertical-lr` | Document Block: Switch the writing mode for all blocks in this document
Other Blocks: Switch the writing mode for the block and its subblocks
`vertical-rl`: Display text vertically from right to left
`vertical-lr`: Display text vertically from left to right | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | ✔ | | | | | | | | | +| Table - Default Width | None | Default style
Columns in the table without manually adjusted width will not wrap | | | | | | | | | ✔ | | | | | | | | | +| Table - Auto Width | `block-table-width`:`auto` | Table maximum width is the same as the width of the document
Content in table cells wraps automatically | | | | | | | | | ✔ | | | | | | | | | +| Table - Equal Width | `block-table-width`:`equal` | All table cells have fixed width |
| | | | | | | | ✔ | | | | | | | | | +| List - Default View | None | Default style
Document Block: Display all lists in this document as an outline
List Block: Display the list as an outline | ✔ | ✔ | ✔ | ✔ | | | | | | | | | | | | | ✔ | +| List - Mindmap View | `block-list-view`:`map` | Document Block: Display all lists in this document as a mind map
List Block: Display the list as a mind map | ✔ | ✔ | ✔ | ✔ | | | | | | | | | | | | | ✔ | +| List - Table View | `block-list-view`:`table` | Document Block: Display all lists in this document as a table
List Block: Display the list as a table | ✔ | ✔ | ✔ | ✔ | | | | | | | | | | | | | ✔ | +| List - Board View | `block-list-view`:`board` | Document Block: Display all lists in this document as a board
List Block: Display the list as a board | ✔ | ✔ | ✔ | ✔ | | | | | | | | | | | | | ✔ | ### Setting Introduction diff --git a/workspace/plugins/custom-block/public/README_zh_CN.md b/workspace/plugins/custom-block/public/README_zh_CN.md index 0af7c5a..4e2dec6 100644 --- a/workspace/plugins/custom-block/public/README_zh_CN.md +++ b/workspace/plugins/custom-block/public/README_zh_CN.md @@ -36,25 +36,25 @@ 使用 块菜单 \> 插件 > 自定义块样式 设置选中块所支持的样式。 -| 菜单项名称 | 块属性 | 功能介绍 | 文档块 | 超级块 | 引述块 | 列表块 | 列表项 | 标题块 | 段落块 | 公式块 | 表格块 | 代码块 | HTML 块 | 分割线 | 音频块 | 视频块 | iframe 块 | 挂件块 | 嵌入块 | -| --------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :-----: | :----: | :----: | :----: | :-------: | :----: | :----: | -| 块样式 | `style` | 自定义块的 `style` 属性
详情请参考: [style - HTML(超文本标记语言)\| MDN](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Global_attributes/style) | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| 全宽显示 | `block-width`:`full` | 设置该块的宽度为文档宽度 | | | | | | | | | | | | | ✔ | ✔ | ✔ | ✔ | | -| 全屏显示 | 无 | 全屏显示该块 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| 弹幕 | `block-render`:`danmaku` | 文档块: 该文档下所有块都以弹幕的形式显示
其他块: 以弹幕的形式显示该块 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| 滚屏显示 | `block-render`:`scroll` | 文档块: 该文档下所有过高的块都显示块内的纵向滚动条
其他块: 若该块高度过高则在块内显示纵向滚动条 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| 显示块 ID | `block-render`:`id` | 文档块: 该文档下所有块都在其下方显示块 ID
其他块: 该块及其下级块都在其下方显示块 ID | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| 显示块序号 | `block-render`:`index` | 显示文档下顶层块在文档中的序号 | ✔ | | | | | | | | | | | | | | | | | -| 显示块内容 | `block-render`:`content` | 文档块: 该文档下所有的块都显示隐藏的内容
其他块: 该块内所有的块都显示隐藏的内容
超链接显示链接地址
行内公式显示公式文本
行内备注显示备注文本
公式块显示公式文本
其他需要渲染的块显示对应的文本 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | | | | | ✔ | -| 显示块轮廓 | `block-render`:`outline` | 文档块: 该文档下所有块显示其轮廓
其他块: 显示该块轮廓 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| 排版模式 | `block-writing-mode`:`vertical-rl`
`block-writing-mode`:`vertical-lr`
| 文档块: 切换该文档下所有块的书写模式
其他块: 切换该块及其下级块的书写模式
`vertical-rl`: 从右向左竖排显示文本
`vertical-lr`: 从左向右竖排显示文本
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | ✔ | | | | | | | | | -| 表格-默认宽度 | 无 | 默认样式
表格中未手动调整宽度的列不会自动换行
| | | | | | | | | ✔ | | | | | | | | | -| 表格-自动宽度 | `block-table-width`:`auto` | 表格最大宽度与文档宽度一致
表格单元格中的内容自动换行 | | | | | | | | | ✔ | | | | | | | | | -| 表格-单元格等宽 | `block-table-width`:`equal` | 表格所有单元格宽度为固定值 | | | | | | | | | ✔ | | | | | | | | | -| 列表-默认视图 | 无 | 默认样式
文档块: 该文档下所有列表以大纲的样式显示
列表块: 以大纲的样式显示该列表
| ✔ | | | | ✔ | | | | | | | | | | | | | -| 列表-导图视图 | `block-list-view`:`map` | 文档块: 该文档下所有列表以思维导图的样式显示
列表块: 以思维导图的样式显示该列表
| ✔ | | | | ✔ | | | | | | | | | | | | | -| 列表-表格视图 | `block-list-view`:`table` | 文档块: 该文档下所有列表以表格的样式显示
列表块: 以表格的样式显示该列表
| ✔ | | | | ✔ | | | | | | | | | | | | | -| 列表-看板视图 | `block-list-view`:`board` | 文档块: 该文档下所有列表以看板的样式显示
列表块: 以看板的样式显示该列表
| ✔ | | | | ✔ | | | | | | | | | | | | | +| 菜单项名称 | 块属性 | 功能介绍 | 文档块 | 超级块 | 引述块 | 列表块 | 列表项 | 标题块 | 段落块 | 公式块 | 表格块 | 代码块 | HTML 块 | 分割线 | 音频块 | 视频块 | Iframe 块 | 挂件块 | 嵌入块 | +| --------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----------------------------------------------------------------------------: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :-----: | :----: | :----: | :----: | :-------: | :----: | :----: | +| 块样式 | `style` | 自定义块的 `style` 属性
详情请参考: [style - HTML(超文本标记语言) | MDN](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Global_attributes/style) | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| 全宽显示 | `block-width`:`full` | 设置该块的宽度为文档宽度 | | | | | | | | | | | | | ✔ | ✔ | ✔ | ✔ | | +| 全屏显示 | 无 | 全屏显示该块 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| 弹幕 | `block-render`:`danmaku` | 文档块: 该文档下所有块都以弹幕的形式显示
其他块: 以弹幕的形式显示该块 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| 滚屏显示 | `block-render`:`scroll` | 文档块: 该文档下所有过高的块都显示块内的纵向滚动条
其他块: 若该块高度过高则在块内显示纵向滚动条 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| 显示块 ID | `block-render`:`id` | 文档块: 该文档下所有块都在其下方显示块 ID
其他块: 该块及其下级块都在其下方显示块 ID | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| 显示块序号 | `block-render`:`index` | 显示文档下顶层块在文档中的序号 | ✔ | | | | | | | | | | | | | | | | | +| 显示块内容 | `block-render`:`content` | 文档块: 该文档下所有的块都显示隐藏的内容
其他块: 该块内所有的块都显示隐藏的内容
超链接显示链接地址
行内公式显示公式文本
行内备注显示备注文本
公式块显示公式文本
其他需要渲染的块显示对应的文本 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | | | | | ✔ | +| 显示块轮廓 | `block-render`:`outline` | 文档块: 该文档下所有块显示其轮廓
其他块: 显示该块轮廓 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| 排版模式 | `block-writing-mode`:`vertical-rl`
`block-writing-mode`:`vertical-lr`
| 文档块: 切换该文档下所有块的书写模式
其他块: 切换该块及其下级块的书写模式
`vertical-rl`: 从右向左竖排显示文本
`vertical-lr`: 从左向右竖排显示文本
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | ✔ | | | | | | | | | +| 表格-默认宽度 | 无 | 默认样式
表格中未手动调整宽度的列不会自动换行
| | | | | | | | | ✔ | | | | | | | | | +| 表格-自动宽度 | `block-table-width`:`auto` | 表格最大宽度与文档宽度一致
表格单元格中的内容自动换行 | | | | | | | | | ✔ | | | | | | | | | +| 表格-单元格等宽 | `block-table-width`:`equal` | 表格所有单元格宽度为固定值 | | | | | | | | | ✔ | | | | | | | | | +| 列表-默认视图 | 无 | 默认样式
文档块: 该文档下所有列表以大纲的样式显示
列表块: 以大纲的样式显示该列表
| ✔ | ✔ | ✔ | ✔ |
| | | | | | | | | | | | ✔ | +| 列表-导图视图 | `block-list-view`:`map` | 文档块: 该文档下所有列表以思维导图的样式显示
列表块: 以思维导图的样式显示该列表
| ✔ | ✔ | ✔ | ✔ |
| | | | | | | | | | | | ✔ | +| 列表-表格视图 | `block-list-view`:`table` | 文档块: 该文档下所有列表以表格的样式显示
列表块: 以表格的样式显示该列表
| ✔ | ✔ | ✔ | ✔ |
| | | | | | | | | | | | ✔ | +| 列表-看板视图 | `block-list-view`:`board` | 文档块: 该文档下所有列表以看板的样式显示
列表块: 以看板的样式显示该列表
| ✔ | ✔ | ✔ | ✔ |
| | | | | | | | | | | | ✔ | ### 设置项介绍 diff --git a/workspace/plugins/custom-block/src/configs/default.ts b/workspace/plugins/custom-block/src/configs/default.ts index af6ea16..1964a16 100644 --- a/workspace/plugins/custom-block/src/configs/default.ts +++ b/workspace/plugins/custom-block/src/configs/default.ts @@ -206,7 +206,7 @@ export const DEFAULT_CONFIG: IConfig = { [sdk.siyuan.NodeType.NodeList]: { enable: true }, [sdk.siyuan.NodeType.NodeListItem]: { enable: true }, [sdk.siyuan.NodeType.NodeSuperBlock]: { enable: true }, - + [sdk.siyuan.NodeType.NodeBlockQueryEmbed]: { enable: true }, [sdk.siyuan.NodeType.NodeHeading]: { enable: true }, [sdk.siyuan.NodeType.NodeParagraph]: { enable: true }, @@ -371,7 +371,10 @@ export const DEFAULT_CONFIG: IConfig = { type: { default: { enable: false }, [sdk.siyuan.NodeType.NodeDocument]: { enable: true }, + [sdk.siyuan.NodeType.NodeSuperBlock]: { enable: true }, [sdk.siyuan.NodeType.NodeList]: { enable: true }, + [sdk.siyuan.NodeType.NodeBlockquote]: { enable: true }, + [sdk.siyuan.NodeType.NodeBlockQueryEmbed]: { enable: true }, }, }, { // 列表-默认视图 @@ -379,12 +382,15 @@ export const DEFAULT_CONFIG: IConfig = { enable: true, mode: MenuItemMode.button, multi: true, - icon: "iconUndo", + icon: "iconList", accelerator: "list-view: null", type: { default: { enable: false }, [sdk.siyuan.NodeType.NodeDocument]: { enable: true }, + [sdk.siyuan.NodeType.NodeSuperBlock]: { enable: true }, [sdk.siyuan.NodeType.NodeList]: { enable: true }, + [sdk.siyuan.NodeType.NodeBlockquote]: { enable: true }, + [sdk.siyuan.NodeType.NodeBlockQueryEmbed]: { enable: true }, }, tasks: [ { @@ -407,7 +413,10 @@ export const DEFAULT_CONFIG: IConfig = { type: { default: { enable: false }, [sdk.siyuan.NodeType.NodeDocument]: { enable: true }, + [sdk.siyuan.NodeType.NodeSuperBlock]: { enable: true }, [sdk.siyuan.NodeType.NodeList]: { enable: true }, + [sdk.siyuan.NodeType.NodeBlockquote]: { enable: true }, + [sdk.siyuan.NodeType.NodeBlockQueryEmbed]: { enable: true }, }, tasks: [ { @@ -431,7 +440,10 @@ export const DEFAULT_CONFIG: IConfig = { type: { default: { enable: false }, [sdk.siyuan.NodeType.NodeDocument]: { enable: true }, + [sdk.siyuan.NodeType.NodeSuperBlock]: { enable: true }, [sdk.siyuan.NodeType.NodeList]: { enable: true }, + [sdk.siyuan.NodeType.NodeBlockquote]: { enable: true }, + [sdk.siyuan.NodeType.NodeBlockQueryEmbed]: { enable: true }, }, tasks: [ { @@ -455,7 +467,10 @@ export const DEFAULT_CONFIG: IConfig = { type: { default: { enable: false }, [sdk.siyuan.NodeType.NodeDocument]: { enable: true }, + [sdk.siyuan.NodeType.NodeSuperBlock]: { enable: true }, [sdk.siyuan.NodeType.NodeList]: { enable: true }, + [sdk.siyuan.NodeType.NodeBlockquote]: { enable: true }, + [sdk.siyuan.NodeType.NodeBlockQueryEmbed]: { enable: true }, }, tasks: [ { diff --git a/workspace/plugins/custom-block/src/styles/custom-block-list-view-map.less b/workspace/plugins/custom-block/src/styles/custom-block-list-view-map.less index e4bdb4c..4bf774f 100644 --- a/workspace/plugins/custom-block/src/styles/custom-block-list-view-map.less +++ b/workspace/plugins/custom-block/src/styles/custom-block-list-view-map.less @@ -61,30 +61,54 @@ } [data-node-id] { + // 列表块 + &.list { + /* 整个导图列表取消缩进 */ + margin: 0; + padding: 0 0 0 1em; + + /* 竖直居中 */ + display: flex; + flex-direction: column; + justify-content: center; + + &::after { + /* 后继承线 */ + content: ""; + position: absolute; + left: -1em; + top: @height; + border-bottom: var(--custom-block-list-guides-line-width) solid var(--b3-theme-on-surface); + width: 2em; + height: 0; + } + } + + // 列表项块 &.li { /* 列表项文字设置居中 */ display: flex; - align-items: center; + // align-items: center; - &:first-of-type::after, - &:nth-last-of-type(2)::before { + &:first-child::after, + &:nth-last-child(2)::before { /* 取消多余线条 */ border: none !important; } - &:first-of-type::before { + &:first-child::before { /* 上框线 */ border-top-left-radius: var(--custom-block-border-radius); } - &:nth-last-of-type(2)::after { + &:nth-last-child(2)::after { /* 下框线 */ // height: calc(50% - var(--custom-block-list-guides-line-width) / 2); border-bottom: var(--custom-block-list-guides-line-width) solid var(--b3-theme-on-surface) !important; border-bottom-left-radius: var(--custom-block-border-radius) !important; } - &:first-of-type:nth-last-of-type(2) { + &:first-child:nth-last-child(2) { // 单子项居中 // top: 50%; // transform: translate(0, -50%); @@ -163,23 +187,26 @@ /* 块内边距 */ padding: 4px; - /* 叶子节点的轮廓 */ - outline: 1px solid var(--b3-theme-on-surface); - border-radius: var(--custom-block-border-radius); + // 叶子节点的轮廓 - // 文字框 - &:is(.p, .h1, .h2, .h3, .h4, .h5, .h6) { + // 段落块 & 标题块 + &[data-type="NodeParagraph"], + &[data-type="NodeHeading"] { /* 段落块/标题块内边距为 0 */ padding: 0; >[contenteditable][spellcheck] { white-space: pre; // 保留换行 padding: 0 0.5em; + + border-radius: var(--custom-block-border-radius); + outline: 1px solid var(--b3-theme-on-surface); + min-width: var(--custom-block-list-view-map-min-width); } } // 公式块 - &:is(.render-node[data-type="NodeMathBlock"]) { + &[data-type="NodeMathBlock"] { min-height: 0 !important; .katex-display { @@ -187,6 +214,12 @@ padding: 0.25em; } } + + // 其他块 + &:not([data-type="NodeParagraph"], [data-type="NodeHeading"], [data-type="NodeMathBlock"]) { + outline: 1px solid var(--b3-theme-on-surface); + border-radius: var(--custom-block-border-radius); + } } &[data-type="NodeBlockQueryEmbed"], @@ -196,34 +229,7 @@ display: block; } } - } - - &.list { - /* 整个导图列表取消缩进 */ - margin: 0; - padding: 0 0 0 1em; - // transition: all 500ms; - - &::after { - /* 后继承线 */ - content: ""; - position: absolute; - left: -1em; - top: @height; - border-bottom: var(--custom-block-list-guides-line-width) solid var(--b3-theme-on-surface); - width: 2em; - height: 0; - } - } - } - - &.list>[data-node-id].li:first-of-type:nth-last-of-type(2), - &>[data-node-id].list>[data-node-id].li:first-of-type:nth-last-of-type(2), - [data-node-id]:not(.li)>[data-node-id].list>[data-node-id].li:first-of-type:nth-last-of-type(2) { - /* 修复顶层列表项错位问题 */ - top: 0; - transform: none; } } } diff --git a/workspace/plugins/custom-block/src/styles/define.less b/workspace/plugins/custom-block/src/styles/define.less index 3514e8e..8288ad3 100644 --- a/workspace/plugins/custom-block/src/styles/define.less +++ b/workspace/plugins/custom-block/src/styles/define.less @@ -34,6 +34,9 @@ /* 列表表格视图 - 表格项最小宽度 */ --custom-block-list-view-table-min-width: 8em; + + /* 列表导图视图 - 列表项最小宽度 */ + --custom-block-list-view-map-min-width: 2em; } /* 弹幕滚动动画 */ From b671b099d65c91df05106bc7c36c36d51f2f5c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Tue, 11 Jul 2023 17:20:32 +0800 Subject: [PATCH 005/113] =?UTF-8?q?build:=20=E6=9B=B4=E6=96=B0=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E9=A1=B9=20|=20Update=20dependencies.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + workspace/pnpm-lock.yaml | 296 ++++++++---------- .../tools/eslint-config-custom/package.json | 8 +- .../tools/vite-config-custom/package.json | 2 +- 4 files changed, 140 insertions(+), 167 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2dc3e5..97a3a0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - 实现 monaco 编辑器初始化 | Implement monaco editor initialization. - 优化列表导图视图 | Optimize list mind-map view. +- 更新依赖项 | Update dependencies. ## 2023-07-10 diff --git a/workspace/pnpm-lock.yaml b/workspace/pnpm-lock.yaml index e2a86a2..55a53dd 100644 --- a/workspace/pnpm-lock.yaml +++ b/workspace/pnpm-lock.yaml @@ -346,23 +346,23 @@ importers: tools/eslint-config-custom: devDependencies: '@typescript-eslint/eslint-plugin': - specifier: ^5.60.0 - version: 5.60.0(@typescript-eslint/parser@5.60.0)(eslint@8.44.0)(typescript@5.1.6) + specifier: ^6.0.0 + version: 6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.44.0)(typescript@5.1.6) '@typescript-eslint/parser': - specifier: ^5.60.0 - version: 5.60.0(eslint@8.44.0)(typescript@5.1.6) + specifier: ^6.0.0 + version: 6.0.0(eslint@8.44.0)(typescript@5.1.6) eslint-config-prettier: specifier: ^8.8.0 version: 8.8.0(eslint@8.44.0) eslint-config-turbo: - specifier: ^1.10.6 - version: 1.10.6(eslint@8.44.0) + specifier: ^1.10.7 + version: 1.10.7(eslint@8.44.0) eslint-plugin-svelte3: specifier: ^4.0.0 version: 4.0.0(eslint@8.44.0)(svelte@3.59.2) eslint-plugin-vue: - specifier: ^9.15.0 - version: 9.15.0(eslint@8.44.0) + specifier: ^9.15.1 + version: 9.15.1(eslint@8.44.0) tools/tsconfig: {} @@ -370,13 +370,13 @@ importers: dependencies: '@sveltejs/vite-plugin-svelte': specifier: ^2.4.2 - version: 2.4.2(svelte@4.0.5)(vite@4.3.9) + version: 2.4.2(svelte@4.0.5)(vite@4.4.2) '@vitejs/plugin-vue': specifier: ^4.2.3 - version: 4.2.3(vite@4.3.9)(vue@3.3.4) + version: 4.2.3(vite@4.4.2)(vue@3.3.4) vite: - specifier: ^4.3.9 - version: 4.3.9(less@4.1.3) + specifier: ^4.4.2 + version: 4.4.2(@types/node@20.4.1)(less@4.1.3) widgets/metadata: dependencies: @@ -502,6 +502,7 @@ packages: cpu: [arm64] os: [android] requiresBuild: true + dev: true optional: true /@esbuild/android-arm64@0.18.11: @@ -510,7 +511,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-arm@0.17.19: @@ -519,6 +519,7 @@ packages: cpu: [arm] os: [android] requiresBuild: true + dev: true optional: true /@esbuild/android-arm@0.18.11: @@ -527,7 +528,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/android-x64@0.17.19: @@ -536,6 +536,7 @@ packages: cpu: [x64] os: [android] requiresBuild: true + dev: true optional: true /@esbuild/android-x64@0.18.11: @@ -544,7 +545,6 @@ packages: cpu: [x64] os: [android] requiresBuild: true - dev: true optional: true /@esbuild/darwin-arm64@0.17.19: @@ -553,6 +553,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /@esbuild/darwin-arm64@0.18.11: @@ -561,7 +562,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/darwin-x64@0.17.19: @@ -570,6 +570,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /@esbuild/darwin-x64@0.18.11: @@ -578,7 +579,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-arm64@0.17.19: @@ -587,6 +587,7 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true + dev: true optional: true /@esbuild/freebsd-arm64@0.18.11: @@ -595,7 +596,6 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/freebsd-x64@0.17.19: @@ -604,6 +604,7 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true + dev: true optional: true /@esbuild/freebsd-x64@0.18.11: @@ -612,7 +613,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm64@0.17.19: @@ -621,6 +621,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-arm64@0.18.11: @@ -629,7 +630,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-arm@0.17.19: @@ -638,6 +638,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-arm@0.18.11: @@ -646,7 +647,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ia32@0.17.19: @@ -655,6 +655,7 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-ia32@0.18.11: @@ -663,7 +664,6 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-loong64@0.17.19: @@ -672,6 +672,7 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-loong64@0.18.11: @@ -680,7 +681,6 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-mips64el@0.17.19: @@ -689,6 +689,7 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-mips64el@0.18.11: @@ -697,7 +698,6 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-ppc64@0.17.19: @@ -706,6 +706,7 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-ppc64@0.18.11: @@ -714,7 +715,6 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-riscv64@0.17.19: @@ -723,6 +723,7 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-riscv64@0.18.11: @@ -731,7 +732,6 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-s390x@0.17.19: @@ -740,6 +740,7 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-s390x@0.18.11: @@ -748,7 +749,6 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/linux-x64@0.17.19: @@ -757,6 +757,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /@esbuild/linux-x64@0.18.11: @@ -765,7 +766,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@esbuild/netbsd-x64@0.17.19: @@ -774,6 +774,7 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true + dev: true optional: true /@esbuild/netbsd-x64@0.18.11: @@ -782,7 +783,6 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true - dev: true optional: true /@esbuild/openbsd-x64@0.17.19: @@ -791,6 +791,7 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true + dev: true optional: true /@esbuild/openbsd-x64@0.18.11: @@ -799,7 +800,6 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true - dev: true optional: true /@esbuild/sunos-x64@0.17.19: @@ -808,6 +808,7 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true + dev: true optional: true /@esbuild/sunos-x64@0.18.11: @@ -816,7 +817,6 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true - dev: true optional: true /@esbuild/win32-arm64@0.17.19: @@ -825,6 +825,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true /@esbuild/win32-arm64@0.18.11: @@ -833,7 +834,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-ia32@0.17.19: @@ -842,6 +842,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true /@esbuild/win32-ia32@0.18.11: @@ -850,7 +851,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@esbuild/win32-x64@0.17.19: @@ -859,6 +859,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /@esbuild/win32-x64@0.18.11: @@ -867,7 +868,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@eslint-community/eslint-utils@4.4.0(eslint@8.44.0): @@ -1249,22 +1249,6 @@ packages: - supports-color dev: true - /@sveltejs/vite-plugin-svelte-inspector@1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.0.5)(vite@4.3.9): - resolution: {integrity: sha512-Khdl5jmmPN6SUsVuqSXatKpQTMIifoQPDanaxC84m9JxIibWvSABJyHpyys0Z+1yYrxY5TTEQm+6elh0XCMaOA==} - engines: {node: ^14.18.0 || >= 16} - peerDependencies: - '@sveltejs/vite-plugin-svelte': ^2.2.0 - svelte: ^3.54.0 || ^4.0.0 - vite: ^4.0.0 - dependencies: - '@sveltejs/vite-plugin-svelte': 2.4.2(svelte@4.0.5)(vite@4.3.9) - debug: 4.3.4 - svelte: 4.0.5 - vite: 4.3.9(less@4.1.3) - transitivePeerDependencies: - - supports-color - dev: false - /@sveltejs/vite-plugin-svelte-inspector@1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.0.5)(vite@4.4.2): resolution: {integrity: sha512-Khdl5jmmPN6SUsVuqSXatKpQTMIifoQPDanaxC84m9JxIibWvSABJyHpyys0Z+1yYrxY5TTEQm+6elh0XCMaOA==} engines: {node: ^14.18.0 || >= 16} @@ -1279,7 +1263,6 @@ packages: vite: 4.4.2(@types/node@20.4.1)(less@4.1.3) transitivePeerDependencies: - supports-color - dev: true /@sveltejs/vite-plugin-svelte@2.4.2(svelte@3.59.2)(vite@4.4.2): resolution: {integrity: sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==} @@ -1321,26 +1304,6 @@ packages: - supports-color dev: true - /@sveltejs/vite-plugin-svelte@2.4.2(svelte@4.0.5)(vite@4.3.9): - resolution: {integrity: sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==} - engines: {node: ^14.18.0 || >= 16} - peerDependencies: - svelte: ^3.54.0 || ^4.0.0 - vite: ^4.0.0 - dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.0.5)(vite@4.3.9) - debug: 4.3.4 - deepmerge: 4.3.1 - kleur: 4.1.5 - magic-string: 0.30.1 - svelte: 4.0.5 - svelte-hmr: 0.15.2(svelte@4.0.5) - vite: 4.3.9(less@4.1.3) - vitefu: 0.2.4(vite@4.3.9) - transitivePeerDependencies: - - supports-color - dev: false - /@sveltejs/vite-plugin-svelte@2.4.2(svelte@4.0.5)(vite@4.4.2): resolution: {integrity: sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==} engines: {node: ^14.18.0 || >= 16} @@ -1359,7 +1322,6 @@ packages: vitefu: 0.2.4(vite@4.4.2) transitivePeerDependencies: - supports-color - dev: true /@tsconfig/svelte@4.0.1: resolution: {integrity: sha512-B+XlGpmuAQzJqDoBATNCvEPqQg0HkO7S8pM14QDI5NsmtymzRexQ1N+nX2H6RTtFbuFgaZD4I8AAi8voGg0GLg==} @@ -1403,7 +1365,6 @@ packages: /@types/node@20.4.1: resolution: {integrity: sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==} - dev: true /@types/prettier@2.7.3: resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} @@ -1424,47 +1385,51 @@ packages: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} dev: true - /@typescript-eslint/eslint-plugin@5.60.0(@typescript-eslint/parser@5.60.0)(eslint@8.44.0)(typescript@5.1.6): - resolution: {integrity: sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/eslint-plugin@6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.44.0)(typescript@5.1.6): + resolution: {integrity: sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.60.0(eslint@8.44.0)(typescript@5.1.6) - '@typescript-eslint/scope-manager': 5.60.0 - '@typescript-eslint/type-utils': 5.60.0(eslint@8.44.0)(typescript@5.1.6) - '@typescript-eslint/utils': 5.60.0(eslint@8.44.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.0.0(eslint@8.44.0)(typescript@5.1.6) + '@typescript-eslint/scope-manager': 6.0.0 + '@typescript-eslint/type-utils': 6.0.0(eslint@8.44.0)(typescript@5.1.6) + '@typescript-eslint/utils': 6.0.0(eslint@8.44.0)(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.0.0 debug: 4.3.4 eslint: 8.44.0 grapheme-splitter: 1.0.4 + graphemer: 1.4.0 ignore: 5.2.4 + natural-compare: 1.4.0 natural-compare-lite: 1.4.0 - semver: 7.5.2 - tsutils: 3.21.0(typescript@5.1.6) + semver: 7.5.4 + ts-api-utils: 1.0.1(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@5.60.0(eslint@8.44.0)(typescript@5.1.6): - resolution: {integrity: sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/parser@6.0.0(eslint@8.44.0)(typescript@5.1.6): + resolution: {integrity: sha512-TNaufYSPrr1U8n+3xN+Yp9g31vQDJqhXzzPSHfQDLcaO4tU+mCfODPxCwf4H530zo7aUBE3QIdxCXamEnG04Tg==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.60.0 - '@typescript-eslint/types': 5.60.0 - '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.1.6) + '@typescript-eslint/scope-manager': 6.0.0 + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.0.0 debug: 4.3.4 eslint: 8.44.0 typescript: 5.1.6 @@ -1472,85 +1437,85 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@5.60.0: - resolution: {integrity: sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/scope-manager@6.0.0: + resolution: {integrity: sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==} + engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 5.60.0 - '@typescript-eslint/visitor-keys': 5.60.0 + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/visitor-keys': 6.0.0 dev: true - /@typescript-eslint/type-utils@5.60.0(eslint@8.44.0)(typescript@5.1.6): - resolution: {integrity: sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/type-utils@6.0.0(eslint@8.44.0)(typescript@5.1.6): + resolution: {integrity: sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: '*' + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.1.6) - '@typescript-eslint/utils': 5.60.0(eslint@8.44.0)(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6) + '@typescript-eslint/utils': 6.0.0(eslint@8.44.0)(typescript@5.1.6) debug: 4.3.4 eslint: 8.44.0 - tsutils: 3.21.0(typescript@5.1.6) + ts-api-utils: 1.0.1(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@5.60.0: - resolution: {integrity: sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/types@6.0.0: + resolution: {integrity: sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==} + engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@5.60.0(typescript@5.1.6): - resolution: {integrity: sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/typescript-estree@6.0.0(typescript@5.1.6): + resolution: {integrity: sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.60.0 - '@typescript-eslint/visitor-keys': 5.60.0 + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/visitor-keys': 6.0.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.3 - tsutils: 3.21.0(typescript@5.1.6) + semver: 7.5.4 + ts-api-utils: 1.0.1(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.60.0(eslint@8.44.0)(typescript@5.1.6): - resolution: {integrity: sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/utils@6.0.0(eslint@8.44.0)(typescript@5.1.6): + resolution: {integrity: sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.60.0 - '@typescript-eslint/types': 5.60.0 - '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.1.6) + '@typescript-eslint/scope-manager': 6.0.0 + '@typescript-eslint/types': 6.0.0 + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6) eslint: 8.44.0 eslint-scope: 5.1.1 - semver: 7.5.3 + semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@5.60.0: - resolution: {integrity: sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/visitor-keys@6.0.0: + resolution: {integrity: sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==} + engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 5.60.0 + '@typescript-eslint/types': 6.0.0 eslint-visitor-keys: 3.4.1 dev: true @@ -1563,6 +1528,18 @@ packages: dependencies: vite: 4.3.9(less@4.1.3) vue: 3.3.4 + dev: true + + /@vitejs/plugin-vue@4.2.3(vite@4.4.2)(vue@3.3.4): + resolution: {integrity: sha512-R6JDUfiZbJA9cMiguQ7jxALsgiprjBeHL5ikpXfJCH62pPHtI+JdJ5xWj6Ev73yXSlYl86+blXn1kZHQ7uElxw==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.0.0 + vue: ^3.2.25 + dependencies: + vite: 4.4.2(@types/node@20.4.1)(less@4.1.3) + vue: 3.3.4 + dev: false /@vitest/expect@0.32.2: resolution: {integrity: sha512-6q5yzweLnyEv5Zz1fqK5u5E83LU+gOMVBDuxBl2d2Jfx1BAp5M+rZgc5mlyqdnxquyoiOXpXmFNkcGcfFnFH3Q==} @@ -1646,7 +1623,7 @@ packages: '@vue/shared': 3.3.4 estree-walker: 2.0.2 magic-string: 0.30.1 - postcss: 8.4.24 + postcss: 8.4.25 source-map-js: 1.0.2 /@vue/compiler-ssr@3.3.4: @@ -2044,7 +2021,7 @@ packages: js-string-escape: 1.0.1 lodash: 4.17.21 md5-hex: 3.0.1 - semver: 7.5.3 + semver: 7.5.4 well-known-symbols: 2.0.0 dev: true @@ -2249,6 +2226,7 @@ packages: '@esbuild/win32-arm64': 0.17.19 '@esbuild/win32-ia32': 0.17.19 '@esbuild/win32-x64': 0.17.19 + dev: true /esbuild@0.18.11: resolution: {integrity: sha512-i8u6mQF0JKJUlGR3OdFLKldJQMMs8OqM9Cc3UCi9XXziJ9WERM5bfkHaEAy0YAvPRMgqSW55W7xYn84XtEFTtA==} @@ -2278,7 +2256,6 @@ packages: '@esbuild/win32-arm64': 0.18.11 '@esbuild/win32-ia32': 0.18.11 '@esbuild/win32-x64': 0.18.11 - dev: true /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} @@ -2294,13 +2271,13 @@ packages: eslint: 8.44.0 dev: true - /eslint-config-turbo@1.10.6(eslint@8.44.0): - resolution: {integrity: sha512-iZ63etePRUdEIDY5MxdUhU2ekV9TDbVdHg0BK00QqVFgQTXUYuJ7rsQj/wUKTsw3jwhbLfaY6H5sknAgYyWZ2g==} + /eslint-config-turbo@1.10.7(eslint@8.44.0): + resolution: {integrity: sha512-0yHt5UlXVph8S4SOvP6gYehLvYjJj6XFKTYOG/WUQbjlcF0OU4pOT1a1juqmmBPWYlvJ0evt7v+RekY4tOopPQ==} peerDependencies: eslint: '>6.6.0' dependencies: eslint: 8.44.0 - eslint-plugin-turbo: 1.10.6(eslint@8.44.0) + eslint-plugin-turbo: 1.10.7(eslint@8.44.0) dev: true /eslint-plugin-svelte3@4.0.0(eslint@8.44.0)(svelte@3.59.2): @@ -2313,8 +2290,8 @@ packages: svelte: 3.59.2 dev: true - /eslint-plugin-turbo@1.10.6(eslint@8.44.0): - resolution: {integrity: sha512-jlzfxYaK8hcz1DTk8Glxxi1r0kgdy85191a4CbFOTiiBulmKHMLJgzhsyE9Ong796MA62n91KFpc20BiKjlHwg==} + /eslint-plugin-turbo@1.10.7(eslint@8.44.0): + resolution: {integrity: sha512-YikBHc75DY9VV1vAFUIBekHLQlxqVT5zTNibK8zBQInCUhF7PvyPJc0xXw5FSz8EYtt4uOV3r0Km3CmFRclS4Q==} peerDependencies: eslint: '>6.6.0' dependencies: @@ -2322,8 +2299,8 @@ packages: eslint: 8.44.0 dev: true - /eslint-plugin-vue@9.15.0(eslint@8.44.0): - resolution: {integrity: sha512-XYzpK6e2REli100+6iCeBA69v6Sm0D/yK2FZP+fCeNt0yH/m82qZQq+ztseyV0JsKdhFysuSEzeE1yCmSC92BA==} + /eslint-plugin-vue@9.15.1(eslint@8.44.0): + resolution: {integrity: sha512-CJE/oZOslvmAR9hf8SClTdQ9JLweghT6JCBQNrT2Iel1uVw0W0OLJxzvPd6CxmABKCvLrtyDnqGV37O7KQv6+A==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 @@ -2333,7 +2310,7 @@ packages: natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.0.13 - semver: 7.5.2 + semver: 7.5.4 vue-eslint-parser: 9.3.1(eslint@8.44.0) xml-name-validator: 4.0.0 transitivePeerDependencies: @@ -2987,7 +2964,7 @@ packages: requiresBuild: true dependencies: pify: 4.0.1 - semver: 5.7.1 + semver: 5.7.2 optional: true /md5-hex@3.0.1: @@ -3302,6 +3279,7 @@ packages: nanoid: 3.3.6 picocolors: 1.0.0 source-map-js: 1.0.2 + dev: true /postcss@8.4.25: resolution: {integrity: sha512-7taJ/8t2av0Z+sQEvNzCkpDynl0tX3uJMCODi6nT3PfASC7dYCWV9aQ+uiCf+KBD4SEFcu+GvJdGdwzQ6OSjCw==} @@ -3310,7 +3288,6 @@ packages: nanoid: 3.3.6 picocolors: 1.0.0 source-map-js: 1.0.2 - dev: true /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -3418,6 +3395,7 @@ packages: hasBin: true optionalDependencies: fsevents: 2.3.2 + dev: true /rollup@3.26.2: resolution: {integrity: sha512-6umBIGVz93er97pMgQO08LuH3m6PUb3jlDUUGFsNJB6VgTCUaDFpupf5JfU30529m/UKOgmiX+uY6Sx8cOYpLA==} @@ -3425,7 +3403,6 @@ packages: hasBin: true optionalDependencies: fsevents: 2.3.2 - dev: true /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -3473,21 +3450,21 @@ packages: compute-scroll-into-view: 1.0.20 dev: true - /semver@5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true optional: true - /semver@7.5.2: - resolution: {integrity: sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==} + /semver@7.5.3: + resolution: {integrity: sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==} engines: {node: '>=10'} hasBin: true dependencies: lru-cache: 6.0.0 dev: true - /semver@7.5.3: - resolution: {integrity: sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==} + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} hasBin: true dependencies: @@ -3913,27 +3890,22 @@ packages: is-number: 7.0.0 dev: true - /ts-toolbelt@9.6.0: - resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==} + /ts-api-utils@1.0.1(typescript@5.1.6): + resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.1.6 dev: true - /tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + /ts-toolbelt@9.6.0: + resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==} dev: true /tslib@2.6.0: resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} - /tsutils@3.21.0(typescript@5.1.6): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.1.6 - dev: true - /turbo-darwin-64@1.10.7: resolution: {integrity: sha512-N2MNuhwrl6g7vGuz4y3fFG2aR1oCs0UZ5HKl8KSTn/VC2y2YIuLGedQ3OVbo0TfEvygAlF3QGAAKKtOCmGPNKA==} cpu: [x64] @@ -4162,6 +4134,7 @@ packages: rollup: 3.26.0 optionalDependencies: fsevents: 2.3.2 + dev: true /vite@4.4.2(@types/node@20.4.1)(less@4.1.3): resolution: {integrity: sha512-zUcsJN+UvdSyHhYa277UHhiJ3iq4hUBwHavOpsNUGsTgjBeoBlK8eDt+iT09pBq0h9/knhG/SPrZiM7cGmg7NA==} @@ -4198,7 +4171,6 @@ packages: rollup: 3.26.2 optionalDependencies: fsevents: 2.3.2 - dev: true /vitefu@0.2.4(vite@4.3.9): resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} @@ -4209,6 +4181,7 @@ packages: optional: true dependencies: vite: 4.3.9(less@4.1.3) + dev: true /vitefu@0.2.4(vite@4.4.2): resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} @@ -4219,7 +4192,6 @@ packages: optional: true dependencies: vite: 4.4.2(@types/node@20.4.1)(less@4.1.3) - dev: true /vitest@0.32.2: resolution: {integrity: sha512-hU8GNNuQfwuQmqTLfiKcqEhZY72Zxb7nnN07koCUNmntNxbKQnVbeIS6sqUgR3eXSlbOpit8+/gr1KpqoMgWCQ==} @@ -4300,7 +4272,7 @@ packages: espree: 9.6.0 esquery: 1.5.0 lodash: 4.17.21 - semver: 7.5.3 + semver: 7.5.4 transitivePeerDependencies: - supports-color dev: true diff --git a/workspace/tools/eslint-config-custom/package.json b/workspace/tools/eslint-config-custom/package.json index 8db0539..c260f80 100644 --- a/workspace/tools/eslint-config-custom/package.json +++ b/workspace/tools/eslint-config-custom/package.json @@ -7,11 +7,11 @@ "access": "public" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^5.60.0", - "@typescript-eslint/parser": "^5.60.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", "eslint-config-prettier": "^8.8.0", - "eslint-config-turbo": "^1.10.6", + "eslint-config-turbo": "^1.10.7", "eslint-plugin-svelte3": "^4.0.0", - "eslint-plugin-vue": "^9.15.0" + "eslint-plugin-vue": "^9.15.1" } } diff --git a/workspace/tools/vite-config-custom/package.json b/workspace/tools/vite-config-custom/package.json index 71bc323..7c41f64 100644 --- a/workspace/tools/vite-config-custom/package.json +++ b/workspace/tools/vite-config-custom/package.json @@ -8,6 +8,6 @@ "dependencies": { "@sveltejs/vite-plugin-svelte": "^2.4.2", "@vitejs/plugin-vue": "^4.2.3", - "vite": "^4.3.9" + "vite": "^4.4.2" } } From b0aae09e217a87b773e4e24e2040c7ce1a6e538f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Tue, 11 Jul 2023 17:21:46 +0800 Subject: [PATCH 006/113] chore(custom-block): release v1.0.1 --- workspace/plugins/custom-block/package.json | 2 +- workspace/plugins/custom-block/public/plugin.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/workspace/plugins/custom-block/package.json b/workspace/plugins/custom-block/package.json index a4d1344..a81456d 100644 --- a/workspace/plugins/custom-block/package.json +++ b/workspace/plugins/custom-block/package.json @@ -1,7 +1,7 @@ { "name": "custom-block", "private": true, - "version": "1.0.0", + "version": "1.0.1", "type": "module", "scripts": { "dev": "vite", diff --git a/workspace/plugins/custom-block/public/plugin.json b/workspace/plugins/custom-block/public/plugin.json index a1d92c4..6c21beb 100644 --- a/workspace/plugins/custom-block/public/plugin.json +++ b/workspace/plugins/custom-block/public/plugin.json @@ -2,7 +2,7 @@ "name": "custom-block", "author": "Zuoqiu Yingyi", "url": "https://github.com/Zuoqiu-Yingyi/siyuan-plugin-custom-block", - "version": "1.0.0", + "version": "1.0.1", "minAppVersion": "2.9.0", "backends": [ "all" From 87d7af974a0205af8a877858c50a297115255161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Tue, 11 Jul 2023 19:15:17 +0800 Subject: [PATCH 007/113] =?UTF-8?q?feat(custom-block):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=87=8D=E7=BD=AE=E8=AE=BE=E7=BD=AE=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=AF=B9=E8=AF=9D=E6=A1=86=20|=20Add=20reset?= =?UTF-8?q?=20settings=20option=20prompt=20dialog.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + workspace/packages/utils/misc/version.ts | 49 +++++++++++++++++++ .../custom-block/public/i18n/en_US.json | 6 +++ .../custom-block/public/i18n/zh_CHT.json | 6 +++ .../custom-block/public/i18n/zh_CN.json | 6 +++ .../custom-block/src/configs/default.ts | 2 + workspace/plugins/custom-block/src/index.ts | 13 +++++ .../custom-block/src/types/config.d.ts | 1 + 8 files changed, 84 insertions(+) create mode 100644 workspace/packages/utils/misc/version.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 97a3a0b..a56a56c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - 实现 monaco 编辑器初始化 | Implement monaco editor initialization. - 优化列表导图视图 | Optimize list mind-map view. - 更新依赖项 | Update dependencies. +- 添加重置设置选项提示对话框 | Add reset settings option prompt dialog. ## 2023-07-10 diff --git a/workspace/packages/utils/misc/version.ts b/workspace/packages/utils/misc/version.ts new file mode 100644 index 0000000..4e247f5 --- /dev/null +++ b/workspace/packages/utils/misc/version.ts @@ -0,0 +1,49 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +/* 版本号 */ + +/** + * 判断版本号是否为语义化的版本号 + * REF: https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string + * @param version: 语义化的版本号字符串 + */ +export function isSemanticVersion(version:string): boolean { + return /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(version); +} + +/** + * 将语义化的版本号转换为整数 + * REF: https://semver.org + * @param version: 语义化的版本号字符串 + */ +export function versionStringToNumber(version: string): number { + const [major, minor, patch] = version.split(/[+-]/)[0].split(".").map(v => parseInt(v)); + return major * 1_0000_0000 + minor * 1_0000 + patch; +} + +/** + * 比较版本号 + * @param version1: 版本号1 + * @param version2: 版本号2 + * @return version - version2 + */ +export function compare(version1: string, version2: string): number { + const ver1 = versionStringToNumber(version1); + const ver2 = versionStringToNumber(version2); + return ver1 - ver2; +} diff --git a/workspace/plugins/custom-block/public/i18n/en_US.json b/workspace/plugins/custom-block/public/i18n/en_US.json index 81649a0..7316b9a 100644 --- a/workspace/plugins/custom-block/public/i18n/en_US.json +++ b/workspace/plugins/custom-block/public/i18n/en_US.json @@ -1,4 +1,10 @@ { + "config": { + "reset": { + "description": "The plugin configuration has been updated and requires resetting all settings options to default (The page will be refreshed after resetting)", + "title": "Reset settings options" + } + }, "displayName": "Custom Block Styles", "menu": { "custom-block-fullscreen": { diff --git a/workspace/plugins/custom-block/public/i18n/zh_CHT.json b/workspace/plugins/custom-block/public/i18n/zh_CHT.json index c0d12d3..ddfa2c2 100644 --- a/workspace/plugins/custom-block/public/i18n/zh_CHT.json +++ b/workspace/plugins/custom-block/public/i18n/zh_CHT.json @@ -1,4 +1,10 @@ { + "config": { + "reset": { + "description": "插件配置已更新,需要重置所有設置選項為默認選項(重置後將刷新頁面)", + "title": "重置設置選項" + } + }, "displayName": "自定義塊樣式", "menu": { "custom-block-fullscreen": { diff --git a/workspace/plugins/custom-block/public/i18n/zh_CN.json b/workspace/plugins/custom-block/public/i18n/zh_CN.json index a96c3b1..82885e9 100644 --- a/workspace/plugins/custom-block/public/i18n/zh_CN.json +++ b/workspace/plugins/custom-block/public/i18n/zh_CN.json @@ -1,4 +1,10 @@ { + "config": { + "reset": { + "description": "插件配置已更新,需要重置所有设置选项为默认选项(重置后将刷新页面)", + "title": "重置设置选项" + } + }, "displayName": "自定义块样式", "menu": { "custom-block-fullscreen": { diff --git a/workspace/plugins/custom-block/src/configs/default.ts b/workspace/plugins/custom-block/src/configs/default.ts index 1964a16..c83c0d2 100644 --- a/workspace/plugins/custom-block/src/configs/default.ts +++ b/workspace/plugins/custom-block/src/configs/default.ts @@ -16,6 +16,7 @@ */ import * as sdk from "@siyuan-community/siyuan-sdk"; +import manifest from "~/public/plugin.json"; import type { IConfig } from "@/types/config"; @@ -25,6 +26,7 @@ import { } from "@/utils/enums"; export const DEFAULT_CONFIG: IConfig = { + version: "1.0.1", features: [ { // 自定义块 style 属性 id: "custom-block-style", diff --git a/workspace/plugins/custom-block/src/index.ts b/workspace/plugins/custom-block/src/index.ts index 1fdd077..cc6e223 100644 --- a/workspace/plugins/custom-block/src/index.ts +++ b/workspace/plugins/custom-block/src/index.ts @@ -19,6 +19,7 @@ import siyuan from "siyuan"; /* 静态资源 */ import "./styles/index.less"; + // REF: https://zhuanlan.zhihu.com/p/401882229 import menu from "./assets/symbols/icon-custom-block-menu.symbol?raw"; import danmaku from "./assets/symbols/icon-custom-block-render-danmaku.symbol?raw"; @@ -32,6 +33,7 @@ import { Client } from "@siyuan-community/siyuan-sdk"; import { FLAG_MOBILE } from "@workspace/utils/env/front-end"; import { Logger } from "@workspace/utils/logger"; import { mergeIgnoreArray } from "@workspace/utils/misc/merge"; +import { compare } from "@workspace/utils/misc/version"; import { getBlockMenuContext, type BlockMenuDetail, @@ -98,6 +100,17 @@ export default class CustomBlockPlugin extends siyuan.Plugin { } onLayoutReady(): void { + if (compare(this.config.version, DEFAULT_CONFIG.version) < 0) { + /* 需要重置设置选项 */ + siyuan.confirm( + `${this.i18n.config.reset.title} ${this.displayName} [${this.name}]`, // 标题 + this.i18n.config.reset.description, // 文本 + async () => { + await this.resetConfig(); // 重置配置 + globalThis.location.reload(); // 刷新页面 + }, // 确认按钮回调 + ); + } } onunload(): void { diff --git a/workspace/plugins/custom-block/src/types/config.d.ts b/workspace/plugins/custom-block/src/types/config.d.ts index 2260c08..7c2357c 100644 --- a/workspace/plugins/custom-block/src/types/config.d.ts +++ b/workspace/plugins/custom-block/src/types/config.d.ts @@ -48,5 +48,6 @@ export interface IFeature { /* 主要配置 */ export interface IConfig { + version: string, // 版本号 features: IFeature[], } From c99f99e12ad2bf71e243f374b6a49afa6ee77bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Thu, 13 Jul 2023 17:37:26 +0800 Subject: [PATCH 008/113] =?UTF-8?q?feat(webview):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=9D=97=E5=BC=95=E7=94=A8=E8=8F=9C=E5=8D=95=20|=20Add=20block?= =?UTF-8?q?=20reference=20menu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 + workspace/packages/types/package.json | 2 + workspace/packages/types/siyuan/events.d.ts | 52 +++ workspace/plugins/webview/package.json | 4 +- workspace/plugins/webview/src/index.ts | 94 ++++-- workspace/pnpm-lock.yaml | 350 +++++++++++++++++++- 6 files changed, 471 insertions(+), 35 deletions(-) create mode 100644 workspace/packages/types/siyuan/events.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index a56a56c..08d73b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更改日志 | CHANGE LOG +## 2023-07-12 + +- 添加块引用菜单 | Add block reference menu. + ## 2023-07-11 - 实现 monaco 编辑器初始化 | Implement monaco editor initialization. diff --git a/workspace/packages/types/package.json b/workspace/packages/types/package.json index f85cdc5..5073ea4 100644 --- a/workspace/packages/types/package.json +++ b/workspace/packages/types/package.json @@ -6,6 +6,8 @@ "access": "public" }, "dependencies": { + "@workspace/components": "workspace:^", + "@workspace/utils": "workspace:^" }, "devDependencies": { "ts-toolbelt": "^9.6.0" diff --git a/workspace/packages/types/siyuan/events.d.ts b/workspace/packages/types/siyuan/events.d.ts new file mode 100644 index 0000000..06dd009 --- /dev/null +++ b/workspace/packages/types/siyuan/events.d.ts @@ -0,0 +1,52 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import siyuan from "siyuan"; +import type { IProtyle } from "./protyle"; + +import type { + IDocumentBlockMenuDetail, + IOtherBlockMenuDetail, +} from "@workspace/utils/siyuan/menu/block"; + +export interface IOpenMenuLinkDetail { + element: HTMLSpanElement, + menu: InstanceType; + protyle: IProtyle; +} + +export interface IOpenMenuBlockRefDetail { + element: HTMLSpanElement, + menu: InstanceType; + protyle: IProtyle; +} + +export interface IClickBlockIconEvent extends CustomEvent { + type: "click-blockicon"; +} + +export interface IClickEditorTitleIconEvent extends CustomEvent { + type: "click-editorcontent"; +} + +export interface IOpenMenuLinkEvent extends CustomEvent { + type: "open-menu-link"; +} + +export interface IOpenMenuBlockRefEvent extends CustomEvent { + type: "open-menu-blockref"; +} diff --git a/workspace/plugins/webview/package.json b/workspace/plugins/webview/package.json index 6bd88f8..f72ec39 100644 --- a/workspace/plugins/webview/package.json +++ b/workspace/plugins/webview/package.json @@ -12,12 +12,12 @@ "devDependencies": { "@sveltejs/vite-plugin-svelte": "^2.4.2", "@tsconfig/svelte": "^4.0.1", - "@types/node": "^20.4.1", + "@types/node": "^20.4.2", "less": "^4.1.3", "svelte": "^4.0.5", "svelte-preprocess-less": "^0.4.0", "typescript": "^5.1.6", - "vite": "^4.4.2" + "vite": "^4.4.3" }, "dependencies": { "@workspace/components": "workspace:^", diff --git a/workspace/plugins/webview/src/index.ts b/workspace/plugins/webview/src/index.ts index 4ff737d..475cfd6 100644 --- a/workspace/plugins/webview/src/index.ts +++ b/workspace/plugins/webview/src/index.ts @@ -35,8 +35,13 @@ import { } from "@workspace/utils/siyuan/url"; import { getBlockMenuContext, - type BlockMenuDetail, } from "@workspace/utils/siyuan/menu/block"; +import type { + IClickBlockIconEvent, + IClickEditorTitleIconEvent, + IOpenMenuBlockRefEvent, + IOpenMenuLinkEvent, +} from "@workspace/types/siyuan/events"; // import Settings from "@workspace/components/siyuan/setting/Example.svelte"; @@ -56,6 +61,7 @@ import { } from "./utils/window"; import { EditorType } from "~/../../packages/utils/siyuan"; import type { IPosition } from "./types"; +import type { BlockID } from "@workspace/types/siyuan"; export default class WebviewPlugin extends siyuan.Plugin { static readonly GLOBAL_CONFIG_NAME = "global-config"; @@ -117,6 +123,10 @@ export default class WebviewPlugin extends siyuan.Plugin { this.eventBus.on("click-editortitleicon", this.blockMenuEventListener); /* 其他块菜单 */ this.eventBus.on("click-blockicon", this.blockMenuEventListener); + /* 块引用菜单 */ + this.eventBus.on("open-menu-blockref", this.blockRefMenuEventListener); + /* 超链接菜单 */ + this.eventBus.on("open-menu-link", this.linkMenuEventListener); /* 快捷键/命令 */ this.addCommand({ @@ -212,6 +222,8 @@ export default class WebviewPlugin extends siyuan.Plugin { this.eventBus.off("click-blockicon", this.blockMenuEventListener); this.eventBus.off("click-editortitleicon", this.blockMenuEventListener); + this.eventBus.off("open-menu-blockref", this.blockRefMenuEventListener); + this.eventBus.off("open-menu-link", this.linkMenuEventListener); } openSetting(): void { @@ -364,6 +376,23 @@ export default class WebviewPlugin extends siyuan.Plugin { } } + /* 通过 ID 打开思源窗口 */ + public openSiyuanWindowByID(element: HTMLElement, id: BlockID, focus) { + const url = buildSiyuanWebURL( + editorType2Pathname(this.config.window.siyuan.editorType), + { + id, + focus, + } + ); + + const rect = element.getBoundingClientRect(); + this.openSiyuanWindow(url, { + screenX: globalThis.screenX + rect.x, + screenY: globalThis.screenY + rect.y, + } as any); + } + /* 是否为有效的 URL 协议 */ protected isUrlSchemeAvailable(url: string, protocols: IProtocols): boolean { for (const key in protocols) { @@ -408,34 +437,57 @@ export default class WebviewPlugin extends siyuan.Plugin { return meta; } - /* 添加块菜单项 */ - protected readonly blockMenuEventListener = (e: any) => { + /* 块引用菜单 */ + protected readonly blockRefMenuEventListener = (e: IOpenMenuBlockRefEvent) => { + // this.logger.debug(e); + + const submenu: siyuan.IMenuItemOption[] = []; + const element = e.detail.element; + const id = element.dataset.id; + + /* 新窗口打开块 */ + submenu.push({ + icon: "iconOpenWindow", + label: this.i18n.menu.openEditor.label, + click: (element) => this.openSiyuanWindowByID(element, id, false), + }); + + /* 新窗口打开块并聚焦 */ + submenu.push({ + icon: "iconFocus", + label: this.i18n.menu.openFocusedEditor.label, + click: (element) => this.openSiyuanWindowByID(element, id, true), + }); + + e.detail.menu.addItem({ + icon: "iconLanguage", + label: this.i18n.displayName, + submenu, + }); + } + + /* 超链接菜单 */ + protected readonly linkMenuEventListener = (e: IOpenMenuLinkEvent) => { // this.logger.debug(e); - const detail = e.detail as BlockMenuDetail; + // TODO: 在后台页签中打开 + // TODO: 在页签右侧打开 + // TODO: 在页签下侧打开 + // TODO: 使用新窗口打开 + } + + /* 块菜单 */ + protected readonly blockMenuEventListener = (e: IClickBlockIconEvent | IClickEditorTitleIconEvent) => { + // this.logger.debug(e); + const detail = e.detail; const context = getBlockMenuContext(e.detail); if (context) { const submenu: siyuan.IMenuItemOption[] = []; - const clickEventListener = (element: HTMLElement, focus: boolean) => { - const url = buildSiyuanWebURL( - editorType2Pathname(this.config.window.siyuan.editorType), - { - id: context.id, - focus, - } - ); - - const rect = element.getBoundingClientRect(); - this.openSiyuanWindow(url, { - screenX: globalThis.screenX + rect.x, - screenY: globalThis.screenY + rect.y, - } as any); - }; /* 新窗口打开块 */ submenu.push({ icon: "iconOpenWindow", label: this.i18n.menu.openEditor.label, - click: (element) => clickEventListener(element, false), + click: (element) => this.openSiyuanWindowByID(element, context.id, false), }); if (!context.isDocumentBlock // 不是文档块 @@ -445,7 +497,7 @@ export default class WebviewPlugin extends siyuan.Plugin { submenu.push({ icon: "iconFocus", label: this.i18n.menu.openFocusedEditor.label, - click: (element) => clickEventListener(element, true), + click: (element) => this.openSiyuanWindowByID(element, context.id, true), }); } diff --git a/workspace/pnpm-lock.yaml b/workspace/pnpm-lock.yaml index 55a53dd..0f32722 100644 --- a/workspace/pnpm-lock.yaml +++ b/workspace/pnpm-lock.yaml @@ -91,6 +91,13 @@ importers: version: 0.4.0 packages/types: + dependencies: + '@workspace/components': + specifier: workspace:^ + version: link:../components + '@workspace/utils': + specifier: workspace:^ + version: link:../utils devDependencies: ts-toolbelt: specifier: ^9.6.0 @@ -320,13 +327,13 @@ importers: devDependencies: '@sveltejs/vite-plugin-svelte': specifier: ^2.4.2 - version: 2.4.2(svelte@4.0.5)(vite@4.4.2) + version: 2.4.2(svelte@4.0.5)(vite@4.4.3) '@tsconfig/svelte': specifier: ^4.0.1 version: 4.0.1 '@types/node': - specifier: ^20.4.1 - version: 20.4.1 + specifier: ^20.4.2 + version: 20.4.2 less: specifier: ^4.1.3 version: 4.1.3 @@ -340,8 +347,8 @@ importers: specifier: ^5.1.6 version: 5.1.6 vite: - specifier: ^4.4.2 - version: 4.4.2(@types/node@20.4.1)(less@4.1.3) + specifier: ^4.4.3 + version: 4.4.3(@types/node@20.4.2)(less@4.1.3) tools/eslint-config-custom: devDependencies: @@ -513,6 +520,15 @@ packages: requiresBuild: true optional: true + /@esbuild/android-arm64@0.18.12: + resolution: {integrity: sha512-BMAlczRqC/LUt2P97E4apTBbkvS9JTJnp2DKFbCwpZ8vBvXVbNdqmvzW/OsdtI/+mGr+apkkpqGM8WecLkPgrA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.17.19: resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} engines: {node: '>=12'} @@ -530,6 +546,15 @@ packages: requiresBuild: true optional: true + /@esbuild/android-arm@0.18.12: + resolution: {integrity: sha512-LIxaNIQfkFZbTLb4+cX7dozHlAbAshhFE5PKdro0l+FnCpx1GDJaQ2WMcqm+ToXKMt8p8Uojk/MFRuGyz3V5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.17.19: resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} engines: {node: '>=12'} @@ -547,6 +572,15 @@ packages: requiresBuild: true optional: true + /@esbuild/android-x64@0.18.12: + resolution: {integrity: sha512-zU5MyluNsykf5cOJ0LZZZjgAHbhPJ1cWfdH1ZXVMXxVMhEV0VZiZXQdwBBVvmvbF28EizeK7obG9fs+fpmS0eQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.17.19: resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} engines: {node: '>=12'} @@ -564,6 +598,15 @@ packages: requiresBuild: true optional: true + /@esbuild/darwin-arm64@0.18.12: + resolution: {integrity: sha512-zUZMep7YONnp6954QOOwEBwFX9svlKd3ov6PkxKd53LGTHsp/gy7vHaPGhhjBmEpqXEXShi6dddjIkmd+NgMsA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.17.19: resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} engines: {node: '>=12'} @@ -581,6 +624,15 @@ packages: requiresBuild: true optional: true + /@esbuild/darwin-x64@0.18.12: + resolution: {integrity: sha512-ohqLPc7i67yunArPj1+/FeeJ7AgwAjHqKZ512ADk3WsE3FHU9l+m5aa7NdxXr0HmN1bjDlUslBjWNbFlD9y12Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.17.19: resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} engines: {node: '>=12'} @@ -598,6 +650,15 @@ packages: requiresBuild: true optional: true + /@esbuild/freebsd-arm64@0.18.12: + resolution: {integrity: sha512-GIIHtQXqgeOOqdG16a/A9N28GpkvjJnjYMhOnXVbn3EDJcoItdR58v/pGN31CHjyXDc8uCcRnFWmqaJt24AYJg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.17.19: resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} engines: {node: '>=12'} @@ -615,6 +676,15 @@ packages: requiresBuild: true optional: true + /@esbuild/freebsd-x64@0.18.12: + resolution: {integrity: sha512-zK0b9a1/0wZY+6FdOS3BpZcPc1kcx2G5yxxfEJtEUzVxI6n/FrC2Phsxj/YblPuBchhBZ/1wwn7AyEBUyNSa6g==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.17.19: resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} engines: {node: '>=12'} @@ -632,6 +702,15 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-arm64@0.18.12: + resolution: {integrity: sha512-JKgG8Q/LL/9sw/iHHxQyVMoQYu3rU3+a5Z87DxC+wAu3engz+EmctIrV+FGOgI6gWG1z1+5nDDbXiRMGQZXqiw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.17.19: resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} engines: {node: '>=12'} @@ -649,6 +728,15 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-arm@0.18.12: + resolution: {integrity: sha512-y75OijvrBE/1XRrXq1jtrJfG26eHeMoqLJ2dwQNwviwTuTtHGCojsDO6BJNF8gU+3jTn1KzJEMETytwsFSvc+Q==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.17.19: resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} engines: {node: '>=12'} @@ -666,6 +754,15 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-ia32@0.18.12: + resolution: {integrity: sha512-yoRIAqc0B4lDIAAEFEIu9ttTRFV84iuAl0KNCN6MhKLxNPfzwCBvEMgwco2f71GxmpBcTtn7KdErueZaM2rEvw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64@0.17.19: resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} engines: {node: '>=12'} @@ -683,6 +780,15 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-loong64@0.18.12: + resolution: {integrity: sha512-qYgt3dHPVvf/MgbIBpJ4Sup/yb9DAopZ3a2JgMpNKIHUpOdnJ2eHBo/aQdnd8dJ21X/+sS58wxHtA9lEazYtXQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-mips64el@0.17.19: resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} engines: {node: '>=12'} @@ -700,6 +806,15 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-mips64el@0.18.12: + resolution: {integrity: sha512-wHphlMLK4ufNOONqukELfVIbnGQJrHJ/mxZMMrP2jYrPgCRZhOtf0kC4yAXBwnfmULimV1qt5UJJOw4Kh13Yfg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.17.19: resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} engines: {node: '>=12'} @@ -717,6 +832,15 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-ppc64@0.18.12: + resolution: {integrity: sha512-TeN//1Ft20ZZW41+zDSdOI/Os1bEq5dbvBvYkberB7PHABbRcsteeoNVZFlI0YLpGdlBqohEpjrn06kv8heCJg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.17.19: resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} engines: {node: '>=12'} @@ -734,6 +858,15 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-riscv64@0.18.12: + resolution: {integrity: sha512-AgUebVS4DoAblBgiB2ACQ/8l4eGE5aWBb8ZXtkXHiET9mbj7GuWt3OnsIW/zX+XHJt2RYJZctbQ2S/mDjbp0UA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.17.19: resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} engines: {node: '>=12'} @@ -751,6 +884,15 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-s390x@0.18.12: + resolution: {integrity: sha512-dJ3Rb3Ei2u/ysSXd6pzleGtfDdc2MuzKt8qc6ls8vreP1G3B7HInX3i7gXS4BGeVd24pp0yqyS7bJ5NHaI9ing==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.17.19: resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} engines: {node: '>=12'} @@ -768,6 +910,15 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-x64@0.18.12: + resolution: {integrity: sha512-OrNJMGQbPaVyHHcDF8ybNSwu7TDOfX8NGpXCbetwOSP6txOJiWlgQnRymfC9ocR1S0Y5PW0Wb1mV6pUddqmvmQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.17.19: resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} engines: {node: '>=12'} @@ -785,6 +936,15 @@ packages: requiresBuild: true optional: true + /@esbuild/netbsd-x64@0.18.12: + resolution: {integrity: sha512-55FzVCAiwE9FK8wWeCRuvjazNRJ1QqLCYGZVB6E8RuQuTeStSwotpSW4xoRGwp3a1wUsaVCdYcj5LGCASVJmMg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.17.19: resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} engines: {node: '>=12'} @@ -802,6 +962,15 @@ packages: requiresBuild: true optional: true + /@esbuild/openbsd-x64@0.18.12: + resolution: {integrity: sha512-qnluf8rfb6Y5Lw2tirfK2quZOBbVqmwxut7GPCIJsM8lc4AEUj9L8y0YPdLaPK0TECt4IdyBdBD/KRFKorlK3g==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.17.19: resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} engines: {node: '>=12'} @@ -819,6 +988,15 @@ packages: requiresBuild: true optional: true + /@esbuild/sunos-x64@0.18.12: + resolution: {integrity: sha512-+RkKpVQR7bICjTOPUpkTBTaJ4TFqQBX5Ywyd/HSdDkQGn65VPkTsR/pL4AMvuMWy+wnXgIl4EY6q4mVpJal8Kg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.17.19: resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} engines: {node: '>=12'} @@ -836,6 +1014,15 @@ packages: requiresBuild: true optional: true + /@esbuild/win32-arm64@0.18.12: + resolution: {integrity: sha512-GNHuciv0mFM7ouzsU0+AwY+7eV4Mgo5WnbhfDCQGtpvOtD1vbOiRjPYG6dhmMoFyBjj+pNqQu2X+7DKn0KQ/Gw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.17.19: resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} engines: {node: '>=12'} @@ -853,6 +1040,15 @@ packages: requiresBuild: true optional: true + /@esbuild/win32-ia32@0.18.12: + resolution: {integrity: sha512-kR8cezhYipbbypGkaqCTWIeu4zID17gamC8YTPXYtcN3E5BhhtTnwKBn9I0PJur/T6UVwIEGYzkffNL0lFvxEw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.17.19: resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} engines: {node: '>=12'} @@ -870,6 +1066,15 @@ packages: requiresBuild: true optional: true + /@esbuild/win32-x64@0.18.12: + resolution: {integrity: sha512-O0UYQVkvfM/jO8a4OwoV0mAKSJw+mjWTAd1MJd/1FCX6uiMdLmMRPK/w6e9OQ0ob2WGxzIm9va/KG0Ja4zIOgg==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.44.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1263,6 +1468,23 @@ packages: vite: 4.4.2(@types/node@20.4.1)(less@4.1.3) transitivePeerDependencies: - supports-color + dev: false + + /@sveltejs/vite-plugin-svelte-inspector@1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.0.5)(vite@4.4.3): + resolution: {integrity: sha512-Khdl5jmmPN6SUsVuqSXatKpQTMIifoQPDanaxC84m9JxIibWvSABJyHpyys0Z+1yYrxY5TTEQm+6elh0XCMaOA==} + engines: {node: ^14.18.0 || >= 16} + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^2.2.0 + svelte: ^3.54.0 || ^4.0.0 + vite: ^4.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte': 2.4.2(svelte@4.0.5)(vite@4.4.3) + debug: 4.3.4 + svelte: 4.0.5 + vite: 4.4.3(@types/node@20.4.2)(less@4.1.3) + transitivePeerDependencies: + - supports-color + dev: true /@sveltejs/vite-plugin-svelte@2.4.2(svelte@3.59.2)(vite@4.4.2): resolution: {integrity: sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==} @@ -1322,6 +1544,27 @@ packages: vitefu: 0.2.4(vite@4.4.2) transitivePeerDependencies: - supports-color + dev: false + + /@sveltejs/vite-plugin-svelte@2.4.2(svelte@4.0.5)(vite@4.4.3): + resolution: {integrity: sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==} + engines: {node: ^14.18.0 || >= 16} + peerDependencies: + svelte: ^3.54.0 || ^4.0.0 + vite: ^4.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte-inspector': 1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.0.5)(vite@4.4.3) + debug: 4.3.4 + deepmerge: 4.3.1 + kleur: 4.1.5 + magic-string: 0.30.1 + svelte: 4.0.5 + svelte-hmr: 0.15.2(svelte@4.0.5) + vite: 4.4.3(@types/node@20.4.2)(less@4.1.3) + vitefu: 0.2.4(vite@4.4.3) + transitivePeerDependencies: + - supports-color + dev: true /@tsconfig/svelte@4.0.1: resolution: {integrity: sha512-B+XlGpmuAQzJqDoBATNCvEPqQg0HkO7S8pM14QDI5NsmtymzRexQ1N+nX2H6RTtFbuFgaZD4I8AAi8voGg0GLg==} @@ -1344,7 +1587,7 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.4.1 + '@types/node': 20.4.2 dev: true /@types/js-yaml@4.0.5: @@ -1366,6 +1609,10 @@ packages: /@types/node@20.4.1: resolution: {integrity: sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==} + /@types/node@20.4.2: + resolution: {integrity: sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==} + dev: true + /@types/prettier@2.7.3: resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} dev: true @@ -1725,6 +1972,7 @@ packages: resolution: {integrity: sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==} engines: {node: '>=0.4.0'} hasBin: true + dev: true /ajv-formats@2.1.1(ajv@8.12.0): resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} @@ -1940,7 +2188,7 @@ packages: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 '@types/estree': 1.0.1 - acorn: 8.9.0 + acorn: 8.10.0 estree-walker: 3.0.3 periscopic: 3.1.0 @@ -2257,6 +2505,36 @@ packages: '@esbuild/win32-ia32': 0.18.11 '@esbuild/win32-x64': 0.18.11 + /esbuild@0.18.12: + resolution: {integrity: sha512-XuOVLDdtsDslXStStduT41op21Ytmf4/BDS46aa3xPJ7X5h2eMWBF1oAe3QjUH3bDksocNXgzGUZ7XHIBya6Tg==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.12 + '@esbuild/android-arm64': 0.18.12 + '@esbuild/android-x64': 0.18.12 + '@esbuild/darwin-arm64': 0.18.12 + '@esbuild/darwin-x64': 0.18.12 + '@esbuild/freebsd-arm64': 0.18.12 + '@esbuild/freebsd-x64': 0.18.12 + '@esbuild/linux-arm': 0.18.12 + '@esbuild/linux-arm64': 0.18.12 + '@esbuild/linux-ia32': 0.18.12 + '@esbuild/linux-loong64': 0.18.12 + '@esbuild/linux-mips64el': 0.18.12 + '@esbuild/linux-ppc64': 0.18.12 + '@esbuild/linux-riscv64': 0.18.12 + '@esbuild/linux-s390x': 0.18.12 + '@esbuild/linux-x64': 0.18.12 + '@esbuild/netbsd-x64': 0.18.12 + '@esbuild/openbsd-x64': 0.18.12 + '@esbuild/sunos-x64': 0.18.12 + '@esbuild/win32-arm64': 0.18.12 + '@esbuild/win32-ia32': 0.18.12 + '@esbuild/win32-x64': 0.18.12 + dev: true + /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -4060,7 +4338,7 @@ packages: resolution: {integrity: sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg==} dev: true - /vite-node@0.32.2(@types/node@20.4.1): + /vite-node@0.32.2(@types/node@20.4.2): resolution: {integrity: sha512-dTQ1DCLwl2aEseov7cfQ+kDMNJpM1ebpyMMMwWzBvLbis8Nla/6c9WQcqpPssTwS6Rp/+U6KwlIj8Eapw4bLdA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -4070,7 +4348,7 @@ packages: mlly: 1.4.0 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.2(@types/node@20.4.1)(less@4.1.3) + vite: 4.4.3(@types/node@20.4.2)(less@4.1.3) transitivePeerDependencies: - '@types/node' - less @@ -4172,6 +4450,43 @@ packages: optionalDependencies: fsevents: 2.3.2 + /vite@4.4.3(@types/node@20.4.2)(less@4.1.3): + resolution: {integrity: sha512-IMnXQXXWgLi5brBQx/4WzDxdzW0X3pjO4nqFJAuNvwKtxzAmPzFE1wszW3VDpAGQJm3RZkm/brzRdyGsnwgJIA==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 20.4.2 + esbuild: 0.18.12 + less: 4.1.3 + postcss: 8.4.25 + rollup: 3.26.2 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /vitefu@0.2.4(vite@4.3.9): resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} peerDependencies: @@ -4193,6 +4508,17 @@ packages: dependencies: vite: 4.4.2(@types/node@20.4.1)(less@4.1.3) + /vitefu@0.2.4(vite@4.4.3): + resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + vite: 4.4.3(@types/node@20.4.2)(less@4.1.3) + dev: true + /vitest@0.32.2: resolution: {integrity: sha512-hU8GNNuQfwuQmqTLfiKcqEhZY72Zxb7nnN07koCUNmntNxbKQnVbeIS6sqUgR3eXSlbOpit8+/gr1KpqoMgWCQ==} engines: {node: '>=v14.18.0'} @@ -4226,7 +4552,7 @@ packages: dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 - '@types/node': 20.4.1 + '@types/node': 20.4.2 '@vitest/expect': 0.32.2 '@vitest/runner': 0.32.2 '@vitest/snapshot': 0.32.2 @@ -4246,8 +4572,8 @@ packages: strip-literal: 1.0.1 tinybench: 2.5.0 tinypool: 0.5.0 - vite: 4.4.2(@types/node@20.4.1)(less@4.1.3) - vite-node: 0.32.2(@types/node@20.4.1) + vite: 4.4.3(@types/node@20.4.2)(less@4.1.3) + vite-node: 0.32.2(@types/node@20.4.2) why-is-node-running: 2.2.2 transitivePeerDependencies: - less From 358ed3ed6c768ecbeaf12fe0afce21e7fc04a7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Thu, 13 Jul 2023 23:10:29 +0800 Subject: [PATCH 009/113] =?UTF-8?q?feat(webview):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=B6=85=E9=93=BE=E6=8E=A5=E8=8F=9C=E5=8D=95=20|=20Add=20hyper?= =?UTF-8?q?link=20menu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../utils/dom/position.ts} | 9 + workspace/packages/utils/siyuan/dom.ts | 24 +- .../plugins/webview/public/i18n/en_US.json | 18 +- .../plugins/webview/public/i18n/zh_CHT.json | 18 +- .../plugins/webview/public/i18n/zh_CN.json | 12 + workspace/plugins/webview/src/index.ts | 288 ++++++++++++++++-- 7 files changed, 331 insertions(+), 39 deletions(-) rename workspace/{plugins/webview/src/types/index.d.ts => packages/utils/dom/position.ts} (72%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08d73b0..46c451d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 2023-07-12 - 添加块引用菜单 | Add block reference menu. +- 添加超链接菜单 | Add hyperlink menu. ## 2023-07-11 diff --git a/workspace/plugins/webview/src/types/index.d.ts b/workspace/packages/utils/dom/position.ts similarity index 72% rename from workspace/plugins/webview/src/types/index.d.ts rename to workspace/packages/utils/dom/position.ts index 6cc77f1..a1310f6 100644 --- a/workspace/plugins/webview/src/types/index.d.ts +++ b/workspace/packages/utils/dom/position.ts @@ -19,3 +19,12 @@ export interface IPosition { screenX?: number, screenY?: number, } + +/* 计算元素相对于屏幕的位置 */ +export function calculateScreenPosition(element: HTMLElement): IPosition { + const rect = element.getBoundingClientRect(); + return { + screenX: Math.round(globalThis.screenX + rect.x), + screenY: Math.round(globalThis.screenY + rect.y), + }; +} diff --git a/workspace/packages/utils/siyuan/dom.ts b/workspace/packages/utils/siyuan/dom.ts index b64ee38..28eb6d7 100644 --- a/workspace/packages/utils/siyuan/dom.ts +++ b/workspace/packages/utils/siyuan/dom.ts @@ -27,18 +27,20 @@ export function getBlockID(e: Event): BlockID | void { const path = e.composedPath(); for (let i = 0; i < path.length; ++i) { const dataset = (path[i] as HTMLElement).dataset; - switch (true) { - case dataset.nodeId && regexp.id.test(dataset.nodeId): - return dataset.nodeId; - case dataset.id && regexp.id.test(dataset.id): - return dataset.id; - case dataset.oid && regexp.id.test(dataset.oid): - return dataset.oid; - case dataset.rootId && regexp.id.test(dataset.rootId): - return dataset.rootId; + if (dataset) { + switch (true) { + case dataset.nodeId && regexp.id.test(dataset.nodeId): + return dataset.nodeId; + case dataset.id && regexp.id.test(dataset.id): + return dataset.id; + case dataset.oid && regexp.id.test(dataset.oid): + return dataset.oid; + case dataset.rootId && regexp.id.test(dataset.rootId): + return dataset.rootId; - default: - break + default: + break + } } } return; diff --git a/workspace/plugins/webview/public/i18n/en_US.json b/workspace/plugins/webview/public/i18n/en_US.json index 5e2916f..9b3fdd1 100644 --- a/workspace/plugins/webview/public/i18n/en_US.json +++ b/workspace/plugins/webview/public/i18n/en_US.json @@ -1,17 +1,29 @@ { "displayName": "Web Page View", "menu": { + "openByNewWindow": { + "label": "Open with New Window" + }, + "openDesktopWindow": { + "label": "Open SiYuan Desktop Window" + }, "openEditor": { "label": "Open in a New Window" }, "openFocusedEditor": { "label": "Open in a New Window and Focus" }, - "openDesktopWindow": { - "label": "Open SiYuan Desktop Window" - }, "openMobildWindow": { "label": "Open SiYuan Mobile Window" + }, + "openTabBackground": { + "label": "Open in background tab" + }, + "openTabBottom": { + "label": "Open Below the Tab" + }, + "openTabRight": { + "label": "Open Right the Tab" } }, "message": { diff --git a/workspace/plugins/webview/public/i18n/zh_CHT.json b/workspace/plugins/webview/public/i18n/zh_CHT.json index 77912fa..ef1777e 100644 --- a/workspace/plugins/webview/public/i18n/zh_CHT.json +++ b/workspace/plugins/webview/public/i18n/zh_CHT.json @@ -1,17 +1,29 @@ { "displayName": "網頁視圖", "menu": { + "openByNewWindow": { + "label": "使用新窗口打開" + }, + "openDesktopWindow": { + "label": "打開思源桌面端窗口" + }, "openEditor": { "label": "在新窗口打開" }, "openFocusedEditor": { "label": "在新窗口打開並聚焦" }, - "openDesktopWindow": { - "label": "打開思源桌面端窗口" - }, "openMobildWindow": { "label": "打開思源移動端窗口" + }, + "openTabBackground": { + "label": "在後台分頁中打開" + }, + "openTabBottom": { + "label": "在分頁下側打開" + }, + "openTabRight": { + "label": "在分頁右側打開" } }, "message": { diff --git a/workspace/plugins/webview/public/i18n/zh_CN.json b/workspace/plugins/webview/public/i18n/zh_CN.json index b5c3f29..9afb653 100644 --- a/workspace/plugins/webview/public/i18n/zh_CN.json +++ b/workspace/plugins/webview/public/i18n/zh_CN.json @@ -1,6 +1,9 @@ { "displayName": "网页视图", "menu": { + "openByNewWindow": { + "label": "使用新窗口打开" + }, "openDesktopWindow": { "label": "打开思源桌面端窗口" }, @@ -12,6 +15,15 @@ }, "openMobildWindow": { "label": "打开思源移动端窗口" + }, + "openTabBackground": { + "label": "在后台页签中打开" + }, + "openTabBottom": { + "label": "在页签下侧打开" + }, + "openTabRight": { + "label": "在页签右侧打开" } }, "message": { diff --git a/workspace/plugins/webview/src/index.ts b/workspace/plugins/webview/src/index.ts index 475cfd6..2984fb6 100644 --- a/workspace/plugins/webview/src/index.ts +++ b/workspace/plugins/webview/src/index.ts @@ -36,12 +36,16 @@ import { import { getBlockMenuContext, } from "@workspace/utils/siyuan/menu/block"; +import { EditorType } from "@workspace/utils/siyuan"; +import { calculateScreenPosition, type IPosition } from "@workspace/utils/dom/position"; + import type { IClickBlockIconEvent, IClickEditorTitleIconEvent, IOpenMenuBlockRefEvent, IOpenMenuLinkEvent, } from "@workspace/types/siyuan/events"; +import type { BlockID } from "@workspace/types/siyuan"; // import Settings from "@workspace/components/siyuan/setting/Example.svelte"; @@ -59,9 +63,6 @@ import { type IOverwrite, type IWebPreferences, } from "./utils/window"; -import { EditorType } from "~/../../packages/utils/siyuan"; -import type { IPosition } from "./types"; -import type { BlockID } from "@workspace/types/siyuan"; export default class WebviewPlugin extends siyuan.Plugin { static readonly GLOBAL_CONFIG_NAME = "global-config"; @@ -266,8 +267,19 @@ export default class WebviewPlugin extends siyuan.Plugin { return this.config.general.background; } - /* 打开新标签页 */ - public openWebviewTab(href: string, title?: string, icon: string = "iconLanguage") { + /** + * 打开新标签页 + * @param href: 访问地址 + * @param title: 页签标题 + * @param icon: 页签图标 + * @param options: 页签其他选项 + */ + public openWebviewTab( + href: string, + title?: string, + icon: string = "iconLanguage", + options: object = {}, + ) { siyuan.openTab({ app: this.app, custom: { @@ -279,6 +291,9 @@ export default class WebviewPlugin extends siyuan.Plugin { title: title || this.name, }, }, + keepCursor: false, + removeCurrentTab: false, + ...options, }); } @@ -309,11 +324,41 @@ export default class WebviewPlugin extends siyuan.Plugin { webPreferences, this, ); + return window; } catch (err) { this.logger.warn(err); } } + /** + * 在新窗口打开网页 + * @param: e: 位置信息 + * @param: href: 地址 + * @param: title: 标题 + */ + public openWebpageWindow( + href: string, + title: string, + e?: MouseEvent | IPosition, + ) { + const params = { + x: e?.screenX ?? 0, + y: e?.screenY ?? 0, + title: title, + alwaysOnTop: false, // 禁用置顶 + autoHideMenuBar: true, // 自动隐藏菜单栏 + webPreferences: { + nodeIntegration: false, // 是否启用 Node.js 内置模块 + webviewTag: false, // 是否启用 webview 标签 + contextIsolation: false, // 是否开启上下文隔离, 设置 false 之后可以使用 require + }, + + enableMenuBar: true, // (自定义) 启用菜单栏 + enableElectron: false, // (自定义) 启用 Electron 环境 + }; + return this.openWindow(href, params); + } + /* 打开思源桌面端窗口 */ public openSiyuanDesktopWindow( e?: MouseEvent | IPosition, @@ -333,7 +378,7 @@ export default class WebviewPlugin extends siyuan.Plugin { enableMenuBar: true, // (自定义) 启用菜单栏 enableElectron: true, // (自定义) 启用 Electron 环境 - } + }; this.openWindow(href || buildSiyuanWebURL(Pathname.desktop).href, params); } @@ -356,7 +401,7 @@ export default class WebviewPlugin extends siyuan.Plugin { enableMenuBar: true, enableElectron: true, - } + }; this.openWindow(href || buildSiyuanWebURL(Pathname.mobile).href, params); } @@ -377,20 +422,21 @@ export default class WebviewPlugin extends siyuan.Plugin { } /* 通过 ID 打开思源窗口 */ - public openSiyuanWindowByID(element: HTMLElement, id: BlockID, focus) { + public openSiyuanWindowByID(element: HTMLElement, id: BlockID, focus: boolean) { const url = buildSiyuanWebURL( editorType2Pathname(this.config.window.siyuan.editorType), { id, focus, - } + }, ); - const rect = element.getBoundingClientRect(); - this.openSiyuanWindow(url, { - screenX: globalThis.screenX + rect.x, - screenY: globalThis.screenY + rect.y, - } as any); + this.openSiyuanWindowByURL(element, url); + } + + /* 通过 URL 打开思源窗口 */ + public openSiyuanWindowByURL(element: HTMLElement, url: URL) { + this.openSiyuanWindow(url, calculateScreenPosition(element) as any); } /* 是否为有效的 URL 协议 */ @@ -441,22 +487,22 @@ export default class WebviewPlugin extends siyuan.Plugin { protected readonly blockRefMenuEventListener = (e: IOpenMenuBlockRefEvent) => { // this.logger.debug(e); + const element = e.detail.element; // 块引用 DOM 元素 + const id = element.dataset.id; // 块引用目标块 ID const submenu: siyuan.IMenuItemOption[] = []; - const element = e.detail.element; - const id = element.dataset.id; /* 新窗口打开块 */ submenu.push({ icon: "iconOpenWindow", label: this.i18n.menu.openEditor.label, - click: (element) => this.openSiyuanWindowByID(element, id, false), + click: () => this.openSiyuanWindowByID(element, id, false), }); /* 新窗口打开块并聚焦 */ submenu.push({ icon: "iconFocus", label: this.i18n.menu.openFocusedEditor.label, - click: (element) => this.openSiyuanWindowByID(element, id, true), + click: () => this.openSiyuanWindowByID(element, id, true), }); e.detail.menu.addItem({ @@ -469,10 +515,208 @@ export default class WebviewPlugin extends siyuan.Plugin { /* 超链接菜单 */ protected readonly linkMenuEventListener = (e: IOpenMenuLinkEvent) => { // this.logger.debug(e); - // TODO: 在后台页签中打开 - // TODO: 在页签右侧打开 - // TODO: 在页签下侧打开 - // TODO: 使用新窗口打开 + const submenu: siyuan.IMenuItemOption[] = []; + + const element = e.detail.element; // 超链接元素 + const link = this.parseHyperlinkMeta(element, this.config.tab.open.targets); + + switch (true) { + /* 思源超链接 */ + case link.href.startsWith("siyuan:"): { + const url = new URL(link.href); + const param = parseSiyuanURL(url); + + /* 在后台页签中打开 */ + submenu.push({ + icon: "iconFile", + label: this.i18n.menu.openTabBackground.label, + click: () => { + siyuan.openTab({ + app: this.app, + doc: { + id: param.id, + action: [ + "cb-get-focus", // 光标定位到块 + "cb-get-hl", // 高亮块 + ], + zoomIn: param.focus, + }, + keepCursor: true, // 焦点不跳转到新 tab + removeCurrentTab: false, // 不移除原页签 + }); + }, + }); + /* 在页签右侧打开 */ + submenu.push({ + icon: "iconLayoutRight", + label: this.i18n.menu.openTabRight.label, + click: () => { + siyuan.openTab({ + app: this.app, + doc: { + id: param.id, + action: [ + "cb-get-focus", // 光标定位到块 + "cb-get-hl", // 高亮块 + ], + zoomIn: param.focus, + }, + position: "right", + keepCursor: false, // 焦点不跳转到新 tab + removeCurrentTab: false, // 不移除原页签 + }); + }, + }); + /* 在页签下侧打开 */ + submenu.push({ + icon: "iconLayoutBottom", + label: this.i18n.menu.openTabBottom.label, + click: () => { + siyuan.openTab({ + app: this.app, + doc: { + id: param.id, + action: [ + "cb-get-focus", // 光标定位到块 + "cb-get-hl", // 高亮块 + ], + zoomIn: param.focus, + }, + position: "bottom", + keepCursor: false, // 焦点不跳转到新 tab + removeCurrentTab: false, // 不移除原页签 + }); + }, + }); + /* 使用新窗口打开 */ + submenu.push({ + icon: "iconOpenWindow", + label: this.i18n.menu.openByNewWindow.label, + click: () => this.openSiyuanWindowByID(element, param.id, param.focus), + }); + break; + } + + /* 静态文件服务 */ + case link.href.startsWith("stage/"): // 安装目录/resources/stage + + case link.href.startsWith("appearance/"): // 工作空间/conf/appearance + case link.href.startsWith("export/"): // 工作空间/temp/export + case link.href.startsWith("history/"): // 工作空间/history + + case link.href.startsWith("assets/"): // 工作空间/data/assets + case link.href.startsWith("emojies/"): // 工作空间/data/emojies + case link.href.startsWith("plugins/"): // 工作空间/data/plugins + case link.href.startsWith("plugins/"): // 工作空间/data/plugins + case link.href.startsWith("snippets/"): // 工作空间/data/snippets + case link.href.startsWith("templates/"): // 工作空间/data/templates + case link.href.startsWith("widgets/"): // 工作空间/data/widgets + { + const href = `${globalThis.document.baseURI}${link.href}`; + if (FLAG_ELECTRON && FLAG_DESKTOP) { + /* 在后台页签中打开 */ + submenu.push({ + icon: "iconFile", + label: this.i18n.menu.openTabBackground.label, + click: () => this.openWebviewTab( + href, + link.title, + undefined, + { keepCursor: true }, + ), + }); + /* 在页签右侧打开 */ + submenu.push({ + icon: "iconLayoutRight", + label: this.i18n.menu.openTabRight.label, + click: () => this.openWebviewTab( + href, + link.title, + undefined, + { position: "right" }, + ), + }); + /* 在页签下侧打开 */ + submenu.push({ + icon: "iconLayoutBottom", + label: this.i18n.menu.openTabBottom.label, + click: () => this.openWebviewTab( + href, + link.title, + undefined, + { position: "bottom" }, + ), + }); + } + /* 使用新窗口打开 */ + submenu.push({ + icon: "iconOpenWindow", + label: this.i18n.menu.openByNewWindow.label, + click: () => this.openWebpageWindow( + href, + link.title, + calculateScreenPosition(element), + ), + }); + break; + } + + /* 其他超链接 */ + default: { + if (FLAG_ELECTRON && FLAG_DESKTOP) { + /* 在后台页签中打开 */ + submenu.push({ + icon: "iconFile", + label: this.i18n.menu.openTabBackground.label, + click: () => this.openWebviewTab( + link.href, + link.title, + undefined, + { keepCursor: true }, + ), + }); + /* 在页签右侧打开 */ + submenu.push({ + icon: "iconLayoutRight", + label: this.i18n.menu.openTabRight.label, + click: () => this.openWebviewTab( + link.href, + link.title, + undefined, + { position: "right" }, + ), + }); + /* 在页签下侧打开 */ + submenu.push({ + icon: "iconLayoutBottom", + label: this.i18n.menu.openTabBottom.label, + click: () => this.openWebviewTab( + link.href, + link.title, + undefined, + { position: "bottom" }, + ), + }); + } + /* 使用新窗口打开 */ + submenu.push({ + icon: "iconOpenWindow", + label: this.i18n.menu.openByNewWindow.label, + click: () => this.openWebpageWindow( + link.href, + link.title, + calculateScreenPosition(element), + ), + }); + break; + } + } + + e.detail.menu.addItem({ + icon: "iconLanguage", + label: this.i18n.displayName, + submenu, + }); } /* 块菜单 */ From 3ff8424454fc3bd5485863e125fdaed5cd01fa1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Thu, 13 Jul 2023 23:20:56 +0800 Subject: [PATCH 010/113] =?UTF-8?q?perf(webview):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=80=9D=E6=BA=90=E9=9D=99=E6=80=81=E6=96=87=E4=BB=B6=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=9A=84=E5=88=A4=E6=96=AD=20|=20Optimize=20the=20jud?= =?UTF-8?q?gment=20of=20siyuan=20static=20file=20service.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + workspace/packages/utils/siyuan/url.ts | 27 +++++++ workspace/plugins/webview/src/index.ts | 103 +++++++++++-------------- 3 files changed, 75 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46c451d..68e7d32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - 添加块引用菜单 | Add block reference menu. - 添加超链接菜单 | Add hyperlink menu. +- 优化思源静态文件服务的判断 | Optimize the judgment of siyuan static file service. ## 2023-07-11 diff --git a/workspace/packages/utils/siyuan/url.ts b/workspace/packages/utils/siyuan/url.ts index a2c40e9..9c08ac1 100644 --- a/workspace/packages/utils/siyuan/url.ts +++ b/workspace/packages/utils/siyuan/url.ts @@ -84,3 +84,30 @@ export function parseSiyuanURL(url: URL) { return null; } } + +/** + * 判断一个超链接是否为思源静态文件服务 + * @param href: 超链接地址 + */ +export function isStaticPathname(href: string): boolean { + if (href.startsWith("/")) href = href.substring(1); + switch (true) { + case href.startsWith("stage/"): // 安装目录/resources/stage + + case href.startsWith("appearance/"): // 工作空间/conf/appearance + case href.startsWith("export/"): // 工作空间/temp/export + case href.startsWith("history/"): // 工作空间/history + + case href.startsWith("assets/"): // 工作空间/data/assets + case href.startsWith("emojies/"): // 工作空间/data/emojies + case href.startsWith("plugins/"): // 工作空间/data/plugins + case href.startsWith("plugins/"): // 工作空间/data/plugins + case href.startsWith("snippets/"): // 工作空间/data/snippets + case href.startsWith("templates/"): // 工作空间/data/templates + case href.startsWith("widgets/"): // 工作空间/data/widgets + return true; + + default: + return false; + } +} diff --git a/workspace/plugins/webview/src/index.ts b/workspace/plugins/webview/src/index.ts index 2984fb6..f76d110 100644 --- a/workspace/plugins/webview/src/index.ts +++ b/workspace/plugins/webview/src/index.ts @@ -31,6 +31,7 @@ import { Pathname, buildSiyuanWebURL, editorType2Pathname, + isStaticPathname, parseSiyuanURL, } from "@workspace/utils/siyuan/url"; import { @@ -598,68 +599,58 @@ export default class WebviewPlugin extends siyuan.Plugin { } /* 静态文件服务 */ - case link.href.startsWith("stage/"): // 安装目录/resources/stage - - case link.href.startsWith("appearance/"): // 工作空间/conf/appearance - case link.href.startsWith("export/"): // 工作空间/temp/export - case link.href.startsWith("history/"): // 工作空间/history - - case link.href.startsWith("assets/"): // 工作空间/data/assets - case link.href.startsWith("emojies/"): // 工作空间/data/emojies - case link.href.startsWith("plugins/"): // 工作空间/data/plugins - case link.href.startsWith("plugins/"): // 工作空间/data/plugins - case link.href.startsWith("snippets/"): // 工作空间/data/snippets - case link.href.startsWith("templates/"): // 工作空间/data/templates - case link.href.startsWith("widgets/"): // 工作空间/data/widgets - { - const href = `${globalThis.document.baseURI}${link.href}`; - if (FLAG_ELECTRON && FLAG_DESKTOP) { - /* 在后台页签中打开 */ - submenu.push({ - icon: "iconFile", - label: this.i18n.menu.openTabBackground.label, - click: () => this.openWebviewTab( - href, - link.title, - undefined, - { keepCursor: true }, - ), - }); - /* 在页签右侧打开 */ - submenu.push({ - icon: "iconLayoutRight", - label: this.i18n.menu.openTabRight.label, - click: () => this.openWebviewTab( - href, - link.title, - undefined, - { position: "right" }, - ), - }); - /* 在页签下侧打开 */ - submenu.push({ - icon: "iconLayoutBottom", - label: this.i18n.menu.openTabBottom.label, - click: () => this.openWebviewTab( - href, - link.title, - undefined, - { position: "bottom" }, - ), - }); - } - /* 使用新窗口打开 */ + case isStaticPathname(link.href): { + const href = link.href.startsWith("/") + ? `${globalThis.location.origin}${link.href}` + : `${globalThis.document.baseURI}${link.href}`; + + if (FLAG_ELECTRON && FLAG_DESKTOP) { + /* 在后台页签中打开 */ + submenu.push({ + icon: "iconFile", + label: this.i18n.menu.openTabBackground.label, + click: () => this.openWebviewTab( + href, + link.title, + undefined, + { keepCursor: true }, + ), + }); + /* 在页签右侧打开 */ + submenu.push({ + icon: "iconLayoutRight", + label: this.i18n.menu.openTabRight.label, + click: () => this.openWebviewTab( + href, + link.title, + undefined, + { position: "right" }, + ), + }); + /* 在页签下侧打开 */ submenu.push({ - icon: "iconOpenWindow", - label: this.i18n.menu.openByNewWindow.label, - click: () => this.openWebpageWindow( + icon: "iconLayoutBottom", + label: this.i18n.menu.openTabBottom.label, + click: () => this.openWebviewTab( href, link.title, - calculateScreenPosition(element), + undefined, + { position: "bottom" }, ), }); - break; } + /* 使用新窗口打开 */ + submenu.push({ + icon: "iconOpenWindow", + label: this.i18n.menu.openByNewWindow.label, + click: () => this.openWebpageWindow( + href, + link.title, + calculateScreenPosition(element), + ), + }); + break; + } /* 其他超链接 */ default: { From d04daa116a409e3c09fb28fc7d6a8ae683682484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Thu, 13 Jul 2023 23:24:10 +0800 Subject: [PATCH 011/113] chore(webview): release v1.3.0 --- workspace/plugins/webview/package.json | 2 +- workspace/plugins/webview/public/README.md | 2 ++ workspace/plugins/webview/public/README_zh_CN.md | 2 ++ workspace/plugins/webview/public/plugin.json | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/workspace/plugins/webview/package.json b/workspace/plugins/webview/package.json index f72ec39..351437a 100644 --- a/workspace/plugins/webview/package.json +++ b/workspace/plugins/webview/package.json @@ -1,7 +1,7 @@ { "name": "webview", "private": true, - "version": "1.1.1", + "version": "1.3.0", "type": "module", "scripts": { "dev": "vite", diff --git a/workspace/plugins/webview/public/README.md b/workspace/plugins/webview/public/README.md index ce83dce..5024630 100644 --- a/workspace/plugins/webview/public/README.md +++ b/workspace/plugins/webview/public/README.md @@ -31,6 +31,8 @@ A plugin for [SiYuan Note](https://github.com/siyuan-note/siyuan) that allows yo - Open hyperlinks in SiYuan Note new tabs (desktop only) - Open hyperlinks in a new window - Open the SiYuan Note editor in a new window +- Block reference context menu +- Hyperlink context menu ### Setting Introduction diff --git a/workspace/plugins/webview/public/README_zh_CN.md b/workspace/plugins/webview/public/README_zh_CN.md index 832a34a..ddf7f65 100644 --- a/workspace/plugins/webview/public/README_zh_CN.md +++ b/workspace/plugins/webview/public/README_zh_CN.md @@ -31,6 +31,8 @@ - 在思源笔记新标签页中打开超链接 (仅限桌面端) - 在新窗口中打开超链接 - 在新窗口中打开思源笔记编辑器 +- 块引用右键菜单 +- 超链接右键菜单 ### 设置项介绍 diff --git a/workspace/plugins/webview/public/plugin.json b/workspace/plugins/webview/public/plugin.json index 003f2ce..376613f 100644 --- a/workspace/plugins/webview/public/plugin.json +++ b/workspace/plugins/webview/public/plugin.json @@ -2,7 +2,7 @@ "name": "webview", "author": "Zuoqiu Yingyi", "url": "https://github.com/Zuoqiu-Yingyi/siyuan-plugin-webview", - "version": "1.1.1", + "version": "1.3.0", "minAppVersion": "2.9.0", "backends": [ "all" From 198a1a3ab6f444ab00b2dc33514819162a144c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Sat, 15 Jul 2023 13:20:09 +0800 Subject: [PATCH 012/113] =?UTF-8?q?feat(monaco-editor):=20=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E4=BE=A7=E8=BE=B9=E6=A0=8F=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=20|=20Implement=20sidebar=20editor.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 + workspace/packages/components/package.json | 3 +- .../components/siyuan/dock/Panel.svelte | 20 + .../components/siyuan/dock/block/Bar.svelte | 52 +++ .../components/siyuan/dock/block/Icon.svelte | 44 ++ .../components/siyuan/dock/block/Logo.svelte | 32 ++ .../components/siyuan/dock/block/index.ts | 33 ++ .../components/siyuan/misc/Svg.svelte | 2 +- .../packages/components/svelte.config.js | 2 +- workspace/packages/types/siyuan/events.d.ts | 9 + workspace/packages/utils/env/front-end.ts | 5 + workspace/packages/utils/misc/merge.ts | 8 +- workspace/packages/utils/misc/save.ts | 62 +++ workspace/packages/utils/package.json | 2 + .../index.html => iframes/editor.html} | 0 workspace/plugins/monaco-editor/package.json | 18 +- .../plugins/monaco-editor/public/README.md | 0 .../monaco-editor/public/README_zh_CN.md | 0 .../monaco-editor/public/i18n/en_US.json | 21 +- .../monaco-editor/public/i18n/zh_CHT.json | 21 +- .../monaco-editor/public/i18n/zh_CN.json | 21 +- .../plugins/monaco-editor/public/icon.png | Bin 0 -> 4711 bytes .../plugins/monaco-editor/public/plugin.json | 39 ++ .../monaco-editor/src/components/Dock.svelte | 74 ++++ .../src/components/Editor.svelte | 220 +++++++++- .../monaco-editor/src/configs/default.ts | 64 +++ .../plugins/monaco-editor/src/constants.ts | 20 + .../plugins/monaco-editor/src/editor/index.ts | 127 ++++++ .../monaco-editor/src/handlers/block.ts | 18 + workspace/plugins/monaco-editor/src/index.ts | 263 ++++++++++++ workspace/plugins/monaco-editor/src/main.ts | 81 ++-- .../monaco-editor/src/types/config.d.ts | 49 +++ .../monaco-editor/src/types/editor.d.ts | 32 ++ workspace/plugins/monaco-editor/tsconfig.json | 17 +- .../plugins/monaco-editor/tsconfig.node.json | 17 +- .../plugins/monaco-editor/vite.config.ts | 92 +--- .../monaco-editor/vite.iframes.config.ts | 32 ++ .../monaco-editor/vite.plugin.config.ts | 73 ++++ .../monaco-editor/vite.share.config.ts | 79 ++++ workspace/pnpm-lock.yaml | 394 ++++++++++++++---- 40 files changed, 1810 insertions(+), 240 deletions(-) create mode 100644 workspace/packages/components/siyuan/dock/Panel.svelte create mode 100644 workspace/packages/components/siyuan/dock/block/Bar.svelte create mode 100644 workspace/packages/components/siyuan/dock/block/Icon.svelte create mode 100644 workspace/packages/components/siyuan/dock/block/Logo.svelte create mode 100644 workspace/packages/components/siyuan/dock/block/index.ts create mode 100644 workspace/packages/utils/misc/save.ts rename workspace/plugins/monaco-editor/{editor/index.html => iframes/editor.html} (100%) create mode 100644 workspace/plugins/monaco-editor/public/README.md create mode 100644 workspace/plugins/monaco-editor/public/README_zh_CN.md create mode 100644 workspace/plugins/monaco-editor/public/icon.png create mode 100644 workspace/plugins/monaco-editor/src/components/Dock.svelte create mode 100644 workspace/plugins/monaco-editor/src/configs/default.ts create mode 100644 workspace/plugins/monaco-editor/src/constants.ts create mode 100644 workspace/plugins/monaco-editor/src/editor/index.ts create mode 100644 workspace/plugins/monaco-editor/src/handlers/block.ts create mode 100644 workspace/plugins/monaco-editor/src/types/config.d.ts create mode 100644 workspace/plugins/monaco-editor/src/types/editor.d.ts create mode 100644 workspace/plugins/monaco-editor/vite.iframes.config.ts create mode 100644 workspace/plugins/monaco-editor/vite.plugin.config.ts create mode 100644 workspace/plugins/monaco-editor/vite.share.config.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 68e7d32..2c771d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更改日志 | CHANGE LOG +## 2023-07-15 + +- 实现侧边栏编辑器 | Implement sidebar editor. + ## 2023-07-12 - 添加块引用菜单 | Add block reference menu. diff --git a/workspace/packages/components/package.json b/workspace/packages/components/package.json index acd1ac4..cebd76e 100644 --- a/workspace/packages/components/package.json +++ b/workspace/packages/components/package.json @@ -11,7 +11,8 @@ "less": "^4.1.3", "svelte": "^3.59.2", "svelte-preprocess": "^5.0.4", - "svelte-preprocess-less": "^0.4.0" + "svelte-preprocess-less": "^0.4.0", + "typescript": "^5.1.6" }, "dependencies": { "@workspace/tsconfig": "workspace:^", diff --git a/workspace/packages/components/siyuan/dock/Panel.svelte b/workspace/packages/components/siyuan/dock/Panel.svelte new file mode 100644 index 0000000..95883d5 --- /dev/null +++ b/workspace/packages/components/siyuan/dock/Panel.svelte @@ -0,0 +1,20 @@ + + +
+ +
diff --git a/workspace/packages/components/siyuan/dock/block/Bar.svelte b/workspace/packages/components/siyuan/dock/block/Bar.svelte new file mode 100644 index 0000000..8ea8cda --- /dev/null +++ b/workspace/packages/components/siyuan/dock/block/Bar.svelte @@ -0,0 +1,52 @@ + + + + +
+ + {#if logo || title} + + {/if} + + + {#each icons as icon, i (i)} + + + + + + {/each} +
diff --git a/workspace/packages/components/siyuan/dock/block/Icon.svelte b/workspace/packages/components/siyuan/dock/block/Icon.svelte new file mode 100644 index 0000000..793a4c3 --- /dev/null +++ b/workspace/packages/components/siyuan/dock/block/Icon.svelte @@ -0,0 +1,44 @@ + + + + + + onClick(element, e)} + data-type={type} + aria-label={ariaLabel} + class:toolbar__item--active={active} + class="block__icon b3-tooltips {tooltipsDirection}" +> + + diff --git a/workspace/packages/components/siyuan/dock/block/Logo.svelte b/workspace/packages/components/siyuan/dock/block/Logo.svelte new file mode 100644 index 0000000..302dfc3 --- /dev/null +++ b/workspace/packages/components/siyuan/dock/block/Logo.svelte @@ -0,0 +1,32 @@ + + + + + diff --git a/workspace/packages/components/siyuan/dock/block/index.ts b/workspace/packages/components/siyuan/dock/block/index.ts new file mode 100644 index 0000000..2e74d98 --- /dev/null +++ b/workspace/packages/components/siyuan/dock/block/index.ts @@ -0,0 +1,33 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import type { TooltipsDirection } from "../../misc/tooltips"; + +export interface IIcon { + icon: string; // 图标 ID + type?: string; // data-type 属性值 + active?: boolean; // 是否激活 + ariaLabel?: string; // 提示标签内容 + tooltipsDirection?: TooltipsDirection; // 提示标签方向 + onClick?: (element: HTMLElement, e: MouseEvent) => void; // 按钮点击回调函数 +} + +export interface IBar { + logo: string; // svg 图标引用 ID + title: string; // 标题 + icons: IIcon[]; // 按钮列表 +} diff --git a/workspace/packages/components/siyuan/misc/Svg.svelte b/workspace/packages/components/siyuan/misc/Svg.svelte index 5f178d6..b1cee04 100644 --- a/workspace/packages/components/siyuan/misc/Svg.svelte +++ b/workspace/packages/components/siyuan/misc/Svg.svelte @@ -16,7 +16,7 @@ --> diff --git a/workspace/packages/components/svelte.config.js b/workspace/packages/components/svelte.config.js index c1fef11..a31d58d 100644 --- a/workspace/packages/components/svelte.config.js +++ b/workspace/packages/components/svelte.config.js @@ -16,7 +16,7 @@ */ // REF https://github.com/sveltejs/language-tools/issues/699 -import sveltePreprocess from 'svelte-preprocess'; +import sveltePreprocess from "svelte-preprocess"; import { less } from "svelte-preprocess-less"; export default { diff --git a/workspace/packages/types/siyuan/events.d.ts b/workspace/packages/types/siyuan/events.d.ts index 06dd009..05d6476 100644 --- a/workspace/packages/types/siyuan/events.d.ts +++ b/workspace/packages/types/siyuan/events.d.ts @@ -23,6 +23,11 @@ import type { IOtherBlockMenuDetail, } from "@workspace/utils/siyuan/menu/block"; +export interface IClickEditorContentDetail { + event: PointerEvent; + protyle: IProtyle; +} + export interface IOpenMenuLinkDetail { element: HTMLSpanElement, menu: InstanceType; @@ -43,6 +48,10 @@ export interface IClickEditorTitleIconEvent extends CustomEvent { + type: "click-editorcontent"; +} + export interface IOpenMenuLinkEvent extends CustomEvent { type: "open-menu-link"; } diff --git a/workspace/packages/utils/env/front-end.ts b/workspace/packages/utils/env/front-end.ts index e9b08c8..e82666c 100644 --- a/workspace/packages/utils/env/front-end.ts +++ b/workspace/packages/utils/env/front-end.ts @@ -18,6 +18,7 @@ import siyuan from "siyuan"; export const FLAG_ELECTRON = isElectron(); +export const FLAG_IFRAME = isIframe(); export const FLAG_DESKTOP = isDesktop(); export const FLAG_BROWSER = isBrowser(); export const FLAG_MOBILE = isMobile(); @@ -34,6 +35,10 @@ export function isElectron(): boolean { return hasNodeProcess() && hasNodeRequire(); } +export function isIframe(): boolean { + return globalThis.self !== globalThis.top; +} + export function isDesktop(): boolean { switch (siyuan.getFrontend()) { case "desktop": diff --git a/workspace/packages/utils/misc/merge.ts b/workspace/packages/utils/misc/merge.ts index 922acb1..85db396 100644 --- a/workspace/packages/utils/misc/merge.ts +++ b/workspace/packages/utils/misc/merge.ts @@ -17,10 +17,10 @@ import deepmerge from "deepmerge"; -export function merge(...args: any[]): Object { - return deepmerge.all(args); +export function merge(...args: Partial[]): T { + return deepmerge.all(args); } -export function mergeIgnoreArray(...args: any[]): Object { - return deepmerge.all(args, { arrayMerge: (_target, source, _options) => source }); +export function mergeIgnoreArray(...args: Partial[]): T { + return deepmerge.all(args, { arrayMerge: (_target, source, _options) => source }); } diff --git a/workspace/packages/utils/misc/save.ts b/workspace/packages/utils/misc/save.ts new file mode 100644 index 0000000..994ae0d --- /dev/null +++ b/workspace/packages/utils/misc/save.ts @@ -0,0 +1,62 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import { saveAs } from 'file-saver'; + +export function SaveFileAs(options: { + data: BlobPart, + filename?: string, + filetype?: string, + lastModified?: number, +}): File | Blob { + if (options.filename) { + const file = new File( + [options.data], + options.filename, + { + type: options.filetype, + lastModified: options.lastModified, + }, + ); + saveAs(file, file.name); + return file; + } + else { + switch (true) { + case options.data instanceof File: { + const file = options.data as File; + saveAs(file, file.name); + return file; + } + case options.data instanceof Blob: { + const blob = options.data as Blob; + saveAs(blob); + return blob; + } + default: { + const blob = new Blob( + [options.data], + { + type: options.filetype, + }, + ); + saveAs(blob); + return blob; + } + } + } +} diff --git a/workspace/packages/utils/package.json b/workspace/packages/utils/package.json index 634e385..c063541 100644 --- a/workspace/packages/utils/package.json +++ b/workspace/packages/utils/package.json @@ -6,7 +6,9 @@ "access": "public" }, "devDependencies": { + "@types/file-saver": "^2.0.5", "deepmerge": "^4.3.1", + "file-saver": "^2.0.5", "parse-data-url": "^5.0.0" }, "dependencies": { diff --git a/workspace/plugins/monaco-editor/editor/index.html b/workspace/plugins/monaco-editor/iframes/editor.html similarity index 100% rename from workspace/plugins/monaco-editor/editor/index.html rename to workspace/plugins/monaco-editor/iframes/editor.html diff --git a/workspace/plugins/monaco-editor/package.json b/workspace/plugins/monaco-editor/package.json index 2c95b22..756961c 100644 --- a/workspace/plugins/monaco-editor/package.json +++ b/workspace/plugins/monaco-editor/package.json @@ -5,29 +5,31 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build", + "build": "npm run build:plugin && npm run build:iframes", + "build:plugin": "vite build --mode plugin", + "build:iframes": "vite build --mode iframes", "preview": "vite preview", "check": "svelte-check --tsconfig ./tsconfig.json" }, "devDependencies": { + "@monaco-editor/loader": "^1.3.3", "@sveltejs/vite-plugin-svelte": "^2.4.2", "@tsconfig/svelte": "^4.0.1", - "@types/node": "^20.4.1", + "@types/node": "^20.4.2", + "deepmerge": "^4.3.1", "less": "^4.1.3", + "monaco-editor": "^0.40.0", "svelte": "^3.59.2", - "svelte-check": "^3.4.5", + "svelte-check": "^3.4.6", "svelte-preprocess-less": "^0.4.0", "tslib": "^2.6.0", "typescript": "^5.1.6", - "vite": "^4.4.2", - "vite-plugin-monaco-editor": "^1.1.0", + "vite": "^4.4.4", "vite-plugin-static-copy": "^0.16.0" }, "dependencies": { - "@monaco-editor/loader": "^1.3.3", "@workspace/components": "workspace:^", "@workspace/types": "workspace:^", - "@workspace/utils": "workspace:^", - "monaco-editor": "^0.40.0" + "@workspace/utils": "workspace:^" } } diff --git a/workspace/plugins/monaco-editor/public/README.md b/workspace/plugins/monaco-editor/public/README.md new file mode 100644 index 0000000..e69de29 diff --git a/workspace/plugins/monaco-editor/public/README_zh_CN.md b/workspace/plugins/monaco-editor/public/README_zh_CN.md new file mode 100644 index 0000000..e69de29 diff --git a/workspace/plugins/monaco-editor/public/i18n/en_US.json b/workspace/plugins/monaco-editor/public/i18n/en_US.json index 6e0d1a6..69ed0dc 100644 --- a/workspace/plugins/monaco-editor/public/i18n/en_US.json +++ b/workspace/plugins/monaco-editor/public/i18n/en_US.json @@ -1,3 +1,22 @@ { - "displayName": "Code Editor" + "displayName": "Code Editor", + "dock": { + "kramdown": { + "ariaLabel": "Edit kramdown" + }, + "title": "Code Edit" + }, + "editor": { + "action": { + "save": { + "label": "Save" + }, + "saveAs": { + "label": "Save As" + }, + "toggleWordWrap": { + "label": "Toggle Word Wrap" + } + } + } } diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json index 50e318d..58a9d6a 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json @@ -1,3 +1,22 @@ { - "displayName": "代碼編輯器" + "displayName": "程式碼編輯器", + "dock": { + "kramdown": { + "ariaLabel": "編輯 kramdown" + }, + "title": "程式碼編輯" + }, + "editor": { + "action": { + "save": { + "label": "保存" + }, + "saveAs": { + "label": "另存為" + }, + "toggleWordWrap": { + "label": "切換自動換行" + } + } + } } diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json index fcd8f06..6cdb14d 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json @@ -1,3 +1,22 @@ { - "displayName": "代码编辑器" + "displayName": "代码编辑器", + "dock": { + "kramdown": { + "ariaLabel": "编辑 kramdown" + }, + "title": "代码编辑" + }, + "editor": { + "action": { + "save": { + "label": "保存" + }, + "saveAs": { + "label": "另存为" + }, + "toggleWordWrap": { + "label": "切换自动换行" + } + } + } } diff --git a/workspace/plugins/monaco-editor/public/icon.png b/workspace/plugins/monaco-editor/public/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fbc5e13b3ec0139bff326cd31bc3e36fac6f151c GIT binary patch literal 4711 zcmZWtcQ_l|_m34psL>*nY6-0nHCrmLT{Ws|)Qml9Q09bV%Xc}GctiJ>TUX02# zek&J@-d|nE1a#5DKu+-&b0*&h7XAPLT=*~11Q)A3zgUC>Xqg8X`?v%I**|jz1O)}b z-Ml^g9qoOc;Xcn?-)t-M0RSA|bTrjWg7dc)LW51#3K(~&)O;P<77lo{)(@jtRI&)f zTURDGSKr}R_pqgu+Lm$a^H$R*$SwCP^zOSHVVbWTnl@vmPpVs^jQT2G>F11oi&ppM zD(9KP;Y?xl8W@pu#m+OjUL*KWey;yIBE9XcimWX47?JMdGIm^WhsyFGO+@Gab~(P+ z6xt8zEoMRbXs2hKczxO+4u8G1;Ur7;TFTrFXpHmqC0oI(OADbCow7zfx6yARx^F^G zd#PL#znRX;$FplnUOtw;uL~Tx!OV;r(->~PBmG4&e8)B81>BST2dq1NJWx2$<;sk` zE}!x1(=Wo5FnapIpq)imkNP-mEaeeEwBVp9E$Ktcp=$2!lTX@gw5Ja`IbSxfZ&%f< zJ}woMF^^umhbX3>V-`9K7=Kq^_n*lQDBj@s`=&?_{!IT8{gaY#d&_r9Lv~CiUnN>- zzh(nIfDh+0dInlwD?z>DOApwWgDOgtO=`t|%C1%682`>T<)gk}BBwZs~> zv%*OJm2gjojK~bj@wsij@x1LmJB71(%fhySDALv#v)d*NkUx>~TF%wE?pc4dvhe2h zA`7~g2sf9x#5KK}o}Y5W(%zbj`nN8)#>oZpIDj%Icn5{Q&NiMQs8_1DI=b8QyzXDq z0FG#~X%8u0|I7`r8x%|44F*Qtf$1!qBod!5H2Mms%DX#3B+~C*)$+Gk4vBP)$3SWE zkQuqgrjy>424s+g&FAu3wwp1|(X?iM95CH0kwa*Y2{&=NOM%e9PI5~Po@+!^#vBNf zkT|E|t)UydjMS?K-Q{QAx@n1j;au-HXa^Zw7Vppz_GGwyKR^CWoA(FT7)+qvZJf2^d)_>l(|d2ae(?}U$4WagAQFF3^+UMJoNTY z^%gWT8-?l9beHkKh5E+b>A%m?L@E%R>{w(rET>qG_G{vQcH9TTn0dH)9&KD&4x}CD zKI_7TfXmBufv75tMTa$6cA;jWV=f?t^Qw5CM1f z0wfbufiT+RSZKD}hxYESyAur}%#bSkZ#*Fwu@y-GxOHEJZ_tjld-*^@7+oq6|H9&g=W{$If~*OXlzcdn z=S#T)shG*#OCW5HN-|`Sa!VaITq?K?*rPtt zkVGE`tQ;!HE|zH@?1G9ZXV6C{c43NOR0e~Ito0}Kt;x#ICH4@75k)&)Y`4*Qp&|vN z*qWXq$8$w-V@U%x0ux1hs&w1Sk8Eu>RqOcJ&@iJKY?utrtOYYYsg#wvwyBDUq-q_d zS$x_gRU4di^7@@VRh);imFcq5;Wei@q7;$}=EZOzgag}?FPUcjniHq1UFM?7vn%x~ zqATAPm-i%Gl3@U+zLOaoyL_1;*|`6}W}=wFVT_I5Zu?GydI~ATU+eknerpR%C8hR*3;>d1)fOxF8j}0O zT*LovqL1T_EFf+4pC@1?8f#O*N^7A!XJ%>6W0vHn;;;oo#^T7RY)UwY6Q}$q_ zW#1&KA}0ob9sD|%bP(0kjK$#gm?mO*hc@vpCV)dA(qG&vQ7Q*bj%8rrc@&#w^jX!~ z>?7Wd^xDai9TXgcW|7W2x07!7Q5Vp-;mdJJWXmgXUF&jMVm_3tL3l3fJGnyPp3v?Z z_c&XG@rlDOCBpl`xEN=T@0Bz{4v1Yh{ckL|A5Hu0W`Qg$2o@9UHPN?>{a=l5e#7jB zUgJi_=LRssLYF#Tve(>xp92!1nfbCgOu{ueZR_lh3v8!x#+GrG&MkM-=IrEgf1LFQ z&urBqIy9Dz)jkXRJkI{KeWFh@1^$T5jrH@G^~u*qdn}0&pZGf2gfy&?rShspq2DW5 zq$+Ec{2l~I@3IF9KYJdyic~9YXQh9fXrEvCpV89FsMT{>(dejT?0Vmz86Qlg>e7z` z+Dx=Z!ke6z9E#^9fkNj@ku))z6R_BLg)>>40yL(YM?6kShlwo6N}zD=O9>AUPr;Wv zm?N>RR30Oh?GiTqD_PX^+cDD*5&r54g0O=dNduD}omB&|Zn$xS!6z}JPR^gkU zltG=Yq5oaBHX_$p+t}E65A$s%bYW{!^N|k;`u2>GoqX~oHn;3fGjP6$z=S*;R;=n3 znRwLZgHmh@@EHE_; zR#|R1$y2#*HON#nL8<+Dm*2jss2BUDGyEANhb?mTa51aQzjV}YICILAdN0Dbe2Kv@ z7P6}CF2Sp!!82UOSfTjuQwRR>@^Xy$9oM5z&U4U^MjzYk5Uh_h*DC{aVSwP(?(uTE zRq(01Qwh1j@R1tQl%O5QsuZ2`Tk6;B$*-TXzFw6us(<8p@2DfID-ei9DecIWE|1q1 z%pG!4vgTCRjPDZ^ICB?GL?Znw-uN&&w#*Lj87Rrks~0rqhZG5|2ypLQ+cW^H=kmVu`*aL7A$?P?f5+9pvBmQ{n_gD zUv=ilk#fd6Xcosm+ii(9(Cs=RW5pu3snrcG1z{l~PuRbT)`LZ&*dOrKAmB z5LfVv>drkzd3kx;L=5aP6LNy;;w6)8+!MeRxZ)Y#X?u@@Z~N2oZ5r)o90ce02dwsQ z&10-cjT*;ez_Fx;CMVw5o4N4{49FMbO&RMS5-?(qnV6;%tVqA2c6dwQ(+u4hR!n~X zJy@P+%_R{d!qJB?XUit<8GCu%1N5ZlvvoEoh!qq+9p2{7KC_&N70GJ`j$C-ogxtoj za#kdn$ZW+cB!?x@!ycqhwzA#8#@~nve!g}F10@Vgi z{WZC-S)LW6JuR~IW1$uw=t$MIcMU`aT2%TzeP30~D!ltXetnNZO*T4ss9*ULv zlZJ~cA643dwyiy^hb{ke>wea{uwlW~xybe<&Ak5@pfl5zd)Ko%0wO}|{m_6Y&d>70 zSc}I|tK_s1E&(r`tSKh|_&?h2*}ii?xPFba*jIf|uAlu97SKz-5gf-jQdR9mDq6Wd z*5x`)Iwylg*M4#z<`X6`tMZ(X-}iIc8@w1VdwvDCdAx?7`I$JJn^ul=7*myOgfs2C zQN-!Sa3N*)7WkR8AmV#)vQr#AY|)A&_kFc|tYDP5 z`7wO_5#T&_qK|?_vdpeen}!~O&xI~PMw?*{3Q(e-4pefCe`=gKaz6hwceOZzb@InY zCkIQ9`_de|ca^+mLWiL|Qf1z=3{S2C{^2nsVL{C)zo!uI?NhS1?VJssO408~a=Ams z$Y3~T*Q~mi9Utd^%33{Y&q#B!YW_x$4C5m-HE#)rEV(Uo8(on+zxP@ujG44fIIcW> zt&AXEJ55wq5L12VlFcnJEYv@uX12Ho;YU0C|{!IUfF)A+4{}l0#b-GQ)7Jqix;`? zS_~QatP1=w?8x}n0gT_PZgF|ggt@Cr4zL^EDSEZ_Giq3%Hbs6v`O?Yao3QN$Ax{Og zLVA+pilngH--BjmXaAeK@mv-~)Aea)hP1H#a)f+h`yPlivJo8Hm6vSjLEX{deeBY5}f-R8b{V!14~DsC`>d%>%o9xjGB+g-qo5M6o$nF(VOH!bI^Bt zbX^3RZ%f?|=hc%88O3BVA8pEMVoA8>HCh?W`v!_9TyVD3$kkj+DMj8(FDIOsD8~X8gP` z`s5O!=sof`glOKT_m-XWqqai{{l=tKA$ZzN7f)OK;$KVA7s2>Py=#gP ziGq~xlZ+R!m|G`MzsTVkQLXvhvC zGC(}CauC<>#Mf8H?pzUbG?kOe?3VfB8L@gTXK2%ZLzwW+ZP>Y^b+R*Qz3(E+xrfn< zPz{irSPhx3XXr33Z+$PI1{|TU3x61@W6Di?^dLYogdLk553jL&ZG-)uol6~%$pUBT zxR}X@IpH(Z0g@NbBuI$fc-sb>!%3s)QMMmh(9TQ>9XQypaay4oFzQ`0|{7fh@wD*J_?kE zc;@!1FacDNnx`4)NnF9mWNfvdWDN8{O6PI$I$F^S)o(=uZuxb>VI|J?!GPa;kPVOu zjRgwM*M`jN=w%L&$`&*S#q(JFdCE|GVnES?ZADXjM7&w&iBDMonaco Editor to view and edit code.", + "zh_CN": "使用 Monaco Editor 查看与编辑代码。", + "zh_CHT": "使用 Monaco Editor 檢視與編輯程式碼。" + }, + "readme": { + "default": "README.md", + "zh_CN": "README_zh_CN.md", + "zh_CHT": "README_zh_CN.md" + }, + "funding": { + "openCollective": "", + "patreon": "", + "github": "", + "custom": [ + "https://afdian.net/a/zuoqiu", + "https://ko-fi.com/zuoqiu" + ] + } +} diff --git a/workspace/plugins/monaco-editor/src/components/Dock.svelte b/workspace/plugins/monaco-editor/src/components/Dock.svelte new file mode 100644 index 0000000..eb96d7e --- /dev/null +++ b/workspace/plugins/monaco-editor/src/components/Dock.svelte @@ -0,0 +1,74 @@ + + + + + + diff --git a/workspace/plugins/monaco-editor/src/components/Editor.svelte b/workspace/plugins/monaco-editor/src/components/Editor.svelte index 2d10d85..2e9709a 100644 --- a/workspace/plugins/monaco-editor/src/components/Editor.svelte +++ b/workspace/plugins/monaco-editor/src/components/Editor.svelte @@ -16,33 +16,114 @@ --> @@ -69,7 +242,8 @@
diff --git a/workspace/plugins/monaco-editor/src/components/Main.svelte b/workspace/plugins/monaco-editor/src/components/Main.svelte index 7152b9e..96a02d9 100644 --- a/workspace/plugins/monaco-editor/src/components/Main.svelte +++ b/workspace/plugins/monaco-editor/src/components/Main.svelte @@ -19,7 +19,7 @@ import Editor from "./Editor.svelte"; - + diff --git a/workspace/plugins/monaco-editor/src/constants.ts b/workspace/plugins/monaco-editor/src/constants.ts index 0e2d648..6745c8e 100644 --- a/workspace/plugins/monaco-editor/src/constants.ts +++ b/workspace/plugins/monaco-editor/src/constants.ts @@ -17,4 +17,5 @@ export default { INIT_CHANNEL_NAME: "monaco-editor-init", // 初始化通道名称 -} + MESSAGE_EVENT_NAME: "message", // 消息事件名称 +} as const; diff --git a/workspace/plugins/monaco-editor/src/editor/index.ts b/workspace/plugins/monaco-editor/src/editor/index.ts index 96aa6e1..c323adc 100644 --- a/workspace/plugins/monaco-editor/src/editor/index.ts +++ b/workspace/plugins/monaco-editor/src/editor/index.ts @@ -14,114 +14,82 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import constants from "@/constants"; -import { isElectron } from "@workspace/utils/env/front-end"; -import MonacoEditorPlugin from "@/index"; +/* 界面入口 */ +import "@/styles/editor.less"; -import type { Electron } from "@workspace/types/electron"; +import { + FLAG_ELECTRON, + FLAG_IFRAME, + FLAG_POPUP, +} from "@workspace/utils/env/native-front-end"; +import { Logger } from "@workspace/utils/logger"; -export class Editor { - constructor( - public readonly plugin: InstanceType, // 插件对象 - public readonly channel: MessageChannel | Electron.MessageChannelMain, // 消息通道 - public readonly url: URL = new URL(`${globalThis.document.baseURI}plugins/${plugin.name}/iframes/editor.html`), // 编辑器 URL - ) { } +import Editor from "@/components/Editor.svelte"; +import { EditorBridgeSlave } from "../bridge/slave"; - /** - * 编辑器加载完成监听器 - */ - protected loadListener = () => { +var editor: InstanceType; // 编辑器组件 - } +const bridge = new EditorBridgeSlave( + () => { + /* 编辑器初始化 */ + bridge.addEventListener( + "editor-init", + e => { + const { data } = e.data; + const logger = new Logger(`${data.name}-${(() => { + switch (true) { + case FLAG_ELECTRON: + return "window"; + case FLAG_IFRAME: + return "iframe"; + case FLAG_POPUP: + return "popup"; + default: + return "unknow"; + } + })()}`); - /** - * 在新窗口中打开编辑器 - */ - public openEditorInWindow( - params: Electron.BrowserWindowConstructorOptions, - ) { - if (isElectron()) { - try { - const { BrowserWindow } = globalThis.require("@electron/remote") as Electron.RemoteMainInterface; - const window = new BrowserWindow(params); + /* 编辑器已存在则销毁原编辑器 */ + if (editor) { + editor.$destroy(); + } - /* 启用 Electron 环境 */ - globalThis - .require('@electron/remote') - .require('@electron/remote/main') - .enable(window.webContents); - - /* 加载 URL */ - window.loadURL(this.url.href); - - /** - * 编辑器加载完成 - * REF: https://www.electronjs.org/zh/docs/latest/api/web-contents#event-did-finish-load - */ - window.webContents.once("did-finish-load", () => { - /** - * 向窗口发送消息以建立消息通道 - * REF: https://www.electronjs.org/zh/docs/latest/api/web-contents#contentspostmessagechannel-message-transfer - */ - window.webContents.postMessage( - constants.INIT_CHANNEL_NAME, - undefined, - [this.channel.port2 as Electron.MessagePortMain], - ); + /* 创建新的编辑器 */ + editor = new Editor({ + target: globalThis.document.body, + props: { + plugin: { + name: data.name, + i18n: data.i18n, + logger: logger, + }, + locale: data.locale, + diff: data.diff, + savable: data.savable, + changable: data.changable, + original: data.original, + modified: data.modified, + options: data.options, + }, }); + /* 监听更改与保存事件 */ + editor.$on("changed", e => bridge.changed(e.detail)); + editor.$on("save", e => bridge.save(e.detail)); + }, + ); + /* 更改编辑器配置 */ + bridge.addEventListener( + "editor-set", + e => { + const { data } = e.data; - return window; - } catch (err) { - this.plugin.logger.warn(err); - } - } - else { - const window = globalThis.open( - this.url, - this.url.href, - [ - `popup = true`, - `width = ${params.width}`, - `height = ${params.height}`, - `left = ${params.x}`, - `top = ${params.y}`, - ].join(","), - ); - window.addEventListener("load", () => { - /** - * 向窗口发送消息以建立消息通道 - * REF: https://zh.javascript.info/cross-window-communication#iframe-cuo-wu-wen-dang-xian-jing - * REF: https://developer.mozilla.org/zh-CN/docs/Web/API/Window/postMessage - */ - window.postMessage( - undefined, - "*", - [this.channel.port2 as MessagePort], - ); - }); - return window; - } - } + if (editor) { + editor.$set(data); + } + }, + ); + bridge.ready(); + }, +); - /** - * 在 iframe 中打开 - */ - public openEditorInIframe( - iframe: HTMLIFrameElement = globalThis.document.createElement("iframe"), - ): HTMLIFrameElement { - iframe.src = this.url.href; - iframe.addEventListener("load", () => { - /** - * 向 iframe 发送消息以建立消息通道 - * REF: https://github.com/mdn/dom-examples/blob/main/channel-messaging-basic/index.html - */ - iframe.contentWindow.postMessage( - undefined, - "*", - [this.channel.port2 as MessagePort], - ); - }); - return iframe; - } -} diff --git a/workspace/plugins/monaco-editor/src/handlers/handler.ts b/workspace/plugins/monaco-editor/src/handlers/handler.ts new file mode 100644 index 0000000..7ebd9a8 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/handlers/handler.ts @@ -0,0 +1,28 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import { EditorBridgeMaster } from "~/src/bridge/master"; + +export abstract class Handler { + constructor( + public readonly bridge: InstanceType, + ) { + + } + + public abstract readonly message +} diff --git a/workspace/plugins/monaco-editor/src/index.ts b/workspace/plugins/monaco-editor/src/index.ts index 21b3394..b45f3dd 100644 --- a/workspace/plugins/monaco-editor/src/index.ts +++ b/workspace/plugins/monaco-editor/src/index.ts @@ -32,10 +32,11 @@ import { getBlockMenuContext } from "@workspace/utils/siyuan/menu/block"; import { getElementScreenPosition } from "@workspace/utils/misc/position"; import type { IClickBlockIconEvent, IClickEditorContentEvent } from "@workspace/types/siyuan/events"; +import type { Electron } from "@workspace/types/electron"; import Dock from "./components/Dock.svelte"; import { DEFAULT_CONFIG, siyuanConfig2EditorOptions } from "./configs/default"; -import { Editor } from "./editor"; +import { EditorBridgeMaster } from "./bridge/master"; import type { IConfig, IEditorOptions, @@ -102,6 +103,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { type: "-dock-panel", init() { // plugin.logger.debug(this); + (this.element as HTMLElement).classList.add("fn__flex-column"); const dock = new Dock({ target: this.element, diff --git a/workspace/plugins/monaco-editor/src/main.ts b/workspace/plugins/monaco-editor/src/main.ts deleted file mode 100644 index 1dadb3f..0000000 --- a/workspace/plugins/monaco-editor/src/main.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Copyright (C) 2023 Zuoqiu Yingyi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -/* 界面入口 */ -import Main from "./components/Main.svelte"; -import constants from "./constants"; -import "./styles/main.less"; - -import { - FLAG_ELECTRON, - FLAG_IFRAME, -} from "@workspace/utils/env/front-end"; - -import type { Electron } from "@workspace/types/electron"; - -/* 通道端口 */ -var port: MessagePort; - -/** - * 初始化监听器 - */ -async function initListener(e: MessageEvent | Electron.IpcRendererEvent) { - port = e.ports[0]; - port.onmessage = messageListener; -} - -/** - * 消息监听器 - */ -async function messageListener(e: MessageEvent) { - console.log(e); -} - -switch (true) { - case FLAG_ELECTRON: { - /** - * 使用 ipcRenderer 获取 MessagePortMain - * REF: https://www.electronjs.org/zh/docs/latest/api/ipc-renderer - * REF: https://www.electronjs.org/zh/docs/latest/tutorial/ipc - * REF: https://www.electronjs.org/zh/docs/latest/api/message-channel-main - */ - const { ipcRenderer } = globalThis.require("electron") as { ipcRenderer: Electron.IpcRenderer }; - ipcRenderer.once(constants.INIT_CHANNEL_NAME, initListener); - break; - } - case FLAG_IFRAME: { - /** - * 使用 addEventListener("message") 获取 MessagePort - * REF: https://developer.mozilla.org/zh-CN/docs/Web/API/Window/postMessage#the_dispatched_event - * REF: https://developer.mozilla.org/zh-CN/docs/Web/API/MessagePort - * REF: https://github.com/mdn/dom-examples/blob/main/channel-messaging-basic/page2.html - */ - globalThis.addEventListener("message", initListener, { once: true }); - break; - } - default: - break; -} - -const main = new Main({ - target: globalThis.document.body, - props: { - }, -}); diff --git a/workspace/plugins/monaco-editor/src/styles/main.less b/workspace/plugins/monaco-editor/src/styles/editor.less similarity index 100% rename from workspace/plugins/monaco-editor/src/styles/main.less rename to workspace/plugins/monaco-editor/src/styles/editor.less diff --git a/workspace/plugins/monaco-editor/src/types/editor.d.ts b/workspace/plugins/monaco-editor/src/types/editor.d.ts index 4077161..9c8e259 100644 --- a/workspace/plugins/monaco-editor/src/types/editor.d.ts +++ b/workspace/plugins/monaco-editor/src/types/editor.d.ts @@ -17,8 +17,9 @@ import type { editor as Editor } from "monaco-editor"; import type { IMonacoEditorOptions } from "@/types/config"; +import type MonacoEditorPlugin from "@/index"; -/* 编辑器模式 */ +/* 编辑器模态 */ export interface IEditorModel { value: string; // 编辑器内容 language?: string; // 编辑器语言模式 @@ -30,3 +31,17 @@ export interface IDockEditor { modified: IEditorModel, options: IMonacoEditorOptions, } + +/* 插件接口 */ +export type IPlugin = Pick< + MonacoEditorPlugin, + "name" | "i18n" | "logger", +>; + +export interface IEditorEvent { + changed: { + value: string; + event: Editor.IModelContentChangedEvent; + }; // 内容更改事件 + save: { value: string }; // 保存事件 +} diff --git a/workspace/plugins/monaco-editor/src/types/message.d.ts b/workspace/plugins/monaco-editor/src/types/message.d.ts new file mode 100644 index 0000000..8e05258 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/types/message.d.ts @@ -0,0 +1,96 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import type { default as Monaco, editor as Editor } from "monaco-editor"; + +import type { I18N } from "@/utils/i18n"; +import type { + IEditorModel, + IEditorEvent, +} from "./editor"; +import type { IMonacoEditorOptions } from "./config"; + +/* 传输的消息 */ +export interface IMessage { + channel: string; // 通道 + data: any; // 数据 +} + +/* 来自主机的消息 */ +export interface IMessageEditorMasterEventMap { + "editor-init": MessageEvent; + "editor-set": MessageEvent; +} + +/* 初始化编辑器 */ +export interface IMessageEditorInit extends IMessage { + channel: "editor-init"; + data: { + name: string; // 插件名称 + i18n: I18N; // 插件国际化字段 + + locale: string; // 编辑器界面语言 + diff: boolean; // 是否为差异对比模式 + savable: boolean; // 是否可保存 (是否显示保存按钮+是否派生保存事件) + changable: boolean; // 是否可更改 (是否派生更改事件) + original?: IEditorModel; // 编辑器原始内容 (仅差异对比模式) + modified: IEditorModel; // 编辑器变更内容 + options: IMonacoEditorOptions; // 编辑器配置 + }; +} + +/* 设置编辑器设置项 */ +export interface IMessageEditorSet extends IMessage { + channel: "editor-set"; + data: { + savable?: boolean; // 是否可保存 (保存按钮+派生保存事件) + changable?: boolean; // 是否可更改 (派生更改事件) + + original?: IEditorModel; // 编辑器原始内容 (仅差异对比模式) + modified?: IEditorModel; // 编辑器变更内容 + options?: Editor.IEditorOptions & Editor.IGlobalEditorOptions; // 编辑器配置 + diffOptions?: Editor.IDiffEditorOptions; // 差异对比编辑器配置 + }; +} + +/* 来自从机的消息 */ +export interface IMessageEditorSlaveEventMap { + "editor-ready": MessageEvent; + "editor-changed": MessageEvent; + "editor-save": MessageEvent; + // [key: string]: MessageEvent; +} + +/* 编辑器就绪 */ +export interface IMessageEditorReady extends IMessage { + channel: "editor-ready"; + data: { + status: boolean; + }; +} + +/* 编辑器内容更改事件 */ +export interface IMessageEditorChanged extends IMessage { + channel: "editor-changed"; + data: IEditorEvent["changed"]; +} + +/* 保存事件 */ +export interface IMessageEditorSave extends IMessage { + channel: "editor-save"; + data: IEditorEvent["save"]; +} diff --git a/workspace/plugins/monaco-editor/vite.iframes.config.ts b/workspace/plugins/monaco-editor/vite.iframes.config.ts index 64cc322..dd95a3e 100644 --- a/workspace/plugins/monaco-editor/vite.iframes.config.ts +++ b/workspace/plugins/monaco-editor/vite.iframes.config.ts @@ -21,7 +21,7 @@ import { resolve } from "path" // https://vitejs.dev/config/ export default { build: { - minify: true, + minify: false, // sourcemap: "inline", rollupOptions: { input: { From 3ca540ba216816caad4f8e8b4ab0f25b7e128f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Mon, 17 Jul 2023 14:58:13 +0800 Subject: [PATCH 014/113] =?UTF-8?q?feat(monaco-editor):=20=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E5=9D=97=E5=A4=84=E7=90=86=E5=99=A8=20|=20Implement?= =?UTF-8?q?=20block=20handler.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 + .../components/siyuan/dock/block/Icon.svelte | 10 +- .../components/siyuan/dock/block/index.ts | 4 +- .../monaco-editor/public/i18n/en_US.json | 8 +- .../monaco-editor/public/i18n/zh_CHT.json | 8 +- .../monaco-editor/public/i18n/zh_CN.json | 8 +- .../monaco-editor/src/components/Dock.svelte | 55 ++-- .../src/components/Editor.svelte | 3 + .../monaco-editor/src/handlers/block.ts | 248 ++++++++++++++++++ .../monaco-editor/src/handlers/handler.ts | 18 +- workspace/plugins/monaco-editor/src/index.ts | 68 +++-- .../monaco-editor/src/utils/language.ts | 41 +++ 12 files changed, 419 insertions(+), 56 deletions(-) create mode 100644 workspace/plugins/monaco-editor/src/utils/language.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 216a568..6a9a7b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更改日志 | CHANGE LOG +## 2023-07-17 + +- 实现块处理器 | Implement block handler. + ## 2023-07-16 - 实现 iframe 编辑器 | Implement iframe editor. diff --git a/workspace/packages/components/siyuan/dock/block/Icon.svelte b/workspace/packages/components/siyuan/dock/block/Icon.svelte index 793a4c3..7a0cda3 100644 --- a/workspace/packages/components/siyuan/dock/block/Icon.svelte +++ b/workspace/packages/components/siyuan/dock/block/Icon.svelte @@ -26,19 +26,19 @@ export let active: IIcon["active"] = false; // 按钮是否激活 export let ariaLabel: IIcon["ariaLabel"] = ""; // 提示标签内容 export let tooltipsDirection: IIcon["tooltipsDirection"] = TooltipsDirection.sw; // 提示标签方向 - export let onClick: IIcon["onClick"] = (_element, _e) => {}; // 按钮点击回调函数 + export let onClick: IIcon["onClick"] = () => false; // 按钮点击回调函数 - let element: HTMLSpanElement; + let element: HTMLButtonElement; - onClick(element, e)} + on:click={e => {active = onClick(e, element, active)}} data-type={type} aria-label={ariaLabel} class:toolbar__item--active={active} class="block__icon b3-tooltips {tooltipsDirection}" > - + diff --git a/workspace/packages/components/siyuan/dock/block/index.ts b/workspace/packages/components/siyuan/dock/block/index.ts index 2e74d98..50be212 100644 --- a/workspace/packages/components/siyuan/dock/block/index.ts +++ b/workspace/packages/components/siyuan/dock/block/index.ts @@ -15,6 +15,8 @@ * along with this program. If not, see . */ +import type { ComponentProps } from "svelte"; + import type { TooltipsDirection } from "../../misc/tooltips"; export interface IIcon { @@ -23,7 +25,7 @@ export interface IIcon { active?: boolean; // 是否激活 ariaLabel?: string; // 提示标签内容 tooltipsDirection?: TooltipsDirection; // 提示标签方向 - onClick?: (element: HTMLElement, e: MouseEvent) => void; // 按钮点击回调函数 + onClick?: (e: MouseEvent, element: HTMLElement, active: boolean) => boolean; // 按钮点击回调函数 } export interface IBar { diff --git a/workspace/plugins/monaco-editor/public/i18n/en_US.json b/workspace/plugins/monaco-editor/public/i18n/en_US.json index 69ed0dc..24c30ee 100644 --- a/workspace/plugins/monaco-editor/public/i18n/en_US.json +++ b/workspace/plugins/monaco-editor/public/i18n/en_US.json @@ -2,7 +2,13 @@ "displayName": "Code Editor", "dock": { "kramdown": { - "ariaLabel": "Edit kramdown" + "ariaLabel": "Edit with kramdown" + }, + "inline": { + "ariaLabel": "Inline elements use tags" + }, + "refresh": { + "ariaLabel": "Real-time update" }, "title": "Code Edit" }, diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json index 58a9d6a..a455e6f 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json @@ -2,7 +2,13 @@ "displayName": "程式碼編輯器", "dock": { "kramdown": { - "ariaLabel": "編輯 kramdown" + "ariaLabel": "使用 kramdown 編輯" + }, + "inline": { + "ariaLabel": "行內元素使用 標籤" + }, + "refresh": { + "ariaLabel": "實時更新" }, "title": "程式碼編輯" }, diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json index 6cdb14d..1c77e6b 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json @@ -2,7 +2,13 @@ "displayName": "代码编辑器", "dock": { "kramdown": { - "ariaLabel": "编辑 kramdown" + "ariaLabel": "使用 kramdown 编辑" + }, + "inline": { + "ariaLabel": "行内元素使用 标签" + }, + "refresh": { + "ariaLabel": "实时更新" }, "title": "代码编辑" }, diff --git a/workspace/plugins/monaco-editor/src/components/Dock.svelte b/workspace/plugins/monaco-editor/src/components/Dock.svelte index 1aa5c7f..a493f6e 100644 --- a/workspace/plugins/monaco-editor/src/components/Dock.svelte +++ b/workspace/plugins/monaco-editor/src/components/Dock.svelte @@ -20,55 +20,60 @@ import Bar from "@workspace/components/siyuan/dock/block/Bar.svelte"; import EditorIframe from "./EditorIframe.svelte"; - import { EditorBridgeMaster } from "@/bridge/master"; import regexp from "@workspace/utils/regexp"; import type { IBar } from "@workspace/components/siyuan/dock/block/index"; import type MonacoEditorPlugin from "@/index"; import type { IDockEditor } from "@/types/editor"; + import { BlockHandler, Language, Inline, type IBlockEditHandler } from "@/handlers/block"; export let plugin: InstanceType; // 插件对象 export let id: string; // 块 ID - export let kramdown: boolean; // 是否启用 kramdown 模式 + export let realTime: boolean = false; // 是否启用实时更新模式 + export let inline: Inline; // 是否启用 kramdown 模式 + export let language: Language; // 是否启用 kramdown 模式 export let bar: IBar; // 标题栏配置 export let editor: IDockEditor; // 编辑器配置 + const blockHandler = new BlockHandler(plugin); + let handler: IBlockEditHandler; + let savable: boolean = false; + $: { if (regexp.id.test(id)) { - if (kramdown) { - plugin.client - .getBlockKramdown({ id }) - .then(response => { - editor.modified.value = response.data.kramdown; - }) - .catch(err => plugin.logger.error(err)); - } else { - // TODO: markdown 模式 - } + blockHandler.makeEditHandler(id, inline, language).then(h => (handler = h)); + } + } + + $: { + if (handler) { + savable = !!handler.update; + editor = { + modified: handler.model, + options: handler.options, + }; } } - function save(e: ComponentEvents["save"]) { - if (kramdown) { - plugin.client - .updateBlock({ - id, - dataType: "markdown", - data: e.detail.value, - }) - .catch(err => plugin.logger.error(err)); - } else { - // TODO: markdown 模式 + function update(e: ComponentEvents["save"] | ComponentEvents["changed"]) { + if (handler?.update) { + plugin.client.updateBlock({ + id, + dataType: "markdown", + data: handler.update(e.detail.value), + }); } } diff --git a/workspace/plugins/monaco-editor/src/components/Editor.svelte b/workspace/plugins/monaco-editor/src/components/Editor.svelte index 6c57a6c..750a145 100644 --- a/workspace/plugins/monaco-editor/src/components/Editor.svelte +++ b/workspace/plugins/monaco-editor/src/components/Editor.svelte @@ -129,13 +129,16 @@ /* 更改编辑器内容 */ $: { + const temp = changable; if (inited) { + changable = false; // 避免触发 changed 监听器 if (diff) { diffEditor.getOriginalEditor().setValue(original.value); diffEditor.getModifiedEditor().setValue(modified.value); } else { editor.setValue(modified.value); } + changable = temp; } } diff --git a/workspace/plugins/monaco-editor/src/handlers/block.ts b/workspace/plugins/monaco-editor/src/handlers/block.ts index 1d94c97..d0545cd 100644 --- a/workspace/plugins/monaco-editor/src/handlers/block.ts +++ b/workspace/plugins/monaco-editor/src/handlers/block.ts @@ -16,3 +16,251 @@ */ /* 块处理器 */ +import * as sdk from "@siyuan-community/siyuan-sdk"; + +import { Handler } from "./handler"; +import { heightlight2monaco } from "@/utils/language"; + +import type { BlockID } from "@workspace/types/siyuan"; +import type { IEditorModel } from "@/types/editor"; +import type { IMonacoEditorOptions } from "@/types/config"; + +type NodeType = sdk.siyuan.NodeType; +const NodeType = sdk.siyuan.NodeType; + +/* 块语言模式 */ +export enum Language { + markdown, + kramdown, +} + +/* 行内元素样式 */ +export enum Inline { + mark, // 使用 markdown 的标志符 + span, // 使用 标签 +} + +export interface IBlockEditHandler { + model: IEditorModel; // 编辑器模式 + options: IMonacoEditorOptions; // 编辑器配置 + update?: (value: string) => string; // 处理编辑器内容的方法 (若未定义则不能更新) +} + +export class BlockHandler extends Handler { + protected customTabSize: number; // 用户定义的缩进大小, + + constructor( + plugin, + ) { + super(plugin); + this.customTabSize = this.plugin.config.editor.options.tabSize; + } + + /* 使用 SQL 查询块信息 */ + protected async queryBlock(id: BlockID) { + return this.client.sql({ + stmt: `SELECT * FROM blocks WHERE id = '${id}';`, + }); + } + + /* 移除末尾的 IAL */ + protected removeLastIAL(kramdown: string): string { + return kramdown.substring(0, kramdown.lastIndexOf("\n{:")); + } + + /** + * 生产一个块处理器 + * @param id: 块 ID + * @param inline: 行内元素样式 + * @param language: 语言模式 + */ + public async makeEditHandler( + id: BlockID, + inline: Inline, + language: Language, + ): Promise { + const handler: IBlockEditHandler = { + model: { + value: "", + language: "markdown", + }, + options: { + tabSize: 2, + }, + }; // 生成的处理器 + const response_getDoc = await this.client.getDoc({ + id, + mode: 0, + size: Number.MAX_SAFE_INTEGER, + }); // 获取块相关信息 + const block_type = response_getDoc.data.type as NodeType; // 块类型 + + switch (language) { + case Language.markdown: { + switch (block_type) { + /* 文档块 */ + case NodeType.NodeDocument: { + switch (inline) { + case Inline.mark: { // 使用 markdown 标志符 + const response = await this.client.exportMdContent({ id }); + handler.model.value = response.data.content; + break; + } + case Inline.span: { // 使用 标签 + handler.model.value = this.lute.BlockDOM2StdMd(response_getDoc.data.content); + break; + } + } + break; + } + + /* HTML 相关块 */ + case NodeType.NodeAudio: + case NodeType.NodeVideo: + case NodeType.NodeIFrame: + case NodeType.NodeWidget: + case NodeType.NodeHTMLBlock: { + handler.model.value = this.lute.BlockDOM2StdMd(response_getDoc.data.content); + handler.model.language = "html"; + handler.options.tabSize = this.customTabSize; + handler.update = value => value; + break; + } + + /* 嵌入块 */ + case NodeType.NodeBlockQueryEmbed: { + const markdown = this.lute.BlockDOM2StdMd(response_getDoc.data.content); + const result = /^\s*\{\{(.*)\}\}\s*$/s.exec(markdown); + if (result && result.length === 2) { // 正确提取出 SQL 代码 + handler.model.value = result[1]; + handler.model.language = "sql"; + handler.options.tabSize = this.customTabSize; + handler.update = value => `{{${value}}}`; + } + else { // 回退为 markdown 编辑 + handler.model.value = markdown; + handler.update = value => value; + } + break; + } + + /* 代码块 */ + case NodeType.NodeCodeBlock: { + const markdown = this.lute.BlockDOM2StdMd(response_getDoc.data.content); + const result = /^\s*`{3,}([^\n]*)\n(.*)\n`{3,}\s*$/s.exec(markdown); + if (result && result.length === 3) { // 正确提取出语言标签与内容 + const language = result[1].trim() + handler.model.value = result[2]; + handler.model.language = heightlight2monaco(language); + handler.options.tabSize = this.customTabSize; + handler.update = value => `\`\`\`${language}\n${value}\n\`\`\``; + } + else { // 回退为 markdown 编辑 + handler.model.value = markdown; + handler.update = value => value; + } + break; + } + + /* 标题块 */ + case NodeType.NodeHeading: { + switch (inline) { + case Inline.mark: { // 使用 markdown 标志符 + const response = await this.queryBlock(id); + if (response.data.length > 0) { + handler.model.value = this.lute.BlockDOM2StdMd(response.data[0].markdown); + break; + } + } + case Inline.span: { // 使用 标签 + const response = await this.client.getBlockDOM({ id }); + handler.model.value = this.lute.BlockDOM2StdMd(response.data.dom); + break; + } + } + handler.update = value => value; + break; + } + + /* 容器块 */ + case NodeType.NodeSuperBlock: + case NodeType.NodeBlockquote: + case NodeType.NodeList: + case NodeType.NodeListItem: { + switch (inline) { + case Inline.mark: { // 使用 markdown 标志符 + const response = await this.queryBlock(id); + if (response.data.length > 0) { + handler.model.value = this.lute.BlockDOM2StdMd(response.data[0].markdown); + break; + } + } + case Inline.span: { // 使用 标签 + handler.model.value = this.lute.BlockDOM2StdMd(response_getDoc.data.content); + break; + } + } + break; + } + + /* 其他叶子块 */ + default: { + switch (inline) { + case Inline.mark: { // 使用 markdown 标志符 + const response = await this.queryBlock(id); + if (response.data.length > 0) { + handler.model.value = this.lute.BlockDOM2StdMd(response.data[0].markdown); + break; + } + } + case Inline.span: { // 使用 标签 + handler.model.value = this.lute.BlockDOM2StdMd(response_getDoc.data.content); + break; + } + } + handler.update = value => value; + break; + } + } + break; + } + case Language.kramdown: { + switch (block_type) { + /* 文档块 */ + case NodeType.NodeDocument: { + switch (inline) { + case Inline.mark: { // 使用 markdown 标志符 + const response = await this.client.getBlockKramdown({ id }); + handler.model.value = this.removeLastIAL(response.data.kramdown); + break; + } + case Inline.span: { // 使用 标签 + handler.model.value = this.lute.BlockDOM2Md(response_getDoc.data.content); + break; + } + } + break; + } + /* 其他块 */ + default: { + switch (inline) { + case Inline.mark: { // 使用 markdown 标志符 + const response = await this.client.getBlockKramdown({ id }); + handler.model.value = response.data.kramdown; + break; + } + case Inline.span: { // 使用 标签 + handler.model.value = this.lute.BlockDOM2Md(response_getDoc.data.content); + break; + } + } + break; + } + } + handler.update = value => value; + break; + } + } + return handler; + } +} diff --git a/workspace/plugins/monaco-editor/src/handlers/handler.ts b/workspace/plugins/monaco-editor/src/handlers/handler.ts index 7ebd9a8..ad6fcde 100644 --- a/workspace/plugins/monaco-editor/src/handlers/handler.ts +++ b/workspace/plugins/monaco-editor/src/handlers/handler.ts @@ -15,14 +15,20 @@ * along with this program. If not, see . */ -import { EditorBridgeMaster } from "~/src/bridge/master"; +import MonacoEditorPlugin from "@/index"; + +type Plugin = InstanceType; + +export class Handler { + public readonly client: Plugin["client"]; + public readonly logger: Plugin["logger"]; + public readonly lute: Plugin["lute"]; -export abstract class Handler { constructor( - public readonly bridge: InstanceType, + public readonly plugin: Plugin, ) { - + this.client = this.plugin.client; + this.logger = this.plugin.logger; + this.lute = this.plugin.lute; } - - public abstract readonly message } diff --git a/workspace/plugins/monaco-editor/src/index.ts b/workspace/plugins/monaco-editor/src/index.ts index b45f3dd..23caced 100644 --- a/workspace/plugins/monaco-editor/src/index.ts +++ b/workspace/plugins/monaco-editor/src/index.ts @@ -43,6 +43,7 @@ import type { } from "./types/config"; import type { I18N } from "@/utils/i18n"; import type { BlockID } from "@workspace/types/siyuan"; +import { Inline, Language } from "./handlers/block"; export default class MonacoEditorPlugin extends siyuan.Plugin { static readonly GLOBAL_CONFIG_NAME = "global-config"; @@ -51,6 +52,8 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { public readonly siyuan = siyuan; public readonly logger: InstanceType; public readonly client: InstanceType; + public readonly lute: ReturnType; + public config: IConfig; protected readonly EDITOR_URL: URL; protected readonly SETTINGS_DIALOG_ID: string; @@ -61,13 +64,14 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { model?: siyuan.IModel, component?: InstanceType, }; - protected config: IConfig; constructor(options: any) { super(options); this.logger = new Logger(this.name); this.client = new Client(); + this.lute = globalThis.Lute.New(); + this.EDITOR_URL = new URL(`${globalThis.document.baseURI}plugins/${this.name}/editor`); this.SETTINGS_DIALOG_ID = `${this.name}-settings-dialog`; @@ -98,7 +102,9 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { }, data: { id: "", - kramdown: true, + refresh: false, + inline: Inline.mark, + language: Language.kramdown, }, type: "-dock-panel", init() { @@ -110,26 +116,56 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { props: { plugin, id: this.data.id, - kramdown: this.data.kramdown, + realTime: this.data.refresh, + inline: this.data.inline, + language: this.data.language, bar: { logo: "#iconCode", title: plugin.i18n.dock.title, icons: [ - { + { // 实时更新按钮 + icon: "#iconRefresh", + type: "refresh", + active: this.data.refresh, + ariaLabel: plugin.i18n.dock.refresh.ariaLabel, + onClick: (_e, _element, active) => { + active = !active; + plugin.dock.component.$set({ realTime: active }); + return active; + }, + }, + { // 行内元素是否使用 标签 + icon: "#iconInlineCode", + type: "inline", + active: this.data.inline === Inline.span, + ariaLabel: plugin.i18n.dock.inline.ariaLabel, + onClick: (_e, _element, active) => { + active = !active; + if (active) { + plugin.dock.component.$set({ inline: Inline.span }); + } + else { + plugin.dock.component.$set({ inline: Inline.mark }); + } + return active; + }, + }, + { // kramdown 模式按钮 icon: "#iconMarkdown", type: "kramdown", - active: this.data.kramdown, + active: this.data.language === Language.kramdown, ariaLabel: plugin.i18n.dock.kramdown.ariaLabel, - onClick: (element, _e) => { - element.classList.toggle("toolbar__item--active"); - if (element.classList.contains("toolbar__item--active")) { - plugin.dock.component.$set({ kramdown: true }); + onClick: (_e, _element, active) => { + active = !active; + if (active) { + plugin.dock.component.$set({ language: Language.kramdown }); } else { - plugin.dock.component.$set({ kramdown: false }); + plugin.dock.component.$set({ language: Language.markdown }); } - } + return active; + }, }, { icon: "#iconMin", @@ -175,8 +211,8 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { /* 其他块菜单 */ this.eventBus.on("click-blockicon", this.blockMenuEventListener); - // /* 文档块菜单 */ - // this.eventBus.on("click-editortitleicon", this.blockMenuEventListener); + /* 文档块菜单 */ + this.eventBus.on("click-editortitleicon", this.blockMenuEventListener); // /* 块引用菜单 */ // this.eventBus.on("open-menu-blockref", this.blockRefMenuEventListener); // /* 超链接菜单 */ @@ -216,7 +252,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { this.eventBus.off("click-editorcontent", this.clickEditorContentEventListener); this.eventBus.off("click-blockicon", this.blockMenuEventListener); - // this.eventBus.off("click-editortitleicon", this.blockMenuEventListener); + this.eventBus.off("click-editortitleicon", this.blockMenuEventListener); // this.eventBus.off("open-menu-blockref", this.blockRefMenuEventListener); // this.eventBus.off("open-menu-link", this.linkMenuEventListener); } @@ -279,8 +315,8 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { protected blockMenuEventListener = (e: IClickBlockIconEvent) => { const context = getBlockMenuContext(e.detail); - /* 非文档块, 非多个块 */ - if (!context.isDocumentBlock && !context.isMultiBlock) { + /* 非多个块 */ + if (!context.isMultiBlock) { this.updateDockEditor(context.id); } } diff --git a/workspace/plugins/monaco-editor/src/utils/language.ts b/workspace/plugins/monaco-editor/src/utils/language.ts new file mode 100644 index 0000000..cc49653 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/utils/language.ts @@ -0,0 +1,41 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +/* 将 heightlight.js 的语言映射为 monaco 支持的语言 */ +export function heightlight2monaco(language: string): string { + switch (language) { + case "mindmap": + return "markdown"; + case "echarts": + return "json"; + + case "c#": + return "csharp"; + case "js": + return "javascript"; + case "ts": + return "typescript"; + case "objectivec": + return "objective-c"; + case "solidity": + return "sol"; + case "vbscript": + return "vb"; + default: + return language; + } +} From bee4d74c8c4b39bb2e57a06f3288463936b07ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Mon, 17 Jul 2023 22:19:46 +0800 Subject: [PATCH 015/113] =?UTF-8?q?feat(component):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=9D=A2=E5=8C=85=E5=B1=91=E7=BB=84=E4=BB=B6=20|=20Add=20bread?= =?UTF-8?q?crumb=20component.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../components/siyuan/breadcrumb/Bar.svelte | 39 +++++++++++++ .../siyuan/breadcrumb/Breadcrumb.svelte | 43 ++++++++++++++ .../components/siyuan/breadcrumb/Icon.svelte | 44 ++++++++++++++ .../components/siyuan/breadcrumb/Item.svelte | 52 +++++++++++++++++ .../components/siyuan/breadcrumb/index.ts | 57 +++++++++++++++++++ .../components/siyuan/misc/Svg.svelte | 3 + 7 files changed, 239 insertions(+) create mode 100644 workspace/packages/components/siyuan/breadcrumb/Bar.svelte create mode 100644 workspace/packages/components/siyuan/breadcrumb/Breadcrumb.svelte create mode 100644 workspace/packages/components/siyuan/breadcrumb/Icon.svelte create mode 100644 workspace/packages/components/siyuan/breadcrumb/Item.svelte create mode 100644 workspace/packages/components/siyuan/breadcrumb/index.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a9a7b4..a4dbd41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 2023-07-17 - 实现块处理器 | Implement block handler. +- 添加面包屑组件 | Add breadcrumb component. ## 2023-07-16 diff --git a/workspace/packages/components/siyuan/breadcrumb/Bar.svelte b/workspace/packages/components/siyuan/breadcrumb/Bar.svelte new file mode 100644 index 0000000..2878a9a --- /dev/null +++ b/workspace/packages/components/siyuan/breadcrumb/Bar.svelte @@ -0,0 +1,39 @@ + + + + +
+ + {#each items as item, i (i)} + {#if item.type === "item"} + + {:else if item.type === "arrow"} + + {/if} + {/each} + +
diff --git a/workspace/packages/components/siyuan/breadcrumb/Breadcrumb.svelte b/workspace/packages/components/siyuan/breadcrumb/Breadcrumb.svelte new file mode 100644 index 0000000..6ef3f5c --- /dev/null +++ b/workspace/packages/components/siyuan/breadcrumb/Breadcrumb.svelte @@ -0,0 +1,43 @@ + + + + +
+ + + + + {#each icons as icon, i (i)} + {#if i === 0} + + {:else} + + {/if} + + {/each} + +
diff --git a/workspace/packages/components/siyuan/breadcrumb/Icon.svelte b/workspace/packages/components/siyuan/breadcrumb/Icon.svelte new file mode 100644 index 0000000..dc20559 --- /dev/null +++ b/workspace/packages/components/siyuan/breadcrumb/Icon.svelte @@ -0,0 +1,44 @@ + + + + + diff --git a/workspace/packages/components/siyuan/breadcrumb/Item.svelte b/workspace/packages/components/siyuan/breadcrumb/Item.svelte new file mode 100644 index 0000000..6fbfd30 --- /dev/null +++ b/workspace/packages/components/siyuan/breadcrumb/Item.svelte @@ -0,0 +1,52 @@ + + + + + + + {#if icon} + + {/if} + + + + {text} + + diff --git a/workspace/packages/components/siyuan/breadcrumb/index.ts b/workspace/packages/components/siyuan/breadcrumb/index.ts new file mode 100644 index 0000000..ac573bd --- /dev/null +++ b/workspace/packages/components/siyuan/breadcrumb/index.ts @@ -0,0 +1,57 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import type { ComponentEvents } from "svelte"; +import type Icon from "./Icon.svelte"; + +export interface IEventIcon { + click: { + event: MouseEvent, + element: HTMLElement, + }; +} + +export type IBreadcrumbElement = IBreadcrumbItem | IBreadcrumbArrow; + +export interface IBreadcrumbItem { + type: "item"; + itemId?: string; // 块 ID (item 点击跳转) + iconId?: string; // 块 ID (svg 悬浮预览) + icon?: string; // svg 图标引用 + text?: string; // 文本 + textTitle?: string; // 文本标题 + textEllipsis?: boolean; // 文本收缩 +} + +export interface IBreadcrumbArrow { + type: "arrow"; + icon?: string; // svg 图标引用 +} + +export interface IBreadcrumbIcon { + icon: string; // svg 图标引用 ID + none?: boolean; // 是否隐藏 .fn__none (display: none) + show?: boolean; // 是否显示 .block__icon--show (opacity: 1) + active?: boolean; // 是否激活 .toolbar__item--active + type?: string; // data-type + ariaLabel?: string; // aria-label + onClick?: ( + e: MouseEvent, + element: HTMLElement, + active: boolean, + ) => boolean; // 按钮点击回调函数 +} diff --git a/workspace/packages/components/siyuan/misc/Svg.svelte b/workspace/packages/components/siyuan/misc/Svg.svelte index 5ee8995..294c660 100644 --- a/workspace/packages/components/siyuan/misc/Svg.svelte +++ b/workspace/packages/components/siyuan/misc/Svg.svelte @@ -17,12 +17,15 @@ From e8f8925b46fb4e6bf5b7d773dc26402355af73a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Mon, 17 Jul 2023 22:36:07 +0800 Subject: [PATCH 016/113] =?UTF-8?q?feat(components):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E9=A1=B5=E7=BB=84=E4=BB=B6=20|=20Add=20tab?= =?UTF-8?q?=20component.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + workspace/package.json | 4 +- .../packages/components/siyuan/tab/Tab.svelte | 39 ++++++++ workspace/pnpm-lock.yaml | 93 ++----------------- 4 files changed, 51 insertions(+), 86 deletions(-) create mode 100644 workspace/packages/components/siyuan/tab/Tab.svelte diff --git a/CHANGELOG.md b/CHANGELOG.md index a4dbd41..f8d18ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - 实现块处理器 | Implement block handler. - 添加面包屑组件 | Add breadcrumb component. +- 添加标签页组件 | Add tab component. ## 2023-07-16 diff --git a/workspace/package.json b/workspace/package.json index 968ca16..0a834fc 100644 --- a/workspace/package.json +++ b/workspace/package.json @@ -17,9 +17,9 @@ "@workspace/vite-config-custom": "workspace:*" }, "devDependencies": { - "eslint": "^8.44.0", + "eslint": "^8.45.0", "prettier": "^2.8.8", - "siyuan": "^0.7.6", + "siyuan": "^0.7.7", "turbo": "^1.10.7" } } diff --git a/workspace/packages/components/siyuan/tab/Tab.svelte b/workspace/packages/components/siyuan/tab/Tab.svelte new file mode 100644 index 0000000..6ea819f --- /dev/null +++ b/workspace/packages/components/siyuan/tab/Tab.svelte @@ -0,0 +1,39 @@ + + + + +
+ + + +
+ +
+
diff --git a/workspace/pnpm-lock.yaml b/workspace/pnpm-lock.yaml index 754efe7..fac15d7 100644 --- a/workspace/pnpm-lock.yaml +++ b/workspace/pnpm-lock.yaml @@ -22,14 +22,14 @@ importers: version: link:tools/vite-config-custom devDependencies: eslint: - specifier: ^8.44.0 - version: 8.44.0 + specifier: ^8.45.0 + version: 8.45.0 prettier: specifier: ^2.8.8 version: 2.8.8 siyuan: - specifier: ^0.7.6 - version: 0.7.6 + specifier: ^0.7.7 + version: 0.7.7 turbo: specifier: ^1.10.7 version: 1.10.7 @@ -1084,16 +1084,6 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.44.0): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - dependencies: - eslint: 8.44.0 - eslint-visitor-keys: 3.4.1 - dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.45.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1115,7 +1105,7 @@ packages: dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.6.0 + espree: 9.6.1 globals: 13.20.0 ignore: 5.2.4 import-fresh: 3.3.0 @@ -2659,14 +2649,6 @@ packages: estraverse: 4.3.0 dev: true - /eslint-scope@7.2.0: - resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - dev: true - /eslint-scope@7.2.1: resolution: {integrity: sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2680,54 +2662,6 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.44.0: - resolution: {integrity: sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) - '@eslint-community/regexpp': 4.5.1 - '@eslint/eslintrc': 2.1.0 - '@eslint/js': 8.44.0 - '@humanwhocodes/config-array': 0.11.10 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.1 - espree: 9.6.0 - esquery: 1.5.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.20.0 - graphemer: 1.4.0 - ignore: 5.2.4 - import-fresh: 3.3.0 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.3 - strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - dev: true - /eslint@8.45.0: resolution: {integrity: sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2774,15 +2708,6 @@ packages: - supports-color dev: true - /espree@9.6.0: - resolution: {integrity: sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.10.0 - acorn-jsx: 5.3.2(acorn@8.10.0) - eslint-visitor-keys: 3.4.1 - dev: true - /espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3903,8 +3828,8 @@ packages: is-arrayish: 0.3.2 dev: true - /siyuan@0.7.6: - resolution: {integrity: sha512-1UljRK3kOgTb7+gXeJiZLOX9SeR6Xbw9lshbotQIli5ycv7oCDFJMnLyUSLLOFho5Ea3hnH5xK34qACMZCv8wQ==} + /siyuan@0.7.7: + resolution: {integrity: sha512-li0nNVf9FHPRJRVN0qNpErSuTLvQMfQJI9mskKHDcs9fOa9fMS3hnXTbbguSX3+OFcPpGOrTm+t6Z1KfOaBpFA==} dev: true /slash@3.0.0: @@ -4827,9 +4752,9 @@ packages: dependencies: debug: 4.3.4 eslint: 8.45.0 - eslint-scope: 7.2.0 + eslint-scope: 7.2.1 eslint-visitor-keys: 3.4.1 - espree: 9.6.0 + espree: 9.6.1 esquery: 1.5.0 lodash: 4.17.21 semver: 7.5.4 From 22b74e2f44baf2aba437a4151c4518fb1ed95749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Mon, 17 Jul 2023 23:04:45 +0800 Subject: [PATCH 017/113] =?UTF-8?q?refactor(components):=20=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E9=87=8D=E5=A4=8D=E7=BB=84=E4=BB=B6=20|=20Remove=20du?= =?UTF-8?q?plicate=20components.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../siyuan/breadcrumb/Breadcrumb.svelte | 8 +-- .../components/siyuan/breadcrumb/Icon.svelte | 44 ------------ .../components/siyuan/breadcrumb/index.ts | 16 ----- .../siyuan/dock/{block => }/Bar.svelte | 6 +- .../siyuan/dock/{block => }/Logo.svelte | 2 +- .../components/siyuan/dock/block/Icon.svelte | 44 ------------ .../siyuan/dock/{block => }/index.ts | 15 +--- .../components/siyuan/misc/BlockButton.svelte | 38 ---------- .../components/siyuan/misc/BlockIcon.svelte | 70 +++++++++++++++++++ .../packages/components/siyuan/misc/index.ts | 34 +++++++++ .../components/siyuan/misc/tooltips.ts | 2 + .../packages/components/siyuan/tab/Tab.svelte | 19 +++-- 13 files changed, 129 insertions(+), 170 deletions(-) delete mode 100644 workspace/packages/components/siyuan/breadcrumb/Icon.svelte rename workspace/packages/components/siyuan/dock/{block => }/Bar.svelte (90%) rename workspace/packages/components/siyuan/dock/{block => }/Logo.svelte (95%) delete mode 100644 workspace/packages/components/siyuan/dock/block/Icon.svelte rename workspace/packages/components/siyuan/dock/{block => }/index.ts (61%) delete mode 100644 workspace/packages/components/siyuan/misc/BlockButton.svelte create mode 100644 workspace/packages/components/siyuan/misc/BlockIcon.svelte create mode 100644 workspace/packages/components/siyuan/misc/index.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index f8d18ad..2910885 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - 实现块处理器 | Implement block handler. - 添加面包屑组件 | Add breadcrumb component. - 添加标签页组件 | Add tab component. +- 移除重复组件 | Remove duplicate components. ## 2023-07-16 diff --git a/workspace/packages/components/siyuan/breadcrumb/Breadcrumb.svelte b/workspace/packages/components/siyuan/breadcrumb/Breadcrumb.svelte index 6ef3f5c..d12de80 100644 --- a/workspace/packages/components/siyuan/breadcrumb/Breadcrumb.svelte +++ b/workspace/packages/components/siyuan/breadcrumb/Breadcrumb.svelte @@ -17,13 +17,13 @@
@@ -37,7 +37,7 @@ {:else} {/if} - + {/each}
diff --git a/workspace/packages/components/siyuan/breadcrumb/Icon.svelte b/workspace/packages/components/siyuan/breadcrumb/Icon.svelte deleted file mode 100644 index dc20559..0000000 --- a/workspace/packages/components/siyuan/breadcrumb/Icon.svelte +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/workspace/packages/components/siyuan/breadcrumb/index.ts b/workspace/packages/components/siyuan/breadcrumb/index.ts index ac573bd..7f7ef14 100644 --- a/workspace/packages/components/siyuan/breadcrumb/index.ts +++ b/workspace/packages/components/siyuan/breadcrumb/index.ts @@ -15,9 +15,6 @@ * along with this program. If not, see . */ -import type { ComponentEvents } from "svelte"; -import type Icon from "./Icon.svelte"; - export interface IEventIcon { click: { event: MouseEvent, @@ -42,16 +39,3 @@ export interface IBreadcrumbArrow { icon?: string; // svg 图标引用 } -export interface IBreadcrumbIcon { - icon: string; // svg 图标引用 ID - none?: boolean; // 是否隐藏 .fn__none (display: none) - show?: boolean; // 是否显示 .block__icon--show (opacity: 1) - active?: boolean; // 是否激活 .toolbar__item--active - type?: string; // data-type - ariaLabel?: string; // aria-label - onClick?: ( - e: MouseEvent, - element: HTMLElement, - active: boolean, - ) => boolean; // 按钮点击回调函数 -} diff --git a/workspace/packages/components/siyuan/dock/block/Bar.svelte b/workspace/packages/components/siyuan/dock/Bar.svelte similarity index 90% rename from workspace/packages/components/siyuan/dock/block/Bar.svelte rename to workspace/packages/components/siyuan/dock/Bar.svelte index 8ea8cda..3e6253b 100644 --- a/workspace/packages/components/siyuan/dock/block/Bar.svelte +++ b/workspace/packages/components/siyuan/dock/Bar.svelte @@ -17,13 +17,13 @@
@@ -46,7 +46,7 @@ name="icon" {icon} > - + {/each}
diff --git a/workspace/packages/components/siyuan/dock/block/Logo.svelte b/workspace/packages/components/siyuan/dock/Logo.svelte similarity index 95% rename from workspace/packages/components/siyuan/dock/block/Logo.svelte rename to workspace/packages/components/siyuan/dock/Logo.svelte index 302dfc3..3d16188 100644 --- a/workspace/packages/components/siyuan/dock/block/Logo.svelte +++ b/workspace/packages/components/siyuan/dock/Logo.svelte @@ -16,7 +16,7 @@ --> - - - diff --git a/workspace/packages/components/siyuan/dock/block/index.ts b/workspace/packages/components/siyuan/dock/index.ts similarity index 61% rename from workspace/packages/components/siyuan/dock/block/index.ts rename to workspace/packages/components/siyuan/dock/index.ts index 50be212..b10b6bb 100644 --- a/workspace/packages/components/siyuan/dock/block/index.ts +++ b/workspace/packages/components/siyuan/dock/index.ts @@ -15,21 +15,10 @@ * along with this program. If not, see . */ -import type { ComponentProps } from "svelte"; - -import type { TooltipsDirection } from "../../misc/tooltips"; - -export interface IIcon { - icon: string; // 图标 ID - type?: string; // data-type 属性值 - active?: boolean; // 是否激活 - ariaLabel?: string; // 提示标签内容 - tooltipsDirection?: TooltipsDirection; // 提示标签方向 - onClick?: (e: MouseEvent, element: HTMLElement, active: boolean) => boolean; // 按钮点击回调函数 -} +import type { IBlockIcon } from "./../misc"; export interface IBar { logo: string; // svg 图标引用 ID title: string; // 标题 - icons: IIcon[]; // 按钮列表 + icons: IBlockIcon[]; // 按钮列表 } diff --git a/workspace/packages/components/siyuan/misc/BlockButton.svelte b/workspace/packages/components/siyuan/misc/BlockButton.svelte deleted file mode 100644 index 5f1f472..0000000 --- a/workspace/packages/components/siyuan/misc/BlockButton.svelte +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/workspace/packages/components/siyuan/misc/BlockIcon.svelte b/workspace/packages/components/siyuan/misc/BlockIcon.svelte new file mode 100644 index 0000000..7d0ab69 --- /dev/null +++ b/workspace/packages/components/siyuan/misc/BlockIcon.svelte @@ -0,0 +1,70 @@ + + + + + + + diff --git a/workspace/packages/components/siyuan/misc/index.ts b/workspace/packages/components/siyuan/misc/index.ts new file mode 100644 index 0000000..7a5272f --- /dev/null +++ b/workspace/packages/components/siyuan/misc/index.ts @@ -0,0 +1,34 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import type { TooltipsDirection } from "./tooltips"; + +export interface IBlockIcon { + icon: string; // svg 图标引用 ID + none?: boolean; // 是否隐藏 .fn__none (display: none) + show?: boolean; // 是否显示 .block__icon--show (opacity: 1) + active?: boolean; // 是否激活 .toolbar__item--active + disabled?: boolean; // 是否禁用 .toolbar__item--disabled + type?: string; // data-type + ariaLabel?: string; // 提示标签内容 aria-label + tooltipsDirection?: TooltipsDirection; // 提示标签方向 + onClick?: ( + e: MouseEvent, + element: HTMLElement, + active: boolean, + ) => boolean; // 按钮点击回调函数 +} diff --git a/workspace/packages/components/siyuan/misc/tooltips.ts b/workspace/packages/components/siyuan/misc/tooltips.ts index 47a4401..cf1492f 100644 --- a/workspace/packages/components/siyuan/misc/tooltips.ts +++ b/workspace/packages/components/siyuan/misc/tooltips.ts @@ -16,6 +16,8 @@ */ export enum TooltipsDirection { + none = "", + n = "b3-tooltips__n", ne = "b3-tooltips__ne", e = "b3-tooltips__e", diff --git a/workspace/packages/components/siyuan/tab/Tab.svelte b/workspace/packages/components/siyuan/tab/Tab.svelte index 6ea819f..2dc033d 100644 --- a/workspace/packages/components/siyuan/tab/Tab.svelte +++ b/workspace/packages/components/siyuan/tab/Tab.svelte @@ -18,9 +18,12 @@
- + {#if breadcrumb} + + {/if}
From 61d95b2df84a7bf3121e40e40bb0e0b27d93ef5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Mon, 17 Jul 2023 23:37:58 +0800 Subject: [PATCH 018/113] =?UTF-8?q?refactor(webview):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=20Webview=20=E7=BB=84=E4=BB=B6=E7=BB=93=E6=9E=84=20|=20Adjust?= =?UTF-8?q?=20the=20structure=20of=20the=20Webview=20component.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + workspace/plugins/webview/package.json | 2 +- .../webview/src/components/Webview.svelte | 83 ++--- workspace/pnpm-lock.yaml | 308 ++++++++++++++---- 4 files changed, 293 insertions(+), 101 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2910885..fb22846 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - 添加面包屑组件 | Add breadcrumb component. - 添加标签页组件 | Add tab component. - 移除重复组件 | Remove duplicate components. +- 调整 Webview 组件结构 | Adjust the structure of the Webview component. ## 2023-07-16 diff --git a/workspace/plugins/webview/package.json b/workspace/plugins/webview/package.json index 351437a..8dec03f 100644 --- a/workspace/plugins/webview/package.json +++ b/workspace/plugins/webview/package.json @@ -17,7 +17,7 @@ "svelte": "^4.0.5", "svelte-preprocess-less": "^0.4.0", "typescript": "^5.1.6", - "vite": "^4.4.3" + "vite": "^4.4.4" }, "dependencies": { "@workspace/components": "workspace:^", diff --git a/workspace/plugins/webview/src/components/Webview.svelte b/workspace/plugins/webview/src/components/Webview.svelte index 1ce9898..b2fe5cc 100644 --- a/workspace/plugins/webview/src/components/Webview.svelte +++ b/workspace/plugins/webview/src/components/Webview.svelte @@ -19,7 +19,8 @@ import { onMount } from "svelte"; import { fade } from "svelte/transition"; - import BlockButton from "@workspace/components/siyuan/misc/BlockButton.svelte"; + import Tab from "@workspace/components/siyuan/tab/Tab.svelte"; + import BlockIcon from "@workspace/components/siyuan/misc/BlockIcon.svelte"; import { TooltipsDirection } from "@workspace/components/siyuan/misc/tooltips"; import type { Electron } from "@workspace/types/electron"; import type WebviewPlugin from "@/index"; @@ -248,14 +249,14 @@ }); -
+ -
+
- - - --> - - - -
(webview_pointer_events_disable = e.button === 0 ? false : true)} on:mouseleave={() => (webview_pointer_events_disable = true)} - class="protyle-preview" + class="content fn__flex fn__flex-1" > + {#if status_display} + +
+ {status} +
+ {/if}
- {#if status_display} - -
- {status} -
- {/if} -
+ diff --git a/workspace/packages/utils/env/native-front-end.ts b/workspace/packages/utils/env/native-front-end.ts index 6d4e28f..4e3563b 100644 --- a/workspace/packages/utils/env/native-front-end.ts +++ b/workspace/packages/utils/env/native-front-end.ts @@ -19,6 +19,9 @@ export const FLAG_ELECTRON = isElectron(); export const FLAG_IFRAME = isIframe(); export const FLAG_POPUP = isPopup(); +export const FLAG_LIGHT = isLight(); +export const FLAG_DARK = isDark(); + export function hasNodeRequire(): boolean { return !!globalThis.require; } @@ -38,3 +41,13 @@ export function isIframe(): boolean { export function isPopup(): boolean { return !globalThis.opener; } + +export function isLight(): boolean { + return (globalThis as any).siyuan?.config?.appearance?.mode === 0 + ?? window.matchMedia('(prefers-color-scheme: light)').matches; +} + +export function isDark(): boolean { + return (globalThis as any).siyuan?.config?.appearance?.mode === 1 + ?? window.matchMedia('(prefers-color-scheme: dark)').matches; +} diff --git a/workspace/plugins/monaco-editor/package.json b/workspace/plugins/monaco-editor/package.json index 823a67b..cca02f9 100644 --- a/workspace/plugins/monaco-editor/package.json +++ b/workspace/plugins/monaco-editor/package.json @@ -5,8 +5,9 @@ "type": "module", "scripts": { "dev": "vite", - "build": "npm run build:plugin && npm run build:iframes", + "build": "npm run build:icons && npm run build:plugin && npm run build:iframes", "build:dev": "vite build --mode plugin --sourcemap inline && vite build --mode iframes --sourcemap inline", + "build:icons": "node --no-warnings=ExperimentalWarning --loader ts-node/esm ./scripts/build-icons.ts", "build:plugin": "vite build --mode plugin", "build:iframes": "vite build --mode iframes", "preview": "vite preview", @@ -16,17 +17,20 @@ "@monaco-editor/loader": "^1.3.3", "@sveltejs/vite-plugin-svelte": "^2.4.2", "@tsconfig/svelte": "^4.0.1", - "@types/node": "^20.4.2", + "@types/node": "^20.4.4", "deepmerge": "^4.3.1", "less": "^4.1.3", + "material-icon-theme": "^4.29.0", "monaco-editor": "^0.40.0", "svelte": "^3.59.2", "svelte-check": "^3.4.6", "svelte-preprocess-less": "^0.4.0", + "ts-node": "^10.9.1", "tslib": "^2.6.0", "typescript": "^5.1.6", - "vite": "^4.4.4", - "vite-plugin-static-copy": "^0.16.0" + "vite": "^4.4.6", + "vite-plugin-static-copy": "^0.16.0", + "xml-js": "^1.6.11" }, "dependencies": { "@workspace/components": "workspace:^", diff --git a/workspace/plugins/monaco-editor/scripts/build-icons.ts b/workspace/plugins/monaco-editor/scripts/build-icons.ts new file mode 100644 index 0000000..ce032cd --- /dev/null +++ b/workspace/plugins/monaco-editor/scripts/build-icons.ts @@ -0,0 +1,142 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import path from "path"; +import asyncFs from "fs/promises"; +import convert, { type ElementCompact } from "xml-js"; + +const root = process.cwd(); + +const C = { + /* material 图标目录路径 */ + MATERIAL_ICONS_MANIFEST: path.resolve(root, "./node_modules/material-icon-theme/dist/material-icons.json"), + MATERIAL_ICONS_PATH: path.resolve(root, "./node_modules/material-icon-theme/icons"), + + /* material 图标生成的 *.symbol 文件路径 */ + MATERIAL_FILE_PATH_SYMBOL: path.resolve(root, "./src/assets/symbols/icon-monaco-editor-material-icons.symbol"), + + /* material 文件夹名称->图标 映射文件路径 */ + MATERIAL_FILE_PATH_ENTRIES_FOLDER: path.resolve(root, "./src/assets/entries/folder-icon.json"), + MATERIAL_FILE_PATH_ENTRIES_FOLDER_LIGHT: path.resolve(root, "./src/assets/entries/light/folder-icon.json"), + + /* material 文件夹名称->(打开的)图标 映射文件路径 */ + MATERIAL_FILE_PATH_ENTRIES_FOLDER_EXPANDED: path.resolve(root, "./src/assets/entries/folder-expanded-icon.json"), + MATERIAL_FILE_PATH_ENTRIES_FOLDER_EXPANDED_LIGHT: path.resolve(root, "./src/assets/entries/light/folder-expanded-icon.json"), + + /* material 文件名->图标 映射文件路径 */ + MATERIAL_FILE_PATH_ENTRIES_FILE: path.resolve(root, "./src/assets/entries/file-icon.json"), + MATERIAL_FILE_PATH_ENTRIES_FILE_LIGHT: path.resolve(root, "./src/assets/entries/light/file-icon.json"), + + /* material 文件扩展名->图标 映射文件路径 */ + MATERIAL_FILE_PATH_ENTRIES_FILE_EXTENSION: path.resolve(root, "./src/assets/entries/file-extension-icon.json"), + MATERIAL_FILE_PATH_ENTRIES_FILE_EXTENSION_LIGHT: path.resolve(root, "./src/assets/entries/light/file-extension-icon.json"), + + /* 图标 ID 前缀 */ + ID_PREFIX_MATERIAL: "icon-monaco-editor-material", +}; + +interface IMap { + [key: string]: string; +} + +type IEntry = [string, string]; + +/** + * 构建图标 + * TODO: 将 svg 图标转换为 symbol 并设置 ID, 合并为一个文件 + */ +async function buildMaterialIcons() { + const materialIcons: typeof import("material-icon-theme/dist/material-icons.json") = JSON.parse(await asyncFs.readFile(C.MATERIAL_ICONS_MANIFEST, "utf-8")); + const { + iconDefinitions, // 图标定义 + folderNames, // 目录名 + folderNamesExpanded, // 展开的目录 + fileNames, // 文件名 + fileExtensions, // 文件扩展名 + light, // 明亮主题图标 + } = materialIcons; + + /* 构建 文件/目录名称->图标ID 的映射 */ + await Promise.all([ + buildIconsMapEntries(folderNames, C.MATERIAL_FILE_PATH_ENTRIES_FOLDER, C.ID_PREFIX_MATERIAL), + buildIconsMapEntries(folderNamesExpanded, C.MATERIAL_FILE_PATH_ENTRIES_FOLDER_EXPANDED, C.ID_PREFIX_MATERIAL), + buildIconsMapEntries(fileNames, C.MATERIAL_FILE_PATH_ENTRIES_FILE, C.ID_PREFIX_MATERIAL), + buildIconsMapEntries(fileExtensions, C.MATERIAL_FILE_PATH_ENTRIES_FILE_EXTENSION, C.ID_PREFIX_MATERIAL, true), + + buildIconsMapEntries(light.folderNames, C.MATERIAL_FILE_PATH_ENTRIES_FOLDER_LIGHT, C.ID_PREFIX_MATERIAL), + buildIconsMapEntries(light.folderNamesExpanded, C.MATERIAL_FILE_PATH_ENTRIES_FOLDER_EXPANDED_LIGHT, C.ID_PREFIX_MATERIAL), + buildIconsMapEntries(light.fileNames, C.MATERIAL_FILE_PATH_ENTRIES_FILE_LIGHT, C.ID_PREFIX_MATERIAL), + buildIconsMapEntries(light.fileExtensions, C.MATERIAL_FILE_PATH_ENTRIES_FILE_EXTENSION_LIGHT, C.ID_PREFIX_MATERIAL, true), + ]); + + const paths = Object + .entries(iconDefinitions) + .map(([name, icon]) => [name, path.resolve(C.MATERIAL_ICONS_MANIFEST, "..", icon.iconPath)]); + // console.debug(paths); + + // REF: https://www.npmjs.com/package/xml-js + const symbols = await Promise.all(paths.map(([name, path]) => buildIconSymbol(name, path, C.ID_PREFIX_MATERIAL))); + await asyncFs.writeFile(C.MATERIAL_FILE_PATH_SYMBOL, symbols.join("\n")); +} + +/** + * 构建图标映射 + * @param icons: icons 对象(key: 名称, value: 图标名称) + * @param path: entries 文件保存路径 + * @param prefix: 图标 ID 前缀 + * @param ext: 是否为文件扩展名 + */ +async function buildIconsMapEntries( + icons: IMap, + path: string, + prefix: string, + ext: boolean = false, +): Promise { + const entries: IEntry[] = []; + Object.entries(icons).forEach(([name, icon]) => { + if (ext) { + name = `.${name}`; + } + icon = `#${prefix}-${icon}`; + entries.push([name, icon]); + }); + await asyncFs.writeFile(path, JSON.stringify(entries, null, 4)); + return entries; +} + +/** + * 构建图标文件符号 + * @param icon: *.svg 文件引用名称 + * @param path: *.svg 文件路径 + * @param prefix: 图标 ID 前缀 + * @return: xml + */ +async function buildIconSymbol( + icon: string, + path: string, + prefix: string, +): Promise { + const svg = await asyncFs.readFile(path, "utf-8"); + const xml = convert.xml2js(svg, { compact: true }) as ElementCompact; + + xml.svg._attributes.id = `${prefix}-${icon}`; + delete xml.svg._attributes.xmlns; + + return convert.js2xml({ symbol: xml.svg }, { compact: true, spaces: 4 }); +} + +buildMaterialIcons(); diff --git a/workspace/plugins/monaco-editor/src/assets/entries/file-extension-icon.json b/workspace/plugins/monaco-editor/src/assets/entries/file-extension-icon.json new file mode 100644 index 0000000..ba16d50 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/assets/entries/file-extension-icon.json @@ -0,0 +1,3178 @@ +[ + [ + ".htm", + "#icon-monaco-editor-material-html" + ], + [ + ".xhtml", + "#icon-monaco-editor-material-html" + ], + [ + ".html_vm", + "#icon-monaco-editor-material-html" + ], + [ + ".asp", + "#icon-monaco-editor-material-html" + ], + [ + ".jade", + "#icon-monaco-editor-material-pug" + ], + [ + ".pug", + "#icon-monaco-editor-material-pug" + ], + [ + ".md", + "#icon-monaco-editor-material-markdown" + ], + [ + ".markdown", + "#icon-monaco-editor-material-markdown" + ], + [ + ".rst", + "#icon-monaco-editor-material-markdown" + ], + [ + ".blink", + "#icon-monaco-editor-material-blink" + ], + [ + ".css", + "#icon-monaco-editor-material-css" + ], + [ + ".scss", + "#icon-monaco-editor-material-sass" + ], + [ + ".sass", + "#icon-monaco-editor-material-sass" + ], + [ + ".less", + "#icon-monaco-editor-material-less" + ], + [ + ".json", + "#icon-monaco-editor-material-json" + ], + [ + ".jsonc", + "#icon-monaco-editor-material-json" + ], + [ + ".tsbuildinfo", + "#icon-monaco-editor-material-json" + ], + [ + ".json5", + "#icon-monaco-editor-material-json" + ], + [ + ".jsonl", + "#icon-monaco-editor-material-json" + ], + [ + ".ndjson", + "#icon-monaco-editor-material-json" + ], + [ + ".jinja", + "#icon-monaco-editor-material-jinja" + ], + [ + ".jinja2", + "#icon-monaco-editor-material-jinja" + ], + [ + ".j2", + "#icon-monaco-editor-material-jinja" + ], + [ + ".jinja-html", + "#icon-monaco-editor-material-jinja" + ], + [ + ".proto", + "#icon-monaco-editor-material-proto" + ], + [ + ".sublime-project", + "#icon-monaco-editor-material-sublime" + ], + [ + ".sublime-workspace", + "#icon-monaco-editor-material-sublime" + ], + [ + ".tw", + "#icon-monaco-editor-material-twine" + ], + [ + ".twee", + "#icon-monaco-editor-material-twine" + ], + [ + ".yml", + "#icon-monaco-editor-material-yaml" + ], + [ + ".yaml", + "#icon-monaco-editor-material-yaml" + ], + [ + ".yml.dist", + "#icon-monaco-editor-material-yaml" + ], + [ + ".yaml.dist", + "#icon-monaco-editor-material-yaml" + ], + [ + ".YAML-tmLanguage", + "#icon-monaco-editor-material-yaml" + ], + [ + ".xml", + "#icon-monaco-editor-material-xml" + ], + [ + ".plist", + "#icon-monaco-editor-material-xml" + ], + [ + ".xsd", + "#icon-monaco-editor-material-xml" + ], + [ + ".dtd", + "#icon-monaco-editor-material-xml" + ], + [ + ".xsl", + "#icon-monaco-editor-material-xml" + ], + [ + ".xslt", + "#icon-monaco-editor-material-xml" + ], + [ + ".resx", + "#icon-monaco-editor-material-xml" + ], + [ + ".iml", + "#icon-monaco-editor-material-xml" + ], + [ + ".xquery", + "#icon-monaco-editor-material-xml" + ], + [ + ".tmLanguage", + "#icon-monaco-editor-material-xml" + ], + [ + ".manifest", + "#icon-monaco-editor-material-xml" + ], + [ + ".project", + "#icon-monaco-editor-material-xml" + ], + [ + ".xml.dist", + "#icon-monaco-editor-material-xml" + ], + [ + ".xml.dist.sample", + "#icon-monaco-editor-material-xml" + ], + [ + ".dmn", + "#icon-monaco-editor-material-xml" + ], + [ + ".jrxml", + "#icon-monaco-editor-material-xml" + ], + [ + ".png", + "#icon-monaco-editor-material-image" + ], + [ + ".jpeg", + "#icon-monaco-editor-material-image" + ], + [ + ".jpg", + "#icon-monaco-editor-material-image" + ], + [ + ".gif", + "#icon-monaco-editor-material-image" + ], + [ + ".ico", + "#icon-monaco-editor-material-image" + ], + [ + ".tif", + "#icon-monaco-editor-material-image" + ], + [ + ".tiff", + "#icon-monaco-editor-material-image" + ], + [ + ".psd", + "#icon-monaco-editor-material-image" + ], + [ + ".psb", + "#icon-monaco-editor-material-image" + ], + [ + ".ami", + "#icon-monaco-editor-material-image" + ], + [ + ".apx", + "#icon-monaco-editor-material-image" + ], + [ + ".avif", + "#icon-monaco-editor-material-image" + ], + [ + ".bmp", + "#icon-monaco-editor-material-image" + ], + [ + ".bpg", + "#icon-monaco-editor-material-image" + ], + [ + ".brk", + "#icon-monaco-editor-material-image" + ], + [ + ".cur", + "#icon-monaco-editor-material-image" + ], + [ + ".dds", + "#icon-monaco-editor-material-image" + ], + [ + ".dng", + "#icon-monaco-editor-material-image" + ], + [ + ".exr", + "#icon-monaco-editor-material-image" + ], + [ + ".fpx", + "#icon-monaco-editor-material-image" + ], + [ + ".gbr", + "#icon-monaco-editor-material-image" + ], + [ + ".img", + "#icon-monaco-editor-material-image" + ], + [ + ".jbig2", + "#icon-monaco-editor-material-image" + ], + [ + ".jb2", + "#icon-monaco-editor-material-image" + ], + [ + ".jng", + "#icon-monaco-editor-material-image" + ], + [ + ".jxr", + "#icon-monaco-editor-material-image" + ], + [ + ".pgf", + "#icon-monaco-editor-material-image" + ], + [ + ".pic", + "#icon-monaco-editor-material-image" + ], + [ + ".raw", + "#icon-monaco-editor-material-image" + ], + [ + ".webp", + "#icon-monaco-editor-material-image" + ], + [ + ".eps", + "#icon-monaco-editor-material-image" + ], + [ + ".afphoto", + "#icon-monaco-editor-material-image" + ], + [ + ".ase", + "#icon-monaco-editor-material-image" + ], + [ + ".aseprite", + "#icon-monaco-editor-material-image" + ], + [ + ".clip", + "#icon-monaco-editor-material-image" + ], + [ + ".cpt", + "#icon-monaco-editor-material-image" + ], + [ + ".heif", + "#icon-monaco-editor-material-image" + ], + [ + ".heic", + "#icon-monaco-editor-material-image" + ], + [ + ".kra", + "#icon-monaco-editor-material-image" + ], + [ + ".mdp", + "#icon-monaco-editor-material-image" + ], + [ + ".ora", + "#icon-monaco-editor-material-image" + ], + [ + ".pdn", + "#icon-monaco-editor-material-image" + ], + [ + ".reb", + "#icon-monaco-editor-material-image" + ], + [ + ".sai", + "#icon-monaco-editor-material-image" + ], + [ + ".tga", + "#icon-monaco-editor-material-image" + ], + [ + ".xcf", + "#icon-monaco-editor-material-image" + ], + [ + ".jfif", + "#icon-monaco-editor-material-image" + ], + [ + ".ppm", + "#icon-monaco-editor-material-image" + ], + [ + ".pbm", + "#icon-monaco-editor-material-image" + ], + [ + ".pgm", + "#icon-monaco-editor-material-image" + ], + [ + ".pnm", + "#icon-monaco-editor-material-image" + ], + [ + ".icns", + "#icon-monaco-editor-material-image" + ], + [ + ".esx", + "#icon-monaco-editor-material-javascript" + ], + [ + ".mjs", + "#icon-monaco-editor-material-javascript" + ], + [ + ".jsx", + "#icon-monaco-editor-material-react" + ], + [ + ".tsx", + "#icon-monaco-editor-material-react_ts" + ], + [ + ".routing.ts", + "#icon-monaco-editor-material-routing" + ], + [ + ".routing.tsx", + "#icon-monaco-editor-material-routing" + ], + [ + ".routing.js", + "#icon-monaco-editor-material-routing" + ], + [ + ".routing.jsx", + "#icon-monaco-editor-material-routing" + ], + [ + ".routes.ts", + "#icon-monaco-editor-material-routing" + ], + [ + ".routes.tsx", + "#icon-monaco-editor-material-routing" + ], + [ + ".routes.js", + "#icon-monaco-editor-material-routing" + ], + [ + ".routes.jsx", + "#icon-monaco-editor-material-routing" + ], + [ + ".ini", + "#icon-monaco-editor-material-settings" + ], + [ + ".dlc", + "#icon-monaco-editor-material-settings" + ], + [ + ".dll", + "#icon-monaco-editor-material-settings" + ], + [ + ".config", + "#icon-monaco-editor-material-settings" + ], + [ + ".conf", + "#icon-monaco-editor-material-settings" + ], + [ + ".properties", + "#icon-monaco-editor-material-settings" + ], + [ + ".prop", + "#icon-monaco-editor-material-settings" + ], + [ + ".settings", + "#icon-monaco-editor-material-settings" + ], + [ + ".option", + "#icon-monaco-editor-material-settings" + ], + [ + ".props", + "#icon-monaco-editor-material-settings" + ], + [ + ".toml", + "#icon-monaco-editor-material-settings" + ], + [ + ".prefs", + "#icon-monaco-editor-material-settings" + ], + [ + ".sln.dotsettings", + "#icon-monaco-editor-material-settings" + ], + [ + ".sln.dotsettings.user", + "#icon-monaco-editor-material-settings" + ], + [ + ".cfg", + "#icon-monaco-editor-material-settings" + ], + [ + ".d.ts", + "#icon-monaco-editor-material-typescript-def" + ], + [ + ".d.cts", + "#icon-monaco-editor-material-typescript-def" + ], + [ + ".d.mts", + "#icon-monaco-editor-material-typescript-def" + ], + [ + ".marko", + "#icon-monaco-editor-material-markojs" + ], + [ + ".astro", + "#icon-monaco-editor-material-astro" + ], + [ + ".pdf", + "#icon-monaco-editor-material-pdf" + ], + [ + ".xlsx", + "#icon-monaco-editor-material-table" + ], + [ + ".xlsm", + "#icon-monaco-editor-material-table" + ], + [ + ".xls", + "#icon-monaco-editor-material-table" + ], + [ + ".csv", + "#icon-monaco-editor-material-table" + ], + [ + ".tsv", + "#icon-monaco-editor-material-table" + ], + [ + ".psv", + "#icon-monaco-editor-material-table" + ], + [ + ".ods", + "#icon-monaco-editor-material-table" + ], + [ + ".vscodeignore", + "#icon-monaco-editor-material-vscode" + ], + [ + ".vsixmanifest", + "#icon-monaco-editor-material-vscode" + ], + [ + ".vsix", + "#icon-monaco-editor-material-vscode" + ], + [ + ".code-workplace", + "#icon-monaco-editor-material-vscode" + ], + [ + ".code-workspace", + "#icon-monaco-editor-material-vscode" + ], + [ + ".code-profile", + "#icon-monaco-editor-material-vscode" + ], + [ + ".code-snippets", + "#icon-monaco-editor-material-vscode" + ], + [ + ".csproj", + "#icon-monaco-editor-material-visualstudio" + ], + [ + ".ruleset", + "#icon-monaco-editor-material-visualstudio" + ], + [ + ".sln", + "#icon-monaco-editor-material-visualstudio" + ], + [ + ".suo", + "#icon-monaco-editor-material-visualstudio" + ], + [ + ".vb", + "#icon-monaco-editor-material-visualstudio" + ], + [ + ".vbs", + "#icon-monaco-editor-material-visualstudio" + ], + [ + ".vcxitems", + "#icon-monaco-editor-material-visualstudio" + ], + [ + ".vcxitems.filters", + "#icon-monaco-editor-material-visualstudio" + ], + [ + ".vcxproj", + "#icon-monaco-editor-material-visualstudio" + ], + [ + ".vcxproj.filters", + "#icon-monaco-editor-material-visualstudio" + ], + [ + ".pdb", + "#icon-monaco-editor-material-database" + ], + [ + ".sql", + "#icon-monaco-editor-material-database" + ], + [ + ".pks", + "#icon-monaco-editor-material-database" + ], + [ + ".pkb", + "#icon-monaco-editor-material-database" + ], + [ + ".accdb", + "#icon-monaco-editor-material-database" + ], + [ + ".mdb", + "#icon-monaco-editor-material-database" + ], + [ + ".sqlite", + "#icon-monaco-editor-material-database" + ], + [ + ".sqlite3", + "#icon-monaco-editor-material-database" + ], + [ + ".pgsql", + "#icon-monaco-editor-material-database" + ], + [ + ".postgres", + "#icon-monaco-editor-material-database" + ], + [ + ".psql", + "#icon-monaco-editor-material-database" + ], + [ + ".db", + "#icon-monaco-editor-material-database" + ], + [ + ".db3", + "#icon-monaco-editor-material-database" + ], + [ + ".kql", + "#icon-monaco-editor-material-kusto" + ], + [ + ".cs", + "#icon-monaco-editor-material-csharp" + ], + [ + ".csx", + "#icon-monaco-editor-material-csharp" + ], + [ + ".qs", + "#icon-monaco-editor-material-qsharp" + ], + [ + ".zip", + "#icon-monaco-editor-material-zip" + ], + [ + ".tar", + "#icon-monaco-editor-material-zip" + ], + [ + ".gz", + "#icon-monaco-editor-material-zip" + ], + [ + ".xz", + "#icon-monaco-editor-material-zip" + ], + [ + ".lzma", + "#icon-monaco-editor-material-zip" + ], + [ + ".lz4", + "#icon-monaco-editor-material-zip" + ], + [ + ".br", + "#icon-monaco-editor-material-zip" + ], + [ + ".bz2", + "#icon-monaco-editor-material-zip" + ], + [ + ".bzip2", + "#icon-monaco-editor-material-zip" + ], + [ + ".gzip", + "#icon-monaco-editor-material-zip" + ], + [ + ".brotli", + "#icon-monaco-editor-material-zip" + ], + [ + ".7z", + "#icon-monaco-editor-material-zip" + ], + [ + ".rar", + "#icon-monaco-editor-material-zip" + ], + [ + ".tz", + "#icon-monaco-editor-material-zip" + ], + [ + ".txz", + "#icon-monaco-editor-material-zip" + ], + [ + ".tgz", + "#icon-monaco-editor-material-zip" + ], + [ + ".vala", + "#icon-monaco-editor-material-vala" + ], + [ + ".zig", + "#icon-monaco-editor-material-zig" + ], + [ + ".exe", + "#icon-monaco-editor-material-exe" + ], + [ + ".msi", + "#icon-monaco-editor-material-exe" + ], + [ + ".dat", + "#icon-monaco-editor-material-hex" + ], + [ + ".bin", + "#icon-monaco-editor-material-hex" + ], + [ + ".hex", + "#icon-monaco-editor-material-hex" + ], + [ + ".java", + "#icon-monaco-editor-material-java" + ], + [ + ".jsp", + "#icon-monaco-editor-material-java" + ], + [ + ".jar", + "#icon-monaco-editor-material-jar" + ], + [ + ".class", + "#icon-monaco-editor-material-javaclass" + ], + [ + ".c", + "#icon-monaco-editor-material-c" + ], + [ + ".i", + "#icon-monaco-editor-material-c" + ], + [ + ".mi", + "#icon-monaco-editor-material-c" + ], + [ + ".h", + "#icon-monaco-editor-material-h" + ], + [ + ".cc", + "#icon-monaco-editor-material-cpp" + ], + [ + ".cpp", + "#icon-monaco-editor-material-cpp" + ], + [ + ".cxx", + "#icon-monaco-editor-material-cpp" + ], + [ + ".c++", + "#icon-monaco-editor-material-cpp" + ], + [ + ".cp", + "#icon-monaco-editor-material-cpp" + ], + [ + ".mii", + "#icon-monaco-editor-material-cpp" + ], + [ + ".ii", + "#icon-monaco-editor-material-cpp" + ], + [ + ".hh", + "#icon-monaco-editor-material-hpp" + ], + [ + ".hpp", + "#icon-monaco-editor-material-hpp" + ], + [ + ".hxx", + "#icon-monaco-editor-material-hpp" + ], + [ + ".h++", + "#icon-monaco-editor-material-hpp" + ], + [ + ".hp", + "#icon-monaco-editor-material-hpp" + ], + [ + ".tcc", + "#icon-monaco-editor-material-hpp" + ], + [ + ".inl", + "#icon-monaco-editor-material-hpp" + ], + [ + ".m", + "#icon-monaco-editor-material-objective-c" + ], + [ + ".mm", + "#icon-monaco-editor-material-objective-cpp" + ], + [ + ".rc", + "#icon-monaco-editor-material-rc" + ], + [ + ".go", + "#icon-monaco-editor-material-go" + ], + [ + ".py", + "#icon-monaco-editor-material-python" + ], + [ + ".pyc", + "#icon-monaco-editor-material-python-misc" + ], + [ + ".whl", + "#icon-monaco-editor-material-python-misc" + ], + [ + ".url", + "#icon-monaco-editor-material-url" + ], + [ + ".sh", + "#icon-monaco-editor-material-console" + ], + [ + ".ksh", + "#icon-monaco-editor-material-console" + ], + [ + ".csh", + "#icon-monaco-editor-material-console" + ], + [ + ".tcsh", + "#icon-monaco-editor-material-console" + ], + [ + ".zsh", + "#icon-monaco-editor-material-console" + ], + [ + ".bash", + "#icon-monaco-editor-material-console" + ], + [ + ".bat", + "#icon-monaco-editor-material-console" + ], + [ + ".cmd", + "#icon-monaco-editor-material-console" + ], + [ + ".awk", + "#icon-monaco-editor-material-console" + ], + [ + ".fish", + "#icon-monaco-editor-material-console" + ], + [ + ".exp", + "#icon-monaco-editor-material-console" + ], + [ + ".nu", + "#icon-monaco-editor-material-console" + ], + [ + ".ps1", + "#icon-monaco-editor-material-powershell" + ], + [ + ".psm1", + "#icon-monaco-editor-material-powershell" + ], + [ + ".psd1", + "#icon-monaco-editor-material-powershell" + ], + [ + ".ps1xml", + "#icon-monaco-editor-material-powershell" + ], + [ + ".psc1", + "#icon-monaco-editor-material-powershell" + ], + [ + ".pssc", + "#icon-monaco-editor-material-powershell" + ], + [ + ".gradle", + "#icon-monaco-editor-material-gradle" + ], + [ + ".doc", + "#icon-monaco-editor-material-word" + ], + [ + ".docx", + "#icon-monaco-editor-material-word" + ], + [ + ".rtf", + "#icon-monaco-editor-material-word" + ], + [ + ".odt", + "#icon-monaco-editor-material-word" + ], + [ + ".cer", + "#icon-monaco-editor-material-certificate" + ], + [ + ".cert", + "#icon-monaco-editor-material-certificate" + ], + [ + ".crt", + "#icon-monaco-editor-material-certificate" + ], + [ + ".pub", + "#icon-monaco-editor-material-key" + ], + [ + ".key", + "#icon-monaco-editor-material-key" + ], + [ + ".pem", + "#icon-monaco-editor-material-key" + ], + [ + ".asc", + "#icon-monaco-editor-material-key" + ], + [ + ".gpg", + "#icon-monaco-editor-material-key" + ], + [ + ".passwd", + "#icon-monaco-editor-material-key" + ], + [ + ".woff", + "#icon-monaco-editor-material-font" + ], + [ + ".woff2", + "#icon-monaco-editor-material-font" + ], + [ + ".ttf", + "#icon-monaco-editor-material-font" + ], + [ + ".eot", + "#icon-monaco-editor-material-font" + ], + [ + ".suit", + "#icon-monaco-editor-material-font" + ], + [ + ".otf", + "#icon-monaco-editor-material-font" + ], + [ + ".bmap", + "#icon-monaco-editor-material-font" + ], + [ + ".fnt", + "#icon-monaco-editor-material-font" + ], + [ + ".odttf", + "#icon-monaco-editor-material-font" + ], + [ + ".ttc", + "#icon-monaco-editor-material-font" + ], + [ + ".font", + "#icon-monaco-editor-material-font" + ], + [ + ".fonts", + "#icon-monaco-editor-material-font" + ], + [ + ".sui", + "#icon-monaco-editor-material-font" + ], + [ + ".ntf", + "#icon-monaco-editor-material-font" + ], + [ + ".mrf", + "#icon-monaco-editor-material-font" + ], + [ + ".lib", + "#icon-monaco-editor-material-lib" + ], + [ + ".bib", + "#icon-monaco-editor-material-lib" + ], + [ + ".rb", + "#icon-monaco-editor-material-ruby" + ], + [ + ".erb", + "#icon-monaco-editor-material-ruby" + ], + [ + ".rbs", + "#icon-monaco-editor-material-ruby" + ], + [ + ".fs", + "#icon-monaco-editor-material-fsharp" + ], + [ + ".fsx", + "#icon-monaco-editor-material-fsharp" + ], + [ + ".fsi", + "#icon-monaco-editor-material-fsharp" + ], + [ + ".fsproj", + "#icon-monaco-editor-material-fsharp" + ], + [ + ".swift", + "#icon-monaco-editor-material-swift" + ], + [ + ".ino", + "#icon-monaco-editor-material-arduino" + ], + [ + ".dockerignore", + "#icon-monaco-editor-material-docker" + ], + [ + ".dockerfile", + "#icon-monaco-editor-material-docker" + ], + [ + ".docker-compose.yml", + "#icon-monaco-editor-material-docker" + ], + [ + ".docker-compose.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + ".compose.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + ".compose.yml", + "#icon-monaco-editor-material-docker" + ], + [ + ".tex", + "#icon-monaco-editor-material-tex" + ], + [ + ".sty", + "#icon-monaco-editor-material-tex" + ], + [ + ".dtx", + "#icon-monaco-editor-material-tex" + ], + [ + ".ltx", + "#icon-monaco-editor-material-tex" + ], + [ + ".pptx", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".ppt", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".pptm", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".potx", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".potm", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".ppsx", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".ppsm", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".pps", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".ppam", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".ppa", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".odp", + "#icon-monaco-editor-material-powerpoint" + ], + [ + ".webm", + "#icon-monaco-editor-material-video" + ], + [ + ".mkv", + "#icon-monaco-editor-material-video" + ], + [ + ".flv", + "#icon-monaco-editor-material-video" + ], + [ + ".vob", + "#icon-monaco-editor-material-video" + ], + [ + ".ogv", + "#icon-monaco-editor-material-video" + ], + [ + ".ogg", + "#icon-monaco-editor-material-video" + ], + [ + ".gifv", + "#icon-monaco-editor-material-video" + ], + [ + ".avi", + "#icon-monaco-editor-material-video" + ], + [ + ".mov", + "#icon-monaco-editor-material-video" + ], + [ + ".qt", + "#icon-monaco-editor-material-video" + ], + [ + ".wmv", + "#icon-monaco-editor-material-video" + ], + [ + ".yuv", + "#icon-monaco-editor-material-video" + ], + [ + ".rm", + "#icon-monaco-editor-material-video" + ], + [ + ".rmvb", + "#icon-monaco-editor-material-video" + ], + [ + ".mp4", + "#icon-monaco-editor-material-video" + ], + [ + ".m4v", + "#icon-monaco-editor-material-video" + ], + [ + ".mpg", + "#icon-monaco-editor-material-video" + ], + [ + ".mp2", + "#icon-monaco-editor-material-video" + ], + [ + ".mpeg", + "#icon-monaco-editor-material-video" + ], + [ + ".mpe", + "#icon-monaco-editor-material-video" + ], + [ + ".mpv", + "#icon-monaco-editor-material-video" + ], + [ + ".m2v", + "#icon-monaco-editor-material-video" + ], + [ + ".vdi", + "#icon-monaco-editor-material-virtual" + ], + [ + ".vbox", + "#icon-monaco-editor-material-virtual" + ], + [ + ".vbox-prev", + "#icon-monaco-editor-material-virtual" + ], + [ + ".ics", + "#icon-monaco-editor-material-email" + ], + [ + ".mp3", + "#icon-monaco-editor-material-audio" + ], + [ + ".flac", + "#icon-monaco-editor-material-audio" + ], + [ + ".m4a", + "#icon-monaco-editor-material-audio" + ], + [ + ".wma", + "#icon-monaco-editor-material-audio" + ], + [ + ".aiff", + "#icon-monaco-editor-material-audio" + ], + [ + ".wav", + "#icon-monaco-editor-material-audio" + ], + [ + ".coffee", + "#icon-monaco-editor-material-coffee" + ], + [ + ".cson", + "#icon-monaco-editor-material-coffee" + ], + [ + ".iced", + "#icon-monaco-editor-material-coffee" + ], + [ + ".txt", + "#icon-monaco-editor-material-document" + ], + [ + ".graphql", + "#icon-monaco-editor-material-graphql" + ], + [ + ".gql", + "#icon-monaco-editor-material-graphql" + ], + [ + ".rs", + "#icon-monaco-editor-material-rust" + ], + [ + ".ron", + "#icon-monaco-editor-material-rust" + ], + [ + ".raml", + "#icon-monaco-editor-material-raml" + ], + [ + ".xaml", + "#icon-monaco-editor-material-xaml" + ], + [ + ".hs", + "#icon-monaco-editor-material-haskell" + ], + [ + ".kt", + "#icon-monaco-editor-material-kotlin" + ], + [ + ".kts", + "#icon-monaco-editor-material-kotlin" + ], + [ + ".otne", + "#icon-monaco-editor-material-otne" + ], + [ + ".patch", + "#icon-monaco-editor-material-git" + ], + [ + ".lua", + "#icon-monaco-editor-material-lua" + ], + [ + ".clj", + "#icon-monaco-editor-material-clojure" + ], + [ + ".cljs", + "#icon-monaco-editor-material-clojure" + ], + [ + ".cljc", + "#icon-monaco-editor-material-clojure" + ], + [ + ".groovy", + "#icon-monaco-editor-material-groovy" + ], + [ + ".r", + "#icon-monaco-editor-material-r" + ], + [ + ".rmd", + "#icon-monaco-editor-material-r" + ], + [ + ".dart", + "#icon-monaco-editor-material-dart" + ], + [ + ".freezed.dart", + "#icon-monaco-editor-material-dart_generated" + ], + [ + ".g.dart", + "#icon-monaco-editor-material-dart_generated" + ], + [ + ".as", + "#icon-monaco-editor-material-actionscript" + ], + [ + ".mxml", + "#icon-monaco-editor-material-mxml" + ], + [ + ".ahk", + "#icon-monaco-editor-material-autohotkey" + ], + [ + ".swf", + "#icon-monaco-editor-material-flash" + ], + [ + ".swc", + "#icon-monaco-editor-material-swc" + ], + [ + ".cmake", + "#icon-monaco-editor-material-cmake" + ], + [ + ".asm", + "#icon-monaco-editor-material-assembly" + ], + [ + ".a51", + "#icon-monaco-editor-material-assembly" + ], + [ + ".inc", + "#icon-monaco-editor-material-assembly" + ], + [ + ".nasm", + "#icon-monaco-editor-material-assembly" + ], + [ + ".s", + "#icon-monaco-editor-material-assembly" + ], + [ + ".ms", + "#icon-monaco-editor-material-assembly" + ], + [ + ".agc", + "#icon-monaco-editor-material-assembly" + ], + [ + ".ags", + "#icon-monaco-editor-material-assembly" + ], + [ + ".aea", + "#icon-monaco-editor-material-assembly" + ], + [ + ".argus", + "#icon-monaco-editor-material-assembly" + ], + [ + ".mitigus", + "#icon-monaco-editor-material-assembly" + ], + [ + ".binsource", + "#icon-monaco-editor-material-assembly" + ], + [ + ".vue", + "#icon-monaco-editor-material-vue" + ], + [ + ".ml", + "#icon-monaco-editor-material-ocaml" + ], + [ + ".mli", + "#icon-monaco-editor-material-ocaml" + ], + [ + ".cmx", + "#icon-monaco-editor-material-ocaml" + ], + [ + ".odin", + "#icon-monaco-editor-material-odin" + ], + [ + ".js.map", + "#icon-monaco-editor-material-javascript-map" + ], + [ + ".mjs.map", + "#icon-monaco-editor-material-javascript-map" + ], + [ + ".cjs.map", + "#icon-monaco-editor-material-javascript-map" + ], + [ + ".css.map", + "#icon-monaco-editor-material-css-map" + ], + [ + ".lock", + "#icon-monaco-editor-material-lock" + ], + [ + ".hbs", + "#icon-monaco-editor-material-handlebars" + ], + [ + ".mustache", + "#icon-monaco-editor-material-handlebars" + ], + [ + ".pm", + "#icon-monaco-editor-material-perl" + ], + [ + ".raku", + "#icon-monaco-editor-material-perl" + ], + [ + ".hx", + "#icon-monaco-editor-material-haxe" + ], + [ + ".spec.ts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".spec.cts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".spec.mts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".cy.ts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".e2e-spec.ts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".e2e-spec.cts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".e2e-spec.mts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".test.ts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".test.cts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".test.mts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".ts.snap", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".spec-d.ts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".test-d.ts", + "#icon-monaco-editor-material-test-ts" + ], + [ + ".spec.tsx", + "#icon-monaco-editor-material-test-jsx" + ], + [ + ".test.tsx", + "#icon-monaco-editor-material-test-jsx" + ], + [ + ".tsx.snap", + "#icon-monaco-editor-material-test-jsx" + ], + [ + ".spec.jsx", + "#icon-monaco-editor-material-test-jsx" + ], + [ + ".test.jsx", + "#icon-monaco-editor-material-test-jsx" + ], + [ + ".jsx.snap", + "#icon-monaco-editor-material-test-jsx" + ], + [ + ".cy.jsx", + "#icon-monaco-editor-material-test-jsx" + ], + [ + ".cy.tsx", + "#icon-monaco-editor-material-test-jsx" + ], + [ + ".spec-d.tsx", + "#icon-monaco-editor-material-test-jsx" + ], + [ + ".test-d.tsx", + "#icon-monaco-editor-material-test-jsx" + ], + [ + ".spec.js", + "#icon-monaco-editor-material-test-js" + ], + [ + ".spec.cjs", + "#icon-monaco-editor-material-test-js" + ], + [ + ".spec.mjs", + "#icon-monaco-editor-material-test-js" + ], + [ + ".e2e-spec.js", + "#icon-monaco-editor-material-test-js" + ], + [ + ".e2e-spec.cjs", + "#icon-monaco-editor-material-test-js" + ], + [ + ".e2e-spec.mjs", + "#icon-monaco-editor-material-test-js" + ], + [ + ".test.js", + "#icon-monaco-editor-material-test-js" + ], + [ + ".test.cjs", + "#icon-monaco-editor-material-test-js" + ], + [ + ".test.mjs", + "#icon-monaco-editor-material-test-js" + ], + [ + ".js.snap", + "#icon-monaco-editor-material-test-js" + ], + [ + ".cy.js", + "#icon-monaco-editor-material-test-js" + ], + [ + ".module.ts", + "#icon-monaco-editor-material-angular" + ], + [ + ".module.js", + "#icon-monaco-editor-material-angular" + ], + [ + ".ng-template", + "#icon-monaco-editor-material-angular" + ], + [ + ".component.ts", + "#icon-monaco-editor-material-angular-component" + ], + [ + ".component.js", + "#icon-monaco-editor-material-angular-component" + ], + [ + ".guard.ts", + "#icon-monaco-editor-material-angular-guard" + ], + [ + ".guard.js", + "#icon-monaco-editor-material-angular-guard" + ], + [ + ".service.ts", + "#icon-monaco-editor-material-angular-service" + ], + [ + ".service.js", + "#icon-monaco-editor-material-angular-service" + ], + [ + ".pipe.ts", + "#icon-monaco-editor-material-angular-pipe" + ], + [ + ".pipe.js", + "#icon-monaco-editor-material-angular-pipe" + ], + [ + ".filter.js", + "#icon-monaco-editor-material-angular-pipe" + ], + [ + ".directive.ts", + "#icon-monaco-editor-material-angular-directive" + ], + [ + ".directive.js", + "#icon-monaco-editor-material-angular-directive" + ], + [ + ".resolver.ts", + "#icon-monaco-editor-material-angular-resolver" + ], + [ + ".resolver.js", + "#icon-monaco-editor-material-angular-resolver" + ], + [ + ".pp", + "#icon-monaco-editor-material-puppet" + ], + [ + ".ex", + "#icon-monaco-editor-material-elixir" + ], + [ + ".exs", + "#icon-monaco-editor-material-elixir" + ], + [ + ".eex", + "#icon-monaco-editor-material-elixir" + ], + [ + ".leex", + "#icon-monaco-editor-material-elixir" + ], + [ + ".heex", + "#icon-monaco-editor-material-elixir" + ], + [ + ".ls", + "#icon-monaco-editor-material-livescript" + ], + [ + ".erl", + "#icon-monaco-editor-material-erlang" + ], + [ + ".twig", + "#icon-monaco-editor-material-twig" + ], + [ + ".jl", + "#icon-monaco-editor-material-julia" + ], + [ + ".elm", + "#icon-monaco-editor-material-elm" + ], + [ + ".pure", + "#icon-monaco-editor-material-purescript" + ], + [ + ".purs", + "#icon-monaco-editor-material-purescript" + ], + [ + ".tpl", + "#icon-monaco-editor-material-smarty" + ], + [ + ".styl", + "#icon-monaco-editor-material-stylus" + ], + [ + ".re", + "#icon-monaco-editor-material-reason" + ], + [ + ".rei", + "#icon-monaco-editor-material-reason" + ], + [ + ".cmj", + "#icon-monaco-editor-material-bucklescript" + ], + [ + ".merlin", + "#icon-monaco-editor-material-merlin" + ], + [ + ".vhd", + "#icon-monaco-editor-material-verilog" + ], + [ + ".sv", + "#icon-monaco-editor-material-verilog" + ], + [ + ".svh", + "#icon-monaco-editor-material-verilog" + ], + [ + ".nb", + "#icon-monaco-editor-material-mathematica" + ], + [ + ".wl", + "#icon-monaco-editor-material-wolframlanguage" + ], + [ + ".wls", + "#icon-monaco-editor-material-wolframlanguage" + ], + [ + ".njk", + "#icon-monaco-editor-material-nunjucks" + ], + [ + ".nunjucks", + "#icon-monaco-editor-material-nunjucks" + ], + [ + ".robot", + "#icon-monaco-editor-material-robot" + ], + [ + ".sol", + "#icon-monaco-editor-material-solidity" + ], + [ + ".au3", + "#icon-monaco-editor-material-autoit" + ], + [ + ".haml", + "#icon-monaco-editor-material-haml" + ], + [ + ".yang", + "#icon-monaco-editor-material-yang" + ], + [ + ".mjml", + "#icon-monaco-editor-material-mjml" + ], + [ + ".tf", + "#icon-monaco-editor-material-terraform" + ], + [ + ".tf.json", + "#icon-monaco-editor-material-terraform" + ], + [ + ".tfvars", + "#icon-monaco-editor-material-terraform" + ], + [ + ".tfstate", + "#icon-monaco-editor-material-terraform" + ], + [ + ".blade.php", + "#icon-monaco-editor-material-laravel" + ], + [ + ".inky.php", + "#icon-monaco-editor-material-laravel" + ], + [ + ".applescript", + "#icon-monaco-editor-material-applescript" + ], + [ + ".ipa", + "#icon-monaco-editor-material-applescript" + ], + [ + ".cake", + "#icon-monaco-editor-material-cake" + ], + [ + ".feature", + "#icon-monaco-editor-material-cucumber" + ], + [ + ".features", + "#icon-monaco-editor-material-cucumber" + ], + [ + ".nim", + "#icon-monaco-editor-material-nim" + ], + [ + ".nimble", + "#icon-monaco-editor-material-nim" + ], + [ + ".apib", + "#icon-monaco-editor-material-apiblueprint" + ], + [ + ".apiblueprint", + "#icon-monaco-editor-material-apiblueprint" + ], + [ + ".riot", + "#icon-monaco-editor-material-riot" + ], + [ + ".tag", + "#icon-monaco-editor-material-riot" + ], + [ + ".vfl", + "#icon-monaco-editor-material-vfl" + ], + [ + ".kl", + "#icon-monaco-editor-material-kl" + ], + [ + ".pcss", + "#icon-monaco-editor-material-postcss" + ], + [ + ".sss", + "#icon-monaco-editor-material-postcss" + ], + [ + ".todo", + "#icon-monaco-editor-material-todo" + ], + [ + ".cfml", + "#icon-monaco-editor-material-coldfusion" + ], + [ + ".cfc", + "#icon-monaco-editor-material-coldfusion" + ], + [ + ".lucee", + "#icon-monaco-editor-material-coldfusion" + ], + [ + ".cfm", + "#icon-monaco-editor-material-coldfusion" + ], + [ + ".cabal", + "#icon-monaco-editor-material-cabal" + ], + [ + ".nix", + "#icon-monaco-editor-material-nix" + ], + [ + ".slim", + "#icon-monaco-editor-material-slim" + ], + [ + ".http", + "#icon-monaco-editor-material-http" + ], + [ + ".rest", + "#icon-monaco-editor-material-http" + ], + [ + ".rql", + "#icon-monaco-editor-material-restql" + ], + [ + ".restql", + "#icon-monaco-editor-material-restql" + ], + [ + ".kv", + "#icon-monaco-editor-material-kivy" + ], + [ + ".graphcool", + "#icon-monaco-editor-material-graphcool" + ], + [ + ".sbt", + "#icon-monaco-editor-material-sbt" + ], + [ + ".apk", + "#icon-monaco-editor-material-android" + ], + [ + ".smali", + "#icon-monaco-editor-material-android" + ], + [ + ".dex", + "#icon-monaco-editor-material-android" + ], + [ + ".env", + "#icon-monaco-editor-material-tune" + ], + [ + ".gitlab-ci.yml", + "#icon-monaco-editor-material-gitlab" + ], + [ + ".jenkinsfile", + "#icon-monaco-editor-material-jenkins" + ], + [ + ".jenkins", + "#icon-monaco-editor-material-jenkins" + ], + [ + ".fig", + "#icon-monaco-editor-material-figma" + ], + [ + ".cr", + "#icon-monaco-editor-material-crystal" + ], + [ + ".ecr", + "#icon-monaco-editor-material-crystal" + ], + [ + ".drone.yml", + "#icon-monaco-editor-material-drone" + ], + [ + ".cu", + "#icon-monaco-editor-material-cuda" + ], + [ + ".cuh", + "#icon-monaco-editor-material-cuda" + ], + [ + ".log", + "#icon-monaco-editor-material-log" + ], + [ + ".def", + "#icon-monaco-editor-material-dotjs" + ], + [ + ".dot", + "#icon-monaco-editor-material-dotjs" + ], + [ + ".jst", + "#icon-monaco-editor-material-dotjs" + ], + [ + ".ejs", + "#icon-monaco-editor-material-ejs" + ], + [ + "..wakatime-project", + "#icon-monaco-editor-material-wakatime" + ], + [ + ".pde", + "#icon-monaco-editor-material-processing" + ], + [ + ".stories.js", + "#icon-monaco-editor-material-storybook" + ], + [ + ".stories.jsx", + "#icon-monaco-editor-material-storybook" + ], + [ + ".stories.mdx", + "#icon-monaco-editor-material-storybook" + ], + [ + ".story.js", + "#icon-monaco-editor-material-storybook" + ], + [ + ".story.jsx", + "#icon-monaco-editor-material-storybook" + ], + [ + ".stories.ts", + "#icon-monaco-editor-material-storybook" + ], + [ + ".stories.tsx", + "#icon-monaco-editor-material-storybook" + ], + [ + ".story.ts", + "#icon-monaco-editor-material-storybook" + ], + [ + ".story.tsx", + "#icon-monaco-editor-material-storybook" + ], + [ + ".stories.svelte", + "#icon-monaco-editor-material-storybook" + ], + [ + ".story.mdx", + "#icon-monaco-editor-material-storybook" + ], + [ + ".wpy", + "#icon-monaco-editor-material-wepy" + ], + [ + ".hcl", + "#icon-monaco-editor-material-hcl" + ], + [ + ".san", + "#icon-monaco-editor-material-san" + ], + [ + ".djt", + "#icon-monaco-editor-material-django" + ], + [ + ".red", + "#icon-monaco-editor-material-red" + ], + [ + ".mk", + "#icon-monaco-editor-material-makefile" + ], + [ + ".fxp", + "#icon-monaco-editor-material-foxpro" + ], + [ + ".prg", + "#icon-monaco-editor-material-foxpro" + ], + [ + ".pot", + "#icon-monaco-editor-material-i18n" + ], + [ + ".po", + "#icon-monaco-editor-material-i18n" + ], + [ + ".mo", + "#icon-monaco-editor-material-i18n" + ], + [ + ".lang", + "#icon-monaco-editor-material-i18n" + ], + [ + ".wat", + "#icon-monaco-editor-material-webassembly" + ], + [ + ".wasm", + "#icon-monaco-editor-material-webassembly" + ], + [ + ".ipynb", + "#icon-monaco-editor-material-jupyter" + ], + [ + ".d", + "#icon-monaco-editor-material-d" + ], + [ + ".mdx", + "#icon-monaco-editor-material-mdx" + ], + [ + ".svx", + "#icon-monaco-editor-material-mdsvex" + ], + [ + ".bal", + "#icon-monaco-editor-material-ballerina" + ], + [ + ".balx", + "#icon-monaco-editor-material-ballerina" + ], + [ + ".rkt", + "#icon-monaco-editor-material-racket" + ], + [ + ".bzl", + "#icon-monaco-editor-material-bazel" + ], + [ + ".bazel", + "#icon-monaco-editor-material-bazel" + ], + [ + ".mint", + "#icon-monaco-editor-material-mint" + ], + [ + ".vm", + "#icon-monaco-editor-material-velocity" + ], + [ + ".fhtml", + "#icon-monaco-editor-material-velocity" + ], + [ + ".vtl", + "#icon-monaco-editor-material-velocity" + ], + [ + ".gd", + "#icon-monaco-editor-material-godot" + ], + [ + ".godot", + "#icon-monaco-editor-material-godot-assets" + ], + [ + ".tres", + "#icon-monaco-editor-material-godot-assets" + ], + [ + ".tscn", + "#icon-monaco-editor-material-godot-assets" + ], + [ + ".gdns", + "#icon-monaco-editor-material-godot-assets" + ], + [ + ".gdnlib", + "#icon-monaco-editor-material-godot-assets" + ], + [ + ".gdshader", + "#icon-monaco-editor-material-godot-assets" + ], + [ + ".gdshaderinc", + "#icon-monaco-editor-material-godot-assets" + ], + [ + ".gdextension", + "#icon-monaco-editor-material-godot-assets" + ], + [ + ".azure-pipelines.yml", + "#icon-monaco-editor-material-azure-pipelines" + ], + [ + ".azure-pipelines.yaml", + "#icon-monaco-editor-material-azure-pipelines" + ], + [ + ".azcli", + "#icon-monaco-editor-material-azure" + ], + [ + ".vagrantfile", + "#icon-monaco-editor-material-vagrant" + ], + [ + ".prisma", + "#icon-monaco-editor-material-prisma" + ], + [ + ".cshtml", + "#icon-monaco-editor-material-razor" + ], + [ + ".vbhtml", + "#icon-monaco-editor-material-razor" + ], + [ + ".abc", + "#icon-monaco-editor-material-abc" + ], + [ + ".ad", + "#icon-monaco-editor-material-asciidoc" + ], + [ + ".adoc", + "#icon-monaco-editor-material-asciidoc" + ], + [ + ".asciidoc", + "#icon-monaco-editor-material-asciidoc" + ], + [ + ".edge", + "#icon-monaco-editor-material-edge" + ], + [ + ".ss", + "#icon-monaco-editor-material-scheme" + ], + [ + ".scm", + "#icon-monaco-editor-material-scheme" + ], + [ + ".lisp", + "#icon-monaco-editor-material-lisp" + ], + [ + ".lsp", + "#icon-monaco-editor-material-lisp" + ], + [ + ".cl", + "#icon-monaco-editor-material-lisp" + ], + [ + ".fast", + "#icon-monaco-editor-material-lisp" + ], + [ + ".stl", + "#icon-monaco-editor-material-3d" + ], + [ + ".stp", + "#icon-monaco-editor-material-3d" + ], + [ + ".obj", + "#icon-monaco-editor-material-3d" + ], + [ + ".ac", + "#icon-monaco-editor-material-3d" + ], + [ + ".blend", + "#icon-monaco-editor-material-3d" + ], + [ + ".fbx", + "#icon-monaco-editor-material-3d" + ], + [ + ".mesh", + "#icon-monaco-editor-material-3d" + ], + [ + ".mqo", + "#icon-monaco-editor-material-3d" + ], + [ + ".pmd", + "#icon-monaco-editor-material-3d" + ], + [ + ".pmx", + "#icon-monaco-editor-material-3d" + ], + [ + ".skp", + "#icon-monaco-editor-material-3d" + ], + [ + ".vac", + "#icon-monaco-editor-material-3d" + ], + [ + ".vdp", + "#icon-monaco-editor-material-3d" + ], + [ + ".vox", + "#icon-monaco-editor-material-3d" + ], + [ + ".svg", + "#icon-monaco-editor-material-svg" + ], + [ + ".svelte", + "#icon-monaco-editor-material-svelte" + ], + [ + ".vimrc", + "#icon-monaco-editor-material-vim" + ], + [ + ".gvimrc", + "#icon-monaco-editor-material-vim" + ], + [ + ".exrc", + "#icon-monaco-editor-material-vim" + ], + [ + ".vim", + "#icon-monaco-editor-material-vim" + ], + [ + ".viminfo", + "#icon-monaco-editor-material-vim" + ], + [ + ".moon", + "#icon-monaco-editor-material-moonscript" + ], + [ + ".prw", + "#icon-monaco-editor-material-advpl_prw" + ], + [ + ".prx", + "#icon-monaco-editor-material-advpl_prw" + ], + [ + ".ptm", + "#icon-monaco-editor-material-advpl_ptm" + ], + [ + ".tlpp", + "#icon-monaco-editor-material-advpl_tlpp" + ], + [ + ".ch", + "#icon-monaco-editor-material-advpl_include" + ], + [ + ".iso", + "#icon-monaco-editor-material-disc" + ], + [ + ".f", + "#icon-monaco-editor-material-fortran" + ], + [ + ".f77", + "#icon-monaco-editor-material-fortran" + ], + [ + ".f90", + "#icon-monaco-editor-material-fortran" + ], + [ + ".f95", + "#icon-monaco-editor-material-fortran" + ], + [ + ".f03", + "#icon-monaco-editor-material-fortran" + ], + [ + ".f08", + "#icon-monaco-editor-material-fortran" + ], + [ + ".tcl", + "#icon-monaco-editor-material-tcl" + ], + [ + ".liquid", + "#icon-monaco-editor-material-liquid" + ], + [ + ".p", + "#icon-monaco-editor-material-prolog" + ], + [ + ".pro", + "#icon-monaco-editor-material-prolog" + ], + [ + ".pl", + "#icon-monaco-editor-material-prolog" + ], + [ + ".coco", + "#icon-monaco-editor-material-coconut" + ], + [ + ".sketch", + "#icon-monaco-editor-material-sketch" + ], + [ + ".pwn", + "#icon-monaco-editor-material-pawn" + ], + [ + ".amx", + "#icon-monaco-editor-material-pawn" + ], + [ + ".4th", + "#icon-monaco-editor-material-forth" + ], + [ + ".fth", + "#icon-monaco-editor-material-forth" + ], + [ + ".frt", + "#icon-monaco-editor-material-forth" + ], + [ + ".iuml", + "#icon-monaco-editor-material-uml" + ], + [ + ".pu", + "#icon-monaco-editor-material-uml" + ], + [ + ".puml", + "#icon-monaco-editor-material-uml" + ], + [ + ".plantuml", + "#icon-monaco-editor-material-uml" + ], + [ + ".wsd", + "#icon-monaco-editor-material-uml" + ], + [ + ".wrap", + "#icon-monaco-editor-material-meson" + ], + [ + ".dhall", + "#icon-monaco-editor-material-dhall" + ], + [ + ".dhallb", + "#icon-monaco-editor-material-dhall" + ], + [ + ".sml", + "#icon-monaco-editor-material-sml" + ], + [ + ".mlton", + "#icon-monaco-editor-material-sml" + ], + [ + ".mlb", + "#icon-monaco-editor-material-sml" + ], + [ + ".sig", + "#icon-monaco-editor-material-sml" + ], + [ + ".fun", + "#icon-monaco-editor-material-sml" + ], + [ + ".cm", + "#icon-monaco-editor-material-sml" + ], + [ + ".lex", + "#icon-monaco-editor-material-sml" + ], + [ + ".use", + "#icon-monaco-editor-material-sml" + ], + [ + ".grm", + "#icon-monaco-editor-material-sml" + ], + [ + ".opam", + "#icon-monaco-editor-material-opam" + ], + [ + ".imba", + "#icon-monaco-editor-material-imba" + ], + [ + ".drawio", + "#icon-monaco-editor-material-drawio" + ], + [ + ".dio", + "#icon-monaco-editor-material-drawio" + ], + [ + ".pas", + "#icon-monaco-editor-material-pascal" + ], + [ + ".unity", + "#icon-monaco-editor-material-shaderlab" + ], + [ + ".sas", + "#icon-monaco-editor-material-sas" + ], + [ + ".sas7bdat", + "#icon-monaco-editor-material-sas" + ], + [ + ".sashdat", + "#icon-monaco-editor-material-sas" + ], + [ + ".astore", + "#icon-monaco-editor-material-sas" + ], + [ + ".ast", + "#icon-monaco-editor-material-sas" + ], + [ + ".sast", + "#icon-monaco-editor-material-sas" + ], + [ + ".nupkg", + "#icon-monaco-editor-material-nuget" + ], + [ + ".command", + "#icon-monaco-editor-material-command" + ], + [ + ".dsc", + "#icon-monaco-editor-material-denizenscript" + ], + [ + ".code-search", + "#icon-monaco-editor-material-search" + ], + [ + ".nginx", + "#icon-monaco-editor-material-nginx" + ], + [ + ".nginxconf", + "#icon-monaco-editor-material-nginx" + ], + [ + ".nginxconfig", + "#icon-monaco-editor-material-nginx" + ], + [ + ".mcfunction", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mcmeta", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mcr", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mca", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mcgame", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mclevel", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mcworld", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mine", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mus", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mcstructure", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mcpack", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mcaddon", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mctemplate", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mcproject", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".res", + "#icon-monaco-editor-material-rescript" + ], + [ + ".resi", + "#icon-monaco-editor-material-rescript-interface" + ], + [ + ".b", + "#icon-monaco-editor-material-brainfuck" + ], + [ + ".bf", + "#icon-monaco-editor-material-brainfuck" + ], + [ + ".bicep", + "#icon-monaco-editor-material-bicep" + ], + [ + ".cob", + "#icon-monaco-editor-material-cobol" + ], + [ + ".cbl", + "#icon-monaco-editor-material-cobol" + ], + [ + ".gr", + "#icon-monaco-editor-material-grain" + ], + [ + ".lol", + "#icon-monaco-editor-material-lolcode" + ], + [ + ".idr", + "#icon-monaco-editor-material-idris" + ], + [ + ".ibc", + "#icon-monaco-editor-material-idris" + ], + [ + ".pipeline", + "#icon-monaco-editor-material-pipeline" + ], + [ + ".rego", + "#icon-monaco-editor-material-opa" + ], + [ + ".windi", + "#icon-monaco-editor-material-windicss" + ], + [ + ".scala", + "#icon-monaco-editor-material-scala" + ], + [ + ".sc", + "#icon-monaco-editor-material-scala" + ], + [ + ".ly", + "#icon-monaco-editor-material-lilypond" + ], + [ + ".v", + "#icon-monaco-editor-material-vlang" + ], + [ + ".pgn", + "#icon-monaco-editor-material-chess" + ], + [ + ".fen", + "#icon-monaco-editor-material-chess" + ], + [ + ".gmi", + "#icon-monaco-editor-material-gemini" + ], + [ + ".gemini", + "#icon-monaco-editor-material-gemini" + ], + [ + ".tsconfig.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + ".tauri", + "#icon-monaco-editor-material-tauri" + ], + [ + ".jsconfig.json", + "#icon-monaco-editor-material-jsconfig" + ], + [ + ".ada", + "#icon-monaco-editor-material-ada" + ], + [ + ".adb", + "#icon-monaco-editor-material-ada" + ], + [ + ".ads", + "#icon-monaco-editor-material-ada" + ], + [ + ".ali", + "#icon-monaco-editor-material-ada" + ], + [ + ".horusec-config.json", + "#icon-monaco-editor-material-horusec" + ], + [ + ".coarc", + "#icon-monaco-editor-material-coala" + ], + [ + ".coafile", + "#icon-monaco-editor-material-coala" + ], + [ + ".bubble", + "#icon-monaco-editor-material-dinophp" + ], + [ + ".html.bubble", + "#icon-monaco-editor-material-dinophp" + ], + [ + ".php.bubble", + "#icon-monaco-editor-material-dinophp" + ], + [ + ".tl", + "#icon-monaco-editor-material-teal" + ], + [ + ".template", + "#icon-monaco-editor-material-template" + ], + [ + ".glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".vert", + "#icon-monaco-editor-material-shader" + ], + [ + ".tesc", + "#icon-monaco-editor-material-shader" + ], + [ + ".tese", + "#icon-monaco-editor-material-shader" + ], + [ + ".geom", + "#icon-monaco-editor-material-shader" + ], + [ + ".frag", + "#icon-monaco-editor-material-shader" + ], + [ + ".comp", + "#icon-monaco-editor-material-shader" + ], + [ + ".vert.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".tesc.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".tese.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".geom.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".frag.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".comp.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".vertex.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".geometry.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".fragment.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".compute.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".ts.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".gs.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".vs.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".fs.glsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".shader", + "#icon-monaco-editor-material-shader" + ], + [ + ".vertexshader", + "#icon-monaco-editor-material-shader" + ], + [ + ".fragmentshader", + "#icon-monaco-editor-material-shader" + ], + [ + ".geometryshader", + "#icon-monaco-editor-material-shader" + ], + [ + ".computeshader", + "#icon-monaco-editor-material-shader" + ], + [ + ".hlsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".pixel.hlsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".geometry.hlsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".compute.hlsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".tessellation.hlsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".px.hlsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".geom.hlsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".comp.hlsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".tess.hlsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".wgsl", + "#icon-monaco-editor-material-shader" + ], + [ + ".sy", + "#icon-monaco-editor-material-siyuan" + ], + [ + ".ndst.yml", + "#icon-monaco-editor-material-ndst" + ], + [ + ".ndst.yaml", + "#icon-monaco-editor-material-ndst" + ], + [ + ".ndst.json", + "#icon-monaco-editor-material-ndst" + ], + [ + ".tobi", + "#icon-monaco-editor-material-tobi" + ], + [ + ".gleam", + "#icon-monaco-editor-material-gleam" + ], + [ + ".steadybit.yml", + "#icon-monaco-editor-material-steadybit" + ], + [ + ".steadybit.yaml", + "#icon-monaco-editor-material-steadybit" + ], + [ + ".tree", + "#icon-monaco-editor-material-tree" + ], + [ + ".cdc", + "#icon-monaco-editor-material-cadence" + ], + [ + ".g4", + "#icon-monaco-editor-material-antlr" + ], + [ + ".st.css", + "#icon-monaco-editor-material-stylable" + ], + [ + ".pine", + "#icon-monaco-editor-material-pinejs" + ], + [ + ".gml", + "#icon-monaco-editor-material-gamemaker" + ], + [ + ".yy", + "#icon-monaco-editor-material-gamemaker" + ], + [ + ".yyp", + "#icon-monaco-editor-material-gamemaker" + ], + [ + ".yyz", + "#icon-monaco-editor-material-gamemaker" + ], + [ + ".tldr", + "#icon-monaco-editor-material-tldraw" + ], + [ + ".typ", + "#icon-monaco-editor-material-typst" + ], + [ + ".mmd", + "#icon-monaco-editor-material-mermaid" + ], + [ + ".mermaid", + "#icon-monaco-editor-material-mermaid" + ], + [ + ".mojo", + "#icon-monaco-editor-material-mojo" + ], + [ + ".🔥", + "#icon-monaco-editor-material-mojo" + ] +] \ No newline at end of file diff --git a/workspace/plugins/monaco-editor/src/assets/entries/file-icon.json b/workspace/plugins/monaco-editor/src/assets/entries/file-icon.json new file mode 100644 index 0000000..6dd64a4 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/assets/entries/file-icon.json @@ -0,0 +1,4086 @@ +[ + [ + ".pug-lintrc", + "#icon-monaco-editor-material-pug" + ], + [ + ".pug-lintrc.js", + "#icon-monaco-editor-material-pug" + ], + [ + ".pug-lintrc.json", + "#icon-monaco-editor-material-pug" + ], + [ + ".jscsrc", + "#icon-monaco-editor-material-json" + ], + [ + ".jshintrc", + "#icon-monaco-editor-material-json" + ], + [ + "composer.lock", + "#icon-monaco-editor-material-json" + ], + [ + ".jsbeautifyrc", + "#icon-monaco-editor-material-json" + ], + [ + ".esformatter", + "#icon-monaco-editor-material-json" + ], + [ + "cdp.pid", + "#icon-monaco-editor-material-json" + ], + [ + ".lintstagedrc", + "#icon-monaco-editor-material-json" + ], + [ + "playwright.config.js", + "#icon-monaco-editor-material-playwright" + ], + [ + "playwright.config.mjs", + "#icon-monaco-editor-material-playwright" + ], + [ + "playwright.config.ts", + "#icon-monaco-editor-material-playwright" + ], + [ + "playwright.config.base.js", + "#icon-monaco-editor-material-playwright" + ], + [ + "playwright.config.base.mjs", + "#icon-monaco-editor-material-playwright" + ], + [ + "playwright.config.base.ts", + "#icon-monaco-editor-material-playwright" + ], + [ + "playwright-ct.config.js", + "#icon-monaco-editor-material-playwright" + ], + [ + "playwright-ct.config.mjs", + "#icon-monaco-editor-material-playwright" + ], + [ + "playwright-ct.config.ts", + "#icon-monaco-editor-material-playwright" + ], + [ + ".htaccess", + "#icon-monaco-editor-material-xml" + ], + [ + "router.js", + "#icon-monaco-editor-material-routing" + ], + [ + "router.jsx", + "#icon-monaco-editor-material-routing" + ], + [ + "router.ts", + "#icon-monaco-editor-material-routing" + ], + [ + "router.tsx", + "#icon-monaco-editor-material-routing" + ], + [ + "routes.js", + "#icon-monaco-editor-material-routing" + ], + [ + "routes.jsx", + "#icon-monaco-editor-material-routing" + ], + [ + "routes.ts", + "#icon-monaco-editor-material-routing" + ], + [ + "routes.tsx", + "#icon-monaco-editor-material-routing" + ], + [ + ".jshintignore", + "#icon-monaco-editor-material-settings" + ], + [ + ".buildignore", + "#icon-monaco-editor-material-settings" + ], + [ + ".mrconfig", + "#icon-monaco-editor-material-settings" + ], + [ + ".yardopts", + "#icon-monaco-editor-material-settings" + ], + [ + "manifest.mf", + "#icon-monaco-editor-material-settings" + ], + [ + ".clang-format", + "#icon-monaco-editor-material-settings" + ], + [ + ".clang-tidy", + "#icon-monaco-editor-material-settings" + ], + [ + "astro.config.js", + "#icon-monaco-editor-material-astro" + ], + [ + "astro.config.mjs", + "#icon-monaco-editor-material-astro" + ], + [ + "astro.config.cjs", + "#icon-monaco-editor-material-astro" + ], + [ + "astro.config.ts", + "#icon-monaco-editor-material-astro" + ], + [ + "astro.config.cts", + "#icon-monaco-editor-material-astro" + ], + [ + "astro.config.mts", + "#icon-monaco-editor-material-astro" + ], + [ + "go.mod", + "#icon-monaco-editor-material-go-mod" + ], + [ + "go.sum", + "#icon-monaco-editor-material-go-mod" + ], + [ + "go.work", + "#icon-monaco-editor-material-go-mod" + ], + [ + "go.work.sum", + "#icon-monaco-editor-material-go-mod" + ], + [ + "requirements.txt", + "#icon-monaco-editor-material-python-misc" + ], + [ + "pipfile", + "#icon-monaco-editor-material-python-misc" + ], + [ + ".python-version", + "#icon-monaco-editor-material-python-misc" + ], + [ + "manifest.in", + "#icon-monaco-editor-material-python-misc" + ], + [ + "pylintrc", + "#icon-monaco-editor-material-python-misc" + ], + [ + ".pylintrc", + "#icon-monaco-editor-material-python-misc" + ], + [ + "pyproject.toml", + "#icon-monaco-editor-material-python-misc" + ], + [ + "commit-msg", + "#icon-monaco-editor-material-console" + ], + [ + "pre-commit", + "#icon-monaco-editor-material-console" + ], + [ + "pre-push", + "#icon-monaco-editor-material-console" + ], + [ + "post-merge", + "#icon-monaco-editor-material-console" + ], + [ + "gradle.properties", + "#icon-monaco-editor-material-gradle" + ], + [ + "gradlew", + "#icon-monaco-editor-material-gradle" + ], + [ + "gradle-wrapper.properties", + "#icon-monaco-editor-material-gradle" + ], + [ + "copying", + "#icon-monaco-editor-material-certificate" + ], + [ + "copying.md", + "#icon-monaco-editor-material-certificate" + ], + [ + "copying.rst", + "#icon-monaco-editor-material-certificate" + ], + [ + "copying.txt", + "#icon-monaco-editor-material-certificate" + ], + [ + "copyright", + "#icon-monaco-editor-material-certificate" + ], + [ + "copyright.md", + "#icon-monaco-editor-material-certificate" + ], + [ + "copyright.rst", + "#icon-monaco-editor-material-certificate" + ], + [ + "copyright.txt", + "#icon-monaco-editor-material-certificate" + ], + [ + "license", + "#icon-monaco-editor-material-certificate" + ], + [ + "license-agpl", + "#icon-monaco-editor-material-certificate" + ], + [ + "license-apache", + "#icon-monaco-editor-material-certificate" + ], + [ + "license-bsd", + "#icon-monaco-editor-material-certificate" + ], + [ + "license-mit", + "#icon-monaco-editor-material-certificate" + ], + [ + "license-gpl", + "#icon-monaco-editor-material-certificate" + ], + [ + "license-lgpl", + "#icon-monaco-editor-material-certificate" + ], + [ + "license.md", + "#icon-monaco-editor-material-certificate" + ], + [ + "license.rst", + "#icon-monaco-editor-material-certificate" + ], + [ + "license.txt", + "#icon-monaco-editor-material-certificate" + ], + [ + "licence", + "#icon-monaco-editor-material-certificate" + ], + [ + "licence-agpl", + "#icon-monaco-editor-material-certificate" + ], + [ + "licence-apache", + "#icon-monaco-editor-material-certificate" + ], + [ + "licence-bsd", + "#icon-monaco-editor-material-certificate" + ], + [ + "licence-mit", + "#icon-monaco-editor-material-certificate" + ], + [ + "licence-gpl", + "#icon-monaco-editor-material-certificate" + ], + [ + "licence-lgpl", + "#icon-monaco-editor-material-certificate" + ], + [ + "licence.md", + "#icon-monaco-editor-material-certificate" + ], + [ + "licence.rst", + "#icon-monaco-editor-material-certificate" + ], + [ + "licence.txt", + "#icon-monaco-editor-material-certificate" + ], + [ + ".htpasswd", + "#icon-monaco-editor-material-key" + ], + [ + ".ruby-version", + "#icon-monaco-editor-material-ruby" + ], + [ + "gemfile", + "#icon-monaco-editor-material-gemfile" + ], + [ + ".rubocop.yml", + "#icon-monaco-editor-material-rubocop" + ], + [ + ".rubocop-todo.yml", + "#icon-monaco-editor-material-rubocop" + ], + [ + ".rubocop_todo.yml", + "#icon-monaco-editor-material-rubocop" + ], + [ + "dockerfile", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.prod", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.production", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.alpha", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.beta", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.stage", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.staging", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.dev", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.development", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.local", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.test", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.testing", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.ci", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.web", + "#icon-monaco-editor-material-docker" + ], + [ + "dockerfile.worker", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.override.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.prod.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.production.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.alpha.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.beta.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.stage.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.staging.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.dev.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.development.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.local.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.test.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.testing.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.ci.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.web.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.worker.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.override.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.prod.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.production.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.alpha.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.beta.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.stage.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.staging.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.dev.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.development.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.local.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.test.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.testing.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.ci.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.web.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "docker-compose.worker.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.override.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.prod.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.production.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.alpha.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.beta.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.stage.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.staging.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.dev.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.development.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.local.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.test.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.testing.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.ci.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.web.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.worker.yaml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.override.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.prod.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.production.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.alpha.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.beta.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.stage.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.staging.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.dev.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.development.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.local.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.test.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.testing.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.ci.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.web.yml", + "#icon-monaco-editor-material-docker" + ], + [ + "compose.worker.yml", + "#icon-monaco-editor-material-docker" + ], + [ + ".mailmap", + "#icon-monaco-editor-material-email" + ], + [ + ".graphqlconfig", + "#icon-monaco-editor-material-graphql" + ], + [ + ".graphqlrc", + "#icon-monaco-editor-material-graphql" + ], + [ + ".graphqlrc.json", + "#icon-monaco-editor-material-graphql" + ], + [ + ".graphqlrc.js", + "#icon-monaco-editor-material-graphql" + ], + [ + ".graphqlrc.cjs", + "#icon-monaco-editor-material-graphql" + ], + [ + ".graphqlrc.ts", + "#icon-monaco-editor-material-graphql" + ], + [ + ".graphqlrc.toml", + "#icon-monaco-editor-material-graphql" + ], + [ + ".graphqlrc.yaml", + "#icon-monaco-editor-material-graphql" + ], + [ + ".graphqlrc.yml", + "#icon-monaco-editor-material-graphql" + ], + [ + "graphql.config.json", + "#icon-monaco-editor-material-graphql" + ], + [ + "graphql.config.js", + "#icon-monaco-editor-material-graphql" + ], + [ + "graphql.config.cjs", + "#icon-monaco-editor-material-graphql" + ], + [ + "graphql.config.ts", + "#icon-monaco-editor-material-graphql" + ], + [ + "graphql.config.toml", + "#icon-monaco-editor-material-graphql" + ], + [ + "graphql.config.yaml", + "#icon-monaco-editor-material-graphql" + ], + [ + "graphql.config.yml", + "#icon-monaco-editor-material-graphql" + ], + [ + ".git", + "#icon-monaco-editor-material-git" + ], + [ + ".gitignore", + "#icon-monaco-editor-material-git" + ], + [ + ".gitmessage", + "#icon-monaco-editor-material-git" + ], + [ + ".gitignore-global", + "#icon-monaco-editor-material-git" + ], + [ + ".gitignore_global", + "#icon-monaco-editor-material-git" + ], + [ + ".gitattributes", + "#icon-monaco-editor-material-git" + ], + [ + ".gitattributes-global", + "#icon-monaco-editor-material-git" + ], + [ + ".gitattributes_global", + "#icon-monaco-editor-material-git" + ], + [ + ".gitconfig", + "#icon-monaco-editor-material-git" + ], + [ + ".gitmodules", + "#icon-monaco-editor-material-git" + ], + [ + ".gitkeep", + "#icon-monaco-editor-material-git" + ], + [ + ".keep", + "#icon-monaco-editor-material-git" + ], + [ + ".gitpreserve", + "#icon-monaco-editor-material-git" + ], + [ + ".gitinclude", + "#icon-monaco-editor-material-git" + ], + [ + ".git-blame-ignore", + "#icon-monaco-editor-material-git" + ], + [ + ".git-blame-ignore-revs", + "#icon-monaco-editor-material-git" + ], + [ + ".git-for-windows-updater", + "#icon-monaco-editor-material-git" + ], + [ + "git-history", + "#icon-monaco-editor-material-git" + ], + [ + ".luacheckrc", + "#icon-monaco-editor-material-lua" + ], + [ + ".Rhistory", + "#icon-monaco-editor-material-r" + ], + [ + ".pubignore", + "#icon-monaco-editor-material-dart" + ], + [ + "cmakelists.txt", + "#icon-monaco-editor-material-cmake" + ], + [ + "cmakecache.txt", + "#icon-monaco-editor-material-cmake" + ], + [ + "semgrep.yml", + "#icon-monaco-editor-material-semgrep" + ], + [ + ".semgrepignore", + "#icon-monaco-editor-material-semgrep" + ], + [ + "vue.config.js", + "#icon-monaco-editor-material-vue-config" + ], + [ + "vue.config.ts", + "#icon-monaco-editor-material-vue-config" + ], + [ + "vetur.config.js", + "#icon-monaco-editor-material-vue-config" + ], + [ + "vetur.config.ts", + "#icon-monaco-editor-material-vue-config" + ], + [ + "volar.config.js", + "#icon-monaco-editor-material-vue-config" + ], + [ + "nuxt.config.js", + "#icon-monaco-editor-material-nuxt" + ], + [ + "nuxt.config.ts", + "#icon-monaco-editor-material-nuxt" + ], + [ + ".nuxtignore", + "#icon-monaco-editor-material-nuxt" + ], + [ + "security.md", + "#icon-monaco-editor-material-lock" + ], + [ + "security.txt", + "#icon-monaco-editor-material-lock" + ], + [ + "security", + "#icon-monaco-editor-material-lock" + ], + [ + "angular-cli.json", + "#icon-monaco-editor-material-angular" + ], + [ + ".angular-cli.json", + "#icon-monaco-editor-material-angular" + ], + [ + "angular.json", + "#icon-monaco-editor-material-angular" + ], + [ + "ng-package.json", + "#icon-monaco-editor-material-angular" + ], + [ + ".mjmlconfig", + "#icon-monaco-editor-material-mjml" + ], + [ + "vercel.json", + "#icon-monaco-editor-material-vercel" + ], + [ + ".vercelignore", + "#icon-monaco-editor-material-vercel" + ], + [ + "now.json", + "#icon-monaco-editor-material-vercel" + ], + [ + ".nowignore", + "#icon-monaco-editor-material-vercel" + ], + [ + "verdaccio.yml", + "#icon-monaco-editor-material-verdaccio" + ], + [ + "next.config.js", + "#icon-monaco-editor-material-next" + ], + [ + "next.config.mjs", + "#icon-monaco-editor-material-next" + ], + [ + "next.config.ts", + "#icon-monaco-editor-material-next" + ], + [ + "next.config.mts", + "#icon-monaco-editor-material-next" + ], + [ + "remix.config.js", + "#icon-monaco-editor-material-remix" + ], + [ + "remix.config.ts", + "#icon-monaco-editor-material-remix" + ], + [ + "artisan", + "#icon-monaco-editor-material-laravel" + ], + [ + ".vfl", + "#icon-monaco-editor-material-vfl" + ], + [ + ".kl", + "#icon-monaco-editor-material-kl" + ], + [ + "postcss.config.js", + "#icon-monaco-editor-material-postcss" + ], + [ + "postcss.config.cjs", + "#icon-monaco-editor-material-postcss" + ], + [ + "postcss.config.ts", + "#icon-monaco-editor-material-postcss" + ], + [ + "postcss.config.cts", + "#icon-monaco-editor-material-postcss" + ], + [ + ".postcssrc.js", + "#icon-monaco-editor-material-postcss" + ], + [ + ".postcssrc.cjs", + "#icon-monaco-editor-material-postcss" + ], + [ + ".postcssrc.ts", + "#icon-monaco-editor-material-postcss" + ], + [ + ".postcssrc.cts", + "#icon-monaco-editor-material-postcss" + ], + [ + ".postcssrc", + "#icon-monaco-editor-material-postcss" + ], + [ + ".postcssrc.json", + "#icon-monaco-editor-material-postcss" + ], + [ + ".postcssrc.yaml", + "#icon-monaco-editor-material-postcss" + ], + [ + ".postcssrc.yml", + "#icon-monaco-editor-material-postcss" + ], + [ + "posthtml.config.js", + "#icon-monaco-editor-material-posthtml" + ], + [ + ".posthtmlrc.js", + "#icon-monaco-editor-material-posthtml" + ], + [ + ".posthtmlrc", + "#icon-monaco-editor-material-posthtml" + ], + [ + ".posthtmlrc.json", + "#icon-monaco-editor-material-posthtml" + ], + [ + ".posthtmlrc.yml", + "#icon-monaco-editor-material-posthtml" + ], + [ + "todo.md", + "#icon-monaco-editor-material-todo" + ], + [ + "todos.md", + "#icon-monaco-editor-material-todo" + ], + [ + "cabal.project", + "#icon-monaco-editor-material-cabal" + ], + [ + "cabal.project.freeze", + "#icon-monaco-editor-material-cabal" + ], + [ + "cabal.project.local", + "#icon-monaco-editor-material-cabal" + ], + [ + "CNAME", + "#icon-monaco-editor-material-http" + ], + [ + "project.graphcool", + "#icon-monaco-editor-material-graphcool" + ], + [ + "webpack.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.base.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.base.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.base.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.base.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.base.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.base.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.common.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.common.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.common.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.common.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.common.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.common.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.common.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.common.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.common.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.common.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.common.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.common.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.common.babel.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.common.babel.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dev.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dev.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dev.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dev.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dev.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dev.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.development.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.development.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.development.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.development.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.development.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.development.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.dev.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.dev.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.dev.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.dev.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.dev.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.dev.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.dev.babel.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.dev.babel.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.main.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.renderer.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.mix.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.mix.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.mix.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.mix.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.mix.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.mix.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.config.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.config.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.config.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.config.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.config.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.prod.config.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.production.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.production.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.production.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.production.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.production.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.production.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.server.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.server.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.server.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.server.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.server.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.server.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.client.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.client.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.client.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.client.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.client.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.client.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.server.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.server.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.server.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.server.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.server.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.server.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.client.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.client.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.client.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.client.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.client.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.client.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.production.babel.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.production.babel.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.babel.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.babel.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.babel.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.babel.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.babel.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.babel.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.prod.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.production.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.production.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.production.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.production.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.production.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.production.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.staging.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.staging.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.staging.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.staging.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.staging.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.staging.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.babel.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.babel.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.base.babel.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.base.babel.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.base.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.base.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.base.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.base.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.base.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.base.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.staging.babel.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.staging.babel.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.coffee", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.test.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.test.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.test.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.test.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.test.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.test.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.production.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.production.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.production.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.production.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.production.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.config.vendor.production.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.test.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.test.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.test.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.test.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.test.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.test.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dist.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dist.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dist.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dist.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dist.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpack.dist.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpackfile.js", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpackfile.cjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpackfile.mjs", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpackfile.ts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpackfile.cts", + "#icon-monaco-editor-material-webpack" + ], + [ + "webpackfile.mts", + "#icon-monaco-editor-material-webpack" + ], + [ + "ionic.config.json", + "#icon-monaco-editor-material-ionic" + ], + [ + ".io-config.json", + "#icon-monaco-editor-material-ionic" + ], + [ + "gulpfile.js", + "#icon-monaco-editor-material-gulp" + ], + [ + "gulpfile.mjs", + "#icon-monaco-editor-material-gulp" + ], + [ + "gulpfile.ts", + "#icon-monaco-editor-material-gulp" + ], + [ + "gulpfile.cts", + "#icon-monaco-editor-material-gulp" + ], + [ + "gulpfile.mts", + "#icon-monaco-editor-material-gulp" + ], + [ + "gulpfile.babel.js", + "#icon-monaco-editor-material-gulp" + ], + [ + "package.json", + "#icon-monaco-editor-material-nodejs" + ], + [ + "package-lock.json", + "#icon-monaco-editor-material-nodejs" + ], + [ + ".nvmrc", + "#icon-monaco-editor-material-nodejs" + ], + [ + ".esmrc", + "#icon-monaco-editor-material-nodejs" + ], + [ + ".node-version", + "#icon-monaco-editor-material-nodejs" + ], + [ + ".npmignore", + "#icon-monaco-editor-material-npm" + ], + [ + ".npmrc", + "#icon-monaco-editor-material-npm" + ], + [ + ".yarnrc", + "#icon-monaco-editor-material-yarn" + ], + [ + "yarn.lock", + "#icon-monaco-editor-material-yarn" + ], + [ + ".yarnclean", + "#icon-monaco-editor-material-yarn" + ], + [ + ".yarn-integrity", + "#icon-monaco-editor-material-yarn" + ], + [ + "yarn-error.log", + "#icon-monaco-editor-material-yarn" + ], + [ + ".yarnrc.yml", + "#icon-monaco-editor-material-yarn" + ], + [ + ".yarnrc.yaml", + "#icon-monaco-editor-material-yarn" + ], + [ + "androidmanifest.xml", + "#icon-monaco-editor-material-android" + ], + [ + ".env.defaults", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.example", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.sample", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.template", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.schema", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.local", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.dev", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.development", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.alpha", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.e2e", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.qa", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.dist", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.prod", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.production", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.stage", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.staging", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.preview", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.test", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.testing", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.development.local", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.qa.local", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.production.local", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.staging.local", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.test.local", + "#icon-monaco-editor-material-tune" + ], + [ + ".env.uat", + "#icon-monaco-editor-material-tune" + ], + [ + "turbo.json", + "#icon-monaco-editor-material-turborepo" + ], + [ + ".babelrc", + "#icon-monaco-editor-material-babel" + ], + [ + ".babelrc.cjs", + "#icon-monaco-editor-material-babel" + ], + [ + ".babelrc.js", + "#icon-monaco-editor-material-babel" + ], + [ + ".babelrc.mjs", + "#icon-monaco-editor-material-babel" + ], + [ + ".babelrc.json", + "#icon-monaco-editor-material-babel" + ], + [ + "babel.config.cjs", + "#icon-monaco-editor-material-babel" + ], + [ + "babel.config.js", + "#icon-monaco-editor-material-babel" + ], + [ + "babel.config.mjs", + "#icon-monaco-editor-material-babel" + ], + [ + "babel.config.json", + "#icon-monaco-editor-material-babel" + ], + [ + "babel-transform.js", + "#icon-monaco-editor-material-babel" + ], + [ + ".babel-plugin-macrosrc", + "#icon-monaco-editor-material-babel" + ], + [ + ".babel-plugin-macrosrc.json", + "#icon-monaco-editor-material-babel" + ], + [ + ".babel-plugin-macrosrc.yaml", + "#icon-monaco-editor-material-babel" + ], + [ + ".babel-plugin-macrosrc.yml", + "#icon-monaco-editor-material-babel" + ], + [ + ".babel-plugin-macrosrc.js", + "#icon-monaco-editor-material-babel" + ], + [ + "babel-plugin-macros.config.js", + "#icon-monaco-editor-material-babel" + ], + [ + "blitz.config.js", + "#icon-monaco-editor-material-blitz" + ], + [ + "blitz.config.ts", + "#icon-monaco-editor-material-blitz" + ], + [ + ".blitz.config.compiled.js", + "#icon-monaco-editor-material-blitz" + ], + [ + "contributing.md", + "#icon-monaco-editor-material-contributing" + ], + [ + "contributing.rst", + "#icon-monaco-editor-material-contributing" + ], + [ + "contributing.txt", + "#icon-monaco-editor-material-contributing" + ], + [ + "contributing", + "#icon-monaco-editor-material-contributing" + ], + [ + "readme.md", + "#icon-monaco-editor-material-readme" + ], + [ + "readme.rst", + "#icon-monaco-editor-material-readme" + ], + [ + "readme.txt", + "#icon-monaco-editor-material-readme" + ], + [ + "readme", + "#icon-monaco-editor-material-readme" + ], + [ + "changelog", + "#icon-monaco-editor-material-changelog" + ], + [ + "changelog.md", + "#icon-monaco-editor-material-changelog" + ], + [ + "changelog.rst", + "#icon-monaco-editor-material-changelog" + ], + [ + "changelog.txt", + "#icon-monaco-editor-material-changelog" + ], + [ + "changes", + "#icon-monaco-editor-material-changelog" + ], + [ + "changes.md", + "#icon-monaco-editor-material-changelog" + ], + [ + "changes.rst", + "#icon-monaco-editor-material-changelog" + ], + [ + "changes.txt", + "#icon-monaco-editor-material-changelog" + ], + [ + "architecture.md", + "#icon-monaco-editor-material-architecture" + ], + [ + "architecture.rst", + "#icon-monaco-editor-material-architecture" + ], + [ + "architecture.txt", + "#icon-monaco-editor-material-architecture" + ], + [ + "architecture", + "#icon-monaco-editor-material-architecture" + ], + [ + "credits.md", + "#icon-monaco-editor-material-credits" + ], + [ + "credits.rst", + "#icon-monaco-editor-material-credits" + ], + [ + "credits.txt", + "#icon-monaco-editor-material-credits" + ], + [ + "credits", + "#icon-monaco-editor-material-credits" + ], + [ + "authors.md", + "#icon-monaco-editor-material-authors" + ], + [ + "authors.rst", + "#icon-monaco-editor-material-authors" + ], + [ + "authors.txt", + "#icon-monaco-editor-material-authors" + ], + [ + "authors", + "#icon-monaco-editor-material-authors" + ], + [ + "contributors.md", + "#icon-monaco-editor-material-authors" + ], + [ + "contributors.rst", + "#icon-monaco-editor-material-authors" + ], + [ + "contributors.txt", + "#icon-monaco-editor-material-authors" + ], + [ + "contributors", + "#icon-monaco-editor-material-authors" + ], + [ + ".flowconfig", + "#icon-monaco-editor-material-flow" + ], + [ + "favicon.ico", + "#icon-monaco-editor-material-favicon" + ], + [ + "karma.conf.js", + "#icon-monaco-editor-material-karma" + ], + [ + "karma.conf.ts", + "#icon-monaco-editor-material-karma" + ], + [ + "karma.conf.coffee", + "#icon-monaco-editor-material-karma" + ], + [ + "karma.config.js", + "#icon-monaco-editor-material-karma" + ], + [ + "karma.config.ts", + "#icon-monaco-editor-material-karma" + ], + [ + "karma-main.js", + "#icon-monaco-editor-material-karma" + ], + [ + "karma-main.ts", + "#icon-monaco-editor-material-karma" + ], + [ + ".bithoundrc", + "#icon-monaco-editor-material-bithound" + ], + [ + "svgo.config.js", + "#icon-monaco-editor-material-svgo" + ], + [ + "svgo.config.cjs", + "#icon-monaco-editor-material-svgo" + ], + [ + "svgo.config.mjs", + "#icon-monaco-editor-material-svgo" + ], + [ + ".appveyor.yml", + "#icon-monaco-editor-material-appveyor" + ], + [ + "appveyor.yml", + "#icon-monaco-editor-material-appveyor" + ], + [ + ".travis.yml", + "#icon-monaco-editor-material-travis" + ], + [ + ".codecov.yml", + "#icon-monaco-editor-material-codecov" + ], + [ + "codecov.yml", + "#icon-monaco-editor-material-codecov" + ], + [ + "sonar-project.properties", + "#icon-monaco-editor-material-sonarcloud" + ], + [ + ".sonarcloud.properties", + "#icon-monaco-editor-material-sonarcloud" + ], + [ + "sonarcloud.yaml", + "#icon-monaco-editor-material-sonarcloud" + ], + [ + "protractor.conf.js", + "#icon-monaco-editor-material-protractor" + ], + [ + "protractor.conf.ts", + "#icon-monaco-editor-material-protractor" + ], + [ + "protractor.conf.coffee", + "#icon-monaco-editor-material-protractor" + ], + [ + "protractor.config.js", + "#icon-monaco-editor-material-protractor" + ], + [ + "protractor.config.ts", + "#icon-monaco-editor-material-protractor" + ], + [ + "fuse.js", + "#icon-monaco-editor-material-fusebox" + ], + [ + "procfile", + "#icon-monaco-editor-material-heroku" + ], + [ + "procfile.windows", + "#icon-monaco-editor-material-heroku" + ], + [ + ".editorconfig", + "#icon-monaco-editor-material-editorconfig" + ], + [ + ".bowerrc", + "#icon-monaco-editor-material-bower" + ], + [ + "bower.json", + "#icon-monaco-editor-material-bower" + ], + [ + ".eslintrc.js", + "#icon-monaco-editor-material-eslint" + ], + [ + ".eslintrc.cjs", + "#icon-monaco-editor-material-eslint" + ], + [ + ".eslintrc.yaml", + "#icon-monaco-editor-material-eslint" + ], + [ + ".eslintrc.yml", + "#icon-monaco-editor-material-eslint" + ], + [ + ".eslintrc.json", + "#icon-monaco-editor-material-eslint" + ], + [ + ".eslintrc-md.js", + "#icon-monaco-editor-material-eslint" + ], + [ + ".eslintrc-jsdoc.js", + "#icon-monaco-editor-material-eslint" + ], + [ + ".eslintrc", + "#icon-monaco-editor-material-eslint" + ], + [ + ".eslintignore", + "#icon-monaco-editor-material-eslint" + ], + [ + ".eslintcache", + "#icon-monaco-editor-material-eslint" + ], + [ + "eslint.config.js", + "#icon-monaco-editor-material-eslint" + ], + [ + "eslint.config.mjs", + "#icon-monaco-editor-material-eslint" + ], + [ + ".eslintrc.base.json", + "#icon-monaco-editor-material-eslint" + ], + [ + "code_of_conduct.md", + "#icon-monaco-editor-material-conduct" + ], + [ + "code_of_conduct.txt", + "#icon-monaco-editor-material-conduct" + ], + [ + "code_of_conduct", + "#icon-monaco-editor-material-conduct" + ], + [ + ".watchmanconfig", + "#icon-monaco-editor-material-watchman" + ], + [ + "aurelia.json", + "#icon-monaco-editor-material-aurelia" + ], + [ + ".autorc", + "#icon-monaco-editor-material-auto" + ], + [ + "auto.config.js", + "#icon-monaco-editor-material-auto" + ], + [ + "auto.config.ts", + "#icon-monaco-editor-material-auto" + ], + [ + "auto-config.json", + "#icon-monaco-editor-material-auto" + ], + [ + "auto-config.yaml", + "#icon-monaco-editor-material-auto" + ], + [ + "auto-config.yml", + "#icon-monaco-editor-material-auto" + ], + [ + "auto-config.ts", + "#icon-monaco-editor-material-auto" + ], + [ + "auto-config.js", + "#icon-monaco-editor-material-auto" + ], + [ + "mocha.opts", + "#icon-monaco-editor-material-mocha" + ], + [ + ".mocharc.yml", + "#icon-monaco-editor-material-mocha" + ], + [ + ".mocharc.yaml", + "#icon-monaco-editor-material-mocha" + ], + [ + ".mocharc.js", + "#icon-monaco-editor-material-mocha" + ], + [ + ".mocharc.json", + "#icon-monaco-editor-material-mocha" + ], + [ + ".mocharc.jsonc", + "#icon-monaco-editor-material-mocha" + ], + [ + "jenkinsfile", + "#icon-monaco-editor-material-jenkins" + ], + [ + "firebase.json", + "#icon-monaco-editor-material-firebase" + ], + [ + ".firebaserc", + "#icon-monaco-editor-material-firebase" + ], + [ + "firestore.rules", + "#icon-monaco-editor-material-firebase" + ], + [ + "firestore.indexes.json", + "#icon-monaco-editor-material-firebase" + ], + [ + "rollup.config.js", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.mjs", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.ts", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup-config.js", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup-config.mjs", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup-config.ts", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.common.js", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.common.mjs", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.common.ts", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.base.js", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.base.mjs", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.base.ts", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.prod.js", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.prod.mjs", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.prod.ts", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.dev.js", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.dev.mjs", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.dev.ts", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.prod.vendor.js", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.prod.vendor.mjs", + "#icon-monaco-editor-material-rollup" + ], + [ + "rollup.config.prod.vendor.ts", + "#icon-monaco-editor-material-rollup" + ], + [ + ".hhconfig", + "#icon-monaco-editor-material-hack" + ], + [ + "hardhat.config.js", + "#icon-monaco-editor-material-hardhat" + ], + [ + "hardhat.config.ts", + "#icon-monaco-editor-material-hardhat" + ], + [ + ".stylelintrc", + "#icon-monaco-editor-material-stylelint" + ], + [ + "stylelint.config.js", + "#icon-monaco-editor-material-stylelint" + ], + [ + "stylelint.config.cjs", + "#icon-monaco-editor-material-stylelint" + ], + [ + ".stylelintrc.json", + "#icon-monaco-editor-material-stylelint" + ], + [ + ".stylelintrc.yaml", + "#icon-monaco-editor-material-stylelint" + ], + [ + ".stylelintrc.yml", + "#icon-monaco-editor-material-stylelint" + ], + [ + ".stylelintrc.js", + "#icon-monaco-editor-material-stylelint" + ], + [ + ".stylelintrc.cjs", + "#icon-monaco-editor-material-stylelint" + ], + [ + ".stylelintignore", + "#icon-monaco-editor-material-stylelint" + ], + [ + ".stylelintcache", + "#icon-monaco-editor-material-stylelint" + ], + [ + ".codeclimate.yml", + "#icon-monaco-editor-material-code-climate" + ], + [ + ".prettierrc", + "#icon-monaco-editor-material-prettier" + ], + [ + "prettier.config.js", + "#icon-monaco-editor-material-prettier" + ], + [ + "prettier.config.cjs", + "#icon-monaco-editor-material-prettier" + ], + [ + ".prettierrc.js", + "#icon-monaco-editor-material-prettier" + ], + [ + ".prettierrc.cjs", + "#icon-monaco-editor-material-prettier" + ], + [ + ".prettierrc.json", + "#icon-monaco-editor-material-prettier" + ], + [ + ".prettierrc.json5", + "#icon-monaco-editor-material-prettier" + ], + [ + ".prettierrc.yaml", + "#icon-monaco-editor-material-prettier" + ], + [ + ".prettierrc.yml", + "#icon-monaco-editor-material-prettier" + ], + [ + ".prettierignore", + "#icon-monaco-editor-material-prettier" + ], + [ + ".prettierrc.toml", + "#icon-monaco-editor-material-prettier" + ], + [ + "prettier.config.mjs", + "#icon-monaco-editor-material-prettier" + ], + [ + ".prettierrc.mjs", + "#icon-monaco-editor-material-prettier" + ], + [ + ".renovaterc", + "#icon-monaco-editor-material-renovate" + ], + [ + ".renovaterc.json", + "#icon-monaco-editor-material-renovate" + ], + [ + "renovate-config.json", + "#icon-monaco-editor-material-renovate" + ], + [ + "renovate.json", + "#icon-monaco-editor-material-renovate" + ], + [ + "renovate.json5", + "#icon-monaco-editor-material-renovate" + ], + [ + "apollo.config.js", + "#icon-monaco-editor-material-apollo" + ], + [ + "nodemon.json", + "#icon-monaco-editor-material-nodemon" + ], + [ + "nodemon-debug.json", + "#icon-monaco-editor-material-nodemon" + ], + [ + ".hintrc", + "#icon-monaco-editor-material-webhint" + ], + [ + "browserslist", + "#icon-monaco-editor-material-browserlist" + ], + [ + ".browserslistrc", + "#icon-monaco-editor-material-browserlist" + ], + [ + ".snyk", + "#icon-monaco-editor-material-snyk" + ], + [ + ".drone.yml", + "#icon-monaco-editor-material-drone" + ], + [ + ".sequelizerc", + "#icon-monaco-editor-material-sequelize" + ], + [ + "gatsby-config.js", + "#icon-monaco-editor-material-gatsby" + ], + [ + "gatsby-config.mjs", + "#icon-monaco-editor-material-gatsby" + ], + [ + "gatsby-config.ts", + "#icon-monaco-editor-material-gatsby" + ], + [ + "gatsby-node.js", + "#icon-monaco-editor-material-gatsby" + ], + [ + "gatsby-node.mjs", + "#icon-monaco-editor-material-gatsby" + ], + [ + "gatsby-node.ts", + "#icon-monaco-editor-material-gatsby" + ], + [ + "gatsby-browser.js", + "#icon-monaco-editor-material-gatsby" + ], + [ + "gatsby-browser.tsx", + "#icon-monaco-editor-material-gatsby" + ], + [ + "gatsby-ssr.js", + "#icon-monaco-editor-material-gatsby" + ], + [ + "gatsby-ssr.tsx", + "#icon-monaco-editor-material-gatsby" + ], + [ + ".wakatime-project", + "#icon-monaco-editor-material-wakatime" + ], + [ + "circle.yml", + "#icon-monaco-editor-material-circleci" + ], + [ + ".cfignore", + "#icon-monaco-editor-material-cloudfoundry" + ], + [ + "gruntfile.js", + "#icon-monaco-editor-material-grunt" + ], + [ + "gruntfile.ts", + "#icon-monaco-editor-material-grunt" + ], + [ + "gruntfile.coffee", + "#icon-monaco-editor-material-grunt" + ], + [ + "gruntfile.babel.js", + "#icon-monaco-editor-material-grunt" + ], + [ + "gruntfile.babel.ts", + "#icon-monaco-editor-material-grunt" + ], + [ + "gruntfile.babel.coffee", + "#icon-monaco-editor-material-grunt" + ], + [ + "jest.config.js", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.config.cjs", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.config.mjs", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.config.ts", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.config.cts", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.config.mts", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.config.json", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.e2e.config.js", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.e2e.config.cjs", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.e2e.config.mjs", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.e2e.config.ts", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.e2e.config.cts", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.e2e.config.mts", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.e2e.config.json", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.e2e.json", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-unit.config.js", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-e2e.config.js", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-e2e.config.cjs", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-e2e.config.mjs", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-e2e.config.ts", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-e2e.config.cts", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-e2e.config.mts", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-e2e.config.json", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-e2e.json", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-github-actions-reporter.js", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.setup.js", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.setup.ts", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.json", + "#icon-monaco-editor-material-jest" + ], + [ + ".jestrc", + "#icon-monaco-editor-material-jest" + ], + [ + ".jestrc.js", + "#icon-monaco-editor-material-jest" + ], + [ + ".jestrc.json", + "#icon-monaco-editor-material-jest" + ], + [ + "jest.teardown.js", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-preset.json", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-preset.js", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-preset.cjs", + "#icon-monaco-editor-material-jest" + ], + [ + "jest-preset.mjs", + "#icon-monaco-editor-material-jest" + ], + [ + "fastfile", + "#icon-monaco-editor-material-fastlane" + ], + [ + "appfile", + "#icon-monaco-editor-material-fastlane" + ], + [ + ".helmignore", + "#icon-monaco-editor-material-helm" + ], + [ + "wallaby.js", + "#icon-monaco-editor-material-wallaby" + ], + [ + "wallaby.conf.js", + "#icon-monaco-editor-material-wallaby" + ], + [ + "stencil.config.js", + "#icon-monaco-editor-material-stencil" + ], + [ + "stencil.config.ts", + "#icon-monaco-editor-material-stencil" + ], + [ + "makefile", + "#icon-monaco-editor-material-makefile" + ], + [ + "gnumakefile", + "#icon-monaco-editor-material-makefile" + ], + [ + "kbuild", + "#icon-monaco-editor-material-makefile" + ], + [ + ".releaserc", + "#icon-monaco-editor-material-semantic-release" + ], + [ + ".releaserc.yaml", + "#icon-monaco-editor-material-semantic-release" + ], + [ + ".releaserc.yml", + "#icon-monaco-editor-material-semantic-release" + ], + [ + ".releaserc.json", + "#icon-monaco-editor-material-semantic-release" + ], + [ + ".releaserc.js", + "#icon-monaco-editor-material-semantic-release" + ], + [ + ".releaserc.cjs", + "#icon-monaco-editor-material-semantic-release" + ], + [ + "release.config.js", + "#icon-monaco-editor-material-semantic-release" + ], + [ + "release.config.cjs", + "#icon-monaco-editor-material-semantic-release" + ], + [ + "bitbucket-pipelines.yaml", + "#icon-monaco-editor-material-bitbucket" + ], + [ + "bitbucket-pipelines.yml", + "#icon-monaco-editor-material-bitbucket" + ], + [ + ".bazelignore", + "#icon-monaco-editor-material-bazel" + ], + [ + ".bazelrc", + "#icon-monaco-editor-material-bazel" + ], + [ + ".bazelversion", + "#icon-monaco-editor-material-bazel" + ], + [ + ".gdignore", + "#icon-monaco-editor-material-godot-assets" + ], + [ + "._sc_", + "#icon-monaco-editor-material-godot-assets" + ], + [ + "_sc_", + "#icon-monaco-editor-material-godot-assets" + ], + [ + "azure-pipelines.yml", + "#icon-monaco-editor-material-azure-pipelines" + ], + [ + "azure-pipelines.yaml", + "#icon-monaco-editor-material-azure-pipelines" + ], + [ + "vagrantfile", + "#icon-monaco-editor-material-vagrant" + ], + [ + "prisma.yml", + "#icon-monaco-editor-material-prisma" + ], + [ + ".nycrc", + "#icon-monaco-editor-material-istanbul" + ], + [ + ".nycrc.json", + "#icon-monaco-editor-material-istanbul" + ], + [ + "tailwind.js", + "#icon-monaco-editor-material-tailwindcss" + ], + [ + "tailwind.ts", + "#icon-monaco-editor-material-tailwindcss" + ], + [ + "tailwind.config.js", + "#icon-monaco-editor-material-tailwindcss" + ], + [ + "tailwind.config.cjs", + "#icon-monaco-editor-material-tailwindcss" + ], + [ + "tailwind.config.ts", + "#icon-monaco-editor-material-tailwindcss" + ], + [ + "tailwind.config.cts", + "#icon-monaco-editor-material-tailwindcss" + ], + [ + "buildkite.yml", + "#icon-monaco-editor-material-buildkite" + ], + [ + "buildkite.yaml", + "#icon-monaco-editor-material-buildkite" + ], + [ + "netlify.json", + "#icon-monaco-editor-material-netlify" + ], + [ + "netlify.yml", + "#icon-monaco-editor-material-netlify" + ], + [ + "netlify.yaml", + "#icon-monaco-editor-material-netlify" + ], + [ + "netlify.toml", + "#icon-monaco-editor-material-netlify" + ], + [ + "svelte.config.js", + "#icon-monaco-editor-material-svelte" + ], + [ + "svelte.config.cjs", + "#icon-monaco-editor-material-svelte" + ], + [ + "nest-cli.json", + "#icon-monaco-editor-material-nest" + ], + [ + ".nest-cli.json", + "#icon-monaco-editor-material-nest" + ], + [ + "nestconfig.json", + "#icon-monaco-editor-material-nest" + ], + [ + ".nestconfig.json", + "#icon-monaco-editor-material-nest" + ], + [ + ".percy.yml", + "#icon-monaco-editor-material-percy" + ], + [ + ".gitpod.yml", + "#icon-monaco-editor-material-gitpod" + ], + [ + "codeowners", + "#icon-monaco-editor-material-codeowners" + ], + [ + ".gcloudignore", + "#icon-monaco-editor-material-gcp" + ], + [ + ".huskyrc", + "#icon-monaco-editor-material-husky" + ], + [ + "husky.config.js", + "#icon-monaco-editor-material-husky" + ], + [ + ".huskyrc.json", + "#icon-monaco-editor-material-husky" + ], + [ + ".huskyrc.js", + "#icon-monaco-editor-material-husky" + ], + [ + ".huskyrc.yaml", + "#icon-monaco-editor-material-husky" + ], + [ + ".huskyrc.yml", + "#icon-monaco-editor-material-husky" + ], + [ + "tiltfile", + "#icon-monaco-editor-material-tilt" + ], + [ + "capacitor.config.json", + "#icon-monaco-editor-material-capacitor" + ], + [ + "capacitor.config.ts", + "#icon-monaco-editor-material-capacitor" + ], + [ + ".adonisrc.json", + "#icon-monaco-editor-material-adonis" + ], + [ + "ace", + "#icon-monaco-editor-material-adonis" + ], + [ + "meson.build", + "#icon-monaco-editor-material-meson" + ], + [ + "meson_options.txt", + "#icon-monaco-editor-material-meson" + ], + [ + ".commitlintrc", + "#icon-monaco-editor-material-commitlint" + ], + [ + ".commitlintrc.js", + "#icon-monaco-editor-material-commitlint" + ], + [ + ".commitlintrc.cjs", + "#icon-monaco-editor-material-commitlint" + ], + [ + ".commitlintrc.ts", + "#icon-monaco-editor-material-commitlint" + ], + [ + ".commitlintrc.cts", + "#icon-monaco-editor-material-commitlint" + ], + [ + ".commitlintrc.json", + "#icon-monaco-editor-material-commitlint" + ], + [ + ".commitlintrc.yaml", + "#icon-monaco-editor-material-commitlint" + ], + [ + ".commitlintrc.yml", + "#icon-monaco-editor-material-commitlint" + ], + [ + ".commitlint.yaml", + "#icon-monaco-editor-material-commitlint" + ], + [ + ".commitlint.yml", + "#icon-monaco-editor-material-commitlint" + ], + [ + "commitlint.config.js", + "#icon-monaco-editor-material-commitlint" + ], + [ + "commitlint.config.cjs", + "#icon-monaco-editor-material-commitlint" + ], + [ + "commitlint.config.ts", + "#icon-monaco-editor-material-commitlint" + ], + [ + "commitlint.config.cts", + "#icon-monaco-editor-material-commitlint" + ], + [ + ".buckconfig", + "#icon-monaco-editor-material-buck" + ], + [ + "nx.json", + "#icon-monaco-editor-material-nrwl" + ], + [ + ".nxignore", + "#icon-monaco-editor-material-nrwl" + ], + [ + "dune", + "#icon-monaco-editor-material-dune" + ], + [ + "dune-project", + "#icon-monaco-editor-material-dune" + ], + [ + "dune-workspace", + "#icon-monaco-editor-material-dune" + ], + [ + "dune-workspace.dev", + "#icon-monaco-editor-material-dune" + ], + [ + "roadmap.md", + "#icon-monaco-editor-material-roadmap" + ], + [ + "roadmap.txt", + "#icon-monaco-editor-material-roadmap" + ], + [ + "timeline.md", + "#icon-monaco-editor-material-roadmap" + ], + [ + "timeline.txt", + "#icon-monaco-editor-material-roadmap" + ], + [ + "milestones.md", + "#icon-monaco-editor-material-roadmap" + ], + [ + "milestones.txt", + "#icon-monaco-editor-material-roadmap" + ], + [ + "nuget.config", + "#icon-monaco-editor-material-nuget" + ], + [ + ".nuspec", + "#icon-monaco-editor-material-nuget" + ], + [ + "nuget.exe", + "#icon-monaco-editor-material-nuget" + ], + [ + "stryker.conf.json", + "#icon-monaco-editor-material-stryker" + ], + [ + "stryker.conf.js", + "#icon-monaco-editor-material-stryker" + ], + [ + "stryker.conf.cjs", + "#icon-monaco-editor-material-stryker" + ], + [ + "stryker.conf.mjs", + "#icon-monaco-editor-material-stryker" + ], + [ + ".stryker.conf.json", + "#icon-monaco-editor-material-stryker" + ], + [ + ".stryker.conf.js", + "#icon-monaco-editor-material-stryker" + ], + [ + ".stryker.conf.cjs", + "#icon-monaco-editor-material-stryker" + ], + [ + ".stryker.conf.mjs", + "#icon-monaco-editor-material-stryker" + ], + [ + ".modernizrrc", + "#icon-monaco-editor-material-modernizr" + ], + [ + ".modernizrrc.js", + "#icon-monaco-editor-material-modernizr" + ], + [ + ".modernizrrc.json", + "#icon-monaco-editor-material-modernizr" + ], + [ + ".slugignore", + "#icon-monaco-editor-material-slug" + ], + [ + "stitches.config.js", + "#icon-monaco-editor-material-stitches" + ], + [ + "stitches.config.ts", + "#icon-monaco-editor-material-stitches" + ], + [ + "nginx.conf", + "#icon-monaco-editor-material-nginx" + ], + [ + ".mcattributes", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mcdefinitions", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".mcignore", + "#icon-monaco-editor-material-minecraft" + ], + [ + ".replit", + "#icon-monaco-editor-material-replit" + ], + [ + "snowpack.config.js", + "#icon-monaco-editor-material-snowpack" + ], + [ + "snowpack.config.cjs", + "#icon-monaco-editor-material-snowpack" + ], + [ + "snowpack.config.mjs", + "#icon-monaco-editor-material-snowpack" + ], + [ + "snowpack.config.ts", + "#icon-monaco-editor-material-snowpack" + ], + [ + "snowpack.config.cts", + "#icon-monaco-editor-material-snowpack" + ], + [ + "snowpack.config.mts", + "#icon-monaco-editor-material-snowpack" + ], + [ + "snowpack.deps.json", + "#icon-monaco-editor-material-snowpack" + ], + [ + "snowpack.config.json", + "#icon-monaco-editor-material-snowpack" + ], + [ + "quasar.conf.js", + "#icon-monaco-editor-material-quasar" + ], + [ + "quasar.config.js", + "#icon-monaco-editor-material-quasar" + ], + [ + "dependabot.yml", + "#icon-monaco-editor-material-dependabot" + ], + [ + "dependabot.yaml", + "#icon-monaco-editor-material-dependabot" + ], + [ + "vite.config.js", + "#icon-monaco-editor-material-vite" + ], + [ + "vite.config.mjs", + "#icon-monaco-editor-material-vite" + ], + [ + "vite.config.cjs", + "#icon-monaco-editor-material-vite" + ], + [ + "vite.config.ts", + "#icon-monaco-editor-material-vite" + ], + [ + "vite.config.cts", + "#icon-monaco-editor-material-vite" + ], + [ + "vite.config.mts", + "#icon-monaco-editor-material-vite" + ], + [ + "vitest.config.ts", + "#icon-monaco-editor-material-vitest" + ], + [ + "vitest.config.mts", + "#icon-monaco-editor-material-vitest" + ], + [ + "vitest.config.cts", + "#icon-monaco-editor-material-vitest" + ], + [ + "vitest.config.js", + "#icon-monaco-editor-material-vitest" + ], + [ + "vitest.config.mjs", + "#icon-monaco-editor-material-vitest" + ], + [ + "vitest.config.cjs", + "#icon-monaco-editor-material-vitest" + ], + [ + "lerna.json", + "#icon-monaco-editor-material-lerna" + ], + [ + "windi.config.js", + "#icon-monaco-editor-material-windicss" + ], + [ + "windi.config.cjs", + "#icon-monaco-editor-material-windicss" + ], + [ + "windi.config.ts", + "#icon-monaco-editor-material-windicss" + ], + [ + "windi.config.cts", + "#icon-monaco-editor-material-windicss" + ], + [ + "windi.config.json", + "#icon-monaco-editor-material-windicss" + ], + [ + ".textlintrc", + "#icon-monaco-editor-material-textlint" + ], + [ + "vpkg.json", + "#icon-monaco-editor-material-vlang" + ], + [ + "v.mod", + "#icon-monaco-editor-material-vlang" + ], + [ + ".sentryclirc", + "#icon-monaco-editor-material-sentry" + ], + [ + ".phpunit.result.cache", + "#icon-monaco-editor-material-phpunit" + ], + [ + ".phpunit-watcher.yml", + "#icon-monaco-editor-material-phpunit" + ], + [ + "phpunit.xml", + "#icon-monaco-editor-material-phpunit" + ], + [ + "phpunit.xml.dist", + "#icon-monaco-editor-material-phpunit" + ], + [ + "phpunit-watcher.yml", + "#icon-monaco-editor-material-phpunit" + ], + [ + "phpunit-watcher.yml.dist", + "#icon-monaco-editor-material-phpunit" + ], + [ + ".php_cs", + "#icon-monaco-editor-material-php-cs-fixer" + ], + [ + ".php_cs.dist", + "#icon-monaco-editor-material-php-cs-fixer" + ], + [ + ".php_cs.php", + "#icon-monaco-editor-material-php-cs-fixer" + ], + [ + ".php_cs.dist.php", + "#icon-monaco-editor-material-php-cs-fixer" + ], + [ + ".php-cs-fixer.php", + "#icon-monaco-editor-material-php-cs-fixer" + ], + [ + ".php-cs-fixer.dist.php", + "#icon-monaco-editor-material-php-cs-fixer" + ], + [ + "robots.txt", + "#icon-monaco-editor-material-robots" + ], + [ + "tsconfig.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.app.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.editor.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.spec.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.base.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.build.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.eslint.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.lib.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.lib.prod.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.node.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.test.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.e2e.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.web.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.webworker.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.worker.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.config.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.vitest.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.cjs.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.esm.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.mjs.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.doc.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.paths.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.main.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tsconfig.renderer.json", + "#icon-monaco-editor-material-tsconfig" + ], + [ + "tauri.conf.json", + "#icon-monaco-editor-material-tauri" + ], + [ + "tauri.config.json", + "#icon-monaco-editor-material-tauri" + ], + [ + "tauri.linux.conf.json", + "#icon-monaco-editor-material-tauri" + ], + [ + "tauri.windows.conf.json", + "#icon-monaco-editor-material-tauri" + ], + [ + "tauri.macos.conf.json", + "#icon-monaco-editor-material-tauri" + ], + [ + "jsconfig.json", + "#icon-monaco-editor-material-jsconfig" + ], + [ + "maven.config", + "#icon-monaco-editor-material-maven" + ], + [ + "jvm.config", + "#icon-monaco-editor-material-maven" + ], + [ + "pom.xml", + "#icon-monaco-editor-material-maven" + ], + [ + "serverless.yml", + "#icon-monaco-editor-material-serverless" + ], + [ + "serverless.yaml", + "#icon-monaco-editor-material-serverless" + ], + [ + "serverless.json", + "#icon-monaco-editor-material-serverless" + ], + [ + "serverless.js", + "#icon-monaco-editor-material-serverless" + ], + [ + "serverless.ts", + "#icon-monaco-editor-material-serverless" + ], + [ + "supabase.js", + "#icon-monaco-editor-material-supabase" + ], + [ + "supabase.py", + "#icon-monaco-editor-material-supabase" + ], + [ + ".ember-cli", + "#icon-monaco-editor-material-ember" + ], + [ + ".ember-cli.js", + "#icon-monaco-editor-material-ember" + ], + [ + "ember-cli-builds.js", + "#icon-monaco-editor-material-ember" + ], + [ + "horusec-config.json", + "#icon-monaco-editor-material-horusec" + ], + [ + "poetry.lock", + "#icon-monaco-editor-material-poetry" + ], + [ + ".parcelrc", + "#icon-monaco-editor-material-parcel" + ], + [ + ".astylerc", + "#icon-monaco-editor-material-astyle" + ], + [ + ".lighthouserc.js", + "#icon-monaco-editor-material-lighthouse" + ], + [ + "lighthouserc.js", + "#icon-monaco-editor-material-lighthouse" + ], + [ + ".lighthouserc.json", + "#icon-monaco-editor-material-lighthouse" + ], + [ + "lighthouserc.json", + "#icon-monaco-editor-material-lighthouse" + ], + [ + ".lighthouserc.yml", + "#icon-monaco-editor-material-lighthouse" + ], + [ + "lighthouserc.yml", + "#icon-monaco-editor-material-lighthouse" + ], + [ + ".lighthouserc.yaml", + "#icon-monaco-editor-material-lighthouse" + ], + [ + "lighthouserc.yaml", + "#icon-monaco-editor-material-lighthouse" + ], + [ + ".svgrrc", + "#icon-monaco-editor-material-svgr" + ], + [ + "svgr.config.js", + "#icon-monaco-editor-material-svgr" + ], + [ + ".svgrrc.js", + "#icon-monaco-editor-material-svgr" + ], + [ + ".svgrrc.yaml", + "#icon-monaco-editor-material-svgr" + ], + [ + ".svgrrc.yml", + "#icon-monaco-editor-material-svgr" + ], + [ + ".svgrrc.json", + "#icon-monaco-editor-material-svgr" + ], + [ + "rome.json", + "#icon-monaco-editor-material-rome" + ], + [ + "cypress.json", + "#icon-monaco-editor-material-cypress" + ], + [ + "cypress.env.json", + "#icon-monaco-editor-material-cypress" + ], + [ + "cypress.config.ts", + "#icon-monaco-editor-material-cypress" + ], + [ + "cypress.config.js", + "#icon-monaco-editor-material-cypress" + ], + [ + "cypress.config.cjs", + "#icon-monaco-editor-material-cypress" + ], + [ + "cypress.config.mjs", + "#icon-monaco-editor-material-cypress" + ], + [ + "plopfile.js", + "#icon-monaco-editor-material-plop" + ], + [ + "plopfile.cjs", + "#icon-monaco-editor-material-plop" + ], + [ + "plopfile.mjs", + "#icon-monaco-editor-material-plop" + ], + [ + "plopfile.ts", + "#icon-monaco-editor-material-plop" + ], + [ + ".tobimake", + "#icon-monaco-editor-material-tobimake" + ], + [ + "gleam.toml", + "#icon-monaco-editor-material-gleam" + ], + [ + "pnpm-lock.yaml", + "#icon-monaco-editor-material-pnpm" + ], + [ + "pnpm-workspace.yaml", + "#icon-monaco-editor-material-pnpm" + ], + [ + ".pnpmfile.cjs", + "#icon-monaco-editor-material-pnpm" + ], + [ + "gridsome.config.js", + "#icon-monaco-editor-material-gridsome" + ], + [ + "gridsome.server.js", + "#icon-monaco-editor-material-gridsome" + ], + [ + ".steadybit.yml", + "#icon-monaco-editor-material-steadybit" + ], + [ + "steadybit.yml", + "#icon-monaco-editor-material-steadybit" + ], + [ + ".steadybit.yaml", + "#icon-monaco-editor-material-steadybit" + ], + [ + "steadybit.yaml", + "#icon-monaco-editor-material-steadybit" + ], + [ + "Caddyfile", + "#icon-monaco-editor-material-caddy" + ], + [ + "bun.lockb", + "#icon-monaco-editor-material-bun" + ], + [ + ".nano-staged.js", + "#icon-monaco-editor-material-nano-staged" + ], + [ + "nano-staged.js", + "#icon-monaco-editor-material-nano-staged" + ], + [ + ".nano-staged.cjs", + "#icon-monaco-editor-material-nano-staged" + ], + [ + "nano-staged.cjs", + "#icon-monaco-editor-material-nano-staged" + ], + [ + ".nano-staged.mjs", + "#icon-monaco-editor-material-nano-staged" + ], + [ + "nano-staged.mjs", + "#icon-monaco-editor-material-nano-staged" + ], + [ + ".nano-staged.json", + "#icon-monaco-editor-material-nano-staged" + ], + [ + "nano-staged.json", + "#icon-monaco-editor-material-nano-staged" + ], + [ + ".nanostagedrc", + "#icon-monaco-editor-material-nano-staged" + ], + [ + "craco.config.ts", + "#icon-monaco-editor-material-craco" + ], + [ + "craco.config.js", + "#icon-monaco-editor-material-craco" + ], + [ + "craco.config.cjs", + "#icon-monaco-editor-material-craco" + ], + [ + ".cracorc.ts", + "#icon-monaco-editor-material-craco" + ], + [ + ".cracorc.js", + "#icon-monaco-editor-material-craco" + ], + [ + ".cracorc", + "#icon-monaco-editor-material-craco" + ], + [ + ".hg", + "#icon-monaco-editor-material-mercurial" + ], + [ + ".hgignore", + "#icon-monaco-editor-material-mercurial" + ], + [ + ".hgflow", + "#icon-monaco-editor-material-mercurial" + ], + [ + ".hgrc", + "#icon-monaco-editor-material-mercurial" + ], + [ + "hgrc", + "#icon-monaco-editor-material-mercurial" + ], + [ + "mercurial.ini", + "#icon-monaco-editor-material-mercurial" + ], + [ + "deno.json", + "#icon-monaco-editor-material-deno" + ], + [ + "deno.jsonc", + "#icon-monaco-editor-material-deno" + ], + [ + "deno.lock", + "#icon-monaco-editor-material-deno" + ], + [ + "plastic.branchexplorer", + "#icon-monaco-editor-material-plastic" + ], + [ + "plastic.selector", + "#icon-monaco-editor-material-plastic" + ], + [ + "plastic.wktree", + "#icon-monaco-editor-material-plastic" + ], + [ + "plastic.workspace", + "#icon-monaco-editor-material-plastic" + ], + [ + "plastic.workspaces", + "#icon-monaco-editor-material-plastic" + ], + [ + "uno.config.js", + "#icon-monaco-editor-material-unocss" + ], + [ + "uno.config.mjs", + "#icon-monaco-editor-material-unocss" + ], + [ + "uno.config.ts", + "#icon-monaco-editor-material-unocss" + ], + [ + "uno.config.mts", + "#icon-monaco-editor-material-unocss" + ], + [ + "unocss.config.js", + "#icon-monaco-editor-material-unocss" + ], + [ + "unocss.config.mjs", + "#icon-monaco-editor-material-unocss" + ], + [ + "unocss.config.ts", + "#icon-monaco-editor-material-unocss" + ], + [ + "unocss.config.mts", + "#icon-monaco-editor-material-unocss" + ], + [ + ".mincloudrc", + "#icon-monaco-editor-material-ifanr-cloud" + ], + [ + "werf.yaml", + "#icon-monaco-editor-material-werf" + ], + [ + "werf.yml", + "#icon-monaco-editor-material-werf" + ], + [ + "werf-giterminism.yaml", + "#icon-monaco-editor-material-werf" + ], + [ + "werf-giterminism.yml", + "#icon-monaco-editor-material-werf" + ] +] \ No newline at end of file diff --git a/workspace/plugins/monaco-editor/src/assets/entries/folder-expanded-icon.json b/workspace/plugins/monaco-editor/src/assets/entries/folder-expanded-icon.json new file mode 100644 index 0000000..19bc7b3 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/assets/entries/folder-expanded-icon.json @@ -0,0 +1,2486 @@ +[ + [ + "src", + "#icon-monaco-editor-material-folder-src-open" + ], + [ + "srcs", + "#icon-monaco-editor-material-folder-src-open" + ], + [ + "source", + "#icon-monaco-editor-material-folder-src-open" + ], + [ + "sources", + "#icon-monaco-editor-material-folder-src-open" + ], + [ + "code", + "#icon-monaco-editor-material-folder-src-open" + ], + [ + "dist", + "#icon-monaco-editor-material-folder-dist-open" + ], + [ + "out", + "#icon-monaco-editor-material-folder-dist-open" + ], + [ + "build", + "#icon-monaco-editor-material-folder-dist-open" + ], + [ + "release", + "#icon-monaco-editor-material-folder-dist-open" + ], + [ + "bin", + "#icon-monaco-editor-material-folder-dist-open" + ], + [ + "css", + "#icon-monaco-editor-material-folder-css-open" + ], + [ + "stylesheet", + "#icon-monaco-editor-material-folder-css-open" + ], + [ + "stylesheets", + "#icon-monaco-editor-material-folder-css-open" + ], + [ + "style", + "#icon-monaco-editor-material-folder-css-open" + ], + [ + "styles", + "#icon-monaco-editor-material-folder-css-open" + ], + [ + "sass", + "#icon-monaco-editor-material-folder-sass-open" + ], + [ + "_sass", + "#icon-monaco-editor-material-folder-sass-open" + ], + [ + "scss", + "#icon-monaco-editor-material-folder-sass-open" + ], + [ + "_scss", + "#icon-monaco-editor-material-folder-sass-open" + ], + [ + "_images", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "_image", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "_imgs", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "_img", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "images", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "image", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "imgs", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "img", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "icons", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "icon", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "icos", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "ico", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "figures", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "figure", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "figs", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "fig", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "screenshot", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "screenshots", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "screengrab", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "screengrabs", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "pic", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "pics", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "picture", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "pictures", + "#icon-monaco-editor-material-folder-images-open" + ], + [ + "script", + "#icon-monaco-editor-material-folder-scripts-open" + ], + [ + "scripts", + "#icon-monaco-editor-material-folder-scripts-open" + ], + [ + "node_modules", + "#icon-monaco-editor-material-folder-node-open" + ], + [ + "js", + "#icon-monaco-editor-material-folder-javascript-open" + ], + [ + "javascript", + "#icon-monaco-editor-material-folder-javascript-open" + ], + [ + "javascripts", + "#icon-monaco-editor-material-folder-javascript-open" + ], + [ + "json", + "#icon-monaco-editor-material-folder-json-open" + ], + [ + "jsons", + "#icon-monaco-editor-material-folder-json-open" + ], + [ + "font", + "#icon-monaco-editor-material-folder-font-open" + ], + [ + "fonts", + "#icon-monaco-editor-material-folder-font-open" + ], + [ + "bower_components", + "#icon-monaco-editor-material-folder-bower-open" + ], + [ + "test", + "#icon-monaco-editor-material-folder-test-open" + ], + [ + "tests", + "#icon-monaco-editor-material-folder-test-open" + ], + [ + "testing", + "#icon-monaco-editor-material-folder-test-open" + ], + [ + "__tests__", + "#icon-monaco-editor-material-folder-test-open" + ], + [ + "__snapshots__", + "#icon-monaco-editor-material-folder-test-open" + ], + [ + "__mocks__", + "#icon-monaco-editor-material-folder-test-open" + ], + [ + "__fixtures__", + "#icon-monaco-editor-material-folder-test-open" + ], + [ + "__test__", + "#icon-monaco-editor-material-folder-test-open" + ], + [ + "spec", + "#icon-monaco-editor-material-folder-test-open" + ], + [ + "specs", + "#icon-monaco-editor-material-folder-test-open" + ], + [ + "jinja", + "#icon-monaco-editor-material-folder-jinja-open" + ], + [ + "jinja2", + "#icon-monaco-editor-material-folder-jinja-open" + ], + [ + "j2", + "#icon-monaco-editor-material-folder-jinja-open" + ], + [ + "markdown", + "#icon-monaco-editor-material-folder-markdown-open" + ], + [ + "md", + "#icon-monaco-editor-material-folder-markdown-open" + ], + [ + "php", + "#icon-monaco-editor-material-folder-php-open" + ], + [ + "phpmailer", + "#icon-monaco-editor-material-folder-phpmailer-open" + ], + [ + "sublime", + "#icon-monaco-editor-material-folder-sublime-open" + ], + [ + "_post", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + "_posts", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + "doc", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + "docs", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + "document", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + "documents", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + "documentation", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + "post", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + "posts", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + "article", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + "articles", + "#icon-monaco-editor-material-folder-docs-open" + ], + [ + ".git", + "#icon-monaco-editor-material-folder-git-open" + ], + [ + "patches", + "#icon-monaco-editor-material-folder-git-open" + ], + [ + "githooks", + "#icon-monaco-editor-material-folder-git-open" + ], + [ + ".githooks", + "#icon-monaco-editor-material-folder-git-open" + ], + [ + "submodules", + "#icon-monaco-editor-material-folder-git-open" + ], + [ + ".submodules", + "#icon-monaco-editor-material-folder-git-open" + ], + [ + ".github", + "#icon-monaco-editor-material-folder-github-open" + ], + [ + "github", + "#icon-monaco-editor-material-folder-github-open" + ], + [ + ".gitlab", + "#icon-monaco-editor-material-folder-gitlab-open" + ], + [ + ".vscode", + "#icon-monaco-editor-material-folder-vscode-open" + ], + [ + ".vscode-test", + "#icon-monaco-editor-material-folder-vscode-open" + ], + [ + "view", + "#icon-monaco-editor-material-folder-views-open" + ], + [ + "views", + "#icon-monaco-editor-material-folder-views-open" + ], + [ + "screen", + "#icon-monaco-editor-material-folder-views-open" + ], + [ + "screens", + "#icon-monaco-editor-material-folder-views-open" + ], + [ + "page", + "#icon-monaco-editor-material-folder-views-open" + ], + [ + "pages", + "#icon-monaco-editor-material-folder-views-open" + ], + [ + "public_html", + "#icon-monaco-editor-material-folder-views-open" + ], + [ + "html", + "#icon-monaco-editor-material-folder-views-open" + ], + [ + "vue", + "#icon-monaco-editor-material-folder-vue-open" + ], + [ + ".vuepress", + "#icon-monaco-editor-material-folder-vuepress-open" + ], + [ + ".expo", + "#icon-monaco-editor-material-folder-expo-open" + ], + [ + ".expo-shared", + "#icon-monaco-editor-material-folder-expo-open" + ], + [ + "cfg", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "cfgs", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "conf", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "confs", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "config", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "configs", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "configuration", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "configurations", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "setting", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + ".setting", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "settings", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + ".settings", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "META-INF", + "#icon-monaco-editor-material-folder-config-open" + ], + [ + "i18n", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "internationalization", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "lang", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "langs", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "language", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "languages", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "locale", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "locales", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "l10n", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "localization", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "translation", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "translate", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "translations", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + ".tx", + "#icon-monaco-editor-material-folder-i18n-open" + ], + [ + "components", + "#icon-monaco-editor-material-folder-components-open" + ], + [ + "widget", + "#icon-monaco-editor-material-folder-components-open" + ], + [ + "widgets", + "#icon-monaco-editor-material-folder-components-open" + ], + [ + "fragments", + "#icon-monaco-editor-material-folder-components-open" + ], + [ + ".verdaccio", + "#icon-monaco-editor-material-folder-verdaccio-open" + ], + [ + "verdaccio", + "#icon-monaco-editor-material-folder-verdaccio-open" + ], + [ + "aurelia_project", + "#icon-monaco-editor-material-folder-aurelia-open" + ], + [ + "resource", + "#icon-monaco-editor-material-folder-resource-open" + ], + [ + "resources", + "#icon-monaco-editor-material-folder-resource-open" + ], + [ + "res", + "#icon-monaco-editor-material-folder-resource-open" + ], + [ + "asset", + "#icon-monaco-editor-material-folder-resource-open" + ], + [ + "assets", + "#icon-monaco-editor-material-folder-resource-open" + ], + [ + "static", + "#icon-monaco-editor-material-folder-resource-open" + ], + [ + "report", + "#icon-monaco-editor-material-folder-resource-open" + ], + [ + "reports", + "#icon-monaco-editor-material-folder-resource-open" + ], + [ + "lib", + "#icon-monaco-editor-material-folder-lib-open" + ], + [ + "libs", + "#icon-monaco-editor-material-folder-lib-open" + ], + [ + "library", + "#icon-monaco-editor-material-folder-lib-open" + ], + [ + "libraries", + "#icon-monaco-editor-material-folder-lib-open" + ], + [ + "vendor", + "#icon-monaco-editor-material-folder-lib-open" + ], + [ + "vendors", + "#icon-monaco-editor-material-folder-lib-open" + ], + [ + "third-party", + "#icon-monaco-editor-material-folder-lib-open" + ], + [ + "themes", + "#icon-monaco-editor-material-folder-theme-open" + ], + [ + "theme", + "#icon-monaco-editor-material-folder-theme-open" + ], + [ + "color", + "#icon-monaco-editor-material-folder-theme-open" + ], + [ + "colors", + "#icon-monaco-editor-material-folder-theme-open" + ], + [ + "design", + "#icon-monaco-editor-material-folder-theme-open" + ], + [ + "designs", + "#icon-monaco-editor-material-folder-theme-open" + ], + [ + "webpack", + "#icon-monaco-editor-material-folder-webpack-open" + ], + [ + ".webpack", + "#icon-monaco-editor-material-folder-webpack-open" + ], + [ + "global", + "#icon-monaco-editor-material-folder-global-open" + ], + [ + "_site", + "#icon-monaco-editor-material-folder-public-open" + ], + [ + "public", + "#icon-monaco-editor-material-folder-public-open" + ], + [ + "www", + "#icon-monaco-editor-material-folder-public-open" + ], + [ + "wwwroot", + "#icon-monaco-editor-material-folder-public-open" + ], + [ + "web", + "#icon-monaco-editor-material-folder-public-open" + ], + [ + "website", + "#icon-monaco-editor-material-folder-public-open" + ], + [ + "site", + "#icon-monaco-editor-material-folder-public-open" + ], + [ + "browser", + "#icon-monaco-editor-material-folder-public-open" + ], + [ + "browsers", + "#icon-monaco-editor-material-folder-public-open" + ], + [ + "include", + "#icon-monaco-editor-material-folder-include-open" + ], + [ + "includes", + "#icon-monaco-editor-material-folder-include-open" + ], + [ + "_includes", + "#icon-monaco-editor-material-folder-include-open" + ], + [ + "inc", + "#icon-monaco-editor-material-folder-include-open" + ], + [ + "partials", + "#icon-monaco-editor-material-folder-include-open" + ], + [ + "_partials", + "#icon-monaco-editor-material-folder-include-open" + ], + [ + "docker", + "#icon-monaco-editor-material-folder-docker-open" + ], + [ + "dockerfiles", + "#icon-monaco-editor-material-folder-docker-open" + ], + [ + ".docker", + "#icon-monaco-editor-material-folder-docker-open" + ], + [ + "db", + "#icon-monaco-editor-material-folder-database-open" + ], + [ + "database", + "#icon-monaco-editor-material-folder-database-open" + ], + [ + "databases", + "#icon-monaco-editor-material-folder-database-open" + ], + [ + "sql", + "#icon-monaco-editor-material-folder-database-open" + ], + [ + "data", + "#icon-monaco-editor-material-folder-database-open" + ], + [ + "_data", + "#icon-monaco-editor-material-folder-database-open" + ], + [ + "log", + "#icon-monaco-editor-material-folder-log-open" + ], + [ + "logs", + "#icon-monaco-editor-material-folder-log-open" + ], + [ + "target", + "#icon-monaco-editor-material-folder-target-open" + ], + [ + "temp", + "#icon-monaco-editor-material-folder-temp-open" + ], + [ + ".temp", + "#icon-monaco-editor-material-folder-temp-open" + ], + [ + "tmp", + "#icon-monaco-editor-material-folder-temp-open" + ], + [ + ".tmp", + "#icon-monaco-editor-material-folder-temp-open" + ], + [ + "cached", + "#icon-monaco-editor-material-folder-temp-open" + ], + [ + "cache", + "#icon-monaco-editor-material-folder-temp-open" + ], + [ + ".cache", + "#icon-monaco-editor-material-folder-temp-open" + ], + [ + "aws", + "#icon-monaco-editor-material-folder-aws-open" + ], + [ + ".aws", + "#icon-monaco-editor-material-folder-aws-open" + ], + [ + "aud", + "#icon-monaco-editor-material-folder-audio-open" + ], + [ + "auds", + "#icon-monaco-editor-material-folder-audio-open" + ], + [ + "audio", + "#icon-monaco-editor-material-folder-audio-open" + ], + [ + "audios", + "#icon-monaco-editor-material-folder-audio-open" + ], + [ + "music", + "#icon-monaco-editor-material-folder-audio-open" + ], + [ + "sound", + "#icon-monaco-editor-material-folder-audio-open" + ], + [ + "sounds", + "#icon-monaco-editor-material-folder-audio-open" + ], + [ + "vid", + "#icon-monaco-editor-material-folder-video-open" + ], + [ + "vids", + "#icon-monaco-editor-material-folder-video-open" + ], + [ + "video", + "#icon-monaco-editor-material-folder-video-open" + ], + [ + "videos", + "#icon-monaco-editor-material-folder-video-open" + ], + [ + "movie", + "#icon-monaco-editor-material-folder-video-open" + ], + [ + "movies", + "#icon-monaco-editor-material-folder-video-open" + ], + [ + "kubernetes", + "#icon-monaco-editor-material-folder-kubernetes-open" + ], + [ + ".kubernetes", + "#icon-monaco-editor-material-folder-kubernetes-open" + ], + [ + "k8s", + "#icon-monaco-editor-material-folder-kubernetes-open" + ], + [ + ".k8s", + "#icon-monaco-editor-material-folder-kubernetes-open" + ], + [ + "import", + "#icon-monaco-editor-material-folder-import-open" + ], + [ + "imports", + "#icon-monaco-editor-material-folder-import-open" + ], + [ + "imported", + "#icon-monaco-editor-material-folder-import-open" + ], + [ + "export", + "#icon-monaco-editor-material-folder-export-open" + ], + [ + "exports", + "#icon-monaco-editor-material-folder-export-open" + ], + [ + "exported", + "#icon-monaco-editor-material-folder-export-open" + ], + [ + "wakatime", + "#icon-monaco-editor-material-folder-wakatime-open" + ], + [ + ".circleci", + "#icon-monaco-editor-material-folder-circleci-open" + ], + [ + ".wordpress-org", + "#icon-monaco-editor-material-folder-wordpress-open" + ], + [ + "wp-content", + "#icon-monaco-editor-material-folder-wordpress-open" + ], + [ + "gradle", + "#icon-monaco-editor-material-folder-gradle-open" + ], + [ + ".gradle", + "#icon-monaco-editor-material-folder-gradle-open" + ], + [ + "coverage", + "#icon-monaco-editor-material-folder-coverage-open" + ], + [ + ".nyc-output", + "#icon-monaco-editor-material-folder-coverage-open" + ], + [ + ".nyc_output", + "#icon-monaco-editor-material-folder-coverage-open" + ], + [ + "e2e", + "#icon-monaco-editor-material-folder-coverage-open" + ], + [ + "it", + "#icon-monaco-editor-material-folder-coverage-open" + ], + [ + "integration-test", + "#icon-monaco-editor-material-folder-coverage-open" + ], + [ + "integration-tests", + "#icon-monaco-editor-material-folder-coverage-open" + ], + [ + "__integration-test__", + "#icon-monaco-editor-material-folder-coverage-open" + ], + [ + "__integration-tests__", + "#icon-monaco-editor-material-folder-coverage-open" + ], + [ + "class", + "#icon-monaco-editor-material-folder-class-open" + ], + [ + "classes", + "#icon-monaco-editor-material-folder-class-open" + ], + [ + "model", + "#icon-monaco-editor-material-folder-class-open" + ], + [ + "models", + "#icon-monaco-editor-material-folder-class-open" + ], + [ + "schemas", + "#icon-monaco-editor-material-folder-class-open" + ], + [ + "schema", + "#icon-monaco-editor-material-folder-class-open" + ], + [ + "other", + "#icon-monaco-editor-material-folder-other-open" + ], + [ + "others", + "#icon-monaco-editor-material-folder-other-open" + ], + [ + "misc", + "#icon-monaco-editor-material-folder-other-open" + ], + [ + "miscellaneous", + "#icon-monaco-editor-material-folder-other-open" + ], + [ + "extra", + "#icon-monaco-editor-material-folder-other-open" + ], + [ + "extras", + "#icon-monaco-editor-material-folder-other-open" + ], + [ + "etc", + "#icon-monaco-editor-material-folder-other-open" + ], + [ + "lua", + "#icon-monaco-editor-material-folder-lua-open" + ], + [ + "typescript", + "#icon-monaco-editor-material-folder-typescript-open" + ], + [ + "ts", + "#icon-monaco-editor-material-folder-typescript-open" + ], + [ + "typings", + "#icon-monaco-editor-material-folder-typescript-open" + ], + [ + "@types", + "#icon-monaco-editor-material-folder-typescript-open" + ], + [ + "types", + "#icon-monaco-editor-material-folder-typescript-open" + ], + [ + "graphql", + "#icon-monaco-editor-material-folder-graphql-open" + ], + [ + "gql", + "#icon-monaco-editor-material-folder-graphql-open" + ], + [ + "routes", + "#icon-monaco-editor-material-folder-routes-open" + ], + [ + "router", + "#icon-monaco-editor-material-folder-routes-open" + ], + [ + "routers", + "#icon-monaco-editor-material-folder-routes-open" + ], + [ + ".ci", + "#icon-monaco-editor-material-folder-ci-open" + ], + [ + "ci", + "#icon-monaco-editor-material-folder-ci-open" + ], + [ + "benchmark", + "#icon-monaco-editor-material-folder-benchmark-open" + ], + [ + "benchmarks", + "#icon-monaco-editor-material-folder-benchmark-open" + ], + [ + "performance", + "#icon-monaco-editor-material-folder-benchmark-open" + ], + [ + "measure", + "#icon-monaco-editor-material-folder-benchmark-open" + ], + [ + "measures", + "#icon-monaco-editor-material-folder-benchmark-open" + ], + [ + "measurement", + "#icon-monaco-editor-material-folder-benchmark-open" + ], + [ + "messages", + "#icon-monaco-editor-material-folder-messages-open" + ], + [ + "messaging", + "#icon-monaco-editor-material-folder-messages-open" + ], + [ + "forum", + "#icon-monaco-editor-material-folder-messages-open" + ], + [ + "chat", + "#icon-monaco-editor-material-folder-messages-open" + ], + [ + "chats", + "#icon-monaco-editor-material-folder-messages-open" + ], + [ + "conversation", + "#icon-monaco-editor-material-folder-messages-open" + ], + [ + "conversations", + "#icon-monaco-editor-material-folder-messages-open" + ], + [ + "less", + "#icon-monaco-editor-material-folder-less-open" + ], + [ + "gulp", + "#icon-monaco-editor-material-folder-gulp-open" + ], + [ + "gulp-tasks", + "#icon-monaco-editor-material-folder-gulp-open" + ], + [ + "gulpfile.js", + "#icon-monaco-editor-material-folder-gulp-open" + ], + [ + "gulpfile.mjs", + "#icon-monaco-editor-material-folder-gulp-open" + ], + [ + "gulpfile.ts", + "#icon-monaco-editor-material-folder-gulp-open" + ], + [ + "gulpfile.babel.js", + "#icon-monaco-editor-material-folder-gulp-open" + ], + [ + "python", + "#icon-monaco-editor-material-folder-python-open" + ], + [ + "__pycache__", + "#icon-monaco-editor-material-folder-python-open" + ], + [ + ".pytest_cache", + "#icon-monaco-editor-material-folder-python-open" + ], + [ + "mojo", + "#icon-monaco-editor-material-folder-mojo-open" + ], + [ + "debug", + "#icon-monaco-editor-material-folder-debug-open" + ], + [ + "debugging", + "#icon-monaco-editor-material-folder-debug-open" + ], + [ + "fastlane", + "#icon-monaco-editor-material-folder-fastlane-open" + ], + [ + "plugin", + "#icon-monaco-editor-material-folder-plugin-open" + ], + [ + "plugins", + "#icon-monaco-editor-material-folder-plugin-open" + ], + [ + "_plugins", + "#icon-monaco-editor-material-folder-plugin-open" + ], + [ + "extension", + "#icon-monaco-editor-material-folder-plugin-open" + ], + [ + "extensions", + "#icon-monaco-editor-material-folder-plugin-open" + ], + [ + "addon", + "#icon-monaco-editor-material-folder-plugin-open" + ], + [ + "addons", + "#icon-monaco-editor-material-folder-plugin-open" + ], + [ + "module", + "#icon-monaco-editor-material-folder-plugin-open" + ], + [ + "modules", + "#icon-monaco-editor-material-folder-plugin-open" + ], + [ + "middleware", + "#icon-monaco-editor-material-folder-middleware-open" + ], + [ + "middlewares", + "#icon-monaco-editor-material-folder-middleware-open" + ], + [ + "controller", + "#icon-monaco-editor-material-folder-controller-open" + ], + [ + "controllers", + "#icon-monaco-editor-material-folder-controller-open" + ], + [ + "service", + "#icon-monaco-editor-material-folder-controller-open" + ], + [ + "services", + "#icon-monaco-editor-material-folder-controller-open" + ], + [ + "provider", + "#icon-monaco-editor-material-folder-controller-open" + ], + [ + "providers", + "#icon-monaco-editor-material-folder-controller-open" + ], + [ + "handler", + "#icon-monaco-editor-material-folder-controller-open" + ], + [ + "handlers", + "#icon-monaco-editor-material-folder-controller-open" + ], + [ + "ansible", + "#icon-monaco-editor-material-folder-ansible-open" + ], + [ + "server", + "#icon-monaco-editor-material-folder-server-open" + ], + [ + "servers", + "#icon-monaco-editor-material-folder-server-open" + ], + [ + "backend", + "#icon-monaco-editor-material-folder-server-open" + ], + [ + "client", + "#icon-monaco-editor-material-folder-client-open" + ], + [ + "clients", + "#icon-monaco-editor-material-folder-client-open" + ], + [ + "frontend", + "#icon-monaco-editor-material-folder-client-open" + ], + [ + "pwa", + "#icon-monaco-editor-material-folder-client-open" + ], + [ + "tasks", + "#icon-monaco-editor-material-folder-tasks-open" + ], + [ + "tickets", + "#icon-monaco-editor-material-folder-tasks-open" + ], + [ + "android", + "#icon-monaco-editor-material-folder-android-open" + ], + [ + "ios", + "#icon-monaco-editor-material-folder-ios-open" + ], + [ + "uploads", + "#icon-monaco-editor-material-folder-upload-open" + ], + [ + "upload", + "#icon-monaco-editor-material-folder-upload-open" + ], + [ + "downloads", + "#icon-monaco-editor-material-folder-download-open" + ], + [ + "download", + "#icon-monaco-editor-material-folder-download-open" + ], + [ + "tools", + "#icon-monaco-editor-material-folder-tools-open" + ], + [ + "toolkit", + "#icon-monaco-editor-material-folder-tools-open" + ], + [ + "toolkits", + "#icon-monaco-editor-material-folder-tools-open" + ], + [ + "toolbox", + "#icon-monaco-editor-material-folder-tools-open" + ], + [ + "toolboxes", + "#icon-monaco-editor-material-folder-tools-open" + ], + [ + "helpers", + "#icon-monaco-editor-material-folder-helper-open" + ], + [ + "helper", + "#icon-monaco-editor-material-folder-helper-open" + ], + [ + ".serverless", + "#icon-monaco-editor-material-folder-serverless-open" + ], + [ + "serverless", + "#icon-monaco-editor-material-folder-serverless-open" + ], + [ + "api", + "#icon-monaco-editor-material-folder-api-open" + ], + [ + "apis", + "#icon-monaco-editor-material-folder-api-open" + ], + [ + "restapi", + "#icon-monaco-editor-material-folder-api-open" + ], + [ + "app", + "#icon-monaco-editor-material-folder-app-open" + ], + [ + "apps", + "#icon-monaco-editor-material-folder-app-open" + ], + [ + "apollo", + "#icon-monaco-editor-material-folder-apollo-open" + ], + [ + "apollo-client", + "#icon-monaco-editor-material-folder-apollo-open" + ], + [ + "apollo-cache", + "#icon-monaco-editor-material-folder-apollo-open" + ], + [ + "apollo-config", + "#icon-monaco-editor-material-folder-apollo-open" + ], + [ + "arc", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "arcs", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "archive", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "archives", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "archival", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "bkp", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "bkps", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "bak", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "baks", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "backup", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "backups", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "back-up", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "back-ups", + "#icon-monaco-editor-material-folder-archive-open" + ], + [ + "batch", + "#icon-monaco-editor-material-folder-batch-open" + ], + [ + "batchs", + "#icon-monaco-editor-material-folder-batch-open" + ], + [ + "batches", + "#icon-monaco-editor-material-folder-batch-open" + ], + [ + "buildkite", + "#icon-monaco-editor-material-folder-buildkite-open" + ], + [ + ".buildkite", + "#icon-monaco-editor-material-folder-buildkite-open" + ], + [ + "cluster", + "#icon-monaco-editor-material-folder-cluster-open" + ], + [ + "clusters", + "#icon-monaco-editor-material-folder-cluster-open" + ], + [ + "command", + "#icon-monaco-editor-material-folder-command-open" + ], + [ + "commands", + "#icon-monaco-editor-material-folder-command-open" + ], + [ + "cmd", + "#icon-monaco-editor-material-folder-command-open" + ], + [ + "cli", + "#icon-monaco-editor-material-folder-command-open" + ], + [ + "clis", + "#icon-monaco-editor-material-folder-command-open" + ], + [ + "constant", + "#icon-monaco-editor-material-folder-constant-open" + ], + [ + "constants", + "#icon-monaco-editor-material-folder-constant-open" + ], + [ + "container", + "#icon-monaco-editor-material-folder-container-open" + ], + [ + "containers", + "#icon-monaco-editor-material-folder-container-open" + ], + [ + ".devcontainer", + "#icon-monaco-editor-material-folder-container-open" + ], + [ + "content", + "#icon-monaco-editor-material-folder-content-open" + ], + [ + "contents", + "#icon-monaco-editor-material-folder-content-open" + ], + [ + "context", + "#icon-monaco-editor-material-folder-context-open" + ], + [ + "contexts", + "#icon-monaco-editor-material-folder-context-open" + ], + [ + "core", + "#icon-monaco-editor-material-folder-core-open" + ], + [ + "delta", + "#icon-monaco-editor-material-folder-delta-open" + ], + [ + "deltas", + "#icon-monaco-editor-material-folder-delta-open" + ], + [ + "changes", + "#icon-monaco-editor-material-folder-delta-open" + ], + [ + "dump", + "#icon-monaco-editor-material-folder-dump-open" + ], + [ + "dumps", + "#icon-monaco-editor-material-folder-dump-open" + ], + [ + "demo", + "#icon-monaco-editor-material-folder-examples-open" + ], + [ + "demos", + "#icon-monaco-editor-material-folder-examples-open" + ], + [ + "example", + "#icon-monaco-editor-material-folder-examples-open" + ], + [ + "examples", + "#icon-monaco-editor-material-folder-examples-open" + ], + [ + "sample", + "#icon-monaco-editor-material-folder-examples-open" + ], + [ + "samples", + "#icon-monaco-editor-material-folder-examples-open" + ], + [ + "sample-data", + "#icon-monaco-editor-material-folder-examples-open" + ], + [ + ".env", + "#icon-monaco-editor-material-folder-environment-open" + ], + [ + ".environment", + "#icon-monaco-editor-material-folder-environment-open" + ], + [ + "env", + "#icon-monaco-editor-material-folder-environment-open" + ], + [ + "envs", + "#icon-monaco-editor-material-folder-environment-open" + ], + [ + "environment", + "#icon-monaco-editor-material-folder-environment-open" + ], + [ + "environments", + "#icon-monaco-editor-material-folder-environment-open" + ], + [ + ".venv", + "#icon-monaco-editor-material-folder-environment-open" + ], + [ + "func", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "funcs", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "function", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "functions", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "lambda", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "lambdas", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "logic", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "math", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "maths", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "calc", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "calcs", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "calculation", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "calculations", + "#icon-monaco-editor-material-folder-functions-open" + ], + [ + "generator", + "#icon-monaco-editor-material-folder-generator-open" + ], + [ + "generators", + "#icon-monaco-editor-material-folder-generator-open" + ], + [ + "generated", + "#icon-monaco-editor-material-folder-generator-open" + ], + [ + "cfn-gen", + "#icon-monaco-editor-material-folder-generator-open" + ], + [ + "gen", + "#icon-monaco-editor-material-folder-generator-open" + ], + [ + "gens", + "#icon-monaco-editor-material-folder-generator-open" + ], + [ + "auto", + "#icon-monaco-editor-material-folder-generator-open" + ], + [ + "hook", + "#icon-monaco-editor-material-folder-hook-open" + ], + [ + "hooks", + "#icon-monaco-editor-material-folder-hook-open" + ], + [ + "trigger", + "#icon-monaco-editor-material-folder-hook-open" + ], + [ + "triggers", + "#icon-monaco-editor-material-folder-hook-open" + ], + [ + "job", + "#icon-monaco-editor-material-folder-job-open" + ], + [ + "jobs", + "#icon-monaco-editor-material-folder-job-open" + ], + [ + "keys", + "#icon-monaco-editor-material-folder-keys-open" + ], + [ + "key", + "#icon-monaco-editor-material-folder-keys-open" + ], + [ + "token", + "#icon-monaco-editor-material-folder-keys-open" + ], + [ + "tokens", + "#icon-monaco-editor-material-folder-keys-open" + ], + [ + "jwt", + "#icon-monaco-editor-material-folder-keys-open" + ], + [ + "layout", + "#icon-monaco-editor-material-folder-layout-open" + ], + [ + "layouts", + "#icon-monaco-editor-material-folder-layout-open" + ], + [ + "_layouts", + "#icon-monaco-editor-material-folder-layout-open" + ], + [ + "mail", + "#icon-monaco-editor-material-folder-mail-open" + ], + [ + "mails", + "#icon-monaco-editor-material-folder-mail-open" + ], + [ + "email", + "#icon-monaco-editor-material-folder-mail-open" + ], + [ + "emails", + "#icon-monaco-editor-material-folder-mail-open" + ], + [ + "smtp", + "#icon-monaco-editor-material-folder-mail-open" + ], + [ + "mailers", + "#icon-monaco-editor-material-folder-mail-open" + ], + [ + "mappings", + "#icon-monaco-editor-material-folder-mappings-open" + ], + [ + "mapping", + "#icon-monaco-editor-material-folder-mappings-open" + ], + [ + "meta", + "#icon-monaco-editor-material-folder-meta-open" + ], + [ + ".changesets", + "#icon-monaco-editor-material-folder-changesets-open" + ], + [ + ".changeset", + "#icon-monaco-editor-material-folder-changesets-open" + ], + [ + "package", + "#icon-monaco-editor-material-folder-packages-open" + ], + [ + "packages", + "#icon-monaco-editor-material-folder-packages-open" + ], + [ + "pkg", + "#icon-monaco-editor-material-folder-packages-open" + ], + [ + "pkgs", + "#icon-monaco-editor-material-folder-packages-open" + ], + [ + "shared", + "#icon-monaco-editor-material-folder-shared-open" + ], + [ + "common", + "#icon-monaco-editor-material-folder-shared-open" + ], + [ + "glsl", + "#icon-monaco-editor-material-folder-shader-open" + ], + [ + "hlsl", + "#icon-monaco-editor-material-folder-shader-open" + ], + [ + "shader", + "#icon-monaco-editor-material-folder-shader-open" + ], + [ + "shaders", + "#icon-monaco-editor-material-folder-shader-open" + ], + [ + "stack", + "#icon-monaco-editor-material-folder-stack-open" + ], + [ + "stacks", + "#icon-monaco-editor-material-folder-stack-open" + ], + [ + "template", + "#icon-monaco-editor-material-folder-template-open" + ], + [ + "templates", + "#icon-monaco-editor-material-folder-template-open" + ], + [ + "util", + "#icon-monaco-editor-material-folder-utils-open" + ], + [ + "utils", + "#icon-monaco-editor-material-folder-utils-open" + ], + [ + "utility", + "#icon-monaco-editor-material-folder-utils-open" + ], + [ + "utilities", + "#icon-monaco-editor-material-folder-utils-open" + ], + [ + "supabase", + "#icon-monaco-editor-material-folder-supabase-open" + ], + [ + ".supabase", + "#icon-monaco-editor-material-folder-supabase-open" + ], + [ + "private", + "#icon-monaco-editor-material-folder-private-open" + ], + [ + ".private", + "#icon-monaco-editor-material-folder-private-open" + ], + [ + "error", + "#icon-monaco-editor-material-folder-error-open" + ], + [ + "errors", + "#icon-monaco-editor-material-folder-error-open" + ], + [ + "err", + "#icon-monaco-editor-material-folder-error-open" + ], + [ + "event", + "#icon-monaco-editor-material-folder-event-open" + ], + [ + "events", + "#icon-monaco-editor-material-folder-event-open" + ], + [ + "auth", + "#icon-monaco-editor-material-folder-secure-open" + ], + [ + "authentication", + "#icon-monaco-editor-material-folder-secure-open" + ], + [ + "secure", + "#icon-monaco-editor-material-folder-secure-open" + ], + [ + "security", + "#icon-monaco-editor-material-folder-secure-open" + ], + [ + "cert", + "#icon-monaco-editor-material-folder-secure-open" + ], + [ + "certs", + "#icon-monaco-editor-material-folder-secure-open" + ], + [ + "certificate", + "#icon-monaco-editor-material-folder-secure-open" + ], + [ + "certificates", + "#icon-monaco-editor-material-folder-secure-open" + ], + [ + "ssl", + "#icon-monaco-editor-material-folder-secure-open" + ], + [ + "custom", + "#icon-monaco-editor-material-folder-custom-open" + ], + [ + "customs", + "#icon-monaco-editor-material-folder-custom-open" + ], + [ + "_draft", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "_drafts", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "mock", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "mocks", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "fixture", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "fixtures", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "draft", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "drafts", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "concept", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "concepts", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "sketch", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "sketches", + "#icon-monaco-editor-material-folder-mock-open" + ], + [ + "syntax", + "#icon-monaco-editor-material-folder-syntax-open" + ], + [ + "syntaxes", + "#icon-monaco-editor-material-folder-syntax-open" + ], + [ + "spellcheck", + "#icon-monaco-editor-material-folder-syntax-open" + ], + [ + "vm", + "#icon-monaco-editor-material-folder-vm-open" + ], + [ + "vms", + "#icon-monaco-editor-material-folder-vm-open" + ], + [ + "stylus", + "#icon-monaco-editor-material-folder-stylus-open" + ], + [ + "flow-typed", + "#icon-monaco-editor-material-folder-flow-open" + ], + [ + "rule", + "#icon-monaco-editor-material-folder-rules-open" + ], + [ + "rules", + "#icon-monaco-editor-material-folder-rules-open" + ], + [ + "validation", + "#icon-monaco-editor-material-folder-rules-open" + ], + [ + "validations", + "#icon-monaco-editor-material-folder-rules-open" + ], + [ + "validator", + "#icon-monaco-editor-material-folder-rules-open" + ], + [ + "validators", + "#icon-monaco-editor-material-folder-rules-open" + ], + [ + "review", + "#icon-monaco-editor-material-folder-review-open" + ], + [ + "reviews", + "#icon-monaco-editor-material-folder-review-open" + ], + [ + "revisal", + "#icon-monaco-editor-material-folder-review-open" + ], + [ + "revisals", + "#icon-monaco-editor-material-folder-review-open" + ], + [ + "reviewed", + "#icon-monaco-editor-material-folder-review-open" + ], + [ + "anim", + "#icon-monaco-editor-material-folder-animation-open" + ], + [ + "anims", + "#icon-monaco-editor-material-folder-animation-open" + ], + [ + "animation", + "#icon-monaco-editor-material-folder-animation-open" + ], + [ + "animations", + "#icon-monaco-editor-material-folder-animation-open" + ], + [ + "animated", + "#icon-monaco-editor-material-folder-animation-open" + ], + [ + "guard", + "#icon-monaco-editor-material-folder-guard-open" + ], + [ + "guards", + "#icon-monaco-editor-material-folder-guard-open" + ], + [ + "prisma", + "#icon-monaco-editor-material-folder-prisma-open" + ], + [ + "pipe", + "#icon-monaco-editor-material-folder-pipe-open" + ], + [ + "pipes", + "#icon-monaco-editor-material-folder-pipe-open" + ], + [ + "svg", + "#icon-monaco-editor-material-folder-svg-open" + ], + [ + "svgs", + "#icon-monaco-editor-material-folder-svg-open" + ], + [ + "terraform", + "#icon-monaco-editor-material-folder-terraform-open" + ], + [ + ".terraform", + "#icon-monaco-editor-material-folder-terraform-open" + ], + [ + "mobile", + "#icon-monaco-editor-material-folder-mobile-open" + ], + [ + "mobiles", + "#icon-monaco-editor-material-folder-mobile-open" + ], + [ + "portable", + "#icon-monaco-editor-material-folder-mobile-open" + ], + [ + "portability", + "#icon-monaco-editor-material-folder-mobile-open" + ], + [ + ".stencil", + "#icon-monaco-editor-material-folder-stencil-open" + ], + [ + "firebase", + "#icon-monaco-editor-material-folder-firebase-open" + ], + [ + ".firebase", + "#icon-monaco-editor-material-folder-firebase-open" + ], + [ + "svelte", + "#icon-monaco-editor-material-folder-svelte-open" + ], + [ + ".svelte-kit", + "#icon-monaco-editor-material-folder-svelte-open" + ], + [ + "update", + "#icon-monaco-editor-material-folder-update-open" + ], + [ + "updates", + "#icon-monaco-editor-material-folder-update-open" + ], + [ + "upgrade", + "#icon-monaco-editor-material-folder-update-open" + ], + [ + "upgrades", + "#icon-monaco-editor-material-folder-update-open" + ], + [ + ".idea", + "#icon-monaco-editor-material-folder-intellij-open" + ], + [ + ".azure-pipelines", + "#icon-monaco-editor-material-folder-azure-pipelines-open" + ], + [ + ".azure-pipelines-ci", + "#icon-monaco-editor-material-folder-azure-pipelines-open" + ], + [ + "mjml", + "#icon-monaco-editor-material-folder-mjml-open" + ], + [ + "admin", + "#icon-monaco-editor-material-folder-admin-open" + ], + [ + "manager", + "#icon-monaco-editor-material-folder-admin-open" + ], + [ + "moderator", + "#icon-monaco-editor-material-folder-admin-open" + ], + [ + "scala", + "#icon-monaco-editor-material-folder-scala-open" + ], + [ + "connection", + "#icon-monaco-editor-material-folder-connection-open" + ], + [ + "connections", + "#icon-monaco-editor-material-folder-connection-open" + ], + [ + "integration", + "#icon-monaco-editor-material-folder-connection-open" + ], + [ + "integrations", + "#icon-monaco-editor-material-folder-connection-open" + ], + [ + ".quasar", + "#icon-monaco-editor-material-folder-quasar-open" + ], + [ + ".next", + "#icon-monaco-editor-material-folder-next-open" + ], + [ + "cobol", + "#icon-monaco-editor-material-folder-cobol-open" + ], + [ + "yarn", + "#icon-monaco-editor-material-folder-yarn-open" + ], + [ + ".yarn", + "#icon-monaco-editor-material-folder-yarn-open" + ], + [ + "husky", + "#icon-monaco-editor-material-folder-husky-open" + ], + [ + ".husky", + "#icon-monaco-editor-material-folder-husky-open" + ], + [ + ".storybook", + "#icon-monaco-editor-material-folder-storybook-open" + ], + [ + "storybook", + "#icon-monaco-editor-material-folder-storybook-open" + ], + [ + "stories", + "#icon-monaco-editor-material-folder-storybook-open" + ], + [ + "__stories__", + "#icon-monaco-editor-material-folder-storybook-open" + ], + [ + "base", + "#icon-monaco-editor-material-folder-base-open" + ], + [ + ".base", + "#icon-monaco-editor-material-folder-base-open" + ], + [ + "bases", + "#icon-monaco-editor-material-folder-base-open" + ], + [ + "cart", + "#icon-monaco-editor-material-folder-cart-open" + ], + [ + "shopping-cart", + "#icon-monaco-editor-material-folder-cart-open" + ], + [ + "shopping", + "#icon-monaco-editor-material-folder-cart-open" + ], + [ + "shop", + "#icon-monaco-editor-material-folder-cart-open" + ], + [ + "home", + "#icon-monaco-editor-material-folder-home-open" + ], + [ + ".home", + "#icon-monaco-editor-material-folder-home-open" + ], + [ + "start", + "#icon-monaco-editor-material-folder-home-open" + ], + [ + ".start", + "#icon-monaco-editor-material-folder-home-open" + ], + [ + "project", + "#icon-monaco-editor-material-folder-project-open" + ], + [ + "projects", + "#icon-monaco-editor-material-folder-project-open" + ], + [ + ".project", + "#icon-monaco-editor-material-folder-project-open" + ], + [ + ".projects", + "#icon-monaco-editor-material-folder-project-open" + ], + [ + "interface", + "#icon-monaco-editor-material-folder-interface-open" + ], + [ + "interfaces", + "#icon-monaco-editor-material-folder-interface-open" + ], + [ + ".netlify", + "#icon-monaco-editor-material-folder-netlify-open" + ], + [ + "pact", + "#icon-monaco-editor-material-folder-contract-open" + ], + [ + "pacts", + "#icon-monaco-editor-material-folder-contract-open" + ], + [ + "contract", + "#icon-monaco-editor-material-folder-contract-open" + ], + [ + ".contract", + "#icon-monaco-editor-material-folder-contract-open" + ], + [ + "contracts", + "#icon-monaco-editor-material-folder-contract-open" + ], + [ + "contract-testing", + "#icon-monaco-editor-material-folder-contract-open" + ], + [ + "contract-test", + "#icon-monaco-editor-material-folder-contract-open" + ], + [ + "contract-tests", + "#icon-monaco-editor-material-folder-contract-open" + ], + [ + "queue", + "#icon-monaco-editor-material-folder-queue-open" + ], + [ + "queues", + "#icon-monaco-editor-material-folder-queue-open" + ], + [ + "bull", + "#icon-monaco-editor-material-folder-queue-open" + ], + [ + "mq", + "#icon-monaco-editor-material-folder-queue-open" + ], + [ + "vercel", + "#icon-monaco-editor-material-folder-vercel-open" + ], + [ + ".vercel", + "#icon-monaco-editor-material-folder-vercel-open" + ], + [ + "now", + "#icon-monaco-editor-material-folder-vercel-open" + ], + [ + ".now", + "#icon-monaco-editor-material-folder-vercel-open" + ], + [ + "cypress", + "#icon-monaco-editor-material-folder-cypress-open" + ], + [ + ".cypress", + "#icon-monaco-editor-material-folder-cypress-open" + ], + [ + "decorator", + "#icon-monaco-editor-material-folder-decorators-open" + ], + [ + "decorators", + "#icon-monaco-editor-material-folder-decorators-open" + ], + [ + "java", + "#icon-monaco-editor-material-folder-java-open" + ], + [ + "resolver", + "#icon-monaco-editor-material-folder-resolver-open" + ], + [ + "resolvers", + "#icon-monaco-editor-material-folder-resolver-open" + ], + [ + "angular", + "#icon-monaco-editor-material-folder-angular-open" + ], + [ + ".angular", + "#icon-monaco-editor-material-folder-angular-open" + ], + [ + "unity", + "#icon-monaco-editor-material-folder-unity-open" + ], + [ + "pdf", + "#icon-monaco-editor-material-folder-pdf-open" + ], + [ + "pdfs", + "#icon-monaco-editor-material-folder-pdf-open" + ], + [ + "protobufs", + "#icon-monaco-editor-material-folder-proto-open" + ], + [ + "proto", + "#icon-monaco-editor-material-folder-proto-open" + ], + [ + "plastic", + "#icon-monaco-editor-material-folder-plastic-open" + ], + [ + ".plastic", + "#icon-monaco-editor-material-folder-plastic-open" + ], + [ + "gamemaker", + "#icon-monaco-editor-material-folder-gamemaker-open" + ], + [ + "gamemaker2", + "#icon-monaco-editor-material-folder-gamemaker-open" + ], + [ + ".hg", + "#icon-monaco-editor-material-folder-mercurial-open" + ], + [ + "hghooks", + "#icon-monaco-editor-material-folder-mercurial-open" + ], + [ + ".hghooks", + "#icon-monaco-editor-material-folder-mercurial-open" + ], + [ + ".hgext", + "#icon-monaco-editor-material-folder-mercurial-open" + ], + [ + "godot", + "#icon-monaco-editor-material-folder-godot-open" + ], + [ + ".godot", + "#icon-monaco-editor-material-folder-godot-open" + ], + [ + "godot-cpp", + "#icon-monaco-editor-material-folder-godot-open" + ], + [ + ".godot-cpp", + "#icon-monaco-editor-material-folder-godot-open" + ] +] \ No newline at end of file diff --git a/workspace/plugins/monaco-editor/src/assets/entries/folder-icon.json b/workspace/plugins/monaco-editor/src/assets/entries/folder-icon.json new file mode 100644 index 0000000..4002743 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/assets/entries/folder-icon.json @@ -0,0 +1,2486 @@ +[ + [ + "src", + "#icon-monaco-editor-material-folder-src" + ], + [ + "srcs", + "#icon-monaco-editor-material-folder-src" + ], + [ + "source", + "#icon-monaco-editor-material-folder-src" + ], + [ + "sources", + "#icon-monaco-editor-material-folder-src" + ], + [ + "code", + "#icon-monaco-editor-material-folder-src" + ], + [ + "dist", + "#icon-monaco-editor-material-folder-dist" + ], + [ + "out", + "#icon-monaco-editor-material-folder-dist" + ], + [ + "build", + "#icon-monaco-editor-material-folder-dist" + ], + [ + "release", + "#icon-monaco-editor-material-folder-dist" + ], + [ + "bin", + "#icon-monaco-editor-material-folder-dist" + ], + [ + "css", + "#icon-monaco-editor-material-folder-css" + ], + [ + "stylesheet", + "#icon-monaco-editor-material-folder-css" + ], + [ + "stylesheets", + "#icon-monaco-editor-material-folder-css" + ], + [ + "style", + "#icon-monaco-editor-material-folder-css" + ], + [ + "styles", + "#icon-monaco-editor-material-folder-css" + ], + [ + "sass", + "#icon-monaco-editor-material-folder-sass" + ], + [ + "_sass", + "#icon-monaco-editor-material-folder-sass" + ], + [ + "scss", + "#icon-monaco-editor-material-folder-sass" + ], + [ + "_scss", + "#icon-monaco-editor-material-folder-sass" + ], + [ + "_images", + "#icon-monaco-editor-material-folder-images" + ], + [ + "_image", + "#icon-monaco-editor-material-folder-images" + ], + [ + "_imgs", + "#icon-monaco-editor-material-folder-images" + ], + [ + "_img", + "#icon-monaco-editor-material-folder-images" + ], + [ + "images", + "#icon-monaco-editor-material-folder-images" + ], + [ + "image", + "#icon-monaco-editor-material-folder-images" + ], + [ + "imgs", + "#icon-monaco-editor-material-folder-images" + ], + [ + "img", + "#icon-monaco-editor-material-folder-images" + ], + [ + "icons", + "#icon-monaco-editor-material-folder-images" + ], + [ + "icon", + "#icon-monaco-editor-material-folder-images" + ], + [ + "icos", + "#icon-monaco-editor-material-folder-images" + ], + [ + "ico", + "#icon-monaco-editor-material-folder-images" + ], + [ + "figures", + "#icon-monaco-editor-material-folder-images" + ], + [ + "figure", + "#icon-monaco-editor-material-folder-images" + ], + [ + "figs", + "#icon-monaco-editor-material-folder-images" + ], + [ + "fig", + "#icon-monaco-editor-material-folder-images" + ], + [ + "screenshot", + "#icon-monaco-editor-material-folder-images" + ], + [ + "screenshots", + "#icon-monaco-editor-material-folder-images" + ], + [ + "screengrab", + "#icon-monaco-editor-material-folder-images" + ], + [ + "screengrabs", + "#icon-monaco-editor-material-folder-images" + ], + [ + "pic", + "#icon-monaco-editor-material-folder-images" + ], + [ + "pics", + "#icon-monaco-editor-material-folder-images" + ], + [ + "picture", + "#icon-monaco-editor-material-folder-images" + ], + [ + "pictures", + "#icon-monaco-editor-material-folder-images" + ], + [ + "script", + "#icon-monaco-editor-material-folder-scripts" + ], + [ + "scripts", + "#icon-monaco-editor-material-folder-scripts" + ], + [ + "node_modules", + "#icon-monaco-editor-material-folder-node" + ], + [ + "js", + "#icon-monaco-editor-material-folder-javascript" + ], + [ + "javascript", + "#icon-monaco-editor-material-folder-javascript" + ], + [ + "javascripts", + "#icon-monaco-editor-material-folder-javascript" + ], + [ + "json", + "#icon-monaco-editor-material-folder-json" + ], + [ + "jsons", + "#icon-monaco-editor-material-folder-json" + ], + [ + "font", + "#icon-monaco-editor-material-folder-font" + ], + [ + "fonts", + "#icon-monaco-editor-material-folder-font" + ], + [ + "bower_components", + "#icon-monaco-editor-material-folder-bower" + ], + [ + "test", + "#icon-monaco-editor-material-folder-test" + ], + [ + "tests", + "#icon-monaco-editor-material-folder-test" + ], + [ + "testing", + "#icon-monaco-editor-material-folder-test" + ], + [ + "__tests__", + "#icon-monaco-editor-material-folder-test" + ], + [ + "__snapshots__", + "#icon-monaco-editor-material-folder-test" + ], + [ + "__mocks__", + "#icon-monaco-editor-material-folder-test" + ], + [ + "__fixtures__", + "#icon-monaco-editor-material-folder-test" + ], + [ + "__test__", + "#icon-monaco-editor-material-folder-test" + ], + [ + "spec", + "#icon-monaco-editor-material-folder-test" + ], + [ + "specs", + "#icon-monaco-editor-material-folder-test" + ], + [ + "jinja", + "#icon-monaco-editor-material-folder-jinja" + ], + [ + "jinja2", + "#icon-monaco-editor-material-folder-jinja" + ], + [ + "j2", + "#icon-monaco-editor-material-folder-jinja" + ], + [ + "markdown", + "#icon-monaco-editor-material-folder-markdown" + ], + [ + "md", + "#icon-monaco-editor-material-folder-markdown" + ], + [ + "php", + "#icon-monaco-editor-material-folder-php" + ], + [ + "phpmailer", + "#icon-monaco-editor-material-folder-phpmailer" + ], + [ + "sublime", + "#icon-monaco-editor-material-folder-sublime" + ], + [ + "_post", + "#icon-monaco-editor-material-folder-docs" + ], + [ + "_posts", + "#icon-monaco-editor-material-folder-docs" + ], + [ + "doc", + "#icon-monaco-editor-material-folder-docs" + ], + [ + "docs", + "#icon-monaco-editor-material-folder-docs" + ], + [ + "document", + "#icon-monaco-editor-material-folder-docs" + ], + [ + "documents", + "#icon-monaco-editor-material-folder-docs" + ], + [ + "documentation", + "#icon-monaco-editor-material-folder-docs" + ], + [ + "post", + "#icon-monaco-editor-material-folder-docs" + ], + [ + "posts", + "#icon-monaco-editor-material-folder-docs" + ], + [ + "article", + "#icon-monaco-editor-material-folder-docs" + ], + [ + "articles", + "#icon-monaco-editor-material-folder-docs" + ], + [ + ".git", + "#icon-monaco-editor-material-folder-git" + ], + [ + "patches", + "#icon-monaco-editor-material-folder-git" + ], + [ + "githooks", + "#icon-monaco-editor-material-folder-git" + ], + [ + ".githooks", + "#icon-monaco-editor-material-folder-git" + ], + [ + "submodules", + "#icon-monaco-editor-material-folder-git" + ], + [ + ".submodules", + "#icon-monaco-editor-material-folder-git" + ], + [ + ".github", + "#icon-monaco-editor-material-folder-github" + ], + [ + "github", + "#icon-monaco-editor-material-folder-github" + ], + [ + ".gitlab", + "#icon-monaco-editor-material-folder-gitlab" + ], + [ + ".vscode", + "#icon-monaco-editor-material-folder-vscode" + ], + [ + ".vscode-test", + "#icon-monaco-editor-material-folder-vscode" + ], + [ + "view", + "#icon-monaco-editor-material-folder-views" + ], + [ + "views", + "#icon-monaco-editor-material-folder-views" + ], + [ + "screen", + "#icon-monaco-editor-material-folder-views" + ], + [ + "screens", + "#icon-monaco-editor-material-folder-views" + ], + [ + "page", + "#icon-monaco-editor-material-folder-views" + ], + [ + "pages", + "#icon-monaco-editor-material-folder-views" + ], + [ + "public_html", + "#icon-monaco-editor-material-folder-views" + ], + [ + "html", + "#icon-monaco-editor-material-folder-views" + ], + [ + "vue", + "#icon-monaco-editor-material-folder-vue" + ], + [ + ".vuepress", + "#icon-monaco-editor-material-folder-vuepress" + ], + [ + ".expo", + "#icon-monaco-editor-material-folder-expo" + ], + [ + ".expo-shared", + "#icon-monaco-editor-material-folder-expo" + ], + [ + "cfg", + "#icon-monaco-editor-material-folder-config" + ], + [ + "cfgs", + "#icon-monaco-editor-material-folder-config" + ], + [ + "conf", + "#icon-monaco-editor-material-folder-config" + ], + [ + "confs", + "#icon-monaco-editor-material-folder-config" + ], + [ + "config", + "#icon-monaco-editor-material-folder-config" + ], + [ + "configs", + "#icon-monaco-editor-material-folder-config" + ], + [ + "configuration", + "#icon-monaco-editor-material-folder-config" + ], + [ + "configurations", + "#icon-monaco-editor-material-folder-config" + ], + [ + "setting", + "#icon-monaco-editor-material-folder-config" + ], + [ + ".setting", + "#icon-monaco-editor-material-folder-config" + ], + [ + "settings", + "#icon-monaco-editor-material-folder-config" + ], + [ + ".settings", + "#icon-monaco-editor-material-folder-config" + ], + [ + "META-INF", + "#icon-monaco-editor-material-folder-config" + ], + [ + "i18n", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "internationalization", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "lang", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "langs", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "language", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "languages", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "locale", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "locales", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "l10n", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "localization", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "translation", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "translate", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "translations", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + ".tx", + "#icon-monaco-editor-material-folder-i18n" + ], + [ + "components", + "#icon-monaco-editor-material-folder-components" + ], + [ + "widget", + "#icon-monaco-editor-material-folder-components" + ], + [ + "widgets", + "#icon-monaco-editor-material-folder-components" + ], + [ + "fragments", + "#icon-monaco-editor-material-folder-components" + ], + [ + ".verdaccio", + "#icon-monaco-editor-material-folder-verdaccio" + ], + [ + "verdaccio", + "#icon-monaco-editor-material-folder-verdaccio" + ], + [ + "aurelia_project", + "#icon-monaco-editor-material-folder-aurelia" + ], + [ + "resource", + "#icon-monaco-editor-material-folder-resource" + ], + [ + "resources", + "#icon-monaco-editor-material-folder-resource" + ], + [ + "res", + "#icon-monaco-editor-material-folder-resource" + ], + [ + "asset", + "#icon-monaco-editor-material-folder-resource" + ], + [ + "assets", + "#icon-monaco-editor-material-folder-resource" + ], + [ + "static", + "#icon-monaco-editor-material-folder-resource" + ], + [ + "report", + "#icon-monaco-editor-material-folder-resource" + ], + [ + "reports", + "#icon-monaco-editor-material-folder-resource" + ], + [ + "lib", + "#icon-monaco-editor-material-folder-lib" + ], + [ + "libs", + "#icon-monaco-editor-material-folder-lib" + ], + [ + "library", + "#icon-monaco-editor-material-folder-lib" + ], + [ + "libraries", + "#icon-monaco-editor-material-folder-lib" + ], + [ + "vendor", + "#icon-monaco-editor-material-folder-lib" + ], + [ + "vendors", + "#icon-monaco-editor-material-folder-lib" + ], + [ + "third-party", + "#icon-monaco-editor-material-folder-lib" + ], + [ + "themes", + "#icon-monaco-editor-material-folder-theme" + ], + [ + "theme", + "#icon-monaco-editor-material-folder-theme" + ], + [ + "color", + "#icon-monaco-editor-material-folder-theme" + ], + [ + "colors", + "#icon-monaco-editor-material-folder-theme" + ], + [ + "design", + "#icon-monaco-editor-material-folder-theme" + ], + [ + "designs", + "#icon-monaco-editor-material-folder-theme" + ], + [ + "webpack", + "#icon-monaco-editor-material-folder-webpack" + ], + [ + ".webpack", + "#icon-monaco-editor-material-folder-webpack" + ], + [ + "global", + "#icon-monaco-editor-material-folder-global" + ], + [ + "_site", + "#icon-monaco-editor-material-folder-public" + ], + [ + "public", + "#icon-monaco-editor-material-folder-public" + ], + [ + "www", + "#icon-monaco-editor-material-folder-public" + ], + [ + "wwwroot", + "#icon-monaco-editor-material-folder-public" + ], + [ + "web", + "#icon-monaco-editor-material-folder-public" + ], + [ + "website", + "#icon-monaco-editor-material-folder-public" + ], + [ + "site", + "#icon-monaco-editor-material-folder-public" + ], + [ + "browser", + "#icon-monaco-editor-material-folder-public" + ], + [ + "browsers", + "#icon-monaco-editor-material-folder-public" + ], + [ + "include", + "#icon-monaco-editor-material-folder-include" + ], + [ + "includes", + "#icon-monaco-editor-material-folder-include" + ], + [ + "_includes", + "#icon-monaco-editor-material-folder-include" + ], + [ + "inc", + "#icon-monaco-editor-material-folder-include" + ], + [ + "partials", + "#icon-monaco-editor-material-folder-include" + ], + [ + "_partials", + "#icon-monaco-editor-material-folder-include" + ], + [ + "docker", + "#icon-monaco-editor-material-folder-docker" + ], + [ + "dockerfiles", + "#icon-monaco-editor-material-folder-docker" + ], + [ + ".docker", + "#icon-monaco-editor-material-folder-docker" + ], + [ + "db", + "#icon-monaco-editor-material-folder-database" + ], + [ + "database", + "#icon-monaco-editor-material-folder-database" + ], + [ + "databases", + "#icon-monaco-editor-material-folder-database" + ], + [ + "sql", + "#icon-monaco-editor-material-folder-database" + ], + [ + "data", + "#icon-monaco-editor-material-folder-database" + ], + [ + "_data", + "#icon-monaco-editor-material-folder-database" + ], + [ + "log", + "#icon-monaco-editor-material-folder-log" + ], + [ + "logs", + "#icon-monaco-editor-material-folder-log" + ], + [ + "target", + "#icon-monaco-editor-material-folder-target" + ], + [ + "temp", + "#icon-monaco-editor-material-folder-temp" + ], + [ + ".temp", + "#icon-monaco-editor-material-folder-temp" + ], + [ + "tmp", + "#icon-monaco-editor-material-folder-temp" + ], + [ + ".tmp", + "#icon-monaco-editor-material-folder-temp" + ], + [ + "cached", + "#icon-monaco-editor-material-folder-temp" + ], + [ + "cache", + "#icon-monaco-editor-material-folder-temp" + ], + [ + ".cache", + "#icon-monaco-editor-material-folder-temp" + ], + [ + "aws", + "#icon-monaco-editor-material-folder-aws" + ], + [ + ".aws", + "#icon-monaco-editor-material-folder-aws" + ], + [ + "aud", + "#icon-monaco-editor-material-folder-audio" + ], + [ + "auds", + "#icon-monaco-editor-material-folder-audio" + ], + [ + "audio", + "#icon-monaco-editor-material-folder-audio" + ], + [ + "audios", + "#icon-monaco-editor-material-folder-audio" + ], + [ + "music", + "#icon-monaco-editor-material-folder-audio" + ], + [ + "sound", + "#icon-monaco-editor-material-folder-audio" + ], + [ + "sounds", + "#icon-monaco-editor-material-folder-audio" + ], + [ + "vid", + "#icon-monaco-editor-material-folder-video" + ], + [ + "vids", + "#icon-monaco-editor-material-folder-video" + ], + [ + "video", + "#icon-monaco-editor-material-folder-video" + ], + [ + "videos", + "#icon-monaco-editor-material-folder-video" + ], + [ + "movie", + "#icon-monaco-editor-material-folder-video" + ], + [ + "movies", + "#icon-monaco-editor-material-folder-video" + ], + [ + "kubernetes", + "#icon-monaco-editor-material-folder-kubernetes" + ], + [ + ".kubernetes", + "#icon-monaco-editor-material-folder-kubernetes" + ], + [ + "k8s", + "#icon-monaco-editor-material-folder-kubernetes" + ], + [ + ".k8s", + "#icon-monaco-editor-material-folder-kubernetes" + ], + [ + "import", + "#icon-monaco-editor-material-folder-import" + ], + [ + "imports", + "#icon-monaco-editor-material-folder-import" + ], + [ + "imported", + "#icon-monaco-editor-material-folder-import" + ], + [ + "export", + "#icon-monaco-editor-material-folder-export" + ], + [ + "exports", + "#icon-monaco-editor-material-folder-export" + ], + [ + "exported", + "#icon-monaco-editor-material-folder-export" + ], + [ + "wakatime", + "#icon-monaco-editor-material-folder-wakatime" + ], + [ + ".circleci", + "#icon-monaco-editor-material-folder-circleci" + ], + [ + ".wordpress-org", + "#icon-monaco-editor-material-folder-wordpress" + ], + [ + "wp-content", + "#icon-monaco-editor-material-folder-wordpress" + ], + [ + "gradle", + "#icon-monaco-editor-material-folder-gradle" + ], + [ + ".gradle", + "#icon-monaco-editor-material-folder-gradle" + ], + [ + "coverage", + "#icon-monaco-editor-material-folder-coverage" + ], + [ + ".nyc-output", + "#icon-monaco-editor-material-folder-coverage" + ], + [ + ".nyc_output", + "#icon-monaco-editor-material-folder-coverage" + ], + [ + "e2e", + "#icon-monaco-editor-material-folder-coverage" + ], + [ + "it", + "#icon-monaco-editor-material-folder-coverage" + ], + [ + "integration-test", + "#icon-monaco-editor-material-folder-coverage" + ], + [ + "integration-tests", + "#icon-monaco-editor-material-folder-coverage" + ], + [ + "__integration-test__", + "#icon-monaco-editor-material-folder-coverage" + ], + [ + "__integration-tests__", + "#icon-monaco-editor-material-folder-coverage" + ], + [ + "class", + "#icon-monaco-editor-material-folder-class" + ], + [ + "classes", + "#icon-monaco-editor-material-folder-class" + ], + [ + "model", + "#icon-monaco-editor-material-folder-class" + ], + [ + "models", + "#icon-monaco-editor-material-folder-class" + ], + [ + "schemas", + "#icon-monaco-editor-material-folder-class" + ], + [ + "schema", + "#icon-monaco-editor-material-folder-class" + ], + [ + "other", + "#icon-monaco-editor-material-folder-other" + ], + [ + "others", + "#icon-monaco-editor-material-folder-other" + ], + [ + "misc", + "#icon-monaco-editor-material-folder-other" + ], + [ + "miscellaneous", + "#icon-monaco-editor-material-folder-other" + ], + [ + "extra", + "#icon-monaco-editor-material-folder-other" + ], + [ + "extras", + "#icon-monaco-editor-material-folder-other" + ], + [ + "etc", + "#icon-monaco-editor-material-folder-other" + ], + [ + "lua", + "#icon-monaco-editor-material-folder-lua" + ], + [ + "typescript", + "#icon-monaco-editor-material-folder-typescript" + ], + [ + "ts", + "#icon-monaco-editor-material-folder-typescript" + ], + [ + "typings", + "#icon-monaco-editor-material-folder-typescript" + ], + [ + "@types", + "#icon-monaco-editor-material-folder-typescript" + ], + [ + "types", + "#icon-monaco-editor-material-folder-typescript" + ], + [ + "graphql", + "#icon-monaco-editor-material-folder-graphql" + ], + [ + "gql", + "#icon-monaco-editor-material-folder-graphql" + ], + [ + "routes", + "#icon-monaco-editor-material-folder-routes" + ], + [ + "router", + "#icon-monaco-editor-material-folder-routes" + ], + [ + "routers", + "#icon-monaco-editor-material-folder-routes" + ], + [ + ".ci", + "#icon-monaco-editor-material-folder-ci" + ], + [ + "ci", + "#icon-monaco-editor-material-folder-ci" + ], + [ + "benchmark", + "#icon-monaco-editor-material-folder-benchmark" + ], + [ + "benchmarks", + "#icon-monaco-editor-material-folder-benchmark" + ], + [ + "performance", + "#icon-monaco-editor-material-folder-benchmark" + ], + [ + "measure", + "#icon-monaco-editor-material-folder-benchmark" + ], + [ + "measures", + "#icon-monaco-editor-material-folder-benchmark" + ], + [ + "measurement", + "#icon-monaco-editor-material-folder-benchmark" + ], + [ + "messages", + "#icon-monaco-editor-material-folder-messages" + ], + [ + "messaging", + "#icon-monaco-editor-material-folder-messages" + ], + [ + "forum", + "#icon-monaco-editor-material-folder-messages" + ], + [ + "chat", + "#icon-monaco-editor-material-folder-messages" + ], + [ + "chats", + "#icon-monaco-editor-material-folder-messages" + ], + [ + "conversation", + "#icon-monaco-editor-material-folder-messages" + ], + [ + "conversations", + "#icon-monaco-editor-material-folder-messages" + ], + [ + "less", + "#icon-monaco-editor-material-folder-less" + ], + [ + "gulp", + "#icon-monaco-editor-material-folder-gulp" + ], + [ + "gulp-tasks", + "#icon-monaco-editor-material-folder-gulp" + ], + [ + "gulpfile.js", + "#icon-monaco-editor-material-folder-gulp" + ], + [ + "gulpfile.mjs", + "#icon-monaco-editor-material-folder-gulp" + ], + [ + "gulpfile.ts", + "#icon-monaco-editor-material-folder-gulp" + ], + [ + "gulpfile.babel.js", + "#icon-monaco-editor-material-folder-gulp" + ], + [ + "python", + "#icon-monaco-editor-material-folder-python" + ], + [ + "__pycache__", + "#icon-monaco-editor-material-folder-python" + ], + [ + ".pytest_cache", + "#icon-monaco-editor-material-folder-python" + ], + [ + "mojo", + "#icon-monaco-editor-material-folder-mojo" + ], + [ + "debug", + "#icon-monaco-editor-material-folder-debug" + ], + [ + "debugging", + "#icon-monaco-editor-material-folder-debug" + ], + [ + "fastlane", + "#icon-monaco-editor-material-folder-fastlane" + ], + [ + "plugin", + "#icon-monaco-editor-material-folder-plugin" + ], + [ + "plugins", + "#icon-monaco-editor-material-folder-plugin" + ], + [ + "_plugins", + "#icon-monaco-editor-material-folder-plugin" + ], + [ + "extension", + "#icon-monaco-editor-material-folder-plugin" + ], + [ + "extensions", + "#icon-monaco-editor-material-folder-plugin" + ], + [ + "addon", + "#icon-monaco-editor-material-folder-plugin" + ], + [ + "addons", + "#icon-monaco-editor-material-folder-plugin" + ], + [ + "module", + "#icon-monaco-editor-material-folder-plugin" + ], + [ + "modules", + "#icon-monaco-editor-material-folder-plugin" + ], + [ + "middleware", + "#icon-monaco-editor-material-folder-middleware" + ], + [ + "middlewares", + "#icon-monaco-editor-material-folder-middleware" + ], + [ + "controller", + "#icon-monaco-editor-material-folder-controller" + ], + [ + "controllers", + "#icon-monaco-editor-material-folder-controller" + ], + [ + "service", + "#icon-monaco-editor-material-folder-controller" + ], + [ + "services", + "#icon-monaco-editor-material-folder-controller" + ], + [ + "provider", + "#icon-monaco-editor-material-folder-controller" + ], + [ + "providers", + "#icon-monaco-editor-material-folder-controller" + ], + [ + "handler", + "#icon-monaco-editor-material-folder-controller" + ], + [ + "handlers", + "#icon-monaco-editor-material-folder-controller" + ], + [ + "ansible", + "#icon-monaco-editor-material-folder-ansible" + ], + [ + "server", + "#icon-monaco-editor-material-folder-server" + ], + [ + "servers", + "#icon-monaco-editor-material-folder-server" + ], + [ + "backend", + "#icon-monaco-editor-material-folder-server" + ], + [ + "client", + "#icon-monaco-editor-material-folder-client" + ], + [ + "clients", + "#icon-monaco-editor-material-folder-client" + ], + [ + "frontend", + "#icon-monaco-editor-material-folder-client" + ], + [ + "pwa", + "#icon-monaco-editor-material-folder-client" + ], + [ + "tasks", + "#icon-monaco-editor-material-folder-tasks" + ], + [ + "tickets", + "#icon-monaco-editor-material-folder-tasks" + ], + [ + "android", + "#icon-monaco-editor-material-folder-android" + ], + [ + "ios", + "#icon-monaco-editor-material-folder-ios" + ], + [ + "uploads", + "#icon-monaco-editor-material-folder-upload" + ], + [ + "upload", + "#icon-monaco-editor-material-folder-upload" + ], + [ + "downloads", + "#icon-monaco-editor-material-folder-download" + ], + [ + "download", + "#icon-monaco-editor-material-folder-download" + ], + [ + "tools", + "#icon-monaco-editor-material-folder-tools" + ], + [ + "toolkit", + "#icon-monaco-editor-material-folder-tools" + ], + [ + "toolkits", + "#icon-monaco-editor-material-folder-tools" + ], + [ + "toolbox", + "#icon-monaco-editor-material-folder-tools" + ], + [ + "toolboxes", + "#icon-monaco-editor-material-folder-tools" + ], + [ + "helpers", + "#icon-monaco-editor-material-folder-helper" + ], + [ + "helper", + "#icon-monaco-editor-material-folder-helper" + ], + [ + ".serverless", + "#icon-monaco-editor-material-folder-serverless" + ], + [ + "serverless", + "#icon-monaco-editor-material-folder-serverless" + ], + [ + "api", + "#icon-monaco-editor-material-folder-api" + ], + [ + "apis", + "#icon-monaco-editor-material-folder-api" + ], + [ + "restapi", + "#icon-monaco-editor-material-folder-api" + ], + [ + "app", + "#icon-monaco-editor-material-folder-app" + ], + [ + "apps", + "#icon-monaco-editor-material-folder-app" + ], + [ + "apollo", + "#icon-monaco-editor-material-folder-apollo" + ], + [ + "apollo-client", + "#icon-monaco-editor-material-folder-apollo" + ], + [ + "apollo-cache", + "#icon-monaco-editor-material-folder-apollo" + ], + [ + "apollo-config", + "#icon-monaco-editor-material-folder-apollo" + ], + [ + "arc", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "arcs", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "archive", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "archives", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "archival", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "bkp", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "bkps", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "bak", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "baks", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "backup", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "backups", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "back-up", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "back-ups", + "#icon-monaco-editor-material-folder-archive" + ], + [ + "batch", + "#icon-monaco-editor-material-folder-batch" + ], + [ + "batchs", + "#icon-monaco-editor-material-folder-batch" + ], + [ + "batches", + "#icon-monaco-editor-material-folder-batch" + ], + [ + "buildkite", + "#icon-monaco-editor-material-folder-buildkite" + ], + [ + ".buildkite", + "#icon-monaco-editor-material-folder-buildkite" + ], + [ + "cluster", + "#icon-monaco-editor-material-folder-cluster" + ], + [ + "clusters", + "#icon-monaco-editor-material-folder-cluster" + ], + [ + "command", + "#icon-monaco-editor-material-folder-command" + ], + [ + "commands", + "#icon-monaco-editor-material-folder-command" + ], + [ + "cmd", + "#icon-monaco-editor-material-folder-command" + ], + [ + "cli", + "#icon-monaco-editor-material-folder-command" + ], + [ + "clis", + "#icon-monaco-editor-material-folder-command" + ], + [ + "constant", + "#icon-monaco-editor-material-folder-constant" + ], + [ + "constants", + "#icon-monaco-editor-material-folder-constant" + ], + [ + "container", + "#icon-monaco-editor-material-folder-container" + ], + [ + "containers", + "#icon-monaco-editor-material-folder-container" + ], + [ + ".devcontainer", + "#icon-monaco-editor-material-folder-container" + ], + [ + "content", + "#icon-monaco-editor-material-folder-content" + ], + [ + "contents", + "#icon-monaco-editor-material-folder-content" + ], + [ + "context", + "#icon-monaco-editor-material-folder-context" + ], + [ + "contexts", + "#icon-monaco-editor-material-folder-context" + ], + [ + "core", + "#icon-monaco-editor-material-folder-core" + ], + [ + "delta", + "#icon-monaco-editor-material-folder-delta" + ], + [ + "deltas", + "#icon-monaco-editor-material-folder-delta" + ], + [ + "changes", + "#icon-monaco-editor-material-folder-delta" + ], + [ + "dump", + "#icon-monaco-editor-material-folder-dump" + ], + [ + "dumps", + "#icon-monaco-editor-material-folder-dump" + ], + [ + "demo", + "#icon-monaco-editor-material-folder-examples" + ], + [ + "demos", + "#icon-monaco-editor-material-folder-examples" + ], + [ + "example", + "#icon-monaco-editor-material-folder-examples" + ], + [ + "examples", + "#icon-monaco-editor-material-folder-examples" + ], + [ + "sample", + "#icon-monaco-editor-material-folder-examples" + ], + [ + "samples", + "#icon-monaco-editor-material-folder-examples" + ], + [ + "sample-data", + "#icon-monaco-editor-material-folder-examples" + ], + [ + ".env", + "#icon-monaco-editor-material-folder-environment" + ], + [ + ".environment", + "#icon-monaco-editor-material-folder-environment" + ], + [ + "env", + "#icon-monaco-editor-material-folder-environment" + ], + [ + "envs", + "#icon-monaco-editor-material-folder-environment" + ], + [ + "environment", + "#icon-monaco-editor-material-folder-environment" + ], + [ + "environments", + "#icon-monaco-editor-material-folder-environment" + ], + [ + ".venv", + "#icon-monaco-editor-material-folder-environment" + ], + [ + "func", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "funcs", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "function", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "functions", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "lambda", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "lambdas", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "logic", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "math", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "maths", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "calc", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "calcs", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "calculation", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "calculations", + "#icon-monaco-editor-material-folder-functions" + ], + [ + "generator", + "#icon-monaco-editor-material-folder-generator" + ], + [ + "generators", + "#icon-monaco-editor-material-folder-generator" + ], + [ + "generated", + "#icon-monaco-editor-material-folder-generator" + ], + [ + "cfn-gen", + "#icon-monaco-editor-material-folder-generator" + ], + [ + "gen", + "#icon-monaco-editor-material-folder-generator" + ], + [ + "gens", + "#icon-monaco-editor-material-folder-generator" + ], + [ + "auto", + "#icon-monaco-editor-material-folder-generator" + ], + [ + "hook", + "#icon-monaco-editor-material-folder-hook" + ], + [ + "hooks", + "#icon-monaco-editor-material-folder-hook" + ], + [ + "trigger", + "#icon-monaco-editor-material-folder-hook" + ], + [ + "triggers", + "#icon-monaco-editor-material-folder-hook" + ], + [ + "job", + "#icon-monaco-editor-material-folder-job" + ], + [ + "jobs", + "#icon-monaco-editor-material-folder-job" + ], + [ + "keys", + "#icon-monaco-editor-material-folder-keys" + ], + [ + "key", + "#icon-monaco-editor-material-folder-keys" + ], + [ + "token", + "#icon-monaco-editor-material-folder-keys" + ], + [ + "tokens", + "#icon-monaco-editor-material-folder-keys" + ], + [ + "jwt", + "#icon-monaco-editor-material-folder-keys" + ], + [ + "layout", + "#icon-monaco-editor-material-folder-layout" + ], + [ + "layouts", + "#icon-monaco-editor-material-folder-layout" + ], + [ + "_layouts", + "#icon-monaco-editor-material-folder-layout" + ], + [ + "mail", + "#icon-monaco-editor-material-folder-mail" + ], + [ + "mails", + "#icon-monaco-editor-material-folder-mail" + ], + [ + "email", + "#icon-monaco-editor-material-folder-mail" + ], + [ + "emails", + "#icon-monaco-editor-material-folder-mail" + ], + [ + "smtp", + "#icon-monaco-editor-material-folder-mail" + ], + [ + "mailers", + "#icon-monaco-editor-material-folder-mail" + ], + [ + "mappings", + "#icon-monaco-editor-material-folder-mappings" + ], + [ + "mapping", + "#icon-monaco-editor-material-folder-mappings" + ], + [ + "meta", + "#icon-monaco-editor-material-folder-meta" + ], + [ + ".changesets", + "#icon-monaco-editor-material-folder-changesets" + ], + [ + ".changeset", + "#icon-monaco-editor-material-folder-changesets" + ], + [ + "package", + "#icon-monaco-editor-material-folder-packages" + ], + [ + "packages", + "#icon-monaco-editor-material-folder-packages" + ], + [ + "pkg", + "#icon-monaco-editor-material-folder-packages" + ], + [ + "pkgs", + "#icon-monaco-editor-material-folder-packages" + ], + [ + "shared", + "#icon-monaco-editor-material-folder-shared" + ], + [ + "common", + "#icon-monaco-editor-material-folder-shared" + ], + [ + "glsl", + "#icon-monaco-editor-material-folder-shader" + ], + [ + "hlsl", + "#icon-monaco-editor-material-folder-shader" + ], + [ + "shader", + "#icon-monaco-editor-material-folder-shader" + ], + [ + "shaders", + "#icon-monaco-editor-material-folder-shader" + ], + [ + "stack", + "#icon-monaco-editor-material-folder-stack" + ], + [ + "stacks", + "#icon-monaco-editor-material-folder-stack" + ], + [ + "template", + "#icon-monaco-editor-material-folder-template" + ], + [ + "templates", + "#icon-monaco-editor-material-folder-template" + ], + [ + "util", + "#icon-monaco-editor-material-folder-utils" + ], + [ + "utils", + "#icon-monaco-editor-material-folder-utils" + ], + [ + "utility", + "#icon-monaco-editor-material-folder-utils" + ], + [ + "utilities", + "#icon-monaco-editor-material-folder-utils" + ], + [ + "supabase", + "#icon-monaco-editor-material-folder-supabase" + ], + [ + ".supabase", + "#icon-monaco-editor-material-folder-supabase" + ], + [ + "private", + "#icon-monaco-editor-material-folder-private" + ], + [ + ".private", + "#icon-monaco-editor-material-folder-private" + ], + [ + "error", + "#icon-monaco-editor-material-folder-error" + ], + [ + "errors", + "#icon-monaco-editor-material-folder-error" + ], + [ + "err", + "#icon-monaco-editor-material-folder-error" + ], + [ + "event", + "#icon-monaco-editor-material-folder-event" + ], + [ + "events", + "#icon-monaco-editor-material-folder-event" + ], + [ + "auth", + "#icon-monaco-editor-material-folder-secure" + ], + [ + "authentication", + "#icon-monaco-editor-material-folder-secure" + ], + [ + "secure", + "#icon-monaco-editor-material-folder-secure" + ], + [ + "security", + "#icon-monaco-editor-material-folder-secure" + ], + [ + "cert", + "#icon-monaco-editor-material-folder-secure" + ], + [ + "certs", + "#icon-monaco-editor-material-folder-secure" + ], + [ + "certificate", + "#icon-monaco-editor-material-folder-secure" + ], + [ + "certificates", + "#icon-monaco-editor-material-folder-secure" + ], + [ + "ssl", + "#icon-monaco-editor-material-folder-secure" + ], + [ + "custom", + "#icon-monaco-editor-material-folder-custom" + ], + [ + "customs", + "#icon-monaco-editor-material-folder-custom" + ], + [ + "_draft", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "_drafts", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "mock", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "mocks", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "fixture", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "fixtures", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "draft", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "drafts", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "concept", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "concepts", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "sketch", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "sketches", + "#icon-monaco-editor-material-folder-mock" + ], + [ + "syntax", + "#icon-monaco-editor-material-folder-syntax" + ], + [ + "syntaxes", + "#icon-monaco-editor-material-folder-syntax" + ], + [ + "spellcheck", + "#icon-monaco-editor-material-folder-syntax" + ], + [ + "vm", + "#icon-monaco-editor-material-folder-vm" + ], + [ + "vms", + "#icon-monaco-editor-material-folder-vm" + ], + [ + "stylus", + "#icon-monaco-editor-material-folder-stylus" + ], + [ + "flow-typed", + "#icon-monaco-editor-material-folder-flow" + ], + [ + "rule", + "#icon-monaco-editor-material-folder-rules" + ], + [ + "rules", + "#icon-monaco-editor-material-folder-rules" + ], + [ + "validation", + "#icon-monaco-editor-material-folder-rules" + ], + [ + "validations", + "#icon-monaco-editor-material-folder-rules" + ], + [ + "validator", + "#icon-monaco-editor-material-folder-rules" + ], + [ + "validators", + "#icon-monaco-editor-material-folder-rules" + ], + [ + "review", + "#icon-monaco-editor-material-folder-review" + ], + [ + "reviews", + "#icon-monaco-editor-material-folder-review" + ], + [ + "revisal", + "#icon-monaco-editor-material-folder-review" + ], + [ + "revisals", + "#icon-monaco-editor-material-folder-review" + ], + [ + "reviewed", + "#icon-monaco-editor-material-folder-review" + ], + [ + "anim", + "#icon-monaco-editor-material-folder-animation" + ], + [ + "anims", + "#icon-monaco-editor-material-folder-animation" + ], + [ + "animation", + "#icon-monaco-editor-material-folder-animation" + ], + [ + "animations", + "#icon-monaco-editor-material-folder-animation" + ], + [ + "animated", + "#icon-monaco-editor-material-folder-animation" + ], + [ + "guard", + "#icon-monaco-editor-material-folder-guard" + ], + [ + "guards", + "#icon-monaco-editor-material-folder-guard" + ], + [ + "prisma", + "#icon-monaco-editor-material-folder-prisma" + ], + [ + "pipe", + "#icon-monaco-editor-material-folder-pipe" + ], + [ + "pipes", + "#icon-monaco-editor-material-folder-pipe" + ], + [ + "svg", + "#icon-monaco-editor-material-folder-svg" + ], + [ + "svgs", + "#icon-monaco-editor-material-folder-svg" + ], + [ + "terraform", + "#icon-monaco-editor-material-folder-terraform" + ], + [ + ".terraform", + "#icon-monaco-editor-material-folder-terraform" + ], + [ + "mobile", + "#icon-monaco-editor-material-folder-mobile" + ], + [ + "mobiles", + "#icon-monaco-editor-material-folder-mobile" + ], + [ + "portable", + "#icon-monaco-editor-material-folder-mobile" + ], + [ + "portability", + "#icon-monaco-editor-material-folder-mobile" + ], + [ + ".stencil", + "#icon-monaco-editor-material-folder-stencil" + ], + [ + "firebase", + "#icon-monaco-editor-material-folder-firebase" + ], + [ + ".firebase", + "#icon-monaco-editor-material-folder-firebase" + ], + [ + "svelte", + "#icon-monaco-editor-material-folder-svelte" + ], + [ + ".svelte-kit", + "#icon-monaco-editor-material-folder-svelte" + ], + [ + "update", + "#icon-monaco-editor-material-folder-update" + ], + [ + "updates", + "#icon-monaco-editor-material-folder-update" + ], + [ + "upgrade", + "#icon-monaco-editor-material-folder-update" + ], + [ + "upgrades", + "#icon-monaco-editor-material-folder-update" + ], + [ + ".idea", + "#icon-monaco-editor-material-folder-intellij" + ], + [ + ".azure-pipelines", + "#icon-monaco-editor-material-folder-azure-pipelines" + ], + [ + ".azure-pipelines-ci", + "#icon-monaco-editor-material-folder-azure-pipelines" + ], + [ + "mjml", + "#icon-monaco-editor-material-folder-mjml" + ], + [ + "admin", + "#icon-monaco-editor-material-folder-admin" + ], + [ + "manager", + "#icon-monaco-editor-material-folder-admin" + ], + [ + "moderator", + "#icon-monaco-editor-material-folder-admin" + ], + [ + "scala", + "#icon-monaco-editor-material-folder-scala" + ], + [ + "connection", + "#icon-monaco-editor-material-folder-connection" + ], + [ + "connections", + "#icon-monaco-editor-material-folder-connection" + ], + [ + "integration", + "#icon-monaco-editor-material-folder-connection" + ], + [ + "integrations", + "#icon-monaco-editor-material-folder-connection" + ], + [ + ".quasar", + "#icon-monaco-editor-material-folder-quasar" + ], + [ + ".next", + "#icon-monaco-editor-material-folder-next" + ], + [ + "cobol", + "#icon-monaco-editor-material-folder-cobol" + ], + [ + "yarn", + "#icon-monaco-editor-material-folder-yarn" + ], + [ + ".yarn", + "#icon-monaco-editor-material-folder-yarn" + ], + [ + "husky", + "#icon-monaco-editor-material-folder-husky" + ], + [ + ".husky", + "#icon-monaco-editor-material-folder-husky" + ], + [ + ".storybook", + "#icon-monaco-editor-material-folder-storybook" + ], + [ + "storybook", + "#icon-monaco-editor-material-folder-storybook" + ], + [ + "stories", + "#icon-monaco-editor-material-folder-storybook" + ], + [ + "__stories__", + "#icon-monaco-editor-material-folder-storybook" + ], + [ + "base", + "#icon-monaco-editor-material-folder-base" + ], + [ + ".base", + "#icon-monaco-editor-material-folder-base" + ], + [ + "bases", + "#icon-monaco-editor-material-folder-base" + ], + [ + "cart", + "#icon-monaco-editor-material-folder-cart" + ], + [ + "shopping-cart", + "#icon-monaco-editor-material-folder-cart" + ], + [ + "shopping", + "#icon-monaco-editor-material-folder-cart" + ], + [ + "shop", + "#icon-monaco-editor-material-folder-cart" + ], + [ + "home", + "#icon-monaco-editor-material-folder-home" + ], + [ + ".home", + "#icon-monaco-editor-material-folder-home" + ], + [ + "start", + "#icon-monaco-editor-material-folder-home" + ], + [ + ".start", + "#icon-monaco-editor-material-folder-home" + ], + [ + "project", + "#icon-monaco-editor-material-folder-project" + ], + [ + "projects", + "#icon-monaco-editor-material-folder-project" + ], + [ + ".project", + "#icon-monaco-editor-material-folder-project" + ], + [ + ".projects", + "#icon-monaco-editor-material-folder-project" + ], + [ + "interface", + "#icon-monaco-editor-material-folder-interface" + ], + [ + "interfaces", + "#icon-monaco-editor-material-folder-interface" + ], + [ + ".netlify", + "#icon-monaco-editor-material-folder-netlify" + ], + [ + "pact", + "#icon-monaco-editor-material-folder-contract" + ], + [ + "pacts", + "#icon-monaco-editor-material-folder-contract" + ], + [ + "contract", + "#icon-monaco-editor-material-folder-contract" + ], + [ + ".contract", + "#icon-monaco-editor-material-folder-contract" + ], + [ + "contracts", + "#icon-monaco-editor-material-folder-contract" + ], + [ + "contract-testing", + "#icon-monaco-editor-material-folder-contract" + ], + [ + "contract-test", + "#icon-monaco-editor-material-folder-contract" + ], + [ + "contract-tests", + "#icon-monaco-editor-material-folder-contract" + ], + [ + "queue", + "#icon-monaco-editor-material-folder-queue" + ], + [ + "queues", + "#icon-monaco-editor-material-folder-queue" + ], + [ + "bull", + "#icon-monaco-editor-material-folder-queue" + ], + [ + "mq", + "#icon-monaco-editor-material-folder-queue" + ], + [ + "vercel", + "#icon-monaco-editor-material-folder-vercel" + ], + [ + ".vercel", + "#icon-monaco-editor-material-folder-vercel" + ], + [ + "now", + "#icon-monaco-editor-material-folder-vercel" + ], + [ + ".now", + "#icon-monaco-editor-material-folder-vercel" + ], + [ + "cypress", + "#icon-monaco-editor-material-folder-cypress" + ], + [ + ".cypress", + "#icon-monaco-editor-material-folder-cypress" + ], + [ + "decorator", + "#icon-monaco-editor-material-folder-decorators" + ], + [ + "decorators", + "#icon-monaco-editor-material-folder-decorators" + ], + [ + "java", + "#icon-monaco-editor-material-folder-java" + ], + [ + "resolver", + "#icon-monaco-editor-material-folder-resolver" + ], + [ + "resolvers", + "#icon-monaco-editor-material-folder-resolver" + ], + [ + "angular", + "#icon-monaco-editor-material-folder-angular" + ], + [ + ".angular", + "#icon-monaco-editor-material-folder-angular" + ], + [ + "unity", + "#icon-monaco-editor-material-folder-unity" + ], + [ + "pdf", + "#icon-monaco-editor-material-folder-pdf" + ], + [ + "pdfs", + "#icon-monaco-editor-material-folder-pdf" + ], + [ + "protobufs", + "#icon-monaco-editor-material-folder-proto" + ], + [ + "proto", + "#icon-monaco-editor-material-folder-proto" + ], + [ + "plastic", + "#icon-monaco-editor-material-folder-plastic" + ], + [ + ".plastic", + "#icon-monaco-editor-material-folder-plastic" + ], + [ + "gamemaker", + "#icon-monaco-editor-material-folder-gamemaker" + ], + [ + "gamemaker2", + "#icon-monaco-editor-material-folder-gamemaker" + ], + [ + ".hg", + "#icon-monaco-editor-material-folder-mercurial" + ], + [ + "hghooks", + "#icon-monaco-editor-material-folder-mercurial" + ], + [ + ".hghooks", + "#icon-monaco-editor-material-folder-mercurial" + ], + [ + ".hgext", + "#icon-monaco-editor-material-folder-mercurial" + ], + [ + "godot", + "#icon-monaco-editor-material-folder-godot" + ], + [ + ".godot", + "#icon-monaco-editor-material-folder-godot" + ], + [ + "godot-cpp", + "#icon-monaco-editor-material-folder-godot" + ], + [ + ".godot-cpp", + "#icon-monaco-editor-material-folder-godot" + ] +] \ No newline at end of file diff --git a/workspace/plugins/monaco-editor/src/assets/entries/light/file-extension-icon.json b/workspace/plugins/monaco-editor/src/assets/entries/light/file-extension-icon.json new file mode 100644 index 0000000..262d9e5 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/assets/entries/light/file-extension-icon.json @@ -0,0 +1,74 @@ +[ + [ + ".blink", + "#icon-monaco-editor-material-blink_light" + ], + [ + ".jinja", + "#icon-monaco-editor-material-jinja_light" + ], + [ + ".jinja2", + "#icon-monaco-editor-material-jinja_light" + ], + [ + ".j2", + "#icon-monaco-editor-material-jinja_light" + ], + [ + ".jinja-html", + "#icon-monaco-editor-material-jinja_light" + ], + [ + ".cr", + "#icon-monaco-editor-material-crystal_light" + ], + [ + ".ecr", + "#icon-monaco-editor-material-crystal_light" + ], + [ + ".drone.yml", + "#icon-monaco-editor-material-drone_light" + ], + [ + "..wakatime-project", + "#icon-monaco-editor-material-wakatime_light" + ], + [ + ".hcl", + "#icon-monaco-editor-material-hcl_light" + ], + [ + ".iuml", + "#icon-monaco-editor-material-uml_light" + ], + [ + ".pu", + "#icon-monaco-editor-material-uml_light" + ], + [ + ".puml", + "#icon-monaco-editor-material-uml_light" + ], + [ + ".plantuml", + "#icon-monaco-editor-material-uml_light" + ], + [ + ".wsd", + "#icon-monaco-editor-material-uml_light" + ], + [ + ".pgn", + "#icon-monaco-editor-material-chess_light" + ], + [ + ".fen", + "#icon-monaco-editor-material-chess_light" + ], + [ + ".tldr", + "#icon-monaco-editor-material-tldraw_light" + ] +] \ No newline at end of file diff --git a/workspace/plugins/monaco-editor/src/assets/entries/light/file-icon.json b/workspace/plugins/monaco-editor/src/assets/entries/light/file-icon.json new file mode 100644 index 0000000..9ca1787 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/assets/entries/light/file-icon.json @@ -0,0 +1,306 @@ +[ + [ + ".rubocop.yml", + "#icon-monaco-editor-material-rubocop_light" + ], + [ + ".rubocop-todo.yml", + "#icon-monaco-editor-material-rubocop_light" + ], + [ + ".rubocop_todo.yml", + "#icon-monaco-editor-material-rubocop_light" + ], + [ + "vercel.json", + "#icon-monaco-editor-material-vercel_light" + ], + [ + ".vercelignore", + "#icon-monaco-editor-material-vercel_light" + ], + [ + "now.json", + "#icon-monaco-editor-material-vercel_light" + ], + [ + ".nowignore", + "#icon-monaco-editor-material-vercel_light" + ], + [ + "next.config.js", + "#icon-monaco-editor-material-next_light" + ], + [ + "next.config.mjs", + "#icon-monaco-editor-material-next_light" + ], + [ + "next.config.ts", + "#icon-monaco-editor-material-next_light" + ], + [ + "next.config.mts", + "#icon-monaco-editor-material-next_light" + ], + [ + "remix.config.js", + "#icon-monaco-editor-material-remix_light" + ], + [ + "remix.config.ts", + "#icon-monaco-editor-material-remix_light" + ], + [ + "turbo.json", + "#icon-monaco-editor-material-turborepo_light" + ], + [ + ".autorc", + "#icon-monaco-editor-material-auto_light" + ], + [ + "auto.config.js", + "#icon-monaco-editor-material-auto_light" + ], + [ + "auto.config.ts", + "#icon-monaco-editor-material-auto_light" + ], + [ + "auto-config.json", + "#icon-monaco-editor-material-auto_light" + ], + [ + "auto-config.yaml", + "#icon-monaco-editor-material-auto_light" + ], + [ + "auto-config.yml", + "#icon-monaco-editor-material-auto_light" + ], + [ + "auto-config.ts", + "#icon-monaco-editor-material-auto_light" + ], + [ + "auto-config.js", + "#icon-monaco-editor-material-auto_light" + ], + [ + ".stylelintrc", + "#icon-monaco-editor-material-stylelint_light" + ], + [ + "stylelint.config.js", + "#icon-monaco-editor-material-stylelint_light" + ], + [ + "stylelint.config.cjs", + "#icon-monaco-editor-material-stylelint_light" + ], + [ + ".stylelintrc.json", + "#icon-monaco-editor-material-stylelint_light" + ], + [ + ".stylelintrc.yaml", + "#icon-monaco-editor-material-stylelint_light" + ], + [ + ".stylelintrc.yml", + "#icon-monaco-editor-material-stylelint_light" + ], + [ + ".stylelintrc.js", + "#icon-monaco-editor-material-stylelint_light" + ], + [ + ".stylelintrc.cjs", + "#icon-monaco-editor-material-stylelint_light" + ], + [ + ".stylelintignore", + "#icon-monaco-editor-material-stylelint_light" + ], + [ + ".stylelintcache", + "#icon-monaco-editor-material-stylelint_light" + ], + [ + ".codeclimate.yml", + "#icon-monaco-editor-material-code-climate_light" + ], + [ + "browserslist", + "#icon-monaco-editor-material-browserlist_light" + ], + [ + ".browserslistrc", + "#icon-monaco-editor-material-browserlist_light" + ], + [ + ".drone.yml", + "#icon-monaco-editor-material-drone_light" + ], + [ + ".wakatime-project", + "#icon-monaco-editor-material-wakatime_light" + ], + [ + "circle.yml", + "#icon-monaco-editor-material-circleci_light" + ], + [ + ".releaserc", + "#icon-monaco-editor-material-semantic-release_light" + ], + [ + ".releaserc.yaml", + "#icon-monaco-editor-material-semantic-release_light" + ], + [ + ".releaserc.yml", + "#icon-monaco-editor-material-semantic-release_light" + ], + [ + ".releaserc.json", + "#icon-monaco-editor-material-semantic-release_light" + ], + [ + ".releaserc.js", + "#icon-monaco-editor-material-semantic-release_light" + ], + [ + ".releaserc.cjs", + "#icon-monaco-editor-material-semantic-release_light" + ], + [ + "release.config.js", + "#icon-monaco-editor-material-semantic-release_light" + ], + [ + "release.config.cjs", + "#icon-monaco-editor-material-semantic-release_light" + ], + [ + "netlify.json", + "#icon-monaco-editor-material-netlify_light" + ], + [ + "netlify.yml", + "#icon-monaco-editor-material-netlify_light" + ], + [ + "netlify.yaml", + "#icon-monaco-editor-material-netlify_light" + ], + [ + "netlify.toml", + "#icon-monaco-editor-material-netlify_light" + ], + [ + "stitches.config.js", + "#icon-monaco-editor-material-stitches_light" + ], + [ + "stitches.config.ts", + "#icon-monaco-editor-material-stitches_light" + ], + [ + "snowpack.config.js", + "#icon-monaco-editor-material-snowpack_light" + ], + [ + "snowpack.config.cjs", + "#icon-monaco-editor-material-snowpack_light" + ], + [ + "snowpack.config.mjs", + "#icon-monaco-editor-material-snowpack_light" + ], + [ + "snowpack.config.ts", + "#icon-monaco-editor-material-snowpack_light" + ], + [ + "snowpack.config.cts", + "#icon-monaco-editor-material-snowpack_light" + ], + [ + "snowpack.config.mts", + "#icon-monaco-editor-material-snowpack_light" + ], + [ + "snowpack.deps.json", + "#icon-monaco-editor-material-snowpack_light" + ], + [ + "snowpack.config.json", + "#icon-monaco-editor-material-snowpack_light" + ], + [ + "pnpm-lock.yaml", + "#icon-monaco-editor-material-pnpm_light" + ], + [ + "pnpm-workspace.yaml", + "#icon-monaco-editor-material-pnpm_light" + ], + [ + ".pnpmfile.cjs", + "#icon-monaco-editor-material-pnpm_light" + ], + [ + "bun.lockb", + "#icon-monaco-editor-material-bun_light" + ], + [ + ".nano-staged.js", + "#icon-monaco-editor-material-nano-staged_light" + ], + [ + "nano-staged.js", + "#icon-monaco-editor-material-nano-staged_light" + ], + [ + ".nano-staged.cjs", + "#icon-monaco-editor-material-nano-staged_light" + ], + [ + "nano-staged.cjs", + "#icon-monaco-editor-material-nano-staged_light" + ], + [ + ".nano-staged.mjs", + "#icon-monaco-editor-material-nano-staged_light" + ], + [ + "nano-staged.mjs", + "#icon-monaco-editor-material-nano-staged_light" + ], + [ + ".nano-staged.json", + "#icon-monaco-editor-material-nano-staged_light" + ], + [ + "nano-staged.json", + "#icon-monaco-editor-material-nano-staged_light" + ], + [ + ".nanostagedrc", + "#icon-monaco-editor-material-nano-staged_light" + ], + [ + "deno.json", + "#icon-monaco-editor-material-deno_light" + ], + [ + "deno.jsonc", + "#icon-monaco-editor-material-deno_light" + ], + [ + "deno.lock", + "#icon-monaco-editor-material-deno_light" + ] +] \ No newline at end of file diff --git a/workspace/plugins/monaco-editor/src/assets/entries/light/folder-expanded-icon.json b/workspace/plugins/monaco-editor/src/assets/entries/light/folder-expanded-icon.json new file mode 100644 index 0000000..ccd40ca --- /dev/null +++ b/workspace/plugins/monaco-editor/src/assets/entries/light/folder-expanded-icon.json @@ -0,0 +1,18 @@ +[ + [ + "jinja", + "#icon-monaco-editor-material-folder-jinja-open_light" + ], + [ + "jinja2", + "#icon-monaco-editor-material-folder-jinja-open_light" + ], + [ + "j2", + "#icon-monaco-editor-material-folder-jinja-open_light" + ], + [ + ".idea", + "#icon-monaco-editor-material-folder-intellij-open_light" + ] +] \ No newline at end of file diff --git a/workspace/plugins/monaco-editor/src/assets/entries/light/folder-icon.json b/workspace/plugins/monaco-editor/src/assets/entries/light/folder-icon.json new file mode 100644 index 0000000..b4b3f31 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/assets/entries/light/folder-icon.json @@ -0,0 +1,18 @@ +[ + [ + "jinja", + "#icon-monaco-editor-material-folder-jinja_light" + ], + [ + "jinja2", + "#icon-monaco-editor-material-folder-jinja_light" + ], + [ + "j2", + "#icon-monaco-editor-material-folder-jinja_light" + ], + [ + ".idea", + "#icon-monaco-editor-material-folder-intellij_light" + ] +] \ No newline at end of file diff --git a/workspace/plugins/monaco-editor/src/assets/symbols/icon-monaco-editor-material-icons.symbol b/workspace/plugins/monaco-editor/src/assets/symbols/icon-monaco-editor-material-icons.symbol new file mode 100644 index 0000000..5aafcd3 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/assets/symbols/icon-monaco-editor-material-icons.symbol @@ -0,0 +1,4209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 96-logo-horizontal + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + D + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bun Logo + + + + + + + + + + + + + + + + + + + Bun Logo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/workspace/plugins/monaco-editor/src/components/Tab.svelte b/workspace/plugins/monaco-editor/src/components/EditorTab.svelte similarity index 100% rename from workspace/plugins/monaco-editor/src/components/Tab.svelte rename to workspace/plugins/monaco-editor/src/components/EditorTab.svelte diff --git a/workspace/plugins/monaco-editor/src/constants.ts b/workspace/plugins/monaco-editor/src/constants.ts index 6745c8e..ce8053b 100644 --- a/workspace/plugins/monaco-editor/src/constants.ts +++ b/workspace/plugins/monaco-editor/src/constants.ts @@ -18,4 +18,6 @@ export default { INIT_CHANNEL_NAME: "monaco-editor-init", // 初始化通道名称 MESSAGE_EVENT_NAME: "message", // 消息事件名称 + ID_PREFIX_MATERIAL: "#icon-monaco-editor-material", // 图标 symbol 的 ID 前缀 + ID_PREFIX_MATERIAL_LIGHT: "#icon-monaco-editor-material-light", // 明亮主题图标 symbol 的 ID 前缀 } as const; diff --git a/workspace/plugins/monaco-editor/src/explorer/icon.ts b/workspace/plugins/monaco-editor/src/explorer/icon.ts index 57e78fb..f65c616 100644 --- a/workspace/plugins/monaco-editor/src/explorer/icon.ts +++ b/workspace/plugins/monaco-editor/src/explorer/icon.ts @@ -19,6 +19,20 @@ import type MonacoEditorPlugin from "@/index"; import { FileTreeNodeType, type IFileTreeNodeStores } from "@workspace/components/siyuan/tree/file"; import { parse } from "@workspace/utils/path/browserify"; import { get } from "svelte/store"; +import { FLAG_LIGHT } from "@workspace/utils/env/native-front-end"; +import type { ParsedPath } from "path"; + +import file_icon from "@/assets/entries/file-icon.json"; +import file_extension_icon from "@/assets/entries/file-extension-icon.json"; +import folder_icon from "@/assets/entries/folder-icon.json"; +import folder_expanded_icon from "@/assets/entries/folder-expanded-icon.json"; + +import file_icon_light from "@/assets/entries/light/file-icon.json"; +import file_extension_icon_light from "@/assets/entries/light/file-extension-icon.json"; +import folder_icon_light from "@/assets/entries/light/folder-icon.json"; +import folder_expanded_icon_light from "@/assets/entries/light/folder-expanded-icon.json"; + +export type IEntries = [string, string][]; /* 图标管理 */ export class Icon { @@ -29,10 +43,31 @@ export class Icon { folder_opend: "#icon-monaco-editor-folder-opend", siyuan: "#iconSiYuan", workspace: "#iconWorkspace", + + material: { + file: "#icon-monaco-editor-material-file", + + folder: "#icon-monaco-editor-material-folder", + folderExpanded: "#icon-monaco-editor-material-folder-open", + + rootFolder: "#icon-monaco-editor-material-folder-root", + rootFolderExpanded: "#icon-monaco-editor-material-folder-root-open", + } as const, } as const; protected readonly i18n: MonacoEditorPlugin["i18n"]; protected readonly map: Map; // 路径 -> 图标 ID 映射表 + protected readonly material = { + fileNames: new Map(file_icon as IEntries), + fileExtensions: new Map(file_extension_icon as IEntries), + folderNames: new Map(folder_icon as IEntries), + folderNamesExpanded: new Map(folder_expanded_icon as IEntries), + + fileNamesLight: new Map(file_icon_light as IEntries), + fileExtensionsLight: new Map(file_extension_icon_light as IEntries), + folderNamesLight: new Map(folder_icon_light as IEntries), + folderNamesExpandedLight: new Map(folder_expanded_icon_light as IEntries), + } as const; constructor( public readonly plugin: InstanceType, // 插件对象 @@ -43,38 +78,76 @@ export class Icon { /* 展开节点 */ public expand(node: IFileTreeNodeStores): void { - if (get(node.type) === FileTreeNodeType.Folder) { - node.icon.set(Icon.ICONS.folder_opend); - } + node.icon.set(this.make(get(node.type), get(node.relative), true)); } /* 收缩节点 */ public collapse(node: IFileTreeNodeStores): void { - if (get(node.type) === FileTreeNodeType.Folder) { - node.icon.set(Icon.ICONS.folder_closed); - } + node.icon.set(this.make(get(node.type), get(node.relative), false)); } /* 根据节点信息生成图标 ID */ - public make(type: FileTreeNodeType, path: string): string { + public make( + type: FileTreeNodeType, + path: string, + expanded: boolean = false, + light: boolean = FLAG_LIGHT, + ): string { /* 若映射表中存在对应的图标, 则直接使用 */ const icon = this.map.get(path); if (icon) return icon; + const info = parse(path); // 节点路径信息 + switch (type) { - case FileTreeNodeType.Root: - return Icon.ICONS.workspace; + case FileTreeNodeType.Root: // 根目录节点 + return this.makeRootNodeIcon(expanded, light); case FileTreeNodeType.Folder: - return Icon.ICONS.folder_closed; + return this.makeFolderNodeIcon(info, expanded, light); case FileTreeNodeType.File: { - const info = parse(path); // 节点路径信息 - switch (true) { - case info.ext === ".sy": // 思源文件 - return Icon.ICONS.siyuan; - default: - return Icon.ICONS.file; - } + return this.makeFileodeIcon(info, light); } } } + + makeRootNodeIcon( + expanded: boolean = false, + light: boolean = FLAG_LIGHT, + ): string { + return expanded ? Icon.ICONS.material.rootFolderExpanded : Icon.ICONS.material.rootFolder; + } + + makeFolderNodeIcon( + info: ParsedPath, + expanded: boolean = false, + light: boolean = FLAG_LIGHT, + ): string { + return (light + ? (expanded + ? this.material.folderNamesExpandedLight // 文件夹名称->浅色展开图标 + : this.material.folderNamesLight // 文件夹名称->浅色图标 + ).get(info.base) + : undefined) + ?? (expanded + ? this.material.folderNamesExpanded // 文件夹名称->展开图标 + : this.material.folderNames // 文件夹名称->图标 + ).get(info.base) // 文件夹名称->图标 + ?? (expanded + ? Icon.ICONS.material.folderExpanded // 默认文件夹展开图标 + : Icon.ICONS.material.folder // 默认文件夹图标 + ); + } + + makeFileodeIcon( + info: ParsedPath, + light: boolean = FLAG_LIGHT, + ): string { + return (light ? ( + this.material.fileNamesLight.get(info.base) // 文件名称->浅色图标 + ?? this.material.fileExtensionsLight.get(info.ext) // 文件扩展名->浅色图标 + ) : undefined) + ?? this.material.fileNames.get(info.base) // 文件名称->图标 + ?? this.material.fileExtensions.get(info.ext) // 文件扩展名->图标 + ?? Icon.ICONS.material.file; // 默认文件图标 + } } diff --git a/workspace/plugins/monaco-editor/src/explorer/index.ts b/workspace/plugins/monaco-editor/src/explorer/index.ts index e0d0744..d27d1bc 100644 --- a/workspace/plugins/monaco-editor/src/explorer/index.ts +++ b/workspace/plugins/monaco-editor/src/explorer/index.ts @@ -244,23 +244,25 @@ export class Explorer implements ITree { /* 折叠文件夹 */ public readonly fold = (e: ComponentEvents["fold"]) => { // plugin.logger.debug(e); - const props = e.detail.props; + const node = e.detail.props; + this.select.one(node); - this.collapseNode(props); + this.collapseNode(node); } /* 展开文件夹 */ public readonly unfold = async (e: ComponentEvents["unfold"]) => { // plugin.logger.debug(e); - const props = e.detail.props; + const node = e.detail.props; + this.select.one(node); - switch (get(props.type)) { + switch (get(node.type)) { case FileTreeNodeType.File: // 文件无需加载下级内容 break; case FileTreeNodeType.Root: case FileTreeNodeType.Folder: default: { - this.expandNode(props); + this.expandNode(node); break; } } diff --git a/workspace/plugins/monaco-editor/src/explorer/tooltip.ts b/workspace/plugins/monaco-editor/src/explorer/tooltip.ts index 4470ae1..2ce34ec 100644 --- a/workspace/plugins/monaco-editor/src/explorer/tooltip.ts +++ b/workspace/plugins/monaco-editor/src/explorer/tooltip.ts @@ -18,7 +18,6 @@ import type MonacoEditorPlugin from "@/index"; import { FileTreeNodeType } from "@workspace/components/siyuan/tree/file"; import { parse } from "@workspace/utils/path/browserify"; -import { Icon } from "./icon"; /* 提示信息管理 */ export class Tooltip { diff --git a/workspace/plugins/monaco-editor/src/index.ts b/workspace/plugins/monaco-editor/src/index.ts index 690294a..5f30979 100644 --- a/workspace/plugins/monaco-editor/src/index.ts +++ b/workspace/plugins/monaco-editor/src/index.ts @@ -19,11 +19,12 @@ import siyuan from "siyuan"; /* 静态资源 */ -import icon_plugin from "./assets/symbols/icon-monaco-editor.symbol?raw" -import icon_slash from "./assets/symbols/icon-monaco-editor-slash.symbol?raw" -import icon_file_tree from "./assets/symbols/icon-monaco-editor-file-tree.symbol?raw" -import icon_folder_opend from "./assets/symbols/icon-monaco-editor-folder-opend.symbol?raw" -import icon_folder_closed from "./assets/symbols/icon-monaco-editor-folder-closed.symbol?raw" +import icon_plugin from "./assets/symbols/icon-monaco-editor.symbol?raw"; +import icon_slash from "./assets/symbols/icon-monaco-editor-slash.symbol?raw"; +import icon_file_tree from "./assets/symbols/icon-monaco-editor-file-tree.symbol?raw"; +import icon_folder_opend from "./assets/symbols/icon-monaco-editor-folder-opend.symbol?raw"; +import icon_folder_closed from "./assets/symbols/icon-monaco-editor-folder-closed.symbol?raw"; +import icon_material_icons from "./assets/symbols/icon-monaco-editor-material-icons.symbol?raw"; /* SDK */ import { Client } from "@siyuan-community/siyuan-sdk"; @@ -41,7 +42,7 @@ import { normalize } from "@workspace/utils/path/normalize"; import { isBinaryPath } from "@workspace/utils/file/binary"; /* 组件 */ -import Tab from "./components/Tab.svelte"; +import Tab from "./components/EditorTab.svelte"; import EditorDock from "./components/EditorDock.svelte"; import ExplorerDock from "./components/ExplorerDock.svelte"; @@ -103,7 +104,17 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { const plugin = this; this.tab = this.addTab({ type: "-editor-tab", + beforeDestroy() { + // plugin.logger.debug("tab-beforeDestroy"); + }, + resize() { + // plugin.logger.debug("tab-resize"); + }, + update() { + // plugin.logger.debug("tab-update"); + }, init() { + // plugin.logger.debug("tab-init"); // plugin.logger.debug(this); const tab = this; this.component = new Tab({ @@ -116,6 +127,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { }); }, destroy() { + // plugin.logger.debug("tab-destroy"); this.component?.$destroy(); }, }); @@ -208,6 +220,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { icon_file_tree, // 文件树 icon_folder_opend, // 工作空间 icon_folder_closed, // 工作空间 + icon_material_icons, // 工作空间 ].join("")); this.loadData(MonacoEditorPlugin.GLOBAL_CONFIG_NAME) diff --git a/workspace/plugins/monaco-editor/tsconfig.node.json b/workspace/plugins/monaco-editor/tsconfig.node.json index 11e1806..6b66904 100644 --- a/workspace/plugins/monaco-editor/tsconfig.node.json +++ b/workspace/plugins/monaco-editor/tsconfig.node.json @@ -6,6 +6,7 @@ "moduleResolution": "bundler", }, "include": [ + "scripts/**/*.ts", "vite.config.ts", "vite.*.config.ts", ], diff --git a/workspace/pnpm-lock.yaml b/workspace/pnpm-lock.yaml index bd2810e..013c70c 100644 --- a/workspace/pnpm-lock.yaml +++ b/workspace/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@siyuan-community/siyuan-sdk': - specifier: ^0.1.0 - version: 0.1.0 + specifier: ^0.1.1 + version: 0.1.1 '@workspace/eslint-config-custom': specifier: workspace:* version: link:tools/eslint-config-custom @@ -28,11 +28,11 @@ importers: specifier: ^2.8.8 version: 2.8.8 siyuan: - specifier: ^0.7.7 - version: 0.7.7 + specifier: ^0.7.8 + version: 0.7.8 turbo: - specifier: ^1.10.7 - version: 1.10.7 + specifier: ^1.10.9 + version: 1.10.9 packages/apis: dependencies: @@ -280,19 +280,22 @@ importers: version: 1.3.3(monaco-editor@0.40.0) '@sveltejs/vite-plugin-svelte': specifier: ^2.4.2 - version: 2.4.2(svelte@3.59.2)(vite@4.4.4) + version: 2.4.2(svelte@3.59.2)(vite@4.4.6) '@tsconfig/svelte': specifier: ^4.0.1 version: 4.0.1 '@types/node': - specifier: ^20.4.2 - version: 20.4.2 + specifier: ^20.4.4 + version: 20.4.4 deepmerge: specifier: ^4.3.1 version: 4.3.1 less: specifier: ^4.1.3 version: 4.1.3 + material-icon-theme: + specifier: ^4.29.0 + version: 4.29.0 monaco-editor: specifier: ^0.40.0 version: 0.40.0 @@ -305,6 +308,9 @@ importers: svelte-preprocess-less: specifier: ^0.4.0 version: 0.4.0 + ts-node: + specifier: ^10.9.1 + version: 10.9.1(@types/node@20.4.4)(typescript@5.1.6) tslib: specifier: ^2.6.0 version: 2.6.0 @@ -312,11 +318,14 @@ importers: specifier: ^5.1.6 version: 5.1.6 vite: - specifier: ^4.4.4 - version: 4.4.4(@types/node@20.4.2)(less@4.1.3) + specifier: ^4.4.6 + version: 4.4.6(@types/node@20.4.4)(less@4.1.3) vite-plugin-static-copy: specifier: ^0.16.0 - version: 0.16.0(vite@4.4.4) + version: 0.16.0(vite@4.4.6) + xml-js: + specifier: ^1.6.11 + version: 1.6.11 plugins/open-api: dependencies: @@ -398,7 +407,7 @@ importers: dependencies: '@sveltejs/vite-plugin-svelte': specifier: ^2.4.2 - version: 2.4.2(svelte@4.1.0)(vite@4.4.2) + version: 2.4.2(svelte@4.1.1)(vite@4.4.2) '@vitejs/plugin-vue': specifier: ^4.2.3 version: 4.2.3(vite@4.4.2)(vue@3.3.4) @@ -524,6 +533,13 @@ packages: js-yaml: 4.1.0 dev: true + /@cspotcode/source-map-support@0.8.1: + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + dev: true + /@esbuild/android-arm64@0.17.19: resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} engines: {node: '>=12'} @@ -550,6 +566,15 @@ packages: dev: true optional: true + /@esbuild/android-arm64@0.18.15: + resolution: {integrity: sha512-NI/gnWcMl2kXt1HJKOn2H69SYn4YNheKo6NZt1hyfKWdMbaGadxjZIkcj4Gjk/WPxnbFXs9/3HjGHaknCqjrww==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.17.19: resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} engines: {node: '>=12'} @@ -576,6 +601,15 @@ packages: dev: true optional: true + /@esbuild/android-arm@0.18.15: + resolution: {integrity: sha512-wlkQBWb79/jeEEoRmrxt/yhn5T1lU236OCNpnfRzaCJHZ/5gf82uYx1qmADTBWE0AR/v7FiozE1auk2riyQd3w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.17.19: resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} engines: {node: '>=12'} @@ -602,6 +636,15 @@ packages: dev: true optional: true + /@esbuild/android-x64@0.18.15: + resolution: {integrity: sha512-FM9NQamSaEm/IZIhegF76aiLnng1kEsZl2eve/emxDeReVfRuRNmvT28l6hoFD9TsCxpK+i4v8LPpEj74T7yjA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.17.19: resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} engines: {node: '>=12'} @@ -628,6 +671,15 @@ packages: dev: true optional: true + /@esbuild/darwin-arm64@0.18.15: + resolution: {integrity: sha512-XmrFwEOYauKte9QjS6hz60FpOCnw4zaPAb7XV7O4lx1r39XjJhTN7ZpXqJh4sN6q60zbP6QwAVVA8N/wUyBH/w==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.17.19: resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} engines: {node: '>=12'} @@ -654,6 +706,15 @@ packages: dev: true optional: true + /@esbuild/darwin-x64@0.18.15: + resolution: {integrity: sha512-bMqBmpw1e//7Fh5GLetSZaeo9zSC4/CMtrVFdj+bqKPGJuKyfNJ5Nf2m3LknKZTS+Q4oyPiON+v3eaJ59sLB5A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.17.19: resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} engines: {node: '>=12'} @@ -680,6 +741,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-arm64@0.18.15: + resolution: {integrity: sha512-LoTK5N3bOmNI9zVLCeTgnk5Rk0WdUTrr9dyDAQGVMrNTh9EAPuNwSTCgaKOKiDpverOa0htPcO9NwslSE5xuLA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.17.19: resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} engines: {node: '>=12'} @@ -706,6 +776,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-x64@0.18.15: + resolution: {integrity: sha512-62jX5n30VzgrjAjOk5orYeHFq6sqjvsIj1QesXvn5OZtdt5Gdj0vUNJy9NIpjfdNdqr76jjtzBJKf+h2uzYuTQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.17.19: resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} engines: {node: '>=12'} @@ -732,6 +811,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm64@0.18.15: + resolution: {integrity: sha512-BWncQeuWDgYv0jTNzJjaNgleduV4tMbQjmk/zpPh/lUdMcNEAxy+jvneDJ6RJkrqloG7tB9S9rCrtfk/kuplsQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.17.19: resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} engines: {node: '>=12'} @@ -758,6 +846,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm@0.18.15: + resolution: {integrity: sha512-dT4URUv6ir45ZkBqhwZwyFV6cH61k8MttIwhThp2BGiVtagYvCToF+Bggyx2VI57RG4Fbt21f9TmXaYx0DeUJg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.17.19: resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} engines: {node: '>=12'} @@ -784,6 +881,15 @@ packages: dev: true optional: true + /@esbuild/linux-ia32@0.18.15: + resolution: {integrity: sha512-JPXORvgHRHITqfms1dWT/GbEY89u848dC08o0yK3fNskhp0t2TuNUnsrrSgOdH28ceb1hJuwyr8R/1RnyPwocw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64@0.17.19: resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} engines: {node: '>=12'} @@ -810,6 +916,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64@0.18.15: + resolution: {integrity: sha512-kArPI0DopjJCEplsVj/H+2Qgzz7vdFSacHNsgoAKpPS6W/Ndh8Oe24HRDQ5QCu4jHgN6XOtfFfLpRx3TXv/mEg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-mips64el@0.17.19: resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} engines: {node: '>=12'} @@ -836,6 +951,15 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el@0.18.15: + resolution: {integrity: sha512-b/tmngUfO02E00c1XnNTw/0DmloKjb6XQeqxaYuzGwHe0fHVgx5/D6CWi+XH1DvkszjBUkK9BX7n1ARTOst59w==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.17.19: resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} engines: {node: '>=12'} @@ -862,6 +986,15 @@ packages: dev: true optional: true + /@esbuild/linux-ppc64@0.18.15: + resolution: {integrity: sha512-KXPY69MWw79QJkyvUYb2ex/OgnN/8N/Aw5UDPlgoRtoEfcBqfeLodPr42UojV3NdkoO4u10NXQdamWm1YEzSKw==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.17.19: resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} engines: {node: '>=12'} @@ -888,6 +1021,15 @@ packages: dev: true optional: true + /@esbuild/linux-riscv64@0.18.15: + resolution: {integrity: sha512-komK3NEAeeGRnvFEjX1SfVg6EmkfIi5aKzevdvJqMydYr9N+pRQK0PGJXk+bhoPZwOUgLO4l99FZmLGk/L1jWg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.17.19: resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} engines: {node: '>=12'} @@ -914,6 +1056,15 @@ packages: dev: true optional: true + /@esbuild/linux-s390x@0.18.15: + resolution: {integrity: sha512-632T5Ts6gQ2WiMLWRRyeflPAm44u2E/s/TJvn+BP6M5mnHSk93cieaypj3VSMYO2ePTCRqAFXtuYi1yv8uZJNA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.17.19: resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} engines: {node: '>=12'} @@ -940,6 +1091,15 @@ packages: dev: true optional: true + /@esbuild/linux-x64@0.18.15: + resolution: {integrity: sha512-MsHtX0NgvRHsoOtYkuxyk4Vkmvk3PLRWfA4okK7c+6dT0Fu4SUqXAr9y4Q3d8vUf1VWWb6YutpL4XNe400iQ1g==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.17.19: resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} engines: {node: '>=12'} @@ -966,6 +1126,15 @@ packages: dev: true optional: true + /@esbuild/netbsd-x64@0.18.15: + resolution: {integrity: sha512-djST6s+jQiwxMIVQ5rlt24JFIAr4uwUnzceuFL7BQT4CbrRtqBPueS4GjXSiIpmwVri1Icj/9pFRJ7/aScvT+A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.17.19: resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} engines: {node: '>=12'} @@ -992,6 +1161,15 @@ packages: dev: true optional: true + /@esbuild/openbsd-x64@0.18.15: + resolution: {integrity: sha512-naeRhUIvhsgeounjkF5mvrNAVMGAm6EJWiabskeE5yOeBbLp7T89tAEw0j5Jm/CZAwyLe3c67zyCWH6fsBLCpw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.17.19: resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} engines: {node: '>=12'} @@ -1018,6 +1196,15 @@ packages: dev: true optional: true + /@esbuild/sunos-x64@0.18.15: + resolution: {integrity: sha512-qkT2+WxyKbNIKV1AEhI8QiSIgTHMcRctzSaa/I3kVgMS5dl3fOeoqkb7pW76KwxHoriImhx7Mg3TwN/auMDsyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.17.19: resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} engines: {node: '>=12'} @@ -1044,6 +1231,15 @@ packages: dev: true optional: true + /@esbuild/win32-arm64@0.18.15: + resolution: {integrity: sha512-HC4/feP+pB2Vb+cMPUjAnFyERs+HJN7E6KaeBlFdBv799MhD+aPJlfi/yk36SED58J9TPwI8MAcVpJgej4ud0A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.17.19: resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} engines: {node: '>=12'} @@ -1070,6 +1266,15 @@ packages: dev: true optional: true + /@esbuild/win32-ia32@0.18.15: + resolution: {integrity: sha512-ovjwoRXI+gf52EVF60u9sSDj7myPixPxqzD5CmkEUmvs+W9Xd0iqISVBQn8xcx4ciIaIVlWCuTbYDOXOnOL44Q==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.17.19: resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} engines: {node: '>=12'} @@ -1096,6 +1301,15 @@ packages: dev: true optional: true + /@esbuild/win32-x64@0.18.15: + resolution: {integrity: sha512-imUxH9a3WJARyAvrG7srLyiK73XdX83NXQkjKvQ+7vPh3ZxoLrzvPkQKKw2DwZ+RV2ZB6vBfNHP8XScAmQC3aA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.45.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1111,6 +1325,11 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true + /@eslint-community/regexpp@4.6.0: + resolution: {integrity: sha512-uiPeRISaglZnaZk8vwrjQZ1CxogZeY/4IYft6gBOTqu1WhVXWmCmZMWxUv2Q/pxSvPdp1JPaO62kLOcOkMqWrw==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + /@eslint/eslintrc@2.1.0: resolution: {integrity: sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1253,6 +1472,13 @@ packages: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 + /@jridgewell/trace-mapping@0.3.9: + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + dependencies: + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /@jsdevtools/ono@7.1.3: resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} dev: true @@ -1435,8 +1661,8 @@ packages: react-is: 18.2.0 dev: true - /@siyuan-community/siyuan-sdk@0.1.0: - resolution: {integrity: sha512-shv5mSEBRYb4ZOtbJB4IMbuDj+gkgaO1RYp/keFeXRp/lmGqYmDF6wdioVGoIoXXGFzRSWh96r94pEaomcNCPw==} + /@siyuan-community/siyuan-sdk@0.1.1: + resolution: {integrity: sha512-zfmD97FOjR+auGdFRC7aIOtB3NDLO8SZ7kv3sJntzqyPisFE4VDR60f5UZzq5M4tbHg2rzQJayHrJhELUEsQyg==} dependencies: axios: 1.4.0 transitivePeerDependencies: @@ -1475,6 +1701,22 @@ packages: - supports-color dev: true + /@sveltejs/vite-plugin-svelte-inspector@1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@3.59.2)(vite@4.4.6): + resolution: {integrity: sha512-Khdl5jmmPN6SUsVuqSXatKpQTMIifoQPDanaxC84m9JxIibWvSABJyHpyys0Z+1yYrxY5TTEQm+6elh0XCMaOA==} + engines: {node: ^14.18.0 || >= 16} + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^2.2.0 + svelte: ^3.54.0 || ^4.0.0 + vite: ^4.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte': 2.4.2(svelte@3.59.2)(vite@4.4.6) + debug: 4.3.4 + svelte: 3.59.2 + vite: 4.4.6(@types/node@20.4.4)(less@4.1.3) + transitivePeerDependencies: + - supports-color + dev: true + /@sveltejs/vite-plugin-svelte-inspector@1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.0.1)(vite@4.3.9): resolution: {integrity: sha512-Khdl5jmmPN6SUsVuqSXatKpQTMIifoQPDanaxC84m9JxIibWvSABJyHpyys0Z+1yYrxY5TTEQm+6elh0XCMaOA==} engines: {node: ^14.18.0 || >= 16} @@ -1507,7 +1749,7 @@ packages: - supports-color dev: true - /@sveltejs/vite-plugin-svelte-inspector@1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.1.0)(vite@4.4.2): + /@sveltejs/vite-plugin-svelte-inspector@1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.1.1)(vite@4.4.2): resolution: {integrity: sha512-Khdl5jmmPN6SUsVuqSXatKpQTMIifoQPDanaxC84m9JxIibWvSABJyHpyys0Z+1yYrxY5TTEQm+6elh0XCMaOA==} engines: {node: ^14.18.0 || >= 16} peerDependencies: @@ -1515,9 +1757,9 @@ packages: svelte: ^3.54.0 || ^4.0.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 2.4.2(svelte@4.1.0)(vite@4.4.2) + '@sveltejs/vite-plugin-svelte': 2.4.2(svelte@4.1.1)(vite@4.4.2) debug: 4.3.4 - svelte: 4.1.0 + svelte: 4.1.1 vite: 4.4.2(less@4.1.3) transitivePeerDependencies: - supports-color @@ -1563,6 +1805,26 @@ packages: - supports-color dev: true + /@sveltejs/vite-plugin-svelte@2.4.2(svelte@3.59.2)(vite@4.4.6): + resolution: {integrity: sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==} + engines: {node: ^14.18.0 || >= 16} + peerDependencies: + svelte: ^3.54.0 || ^4.0.0 + vite: ^4.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte-inspector': 1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@3.59.2)(vite@4.4.6) + debug: 4.3.4 + deepmerge: 4.3.1 + kleur: 4.1.5 + magic-string: 0.30.1 + svelte: 3.59.2 + svelte-hmr: 0.15.2(svelte@3.59.2) + vite: 4.4.6(@types/node@20.4.4)(less@4.1.3) + vitefu: 0.2.4(vite@4.4.6) + transitivePeerDependencies: + - supports-color + dev: true + /@sveltejs/vite-plugin-svelte@2.4.2(svelte@4.0.1)(vite@4.3.9): resolution: {integrity: sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==} engines: {node: ^14.18.0 || >= 16} @@ -1603,26 +1865,42 @@ packages: - supports-color dev: true - /@sveltejs/vite-plugin-svelte@2.4.2(svelte@4.1.0)(vite@4.4.2): + /@sveltejs/vite-plugin-svelte@2.4.2(svelte@4.1.1)(vite@4.4.2): resolution: {integrity: sha512-ePfcC48ftMKhkT0OFGdOyycYKnnkT6i/buzey+vHRTR/JpQvuPzzhf1PtKqCDQfJRgoPSN2vscXs6gLigx/zGw==} engines: {node: ^14.18.0 || >= 16} peerDependencies: svelte: ^3.54.0 || ^4.0.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.1.0)(vite@4.4.2) + '@sveltejs/vite-plugin-svelte-inspector': 1.0.3(@sveltejs/vite-plugin-svelte@2.4.2)(svelte@4.1.1)(vite@4.4.2) debug: 4.3.4 deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.1 - svelte: 4.1.0 - svelte-hmr: 0.15.2(svelte@4.1.0) + svelte: 4.1.1 + svelte-hmr: 0.15.2(svelte@4.1.1) vite: 4.4.2(less@4.1.3) vitefu: 0.2.4(vite@4.4.2) transitivePeerDependencies: - supports-color dev: false + /@tsconfig/node10@1.0.9: + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + dev: true + + /@tsconfig/node12@1.0.11: + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + dev: true + + /@tsconfig/node14@1.0.3: + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + dev: true + + /@tsconfig/node16@1.0.4: + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + dev: true + /@tsconfig/svelte@4.0.1: resolution: {integrity: sha512-B+XlGpmuAQzJqDoBATNCvEPqQg0HkO7S8pM14QDI5NsmtymzRexQ1N+nX2H6RTtFbuFgaZD4I8AAi8voGg0GLg==} dev: true @@ -1648,7 +1926,7 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.4.2 + '@types/node': 20.4.4 dev: true /@types/js-yaml@4.0.5: @@ -1671,6 +1949,10 @@ packages: resolution: {integrity: sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==} dev: true + /@types/node@20.4.4: + resolution: {integrity: sha512-CukZhumInROvLq3+b5gLev+vgpsIqC2D0deQr/yS1WnxvmYLlJXZpaQrQiseMY+6xusl79E04UjWoqyr+t1/Ew==} + dev: true + /@types/prettier@2.7.3: resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} dev: true @@ -1928,7 +2210,7 @@ packages: '@vue/shared': 3.3.4 estree-walker: 2.0.2 magic-string: 0.30.1 - postcss: 8.4.26 + postcss: 8.4.27 source-map-js: 1.0.2 /@vue/compiler-ssr@3.3.4: @@ -2090,6 +2372,10 @@ packages: picomatch: 2.3.1 dev: true + /arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + dev: true + /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true @@ -2336,6 +2622,10 @@ packages: dependencies: is-what: 3.14.1 + /create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + dev: true + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2439,6 +2729,11 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true + /diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + dev: true + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -2593,6 +2888,36 @@ packages: '@esbuild/win32-x64': 0.18.14 dev: true + /esbuild@0.18.15: + resolution: {integrity: sha512-3WOOLhrvuTGPRzQPU6waSDWrDTnQriia72McWcn6UCi43GhCHrXH4S59hKMeez+IITmdUuUyvbU9JIp+t3xlPQ==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.15 + '@esbuild/android-arm64': 0.18.15 + '@esbuild/android-x64': 0.18.15 + '@esbuild/darwin-arm64': 0.18.15 + '@esbuild/darwin-x64': 0.18.15 + '@esbuild/freebsd-arm64': 0.18.15 + '@esbuild/freebsd-x64': 0.18.15 + '@esbuild/linux-arm': 0.18.15 + '@esbuild/linux-arm64': 0.18.15 + '@esbuild/linux-ia32': 0.18.15 + '@esbuild/linux-loong64': 0.18.15 + '@esbuild/linux-mips64el': 0.18.15 + '@esbuild/linux-ppc64': 0.18.15 + '@esbuild/linux-riscv64': 0.18.15 + '@esbuild/linux-s390x': 0.18.15 + '@esbuild/linux-x64': 0.18.15 + '@esbuild/netbsd-x64': 0.18.15 + '@esbuild/openbsd-x64': 0.18.15 + '@esbuild/sunos-x64': 0.18.15 + '@esbuild/win32-arm64': 0.18.15 + '@esbuild/win32-ia32': 0.18.15 + '@esbuild/win32-x64': 0.18.15 + dev: true + /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -2680,7 +3005,7 @@ packages: hasBin: true dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) - '@eslint-community/regexpp': 4.5.1 + '@eslint-community/regexpp': 4.6.0 '@eslint/eslintrc': 2.1.0 '@eslint/js': 8.44.0 '@humanwhocodes/config-array': 0.11.10 @@ -2798,6 +3123,17 @@ packages: micromatch: 4.0.5 dev: true + /fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true @@ -2950,7 +3286,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.0 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 @@ -3305,6 +3641,17 @@ packages: semver: 5.7.2 optional: true + /make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + dev: true + + /material-icon-theme@4.29.0: + resolution: {integrity: sha512-sMTEm2BUnk9SIHiIxveZ/YCne32o2cMkPnz9BvuJe3axgVWDWl1EkQv0EiZJZsUqFJYj/LH+CUOaOSDwSPXOzQ==} + engines: {vscode: ^1.51.0} + dependencies: + lodash.merge: 4.6.2 + dev: true + /md5-hex@3.0.1: resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} engines: {node: '>=8'} @@ -3398,7 +3745,7 @@ packages: /mlly@1.4.0: resolution: {integrity: sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg==} dependencies: - acorn: 8.9.0 + acorn: 8.10.0 pathe: 1.1.1 pkg-types: 1.0.3 ufo: 1.1.2 @@ -3635,6 +3982,15 @@ packages: nanoid: 3.3.6 picocolors: 1.0.0 source-map-js: 1.0.2 + dev: true + + /postcss@8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -3797,7 +4153,6 @@ packages: /sax@1.2.4: resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==} - optional: true /scroll-into-view-if-needed@2.2.31: resolution: {integrity: sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==} @@ -3848,8 +4203,8 @@ packages: is-arrayish: 0.3.2 dev: true - /siyuan@0.7.7: - resolution: {integrity: sha512-li0nNVf9FHPRJRVN0qNpErSuTLvQMfQJI9mskKHDcs9fOa9fMS3hnXTbbguSX3+OFcPpGOrTm+t6Z1KfOaBpFA==} + /siyuan@0.7.8: + resolution: {integrity: sha512-49aQRgva9Cj5u1PuXPAfsug6GHeuhdrb7AnWBqJKyPRaVI2IskmPuisIDWIkG7JhVJ1e1KCg813a2G9QOpYRkQ==} dev: true /slash@3.0.0: @@ -3925,7 +4280,7 @@ packages: /strip-literal@1.0.1: resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} dependencies: - acorn: 8.9.0 + acorn: 8.10.0 dev: true /supports-color@7.2.0: @@ -3998,7 +4353,7 @@ packages: dependencies: '@jridgewell/trace-mapping': 0.3.18 chokidar: 3.5.3 - fast-glob: 3.3.0 + fast-glob: 3.3.1 import-fresh: 3.3.0 picocolors: 1.0.0 sade: 1.8.1 @@ -4044,13 +4399,13 @@ packages: svelte: 4.0.5 dev: true - /svelte-hmr@0.15.2(svelte@4.1.0): + /svelte-hmr@0.15.2(svelte@4.1.1): resolution: {integrity: sha512-q/bAruCvFLwvNbeE1x3n37TYFb3mTBJ6TrCq6p2CoFbSTNhDE9oAtEfpy+wmc9So8AG0Tja+X0/mJzX9tSfvIg==} engines: {node: ^12.20 || ^14.13.1 || >= 16} peerDependencies: svelte: ^3.19.0 || ^4.0.0-next.0 dependencies: - svelte: 4.1.0 + svelte: 4.1.1 dev: false /svelte-i18n@3.6.0(svelte@4.0.1): @@ -4222,8 +4577,8 @@ packages: periscopic: 3.1.0 dev: true - /svelte@4.1.0: - resolution: {integrity: sha512-qob6IX0ui4Z++Lhwzvqb6aig79WhwsF3z6y1YMicjvw0rv71hxD+RmMFG3BM8lB7prNLXeOLnP64Zrynqa3Gtw==} + /svelte@4.1.1: + resolution: {integrity: sha512-Enick5fPFISLoVy0MFK45cG+YlQt6upw8skEK9zzTpJnH1DqEv8xOZwizCGSo3Q6HZ7KrZTM0J18poF7aQg5zw==} engines: {node: '>=16'} dependencies: '@ampproject/remapping': 2.2.1 @@ -4316,6 +4671,37 @@ packages: typescript: 5.1.6 dev: true + /ts-node@10.9.1(@types/node@20.4.4)(typescript@5.1.6): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.4.4 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.1.6 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + /ts-toolbelt@9.6.0: resolution: {integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==} dev: true @@ -4323,65 +4709,65 @@ packages: /tslib@2.6.0: resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} - /turbo-darwin-64@1.10.7: - resolution: {integrity: sha512-N2MNuhwrl6g7vGuz4y3fFG2aR1oCs0UZ5HKl8KSTn/VC2y2YIuLGedQ3OVbo0TfEvygAlF3QGAAKKtOCmGPNKA==} + /turbo-darwin-64@1.10.9: + resolution: {integrity: sha512-Avz3wsYYb8/vjyHPVRFbNbowIiaF33vcBRklIUkPchTLvZekrT5x3ltQBCflyoi2zJV9g08hK4xXTGuCxeVvPA==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.10.7: - resolution: {integrity: sha512-WbJkvjU+6qkngp7K4EsswOriO3xrNQag7YEGRtfLoDdMTk4O4QTeU6sfg2dKfDsBpTidTvEDwgIYJhYVGzrz9Q==} + /turbo-darwin-arm64@1.10.9: + resolution: {integrity: sha512-HyggdSPc/v2HuYrJF75smhIlurn8bY2cWpZYCjOL5Pj2DpLyhBs+nk+JirZl7XQiaUEVFj6eTbsejXyDP2Ritw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.10.7: - resolution: {integrity: sha512-x1CF2CDP1pDz/J8/B2T0hnmmOQI2+y11JGIzNP0KtwxDM7rmeg3DDTtDM/9PwGqfPotN9iVGgMiMvBuMFbsLhg==} + /turbo-linux-64@1.10.9: + resolution: {integrity: sha512-qvdEgJKzDjOYY8o/HlnSwD+TIXiAML+3l6wUG4Ojuh/6cIhemLMRaHmEG+LygRW7GRw3dDv3hpp9OtiKmyxFdQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.10.7: - resolution: {integrity: sha512-JtnBmaBSYbs7peJPkXzXxsRGSGBmBEIb6/kC8RRmyvPAMyqF8wIex0pttsI+9plghREiGPtRWv/lfQEPRlXnNQ==} + /turbo-linux-arm64@1.10.9: + resolution: {integrity: sha512-gva8H3CS8F6HlXL6YTDJAPrvPXVjBCxdd4DKABghjAxdknV5mZV1WWwMuGf0Z2W8qtmNG1XS0Dt2Wrb1ERFnLw==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.10.7: - resolution: {integrity: sha512-7A/4CByoHdolWS8dg3DPm99owfu1aY/W0V0+KxFd0o2JQMTQtoBgIMSvZesXaWM57z3OLsietFivDLQPuzE75w==} + /turbo-windows-64@1.10.9: + resolution: {integrity: sha512-OZ+bkSBJIkyl4JBDk8FX2/bOqtrElfXQV/KQ8/ibddB8Clzn/owx9FS1eXGdvttRZ9IJWzPrdFv+k4vbWQfE7w==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.10.7: - resolution: {integrity: sha512-D36K/3b6+hqm9IBAymnuVgyePktwQ+F0lSXr2B9JfAdFPBktSqGmp50JNC7pahxhnuCLj0Vdpe9RqfnJw5zATA==} + /turbo-windows-arm64@1.10.9: + resolution: {integrity: sha512-WhhhioGaePkGdGOIlrOB8LF8400FJUAQcVf8yCTvjzDB+OWn3dJQ3nalFjxH0PlZ17l6TPGt1WvWQiDVXUE4pw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.10.7: - resolution: {integrity: sha512-xm0MPM28TWx1e6TNC3wokfE5eaDqlfi0G24kmeHupDUZt5Wd0OzHFENEHMPqEaNKJ0I+AMObL6nbSZonZBV2HA==} + /turbo@1.10.9: + resolution: {integrity: sha512-s1ZRRD89NelCYHty1SpV1Elpv2LRrktgcddbZm9oTq1RPNpJFSrrEOAJhNz/w0fxTSjSN1Ey3TWZghjUjgKuzg==} hasBin: true requiresBuild: true optionalDependencies: - turbo-darwin-64: 1.10.7 - turbo-darwin-arm64: 1.10.7 - turbo-linux-64: 1.10.7 - turbo-linux-arm64: 1.10.7 - turbo-windows-64: 1.10.7 - turbo-windows-arm64: 1.10.7 + turbo-darwin-64: 1.10.9 + turbo-darwin-arm64: 1.10.9 + turbo-linux-64: 1.10.9 + turbo-linux-arm64: 1.10.9 + turbo-windows-64: 1.10.9 + turbo-windows-arm64: 1.10.9 dev: true /type-check@0.4.0: @@ -4447,6 +4833,10 @@ packages: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true + /v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + dev: true + /valid-data-url@4.0.1: resolution: {integrity: sha512-t0oA6VCnlQ/MPKP/Ie9ZD3biEpB2JTxK1Hx4KC72RbhubL9HsXznoBn228UQTazL7cPvsY36bhzt3fk424TjyA==} engines: {node: '>=10'} @@ -4477,7 +4867,7 @@ packages: resolution: {integrity: sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg==} dev: true - /vite-node@0.32.2(@types/node@20.4.2): + /vite-node@0.32.2(@types/node@20.4.4): resolution: {integrity: sha512-dTQ1DCLwl2aEseov7cfQ+kDMNJpM1ebpyMMMwWzBvLbis8Nla/6c9WQcqpPssTwS6Rp/+U6KwlIj8Eapw4bLdA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -4487,7 +4877,7 @@ packages: mlly: 1.4.0 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.4(@types/node@20.4.2)(less@4.1.3) + vite: 4.4.6(@types/node@20.4.4)(less@4.1.3) transitivePeerDependencies: - '@types/node' - less @@ -4499,17 +4889,17 @@ packages: - terser dev: true - /vite-plugin-static-copy@0.16.0(vite@4.4.4): + /vite-plugin-static-copy@0.16.0(vite@4.4.6): resolution: {integrity: sha512-dMVEg5Z2SwYRgQnHZaeokvSKB4p/TOTf65JU4sP3U6ccSBsukqdtDOjpmT+xzTFHAA8WJjcS31RMLjUdWQCBzw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^3.0.0 || ^4.0.0 dependencies: chokidar: 3.5.3 - fast-glob: 3.3.0 + fast-glob: 3.3.1 fs-extra: 11.1.1 picocolors: 1.0.0 - vite: 4.4.4(@types/node@20.4.2)(less@4.1.3) + vite: 4.4.6(@types/node@20.4.4)(less@4.1.3) dev: true /vite@4.3.9(less@4.1.3): @@ -4617,6 +5007,43 @@ packages: fsevents: 2.3.2 dev: true + /vite@4.4.6(@types/node@20.4.4)(less@4.1.3): + resolution: {integrity: sha512-EY6Mm8vJ++S3D4tNAckaZfw3JwG3wa794Vt70M6cNJ6NxT87yhq7EC8Rcap3ahyHdo8AhCmV9PTk+vG1HiYn1A==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 20.4.4 + esbuild: 0.18.15 + less: 4.1.3 + postcss: 8.4.27 + rollup: 3.26.3 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /vitefu@0.2.4(vite@4.3.9): resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} peerDependencies: @@ -4649,6 +5076,17 @@ packages: vite: 4.4.4(@types/node@20.4.2)(less@4.1.3) dev: true + /vitefu@0.2.4(vite@4.4.6): + resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + vite: 4.4.6(@types/node@20.4.4)(less@4.1.3) + dev: true + /vitest@0.32.2: resolution: {integrity: sha512-hU8GNNuQfwuQmqTLfiKcqEhZY72Zxb7nnN07koCUNmntNxbKQnVbeIS6sqUgR3eXSlbOpit8+/gr1KpqoMgWCQ==} engines: {node: '>=v14.18.0'} @@ -4682,7 +5120,7 @@ packages: dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 - '@types/node': 20.4.2 + '@types/node': 20.4.4 '@vitest/expect': 0.32.2 '@vitest/runner': 0.32.2 '@vitest/snapshot': 0.32.2 @@ -4702,8 +5140,8 @@ packages: strip-literal: 1.0.1 tinybench: 2.5.0 tinypool: 0.5.0 - vite: 4.4.4(@types/node@20.4.2)(less@4.1.3) - vite-node: 0.32.2(@types/node@20.4.2) + vite: 4.4.6(@types/node@20.4.4)(less@4.1.3) + vite-node: 0.32.2(@types/node@20.4.4) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -4813,6 +5251,13 @@ packages: optional: true dev: true + /xml-js@1.6.11: + resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==} + hasBin: true + dependencies: + sax: 1.2.4 + dev: true + /xml-name-validator@4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} @@ -4835,6 +5280,11 @@ packages: lib0: 0.2.78 dev: true + /yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + dev: true + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} From b8decccf4586107f7d3d53306ec7acf4f7b4132d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Sun, 23 Jul 2023 19:23:09 +0800 Subject: [PATCH 043/113] =?UTF-8?q?fix(monaco-editor):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=8B=96=E5=8A=A8=E9=A1=B5=E7=AD=BE=E5=88=86=E6=A0=8F?= =?UTF-8?q?=E6=97=B6=E7=BC=96=E8=BE=91=E5=99=A8=E6=97=A0=E6=B3=95=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98=20|=20Fix=20the?= =?UTF-8?q?=20issue=20that=20the=20editor=20cannot=20be=20reloaded=20when?= =?UTF-8?q?=20dragging=20the=20tab=20to=20split=20the=20screen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../monaco-editor/src/bridge/master.ts | 63 +++++++++++++++---- .../src/components/EditorIframe.svelte | 1 + 3 files changed, 54 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c896067..9619b21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - 为编辑器添加更改语言模式命令 | Add change model language command to editor. - 添加工作区目录与文件的提示文本 | Add prompt text for workspace directories and files. - 添加 material 图标集 | Add material icon set. +- 修复拖动页签分栏时编辑器无法重新加载问题 | Fix the issue that the editor cannot be reloaded when dragging the tab to split the screen. ## 2023-07-22 diff --git a/workspace/plugins/monaco-editor/src/bridge/master.ts b/workspace/plugins/monaco-editor/src/bridge/master.ts index 8b78d65..ceb2c1d 100644 --- a/workspace/plugins/monaco-editor/src/bridge/master.ts +++ b/workspace/plugins/monaco-editor/src/bridge/master.ts @@ -75,7 +75,7 @@ export class EditorBridgeMaster { constructor( public readonly plugin: InstanceType, // 插件对象 - public readonly channel: MessageChannel | Electron.MessageChannelMain, // 消息通道 + public channel: MessageChannel | Electron.MessageChannelMain, // 消息通道 public readonly url: URL = new URL(`${globalThis.document.baseURI}plugins/${plugin.name}/iframes/editor.html`), // 编辑器 URL ) { /* 错误消息/关闭消息 */ @@ -195,21 +195,62 @@ export class EditorBridgeMaster { iframe.src = this.url.href; iframe.addEventListener("load", _e => { // this.plugin.logger.debug(_e); - this.channel.port1.start(); // 开始接受消息 - /** - * 向 iframe 发送消息以建立消息通道 - * REF: https://github.com/mdn/dom-examples/blob/main/channel-messaging-basic/index.html - */ - iframe.contentWindow.postMessage( - undefined, - "*", - [this.channel.port2 as MessagePort], - ); + try { + this.channel.port1.start(); // 开始接受消息 + + /** + * 向 iframe 发送消息以建立消息通道 + * REF: https://github.com/mdn/dom-examples/blob/main/channel-messaging-basic/index.html + */ + iframe.contentWindow.postMessage( + undefined, + "*", + [this.channel.port2 as MessagePort], + ); + } catch (error) { + /** + * Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Port at index 0 is already neutered. + * 拖动页签分屏时出现 + * 需要重建建立一个 channel + */ + this.destroy(); + this.rebuildChannel(); + this.channel.port1.start(); + iframe.contentWindow.postMessage( + undefined, + "*", + [this.channel.port2 as MessagePort], + ); + } + }); return iframe; } + /* 重建消息通道 */ + public rebuildChannel() { + if (this.channel instanceof MessageChannel) { + this.channel = new MessageChannel(); + for (const listener of this._listeners.values()) { + this.channel.port1.addEventListener( + constants.MESSAGE_EVENT_NAME, + listener as MessageEventListener, + ); + } + } + else { + const { MessageChannelMain } = globalThis.require("@electron/remote") as Electron.RemoteMainInterface; + this.channel = new MessageChannelMain(); + for (const listener of this._listeners.values()) { + this.channel.port1.addListener( + constants.MESSAGE_EVENT_NAME, + listener as ElectronMessageEventListener, + ); + } + } + } + /* 初始化 */ public init(data: IMessageEditorInit["data"]) { /* 组装消息 */ diff --git a/workspace/plugins/monaco-editor/src/components/EditorIframe.svelte b/workspace/plugins/monaco-editor/src/components/EditorIframe.svelte index 1d3e2a3..fc6a023 100644 --- a/workspace/plugins/monaco-editor/src/components/EditorIframe.svelte +++ b/workspace/plugins/monaco-editor/src/components/EditorIframe.svelte @@ -57,6 +57,7 @@ $: if (inited) bridge.set({ diffOptions }); bridge.addEventListener("editor-ready", e => { + plugin.logger.debug("editor-ready"); if (e.data.data.status) { bridge.init({ name: plugin.name, From 48caac365acf3be32abdb2fecac7d2196befea45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Sun, 23 Jul 2023 19:51:39 +0800 Subject: [PATCH 044/113] =?UTF-8?q?feat(monaco-editor):=20=E4=B8=BA?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=B5=84=E6=BA=90=E7=AE=A1=E7=90=86=E5=99=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=97=E8=A1=A8=E8=BE=85=E5=8A=A9=E7=BA=BF?= =?UTF-8?q?=20|=20Add=20list=20guides=20lines=20to=20the=20file=20explorer?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../components/siyuan/tree/file/Node.svelte | 50 +++++++++++++------ .../src/components/EditorIframe.svelte | 3 +- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9619b21..ccf9b08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - 添加工作区目录与文件的提示文本 | Add prompt text for workspace directories and files. - 添加 material 图标集 | Add material icon set. - 修复拖动页签分栏时编辑器无法重新加载问题 | Fix the issue that the editor cannot be reloaded when dragging the tab to split the screen. +- 为文件资源管理器添加列表辅助线 | Add list guides lines to the file explorer. ## 2023-07-22 diff --git a/workspace/packages/components/siyuan/tree/file/Node.svelte b/workspace/packages/components/siyuan/tree/file/Node.svelte index 19ee8ba..16eac1b 100644 --- a/workspace/packages/components/siyuan/tree/file/Node.svelte +++ b/workspace/packages/components/siyuan/tree/file/Node.svelte @@ -239,7 +239,7 @@ data-directory={directory} class:b3-list-item--focus={focus} class:b3-list-item--hide-action={hideActions} - class="b3-list-item" + class="node b3-list-item" > {#if icon.startsWith("#")} @@ -299,7 +299,7 @@ class:ariaLabel={!!textAriaLabel} class:b3-tooltips__se={!!textAriaLabel && type === FileTreeNodeType.Root} class:b3-tooltips__ne={!!textAriaLabel && type !== FileTreeNodeType.Root} - class="b3-list-item__text" + class="text b3-list-item__text" > {text} @@ -312,7 +312,7 @@ class:b3-tooltips={!!menuAriaLabel} class:b3-tooltips__sw={!!menuAriaLabel && type === FileTreeNodeType.Root} class:b3-tooltips__nw={!!menuAriaLabel && type !== FileTreeNodeType.Root} - class="b3-list-item__action" + class="menu b3-list-item__action" > @@ -325,7 +325,7 @@ class:b3-tooltips={!!symlinkAriaLabel} class:b3-tooltips__sw={!!symlinkAriaLabel && type === FileTreeNodeType.Root} class:b3-tooltips__nw={!!symlinkAriaLabel && type !== FileTreeNodeType.Root} - class="b3-list-item__action" + class="symblink b3-list-item__action" > @@ -348,7 +348,7 @@ {#if children}
    @@ -366,7 +366,31 @@ {/if} diff --git a/workspace/plugins/monaco-editor/src/components/EditorIframe.svelte b/workspace/plugins/monaco-editor/src/components/EditorIframe.svelte index fc6a023..8784b11 100644 --- a/workspace/plugins/monaco-editor/src/components/EditorIframe.svelte +++ b/workspace/plugins/monaco-editor/src/components/EditorIframe.svelte @@ -57,7 +57,8 @@ $: if (inited) bridge.set({ diffOptions }); bridge.addEventListener("editor-ready", e => { - plugin.logger.debug("editor-ready"); + // plugin.logger.debug("editor-ready"); + if (e.data.data.status) { bridge.init({ name: plugin.name, From ebb892d13b80c06ca141da02694b3f37cc436528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Mon, 24 Jul 2023 01:57:17 +0800 Subject: [PATCH 045/113] =?UTF-8?q?feat(monaco-editor):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=89=93=E5=BC=80=E4=B8=8E=E5=A4=8D=E5=88=B6=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E9=A1=B9=20|=20Add=20open=20and=20copy=20menu=20items?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 + workspace/packages/utils/misc/copy.ts | 28 + workspace/packages/utils/package.json | 1 + workspace/packages/utils/siyuan/url.ts | 58 +- .../monaco-editor/public/i18n/en_US.json | 30 + .../monaco-editor/public/i18n/zh_CHT.json | 30 + .../monaco-editor/public/i18n/zh_CN.json | 30 + .../monaco-editor/scripts/build-icons.ts | 15 +- .../src/assets/entries/language-icon.json | 654 ++++++++++++++++++ .../src/components/ExplorerDock.svelte | 5 +- .../monaco-editor/src/editor/language.ts | 2 + .../monaco-editor/src/explorer/icon.ts | 68 +- .../monaco-editor/src/explorer/index.ts | 52 +- .../monaco-editor/src/explorer/menu.ts | 412 +++++++++++ .../monaco-editor/src/explorer/tooltip.ts | 2 +- workspace/plugins/monaco-editor/src/index.ts | 14 +- workspace/pnpm-lock.yaml | 13 + 17 files changed, 1373 insertions(+), 45 deletions(-) create mode 100644 workspace/packages/utils/misc/copy.ts create mode 100644 workspace/plugins/monaco-editor/src/assets/entries/language-icon.json create mode 100644 workspace/plugins/monaco-editor/src/explorer/menu.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index ccf9b08..be15e03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更改日志 | CHANGE LOG +## 2023-07-24 + +- 添加打开与复制菜单项 | Add open and copy menu items. + ## 2023-07-23 - 文件资源管理器支持打开文件 | File explorer supports opening files. diff --git a/workspace/packages/utils/misc/copy.ts b/workspace/packages/utils/misc/copy.ts new file mode 100644 index 0000000..1466c0c --- /dev/null +++ b/workspace/packages/utils/misc/copy.ts @@ -0,0 +1,28 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import copy from 'copy-to-clipboard'; + +export function copyText(text: string) { + // navigator clipboard api needs a secure context (https | localhost | loopback) + if (navigator.clipboard && window.isSecureContext) { + // navigator clipboard api method' + return navigator.clipboard.writeText(text); + } else { + copy(text); + } +} diff --git a/workspace/packages/utils/package.json b/workspace/packages/utils/package.json index 54624c6..981d13b 100644 --- a/workspace/packages/utils/package.json +++ b/workspace/packages/utils/package.json @@ -8,6 +8,7 @@ "devDependencies": { "@types/file-saver": "^2.0.5", "binary-extensions": "^2.2.0", + "copy-to-clipboard": "^3.3.3", "deepmerge": "^4.3.1", "file-saver": "^2.0.5", "normalize-path": "^3.0.0", diff --git a/workspace/packages/utils/siyuan/url.ts b/workspace/packages/utils/siyuan/url.ts index 8b74c29..bd037f6 100644 --- a/workspace/packages/utils/siyuan/url.ts +++ b/workspace/packages/utils/siyuan/url.ts @@ -106,7 +106,7 @@ export function isStaticPathname( case href.startsWith("assets/"): // 工作空间/data/assets case href.startsWith("emojies/"): // 工作空间/data/emojies case href.startsWith("plugins/"): // 工作空间/data/plugins - case href.startsWith("plugins/"): // 工作空间/data/plugins + case href.startsWith("public/"): // 工作空间/data/public case href.startsWith("snippets/"): // 工作空间/data/snippets case href.startsWith("templates/"): // 工作空间/data/templates case href.startsWith("widgets/"): // 工作空间/data/widgets @@ -118,7 +118,32 @@ export function isStaticPathname( } /** - * 思源静态 web 文件路径转换为相对于工作空间的路径 + * 判断一个相对于工作空间目录的路径是否为思源静态文件服务 + * @param href: 超链接地址 + * @param workspace: 是否为工作空间下的目录 + */ +export function isStaticWebFileServicePath(path: string): boolean { + switch (true) { + case path.startsWith("conf/appearance/"): + case path.startsWith("temp/export/"): + case path.startsWith("history/"): + + case path.startsWith("data/assets/"): + case path.startsWith("data/emojies/"): + case path.startsWith("data/plugins/"): + case path.startsWith("data/public/"): + case path.startsWith("data/snippets/"): + case path.startsWith("data/templates/"): + case path.startsWith("data/widgets/"): + return true; + + default: + return false; + } +} + +/** + * 思源静态 web 文件路径 👉 相对于工作空间的路径 * @param pathname: 思源静态 web 文件路径 * @return: 工作空间路径 */ @@ -128,7 +153,7 @@ export function staticPathname2WorkspacePath(pathname: string): string { case pathname.startsWith("assets/"): // 工作空间/data/assets case pathname.startsWith("emojies/"): // 工作空间/data/emojies case pathname.startsWith("plugins/"): // 工作空间/data/plugins - case pathname.startsWith("plugins/"): // 工作空间/data/plugins + case pathname.startsWith("public/"): // 工作空间/data/public case pathname.startsWith("snippets/"): // 工作空间/data/snippets case pathname.startsWith("templates/"): // 工作空间/data/templates case pathname.startsWith("widgets/"): // 工作空间/data/widgets @@ -143,3 +168,30 @@ export function staticPathname2WorkspacePath(pathname: string): string { throw new Error(`'${pathname}' is not a valid file pathname`); } } + + +/** + * 相对于工作空间目录的路径 👉 思源静态 web 文件路径 + * @param pathname: 思源静态 web 文件路径 + * @return: 工作空间路径 + */ +export function workspacePath2StaticPathname(path: string): string { + switch (true) { + case path.startsWith("data/assets/"): + case path.startsWith("data/emojies/"): + case path.startsWith("data/plugins/"): + case path.startsWith("data/public/"): + case path.startsWith("data/snippets/"): + case path.startsWith("data/templates/"): + case path.startsWith("data/widgets/"): + return path.replace(/^data\//, ""); + case path.startsWith("conf/appearance/"): + return path.replace(/^conf\//, ""); + case path.startsWith("temp/export/"): + return path.replace(/^temp\//, ""); + case path.startsWith("history/"): + return path; + default: + throw new Error(`'${path}' is not a valid workspace path`); + } +} diff --git a/workspace/plugins/monaco-editor/public/i18n/en_US.json b/workspace/plugins/monaco-editor/public/i18n/en_US.json index d7d85b7..4884faf 100644 --- a/workspace/plugins/monaco-editor/public/i18n/en_US.json +++ b/workspace/plugins/monaco-editor/public/i18n/en_US.json @@ -281,6 +281,27 @@ } }, "menu": { + "copy": { + "label": "Copy" + }, + "copyFullPath": { + "label": "Copy Absolute Path" + }, + "copyMarkdownHyperlink": { + "label": "Copy Markdown Hyperlink" + }, + "copyName": { + "label": "Copy Name" + }, + "copyReferencePath": { + "label": "Copy Reference Path" + }, + "copyRelativePath": { + "label": "Copy Relative Path" + }, + "copyURL": { + "label": "Copy URL" + }, "editAssetFile": { "label": "Edit Asset File" }, @@ -290,6 +311,9 @@ "export": { "accelerator": "Export" }, + "open": { + "label": "Open" + }, "openByNewWindow": { "label": "Open with New Window" }, @@ -305,6 +329,12 @@ "openTabRight": { "label": "Open Right the Tab" }, + "openWithDefaultProgram": { + "label": "Open with Default Program" + }, + "revealInExplorer": { + "label": "Reveal In Explorer" + }, "standard": { "accelerator": "Standard" }, diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json index cbb4be2..752fd93 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json @@ -281,6 +281,27 @@ } }, "menu": { + "copy": { + "label": "複製" + }, + "copyFullPath": { + "label": "複製完整路徑" + }, + "copyMarkdownHyperlink": { + "label": "複製 Markdown 超連結" + }, + "copyName": { + "label": "複製名稱" + }, + "copyReferencePath": { + "label": "複製引用路徑" + }, + "copyRelativePath": { + "label": "複製相對路徑" + }, + "copyURL": { + "label": "複製 URL" + }, "editAssetFile": { "label": "編輯資料文檔" }, @@ -290,6 +311,9 @@ "export": { "accelerator": "匯出" }, + "open": { + "label": "打開" + }, "openByNewWindow": { "label": "使用新窗口打開" }, @@ -305,6 +329,12 @@ "openTabRight": { "label": "在分頁右側打開" }, + "openWithDefaultProgram": { + "label": "使用預設程式打開" + }, + "revealInExplorer": { + "label": "在檔案總管中顯示" + }, "standard": { "accelerator": "標準" }, diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json index ddde460..c6f72a5 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json @@ -281,6 +281,27 @@ } }, "menu": { + "copy": { + "label": "复制" + }, + "copyFullPath": { + "label": "复制完整路径" + }, + "copyMarkdownHyperlink": { + "label": "复制 Markdown 超链接" + }, + "copyName": { + "label": "复制名称" + }, + "copyReferencePath": { + "label": "复制引用路径" + }, + "copyRelativePath": { + "label": "复制相对路径" + }, + "copyURL": { + "label": "复制 URL" + }, "editAssetFile": { "label": "编辑资源文件" }, @@ -290,6 +311,9 @@ "export": { "accelerator": "导出" }, + "open": { + "label": "打开" + }, "openByNewWindow": { "label": "使用新窗口打开" }, @@ -305,6 +329,12 @@ "openTabRight": { "label": "在页签右侧打开" }, + "openWithDefaultProgram": { + "label": "使用默认程序打开" + }, + "revealInExplorer": { + "label": "在文件资源管理器中显示" + }, "standard": { "accelerator": "标准" }, diff --git a/workspace/plugins/monaco-editor/scripts/build-icons.ts b/workspace/plugins/monaco-editor/scripts/build-icons.ts index ce032cd..c0cbbb5 100644 --- a/workspace/plugins/monaco-editor/scripts/build-icons.ts +++ b/workspace/plugins/monaco-editor/scripts/build-icons.ts @@ -29,6 +29,9 @@ const C = { /* material 图标生成的 *.symbol 文件路径 */ MATERIAL_FILE_PATH_SYMBOL: path.resolve(root, "./src/assets/symbols/icon-monaco-editor-material-icons.symbol"), + /* material 图标名称->图标 映射文件路径 */ + MATERIAL_FILE_PATH_ENTRIES_LANGUAGE: path.resolve(root, "./src/assets/entries/language-icon.json"), + /* material 文件夹名称->图标 映射文件路径 */ MATERIAL_FILE_PATH_ENTRIES_FOLDER: path.resolve(root, "./src/assets/entries/folder-icon.json"), MATERIAL_FILE_PATH_ENTRIES_FOLDER_LIGHT: path.resolve(root, "./src/assets/entries/light/folder-icon.json"), @@ -63,6 +66,7 @@ async function buildMaterialIcons() { const materialIcons: typeof import("material-icon-theme/dist/material-icons.json") = JSON.parse(await asyncFs.readFile(C.MATERIAL_ICONS_MANIFEST, "utf-8")); const { iconDefinitions, // 图标定义 + languageIds, // 语言 ID folderNames, // 目录名 folderNamesExpanded, // 展开的目录 fileNames, // 文件名 @@ -72,6 +76,8 @@ async function buildMaterialIcons() { /* 构建 文件/目录名称->图标ID 的映射 */ await Promise.all([ + buildIconsMapEntries(languageIds, C.MATERIAL_FILE_PATH_ENTRIES_LANGUAGE, C.ID_PREFIX_MATERIAL), + buildIconsMapEntries(folderNames, C.MATERIAL_FILE_PATH_ENTRIES_FOLDER, C.ID_PREFIX_MATERIAL), buildIconsMapEntries(folderNamesExpanded, C.MATERIAL_FILE_PATH_ENTRIES_FOLDER_EXPANDED, C.ID_PREFIX_MATERIAL), buildIconsMapEntries(fileNames, C.MATERIAL_FILE_PATH_ENTRIES_FILE, C.ID_PREFIX_MATERIAL), @@ -108,11 +114,14 @@ async function buildIconsMapEntries( ): Promise { const entries: IEntry[] = []; Object.entries(icons).forEach(([name, icon]) => { + const id = `#${prefix}-${icon}`; if (ext) { - name = `.${name}`; + entries.push([`.${name}`, id]); + // entries.push([`.${icon}`, id]); + } + else { + entries.push([name, id]); } - icon = `#${prefix}-${icon}`; - entries.push([name, icon]); }); await asyncFs.writeFile(path, JSON.stringify(entries, null, 4)); return entries; diff --git a/workspace/plugins/monaco-editor/src/assets/entries/language-icon.json b/workspace/plugins/monaco-editor/src/assets/entries/language-icon.json new file mode 100644 index 0000000..cd9ef3e --- /dev/null +++ b/workspace/plugins/monaco-editor/src/assets/entries/language-icon.json @@ -0,0 +1,654 @@ +[ + [ + "git", + "#icon-monaco-editor-material-git" + ], + [ + "git-commit", + "#icon-monaco-editor-material-git" + ], + [ + "git-rebase", + "#icon-monaco-editor-material-git" + ], + [ + "ignore", + "#icon-monaco-editor-material-git" + ], + [ + "yaml", + "#icon-monaco-editor-material-yaml" + ], + [ + "xml", + "#icon-monaco-editor-material-xml" + ], + [ + "xquery", + "#icon-monaco-editor-material-xml" + ], + [ + "xsl", + "#icon-monaco-editor-material-xml" + ], + [ + "matlab", + "#icon-monaco-editor-material-matlab" + ], + [ + "makefile", + "#icon-monaco-editor-material-settings" + ], + [ + "toml", + "#icon-monaco-editor-material-settings" + ], + [ + "ini", + "#icon-monaco-editor-material-settings" + ], + [ + "properties", + "#icon-monaco-editor-material-settings" + ], + [ + "shaderlab", + "#icon-monaco-editor-material-shaderlab" + ], + [ + "diff", + "#icon-monaco-editor-material-diff" + ], + [ + "json", + "#icon-monaco-editor-material-json" + ], + [ + "jsonc", + "#icon-monaco-editor-material-json" + ], + [ + "json5", + "#icon-monaco-editor-material-json" + ], + [ + "blink", + "#icon-monaco-editor-material-blink" + ], + [ + "java", + "#icon-monaco-editor-material-java" + ], + [ + "razor", + "#icon-monaco-editor-material-razor" + ], + [ + "aspnetcorerazor", + "#icon-monaco-editor-material-razor" + ], + [ + "python", + "#icon-monaco-editor-material-python" + ], + [ + "mojo", + "#icon-monaco-editor-material-mojo" + ], + [ + "javascript", + "#icon-monaco-editor-material-javascript" + ], + [ + "typescript", + "#icon-monaco-editor-material-typescript" + ], + [ + "scala", + "#icon-monaco-editor-material-scala" + ], + [ + "handlebars", + "#icon-monaco-editor-material-handlebars" + ], + [ + "perl", + "#icon-monaco-editor-material-perl" + ], + [ + "perl6", + "#icon-monaco-editor-material-perl" + ], + [ + "haxe", + "#icon-monaco-editor-material-haxe" + ], + [ + "hxml", + "#icon-monaco-editor-material-haxe" + ], + [ + "puppet", + "#icon-monaco-editor-material-puppet" + ], + [ + "elixir", + "#icon-monaco-editor-material-elixir" + ], + [ + "livescript", + "#icon-monaco-editor-material-livescript" + ], + [ + "erlang", + "#icon-monaco-editor-material-erlang" + ], + [ + "twig", + "#icon-monaco-editor-material-twig" + ], + [ + "julia", + "#icon-monaco-editor-material-julia" + ], + [ + "elm", + "#icon-monaco-editor-material-elm" + ], + [ + "purescript", + "#icon-monaco-editor-material-purescript" + ], + [ + "stylus", + "#icon-monaco-editor-material-stylus" + ], + [ + "nunjucks", + "#icon-monaco-editor-material-nunjucks" + ], + [ + "pug", + "#icon-monaco-editor-material-pug" + ], + [ + "robotframework", + "#icon-monaco-editor-material-robot" + ], + [ + "sass", + "#icon-monaco-editor-material-sass" + ], + [ + "scss", + "#icon-monaco-editor-material-sass" + ], + [ + "less", + "#icon-monaco-editor-material-less" + ], + [ + "css", + "#icon-monaco-editor-material-css" + ], + [ + "testOutput", + "#icon-monaco-editor-material-visualstudio" + ], + [ + "vb", + "#icon-monaco-editor-material-visualstudio" + ], + [ + "ng-template", + "#icon-monaco-editor-material-angular" + ], + [ + "graphql", + "#icon-monaco-editor-material-graphql" + ], + [ + "solidity", + "#icon-monaco-editor-material-solidity" + ], + [ + "autoit", + "#icon-monaco-editor-material-autoit" + ], + [ + "haml", + "#icon-monaco-editor-material-haml" + ], + [ + "yang", + "#icon-monaco-editor-material-yang" + ], + [ + "terraform", + "#icon-monaco-editor-material-terraform" + ], + [ + "applescript", + "#icon-monaco-editor-material-applescript" + ], + [ + "cake", + "#icon-monaco-editor-material-cake" + ], + [ + "cucumber", + "#icon-monaco-editor-material-cucumber" + ], + [ + "nim", + "#icon-monaco-editor-material-nim" + ], + [ + "nimble", + "#icon-monaco-editor-material-nim" + ], + [ + "apiblueprint", + "#icon-monaco-editor-material-apiblueprint" + ], + [ + "riot", + "#icon-monaco-editor-material-riot" + ], + [ + "postcss", + "#icon-monaco-editor-material-postcss" + ], + [ + "lang-cfml", + "#icon-monaco-editor-material-coldfusion" + ], + [ + "haskell", + "#icon-monaco-editor-material-haskell" + ], + [ + "dhall", + "#icon-monaco-editor-material-dhall" + ], + [ + "cabal", + "#icon-monaco-editor-material-cabal" + ], + [ + "nix", + "#icon-monaco-editor-material-nix" + ], + [ + "ruby", + "#icon-monaco-editor-material-ruby" + ], + [ + "slim", + "#icon-monaco-editor-material-slim" + ], + [ + "php", + "#icon-monaco-editor-material-php" + ], + [ + "hack", + "#icon-monaco-editor-material-hack" + ], + [ + "javascriptreact", + "#icon-monaco-editor-material-react" + ], + [ + "mjml", + "#icon-monaco-editor-material-mjml" + ], + [ + "processing", + "#icon-monaco-editor-material-processing" + ], + [ + "hcl", + "#icon-monaco-editor-material-hcl" + ], + [ + "go", + "#icon-monaco-editor-material-go" + ], + [ + "django-html", + "#icon-monaco-editor-material-django" + ], + [ + "django-txt", + "#icon-monaco-editor-material-django" + ], + [ + "html", + "#icon-monaco-editor-material-html" + ], + [ + "gdscript", + "#icon-monaco-editor-material-godot" + ], + [ + "gdresource", + "#icon-monaco-editor-material-godot-assets" + ], + [ + "gdshader", + "#icon-monaco-editor-material-godot-assets" + ], + [ + "viml", + "#icon-monaco-editor-material-vim" + ], + [ + "prolog", + "#icon-monaco-editor-material-prolog" + ], + [ + "pawn", + "#icon-monaco-editor-material-pawn" + ], + [ + "reason", + "#icon-monaco-editor-material-reason" + ], + [ + "reason_lisp", + "#icon-monaco-editor-material-reason" + ], + [ + "sml", + "#icon-monaco-editor-material-sml" + ], + [ + "tex", + "#icon-monaco-editor-material-tex" + ], + [ + "doctex", + "#icon-monaco-editor-material-tex" + ], + [ + "latex", + "#icon-monaco-editor-material-tex" + ], + [ + "latex-expl3", + "#icon-monaco-editor-material-tex" + ], + [ + "apex", + "#icon-monaco-editor-material-salesforce" + ], + [ + "sas", + "#icon-monaco-editor-material-sas" + ], + [ + "dockerfile", + "#icon-monaco-editor-material-docker" + ], + [ + "csv", + "#icon-monaco-editor-material-table" + ], + [ + "tsv", + "#icon-monaco-editor-material-table" + ], + [ + "psv", + "#icon-monaco-editor-material-table" + ], + [ + "csharp", + "#icon-monaco-editor-material-csharp" + ], + [ + "bat", + "#icon-monaco-editor-material-console" + ], + [ + "awk", + "#icon-monaco-editor-material-console" + ], + [ + "shellscript", + "#icon-monaco-editor-material-console" + ], + [ + "c", + "#icon-monaco-editor-material-c" + ], + [ + "cpp", + "#icon-monaco-editor-material-cpp" + ], + [ + "objective-c", + "#icon-monaco-editor-material-objective-c" + ], + [ + "objective-cpp", + "#icon-monaco-editor-material-objective-cpp" + ], + [ + "coffeescript", + "#icon-monaco-editor-material-coffee" + ], + [ + "fsharp", + "#icon-monaco-editor-material-fsharp" + ], + [ + "editorconfig", + "#icon-monaco-editor-material-editorconfig" + ], + [ + "clojure", + "#icon-monaco-editor-material-clojure" + ], + [ + "groovy", + "#icon-monaco-editor-material-groovy" + ], + [ + "markdown", + "#icon-monaco-editor-material-markdown" + ], + [ + "jinja", + "#icon-monaco-editor-material-jinja" + ], + [ + "proto", + "#icon-monaco-editor-material-proto" + ], + [ + "pip-requirements", + "#icon-monaco-editor-material-python-misc" + ], + [ + "vue", + "#icon-monaco-editor-material-vue" + ], + [ + "vue-postcss", + "#icon-monaco-editor-material-vue" + ], + [ + "vue-html", + "#icon-monaco-editor-material-vue" + ], + [ + "lua", + "#icon-monaco-editor-material-lua" + ], + [ + "bibtex", + "#icon-monaco-editor-material-lib" + ], + [ + "bibtex-style", + "#icon-monaco-editor-material-lib" + ], + [ + "log", + "#icon-monaco-editor-material-log" + ], + [ + "jupyter", + "#icon-monaco-editor-material-jupyter" + ], + [ + "plaintext", + "#icon-monaco-editor-material-document" + ], + [ + "pdf", + "#icon-monaco-editor-material-pdf" + ], + [ + "powershell", + "#icon-monaco-editor-material-powershell" + ], + [ + "jade", + "#icon-monaco-editor-material-pug" + ], + [ + "r", + "#icon-monaco-editor-material-r" + ], + [ + "rsweave", + "#icon-monaco-editor-material-r" + ], + [ + "rust", + "#icon-monaco-editor-material-rust" + ], + [ + "sql", + "#icon-monaco-editor-material-database" + ], + [ + "kql", + "#icon-monaco-editor-material-kusto" + ], + [ + "ssh_config", + "#icon-monaco-editor-material-lock" + ], + [ + "svg", + "#icon-monaco-editor-material-svg" + ], + [ + "swift", + "#icon-monaco-editor-material-swift" + ], + [ + "typescriptreact", + "#icon-monaco-editor-material-react_ts" + ], + [ + "search-result", + "#icon-monaco-editor-material-search" + ], + [ + "mcfunction", + "#icon-monaco-editor-material-minecraft" + ], + [ + "rescript", + "#icon-monaco-editor-material-rescript" + ], + [ + "otne", + "#icon-monaco-editor-material-otne" + ], + [ + "twee3", + "#icon-monaco-editor-material-twine" + ], + [ + "twee3-harlowe-3", + "#icon-monaco-editor-material-twine" + ], + [ + "twee3-chapbook-1", + "#icon-monaco-editor-material-twine" + ], + [ + "twee3-sugarcube-2", + "#icon-monaco-editor-material-twine" + ], + [ + "grain", + "#icon-monaco-editor-material-grain" + ], + [ + "lolcode", + "#icon-monaco-editor-material-lolcode" + ], + [ + "idris", + "#icon-monaco-editor-material-idris" + ], + [ + "pgn", + "#icon-monaco-editor-material-chess" + ], + [ + "gemini", + "#icon-monaco-editor-material-gemini" + ], + [ + "text-gemini", + "#icon-monaco-editor-material-gemini" + ], + [ + "v", + "#icon-monaco-editor-material-vlang" + ], + [ + "wolfram", + "#icon-monaco-editor-material-wolframlanguage" + ], + [ + "hlsl", + "#icon-monaco-editor-material-shader" + ], + [ + "glsl", + "#icon-monaco-editor-material-shader" + ], + [ + "wgsl", + "#icon-monaco-editor-material-shader" + ], + [ + "tree", + "#icon-monaco-editor-material-tree" + ], + [ + "svelte", + "#icon-monaco-editor-material-svelte" + ], + [ + "dart", + "#icon-monaco-editor-material-dart" + ], + [ + "cadence", + "#icon-monaco-editor-material-cadence" + ], + [ + "stylable", + "#icon-monaco-editor-material-stylable" + ] +] \ No newline at end of file diff --git a/workspace/plugins/monaco-editor/src/components/ExplorerDock.svelte b/workspace/plugins/monaco-editor/src/components/ExplorerDock.svelte index f1ffc51..cbc9faa 100644 --- a/workspace/plugins/monaco-editor/src/components/ExplorerDock.svelte +++ b/workspace/plugins/monaco-editor/src/components/ExplorerDock.svelte @@ -27,7 +27,7 @@ import type MonacoEditorPlugin from "@/index"; import { Explorer } from "@/explorer"; import type { ITree } from '@workspace/components/siyuan/tree/file'; - import { Icon } from '@/explorer/icon'; + import { ExplorerIcon } from '@/explorer/icon'; export let plugin: InstanceType; // 插件对象 export let workspace: string; // 工作空间目录 @@ -38,7 +38,7 @@ /* 标题栏配置 */ const bar: IBar = { - logo: Icon.ICONS.filetree, + logo: ExplorerIcon.ICONS.filetree, title: plugin.i18n.explorer.title, icons: [ { @@ -75,6 +75,7 @@ ; // 路径 -> 图标 ID 映射表 protected readonly material = { + languageIds: new Map(language_icon as IEntries), + fileNames: new Map(file_icon as IEntries), fileExtensions: new Map(file_extension_icon as IEntries), folderNames: new Map(folder_icon as IEntries), @@ -74,6 +89,19 @@ export class Icon { ) { this.i18n = this.plugin.i18n; this.map = new Map(); + + const javascript = this.material.languageIds.get("javascript"); + this.material.fileExtensions.set(".js", javascript); + this.material.fileExtensions.set(".cjs", javascript); + this.material.fileExtensions.set(".mjs", javascript); + + const typescript = this.material.languageIds.get("typescript"); + this.material.fileExtensions.set(".ts", typescript); + this.material.fileExtensions.set(".cts", typescript); + this.material.fileExtensions.set(".mts", typescript); + + const html = this.material.languageIds.get("html"); + this.material.fileExtensions.set(".html", html); } /* 展开节点 */ @@ -97,7 +125,7 @@ export class Icon { const icon = this.map.get(path); if (icon) return icon; - const info = parse(path); // 节点路径信息 + const info = parse(path.toLowerCase()); // 节点路径信息 switch (type) { case FileTreeNodeType.Root: // 根目录节点 @@ -105,19 +133,19 @@ export class Icon { case FileTreeNodeType.Folder: return this.makeFolderNodeIcon(info, expanded, light); case FileTreeNodeType.File: { - return this.makeFileodeIcon(info, light); + return this.makeFileNodeIcon(info, light); } } } - makeRootNodeIcon( + public makeRootNodeIcon( expanded: boolean = false, light: boolean = FLAG_LIGHT, ): string { - return expanded ? Icon.ICONS.material.rootFolderExpanded : Icon.ICONS.material.rootFolder; + return expanded ? ExplorerIcon.ICONS.material.rootFolderExpanded : ExplorerIcon.ICONS.material.rootFolder; } - makeFolderNodeIcon( + public makeFolderNodeIcon( info: ParsedPath, expanded: boolean = false, light: boolean = FLAG_LIGHT, @@ -133,21 +161,37 @@ export class Icon { : this.material.folderNames // 文件夹名称->图标 ).get(info.base) // 文件夹名称->图标 ?? (expanded - ? Icon.ICONS.material.folderExpanded // 默认文件夹展开图标 - : Icon.ICONS.material.folder // 默认文件夹图标 + ? ExplorerIcon.ICONS.material.folderExpanded // 默认文件夹展开图标 + : ExplorerIcon.ICONS.material.folder // 默认文件夹图标 ); } - makeFileodeIcon( + public makeFileNodeIcon( info: ParsedPath, light: boolean = FLAG_LIGHT, ): string { + const exts = info.base.split("."); + return (light ? ( this.material.fileNamesLight.get(info.base) // 文件名称->浅色图标 - ?? this.material.fileExtensionsLight.get(info.ext) // 文件扩展名->浅色图标 + ?? this.getIconByExts(exts, light) // 文件扩展名->浅色图标 ) : undefined) ?? this.material.fileNames.get(info.base) // 文件名称->图标 - ?? this.material.fileExtensions.get(info.ext) // 文件扩展名->图标 - ?? Icon.ICONS.material.file; // 默认文件图标 + ?? this.getIconByExts(exts, light) // 文件扩展名->图标 + ?? ExplorerIcon.ICONS.material.file; // 默认文件图标 + } + + protected getIconByExts( + exts: string[], + light: boolean = FLAG_LIGHT, + ) { + for (let i = 1; i <= exts.length - 1; ++i) { + const ext = `.${exts.slice(i).join(".")}`; + const icon = light + ? this.material.fileExtensionsLight.get(ext) + : this.material.fileExtensions.get(ext); + if (icon) return icon; + } + return undefined; } } diff --git a/workspace/plugins/monaco-editor/src/explorer/index.ts b/workspace/plugins/monaco-editor/src/explorer/index.ts index d27d1bc..18c0e7b 100644 --- a/workspace/plugins/monaco-editor/src/explorer/index.ts +++ b/workspace/plugins/monaco-editor/src/explorer/index.ts @@ -15,6 +15,8 @@ * along with this program. If not, see . */ +import type siyuan from "siyuan"; + import type { ComponentEvents } from "svelte"; import { get } from "svelte/store"; @@ -38,8 +40,9 @@ import { fn__code, ft__primary } from "@workspace/utils/siyuan/text/span"; import type MonacoEditorPlugin from "@/index"; import { Select } from "./select"; -import { Icon } from "./icon"; -import { Tooltip } from "./tooltip"; +import { ExplorerIcon } from "./icon"; +import { ExplorerTooltip } from "./tooltip"; +import { ExplorerContextMenu } from "./menu"; /* 资源 */ export interface IItem { @@ -75,8 +78,9 @@ export type DefaultNodeProps = Required; // 图标管理 - protected readonly tooltip: InstanceType; // 提示文本管理 + protected readonly icon: InstanceType; // 图标管理 + protected readonly tooltip: InstanceType; // 提示文本管理 + protected readonly contextMenu: InstanceType; // 提示文本管理 /* 树节点集合 */ protected readonly set = new Set(); @@ -128,10 +132,12 @@ export class Explorer implements ITree { countAriaLabel: plugin.i18n.explorer.count.ariaLabel, }, ) { - this.icon = new Icon(this.plugin); - this.tooltip = new Tooltip(this.plugin); + this.icon = new ExplorerIcon(this.plugin); + this.tooltip = new ExplorerTooltip(this.plugin); + this.contextMenu = new ExplorerContextMenu(this.plugin); } + /* 根据完整路径查找节点 */ public path2node(path: string): IFileTreeNodeStores | undefined { return this.map.get(path); } @@ -194,7 +200,20 @@ export class Explorer implements ITree { ); } - /* 打开事件 */ + /* 菜单事件 */ + public readonly menu = (e: ComponentEvents["menu"]) => { + const node = e.detail.props; + const menu = this.contextMenu.makeMenu(node); + + const event = e.detail.e; + menu.open({ + x: event.clientX, + y: event.clientY, + isLeft: false, + }); + } + + /* 文件打开事件 */ public readonly open = (e: ComponentEvents["open"]) => { // plugin.logger.debug(e); const node = e.detail.props; @@ -204,6 +223,7 @@ export class Explorer implements ITree { case FileTreeNodeType.File: { // 打开文件 const path = get(node.relative); const icon = get(node.icon); + const text = get(node.text); const ext = extname(path); // 文件扩展名 if (isBinaryExt(ext)) { this.plugin.siyuan.confirm( @@ -214,29 +234,19 @@ export class Explorer implements ITree { ft__primary(this.plugin.i18n.message.openAnyway), ].join("
    "), // 文本 async () => { - this.plugin.openWorkspaceFile(path, icon); + this.plugin.openWorkspaceFile(path, text, icon); }, // 确认按钮回调 ); } else { - this.plugin.openWorkspaceFile(path, icon); + this.plugin.openWorkspaceFile(path, text, icon); } break; } case FileTreeNodeType.Root: case FileTreeNodeType.Folder: - default: // 切换文件夹折叠状态 - switch (get(node.folded)) { - case true: - node.folded.set(false); - this.icon.expand(node); - break; - case false: - default: - node.folded.set(true); - this.icon.collapse(node); - break; - } + default: + this.plugin.logger.warn(`Unexpected node ${get(node.path)} dispatch open event`); break; } } diff --git a/workspace/plugins/monaco-editor/src/explorer/menu.ts b/workspace/plugins/monaco-editor/src/explorer/menu.ts new file mode 100644 index 0000000..4b8eb90 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/explorer/menu.ts @@ -0,0 +1,412 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import type siyuan from "siyuan"; +import type MonacoEditorPlugin from "@/index"; +import { FileTreeNodeType, type IFileTreeNodeStores } from "@workspace/components/siyuan/tree/file"; +import { get } from "svelte/store"; +import { HandlerType } from "@/facades/facade"; +import { FLAG_ELECTRON } from "@workspace/utils/env/front-end"; +import { copyText } from "@workspace/utils/misc/copy"; +import { isStaticWebFileServicePath, workspacePath2StaticPathname } from "@workspace/utils/siyuan/url"; +import { ExplorerIcon } from "./icon"; + +/* 菜单项类型 */ +export enum MenuItemType { + Action, // 菜单项 + Submenu, // 子菜单 + Separator, // 分割线 +} + +/* 菜单项适用节点类型 */ +export interface IMenuBase { + type: MenuItemType; // 菜单项类型 + + root: boolean; // 适用根节点 + folder: boolean; // 适用文件夹节点 + file: boolean; // 适用文件节点 +} + +/* 常规菜单项 */ +export interface IMenuAction extends IMenuBase { + type: MenuItemType.Action, + options: siyuan.IMenuItemOption, +} + +/* 多级菜单项 */ +export interface IMenuSubmenu extends IMenuBase { + type: MenuItemType.Submenu, + options: siyuan.IMenuItemOption, + submenu: IMenuItem[], +} + +/* 菜单分割线 */ +export interface IMenuSeparator extends IMenuBase { + type: MenuItemType.Separator, + index?: number, +} + +/* 菜单项 */ +export type IMenuItem = IMenuAction | IMenuSubmenu | IMenuSeparator; + + +export class ExplorerContextMenu { + /* 按类型过滤节点 */ + protected static filter( + items: IMenuItem[], + type: FileTreeNodeType, + ): IMenuItem[] { + /* 按节点类型过滤 */ + items = (() => { + switch (type) { + case FileTreeNodeType.Root: + return items.filter(item => item.root); + case FileTreeNodeType.Folder: + return items.filter(item => item.folder); + case FileTreeNodeType.File: + return items.filter(item => item.file); + } + })(); + if (items.length === 0) return items; + + /* 过滤下级菜单 */ + items = items.filter(item => { + if (item.type === MenuItemType.Submenu) { + item.submenu = ExplorerContextMenu.filter(item.submenu, type); + return item.submenu.length > 0 + && item.submenu.some(item => item.type !== MenuItemType.Separator); + } + else return true; + }); + if (items.length === 0) return items; + + /* 清理首尾两端的分割线 */ + items = items.slice( + items.findIndex(item => item.type !== MenuItemType.Separator), + items.findLastIndex(item => item.type !== MenuItemType.Separator) + 1, + ); + if (items.length === 0) return items; + + /* 清理连续的分割线 */ + items = items.filter((item, index, items) => { + if (item.type !== MenuItemType.Separator) return true; + else return items[index - 1]?.type !== MenuItemType.Separator; + }); + + return items; + }; + + /* 构造含有下级菜单的菜单项 */ + public static makeSubmenuItem(item: IMenuSubmenu): siyuan.IMenuItemOption { + item.options.submenu = item.submenu.map(item => { + switch (item.type) { + case MenuItemType.Action: + return item.options; + case MenuItemType.Submenu: + return ExplorerContextMenu.makeSubmenuItem(item); + case MenuItemType.Separator: + return { type: "separator" }; + } + }); + return item.options; + } + + protected readonly i18n: MonacoEditorPlugin["i18n"]; + + constructor( + public readonly plugin: InstanceType, // 插件对象 + ) { + this.i18n = this.plugin.i18n; + } + + /* 构造菜单 */ + public makeMenu(node: IFileTreeNodeStores): InstanceType { + const menu = new this.plugin.siyuan.Menu(); + const items = ExplorerContextMenu.filter(this.makeMenuItems(node), get(node.type)); + items.forEach(item => { + switch (item.type) { + case MenuItemType.Action: + menu.addItem(item.options); + break; + case MenuItemType.Submenu: + menu.addItem(ExplorerContextMenu.makeSubmenuItem(item)); + break; + case MenuItemType.Separator: + menu.addSeparator(item.index); + break; + } + }); + return menu; + } + + /* 构造菜单项列表 */ + public makeMenuItems(node: IFileTreeNodeStores): IMenuItem[] { + const type = get(node.type); + const name = get(node.name); + const path = get(node.path); + const relative = get(node.relative); + + const items: IMenuItem[] = []; + + // TODO: 刷新 + // TODO: 新建文件 + // TODO: 新建文件夹 + + /* 打开文件 */ + items.push({ + type: MenuItemType.Action, + options: { + icon: "iconCode", + label: this.i18n.menu.open.label, + submenu: this.plugin.buildOpenSubmenu( + { + type: HandlerType.asset, + handler: { + path: get(node.relative), + }, + breadcrumb: { + path: get(node.relative), + }, + }, + get(node.icon), + get(node.text), + ), + }, + root: false, + folder: false, + file: true, + }); + + if (FLAG_ELECTRON) { + + /** + * 使用默认程序打开 + * REF: https://www.electronjs.org/zh/docs/latest/api/shell#shellopenpathpath + */ + items.push({ + type: MenuItemType.Action, + options: { + icon: "iconOpenWindow", + label: this.i18n.menu.openWithDefaultProgram.label, + click: () => { + if (type === FileTreeNodeType.File) { + globalThis + .require("electron") + .shell + .openPath(path); + } + else { + globalThis + .require("electron") + .shell + .showItemInFolder( + globalThis + .require("path") + .normalize(path) + ); + } + }, + }, + root: true, + folder: true, + file: true, + }); + + /** + * 在文件资源管理器中显示 + * REF: https://www.electronjs.org/zh/docs/latest/api/shell#shellshowiteminfolderfullpath + */ + items.push({ + type: MenuItemType.Action, + options: { + icon: "iconFolder", + label: this.i18n.menu.revealInExplorer.label, + click: () => { + globalThis + .require("electron") + .shell + .showItemInFolder( + globalThis + .require("path") + .normalize(path) + ); + }, + }, + root: true, + folder: true, + file: true, + }); + } + + items.push({ + type: MenuItemType.Separator, + root: true, + folder: true, + file: true, + }); + + /* 复制 */ + items.push({ + type: MenuItemType.Submenu, + options: { + icon: "iconCopy", + label: this.i18n.menu.copy.label, + }, + submenu: (() => { + const submenu: IMenuItem[] = [ + /* 复制名称 */ + { + type: MenuItemType.Action, + options: { + icon: ExplorerIcon.makeDefaultNodeIcon(type), + label: this.i18n.menu.copyName.label, + accelerator: name, + click: () => { + copyText(name); + }, + }, + root: true, + folder: true, + file: true, + }, + /* 复制相对路径 */ + { + type: MenuItemType.Action, + options: { + icon: "iconCopy", + label: this.i18n.menu.copyRelativePath.label, + accelerator: relative, + click: () => { + copyText(relative); + }, + }, + root: true, + folder: true, + file: true, + }, + /* 复制完整路径 */ + { + type: MenuItemType.Action, + options: { + icon: "iconCopy", + label: this.i18n.menu.copyFullPath.label, + accelerator: path, + click: () => { + copyText(path); + }, + }, + root: true, + folder: true, + file: true, + }, + ]; + if (isStaticWebFileServicePath(relative)) { + const pathname = workspacePath2StaticPathname(relative); + const url = new URL(`${globalThis.document.baseURI}${pathname}`); + const link1 = `[${name}](<${pathname}>)`; + const link2 = `[${name}](<${url.href}>)`; + const link1_accelerator = `[${name}](<${pathname}>)`; + const link2_accelerator = `[${name}](<${url.href}>)`; + submenu.push( + /* 复制引用路径 */ + { + type: MenuItemType.Action, + options: { + icon: "iconLink", + label: this.i18n.menu.copyReferencePath.label, + accelerator: pathname, + click: () => { + copyText(pathname); + }, + }, + root: true, + folder: true, + file: true, + }, + /* 复制 URL */ + { + type: MenuItemType.Action, + options: { + icon: "iconLink", + label: this.i18n.menu.copyURL.label, + accelerator: url.href, + click: () => { + copyText(url.href); + }, + }, + root: true, + folder: true, + file: true, + }, + /* 复制 Markdown 超链接 */ + { + type: MenuItemType.Action, + options: { + icon: "iconMarkdown", + label: this.i18n.menu.copyMarkdownHyperlink.label, + accelerator: link1_accelerator, + click: () => { + copyText(link1); + }, + }, + root: true, + folder: true, + file: true, + }, + { + type: MenuItemType.Action, + options: { + icon: "iconMarkdown", + label: this.i18n.menu.copyMarkdownHyperlink.label, + accelerator: link2_accelerator, + click: () => { + copyText(link2); + }, + }, + root: true, + folder: true, + file: true, + }, + ); + } + return submenu; + })(), + root: true, + folder: true, + file: true, + }); + + items.push({ + type: MenuItemType.Separator, + root: true, + folder: true, + file: true, + }); + + // TODO: 另存为 + + // TODO: 下载 + + // TODO: 上传 + + // TODO: 重命名 + + // TODO: 删除 + + return items; + } +} diff --git a/workspace/plugins/monaco-editor/src/explorer/tooltip.ts b/workspace/plugins/monaco-editor/src/explorer/tooltip.ts index 2ce34ec..2098e48 100644 --- a/workspace/plugins/monaco-editor/src/explorer/tooltip.ts +++ b/workspace/plugins/monaco-editor/src/explorer/tooltip.ts @@ -20,7 +20,7 @@ import { FileTreeNodeType } from "@workspace/components/siyuan/tree/file"; import { parse } from "@workspace/utils/path/browserify"; /* 提示信息管理 */ -export class Tooltip { +export class ExplorerTooltip { protected readonly i18n: MonacoEditorPlugin["i18n"]; protected readonly map: Map; // 路径 -> 提示文本 映射表 diff --git a/workspace/plugins/monaco-editor/src/index.ts b/workspace/plugins/monaco-editor/src/index.ts index 5f30979..fb4a326 100644 --- a/workspace/plugins/monaco-editor/src/index.ts +++ b/workspace/plugins/monaco-editor/src/index.ts @@ -703,13 +703,17 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { * @param title: 页签标题 * @param options: 编辑器初始配置 */ - protected buildOpenSubmenu( + public buildOpenSubmenu( facadeOptions: IFacadeOptions, // icon: string = "icon-monaco-editor", icon: string = "iconCode", title: string = this.i18n.displayName, options: IEditorOptions = this.config.editor.options, ): siyuan.IMenuItemOption[] { + icon = icon.startsWith("#") + ? icon.substring(1) + : icon; // 删除 # 前缀 + const submenu: siyuan.IMenuItemOption[] = []; const custom = { icon, @@ -807,6 +811,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { */ public openWorkspaceFile( path: string, + title: string, icon: string = "iconCode", options: { position?: "right" | "bottom", @@ -814,12 +819,15 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { removeCurrentTab?: boolean // 在当前页签打开时需移除原有页签 } = {}, ): void { - icon = icon.startsWith("#") ? icon.substring(1) : icon; // 删除 # 前缀 + icon = icon.startsWith("#") + ? icon.substring(1) + : icon; // 删除 # 前缀 + this.siyuan.openTab({ app: this.app, custom: { icon, - title: path, + title, fn: this.tab, data: { options: this.config.editor.options, diff --git a/workspace/pnpm-lock.yaml b/workspace/pnpm-lock.yaml index 013c70c..ba27d02 100644 --- a/workspace/pnpm-lock.yaml +++ b/workspace/pnpm-lock.yaml @@ -121,6 +121,9 @@ importers: binary-extensions: specifier: ^2.2.0 version: 2.2.0 + copy-to-clipboard: + specifier: ^3.3.3 + version: 3.3.3 deepmerge: specifier: ^4.3.1 version: 4.3.1 @@ -2622,6 +2625,12 @@ packages: dependencies: is-what: 3.14.1 + /copy-to-clipboard@3.3.3: + resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} + dependencies: + toggle-selection: 1.0.6 + dev: true + /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true @@ -4662,6 +4671,10 @@ packages: is-number: 7.0.0 dev: true + /toggle-selection@1.0.6: + resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==} + dev: true + /ts-api-utils@1.0.1(typescript@5.1.6): resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} engines: {node: '>=16.13.0'} From 352c2304ccff30295930655a71e0081be95c94f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Mon, 24 Jul 2023 12:36:40 +0800 Subject: [PATCH 046/113] =?UTF-8?q?feat(monaco-editor):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=88=B7=E6=96=B0=E8=8F=9C=E5=8D=95=E9=A1=B9=20|=20Ad?= =?UTF-8?q?d=20refresh=20menu=20item.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../components/siyuan/tree/file/Node.svelte | 23 +-- .../monaco-editor/public/i18n/en_US.json | 13 +- .../monaco-editor/public/i18n/zh_CHT.json | 13 +- .../monaco-editor/public/i18n/zh_CN.json | 13 +- .../src/components/ExplorerDock.svelte | 29 ++- .../monaco-editor/src/explorer/index.ts | 180 +++++++++++------- .../monaco-editor/src/explorer/menu.ts | 64 ++++++- workspace/plugins/monaco-editor/src/index.ts | 6 + 9 files changed, 245 insertions(+), 97 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be15e03..9f11cd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 2023-07-24 - 添加打开与复制菜单项 | Add open and copy menu items. +- 添加刷新菜单项 | Add refresh menu item. ## 2023-07-23 diff --git a/workspace/packages/components/siyuan/tree/file/Node.svelte b/workspace/packages/components/siyuan/tree/file/Node.svelte index 16eac1b..e724d53 100644 --- a/workspace/packages/components/siyuan/tree/file/Node.svelte +++ b/workspace/packages/components/siyuan/tree/file/Node.svelte @@ -366,26 +366,23 @@ {/if} diff --git a/workspace/plugins/monaco-editor/public/i18n/en_US.json b/workspace/plugins/monaco-editor/public/i18n/en_US.json index 4884faf..3834929 100644 --- a/workspace/plugins/monaco-editor/public/i18n/en_US.json +++ b/workspace/plugins/monaco-editor/public/i18n/en_US.json @@ -311,8 +311,8 @@ "export": { "accelerator": "Export" }, - "open": { - "label": "Open" + "openFile": { + "label": "Open File" }, "openByNewWindow": { "label": "Open with New Window" @@ -332,6 +332,15 @@ "openWithDefaultProgram": { "label": "Open with Default Program" }, + "refresh": { + "label": "Refresh" + }, + "refreshDirectory": { + "label": "Refresh Current Directory" + }, + "refreshDirectoryDeeply": { + "label": "Refresh Current Directory Deeply" + }, "revealInExplorer": { "label": "Reveal In Explorer" }, diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json index 752fd93..fe34c40 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json @@ -311,8 +311,8 @@ "export": { "accelerator": "匯出" }, - "open": { - "label": "打開" + "openFile": { + "label": "打開文檔" }, "openByNewWindow": { "label": "使用新窗口打開" @@ -332,6 +332,15 @@ "openWithDefaultProgram": { "label": "使用預設程式打開" }, + "refresh": { + "label": "重新整理" + }, + "refreshDirectory": { + "label": "重新整理當前目錄" + }, + "refreshDirectoryDeeply": { + "label": "深度重新整理當前目錄" + }, "revealInExplorer": { "label": "在檔案總管中顯示" }, diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json index c6f72a5..4a0892d 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json @@ -311,8 +311,8 @@ "export": { "accelerator": "导出" }, - "open": { - "label": "打开" + "openFile": { + "label": "打开文件" }, "openByNewWindow": { "label": "使用新窗口打开" @@ -332,6 +332,15 @@ "openWithDefaultProgram": { "label": "使用默认程序打开" }, + "refresh": { + "label": "刷新" + }, + "refreshDirectory": { + "label": "刷新当前目录" + }, + "refreshDirectoryDeeply": { + "label": "深度刷新当前目录" + }, "revealInExplorer": { "label": "在文件资源管理器中显示" }, diff --git a/workspace/plugins/monaco-editor/src/components/ExplorerDock.svelte b/workspace/plugins/monaco-editor/src/components/ExplorerDock.svelte index cbc9faa..92f52d7 100644 --- a/workspace/plugins/monaco-editor/src/components/ExplorerDock.svelte +++ b/workspace/plugins/monaco-editor/src/components/ExplorerDock.svelte @@ -17,7 +17,7 @@ + +
    + + +
    + {@html text} +
    +
    + +
    + + + + + + + + + + {@html tips} + +
    + + +
    + +
    + +
    diff --git a/workspace/packages/components/siyuan/dialog/event.ts b/workspace/packages/components/siyuan/dialog/event.ts new file mode 100644 index 0000000..225af0a --- /dev/null +++ b/workspace/packages/components/siyuan/dialog/event.ts @@ -0,0 +1,35 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +export interface IPromptEvent { + change: { + value: string; + event: Event; + }; + input: { + value: string; + event: Event; + }; + cancel: { + value: string; + event: MouseEvent; + }; + confirm: { + value: string; + event: MouseEvent; + }; +} diff --git a/workspace/packages/components/siyuan/dialog/prompt.ts b/workspace/packages/components/siyuan/dialog/prompt.ts new file mode 100644 index 0000000..1e123a4 --- /dev/null +++ b/workspace/packages/components/siyuan/dialog/prompt.ts @@ -0,0 +1,119 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import type siyuan from "siyuan"; +import Prompt from "./Prompt.svelte"; + +export type PromptCallback = ( + value: string, + dialog: InstanceType, + component: InstanceType, +) => T | Promise; + +export interface IPromptOptions { + title: string; // 标题 + text: string; // 说明文本 + value?: string; // 输入框默认文本 + placeholder?: string; // 输入框空白提示文本 + tips?: string; // 提示文本 + width?: string; // 宽度 + height?: string; // 高度 + input?: PromptCallback; // 返回更新的提示文本 + change?: PromptCallback; // 返回更新的提示文本 + confirm?: PromptCallback; // 返回是否关闭 + cancel?: PromptCallback; // 返回是否关闭 +} + +export interface IPromptReturn { + id: string; // 对话框元素 ID + dialog: InstanceType; // 对话框实例 + component: InstanceType; // 组件实例 +} + +/* 打开提示输入框 */ +export function prompt(Dialog: typeof siyuan.Dialog, options: IPromptOptions): IPromptReturn { + const id = `dialog-prompt-${Date.now()}`; + + const dialog = new Dialog({ + title: options.title, + content: `
    `, + width: options.width || undefined, + height: options.height || undefined, + destroyCallback: () => component?.$destroy(), + }); + + const component = new Prompt({ + target: dialog.element.querySelector(`#${id}`), + props: { + text: options.text, + value: options.value, + placeholder: options.placeholder, + tips: options.tips, + }, + }); + + component.$on("input", async e => { + if (options.input) { + const tips = await options.input( + e.detail.value, + dialog, + component, + ); + component.$set({ tips }); + } + }); + component.$on("change", async e => { + if (options.change) { + const tips = await options.change( + e.detail.value, + dialog, + component, + ); + component.$set({ tips }); + } + }); + component.$on("confirm", async e => { + const close = options.confirm + ? await options.confirm( + e.detail.value, + dialog, + component, + ) + : true; + if (close) { + dialog.destroy(); + } + }); + component.$on("cancel", async e => { + const close = options.cancel + ? await options.cancel( + e.detail.value, + dialog, + component, + ) + : true; + if (close) { + dialog.destroy(); + } + }); + + return { + id, + dialog, + component, + }; +} diff --git a/workspace/packages/components/siyuan/setting/event.ts b/workspace/packages/components/siyuan/setting/event.ts new file mode 100644 index 0000000..217e67c --- /dev/null +++ b/workspace/packages/components/siyuan/setting/event.ts @@ -0,0 +1,51 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import type { IMouseStatus } from "@workspace/utils/shortcut"; +import type { TabKey } from "./tab"; + +export interface ITabEvent { + changed: { + key: TabKey; + }; +} + +export interface IPanelsEvent { + changed: { + key: TabKey; + }; + "search-changed": { + value: string; + }; +} + +export interface IShortcutEvent { + changed: { + shortcut: IMouseStatus; + }; +} + +export interface IInputEvent { + clicked: { + event: MouseEvent; + }; + changed: { + key: string; + value: any; + event: Event; + }; +} diff --git a/workspace/packages/components/siyuan/setting/item/Input.svelte b/workspace/packages/components/siyuan/setting/item/Input.svelte index ba58e1f..6c2d98f 100644 --- a/workspace/packages/components/siyuan/setting/item/Input.svelte +++ b/workspace/packages/components/siyuan/setting/item/Input.svelte @@ -21,6 +21,7 @@ import { createEventDispatcher } from "svelte"; import { ItemType, type ILimits, type IOptions } from "./item"; + import type { IInputEvent } from "./../event"; export let type: ItemType; // Setting Type export let settingKey: string; @@ -34,7 +35,7 @@ export let limits: ILimits = { min: 0, max: 100, step: 1 }; // Use it if type is number/slider export let height: number = 0; // Use it if type is textarea - const dispatch = createEventDispatcher(); + const dispatch = createEventDispatcher(); function clicked(event: MouseEvent) { dispatch("clicked", { event }); @@ -132,7 +133,7 @@ class="b3-text-field" class:fn__block={block} class:fn__size200={!block && normal} - style:height={(height > 0) ? `${height}px` : undefined} + style:height={height > 0 ? `${height}px` : undefined} {placeholder} bind:value={settingValue} on:change={changed} diff --git a/workspace/packages/components/siyuan/setting/panel/Panels.svelte b/workspace/packages/components/siyuan/setting/panel/Panels.svelte index f6d31ca..89ef809 100644 --- a/workspace/packages/components/siyuan/setting/panel/Panels.svelte +++ b/workspace/packages/components/siyuan/setting/panel/Panels.svelte @@ -21,6 +21,7 @@ import { createEventDispatcher } from "svelte"; import Svg from "./../../misc/Svg.svelte"; import type { ITab, TabKey } from "./../tab"; + import type { IPanelsEvent } from "./../event"; export let panels: ITab[]; // 面板标签列表 export let focus: TabKey; // 当前选中的面板的 key @@ -29,7 +30,7 @@ export let searchPlaceholder = ""; // 搜索提示内容 export let searchValue = ""; // 搜索框内容 - const dispatch = createEventDispatcher(); + const dispatch = createEventDispatcher(); function searchChanged() { dispatch("search-changed", { value: searchValue }); diff --git a/workspace/packages/components/siyuan/setting/specified/Shortcut.svelte b/workspace/packages/components/siyuan/setting/specified/Shortcut.svelte index 614cd9b..da2fa82 100644 --- a/workspace/packages/components/siyuan/setting/specified/Shortcut.svelte +++ b/workspace/packages/components/siyuan/setting/specified/Shortcut.svelte @@ -26,8 +26,9 @@ import Svg from "./../../misc/Svg.svelte"; import { ItemType } from "./../item/item"; - + import { type IMouseStatus, MouseButton, MouseEvent } from "@workspace/utils/shortcut"; + import type { IShortcutEvent } from "./../event"; export let title: string; // 标题 export let shortcut: IMouseStatus; // 快捷键 @@ -75,7 +76,7 @@ { key: MouseEvent.mouseout, text: MouseEvent.mouseout }, ]; - const dispatch = createEventDispatcher(); + const dispatch = createEventDispatcher(); function changed(e: ComponentEvents["changed"]) { if (shortcut.hasOwnProperty(e.detail.key)) { shortcut[e.detail.key] = e.detail.value; diff --git a/workspace/packages/components/siyuan/setting/tab/Tab.svelte b/workspace/packages/components/siyuan/setting/tab/Tab.svelte index a512439..023ace2 100644 --- a/workspace/packages/components/siyuan/setting/tab/Tab.svelte +++ b/workspace/packages/components/siyuan/setting/tab/Tab.svelte @@ -19,12 +19,13 @@ -
    +
    diff --git a/workspace/packages/components/siyuan/dialog/prompt.ts b/workspace/packages/components/siyuan/dialog/prompt.ts index 1e123a4..2b6ad37 100644 --- a/workspace/packages/components/siyuan/dialog/prompt.ts +++ b/workspace/packages/components/siyuan/dialog/prompt.ts @@ -32,6 +32,7 @@ export interface IPromptOptions { tips?: string; // 提示文本 width?: string; // 宽度 height?: string; // 高度 + selectable?: boolean; // 是否可选择 input?: PromptCallback; // 返回更新的提示文本 change?: PromptCallback; // 返回更新的提示文本 confirm?: PromptCallback; // 返回是否关闭 @@ -63,6 +64,7 @@ export function prompt(Dialog: typeof siyuan.Dialog, options: IPromptOptions): I value: options.value, placeholder: options.placeholder, tips: options.tips, + selectable: options.selectable, }, }); diff --git a/workspace/plugins/monaco-editor/public/i18n/en_US.json b/workspace/plugins/monaco-editor/public/i18n/en_US.json index 29401d3..f6cbbf5 100644 --- a/workspace/plugins/monaco-editor/public/i18n/en_US.json +++ b/workspace/plugins/monaco-editor/public/i18n/en_US.json @@ -281,16 +281,14 @@ } }, "menu": { - "delete": { - "label": "Delete" - }, - "deleteFile": { - "label": "Delete File", - "text": "Make sure you want to delete the file ${1} ?
    The complete path of the file is ${2}" - }, - "deleteFolder": { - "label": "Delete Folder", - "text": "Make sure you want to delete the folder ${1} ?
    The complete path of the folder is ${2}" + "confirm": { + "placeholder": "The full path to the resource", + "text": "Warning: You are operating on a protected resource ${1} !
    Your subsequent activities may lead to data loss or damage!

    If you want to continue the operation, please enter the complete path of the resource ${2} in the text box below", + "tips": { + "pleaseEnter": "Please enter the complete path of the resource", + "warn": "Are you sure you want to continue operating the resource ${1}?" + }, + "title": "⚠️ High-risk operation confirmation" }, "copy": { "label": "Copy" @@ -313,6 +311,17 @@ "copyURL": { "label": "Copy URL" }, + "delete": { + "label": "Delete" + }, + "deleteFile": { + "label": "Delete File", + "text": "Make sure you want to delete the file ${1} ?
    The complete path of the file is ${2}" + }, + "deleteFolder": { + "label": "Delete Folder", + "text": "Make sure you want to delete the folder ${1} ?
    The complete path of the folder is ${2}" + }, "editAssetFile": { "label": "Edit Asset File" }, @@ -349,12 +358,18 @@ "pleaseEnter": "Please enter a folder name" } }, + "open": { + "label": "Open" + }, "openByNewWindow": { "label": "Open with New Window" }, "openFile": { "label": "Open File" }, + "openFileInEditor": { + "label": "Open File in Text Editor" + }, "openInNewTab": { "label": "Open in New Tab" }, diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json index d9f12df..70bd447 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json @@ -281,16 +281,14 @@ } }, "menu": { - "delete": { - "label": "刪除" - }, - "deleteFile": { - "label": "刪除檔案", - "text": "確定要刪除檔案 ${1} ?
    該檔案的完整路徑為 ${2}" - }, - "deleteFolder": { - "label": "刪除資料夾", - "text": "確定要刪除資料夾 ${1} ?
    該資料夾的完整路徑為 ${2}" + "confirm": { + "placeholder": "資源完整路徑", + "text": "警告:您正在操作受保護的資源 ${1} !
    您之後的活動可能導致資料丟失或損壞!

    若繼續操作,請在下方文字框中輸入該資源的完整路徑 ${2}", + "tips": { + "pleaseEnter": "請輸入資源的完整路徑", + "warn": "您確定要繼續操作資源 ${1} ?" + }, + "title": "⚠️ 高風險操作確認" }, "copy": { "label": "複製" @@ -313,6 +311,17 @@ "copyURL": { "label": "複製 URL" }, + "delete": { + "label": "刪除" + }, + "deleteFile": { + "label": "刪除檔案", + "text": "確定要刪除檔案 ${1} ?
    該檔案的完整路徑為 ${2}" + }, + "deleteFolder": { + "label": "刪除資料夾", + "text": "確定要刪除資料夾 ${1} ?
    該資料夾的完整路徑為 ${2}" + }, "editAssetFile": { "label": "編輯資料文檔" }, @@ -349,26 +358,32 @@ "pleaseEnter": "請輸入資料夾名" } }, + "open": { + "label": "開啟" + }, "openByNewWindow": { - "label": "使用新窗口打開" + "label": "使用新窗口開啟" }, "openFile": { - "label": "打開文檔" + "label": "開啟文檔" + }, + "openFileInEditor": { + "label": "在文字編輯器中開啟" }, "openInNewTab": { - "label": "在新分頁中打開" + "label": "在新分頁中開啟" }, "openTabBackground": { - "label": "在後台分頁中打開" + "label": "在後台分頁中開啟" }, "openTabBottom": { - "label": "在分頁下側打開" + "label": "在分頁下側開啟" }, "openTabRight": { - "label": "在分頁右側打開" + "label": "在分頁右側開啟" }, "openWithDefaultProgram": { - "label": "使用預設程式打開" + "label": "使用預設程式開啟" }, "refresh": { "label": "重新整理" diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json index 679feca..1fcc9d9 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json @@ -281,16 +281,14 @@ } }, "menu": { - "delete": { - "label": "删除" - }, - "deleteFile": { - "label": "删除文件", - "text": "确定要删除文件 ${1} ?
    该文件的完整路径为 ${2}" - }, - "deleteFolder": { - "label": "删除文件夹", - "text": "确定要删除文件夹 ${1} ?
    该文件夹的完整路径为 ${2}" + "confirm": { + "placeholder": "资源完整路径", + "text": "警告:您正在操作受保护的资源 ${1} !
    您之后的活动可能导致数据丢失或损坏!

    若继续操作,请在下方文本框中输入该资源的完整路径 ${2}", + "tips": { + "pleaseEnter": "请输入资源的完整路径", + "warn": "您确定要继续操作资源 ${1} ?" + }, + "title": "⚠️ 高风险操作确认" }, "copy": { "label": "复制" @@ -313,6 +311,17 @@ "copyURL": { "label": "复制 URL" }, + "delete": { + "label": "删除" + }, + "deleteFile": { + "label": "删除文件", + "text": "确定要删除文件 ${1} ?
    该文件的完整路径为 ${2}" + }, + "deleteFolder": { + "label": "删除文件夹", + "text": "确定要删除文件夹 ${1} ?
    该文件夹的完整路径为 ${2}" + }, "editAssetFile": { "label": "编辑资源文件" }, @@ -349,12 +358,18 @@ "pleaseEnter": "请输入文件夹名" } }, + "open": { + "label": "打开" + }, "openByNewWindow": { "label": "使用新窗口打开" }, "openFile": { "label": "打开文件" }, + "openFileInEditor": { + "label": "在文本编辑器中打开" + }, "openInNewTab": { "label": "在新页签中打开" }, diff --git a/workspace/plugins/monaco-editor/src/configs/default.ts b/workspace/plugins/monaco-editor/src/configs/default.ts index 9513330..b7c38ac 100644 --- a/workspace/plugins/monaco-editor/src/configs/default.ts +++ b/workspace/plugins/monaco-editor/src/configs/default.ts @@ -101,4 +101,29 @@ export const DEFAULT_CONFIG: IConfig = { wordWrap: 'off', // 是否自动换行 "on" | "off" | "wordWrapColumn" | "bounded" }, }, + dock: { + editor: { + enable: true, + }, + explorer: { + enable: true, + safe: true, + permission: { + protected: { + enable: true, + + read: true, + write: true, + + new: true, + view: false, + edit: false, + move: false, + copy: true, + rename: false, + delete: false, + }, + }, + }, + }, }; diff --git a/workspace/plugins/monaco-editor/src/explorer/index.ts b/workspace/plugins/monaco-editor/src/explorer/index.ts index ad9538b..39a2da7 100644 --- a/workspace/plugins/monaco-editor/src/explorer/index.ts +++ b/workspace/plugins/monaco-editor/src/explorer/index.ts @@ -43,6 +43,7 @@ import { Select } from "./select"; import { ExplorerIcon } from "./icon"; import { ExplorerTooltip } from "./tooltip"; import { ExplorerContextMenu } from "./menu"; +import { ResourceOption, isResourceOperable } from "@/utils/permission"; /* 资源 */ export interface IItem { @@ -75,8 +76,30 @@ export type DefaultNodeProps = Required>; +/* 重要资源类型 */ +export enum ProtectedResourceType { + None, // 不重要 + Data, // 数据 + Repo, // 快照仓库 + Lock, // 工作区锁标志 +} + /* 文件资源管理器 */ export class Explorer implements ITree { + public static isProtected(relative: string): ProtectedResourceType { + switch (true) { + case relative === "data": + return ProtectedResourceType.Data; + case relative === "repo": + case relative.startsWith("repo/"): + return ProtectedResourceType.Repo; + case relative === ".lock": + return ProtectedResourceType.Lock; + default: + return ProtectedResourceType.None; + } + } + /* 管理工具 */ protected readonly icon: InstanceType; // 图标管理 protected readonly tooltip: InstanceType; // 提示文本管理 @@ -236,6 +259,14 @@ export class Explorer implements ITree { const ext = extname(name); // 文件扩展名 + /* 是否可更改 */ + const updatable = isResourceOperable( + this.plugin.config.dock.explorer.safe, + Explorer.isProtected(relative) !== ProtectedResourceType.None, + this.plugin.config.dock.explorer.permission.protected, + ResourceOption.edit, + ); + if (isBinaryExt(ext)) { this.plugin.siyuan.confirm( fn__code(name), // 标题 @@ -246,13 +277,13 @@ export class Explorer implements ITree { "", ft__primary(this.plugin.i18n.message.openAnyway), ].join("
    "), // 文本 - async () => { - this.plugin.openWorkspaceFile(relative, text, icon); + () => { + this.plugin.openWorkspaceFile(relative, text, icon, false); }, // 确认按钮回调 ); } else { - this.plugin.openWorkspaceFile(relative, text, icon); + this.plugin.openWorkspaceFile(relative, text, icon, updatable); } break; } @@ -509,11 +540,4 @@ export class Explorer implements ITree { callback(node); } } - - /** - * 新建文件/文件夹 - */ - public new(): void { - - } } diff --git a/workspace/plugins/monaco-editor/src/explorer/menu.ts b/workspace/plugins/monaco-editor/src/explorer/menu.ts index a875291..fc3e0ff 100644 --- a/workspace/plugins/monaco-editor/src/explorer/menu.ts +++ b/workspace/plugins/monaco-editor/src/explorer/menu.ts @@ -24,7 +24,7 @@ import { FLAG_ELECTRON } from "@workspace/utils/env/front-end"; import { copyText } from "@workspace/utils/misc/copy"; import { isStaticWebFileServicePath, workspacePath2StaticPathname } from "@workspace/utils/siyuan/url"; import { ExplorerIcon } from "./icon"; -import type { Explorer } from "."; +import { Explorer, ProtectedResourceType } from "."; import { extname, join } from "@workspace/utils/path/browserify"; import { fn__code, @@ -33,6 +33,7 @@ import { } from "@workspace/utils/siyuan/text/span"; import { prompt } from "@workspace/components/siyuan/dialog/prompt"; import { isValidName } from "@workspace/utils/file/filename"; +import { ResourceOption, isResourceOperable } from "@/utils/permission"; /* 菜单项类型 */ export enum MenuItemType { @@ -171,6 +172,8 @@ export class ExplorerContextMenu { const relative = get(node.relative); const children = get(node.children); + const protected_type = Explorer.isProtected(relative); // 受保护类型 + const protect = protected_type !== ProtectedResourceType.None; // 是否为被保护的资源 const ext = extname(path); // 文件扩展名 const sub_names: Set = children // 下级资源名称列表 ? new Set(children.map(node => node.name)) @@ -287,65 +290,94 @@ export class ExplorerContextMenu { file: false, }); - /* 打开文件 */ + /* 打开 */ items.push({ - type: MenuItemType.Action, + type: MenuItemType.Submenu, options: { - icon: "iconCode", - label: this.i18n.menu.openFile.label, - submenu: this.plugin.buildOpenSubmenu( + icon: "iconOpenWindow", + label: this.i18n.menu.open.label, + }, + submenu: (() => { + /* 是否可更改 */ + const updatable = isResourceOperable( + this.plugin.config.dock.explorer.safe, + protect, + this.plugin.config.dock.explorer.permission.protected, + ResourceOption.edit, + ); + + const submenu: IMenuItem[] = [ + /* 在编辑器中打开 */ { - type: HandlerType.asset, - handler: { - path: get(node.relative), - }, - breadcrumb: { - path: get(node.relative), + type: MenuItemType.Action, + options: { + icon: "iconCode", + label: this.i18n.menu.openFile.label, + submenu: this.plugin.buildOpenSubmenu( + { + type: HandlerType.asset, + handler: { + path: get(node.relative), + updatable, + }, + breadcrumb: { + path: get(node.relative), + }, + }, + get(node.icon), + get(node.text), + ), }, + root: false, + folder: false, + file: true, }, - get(node.icon), - get(node.text), - ), - }, - root: false, - folder: false, + ]; + + // TODO: 使用思源内置的资源页签打开 + + if (FLAG_ELECTRON) { + /** + * 使用默认程序打开 + * REF: https://www.electronjs.org/zh/docs/latest/api/shell#shellopenpathpath + */ + submenu.push({ + type: MenuItemType.Action, + options: { + icon: "iconOpenWindow", + label: this.i18n.menu.openWithDefaultProgram.label, + click: () => { + if (type === FileTreeNodeType.File) { + globalThis + .require("electron") + .shell + .openPath(path); + } + else { + globalThis + .require("electron") + .shell + .showItemInFolder( + globalThis + .require("path") + .normalize(path) + ); + } + }, + }, + root: true, + folder: true, + file: true, + }); + return submenu; + } + })(), + root: true, + folder: true, file: true, }); if (FLAG_ELECTRON) { - /** - * 使用默认程序打开 - * REF: https://www.electronjs.org/zh/docs/latest/api/shell#shellopenpathpath - */ - items.push({ - type: MenuItemType.Action, - options: { - icon: "iconOpenWindow", - label: this.i18n.menu.openWithDefaultProgram.label, - click: () => { - if (type === FileTreeNodeType.File) { - globalThis - .require("electron") - .shell - .openPath(path); - } - else { - globalThis - .require("electron") - .shell - .showItemInFolder( - globalThis - .require("path") - .normalize(path) - ); - } - }, - }, - root: true, - folder: true, - file: true, - }); - /** * 在文件资源管理器中显示 * REF: https://www.electronjs.org/zh/docs/latest/api/shell#shellshowiteminfolderfullpath @@ -529,7 +561,24 @@ export class ExplorerContextMenu { options: { icon: "iconEdit", label: this.i18n.menu.rename.label, - click: () => { + disabled: !isResourceOperable( + this.plugin.config.dock.explorer.safe, + protect, + this.plugin.config.dock.explorer.permission.protected, + ResourceOption.rename, + ), + click: async () => { + /* 受保护的资源需要二次确认 */ + if (protect) { // 受保护的资源 + const confirm = await this.confirm( + path, + relative, + ); + if (!confirm) { // 不再继续操作 + return; + } + } + const parent = this.explorer.path2node(get(node.directory)); const siblings = get(parent.children); const siblings_names: Set = siblings // 同级资源名称列表 @@ -563,12 +612,25 @@ export class ExplorerContextMenu { options: { icon: "iconTrashcan", label: this.i18n.menu.delete.label, - click: () => { + disabled: !isResourceOperable( + this.plugin.config.dock.explorer.safe, + protect, + this.plugin.config.dock.explorer.permission.protected, + ResourceOption.delete, + ), + click: async () => { + /* 受保护的资源需要二次确认 */ + if (protect) { // 受保护的资源 + const confirm = await this.confirm( + path, + relative, + ); + if (!confirm) { // 不再继续操作 + return; + } + } + const parent = this.explorer.path2node(get(node.directory)); - const siblings = get(parent.children); - const siblings_names: Set = siblings // 同级资源名称列表 - ? new Set(siblings.map(node => node.name)) - : null; this.delete( parent, path, @@ -585,6 +647,59 @@ export class ExplorerContextMenu { return items; } + /** + * 二次确认 + * @param path - 资源完整路径 + * @param relative - 资源相对路径 + * @returns 是否确认 + */ + public confirm( + path: string, + relative: string, + ): Promise { + return new Promise(resolve => { + const relative_code = fn__code(relative); + /* 资源完整路径确认检查函数 */ + const check = async (value, _dialog, _component) => { + if (value === path) { + return ft__error(this.i18n.menu.confirm.tips.warn + .replaceAll("${1}", relative_code)); + } + else { + return this.i18n.menu.confirm.tips.pleaseEnter; + } + }; + prompt( + this.plugin.siyuan.Dialog, + { + selectable: false, + title: this.i18n.menu.confirm.title, + text: this.i18n.menu.confirm.text + .replaceAll("${1}", relative_code) + .replaceAll("${2}", fn__code(path)), + placeholder: this.i18n.menu.confirm.placeholder, + tips: this.i18n.menu.confirm.tips.pleaseEnter, + width: "32em", + input: check, + change: check, + confirm: async (value) => { + if (value === path) { + resolve(true); + return true; + } + else { + return false; + } + }, + cancel: () => { + resolve(false); + return true; + }, + }, + ); + }); + } + /** * 新建文件/文件夹弹出框 * @param node: 当前节点节点 @@ -646,8 +761,10 @@ export class ExplorerContextMenu { case !isValidName(value): // 无效的文件名 case !names || names.has(value): // 存在同名文件 valid = false; + break; default: // 文件名有效 valid = true; + break; } if (valid) { await this.plugin.client.putFile({ @@ -722,7 +839,7 @@ export class ExplorerContextMenu { text: i10n.text.replaceAll("${1}", fn__code(relative)), value: oldname, placeholder: i10n.placeholder, - tips: i10n.tips.pleaseEnter, + tips: ft__primary(i10n.tips.pleaseEnter), width: "32em", input: check, change: check, @@ -734,8 +851,10 @@ export class ExplorerContextMenu { case value === oldname: // 新名称与原名称一致 case !siblingsNames || siblingsNames.has(value): // 存在同名文件 valid = false; + break; default: // 文件名有效 valid = true; + break; } if (valid) { await this.plugin.client.renameFile({ @@ -765,24 +884,20 @@ export class ExplorerContextMenu { path: string, relative: string, isDir: boolean, - doubleCheck: boolean = false, ): void { - if (doubleCheck) { // 二次确认 (手动输入完整路径名) - } - else { // 点击确认按钮直接删除 - const i10n = isDir - ? this.i18n.menu.deleteFolder - : this.i18n.menu.deleteFile; - this.plugin.siyuan.confirm( - i10n.label, - i10n.text - .replaceAll("${1}", fn__code(relative)) - .replaceAll("${2}", fn__code(path)), - async () => { - await this.plugin.client.removeFile({ path: relative }); - this.explorer.updateNode(parent); - }, - ) - } + + const i10n = isDir + ? this.i18n.menu.deleteFolder + : this.i18n.menu.deleteFile; + this.plugin.siyuan.confirm( + i10n.label, + i10n.text + .replaceAll("${1}", fn__code(relative)) + .replaceAll("${2}", fn__code(path)), + async () => { + await this.plugin.client.removeFile({ path: relative }); + this.explorer.updateNode(parent); + }, + ); } } diff --git a/workspace/plugins/monaco-editor/src/handlers/asset.ts b/workspace/plugins/monaco-editor/src/handlers/asset.ts index 6da878c..d69e3cd 100644 --- a/workspace/plugins/monaco-editor/src/handlers/asset.ts +++ b/workspace/plugins/monaco-editor/src/handlers/asset.ts @@ -31,14 +31,20 @@ export interface IAssetHandler extends IHandler { export type IAssetHandlerOptions = IAssetHandlerOptions1 | IAssetHandlerOptions2; -export interface IAssetHandlerOptions1 extends IBaseHandlerOptions { - pathname: string; // 资源 URL 路径 +export interface IAssetBaseHandlerOptions extends IBaseHandlerOptions { + updatable: boolean; // 是否可更新 + pathname?: string; // 资源 URL 路径 + path?: string; // 相对于工作空间目录的路径 +} + +export interface IAssetHandlerOptions1 extends IAssetBaseHandlerOptions { + pathname: string; path?: never; } -export interface IAssetHandlerOptions2 extends IBaseHandlerOptions { +export interface IAssetHandlerOptions2 extends IAssetBaseHandlerOptions { + path: string; pathname?: never; - path: string; // 相对于工作空间目录的路径 } export class AssetHandler extends Handler { @@ -93,7 +99,9 @@ export class AssetHandler extends Handler { // const content_type = response.headers.get("content-type"); // const mine_type = content_type ? content_type.split(";")[0] : ""; // handler.modified.language = mine_type ? mine_type : handler.modified.language; - handler.update = this.createUpdateFunction(path); + if (options.updatable) { + handler.update = this.createUpdateFunction(path); + } } else { throw new Error(response.statusText); diff --git a/workspace/plugins/monaco-editor/src/index.ts b/workspace/plugins/monaco-editor/src/index.ts index 3426030..b489318 100644 --- a/workspace/plugins/monaco-editor/src/index.ts +++ b/workspace/plugins/monaco-editor/src/index.ts @@ -79,13 +79,13 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { protected readonly EDITOR_URL: URL; protected readonly SETTINGS_DIALOG_ID: string; protected readonly tab: ReturnType; - protected readonly editorDock: { + protected editorDock: { // editor: InstanceType, dock: ReturnType, model?: siyuan.IModel, component?: InstanceType, }; // 编辑器面板 - protected readonly explorerDock: { + protected explorerDock: { // editor: InstanceType, dock: ReturnType, model?: siyuan.IModel, @@ -132,84 +132,6 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { this.component?.$destroy(); }, }); - this.editorDock = { - dock: this.addDock({ - config: { - position: "BottomRight", - size: { width: 0, height: 256 }, - icon: "iconCode", - title: this.i18n.dock.title, - show: true, - }, - data: { - id: "", - realTime: false, - inline: Inline.mark, - language: Language.kramdown, - } as IDockData, - type: "-dock-editor", - init() { - // plugin.logger.debug(this); - - (this.element as HTMLElement).classList.add("fn__flex-column"); - const dock = new EditorDock({ - target: this.element, - props: { - plugin, - editor: { - modified: { - value: "", - language: "markdown", - }, - options: plugin.config.editor.options, - }, - ...(this.data as IDockData), - }, - }); - plugin.editorDock.model = this; - plugin.editorDock.component = dock; - }, - destroy() { - plugin.editorDock.component?.$destroy(); - delete plugin.editorDock.component; - delete plugin.editorDock.model; - }, - }), - }; - this.explorerDock = { - dock: this.addDock({ - config: { - position: "LeftTop", - size: { width: 256, height: 0 }, - icon: "icon-monaco-editor-file-tree", - title: this.i18n.explorer.title, - show: true, - }, - data: { - workspace: normalize(globalThis.siyuan.config.system.workspaceDir), - }, - type: "-dock-explorer", - init() { - // plugin.logger.debug(this); - - (this.element as HTMLElement).classList.add("fn__flex-column"); - const dock = new ExplorerDock({ - target: this.element, - props: { - plugin, - ...this.data, - }, - }); - plugin.explorerDock.model = this; - plugin.explorerDock.component = dock; - }, - destroy() { - plugin.explorerDock.component?.$destroy(); - delete plugin.explorerDock.component; - delete plugin.explorerDock.model; - }, - }), - }; } onload(): void { @@ -231,6 +153,91 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { }) .catch(error => this.logger.error(error)) .finally(() => { + const plugin = this; + /* 添加侧边面板 */ + if (this.config.dock.editor.enable) { + this.editorDock = { + dock: this.addDock({ + config: { + position: "BottomRight", + size: { width: 0, height: 256 }, + icon: "iconCode", + title: this.i18n.dock.title, + show: true, + }, + data: { + id: "", + realTime: false, + inline: Inline.mark, + language: Language.kramdown, + } as IDockData, + type: "-dock-editor", + init() { + // plugin.logger.debug(this); + + (this.element as HTMLElement).classList.add("fn__flex-column"); + const dock = new EditorDock({ + target: this.element, + props: { + plugin, + editor: { + modified: { + value: "", + language: "markdown", + }, + options: plugin.config.editor.options, + }, + ...(this.data as IDockData), + }, + }); + plugin.editorDock.model = this; + plugin.editorDock.component = dock; + }, + destroy() { + plugin.editorDock.component?.$destroy(); + delete plugin.editorDock.component; + delete plugin.editorDock.model; + }, + }), + }; + } + if (this.config.dock.explorer) { + this.explorerDock = { + dock: this.addDock({ + config: { + position: "LeftTop", + size: { width: 256, height: 0 }, + icon: "icon-monaco-editor-file-tree", + title: this.i18n.explorer.title, + show: true, + }, + data: { + workspace: normalize(globalThis.siyuan.config.system.workspaceDir), + }, + type: "-dock-explorer", + init() { + // plugin.logger.debug(this); + + (this.element as HTMLElement).classList.add("fn__flex-column"); + const dock = new ExplorerDock({ + target: this.element, + props: { + plugin, + ...this.data, + }, + }); + plugin.explorerDock.model = this; + plugin.explorerDock.component = dock; + }, + destroy() { + plugin.explorerDock.component?.$destroy(); + delete plugin.explorerDock.component; + delete plugin.explorerDock.model; + }, + }), + }; + } + /* 注册触发打开窗口动作的监听器 */ globalThis.addEventListener(this.config.operate.view.open.mouse.type, this.openViewEventListener, true); globalThis.addEventListener(this.config.operate.edit.open.mouse.type, this.openEditEventListener, true); @@ -628,6 +635,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { type: HandlerType.asset, handler: { pathname: href, + updatable: true, }, breadcrumb: { pathname: href, @@ -708,6 +716,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { * @param facadeOptions: 门面参数 * @param icon: 页签图标 * @param title: 页签标题 + * @param disabled: 是否禁用 * @param options: 编辑器初始配置 */ public buildOpenSubmenu( @@ -715,6 +724,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { // icon: string = "icon-monaco-editor", icon: string = "iconCode", title: string = this.i18n.displayName, + disabled: boolean = false, options: IEditorOptions = this.config.editor.options, ): siyuan.IMenuItemOption[] { icon = icon.startsWith("#") @@ -736,6 +746,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { submenu.push({ icon: "iconAdd", label: this.i18n.menu.openInNewTab.label, + disabled, click: () => { siyuan.openTab({ app: this.app, @@ -750,6 +761,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { submenu.push({ icon: "iconMin", label: this.i18n.menu.openTabBackground.label, + disabled, click: () => { siyuan.openTab({ app: this.app, @@ -764,6 +776,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { submenu.push({ icon: "iconLayoutRight", label: this.i18n.menu.openTabRight.label, + disabled, click: () => { siyuan.openTab({ app: this.app, @@ -778,6 +791,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { /* 在页签下方打开 */ submenu.push({ icon: "iconLayoutBottom", + disabled, label: this.i18n.menu.openTabBottom.label, click: () => { siyuan.openTab({ @@ -794,6 +808,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { submenu.push({ icon: "iconOpenWindow", label: this.i18n.menu.openByNewWindow.label, + disabled, click: async element => { const { x, y } = getElementScreenPosition(element); @@ -814,12 +829,15 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { * 打开工作空间目录下的文件 * @param path: 相对于工作空间目录的文件路径 * @param icon: 页签图标 + * @param title: 页签标题 + * @param updatable: 是否可更改 * @param options: 页签选项 */ public openWorkspaceFile( path: string, title: string, icon: string = "iconCode", + updatable: boolean = true, options: { position?: "right" | "bottom", keepCursor?: boolean // 是否跳转到新 tab 上 @@ -842,6 +860,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { type: HandlerType.asset, handler: { path, + updatable, }, breadcrumb: { path, @@ -852,6 +871,4 @@ export default class MonacoEditorPlugin extends siyuan.Plugin { ...options, }); } - - } diff --git a/workspace/plugins/monaco-editor/src/types/config.d.ts b/workspace/plugins/monaco-editor/src/types/config.d.ts index 1bb06e6..2cb9964 100644 --- a/workspace/plugins/monaco-editor/src/types/config.d.ts +++ b/workspace/plugins/monaco-editor/src/types/config.d.ts @@ -18,6 +18,7 @@ import type { editor as Editor } from "monaco-editor"; import type { Electron } from "@workspace/types/electron"; import type { IMouseStatus } from "@workspace/utils/shortcut"; +import type { IResourceOptionPermission } from "@/utils/permission"; export type IMonacoEditorOptions = Editor.IStandaloneEditorConstructionOptions & Editor.IStandaloneDiffEditorConstructionOptions; @@ -73,8 +74,33 @@ export interface IEditorOptions extends IMonacoEditorOptions { wordWrap: IMonacoEditorOptions["wordWrap"], // 是否自动换行 "on" | "off" | "wordWrapColumn" | "bounded" } + +/* 资源权限 */ +export interface IPermission { + protected: IResourceOptionPermission; // 受保护的目录/文件权限 +} + +/* 文件资源管理器面板设置项 */ +export interface IExplorerDock { + enable: boolean; // 是否开启文件资源管理器 + safe: boolean; // 是否开启安全模式 (受保护模式) + permission: IPermission; // 权限 +} + +/* 编辑器面板设置项 */ +export interface IEditorDock { + enable: boolean; // 是否开启文件资源管理器 +} + +/* 侧边面板 */ +export interface IDock { + explorer: IExplorerDock; + editor: IEditorDock; +} + export interface IConfig { operate: IOperate; window: IWindow; editor: IEditor; + dock: IDock; } diff --git a/workspace/plugins/monaco-editor/src/utils/permission.ts b/workspace/plugins/monaco-editor/src/utils/permission.ts new file mode 100644 index 0000000..04ba5d3 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/utils/permission.ts @@ -0,0 +1,89 @@ +/** + * Copyright (C) 2023 Zuoqiu Yingyi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +/* 权限管理 */ + +/* 资源操作 */ +export enum ResourceOption { + new = "new", + view = "view", + edit = "edit", + move = "move", + copy = "copy", + rename = "rename", + delete = "delete", +} + +/* 资源操作权限 */ +export interface IResourceOptionPermission { + enable: boolean; // 是否可操作 + + read: boolean; // 读操作 (view, edit, move-from, copy-from) + write: boolean; // 写操作 (new, edit, move-from, move-to, copy-to, rename, delete) + + [ResourceOption.new]: boolean; // 新建操作 (仅目录) + [ResourceOption.view]: boolean; // 查看操作 (仅文件) + [ResourceOption.edit]: boolean; // 编辑操作 (仅文件) + [ResourceOption.move]: boolean; // 移动操作 + [ResourceOption.copy]: boolean; // 复制操作 + [ResourceOption.rename]: boolean; // 操作操作 + [ResourceOption.delete]: boolean; // 删除操作 +} + +/** + * 资源是否可操作 + * @param safe - 是否启用安全模式安全模式 + * @param protect - 是否为受保护资源 + * @param permission - 权限 + * @param option - 操作 + */ +export function isResourceOperable( + safe: boolean, // 是否启用安全模式安全模式 + protect: boolean, // 是否为受保护资源 + permission: IResourceOptionPermission, // 权限 + option: ResourceOption, // 操作 +): boolean { + return (protect // 是否为受保护的资源 + ? (safe // 是否为安全模式 + ? (permission.enable // 是否可操作 + ? ((option === ResourceOption.view + || option === ResourceOption.edit + || option === ResourceOption.move + || option === ResourceOption.copy + ) // 是否为读操作 + ? (permission.read // 是否可读 + ? (permission[option] // 是否可操作 + ? true // 可操作 + : false // 不可操作 + ) + : false // 不可读时不允许操作 + ) + : (permission.write // 是否可写 + ? (permission[option] // 是否可操作 + ? true // 可操作 + : false // 不可操作 + ) + : false // 不可写时不允许操作 + ) + ) + : false // 禁用受保护资源全部操作 + ) + : true // 安全模式已被禁用, 可操作受保护资源 + ) + : true // 非受保护资源允许操作 + ); +} From 754e3efdfc58d164d351ae20625580c458ac55e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:06:35 +0800 Subject: [PATCH 051/113] =?UTF-8?q?feat(monaco-editor):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=96=87=E4=BB=B6=E9=A2=84=E8=A7=88=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E9=A1=B9=20|=20Add=20file=20preview=20menu=20item.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 + workspace/packages/utils/logger/index.ts | 12 +- workspace/packages/utils/misc/save.ts | 3 +- workspace/packages/utils/package.json | 2 + .../monaco-editor/public/i18n/en_US.json | 3 + .../monaco-editor/public/i18n/zh_CHT.json | 3 + .../monaco-editor/public/i18n/zh_CN.json | 3 + .../src/components/PreviewTab.svelte | 60 +++++++++ .../monaco-editor/src/explorer/index.ts | 23 ++-- .../monaco-editor/src/explorer/menu.ts | 34 ++++- workspace/plugins/monaco-editor/src/index.ts | 126 +++++++++++++++++- workspace/pnpm-lock.yaml | 14 ++ 12 files changed, 255 insertions(+), 32 deletions(-) create mode 100644 workspace/plugins/monaco-editor/src/components/PreviewTab.svelte diff --git a/CHANGELOG.md b/CHANGELOG.md index b42cfd6..a167650 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更改日志 | CHANGE LOG +## 2023-07-25 + +- 添加文件预览菜单项 | Add file preview menu item. + ## 2023-07-24 - 添加打开与复制菜单项 | Add open and copy menu items. diff --git a/workspace/packages/utils/logger/index.ts b/workspace/packages/utils/logger/index.ts index 52bad2b..5dde945 100644 --- a/workspace/packages/utils/logger/index.ts +++ b/workspace/packages/utils/logger/index.ts @@ -72,27 +72,27 @@ export class Logger { this.stdout(globalThis.console.table, true, ...args); } - debugs(...args: any[]) { + debug(...args: any[]) { this.stdout(globalThis.console.debug, false, ...args); } - debug(...args: any[]) { + debugs(...args: any[]) { this.stdout(globalThis.console.debug, true, ...args); } - infos(...args: any[]) { + info(...args: any[]) { this.stdout(globalThis.console.info, false, ...args); } - info(...args: any[]) { + infos(...args: any[]) { this.stdout(globalThis.console.info, true, ...args); } - logs(...args: any[]) { + log(...args: any[]) { this.stdout(globalThis.console.log, false, ...args); } - log(...args: any[]) { + logs(...args: any[]) { this.stdout(globalThis.console.log, true, ...args); } diff --git a/workspace/packages/utils/misc/save.ts b/workspace/packages/utils/misc/save.ts index 994ae0d..5bf2431 100644 --- a/workspace/packages/utils/misc/save.ts +++ b/workspace/packages/utils/misc/save.ts @@ -15,7 +15,8 @@ * along with this program. If not, see . */ -import { saveAs } from 'file-saver'; +import { saveAs } from "file-saver"; +import streamSaver from "streamsaver"; export function SaveFileAs(options: { data: BlobPart, diff --git a/workspace/packages/utils/package.json b/workspace/packages/utils/package.json index c27640e..e08082f 100644 --- a/workspace/packages/utils/package.json +++ b/workspace/packages/utils/package.json @@ -7,6 +7,7 @@ }, "devDependencies": { "@types/file-saver": "^2.0.5", + "@types/streamsaver": "^2.0.1", "binary-extensions": "^2.2.0", "copy-to-clipboard": "^3.3.3", "deepmerge": "^4.3.1", @@ -14,6 +15,7 @@ "normalize-path": "^3.0.0", "parse-data-url": "^5.0.0", "path-browserify": "^1.0.1", + "streamsaver": "^2.0.6", "text-extensions": "^2.4.0", "valid-filename": "^4.0.0" }, diff --git a/workspace/plugins/monaco-editor/public/i18n/en_US.json b/workspace/plugins/monaco-editor/public/i18n/en_US.json index f6cbbf5..48bcc48 100644 --- a/workspace/plugins/monaco-editor/public/i18n/en_US.json +++ b/workspace/plugins/monaco-editor/public/i18n/en_US.json @@ -370,6 +370,9 @@ "openFileInEditor": { "label": "Open File in Text Editor" }, + "openFileInPreviewer": { + "label": "Open File in File Previewer" + }, "openInNewTab": { "label": "Open in New Tab" }, diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json index 70bd447..54e1c3b 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CHT.json @@ -370,6 +370,9 @@ "openFileInEditor": { "label": "在文字編輯器中開啟" }, + "openFileInPreviewer": { + "label": "在檔案預覽器中開啟" + }, "openInNewTab": { "label": "在新分頁中開啟" }, diff --git a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json index 1fcc9d9..660553a 100644 --- a/workspace/plugins/monaco-editor/public/i18n/zh_CN.json +++ b/workspace/plugins/monaco-editor/public/i18n/zh_CN.json @@ -370,6 +370,9 @@ "openFileInEditor": { "label": "在文本编辑器中打开" }, + "openFileInPreviewer": { + "label": "在文件预览器中打开" + }, "openInNewTab": { "label": "在新页签中打开" }, diff --git a/workspace/plugins/monaco-editor/src/components/PreviewTab.svelte b/workspace/plugins/monaco-editor/src/components/PreviewTab.svelte new file mode 100644 index 0000000..d5a1f89 --- /dev/null +++ b/workspace/plugins/monaco-editor/src/components/PreviewTab.svelte @@ -0,0 +1,60 @@ + + + + + +