@kubohiroya/turbowarp-react-islands 0.5.0 → 0.6.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,10 +2,22 @@
2
2
 
3
3
  <img src="assets/block-icon.svg" alt="" width="48" height="48">
4
4
 
5
- [English](README.md)
5
+ [English](README.md) | 日本語
6
6
 
7
7
  `turbowarp-http-server` と `turbowarp-html` で作るHTMLレスポンスの一部に、Reactコンポーネントを island として埋め込むためのTurboWarp拡張とTypeScriptヘルパーです。
8
8
 
9
+ ## 実行できるサンプル
10
+
11
+ [**TurboWarp Editorでデモを開く**](https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-react-islands%2Fsamples%2Fdescribe-counter-island.sb3) · [SB3をダウンロード](https://kubohiroya.github.io/turbowarp-react-islands/samples/describe-counter-island.sb3)
12
+
13
+ **Allow**で許可し、緑の旗を押します。
14
+ 3つの確認結果がtrueになります。変数一覧には実際のJSON descriptor・HTML・registry全文も保持します。宣言生成のみのデモでReactの描画やhydrationは行いません。Counterのmoduleパスは登録する文字列であり、このデモでは取得しません。React本体・HTTPホスト・外部bundleは不要です。
15
+
16
+
17
+
18
+ 元データと期待結果: [`samples/README.md`](samples/README.md).
19
+ `pnpm run samples:build` / `pnpm run samples:check` / `pnpm run pages:build`
20
+
9
21
  ## 位置づけ
10
22
 
11
23
  このパッケージでは、Reactをアプリ全体の記述言語ではなく「リッチなGUI部品」として扱います。想定する役割分担は次の通りです。
@@ -21,7 +33,7 @@ MVPでは、TurboWarp内でReactを実行しきることはしません。まず
21
33
  ## インストール
22
34
 
23
35
  ```bash
24
- pnpm add --save-exact @kubohiroya/turbowarp-react-islands@0.5.0
36
+ pnpm add --save-exact @kubohiroya/turbowarp-react-islands@0.6.0
25
37
  ```
26
38
 
27
39
  ## できること
package/README.md CHANGED
@@ -2,11 +2,23 @@
2
2
 
3
3
  <img src="assets/block-icon.svg" alt="" width="48" height="48">
4
4
 
5
- [日本語](README.ja.md)
5
+ English | [日本語](README.ja.md)
6
6
 
7
7
  TurboWarp extension and TypeScript helpers for describing React islands inside
8
8
  HTML responses produced by `turbowarp-http-server` and `turbowarp-html`.
9
9
 
10
+ ## Runnable sample
11
+
12
+ [**Open the demo in TurboWarp Editor**](https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-react-islands%2Fsamples%2Fdescribe-counter-island.sb3) · [Download the SB3](https://kubohiroya.github.io/turbowarp-react-islands/samples/describe-counter-island.sb3)
13
+
14
+ Choose **Allow** and click the green flag.
15
+ Three checks become true; full JSON and HTML remain in variables. This demo generates declarations only; it does not render or hydrate React. The module path is a registration string and is not fetched. No React runtime, HTTP host, or external bundle is required.
16
+
17
+
18
+
19
+ Editable sources and expected results: [`samples/README.md`](samples/README.md).
20
+ `pnpm run samples:build` / `pnpm run samples:check` / `pnpm run pages:build`
21
+
10
22
  ## Positioning
11
23
 
12
24
  This package treats React as a rich GUI part, not as the whole programming
@@ -24,7 +36,7 @@ descriptors and HTML fragments that a later build step can consume.
24
36
  ## Installation
25
37
 
26
38
  ```bash
27
- pnpm add --save-exact @kubohiroya/turbowarp-react-islands@0.5.0
39
+ pnpm add --save-exact @kubohiroya/turbowarp-react-islands@0.6.0
28
40
  ```
29
41
 
30
42
  ## What it does
@@ -8805,7 +8805,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8805
8805
  module.exports.fastUri = fastUri;
8806
8806
  }));
8807
8807
  //#endregion
8808
- //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/schema-json.js
8808
+ //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/schema-json.js
8809
8809
  var JsonSnapshotError = class extends Error {
8810
8810
  constructor(kind, dataPath) {
8811
8811
  super("JSON snapshot failed.");
@@ -8867,7 +8867,7 @@ function isJsonRecord(value) {
8867
8867
  return value !== null && typeof value === "object" && !Array.isArray(value);
8868
8868
  }
8869
8869
  //#endregion
8870
- //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/schema-engine.js
8870
+ //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/schema-engine.js
8871
8871
  var import_ajv = require_ajv();
8872
8872
  var import__2020 = require__2020();
8873
8873
  var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
@@ -9213,7 +9213,7 @@ function compileSchemaBundle(input) {
9213
9213
  }
9214
9214
  }
9215
9215
  //#endregion
9216
- //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/schema-compose.js
9216
+ //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.5.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/schema-compose.js
9217
9217
  function deepFreeze(value) {
9218
9218
  if (value !== null && typeof value === "object") {
9219
9219
  Object.values(value).forEach(deepFreeze);
package/docs/index.html CHANGED
@@ -61,5 +61,5 @@
61
61
  page in a shadow root, so it cannot disturb the styles below. -->
62
62
  <script type="module"
63
63
  src="https://kubohiroya.github.io/turbowarp-plus-site-header/dist/auto.js"></script>
64
- </body>
64
+ <section id="runnable-sample"><h2>Runnable sample / 実行できるサンプル</h2><p><a href="https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-react-islands%2Fsamples%2Fdescribe-counter-island.sb3">Open in TurboWarp Editor</a> · <a href="https://kubohiroya.github.io/turbowarp-react-islands/samples/describe-counter-island.sb3">Download SB3</a></p><p>Three checks become true; full JSON and HTML remain in variables.</p></section></body>
65
65
  </html>
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-react-islands",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "TurboWarp extension and helpers for describing React islands in turbowarp-http-server HTML responses.",
5
- "author": "Hiroya Kubo <hiroya@cuc.ac.jp>",
5
+ "author": {
6
+ "name": "Hiroya Kubo",
7
+ "email": "hiroya@cuc.ac.jp",
8
+ "url": "https://github.com/kubohiroya"
9
+ },
6
10
  "license": "MPL-2.0",
7
11
  "homepage": "https://github.com/kubohiroya/turbowarp-react-islands#readme",
8
12
  "repository": {
@@ -58,13 +62,16 @@
58
62
  "docs:check": "pnpm run docs && git diff --exit-code -- README.md",
59
63
  "repo:check": "node scripts/check-repo.ts",
60
64
  "pack:check": "npm pack --dry-run --ignore-scripts",
61
- "check": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run docs:check && pnpm run check:dist && pnpm run repo:check && pnpm run pack:check",
62
- "check:dist": "pnpm run build && node scripts/check-dist.ts"
65
+ "check": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run docs:check && pnpm run check:dist && pnpm run repo:check && pnpm run pack:check && pnpm run samples:check",
66
+ "check:dist": "pnpm run build && node scripts/check-dist.ts",
67
+ "samples:build": "node scripts/build-samples.mjs",
68
+ "samples:check": "node scripts/build-samples.mjs --check && node --test scripts/verify-samples.mjs",
69
+ "pages:build": "node scripts/prepare-pages.mjs"
63
70
  },
64
71
  "devDependencies": {
65
72
  "@eslint/js": "^9.39.5",
66
- "@kubohiroya/turbowarp-extension-manifest": "^0.4.0",
67
- "@kubohiroya/vite-plugin-turbowarp-extension": "^0.9.0",
73
+ "@kubohiroya/turbowarp-extension-manifest": "^0.5.0",
74
+ "@kubohiroya/vite-plugin-turbowarp-extension": "^0.10.0",
68
75
  "@types/node": "^24.13.3",
69
76
  "eslint": "^9.39.5",
70
77
  "typescript": "^5.9.3",
@@ -74,7 +81,7 @@
74
81
  "react-dom": "18.3.1"
75
82
  },
76
83
  "dependencies": {
77
- "@kubohiroya/turbowarp-extension-data-editor": "^0.4.0"
84
+ "@kubohiroya/turbowarp-extension-data-editor": "^0.5.0"
78
85
  },
79
86
  "gitHead": "78570baedc751aa5d6e1494eb13abb61eed8bc99",
80
87
  "x-turbowarp-source": {