@kubohiroya/turbowarp-plus-editor-project-folder 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ja.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.md)
4
4
 
5
- TurboWarp Plus Editor で既存の sb3-toolchain v1 の作品フォルダを開き、保存するパッケージです。ディレクトリハンドルから作品 JSON とローカルの画像・音声を読み込みます。保存時は外部変更を確認してから、選んだフォルダの `project.source.json` を更新します。
5
+ TurboWarp Plus Editor で sb3-toolchain の作品フォルダ(展開ソース形式 1 と 2)を開き、保存するパッケージです。ディレクトリハンドルから作品 JSON とローカルの画像・音声を読み込みます。保存時は外部変更を確認してから、選んだフォルダの `project.source.json` を更新します。
6
6
 
7
7
  ## 接続
8
8
 
@@ -16,6 +16,14 @@ TurboWarp Plus Editor で既存の sb3-toolchain v1 の作品フォルダを開
16
16
 
17
17
  システムフォントと Web フォントの参照は作品データに保持し、埋め込みフォントは `assets/` に保存します。 [Editor #495](https://github.com/kubohiroya/turbowarp-plus-editor/issues/495)
18
18
 
19
+ ## ブロックパレットの設定
20
+
21
+ 展開ソース形式 2 の作品フォルダは、スプライト・背景ごとのブロックパレットの設定を `block-palette.json` に持ちます([sb3-toolchain の形式 v2](https://github.com/kubohiroya/sb3-toolchain/blob/main/docs/ja/source-format-v2.md))。開くときは、`project.source.json` のコメントにある参照 `block-palette:block-palette.json` を、SB3 と同じパレット設定のコメントの本文に戻して VM に読み込みます。
22
+
23
+ 保存時は、VM にあるパレット設定のコメントを `block-palette.json` に移し、`project.source.json` のコメントを参照に戻します。スプライトの名前を変えると、設定のキーも新しい名前になります。パレットの設定だけを変えたときは、`block-palette.json` だけを書きます。設定のある作品は形式 2、ない作品は形式 1 で保存します。形式 1 から 2 に移るときは `block-palette.json` を先に書き、2 から 1 に戻るときは `sb3-source.json` と作品データを書いてから `block-palette.json` を消します。変換には sb3-toolchain のブラウザー向けの関数を使い、toolchain の `build` と `import` が作る内容とバイト単位で同じにします。
24
+
25
+ フォルダの外で `block-palette.json` が変わったときは、構造の変更として **作品全体を再読み込み** を待ちます。形式 1・2 以外の版や、`sb3-source.json` と `block-palette.json` と参照が食い違う作品フォルダは開きません。
26
+
19
27
  ## 拡張機能
20
28
 
21
29
  埋め込み拡張の参照は、フォルダを開く際に `extensions/<id>.js` の内容とマニフェストから data URL に復元します。URL で指定されたカスタム拡張も、Editor の既存の許可画面を経て読み込みます。 `turboWarpPlus` のマニフェストとカスタムフォントを含む作品フォルダは対象外です。 [Editor #496](https://github.com/kubohiroya/turbowarp-plus-editor/issues/496)
@@ -31,7 +39,7 @@ TurboWarp Plus Editor で既存の sb3-toolchain v1 の作品フォルダを開
31
39
  - `ProjectFolderExplorer` は `directory`(作品フォルダまたはリポジトリのルート)を表示します。フォルダは開いたときに読み込み、ファイルより先に並べます。`.git` と `.tw-plus` は表示しません。フォルダーごとの開いたフォルダーと選択中の項目はページの中で保持するので、横のパネルを開き直すと、前と同じツリーに戻ります。矢印キー・Home・End で移動と開閉をします。ファイルで Enter・Space を押すかクリックすると `onOpen({path, name, kind})` を呼びます。props は `directory`、`locale`(`ja…` で日本語、それ以外は英語)、`descriptions` と `marks`(Git の状態: `added`・`modified`・`deleted`・`untracked`、どちらも `directory` からの相対パスがキー)、`onOpen`、`label`(ツリーのアクセシブルな名前)です。読み込めないフォルダは、ツリーの中にメッセージを表示します。
32
40
  - `renderProjectFolderExplorer(createElement, {vm, locale, marks})` は、`vm` で開いているプロジェクトフォルダのツリーを Editor の横のパネル向けに描きます。説明はフォルダの `project.source.json` と `sb3-source.json` から作り、保存のたびに読み直します。`marks(directory, update)` はそのフォルダの印を追い、止める関数を返します(Git パッケージの `followChangeMarks` など)。フォルダを開いていないときは **プロジェクトフォルダを開く…** を出し、`vm` にプロジェクトフォルダを組み込んでいないときは何も描きません。`followProjectFolder(vm, listener)` は、組み込んだフォルダと開いているディレクトリの変化を知らせます。
33
41
  - 各行には文字色で描いたアイコンが付きます。開いた・閉じたフォルダ、作品データ(`project.source.json`・`sb3-source.json`)、JSON、画像、音、コード(`.js`・`.mjs`・`.ts`)、テキスト(`.md`・`.txt`)、その他のファイルです。画像(`.svg`・`.png`・`.jpg`・`.jpeg`・`.gif`・`.bmp`・`.webp`)は、行が画面に入るとサムネイルを表示します。2 MiB を超えるファイルと読み込めない画像はアイコンのままです。サムネイルは装飾用の `<img>` で、オブジェクト URL は行がなくなると解放します。
34
- - `describeProjectFolder(project, locale, {manifest, folder})` は `descriptions` を作ります。`project.source.json`・`sb3-source.json`・`embedded-extensions.json` の説明と、各アセットのファイルを使うコスチューム・背景・音を返します。`manifest` から `assetsDirectory` を読みます。`folder` はツリーのルートから見た作品フォルダのパスです。
42
+ - `describeProjectFolder(project, locale, {manifest, folder})` は `descriptions` を作ります。`project.source.json`・`sb3-source.json`・`embedded-extensions.json`(形式 2 では `block-palette.json` も)の説明と、各アセットのファイルを使うコスチューム・背景・音を返します。`manifest` から `assetsDirectory` を読みます。`folder` はツリーのルートから見た作品フォルダのパスです。
35
43
 
36
44
  読み取り専用です。ファイルの作成・削除・名前の変更はできません。文字入力による検索もありません。
37
45
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [日本語](README.ja.md)
4
4
 
5
- This package opens and saves existing sb3-toolchain v1 project folders in TurboWarp Plus Editor. It loads the project JSON and local image and audio assets directly from a directory handle. Saving updates `project.source.json` in the selected folder and checks the source for external changes before writing.
5
+ This package opens and saves sb3-toolchain project folders (source formats 1 and 2) in TurboWarp Plus Editor. It loads the project JSON and local image and audio assets directly from a directory handle. Saving updates `project.source.json` in the selected folder and checks the source for external changes before writing.
6
6
 
7
7
  ## Integration
8
8
 
@@ -18,6 +18,14 @@ The project file keeps system and web font references. Embedded font files are s
18
18
 
19
19
  Folders can contain embedded extension scripts and custom extension URLs. Opening a folder restores embedded scripts as data URLs and uses the Editor's extension review. Saving preserves unchanged extension files and metadata, and reports when replacing a script removes its recorded source. See [拡張機能](README.ja.md#拡張機能).
20
20
 
21
+ ## Block palette settings
22
+
23
+ A source format 2 folder keeps per-sprite and stage block palette settings in `block-palette.json` (see [sb3-toolchain source format v2](https://github.com/kubohiroya/sb3-toolchain/blob/main/docs/source-format-v2.md)). Opening the folder turns each `block-palette:block-palette.json` comment reference in `project.source.json` back into the palette comment text an SB3 has, and the VM loads that.
24
+
25
+ Saving moves the VM's palette comments into `block-palette.json` and puts the references back in `project.source.json`. A renamed sprite keeps its settings under the new name. A change to palette settings alone writes only `block-palette.json`. A project with settings is saved as format 2, and one without as format 1: moving to format 2 writes `block-palette.json` first, and moving back deletes it after `sb3-source.json` and the project file are written. The conversion uses sb3-toolchain's browser functions, so the files match what the toolchain's `build` and `import` produce, byte for byte.
26
+
27
+ A change to `block-palette.json` outside the Editor is a structural change that waits for **Reload Whole Project**. Folders of other format versions, or whose `sb3-source.json`, `block-palette.json` and references disagree, are not opened.
28
+
21
29
  ## Folder explorer
22
30
 
23
31
  The `./explorer` entry (`@kubohiroya/turbowarp-plus-editor-project-folder/explorer`) is a tree of a folder for the Editor's side panel, built on [Headless Tree](https://headless-tree.lukasbach.com/), which is bundled. It renders with the host's React 16.14–18 (an optional peer dependency); the main entry does not use React.
@@ -25,7 +33,7 @@ The `./explorer` entry (`@kubohiroya/turbowarp-plus-editor-project-folder/explor
25
33
  - `ProjectFolderExplorer` shows `directory` (a project folder or a repository root). Folders load when expanded and sort before files, and `.git` and `.tw-plus` are hidden. The expanded folders and the selected entry of each folder are kept for the page, so the tree comes back as it was when the side panel shows it again. Arrow keys, Home and End move and expand; Enter, Space or a click on a file calls `onOpen({path, name, kind})`. Props: `directory`, `locale` (`ja…` for Japanese, otherwise English), `descriptions` and `marks` (Git status: `added`, `modified`, `deleted` or `untracked`), both keyed by the path relative to `directory`, `onOpen` and `label` (the tree's accessible name). A folder that cannot be read shows a message in the tree.
26
34
  - `renderProjectFolderExplorer(createElement, {vm, locale, marks})` renders that explorer on the project folder open for `vm`, for the Editor's side panel, with descriptions from the folder's `project.source.json` and `sb3-source.json` (read again after each save). `marks(directory, update)` follows marks for the directory and returns the function that stops it, such as the Git package's `followChangeMarks`. With no folder open it offers **Open Project Folder…**; it renders nothing while no project folder is mounted for `vm`. `followProjectFolder(vm, listener)` reports the mounted folder and its open directory as they change.
27
35
  - Each row has an icon drawn in the text color: an open or closed folder, project data (`project.source.json`, `sb3-source.json`), JSON, image, sound, code (`.js`, `.mjs`, `.ts`), text (`.md`, `.txt`) or another file. Images (`.svg`, `.png`, `.jpg`, `.jpeg`, `.gif`, `.bmp`, `.webp`) show a thumbnail once their row is on screen; files over 2 MiB, and images that cannot be read, keep the icon. Thumbnails are decorative `<img>` elements from object URLs, which are revoked when the row goes away.
28
- - `describeProjectFolder(project, locale, {manifest, folder})` builds `descriptions`: what `project.source.json`, `sb3-source.json` and `embedded-extensions.json` are, and which costumes, backdrops and sounds use each asset file. `manifest` supplies `assetsDirectory`; `folder` is the project folder's path under the tree's root.
36
+ - `describeProjectFolder(project, locale, {manifest, folder})` builds `descriptions`: what `project.source.json`, `sb3-source.json` and `embedded-extensions.json` (and `block-palette.json` in format 2) are, and which costumes, backdrops and sounds use each asset file. `manifest` supplies `assetsDirectory`; `folder` is the project folder's path under the tree's root.
29
37
 
30
38
  The explorer only reads. It does not create, delete or rename files, and has no type-ahead search.
31
39
 
@@ -390,6 +390,382 @@ THE SOFTWARE.
390
390
 
391
391
  ## @headless-tree/react - 1.8.0 (MIT)
392
392
 
393
+ ## @kubohiroya/sb3-toolchain - 0.25.1 (MPL-2.0)
394
+
395
+ Mozilla Public License Version 2.0
396
+ ==================================
397
+
398
+ 1. Definitions
399
+ --------------
400
+
401
+ 1.1. "Contributor"
402
+ means each individual or legal entity that creates, contributes to
403
+ the creation of, or owns Covered Software.
404
+
405
+ 1.2. "Contributor Version"
406
+ means the combination of the Contributions of others (if any) used
407
+ by a Contributor and that particular Contributor's Contribution.
408
+
409
+ 1.3. "Contribution"
410
+ means Covered Software of a particular Contributor.
411
+
412
+ 1.4. "Covered Software"
413
+ means Source Code Form to which the initial Contributor has attached
414
+ the notice in Exhibit A, the Executable Form of such Source Code
415
+ Form, and Modifications of such Source Code Form, in each case
416
+ including portions thereof.
417
+
418
+ 1.5. "Incompatible With Secondary Licenses"
419
+ means
420
+
421
+ (a) that the initial Contributor has attached the notice described
422
+ in Exhibit B to the Covered Software; or
423
+
424
+ (b) that the Covered Software was made available under the terms of
425
+ version 1.1 or earlier of the License, but not also under the
426
+ terms of a Secondary License.
427
+
428
+ 1.6. "Executable Form"
429
+ means any form of the work other than Source Code Form.
430
+
431
+ 1.7. "Larger Work"
432
+ means a work that combines Covered Software with other material, in
433
+ a separate file or files, that is not Covered Software.
434
+
435
+ 1.8. "License"
436
+ means this document.
437
+
438
+ 1.9. "Licensable"
439
+ means having the right to grant, to the maximum extent possible,
440
+ whether at the time of the initial grant or subsequently, any and
441
+ all of the rights conveyed by this License.
442
+
443
+ 1.10. "Modifications"
444
+ means any of the following:
445
+
446
+ (a) any file in Source Code Form that results from an addition to,
447
+ deletion from, or modification of the contents of Covered
448
+ Software; or
449
+
450
+ (b) any new file in Source Code Form that contains any Covered
451
+ Software.
452
+
453
+ 1.11. "Patent Claims" of a Contributor
454
+ means any patent claim(s), including without limitation, method,
455
+ process, and apparatus claims, in any patent Licensable by such
456
+ Contributor that would be infringed, but for the grant of the
457
+ License, by the making, using, selling, offering for sale, having
458
+ made, import, or transfer of either its Contributions or its
459
+ Contributor Version.
460
+
461
+ 1.12. "Secondary License"
462
+ means either the GNU General Public License, Version 2.0, the GNU
463
+ Lesser General Public License, Version 2.1, the GNU Affero General
464
+ Public License, Version 3.0, or any later versions of those
465
+ licenses.
466
+
467
+ 1.13. "Source Code Form"
468
+ means the form of the work preferred for making modifications.
469
+
470
+ 1.14. "You" (or "Your")
471
+ means an individual or a legal entity exercising rights under this
472
+ License. For legal entities, "You" includes any entity that
473
+ controls, is controlled by, or is under common control with You. For
474
+ purposes of this definition, "control" means (a) the power, direct
475
+ or indirect, to cause the direction or management of such entity,
476
+ whether by contract or otherwise, or (b) ownership of more than
477
+ fifty percent (50%) of the outstanding shares or beneficial
478
+ ownership of such entity.
479
+
480
+ 2. License Grants and Conditions
481
+ --------------------------------
482
+
483
+ 2.1. Grants
484
+
485
+ Each Contributor hereby grants You a world-wide, royalty-free,
486
+ non-exclusive license:
487
+
488
+ (a) under intellectual property rights (other than patent or trademark)
489
+ Licensable by such Contributor to use, reproduce, make available,
490
+ modify, display, perform, distribute, and otherwise exploit its
491
+ Contributions, either on an unmodified basis, with Modifications, or
492
+ as part of a Larger Work; and
493
+
494
+ (b) under Patent Claims of such Contributor to make, use, sell, offer
495
+ for sale, have made, import, and otherwise transfer either its
496
+ Contributions or its Contributor Version.
497
+
498
+ 2.2. Effective Date
499
+
500
+ The licenses granted in Section 2.1 with respect to any Contribution
501
+ become effective for each Contribution on the date the Contributor first
502
+ distributes such Contribution.
503
+
504
+ 2.3. Limitations on Grant Scope
505
+
506
+ The licenses granted in this Section 2 are the only rights granted under
507
+ this License. No additional rights or licenses will be implied from the
508
+ distribution or licensing of Covered Software under this License.
509
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
510
+ Contributor:
511
+
512
+ (a) for any code that a Contributor has removed from Covered Software;
513
+ or
514
+
515
+ (b) for infringements caused by: (i) Your and any other third party's
516
+ modifications of Covered Software, or (ii) the combination of its
517
+ Contributions with other software (except as part of its Contributor
518
+ Version); or
519
+
520
+ (c) under Patent Claims infringed by Covered Software in the absence of
521
+ its Contributions.
522
+
523
+ This License does not grant any rights in the trademarks, service marks,
524
+ or logos of any Contributor (except as may be necessary to comply with
525
+ the notice requirements in Section 3.4).
526
+
527
+ 2.4. Subsequent Licenses
528
+
529
+ No Contributor makes additional grants as a result of Your choice to
530
+ distribute the Covered Software under a subsequent version of this
531
+ License (see Section 10.2) or under the terms of a Secondary License (if
532
+ permitted under the terms of Section 3.3).
533
+
534
+ 2.5. Representation
535
+
536
+ Each Contributor represents that the Contributor believes its
537
+ Contributions are its original creation(s) or it has sufficient rights
538
+ to grant the rights to its Contributions conveyed by this License.
539
+
540
+ 2.6. Fair Use
541
+
542
+ This License is not intended to limit any rights You have under
543
+ applicable copyright doctrines of fair use, fair dealing, or other
544
+ equivalents.
545
+
546
+ 2.7. Conditions
547
+
548
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
549
+ in Section 2.1.
550
+
551
+ 3. Responsibilities
552
+ -------------------
553
+
554
+ 3.1. Distribution of Source Form
555
+
556
+ All distribution of Covered Software in Source Code Form, including any
557
+ Modifications that You create or to which You contribute, must be under
558
+ the terms of this License. You must inform recipients that the Source
559
+ Code Form of the Covered Software is governed by the terms of this
560
+ License, and how they can obtain a copy of this License. You may not
561
+ attempt to alter or restrict the recipients' rights in the Source Code
562
+ Form.
563
+
564
+ 3.2. Distribution of Executable Form
565
+
566
+ If You distribute Covered Software in Executable Form then:
567
+
568
+ (a) such Covered Software must also be made available in Source Code
569
+ Form, as described in Section 3.1, and You must inform recipients of
570
+ the Executable Form how they can obtain a copy of such Source Code
571
+ Form by reasonable means in a timely manner, at a charge no more
572
+ than the cost of distribution to the recipient; and
573
+
574
+ (b) You may distribute such Executable Form under the terms of this
575
+ License, or sublicense it under different terms, provided that the
576
+ license for the Executable Form does not attempt to limit or alter
577
+ the recipients' rights in the Source Code Form under this License.
578
+
579
+ 3.3. Distribution of a Larger Work
580
+
581
+ You may create and distribute a Larger Work under terms of Your choice,
582
+ provided that You also comply with the requirements of this License for
583
+ the Covered Software. If the Larger Work is a combination of Covered
584
+ Software with a work governed by one or more Secondary Licenses, and the
585
+ Covered Software is not Incompatible With Secondary Licenses, this
586
+ License permits You to additionally distribute such Covered Software
587
+ under the terms of such Secondary License(s), so that the recipient of
588
+ the Larger Work may, at their option, further distribute the Covered
589
+ Software under the terms of either this License or such Secondary
590
+ License(s).
591
+
592
+ 3.4. Notices
593
+
594
+ You may not remove or alter the substance of any license notices
595
+ (including copyright notices, patent notices, disclaimers of warranty,
596
+ or limitations of liability) contained within the Source Code Form of
597
+ the Covered Software, except that You may alter any license notices to
598
+ the extent required to remedy known factual inaccuracies.
599
+
600
+ 3.5. Application of Additional Terms
601
+
602
+ You may choose to offer, and to charge a fee for, warranty, support,
603
+ indemnity or liability obligations to one or more recipients of Covered
604
+ Software. However, You may do so only on Your own behalf, and not on
605
+ behalf of any Contributor. You must make it absolutely clear that any
606
+ such warranty, support, indemnity, or liability obligation is offered by
607
+ You alone, and You hereby agree to indemnify every Contributor for any
608
+ liability incurred by such Contributor as a result of warranty, support,
609
+ indemnity or liability terms You offer. You may include additional
610
+ disclaimers of warranty and limitations of liability specific to any
611
+ jurisdiction.
612
+
613
+ 4. Inability to Comply Due to Statute or Regulation
614
+ ---------------------------------------------------
615
+
616
+ If it is impossible for You to comply with any of the terms of this
617
+ License with respect to some or all of the Covered Software due to
618
+ statute, judicial order, or regulation then You must: (a) comply with
619
+ the terms of this License to the maximum extent possible; and (b)
620
+ describe the limitations and the code they affect. Such description must
621
+ be placed in a text file included with all distributions of the Covered
622
+ Software under this License. Except to the extent prohibited by statute
623
+ or regulation, such description must be sufficiently detailed for a
624
+ recipient of ordinary skill to be able to understand it.
625
+
626
+ 5. Termination
627
+ --------------
628
+
629
+ 5.1. The rights granted under this License will terminate automatically
630
+ if You fail to comply with any of its terms. However, if You become
631
+ compliant, then the rights granted under this License from a particular
632
+ Contributor are reinstated (a) provisionally, unless and until such
633
+ Contributor explicitly and finally terminates Your grants, and (b) on an
634
+ ongoing basis, if such Contributor fails to notify You of the
635
+ non-compliance by some reasonable means prior to 60 days after You have
636
+ come back into compliance. Moreover, Your grants from a particular
637
+ Contributor are reinstated on an ongoing basis if such Contributor
638
+ notifies You of the non-compliance by some reasonable means, this is the
639
+ first time You have received notice of non-compliance with this License
640
+ from such Contributor, and You become compliant prior to 30 days after
641
+ Your receipt of the notice.
642
+
643
+ 5.2. If You initiate litigation against any entity by asserting a patent
644
+ infringement claim (excluding declaratory judgment actions,
645
+ counter-claims, and cross-claims) alleging that a Contributor Version
646
+ directly or indirectly infringes any patent, then the rights granted to
647
+ You by any and all Contributors for the Covered Software under Section
648
+ 2.1 of this License shall terminate.
649
+
650
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
651
+ end user license agreements (excluding distributors and resellers) which
652
+ have been validly granted by You or Your distributors under this License
653
+ prior to termination shall survive termination.
654
+
655
+ ************************************************************************
656
+ * *
657
+ * 6. Disclaimer of Warranty *
658
+ * ------------------------- *
659
+ * *
660
+ * Covered Software is provided under this License on an "as is" *
661
+ * basis, without warranty of any kind, either expressed, implied, or *
662
+ * statutory, including, without limitation, warranties that the *
663
+ * Covered Software is free of defects, merchantable, fit for a *
664
+ * particular purpose or non-infringing. The entire risk as to the *
665
+ * quality and performance of the Covered Software is with You. *
666
+ * Should any Covered Software prove defective in any respect, You *
667
+ * (not any Contributor) assume the cost of any necessary servicing, *
668
+ * repair, or correction. This disclaimer of warranty constitutes an *
669
+ * essential part of this License. No use of any Covered Software is *
670
+ * authorized under this License except under this disclaimer. *
671
+ * *
672
+ ************************************************************************
673
+
674
+ ************************************************************************
675
+ * *
676
+ * 7. Limitation of Liability *
677
+ * -------------------------- *
678
+ * *
679
+ * Under no circumstances and under no legal theory, whether tort *
680
+ * (including negligence), contract, or otherwise, shall any *
681
+ * Contributor, or anyone who distributes Covered Software as *
682
+ * permitted above, be liable to You for any direct, indirect, *
683
+ * special, incidental, or consequential damages of any character *
684
+ * including, without limitation, damages for lost profits, loss of *
685
+ * goodwill, work stoppage, computer failure or malfunction, or any *
686
+ * and all other commercial damages or losses, even if such party *
687
+ * shall have been informed of the possibility of such damages. This *
688
+ * limitation of liability shall not apply to liability for death or *
689
+ * personal injury resulting from such party's negligence to the *
690
+ * extent applicable law prohibits such limitation. Some *
691
+ * jurisdictions do not allow the exclusion or limitation of *
692
+ * incidental or consequential damages, so this exclusion and *
693
+ * limitation may not apply to You. *
694
+ * *
695
+ ************************************************************************
696
+
697
+ 8. Litigation
698
+ -------------
699
+
700
+ Any litigation relating to this License may be brought only in the
701
+ courts of a jurisdiction where the defendant maintains its principal
702
+ place of business and such litigation shall be governed by laws of that
703
+ jurisdiction, without reference to its conflict-of-law provisions.
704
+ Nothing in this Section shall prevent a party's ability to bring
705
+ cross-claims or counter-claims.
706
+
707
+ 9. Miscellaneous
708
+ ----------------
709
+
710
+ This License represents the complete agreement concerning the subject
711
+ matter hereof. If any provision of this License is held to be
712
+ unenforceable, such provision shall be reformed only to the extent
713
+ necessary to make it enforceable. Any law or regulation which provides
714
+ that the language of a contract shall be construed against the drafter
715
+ shall not be used to construe this License against a Contributor.
716
+
717
+ 10. Versions of the License
718
+ ---------------------------
719
+
720
+ 10.1. New Versions
721
+
722
+ Mozilla Foundation is the license steward. Except as provided in Section
723
+ 10.3, no one other than the license steward has the right to modify or
724
+ publish new versions of this License. Each version will be given a
725
+ distinguishing version number.
726
+
727
+ 10.2. Effect of New Versions
728
+
729
+ You may distribute the Covered Software under the terms of the version
730
+ of the License under which You originally received the Covered Software,
731
+ or under the terms of any subsequent version published by the license
732
+ steward.
733
+
734
+ 10.3. Modified Versions
735
+
736
+ If you create software not governed by this License, and you want to
737
+ create a new license for such software, you may create and use a
738
+ modified version of this License if you rename the license and remove
739
+ any references to the name of the license steward (except to note that
740
+ such modified license differs from this License).
741
+
742
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary
743
+ Licenses
744
+
745
+ If You choose to distribute Source Code Form that is Incompatible With
746
+ Secondary Licenses under the terms of this version of the License, the
747
+ notice described in Exhibit B of this License must be attached.
748
+
749
+ Exhibit A - Source Code Form License Notice
750
+ -------------------------------------------
751
+
752
+ This Source Code Form is subject to the terms of the Mozilla Public
753
+ License, v. 2.0. If a copy of the MPL was not distributed with this
754
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
755
+
756
+ If it is not possible or desirable to put the notice in a particular
757
+ file, then You may include the notice in a location (such as a LICENSE
758
+ file in a relevant directory) where a recipient would be likely to look
759
+ for such a notice.
760
+
761
+ You may add additional accurate notices of copyright ownership.
762
+
763
+ Exhibit B - "Incompatible With Secondary Licenses" Notice
764
+ ---------------------------------------------------------
765
+
766
+ This Source Code Form is "Incompatible With Secondary Licenses", as
767
+ defined by the Mozilla Public License, v. 2.0.
768
+
393
769
  ## @lezer/common - 1.5.5 (MIT)
394
770
 
395
771
  MIT License
package/dist/explorer.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as projectFile, M as _objectSpread2, N as _asyncIterator, b as isObject, c as subscribeExplorerState, f as projectFolderOverwriteWarning, i as hiddenEntry, l as writeExplorerState, o as readExplorerState, p as FolderError, t as followProjectFolder, x as manifestFile } from "./shared-zlHgCKDG.js";
1
+ import { A as projectFile, C as isObject, F as _asyncIterator, L as _objectSpread2, c as subscribeExplorerState, f as projectFolderOverwriteWarning, i as hiddenEntry, l as writeExplorerState, o as readExplorerState, p as FolderError, t as followProjectFolder, w as manifestFile } from "./shared-tZS90T71.js";
2
2
  import * as React from "react";
3
3
  import { useEffect, useState } from "react";
4
4
  import { createPortal } from "react-dom";
@@ -1420,7 +1420,7 @@ function createFilePreview(directory, documentId, { name, path }, locale, readBa
1420
1420
  status.textContent = message.large;
1421
1421
  return;
1422
1422
  }
1423
- const [bytes, { decodeText, mountTextFile }] = await Promise.all([file.arrayBuffer(), import("./shared-teFlHQ2X.js")]);
1423
+ const [bytes, { decodeText, mountTextFile }] = await Promise.all([file.arrayBuffer(), import("./shared-BKa_B85G.js")]);
1424
1424
  if (disposed) return;
1425
1425
  const content = decodeText(bytes);
1426
1426
  if (content === null) {
@@ -1506,6 +1506,7 @@ var messages = {
1506
1506
  project: "Project data",
1507
1507
  manifest: "Folder manifest",
1508
1508
  extensions: "Embedded extensions",
1509
+ palette: "Block palette settings",
1509
1510
  assetsDirectory: "Costume and sound files",
1510
1511
  extensionsDirectory: "Extension files",
1511
1512
  costume: (sprite, name) => `${sprite} · costume ${name}`,
@@ -1544,6 +1545,7 @@ var messages = {
1544
1545
  project: "作品データ",
1545
1546
  manifest: "作品フォルダの目録",
1546
1547
  extensions: "埋め込み拡張の一覧",
1548
+ palette: "ブロックパレットの設定",
1547
1549
  assetsDirectory: "コスチュームと音のファイル",
1548
1550
  extensionsDirectory: "拡張のファイル",
1549
1551
  costume: (sprite, name) => `${sprite} のコスチューム ${name}`,
@@ -1571,6 +1573,7 @@ function describeProjectFolder(project, locale, { manifest, folder = "" } = {})
1571
1573
  [at(assetsDirectory), message.assetsDirectory],
1572
1574
  [at("extensions"), message.extensionsDirectory]
1573
1575
  ]);
1576
+ if (isObject(manifest) && typeof manifest.blockPalette === "string") descriptions.set(at(manifest.blockPalette), message.palette);
1574
1577
  const users = /* @__PURE__ */ new Map();
1575
1578
  for (const target of Array.isArray(project.targets) ? project.targets : []) {
1576
1579
  if (!isObject(target)) continue;