@kubohiroya/turbowarp-markdown 0.3.0 → 0.5.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
@@ -6,6 +6,15 @@
6
6
 
7
7
  TurboWarp 上で Markdown を immutable な構造化フラグメントとして組み立て、最後の出力境界でだけ Markdown 文字列へレンダリングする拡張です。
8
8
 
9
+ ## 実行できるサンプル
10
+
11
+ [**TurboWarp Editorでデモを開く**](https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-markdown%2Fsamples%2Fbuild-markdown-card.sb3) · [SB3をダウンロード](https://kubohiroya.github.io/turbowarp-markdown/samples/build-markdown-card.sb3)
12
+
13
+ **Allow**で読み込みを許可し、緑の旗を押します。
14
+ `heading`・`bold`・`paragraph`・`render`で短い紹介文を生成し、結果のMarkdown文字列を表示。サンプルの元データと期待結果は[`samples/README.md`](samples/README.md)に記載しています。
15
+
16
+ `pnpm run samples:build`でSB3を再生成し、`pnpm run samples:check`で更新漏れと生成処理を確認します。
17
+
9
18
  ## 概要
10
19
 
11
20
  - エスケープ済み text、bold、italic、link、inline code を作れます。
@@ -22,6 +31,7 @@ TurboWarp 上で Markdown を immutable な構造化フラグメントとして
22
31
  ## 開発
23
32
 
24
33
  ```bash
34
+ npm install --global corepack@latest
25
35
  corepack enable
26
36
  pnpm install --frozen-lockfile
27
37
  pnpm run check
package/README.md CHANGED
@@ -6,6 +6,16 @@ English | [日本語](README.ja.md)
6
6
 
7
7
  A TurboWarp extension for building Markdown as immutable structured fragments and rendering it only at the output boundary.
8
8
 
9
+ ## Runnable sample
10
+
11
+ [**Open the demo in TurboWarp Editor**](https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-markdown%2Fsamples%2Fbuild-markdown-card.sb3) · [Download the SB3](https://kubohiroya.github.io/turbowarp-markdown/samples/build-markdown-card.sb3)
12
+
13
+ Choose **Allow** and click the green flag.
14
+ A heading and a bold Ready paragraph as Markdown text.
15
+
16
+ Editable sources and expected results: [`samples/README.md`](samples/README.md).
17
+ Run `pnpm run samples:build` after source/bundle changes and `pnpm run samples:check` before committing.
18
+
9
19
  ## What it does
10
20
 
11
21
  - creates escaped inline text, bold, italic, links, and code spans;
@@ -17,7 +27,7 @@ A TurboWarp extension for building Markdown as immutable structured fragments an
17
27
 
18
28
  ## Requirements and safety
19
29
 
20
- - Node.js 22 or newer;
30
+ - Node.js 24 or newer;
21
31
  - pnpm through Corepack;
22
32
  - TurboWarp's unsandboxed extension option is not required.
23
33
 
@@ -26,6 +36,7 @@ Plain text is escaped instead of treated as raw Markdown. The initial version in
26
36
  ## Installation
27
37
 
28
38
  ```bash
39
+ npm install --global corepack@latest
29
40
  corepack enable
30
41
  pnpm install --frozen-lockfile
31
42
  ```
@@ -33,7 +44,7 @@ pnpm install --frozen-lockfile
33
44
  The package is version-pinned when used from npm:
34
45
 
35
46
  ```bash
36
- pnpm add --save-exact @kubohiroya/turbowarp-markdown@0.3.0
47
+ pnpm add --save-exact @kubohiroya/turbowarp-markdown@0.5.0
37
48
  ```
38
49
 
39
50
  ## Quick Start
@@ -20,7 +20,7 @@ var extensionConfig = {
20
20
  blockIconURI: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OCA0OCI+PHJlY3QgeD0iNiIgeT0iOCIgd2lkdGg9IjM2IiBoZWlnaHQ9IjMyIiByeD0iNCIgZmlsbD0iIzJGNjM4NiIvPjxwYXRoIGQ9Ik0xMyAzMFYxOGw1IDcgNS03djEyTTI3LjUgMjB2MTBNMjcuNSAyMGgyLjVhNSA1IDAgMCAxIDAgMTBoLTIuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg=="
21
21
  };
22
22
  //#endregion
23
- //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.3.4_react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/fixed-input-schema.js
23
+ //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.5.0_react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/fixed-input-schema.js
24
24
  var numberToken = /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u;
25
25
  var invalidNumber = Object.freeze({
26
26
  kind: "invalid",
package/docs/index.html CHANGED
@@ -65,6 +65,9 @@ render Markdown [combined result]</code></pre>
65
65
 
66
66
  <h2>TypeScript API</h2>
67
67
  <p>The package also exports block-free builder functions from <code>@kubohiroya/turbowarp-markdown</code>, including <code>text</code>, <code>bold</code>, <code>italic</code>, <code>link</code>, <code>heading</code>, <code>paragraph</code>, <code>quote</code>, <code>codeBlock</code>, <code>listItem</code>, <code>unorderedList</code>, <code>orderedList</code>, <code>concat</code>, and <code>render</code>.</p>
68
+ <section id="runnable-sample"><h2>Runnable sample / 実行できるサンプル</h2>
69
+ <p><a href="https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-markdown%2Fsamples%2Fbuild-markdown-card.sb3">Open in TurboWarp Editor</a> · <a href="https://kubohiroya.github.io/turbowarp-markdown/samples/build-markdown-card.sb3">Download build-markdown-card.sb3</a></p>
70
+ <p>A heading and a bold Ready paragraph as Markdown text.</p><p>Allowで読み込みを許可し、緑の旗を押します。</p></section>
68
71
  <!-- BEGIN COMPLETE BLOCK REFERENCE -->
69
72
  <section lang="en" id="extension-block-reference" aria-labelledby="block-reference-title">
70
73
  <h2 id="block-reference-title">TurboWarp Markdown: complete block reference</h2>
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-markdown",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "An immutable Markdown builder extension for TurboWarp.",
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-markdown#readme",
8
12
  "repository": {
@@ -40,9 +44,9 @@
40
44
  "access": "public",
41
45
  "registry": "https://registry.npmjs.org/"
42
46
  },
43
- "packageManager": "pnpm@11.11.0",
47
+ "packageManager": "pnpm@11.28.8",
44
48
  "engines": {
45
- "node": ">=22.18.0"
49
+ "node": ">=24"
46
50
  },
47
51
  "scripts": {
48
52
  "dev": "vite build --watch",
@@ -55,24 +59,27 @@
55
59
  "template:readme": "node scripts/apply-readme-template.ts",
56
60
  "repo:check": "node scripts/check-repo.ts",
57
61
  "pack:check": "npm pack --dry-run --ignore-scripts",
58
- "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",
59
- "check:dist": "pnpm run build && node scripts/check-dist.ts"
62
+ "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",
63
+ "check:dist": "pnpm run build && node scripts/check-dist.ts",
64
+ "samples:build": "node scripts/build-samples.mjs",
65
+ "samples:check": "node scripts/build-samples.mjs --check && node --test scripts/verify-samples.mjs",
66
+ "pages:build": "node scripts/prepare-pages.mjs"
60
67
  },
61
68
  "devDependencies": {
62
69
  "@eslint/js": "^9.39.5",
63
- "@kubohiroya/turbowarp-extension-manifest": "^0.3.2",
64
- "@kubohiroya/vite-plugin-turbowarp-extension": "^0.8.0",
70
+ "@kubohiroya/turbowarp-extension-manifest": "^0.5.0",
71
+ "@kubohiroya/vite-plugin-turbowarp-extension": "^0.10.0",
65
72
  "@types/node": "^24.13.3",
66
73
  "eslint": "^9.39.5",
67
74
  "typescript": "^5.9.3",
68
75
  "typescript-eslint": "^8.66.0",
69
76
  "vite": "^8.2.2",
70
77
  "vitest": "^4.1.10",
71
- "@kubohiroya/turbowarp-extension-data-editor": "^0.3.4"
78
+ "@kubohiroya/turbowarp-extension-data-editor": "^0.5.0"
72
79
  },
73
- "gitHead": "23c6fc48d20d69219b8ba6e5e2ab5c7e674623fc",
80
+ "gitHead": "a02baff13a8da2f82f8807d33fdc6c50e8505cb4",
74
81
  "x-turbowarp-source": {
75
- "revision": "23c6fc48d20d69219b8ba6e5e2ab5c7e674623fc",
82
+ "revision": "a02baff13a8da2f82f8807d33fdc6c50e8505cb4",
76
83
  "revisionRole": "base-commit",
77
84
  "sourceState": "local-release-overlay"
78
85
  }