provisional/idx-editor-feedback.md の合意事項と T-31 の仮決定に沿って、IdxPanel を捨てて ui/idx/ に一から書き直した。 並びのリストは置かず、左にバリアントのツリー、中央のキャンバスでドラッグして並べ替え、右にプリセット・取り込み・未登録の登録を置いた。 - order の操作(隠れたキーのくっつき先、挿入、入れ替え、連番の並べ直し)を domain/idxOrder.ts に、 走査・半身の分割・行の割り当てのずらし・マトリクス順を domain/idxScan.ts に、純粋関数として置いた。行と列の判定は rows.ts をそのまま使う - QMK keyboard.json・VIA定義・KLE JSON の取り込みは、位置と回転で表示中のキーに照合する(io/layoutImport.ts、domain/idxImport.ts) - 回転したキーでも出力番号を正立させる - Codex の設定ファイルが壊れていて起動できなかったため、実装は Claude が直接行った - 検証: vue-tsc 0件、Vitest 101件(うち新規17件)、Playwright 48件(IDX 8件を書き直し)、prettier --check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GzX13A7HseQz9n6etGbFDg
22 lines
636 B
TypeScript
22 lines
636 B
TypeScript
import type { Direction, ScanKind } from "../../domain/idxScan";
|
|
|
|
/** Preset choices in the side pane. `matrix` sorts by ELC row → col instead of scanning. T-31. */
|
|
export type PresetSettings = {
|
|
target: "all" | "selection";
|
|
kind: ScanKind | "matrix";
|
|
direction: Direction;
|
|
left: Direction;
|
|
right: Direction;
|
|
};
|
|
|
|
export const defaultPresetSettings = (): PresetSettings => ({
|
|
target: "all",
|
|
kind: "rows",
|
|
direction: "normal",
|
|
left: "normal",
|
|
right: "normal",
|
|
});
|
|
|
|
/** Line colors of the preview, cycled by line index. */
|
|
export const lineColors = ["#1769d2", "#d2691e", "#2e8b57", "#9b30d9", "#c0392b", "#00838f"];
|