Repository navigation
読書設定と白黒の昼夜配色を共有readerへ追加 - #17
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
読書中に文字サイズ(16〜32px)・行間(1.6〜2.4倍)・明朝/ゴシックを切り替えられるようにします。昼は白地に黒文字、夜は黒地に白文字とし、リンクとアクセントを青に統一します。再配置では表示中の文字を基準に読み位置を保ちます。
単独viewerと埋め込みで同じ設定と修正を使えるよう、共有readerを抽出しています。埋め込み用の表示・移動・位置API、インスタンスごとのCSS色指定、寿命管理を含みます。Core書式・parser・原稿は変更していません。ローカルで先行していた書棚テンプレートのサイトファイル・書き出し処理・過去の検証ログは、このPRには含めていません。
検証: macOS / Node 22.23.4でlint、strict型検査、Node 96件、build、三冊のCLI検証が成功。ヘッドレスChromium PC・狭幅・WebKit PCで、ルート72件と /YomPUB/ サブパス72件が全成功。WebKitの同一フォルダ再読込・中断/再生成・ホストリサイズの3シナリオも各5回成功。縦書きの字送りとルビ、横書き/左右縦書きの読み位置、先頭/末尾、リンク、設定値検証、複数readerの分離と破棄を確認しました。
設定はインスタンス内で保持し、ページ再読込を越える保存は行いません。実機モバイル・支援技術・長い実本での評価は未実施です。リサイズ通知は次フレームへ集約し、ホストの位置イベント処理がレイアウトを変更してもResizeObserverの通知ループへ戻らないようにしています。destroy時には予約を解除します。
Refs #16