stillmade-sdk 0.1.15 → 0.1.17

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.
@@ -5,7 +5,7 @@
5
5
  "id": "example.camera-recorder",
6
6
  "version": "1.0.0",
7
7
  "name": "Camera recorder",
8
- "description": "Record your camera in StillMade desktop and pass the saved media to your workflow.",
8
+ "description": "Record your camera in StillMade or the StillMade desktop app and pass the saved media to your workflow.",
9
9
  "kind": "task",
10
10
  "runtime": "javascript",
11
11
  "license": "MIT",
@@ -15,11 +15,10 @@
15
15
  "platforms": {
16
16
  "phone": {
17
17
  "supported": false,
18
- "reason": "Recording requires the StillMade desktop app."
18
+ "reason": "Recording needs a desktop browser or the StillMade desktop app."
19
19
  },
20
20
  "browser": {
21
- "supported": false,
22
- "reason": "Recording requires the StillMade desktop app."
21
+ "supported": true
23
22
  },
24
23
  "desktop": {
25
24
  "supported": true
@@ -47,7 +46,7 @@
47
46
  },
48
47
  "code": "return {media: input.media};",
49
48
  "view": {
50
- "html": "<section><h2>Camera recorder</h2><p>Record in the desktop app. You choose when recording starts and stops.</p><div><button id=\"start\" type=\"button\">Start recording</button><button id=\"stop\" type=\"button\" disabled>Stop and use recording</button><button id=\"cancel\" type=\"button\" disabled>Cancel</button></div><p id=\"status\" role=\"status\">Ready to record. Device access requires your permission.</p></section>",
49
+ "html": "<section><h2>Camera recorder</h2><p>Record here in your browser or in the desktop app. You choose when recording starts and stops.</p><div><button id=\"start\" type=\"button\">Start recording</button><button id=\"stop\" type=\"button\" disabled>Stop and use recording</button><button id=\"cancel\" type=\"button\" disabled>Cancel</button></div><p id=\"status\" role=\"status\">Ready to record. Device access requires your permission.</p></section>",
51
50
  "css": "section { padding: 1.5rem; } h2 { font-style: italic; font-weight: 400; } div { display: flex; flex-wrap: wrap; gap: .6rem; } button { border: 1px solid var(--border-tok); border-radius: 999px; padding: .7rem 1rem; background: var(--bg-elev-1); color: var(--fg); } button:disabled { opacity: .5; } p { color: var(--fg-muted); }",
52
51
  "javascript": "\nconst start=document.getElementById('start');\nconst stop=document.getElementById('stop');\nconst cancel=document.getElementById('cancel');\nconst status=document.getElementById('status');\nlet saved=null;\nconst controls=active=>{ start.disabled=active; stop.disabled=!active; cancel.disabled=!active; };\nstart.addEventListener('click',async()=>{\n start.disabled=true;\n try{ await StillMade.desktop('record.start',{kind:'camera'}); saved=null; controls(true); status.textContent='Recording. Press Stop to save and use it.'; }\n catch(error){controls(false);status.textContent=error.message;}\n});\nstop.addEventListener('click',async()=>{\n stop.disabled=true;cancel.disabled=true;\n try{\n if(!saved)saved=(await StillMade.desktop('record.stop')).asset;\n await StillMade.run({media:saved});\n saved=null;controls(false);stop.textContent='Stop and use recording';status.textContent='Recording saved. Its video output is ready for the next Block.';\n }catch(error){stop.disabled=false;cancel.disabled=false;stop.textContent=saved?'Retry using recording':'Stop and use recording';status.textContent=error.message;}\n});\ncancel.addEventListener('click',async()=>{\n cancel.disabled=true;\n try{if(!saved)await StillMade.desktop('record.cancel');saved=null;controls(false);stop.textContent='Stop and use recording';status.textContent='Cancelled. Ready for a new recording.';}\n catch(error){controls(false);status.textContent=error.message;}\n});"
53
52
  },
@@ -5,7 +5,7 @@
5
5
  "id": "example.microphone-recorder",
6
6
  "version": "1.0.0",
7
7
  "name": "Microphone recorder",
8
- "description": "Record your microphone in StillMade desktop and pass the saved media to your workflow.",
8
+ "description": "Record your microphone in StillMade or the StillMade desktop app and pass the saved media to your workflow.",
9
9
  "kind": "task",
10
10
  "runtime": "javascript",
11
11
  "license": "MIT",
@@ -15,11 +15,10 @@
15
15
  "platforms": {
16
16
  "phone": {
17
17
  "supported": false,
18
- "reason": "Recording requires the StillMade desktop app."
18
+ "reason": "Recording needs a desktop browser or the StillMade desktop app."
19
19
  },
20
20
  "browser": {
21
- "supported": false,
22
- "reason": "Recording requires the StillMade desktop app."
21
+ "supported": true
23
22
  },
24
23
  "desktop": {
25
24
  "supported": true
@@ -47,7 +46,7 @@
47
46
  },
48
47
  "code": "return {media: input.media};",
49
48
  "view": {
50
- "html": "<section><h2>Microphone recorder</h2><p>Record in the desktop app. You choose when recording starts and stops.</p><div><button id=\"start\" type=\"button\">Start recording</button><button id=\"stop\" type=\"button\" disabled>Stop and use recording</button><button id=\"cancel\" type=\"button\" disabled>Cancel</button></div><p id=\"status\" role=\"status\">Ready to record. Device access requires your permission.</p></section>",
49
+ "html": "<section><h2>Microphone recorder</h2><p>Record here in your browser or in the desktop app. You choose when recording starts and stops.</p><div><button id=\"start\" type=\"button\">Start recording</button><button id=\"stop\" type=\"button\" disabled>Stop and use recording</button><button id=\"cancel\" type=\"button\" disabled>Cancel</button></div><p id=\"status\" role=\"status\">Ready to record. Device access requires your permission.</p></section>",
51
50
  "css": "section { padding: 1.5rem; } h2 { font-style: italic; font-weight: 400; } div { display: flex; flex-wrap: wrap; gap: .6rem; } button { border: 1px solid var(--border-tok); border-radius: 999px; padding: .7rem 1rem; background: var(--bg-elev-1); color: var(--fg); } button:disabled { opacity: .5; } p { color: var(--fg-muted); }",
52
51
  "javascript": "\nconst start=document.getElementById('start');\nconst stop=document.getElementById('stop');\nconst cancel=document.getElementById('cancel');\nconst status=document.getElementById('status');\nlet saved=null;\nconst controls=active=>{ start.disabled=active; stop.disabled=!active; cancel.disabled=!active; };\nstart.addEventListener('click',async()=>{\n start.disabled=true;\n try{ await StillMade.desktop('record.start',{kind:'microphone'}); saved=null; controls(true); status.textContent='Recording. Press Stop to save and use it.'; }\n catch(error){controls(false);status.textContent=error.message;}\n});\nstop.addEventListener('click',async()=>{\n stop.disabled=true;cancel.disabled=true;\n try{\n if(!saved)saved=(await StillMade.desktop('record.stop')).asset;\n await StillMade.run({media:saved});\n saved=null;controls(false);stop.textContent='Stop and use recording';status.textContent='Recording saved. Its audio output is ready for the next Block.';\n }catch(error){stop.disabled=false;cancel.disabled=false;stop.textContent=saved?'Retry using recording':'Stop and use recording';status.textContent=error.message;}\n});\ncancel.addEventListener('click',async()=>{\n cancel.disabled=true;\n try{if(!saved)await StillMade.desktop('record.cancel');saved=null;controls(false);stop.textContent='Stop and use recording';status.textContent='Cancelled. Ready for a new recording.';}\n catch(error){controls(false);status.textContent=error.message;}\n});"
53
52
  },
@@ -5,7 +5,7 @@
5
5
  "id": "example.screen-recorder",
6
6
  "version": "1.0.0",
7
7
  "name": "Screen recorder",
8
- "description": "Record a screen or window you choose in StillMade desktop and pass the saved media to your workflow.",
8
+ "description": "Record a screen or window you choose in StillMade or the StillMade desktop app and pass the saved media to your workflow.",
9
9
  "kind": "task",
10
10
  "runtime": "javascript",
11
11
  "license": "MIT",
@@ -15,11 +15,10 @@
15
15
  "platforms": {
16
16
  "phone": {
17
17
  "supported": false,
18
- "reason": "Recording requires the StillMade desktop app."
18
+ "reason": "Recording needs a desktop browser or the StillMade desktop app."
19
19
  },
20
20
  "browser": {
21
- "supported": false,
22
- "reason": "Recording requires the StillMade desktop app."
21
+ "supported": true
23
22
  },
24
23
  "desktop": {
25
24
  "supported": true
@@ -47,7 +46,7 @@
47
46
  },
48
47
  "code": "return {media: input.media};",
49
48
  "view": {
50
- "html": "<section><h2>Screen recorder</h2><p>Record in the desktop app. You choose when recording starts and stops.</p><div><button id=\"start\" type=\"button\">Start recording</button><button id=\"stop\" type=\"button\" disabled>Stop and use recording</button><button id=\"cancel\" type=\"button\" disabled>Cancel</button></div><p id=\"status\" role=\"status\">Ready to record. Device access requires your permission.</p></section>",
49
+ "html": "<section><h2>Screen recorder</h2><p>Record here in your browser or in the desktop app. You choose when recording starts and stops.</p><div><button id=\"start\" type=\"button\">Start recording</button><button id=\"stop\" type=\"button\" disabled>Stop and use recording</button><button id=\"cancel\" type=\"button\" disabled>Cancel</button></div><p id=\"status\" role=\"status\">Ready to record. Device access requires your permission.</p></section>",
51
50
  "css": "section { padding: 1.5rem; } h2 { font-style: italic; font-weight: 400; } div { display: flex; flex-wrap: wrap; gap: .6rem; } button { border: 1px solid var(--border-tok); border-radius: 999px; padding: .7rem 1rem; background: var(--bg-elev-1); color: var(--fg); } button:disabled { opacity: .5; } p { color: var(--fg-muted); }",
52
51
  "javascript": "\nconst start=document.getElementById('start');\nconst stop=document.getElementById('stop');\nconst cancel=document.getElementById('cancel');\nconst status=document.getElementById('status');\nlet saved=null;\nconst controls=active=>{ start.disabled=active; stop.disabled=!active; cancel.disabled=!active; };\nstart.addEventListener('click',async()=>{\n start.disabled=true;\n try{ await StillMade.desktop('record.start',{kind:'screen'}); saved=null; controls(true); status.textContent='Recording. Press Stop to save and use it.'; }\n catch(error){controls(false);status.textContent=error.message;}\n});\nstop.addEventListener('click',async()=>{\n stop.disabled=true;cancel.disabled=true;\n try{\n if(!saved)saved=(await StillMade.desktop('record.stop')).asset;\n await StillMade.run({media:saved});\n saved=null;controls(false);stop.textContent='Stop and use recording';status.textContent='Recording saved. Its video output is ready for the next Block.';\n }catch(error){stop.disabled=false;cancel.disabled=false;stop.textContent=saved?'Retry using recording':'Stop and use recording';status.textContent=error.message;}\n});\ncancel.addEventListener('click',async()=>{\n cancel.disabled=true;\n try{if(!saved)await StillMade.desktop('record.cancel');saved=null;controls(false);stop.textContent='Stop and use recording';status.textContent='Cancelled. Ready for a new recording.';}\n catch(error){controls(false);status.textContent=error.message;}\n});"
53
52
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stillmade-sdk",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "StillMade Block SDK, CLI and examples",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "type": "module",