@leotang92/dsh-claude-motion 0.1.2 → 0.1.3
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/README.md +1 -1
- package/lib/client.js +17 -17
- package/lib/index.js +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ dsh plugin --profile web add @leotang92/dsh-claude-motion
|
|
|
14
14
|
|
|
15
15
|
Then quit and reopen the app, start a new session, and type `/claude-motion`.
|
|
16
16
|
|
|
17
|
-
To pin a version: `@leotang92/dsh-claude-motion@0.1.
|
|
17
|
+
To pin a version: `@leotang92/dsh-claude-motion@0.1.3`.
|
|
18
18
|
|
|
19
19
|
## Source
|
|
20
20
|
|
package/lib/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @leotang92/dsh-claude-motion 0.1.
|
|
1
|
+
// @leotang92/dsh-claude-motion 0.1.3: packaged from tools/, host adapted from baoyu-design.
|
|
2
2
|
window.__ModuleLoader__.load({
|
|
3
3
|
id: "@leotang92/dsh-claude-motion",
|
|
4
4
|
factory: (require) => {
|
|
@@ -36,7 +36,7 @@ window.__ModuleLoader__.load({
|
|
|
36
36
|
|
|
37
37
|
var import_react = require("react");
|
|
38
38
|
|
|
39
|
-
var base = (skill) => `/api/
|
|
39
|
+
var base = (skill) => `/api/design-artifacts.${skill}.artifacts`;
|
|
40
40
|
var listPath = base;
|
|
41
41
|
var openPath = (skill) => `${base(skill)}.open`;
|
|
42
42
|
var previewPath = (skill) => `${base(skill)}.preview`;
|
|
@@ -50,7 +50,7 @@ window.__ModuleLoader__.load({
|
|
|
50
50
|
const carrier = globalThis.dshDesktop;
|
|
51
51
|
return carrier?.protocolVersion === 1 ? carrier.browser : void 0;
|
|
52
52
|
}
|
|
53
|
-
var WORKSPACE = "
|
|
53
|
+
var WORKSPACE = "design-artifacts-thumbnails";
|
|
54
54
|
var WIDTH = 720;
|
|
55
55
|
var QUALITY = 0.82;
|
|
56
56
|
var LOAD_MS = 2e4;
|
|
@@ -175,10 +175,10 @@ window.__ModuleLoader__.load({
|
|
|
175
175
|
|
|
176
176
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
177
177
|
var PAGE_VERSION = 2;
|
|
178
|
-
var PANEL_ID = "
|
|
179
|
-
var NS = "
|
|
180
|
-
var VIEW_KEY = "
|
|
181
|
-
var HUB = Symbol.for("
|
|
178
|
+
var PANEL_ID = "design-artifacts.artifacts";
|
|
179
|
+
var NS = "design-artifacts-artifacts";
|
|
180
|
+
var VIEW_KEY = "design-artifacts.artifacts.view";
|
|
181
|
+
var HUB = Symbol.for("design-artifacts/dsh-artifacts-page");
|
|
182
182
|
function hub() {
|
|
183
183
|
const g = globalThis;
|
|
184
184
|
return g[HUB] ??= { members: /* @__PURE__ */ new Map(), owner: null, listeners: /* @__PURE__ */ new Set() };
|
|
@@ -208,7 +208,7 @@ window.__ModuleLoader__.load({
|
|
|
208
208
|
try {
|
|
209
209
|
listener();
|
|
210
210
|
} catch (error) {
|
|
211
|
-
console.error("
|
|
211
|
+
console.error("design-artifacts Artifacts page listener failed:", error);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
}
|
|
@@ -299,7 +299,7 @@ window.__ModuleLoader__.load({
|
|
|
299
299
|
"rename.save": "保存",
|
|
300
300
|
"dialog.cancel": "取消",
|
|
301
301
|
"delete.title": "删除“{title}”?",
|
|
302
|
-
"delete.moves": "这会移除这个作品,它的文件夹移到应用数据目录下的
|
|
302
|
+
"delete.moves": "这会移除这个作品,它的文件夹移到应用数据目录下的 design-artifacts/trash。",
|
|
303
303
|
"delete.keeps": "这会把它从作品里移除。它的文件夹里还有别的文件,所以留在原处:{path}",
|
|
304
304
|
"delete.confirm": "删除",
|
|
305
305
|
"toast.copied": "链接已复制到剪贴板。",
|
|
@@ -308,7 +308,7 @@ window.__ModuleLoader__.load({
|
|
|
308
308
|
"toast.undo": "撤销",
|
|
309
309
|
"toast.close": "关闭",
|
|
310
310
|
"empty.title": "还没有作品",
|
|
311
|
-
"empty.body": "Agent
|
|
311
|
+
"empty.body": "Agent 用这些设计技能做出来的东西都会出现在这里。点上面的入口开始做一个。",
|
|
312
312
|
"empty.noMatches": "没有符合条件的作品",
|
|
313
313
|
"load.error": "读取作品列表失败:{message}",
|
|
314
314
|
"load.retry": "重试",
|
|
@@ -375,7 +375,7 @@ window.__ModuleLoader__.load({
|
|
|
375
375
|
"rename.save": "Save",
|
|
376
376
|
"dialog.cancel": "Cancel",
|
|
377
377
|
"delete.title": "Delete {title}?",
|
|
378
|
-
"delete.moves": "This removes the artifact and moves its folder to
|
|
378
|
+
"delete.moves": "This removes the artifact and moves its folder to design-artifacts/trash in the app's data folder.",
|
|
379
379
|
"delete.keeps": "This takes it off your artifacts. Its folder holds other files too, so it stays where it is: {path}",
|
|
380
380
|
"delete.confirm": "Delete",
|
|
381
381
|
"toast.copied": "Link copied to clipboard.",
|
|
@@ -384,7 +384,7 @@ window.__ModuleLoader__.load({
|
|
|
384
384
|
"toast.undo": "Undo",
|
|
385
385
|
"toast.close": "Close",
|
|
386
386
|
"empty.title": "No artifacts yet",
|
|
387
|
-
"empty.body": "What the agent makes with
|
|
387
|
+
"empty.body": "What the agent makes with these design skills shows up here. Start one with a tile above.",
|
|
388
388
|
"empty.noMatches": "No artifacts match",
|
|
389
389
|
"load.error": "Could not read the artifacts: {message}",
|
|
390
390
|
"load.retry": "Try again",
|
|
@@ -1146,7 +1146,7 @@ window.__ModuleLoader__.load({
|
|
|
1146
1146
|
onMenu: (v, anchor) => setPopup((p) => p?.kind === "actions" && p.root === v.root ? null : { kind: "actions", anchor, root: v.root })
|
|
1147
1147
|
});
|
|
1148
1148
|
const toggle = (kind, anchor) => setPopup((p) => p?.kind === kind ? null : { kind, anchor });
|
|
1149
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "bda-page", "aria-label": t("title"), "data-testid": "
|
|
1149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "bda-page", "aria-label": t("title"), "data-testid": "design-artifacts-artifacts", children: [
|
|
1150
1150
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bda-scroll", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "bda-content", children: [
|
|
1151
1151
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "bda-heading", children: [
|
|
1152
1152
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { children: t("title") }),
|
|
@@ -1312,7 +1312,7 @@ window.__ModuleLoader__.load({
|
|
|
1312
1312
|
const disposers = [];
|
|
1313
1313
|
const style = typeof document === "undefined" ? null : document.createElement("style");
|
|
1314
1314
|
if (style) {
|
|
1315
|
-
style.dataset.pluginCss = "
|
|
1315
|
+
style.dataset.pluginCss = "design-artifacts/artifacts-page.css";
|
|
1316
1316
|
style.textContent = CSS;
|
|
1317
1317
|
document.head.appendChild(style);
|
|
1318
1318
|
disposers.push(() => style.remove());
|
|
@@ -1503,7 +1503,7 @@ window.__ModuleLoader__.load({
|
|
|
1503
1503
|
try {
|
|
1504
1504
|
await takeOne(next, signal);
|
|
1505
1505
|
} catch (error) {
|
|
1506
|
-
if (!signal.aborted) console.warn(`
|
|
1506
|
+
if (!signal.aborted) console.warn(`design-artifacts Artifacts page: no thumbnail for ${next.root}:`, error);
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
1509
|
} finally {
|
|
@@ -1565,7 +1565,7 @@ window.__ModuleLoader__.load({
|
|
|
1565
1565
|
try {
|
|
1566
1566
|
dispose();
|
|
1567
1567
|
} catch (error) {
|
|
1568
|
-
console.error("
|
|
1568
|
+
console.error("design-artifacts Artifacts page: unregistering failed:", error);
|
|
1569
1569
|
}
|
|
1570
1570
|
}
|
|
1571
1571
|
};
|
|
@@ -1593,7 +1593,7 @@ window.__ModuleLoader__.load({
|
|
|
1593
1593
|
|
|
1594
1594
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1595
1595
|
var CLIENT = define_CLIENT_default;
|
|
1596
|
-
var COMMENT_SOURCE = "
|
|
1596
|
+
var COMMENT_SOURCE = "design-artifacts-comment";
|
|
1597
1597
|
var KIND = `${CLIENT.key}:comment`;
|
|
1598
1598
|
var NS2 = CLIENT.key;
|
|
1599
1599
|
var zh2 = {
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @leotang92/dsh-claude-motion 0.1.
|
|
1
|
+
// @leotang92/dsh-claude-motion 0.1.3: packaged from tools/, host adapted from baoyu-design.
|
|
2
2
|
var define_PLUGIN_default = { name: "claude-motion", provider: "@leotang92/dsh-claude-motion", skills: [{ name: "claude-motion", description: "Use this for a local Motion film: a short animated video (10–30 s unless asked for more, 900 s at most), such as an explainer, product walkthrough or UI demo, launch teaser, logo sting, social clip, animated chart or title sequence, that plays in the bundled Motion player and exports from there to MP4 or GIF. A narrated one carries a voice track: a take a scene, made here with a speech provider of the user's or recorded by them, spoken and captioned by the player, the motion timed to its words. Everything on screen is code, a pure function of time, written scene by scene into the film's own store with this skill's script while the user watches it fill in. Read it when creating, continuing, finalizing or revising one. Not for editing real footage, subtitles or audio (that is a video editor), a still picture, a slide deck or a static HTML page.", scriptAlias: "A", comments: true, requests: true }] };
|
|
3
3
|
|
|
4
4
|
import { spawn as spawn2 } from "node:child_process";
|
|
@@ -14,7 +14,7 @@ import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, r
|
|
|
14
14
|
import { homedir } from "node:os";
|
|
15
15
|
import { basename, dirname, join, parse } from "node:path";
|
|
16
16
|
|
|
17
|
-
var base = (skill) => `/api/
|
|
17
|
+
var base = (skill) => `/api/design-artifacts.${skill}.artifacts`;
|
|
18
18
|
var listPath = base;
|
|
19
19
|
var openPath = (skill) => `${base(skill)}.open`;
|
|
20
20
|
var previewPath = (skill) => `${base(skill)}.preview`;
|
|
@@ -50,17 +50,17 @@ function dshHome() {
|
|
|
50
50
|
return set ? set : join(homedir(), ".dsh");
|
|
51
51
|
}
|
|
52
52
|
function artifactsDir() {
|
|
53
|
-
return join(dshHome(), "
|
|
53
|
+
return join(dshHome(), "design-artifacts", "artifacts");
|
|
54
54
|
}
|
|
55
55
|
var folderHash = (root) => createHash("sha256").update(root).digest("hex").slice(0, 24);
|
|
56
56
|
function recordFile(root) {
|
|
57
57
|
return join(artifactsDir(), `${folderHash(root)}.json`);
|
|
58
58
|
}
|
|
59
59
|
function thumbnailFile(root) {
|
|
60
|
-
return join(dshHome(), "
|
|
60
|
+
return join(dshHome(), "design-artifacts", "thumbnails", `${folderHash(root)}.jpg`);
|
|
61
61
|
}
|
|
62
62
|
function trashDir() {
|
|
63
|
-
return join(dshHome(), "
|
|
63
|
+
return join(dshHome(), "design-artifacts", "trash");
|
|
64
64
|
}
|
|
65
65
|
function artifactTitle(skill, root) {
|
|
66
66
|
const at = TITLES[skill];
|
|
@@ -554,7 +554,7 @@ function runtimeSection(skill, skillDir, node) {
|
|
|
554
554
|
}
|
|
555
555
|
return lines.join("\n");
|
|
556
556
|
}
|
|
557
|
-
var COMMENT_SOURCE = "
|
|
557
|
+
var COMMENT_SOURCE = "design-artifacts-comment";
|
|
558
558
|
var SUMMARY_MAX = 120;
|
|
559
559
|
var SESSION_CHECK_MS = 6e4;
|
|
560
560
|
var RETRY_MS = 5e3;
|
package/package.json
CHANGED