@14ch/svelte-md-outliner 0.0.22 → 0.0.24
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
|
@@ -5,10 +5,29 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.0.24] - 2026-10-28
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Horizontal table borders are darker and easier to see.
|
|
13
|
+
`--markdown-editor-border-strong` now uses the 400 step of the neutral
|
|
14
|
+
scale (previously 300) in both light and dark schemes.
|
|
15
|
+
|
|
16
|
+
## [0.0.23] - 2026-10-23
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Pressing Backspace while composing with an IME no longer leaves the editor
|
|
21
|
+
unable to commit the conversion or move the cursor. Keys pressed during
|
|
22
|
+
composition, including Tab and Enter, are now left to the IME.
|
|
23
|
+
|
|
8
24
|
## [0.0.22] - 2026-10-23
|
|
9
25
|
|
|
10
26
|
### Fixed
|
|
11
27
|
|
|
28
|
+
- IME composition no longer reports Backspace or Enter as handled without
|
|
29
|
+
applying the change, allowing DOM edits and subsequent cursor movement to proceed.
|
|
30
|
+
|
|
12
31
|
- Pasting Markdown containing headings and tables now preserves the heading
|
|
13
32
|
hierarchy when the clipboard also contains HTML.
|
|
14
33
|
|
|
@@ -184,11 +184,11 @@
|
|
|
184
184
|
* 文書の内容としての区切りと、小さい部品の輪郭に使う
|
|
185
185
|
* - `border-weak` — 図の枠のような**コンテナの縁**と、**表の縦罫**。
|
|
186
186
|
* ポップアップとダイアログの枠もこの段である
|
|
187
|
-
* - `border-strong` —
|
|
187
|
+
* - `border-strong` — **表の横罫**。行の区切りは読み進む向きを支えるので、`border` より強く引く
|
|
188
188
|
*/
|
|
189
189
|
--markdown-editor-border: var(--markdown-editor-base-200-transparent);
|
|
190
190
|
--markdown-editor-border-weak: var(--markdown-editor-base-100-transparent);
|
|
191
|
-
--markdown-editor-border-strong: var(--markdown-editor-base-
|
|
191
|
+
--markdown-editor-border-strong: var(--markdown-editor-base-400-transparent);
|
|
192
192
|
/**
|
|
193
193
|
* 深さの目印(セクションと箇条書きの縦線)。**コンテナの縁とは意味が違うので別に持つ**
|
|
194
194
|
*。いま同じ濃さなのは結果にすぎない。
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
/**
|
|
322
322
|
* 表。**縦の罫線と横の罫線は別の線である**。
|
|
323
323
|
* 横は行の区切りなので、はしごのいちばん強い段で引く。縦は列の仕切りにすぎないので
|
|
324
|
-
*
|
|
324
|
+
* 弱い段で引くと、行が読み進む向きに続いて見える。
|
|
325
325
|
*/
|
|
326
326
|
--markdown-editor-cell-border-x-color: var(--markdown-editor-border-weak);
|
|
327
327
|
--markdown-editor-cell-border-y-color: var(--markdown-editor-border-strong);
|
|
@@ -495,7 +495,7 @@
|
|
|
495
495
|
--markdown-editor-text-subtle: var(--markdown-editor-white-500-transparent);
|
|
496
496
|
--markdown-editor-border: var(--markdown-editor-white-200-transparent);
|
|
497
497
|
--markdown-editor-border-weak: var(--markdown-editor-white-100-transparent);
|
|
498
|
-
--markdown-editor-border-strong: var(--markdown-editor-white-
|
|
498
|
+
--markdown-editor-border-strong: var(--markdown-editor-white-400-transparent);
|
|
499
499
|
--markdown-editor-guide: var(--markdown-editor-white-100-transparent);
|
|
500
500
|
--markdown-editor-surface-accent: var(--markdown-editor-white-50-transparent);
|
|
501
501
|
--markdown-editor-accent: var(--markdown-editor-primary-lighter);
|
|
@@ -519,7 +519,7 @@
|
|
|
519
519
|
--markdown-editor-text-subtle: var(--markdown-editor-white-500-transparent);
|
|
520
520
|
--markdown-editor-border: var(--markdown-editor-white-200-transparent);
|
|
521
521
|
--markdown-editor-border-weak: var(--markdown-editor-white-100-transparent);
|
|
522
|
-
--markdown-editor-border-strong: var(--markdown-editor-white-
|
|
522
|
+
--markdown-editor-border-strong: var(--markdown-editor-white-400-transparent);
|
|
523
523
|
--markdown-editor-guide: var(--markdown-editor-white-100-transparent);
|
|
524
524
|
--markdown-editor-surface-accent: var(--markdown-editor-white-50-transparent);
|
|
525
525
|
--markdown-editor-accent: var(--markdown-editor-primary-lighter);
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
--markdown-editor-text-subtle: var(--markdown-editor-base-500-transparent);
|
|
549
549
|
--markdown-editor-border: var(--markdown-editor-base-200-transparent);
|
|
550
550
|
--markdown-editor-border-weak: var(--markdown-editor-base-100-transparent);
|
|
551
|
-
--markdown-editor-border-strong: var(--markdown-editor-base-
|
|
551
|
+
--markdown-editor-border-strong: var(--markdown-editor-base-400-transparent);
|
|
552
552
|
--markdown-editor-guide: var(--markdown-editor-base-100-transparent);
|
|
553
553
|
--markdown-editor-surface-accent: var(--markdown-editor-base-50-transparent);
|
|
554
554
|
--markdown-editor-accent: var(--markdown-editor-primary-color);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { baseKeymap, chainCommands } from 'prosemirror-commands';
|
|
2
2
|
import { closeHistory } from 'prosemirror-history';
|
|
3
3
|
import { InputRule, inputRules } from 'prosemirror-inputrules';
|
|
4
|
-
import { keydownHandler
|
|
4
|
+
import { keydownHandler } from 'prosemirror-keymap';
|
|
5
5
|
import { Plugin } from 'prosemirror-state';
|
|
6
6
|
import { autoformatRules } from '../autoformat.js';
|
|
7
7
|
import { linkPastePlugin } from '../plugins/linkPaste.js';
|
|
@@ -39,13 +39,25 @@ function createPlugins(extraActions) {
|
|
|
39
39
|
// 表示操作は編集可否の判定より前に配る(→ viewKeymap)
|
|
40
40
|
viewKeymap(withoutCoreKeys(viewBindings, coreBindings)),
|
|
41
41
|
// 塞ぐかどうかは各定義の「文書を変えるか」で決まる。基盤と拡張で扱いを分けない
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
compositionAwareKeymap(coreBindings),
|
|
43
|
+
compositionAwareKeymap(bindingsOf(extraActions.filter((action) => action.category !== 'view'))),
|
|
44
|
+
compositionAwareKeymap(baseKeymap),
|
|
45
45
|
inputRules({ rules: autoformatRules.map(ruleAsOwnUndoStep) }),
|
|
46
46
|
linkPastePlugin()
|
|
47
47
|
];
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* DOM の変更を取り込む際にも handleKeyDown は呼ばれる。
|
|
51
|
+
* 変換中は「処理済み」にせず、標準キーを含めて IME の変更の取り込みへ譲る。
|
|
52
|
+
*/
|
|
53
|
+
function compositionAwareKeymap(bindings) {
|
|
54
|
+
const handler = keydownHandler(bindings);
|
|
55
|
+
return new Plugin({
|
|
56
|
+
props: {
|
|
57
|
+
handleKeyDown: (view, event) => view.composing || event.isComposing || event.keyCode === 229 ? false : handler(view, event)
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
49
61
|
/**
|
|
50
62
|
* 表示操作のキーを、編集できるかどうかの判定より前に配る。
|
|
51
63
|
*
|
|
@@ -63,6 +75,8 @@ function viewKeymap(bindings) {
|
|
|
63
75
|
props: {
|
|
64
76
|
handleDOMEvents: {
|
|
65
77
|
keydown: (view, event) => {
|
|
78
|
+
if (view.composing || event.isComposing || event.keyCode === 229)
|
|
79
|
+
return false;
|
|
66
80
|
if (!handler(view, event))
|
|
67
81
|
return false;
|
|
68
82
|
event.preventDefault();
|
|
@@ -154,12 +168,12 @@ function ruleAsOwnUndoStep(rule) {
|
|
|
154
168
|
}
|
|
155
169
|
/**
|
|
156
170
|
* IME で変換が確定していない間は、ショートカット・階層操作・既定の Enter 処理を実行しない。
|
|
157
|
-
*
|
|
171
|
+
* 未処理を返す。処理済みにすると DOM からの削除の取り込みまで止めてしまう。
|
|
158
172
|
*/
|
|
159
173
|
function withoutComposition(command) {
|
|
160
174
|
return (state, dispatch, view) => {
|
|
161
175
|
if (view?.composing)
|
|
162
|
-
return
|
|
176
|
+
return false;
|
|
163
177
|
return command(state, dispatch, view);
|
|
164
178
|
};
|
|
165
179
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@14ch/svelte-md-outliner",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "An outliner-style Markdown editor for Svelte 5. Headings form a real section tree you can fold, focus, and re-nest from the keyboard.",
|