@kubohiroya/turbowarp-plus-editor 0.2.0-rc.5 → 0.3.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 +29 -7
- package/README.md +27 -7
- package/dist/config/feature-flags.js +1 -1
- package/docs/extension-authoring-ui.md +3 -2
- package/docs/extension-loader-integration.md +3 -3
- package/package.json +19 -18
- package/site/source.json +2 -22
package/README.ja.md
CHANGED
|
@@ -35,10 +35,24 @@
|
|
|
35
35
|
|
|
36
36
|
| 編集ツールにすぐ届く画面構成 | ステージやパネルを別ウィンドウへ |
|
|
37
37
|
| --- | --- |
|
|
38
|
-
| <a href="https://kubohiroya.github.io/turbowarp-plus-editor/features/screen/#layout"><img src="docs/features/images/
|
|
38
|
+
| <a href="https://kubohiroya.github.io/turbowarp-plus-editor/features/screen/#layout"><img src="docs/features/images/free-layout-current.png" width="640" alt="自由配置。関数呼び出しの実線と、通常の送信・送って待つを区別する破線、右下のミニマップを表示"></a> | <a href="https://kubohiroya.github.io/turbowarp-plus-editor/features/stage/#dock"><img src="docs/features/images/top-stage-window.png" width="300" alt="別のウィンドウに出したステージ"></a> |
|
|
39
39
|
|
|
40
40
|
スプライト一覧は左側に、ブロックのカテゴリはコード画面の上辺に、コード・コスチューム・音・変数・メッセージの切り替えはパネル側面のボタンにまとまっています。パレットのサイズとスクロール位置はカテゴリごとに保持されます。パネルの固定やサイズ調整、作業領域と別ウィンドウ間の移動もできます。[画面構成](https://kubohiroya.github.io/turbowarp-plus-editor/features/screen/) · [作業領域](https://kubohiroya.github.io/turbowarp-plus-editor/features/workspace/)
|
|
41
41
|
|
|
42
|
+
パレットの検索は表示中の全カテゴリを横断します。使うブロックグループはスプライト・背景ごとに選べ、グループをピンで広げたり並べ替えたりできます。表示設定と順序は作品と一緒に保存されます。[ブロックを探して整理する](https://kubohiroya.github.io/turbowarp-plus-editor/features/blocks/)
|
|
43
|
+
|
|
44
|
+
### Z配置・N配置でスクリプトを順に読む
|
|
45
|
+
|
|
46
|
+
コードの背景を右クリックし、**コードの並びの見え方を変更する**からZ配置・N配置を選ぶと、スクリプトを間隔のある縦一列で読めます。ミニマップも表示中の配置に追従します。スクリプトをクリックすると、自由配置での位置を保ったまま内容を編集できます。左縁の▼/▶で個別に折りたたみを切り替え、背景の右クリックでは**すべて折りたたむ**/**折りたたみをすべて解除**を選べます。矢印は右へ張り出して大きく曲がり、左から入る矢印のための余白も確保します。[コードの並びの見え方](https://kubohiroya.github.io/turbowarp-plus-editor/features/blocks/#arrange)
|
|
47
|
+
|
|
48
|
+
パネルの切り替え中と、作品を開いて初めてコードを描画する間は、待機カーソルを表示します。
|
|
49
|
+
|
|
50
|
+
| Z配置 | N配置 |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| <a href="https://kubohiroya.github.io/turbowarp-plus-editor/features/blocks/#arrange"><img src="docs/features/images/zn-layout.png" width="420" alt="Z配置"></a> | <a href="https://kubohiroya.github.io/turbowarp-plus-editor/features/blocks/#arrange"><img src="docs/features/images/n-layout.png" width="420" alt="N配置"></a> |
|
|
53
|
+
|
|
54
|
+
*Z配置とN配置。左縁の折りたたみボタン、配置に追従するミニマップ、送信方式ごとに異なる破線。*
|
|
55
|
+
|
|
42
56
|
### クローン・変数・リスト・メッセージを確認する
|
|
43
57
|
|
|
44
58
|
実行中のクローンを選び、その個体のプロパティやスプライト変数を確認・編集できます。変数のパネルには変数とリストが並び、それぞれを読み取る・変更するブロックの数が表示されます。件数から使用箇所を探したり、リストの項目を編集・並べ替えたりできます。[プロパティと変数](https://kubohiroya.github.io/turbowarp-plus-editor/features/sprites/#variable-pane)
|
|
@@ -57,14 +71,18 @@
|
|
|
57
71
|
|
|
58
72
|
### 関数の呼び出し関係をグラフでたどる
|
|
59
73
|
|
|
60
|
-
|
|
74
|
+
**呼び出し関係**では、どの関数がどの関数を呼ぶかを、関数の箱と矢印で確認できます。ほかのスプライトや背景で定義したグローバルな名前付き関数とのつながりや、メッセージを送るスクリプトから受け取るスクリプトへのつながりも表示されます。
|
|
75
|
+
|
|
76
|
+
[](https://kubohiroya.github.io/turbowarp-plus-editor/features/sprites/#call-graph)
|
|
61
77
|
|
|
62
|
-
|
|
78
|
+
*関数の呼び出しとメッセージの流れを図で確認。同じ送信元・受信先でも、「送る」と「送って待つ」を別々の破線で表示します。*
|
|
63
79
|
|
|
64
|
-
|
|
80
|
+
メッセージの矢印は、**送る**を細かい破線、**送って待つ**を長い破線で区別します。自由配置、ハット・関数一覧、Z/N配置、ミニマップでも同じルールを使い、砂時計アイコンは表示しません。
|
|
65
81
|
|
|
66
82
|
箱にポインターを重ねると、つながる矢印が強調されます。開いているスプライトや背景の関数の箱を選ぶと、その関数が右側のコードパネルに開きます。**ハット・関数一覧**からも、スクリプトやブロック定義を選んで編集できます。[関数と呼び出し関係](https://kubohiroya.github.io/turbowarp-plus-editor/features/sprites/#call-graph)
|
|
67
83
|
|
|
84
|
+
自由配置のブロックを右クリックすると、**このスクリプトを個別の画面で編集する**、**このスクリプトの呼び出し関係を開く**から、選んだブロックを含むスクリプトの編集と関係図へ進めます。[スクリプトの操作](https://kubohiroya.github.io/turbowarp-plus-editor/features/blocks/#context-menu)
|
|
85
|
+
|
|
68
86
|
### ブロック編集を、外の道具とつなぐ
|
|
69
87
|
|
|
70
88
|
作品をプロジェクトフォルダに展開すると、データ・素材・拡張をファイルとして扱えます。VS Codeや生成AIアプリで編集し、Editorへ戻って動作と変更内容を確かめる制作ができます。
|
|
@@ -75,6 +93,8 @@
|
|
|
75
93
|
|
|
76
94
|
#### プロジェクトフォルダで保存
|
|
77
95
|
|
|
96
|
+
「ファイル」→「プロジェクト一覧…」で、最近開いたSB3・手元のフォルダ・ブラウザー保存・Gitの作業コピーをまとめて扱えます。名前・最終利用日時・保存場所で並び替え、開く、一覧から除外、対応する保存先での削除・名前変更を実行できます。作品名と保存先名は別々に変更でき、同じ名前に揃えることも選べます。Gitは既存の作業コピーを再利用し、一覧からの除外では保存データを消しません。一覧上部の「新しいプロジェクトを作成…」から、ファイルメニューと共通の新規作成ダイアログへ進めます。GitHub上のリポジトリ改名は #681 の対応待ちです。
|
|
97
|
+
|
|
78
98
|
左ドロワーの「プロジェクトフォルダ」で「フォルダを選んで保存…」か「名前を付けてブラウザー内に保存…」を選び、開いているSB3をフォルダに展開。その後の保存も、同じフォルダに書き込みます。保存したフォルダは「ファイル」→「フォルダを開く…」で開き直せます。 [プロジェクトフォルダで保存](https://kubohiroya.github.io/turbowarp-plus-editor/features/git/#project-folder)
|
|
79
99
|
|
|
80
100
|
[](https://kubohiroya.github.io/turbowarp-plus-editor/features/git/#folder-files)
|
|
@@ -105,13 +125,15 @@ Gitのリポジトリのフォルダを開くと、Gitが結び付きます。
|
|
|
105
125
|
|
|
106
126
|
## 拡張・データ・アセット
|
|
107
127
|
|
|
128
|
+
エディタの機能を、もっと便利にしたくありませんか?独自の機能拡張ブロックで、もっと自由に開発したいですよね? TurboWarp-Plusファミリーのプロジェクト群が、そんなあなたの希望を叶えます。
|
|
129
|
+
|
|
108
130
|
### 拡張コードの検証と実行許可
|
|
109
131
|
|
|
110
132
|
Plus Editorは、Plus形式の拡張コードを実行前にSHA-256で照合します。確認が必要な拡張は、取得元と実行条件を確認し、サンドボックス内での実行などを選べます。 ファミリーのカタログでは、取得元とハッシュによって信頼済みの拡張を識別します。[拡張の読み込みと実行許可](https://kubohiroya.github.io/turbowarp-plus-editor/features/open/#review)
|
|
111
133
|
|
|
112
134
|
### カスタム拡張ブロックのフォーム編集
|
|
113
135
|
|
|
114
|
-
|
|
136
|
+
機能拡張ブロックにはカスタムUIを持たせることができます。カスタムUIはJSON Schemaから自動生成可能です。React JSON Schema Formによる入力欄で、ブロックの引数を項目ごとに編集し、必須項目や値の範囲を保存前に検証します。
|
|
115
137
|
|
|
116
138
|
[](https://kubohiroya.github.io/turbowarp-plus-editor/features/documents/#forms)
|
|
117
139
|
|
|
@@ -233,7 +255,7 @@ const html = renderEditButton({size: 'small', language: 'ja', projectURL: 'https
|
|
|
233
255
|
| 分野 | パッケージ |
|
|
234
256
|
| --- | --- |
|
|
235
257
|
| エディターの作業台 | `turbowarp-plus-editor-workbench`(配置・スプライトのタブ・ステージとその操作・メニュー・作品のダイアログ・バックパック)、`-windows`(ページ内ウィンドウ・メニュー・ダイアログの操作ボタン・外部の表示先と転送)、`-code-views`(タブや別窓のコード・切り離したパレット・スクリプトの配置・ブロックの入力欄の編集)、`-sprite-panes`(素材・変数・メッセージ・関数と呼び出し図・プロパティ)、`-fonts`(Web フォント)、`-host`(ファミリーが前提にするホストの契約)、`-project-model`(UI に依存しない作品の読み取りと編集、作品全体の検索と置換) |
|
|
236
|
-
| 作品フォルダと Git | `turbowarp-plus-editor-project-folder
|
|
258
|
+
| 作品フォルダと Git | `turbowarp-plus-editor-project-folder`、`turbowarp-plus-project-folder-starter`(作品を GitHub リポジトリへ移す)、`-git`(ローカル Git パネル・公開・リポジトリの作成)、`-auth`(Git プロキシのセッション)、`sb3-toolchain` |
|
|
237
259
|
| 機能拡張 | `turbowarp-extension-loader`(検証付きの読み込み)、`turbowarp-extension-security-dialog`(実行前の確認)、`turbowarp-extension-data-editor`(拡張データのフォーム編集)、`turbowarp-sb3-save-format`(保存形式の語彙) |
|
|
238
260
|
| 文書 | `turbowarp-document-editor`、`turbowarp-document-data`、`turbowarp-document-source`、`turbowarp-structured-data`、`turbowarp-named-data`、`turbowarp-yaml-json` |
|
|
239
261
|
| 再利用 | `turbowarp-script-transfer`(`.blocks3` / `.stage3`) |
|
|
@@ -283,7 +305,7 @@ GitHub App が求める権限は、インストールしたリポジトリの Me
|
|
|
283
305
|
node --test --test-concurrency=1 test/project-folder-save.browser.ts test/project-repository-creation.browser.ts test/project-publication.browser.ts
|
|
284
306
|
```
|
|
285
307
|
|
|
286
|
-
未公開の依存で確かめるときは、ローカル webpack の `TW_PLUS_PROJECT_SAVE_PREVIEW_ROOT` に、ビルド済みの `sb3-toolchain`・`turbowarp-plus-editor-project-folder`・`turbowarp-plus-
|
|
308
|
+
未公開の依存で確かめるときは、ローカル webpack の `TW_PLUS_PROJECT_SAVE_PREVIEW_ROOT` に、ビルド済みの `sb3-toolchain`・`turbowarp-plus-editor-project-folder`・`turbowarp-plus-project-folder-starter`・`turbowarp-plus-editor-git`・`turbowarp-plus-editor-auth` を `node_modules/@kubohiroya/` に置いたディレクトリの絶対パスを指定します。
|
|
287
309
|
|
|
288
310
|
### 組み込み文書
|
|
289
311
|
|
package/README.md
CHANGED
|
@@ -35,10 +35,24 @@ Hover to reveal controls, and drag and drop to rearrange tabs or copy blocks bet
|
|
|
35
35
|
|
|
36
36
|
| Keep editing tools within reach | Open the stage or panels in separate windows |
|
|
37
37
|
| --- | --- |
|
|
38
|
-
| <a href="https://kubohiroya.github.io/turbowarp-plus-editor/features/screen/index.en.html#layout"><img src="docs/features/images/en/
|
|
38
|
+
| <a href="https://kubohiroya.github.io/turbowarp-plus-editor/features/screen/index.en.html#layout"><img src="docs/features/images/en/free-layout-current.png" width="640" alt="Free layout with solid function-call arrows, distinct dashes for broadcast and broadcast and wait, and the minimap"></a> | <a href="https://kubohiroya.github.io/turbowarp-plus-editor/features/stage/index.en.html#dock"><img src="docs/features/images/en/top-stage-window.png" width="300" alt="The stage in its own window"></a> |
|
|
39
39
|
|
|
40
40
|
The sprite list is on the left, block categories are across the top of the code area, and buttons down the side of each panel open code, costumes, sounds, variables, and messages. The palette remembers each category’s size and scroll position. Panels can be pinned, resized, and moved between the workspace and separate windows. [Screen layout](https://kubohiroya.github.io/turbowarp-plus-editor/features/screen/index.en.html) · [Workspace layout](https://kubohiroya.github.io/turbowarp-plus-editor/features/workspace/index.en.html)
|
|
41
41
|
|
|
42
|
+
Palette search spans all visible categories. Choose block groups for each sprite or backdrop, pin groups open and reorder them. Visibility settings and order are saved with the project. [Find and organize blocks](https://kubohiroya.github.io/turbowarp-plus-editor/features/blocks/index.en.html)
|
|
43
|
+
|
|
44
|
+
### Read scripts in Z or N order
|
|
45
|
+
|
|
46
|
+
Right-click the code background and use **Change code layout view** to choose Z or N order. The scripts form a spaced vertical column, and the minimap follows that view. Click a script to edit it while keeping its original free-layout position. Use ▼ / ▶ on the left to fold or unfold one script, or right-click the background for **Fold all** / **Unfold all**. Arrows curve widely to the right, with space on the left for incoming arrows. [Code layout views](https://kubohiroya.github.io/turbowarp-plus-editor/features/blocks/index.en.html#arrange)
|
|
47
|
+
|
|
48
|
+
While a panel switches or an opened project first draws its code, the pointer shows a wait cursor.
|
|
49
|
+
|
|
50
|
+
| Z layout | N layout |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| <a href="https://kubohiroya.github.io/turbowarp-plus-editor/features/blocks/index.en.html#arrange"><img src="docs/features/images/en/zn-layout.png" width="420" alt="Z layout view"></a> | <a href="https://kubohiroya.github.io/turbowarp-plus-editor/features/blocks/index.en.html#arrange"><img src="docs/features/images/en/n-layout.png" width="420" alt="N layout view"></a> |
|
|
53
|
+
|
|
54
|
+
*Z and N layout views, with fold buttons, a matching minimap, and different dashes for each broadcast type.*
|
|
55
|
+
|
|
42
56
|
### Inspect clones, variables, lists, and messages
|
|
43
57
|
|
|
44
58
|
Choose an individual clone to inspect and edit its properties and sprite variables while the project runs. The variables pane lists variables and lists together and shows how many blocks read or change each one. Follow a count to find those blocks, or open a list to edit and reorder its items. [Properties and variables](https://kubohiroya.github.io/turbowarp-plus-editor/features/sprites/index.en.html#variable-pane)
|
|
@@ -57,14 +71,18 @@ The variables pane also shows thread and runtime variables from the temporary-va
|
|
|
57
71
|
|
|
58
72
|
### Trace function calls in a graph
|
|
59
73
|
|
|
60
|
-
**Calls** shows which function calls which, using boxes for functions and arrows for calls. The graph also includes connected global named functions defined in other sprites or the stage.
|
|
74
|
+
**Calls** shows which function calls which, using boxes for functions and arrows for calls. The graph also includes connected global named functions defined in other sprites or the stage, and links from scripts that send messages to the scripts that receive them.
|
|
75
|
+
|
|
76
|
+
[](https://kubohiroya.github.io/turbowarp-plus-editor/features/sprites/index.en.html#call-graph)
|
|
61
77
|
|
|
62
|
-
|
|
78
|
+
*Trace function calls and messages. Ordinary and waiting broadcasts between the same scripts have separate dashed arrows.*
|
|
63
79
|
|
|
64
|
-
|
|
80
|
+
Message arrows use fine dashes for **broadcast** and longer dashes for **broadcast and wait**. This rule also applies in Free layout, Hats and functions, Z/N views, and minimaps; hourglass icons are no longer shown.
|
|
65
81
|
|
|
66
82
|
Hover over a box to highlight its connected arrows. Select a function belonging to the current sprite or stage to open it in the code panel on the right. **Hats and functions** also lets you select and edit individual scripts and custom block definitions. [Functions and calls](https://kubohiroya.github.io/turbowarp-plus-editor/features/sprites/index.en.html#call-graph)
|
|
67
83
|
|
|
84
|
+
Right-click a block in Free layout and choose **Edit this script in a separate view** or **Open relationships for this script** to edit the script containing that block and inspect its relationships. [Script actions](https://kubohiroya.github.io/turbowarp-plus-editor/features/blocks/index.en.html#context-menu)
|
|
85
|
+
|
|
68
86
|
### Connect block editing with your other tools
|
|
69
87
|
|
|
70
88
|
Unpack a project into a project folder to work with its data, assets, and extensions as files. Edit with VS Code or an AI app, then return to the Editor to run the project and review the changes.
|
|
@@ -105,13 +123,15 @@ You can also collapse scripts from their hats, edit long text arguments in a dia
|
|
|
105
123
|
|
|
106
124
|
## Extensions, data, and assets
|
|
107
125
|
|
|
126
|
+
Want to make your editor even more useful? Want more freedom to develop with your own extension blocks? The projects in the TurboWarp Plus family help you turn those ideas into reality.
|
|
127
|
+
|
|
108
128
|
### Extension verification and approval
|
|
109
129
|
|
|
110
130
|
Before running a Plus-format extension, Plus Editor verifies its code against the recorded SHA-256 hash. When approval is required, review the source and execution requirements and choose whether and how to run each extension, including in a sandbox when supported. The family catalog identifies trusted extensions by their source and hash. [Loading and approval](https://kubohiroya.github.io/turbowarp-plus-editor/features/open/index.en.html#review)
|
|
111
131
|
|
|
112
132
|
### Form editing for custom extension blocks
|
|
113
133
|
|
|
114
|
-
|
|
134
|
+
Extension blocks can have custom UIs. These UIs can be generated automatically from JSON Schema. Plus Editor uses React JSON Schema Form to let you edit block arguments field by field and validate required values and allowed ranges before saving.
|
|
115
135
|
|
|
116
136
|
[](https://kubohiroya.github.io/turbowarp-plus-editor/features/documents/index.en.html#forms)
|
|
117
137
|
|
|
@@ -233,7 +253,7 @@ This repository holds no editor fork of its own. It builds the Editor from pinne
|
|
|
233
253
|
| Area | Packages |
|
|
234
254
|
| --- | --- |
|
|
235
255
|
| Editor workbench | `turbowarp-plus-editor-workbench` (layout, sprite tabs, stage and its controls, menus, project dialogs, the backpack), `-windows` (in-page windows, menus, dialog actions, external surfaces and transfers), `-code-views` (code in tabs and windows, the detached palette, script layout, block field editing), `-sprite-panes` (assets, variables, messages, functions and the call graph, properties), `-fonts` (web fonts), `-host` (the host contract the family is written against), `-project-model` (UI-free project reads and edits, project-wide search and replace) |
|
|
236
|
-
| Project folders and Git | `turbowarp-plus-editor-project-folder`,
|
|
256
|
+
| Project folders and Git | `turbowarp-plus-editor-project-folder`, `turbowarp-plus-project-folder-starter` (move a project into a GitHub repository), `-git` (Local Git panel, publishing and repository creation), `-auth` (Git proxy sessions), and `sb3-toolchain` |
|
|
237
257
|
| Extensions | `turbowarp-extension-loader` (verified loading), `turbowarp-extension-security-dialog` (review before running), `turbowarp-extension-data-editor` (form editing of extension data), `turbowarp-sb3-save-format` (storage-format vocabulary) |
|
|
238
258
|
| Documents | `turbowarp-document-editor`, `turbowarp-document-data`, `turbowarp-document-source`, `turbowarp-structured-data`, `turbowarp-named-data`, `turbowarp-yaml-json` |
|
|
239
259
|
| Reuse | `turbowarp-script-transfer` (`.blocks3` / `.stage3`) |
|
|
@@ -283,7 +303,7 @@ To check repository creation and pull-request registration headlessly, build wit
|
|
|
283
303
|
node --test --test-concurrency=1 test/project-folder-save.browser.ts test/project-repository-creation.browser.ts test/project-publication.browser.ts
|
|
284
304
|
```
|
|
285
305
|
|
|
286
|
-
To try unpublished dependencies, set the local webpack's `TW_PLUS_PROJECT_SAVE_PREVIEW_ROOT` to the absolute path of a directory whose `node_modules/@kubohiroya/` holds built `sb3-toolchain`, `turbowarp-plus-editor-project-folder`, `turbowarp-plus-
|
|
306
|
+
To try unpublished dependencies, set the local webpack's `TW_PLUS_PROJECT_SAVE_PREVIEW_ROOT` to the absolute path of a directory whose `node_modules/@kubohiroya/` holds built `sb3-toolchain`, `turbowarp-plus-editor-project-folder`, `turbowarp-plus-project-folder-starter`, `turbowarp-plus-editor-git` and `turbowarp-plus-editor-auth`.
|
|
287
307
|
|
|
288
308
|
### Embedded documents
|
|
289
309
|
|
|
@@ -22,7 +22,7 @@ export function readStartupFeatureFlags({ twPlusExtensionLoader: loader = null,
|
|
|
22
22
|
contextMenuIcons: contextMenuIcons === null || contextMenuIcons === '1',
|
|
23
23
|
localGit: localGit === null || localGit === '1',
|
|
24
24
|
gitRestoreVersion: (localGit === null || localGit === '1') && gitRestoreVersion === '1',
|
|
25
|
-
workspaceMinimap: workspaceMinimap === null || workspaceMinimap === '1',
|
|
25
|
+
workspaceMinimap: standardLayout === '1' && (workspaceMinimap === null || workspaceMinimap === '1'),
|
|
26
26
|
stageCodePrewarm: stageCodePrewarm === null || stageCodePrewarm === '1',
|
|
27
27
|
// Saving writes the screen of the project into its SB3 or project folder; files saved earlier still open as saved.
|
|
28
28
|
saveWorkspace: saveWorkspace === null || saveWorkspace === '1'
|
|
@@ -55,10 +55,11 @@ SHA-256は内容を固定する値で、発行者の本人性やコードの安
|
|
|
55
55
|
|
|
56
56
|
## 実装と依存順
|
|
57
57
|
|
|
58
|
-
- Security Dialog:
|
|
58
|
+
- Security Dialog: 拡張一覧の UI・状態、作品を開く前のレビュー、許可・再試行と失敗の説明を持ちます。`ExtensionReview` 1つで追加(`add`)と作品を開くとき(`open`)の両方を尋ねます。4形式の綴りは Loader の Manifest・SB3の保存形式と同じなので、画面の答えを対応表なしで Loader へ渡します。旧綴り(`remote` / `embedded` / `cached`)は読み替えずに拒否します。
|
|
59
59
|
- Loader: SHA-256・取得・検証・認可・Manifest/SB3更新。`prepareCatalogExtensionChanges` は複数パッケージをまとめて準備し、既存コードを更新せず配布方式を変更します。
|
|
60
60
|
- VM: 所有portから隔離iframeを登録し、ID・RPC・worker/serviceの所有権を照合して破棄します。
|
|
61
|
-
-
|
|
61
|
+
- Loader の `./scratch-vm`: 実状態の復元、作品切替の競合防止、適用失敗時の復元と、復元できない場合の追加前SB3の回復処理を担当します。
|
|
62
|
+
- Editor(`site/extension-host/`・`site/extension-library/`): 起動設定・信頼方針・GUIの値とコールバックを、上記の公開 API へ渡します。[責務の一覧](upstream-feature-ownership.md)を参照してください。
|
|
62
63
|
- GUIフォーク: 上記を差し込む口だけを持ちます。
|
|
63
64
|
|
|
64
65
|
## ローカルでの確認
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## 実装場所と依存方向
|
|
4
4
|
|
|
5
|
-
Manifest、取得、SHA-256、認可、依存順、診断、キャッシュ、SB3
|
|
5
|
+
Manifest、取得、SHA-256、認可、依存順、診断、キャッシュ、SB3保持、VM登録・復元とロード/保存処理は独立した [`turbowarp-extension-loader`](https://github.com/kubohiroya/turbowarp-extension-loader) が持つ。拡張一覧・許可・再試行と作品を開く前のレビューは `turbowarp-extension-security-dialog`、作品データの調査・保存形式の変換は `turbowarp-sb3-save-format` が持つ。本リポジトリの `site/extension-host/` は起動設定・信頼方針・IndexedDBキャッシュの選択と、GUI・Packagerの値やコールバックを各パッケージへ渡す接続を担当する([責務の一覧](upstream-feature-ownership.md))。`scratch-gui` フォークは差し込み口([差し込み口の設計](plus-integration-sockets.md))を持つ。VMは拡張を所有サービスとして登録するportを持つ(差分は `scripts/site/patches/scratch-vm-host-extension-service-port.patch` にも保持)。
|
|
6
6
|
|
|
7
|
-
Loaderはnpmの完全一致版(`
|
|
7
|
+
Loaderはnpmの完全一致版(`package.json` と `package-lock.json` の版・integrity。公開元コミットはnpmのprovenanceと `v<版>` タグでたどる)で、GUI・VM・Packagerは完全SHAで固定する。通常ビルドがLoader入りのscaffolding・runtime・ローカルPackager画面を生成し、artifact gateが依存の固定値・既定ON・資産hashを検証する。
|
|
8
8
|
|
|
9
9
|
## 起動と信頼境界
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ Loaderはnpmの完全一致版(`site/source.json` の `loaderVersion` と `loa
|
|
|
12
12
|
|
|
13
13
|
ホストが静的に組み込んだLoader、UI、VM registrarを接続する。作品からLoader・認可ポリシーを取得しない。coreが検証したexact bytesと取得元をUIへ渡し、id・取得元・発行者の未検証の申告・version・digest・unsandboxed要求・capabilityを表示する。拒否・Esc・閉じる・abortは拒否となる。承認はホストセッション内で要求の全情報に束縛し、破棄時に失効する。明示的な外部ホストポリシーをUI前に適用し、拒否をユーザー操作で上書きしない。
|
|
14
14
|
|
|
15
|
-
SHA-256はバイト列の一貫性の検証であり、安全性や発行者本人性の証明ではない。RemoteはHTTPSのみ、資格情報・fragment・redirect・未証明の最終URL
|
|
15
|
+
SHA-256はバイト列の一貫性の検証であり、安全性や発行者本人性の証明ではない。RemoteはHTTPSのみ、資格情報・fragment・redirect・未証明の最終URLを拒否する。Loaderのメモリキャッシュは既定8 MiB/1時間のセッションLRUで、Editorは利用可能ならIndexedDBの永続キャッシュを接続する。`remote-cacheable` の検証済みコードを作品のURIと結び付けて保持し、利用者がキャッシュを辞退した場合は保存しない。ヒット時にも再検証・認可する。通信不能時に異なるdigestのコードへフォールバックしない。
|
|
16
16
|
|
|
17
17
|
コアは全件を検証・認可してから登録する。認可証跡はコピーできないtransaction限定の証跡で、作品の自己申告を受け付けない。registrarはVMが提供する所有サービスportへ登録し、getInfo().idを照合してからVMブロックを登録する。失敗時は所有サービス・primitive・hat・category等を解除し、失敗したホストを再利用しない。任意の特権JSによるネットワーク・DOM等の副作用は巻き戻せない。承認後のJS評価でID不一致を検出した場合は登録を拒否する。
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-plus-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Distribution, brand assets and the project edit button for TurboWarp-Plus-Editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "(GPL-3.0-or-later AND MPL-2.0)",
|
|
@@ -78,25 +78,25 @@
|
|
|
78
78
|
"preview:security": "node scripts/local-security-preview.cts"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@kubohiroya/sb3-toolchain": "0.
|
|
81
|
+
"@kubohiroya/sb3-toolchain": "0.28.1",
|
|
82
82
|
"@kubohiroya/turbowarp-document-source": "0.4.0",
|
|
83
|
-
"@kubohiroya/turbowarp-extension-data-editor": "0.
|
|
84
|
-
"@kubohiroya/turbowarp-extension-loader": "0.
|
|
85
|
-
"@kubohiroya/turbowarp-extension-security-dialog": "0.
|
|
86
|
-
"@kubohiroya/turbowarp-named-data": "0.
|
|
83
|
+
"@kubohiroya/turbowarp-extension-data-editor": "0.11.2",
|
|
84
|
+
"@kubohiroya/turbowarp-extension-loader": "0.13.0",
|
|
85
|
+
"@kubohiroya/turbowarp-extension-security-dialog": "0.13.0",
|
|
86
|
+
"@kubohiroya/turbowarp-named-data": "0.9.0",
|
|
87
87
|
"@kubohiroya/turbowarp-plus-editor-auth": "0.5.0",
|
|
88
|
-
"@kubohiroya/turbowarp-plus-editor-code-views": "0.
|
|
88
|
+
"@kubohiroya/turbowarp-plus-editor-code-views": "0.25.0",
|
|
89
89
|
"@kubohiroya/turbowarp-plus-editor-fonts": "0.1.0",
|
|
90
|
-
"@kubohiroya/turbowarp-plus-editor-git": "0.
|
|
90
|
+
"@kubohiroya/turbowarp-plus-editor-git": "0.27.0",
|
|
91
91
|
"@kubohiroya/turbowarp-plus-editor-host": "0.1.1",
|
|
92
|
-
"@kubohiroya/turbowarp-plus-editor-project-folder": "0.
|
|
92
|
+
"@kubohiroya/turbowarp-plus-editor-project-folder": "0.22.0",
|
|
93
93
|
"@kubohiroya/turbowarp-plus-editor-project-model": "0.2.0",
|
|
94
|
-
"@kubohiroya/turbowarp-plus-editor-
|
|
95
|
-
"@kubohiroya/turbowarp-plus-editor-sprite-panes": "0.10.0",
|
|
94
|
+
"@kubohiroya/turbowarp-plus-editor-sprite-panes": "0.11.2",
|
|
96
95
|
"@kubohiroya/turbowarp-plus-editor-windows": "0.2.1",
|
|
97
|
-
"@kubohiroya/turbowarp-plus-editor-workbench": "0.
|
|
98
|
-
"@kubohiroya/turbowarp-
|
|
99
|
-
"@kubohiroya/turbowarp-
|
|
96
|
+
"@kubohiroya/turbowarp-plus-editor-workbench": "0.34.0",
|
|
97
|
+
"@kubohiroya/turbowarp-plus-project-folder-starter": "0.4.1",
|
|
98
|
+
"@kubohiroya/turbowarp-structured-data": "0.12.0",
|
|
99
|
+
"@kubohiroya/turbowarp-yaml-json": "0.12.0",
|
|
100
100
|
"@playwright/test": "^1.64.1",
|
|
101
101
|
"@turbowarp/packager": "3.14.0",
|
|
102
102
|
"@types/jsdom": "^21.1.7",
|
|
@@ -115,12 +115,12 @@
|
|
|
115
115
|
},
|
|
116
116
|
"publishConfig": {
|
|
117
117
|
"access": "public",
|
|
118
|
-
"tag": "
|
|
118
|
+
"tag": "latest"
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@kubohiroya/turbowarp-document-data": "0.
|
|
122
|
-
"@kubohiroya/turbowarp-document-editor": "0.
|
|
123
|
-
"@kubohiroya/turbowarp-sb3-save-format": "0.
|
|
121
|
+
"@kubohiroya/turbowarp-document-data": "0.8.0",
|
|
122
|
+
"@kubohiroya/turbowarp-document-editor": "0.2.0",
|
|
123
|
+
"@kubohiroya/turbowarp-sb3-save-format": "0.5.0",
|
|
124
124
|
"@kubohiroya/turbowarp-script-transfer": "0.1.5",
|
|
125
125
|
"@turbowarp/jszip": "^3.12.0"
|
|
126
126
|
},
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
},
|
|
131
131
|
"types": "./dist/src/index.d.ts",
|
|
132
132
|
"overrides": {
|
|
133
|
+
"@kubohiroya/turbowarp-extension-security-dialog": "$@kubohiroya/turbowarp-extension-security-dialog",
|
|
133
134
|
"@kubohiroya/turbowarp-extension-loader": "$@kubohiroya/turbowarp-extension-loader",
|
|
134
135
|
"@kubohiroya/turbowarp-plus-editor-sprite-panes": "$@kubohiroya/turbowarp-plus-editor-sprite-panes",
|
|
135
136
|
"@kubohiroya/turbowarp-plus-editor-project-model": "$@kubohiroya/turbowarp-plus-editor-project-model",
|
package/site/source.json
CHANGED
|
@@ -1,31 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"guiRepository": "kubohiroya/scratch-gui",
|
|
3
|
-
"guiRevision": "
|
|
4
|
-
"coreRepository": "kubohiroya/turbowarp-extension-data-editor",
|
|
5
|
-
"coreRevision": "c80ccf2f610264f01db2fe5b6c61249191980f2c",
|
|
6
|
-
"securityPackage": "@kubohiroya/turbowarp-extension-security-dialog",
|
|
7
|
-
"securityVersion": "0.9.0",
|
|
8
|
-
"loaderRepository": "kubohiroya/turbowarp-extension-loader",
|
|
9
|
-
"loaderRevision": "95d8981ce2d30397ad44324cbc56ad4332d386d9",
|
|
10
|
-
"loaderVersion": "0.11.1",
|
|
11
|
-
"loaderSource": "npm",
|
|
12
|
-
"loaderIntegrity": "sha512-0jgwZBPcYbVll8WX3nWvvnNsMD0cglABPVY3uuh/pGAuMkKzsMZDc74qEO47/GHblk+tLMClTMROZgm3C+BbNg==",
|
|
3
|
+
"guiRevision": "b2e75a129546db48e6563f72c80a3d3d46d86fb5",
|
|
13
4
|
"vmRepository": "kubohiroya/scratch-vm",
|
|
14
5
|
"vmRevision": "e623546e0e173d70e0314d06d8a17bf84c72afeb",
|
|
15
6
|
"vmBaseRevision": "0cb82afe62506f3d9f2ff849c95593f0473b5d2c",
|
|
16
7
|
"packagerRepository": "TurboWarp/packager",
|
|
17
|
-
"packagerRevision": "
|
|
18
|
-
"coreVersion": "0.10.0",
|
|
19
|
-
"documentEditorRepository": "kubohiroya/turbowarp-document-editor",
|
|
20
|
-
"documentEditorRevision": "a88e7502f92b97883434b9808ad3af193c706406",
|
|
21
|
-
"documentEditorVersion": "0.1.0-rc.9",
|
|
22
|
-
"documentEditorSource": "npm",
|
|
23
|
-
"documentEditorIntegrity": "sha512-9xbcQVoUa52pKRM+JYPW2jDInUWkVCCyYyzcFMaCR2Cftee5LoxirRuZUont8H9ygxJ/DwMnpxQhtIipYinhKg==",
|
|
24
|
-
"scriptTransferRepository": "kubohiroya/turbowarp-script-transfer",
|
|
25
|
-
"scriptTransferRevision": "91ae495ff741bcd045ce4803149a1433f940b73f",
|
|
26
|
-
"scriptTransferVersion": "0.1.5",
|
|
27
|
-
"scriptTransferSource": "npm",
|
|
28
|
-
"scriptTransferIntegrity": "sha512-jw+Z0nPWwzUsbb5mUME6UXQohqglT+AHdkIJ5ug3OQN9pJWVJTrlu+HA/9YerNnnjZFCoJCHs7TTttYVcYAkyw==",
|
|
8
|
+
"packagerRevision": "d690225b9f326c98be617a51c7c65f76758048ee",
|
|
29
9
|
"previewReloadStyles": {
|
|
30
10
|
"revision": "c493768e51e4824c5a07094e49b1d307375fdb2d",
|
|
31
11
|
"sha256": "b577908b996319396249132c5309f5b8639fc70da3212646f47fb920b85c80ec"
|