Update documentation for version 2.0.0

- Add comprehensive v2.0.0 changelog entry with all new features
- Document SGF editor mode with sgf/sgf-edit code block distinction
- Add usage examples for both view mode and edit mode
- Update feature lists with editor capabilities:
  - Interactive editing (add/remove stones, labels)
  - Comment editor
  - Game info editor
  - Move deletion
  - SGF output display
  - Auto-play mode
- Add move parameter documentation for embedded SGF files
- Update both English and Japanese documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
j2masamitu 2025-11-19 00:55:47 +09:00
parent 2fe3317de7
commit ac78d3f137
3 changed files with 119 additions and 8 deletions

View file

@ -5,6 +5,51 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.0.0] - 2025-11-19
### Added
- **SGF Editor Mode**: Interactive editing capabilities for SGF files and code blocks
- View/Edit mode toggle button for switching between viewing and editing
- Multiple edit modes:
- **Add stones**: Place black or white stones on the board
- **Remove stones**: Remove stones from the board
- **Add labels**: Add text labels to intersections
- Label input field with real-time preview when in label mode
- **Comment Editor**: Edit and save comments for the current position
- Save comment button with visual feedback
- Comments are preserved in the SGF structure
- **Game Information Editor**: Edit game metadata
- Black player name and rank
- White player name and rank
- Game name/title
- All changes are reflected in the SGF output
- **Move Deletion**: Delete moves from the current position onwards
- "Delete from here" button with confirmation
- Removes all subsequent moves in the game tree
- **SGF Output Display**: View and export the edited SGF
- Real-time SGF generation as you edit
- Read-only textarea showing the complete SGF string
- Easy copy-paste for sharing or saving edited games
- **Auto-play Mode**: Automatic move playback with controls
- Play/Pause button for starting and stopping auto-play
- 1-second interval between moves
- Automatically stops at the end of the game
- **Enhanced Viewer Mode**: New parameter support for embedded SGF files
- `move` parameter: Start at a specific move number (e.g., `![[game.sgf|move=10]]`)
- Initial position display on load
### Changed
- Improved UI layout with better organization of controls
- Editor controls are shown only when in edit mode
- Game info display is updated dynamically when edited
- All UI text updated to sentence case for consistency
### Technical
- Added ESLint configuration for code quality
- Implemented proper CSS class-based element visibility
- Enhanced SGF tree manipulation and regeneration
- Improved state management for edit modes
## [1.2.2] - 2025-11-16
### Fixed

View file

@ -11,10 +11,25 @@ An Obsidian plugin that displays SGF (Smart Game Format) files and code blocks a
### Core Features
- **📱 Mobile & Desktop Support**: Full functionality on iOS, Android, Windows, Mac, and Linux
- **SGF Code Block Support**: Automatically renders SGF text in ````sgf` code blocks as interactive Go boards
- **SGF File Embedding**: Display `.sgf` files using `![[game.sgf]]` syntax
- **SGF File Embedding**: Display `.sgf` files using `![[game.sgf]]` syntax with optional parameters
- `move` parameter: Start at a specific move number (e.g., `![[game.sgf|move=10]]`)
- **Direct File Opening**: Open `.sgf` files directly in Obsidian
- **Game Information Display**: Shows player names, ranks, event, date, komi, handicap, and result
### SGF Editor (New in v2.0.0)
- **View/Edit Mode Selection**: Choose mode by code block language tag
- ````sgf` - View-only mode (default): Navigate and view games with full playback controls
- ````sgf-edit` - Edit mode: Interactive editing with board manipulation
- **Interactive Editing**: Click on the board to make changes
- **Add stones**: Place black or white stones
- **Remove stones**: Remove existing stones
- **Add labels**: Add custom text labels to intersections
- **Comment Editor**: Edit and save comments for the current position
- **Game Info Editor**: Edit player names, ranks, and game title
- **Move Deletion**: Delete moves from current position onwards
- **SGF Output**: View and copy the edited SGF text in real-time
- **Auto-play Mode**: Automatic move playback with play/pause controls (view mode only)
### Playback & Navigation
- **Playback Controls**: Navigate through game moves with First/Previous/Next/Last buttons
- **Move Comments**: Display comments associated with each move
@ -88,9 +103,9 @@ Development mode watches for file changes and automatically rebuilds.
## Usage
### Method 1: SGF Code Block
### Method 1: SGF Code Block (View Mode)
Add an SGF code block to your markdown note:
Add an SGF code block to your markdown note for viewing:
````markdown
```sgf
@ -100,6 +115,25 @@ Add an SGF code block to your markdown note:
```
````
### Method 1b: SGF Code Block (Edit Mode)
Use `sgf-edit` language tag to enable editing:
````markdown
```sgf-edit
(;SZ[19];B[pd]C[Star point]
;W[dp];B[qp];W[dc];B[nq]
;W[qc]C[A direct 33 invasion])
```
````
In edit mode, you can:
- Click on intersections to add/remove stones or labels
- Edit comments for the current position
- Edit game information (player names, ranks, etc.)
- Delete moves from the current position
- Copy the edited SGF from the output area
### Method 2: Embed SGF File
1. Add an `.sgf` file to your vault
@ -185,7 +219,6 @@ Click a variation button to switch between branches.
## Known Limitations
- Does not support game editing (view-only)
- Time information (BL, WL) is not displayed
- Some advanced SGF properties may not be fully supported

View file

@ -11,10 +11,25 @@ SGFSmart Game Formatファイルやコードブロックを、再生機能
### 主要機能
- **📱 モバイル・デスクトップ対応**: iOS、Android、Windows、Mac、Linuxで完全に動作
- **SGFコードブロック対応**: ````sgf`コードブロック内のSGFテキストを自動的に碁盤として描画
- **SGFファイル埋め込み対応**: `![[game.sgf]]`構文で`.sgf`ファイルを表示
- **SGFファイル埋め込み対応**: `![[game.sgf]]`構文で`.sgf`ファイルを表示、オプションパラメータ対応
- `move`パラメータ: 特定の手数から表示を開始(例: `![[game.sgf|move=10]]`
- **直接ファイルを開く**: `.sgf`ファイルをObsidian内で直接開いて表示
- **対局情報の表示**: 対局者名、棋力、棋戦名、日付、コミ、置石、結果を表示
### SGF編集機能v2.0.0の新機能)
- **閲覧/編集モード選択**: コードブロックの言語タグでモードを選択
- ````sgf` - 閲覧専用モード(デフォルト): 完全な再生コントロールで棋譜を閲覧・ナビゲート
- ````sgf-edit` - 編集モード: 碁盤操作によるインタラクティブ編集
- **インタラクティブ編集**: 碁盤をクリックして変更を加える
- **石を追加**: 黒石または白石を配置
- **石を削除**: 既存の石を削除
- **ラベル追加**: 交点にカスタムテキストラベルを追加
- **コメント編集**: 現在の局面のコメントを編集・保存
- **対局情報編集**: 対局者名、棋力、対局名を編集
- **手の削除**: 現在の局面以降の手を削除
- **SGF出力**: 編集されたSGFテキストをリアルタイムで表示・コピー
- **自動再生モード**: 再生/一時停止コントロール付きの自動再生機能(閲覧モードのみ)
### 再生・ナビゲーション
- **再生コントロール**: 最初/前/次/最後のボタンで棋譜を再生
- **手のコメント表示**: 各手に関連付けられたコメントを表示
@ -88,9 +103,9 @@ npm run dev
## 使い方
### 方法1: SGFコードブロック
### 方法1: SGFコードブロック(閲覧モード)
マークダウンートにSGFコードブロックを追加:
閲覧用にマークダウンートにSGFコードブロックを追加:
````markdown
```sgf
@ -100,6 +115,25 @@ B[qp];W[dc];B[nq]
```
````
### 方法1b: SGFコードブロック編集モード
編集を有効にするには`sgf-edit`言語タグを使用:
````markdown
```sgf-edit
(;SZ[19];B[pd]C[初手は星];W[dp];
B[qp];W[dc];B[nq]
;W[qc]C[ダイレクト三々])
```
````
編集モードでは以下のことができます:
- 交点をクリックして石やラベルを追加/削除
- 現在の局面のコメントを編集
- 対局情報(対局者名、棋力など)を編集
- 現在の局面から手を削除
- 出力エリアから編集されたSGFをコピー
### 方法2: SGFファイルの埋め込み
1. vaultに`.sgf`ファイルを追加
@ -185,7 +219,6 @@ SGFマーカーは赤色変化図は青色で表示されます:
## 既知の制限
- 棋譜編集機能なし(閲覧のみ)
- 時間情報BL、WLは表示されません
- 一部の高度なSGFプロパティは完全にサポートされていない場合があります