stillmade-sdk 0.1.41 → 0.1.43

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.
Files changed (285) hide show
  1. package/.stillmade/sdk-baseline.json +19 -21
  2. package/AGENTS.md +17 -12
  3. package/FRAME_VIEWS.md +113 -0
  4. package/INTERFACE_DESIGN.md +67 -22
  5. package/MOBILE_UI.md +4 -2
  6. package/MODULES.md +152 -6
  7. package/PASTE_TO_LLM.md +42 -32
  8. package/README.md +3 -2
  9. package/SDK.md +1028 -563
  10. package/UI_AESTHETIC.md +30 -3
  11. package/blocks/generate/package.js +1 -0
  12. package/blocks/generate/versions/1.0.0/package.js +463 -0
  13. package/docs/build/audio-to-editor.md +36 -0
  14. package/docs/build/block-builder-contract.md +150 -0
  15. package/docs/build/comfyui.md +227 -0
  16. package/docs/build/concepts.md +40 -0
  17. package/docs/build/context.md +159 -0
  18. package/docs/build/cookbook.md +57 -0
  19. package/docs/build/custom-interface.md +617 -0
  20. package/docs/build/data-types.md +83 -0
  21. package/docs/build/frame-views.md +259 -0
  22. package/docs/build/generate-media.md +59 -0
  23. package/docs/build/github-applications.md +314 -0
  24. package/docs/build/hosted-images.md +214 -0
  25. package/docs/build/hosted-music.md +39 -0
  26. package/docs/build/hosted-speech.md +157 -0
  27. package/docs/build/hosted-text.md +246 -0
  28. package/docs/build/image-description.md +49 -0
  29. package/docs/build/interface-design.md +343 -0
  30. package/docs/build/javascript.md +63 -0
  31. package/docs/build/local-preview.md +61 -0
  32. package/docs/build/media-analysis.md +27 -0
  33. package/docs/build/media.md +400 -0
  34. package/docs/build/mobile-ui.md +106 -0
  35. package/docs/build/modules.md +487 -0
  36. package/docs/build/original-blocks.md +70 -0
  37. package/docs/build/outside-apis.md +128 -0
  38. package/docs/build/production-context-templates.md +12 -0
  39. package/docs/build/project-storage.md +94 -0
  40. package/docs/build/quickstart.md +48 -0
  41. package/docs/build/recipes.md +103 -0
  42. package/docs/build/script-handoff.md +45 -0
  43. package/docs/build/script-writer.md +34 -0
  44. package/docs/build/state.md +223 -0
  45. package/docs/build/testing.md +112 -0
  46. package/docs/build/timeline-edits.md +116 -0
  47. package/docs/build/timeline-proposals.md +76 -0
  48. package/docs/build/transcription.md +59 -0
  49. package/docs/build/triggers.md +59 -0
  50. package/docs/build/tutorial.md +52 -0
  51. package/docs/build/typescript.md +34 -0
  52. package/docs/build/video-generation.md +61 -0
  53. package/docs/build/web-reading.md +37 -0
  54. package/docs/build/with-your-ai.md +27 -0
  55. package/docs/changelog.md +9 -0
  56. package/docs/creators.md +21 -0
  57. package/docs/distribute/discovery.md +43 -0
  58. package/docs/distribute/imports.md +58 -0
  59. package/docs/distribute/publishing.md +29 -0
  60. package/docs/distribute/sdk-versions.md +36 -0
  61. package/docs/distribute/selling.md +14 -0
  62. package/docs/distribute/teams.md +60 -0
  63. package/docs/distribute/versioning.md +28 -0
  64. package/docs/examples.md +23 -0
  65. package/docs/gallery.md +26 -0
  66. package/docs/index.md +50 -0
  67. package/docs/native-mcp.md +307 -0
  68. package/docs/project-types/automation.md +43 -0
  69. package/docs/project-types/batches.md +50 -0
  70. package/docs/project-types/build.md +42 -0
  71. package/docs/project-types/completion.md +15 -0
  72. package/docs/project-types/conditions.md +21 -0
  73. package/docs/project-types/hosted-review.md +115 -0
  74. package/docs/project-types/onboarding.md +75 -0
  75. package/docs/project-types/running.md +309 -0
  76. package/docs/project-types/testing.md +72 -0
  77. package/docs/reference/application-artifacts.md +87 -0
  78. package/docs/reference/authoring-guide.md +134 -0
  79. package/docs/reference/browser-applications.md +267 -0
  80. package/docs/reference/capabilities.md +45 -0
  81. package/docs/reference/cli.md +71 -0
  82. package/docs/reference/connection-api.md +59 -0
  83. package/docs/reference/cooperative-jobs.md +13 -0
  84. package/docs/reference/desktop-capabilities.md +172 -0
  85. package/docs/reference/desktop-execution.md +77 -0
  86. package/docs/reference/errors.md +233 -0
  87. package/docs/reference/execution.md +800 -0
  88. package/docs/reference/first-party-blocks.md +40 -0
  89. package/docs/reference/generation-models.md +59 -0
  90. package/docs/reference/limits.md +306 -0
  91. package/docs/reference/manifest-kinds-controls.md +36 -0
  92. package/docs/reference/manifest.md +181 -0
  93. package/docs/reference/operations.md +36 -0
  94. package/docs/reference/package-jobs.md +35 -0
  95. package/docs/reference/parity.md +55 -0
  96. package/docs/reference/permissions.md +86 -0
  97. package/docs/reference/ports.md +26 -0
  98. package/docs/reference/types.md +268 -0
  99. package/docs/reference/universal-resolver.md +303 -0
  100. package/docs/reference/view-bridge.md +60 -0
  101. package/docs/reference/view-rules.md +15 -0
  102. package/docs/reference/workspace-sync.md +25 -0
  103. package/docs/sdk.md +34 -0
  104. package/docs/tools/block-remix.md +211 -0
  105. package/docs/tools/llm.md +2213 -0
  106. package/docs/tools/repository-adaptation.md +613 -0
  107. package/examples/check-clip.stillmade.json +8 -1
  108. package/examples/clean-text.stillmade.json +4 -0
  109. package/examples/custom-interface.stillmade.json +4 -0
  110. package/examples/describe-image.stillmade.json +4 -0
  111. package/examples/foley-cue.stillmade.json +4 -0
  112. package/examples/generate-image.stillmade.json +4 -0
  113. package/examples/generate-video.stillmade.json +10 -2
  114. package/examples/module-word-stats/stillmade.block.json +4 -0
  115. package/examples/narrate-script.stillmade.json +4 -0
  116. package/examples/numbered-takes.stillmade.json +4 -0
  117. package/examples/research-topic.stillmade.json +9 -1
  118. package/examples/score-a-scene.stillmade.json +4 -0
  119. package/examples/script-draft.stillmade.json +4 -0
  120. package/examples/summarize-page.stillmade.json +4 -0
  121. package/examples/text-workflow.stillmade.json +7 -32
  122. package/examples/thicken-lines.stillmade.json +4 -0
  123. package/examples/timeline-polish.stillmade.json +15 -3
  124. package/examples/transcribe-audio.stillmade.json +15 -3
  125. package/examples/word-count.stillmade.json +4 -0
  126. package/package.json +1 -1
  127. package/packages/block-cli/cli.js +13 -6
  128. package/packages/block-cli/dev-host/assets/host.js +81 -38
  129. package/packages/block-cli/dev-host/assets/index.css +1 -1
  130. package/packages/block-cli/format.js +1 -1
  131. package/packages/block-cli/ready-gate.js +4 -0
  132. package/packages/block-cli/templates.js +37 -19
  133. package/packages/block-cli/type-packages.js +119 -0
  134. package/packages/block-platform/block-readiness.js +8 -1
  135. package/packages/block-platform/canvas.js +2 -1
  136. package/packages/block-platform/catalog.js +27 -48
  137. package/packages/block-platform/native-host-inventory.js +0 -226
  138. package/packages/block-platform/plain-descriptions.js +1 -25
  139. package/packages/block-platform/project-type-starters.js +13 -53
  140. package/packages/block-platform/script-handoff.js +2 -4
  141. package/packages/block-platform/type-workspace.js +2 -0
  142. package/packages/block-sdk/appearance.js +3 -1
  143. package/packages/block-sdk/audio-generation-example.js +2 -2
  144. package/packages/block-sdk/block-tier.js +1 -1
  145. package/packages/block-sdk/builder-contract.js +13 -11
  146. package/packages/block-sdk/capabilities.js +1 -1
  147. package/packages/block-sdk/capability-example.js +1 -1
  148. package/packages/block-sdk/contracts.js +6 -2
  149. package/packages/block-sdk/examples.js +3 -3
  150. package/packages/block-sdk/first-party-identities.js +1 -84
  151. package/packages/block-sdk/first-party-packages.js +3 -85
  152. package/packages/block-sdk/generation-catalog.js +15 -3
  153. package/packages/block-sdk/image-description-example.js +1 -1
  154. package/packages/block-sdk/image-generation-example.js +1 -1
  155. package/packages/block-sdk/index.d.ts +2 -1
  156. package/packages/block-sdk/media-analysis-example.js +2 -2
  157. package/packages/block-sdk/mock-host.js +7 -1
  158. package/packages/block-sdk/module-example.js +1 -1
  159. package/packages/block-sdk/module-host-calls.js +35 -10
  160. package/packages/block-sdk/module-hosted.js +15 -2
  161. package/packages/block-sdk/module-media-access.js +71 -0
  162. package/packages/block-sdk/module-node.js +1 -1
  163. package/packages/block-sdk/portable-media-actions.js +1 -1
  164. package/packages/block-sdk/runtime.js +1 -1
  165. package/packages/block-sdk/speech-example.js +1 -1
  166. package/packages/block-sdk/state-example.js +1 -1
  167. package/packages/block-sdk/timeline-proposal-example.js +1 -1
  168. package/packages/block-sdk/transcription-example.js +1 -1
  169. package/packages/block-sdk/trigger-examples.js +2 -2
  170. package/packages/block-sdk/video-generation-example.js +1 -1
  171. package/packages/block-sdk/view-bridge.js +4 -1
  172. package/packages/block-sdk/view-design.js +44 -15
  173. package/packages/block-sdk/web-example.js +2 -2
  174. package/packages/design-system/block-kit.css +53 -12
  175. package/packages/design-system/block-kit.html +3 -2
  176. package/blocks/mcp-motion-planner/versions/1.1.0/package.js +0 -97
  177. package/blocks/motion-designer/versions/1.0.1/package.js +0 -173318
  178. package/blocks/motion-designer/versions/1.0.2/package.js +0 -173318
  179. package/blocks/motion-frame-review/versions/1.1.1/package.js +0 -465
  180. package/blocks/motion-frame-review/versions/1.1.2/package.snapshot.js +0 -572
  181. package/blocks/narration/package.js +0 -1
  182. package/blocks/narration/versions/1.0.0/package.js +0 -221
  183. package/blocks/narration/versions/1.0.1/package.js +0 -221
  184. package/blocks/native/sm.animated-scene/versions/2.0.0/package.js +0 -475
  185. package/blocks/native/sm.animated-scene/versions/2.1.0/package.js +0 -498
  186. package/blocks/native/sm.animated-scene/versions/2.2.0/package.js +0 -524
  187. package/blocks/native/sm.animated-scene/versions/2.3.0/package.js +0 -618
  188. package/blocks/native/sm.animated-scene/versions/2.3.1/package.js +0 -618
  189. package/blocks/native/sm.animated-scene/versions/2.3.2/package.js +0 -723
  190. package/blocks/native/sm.animated-scene/versions/2.3.3/package.js +0 -723
  191. package/blocks/native/sm.animated-scene/versions/2.3.4/package.js +0 -676
  192. package/blocks/native/sm.animated-scene/versions/2.3.5/package.js +0 -693
  193. package/blocks/native/sm.animated-scene/versions/2.3.6/package.js +0 -700
  194. package/blocks/native/sm.animated-scene/versions/2.3.7/package.js +0 -747
  195. package/blocks/native/sm.animated-scene/versions/2.3.8/package.js +0 -769
  196. package/blocks/native/sm.animated-scene/versions/2.3.9/package.js +0 -769
  197. package/blocks/native/sm.animated-scene-assistant/versions/1.0.0/package.js +0 -183
  198. package/blocks/native/sm.blueprint/versions/2.0.0/package.js +0 -358
  199. package/blocks/native/sm.blueprint/versions/2.1.0/package.js +0 -358
  200. package/blocks/native/sm.blueprint/versions/2.1.1/package.js +0 -358
  201. package/blocks/native/sm.blueprint/versions/2.1.2/package.js +0 -358
  202. package/blocks/native/sm.blueprint/versions/2.1.3/package.js +0 -381
  203. package/blocks/native/sm.blueprint/versions/2.1.4/package.js +0 -381
  204. package/blocks/native/sm.blueprint/versions/2.1.5/package.js +0 -339
  205. package/blocks/native/sm.blueprint/versions/2.1.6/package.js +0 -356
  206. package/blocks/native/sm.blueprint/versions/2.1.7/package.js +0 -363
  207. package/blocks/native/sm.blueprint/versions/2.1.8/package.js +0 -410
  208. package/blocks/native/sm.blueprint/versions/2.1.9/package.js +0 -422
  209. package/blocks/native/sm.blueprint-assistant/versions/1.0.0/package.js +0 -172
  210. package/blocks/native/sm.chat/versions/2.0.0/package.js +0 -144
  211. package/blocks/native/sm.chat/versions/2.0.1/package.js +0 -97
  212. package/blocks/native/sm.chat/versions/2.0.2/package.js +0 -100
  213. package/blocks/native/sm.chat/versions/2.0.3/package.js +0 -100
  214. package/blocks/native/sm.continue-if/versions/1.0.0/package.js +0 -168
  215. package/blocks/native/sm.describe-media/versions/2.0.0/package.js +0 -153
  216. package/blocks/native/sm.describe-media/versions/2.0.1/package.js +0 -156
  217. package/blocks/native/sm.describe-media/versions/2.1.0/package.js +0 -140
  218. package/blocks/native/sm.image-editor/versions/2.0.0/package.js +0 -183
  219. package/blocks/native/sm.image-editor/versions/2.0.1/package.js +0 -190
  220. package/blocks/native/sm.new-items/versions/1.0.0/package.js +0 -191
  221. package/blocks/native/sm.pick-photos/versions/1.0.0/package.js +0 -334
  222. package/blocks/native/sm.quality-audit/versions/1.0.0/package.js +0 -192
  223. package/blocks/native/sm.quality-audit/versions/1.0.1/package.js +0 -192
  224. package/blocks/native/sm.quality-audit/versions/1.0.2/package.js +0 -195
  225. package/blocks/native/sm.research/versions/2.0.0/package.js +0 -175
  226. package/blocks/native/sm.research/versions/2.0.1/package.js +0 -184
  227. package/blocks/native/sm.research/versions/2.0.2/package.js +0 -187
  228. package/blocks/native/sm.script/versions/2.0.0/package.js +0 -144
  229. package/blocks/native/sm.script/versions/2.1.0/package.js +0 -144
  230. package/blocks/native/sm.script/versions/2.1.1/package.js +0 -144
  231. package/blocks/native/sm.script/versions/2.1.2/package.js +0 -105
  232. package/blocks/native/sm.script/versions/2.1.3/package.js +0 -152
  233. package/blocks/native/sm.script/versions/2.1.4/package.js +0 -156
  234. package/blocks/native/sm.script/versions/2.1.5/package.js +0 -156
  235. package/blocks/native/sm.shot-plan/versions/2.0.0/package.js +0 -301
  236. package/blocks/native/sm.shot-plan/versions/2.1.0/package.js +0 -528
  237. package/blocks/native/sm.shot-plan/versions/2.1.1/package.js +0 -528
  238. package/blocks/native/sm.shot-plan/versions/2.1.2/package.js +0 -528
  239. package/blocks/native/sm.shot-plan/versions/2.1.3/package.js +0 -536
  240. package/blocks/native/sm.shot-plan/versions/2.2.0/package.js +0 -800
  241. package/blocks/native/sm.shot-plan/versions/2.2.1/package.js +0 -920
  242. package/blocks/native/sm.shot-plan-assistant/versions/1.0.0/package.js +0 -173
  243. package/blocks/native/sm.stock-search/versions/2.0.0/package.js +0 -174
  244. package/blocks/native/sm.thumbnail/versions/2.0.0/package.js +0 -137
  245. package/blocks/native/sm.thumbnail/versions/2.0.1/package.js +0 -140
  246. package/blocks/native/sm.transcribe/versions/2.0.0/package.js +0 -163
  247. package/blocks/native/sm.transcribe/versions/2.0.1/package.js +0 -168
  248. package/blocks/native/sm.whiteboard-assistant/versions/1.0.0/package.js +0 -175
  249. package/blocks/native/sm.youtube/versions/2.0.0/package.js +0 -217
  250. package/blocks/occasion-story/package.js +0 -1
  251. package/blocks/occasion-story/versions/1.0.0/package.js +0 -1658
  252. package/blocks/occasion-story/versions/1.0.1/package.js +0 -1699
  253. package/blocks/occasion-story/versions/1.0.2/package.js +0 -1682
  254. package/blocks/photo-reel-composer/versions/1.0.0/package.js +0 -3043
  255. package/blocks/photo-reel-composer/versions/1.0.1/package.js +0 -3026
  256. package/blocks/photo-reel-composer/versions/1.0.2/package.js +0 -4149
  257. package/blocks/product-ad-variants/versions/1.0.0/package.js +0 -2911
  258. package/blocks/product-launch-director/versions/1.0.0/package.js +0 -103
  259. package/blocks/release-visuals/package.js +0 -1
  260. package/blocks/release-visuals/versions/1.0.0/package.js +0 -1492
  261. package/blocks/release-visuals/versions/1.0.1/package.js +0 -1517
  262. package/blocks/release-visuals/versions/1.0.2/package.js +0 -1500
  263. package/blocks/screen-recorder/package.js +0 -1
  264. package/blocks/screen-recorder/versions/1.0.0/package.js +0 -223
  265. package/blocks/screen-recorder/versions/1.0.1/package.js +0 -223
  266. package/blocks/short-form-finish/package.js +0 -1
  267. package/blocks/short-form-finish/versions/1.0.0/package.js +0 -1043
  268. package/blocks/short-form-finish/versions/1.0.1/package.js +0 -1043
  269. package/blocks/short-form-finish/versions/1.0.2/package.js +0 -1043
  270. package/blocks/short-form-finish/versions/1.0.3/package.js +0 -1026
  271. package/examples/saas-product-launch-reviewed-source.stillmade.json +0 -383
  272. package/examples/saas-product-launch.stillmade.json +0 -304
  273. package/packages/block-platform/dealer-inventory-video-project-type.js +0 -38
  274. package/packages/block-platform/first-revenue-project-types.js +0 -46
  275. package/packages/block-platform/fixture-starters.js +0 -13
  276. package/packages/block-platform/launch-project-source.js +0 -10
  277. package/packages/block-platform/launch-project.js +0 -30
  278. package/packages/block-platform/motion-project-types.js +0 -55
  279. package/packages/block-platform/motion-starters.js +0 -14
  280. package/packages/block-platform/product-ad-variants-project-type.js +0 -30
  281. package/packages/block-platform/product-launch-updated.js +0 -90
  282. package/packages/block-platform/revenue-review-project-types.js +0 -36
  283. package/packages/block-platform/revenue-review-starters.js +0 -13
  284. package/packages/block-platform/script-writer.js +0 -29
  285. package/packages/block-platform/website-source-block.js +0 -14
@@ -0,0 +1,343 @@
1
+ # Block interface design
2
+
3
+ # Block interface design
4
+
5
+ A Block page should work at a glance: the thing being made is the biggest
6
+ thing on the page, there is one obvious next action, choices are pictures, and
7
+ words appear only when someone needs them. The app owns project navigation;
8
+ a Block owns its production surface. Neither needs a second shell.
9
+
10
+ Most Blocks need no custom view: generated `manifest.ui` controls already
11
+ follow these rules. Write a custom view only when the core interaction needs
12
+ one, and start it from the Block kit.
13
+
14
+ ## 1. Start from the Block kit
15
+
16
+ StillMade adds the Block kit stylesheet (`packages/design-system/block-kit.css`)
17
+ to every Block view, standard and frame. Use its classes and ship little or no
18
+ CSS of your own. Every kit rule has zero specificity, so your own CSS always
19
+ wins. Open `packages/design-system/block-kit.html` in a browser to see every
20
+ piece in Light, Dark and White.
21
+
22
+ ```html
23
+ <main class="sm-block">
24
+ <fieldset class="sm-choices" id="look" data-stillmade-share="look" data-ratio="16:9">
25
+ <legend>Look</legend>
26
+ <label><input type="radio" name="look" value="warm" checked><img src="data:..." alt=""><span>Warm</span></label>
27
+ <label><input type="radio" name="look" value="cool"><img src="data:..." alt=""><span>Cool</span></label>
28
+ </fieldset>
29
+
30
+ <div class="sm-field">
31
+ <div class="sm-label">
32
+ <label for="caption">Caption</label>
33
+ <details class="sm-hint"><summary aria-label="About captions" title="About captions"></summary><p>Shown over the first two seconds.</p></details>
34
+ </div>
35
+ <input id="caption" data-stillmade-input="caption" placeholder="Optional">
36
+ </div>
37
+
38
+ <details class="sm-more">
39
+ <summary>More</summary>
40
+ <div class="sm-fields"><!-- secondary settings --></div>
41
+ </details>
42
+
43
+ <div class="sm-actions">
44
+ <button type="button" class="sm-primary" id="run" data-stillmade-action="run">Make the clip</button>
45
+ <p class="sm-status" id="status" role="status"></p>
46
+ </div>
47
+
48
+ <section class="sm-stage" id="stage" data-ratio="16:9" aria-live="polite">
49
+ <div class="sm-empty" id="empty">
50
+ <span class="sm-glyph" data-glyph="video" aria-hidden="true"></span>
51
+ <p>Your clip</p>
52
+ </div>
53
+ </section>
54
+ </main>
55
+ ```
56
+
57
+ With an `sm-stage` as its direct child and no `data-layout`, `sm-block` puts
58
+ the inputs on the left and the stage on the right from 860 px wide. Under that
59
+ everything stacks in the page's order, so the stage comes last in the markup:
60
+ the inputs, the button, then the result's place under it.
61
+
62
+ | Class | Use it for |
63
+ | --- | --- |
64
+ | `sm-block` | The one workspace. With an `sm-stage` child, the controls sit left and the stage right from 860 px; narrower, they stack in the page's order. `data-layout="stack"` keeps one column; `"split"` is an older layout with the stage on the left. |
65
+ | `sm-stage` | The thing being made: preview, media or result. `data-ratio="16:9"`, `"9:16"` or `"1:1"`. |
66
+ | `sm-empty` | An empty stage: a glyph, at most five words, one action. |
67
+ | `sm-choices` | Picks shown as pictures (`img`, `.sm-swatch`, `.sm-glyph`) and one or two words. `data-compact` for short text chips, `data-segmented` for one connected row of three or four short options. The pick is filled with the kit's ink, so it reads at a glance; a `disabled` fieldset keeps its pick and fades the rest. Chips and segments scroll sideways on a phone. Give the `fieldset` an `id` and `data-stillmade-share` so teammates see the same pick. |
68
+ | `sm-field`, `sm-fields` | One short setting on one row, its label beside the control; a responsive group of them. On a phone the control wraps under its label only when both do not fit. A textarea, picture choices, file tiles or a list keep the label above. |
69
+ | `sm-settings` | Short settings side by side, each label beside its control; a narrow cell wraps the control under its label. |
70
+ | `sm-list` | Many items, one line each: a thumbnail, one line of text, a short fact. An item that opens in place is an `li` holding a `details`. `data-peek` shows three on a phone, with a last `li.sm-list-more` button that sets `data-open`. |
71
+ | `sm-clamp` | Long text that shows five lines on a phone until it gets `data-open`. |
72
+ | `sm-actions` | One `sm-primary`, then `sm-quiet` buttons and `sm-icon` buttons (each with `aria-label` and `title`). |
73
+ | `sm-status` | Live state beside the action: `data-state="loading"`, `"success"`, `"waiting"` or `"error"`. |
74
+ | `sm-more` | A closed `<details>` for secondary settings. |
75
+ | `sm-hint` | A closed `<details>` (i) for an explanation that might help. Its words show on hover or focus, or a tap on touch screens. |
76
+ | `sm-gallery` | A grid of results or media. `data-size="small"` for input files: more tiles per row as the screen widens. |
77
+ | `sm-media-off` | A picture or clip that cannot show here (on another device, or it did not open): a quiet tile in its own shape (`--sm-photo-ratio`, the tile's shape in a gallery) holding the `image-off` glyph, the reason in `aria-label` and `title`, no words inside. |
78
+ | `sm-add` | The + tile that adds files to an input: `<button type="button" class="sm-add" data-stillmade-add="listingPhotos" aria-label="Add photos">`. StillMade opens its own picker and saves the files; they arrive through `onInput`. In an `sm-gallery` it takes the tile's shape. |
79
+ | `sm-scrim` | Words over a photo or video, inside a positioned box such as an `sm-stage`: a see-through shade of the page under them, in every theme. `var(--scrim)` is the same shade for your own rules. |
80
+ | `sm-glyph` | A small icon in `currentColor`: `play`, `pause`, `plus`, `close`, `check`, `chevron`, `chevron-left`, `chevron-right`, `upload`, `image`, `image-off`, `video`, `audio`, `text`, `spark`, `info`, `warning`, `spinner`. Works in standard views, which cannot use SVG. |
81
+
82
+ **Function first.** When the person building a Block does not ask for a look,
83
+ use the kit as is: they want it to work and be easy to use. When they name a
84
+ design direction, follow it; the kit is the default, not a ceiling. Original
85
+ designs keep `appearance: "original"`.
86
+
87
+ ## 2. Decide every sentence
88
+
89
+ | If the words… | Then |
90
+ | --- | --- |
91
+ | aren't needed to finish the task (an intro, "how it works", the Block name again, a description of what is already visible) | Drop them. |
92
+ | say what a glyph, thumbnail, swatch or sample can show | Show the picture. Keep one or two words under it. |
93
+ | might help some people (what a setting does, a format limit) | Put them in a closed `sm-hint`, or secondary settings in a closed `sm-more`. |
94
+ | report an error, a spending approval, a stale input or a destructive step | Keep them visible, in few words. Say what to do next. |
95
+
96
+ Buttons say the action in the job's words, one to four of them ("Plan the tour",
97
+ "Make 6 clips", "Export"), never "Make it". Status says the state in one to four
98
+ words ("Making the clip", "Ready", "Needs approval").
99
+
100
+ The button that makes something names what it makes ("Write", "Generate image",
101
+ "Make video"), never "Run", "Run step", "Submit" or "Review cost", and says the
102
+ progress word while it works ("Writing…").
103
+
104
+ Credit prices come from StillMade, never from the Block. On a Step, StillMade's
105
+ run button carries the price beside the verb ("Write · 1 credit"), with a chip
106
+ before it when the model, quality or count can change; each choice there shows
107
+ its own price. When a custom view starts paid work, StillMade's run review shows
108
+ the same single priced button. Pressing a priced button runs at that price; a
109
+ confirmation appears only when the server's price is higher than the one shown.
110
+ Do not write credit numbers in the Block.
111
+
112
+ ## 3. Speak the job
113
+
114
+ These are StillMade's defaults for every Block, and they apply wherever the
115
+ person or the creator has not asked for something else. What they ask for wins.
116
+
117
+ - **The job's words everywhere.** Bringing ("Your listing photos"), starting
118
+ ("Plan the tour"), working ("Moving through the kitchen, 4 of 9 rooms"),
119
+ done ("Your tour · 44 s") and problems ("No bathroom photo. Guests look for
120
+ one." with Add photo beside it). Never "Make it", "Run", "Submit",
121
+ "Process", "Processing", "Output" or "Result".
122
+ - **Name the Step's button in `manifest.action`**:
123
+ `{"label":"Plan the tour","running":"Planning the tour…"}`. StillMade adds the
124
+ price ("Plan the tour · 1 credit"). A picture, video or sound made with AI
125
+ starts with Generate and says what ("Generate tour", "Generate voiceover");
126
+ cutting or rendering the person's own media says Make ("Make 6 clips").
127
+ Bare "Generate" or "Make" is not enough.
128
+ - **The main button stands out.** One solid `sm-primary` per screen, in the
129
+ kit's ink, never restyled to the page's background or a ghost outline; every
130
+ other button is `sm-quiet` or an `sm-icon`. Close is an X icon, not the word.
131
+ - **Quiet.** At most one line of guidance on a screen, only where the next
132
+ move is not obvious. No welcome text, tips under fields, tours or banners.
133
+ Anything more goes in the input's `description`, which StillMade shows
134
+ behind an (i).
135
+ - **Say nothing about how the Block works.** No notes on where it runs (this
136
+ device, StillMade Desktop, the cloud), saving, syncing, recovery, accounts,
137
+ credits or where a file is kept: StillMade says what a person needs, as one
138
+ short notification, or nothing. Never a sentence on the page, and never the
139
+ same line under each item.
140
+ - **References fill your inputs.** Every drop area in StillMade offers "Use a
141
+ reference": the person's saved photos, videos and notes fill the Step's
142
+ fields with no typing. Media inputs fill by kind, so take `video` or `asset`
143
+ wherever a clip works as well as a photo. Text inputs fill by their name and
144
+ label: name them plainly (`productName`, `website`, `brandColors`, `fonts`,
145
+ `voice`), and give the one that takes a reference's note a name such as
146
+ `details`, `notes` or `listingDetails`; when a note has to be split across
147
+ several fields StillMade does it free. Never build your own reference
148
+ picker or library upload.
149
+ - **Files are tiles, added through StillMade.** A screen that holds an
150
+ input's files shows them as tiles (`sm-gallery`) ending in the kit's + tile,
151
+ `<button type="button" class="sm-add" data-stillmade-add="listingPhotos"
152
+ aria-label="Add photos">`. StillMade opens its own picker and saves the files
153
+ as its own tiles do; they arrive through `onInput`. From your own code call
154
+ `StillMade.addFiles("listingPhotos")` in a click. Never an
155
+ `<input type="file">` or an upload box of the Block's own. See
156
+ [Frame views](FRAME_VIEWS.md#adding-files-to-an-input).
157
+ - **Days and times are picked, never typed.** Use the `date` type. StillMade
158
+ shows a calendar, and a list of times as well when the input is about a time
159
+ (a name such as `postAt` or `startsAt`, a label with Time, When or Starts, or
160
+ a value with a time). In a custom view use `<input type="date">` or
161
+ `type="datetime-local"`, never a text box for a date.
162
+ - **Posting is its own Step.** Sending a result to Instagram, TikTok, email or
163
+ any app is a connector Step after the Block, and StillMade words its button
164
+ ("Post to Instagram"). A Block never posts from inside itself.
165
+ - **Chat can do all of it.** Every button carries `data-stillmade-action`
166
+ and every field a label, so the project's Chat can press and fill them. The
167
+ button that runs the Block says `run` (StillMade's phone and desktop checks
168
+ press it with the fixture); every other button names what it does
169
+ (`data-stillmade-action="play sample"`). Chat reads the value with the
170
+ button's own words.
171
+
172
+ ## 4. Rules
173
+
174
+ These are requirements for every author, person or model. Not all are checked
175
+ automatically. An explicit request from the person can authorize a named
176
+ exception, never unrelated technical UI.
177
+
178
+ 1. Show the thing being made, not a technical representation of it. No JSON
179
+ dumps, source editors, manifests, debug consoles or "Technical result"
180
+ panels unless the task is about source. A collapsed disclosure is still an
181
+ added surface. Every part shows at once (November 3, 2026): before the first
182
+ run the result's place is drawn in the shape and size of what is coming
183
+ (`<section class="sm-stage" data-ratio="9:16">` for a vertical clip, lines for
184
+ text, a player bar for sound), so the result fills a place the person already
185
+ sees instead of popping in somewhere unexpected. StillMade draws the Steps it
186
+ draws the same way (`ResultPlace`). On a wide screen what goes in sits on the
187
+ left and the result on the right, side by side (the kit's `sm-block` with an
188
+ `sm-stage` does this from 860px); they stack only on narrow screens and phones,
189
+ the result's place under the button (rule 16).
190
+ 2. One obvious next action. Seven or fewer choices in view; strong defaults.
191
+ 3. Choices people see or hear (voices, music, sounds, fonts, looks, colors,
192
+ templates, images) show a preview of each option: a thumbnail or a sample
193
+ to play, never a paid generation.
194
+ 4. One workspace. No cards inside cards, no dialogs as page layout, no second
195
+ title, step counter, Back/Next bar or generic "Workflow tools" menu.
196
+ 5. Keep the page in normal scroll flow. No sticky media, headers or control
197
+ strips unless the editing task needs a fixed timeline or inspector.
198
+ 6. Name secondary controls by purpose; no ambiguous settings gear.
199
+ 7. Icons come from the kit glyphs or your own files, with an accessible name
200
+ and tooltip. Never emoji, never a circle around an icon.
201
+ 8. Never hide spending approvals, failures or stale-source warnings for
202
+ neatness, and never discard drafts when collapsing controls.
203
+ 9. Text scene descriptions are planning notes, never a storyboard, frame review
204
+ or motion preview. Frame Review shows the exact images being approved.
205
+ 10. Compact: the whole Block fits one laptop screen (about 720 px tall)
206
+ without scrolling, and a 320 px phone without sideways scrolling. If it
207
+ does not fit, fold, shrink or move something; never add a section below.
208
+ 11. A short setting is one row, its label beside the control (the kit's
209
+ `sm-field` does this on any view wider than a phone). No card around a
210
+ single control.
211
+ 12. Status is a dot or a few words ("No narration yet"), never a paragraph.
212
+ The reason sits behind an `sm-hint`.
213
+ 13. Files are tiles: a saved file is a thumbnail or chip, and adding one is a
214
+ + tile, `<button class="sm-add" data-stillmade-add="<input>">`, which
215
+ opens StillMade's picker (or `StillMade.addFiles("<input>")` from your own
216
+ button). Never an `<input type="file">` or the browser's bare
217
+ "Choose File / No file chosen" picker, and no size limits in view until
218
+ a file is too big.
219
+ 14. Rare tools (update, schedule, history, reload) are named icon buttons
220
+ beside the action, never sections under the work.
221
+ 15. An (i) beside anything a newcomer could misread. A setting, status or
222
+ number whose effect is not obvious from its label ("Duplicates", "FPS",
223
+ "Commit", "Ready to render") gets a closed `sm-hint` next to it with one
224
+ or two plain sentences. On generated controls StillMade shows the input's
225
+ `description` as that (i), so write a `description` for every input that
226
+ needs one. Obvious controls ("Photos", "Tone") get none.
227
+ 16. Use the width. From 860 px wide, the kit puts the controls on the left
228
+ at a reading width (300–380 px) and the result (`sm-stage`, a direct
229
+ child of `sm-block`) fills the right, in its real shape. Under that the
230
+ page is one column in the page's order: the inputs, the action in
231
+ normal flow (rule 5: never a sticky bar), then the result's place under
232
+ it, so `sm-stage` comes after `sm-actions` in the markup. Keep the
233
+ inputs above the button short enough that a phone shows the button
234
+ without scrolling far; fold the rest into `sm-more`. Extra width goes to the result, never to wider text
235
+ fields. Before there is a result, the stage previews what will be made
236
+ from the inputs given so far, not an empty box. `data-layout="stack"`
237
+ keeps one column. StillMade zooms a view to fill its space and centers a
238
+ standard view narrower than its Step (by its margins only, so a margin
239
+ the view sets wins). An app that lays itself out (full-size canvas or
240
+ WebGL, its own scroll, pan or zoom, its own Ctrl/Cmd +/- keys) puts
241
+ `data-stillmade-layout="own"` on its outermost element, and StillMade
242
+ then never centers, zooms or takes those keys. StillMade plays every
243
+ `<video controls>` in its own player with full screen, and puts a
244
+ full-screen button on result pictures in `sm-stage` or `sm-gallery` and
245
+ on anything marked `data-stillmade-expand`; a `<video>` without
246
+ `controls` is the Block's own and is never touched.
247
+ 17. Settings sit side by side, next to what they change. Short settings are
248
+ an `sm-settings` grid, and three or four short options (Low / Med /
249
+ High, 16:9 / 9:16 / 1:1) are one `data-segmented` row, not big tiles.
250
+ 18. Lists fill the width at a small size. Input files are `sm-gallery
251
+ data-size="small"` tiles; many items (shots, scenes, rows) are an
252
+ `sm-list`, one line each with a thumbnail, one line of text and a short
253
+ fact, and tapping an item opens all of its fields in place. Extra width
254
+ means more items per row, never bigger cards.
255
+ 19. On a phone, chip and segment rows scroll sideways instead of wrapping,
256
+ long lists show their first three and "N more" (`sm-list data-peek`),
257
+ and long text shows five lines until tapped (`sm-clamp`).
258
+ 20. Nothing is lost when a Block gets smaller. Every control stays on the
259
+ screen, behind an (i), in `sm-more`, or inside the item it belongs to.
260
+ Compacting moves controls; it never deletes them.
261
+ 21. A picked option reads at a glance. The kit fills an `sm-choices` pick with
262
+ its ink (`--fg` behind `--bg` words, the same inversion as every
263
+ segmented control in StillMade); never restyle it to an outline, a tint or
264
+ the page's background. A locked row (`disabled`, or a person who can only
265
+ view) keeps its pick filled, fades the other options and does not react to
266
+ the pointer.
267
+ 22. Media that cannot show here (kept on another device, or it did not open)
268
+ keeps its place as a quiet `sm-media-off` tile in its own shape with the
269
+ `image-off` glyph, the reason in its `aria-label` and `title`. Never words
270
+ in its place:
271
+
272
+ ```html
273
+ <span class="sm-media-off" role="img" aria-label="On another device" title="On another device" style="--sm-photo-ratio:3/2">
274
+ <span class="sm-glyph" data-glyph="image-off" aria-hidden="true"></span>
275
+ </span>
276
+ ```
277
+ 23. One page per job (November 3, 2026). A job the person fills in and then
278
+ gets a result from is one Block on one page: the inputs and settings, a
279
+ cheap check before the expensive run (the script and a voice sample
280
+ before the video), then the result. The check is a second
281
+ `StillMade.run` on the same page, priced by StillMade on its own (Module
282
+ Blocks, "A check, then the expensive run, on one page"); it never becomes
283
+ a second Block or Step. A workspace the person works in for a while (a
284
+ CAD tool, a canvas, an editor) is its own Block, and turning what it made
285
+ into something else is the next one.
286
+
287
+ ## 5. What StillMade checks
288
+
289
+ - Admission rejects a primary textarea of 12 or more rows when no task
290
+ presentation (stage, media, list or `StillMade.render`) is detected
291
+ (`INTERFACE_DESIGN_RULES`).
292
+ - Admission warns about more than eight visible controls, more than seven
293
+ ungrouped options, more than one `h1`, a visible paragraph over twenty words,
294
+ a word dropdown for something people see or hear, a bare browser file
295
+ picker, and a size limit printed in view.
296
+ - Readiness notes settings left loose on the page: three or more `sm-field`
297
+ outside an `sm-fields`, `sm-settings`, `sm-more` or `sm-list` group. The kit
298
+ gives that group its own surface, so the inputs, the settings and the result
299
+ read apart; the SDK gate and StillMade's builder send the note back like any
300
+ Wording note.
301
+ - Admission warns about the compact rules it can see in the source: a short
302
+ input or select whose label sits above it outside `sm-field` / `sm-settings`
303
+ (a `<br>` between them, or a label made `display: block`); a heading,
304
+ legend or `<details>` summary titled Update, Schedule, History, Reload or
305
+ Versions, which should be an icon button beside the action; and more than
306
+ eight visible top-level rows besides the stage. The row count is an estimate:
307
+ a static check cannot measure height. StillMade's builder preview measures the
308
+ real one and says when the view is taller than one laptop screen (720px) at
309
+ the Desktop size.
310
+ - Admission also warns, and `stillmade-block ready` fails the "UI works" check
311
+ (DOD-15), when a button says "Run", "Run step" or "Submit", when the
312
+ interface shows a credit price, or when it has a page heading
313
+ (`blockKitProblems`; the failing rules are `BLOCK_KIT_READINESS_RULES`). StillMade's own Block builder also sends back a custom
314
+ view that is not built from `sm-block`, unless the person asked for their
315
+ own look (`appearance: "original"`).
316
+ - Admission warns, and readiness lists a "Wording" limitation, when a button
317
+ says "Make it", "Generate", "Create", "Process" or "Do it"; when progress
318
+ says "Processing", "Loading" or "Working"; when a visible line explains where
319
+ the Block runs or how it saves; when a date is typed into a text box; when
320
+ the CSS turns `sm-primary` into a background-coloured button; when the CSS
321
+ takes the ink fill off a pick (`.sm-choices label:has(input:checked)` with a
322
+ transparent or page-coloured background, or the ink as its text colour); and
323
+ when the page or a string in its code says where a file is kept ("Only on
324
+ this device", "Not on this device"). Clear
325
+ every one before you hand the Block back, unless the person asked for those
326
+ words. They never refuse a release.
327
+ - The host supplies the Project Type step bar and omits its own title and frame
328
+ around custom views, and does not add a "Technical result" disclosure.
329
+ - HTML, JavaScript, permission and appearance validation are separate checks.
330
+ Simplicity never bypasses safety or approval.
331
+
332
+ The SDK exports the ordered principles as `BLOCK_INTERFACE_PRINCIPLES` and the
333
+ kit vocabulary as `BLOCK_KIT_CLASSES`. `INTERFACE_DESIGN_CONVENTIONS`,
334
+ `INTERFACE_DESIGN_PRINCIPLES` and `INTERFACE_AUTHORING_RULES` remain as
335
+ compatibility names for the same list.
336
+
337
+ ## Existing Blocks
338
+
339
+ Pinned Blocks can still contain nested panels and text-only plans; the kit does
340
+ not redesign them. Move a Block to the kit through a new versioned release and
341
+ an explicit upgrade, following the
342
+ [SDK update procedure](https://stillmade.shop/block-sdk/PASTE_TO_LLM.md#updating-existing-blocks-through-the-sdk).
343
+ Never rewrite immutable releases or silently change a saved workflow's pins.
@@ -0,0 +1,63 @@
1
+ # JavaScript Blocks
2
+
3
+ Computation code may use `StillMade.emit(name, value)` instead of returning an
4
+ output object. Names must be declared outputs; emit each once, and do not combine
5
+ emission with a return value or cooperative pending result. Emissions remain
6
+ inside the sandbox until final host validation and normal result acceptance.
7
+ `StillMade.resolveRequirement(inputName)` reads a declared input from the fixed
8
+ host-validated snapshot and returns `{resolved:true, requirement, value}` or
9
+ `{resolved:false, requirement}` for an absent optional input. Undeclared names
10
+ throw; this method does not search sources or call Chat.
11
+
12
+ `StillMade.getProjectContext()` returns an isolated snapshot of declared
13
+ context-bound inputs, keyed by their `context` field names. An optional declared
14
+ field argument reads one value; undeclared fields throw and absent optional
15
+ values return `undefined`. It does not enumerate the whole project or bypass
16
+ host permissions, and it does not fetch newer values during a run.
17
+
18
+ `StillMade.validate(value, schema)` returns a boolean for supported JSON/schema
19
+ validation only. It does not establish semantic correctness, media validity,
20
+ permissions, or provenance. Final host output validation remains mandatory.
21
+ These computation helpers are not available to `view.javascript`. Isolated
22
+ computation code also has `StillMade.requestFromUser` and `StillMade.requestFromChat`
23
+ (see `UNIVERSAL_RESOLVER.md`) and `StillMade.patchProject` (reviewable workspace-edit
24
+ proposals).
25
+ See `JAVASCRIPT_RESULTS.md` for state, continuation and permission boundaries.
26
+
27
+ Create an editable JavaScript block with:
28
+
29
+ ```sh
30
+ node packages/block-cli/cli.js create ./my-js-block javascript
31
+ node packages/block-cli/cli.js test ./my-js-block
32
+ node packages/block-cli/cli.js pack ./my-js-block ./my-js-block.stillmade.json
33
+ ```
34
+
35
+ Set `manifest.runtime` to `javascript`. The source file is `src/run.js`, packed
36
+ as `{manifest,code,tests}`. Write a synchronous function body: `input` contains
37
+ validated named inputs; return an object whose keys match declared outputs.
38
+ For example, with a text input and text/words outputs:
39
+
40
+ ```js
41
+ const text = input.text.trim();
42
+ return { text, words: text ? text.split(/\s+/).length : 0 };
43
+ ```
44
+
45
+ Use `await runPackageAsync(package, input)` from the SDK to dispatch either runtime.
46
+ The older synchronous `runPackage` remains recipe-only. In browsers, invoke the
47
+ async API inside a disposable worker; the app does this automatically. On Node,
48
+ the SDK creates and terminates a separate worker for every JavaScript execution.
49
+ The downloadable SDK includes its pinned QuickJS WASM runtime and dependency
50
+ licenses, so these examples run without installing packages or accessing a network.
51
+
52
+ The guest has standard QuickJS JavaScript built-ins. It has no DOM, browser storage,
53
+ fetch, Node globals, timers, module loader, filesystem, secrets, or host callbacks.
54
+ An asset reference is data, not file access. npm packages and imports are unsupported.
55
+ Promises are not awaited; return synchronously. Values cross through JSON and
56
+ are validated against output ports. Avoid Date/randomness in behavior fixtures.
57
+
58
+ Limits per run: 256 KiB source, 4 MiB serialized input and output, 500 ms guest
59
+ execution, 16 MiB guest heap, 512 KiB stack, and a fixed 32 MiB WASM memory.
60
+ Node adds a five-second worker watchdog and at most four concurrent executions;
61
+ app workers have a 15-second outer watchdog. Each package fixture suite has a ten-second deadline (callers may shorten it);
62
+ all embedded packages share a fifteen-second project-type deadline. Timeouts, allocation failures, invalid outputs and syntax errors
63
+ fail the run; no partial output is committed. Each run receives a fresh VM.
@@ -0,0 +1,61 @@
1
+ # Preview with hot reload
2
+
3
+ `stillmade-block dev <folder>` opens a local preview at `http://127.0.0.1:4800`
4
+ (`--port` changes it). The page is StillMade's own view host: the same sandbox
5
+ page, bridge, response policy, theme, run limits and guard that run your
6
+ interface in the app, so what works here works there.
7
+
8
+ - Your interface (standard or frame view) runs with the first fixture's input.
9
+ Pick another fixture, switch Light, Dark and White, and try phone, tablet and
10
+ full widths. The **Input data** tab of the panel below the Block shows that
11
+ input as JSON. An edit there applies when you leave the box (click outside it
12
+ or press Tab), not as you type; the view then hears it through `onInput`. Text
13
+ that is not one JSON object is named under the box and not applied.
14
+ - `StillMade.run` runs the Block on your machine with the SDK runtime. As on a
15
+ project Step, the inputs the view leaves out are the current input's, so
16
+ `StillMade.run({make: 'check'})` still gets the example's photos; what the
17
+ view passes is kept in the input. Hosted
18
+ operations, files, network, connections and storage are answered by
19
+ [stand-ins](testing.md), and stand-in media (images, audio, video)
20
+ previews in the view. Shared view state (`updateShared`) is kept in the page.
21
+ The view's `addFiles`, `removeFile` and `moveFile` change the input's files
22
+ here as they change a Step's.
23
+ - Saving any file the package reads reloads the preview, keeping the input and
24
+ shared state. With `--build "npm run build"`, saving any other source file
25
+ (such as `src/view.jsx`) runs the build first, then reloads.
26
+ - The console lists every run, the module's `stillmade.log` lines, each
27
+ stand-in that answered, reloads, build output and errors from the view.
28
+ - The server listens on this machine only, refuses other host names and other
29
+ sites, and never contacts StillMade or a provider. Paid runs, sign-ins and
30
+ keys happen only in StillMade, after you import the Block.
31
+
32
+ ### Live link to your account
33
+
34
+ `stillmade-block dev <folder> --live` also prints a link to StillMade's Import
35
+ page. Open it while signed in and choose **Connect**: each time you save, the
36
+ packed Block (what `pack` would write) opens in StillMade's usual import review
37
+ with its checks and preview, and confirming installs that version in your
38
+ account, as a new revision of the same build. Use it in a project to run it with
39
+ real hosted operations, files and connections; every paid step shows its price
40
+ and asks first, as for any Block.
41
+
42
+ - Nothing is installed or published without your confirmation in the review.
43
+ - Only the StillMade site can read the link, and only with the random key in it,
44
+ which changes each time `dev` starts. `--site` sets another StillMade address
45
+ (https). Stop the link with **Disconnect** or by stopping `dev`.
46
+ - The browser may ask once whether StillMade may reach a local address.
47
+
48
+ ## Templates
49
+ `stillmade-block create <folder> <template>` writes a complete folder that validates and tests offline:
50
+
51
+ | Template | What it starts |
52
+ | --- | --- |
53
+ | `recipe` (default), `image`, `stateful` | Built-in steps with no code; memory between runs |
54
+ | `javascript` | A few lines of sandboxed JavaScript |
55
+ | `module`, `module-wasm` | Modern JavaScript modules in a Worker, with WebAssembly |
56
+ | `module-hosted` | A module calling hosted text and image generation as tools |
57
+ | `view-react`, `view-html` | A frame view in React (bundled with esbuild) or plain web code |
58
+ | `text`, `image-generate`, `video-generate`, `speech`, `music`, `sfx`, `transcribe`, `describe-image`, `analyze-media`, `web-fetch`, `web-research`, `timeline-proposal` | One hosted operation each, on the person's credits |
59
+ | `outside-api`, `connection` | An outside API with the person's own key; a published adapter with their sign-in |
60
+ | `storage` | Values kept across runs in project storage |
61
+ | `trigger-media`, `trigger-webhook`, `trigger-schedule` | Blocks that run on their own once the project owner turns them on |
@@ -0,0 +1,27 @@
1
+ # Hosted media analysis
2
+
3
+ `media.analyze` asks StillMade's media vision a question about saved media and
4
+ returns structured evidence. Declare one `video`, `image` or `image[]` (one to
5
+ four images) input, one `text` or `json` output and
6
+ `permissions.capabilities: ["media.analyze"]`. A video Block may bind two
7
+ optional `number` inputs as a time range to look at closely (at most 12 seconds):
8
+
9
+ ```json
10
+ {"schemaVersion":1,"operation":"media.analyze","media":{"$input":"clip"},
11
+ "question":"Is the product logo clearly visible, and when?",
12
+ "range":{"start":{"$input":"start"},"end":{"$input":"end"}},"output":"report"}
13
+ ```
14
+
15
+ StillMade reads the media from the runner's own library (never from another
16
+ account or an arbitrary URL), samples a video into a timestamped contact sheet
17
+ or uses the still image, and asks the vision model the Block's question (1 to
18
+ 2,000 characters). A `json` output receives
19
+ `{"schemaVersion":1,"items":[{"kind","summary","timeline","observations","detectedText","issues","confidence","range"?}]}`
20
+ with timestamps in seconds; each list holds up to 20 entries. A `text` output
21
+ receives the summaries (numbered when there are several images).
22
+
23
+ Each analyzed image or video is one priced call, paid with StillMade credits;
24
+ the quote lists the price for every fixture and the sample. Media that cannot
25
+ be read (not saved in the library, too large, or undecodable) is refunded. The
26
+ offline SDK includes `packages/block-sdk/media-analysis-example.js`, exporting
27
+ `mediaAnalysis`.