stillmade-sdk 0.1.48 → 0.1.49

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.
@@ -145,6 +145,15 @@ export function connectedBlockInputs(node, nodes, edges, {context={},raw=false,a
145
145
  return { inputs, errors:[...new Set(errors)], ...(allowOmissions?{omissions}:{}) };
146
146
  }
147
147
 
148
+ // A Step edit that clears its result keeps that result as one from earlier inputs, as a new run keeps the one it replaces
149
+ // (November 7, 2026: turning a video's Captions off and on again lost its finished render; only a paid run made another).
150
+ export function keepClearedResult(before,after){
151
+ const last=before?.blockLastRun,runId=last?.runId;
152
+ if(!after||after.blockLastRun||typeof runId!=='string'||!Object.keys(before.blockOutputs||{}).length||last.digest!==before.blockDigest||after.blockDigest!==before.blockDigest)return after;
153
+ if((after.blockUnusedResults||[]).some(row=>row.runId===runId))return after;
154
+ return {...after,blockUnusedResults:[...(after.blockUnusedResults||[]),{...structuredClone(last),packageDigest:last.digest,outputs:structuredClone(before.blockOutputs),reason:'Its settings changed after it was made.'}].slice(-20)};
155
+ }
156
+
148
157
  // Called only for data edits, never for position/selection changes. Preserve old
149
158
  // results as previews while preventing downstream consumers from using them.
150
159
  export function invalidateDownstream(previous,nodes,edges,sourceId) {
@@ -9,8 +9,8 @@ export function listingLandingPath({kind,id,name}) {return `/${kind === 'type' ?
9
9
  export function isCanvasListing(item) {
10
10
  return (item.kind==='block' && item.id==='sm.pipeline') || (item.kind==='type' && item.id==='sm.blank');
11
11
  }
12
- export function listingPreviewPath(item){return `/api/public-listings/${item.kind}/${encodeURIComponent(item.id)}/${encodeURIComponent(item.version)}/preview.png?cover=working-2`;}
13
- export function listingThumbnailPath(item,width=640){return `/api/public-listings/${item.kind}/${encodeURIComponent(item.id)}/${encodeURIComponent(item.version)}/preview.webp?cover=working-2&width=${width}`;}
12
+ export function listingPreviewPath(item){return `/api/public-listings/${item.kind}/${encodeURIComponent(item.id)}/${encodeURIComponent(item.version)}/preview.png?cover=working-3`;}
13
+ export function listingThumbnailPath(item,width=640){return `/api/public-listings/${item.kind}/${encodeURIComponent(item.id)}/${encodeURIComponent(item.version)}/preview.webp?cover=working-3&width=${width}`;}
14
14
  export function listingThumbnailSrcSet(item){return [320,640,960].map(width=>`${listingThumbnailPath(item,width)} ${width}w`).join(', ');}
15
15
 
16
16
  export function hostSourcePath({id,version}) {return `/block-sdk/host/${encodeURIComponent(id)}${version==='1.0.0' ? '' : '/'+encodeURIComponent(version)}.zip`;}