toolcraft-openapi 0.0.801 → 0.0.803
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/dist/composition.json +2 -2
- package/node_modules/toolcraft-design/dist/explorer/detail-content.js +1 -9
- package/node_modules/toolcraft-design/dist/explorer/keymap.js +1 -1
- package/node_modules/toolcraft-design/dist/explorer/reducer.js +1 -1
- package/node_modules/toolcraft-design/dist/explorer/runtime.js +2 -1
- package/node_modules/toolcraft-schema/package.json +1 -1
- package/package.json +3 -3
package/dist/composition.json
CHANGED
|
@@ -6,7 +6,7 @@ export function prepareDetailContent(content, width) {
|
|
|
6
6
|
return { text: "", lines: [[]] };
|
|
7
7
|
}
|
|
8
8
|
width = Math.max(1, width);
|
|
9
|
-
const key = `${
|
|
9
|
+
const key = `${width}:${content}`;
|
|
10
10
|
const cached = markdownCache.get(key);
|
|
11
11
|
if (cached !== undefined)
|
|
12
12
|
return cached;
|
|
@@ -22,11 +22,3 @@ export function prepareDetailContent(content, width) {
|
|
|
22
22
|
markdownCache.set(key, prepared);
|
|
23
23
|
return prepared;
|
|
24
24
|
}
|
|
25
|
-
function contentHash(content) {
|
|
26
|
-
let hash = 2166136261;
|
|
27
|
-
for (let index = 0; index < content.length; index += 1) {
|
|
28
|
-
hash ^= content.charCodeAt(index);
|
|
29
|
-
hash = Math.imul(hash, 16777619);
|
|
30
|
-
}
|
|
31
|
-
return hash >>> 0;
|
|
32
|
-
}
|
|
@@ -112,6 +112,6 @@ function canonical(value) { return value.trim().toLowerCase().replace("control+"
|
|
|
112
112
|
function eventKey(event) {
|
|
113
113
|
const name = event.name ?? event.ch ?? "";
|
|
114
114
|
const modifiers = [event.ctrl ? "ctrl" : "", event.meta ? "meta" : "", event.shift ? "shift" : ""].filter(Boolean);
|
|
115
|
-
const normalized = name === "
|
|
115
|
+
const normalized = name === " " ? "space" : name.toLowerCase();
|
|
116
116
|
return [...modifiers, normalized].join("+");
|
|
117
117
|
}
|
|
@@ -941,7 +941,7 @@ function isBackspace(key) {
|
|
|
941
941
|
return key.name === "backspace" || key.name === "delete";
|
|
942
942
|
}
|
|
943
943
|
function isSelectionSpace(key) {
|
|
944
|
-
return key.name === "space" || key.ch === " ";
|
|
944
|
+
return key.name !== "paste" && (key.name === "space" || key.ch === " ");
|
|
945
945
|
}
|
|
946
946
|
function isConfirmYes(key) {
|
|
947
947
|
return key.ch === "y" || key.ch === "Y";
|
|
@@ -101,7 +101,8 @@ class ExplorerRuntime {
|
|
|
101
101
|
for (const ch of event.text.replaceAll("\n", "").replaceAll("\r", "")) {
|
|
102
102
|
this.dispatch({
|
|
103
103
|
type: "key",
|
|
104
|
-
|
|
104
|
+
// Pasted characters are text, even when they have a key binding.
|
|
105
|
+
key: { ch, name: "paste", ctrl: false, meta: false, shift: false }
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft-openapi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.803",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"toolcraft-openapi-generate": "dist/bin/generate.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"toolcraft": "0.0.
|
|
33
|
+
"toolcraft": "0.0.803",
|
|
34
34
|
"fast-string-width": "^3.0.2",
|
|
35
35
|
"fast-wrap-ansi": "^0.2.0",
|
|
36
36
|
"sisteransi": "^1.0.5",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"directory": "packages/toolcraft-openapi"
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
|
-
"toolcraft-schema": "0.0.
|
|
48
|
+
"toolcraft-schema": "0.0.803",
|
|
49
49
|
"toolcraft-design": "*",
|
|
50
50
|
"@poe-code/frontmatter": "*",
|
|
51
51
|
"@poe-code/terminal-text": "*"
|