space-data-module-sdk 0.8.26 → 0.9.0

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 (120) hide show
  1. package/README.md +5 -4
  2. package/docs/assembly.js +0 -18
  3. package/docs/assets/ai-credits/ai-credits.js +116 -0
  4. package/docs/assets/sdn-chrome/sdn-chrome.css +434 -0
  5. package/docs/assets/sdn-chrome/sdn-chrome.js +236 -0
  6. package/docs/browser-wasmedge-isomorphic.html +29 -41
  7. package/docs/byo-wasm-quickstart.html +29 -41
  8. package/docs/conformance.html +29 -41
  9. package/docs/events-abi.html +29 -41
  10. package/docs/families/analytics.html +29 -41
  11. package/docs/families/attitude.html +29 -41
  12. package/docs/families/behavior.html +29 -41
  13. package/docs/families/breakup.html +29 -41
  14. package/docs/families/conjunction.html +29 -41
  15. package/docs/families/data-source.html +29 -41
  16. package/docs/families/effects.html +29 -41
  17. package/docs/families/environment.html +29 -41
  18. package/docs/families/estimation.html +29 -41
  19. package/docs/families/gnc.html +29 -41
  20. package/docs/families/maneuver.html +29 -41
  21. package/docs/families/obstruction.html +29 -41
  22. package/docs/families/propagator.html +29 -41
  23. package/docs/families/propulsion.html +29 -41
  24. package/docs/families/reentry.html +29 -41
  25. package/docs/families/rf.html +29 -41
  26. package/docs/families/scheduler.html +29 -41
  27. package/docs/families/sensor.html +29 -41
  28. package/docs/families/signature.html +29 -41
  29. package/docs/flatsql-host-contract.html +29 -41
  30. package/docs/flatsql-streaming-standard.html +29 -41
  31. package/docs/gpu-module-abi.html +29 -41
  32. package/docs/index.html +43 -47
  33. package/docs/isomorphic-pthreads.html +29 -41
  34. package/docs/isomorphic-sdn-runtime-plan.html +29 -41
  35. package/docs/language-runtime-matrix.html +29 -41
  36. package/docs/media/module-sdk-reel-poster.webp +0 -0
  37. package/docs/media/module-sdk-reel.mp4 +0 -0
  38. package/docs/media/module-sdk-reel.webm +0 -0
  39. package/docs/media/reel/reel.css +53 -0
  40. package/docs/media/reel/reel.js +272 -0
  41. package/docs/module-bundle-runtime-plan.html +29 -41
  42. package/docs/module-publication-standard.html +29 -41
  43. package/docs/node-red-default-node-parity.html +29 -41
  44. package/docs/protect-and-sign.html +29 -41
  45. package/docs/protocol-installation.html +29 -41
  46. package/docs/publication-submission.html +29 -41
  47. package/docs/secrets-capability.html +29 -41
  48. package/docs/styles.css +89 -157
  49. package/docs/testing-harness.html +29 -41
  50. package/docs/tri-runtime-parity-gate.html +29 -41
  51. package/docs/tri-runtime-parity.html +29 -41
  52. package/package.json +5 -3
  53. package/schemas/runtime/FlowNotice.fbs +39 -0
  54. package/schemas/runtime/HostOps.fbs +453 -0
  55. package/schemas/runtime/HttpRequest.fbs +25 -0
  56. package/schemas/runtime/HttpResponse.fbs +24 -0
  57. package/schemas/runtime/IngestRequest.fbs +58 -0
  58. package/schemas/runtime/IngestResult.fbs +23 -0
  59. package/schemas/runtime/ModuleConfig.fbs +41 -0
  60. package/schemas/runtime/RuntimeCommon.fbs +33 -0
  61. package/schemas/runtime/TimerTick.fbs +18 -0
  62. package/src/compiler/compileModule.js +20 -2
  63. package/src/generated/runtime/aligned/HostOps_aligned.js +3924 -0
  64. package/src/generated/runtime/aligned/HostOps_aligned.ts +4620 -0
  65. package/src/generated/runtime/aligned/HostOps_enums.js +14 -0
  66. package/src/generated/runtime/aligned/HostOps_enums.ts +7 -0
  67. package/src/generated/runtime/cpp/FlowNotice_generated.h +367 -0
  68. package/src/generated/runtime/cpp/HostOps_aligned.h +3547 -0
  69. package/src/generated/runtime/cpp/HttpRequest_generated.h +317 -0
  70. package/src/generated/runtime/cpp/HttpResponse_generated.h +315 -0
  71. package/src/generated/runtime/cpp/IngestRequest_generated.h +764 -0
  72. package/src/generated/runtime/cpp/IngestResult_generated.h +319 -0
  73. package/src/generated/runtime/cpp/ModuleConfig_generated.h +604 -0
  74. package/src/generated/runtime/cpp/RuntimeCommon_generated.h +410 -0
  75. package/src/generated/runtime/cpp/TimerTick_generated.h +229 -0
  76. package/src/generated/runtime/sdn/runtime/ArchiveTarget.js +78 -0
  77. package/src/generated/runtime/sdn/runtime/ArchiveTarget.ts +104 -0
  78. package/src/generated/runtime/sdn/runtime/ConfigEntry.js +202 -0
  79. package/src/generated/runtime/sdn/runtime/ConfigEntry.ts +251 -0
  80. package/src/generated/runtime/sdn/runtime/ConfigTable.js +80 -0
  81. package/src/generated/runtime/sdn/runtime/ConfigTable.ts +97 -0
  82. package/src/generated/runtime/sdn/runtime/FlowNotice.js +196 -0
  83. package/src/generated/runtime/sdn/runtime/FlowNotice.ts +254 -0
  84. package/src/generated/runtime/sdn/runtime/Header.js +79 -0
  85. package/src/generated/runtime/sdn/runtime/Header.ts +100 -0
  86. package/src/generated/runtime/sdn/runtime/HttpRequest.js +216 -0
  87. package/src/generated/runtime/sdn/runtime/HttpRequest.ts +265 -0
  88. package/src/generated/runtime/sdn/runtime/HttpResponse.js +216 -0
  89. package/src/generated/runtime/sdn/runtime/HttpResponse.ts +267 -0
  90. package/src/generated/runtime/sdn/runtime/IngestRequest.js +121 -0
  91. package/src/generated/runtime/sdn/runtime/IngestRequest.ts +155 -0
  92. package/src/generated/runtime/sdn/runtime/IngestResult.js +184 -0
  93. package/src/generated/runtime/sdn/runtime/IngestResult.ts +235 -0
  94. package/src/generated/runtime/sdn/runtime/ModuleConfig.js +92 -0
  95. package/src/generated/runtime/sdn/runtime/ModuleConfig.ts +114 -0
  96. package/src/generated/runtime/sdn/runtime/Provenance.js +288 -0
  97. package/src/generated/runtime/sdn/runtime/Provenance.ts +368 -0
  98. package/src/generated/runtime/sdn/runtime/SourceTags.js +181 -0
  99. package/src/generated/runtime/sdn/runtime/SourceTags.ts +253 -0
  100. package/src/generated/runtime/sdn/runtime/TimerTick.js +119 -0
  101. package/src/generated/runtime/sdn/runtime/TimerTick.ts +148 -0
  102. package/src/generated/runtime/sdn/runtime/configValueKind.js +12 -0
  103. package/src/generated/runtime/sdn/runtime/configValueKind.ts +19 -0
  104. package/src/generated/runtime/sdn/runtime/flowNoticeKind.js +11 -0
  105. package/src/generated/runtime/sdn/runtime/flowNoticeKind.ts +34 -0
  106. package/src/generated/runtime/sdn/runtime/reconcileMode.js +9 -0
  107. package/src/generated/runtime/sdn/runtime/reconcileMode.ts +23 -0
  108. package/src/generated/runtime/sdn/runtime.js +16 -0
  109. package/src/generated/runtime/sdn/runtime.ts +17 -0
  110. package/src/host/abi.js +20 -3
  111. package/src/host/browserHost.js +2 -0
  112. package/src/host/cpp/typedHostcall.hpp +201 -0
  113. package/src/host/hostWorkerBundleSources.js +3 -3
  114. package/src/host/nodeHost.js +1 -0
  115. package/src/host/typedDispatch.js +230 -0
  116. package/src/index.d.ts +2 -0
  117. package/src/invoke/codec.js +3 -2
  118. package/src/licensing/records.js +10 -1
  119. package/src/standards/runtimeContracts.js +536 -0
  120. package/src/standards/sharedCatalog.js +27 -0
@@ -2,12 +2,15 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <script>try{var t=localStorage.getItem("sdn-theme");if(t==="light"||t==="dark")document.documentElement.setAttribute("data-theme",t)}catch(e){}</script>
5
+ <link rel="stylesheet" href="./assets/sdn-chrome/sdn-chrome.css" />
6
+ <script src="./assets/sdn-chrome/sdn-chrome.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
8
  <meta name="description" content="Run the same signed Space Data modules across browser, server, OrbPro, and" />
8
9
  <title>Isomorphic SDN runtime — Space Data Module SDK</title>
10
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none'><defs><linearGradient id='t' gradientUnits='userSpaceOnUse' x1='16' y1='29' x2='16' y2='3'><stop offset='0' stop-color='%23f5a524' stop-opacity='0'/><stop offset='.55' stop-color='%23f5a524' stop-opacity='.55'/><stop offset='1' stop-color='%23f5a524'/></linearGradient></defs><circle cx='16' cy='16' r='13' stroke='%23f5f5f7' stroke-width='1.6' opacity='.3'/><path d='M16 29A13 13 0 0 1 16 3' stroke='url(%23t)' stroke-width='2.2' stroke-linecap='round'/><path d='M16 10.2L10.4 20.1H21.6Z' stroke='%23f5f5f7' stroke-width='1.6' stroke-linejoin='round'/><circle cx='16' cy='10.2' r='2.6' fill='%23f5f5f7'/><circle cx='10.4' cy='20.1' r='2.6' fill='%23f5f5f7'/><circle cx='21.6' cy='20.1' r='2.6' fill='%23f5f5f7'/><circle cx='16' cy='3' r='2.5' fill='%23f5a524'/></svg>" />
9
11
  <link rel="stylesheet" href="./styles.css" />
10
12
  <script src="./assembly.js" defer></script>
13
+ <script src="./assets/ai-credits/ai-credits.js" defer></script>
11
14
  <!-- SDN_CONSUMER_ASSETS_START -->
12
15
  <link rel="stylesheet" href="https://static.spacedatanetwork.org/assets/hd-wallet-ui/2.0.28/sdn-wallet-public-client.c3f68d1cfd88478f10d836a5e829d1dfc6a10157972cf0f7d4d319d0636f2cc4.css" integrity="sha384-fICuhN4I9xqOK1F5vGGzl26opuO+xQIvTZXMSV76lWTBiQ6AfzztMGLLDw8yRT8i" crossorigin="anonymous">
13
16
  <script defer src="https://static.spacedatanetwork.org/assets/hd-wallet-ui/2.0.28/sdn-wallet-public-client.f611e7e151a3b5c38384272f8894a4c6634f0a29bf925b0e02e0e27f8db0bfff.js" integrity="sha384-R+QqsKoWJIS7iWrtPmgJ49DVnb1hSGjZokupbLInJd1PLp8RwQhtF/hnaerc33ci" crossorigin="anonymous" data-sdn-wallet-public-client="v1"></script>
@@ -18,15 +21,20 @@
18
21
  <canvas id="assembly" aria-hidden="true"></canvas>
19
22
  <a class="skip-link" href="#main">Skip to content</a>
20
23
  <sdn-stack-nav active="module-sdk"></sdn-stack-nav>
21
- <header class="site-header">
22
- <a class="site-brand" href="./">Space Data Module SDK</a>
23
- <nav class="header-links" aria-label="Site">
24
- <a href="./byo-wasm-quickstart.html">Quickstart</a>
25
- <a href="./conformance.html">Conformance</a>
26
- <a href="https://github.com/DigitalArsenal/space-data-module-sdk">GitHub</a>
27
- <a class="stack-button" href="#stack">Stack</a>
28
- <button class="theme-toggle" type="button" aria-label="Switch between light and dark theme" title="Light or dark theme"><svg class="sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg><svg class="moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z"/></svg></button>
29
- </nav>
24
+ <header class="sdn-header sdn-header-inflow">
25
+ <div class="sdn-header-inner">
26
+ <a class="sdn-header-brand" href="./"><span>Space Data Module SDK</span></a>
27
+ <nav class="sdn-header-links" aria-label="Site">
28
+ <a href="./byo-wasm-quickstart.html">Quickstart</a>
29
+ <a href="./conformance.html">Conformance</a>
30
+ <a href="#stack">Stack</a>
31
+ <a href="https://github.com/DigitalArsenal/space-data-module-sdk">GitHub</a>
32
+ </nav>
33
+ <div class="sdn-header-actions">
34
+ <button data-sdn-theme-toggle aria-label="Switch between light and dark theme"></button>
35
+ <button data-sdn-menu-toggle aria-label="Menu"></button>
36
+ </div>
37
+ </div>
30
38
  </header>
31
39
  <div class="shell">
32
40
  <nav class="sidebar" id="sidebar" aria-label="Documentation">
@@ -242,38 +250,18 @@
242
250
  <li><a class="depth-2" href="#dynamic-loading-vs-compiled-flows">Dynamic Loading vs Compiled Flows</a></li>
243
251
  <li><a class="depth-2" href="#definition-of-done">Definition of Done</a></li></ul></nav>
244
252
  </div>
245
- <section id="stack" class="section" aria-labelledby="stack-title">
246
- <div class="section-head">
247
- <p class="eyebrow">SDN Stack</p>
248
- <h2 id="stack-title">Connected sites</h2>
249
- </div>
250
- <div class="link-list">
251
- <a href="https://spacedatastandards.org/">
252
- <span>Standards</span>
253
- <small>Canonical schemas, record contracts, and generated bindings.</small>
254
- </a>
255
- <a href="https://digitalarsenal.github.io/flatbuffers/">
256
- <span>FlatBuffers</span>
257
- <small>Binary encoding, schema tooling, and runtime documentation.</small>
258
- </a>
259
- <a href="https://digitalarsenal.github.io/flatsql/">
260
- <span>FlatSQL</span>
261
- <small>SQL-style queries over FlatBuffer-backed datasets and streams.</small>
262
- </a>
263
- <a href="https://spacedatanetwork.org/">
264
- <span>SDN</span>
265
- <small>Distributed publication, discovery, delivery, and marketplace infrastructure.</small>
266
- </a>
267
- <a href="https://digitalarsenal.github.io/space-data-module-sdk/" class="active">
268
- <span>Module SDK</span>
269
- <small>WASM module packaging, validation, and host compatibility tooling.</small>
270
- </a>
253
+ <section id="stack" data-sdn-stack="module-sdk"></section>
254
+ <footer class="sdn-footer">
255
+ <div class="sdn-footer-inner">
256
+ <a class="sdn-footer-brand" href="https://spacedatanetwork.org/">Space Data Network</a>
257
+ <nav class="sdn-footer-links" aria-label="Footer">
258
+ <a href="./byo-wasm-quickstart.html">Quickstart</a>
259
+ <a href="./conformance.html">Conformance</a>
260
+ <a href="./llms.txt">llms.txt</a>
261
+ <a href="https://github.com/DigitalArsenal/space-data-module-sdk">GitHub</a>
262
+ </nav>
263
+ <p class="sdn-footer-legal">Apache-2.0 License &middot; &copy; Edgesource Corporation &middot; <a href="mailto:tj@edgesource.com">tj@edgesource.com</a></p>
271
264
  </div>
272
- </section>
273
- <footer class="site-footer">
274
- Space Data Module SDK — Apache-2.0. Every ABI page renders a Markdown
275
- source in <code>docs/</code>; edit the Markdown, never the HTML.
276
- Contact <a href="mailto:tj@edgesource.com">tj@edgesource.com</a>.
277
265
  </footer>
278
266
  </body>
279
267
  </html>
@@ -2,12 +2,15 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <script>try{var t=localStorage.getItem("sdn-theme");if(t==="light"||t==="dark")document.documentElement.setAttribute("data-theme",t)}catch(e){}</script>
5
+ <link rel="stylesheet" href="./assets/sdn-chrome/sdn-chrome.css" />
6
+ <script src="./assets/sdn-chrome/sdn-chrome.js"></script>
6
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
8
  <meta name="description" content="Status: WS12.1 deliverable. Section 1 is the definitive language/runtime matrix. Section 2 is the per-file port/dedupe plan that WS12.2 executes. All source paths verified again..." />
8
9
  <title>Language and runtime matrix — Space Data Module SDK</title>
10
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none'><defs><linearGradient id='t' gradientUnits='userSpaceOnUse' x1='16' y1='29' x2='16' y2='3'><stop offset='0' stop-color='%23f5a524' stop-opacity='0'/><stop offset='.55' stop-color='%23f5a524' stop-opacity='.55'/><stop offset='1' stop-color='%23f5a524'/></linearGradient></defs><circle cx='16' cy='16' r='13' stroke='%23f5f5f7' stroke-width='1.6' opacity='.3'/><path d='M16 29A13 13 0 0 1 16 3' stroke='url(%23t)' stroke-width='2.2' stroke-linecap='round'/><path d='M16 10.2L10.4 20.1H21.6Z' stroke='%23f5f5f7' stroke-width='1.6' stroke-linejoin='round'/><circle cx='16' cy='10.2' r='2.6' fill='%23f5f5f7'/><circle cx='10.4' cy='20.1' r='2.6' fill='%23f5f5f7'/><circle cx='21.6' cy='20.1' r='2.6' fill='%23f5f5f7'/><circle cx='16' cy='3' r='2.5' fill='%23f5a524'/></svg>" />
9
11
  <link rel="stylesheet" href="./styles.css" />
10
12
  <script src="./assembly.js" defer></script>
13
+ <script src="./assets/ai-credits/ai-credits.js" defer></script>
11
14
  <!-- SDN_CONSUMER_ASSETS_START -->
12
15
  <link rel="stylesheet" href="https://static.spacedatanetwork.org/assets/hd-wallet-ui/2.0.28/sdn-wallet-public-client.c3f68d1cfd88478f10d836a5e829d1dfc6a10157972cf0f7d4d319d0636f2cc4.css" integrity="sha384-fICuhN4I9xqOK1F5vGGzl26opuO+xQIvTZXMSV76lWTBiQ6AfzztMGLLDw8yRT8i" crossorigin="anonymous">
13
16
  <script defer src="https://static.spacedatanetwork.org/assets/hd-wallet-ui/2.0.28/sdn-wallet-public-client.f611e7e151a3b5c38384272f8894a4c6634f0a29bf925b0e02e0e27f8db0bfff.js" integrity="sha384-R+QqsKoWJIS7iWrtPmgJ49DVnb1hSGjZokupbLInJd1PLp8RwQhtF/hnaerc33ci" crossorigin="anonymous" data-sdn-wallet-public-client="v1"></script>
@@ -18,15 +21,20 @@
18
21
  <canvas id="assembly" aria-hidden="true"></canvas>
19
22
  <a class="skip-link" href="#main">Skip to content</a>
20
23
  <sdn-stack-nav active="module-sdk"></sdn-stack-nav>
21
- <header class="site-header">
22
- <a class="site-brand" href="./">Space Data Module SDK</a>
23
- <nav class="header-links" aria-label="Site">
24
- <a href="./byo-wasm-quickstart.html">Quickstart</a>
25
- <a href="./conformance.html">Conformance</a>
26
- <a href="https://github.com/DigitalArsenal/space-data-module-sdk">GitHub</a>
27
- <a class="stack-button" href="#stack">Stack</a>
28
- <button class="theme-toggle" type="button" aria-label="Switch between light and dark theme" title="Light or dark theme"><svg class="sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg><svg class="moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z"/></svg></button>
29
- </nav>
24
+ <header class="sdn-header sdn-header-inflow">
25
+ <div class="sdn-header-inner">
26
+ <a class="sdn-header-brand" href="./"><span>Space Data Module SDK</span></a>
27
+ <nav class="sdn-header-links" aria-label="Site">
28
+ <a href="./byo-wasm-quickstart.html">Quickstart</a>
29
+ <a href="./conformance.html">Conformance</a>
30
+ <a href="#stack">Stack</a>
31
+ <a href="https://github.com/DigitalArsenal/space-data-module-sdk">GitHub</a>
32
+ </nav>
33
+ <div class="sdn-header-actions">
34
+ <button data-sdn-theme-toggle aria-label="Switch between light and dark theme"></button>
35
+ <button data-sdn-menu-toggle aria-label="Menu"></button>
36
+ </div>
37
+ </div>
30
38
  </header>
31
39
  <div class="shell">
32
40
  <nav class="sidebar" id="sidebar" aria-label="Documentation">
@@ -150,38 +158,18 @@
150
158
  <li><a class="depth-3" href="#summary-of-verdicts">Summary of verdicts</a></li>
151
159
  <li><a class="depth-2" href="#3-risks-and-constraints-for-ws122">3. Risks and constraints for WS12.2</a></li></ul></nav>
152
160
  </div>
153
- <section id="stack" class="section" aria-labelledby="stack-title">
154
- <div class="section-head">
155
- <p class="eyebrow">SDN Stack</p>
156
- <h2 id="stack-title">Connected sites</h2>
157
- </div>
158
- <div class="link-list">
159
- <a href="https://spacedatastandards.org/">
160
- <span>Standards</span>
161
- <small>Canonical schemas, record contracts, and generated bindings.</small>
162
- </a>
163
- <a href="https://digitalarsenal.github.io/flatbuffers/">
164
- <span>FlatBuffers</span>
165
- <small>Binary encoding, schema tooling, and runtime documentation.</small>
166
- </a>
167
- <a href="https://digitalarsenal.github.io/flatsql/">
168
- <span>FlatSQL</span>
169
- <small>SQL-style queries over FlatBuffer-backed datasets and streams.</small>
170
- </a>
171
- <a href="https://spacedatanetwork.org/">
172
- <span>SDN</span>
173
- <small>Distributed publication, discovery, delivery, and marketplace infrastructure.</small>
174
- </a>
175
- <a href="https://digitalarsenal.github.io/space-data-module-sdk/" class="active">
176
- <span>Module SDK</span>
177
- <small>WASM module packaging, validation, and host compatibility tooling.</small>
178
- </a>
161
+ <section id="stack" data-sdn-stack="module-sdk"></section>
162
+ <footer class="sdn-footer">
163
+ <div class="sdn-footer-inner">
164
+ <a class="sdn-footer-brand" href="https://spacedatanetwork.org/">Space Data Network</a>
165
+ <nav class="sdn-footer-links" aria-label="Footer">
166
+ <a href="./byo-wasm-quickstart.html">Quickstart</a>
167
+ <a href="./conformance.html">Conformance</a>
168
+ <a href="./llms.txt">llms.txt</a>
169
+ <a href="https://github.com/DigitalArsenal/space-data-module-sdk">GitHub</a>
170
+ </nav>
171
+ <p class="sdn-footer-legal">Apache-2.0 License &middot; &copy; Edgesource Corporation &middot; <a href="mailto:tj@edgesource.com">tj@edgesource.com</a></p>
179
172
  </div>
180
- </section>
181
- <footer class="site-footer">
182
- Space Data Module SDK — Apache-2.0. Every ABI page renders a Markdown
183
- source in <code>docs/</code>; edit the Markdown, never the HTML.
184
- Contact <a href="mailto:tj@edgesource.com">tj@edgesource.com</a>.
185
173
  </footer>
186
174
  </body>
187
175
  </html>
Binary file
Binary file
@@ -0,0 +1,53 @@
1
+ /* Reel player for the Space Data Network family of sites (style guide:
2
+ spacedatanetwork.org/style-guide.html). The canonical copy lives in
3
+ spacedatanetwork.org docs/media/reel/; other sites carry verbatim copies.
4
+ A framed 16:9 stage; the controls live in a footer bar inside the frame and
5
+ stay hidden until someone hovers, taps or tabs into it (reel.js sets
6
+ .is-awake). Page tokens are used when present, with style-guide fallbacks. */
7
+ .reel-frame { max-width: 1040px; margin: 0 auto; }
8
+ .reel-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius, 20px); border: 1px solid var(--border-strong, rgba(255,255,255,.22)); background: #000; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 30px 80px rgba(0,0,0,.55), 0 0 120px rgba(245,165,36,.08); text-shadow: none; }
9
+ .reel-stage video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
10
+ .reel-stage:fullscreen { border: 0; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
11
+ .reel-stage:fullscreen video { object-fit: contain; }
12
+ .reel-stage:-webkit-full-screen { border: 0; border-radius: 0; width: 100vw; height: 100vh; }
13
+ .reel-stage:-webkit-full-screen video { object-fit: contain; }
14
+ .reel-big-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.55); color: #f5f5f7; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .2s, color .2s, opacity .25s; }
15
+ .reel-big-play svg { width: 28px; height: 28px; }
16
+ .reel-big-play:hover { background: #f5f5f7; color: #000; }
17
+ .reel-stage.is-playing .reel-big-play { display: none; }
18
+ .reel-stage.is-ended .reel-big-play, .reel-stage.is-starting .reel-big-play { display: none; }
19
+ /* Before the reel has ever played (reduced motion, autoplay refused) the play button is the only cue, so it stays. */
20
+ .reel-stage.has-played:not(.is-awake):not(:has(:focus-visible)) .reel-big-play { opacity: 0; pointer-events: none; }
21
+ .reel-again { position: absolute; left: 50%; bottom: 84px; transform: translate(-50%, 8px); display: none; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px; border: 1px solid #f5f5f7; background: #f5f5f7; color: #000; font: 600 15px var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif); cursor: pointer; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s cubic-bezier(.2,.7,.2,1); }
22
+ .reel-again svg { width: 17px; height: 17px; }
23
+ .reel-again:hover { background: #fff; }
24
+ .reel-stage.is-ended .reel-again { display: inline-flex; }
25
+ .reel-stage.is-ended.is-awake .reel-again, .reel-stage.is-ended:has(:focus-visible) .reel-again { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
26
+ @media (max-width: 620px) { .reel-again { bottom: 64px; padding: 8px 16px; font-size: 14px; } }
27
+ .reel-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 14px 10px; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.72)); color: #f5f5f7; opacity: 0; pointer-events: none; transition: opacity .3s; }
28
+ .reel-stage.is-awake .reel-bar, .reel-stage:has(:focus-visible) .reel-bar { opacity: 1; pointer-events: auto; transition-duration: .15s; }
29
+ .reel-stage.is-playing:not(.is-awake) { cursor: none; }
30
+ @media (prefers-reduced-motion: reduce) { .reel-bar, .reel-again, .reel-big-play { transition: none; } }
31
+ /* The progress bar is a seek slider: a 22 px hit area around a 3 px track (5 px on hover or drag). */
32
+ .reel-progress { position: relative; height: 22px; margin: 0 4px 2px; cursor: pointer; touch-action: none; }
33
+ .reel-progress::before, .reel-progress span { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; transition: height .12s ease, margin-top .12s ease; }
34
+ .reel-progress::before { background: rgba(255,255,255,.22); }
35
+ .reel-progress span { display: block; background: #f5a524; transform-origin: left center; transform: scaleX(0); }
36
+ .reel-progress:hover::before, .reel-progress:hover span, .reel-stage.is-seeking .reel-progress::before, .reel-stage.is-seeking .reel-progress span { height: 5px; margin-top: -2.5px; }
37
+ .reel-knob { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #f5a524; box-shadow: 0 0 0 3px rgba(0,0,0,.35); transform: scale(0); transition: transform .12s ease; pointer-events: none; }
38
+ .reel-progress:hover .reel-knob, .reel-progress:focus-visible .reel-knob, .reel-stage.is-seeking .reel-knob { transform: scale(1); }
39
+ .reel-progress:focus-visible { outline: 2px solid #f5a524; outline-offset: 2px; border-radius: 4px; }
40
+ .reel-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
41
+ .reel-btn { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: #f5f5f7; cursor: pointer; transition: background .15s; }
42
+ .reel-btn:hover { background: rgba(255,255,255,.14); }
43
+ .reel-btn svg { width: 18px; height: 18px; }
44
+ .reel-play .i-pause, .reel-fs .i-exit, .reel-sound .i-sound { display: none; }
45
+ .reel-group { display: flex; align-items: center; gap: 2px; }
46
+ .reel-stage.is-sounding .reel-sound .i-muted { display: none; }
47
+ .reel-stage.is-sounding .reel-sound .i-sound { display: block; }
48
+ .reel-stage.is-playing .reel-play .i-play { display: none; }
49
+ .reel-stage.is-playing .reel-play .i-pause { display: block; }
50
+ .reel-stage.is-full .reel-fs .i-enter { display: none; }
51
+ .reel-stage.is-full .reel-fs .i-exit { display: block; }
52
+ .reel-stage button:focus-visible { outline: 2px solid #f5a524; outline-offset: 2px; }
53
+ @media (max-width: 760px) { .reel-stage { border-radius: var(--radius-sm, 12px); } }
@@ -0,0 +1,272 @@
1
+ // Reel player for every video on the Space Data Network family of sites.
2
+ // The canonical copy lives in spacedatanetwork.org docs/media/reel/; the other
3
+ // stack sites carry verbatim copies of reel.js and reel.css.
4
+ //
5
+ // Markup: <div class="reel-stage"><video muted playsinline preload="auto"
6
+ // data-poster="poster.webp" aria-label="..."><source ...></video></div>.
7
+ // This script adds the controls. Each reel starts when it scrolls into view,
8
+ // plays once, then rests on its last card. It never autoplays when reduced
9
+ // motion is requested (the poster shows instead), pauses when it leaves the
10
+ // screen, goes full screen (the stage on desktop, the native player on
11
+ // iPhone), and the progress bar seeks (drag, click, arrow keys). Browsers only
12
+ // autoplay muted video, so a reel starts muted; the sound button turns its
13
+ // music on, and that choice carries to every reel on the site. The controls
14
+ // and Play again stay hidden until someone moves a mouse over the reel, taps
15
+ // it or tabs into it.
16
+ (function () {
17
+ var reduced = matchMedia('(prefers-reduced-motion: reduce)').matches;
18
+ var CHROME =
19
+ '<button class="reel-big-play" type="button" aria-label="Play the video">' +
20
+ '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M8 5.5v13l11-6.5z" fill="currentColor"/></svg>' +
21
+ '</button>' +
22
+ '<button class="reel-again" type="button">' +
23
+ '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 12a8 8 0 1 0 2.4-5.7"/><path d="M4 4v5h5"/></svg>' +
24
+ 'Play again' +
25
+ '</button>' +
26
+ '<div class="reel-bar">' +
27
+ '<div class="reel-progress" role="slider" tabindex="0" aria-label="Seek" aria-valuemin="0" aria-valuemax="0" aria-valuenow="0"><span></span><b class="reel-knob"></b></div>' +
28
+ '<div class="reel-controls">' +
29
+ '<div class="reel-group">' +
30
+ '<button class="reel-btn reel-play" type="button" aria-label="Play the video" aria-pressed="false">' +
31
+ '<svg class="i-play" viewBox="0 0 24 24" aria-hidden="true"><path d="M8 5.5v13l11-6.5z" fill="currentColor"/></svg>' +
32
+ '<svg class="i-pause" viewBox="0 0 24 24" aria-hidden="true"><path d="M7 5h3.5v14H7zM13.5 5H17v14h-3.5z" fill="currentColor"/></svg>' +
33
+ '</button>' +
34
+ '<button class="reel-btn reel-sound" type="button" aria-label="Turn sound on" aria-pressed="false">' +
35
+ '<svg class="i-muted" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 9.5h3.5L12 5.5v13l-4.5-4H4z" fill="currentColor" stroke="none"/><path d="M16 9.5l5 5M21 9.5l-5 5"/></svg>' +
36
+ '<svg class="i-sound" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 9.5h3.5L12 5.5v13l-4.5-4H4z" fill="currentColor" stroke="none"/><path d="M15.5 9a4 4 0 0 1 0 6M18.5 6.5a7.5 7.5 0 0 1 0 11"/></svg>' +
37
+ '</button>' +
38
+ '</div>' +
39
+ '<button class="reel-btn reel-fs" type="button" aria-label="Full screen">' +
40
+ '<svg class="i-enter" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></svg>' +
41
+ '<svg class="i-exit" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5"/></svg>' +
42
+ '</button>' +
43
+ '</div>' +
44
+ '</div>';
45
+
46
+ function fullElement() { return document.fullscreenElement || document.webkitFullscreenElement; }
47
+ // The visitor's sound choice, shared by every reel on the site.
48
+ var SOUND_KEY = 'sdn-reel-sound';
49
+ function soundWanted() { try { return localStorage.getItem(SOUND_KEY) === 'on'; } catch (e) { return false; } }
50
+ function rememberSound(on) { try { localStorage.setItem(SOUND_KEY, on ? 'on' : 'off'); } catch (e) {} }
51
+
52
+ function init(stage) {
53
+ var video = stage.querySelector('video');
54
+ if (!video) return;
55
+ stage.setAttribute('data-reel-ready', '');
56
+ stage.insertAdjacentHTML('beforeend', CHROME);
57
+ var big = stage.querySelector('.reel-big-play');
58
+ var again = stage.querySelector('.reel-again');
59
+ var play = stage.querySelector('.reel-play');
60
+ var sound = stage.querySelector('.reel-sound');
61
+ var fs = stage.querySelector('.reel-fs');
62
+ var track = stage.querySelector('.reel-progress');
63
+ var bar = track.querySelector('span');
64
+ var knob = track.querySelector('.reel-knob');
65
+ var userPaused = reduced;
66
+
67
+ // The poster is a mid-reel frame, so it only shows when the reel will not
68
+ // start on its own; otherwise it would flash before the opening black frame.
69
+ function showPoster() {
70
+ var src = video.getAttribute('data-poster');
71
+ if (src && !video.getAttribute('poster')) video.setAttribute('poster', src);
72
+ stage.classList.remove('is-starting');
73
+ }
74
+ if (reduced) showPoster(); else stage.classList.add('is-starting');
75
+ video.addEventListener('playing', function () {
76
+ stage.classList.remove('is-starting');
77
+ stage.classList.add('has-played');
78
+ });
79
+
80
+ // Controls wake on interaction and sleep again after a short idle.
81
+ var idle = 0;
82
+ var wasAwake = false;
83
+ var pointer = 'mouse';
84
+ function wake() {
85
+ stage.classList.add('is-awake');
86
+ clearTimeout(idle);
87
+ idle = setTimeout(function () { stage.classList.remove('is-awake'); }, 2500);
88
+ }
89
+ function sleep() {
90
+ clearTimeout(idle);
91
+ stage.classList.remove('is-awake');
92
+ }
93
+ stage.addEventListener('pointermove', function (e) { if (e.pointerType === 'mouse') wake(); });
94
+ stage.addEventListener('pointerleave', function (e) { if (e.pointerType === 'mouse') sleep(); });
95
+ stage.addEventListener('pointerdown', function (e) {
96
+ pointer = e.pointerType;
97
+ wasAwake = stage.classList.contains('is-awake');
98
+ wake();
99
+ });
100
+ stage.addEventListener('keydown', wake);
101
+
102
+ function sync() {
103
+ var playing = !video.paused;
104
+ stage.classList.toggle('is-playing', playing);
105
+ play.setAttribute('aria-pressed', String(playing));
106
+ play.setAttribute('aria-label', playing ? 'Pause the video' : 'Play the video');
107
+ }
108
+ function syncSound() {
109
+ stage.classList.toggle('is-sounding', !video.muted);
110
+ sound.setAttribute('aria-pressed', String(!video.muted));
111
+ sound.setAttribute('aria-label', video.muted ? 'Turn sound on' : 'Turn sound off');
112
+ }
113
+ // Plays with sound when the visitor asked for it; a browser that refuses
114
+ // sound without a gesture gets the muted reel instead.
115
+ function start() {
116
+ video.muted = !soundWanted();
117
+ syncSound();
118
+ var p = video.play();
119
+ if (p && p.catch) p.catch(function () {
120
+ if (!video.muted) {
121
+ video.muted = true;
122
+ syncSound();
123
+ var q = video.play();
124
+ if (q && q.catch) q.catch(function () { showPoster(); sync(); });
125
+ return;
126
+ }
127
+ showPoster();
128
+ sync();
129
+ });
130
+ }
131
+ sound.addEventListener('click', function () {
132
+ video.muted = !video.muted;
133
+ rememberSound(!video.muted);
134
+ syncSound();
135
+ if (video.paused && !stage.classList.contains('is-ended')) { userPaused = false; start(); }
136
+ });
137
+ function toggle() {
138
+ if (video.paused) { userPaused = false; start(); } else { userPaused = true; video.pause(); }
139
+ }
140
+ big.addEventListener('click', toggle);
141
+ again.addEventListener('click', function () {
142
+ video.currentTime = 0;
143
+ userPaused = false;
144
+ start();
145
+ });
146
+ video.addEventListener('ended', function () {
147
+ userPaused = true; // do not replay just because it scrolls back into view
148
+ stage.classList.add('is-ended');
149
+ sync();
150
+ tick();
151
+ });
152
+ video.addEventListener('play', function () { stage.classList.remove('is-ended'); });
153
+ play.addEventListener('click', toggle);
154
+ // A tap on sleeping controls only wakes them; a click (or a tap once awake) plays or pauses.
155
+ video.addEventListener('click', function () {
156
+ if (stage.classList.contains('is-ended')) return;
157
+ if (pointer !== 'mouse' && !wasAwake) return;
158
+ toggle();
159
+ });
160
+ video.addEventListener('play', sync);
161
+ video.addEventListener('pause', sync);
162
+
163
+ // Full screen
164
+ function toggleFull() {
165
+ if (fullElement()) {
166
+ (document.exitFullscreen || document.webkitExitFullscreen).call(document);
167
+ } else if (stage.requestFullscreen) {
168
+ stage.requestFullscreen();
169
+ } else if (stage.webkitRequestFullscreen) {
170
+ stage.webkitRequestFullscreen();
171
+ } else if (video.webkitEnterFullscreen) {
172
+ video.webkitEnterFullscreen();
173
+ }
174
+ if (video.paused) { userPaused = false; start(); }
175
+ }
176
+ function syncFull() {
177
+ var full = fullElement() === stage;
178
+ stage.classList.toggle('is-full', full);
179
+ fs.setAttribute('aria-label', full ? 'Exit full screen' : 'Full screen');
180
+ }
181
+ fs.addEventListener('click', toggleFull);
182
+ video.addEventListener('dblclick', toggleFull);
183
+ document.addEventListener('fullscreenchange', syncFull);
184
+ document.addEventListener('webkitfullscreenchange', syncFull);
185
+
186
+ // Progress and seeking
187
+ function duration() { return isFinite(video.duration) && video.duration > 0 ? video.duration : 0; }
188
+ function clock(s) { s = Math.round(s); return Math.floor(s / 60) + ':' + ('0' + (s % 60)).slice(-2); }
189
+ function tick() {
190
+ var d = duration();
191
+ var f = d ? Math.min(1, video.currentTime / d) : 0;
192
+ bar.style.transform = 'scaleX(' + f + ')';
193
+ knob.style.left = (f * 100) + '%';
194
+ track.setAttribute('aria-valuemax', String(Math.round(d)));
195
+ track.setAttribute('aria-valuenow', String(Math.round(video.currentTime)));
196
+ track.setAttribute('aria-valuetext', clock(video.currentTime) + ' of ' + clock(d));
197
+ if (!video.paused) requestAnimationFrame(tick);
198
+ }
199
+ video.addEventListener('play', function () { requestAnimationFrame(tick); });
200
+ video.addEventListener('seeked', tick);
201
+ video.addEventListener('loadedmetadata', tick);
202
+
203
+ function seek(time) {
204
+ var d = duration();
205
+ if (!d) return;
206
+ video.currentTime = Math.max(0, Math.min(d - 0.05, time));
207
+ if (stage.classList.contains('is-ended') && video.currentTime < d - 0.1) {
208
+ stage.classList.remove('is-ended');
209
+ sync();
210
+ }
211
+ tick();
212
+ }
213
+ function seekTo(clientX) {
214
+ var r = track.getBoundingClientRect();
215
+ seek(Math.max(0, Math.min(1, (clientX - r.left) / r.width)) * duration());
216
+ }
217
+ var seeking = false;
218
+ var resume = false;
219
+ track.addEventListener('pointerdown', function (e) {
220
+ e.preventDefault();
221
+ e.stopPropagation();
222
+ wake();
223
+ seeking = true;
224
+ resume = !video.paused;
225
+ if (resume) video.pause();
226
+ stage.classList.add('is-seeking');
227
+ if (track.setPointerCapture) track.setPointerCapture(e.pointerId);
228
+ seekTo(e.clientX);
229
+ });
230
+ track.addEventListener('pointermove', function (e) {
231
+ if (!seeking) return;
232
+ wake();
233
+ seekTo(e.clientX);
234
+ });
235
+ function endSeek() {
236
+ if (!seeking) return;
237
+ seeking = false;
238
+ stage.classList.remove('is-seeking');
239
+ if (resume) { userPaused = false; start(); }
240
+ }
241
+ track.addEventListener('pointerup', endSeek);
242
+ track.addEventListener('pointercancel', endSeek);
243
+ track.addEventListener('keydown', function (e) {
244
+ var step = { ArrowLeft: -2, ArrowDown: -2, ArrowRight: 2, ArrowUp: 2, PageDown: -10, PageUp: 10 }[e.key];
245
+ if (step) seek(video.currentTime + step);
246
+ else if (e.key === 'Home') seek(0);
247
+ else if (e.key === 'End') seek(duration());
248
+ else return;
249
+ e.preventDefault();
250
+ });
251
+
252
+ if ('IntersectionObserver' in window) {
253
+ new IntersectionObserver(function (entries) {
254
+ var visible = entries[0].isIntersecting;
255
+ if (visible && !userPaused) start();
256
+ if (!visible && !video.paused && !fullElement()) video.pause();
257
+ }, { threshold: 0.35 }).observe(stage);
258
+ } else if (!userPaused) {
259
+ start();
260
+ }
261
+ sync();
262
+ tick();
263
+ }
264
+
265
+ function scan() {
266
+ var stages = document.querySelectorAll('.reel-stage:not([data-reel-ready])');
267
+ for (var i = 0; i < stages.length; i++) init(stages[i]);
268
+ }
269
+ scan();
270
+ // Pages that render their content later (single-page apps) get their reels too.
271
+ if ('MutationObserver' in window) new MutationObserver(scan).observe(document.body, { childList: true, subtree: true });
272
+ })();