├── .github └── workflows │ └── deploy.yml ├── .gitignore ├── LICENSE ├── README.md ├── blocksalat-editor.js ├── blocksalat.js ├── index.html ├── learn └── index.html ├── lisp.js ├── package.json ├── plugins └── toolbox-search │ ├── block_searcher.ts │ ├── readme.md │ └── toolbox_search.ts ├── pnpm-lock.yaml ├── public ├── CNAME ├── assets │ ├── recorder-BokptUnY.js │ └── worklet-DzGFm3ry.js ├── readme.md └── sprites.png ├── style.css └── vite.config.js /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Build and Deploy 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 9 | permissions: 10 | contents: read 11 | pages: write 12 | id-token: write 13 | deployments: write 14 | 15 | # Allow one concurrent deployment 16 | concurrency: 17 | group: 'pages' 18 | cancel-in-progress: true 19 | 20 | jobs: 21 | build: 22 | runs-on: ubuntu-latest 23 | environment: 24 | name: github-pages 25 | url: ${{ steps.deployment.outputs.page_url }} 26 | steps: 27 | - uses: actions/checkout@v4 28 | - uses: pnpm/action-setup@v4 29 | with: 30 | version: 9.4.0 31 | - uses: actions/setup-node@v3 32 | with: 33 | node-version: 20 34 | cache: 'pnpm' 35 | - name: Install Dependencies 36 | run: pnpm install 37 | 38 | - name: Build 39 | run: pnpm build 40 | 41 | - name: Setup Pages 42 | uses: actions/configure-pages@v2 43 | 44 | - name: Upload artifact 45 | uses: actions/upload-pages-artifact@v3 46 | with: 47 | # Upload entire repository 48 | path: './dist' 49 | 50 | - name: Deploy to GitHub Pages 51 | id: deployment 52 | uses: actions/deploy-pages@v4 53 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published by 637 | the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # blocksalat 2 | 3 | a modular synth out of blocks. 4 | 5 | this is an experiment to use [blockly](https://www.npmjs.com/package/blockly) as a ui for [kabelsalat](https://kabel.salat.dev/learn/). 6 | 7 | live at [block.salat.dev](https://block.salat.dev/) 8 | 9 | ## examples 10 | 11 | - [distorted guitar](https://block.salat.dev/#eyJibG9ja3MiOnsibGFuZ3VhZ2VWZXJzaW9uIjowLCJibG9ja3MiOlt7InR5cGUiOiJvdXQiLCJpZCI6Im9mXXx9cFJZc2JodEoqdW9+NVlPIiwieCI6LTE5LCJ5IjoxMjQsImlucHV0cyI6eyJpbnB1dCI6eyJzaGFkb3ciOnsidHlwZSI6Im4iLCJpZCI6Ii9LWUVIcWFoTkskTmw4dF5ueG58IiwiZmllbGRzIjp7Ik5VTSI6IjAifX0sImJsb2NrIjp7InR5cGUiOiJtdWwiLCJpZCI6Im54ZDd0M2xZdGxGUSlvOUw6b3YoIiwiaW5wdXRzIjp7ImluMCI6eyJzaGFkb3ciOnsidHlwZSI6Im4iLCJpZCI6Il1QLUhhR15kfipGKUUyJD9HRihLIiwiZmllbGRzIjp7Ik5VTSI6Ii42In19fSwiaW4xIjp7InNoYWRvdyI6eyJ0eXBlIjoibiIsImlkIjoiR01uLG9vSHQrLkdnMVR9MiloOGoiLCJmaWVsZHMiOnsiTlVNIjoiMSJ9fSwiYmxvY2siOnsidHlwZSI6ImZvbGQiLCJpZCI6IkNFYX1eU1tHdSMpVCxlWGQ6O0hWIiwiaW5wdXRzIj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0NXhVLCIsImZpZWxkcyI6eyJOVU0iOiIuMSJ9fX0sInJlbCI6eyJibG9jayI6eyJ0eXBlIjoibiIsImlkIjoieWtdeHA2c0RVXnx1OFJfQ34paWoiLCJmaWVsZHMiOnsiTlVNIjoiLjIifX19fX19fX19fX19fX19fX1dfX0=) tested with [this strudel pattern](https://strudel.cc/#bigiMCAuLiA3Iikuc2NhbGUoIkM0Om1pbm9yIikuY2xpcCguNSkubWlkaSgp) 16 | - [polyphonic midi example](https://block.salat.dev/#eyJibG9ja3MiOnsibGFuZ3VhZ2VWZXJzaW9uIjowLCJibG9ja3MiOlt7InR5cGUiOiJvdXQiLCJpZCI6Ik15fVBrSUA1WjhWNk5UXWt7Ui1DIiwieCI6OTcsInkiOjQ1LCJpbnB1dHMiOnsiaW5wdXQiOnsiYmxvY2siOnsidHlwZSI6Im11bCIsImlkIjoiRD1uN2t1VSFlKl9YS1ZQYF4pRV4iLCJpbnB1dHMiOnsiaW4wIjp7ImJsb2NrIjp7InR5cGUiOiJuIiwiaWQiOiJoeEJ9bTtuITtMZU5vc0lLQTl2WCIsImZpZWxkcyI6eyJOVU0iOiIuNSJ9fX0sImluMSI6eyJibG9jayI6eyJ0eXBlIjoiYWRkIiwiaWQiOiIuO28hdXUlXi18aUJ0T0lWKEMxTCIsImlucHV0cyI6eyJpbjAiOnsiYmxvY2siOnsidHlwZSI6Im11bCIsImlkIjoiaW53UHYvfSt4bXtJeDZiWVp0O0YiLCJpbnB1dHMiOnsiaW4wIjp7ImJsb2NrIjp7InR5cGUiOiJkZWxheSIsImlkIjoiLnVNbTR6QT9bc058M1A2TVJ+N1siLCJpbnB1dHMiOnsiaW4iOnsiYmxvY2siOnsidHlwZSI6InNyYyIsImlkIjoiZGY/SCg1ZilrP3Z0NHgjQH1ZW28iLCJpbnB1dHMiOnsiY2hhbm5lbCI6eyJibG9jayI6eyJ0eXBlIjoicG9seTIiLCJpZCI6ImsrO25tRkw3fEEqQjNkdUdUaDAqIiwiaW5wdXR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2JQb3FmN2BYR1NlcW9POTR6b24iLCJpbnB1dHMiOnsiZ2F0ZSI6eyJibG9jayI6eyJ0eXBlIjoiZm9yayIsImlkIjoiMkV8OkZpcUtyfXAjSkRTXXlPQWUiLCJpbnB1dHMiOnsiaW4iOnsiYmxvY2siOnsidHlwZSI6Im1pZGlnYXRlIiwiaWQiOiJ1Mj1JVTRGUEIoQztQLklmKlNhQiIsImlucHV0cyI6eyJjaGFubmVsIjp7ImJsb2NrIjp7InR5cGUiOiJuIiwiaWQiOiJ5JHtHeGlFMDpYVF8velVdSldSeiIsImZpZWxkcyI6eyJOVU0iOiIxIn19fX19fSwidGltZXMiOnsiYmxvY2siOnsidHlwZSI6Im4iLCJpZCI6IkUlKG1UN0A4dXI9dG01fiRFS2F+IiwiZmllbGRzIjp7Ik5VTSI6IjQifX19fX19LCJhdHQiOnsiYmxvY2siOnsidHlwZSI6Im4iLCJpZCI6InY5LVFFKT12VTE7UzpJKG9pT0gzIiwiZmllbGRzIjp7Ik5VTSI6IjAuMDIifX19LCJkZWMiOnsiYmxvY2siOnsidHlwZSI6Im4iLCJpZCI6IjldcXJgVSleSmctdm5lS3RtQlouIiwiZmllbGRzIjp7Ik5VTSI6Ii4zIn19fSwic3VzIjp7ImJsb2NrIjp7InR5cGUiOiJuIiwiaWQiOiJ0ZjN2K11ib2ZwfV1ASVY0NXhVLCIsImZpZWxkcyI6eyJOVU0iOiIwIn19fSwicmVsIjp7ImJsb2NrIjp7InR5cGUiOiJuIiwiaWQiOiJ5a114cDZzRFVefHU4Ul9DfilpaiIsImZpZWxkcyI6eyJOVU0iOiIuMiJ9fX19fX19fX19fX19fX19fV19fQ==) tested with [this strudel pattern](https://strudel.cc/#bigiMCwxLDIsMyIpLmNob3JkKCI8RG03IEc3IENeNyBBN2I5PiIpLnZvaWNpbmcoKS5taWRpKCk%3D) 17 | - [audio input + feedback](https://block.salat.dev/#eyJibG9ja3MiOnsibGFuZ3VhZ2VWZXJzaW9uIjowLCJibG9ja3M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6eyJ0cmlnIjp7InNoYWRvdyI6eyJ0eXBlIjoibiIsImlkIjoiZyl9aFBTPVQ1aCt9fFgwUkAjclgiLCJmaWVsZHMiOnsiTlVNIjoiMCJ9fSwiYmxvY2siOnsidHlwZSI6ImltcHVsc2UiLCJpZCI6IkkvVlR+fkx5RHhiQnB+fCFFcV59IiwiaW5wdXRzIjp7ImZyZXEiOnsic2hhZG93Ijp7InR5cGUiOiJuIiwiaWQiOiJdYjI0R18zJFdYTCpEOW4qejd3WCIsImZpZWxkcyI6eyJOVU0iOiIxIn19fSwicGhhc2UiOnsic2hhZG93Ijp7InR5cGUiOiJuIiwiaWQiOiJOflZNWG1sKkU4c2h5I2csIVdCZiIsImZpZWxkcyI6eyJOVU0iOiIwIn19fX19fSwiYXR0Ijp7InNoYWRvdyI6eyJ0eXBlIjoibiIsImlkIjoiRS9fN19WaUlNfHIqV2U1PXQ7S3ciLCJmaWVsZHMiOnsiTlVNIjoiMC4wMiJ9fX0sImRlYyI6eyJzaGFkb3ciOnsidHlwZSI6Im4iLCJpZCI6IldSM2NxOEV9MFlJe0cvZFFqLThpIiwiZmllbGRzIjp7Ik5VTSI6IjAuMSJ9fX19fX19fX19fX19fV19fQ==) 20 | - feel free add your own by sending a PR :) i'll accept anything 21 | -------------------------------------------------------------------------------- /blocksalat-editor.js: -------------------------------------------------------------------------------- 1 | import { Blocksalat } from "./blocksalat"; 2 | 3 | class BlocksalatElement extends HTMLElement { 4 | static observedAttributes = ["initial", "readOnly"]; 5 | 6 | constructor() { 7 | super(); 8 | const initial = this.getAttribute("initial"); // is this safe to do here always? 9 | this.insertAdjacentHTML( 10 | "beforeend", 11 | `
12 |
13 |
play
14 |
edit
15 |
16 |
` 17 | ); //
${initial}
18 | const readOnly = this.getAttribute("readOnly"); // is this safe to do here always? 19 | const blocksalat = new Blocksalat(this.querySelector(".editor"), { 20 | readOnly, 21 | }); 22 | blocksalat.load(initial); 23 | // first document click runs the patch, adds change listener + removes hint 24 | const playtoggle = this.querySelector(".playtoggle"); 25 | playtoggle.addEventListener("click", function init() { 26 | blocksalat.toggle(); 27 | playtoggle.innerText = blocksalat.started ? "stop" : "play"; 28 | }); 29 | const edittoggle = this.querySelector(".edittoggle"); 30 | edittoggle.addEventListener("click", function init() { 31 | blocksalat.toggleEdit(); 32 | edittoggle.innerText = blocksalat.readOnly ? "edit" : "lock"; 33 | }); 34 | } 35 | 36 | connectedCallback() { 37 | // console.log("Custom element added to page."); 38 | } 39 | disconnectedCallback() { 40 | // console.log("Custom element removed from page."); 41 | } 42 | adoptedCallback() { 43 | // console.log("Custom element moved to new page."); 44 | } 45 | attributeChangedCallback(name, oldValue, newValue) { 46 | /* console.log(`Attribute ${name} has changed.`); 47 | if (name === "hash") { 48 | this.blocksalat.load(newValue); 49 | } */ 50 | } 51 | } 52 | 53 | customElements.define("blocksalat-editor", BlocksalatElement); 54 | -------------------------------------------------------------------------------- /blocksalat.js: -------------------------------------------------------------------------------- 1 | import * as Blockly from "blockly/core"; 2 | import { SalatRepl, nodeRegistry, register, n } from "@kabelsalat/web"; 3 | import "./plugins/toolbox-search/toolbox_search.ts"; 4 | import DarkTheme from "@blockly/theme-dark"; 5 | import { LispParser } from "./lisp.js"; 6 | 7 | // import { FieldSlider } from "@blockly/field-slider"; 8 | 9 | export class Blocksalat { 10 | inited = false; 11 | // this is only called once for the document lifetime 12 | static init() { 13 | if (this.inited) { 14 | return; 15 | } 16 | this.inited = true; 17 | 18 | // define custom code generator for kabelsalat 19 | this.kabelsalatGenerator = new Blockly.Generator("kabelsalat"); 20 | 21 | Blockly.ContextMenuItems.registerCommentOptions(); 22 | //console.log("DarkTheme", DarkTheme); 23 | DarkTheme.componentStyles = { 24 | ...DarkTheme.componentStyles, 25 | workspaceBackgroundColour: "transparent", 26 | scrollbarColour: "transparent", 27 | }; 28 | // get the names of all nodes from the kabelsalat nodeRegistry 29 | // filter out names that are either handled in a special way (out, n) or ones that don't work with blockly 30 | const allNodes = Array.from(nodeRegistry.entries()) 31 | .filter( 32 | ([name, config]) => 33 | ![ 34 | "out", 35 | "n", 36 | "register", 37 | "module", 38 | "mouseX", 39 | "mouseY", 40 | "seq", 41 | "split", // has fn input 42 | "apply", // has fn input 43 | "bytebeat", // has fn input 44 | "floatbeat", // has fn input 45 | "map", // has fn input 46 | "raw", // has fn input 47 | "select", // has fn input 48 | ].includes(name) && 49 | !config.internal && 50 | config.tags /* && 51 | !config.tags.includes("meta") */ 52 | ) 53 | .sort(([a], [b]) => a.localeCompare(b)); 54 | 55 | // change tags of clockdiv node (it's the only node with category "clock" -> tbd fix in kabelsalat) 56 | allNodes.find(([name]) => name === "clockdiv")[1].tags = ["trigger"]; // change 57 | 58 | // helper to create n inputs 59 | let nInputs = (n) => 60 | Array.from({ length: n }, (_, i) => ({ name: `in${i + 1}` })); 61 | 62 | // here, we create different variants for nodes with dynamic arguments 63 | // theoretically, dynamic inputs are possible with custom nodes in blockly 64 | // but for now, let's create different variants for the same node 65 | 66 | // create different poly node variants 67 | [2, 3, 4, 5, 8, 16].forEach((n) => { 68 | allNodes.push([ 69 | "poly" + n, 70 | { 71 | ins: nInputs(n), 72 | tags: ["multi-channel"], 73 | description: `split the signal into ${n} channels (you don't have to use all)`, 74 | }, 75 | ]); 76 | }); 77 | 78 | // create different seq node variants 79 | [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16].forEach((n) => { 80 | allNodes.push([ 81 | "seq" + n, 82 | { 83 | ins: [{ name: `trigger` }, ...nInputs(n)], 84 | tags: ["sequencer"], 85 | description: `cycles through ${n} steps. each time the trigger goes high, the next step goes to the output.`, 86 | }, 87 | ]); 88 | }); 89 | 90 | // define src node manually, as its not in the registry 91 | allNodes.push([ 92 | "src", 93 | { 94 | ins: [{ name: "channel" }], 95 | tags: ["meta"], 96 | description: `routes the given out channel back to create feedback`, 97 | }, 98 | ]); 99 | // define stereo node that can be used as a shadow node for out.channel 100 | // see below for special if branch, ( search "stereo" ) 101 | allNodes.push([ 102 | "stereo", 103 | { 104 | ins: [], 105 | tags: ["meta"], 106 | description: `splits to stereo. short for poly2(0,1)`, 107 | }, 108 | ]); 109 | 110 | // get list of all unique tags from all nodes 111 | const allTags = allNodes 112 | .map(([_, config]) => config.tags) 113 | .flat() 114 | .filter((el, i, a) => a.indexOf(el) === i) 115 | .filter( 116 | ( 117 | tag // filter out some tags that are too redundant 118 | ) => 119 | tag && !["distortion", "regular", "limiter", "external"].includes(tag) 120 | ) 121 | .sort((a, b) => a.localeCompare(b)); 122 | 123 | // custom = register / input nodes + nodes created with them 124 | const customCategoryName = "custom 🧪"; 125 | allTags.push(customCategoryName); 126 | allTags.push("examples"); // see addExample below 127 | // create a block category for each tag 128 | const categories = allTags.map((name, i) => ({ 129 | kind: "category", 130 | name: name, 131 | colour: Math.round(((i + 1) / allTags.length) * 360), 132 | contents: [], 133 | })); 134 | 135 | const getCategory = (name) => categories.find((cat) => cat.name === name); 136 | const getCategoryIndex = (name) => 137 | categories.findIndex((cat) => cat.name === name); 138 | const getCategoryColor = (name) => 139 | Math.round(((getCategoryIndex(name) + 1) / allTags.length) * 360); 140 | 141 | // helper to register a new blockly block 142 | const blockRegistry = new Map(); 143 | function registerBlock(name, json, compile) { 144 | Blockly.Blocks[name] = { 145 | init: function () { 146 | this.jsonInit(json); 147 | }, 148 | }; 149 | Blocksalat.kabelsalatGenerator.forBlock[name] = compile; 150 | blockRegistry.set(name, json); 151 | } 152 | this.blockRegistry = blockRegistry; 153 | 154 | function registerBlockFromKabelsalat(name, config) { 155 | //console.log("register", name, config); 156 | let inputs = config.ins || []; 157 | // fix default inputs for arithmetic (they are dynamic in kabelsalat) 158 | // tbd maybe also add variants for these, like add2 add3 ? 159 | // might be too much, we can also do add(a, add(b,c)) instead of add(a,b,c) 160 | // alternatively, we could do addpoly(poly(a,b,c)) = add(a,b,c) 161 | if (["mul", "div"].includes(name)) { 162 | inputs = [ 163 | { name: "in0", default: 1 }, 164 | { name: "in1", default: 1 }, 165 | ]; 166 | } else if (["add", "sub"].includes(name)) { 167 | inputs = [ 168 | { name: "in0", default: 0 }, 169 | { name: "in1", default: 0 }, 170 | ]; 171 | } 172 | 173 | let args = inputs.map((input) => ({ 174 | type: "input_value", 175 | name: input.name, 176 | check: "Number", 177 | })); 178 | const labels = [...inputs.map((input) => input.name)]; 179 | 180 | // if the first input is not "in", we can use the node name as label 181 | //const skipFirstLabel = ["in", "input"].includes(inputs[0]?.name); 182 | const skipFirstLabel = false; // always show, makes layout a bit calmer 183 | if (skipFirstLabel) { 184 | labels[0] = name; 185 | } else { 186 | args.unshift({ 187 | type: "input_dummy", 188 | }); 189 | labels.unshift(name); 190 | } 191 | 192 | if (!config.tags) { 193 | console.warn("no tags", name); 194 | } 195 | 196 | // add block definition 197 | registerBlock( 198 | name, 199 | { 200 | message0: labels.map((label, i) => `${label} %${i + 1}`).join(" "), 201 | args0: args, 202 | output: "Number", 203 | colour: getCategoryColor(config.tags[0]), 204 | tooltip: `${config.description}\n${inputs 205 | .map( 206 | (input) => 207 | `${input.name}${ 208 | input.description ? ": " + input.description : "" 209 | }` 210 | ) 211 | .join("\n")}`, 212 | // helpUrl: "https://kabel.salat.dev/reference/", 213 | }, 214 | function compile(block, generator) { 215 | const args = block.inputList.reduce((acc, input, i) => { 216 | if (input.type === Blockly.INPUT_VALUE) { 217 | const inputCode = generator.valueToCode(block, input.name, 0); 218 | acc.push(inputCode || inputs[i]?.default || 0); 219 | } else if (input.type !== 5) { 220 | // 5 = dummy 221 | console.warn(`olala.. unexpected input value ${input.type}`); 222 | } 223 | return acc; 224 | }, []); 225 | // rename polyN to poly 226 | if (name.startsWith("poly")) { 227 | name = "poly"; 228 | } 229 | // rename seqN to seq 230 | if (name.startsWith("seq")) { 231 | name = "seq"; 232 | } 233 | // each block compiles to a simple function call 234 | let code = `${name}(${args.join(", ")})`; 235 | // stereo node is just a fake variable 236 | if (name === "stereo") { 237 | code = "poly(0,1)"; 238 | } 239 | return [code, 0]; 240 | } 241 | ); 242 | 243 | // add block to toolbox, into every category that matches the node tags 244 | categories 245 | .filter((category) => (config.tags || []).includes(category.name)) 246 | .forEach((category) => { 247 | const config = { 248 | kind: "block", 249 | type: name, 250 | // add a shadow "n" block for each input, using the input's default (fallback to 0) 251 | inputs: Object.fromEntries( 252 | inputs.map((input) => [ 253 | input.name, 254 | { 255 | // https://developers.google.com/blockly/guides/configure/web/toolbox#shadow_blocks 256 | shadow: { 257 | type: "n", 258 | fields: { 259 | NUM: input.default || 0, 260 | }, 261 | }, 262 | }, 263 | ]) 264 | ), 265 | }; 266 | category.contents.push(config); 267 | }); 268 | } 269 | 270 | window.registerBlockFromKabelsalat = registerBlockFromKabelsalat; 271 | this.registerBlockFromKabelsalat = registerBlockFromKabelsalat.bind(this); 272 | 273 | // define all nodes 274 | allNodes.forEach(([name, config]) => 275 | registerBlockFromKabelsalat(name, config) 276 | ); 277 | const systemBlockColor = "#555"; 278 | 279 | // defines custom n block 280 | registerBlock( 281 | "n", 282 | { 283 | message0: `n %1`, 284 | args0: [ 285 | { 286 | type: "field_input", 287 | name: "NUM", 288 | check: "Number", 289 | }, 290 | /* { 291 | type: "field_slider", 292 | name: "NUM", 293 | value: 0, 294 | }, */ 295 | ], 296 | output: "Number", 297 | colour: systemBlockColor, 298 | tooltip: "a constant number", 299 | }, 300 | function compile(block, generator) { 301 | const value = block.getFieldValue("NUM"); 302 | return [value, 0]; 303 | } 304 | ); 305 | 306 | getCategory("math").contents.push({ kind: "block", type: "n" }); 307 | 308 | // define custom out block 309 | window.out = (input, channel) => n(input).out(channel); // patch: create standalone "out" function 310 | registerBlock( 311 | "out", 312 | { 313 | message0: `out %1 channel %2`, 314 | tooltip: 315 | "output to speakers. only channels 0 and 1 will go to the speakers. can be used together with src to create feedback!", 316 | args0: [ 317 | { 318 | type: "input_value", 319 | name: "input", 320 | check: "Number", 321 | }, 322 | { 323 | type: "input_value", 324 | name: "channel", 325 | check: "Number", 326 | }, 327 | ], 328 | colour: systemBlockColor, 329 | }, 330 | function compile(block, generator) { 331 | let inputCode = generator.valueToCode(block, "input", 0); 332 | const channelCode = generator.valueToCode(block, "channel", 0); 333 | return `out(${inputCode || "0"}, ${channelCode || "[0,1]"})`; 334 | } 335 | ); 336 | 337 | getCategory("meta").contents.push({ 338 | kind: "block", 339 | type: "out", 340 | inputs: { 341 | input: { 342 | shadow: { 343 | type: "n", 344 | fields: { 345 | NUM: 0, 346 | }, 347 | }, 348 | }, 349 | channel: { 350 | shadow: { 351 | type: "stereo", 352 | }, 353 | }, 354 | }, 355 | }); 356 | 357 | // defines custom "input" block 358 | registerBlock( 359 | "input", 360 | { 361 | message0: `input %1`, 362 | args0: [ 363 | { 364 | type: "field_input", 365 | name: "name", 366 | check: "String", 367 | }, 368 | ], 369 | output: "Number", 370 | colour: systemBlockColor, 371 | tooltip: "defines a block input for a custom block", 372 | }, 373 | function compile(block) { 374 | const name = block.getFieldValue("name"); 375 | return [name, 0]; 376 | } 377 | ); 378 | 379 | getCategory(customCategoryName).contents.push({ 380 | kind: "block", 381 | type: "input", 382 | }); 383 | 384 | function getBlockChildren(block, filterFn) { 385 | // depth first search arg names (input blocks) 386 | let getChildren = (block, args = []) => { 387 | const children = block.getChildren(); 388 | if (filterFn(block)) { 389 | args.push(block); 390 | } 391 | if (children.length) { 392 | for (let child of children) { 393 | getChildren(child, args); 394 | } 395 | } 396 | return args; 397 | }; 398 | return getChildren(block); 399 | } 400 | function getBlockInputs(block) { 401 | return getBlockChildren(block, (child) => child.type === "input") 402 | .map((block) => block.getFieldValue("name")) 403 | .filter((arg, i, args) => args.indexOf(arg) === i); 404 | } 405 | 406 | // defines custom "register" block 407 | registerBlock( 408 | "register", 409 | { 410 | message0: `register %1 as %2`, 411 | args0: [ 412 | { 413 | type: "field_input", 414 | name: "name", 415 | //check: "String", 416 | }, 417 | { 418 | type: "input_value", 419 | name: "input", 420 | check: "Number", 421 | }, 422 | ], 423 | colour: systemBlockColor, 424 | tooltip: "defines a new block inside the workspace", 425 | }, 426 | function compile(block, generator) { 427 | const name = block.getFieldValue("name"); 428 | if (!name) { 429 | return ""; 430 | } 431 | const inputs = getBlockInputs(block); 432 | 433 | let code = generator.valueToCode(block, "input", 0); 434 | if (!code) { 435 | code = "n(0)"; 436 | } 437 | //return [value, 0]; 438 | return `const ${name} = registerCustomBlock('${name}', 439 | (${inputs.join(", ")}) => ${code}, 440 | [${inputs.map((arg) => `'${arg}'`).join(",")}] 441 | )`; 442 | } 443 | ); 444 | 445 | getCategory(customCategoryName).contents.push({ 446 | kind: "block", 447 | type: "register", 448 | }); 449 | 450 | // defines custom "lambda" block 451 | registerBlock( 452 | "lambda", 453 | { 454 | message0: `lambda %1`, 455 | args0: [ 456 | { 457 | type: "input_value", 458 | name: "input", 459 | check: "Number", 460 | }, 461 | ], 462 | colour: systemBlockColor, 463 | output: "Number", 464 | tooltip: "returns a lambda function", 465 | }, 466 | function compile(block, generator) { 467 | const inputs = getBlockInputs(block); 468 | let code = generator.valueToCode(block, "input", 0); 469 | if (!code) { 470 | code = "n(0)"; 471 | } 472 | //return [value, 0]; 473 | return [`(${inputs.join(", ")}) => ${code}`, 0]; 474 | } 475 | ); 476 | 477 | getCategory("meta").contents.push({ 478 | kind: "block", 479 | type: "lambda", 480 | }); 481 | // static props 482 | this.categories = categories; 483 | this.customCategoryName = customCategoryName; 484 | 485 | const addExample = (lisp) => { 486 | const example = Blocksalat.lisp2blocks(lisp); 487 | example.kind = "block"; 488 | getCategory("examples").contents.push(example); 489 | }; 490 | addExample("(out (sine 400) (stereo))"); 491 | addExample("(out (mul (sine 400) (range (sine 4) .4 1)) (stereo))"); 492 | addExample("(out (sine (range (sine 4) 400 500)) (stereo))"); 493 | addExample("(out (lpf (saw 55) (range (sine 1) .4 .8)) (stereo))"); 494 | addExample("(out (mul (sine 440) (perc (impulse 4) .2)) (stereo))"); 495 | addExample("(out (mul (sine 440) (ad (impulse 4) .08 .15)) (stereo))"); 496 | addExample( 497 | "(out (lpf (saw (seq4 (impulse 4) 55 110 220 330)) .5) (stereo))" 498 | ); 499 | addExample( 500 | "(out (lpf (saw (lag (seq4 (impulse 2) 55 110 220 330) .7)) .5) (stereo))" 501 | ); 502 | addExample( 503 | "(out (add (mul (lpf (saw (seq4 (impulse 2) 55 110 220 330)) .5) (ad (impulse 4) .01 .1)) (lambda (mul (delay (input x) .1) .8))) (stereo))" 504 | ); 505 | addExample("(out (sine (poly2 400 401)) (stereo))"); 506 | addExample("(out (mul (sine (poly2 333 442)) (poly2 1 .25)) (stereo))"); 507 | addExample("(out (fold (sine 55) (range (sine .5) 0.2 4)) (stereo))"); 508 | addExample( 509 | "(out (distort (lpf (saw (lag (seq5 (impulse 4) 55 0 55 66 77) .5)) (range(sine .3) .2 .8) .2) (range (sine .5) 0 1)) (stereo))" 510 | ); 511 | } 512 | // workspace, repl 513 | constructor(targetElement, config = {}) { 514 | Blocksalat.init(); 515 | this.targetElement = targetElement; 516 | this.init(targetElement, config); 517 | // init kabelsalat repl 518 | this.repl = new SalatRepl(); 519 | } 520 | 521 | init(targetElement, config) { 522 | this.config = config; 523 | // blockly toolbox definition 524 | let toolbox; 525 | if (config.toolbox) { 526 | const contents = [...Blocksalat.categories]; 527 | if (config.search) { 528 | contents.unshift({ 529 | kind: "search", 530 | name: "Search", 531 | contents: [], 532 | colour: "#222", 533 | }); 534 | } 535 | toolbox = { 536 | kind: "categoryToolbox", 537 | contents, 538 | }; 539 | } 540 | let zoom; 541 | let move = { 542 | scrollbars: true, // this is needed to center the workspace.. 543 | drag: false, 544 | wheel: false, 545 | }; 546 | if (!config.readOnly) { 547 | zoom = { 548 | controls: true, 549 | wheel: true, 550 | startScale: 1.0, 551 | maxScale: 3, 552 | minScale: 0.6, 553 | scaleSpeed: 1.2, 554 | pinch: true, 555 | }; 556 | move = { 557 | scrollbars: true, 558 | drag: true, 559 | wheel: true, 560 | }; 561 | } 562 | 563 | // init blockly workspace 564 | this.workspace = Blockly.inject(targetElement, { 565 | readOnly: config.readOnly ?? false, 566 | theme: DarkTheme, 567 | trashcan: true, 568 | sounds: false, 569 | // rtl: true, 570 | move, 571 | zoom, 572 | toolbox, 573 | //toolboxPosition: "end", 574 | horizontalLayout: true, 575 | media: "/", 576 | }); 577 | 578 | window.registerCustomBlock = this.registerCustomBlock.bind(this); 579 | 580 | // if readOnly, add readonly class to allow scrolling over the item on mobile 581 | const container = this.targetElement.querySelector(".injectionDiv"); 582 | if (this.readOnly) { 583 | container.classList.add("readonly"); 584 | } else { 585 | container.classList.remove("readonly"); 586 | } 587 | } 588 | 589 | // runs each time something changes 590 | update() { 591 | // generate and run kabelsalat code 592 | const code = Blocksalat.kabelsalatGenerator.workspaceToCode(this.workspace); 593 | console.log("run:"); 594 | console.log(code); 595 | this.repl.run(code); 596 | if (this.config.onChange) { 597 | // persist workspace state to url hash, using hashed json 598 | const json = Blockly.serialization.workspaces.save(this.workspace); 599 | this.config.onChange(json); 600 | } 601 | } 602 | // should be called on a user click 603 | start() { 604 | this.update(); 605 | } 606 | stop() { 607 | this.repl.stop(); 608 | } 609 | get readOnly() { 610 | return this.workspace.options.readOnly; 611 | } 612 | toggleEdit() { 613 | const json = Blockly.serialization.workspaces.save(this.workspace); 614 | /* this.removeChangeListener(); */ // seems to create weird bugs 615 | this.workspace.dispose(); 616 | this.init(this.targetElement, { ...this.config, readOnly: !this.readOnly }); 617 | this.loadJSON(json); 618 | setTimeout(() => { 619 | this.addChangeListener(); // if we're not delaying it, it will fire immediately a create event for some reason 620 | }, 100); 621 | } 622 | handleChange(event) { 623 | const supportedEvents = new Set([ 624 | Blockly.Events.BLOCK_CHANGE, 625 | Blockly.Events.BLOCK_CREATE, 626 | Blockly.Events.BLOCK_DELETE, 627 | Blockly.Events.BLOCK_MOVE, 628 | Blockly.Events.BLOCK_FIELD_INTERMEDIATE_CHANGE, 629 | ]); 630 | //if (workspace.isDragging()) return; 631 | if (!supportedEvents.has(event.type)) return; 632 | this.update(); 633 | } 634 | addChangeListener() { 635 | this.changeListener = this.changeListener || this.handleChange.bind(this); 636 | this.workspace.addChangeListener(this.changeListener); 637 | } 638 | removeChangeListener() { 639 | this.changeListener = this.changeListener || this.handleChange.bind(this); 640 | this.workspace.removeChangeListener(this.changeListener); 641 | } 642 | toggle() { 643 | if (this.started) { 644 | this.started = false; 645 | this.stop(); 646 | this.removeChangeListener(); 647 | } else { 648 | this.started = true; 649 | this.start(); 650 | this.addChangeListener(); 651 | } 652 | } 653 | loadJSON(json) { 654 | console.log("load", json); 655 | if (!json?.blocks?.blocks) { 656 | console.warn("empty json?", json); 657 | return; 658 | } 659 | // before loading the full json, we need to check if it contains "register" nodes 660 | // if yes, we need to run a "preflight" pass to make sure custom blocks are defined 661 | const registerBlocks = json.blocks.blocks.filter( 662 | (block) => block.type === "register" 663 | ); 664 | if (registerBlocks.length) { 665 | const preflightWorkspace = { 666 | blocks: { 667 | languageVersion: 0, 668 | blocks: registerBlocks, 669 | }, 670 | }; 671 | Blockly.serialization.workspaces.load(preflightWorkspace, this.workspace); 672 | const preflightCode = Blocksalat.kabelsalatGenerator.workspaceToCode( 673 | this.workspace 674 | ); 675 | console.log("preflight:"); 676 | console.log(preflightCode); 677 | Function(preflightCode)(); 678 | } 679 | 680 | // problem: any custom nodes in this json won't be registered, because the code didn't run yet.. 681 | // to run the code, we need to generate it, which we can only do if the workspace is loaded... 682 | // deadlock 3000 683 | Blockly.serialization.workspaces.load(json, this.workspace); // load to blockly 684 | if (this.workspace.options.readOnly) { 685 | this.workspace.zoomToFit(); 686 | } 687 | } 688 | static lisp2blocks(lisp) { 689 | let parseNode = (node) => { 690 | // console.log("parse", node); 691 | if (typeof node === "undefined") { 692 | node = { type: "plain", value: 0 }; 693 | } 694 | if (node.type === "plain") { 695 | return { shadow: { type: "n", fields: { NUM: Number(node.value) } } }; 696 | } 697 | if (node.type !== "list") { 698 | throw new Error( 699 | `expected top level element to be a list, got ${node.type}` 700 | ); 701 | } 702 | let [type, ...args] = node.children; 703 | if (type.type !== "plain") { 704 | throw new Error( 705 | `expected first child to be of type plain, got ${type.type}` 706 | ); 707 | } 708 | type = type.value; 709 | // console.log("type", type, "args", args); 710 | const def = this.blockRegistry.get(type); 711 | if (!def) { 712 | throw new Error(`could not find definition for type "${type}"`); 713 | } 714 | // console.log("def", def); 715 | const inputs = Object.fromEntries( 716 | def.args0 717 | .filter((arg) => arg.type === "input_value") 718 | .map((arg, i) => [arg.name, parseNode(args[i])]) 719 | ); 720 | // console.log("inputs", type); 721 | const fields = Object.fromEntries( 722 | def.args0 723 | .filter((arg) => arg.type === "field_input") 724 | .map((arg, i) => { 725 | if (args[i].type !== "plain") { 726 | throw new Error( 727 | `unexpected type "${args[i].type}" for argument of type "input_value".` 728 | ); 729 | } 730 | return [arg.name, args[i].value]; 731 | }) 732 | ); 733 | // console.log("fields", fields); 734 | let block = { 735 | type, 736 | inputs, 737 | fields, 738 | }; 739 | return { block }; 740 | }; 741 | 742 | this.lisp = this.lisp || new LispParser(); 743 | const ast = this.lisp.parse(lisp); 744 | /* if (ast.type !== "list" || ast.children[0].value !== "out") { 745 | throw new Error(`expected outermost element to be of type "out"`); 746 | } 747 | if (ast.children[2] === undefined) { 748 | ast.children[2] = { 749 | type: "list", 750 | children: [{ type: "plain", value: "stereo" }], 751 | }; 752 | } */ 753 | //console.log("ast", ast); 754 | const { block } = parseNode(ast); 755 | return block; 756 | } 757 | load(hash, onError) { 758 | try { 759 | let str; 760 | if (hash.startsWith("(")) { 761 | str = hash; // allow passing unhashed lisp 762 | } else { 763 | str = atob(hash); 764 | } 765 | let json; 766 | // starts with (, its lisp 767 | if (str.startsWith("(")) { 768 | json = { 769 | blocks: { 770 | languageVersion: 0, 771 | blocks: [Blocksalat.lisp2blocks(str)], 772 | }, 773 | }; 774 | } else { 775 | json = JSON.parse(str); // convert hash to oject 776 | } 777 | this.loadJSON(json); 778 | } catch (err) { 779 | console.error("could not init code", err); 780 | onError?.(err); 781 | } 782 | } 783 | 784 | // this function is called from the "register" block 785 | registerCustomBlock(name, fn, args) { 786 | //console.log("registerCustomBlock", name, args); 787 | const config = { 788 | ins: args.map((name) => ({ name })), 789 | tags: [Blocksalat.customCategoryName], 790 | description: "a custom block, defined in the workspace using 'register'", 791 | }; 792 | Blocksalat.registerBlockFromKabelsalat(name, config); 793 | 794 | const registered = register(name, fn); 795 | 796 | const customCategory = this.workspace 797 | .getToolbox() 798 | .getToolboxItems() 799 | .find((cat) => cat.getName() === Blocksalat.customCategoryName); 800 | const contents = customCategory.getContents(); 801 | if (!contents.find((def) => def.type === name)) { 802 | contents.push({ kind: "block", type: name }); 803 | customCategory.updateFlyoutContents(contents); 804 | } 805 | 806 | return registered; 807 | } 808 | } 809 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | block.salat 12 | 13 | 14 |
15 | 23 |
24 |
25 | 26 | 27 |
28 | 40 |
41 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /learn/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | block.salat docs 14 | 15 | 16 |
17 | 23 |
24 |
25 |

What is blocksalat?

26 |

27 | blocksalat is a modular synthesizer based on blocks 28 | that can be puzzled together. It's free and open source, and it runs 29 | completely in the browser. The synth engine is based on 30 | kabelsalat. 33 |

34 |

Hello World

35 |

Here is a very simple example that generates a sine wave:

36 | 40 |

Press "play" to start the sound!

41 |

Amplitude Modulation

42 |

Let's modulate the amplitude using mul:

43 | 47 |

Frequency Modulation

48 |

Let's modulate the frequency instead:

49 | 53 |

Subtractive Synthesis

54 |

55 | A lonely sine wave is pretty thin, let's add some oomph with a 56 | sawtooth wave and a low pass filter: 57 |

58 | 62 |

Impulses & Envelopes

63 |

We can apply a simple decay envelope with impulse and perc:

64 | 68 |

We can also use ad to get an attack + decay phase:

69 | 73 |

Sequences

74 |

75 | The seq4 blocks allows us to cycle through 4 different values using 76 | an impulse: 77 |

78 | 82 | 95 |

lag

96 |

97 | lag acts as a so called "slew limiter", making the incoming signal 98 | sluggish, preventing harsh clicks. It can also be used for glissando 99 | effects: 100 |

101 | 105 |

Feedback Delay

106 |

107 | Feedback is a core feature of blocksalat. You can plug a block back 108 | to itself using a so called lambda block: 109 |

110 | 114 |

Multichannel Expansion

115 |

We can create multiple channels with the poly blocks:

116 | 120 | 125 |

126 | Look what happens when poly blocks are used in more than one place: 127 |

128 | 132 |

133 | Explanation: the channels are automatically mapped to each other. 134 | The 111Hz sine wave gets multiplied with 1, and the 442Hz sine wave 135 | gets multiplied with .25. 136 |

137 |

fold

138 |

fold limits the signal in between [-1,1] by wavefolding:

139 | 143 |

Distort

144 | 148 |
149 |
150 |
151 | 152 | 153 | -------------------------------------------------------------------------------- /lisp.js: -------------------------------------------------------------------------------- 1 | // https://garten.salat.dev/lisp/parser.html 2 | export class LispParser { 3 | // these are the tokens we expect 4 | token_types = { 5 | open_list: /^\(/, 6 | close_list: /^\)/, 7 | plain: /^[a-zA-Z0-9\.\#]+/, 8 | }; 9 | // matches next token 10 | next_token(code) { 11 | for (let type in this.token_types) { 12 | const match = code.match(this.token_types[type]); 13 | if (match) { 14 | return { type, value: match[0] }; 15 | } 16 | } 17 | throw new Error(`could not match "${code}"`); 18 | } 19 | // takes code string, returns list of matched tokens (if valid) 20 | tokenize(code) { 21 | let tokens = []; 22 | while (code.length > 0) { 23 | code = code.trim(); 24 | const token = this.next_token(code); 25 | code = code.slice(token.value.length); 26 | tokens.push(token); 27 | } 28 | return tokens; 29 | } 30 | // take code, return abstract syntax tree 31 | parse(code) { 32 | this.tokens = this.tokenize(code); 33 | return this.parse_expr(); 34 | } 35 | // parses any valid expression 36 | parse_expr() { 37 | let next = this.tokens[0]?.type; 38 | if (next === "open_list") { 39 | return this.parse_list(); 40 | } 41 | if (next === "plain") { 42 | return this.consume("plain"); 43 | } 44 | if (!this.tokens[0]) { 45 | throw new Error(`unexpected end of file`); 46 | } 47 | throw new Error( 48 | `unexpected token "${this.tokens[0].value}" of type ${this.tokens[0].type}` 49 | ); 50 | } 51 | parse_list() { 52 | this.consume("open_list"); 53 | const children = []; 54 | while (this.tokens[0]?.type !== "close_list") { 55 | children.push(this.parse_expr()); 56 | } 57 | this.consume("close_list"); 58 | return { type: "list", children }; 59 | } 60 | consume(type) { 61 | // shift removes first element and returns it 62 | const token = this.tokens.shift(); 63 | if (token.type !== type) { 64 | throw new Error(`expected token type ${type}, got ${token.type}`); 65 | } 66 | return token; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blocksalat", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "postinstall": "cp -r node_modules/@kabelsalat/web/dist/assets public" 11 | }, 12 | "devDependencies": { 13 | "vite": "^6.1.0" 14 | }, 15 | "dependencies": { 16 | "@blockly/theme-dark": "^7.0.10", 17 | "@kabelsalat/web": "^0.3.2", 18 | "blockly": "^11.2.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /plugins/toolbox-search/block_searcher.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright 2023 Google LLC 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | import * as Blockly from "blockly/core"; 7 | //github.com/google/blockly-samples/blob/master/plugins/toolbox-search/src/block_searcher.ts 8 | 9 | /** 10 | * A class that provides methods for indexing and searching blocks. 11 | */ 12 | export class BlockSearcher { 13 | private blockCreationWorkspace = new Blockly.Workspace(); 14 | private trigramsToBlocks = new Map>(); 15 | 16 | /** 17 | * Populates the cached map of trigrams to the blocks they correspond to. 18 | * 19 | * This method must be called before blockTypesMatching(). Behind the 20 | * scenes, it creates a workspace, loads the specified block types on it, 21 | * indexes their types and human-readable text, and cleans up after 22 | * itself. 23 | * 24 | * @param blockTypes A list of block types to index. 25 | */ 26 | indexBlocks(blockTypes: string[]) { 27 | const blockCreationWorkspace = new Blockly.Workspace(); 28 | blockTypes.forEach((blockType) => { 29 | const block = blockCreationWorkspace.newBlock(blockType); 30 | this.indexBlockText(blockType.replaceAll("_", " "), blockType); 31 | block.inputList.forEach((input) => { 32 | input.fieldRow.forEach((field) => { 33 | this.indexDropdownOption(field, blockType); 34 | this.indexBlockText(field.getText(), blockType); 35 | }); 36 | }); 37 | }); 38 | } 39 | 40 | /** 41 | * Check if the field is a dropdown, and index every text in the option 42 | * 43 | * @param field We need to check the type of field 44 | * @param blockType The block type to associate the trigrams with. 45 | */ 46 | private indexDropdownOption(field: Blockly.Field, blockType: string) { 47 | if (field instanceof Blockly.FieldDropdown) { 48 | field.getOptions(true).forEach((option) => { 49 | if (typeof option[0] === "string") { 50 | this.indexBlockText(option[0], blockType); 51 | } else if ("alt" in option[0]) { 52 | this.indexBlockText(option[0].alt, blockType); 53 | } 54 | }); 55 | } 56 | } 57 | 58 | /** 59 | * Filters the available blocks based on the current query string. 60 | * 61 | * @param query The text to use to match blocks against. 62 | * @returns A list of block types matching the query. 63 | */ 64 | blockTypesMatching(query: string): string[] { 65 | return [ 66 | ...this.generateTrigrams(query) 67 | .map((trigram) => { 68 | return this.trigramsToBlocks.get(trigram) ?? new Set(); 69 | }) 70 | .reduce((matches, current) => { 71 | return this.getIntersection(matches, current); 72 | }) 73 | .values(), 74 | ]; 75 | } 76 | 77 | /** 78 | * Generates trigrams for the given text and associates them with the given 79 | * block type. 80 | * 81 | * @param text The text to generate trigrams of. 82 | * @param blockType The block type to associate the trigrams with. 83 | */ 84 | private indexBlockText(text: string, blockType: string) { 85 | this.generateTrigrams(text).forEach((trigram) => { 86 | const blockSet = this.trigramsToBlocks.get(trigram) ?? new Set(); 87 | blockSet.add(blockType); 88 | this.trigramsToBlocks.set(trigram, blockSet); 89 | }); 90 | } 91 | 92 | /** 93 | * Generates a list of trigrams for a given string. 94 | * 95 | * @param input The string to generate trigrams of. 96 | * @returns A list of trigrams of the given string. 97 | */ 98 | private generateTrigrams(input: string): string[] { 99 | const normalizedInput = input.toLowerCase(); 100 | if (!normalizedInput) return []; 101 | if (normalizedInput.length <= 3) return [normalizedInput]; 102 | 103 | const trigrams: string[] = []; 104 | for (let start = 0; start < normalizedInput.length - 3; start++) { 105 | trigrams.push(normalizedInput.substring(start, start + 3)); 106 | } 107 | 108 | return trigrams; 109 | } 110 | 111 | /** 112 | * Returns the intersection of two sets. 113 | * 114 | * @param a The first set. 115 | * @param b The second set. 116 | * @returns The intersection of the two sets. 117 | */ 118 | private getIntersection(a: Set, b: Set): Set { 119 | return new Set([...a].filter((value) => b.has(value))); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /plugins/toolbox-search/readme.md: -------------------------------------------------------------------------------- 1 | # toolbox-search 2 | 3 | this is a modified copy of the `@blockly/toolbox-search` plugin. 4 | my problem was that the search category did not include shadow blocks. 5 | i've modified the plugin to make sure the search results contain the blocks as defined in the category 6 | -------------------------------------------------------------------------------- /plugins/toolbox-search/toolbox_search.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright 2023 Google LLC 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * A toolbox category that provides a search field and displays matching blocks 9 | * in its flyout. 10 | */ 11 | import * as Blockly from "blockly/core"; 12 | import { BlockSearcher } from "./block_searcher.ts"; 13 | 14 | /* eslint-disable @typescript-eslint/naming-convention */ 15 | 16 | /** 17 | * A toolbox category that provides a search field and displays matching blocks 18 | * in its flyout. 19 | */ 20 | export class ToolboxSearchCategory extends Blockly.ToolboxCategory { 21 | private static readonly START_SEARCH_SHORTCUT = "startSearch"; 22 | static readonly SEARCH_CATEGORY_KIND = "search"; 23 | private searchField?: HTMLInputElement; 24 | private blockSearcher = new BlockSearcher(); 25 | private blockSchemas: Map = 26 | new Map(); 27 | 28 | /** 29 | * Initializes a ToolboxSearchCategory. 30 | * 31 | * @param categoryDef The information needed to create a category in the 32 | * toolbox. 33 | * @param parentToolbox The parent toolbox for the category. 34 | * @param opt_parent The parent category or null if the category does not have 35 | * a parent. 36 | */ 37 | constructor( 38 | categoryDef: Blockly.utils.toolbox.CategoryInfo, 39 | parentToolbox: Blockly.IToolbox, 40 | opt_parent?: Blockly.ICollapsibleToolboxItem 41 | ) { 42 | super(categoryDef, parentToolbox, opt_parent); 43 | this.initBlockSearcher(); 44 | this.registerShortcut(); 45 | } 46 | 47 | /** 48 | * Initializes the search field toolbox category. 49 | * 50 | * @returns The
that will be displayed in the toolbox. 51 | */ 52 | protected override createDom_(): HTMLDivElement { 53 | const dom = super.createDom_(); 54 | this.searchField = document.createElement("input"); 55 | this.searchField.type = "search"; 56 | this.searchField.placeholder = "Search"; 57 | this.workspace_.RTL 58 | ? (this.searchField.style.marginRight = "8px") 59 | : (this.searchField.style.marginLeft = "8px"); 60 | this.searchField.addEventListener("keyup", (event) => { 61 | if (event.key === "Escape") { 62 | this.parentToolbox_.clearSelection(); 63 | return true; 64 | } 65 | 66 | this.matchBlocks(); 67 | }); 68 | this.rowContents_?.replaceChildren(this.searchField); 69 | return dom; 70 | } 71 | 72 | /** 73 | * Returns the numerical position of this category in its parent toolbox. 74 | * 75 | * @returns The zero-based index of this category in its parent toolbox, or -1 76 | * if it cannot be determined, e.g. if this is a nested category. 77 | */ 78 | private getPosition() { 79 | const categories = this.workspace_.options.languageTree?.contents || []; 80 | for (let i = 0; i < categories.length; i++) { 81 | if (categories[i].kind === ToolboxSearchCategory.SEARCH_CATEGORY_KIND) { 82 | return i; 83 | } 84 | } 85 | 86 | return -1; 87 | } 88 | 89 | /** 90 | * Registers a shortcut for displaying the toolbox search category. 91 | */ 92 | private registerShortcut() { 93 | const shortcut = Blockly.ShortcutRegistry.registry.createSerializedKey( 94 | Blockly.utils.KeyCodes.B, 95 | [Blockly.utils.KeyCodes.CTRL] 96 | ); 97 | Blockly.ShortcutRegistry.registry.register({ 98 | name: ToolboxSearchCategory.START_SEARCH_SHORTCUT, 99 | callback: () => { 100 | const position = this.getPosition(); 101 | if (position < 0) return false; 102 | this.parentToolbox_.selectItemByPosition(position); 103 | return true; 104 | }, 105 | keyCodes: [shortcut], 106 | }); 107 | } 108 | 109 | /** 110 | * Returns a list of block types that are present in the toolbox definition. 111 | * 112 | * @param schema A toolbox item definition. 113 | * @param allBlocks The set of all available blocks that have been encountered 114 | * so far. 115 | */ 116 | private getAvailableBlocks( 117 | schema: Blockly.utils.toolbox.ToolboxItemInfo, 118 | allBlocks: Set 119 | ) { 120 | if ("contents" in schema) { 121 | schema.contents.forEach((contents) => { 122 | this.getAvailableBlocks(contents, allBlocks); 123 | }); 124 | } else if (schema.kind.toLowerCase() === "block") { 125 | if ("type" in schema && schema.type) { 126 | allBlocks.add(schema.type); 127 | this.blockSchemas.set(schema.type, schema); // <- 128 | } 129 | } 130 | } 131 | 132 | /** 133 | * Builds the BlockSearcher index based on the available blocks. 134 | */ 135 | private initBlockSearcher() { 136 | const availableBlocks = new Set(); 137 | this.workspace_.options.languageTree?.contents?.forEach((item) => 138 | this.getAvailableBlocks(item, availableBlocks) 139 | ); 140 | this.blockSearcher.indexBlocks([...availableBlocks]); 141 | } 142 | 143 | /** 144 | * Handles a click on this toolbox category. 145 | * 146 | * @param e The click event. 147 | */ 148 | override onClick(e: Event) { 149 | super.onClick(e); 150 | e.preventDefault(); 151 | e.stopPropagation(); 152 | this.setSelected(this.parentToolbox_.getSelectedItem() === this); 153 | } 154 | 155 | /** 156 | * Handles changes in the selection state of this category. 157 | * 158 | * @param isSelected Whether or not the category is now selected. 159 | */ 160 | override setSelected(isSelected: boolean) { 161 | super.setSelected(isSelected); 162 | if (!this.searchField) return; 163 | if (isSelected) { 164 | this.searchField.focus(); 165 | this.matchBlocks(); 166 | } else { 167 | this.searchField.value = ""; 168 | this.searchField.blur(); 169 | } 170 | } 171 | 172 | /** 173 | * Filters the available blocks based on the current query string. 174 | */ 175 | private matchBlocks() { 176 | const query = this.searchField?.value || ""; 177 | 178 | this.flyoutItems_ = query 179 | ? this.blockSearcher.blockTypesMatching(query).map((blockType) => { 180 | /* { 181 | kind: "block", 182 | type: blockType, 183 | }; */ 184 | // this includes the whole block schema, including shadow blocks for example 185 | return this.blockSchemas.get(blockType) as any; 186 | }) 187 | : []; 188 | 189 | if (!this.flyoutItems_.length) { 190 | this.flyoutItems_.push({ 191 | kind: "label", 192 | text: 193 | query.length < 3 194 | ? "Type to search for blocks" 195 | : "No matching blocks found", 196 | }); 197 | } 198 | this.parentToolbox_.refreshSelection(); 199 | } 200 | 201 | /** 202 | * Disposes of this category. 203 | */ 204 | override dispose() { 205 | super.dispose(); 206 | Blockly.ShortcutRegistry.registry.unregister( 207 | ToolboxSearchCategory.START_SEARCH_SHORTCUT 208 | ); 209 | } 210 | } 211 | 212 | Blockly.registry.register( 213 | Blockly.registry.Type.TOOLBOX_ITEM, 214 | ToolboxSearchCategory.SEARCH_CATEGORY_KIND, 215 | ToolboxSearchCategory 216 | ); 217 | -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '9.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | importers: 8 | 9 | .: 10 | dependencies: 11 | '@blockly/theme-dark': 12 | specifier: ^7.0.10 13 | version: 7.0.10(blockly@11.2.1) 14 | '@kabelsalat/web': 15 | specifier: ^0.3.2 16 | version: 0.3.2 17 | blockly: 18 | specifier: ^11.2.1 19 | version: 11.2.1 20 | devDependencies: 21 | vite: 22 | specifier: ^6.1.0 23 | version: 6.1.0 24 | 25 | packages: 26 | 27 | '@asamuzakjp/css-color@2.8.3': 28 | resolution: {integrity: sha512-GIc76d9UI1hCvOATjZPyHFmE5qhRccp3/zGfMPapK3jBi+yocEzp6BBB0UnfRYP9NP4FANqUZYb0hnfs3TM3hw==} 29 | 30 | '@blockly/theme-dark@7.0.10': 31 | resolution: {integrity: sha512-Wc6n115vt9alxzPkEwYtvBBGoPUV3gaYE00dvSKhqXTNoy1Xioujj9kT9VkGmdMO2mhgnJNczSpvxG8tcd4zLQ==} 32 | engines: {node: '>=8.17.0'} 33 | peerDependencies: 34 | blockly: ^11.0.0 35 | 36 | '@csstools/color-helpers@5.0.1': 37 | resolution: {integrity: sha512-MKtmkA0BX87PKaO1NFRTFH+UnkgnmySQOvNxJubsadusqPEC2aJ9MOQiMceZJJ6oitUl/i0L6u0M1IrmAOmgBA==} 38 | engines: {node: '>=18'} 39 | 40 | '@csstools/css-calc@2.1.1': 41 | resolution: {integrity: sha512-rL7kaUnTkL9K+Cvo2pnCieqNpTKgQzy5f+N+5Iuko9HAoasP+xgprVh7KN/MaJVvVL1l0EzQq2MoqBHKSrDrag==} 42 | engines: {node: '>=18'} 43 | peerDependencies: 44 | '@csstools/css-parser-algorithms': ^3.0.4 45 | '@csstools/css-tokenizer': ^3.0.3 46 | 47 | '@csstools/css-color-parser@3.0.7': 48 | resolution: {integrity: sha512-nkMp2mTICw32uE5NN+EsJ4f5N+IGFeCFu4bGpiKgb2Pq/7J/MpyLBeQ5ry4KKtRFZaYs6sTmcMYrSRIyj5DFKA==} 49 | engines: {node: '>=18'} 50 | peerDependencies: 51 | '@csstools/css-parser-algorithms': ^3.0.4 52 | '@csstools/css-tokenizer': ^3.0.3 53 | 54 | '@csstools/css-parser-algorithms@3.0.4': 55 | resolution: {integrity: sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==} 56 | engines: {node: '>=18'} 57 | peerDependencies: 58 | '@csstools/css-tokenizer': ^3.0.3 59 | 60 | '@csstools/css-tokenizer@3.0.3': 61 | resolution: {integrity: sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==} 62 | engines: {node: '>=18'} 63 | 64 | '@esbuild/aix-ppc64@0.24.2': 65 | resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} 66 | engines: {node: '>=18'} 67 | cpu: [ppc64] 68 | os: [aix] 69 | 70 | '@esbuild/android-arm64@0.24.2': 71 | resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} 72 | engines: {node: '>=18'} 73 | cpu: [arm64] 74 | os: [android] 75 | 76 | '@esbuild/android-arm@0.24.2': 77 | resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} 78 | engines: {node: '>=18'} 79 | cpu: [arm] 80 | os: [android] 81 | 82 | '@esbuild/android-x64@0.24.2': 83 | resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} 84 | engines: {node: '>=18'} 85 | cpu: [x64] 86 | os: [android] 87 | 88 | '@esbuild/darwin-arm64@0.24.2': 89 | resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} 90 | engines: {node: '>=18'} 91 | cpu: [arm64] 92 | os: [darwin] 93 | 94 | '@esbuild/darwin-x64@0.24.2': 95 | resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} 96 | engines: {node: '>=18'} 97 | cpu: [x64] 98 | os: [darwin] 99 | 100 | '@esbuild/freebsd-arm64@0.24.2': 101 | resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} 102 | engines: {node: '>=18'} 103 | cpu: [arm64] 104 | os: [freebsd] 105 | 106 | '@esbuild/freebsd-x64@0.24.2': 107 | resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} 108 | engines: {node: '>=18'} 109 | cpu: [x64] 110 | os: [freebsd] 111 | 112 | '@esbuild/linux-arm64@0.24.2': 113 | resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} 114 | engines: {node: '>=18'} 115 | cpu: [arm64] 116 | os: [linux] 117 | 118 | '@esbuild/linux-arm@0.24.2': 119 | resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} 120 | engines: {node: '>=18'} 121 | cpu: [arm] 122 | os: [linux] 123 | 124 | '@esbuild/linux-ia32@0.24.2': 125 | resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} 126 | engines: {node: '>=18'} 127 | cpu: [ia32] 128 | os: [linux] 129 | 130 | '@esbuild/linux-loong64@0.24.2': 131 | resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} 132 | engines: {node: '>=18'} 133 | cpu: [loong64] 134 | os: [linux] 135 | 136 | '@esbuild/linux-mips64el@0.24.2': 137 | resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} 138 | engines: {node: '>=18'} 139 | cpu: [mips64el] 140 | os: [linux] 141 | 142 | '@esbuild/linux-ppc64@0.24.2': 143 | resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} 144 | engines: {node: '>=18'} 145 | cpu: [ppc64] 146 | os: [linux] 147 | 148 | '@esbuild/linux-riscv64@0.24.2': 149 | resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} 150 | engines: {node: '>=18'} 151 | cpu: [riscv64] 152 | os: [linux] 153 | 154 | '@esbuild/linux-s390x@0.24.2': 155 | resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} 156 | engines: {node: '>=18'} 157 | cpu: [s390x] 158 | os: [linux] 159 | 160 | '@esbuild/linux-x64@0.24.2': 161 | resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} 162 | engines: {node: '>=18'} 163 | cpu: [x64] 164 | os: [linux] 165 | 166 | '@esbuild/netbsd-arm64@0.24.2': 167 | resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} 168 | engines: {node: '>=18'} 169 | cpu: [arm64] 170 | os: [netbsd] 171 | 172 | '@esbuild/netbsd-x64@0.24.2': 173 | resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} 174 | engines: {node: '>=18'} 175 | cpu: [x64] 176 | os: [netbsd] 177 | 178 | '@esbuild/openbsd-arm64@0.24.2': 179 | resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} 180 | engines: {node: '>=18'} 181 | cpu: [arm64] 182 | os: [openbsd] 183 | 184 | '@esbuild/openbsd-x64@0.24.2': 185 | resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} 186 | engines: {node: '>=18'} 187 | cpu: [x64] 188 | os: [openbsd] 189 | 190 | '@esbuild/sunos-x64@0.24.2': 191 | resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} 192 | engines: {node: '>=18'} 193 | cpu: [x64] 194 | os: [sunos] 195 | 196 | '@esbuild/win32-arm64@0.24.2': 197 | resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} 198 | engines: {node: '>=18'} 199 | cpu: [arm64] 200 | os: [win32] 201 | 202 | '@esbuild/win32-ia32@0.24.2': 203 | resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} 204 | engines: {node: '>=18'} 205 | cpu: [ia32] 206 | os: [win32] 207 | 208 | '@esbuild/win32-x64@0.24.2': 209 | resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} 210 | engines: {node: '>=18'} 211 | cpu: [x64] 212 | os: [win32] 213 | 214 | '@kabelsalat/core@0.3.0': 215 | resolution: {integrity: sha512-NgDgWIOtomtiAUPrri9+8Q/5a8RS1OscTaP0PR3xvN35490sdGduVeFNP9RdZx1f9aEoFoTeFr/48ObAV68mJg==} 216 | 217 | '@kabelsalat/lib@0.3.1': 218 | resolution: {integrity: sha512-WNgUX/DgzzcKvG2+88yhUG88D6OEcIqE7gVHUhnp20cuhsIOYV1WLfYMVGqgkmuHbQyJPGuf6/l9deDD0PY2ug==} 219 | 220 | '@kabelsalat/web@0.3.2': 221 | resolution: {integrity: sha512-BuVYv5re1QugaF3fSwRnuurP/nT8FecPIwBS82eZxEEBNMxDGJhcvVxh1Y2pJ+/Cr3tN27oxiDM5vkvyhrgMjQ==} 222 | 223 | '@rollup/rollup-android-arm-eabi@4.34.4': 224 | resolution: {integrity: sha512-gGi5adZWvjtJU7Axs//CWaQbQd/vGy8KGcnEaCWiyCqxWYDxwIlAHFuSe6Guoxtd0SRvSfVTDMPd5H+4KE2kKA==} 225 | cpu: [arm] 226 | os: [android] 227 | 228 | '@rollup/rollup-android-arm64@4.34.4': 229 | resolution: {integrity: sha512-1aRlh1gqtF7vNPMnlf1vJKk72Yshw5zknR/ZAVh7zycRAGF2XBMVDAHmFQz/Zws5k++nux3LOq/Ejj1WrDR6xg==} 230 | cpu: [arm64] 231 | os: [android] 232 | 233 | '@rollup/rollup-darwin-arm64@4.34.4': 234 | resolution: {integrity: sha512-drHl+4qhFj+PV/jrQ78p9ch6A0MfNVZScl/nBps5a7u01aGf/GuBRrHnRegA9bP222CBDfjYbFdjkIJ/FurvSQ==} 235 | cpu: [arm64] 236 | os: [darwin] 237 | 238 | '@rollup/rollup-darwin-x64@4.34.4': 239 | resolution: {integrity: sha512-hQqq/8QALU6t1+fbNmm6dwYsa0PDD4L5r3TpHx9dNl+aSEMnIksHZkSO3AVH+hBMvZhpumIGrTFj8XCOGuIXjw==} 240 | cpu: [x64] 241 | os: [darwin] 242 | 243 | '@rollup/rollup-freebsd-arm64@4.34.4': 244 | resolution: {integrity: sha512-/L0LixBmbefkec1JTeAQJP0ETzGjFtNml2gpQXA8rpLo7Md+iXQzo9kwEgzyat5Q+OG/C//2B9Fx52UxsOXbzw==} 245 | cpu: [arm64] 246 | os: [freebsd] 247 | 248 | '@rollup/rollup-freebsd-x64@4.34.4': 249 | resolution: {integrity: sha512-6Rk3PLRK+b8L/M6m/x6Mfj60LhAUcLJ34oPaxufA+CfqkUrDoUPQYFdRrhqyOvtOKXLJZJwxlOLbQjNYQcRQfw==} 250 | cpu: [x64] 251 | os: [freebsd] 252 | 253 | '@rollup/rollup-linux-arm-gnueabihf@4.34.4': 254 | resolution: {integrity: sha512-kmT3x0IPRuXY/tNoABp2nDvI9EvdiS2JZsd4I9yOcLCCViKsP0gB38mVHOhluzx+SSVnM1KNn9k6osyXZhLoCA==} 255 | cpu: [arm] 256 | os: [linux] 257 | 258 | '@rollup/rollup-linux-arm-musleabihf@4.34.4': 259 | resolution: {integrity: sha512-3iSA9tx+4PZcJH/Wnwsvx/BY4qHpit/u2YoZoXugWVfc36/4mRkgGEoRbRV7nzNBSCOgbWMeuQ27IQWgJ7tRzw==} 260 | cpu: [arm] 261 | os: [linux] 262 | 263 | '@rollup/rollup-linux-arm64-gnu@4.34.4': 264 | resolution: {integrity: sha512-7CwSJW+sEhM9sESEk+pEREF2JL0BmyCro8UyTq0Kyh0nu1v0QPNY3yfLPFKChzVoUmaKj8zbdgBxUhBRR+xGxg==} 265 | cpu: [arm64] 266 | os: [linux] 267 | 268 | '@rollup/rollup-linux-arm64-musl@4.34.4': 269 | resolution: {integrity: sha512-GZdafB41/4s12j8Ss2izofjeFXRAAM7sHCb+S4JsI9vaONX/zQ8cXd87B9MRU/igGAJkKvmFmJJBeeT9jJ5Cbw==} 270 | cpu: [arm64] 271 | os: [linux] 272 | 273 | '@rollup/rollup-linux-loongarch64-gnu@4.34.4': 274 | resolution: {integrity: sha512-uuphLuw1X6ur11675c2twC6YxbzyLSpWggvdawTUamlsoUv81aAXRMPBC1uvQllnBGls0Qt5Siw8reSIBnbdqQ==} 275 | cpu: [loong64] 276 | os: [linux] 277 | 278 | '@rollup/rollup-linux-powerpc64le-gnu@4.34.4': 279 | resolution: {integrity: sha512-KvLEw1os2gSmD6k6QPCQMm2T9P2GYvsMZMRpMz78QpSoEevHbV/KOUbI/46/JRalhtSAYZBYLAnT9YE4i/l4vg==} 280 | cpu: [ppc64] 281 | os: [linux] 282 | 283 | '@rollup/rollup-linux-riscv64-gnu@4.34.4': 284 | resolution: {integrity: sha512-wcpCLHGM9yv+3Dql/CI4zrY2mpQ4WFergD3c9cpRowltEh5I84pRT/EuHZsG0In4eBPPYthXnuR++HrFkeqwkA==} 285 | cpu: [riscv64] 286 | os: [linux] 287 | 288 | '@rollup/rollup-linux-s390x-gnu@4.34.4': 289 | resolution: {integrity: sha512-nLbfQp2lbJYU8obhRQusXKbuiqm4jSJteLwfjnunDT5ugBKdxqw1X9KWwk8xp1OMC6P5d0WbzxzhWoznuVK6XA==} 290 | cpu: [s390x] 291 | os: [linux] 292 | 293 | '@rollup/rollup-linux-x64-gnu@4.34.4': 294 | resolution: {integrity: sha512-JGejzEfVzqc/XNiCKZj14eb6s5w8DdWlnQ5tWUbs99kkdvfq9btxxVX97AaxiUX7xJTKFA0LwoS0KU8C2faZRg==} 295 | cpu: [x64] 296 | os: [linux] 297 | 298 | '@rollup/rollup-linux-x64-musl@4.34.4': 299 | resolution: {integrity: sha512-/iFIbhzeyZZy49ozAWJ1ZR2KW6ZdYUbQXLT4O5n1cRZRoTpwExnHLjlurDXXPKEGxiAg0ujaR9JDYKljpr2fDg==} 300 | cpu: [x64] 301 | os: [linux] 302 | 303 | '@rollup/rollup-win32-arm64-msvc@4.34.4': 304 | resolution: {integrity: sha512-qORc3UzoD5UUTneiP2Afg5n5Ti1GAW9Gp5vHPxzvAFFA3FBaum9WqGvYXGf+c7beFdOKNos31/41PRMUwh1tpA==} 305 | cpu: [arm64] 306 | os: [win32] 307 | 308 | '@rollup/rollup-win32-ia32-msvc@4.34.4': 309 | resolution: {integrity: sha512-5g7E2PHNK2uvoD5bASBD9aelm44nf1w4I5FEI7MPHLWcCSrR8JragXZWgKPXk5i2FU3JFfa6CGZLw2RrGBHs2Q==} 310 | cpu: [ia32] 311 | os: [win32] 312 | 313 | '@rollup/rollup-win32-x64-msvc@4.34.4': 314 | resolution: {integrity: sha512-p0scwGkR4kZ242xLPBuhSckrJ734frz6v9xZzD+kHVYRAkSUmdSLCIJRfql6H5//aF8Q10K+i7q8DiPfZp0b7A==} 315 | cpu: [x64] 316 | os: [win32] 317 | 318 | '@types/estree@1.0.6': 319 | resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} 320 | 321 | agent-base@7.1.3: 322 | resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} 323 | engines: {node: '>= 14'} 324 | 325 | asynckit@0.4.0: 326 | resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} 327 | 328 | blockly@11.2.1: 329 | resolution: {integrity: sha512-20sCwSwX2Z6UxR/er0B5y6wRFukuIdvOjc7jMuIwyCO/yT35+UbAqYueMga3JFA9NoWPwQc+3s6/XnLkyceAww==} 330 | engines: {node: '>=18'} 331 | 332 | combined-stream@1.0.8: 333 | resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} 334 | engines: {node: '>= 0.8'} 335 | 336 | cssstyle@4.2.1: 337 | resolution: {integrity: sha512-9+vem03dMXG7gDmZ62uqmRiMRNtinIZ9ZyuF6BdxzfOD+FdN5hretzynkn0ReS2DO2GSw76RWHs0UmJPI2zUjw==} 338 | engines: {node: '>=18'} 339 | 340 | data-urls@5.0.0: 341 | resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} 342 | engines: {node: '>=18'} 343 | 344 | debug@4.4.0: 345 | resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} 346 | engines: {node: '>=6.0'} 347 | peerDependencies: 348 | supports-color: '*' 349 | peerDependenciesMeta: 350 | supports-color: 351 | optional: true 352 | 353 | decimal.js@10.5.0: 354 | resolution: {integrity: sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==} 355 | 356 | delayed-stream@1.0.0: 357 | resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} 358 | engines: {node: '>=0.4.0'} 359 | 360 | entities@4.5.0: 361 | resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} 362 | engines: {node: '>=0.12'} 363 | 364 | esbuild@0.24.2: 365 | resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} 366 | engines: {node: '>=18'} 367 | hasBin: true 368 | 369 | form-data@4.0.1: 370 | resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} 371 | engines: {node: '>= 6'} 372 | 373 | fsevents@2.3.3: 374 | resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} 375 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 376 | os: [darwin] 377 | 378 | html-encoding-sniffer@4.0.0: 379 | resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} 380 | engines: {node: '>=18'} 381 | 382 | http-proxy-agent@7.0.2: 383 | resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} 384 | engines: {node: '>= 14'} 385 | 386 | https-proxy-agent@7.0.6: 387 | resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} 388 | engines: {node: '>= 14'} 389 | 390 | iconv-lite@0.6.3: 391 | resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} 392 | engines: {node: '>=0.10.0'} 393 | 394 | is-potential-custom-element-name@1.0.1: 395 | resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} 396 | 397 | jsdom@25.0.1: 398 | resolution: {integrity: sha512-8i7LzZj7BF8uplX+ZyOlIz86V6TAsSs+np6m1kpW9u0JWi4z/1t+FzcK1aek+ybTnAC4KhBL4uXCNT0wcUIeCw==} 399 | engines: {node: '>=18'} 400 | peerDependencies: 401 | canvas: ^2.11.2 402 | peerDependenciesMeta: 403 | canvas: 404 | optional: true 405 | 406 | lru-cache@10.4.3: 407 | resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} 408 | 409 | mime-db@1.52.0: 410 | resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} 411 | engines: {node: '>= 0.6'} 412 | 413 | mime-types@2.1.35: 414 | resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} 415 | engines: {node: '>= 0.6'} 416 | 417 | ms@2.1.3: 418 | resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} 419 | 420 | nanoid@3.3.8: 421 | resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} 422 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} 423 | hasBin: true 424 | 425 | nwsapi@2.2.16: 426 | resolution: {integrity: sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ==} 427 | 428 | parse5@7.2.1: 429 | resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} 430 | 431 | picocolors@1.1.1: 432 | resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} 433 | 434 | postcss@8.5.1: 435 | resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} 436 | engines: {node: ^10 || ^12 || >=14} 437 | 438 | punycode@2.3.1: 439 | resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} 440 | engines: {node: '>=6'} 441 | 442 | rollup@4.34.4: 443 | resolution: {integrity: sha512-spF66xoyD7rz3o08sHP7wogp1gZ6itSq22SGa/IZTcUDXDlOyrShwMwkVSB+BUxFRZZCUYqdb3KWDEOMVQZxuw==} 444 | engines: {node: '>=18.0.0', npm: '>=8.0.0'} 445 | hasBin: true 446 | 447 | rrweb-cssom@0.7.1: 448 | resolution: {integrity: sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==} 449 | 450 | rrweb-cssom@0.8.0: 451 | resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} 452 | 453 | safer-buffer@2.1.2: 454 | resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} 455 | 456 | saxes@6.0.0: 457 | resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} 458 | engines: {node: '>=v12.22.7'} 459 | 460 | source-map-js@1.2.1: 461 | resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} 462 | engines: {node: '>=0.10.0'} 463 | 464 | symbol-tree@3.2.4: 465 | resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} 466 | 467 | tldts-core@6.1.76: 468 | resolution: {integrity: sha512-uzhJ02RaMzgQR3yPoeE65DrcHI6LoM4saUqXOt/b5hmb3+mc4YWpdSeAQqVqRUlQ14q8ZuLRWyBR1ictK1dzzg==} 469 | 470 | tldts@6.1.76: 471 | resolution: {integrity: sha512-6U2ti64/nppsDxQs9hw8ephA3nO6nSQvVVfxwRw8wLQPFtLI1cFI1a1eP22g+LUP+1TA2pKKjUTwWB+K2coqmQ==} 472 | hasBin: true 473 | 474 | tough-cookie@5.1.0: 475 | resolution: {integrity: sha512-rvZUv+7MoBYTiDmFPBrhL7Ujx9Sk+q9wwm22x8c8T5IJaR+Wsyc7TNxbVxo84kZoRJZZMazowFLqpankBEQrGg==} 476 | engines: {node: '>=16'} 477 | 478 | tr46@5.0.0: 479 | resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} 480 | engines: {node: '>=18'} 481 | 482 | vite@6.1.0: 483 | resolution: {integrity: sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==} 484 | engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} 485 | hasBin: true 486 | peerDependencies: 487 | '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 488 | jiti: '>=1.21.0' 489 | less: '*' 490 | lightningcss: ^1.21.0 491 | sass: '*' 492 | sass-embedded: '*' 493 | stylus: '*' 494 | sugarss: '*' 495 | terser: ^5.16.0 496 | tsx: ^4.8.1 497 | yaml: ^2.4.2 498 | peerDependenciesMeta: 499 | '@types/node': 500 | optional: true 501 | jiti: 502 | optional: true 503 | less: 504 | optional: true 505 | lightningcss: 506 | optional: true 507 | sass: 508 | optional: true 509 | sass-embedded: 510 | optional: true 511 | stylus: 512 | optional: true 513 | sugarss: 514 | optional: true 515 | terser: 516 | optional: true 517 | tsx: 518 | optional: true 519 | yaml: 520 | optional: true 521 | 522 | w3c-xmlserializer@5.0.0: 523 | resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} 524 | engines: {node: '>=18'} 525 | 526 | webidl-conversions@7.0.0: 527 | resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} 528 | engines: {node: '>=12'} 529 | 530 | whatwg-encoding@3.1.1: 531 | resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} 532 | engines: {node: '>=18'} 533 | 534 | whatwg-mimetype@4.0.0: 535 | resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} 536 | engines: {node: '>=18'} 537 | 538 | whatwg-url@14.1.0: 539 | resolution: {integrity: sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==} 540 | engines: {node: '>=18'} 541 | 542 | ws@8.18.0: 543 | resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} 544 | engines: {node: '>=10.0.0'} 545 | peerDependencies: 546 | bufferutil: ^4.0.1 547 | utf-8-validate: '>=5.0.2' 548 | peerDependenciesMeta: 549 | bufferutil: 550 | optional: true 551 | utf-8-validate: 552 | optional: true 553 | 554 | xml-name-validator@5.0.0: 555 | resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} 556 | engines: {node: '>=18'} 557 | 558 | xmlchars@2.2.0: 559 | resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} 560 | 561 | snapshots: 562 | 563 | '@asamuzakjp/css-color@2.8.3': 564 | dependencies: 565 | '@csstools/css-calc': 2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) 566 | '@csstools/css-color-parser': 3.0.7(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) 567 | '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) 568 | '@csstools/css-tokenizer': 3.0.3 569 | lru-cache: 10.4.3 570 | 571 | '@blockly/theme-dark@7.0.10(blockly@11.2.1)': 572 | dependencies: 573 | blockly: 11.2.1 574 | 575 | '@csstools/color-helpers@5.0.1': {} 576 | 577 | '@csstools/css-calc@2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': 578 | dependencies: 579 | '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) 580 | '@csstools/css-tokenizer': 3.0.3 581 | 582 | '@csstools/css-color-parser@3.0.7(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': 583 | dependencies: 584 | '@csstools/color-helpers': 5.0.1 585 | '@csstools/css-calc': 2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) 586 | '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) 587 | '@csstools/css-tokenizer': 3.0.3 588 | 589 | '@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3)': 590 | dependencies: 591 | '@csstools/css-tokenizer': 3.0.3 592 | 593 | '@csstools/css-tokenizer@3.0.3': {} 594 | 595 | '@esbuild/aix-ppc64@0.24.2': 596 | optional: true 597 | 598 | '@esbuild/android-arm64@0.24.2': 599 | optional: true 600 | 601 | '@esbuild/android-arm@0.24.2': 602 | optional: true 603 | 604 | '@esbuild/android-x64@0.24.2': 605 | optional: true 606 | 607 | '@esbuild/darwin-arm64@0.24.2': 608 | optional: true 609 | 610 | '@esbuild/darwin-x64@0.24.2': 611 | optional: true 612 | 613 | '@esbuild/freebsd-arm64@0.24.2': 614 | optional: true 615 | 616 | '@esbuild/freebsd-x64@0.24.2': 617 | optional: true 618 | 619 | '@esbuild/linux-arm64@0.24.2': 620 | optional: true 621 | 622 | '@esbuild/linux-arm@0.24.2': 623 | optional: true 624 | 625 | '@esbuild/linux-ia32@0.24.2': 626 | optional: true 627 | 628 | '@esbuild/linux-loong64@0.24.2': 629 | optional: true 630 | 631 | '@esbuild/linux-mips64el@0.24.2': 632 | optional: true 633 | 634 | '@esbuild/linux-ppc64@0.24.2': 635 | optional: true 636 | 637 | '@esbuild/linux-riscv64@0.24.2': 638 | optional: true 639 | 640 | '@esbuild/linux-s390x@0.24.2': 641 | optional: true 642 | 643 | '@esbuild/linux-x64@0.24.2': 644 | optional: true 645 | 646 | '@esbuild/netbsd-arm64@0.24.2': 647 | optional: true 648 | 649 | '@esbuild/netbsd-x64@0.24.2': 650 | optional: true 651 | 652 | '@esbuild/openbsd-arm64@0.24.2': 653 | optional: true 654 | 655 | '@esbuild/openbsd-x64@0.24.2': 656 | optional: true 657 | 658 | '@esbuild/sunos-x64@0.24.2': 659 | optional: true 660 | 661 | '@esbuild/win32-arm64@0.24.2': 662 | optional: true 663 | 664 | '@esbuild/win32-ia32@0.24.2': 665 | optional: true 666 | 667 | '@esbuild/win32-x64@0.24.2': 668 | optional: true 669 | 670 | '@kabelsalat/core@0.3.0': {} 671 | 672 | '@kabelsalat/lib@0.3.1': 673 | dependencies: 674 | '@kabelsalat/core': 0.3.0 675 | 676 | '@kabelsalat/web@0.3.2': 677 | dependencies: 678 | '@kabelsalat/core': 0.3.0 679 | '@kabelsalat/lib': 0.3.1 680 | 681 | '@rollup/rollup-android-arm-eabi@4.34.4': 682 | optional: true 683 | 684 | '@rollup/rollup-android-arm64@4.34.4': 685 | optional: true 686 | 687 | '@rollup/rollup-darwin-arm64@4.34.4': 688 | optional: true 689 | 690 | '@rollup/rollup-darwin-x64@4.34.4': 691 | optional: true 692 | 693 | '@rollup/rollup-freebsd-arm64@4.34.4': 694 | optional: true 695 | 696 | '@rollup/rollup-freebsd-x64@4.34.4': 697 | optional: true 698 | 699 | '@rollup/rollup-linux-arm-gnueabihf@4.34.4': 700 | optional: true 701 | 702 | '@rollup/rollup-linux-arm-musleabihf@4.34.4': 703 | optional: true 704 | 705 | '@rollup/rollup-linux-arm64-gnu@4.34.4': 706 | optional: true 707 | 708 | '@rollup/rollup-linux-arm64-musl@4.34.4': 709 | optional: true 710 | 711 | '@rollup/rollup-linux-loongarch64-gnu@4.34.4': 712 | optional: true 713 | 714 | '@rollup/rollup-linux-powerpc64le-gnu@4.34.4': 715 | optional: true 716 | 717 | '@rollup/rollup-linux-riscv64-gnu@4.34.4': 718 | optional: true 719 | 720 | '@rollup/rollup-linux-s390x-gnu@4.34.4': 721 | optional: true 722 | 723 | '@rollup/rollup-linux-x64-gnu@4.34.4': 724 | optional: true 725 | 726 | '@rollup/rollup-linux-x64-musl@4.34.4': 727 | optional: true 728 | 729 | '@rollup/rollup-win32-arm64-msvc@4.34.4': 730 | optional: true 731 | 732 | '@rollup/rollup-win32-ia32-msvc@4.34.4': 733 | optional: true 734 | 735 | '@rollup/rollup-win32-x64-msvc@4.34.4': 736 | optional: true 737 | 738 | '@types/estree@1.0.6': {} 739 | 740 | agent-base@7.1.3: {} 741 | 742 | asynckit@0.4.0: {} 743 | 744 | blockly@11.2.1: 745 | dependencies: 746 | jsdom: 25.0.1 747 | transitivePeerDependencies: 748 | - bufferutil 749 | - canvas 750 | - supports-color 751 | - utf-8-validate 752 | 753 | combined-stream@1.0.8: 754 | dependencies: 755 | delayed-stream: 1.0.0 756 | 757 | cssstyle@4.2.1: 758 | dependencies: 759 | '@asamuzakjp/css-color': 2.8.3 760 | rrweb-cssom: 0.8.0 761 | 762 | data-urls@5.0.0: 763 | dependencies: 764 | whatwg-mimetype: 4.0.0 765 | whatwg-url: 14.1.0 766 | 767 | debug@4.4.0: 768 | dependencies: 769 | ms: 2.1.3 770 | 771 | decimal.js@10.5.0: {} 772 | 773 | delayed-stream@1.0.0: {} 774 | 775 | entities@4.5.0: {} 776 | 777 | esbuild@0.24.2: 778 | optionalDependencies: 779 | '@esbuild/aix-ppc64': 0.24.2 780 | '@esbuild/android-arm': 0.24.2 781 | '@esbuild/android-arm64': 0.24.2 782 | '@esbuild/android-x64': 0.24.2 783 | '@esbuild/darwin-arm64': 0.24.2 784 | '@esbuild/darwin-x64': 0.24.2 785 | '@esbuild/freebsd-arm64': 0.24.2 786 | '@esbuild/freebsd-x64': 0.24.2 787 | '@esbuild/linux-arm': 0.24.2 788 | '@esbuild/linux-arm64': 0.24.2 789 | '@esbuild/linux-ia32': 0.24.2 790 | '@esbuild/linux-loong64': 0.24.2 791 | '@esbuild/linux-mips64el': 0.24.2 792 | '@esbuild/linux-ppc64': 0.24.2 793 | '@esbuild/linux-riscv64': 0.24.2 794 | '@esbuild/linux-s390x': 0.24.2 795 | '@esbuild/linux-x64': 0.24.2 796 | '@esbuild/netbsd-arm64': 0.24.2 797 | '@esbuild/netbsd-x64': 0.24.2 798 | '@esbuild/openbsd-arm64': 0.24.2 799 | '@esbuild/openbsd-x64': 0.24.2 800 | '@esbuild/sunos-x64': 0.24.2 801 | '@esbuild/win32-arm64': 0.24.2 802 | '@esbuild/win32-ia32': 0.24.2 803 | '@esbuild/win32-x64': 0.24.2 804 | 805 | form-data@4.0.1: 806 | dependencies: 807 | asynckit: 0.4.0 808 | combined-stream: 1.0.8 809 | mime-types: 2.1.35 810 | 811 | fsevents@2.3.3: 812 | optional: true 813 | 814 | html-encoding-sniffer@4.0.0: 815 | dependencies: 816 | whatwg-encoding: 3.1.1 817 | 818 | http-proxy-agent@7.0.2: 819 | dependencies: 820 | agent-base: 7.1.3 821 | debug: 4.4.0 822 | transitivePeerDependencies: 823 | - supports-color 824 | 825 | https-proxy-agent@7.0.6: 826 | dependencies: 827 | agent-base: 7.1.3 828 | debug: 4.4.0 829 | transitivePeerDependencies: 830 | - supports-color 831 | 832 | iconv-lite@0.6.3: 833 | dependencies: 834 | safer-buffer: 2.1.2 835 | 836 | is-potential-custom-element-name@1.0.1: {} 837 | 838 | jsdom@25.0.1: 839 | dependencies: 840 | cssstyle: 4.2.1 841 | data-urls: 5.0.0 842 | decimal.js: 10.5.0 843 | form-data: 4.0.1 844 | html-encoding-sniffer: 4.0.0 845 | http-proxy-agent: 7.0.2 846 | https-proxy-agent: 7.0.6 847 | is-potential-custom-element-name: 1.0.1 848 | nwsapi: 2.2.16 849 | parse5: 7.2.1 850 | rrweb-cssom: 0.7.1 851 | saxes: 6.0.0 852 | symbol-tree: 3.2.4 853 | tough-cookie: 5.1.0 854 | w3c-xmlserializer: 5.0.0 855 | webidl-conversions: 7.0.0 856 | whatwg-encoding: 3.1.1 857 | whatwg-mimetype: 4.0.0 858 | whatwg-url: 14.1.0 859 | ws: 8.18.0 860 | xml-name-validator: 5.0.0 861 | transitivePeerDependencies: 862 | - bufferutil 863 | - supports-color 864 | - utf-8-validate 865 | 866 | lru-cache@10.4.3: {} 867 | 868 | mime-db@1.52.0: {} 869 | 870 | mime-types@2.1.35: 871 | dependencies: 872 | mime-db: 1.52.0 873 | 874 | ms@2.1.3: {} 875 | 876 | nanoid@3.3.8: {} 877 | 878 | nwsapi@2.2.16: {} 879 | 880 | parse5@7.2.1: 881 | dependencies: 882 | entities: 4.5.0 883 | 884 | picocolors@1.1.1: {} 885 | 886 | postcss@8.5.1: 887 | dependencies: 888 | nanoid: 3.3.8 889 | picocolors: 1.1.1 890 | source-map-js: 1.2.1 891 | 892 | punycode@2.3.1: {} 893 | 894 | rollup@4.34.4: 895 | dependencies: 896 | '@types/estree': 1.0.6 897 | optionalDependencies: 898 | '@rollup/rollup-android-arm-eabi': 4.34.4 899 | '@rollup/rollup-android-arm64': 4.34.4 900 | '@rollup/rollup-darwin-arm64': 4.34.4 901 | '@rollup/rollup-darwin-x64': 4.34.4 902 | '@rollup/rollup-freebsd-arm64': 4.34.4 903 | '@rollup/rollup-freebsd-x64': 4.34.4 904 | '@rollup/rollup-linux-arm-gnueabihf': 4.34.4 905 | '@rollup/rollup-linux-arm-musleabihf': 4.34.4 906 | '@rollup/rollup-linux-arm64-gnu': 4.34.4 907 | '@rollup/rollup-linux-arm64-musl': 4.34.4 908 | '@rollup/rollup-linux-loongarch64-gnu': 4.34.4 909 | '@rollup/rollup-linux-powerpc64le-gnu': 4.34.4 910 | '@rollup/rollup-linux-riscv64-gnu': 4.34.4 911 | '@rollup/rollup-linux-s390x-gnu': 4.34.4 912 | '@rollup/rollup-linux-x64-gnu': 4.34.4 913 | '@rollup/rollup-linux-x64-musl': 4.34.4 914 | '@rollup/rollup-win32-arm64-msvc': 4.34.4 915 | '@rollup/rollup-win32-ia32-msvc': 4.34.4 916 | '@rollup/rollup-win32-x64-msvc': 4.34.4 917 | fsevents: 2.3.3 918 | 919 | rrweb-cssom@0.7.1: {} 920 | 921 | rrweb-cssom@0.8.0: {} 922 | 923 | safer-buffer@2.1.2: {} 924 | 925 | saxes@6.0.0: 926 | dependencies: 927 | xmlchars: 2.2.0 928 | 929 | source-map-js@1.2.1: {} 930 | 931 | symbol-tree@3.2.4: {} 932 | 933 | tldts-core@6.1.76: {} 934 | 935 | tldts@6.1.76: 936 | dependencies: 937 | tldts-core: 6.1.76 938 | 939 | tough-cookie@5.1.0: 940 | dependencies: 941 | tldts: 6.1.76 942 | 943 | tr46@5.0.0: 944 | dependencies: 945 | punycode: 2.3.1 946 | 947 | vite@6.1.0: 948 | dependencies: 949 | esbuild: 0.24.2 950 | postcss: 8.5.1 951 | rollup: 4.34.4 952 | optionalDependencies: 953 | fsevents: 2.3.3 954 | 955 | w3c-xmlserializer@5.0.0: 956 | dependencies: 957 | xml-name-validator: 5.0.0 958 | 959 | webidl-conversions@7.0.0: {} 960 | 961 | whatwg-encoding@3.1.1: 962 | dependencies: 963 | iconv-lite: 0.6.3 964 | 965 | whatwg-mimetype@4.0.0: {} 966 | 967 | whatwg-url@14.1.0: 968 | dependencies: 969 | tr46: 5.0.0 970 | webidl-conversions: 7.0.0 971 | 972 | ws@8.18.0: {} 973 | 974 | xml-name-validator@5.0.0: {} 975 | 976 | xmlchars@2.2.0: {} 977 | -------------------------------------------------------------------------------- /public/CNAME: -------------------------------------------------------------------------------- 1 | block.salat.dev -------------------------------------------------------------------------------- /public/assets/recorder-BokptUnY.js: -------------------------------------------------------------------------------- 1 | (function(){"use strict";class n extends AudioWorkletProcessor{static get parameterDescriptors(){return[{name:"isRecording",defaultValue:0}]}constructor(){super(),this._bufferSize=2048,this._buffer=new Float32Array(this._bufferSize),this._initBuffer()}_initBuffer(){this._bytesWritten=0}_isBufferEmpty(){return this._bytesWritten===0}_isBufferFull(){return this._bytesWritten===this._bufferSize}_appendToBuffer(e){this._isBufferFull()&&this._flush(),this._buffer[this._bytesWritten]=e,this._bytesWritten+=1}_flush(){let e=this._buffer;this._bytesWritten=1?s:t+n*(s-t)}function O(n,t,s){return n<=t?0:n>=s?1:s===t?0:(n-t)/(s-t)}function M(n,t){return n1-t?(n=(n-1)/t,n*n+n+n+1):0}function v(n,t){t=Math.min(Math.max(t,0),1),t-=.01;var s=2*t/(1-t),e=(1+s)*n/(1+s*Math.abs(n));return e}function p(n,t,s){return n>=1?s:t+n*(s-t)}function C(){this.state="off",this.startTime=0,this.startVal=0}C.prototype.eval=function(n,t,s,e,i,r){switch(this.state){case"off":return t>0&&(this.state="attack",this.startTime=n,this.startVal=0),0;case"attack":{let h=n-this.startTime;return h>s?(this.state="decay",this.startTime=n,1):p(h/s,this.startVal,1)}case"decay":{let h=n-this.startTime,a=p(h/e,1,i);return t<=0?(this.state="release",this.startTime=n,this.startVal=a,a):h>e?(this.state="sustain",this.startTime=n,i):a}case"sustain":return t<=0&&(this.state="release",this.startTime=n,this.startVal=i),i;case"release":{let h=n-this.startTime;if(h>r)return this.state="off",0;let a=p(h/r,this.startVal,0);return t>0&&(this.state="attack",this.startTime=n,this.startVal=a),a}}throw"invalid envelope state"};function f(){this.s0=0,this.s1=0}f.prototype.apply=function(n,t,s){c(!isNaN(n),"NaN value fed in TwoPoleFilter"),t=Math.min(t,1),s=Math.max(s,0);var e=Math.pow(.5,(1-t)/.125),i=Math.pow(.5,(s+.125)/.125),r=1-i*e,h=this.s0,a=this.s1;return h=r*h-e*a+e*n,a=r*a+e*h,n=a,this.s0=h,this.s1=a,n};let P=class y{constructor(t,s){this.sampleRate=t,s?this.buffer=s.slice(0):(this.buffer=new Float32Array(10*t),this.buffer.fill(0)),this.writeIdx=0,this.readIdx=0}reset(){this.buffer.fill(0),this.writeIdx=0,this.readIdx=0}clone(){const t=new y(this.sampleRate,this.buffer);return t.writeIdx=this.writeIdx,t.readIdx=this.readIdx,t}write(t,s){this.writeIdx=(this.writeIdx+1)%this.buffer.length,this.buffer[this.writeIdx]=t;let e=Math.min(Math.floor(this.sampleRate*s),this.buffer.length-1);this.readIdx=this.writeIdx-e,this.readIdx<0&&(this.readIdx+=this.buffer.length)}read(){return this.buffer[this.readIdx]}};const g=1/44100,m=24,x=m/4;class u{constructor(t,s,e,i){this.nodeId=t,this.state=s,this.sampleRate=e,this.sampleTime=1/e,this.send=i}setState(t){this.state=t}}class T extends u{constructor(t,s,e,i){super(t,s,e,i),this.env=new C}update(t,s,e,i,r,h){return this.env.eval(t,s,e,i,r,h)}}class I extends u{constructor(t,s,e,i){super(t,s,e,i),this.phase=0}update(t){let s=m*t/60,e=.5;return this.phase+=this.sampleTime*s,this.phase%10;return this.inSgn!=e&&(this.clockCnt++,this.clockCnt>=s&&(this.clockCnt=0,this.outSgn=!this.outSgn)),this.inSgn=e,this.outSgn?1:-1}}class E extends u{constructor(t,s,e,i){super(t,s,e,i),this.inSgn=!1}update(t,s){let e=s>0;return e&&this.inSgn!=e&&this.send({type:"CLOCK_PULSE",nodeId:this.nodeId,time:t}),this.inSgn=e,0}}const S=new Map;class N extends u{constructor(t,s,e,i){super(t,s,e,i);const r=s.inputs[2];r&&S.has(r)?this.delay=S.get(r).clone():this.delay=new P(e),r&&S.set(r,this.delay)}update(t,s){return this.delay.write(t,s),this.delay.read()}}class q extends u{constructor(t,s,e,i){super(t,s,e,i)}update(t,s){return v(t,s)}}class L extends u{constructor(t,s,e,i){super(t,s,e,i),this.value=0,this.trigSgn=!1}write(t,s){!this.trigSgn&&s>0&&(this.value=t),this.trigSgn=s>0}read(){return this.value}update(t,s){return this.write(t,s),this.read()}}class D{constructor(){this.value=0}update(t){return this.value=t,this.value}}class _{update(){return Math.random()*2-1}}class A{update(t){return Math.random()=1?1:0;return this.phase=this.phase%1,s}}class U extends u{constructor(t,s,e,i){super(t,s,e,i),this.phase=0}update(t,s){return this.phase+=this.sampleTime*t,this.phase%11&&(this.phase-=1),i}}class $ extends u{constructor(t,s,e,i){super(t,s,e,i),this.phase=0,this.syncSgn=!1}update(t,s,e){!this.syncSgn&&s>0&&(this.phase=0),this.syncSgn=s>0;let i=(this.phase+e)%1;return this.phase+=this.sampleTime*t,Math.sin(i*2*Math.PI)}}class K{dBToLinear(t){return Math.pow(10,t/20)}linearToDB(t){return 20*Math.log10(t)}update(t,s,e){let i=this.linearToDB(Math.abs(t)),r=0;return i>s&&(r=(i-s)*(1-1/e)),this.dBToLinear(-r)}}class H extends u{constructor(t,s,e,i){super(t,s,e,i),this.phase=0}update(t){this.phase+=this.sampleTime*t;let s=this.phase%1;return(s<.5?2*s:1-2*(s-.5))*2-1}}class W{constructor(){this.lagUnit=4410,this.s=0}update(t,s){return s=s*this.lagUnit,s<1&&(s=1),this.s+=1/s*(t-this.s),this.s}}class j{constructor(){this.last=0}update(t,s,e){const i=s*g,r=e*g;let h=t-this.last;return h>i?h=i:h<-r&&(h=-r),this.last+=h,this.last}}class Q extends u{constructor(t,s,e,i){super(t,s,e,i),this.s=0}update(t,s){return s=s*1e3,s<1&&(s=1),this.s+=1/s*(t-this.s),this.s}}class X extends u{constructor(t,s,e,i){super(t,s,e,i),this.filter=new f}update(t,s,e){return this.filter.apply(t,s,e),this.filter.s1}}class Y extends u{constructor(t,s,e,i){super(t,s,e,i),this.filter=new f}update(t,s,e){return this.filter.apply(t,s,e),this.filter.s0}}class Z extends u{constructor(t,s,e,i){super(t,s,e,i)}update(t,s){return s<0&&(s=0),s=s+1,t=t*s,4*(Math.abs(.25*t+.25-Math.round(.25*t+.25))-.25)}}class z extends u{update(t){return t}}class w extends u{constructor(t,s,e,i){super(t,s,e,i),this.note=0,this.freq=0,this.gateState="off",this.type="midiin",this.channel=-1}isFree(){return this.gateState==="off"}noteOn(t,s){s>0?(this.note=t,this.freq=2**((t-69)/12)*440,this.gateState="pretrig"):this.noteOff()}noteOff(){this.note=0,this.gateState="off"}getGate(){switch(this.gateState){case"pretrig":return this.gateState="on",0;case"on":return 1;case"off":return 0;default:c(!1)}}getFreq(){switch(this.gateState){case"pretrig":return this.gateState="on",0;case"on":return this.freq;case"off":return this.freq;default:c(!1)}}}class J extends w{constructor(t,s,e,i){super(t,s,e,i),this.type="midigate"}update(t){return this.channel=t,this.getGate()}}class tt extends w{constructor(t,s,e,i){super(t,s,e,i),this.type="midifreq"}update(t){return this.channel=t,this.getFreq()}}class st{constructor(t,s,e,i){this.up=!1,this.send=i,this.value=0,this.type="cc"}setValue(t){this.value=t}update(t,s,e){return this.id=s,!this.up&&t>0?(this.up=!0,this.send({type:"SIGNAL_TRIGGER",id:s,time:e}),this.value):(this.up=t>0,this.value)}}class et extends u{constructor(t,s,e,i){super(t,s,e,i),this.type="cc",this.value=s.inputs[1]??0}setValue(t){this.value=t}update(t){return this.id=t,this.value}}class it extends u{constructor(t,s,e,i){super(t,s,e,i),this.type="midicc",this.value=-1,this.channel=-1,this.ccnumber=-1}setValue(t){this.value=t}update(t,s){return this.ccnumber=t,this.channel=s,this.value}}class nt extends u{constructor(t,s,e,i){super(t,s,e,i),this.clockSgn=!0,this.step=0,this.first=!0}update(t,...s){return!this.clockSgn&&t>0?(this.step=(this.step+1)%s.length,this.clockSgn=t>0,0):(this.clockSgn=t>0,s[this.step])}}class rt extends u{update(t,...s){return s[Math.floor(t)%s.length]}}class ht{update(t,s,e,i,r){let h=O(t,s,e);return d(h,i,r)}}class at{update(t,s,e){return Math.min(Math.max(t,s),e)}}class ut{constructor(){this.hi=!1}update(t){return!this.hi&&t>0?(this.hi=!0,1):(this.hi&&t<=0&&(this.hi=!1),0)}}var lt=Object.freeze({__proto__:null,ADSRNode:T,AudioIn:z,AudioNode:u,BPF:Y,BrownNoiseOsc:F,CC:et,CLOCK_PPQ:m,CLOCK_PPS:x,Clip:at,Clock:I,ClockDiv:k,ClockOut:E,Delay:N,Distort:q,DustOsc:A,Filter:X,Fold:Z,Hold:L,ImpulseOsc:R,Lag:W,MidiCC:it,MidiFreq:tt,MidiGate:J,MidiIn:w,NoiseOsc:_,Output:D,Pick:rt,PinkNoise:G,PulseOsc:U,Remap:ht,SawOsc:B,Sequence:nt,SidechainCompressor:K,Signal:st,SineOsc:$,Slew:j,Slide:Q,TriOsc:H,Trig:ut,ZawOsc:V});const b=new Map(Object.entries(lt));class ot{constructor(t,s){c(t==44100),this.sampleRate=t,this.playPos=0,this.send=s,this.units=[],this.fadeTime=.1,this.q=[]}fadeOutLastUnit(){this.units.length&&this.units[this.units.length-1].fadeOut(this.playPos,this.fadeTime)}stop(){this.fadeOutLastUnit(),this.send({type:"STOP",fadeTime:this.fadeTime})}newUnit(t){const s=new ct(t,this.sampleRate,this.send);this.fadeOutLastUnit(),s.fadeIn(this.playPos,this.fadeTime),this.units=this.units.filter(e=>e.getLevel(this.playPos)>0),this.units.push(s),console.log(`${t.ugens.length} ugens spawned, ${this.units.length} units alive`)}parseMsg(t){switch(t.type){case"NEW_UNIT":this.newUnit(t.unit);break;case"NOTE_ON":this.noteOn(t);break;case"CC":this.midiCC(t);break;case"SET_CONTROL":this.setControl(t);break;case"FADE_TIME":this.fadeTime=Number(t.fadeTime);break;case"STOP":this.stop();break;case"SET_UGEN":this.addUgen(t.className,t.ugen);break;case"SCHEDULE_MSG":this.scheduleMessage(t);break;case"BATCH_MSG":t.messages.forEach(s=>this.parseMsg(s));break;default:throw new TypeError(`unknown message type ${t.type}`)}}noteOn(t){this.units.forEach(s=>s.noteOn(t))}midiCC(t){this.units.forEach(s=>s.midiCC(t))}setControl(t){this.units.forEach(s=>s.setControl(t))}scheduleMessage(t){if(t.time=this.playPos+t.time,!this.q.length){this.q.push(t);return}let s=0;for(;s0&&this.q[0].time<=this.playPos;)this.parseMsg(this.q[0].msg),this.q.shift();if(!this.units.length)return[0,0];const s=[0,0];for(let e=0;ea.type==="midifreq"&&(a.channel===-1||a.channel===s)),h=this.nodes.filter(a=>a.type==="midigate"&&(a.channel===-1||a.channel===s));if(i>0){let a=r.find(o=>o.isFree())||r[0],l=h.find(o=>o.isFree())||h[0];a?.noteOn(e,i),l?.noteOn(e,i)}else r.find(a=>a.note===e)?.noteOff(),h.find(a=>a.note===e)?.noteOff()}midiCC(t){const{channel:s,cc:e,value:i}=t;this.nodes.forEach(r=>{r.type==="midicc"&&(r.channel===-1||r.channel===s)&&r.ccnumber===e&&r.setValue(i)})}setControl(t){const{value:s,id:e}=t,i=this.nodes.find(r=>r.type==="cc"&&r.id===e);i&&i.setValue(s)}fadeIn(t,s){const e=t,i=t+s;this.getLevel=r=>d((r-e)/(i-e),0,.3)}fadeOut(t,s){const e=t,i=t+s,r=this.getLevel(t);this.getLevel=h=>d((h-e)/(i-e),r,0)}}class dt extends AudioWorkletProcessor{constructor(){super(),this.port.onmessage=this.onmessage.bind(this),this.audioGraph=new ot(44100,this.port.postMessage.bind(this.port))}onmessage(t){let s=t.data;this.audioGraph.parseMsg(s)}process(t,s,e){const i=s[0],r=t[0][0],h=i[0],a=i[1];for(let l=0;l div { 129 | overflow: hidden; 130 | /* max-width: 100%; */ 131 | max-width: 800px; 132 | } 133 | .injectionDiv.readonly { 134 | touch-action: inherit; 135 | } 136 | } 137 | 138 | .blocklyToolboxDiv { 139 | padding: 10px; 140 | } 141 | 142 | .playtoggle, 143 | .edittoggle { 144 | cursor: pointer; 145 | position: absolute; 146 | border-radius: 100%; 147 | z-index: 1000; 148 | color: black; 149 | background-color: #eee; 150 | border: 1px solid black; 151 | width: 42px; 152 | height: 42px; 153 | display: flex; 154 | justify-content: center; 155 | align-items: center; 156 | user-select: none; 157 | &.big { 158 | width: 64px; 159 | height: 64px; 160 | } 161 | } 162 | 163 | .playtoggle { 164 | top: 10px; 165 | right: 10px; 166 | } 167 | .edittoggle { 168 | top: 60px; 169 | right: 10px; 170 | } 171 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | 3 | export default defineConfig({ 4 | build: { 5 | rollupOptions: { 6 | input: { 7 | main: "index.html", 8 | learn: "learn/index.html", 9 | }, 10 | }, 11 | }, 12 | }); 13 | --------------------------------------------------------------------------------