toolcraft 0.0.162 → 0.0.163
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/composition.json +2 -2
- package/dist/composition.json +2 -2
- package/node_modules/tiny-stdio-mcp-server/dist/composition.json +1 -1
- package/node_modules/toolcraft-design/dist/explorer/events.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/explorer/reducer.js +1 -1
- package/node_modules/toolcraft-design/dist/explorer/runtime.js +3 -2
- package/node_modules/toolcraft-design/dist/explorer/state.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/terminal/input.js +7 -2
- package/node_modules/toolcraft-schema/package.json +1 -1
- package/package.json +2 -2
package/composition.json
CHANGED
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "toolcraft",
|
|
116
|
-
"version": "0.0.
|
|
116
|
+
"version": "0.0.163",
|
|
117
117
|
"license": "MIT"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "toolcraft-schema",
|
|
126
|
-
"version": "0.0.
|
|
126
|
+
"version": "0.0.163",
|
|
127
127
|
"license": "MIT"
|
|
128
128
|
},
|
|
129
129
|
{
|
package/dist/composition.json
CHANGED
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "toolcraft",
|
|
116
|
-
"version": "0.0.
|
|
116
|
+
"version": "0.0.163",
|
|
117
117
|
"license": "MIT"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "toolcraft-schema",
|
|
126
|
-
"version": "0.0.
|
|
126
|
+
"version": "0.0.163",
|
|
127
127
|
"license": "MIT"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
@@ -718,7 +718,7 @@ function reorder(state, delta) {
|
|
|
718
718
|
};
|
|
719
719
|
return {
|
|
720
720
|
state: next,
|
|
721
|
-
effects: [{ type: "persistOrder", orderedIds: rows.map((row) => row.id) }]
|
|
721
|
+
effects: [{ type: "persistOrder", movedId: current.id, orderedIds: rows.map((row) => row.id) }]
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
724
|
function paletteInput(state, key) {
|
|
@@ -157,7 +157,7 @@ class ExplorerRuntime {
|
|
|
157
157
|
continue;
|
|
158
158
|
}
|
|
159
159
|
if (effect.type === "persistOrder") {
|
|
160
|
-
this.track(this.persistOrder(effect.orderedIds, previousState.rows, ++this.reorderToken));
|
|
160
|
+
this.track(this.persistOrder(effect.movedId, effect.orderedIds, previousState.rows, ++this.reorderToken));
|
|
161
161
|
continue;
|
|
162
162
|
}
|
|
163
163
|
if (effect.type === "suspend") {
|
|
@@ -248,9 +248,10 @@ class ExplorerRuntime {
|
|
|
248
248
|
});
|
|
249
249
|
this.dispatch({ type: "detailLoaded", rowId, token, items: preparedItems });
|
|
250
250
|
}
|
|
251
|
-
async persistOrder(orderedIds, previousRows, token) {
|
|
251
|
+
async persistOrder(movedId, orderedIds, previousRows, token) {
|
|
252
252
|
try {
|
|
253
253
|
await this.config.reorder?.onReorder(orderedIds, {
|
|
254
|
+
movedId,
|
|
254
255
|
refresh: this.runtimeHandles.refresh,
|
|
255
256
|
toast: this.runtimeHandles.toast
|
|
256
257
|
});
|
|
@@ -145,8 +145,13 @@ function parseCsi(sequence) {
|
|
|
145
145
|
const name = navigationName(final) ?? ({ "5": "pageup", "6": "pagedown" }[sequence.slice(2, -1)]);
|
|
146
146
|
if (name === undefined)
|
|
147
147
|
return undefined;
|
|
148
|
-
const
|
|
149
|
-
|
|
148
|
+
const parameters = sequence.slice(2, -1).split(";");
|
|
149
|
+
const modifier = parameters.length > 1 ? Number(parameters.at(-1)) : 1;
|
|
150
|
+
return key(name, {
|
|
151
|
+
shift: modifier === 2 || modifier === 4 || modifier === 6 || modifier === 8,
|
|
152
|
+
alt: modifier === 3 || modifier === 4 || modifier === 7 || modifier === 8,
|
|
153
|
+
ctrl: modifier === 5 || modifier === 6 || modifier === 7 || modifier === 8
|
|
154
|
+
});
|
|
150
155
|
}
|
|
151
156
|
function navigationName(final) {
|
|
152
157
|
return { A: "up", B: "down", C: "right", D: "left", H: "home", F: "end" }[final];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.163",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"yaml"
|
|
159
159
|
],
|
|
160
160
|
"optionalDependencies": {
|
|
161
|
-
"toolcraft-schema": "0.0.
|
|
161
|
+
"toolcraft-schema": "0.0.163",
|
|
162
162
|
"toolcraft-design": "*",
|
|
163
163
|
"@poe-code/frontmatter": "*",
|
|
164
164
|
"@poe-code/agent-mcp-config": "*",
|