@kubohiroya/turbowarp-extension-data-editor 0.8.0 → 0.8.2

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.
Files changed (38) hide show
  1. package/README.ja.md +2 -1
  2. package/README.md +2 -1
  3. package/dist/build-info.json +3 -3
  4. package/dist/form-presentation.d.ts +1 -1
  5. package/dist/form-presentation.js +2 -0
  6. package/dist/react.js +3 -0
  7. package/dist/turbowarp/appearance.d.ts +7 -6
  8. package/dist/turbowarp/bridge.d.ts +14 -19
  9. package/dist/turbowarp/bridge.js +21 -16
  10. package/dist/turbowarp/error-session.d.ts +3 -17
  11. package/dist/turbowarp/error-session.js +2 -2
  12. package/dist/turbowarp/fixed-fields.d.ts +62 -77
  13. package/dist/turbowarp/fixed-fields.js +6 -6
  14. package/dist/turbowarp/fixed-transaction.d.ts +23 -18
  15. package/dist/turbowarp/fixed-transaction.js +13 -13
  16. package/dist/turbowarp/host.d.ts +2 -18
  17. package/dist/turbowarp/host.js +9 -6
  18. package/dist/turbowarp/icon.d.ts +1 -8
  19. package/dist/turbowarp/icon.js +6 -6
  20. package/dist/turbowarp/native-types.d.ts +136 -0
  21. package/dist/turbowarp/native-types.js +1 -0
  22. package/dist/turbowarp/subtree.d.ts +12 -9
  23. package/dist/turbowarp/subtree.js +3 -2
  24. package/dist/webpack4/metafile.json +22 -22
  25. package/dist/webpack4/react.js +1 -0
  26. package/dist/webpack4/react.js.map +2 -2
  27. package/dist/webpack4/rjsf.js +2 -0
  28. package/dist/webpack4/rjsf.js.map +2 -2
  29. package/dist/webpack4/turbowarp.js +36 -29
  30. package/dist/webpack4/turbowarp.js.map +2 -2
  31. package/docs/ci-success-gate.md +2 -2
  32. package/docs/common-layout.ja.md +4 -4
  33. package/docs/descendants.md +2 -2
  34. package/docs/dialog-window.md +2 -2
  35. package/docs/schema-stage1.ja.md +3 -3
  36. package/docs/template-fixture-separation.ja.md +5 -5
  37. package/package.json +7 -5
  38. package/webpack4.cjs +19 -20
@@ -5,7 +5,7 @@ TurboWarp-Plus-Editorの統合ビルド・Pages・配信前後のE2Eは下流の
5
5
 
6
6
  ゲートはrepo/head repo、workflow ID、event、branch、完全SHAと最新attemptを照合し、失敗・実行中・API確認不能を成功へ変換しません。
7
7
  ゲート自身は読み取り専用です。判定を `normal-ci-gate-<run id>-<attempt>` のdecision.jsonとsummaryへ保存します。
8
- 境界のローカル検証は `node --test test/ci/*.test.mjs` です。
8
+ 境界のローカル検証は `node --test test/ci/*.test.ts` です。
9
9
 
10
10
  下流GUIのbranchやPagesの観測は廃止しました。CI再実行の検証は、このリポジトリのfixture・observerの証跡と権限だけで完結します。
11
11
 
@@ -18,7 +18,7 @@ gh workflow run ci-gate-rerun-test.yml \
18
18
  --repo kubohiroya/turbowarp-extension-data-editor --ref main
19
19
  ```
20
20
 
21
- 統括・fixture・observerは手動dispatchのみです。実GitHubテストをpush/PRから自動起動しません。通常CIは既存の `node --test test/ci/*.test.mjs` により、統括ロジック・fixture・誤run/attempt・権限境界・timeout等のローカルテストを実行します。変更時の通常CIと、必要時の手動検証で運用します。
21
+ 統括・fixture・observerは手動dispatchのみです。実GitHubテストをpush/PRから自動起動しません。通常CIは既存の `node --test test/ci/*.test.ts` により、統括ロジック・fixture・誤run/attempt・権限境界・timeout等のローカルテストを実行します。変更時の通常CIと、必要時の手動検証で運用します。
22
22
 
23
23
  ### 確認する順序
24
24
 
@@ -36,7 +36,7 @@ const uiSchema = {
36
36
 
37
37
  定義はJSONのみ。関数、React要素、任意コンポーネントの評価は行わない。Schemaの制約、既定値、coercion、未知キーの保存方針は変更しない。現行RJSF v5自体の対応範囲も変わらない。特にRJSFの内部処理が落とすprototype名のプロパティは、このレイアウトでも新たに対応しない。Source/FormのTreeではそのようなリテラルキーも扱える。
38
38
 
39
- 完全なサンプルは [`examples/common-layout.mjs`](../examples/common-layout.mjs)。
39
+ 完全なサンプルは [`examples/common-layout.ts`](../examples/common-layout.ts)。
40
40
 
41
41
  ## 入力・検証・アクセシビリティ
42
42
 
@@ -88,10 +88,10 @@ v6のLayoutGridField/LayoutHeaderFieldは採用しない。Source/Formは再帰S
88
88
 
89
89
  ```sh
90
90
  node node_modules/typescript/bin/tsc --noEmit
91
- node --test test/layout.test.mjs test/schema-presentation.test.mjs test/schema-editor.test.mjs test/schema-bundle-editor.test.mjs test/source-view.test.mjs test/source-prepared.test.mjs test/react-dialog.test.mjs test/webpack4.test.mjs
92
- node test/e2e/layout/browser.mjs
91
+ node --test test/layout.test.ts test/schema-presentation.test.ts test/schema-editor.test.ts test/schema-bundle-editor.test.ts test/source-view.test.ts test/source-prepared.test.ts test/react-dialog.test.ts test/webpack4.test.ts
92
+ node test/e2e/layout/browser.ts
93
93
  # Optional: a built Camera Source checkout containing ./editor-metadata.
94
- node test/e2e/layout/camera-dialog.mjs /path/to/built/camera-source
94
+ node test/e2e/layout/camera-dialog.ts /path/to/built/camera-source
95
95
  ```
96
96
 
97
97
  ブラウザ検証はローカルHTTPとPlaywright Chromiumを使用し、実装された両経路の画面を `test-results/layout/desktop.png`・`mobile.png` に保存する。モックアップではない。ただし、この検証用ページは実TurboWarp GUI・実カメラ・packaged作品のE2Eを代替しない。
@@ -87,9 +87,9 @@ project / target の変更などはホストの `subscribeInvalidation(reference
87
87
 
88
88
  ## サンプル・検証・連携の残り
89
89
 
90
- 業務非依存の [サンプル](../examples/descendant-properties.mjs) は group / item の同じ Schema フォームを複数ノードへ登録し、未登録の中間ノード、孫、複数枝を含む完全な snapshot を作ります。
90
+ 業務非依存の [サンプル](../examples/descendant-properties.ts) は group / item の同じ Schema フォームを複数ノードへ登録し、未登録の中間ノード、孫、複数枝を含む完全な snapshot を作ります。
91
91
 
92
- `test/descendants.test.mjs` は構造・下書き・全体検証・競合・無効化・一括 commit 契約を確認します。途中失敗の補償と Undo/Redo はメモリホストでの契約テストです。`test/schema-editor.test.mjs` は実 RJSF 本文の入れ子構成、フィールド ID、unmount 後の孫の検証、1回の変更要求を確認します。
92
+ `test/descendants.test.ts` は構造・下書き・全体検証・競合・無効化・一括 commit 契約を確認します。途中失敗の補償と Undo/Redo はメモリホストでの契約テストです。`test/schema-editor.test.ts` は実 RJSF 本文の入れ子構成、フィールド ID、unmount 後の孫の検証、1回の変更要求を確認します。
93
93
 
94
94
  実 GUI の子孫探索、階層モーダル、フラグ、実 workspace の一括適用・失敗復元・Undo/Redo、階層編集した `.sb3` の実保存・再読込は scratch-gui #2 の接続後に結合確認が必要です。初版の検証結果を階層編集の実証として扱いません。この追加 API は結合確認前の実験的な契約です。
95
95
 
@@ -25,8 +25,8 @@
25
25
 
26
26
  ```sh
27
27
  npm run build
28
- node --test test/react-dialog.test.mjs test/fixed-dialog.test.mjs
29
- node --test test/e2e/layout/dialog-window.mjs
28
+ node --test test/react-dialog.test.ts test/fixed-dialog.test.ts
29
+ node --test test/e2e/layout/dialog-window.ts
30
30
  ```
31
31
 
32
32
  ## 運用ログ(2026-10-31 JST)
@@ -70,11 +70,11 @@ pnpmの初回Git subdependency解決は固定取得先だけを確認してlock
70
70
 
71
71
  ## 再検証の入口
72
72
 
73
- 各owner checkoutをcwdとして、共通repoの`node scripts/verify-schema-package.mjs <pure entryに必要なruntime依存名...>`を実行する。出力のisolated directoryをrepo名のkey(aframe、scene-graph、3d-scene-runtime、camera-source、camera-calibration、realtime-motion-capture、time-space-sync、extension-template、editor)へ対応付けたJSONを作り、共通repoで次を実行する。
73
+ 各owner checkoutをcwdとして、共通repoの`node scripts/verify-schema-package.ts <pure entryに必要なruntime依存名...>`を実行する。出力のisolated directoryをrepo名のkey(aframe、scene-graph、3d-scene-runtime、camera-source、camera-calibration、realtime-motion-capture、time-space-sync、extension-template、editor)へ対応付けたJSONを作り、共通repoで次を実行する。
74
74
 
75
75
  ```sh
76
- node scripts/verify-schema-stage1.mjs /path/to/isolation-index.json
77
- node scripts/verify-schema-dependencies.mjs /path/to/isolation-index.json
76
+ node scripts/verify-schema-stage1.ts /path/to/isolation-index.json
77
+ node scripts/verify-schema-dependencies.ts /path/to/isolation-index.json
78
78
  ```
79
79
 
80
80
  個別のfixtureはowner内のtests/editor-schema.test.ts等、共通の型fixtureはtest/types/tsconfig.schema-pure.jsonとschema-compat.jsonにある。Scopeを変えず文書だけを更新した後、同じfull build/testを繰り返すことは要求しない。
@@ -1,12 +1,12 @@
1
1
  # Template用途依存からの試験分離
2
2
 
3
- owner横断検証は14契約・8packageです。Templateの旧2サンプルは対象外にしました。JSON/YAML編集の任意サンプルはexamples/document-properties.mjs、対応する実serviceの試験はtest/generic-document.test.mjsで所有します。Templateやその公開APIをimportしません。
3
+ owner横断検証は14契約・8packageです。Templateの旧2サンプルは対象外にしました。JSON/YAML編集の任意サンプルはexamples/document-properties.ts、対応する実serviceの試験はtest/generic-document.test.tsで所有します。Templateやその公開APIをimportしません。
4
4
 
5
5
  例には任意のtext/enabledと追加キーを使用します。required/defaultや業務条件はありません。新たなpackage exportや標準ブロックは追加せず、examplesはnpm配布APIにしません。登録は呼出側が明示的に行います。
6
6
 
7
7
  旧16契約・9packageという過去結果は変更しません。旧2入力とprovenanceはtest/fixtures/schema-stage1/historyへ保持しました。共通src・8公開入口・依存pin/lock・CSS/buildは変更しません。
8
8
 
9
- `docs/schema-stage1-contracts.json`は旧16契約の採取結果として保持します。現行の件数の正本は実行する`scripts/verify-schema-stage1.mjs`であり、Templateのない8packageのisolation indexを渡して検証します。今回の結果・依存照合はTemplate側のローカル集約記録に保存し、過去結果を上書きしません。
9
+ `docs/schema-stage1-contracts.json`は旧16契約の採取結果として保持します。現行の件数の正本は実行する`scripts/verify-schema-stage1.ts`であり、Templateのない8packageのisolation indexを渡して検証します。今回の結果・依存照合はTemplate側のローカル集約記録に保存し、過去結果を上書きしません。
10
10
 
11
11
  <a id="current-verification"></a>
12
12
 
@@ -14,7 +14,7 @@ owner横断検証は14契約・8packageです。Templateの旧2サンプルは
14
14
 
15
15
  対象は共通エディタと7つの実拡張packageです。Templateの`./editor-schema`は撤去済みで、共通依存も持ちません。Templateをこの手順のownerやindexに含めないでください。Template自体のhello/build/manifestはTemplate側で別に検証します。
16
16
 
17
- まず各ownerの採用commit・依存pin/lock・実解決を確認し、その版のbuild生成物を用意します。共通repoの`scripts/verify-schema-package.mjs`を各owner checkoutをcwdとして実行し、pure入口に必要なruntime依存だけを引数で指定します。共通自身の入口は`/schema`、7拡張の入口は`/editor-schema`です。新たな公開・install・依存更新を暗黙に行う手順ではありません。既存の検証済みartifactを使う場合も、その採取時のSHA・hash・実解決を確認します。
17
+ まず各ownerの採用commit・依存pin/lock・実解決を確認し、その版のbuild生成物を用意します。共通repoの`scripts/verify-schema-package.ts`を各owner checkoutをcwdとして実行し、pure入口に必要なruntime依存だけを引数で指定します。共通自身の入口は`/schema`、7拡張の入口は`/editor-schema`です。新たな公開・install・依存更新を暗黙に行う手順ではありません。既存の検証済みartifactを使う場合も、その採取時のSHA・hash・実解決を確認します。
18
18
 
19
19
  検証成功ログの`isolated:`に出力されたディレクトリを、次の**8 keyだけ**へ対応付けて`isolation-index.json`を作成します。値は例示なので、実際のsource-free package検証先の絶対パスへ置き換えてください。
20
20
 
@@ -34,8 +34,8 @@ owner横断検証は14契約・8packageです。Templateの旧2サンプルは
34
34
  共通repoをcwdとして、同じindexで両方を実行します。
35
35
 
36
36
  ```sh
37
- node scripts/verify-schema-stage1.mjs /path/to/isolation-index.json
38
- node scripts/verify-schema-dependencies.mjs /path/to/isolation-index.json
37
+ node scripts/verify-schema-stage1.ts /path/to/isolation-index.json
38
+ node scripts/verify-schema-dependencies.ts /path/to/isolation-index.json
39
39
  ```
40
40
 
41
41
  前者は`contracts: 14`・`packageCount: 8`と各契約の成功を確認します。後者はScene Graph→Runtime、Camera Source→Calibration/Motionの実bundle一致と、7consumerの共通pureファイル一致を確認します。失敗したownerをindexから落として成功扱いにせず、依存pin・lock・実解決・生成物を確認してください。
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "https://github.com/kubohiroya"
6
6
  },
7
7
  "name": "@kubohiroya/turbowarp-extension-data-editor",
8
- "version": "0.8.0",
8
+ "version": "0.8.2",
9
9
  "description": "Custom editor sessions and UI for structured data handled by TurboWarp extensions",
10
10
  "license": "MPL-2.0",
11
11
  "type": "module",
@@ -62,14 +62,16 @@
62
62
  },
63
63
  "packageManager": "pnpm@11.28.8",
64
64
  "scripts": {
65
- "check": "node --test test/ci/*.test.mjs && pnpm typecheck && pnpm test",
65
+ "check": "node --test test/ci/*.test.ts && pnpm typecheck && pnpm test",
66
66
  "typecheck": "tsc --noEmit",
67
- "build": "tsc --project tsconfig.json && node scripts/copy-react-css.mjs && node scripts/build-webpack4.mjs && node scripts/write-third-party-licenses.mjs && node scripts/write-build-info.mjs",
68
- "test": "pnpm build && node --test test/*.test.mjs",
67
+ "build": "tsc --project tsconfig.json && node scripts/copy-react-css.ts && node scripts/build-webpack4.ts && node scripts/write-third-party-licenses.ts && node scripts/write-build-info.ts",
68
+ "test": "pnpm build && node --test test/*.test.ts",
69
69
  "prepack": "npm run build",
70
- "prepare": "npm run build"
70
+ "prepare": "npm run build",
71
+ "test:runtime": "pnpm build && node --test test/runtime/*.browser.ts"
71
72
  },
72
73
  "devDependencies": {
74
+ "@kubohiroya/turbowarp-plus-editor-test-runtime": "0.2.0",
73
75
  "@playwright/test": "^1.64.1",
74
76
  "@turbowarp/jszip": "^3.12.0",
75
77
  "@types/react": "^16.14.70",
package/webpack4.cjs CHANGED
@@ -1,20 +1,19 @@
1
- const path = require('node:path');
2
-
3
- /** Connect webpack 4 to precompiled entries and the host's React singleton. */
4
- const withBlockEditorWebpack4 = (config, {hostRoot}) => {
5
- if (!path.isAbsolute(hostRoot || '')) throw new Error('hostRoot must be an absolute GUI root.');
6
- if (Array.isArray(config)) return config.map(item => withBlockEditorWebpack4(item, {hostRoot}));
7
- const prefix = '@kubohiroya/turbowarp-extension-data-editor';
8
- const alias = {...config.resolve?.alias};
9
- for (const entry of ['index', 'rjsf', 'react', 'turbowarp', 'schema']) {
10
- alias[`${prefix}${entry === 'index' ? '' : `/${entry}`}$`] = path.join(__dirname, 'dist/webpack4', `${entry}.js`);
11
- }
12
- alias[`${prefix}/react/styles.css$`] = path.join(__dirname, 'dist/react.css');
13
- alias['react$'] = require.resolve('react', {paths: [hostRoot]});
14
- for (const runtime of ['jsx-runtime', 'jsx-dev-runtime']) {
15
- alias[`react/${runtime}.js$`] = require.resolve(`react/${runtime}`, {paths: [hostRoot]});
16
- }
17
- alias['react-dom$'] = require.resolve('react-dom', {paths: [hostRoot]});
18
- return {...config, resolve: {...config.resolve, symlinks: true, alias}};
19
- };
20
- module.exports = {withBlockEditorWebpack4};
1
+ "use strict";
2
+ const path = require("node:path");
3
+ function withBlockEditorWebpack4(config, { hostRoot }) {
4
+ if (!path.isAbsolute(hostRoot || "")) throw new Error("hostRoot must be an absolute GUI root.");
5
+ if (Array.isArray(config)) return config.map((item) => withBlockEditorWebpack4(item, { hostRoot }));
6
+ const prefix = "@kubohiroya/turbowarp-extension-data-editor";
7
+ const alias = { ...config.resolve?.alias };
8
+ for (const entry of ["index", "rjsf", "react", "turbowarp", "schema"]) {
9
+ alias[`${prefix}${entry === "index" ? "" : `/${entry}`}$`] = path.join(__dirname, "dist/webpack4", `${entry}.js`);
10
+ }
11
+ alias[`${prefix}/react/styles.css$`] = path.join(__dirname, "dist/react.css");
12
+ alias["react$"] = require.resolve("react", { paths: [hostRoot] });
13
+ for (const runtime of ["jsx-runtime", "jsx-dev-runtime"]) {
14
+ alias[`react/${runtime}.js$`] = require.resolve(`react/${runtime}`, { paths: [hostRoot] });
15
+ }
16
+ alias["react-dom$"] = require.resolve("react-dom", { paths: [hostRoot] });
17
+ return { ...config, resolve: { ...config.resolve, symlinks: true, alias } };
18
+ }
19
+ module.exports = { withBlockEditorWebpack4 };