dsh-claude-slides 2.7.1 → 2.7.2
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/lib/client.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/skills/claude-slides/SKILL.md +1 -0
- package/skills/claude-slides/scripts/artifact.mjs +230 -49
- package/skills/claude-slides/scripts/editor/assets/{index-S9woRl4b.js → index-kN-1njux.js} +129 -129
- package/skills/claude-slides/scripts/editor/assets/{woff2-decoder-BXtJbtte.js → woff2-decoder-P1USYjds.js} +1 -1
- package/skills/claude-slides/scripts/editor/index.html +1 -1
- package/skills/claude-slides/scripts/editor/node/compiler.cjs +80 -15
- package/skills/claude-slides/scripts/server.mjs +265 -101
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<script id="appifact-mode">(function(){var h=document.documentElement;function s(){var t=h.getAttribute('data-theme');if(t==='light'||t==='dark'){h.setAttribute('data-mode',t)}else{h.removeAttribute('data-mode')}}s();if(typeof MutationObserver==='function'){new MutationObserver(s).observe(h,{attributes:true,attributeFilter:['data-theme']})}})();</script>
|
|
9
9
|
<script id="appifact-flags">(function(){var values={slides_theme_tab:true,appifact_icon_set:true,appifact_bottom_toolbar:false,appifact_extra_export_formats:window.parent===window};function kind(v){return v===null?"null":Array.isArray(v)?"array":typeof v}function copy(v){return JSON.parse(JSON.stringify(v))}globalThis.__appifact_flags={version:"appifact-flags:v1",ready:function(){return Promise.resolve(true)},get:function(key,fallback){if(!Object.prototype.hasOwnProperty.call(values,key)||kind(values[key])!==kind(fallback))return fallback;return copy(values[key])},all:function(){return copy(values)}};})();</script>
|
|
10
10
|
<title>Slides</title>
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-kN-1njux.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="./assets/index-DX-X-CY8.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
@@ -239368,22 +239368,87 @@ function installDesignSystemThemePanel(runtime2) {
|
|
|
239368
239368
|
patch[prop] = value;
|
|
239369
239369
|
return patch;
|
|
239370
239370
|
};
|
|
239371
|
+
function DesignSystemSync({ systemKey }) {
|
|
239372
|
+
const [status, setStatus] = reactForThemePanel.useState(void 0), [busy, setBusy] = reactForThemePanel.useState(false), [failed, setFailed] = reactForThemePanel.useState(false), url = `__ds-sync/${encodeURIComponent(systemKey)}`;
|
|
239373
|
+
reactForThemePanel.useEffect(() => {
|
|
239374
|
+
let live = true;
|
|
239375
|
+
const load = () => fetch(url, { cache: "no-store" }).then((response) => response.ok ? response.json() : void 0).then(
|
|
239376
|
+
(body) => {
|
|
239377
|
+
if (live) setStatus(body);
|
|
239378
|
+
},
|
|
239379
|
+
() => {
|
|
239380
|
+
}
|
|
239381
|
+
);
|
|
239382
|
+
const onShow = () => {
|
|
239383
|
+
if (document.visibilityState === "visible") load();
|
|
239384
|
+
};
|
|
239385
|
+
load();
|
|
239386
|
+
document.addEventListener("visibilitychange", onShow);
|
|
239387
|
+
window.addEventListener("focus", onShow);
|
|
239388
|
+
return () => {
|
|
239389
|
+
live = false;
|
|
239390
|
+
document.removeEventListener("visibilitychange", onShow);
|
|
239391
|
+
window.removeEventListener("focus", onShow);
|
|
239392
|
+
};
|
|
239393
|
+
}, [url]);
|
|
239394
|
+
const lost = status?.state === "unknown" && status.reason === "not-found";
|
|
239395
|
+
if (status === void 0 || status.state === "unknown" && !lost) return null;
|
|
239396
|
+
const behind = status.state === "behind";
|
|
239397
|
+
const sync = () => {
|
|
239398
|
+
setBusy(true);
|
|
239399
|
+
setFailed(false);
|
|
239400
|
+
fetch(url, { method: "POST" }).then((response) => response.ok ? response.json() : Promise.reject(new Error(String(response.status)))).then(setStatus).catch(() => setFailed(true)).finally(() => setBusy(false));
|
|
239401
|
+
};
|
|
239402
|
+
return jsxForThemePanel.jsxs("div", {
|
|
239403
|
+
"data-testid": "sl-theme-system-sync",
|
|
239404
|
+
"data-state": status.state,
|
|
239405
|
+
style: { margin: "6px 14px 0", fontSize: 12, display: "flex", alignItems: "center", gap: 8, flexWrap: "wrap" },
|
|
239406
|
+
children: [
|
|
239407
|
+
jsxForThemePanel.jsx("span", {
|
|
239408
|
+
style: { opacity: behind ? 1 : 0.7 },
|
|
239409
|
+
children: failed ? "Could not sync." : lost ? "Can't check for changes: its source folder wasn't found." : behind ? `Behind its source: ${status.changed} ${status.changed === 1 ? "file" : "files"} changed.` : "Up to date with its source."
|
|
239410
|
+
}),
|
|
239411
|
+
behind && status.canSync ? jsxForThemePanel.jsx("button", {
|
|
239412
|
+
type: "button",
|
|
239413
|
+
"data-testid": "sl-theme-system-sync-button",
|
|
239414
|
+
disabled: busy,
|
|
239415
|
+
onClick: sync,
|
|
239416
|
+
style: {
|
|
239417
|
+
font: "inherit",
|
|
239418
|
+
padding: "2px 10px",
|
|
239419
|
+
borderRadius: 6,
|
|
239420
|
+
border: "1px solid currentColor",
|
|
239421
|
+
background: "transparent",
|
|
239422
|
+
color: "inherit",
|
|
239423
|
+
cursor: busy ? "default" : "pointer",
|
|
239424
|
+
opacity: busy ? 0.5 : 1
|
|
239425
|
+
},
|
|
239426
|
+
children: busy ? "Syncing\u2026" : "Sync"
|
|
239427
|
+
}) : behind ? jsxForThemePanel.jsx("span", { style: { opacity: 0.7 }, children: "Ask the owner to sync." }) : null
|
|
239428
|
+
]
|
|
239429
|
+
});
|
|
239430
|
+
}
|
|
239371
239431
|
function DesignSystemLink({ system }) {
|
|
239372
|
-
return system === void 0 || /\/v\/\d+\/$/.test(location.pathname) ? null : jsxForThemePanel.
|
|
239373
|
-
|
|
239374
|
-
|
|
239375
|
-
|
|
239376
|
-
|
|
239377
|
-
|
|
239378
|
-
|
|
239379
|
-
|
|
239380
|
-
|
|
239381
|
-
|
|
239382
|
-
|
|
239383
|
-
|
|
239384
|
-
|
|
239385
|
-
|
|
239386
|
-
|
|
239432
|
+
return system === void 0 || /\/v\/\d+\/$/.test(location.pathname) ? null : jsxForThemePanel.jsxs(reactForThemePanel.Fragment, {
|
|
239433
|
+
children: [
|
|
239434
|
+
jsxForThemePanel.jsx("a", {
|
|
239435
|
+
"data-testid": "sl-theme-system-link",
|
|
239436
|
+
href: `__ds/${encodeURIComponent(system.key)}/`,
|
|
239437
|
+
target: "_blank",
|
|
239438
|
+
rel: "noopener",
|
|
239439
|
+
style: {
|
|
239440
|
+
display: "block",
|
|
239441
|
+
margin: "6px 14px 0",
|
|
239442
|
+
fontSize: 12,
|
|
239443
|
+
color: "inherit",
|
|
239444
|
+
opacity: 0.7,
|
|
239445
|
+
textDecoration: "underline",
|
|
239446
|
+
textUnderlineOffset: 2
|
|
239447
|
+
},
|
|
239448
|
+
children: `View ${system.title} design system`
|
|
239449
|
+
}),
|
|
239450
|
+
jsxForThemePanel.jsx(DesignSystemSync, { systemKey: system.key })
|
|
239451
|
+
]
|
|
239387
239452
|
});
|
|
239388
239453
|
}
|
|
239389
239454
|
function ThemePanel({
|