@kubohiroya/turbowarp-diagnostic-overlay 0.1.0 → 0.1.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  このプロジェクトの注目すべき変更を記録します。形式は[Keep a Changelog](https://keepachangelog.com/ja/1.1.0/)に基づき、[Semantic Versioning](https://semver.org/lang/ja/)に従います。
4
4
 
5
+ ## [0.1.1] - 2026-08-06
6
+
7
+ ### Added
8
+
9
+ - English/JapaneseのGitHub Pages利用ガイド
10
+ - ドキュメントの構造とローカルリンクを検証するsite check
11
+ - Pagesの自動deploy workflow
12
+
13
+ ### Compatibility
14
+
15
+ - runtime API、ブロック、配布JavaScriptの挙動は0.1.0から変更なし
16
+ - 利用側は`@kubohiroya/turbowarp-diagnostic-overlay@0.1.0`へ固定してロールバック可能
17
+
5
18
  ## [0.1.0] - 2026-08-03
6
19
 
7
20
  ### Added
@@ -12,4 +25,5 @@
12
25
  - 表示、JSON表示、消去、表示中判定、SVG生成、最後の診断JSONブロック
13
26
  - 副作用のない`composition`、`diagnostic`、`svg-renderer` package exports
14
27
 
28
+ [0.1.1]: https://github.com/kubohiroya/turbowarp-diagnostic-overlay/releases/tag/v0.1.1
15
29
  [0.1.0]: https://github.com/kubohiroya/turbowarp-diagnostic-overlay/releases/tag/v0.1.0
package/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  構造化された診断データを安全なSVGテキストへ変換し、TurboWarpステージ上に表示する汎用機能拡張です。紙芝居DSLなど特定のアプリケーションには依存しません。
4
4
 
5
+ [English guide](https://kubohiroya.github.io/turbowarp-diagnostic-overlay/)と
6
+ [日本語ガイド](https://kubohiroya.github.io/turbowarp-diagnostic-overlay/ja/)では、導入、
7
+ Composition API、安全性、ライフサイクルをまとめています。
8
+
5
9
  ## 責務の境界
6
10
 
7
11
  このパッケージが担当するのは、診断データの検証、SVG生成、表示、更新、消去です。診断の発見、プロジェクトやScratchスレッドの停止、ログの永続化は利用側が担当します。
@@ -15,13 +19,13 @@ TurboWarp Desktopで[`dist/diagnostic-overlay.js`](dist/diagnostic-overlay.js)
15
19
  npmから利用する場合はバージョンを固定してください。
16
20
 
17
21
  ```bash
18
- pnpm add --save-exact @kubohiroya/turbowarp-diagnostic-overlay@0.1.0
22
+ pnpm add --save-exact @kubohiroya/turbowarp-diagnostic-overlay@0.1.1
19
23
  ```
20
24
 
21
25
  CDN上の単独機能拡張は次のURLです。
22
26
 
23
27
  ```text
24
- https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-diagnostic-overlay@0.1.0/dist/diagnostic-overlay.js
28
+ https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-diagnostic-overlay@0.1.1/dist/diagnostic-overlay.js
25
29
  ```
26
30
 
27
31
  ## 診断JSON
@@ -158,6 +162,14 @@ pnpm run release:check
158
162
 
159
163
  `dist/diagnostic-overlay.js`はレビュー可能な単一ファイルとしてGitに含めます。ブロック定義を変更した場合は`pnpm run docs`でREADMEを更新します。
160
164
 
165
+ ## リリース
166
+
167
+ リリースPRでは`package.json`、READMEと公開ガイドの固定バージョン、`CHANGELOG.md`を
168
+ 一致させます。mainのCIとPages deployが成功した後、そのマージコミットに
169
+ `v<version>` tagを作成します。tag pushによりGitHub Releaseと単独機能拡張の配布artifactが
170
+ 生成されます。npmには同じversionを一度だけpublishします。利用側は直前versionへ固定して
171
+ ロールバックできます。
172
+
161
173
  ## ライセンス
162
174
 
163
175
  MPL-2.0
package/docs/.nojekyll ADDED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,66 @@
1
+ :root {
2
+ color-scheme: light;
3
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
4
+ color: #172033;
5
+ background: #f4f7fb;
6
+ line-height: 1.65;
7
+ }
8
+
9
+ * { box-sizing: border-box; }
10
+ body { margin: 0; }
11
+ a { color: #2458a6; }
12
+ code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
13
+
14
+ .site-header {
15
+ background: #111a2c;
16
+ color: #fff;
17
+ }
18
+
19
+ .nav, main, footer {
20
+ width: min(72rem, calc(100% - 2rem));
21
+ margin: 0 auto;
22
+ }
23
+
24
+ .nav {
25
+ min-height: 4rem;
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: space-between;
29
+ gap: 1rem;
30
+ }
31
+
32
+ .nav a { color: #fff; text-decoration: none; }
33
+ .nav-links { display: flex; gap: 1rem; }
34
+
35
+ .hero { padding: 5rem 0 3rem; }
36
+ .eyebrow { color: #2e65b0; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
37
+ h1 { max-width: 18ch; font-size: clamp(2.3rem, 7vw, 4.8rem); line-height: 1.04; margin: .3rem 0 1.2rem; }
38
+ .lead { max-width: 48rem; font-size: 1.2rem; color: #46536a; }
39
+
40
+ .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
41
+ .card, .section {
42
+ background: #fff;
43
+ border: 1px solid #dce3ee;
44
+ border-radius: 1rem;
45
+ box-shadow: 0 .6rem 1.8rem rgba(28, 43, 69, .07);
46
+ }
47
+ .card { padding: 1.4rem; }
48
+ .section { padding: clamp(1.3rem, 4vw, 2.4rem); margin: 1.2rem 0; }
49
+ .section h2, .card h2, .card h3 { margin-top: 0; }
50
+
51
+ pre {
52
+ overflow-x: auto;
53
+ padding: 1rem;
54
+ border-radius: .7rem;
55
+ color: #e7eefc;
56
+ background: #172033;
57
+ }
58
+
59
+ .badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; background: #e5eefc; color: #234f8d; font-weight: 700; }
60
+ footer { padding: 2rem 0 3rem; color: #5a6679; }
61
+
62
+ @media (max-width: 38rem) {
63
+ .nav { align-items: flex-start; padding: 1rem 0; }
64
+ .nav-links { flex-wrap: wrap; justify-content: flex-end; }
65
+ .hero { padding-top: 3rem; }
66
+ }
@@ -0,0 +1,63 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <meta name="description" content="Guide for rendering structured diagnostics as safe SVG overlays in TurboWarp.">
7
+ <title>Diagnostic Overlay — Guide</title>
8
+ <link rel="canonical" href="https://kubohiroya.github.io/turbowarp-diagnostic-overlay/">
9
+ <link rel="alternate" hreflang="en" href="https://kubohiroya.github.io/turbowarp-diagnostic-overlay/">
10
+ <link rel="alternate" hreflang="ja" href="https://kubohiroya.github.io/turbowarp-diagnostic-overlay/ja/">
11
+ <link rel="stylesheet" href="./assets/site.css">
12
+ </head>
13
+ <body>
14
+ <header class="site-header">
15
+ <nav class="nav" aria-label="Guide navigation">
16
+ <a href="./"><strong>Diagnostic Overlay</strong></a>
17
+ <span class="nav-links">
18
+ <a href="https://github.com/kubohiroya/turbowarp-diagnostic-overlay">GitHub</a>
19
+ <a href="./" hreflang="en">EN</a>
20
+ <a href="./ja/" hreflang="ja" lang="ja">日本語</a>
21
+ </span>
22
+ </nav>
23
+ </header>
24
+ <main>
25
+ <section class="hero">
26
+ <p class="eyebrow">TurboWarp extension · v0.1.1</p>
27
+ <h1>Diagnostics people can read safely.</h1>
28
+ <p class="lead">Validate one structured diagnostic, render escaped SVG, and keep a non-interactive overlay aligned with the TurboWarp stage.</p>
29
+ </section>
30
+
31
+ <section class="grid" aria-label="Responsibilities">
32
+ <article class="card"><span class="badge">Validate</span><h2>Strict input</h2><p>Severity, code, message, optional detail, and source location are normalized before rendering.</p></article>
33
+ <article class="card"><span class="badge">Render</span><h2>Safe SVG text</h2><p>Untrusted strings are XML-escaped and never become element names, attributes, colors, or URLs.</p></article>
34
+ <article class="card"><span class="badge">Display</span><h2>Stage-aligned overlay</h2><p>The host follows renderer canvas size changes and uses <code>pointer-events: none</code>.</p></article>
35
+ </section>
36
+
37
+ <section class="section" id="install">
38
+ <h2>Install the reviewed build</h2>
39
+ <pre><code>pnpm add --save-exact @kubohiroya/turbowarp-diagnostic-overlay@0.1.1</code></pre>
40
+ <p>For the standalone extension, load this pinned URL without sandboxing:</p>
41
+ <pre><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-diagnostic-overlay@0.1.1/dist/diagnostic-overlay.js</code></pre>
42
+ </section>
43
+
44
+ <section class="section" id="composition">
45
+ <h2>Composition API</h2>
46
+ <p>Importing the package does not register a TurboWarp extension. The composition root explicitly creates the extension and controller, then registers it once.</p>
47
+ <pre><code>import {createDiagnosticOverlayComposition} from
48
+ '@kubohiroya/turbowarp-diagnostic-overlay/composition';
49
+
50
+ const {extension, controller} = createDiagnosticOverlayComposition(Scratch);
51
+ Scratch.extensions.register(extension);
52
+ controller.show({severity: 'error', code: 'APP001', message: 'Check the input.'});</code></pre>
53
+ <p>The pure renderer is also available from <code>/svg-renderer</code>. See the <a href="./specification.md">complete 0.1 contract</a>.</p>
54
+ </section>
55
+
56
+ <section class="grid" aria-label="Lifecycle and boundaries">
57
+ <article class="card"><h2>Lifecycle</h2><p>A new diagnostic replaces the current one. Project load clears it. Runtime disposal releases DOM observers and listeners. Project stop intentionally leaves it visible.</p></article>
58
+ <article class="card"><h2>Caller responsibilities</h2><p>The caller discovers diagnostics, decides whether to stop Scratch threads or the VM, and owns persistence. This package does not know any application-specific DSL.</p></article>
59
+ </section>
60
+ </main>
61
+ <footer>TurboWarp Diagnostic Overlay · MPL-2.0 · <a href="https://github.com/kubohiroya/turbowarp-diagnostic-overlay/releases/tag/v0.1.1">Release v0.1.1</a></footer>
62
+ </body>
63
+ </html>
@@ -0,0 +1,63 @@
1
+ <!doctype html>
2
+ <html lang="ja">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <meta name="description" content="構造化診断を安全なSVGに変換してTurboWarpステージへ表示するDiagnostic Overlayの利用ガイド。">
7
+ <title>Diagnostic Overlay — 利用ガイド</title>
8
+ <link rel="canonical" href="https://kubohiroya.github.io/turbowarp-diagnostic-overlay/ja/">
9
+ <link rel="alternate" hreflang="en" href="https://kubohiroya.github.io/turbowarp-diagnostic-overlay/">
10
+ <link rel="alternate" hreflang="ja" href="https://kubohiroya.github.io/turbowarp-diagnostic-overlay/ja/">
11
+ <link rel="stylesheet" href="../assets/site.css">
12
+ </head>
13
+ <body>
14
+ <header class="site-header">
15
+ <nav class="nav" aria-label="ガイドのナビゲーション">
16
+ <a href="../"><strong>Diagnostic Overlay</strong></a>
17
+ <span class="nav-links">
18
+ <a href="https://github.com/kubohiroya/turbowarp-diagnostic-overlay">GitHub</a>
19
+ <a href="../" hreflang="en" lang="en">EN</a>
20
+ <a href="./" hreflang="ja">日本語</a>
21
+ </span>
22
+ </nav>
23
+ </header>
24
+ <main>
25
+ <section class="hero">
26
+ <p class="eyebrow">TurboWarp拡張機能 · v0.1.1</p>
27
+ <h1>診断を、安全に、読みやすく。</h1>
28
+ <p class="lead">1件の構造化診断を検証してXMLエスケープ済みSVGへ変換し、TurboWarpステージに追従する非操作型overlayとして表示します。</p>
29
+ </section>
30
+
31
+ <section class="grid" aria-label="主な責務">
32
+ <article class="card"><span class="badge">検証</span><h2>厳密な入力</h2><p>severity、code、messageと任意のdetail・source位置を表示前に正規化します。</p></article>
33
+ <article class="card"><span class="badge">描画</span><h2>安全なSVG text</h2><p>外部文字列をXMLエスケープし、要素名、属性、色、URLとしては使用しません。</p></article>
34
+ <article class="card"><span class="badge">表示</span><h2>ステージへ追従</h2><p>renderer canvasのサイズ変更を追跡し、<code>pointer-events: none</code>で入力を妨げません。</p></article>
35
+ </section>
36
+
37
+ <section class="section" id="install">
38
+ <h2>レビュー済みビルドを導入</h2>
39
+ <pre><code>pnpm add --save-exact @kubohiroya/turbowarp-diagnostic-overlay@0.1.1</code></pre>
40
+ <p>単独機能拡張は、次の固定URLをサンドボックスなしで読み込みます。</p>
41
+ <pre><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-diagnostic-overlay@0.1.1/dist/diagnostic-overlay.js</code></pre>
42
+ </section>
43
+
44
+ <section class="section" id="composition">
45
+ <h2>Composition API</h2>
46
+ <p>packageをimportしただけではTurboWarpへ登録しません。composition rootがextensionとcontrollerを明示的に作成し、1度だけ登録します。</p>
47
+ <pre><code>import {createDiagnosticOverlayComposition} from
48
+ '@kubohiroya/turbowarp-diagnostic-overlay/composition';
49
+
50
+ const {extension, controller} = createDiagnosticOverlayComposition(Scratch);
51
+ Scratch.extensions.register(extension);
52
+ controller.show({severity: 'error', code: 'APP001', message: '入力を確認してください。'});</code></pre>
53
+ <p>純粋rendererは<code>/svg-renderer</code>から利用できます。詳細は<a href="../specification.md">0.1仕様</a>を参照してください。</p>
54
+ </section>
55
+
56
+ <section class="grid" aria-label="ライフサイクルと責務境界">
57
+ <article class="card"><h2>ライフサイクル</h2><p>新しい診断は現在の表示を置換します。プロジェクト読込時に消去し、runtime dispose時にDOM observerとlistenerを解放します。project stop後は原因を読めるよう表示を残します。</p></article>
58
+ <article class="card"><h2>利用側の責務</h2><p>診断の発見、Scratch threadやVMを止める判断、永続化は利用側が行います。このpackageはアプリ固有DSLを知りません。</p></article>
59
+ </section>
60
+ </main>
61
+ <footer>TurboWarp Diagnostic Overlay · MPL-2.0 · <a href="https://github.com/kubohiroya/turbowarp-diagnostic-overlay/releases/tag/v0.1.1">Release v0.1.1</a></footer>
62
+ </body>
63
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-diagnostic-overlay",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Render structured diagnostics as safe SVG overlays on the TurboWarp stage.",
5
5
  "keywords": [
6
6
  "turbowarp",
@@ -20,7 +20,7 @@
20
20
  "bugs": {
21
21
  "url": "https://github.com/kubohiroya/turbowarp-diagnostic-overlay/issues"
22
22
  },
23
- "homepage": "https://github.com/kubohiroya/turbowarp-diagnostic-overlay#readme",
23
+ "homepage": "https://kubohiroya.github.io/turbowarp-diagnostic-overlay/",
24
24
  "files": [
25
25
  "dist/",
26
26
  "docs/",
@@ -70,10 +70,11 @@
70
70
  "audit": "pnpm audit --prod --audit-level high",
71
71
  "docs": "node scripts/generate-readme.mjs",
72
72
  "docs:check": "node scripts/generate-readme.mjs --check",
73
+ "site:check": "node scripts/check-site.mjs",
73
74
  "check:dist": "pnpm run build && git diff --exit-code -- dist",
74
75
  "pack:check": "npm pack --dry-run --ignore-scripts",
75
76
  "release:check": "npm publish --dry-run --access public --ignore-scripts",
76
- "check": "pnpm run audit && pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run build && pnpm run docs:check && pnpm run check:dist && pnpm run pack:check",
77
+ "check": "pnpm run audit && pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run build && pnpm run docs:check && pnpm run site:check && pnpm run check:dist && pnpm run pack:check",
77
78
  "prepublishOnly": "pnpm run check"
78
79
  },
79
80
  "devDependencies": {