@despia-native/kernel 0.0.0-coming-soon.0 → 0.3.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 (661) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +1414 -0
  3. package/README.md +16 -1
  4. package/dist/.dsx-build-stamp.json +7 -0
  5. package/dist/api-cohort.d.ts +27 -0
  6. package/dist/api-cohort.d.ts.map +1 -0
  7. package/dist/api-cohort.js +94 -0
  8. package/dist/api-cohort.js.map +1 -0
  9. package/dist/api.d.ts +454 -0
  10. package/dist/api.d.ts.map +1 -0
  11. package/dist/api.js +2442 -0
  12. package/dist/api.js.map +1 -0
  13. package/dist/app-consts.d.ts +10 -0
  14. package/dist/app-consts.d.ts.map +1 -0
  15. package/dist/app-consts.js +39 -0
  16. package/dist/app-consts.js.map +1 -0
  17. package/dist/app-update.d.ts +12 -0
  18. package/dist/app-update.d.ts.map +1 -0
  19. package/dist/app-update.js +32 -0
  20. package/dist/app-update.js.map +1 -0
  21. package/dist/aria.d.ts +152 -0
  22. package/dist/aria.d.ts.map +1 -0
  23. package/dist/aria.js +524 -0
  24. package/dist/aria.js.map +1 -0
  25. package/dist/audio-core.d.ts +260 -0
  26. package/dist/audio-core.d.ts.map +1 -0
  27. package/dist/audio-core.js +1440 -0
  28. package/dist/audio-core.js.map +1 -0
  29. package/dist/audio-edit.d.ts +100 -0
  30. package/dist/audio-edit.d.ts.map +1 -0
  31. package/dist/audio-edit.js +489 -0
  32. package/dist/audio-edit.js.map +1 -0
  33. package/dist/audio-mix.d.ts +84 -0
  34. package/dist/audio-mix.d.ts.map +1 -0
  35. package/dist/audio-mix.js +393 -0
  36. package/dist/audio-mix.js.map +1 -0
  37. package/dist/auth-proof.d.ts +145 -0
  38. package/dist/auth-proof.d.ts.map +1 -0
  39. package/dist/auth-proof.js +644 -0
  40. package/dist/auth-proof.js.map +1 -0
  41. package/dist/availability-explain.d.ts +3 -0
  42. package/dist/availability-explain.d.ts.map +1 -0
  43. package/dist/availability-explain.js +322 -0
  44. package/dist/availability-explain.js.map +1 -0
  45. package/dist/availability.d.ts +246 -0
  46. package/dist/availability.d.ts.map +1 -0
  47. package/dist/availability.js +615 -0
  48. package/dist/availability.js.map +1 -0
  49. package/dist/background.d.ts +116 -0
  50. package/dist/background.d.ts.map +1 -0
  51. package/dist/background.js +235 -0
  52. package/dist/background.js.map +1 -0
  53. package/dist/boot-tables-flag.d.ts +2 -0
  54. package/dist/boot-tables-flag.d.ts.map +1 -0
  55. package/dist/boot-tables-flag.js +16 -0
  56. package/dist/boot-tables-flag.js.map +1 -0
  57. package/dist/boot-tables.d.ts +40 -0
  58. package/dist/boot-tables.d.ts.map +1 -0
  59. package/dist/boot-tables.js +102 -0
  60. package/dist/boot-tables.js.map +1 -0
  61. package/dist/border-edges.d.ts +5 -0
  62. package/dist/border-edges.d.ts.map +1 -0
  63. package/dist/border-edges.js +47 -0
  64. package/dist/border-edges.js.map +1 -0
  65. package/dist/bus.d.ts +1203 -0
  66. package/dist/bus.d.ts.map +1 -0
  67. package/dist/bus.js +2647 -0
  68. package/dist/bus.js.map +1 -0
  69. package/dist/calendar-core.d.ts +143 -0
  70. package/dist/calendar-core.d.ts.map +1 -0
  71. package/dist/calendar-core.js +372 -0
  72. package/dist/calendar-core.js.map +1 -0
  73. package/dist/call-value.d.ts +16 -0
  74. package/dist/call-value.d.ts.map +1 -0
  75. package/dist/call-value.js +54 -0
  76. package/dist/call-value.js.map +1 -0
  77. package/dist/camera-core.d.ts +222 -0
  78. package/dist/camera-core.d.ts.map +1 -0
  79. package/dist/camera-core.js +980 -0
  80. package/dist/camera-core.js.map +1 -0
  81. package/dist/canvas-core.d.ts +404 -0
  82. package/dist/canvas-core.d.ts.map +1 -0
  83. package/dist/canvas-core.js +2186 -0
  84. package/dist/canvas-core.js.map +1 -0
  85. package/dist/capture-core.d.ts +74 -0
  86. package/dist/capture-core.d.ts.map +1 -0
  87. package/dist/capture-core.js +158 -0
  88. package/dist/capture-core.js.map +1 -0
  89. package/dist/compile/codegen.d.ts +146 -0
  90. package/dist/compile/codegen.d.ts.map +1 -0
  91. package/dist/compile/codegen.js +1949 -0
  92. package/dist/compile/codegen.js.map +1 -0
  93. package/dist/compile/jstier.d.ts +44 -0
  94. package/dist/compile/jstier.d.ts.map +1 -0
  95. package/dist/compile/jstier.js +181 -0
  96. package/dist/compile/jstier.js.map +1 -0
  97. package/dist/compile/tier-door.d.ts +41 -0
  98. package/dist/compile/tier-door.d.ts.map +1 -0
  99. package/dist/compile/tier-door.js +167 -0
  100. package/dist/compile/tier-door.js.map +1 -0
  101. package/dist/compile/tier-realm.d.ts +49 -0
  102. package/dist/compile/tier-realm.d.ts.map +1 -0
  103. package/dist/compile/tier-realm.js +368 -0
  104. package/dist/compile/tier-realm.js.map +1 -0
  105. package/dist/compile/tier.d.ts +23 -0
  106. package/dist/compile/tier.d.ts.map +1 -0
  107. package/dist/compile/tier.js +157 -0
  108. package/dist/compile/tier.js.map +1 -0
  109. package/dist/compose-core.d.ts +86 -0
  110. package/dist/compose-core.d.ts.map +1 -0
  111. package/dist/compose-core.js +112 -0
  112. package/dist/compose-core.js.map +1 -0
  113. package/dist/config-validate.d.ts +31 -0
  114. package/dist/config-validate.d.ts.map +1 -0
  115. package/dist/config-validate.js +147 -0
  116. package/dist/config-validate.js.map +1 -0
  117. package/dist/config-values.d.ts +106 -0
  118. package/dist/config-values.d.ts.map +1 -0
  119. package/dist/config-values.js +340 -0
  120. package/dist/config-values.js.map +1 -0
  121. package/dist/contacts-core.d.ts +127 -0
  122. package/dist/contacts-core.d.ts.map +1 -0
  123. package/dist/contacts-core.js +211 -0
  124. package/dist/contacts-core.js.map +1 -0
  125. package/dist/content-transition.d.ts +58 -0
  126. package/dist/content-transition.d.ts.map +1 -0
  127. package/dist/content-transition.js +94 -0
  128. package/dist/content-transition.js.map +1 -0
  129. package/dist/controls-core.d.ts +227 -0
  130. package/dist/controls-core.d.ts.map +1 -0
  131. package/dist/controls-core.js +652 -0
  132. package/dist/controls-core.js.map +1 -0
  133. package/dist/cookies.d.ts +78 -0
  134. package/dist/cookies.d.ts.map +1 -0
  135. package/dist/cookies.js +265 -0
  136. package/dist/cookies.js.map +1 -0
  137. package/dist/corner-shape-core.d.ts +69 -0
  138. package/dist/corner-shape-core.d.ts.map +1 -0
  139. package/dist/corner-shape-core.js +261 -0
  140. package/dist/corner-shape-core.js.map +1 -0
  141. package/dist/crypto-core.d.ts +57 -0
  142. package/dist/crypto-core.d.ts.map +1 -0
  143. package/dist/crypto-core.js +128 -0
  144. package/dist/crypto-core.js.map +1 -0
  145. package/dist/dataviz.d.ts +436 -0
  146. package/dist/dataviz.d.ts.map +1 -0
  147. package/dist/dataviz.js +956 -0
  148. package/dist/dataviz.js.map +1 -0
  149. package/dist/debug.d.ts +293 -0
  150. package/dist/debug.d.ts.map +1 -0
  151. package/dist/debug.js +767 -0
  152. package/dist/debug.js.map +1 -0
  153. package/dist/device-ownership.d.ts +50 -0
  154. package/dist/device-ownership.d.ts.map +1 -0
  155. package/dist/device-ownership.js +105 -0
  156. package/dist/device-ownership.js.map +1 -0
  157. package/dist/effects.d.ts +86 -0
  158. package/dist/effects.d.ts.map +1 -0
  159. package/dist/effects.js +98 -0
  160. package/dist/effects.js.map +1 -0
  161. package/dist/element.d.ts +108 -0
  162. package/dist/element.d.ts.map +1 -0
  163. package/dist/element.js +63 -0
  164. package/dist/element.js.map +1 -0
  165. package/dist/file-watch.d.ts +16 -0
  166. package/dist/file-watch.d.ts.map +1 -0
  167. package/dist/file-watch.js +49 -0
  168. package/dist/file-watch.js.map +1 -0
  169. package/dist/filepaths.d.ts +72 -0
  170. package/dist/filepaths.d.ts.map +1 -0
  171. package/dist/filepaths.js +271 -0
  172. package/dist/filepaths.js.map +1 -0
  173. package/dist/film.d.ts +264 -0
  174. package/dist/film.d.ts.map +1 -0
  175. package/dist/film.js +313 -0
  176. package/dist/film.js.map +1 -0
  177. package/dist/fonts.d.ts +66 -0
  178. package/dist/fonts.d.ts.map +1 -0
  179. package/dist/fonts.js +135 -0
  180. package/dist/fonts.js.map +1 -0
  181. package/dist/forms.d.ts +191 -0
  182. package/dist/forms.d.ts.map +1 -0
  183. package/dist/forms.js +663 -0
  184. package/dist/forms.js.map +1 -0
  185. package/dist/geo.d.ts +289 -0
  186. package/dist/geo.d.ts.map +1 -0
  187. package/dist/geo.js +460 -0
  188. package/dist/geo.js.map +1 -0
  189. package/dist/handler-announce.d.ts +46 -0
  190. package/dist/handler-announce.d.ts.map +1 -0
  191. package/dist/handler-announce.js +96 -0
  192. package/dist/handler-announce.js.map +1 -0
  193. package/dist/handoff.d.ts +71 -0
  194. package/dist/handoff.d.ts.map +1 -0
  195. package/dist/handoff.js +250 -0
  196. package/dist/handoff.js.map +1 -0
  197. package/dist/identity-durability.d.ts +76 -0
  198. package/dist/identity-durability.d.ts.map +1 -0
  199. package/dist/identity-durability.js +150 -0
  200. package/dist/identity-durability.js.map +1 -0
  201. package/dist/image-core.d.ts +240 -0
  202. package/dist/image-core.d.ts.map +1 -0
  203. package/dist/image-core.js +618 -0
  204. package/dist/image-core.js.map +1 -0
  205. package/dist/image-schemes.d.ts +10 -0
  206. package/dist/image-schemes.d.ts.map +1 -0
  207. package/dist/image-schemes.js +28 -0
  208. package/dist/image-schemes.js.map +1 -0
  209. package/dist/index.d.ts +143 -0
  210. package/dist/index.d.ts.map +1 -0
  211. package/dist/index.js +299 -0
  212. package/dist/index.js.map +1 -0
  213. package/dist/ink-core.d.ts +53 -0
  214. package/dist/ink-core.d.ts.map +1 -0
  215. package/dist/ink-core.js +119 -0
  216. package/dist/ink-core.js.map +1 -0
  217. package/dist/input.d.ts +148 -0
  218. package/dist/input.d.ts.map +1 -0
  219. package/dist/input.js +358 -0
  220. package/dist/input.js.map +1 -0
  221. package/dist/integrity.d.ts +63 -0
  222. package/dist/integrity.d.ts.map +1 -0
  223. package/dist/integrity.js +150 -0
  224. package/dist/integrity.js.map +1 -0
  225. package/dist/intents.d.ts +95 -0
  226. package/dist/intents.d.ts.map +1 -0
  227. package/dist/intents.js +282 -0
  228. package/dist/intents.js.map +1 -0
  229. package/dist/interpolate-core.d.ts +37 -0
  230. package/dist/interpolate-core.d.ts.map +1 -0
  231. package/dist/interpolate-core.js +443 -0
  232. package/dist/interpolate-core.js.map +1 -0
  233. package/dist/jse/color.d.ts +12 -0
  234. package/dist/jse/color.d.ts.map +1 -0
  235. package/dist/jse/color.js +196 -0
  236. package/dist/jse/color.js.map +1 -0
  237. package/dist/jse/core.d.ts +54 -0
  238. package/dist/jse/core.d.ts.map +1 -0
  239. package/dist/jse/core.js +1519 -0
  240. package/dist/jse/core.js.map +1 -0
  241. package/dist/jse/dispatch.d.ts +28 -0
  242. package/dist/jse/dispatch.d.ts.map +1 -0
  243. package/dist/jse/dispatch.js +116 -0
  244. package/dist/jse/dispatch.js.map +1 -0
  245. package/dist/jse/highlight-grammar.d.ts +15 -0
  246. package/dist/jse/highlight-grammar.d.ts.map +1 -0
  247. package/dist/jse/highlight-grammar.js +161 -0
  248. package/dist/jse/highlight-grammar.js.map +1 -0
  249. package/dist/jse/highlight-grammars.generated.d.ts +2 -0
  250. package/dist/jse/highlight-grammars.generated.d.ts.map +1 -0
  251. package/dist/jse/highlight-grammars.generated.js +4 -0
  252. package/dist/jse/highlight-grammars.generated.js.map +1 -0
  253. package/dist/jse/highlight.d.ts +37 -0
  254. package/dist/jse/highlight.d.ts.map +1 -0
  255. package/dist/jse/highlight.js +323 -0
  256. package/dist/jse/highlight.js.map +1 -0
  257. package/dist/jse/jse.d.ts +674 -0
  258. package/dist/jse/jse.d.ts.map +1 -0
  259. package/dist/jse/jse.js +5841 -0
  260. package/dist/jse/jse.js.map +1 -0
  261. package/dist/jse/pathmatch.d.ts +10 -0
  262. package/dist/jse/pathmatch.d.ts.map +1 -0
  263. package/dist/jse/pathmatch.js +73 -0
  264. package/dist/jse/pathmatch.js.map +1 -0
  265. package/dist/jse/regex.d.ts +33 -0
  266. package/dist/jse/regex.d.ts.map +1 -0
  267. package/dist/jse/regex.js +375 -0
  268. package/dist/jse/regex.js.map +1 -0
  269. package/dist/jse/stdlib.d.ts +8 -0
  270. package/dist/jse/stdlib.d.ts.map +1 -0
  271. package/dist/jse/stdlib.js +765 -0
  272. package/dist/jse/stdlib.js.map +1 -0
  273. package/dist/jse/tokens.d.ts +102 -0
  274. package/dist/jse/tokens.d.ts.map +1 -0
  275. package/dist/jse/tokens.js +982 -0
  276. package/dist/jse/tokens.js.map +1 -0
  277. package/dist/jse/values.d.ts +206 -0
  278. package/dist/jse/values.d.ts.map +1 -0
  279. package/dist/jse/values.js +846 -0
  280. package/dist/jse/values.js.map +1 -0
  281. package/dist/keyboard.d.ts +196 -0
  282. package/dist/keyboard.d.ts.map +1 -0
  283. package/dist/keyboard.js +186 -0
  284. package/dist/keyboard.js.map +1 -0
  285. package/dist/label-choices.d.ts +3 -0
  286. package/dist/label-choices.d.ts.map +1 -0
  287. package/dist/label-choices.js +168 -0
  288. package/dist/label-choices.js.map +1 -0
  289. package/dist/language.d.ts +33 -0
  290. package/dist/language.d.ts.map +1 -0
  291. package/dist/language.js +50 -0
  292. package/dist/language.js.map +1 -0
  293. package/dist/length-units.d.ts +30 -0
  294. package/dist/length-units.d.ts.map +1 -0
  295. package/dist/length-units.js +83 -0
  296. package/dist/length-units.js.map +1 -0
  297. package/dist/lightsensor.d.ts +48 -0
  298. package/dist/lightsensor.d.ts.map +1 -0
  299. package/dist/lightsensor.js +97 -0
  300. package/dist/lightsensor.js.map +1 -0
  301. package/dist/link-refresh.d.ts +27 -0
  302. package/dist/link-refresh.d.ts.map +1 -0
  303. package/dist/link-refresh.js +166 -0
  304. package/dist/link-refresh.js.map +1 -0
  305. package/dist/link.d.ts +57 -0
  306. package/dist/link.d.ts.map +1 -0
  307. package/dist/link.js +333 -0
  308. package/dist/link.js.map +1 -0
  309. package/dist/linkpreview.d.ts +114 -0
  310. package/dist/linkpreview.d.ts.map +1 -0
  311. package/dist/linkpreview.js +439 -0
  312. package/dist/linkpreview.js.map +1 -0
  313. package/dist/list-presence.d.ts +32 -0
  314. package/dist/list-presence.d.ts.map +1 -0
  315. package/dist/list-presence.js +48 -0
  316. package/dist/list-presence.js.map +1 -0
  317. package/dist/live-stream.d.ts +27 -0
  318. package/dist/live-stream.d.ts.map +1 -0
  319. package/dist/live-stream.js +274 -0
  320. package/dist/live-stream.js.map +1 -0
  321. package/dist/livelogs.d.ts +134 -0
  322. package/dist/livelogs.d.ts.map +1 -0
  323. package/dist/livelogs.js +409 -0
  324. package/dist/livelogs.js.map +1 -0
  325. package/dist/logs.d.ts +80 -0
  326. package/dist/logs.d.ts.map +1 -0
  327. package/dist/logs.js +206 -0
  328. package/dist/logs.js.map +1 -0
  329. package/dist/mcp/apps.d.ts +82 -0
  330. package/dist/mcp/apps.d.ts.map +1 -0
  331. package/dist/mcp/apps.js +219 -0
  332. package/dist/mcp/apps.js.map +1 -0
  333. package/dist/mcp/entities.d.ts +25 -0
  334. package/dist/mcp/entities.d.ts.map +1 -0
  335. package/dist/mcp/entities.js +71 -0
  336. package/dist/mcp/entities.js.map +1 -0
  337. package/dist/mcp/result.d.ts +73 -0
  338. package/dist/mcp/result.d.ts.map +1 -0
  339. package/dist/mcp/result.js +119 -0
  340. package/dist/mcp/result.js.map +1 -0
  341. package/dist/mcp/webmcp.d.ts +162 -0
  342. package/dist/mcp/webmcp.d.ts.map +1 -0
  343. package/dist/mcp/webmcp.js +214 -0
  344. package/dist/mcp/webmcp.js.map +1 -0
  345. package/dist/mcp.d.ts +5 -0
  346. package/dist/mcp.d.ts.map +1 -0
  347. package/dist/mcp.js +14 -0
  348. package/dist/mcp.js.map +1 -0
  349. package/dist/media-core.d.ts +191 -0
  350. package/dist/media-core.d.ts.map +1 -0
  351. package/dist/media-core.js +446 -0
  352. package/dist/media-core.js.map +1 -0
  353. package/dist/media-timeline-core.d.ts +94 -0
  354. package/dist/media-timeline-core.d.ts.map +1 -0
  355. package/dist/media-timeline-core.js +620 -0
  356. package/dist/media-timeline-core.js.map +1 -0
  357. package/dist/message.d.ts +42 -0
  358. package/dist/message.d.ts.map +1 -0
  359. package/dist/message.js +582 -0
  360. package/dist/message.js.map +1 -0
  361. package/dist/missing-element.d.ts +29 -0
  362. package/dist/missing-element.d.ts.map +1 -0
  363. package/dist/missing-element.js +76 -0
  364. package/dist/missing-element.js.map +1 -0
  365. package/dist/motion-core.d.ts +160 -0
  366. package/dist/motion-core.d.ts.map +1 -0
  367. package/dist/motion-core.js +752 -0
  368. package/dist/motion-core.js.map +1 -0
  369. package/dist/motion-pose.d.ts +65 -0
  370. package/dist/motion-pose.d.ts.map +1 -0
  371. package/dist/motion-pose.js +143 -0
  372. package/dist/motion-pose.js.map +1 -0
  373. package/dist/motion.d.ts +132 -0
  374. package/dist/motion.d.ts.map +1 -0
  375. package/dist/motion.js +260 -0
  376. package/dist/motion.js.map +1 -0
  377. package/dist/mount-core.d.ts +203 -0
  378. package/dist/mount-core.d.ts.map +1 -0
  379. package/dist/mount-core.js +437 -0
  380. package/dist/mount-core.js.map +1 -0
  381. package/dist/net-core.d.ts +110 -0
  382. package/dist/net-core.d.ts.map +1 -0
  383. package/dist/net-core.js +225 -0
  384. package/dist/net-core.js.map +1 -0
  385. package/dist/notify.d.ts +399 -0
  386. package/dist/notify.d.ts.map +1 -0
  387. package/dist/notify.js +964 -0
  388. package/dist/notify.js.map +1 -0
  389. package/dist/orientation-binding.d.ts +39 -0
  390. package/dist/orientation-binding.d.ts.map +1 -0
  391. package/dist/orientation-binding.js +64 -0
  392. package/dist/orientation-binding.js.map +1 -0
  393. package/dist/orientation.d.ts +55 -0
  394. package/dist/orientation.d.ts.map +1 -0
  395. package/dist/orientation.js +89 -0
  396. package/dist/orientation.js.map +1 -0
  397. package/dist/ota.d.ts +52 -0
  398. package/dist/ota.d.ts.map +1 -0
  399. package/dist/ota.js +122 -0
  400. package/dist/ota.js.map +1 -0
  401. package/dist/passkeys.d.ts +91 -0
  402. package/dist/passkeys.d.ts.map +1 -0
  403. package/dist/passkeys.js +307 -0
  404. package/dist/passkeys.js.map +1 -0
  405. package/dist/payment.d.ts +85 -0
  406. package/dist/payment.d.ts.map +1 -0
  407. package/dist/payment.js +270 -0
  408. package/dist/payment.js.map +1 -0
  409. package/dist/pending-presenter.d.ts +31 -0
  410. package/dist/pending-presenter.d.ts.map +1 -0
  411. package/dist/pending-presenter.js +119 -0
  412. package/dist/pending-presenter.js.map +1 -0
  413. package/dist/permission-core.d.ts +59 -0
  414. package/dist/permission-core.d.ts.map +1 -0
  415. package/dist/permission-core.js +102 -0
  416. package/dist/permission-core.js.map +1 -0
  417. package/dist/persist.d.ts +169 -0
  418. package/dist/persist.d.ts.map +1 -0
  419. package/dist/persist.js +361 -0
  420. package/dist/persist.js.map +1 -0
  421. package/dist/phase-plan.d.ts +114 -0
  422. package/dist/phase-plan.d.ts.map +1 -0
  423. package/dist/phase-plan.js +837 -0
  424. package/dist/phase-plan.js.map +1 -0
  425. package/dist/playback-core.d.ts +64 -0
  426. package/dist/playback-core.d.ts.map +1 -0
  427. package/dist/playback-core.js +176 -0
  428. package/dist/playback-core.js.map +1 -0
  429. package/dist/player-sources.d.ts +12 -0
  430. package/dist/player-sources.d.ts.map +1 -0
  431. package/dist/player-sources.js +44 -0
  432. package/dist/player-sources.js.map +1 -0
  433. package/dist/proxy-denylist.d.ts +11 -0
  434. package/dist/proxy-denylist.d.ts.map +1 -0
  435. package/dist/proxy-denylist.js +44 -0
  436. package/dist/proxy-denylist.js.map +1 -0
  437. package/dist/public-config.d.ts +20 -0
  438. package/dist/public-config.d.ts.map +1 -0
  439. package/dist/public-config.js +109 -0
  440. package/dist/public-config.js.map +1 -0
  441. package/dist/qoe-core.d.ts +72 -0
  442. package/dist/qoe-core.d.ts.map +1 -0
  443. package/dist/qoe-core.js +113 -0
  444. package/dist/qoe-core.js.map +1 -0
  445. package/dist/reactive-request.d.ts +80 -0
  446. package/dist/reactive-request.d.ts.map +1 -0
  447. package/dist/reactive-request.js +192 -0
  448. package/dist/reactive-request.js.map +1 -0
  449. package/dist/read-cache.d.ts +129 -0
  450. package/dist/read-cache.d.ts.map +1 -0
  451. package/dist/read-cache.js +566 -0
  452. package/dist/read-cache.js.map +1 -0
  453. package/dist/recorder-core.d.ts +57 -0
  454. package/dist/recorder-core.d.ts.map +1 -0
  455. package/dist/recorder-core.js +136 -0
  456. package/dist/recorder-core.js.map +1 -0
  457. package/dist/ref.d.ts +41 -0
  458. package/dist/ref.d.ts.map +1 -0
  459. package/dist/ref.js +98 -0
  460. package/dist/ref.js.map +1 -0
  461. package/dist/refusal.d.ts +82 -0
  462. package/dist/refusal.d.ts.map +1 -0
  463. package/dist/refusal.js +218 -0
  464. package/dist/refusal.js.map +1 -0
  465. package/dist/region-insets.d.ts +61 -0
  466. package/dist/region-insets.d.ts.map +1 -0
  467. package/dist/region-insets.js +67 -0
  468. package/dist/region-insets.js.map +1 -0
  469. package/dist/rive-core.d.ts +323 -0
  470. package/dist/rive-core.d.ts.map +1 -0
  471. package/dist/rive-core.js +677 -0
  472. package/dist/rive-core.js.map +1 -0
  473. package/dist/runner.d.ts +595 -0
  474. package/dist/runner.d.ts.map +1 -0
  475. package/dist/runner.js +4094 -0
  476. package/dist/runner.js.map +1 -0
  477. package/dist/scene/a11y.d.ts +11 -0
  478. package/dist/scene/a11y.d.ts.map +1 -0
  479. package/dist/scene/a11y.js +67 -0
  480. package/dist/scene/a11y.js.map +1 -0
  481. package/dist/scene/anim.d.ts +149 -0
  482. package/dist/scene/anim.d.ts.map +1 -0
  483. package/dist/scene/anim.js +396 -0
  484. package/dist/scene/anim.js.map +1 -0
  485. package/dist/scene/bind.d.ts +33 -0
  486. package/dist/scene/bind.d.ts.map +1 -0
  487. package/dist/scene/bind.js +66 -0
  488. package/dist/scene/bind.js.map +1 -0
  489. package/dist/scene/collide.d.ts +56 -0
  490. package/dist/scene/collide.d.ts.map +1 -0
  491. package/dist/scene/collide.js +146 -0
  492. package/dist/scene/collide.js.map +1 -0
  493. package/dist/scene/frame.d.ts +22 -0
  494. package/dist/scene/frame.d.ts.map +1 -0
  495. package/dist/scene/frame.js +57 -0
  496. package/dist/scene/frame.js.map +1 -0
  497. package/dist/scene/gltf.d.ts +79 -0
  498. package/dist/scene/gltf.d.ts.map +1 -0
  499. package/dist/scene/gltf.js +409 -0
  500. package/dist/scene/gltf.js.map +1 -0
  501. package/dist/scene/ir.d.ts +293 -0
  502. package/dist/scene/ir.d.ts.map +1 -0
  503. package/dist/scene/ir.js +692 -0
  504. package/dist/scene/ir.js.map +1 -0
  505. package/dist/scene/math.d.ts +50 -0
  506. package/dist/scene/math.d.ts.map +1 -0
  507. package/dist/scene/math.js +180 -0
  508. package/dist/scene/math.js.map +1 -0
  509. package/dist/scene/orbit.d.ts +19 -0
  510. package/dist/scene/orbit.d.ts.map +1 -0
  511. package/dist/scene/orbit.js +60 -0
  512. package/dist/scene/orbit.js.map +1 -0
  513. package/dist/scene/physics.d.ts +228 -0
  514. package/dist/scene/physics.d.ts.map +1 -0
  515. package/dist/scene/physics.js +1500 -0
  516. package/dist/scene/physics.js.map +1 -0
  517. package/dist/scene/registry.d.ts +85 -0
  518. package/dist/scene/registry.d.ts.map +1 -0
  519. package/dist/scene/registry.js +75 -0
  520. package/dist/scene/registry.js.map +1 -0
  521. package/dist/scene/skin.d.ts +82 -0
  522. package/dist/scene/skin.d.ts.map +1 -0
  523. package/dist/scene/skin.js +351 -0
  524. package/dist/scene/skin.js.map +1 -0
  525. package/dist/scene/sprite.d.ts +36 -0
  526. package/dist/scene/sprite.d.ts.map +1 -0
  527. package/dist/scene/sprite.js +107 -0
  528. package/dist/scene/sprite.js.map +1 -0
  529. package/dist/scene/viewer.d.ts +96 -0
  530. package/dist/scene/viewer.d.ts.map +1 -0
  531. package/dist/scene/viewer.js +235 -0
  532. package/dist/scene/viewer.js.map +1 -0
  533. package/dist/scoped-slots.d.ts +9 -0
  534. package/dist/scoped-slots.d.ts.map +1 -0
  535. package/dist/scoped-slots.js +42 -0
  536. package/dist/scoped-slots.js.map +1 -0
  537. package/dist/screen.d.ts +109 -0
  538. package/dist/screen.d.ts.map +1 -0
  539. package/dist/screen.js +309 -0
  540. package/dist/screen.js.map +1 -0
  541. package/dist/scroll.d.ts +525 -0
  542. package/dist/scroll.d.ts.map +1 -0
  543. package/dist/scroll.js +1226 -0
  544. package/dist/scroll.js.map +1 -0
  545. package/dist/settings-plane.d.ts +58 -0
  546. package/dist/settings-plane.d.ts.map +1 -0
  547. package/dist/settings-plane.js +86 -0
  548. package/dist/settings-plane.js.map +1 -0
  549. package/dist/share-inbox.d.ts +56 -0
  550. package/dist/share-inbox.d.ts.map +1 -0
  551. package/dist/share-inbox.js +114 -0
  552. package/dist/share-inbox.js.map +1 -0
  553. package/dist/shared-transition.d.ts +152 -0
  554. package/dist/shared-transition.d.ts.map +1 -0
  555. package/dist/shared-transition.js +257 -0
  556. package/dist/shared-transition.js.map +1 -0
  557. package/dist/sheet-content-padding.d.ts +24 -0
  558. package/dist/sheet-content-padding.d.ts.map +1 -0
  559. package/dist/sheet-content-padding.js +32 -0
  560. package/dist/sheet-content-padding.js.map +1 -0
  561. package/dist/shot-devices.d.ts +36 -0
  562. package/dist/shot-devices.d.ts.map +1 -0
  563. package/dist/shot-devices.js +90 -0
  564. package/dist/shot-devices.js.map +1 -0
  565. package/dist/shot-guards.d.ts +100 -0
  566. package/dist/shot-guards.d.ts.map +1 -0
  567. package/dist/shot-guards.js +260 -0
  568. package/dist/shot-guards.js.map +1 -0
  569. package/dist/shot-scope.d.ts +140 -0
  570. package/dist/shot-scope.d.ts.map +1 -0
  571. package/dist/shot-scope.js +302 -0
  572. package/dist/shot-scope.js.map +1 -0
  573. package/dist/slot-partition.d.ts +9 -0
  574. package/dist/slot-partition.d.ts.map +1 -0
  575. package/dist/slot-partition.js +38 -0
  576. package/dist/slot-partition.js.map +1 -0
  577. package/dist/snackbar.d.ts +165 -0
  578. package/dist/snackbar.d.ts.map +1 -0
  579. package/dist/snackbar.js +220 -0
  580. package/dist/snackbar.js.map +1 -0
  581. package/dist/socket.d.ts +96 -0
  582. package/dist/socket.d.ts.map +1 -0
  583. package/dist/socket.js +370 -0
  584. package/dist/socket.js.map +1 -0
  585. package/dist/spotlight.d.ts +77 -0
  586. package/dist/spotlight.d.ts.map +1 -0
  587. package/dist/spotlight.js +174 -0
  588. package/dist/spotlight.js.map +1 -0
  589. package/dist/state-primitive.d.ts +37 -0
  590. package/dist/state-primitive.d.ts.map +1 -0
  591. package/dist/state-primitive.js +91 -0
  592. package/dist/state-primitive.js.map +1 -0
  593. package/dist/store-query.d.ts +25 -0
  594. package/dist/store-query.d.ts.map +1 -0
  595. package/dist/store-query.js +88 -0
  596. package/dist/store-query.js.map +1 -0
  597. package/dist/store-value.d.ts +48 -0
  598. package/dist/store-value.d.ts.map +1 -0
  599. package/dist/store-value.js +264 -0
  600. package/dist/store-value.js.map +1 -0
  601. package/dist/store-versioning.d.ts +70 -0
  602. package/dist/store-versioning.d.ts.map +1 -0
  603. package/dist/store-versioning.js +188 -0
  604. package/dist/store-versioning.js.map +1 -0
  605. package/dist/store.d.ts +282 -0
  606. package/dist/store.d.ts.map +1 -0
  607. package/dist/store.js +1144 -0
  608. package/dist/store.js.map +1 -0
  609. package/dist/strings.d.ts +141 -0
  610. package/dist/strings.d.ts.map +1 -0
  611. package/dist/strings.js +581 -0
  612. package/dist/strings.js.map +1 -0
  613. package/dist/telemetry.d.ts +95 -0
  614. package/dist/telemetry.d.ts.map +1 -0
  615. package/dist/telemetry.js +255 -0
  616. package/dist/telemetry.js.map +1 -0
  617. package/dist/transform-core.d.ts +228 -0
  618. package/dist/transform-core.d.ts.map +1 -0
  619. package/dist/transform-core.js +921 -0
  620. package/dist/transform-core.js.map +1 -0
  621. package/dist/transition-core.d.ts +58 -0
  622. package/dist/transition-core.d.ts.map +1 -0
  623. package/dist/transition-core.js +352 -0
  624. package/dist/transition-core.js.map +1 -0
  625. package/dist/trim-trailing.d.ts +3 -0
  626. package/dist/trim-trailing.d.ts.map +1 -0
  627. package/dist/trim-trailing.js +14 -0
  628. package/dist/trim-trailing.js.map +1 -0
  629. package/dist/upload.d.ts +51 -0
  630. package/dist/upload.d.ts.map +1 -0
  631. package/dist/upload.js +68 -0
  632. package/dist/upload.js.map +1 -0
  633. package/dist/vendor-face.d.ts +44 -0
  634. package/dist/vendor-face.d.ts.map +1 -0
  635. package/dist/vendor-face.js +80 -0
  636. package/dist/vendor-face.js.map +1 -0
  637. package/dist/vendor-session.d.ts +166 -0
  638. package/dist/vendor-session.d.ts.map +1 -0
  639. package/dist/vendor-session.js +423 -0
  640. package/dist/vendor-session.js.map +1 -0
  641. package/dist/vendor-surface.d.ts +290 -0
  642. package/dist/vendor-surface.d.ts.map +1 -0
  643. package/dist/vendor-surface.js +439 -0
  644. package/dist/vendor-surface.js.map +1 -0
  645. package/dist/version-rules.generated.d.ts +17 -0
  646. package/dist/version-rules.generated.d.ts.map +1 -0
  647. package/dist/version-rules.generated.js +99 -0
  648. package/dist/version-rules.generated.js.map +1 -0
  649. package/dist/view-transition-core.d.ts +99 -0
  650. package/dist/view-transition-core.d.ts.map +1 -0
  651. package/dist/view-transition-core.js +127 -0
  652. package/dist/view-transition-core.js.map +1 -0
  653. package/dist/view-transition-door.d.ts +26 -0
  654. package/dist/view-transition-door.d.ts.map +1 -0
  655. package/dist/view-transition-door.js +88 -0
  656. package/dist/view-transition-door.js.map +1 -0
  657. package/dist/window-identity.d.ts +3 -0
  658. package/dist/window-identity.d.ts.map +1 -0
  659. package/dist/window-identity.js +27 -0
  660. package/dist/window-identity.js.map +1 -0
  661. package/package.json +141 -2
@@ -0,0 +1,33 @@
1
+ /** A language version identifier: a member of `LANGUAGE_VERSIONS` and never a computed string. */
2
+ export type LanguageVersion = string;
3
+ export type LanguageRow = {
4
+ version: LanguageVersion;
5
+ /** what the language is, in the words a person reading a refusal needs */
6
+ summary: string;
7
+ };
8
+ /**
9
+ * The language versions this runtime speaks, the default first. A version is a member of this list and never a
10
+ * computed string; the list grows only with a decision record (ADR 0010, ADR 0025 D2a).
11
+ */
12
+ export declare const LANGUAGE_VERSIONS: readonly LanguageRow[];
13
+ /** The language version that introduces element-event dispatch (ADR 0025 D2a). */
14
+ export declare const ELEMENT_DISPATCH_LANGUAGE: LanguageVersion;
15
+ /** Whether a document of this language version dispatches element events through the capture and bubble phases. */
16
+ export declare function dispatchesElementEvents(version: LanguageVersion | undefined): boolean;
17
+ /**
18
+ * The version a document that declares none is read as: an unversioned document is a version 1 document, so
19
+ * declaring a later version is always an explicit opt-in.
20
+ */
21
+ export declare function currentLanguage(): LanguageVersion;
22
+ /** Whether this runtime speaks a version. */
23
+ export declare function knowsLanguage(version: string): boolean;
24
+ /**
25
+ * THE REFUSAL, one sentence, naming the word and every version this runtime does know.
26
+ *
27
+ * A refusal that said only "unknown language version" would tell the person to guess; naming
28
+ * the versions the runtime speaks says what to write instead (or to drop the attribute, since an
29
+ * unversioned document is a version 1 document). The sentence has the same words on all three lanes; the
30
+ * list in it is each lane's own (see THIS LIST IS THE WEB LANE'S above).
31
+ */
32
+ export declare function unknownLanguageRefusal(version: string): string;
33
+ //# sourceMappingURL=language.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../src/language.ts"],"names":[],"mappings":"AA4BA,kGAAkG;AAClG,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,eAAe,CAAC;IACzB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,WAAW,EAenD,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,EAAE,eAAqB,CAAC;AAE9D,mHAAmH;AACnH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,GAAG,OAAO,CAErF;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,eAAe,CAEjD;AAED,6CAA6C;AAC7C,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG9D"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * The language versions this runtime speaks, the default first. A version is a member of this list and never a
3
+ * computed string; the list grows only with a decision record (ADR 0010, ADR 0025 D2a).
4
+ */
5
+ export const LANGUAGE_VERSIONS = [
6
+ {
7
+ version: "1",
8
+ summary: "the DSX language: every reach is explicit (a bare identifier in a JSE region is a "
9
+ + "block local and nothing else; every other reach spells its plane, `dsx.variable.count`) "
10
+ + "and one input is one attribute (an `<action>` on a `server` or `cli` document declares "
11
+ + "each input as its own `input:<name>` attribute).",
12
+ },
13
+ {
14
+ version: "3",
15
+ summary: "version 1 with element-event dispatch (ADR 0025 D2): an element event runs the DOM's three "
16
+ + "phases, capture, at target and bubble, over the element tree of one component instance, so an outer "
17
+ + "`on:tap` also runs for a tap on a nested tappable unless the inner listener declares "
18
+ + "`on:tap.stop-propagation`.",
19
+ },
20
+ ];
21
+ /** The language version that introduces element-event dispatch (ADR 0025 D2a). */
22
+ export const ELEMENT_DISPATCH_LANGUAGE = "3";
23
+ /** Whether a document of this language version dispatches element events through the capture and bubble phases. */
24
+ export function dispatchesElementEvents(version) {
25
+ return version === ELEMENT_DISPATCH_LANGUAGE;
26
+ }
27
+ /**
28
+ * The version a document that declares none is read as: an unversioned document is a version 1 document, so
29
+ * declaring a later version is always an explicit opt-in.
30
+ */
31
+ export function currentLanguage() {
32
+ return LANGUAGE_VERSIONS[0].version;
33
+ }
34
+ /** Whether this runtime speaks a version. */
35
+ export function knowsLanguage(version) {
36
+ return LANGUAGE_VERSIONS.some((row) => row.version === version);
37
+ }
38
+ /**
39
+ * THE REFUSAL, one sentence, naming the word and every version this runtime does know.
40
+ *
41
+ * A refusal that said only "unknown language version" would tell the person to guess; naming
42
+ * the versions the runtime speaks says what to write instead (or to drop the attribute, since an
43
+ * unversioned document is a version 1 document). The sentence has the same words on all three lanes; the
44
+ * list in it is each lane's own (see THIS LIST IS THE WEB LANE'S above).
45
+ */
46
+ export function unknownLanguageRefusal(version) {
47
+ return `this runtime knows no language version ${JSON.stringify(version)} `
48
+ + `(it knows ${LANGUAGE_VERSIONS.map((row) => row.version).join(", ")})`;
49
+ }
50
+ //# sourceMappingURL=language.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language.js","sourceRoot":"","sources":["../src/language.ts"],"names":[],"mappings":"AAqCA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA2B;IACvD;QACE,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,oFAAoF;cACzF,0FAA0F;cAC1F,yFAAyF;cACzF,kDAAkD;KACvD;IACD;QACE,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,6FAA6F;cAClG,sGAAsG;cACtG,uFAAuF;cACvF,4BAA4B;KACjC;CACF,CAAC;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,yBAAyB,GAAoB,GAAG,CAAC;AAE9D,mHAAmH;AACnH,MAAM,UAAU,uBAAuB,CAAC,OAAoC;IAC1E,OAAO,OAAO,KAAK,yBAAyB,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,iBAAiB,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC;AACvC,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACpD,OAAO,0CAA0C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG;UACvE,aAAa,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,30 @@
1
+ /** The root the rem/px relationship is defined against (dsx-css-properties.json conventions). */
2
+ export declare const ROOT_FONT_SIZE_PX = 16;
3
+ /** Units a length control may be switched between. Percent and degree are deliberately absent:
4
+ * a percent is of its container and a degree is an angle, so neither has a rem equivalent and
5
+ * offering one would be a control that lies about what it does. */
6
+ export declare const SWITCHABLE_LENGTH_UNITS: readonly ["rem", "px"];
7
+ export type LengthUnit = (typeof SWITCHABLE_LENGTH_UNITS)[number];
8
+ export type ParsedLength = {
9
+ value: number;
10
+ unit: string;
11
+ } | null;
12
+ /** Split an authored length into its number and unit. Returns null for anything that is not a
13
+ * plain length - `calc(...)`, a token reference, an empty well - because those must pass
14
+ * through a unit switch untouched rather than being mangled into a number. */
15
+ export declare function parseLength(text: unknown): ParsedLength;
16
+ /**
17
+ * Convert an authored length to `unit`, preserving the rendered size.
18
+ *
19
+ * A value that is already in the target unit is returned unchanged, so switching twice is
20
+ * lossless. A value this module cannot parse is returned VERBATIM - a unit switch is never a
21
+ * reason to destroy an expression the author wrote deliberately.
22
+ */
23
+ export declare function convertLength(text: unknown, unit: LengthUnit): string;
24
+ /** Which unit an authored length is written in, for a control that shows the active one.
25
+ * A bare number is px by CSS's own reading, but the editor WRITES rem, so an unparsed or
26
+ * empty value reports the default rather than pretending to know. */
27
+ export declare function lengthUnitOf(text: unknown, fallback?: LengthUnit): LengthUnit;
28
+ /** The unit the editor appends when an author types a bare number. */
29
+ export declare const DEFAULT_LENGTH_UNIT: LengthUnit;
30
+ //# sourceMappingURL=length-units.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"length-units.d.ts","sourceRoot":"","sources":["../src/length-units.ts"],"names":[],"mappings":"AAkBA,iGAAiG;AACjG,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC;;oEAEoE;AACpE,eAAO,MAAM,uBAAuB,wBAAyB,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC;AAElE;;+EAE+E;AAC/E,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,CAQvD;AAQD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAYrE;AAED;;sEAEsE;AACtE,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,GAAE,UAAkB,GAAG,UAAU,CAMpF;AAED,sEAAsE;AACtE,eAAO,MAAM,mBAAmB,EAAE,UAAkB,CAAC"}
@@ -0,0 +1,83 @@
1
+ //
2
+ // length-units.ts - THE UNIT PLANE for authored lengths.
3
+ //
4
+ // An editor that offers rem and px has to answer one question honestly: what happens to the
5
+ // NUMBER when the unit changes. Two answers are possible and only one is defensible.
6
+ //
7
+ // CONVERT 16px becomes 1rem. The rendered size does not move; the author changed how
8
+ // they want to SAY it. This is what a unit switch means everywhere else in
9
+ // design tooling, and it is what this module does.
10
+ // REINTERPRET 16px becomes 16rem. The author asked to see the value in another unit and
11
+ // the headline became sixteen times larger.
12
+ //
13
+ // REM IS THE DEFAULT, and that is a framework position rather than a preference: DSX-CSS
14
+ // defines rem as "root = 16 x Dynamic Type / fontScale", so a length authored in rem is
15
+ // accessibility-responsive by construction and the same length in px is frozen. A tool whose
16
+ // default silently freezes type is a tool that teaches the wrong habit at scale.
17
+ //
18
+ /** The root the rem/px relationship is defined against (dsx-css-properties.json conventions). */
19
+ export const ROOT_FONT_SIZE_PX = 16;
20
+ /** Units a length control may be switched between. Percent and degree are deliberately absent:
21
+ * a percent is of its container and a degree is an angle, so neither has a rem equivalent and
22
+ * offering one would be a control that lies about what it does. */
23
+ export const SWITCHABLE_LENGTH_UNITS = ["rem", "px"];
24
+ /** Split an authored length into its number and unit. Returns null for anything that is not a
25
+ * plain length - `calc(...)`, a token reference, an empty well - because those must pass
26
+ * through a unit switch untouched rather than being mangled into a number. */
27
+ export function parseLength(text) {
28
+ if (typeof text === "number" && Number.isFinite(text))
29
+ return { value: text, unit: "" };
30
+ if (typeof text !== "string")
31
+ return null;
32
+ const match = /^\s*(-?(?:\d+(?:\.\d+)?|\.\d+))\s*(?:([a-z%]+)\s*)?$/i.exec(text);
33
+ if (match === null)
34
+ return null;
35
+ const value = Number(match[1]);
36
+ if (!Number.isFinite(value))
37
+ return null;
38
+ return { value, unit: (match[2] ?? "").toLowerCase() };
39
+ }
40
+ /** Round to a readable precision: rem values carry decimals (0.9375rem is 15px) and a value
41
+ * printed to full float precision is unusable in a text well. */
42
+ function tidy(value) {
43
+ return Math.round(value * 10000) / 10000;
44
+ }
45
+ /**
46
+ * Convert an authored length to `unit`, preserving the rendered size.
47
+ *
48
+ * A value that is already in the target unit is returned unchanged, so switching twice is
49
+ * lossless. A value this module cannot parse is returned VERBATIM - a unit switch is never a
50
+ * reason to destroy an expression the author wrote deliberately.
51
+ */
52
+ export function convertLength(text, unit) {
53
+ const parsed = parseLength(text);
54
+ if (parsed === null)
55
+ return typeof text === "string" ? text : "";
56
+ const from = parsed.unit === "" ? "px" : parsed.unit;
57
+ if (from === unit)
58
+ return `${tidy(parsed.value)}${unit}`;
59
+ // `em` is the element's own font size rather than the root, so it is not convertible without
60
+ // knowing that font size: treat it as its own unit and only relabel when asked for rem, which
61
+ // is the same number against the root the editor assumes.
62
+ if (from !== "px" && from !== "rem" && from !== "em")
63
+ return `${tidy(parsed.value)}${from}`;
64
+ const px = from === "px" ? parsed.value : parsed.value * ROOT_FONT_SIZE_PX;
65
+ const out = unit === "px" ? px : px / ROOT_FONT_SIZE_PX;
66
+ return `${tidy(out)}${unit}`;
67
+ }
68
+ /** Which unit an authored length is written in, for a control that shows the active one.
69
+ * A bare number is px by CSS's own reading, but the editor WRITES rem, so an unparsed or
70
+ * empty value reports the default rather than pretending to know. */
71
+ export function lengthUnitOf(text, fallback = "rem") {
72
+ const parsed = parseLength(text);
73
+ if (parsed === null || parsed.unit === "")
74
+ return fallback;
75
+ if (parsed.unit === "px")
76
+ return "px";
77
+ if (parsed.unit === "rem" || parsed.unit === "em")
78
+ return "rem";
79
+ return fallback;
80
+ }
81
+ /** The unit the editor appends when an author types a bare number. */
82
+ export const DEFAULT_LENGTH_UNIT = "rem";
83
+ //# sourceMappingURL=length-units.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"length-units.js","sourceRoot":"","sources":["../src/length-units.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0DAA0D;AAC1D,EAAE;AACF,6FAA6F;AAC7F,sFAAsF;AACtF,EAAE;AACF,8FAA8F;AAC9F,4FAA4F;AAC5F,oEAAoE;AACpE,6FAA6F;AAC7F,6DAA6D;AAC7D,EAAE;AACF,0FAA0F;AAC1F,yFAAyF;AACzF,8FAA8F;AAC9F,kFAAkF;AAClF,EAAE;AAEF,iGAAiG;AACjG,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEpC;;oEAEoE;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,IAAI,CAAU,CAAC;AAK9D;;+EAE+E;AAC/E,MAAM,UAAU,WAAW,CAAC,IAAa;IACvC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IACxF,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,KAAK,GAAG,uDAAuD,CAAC,IAAI,CA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AM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,iBAAiB,CAAC;IAC3E,MAAM,GAAG,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,iBAAiB,CAAC;IACxD,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED;;sEAEsE;AACtE,MAAM,UAAU,YAAY,CAAC,IAAa,EAAE,WAAuB,KAAK;IACtE,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK,EAAE;QAAE,OAAO,QAAQ,CAAC;IAC3D,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,MAAM,CAAC,IAAI,KAAK,KAAK,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAChE,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,sEAAsE;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAe,KAAK,CAAC"}
@@ -0,0 +1,48 @@
1
+ /** Faster than this and the values are hardware jitter, not light. */
2
+ export declare const LIGHT_MIN_INTERVAL_MS = 50;
3
+ export declare const LIGHT_DEFAULT_INTERVAL_MS = 1000;
4
+ /** Slower than a minute and the reading is stale enough to be misleading. */
5
+ export declare const LIGHT_MAX_INTERVAL_MS = 60000;
6
+ /** Below this absolute change, the difference is sensor noise on every device tested. */
7
+ export declare const LIGHT_MIN_ABSOLUTE_CHANGE = 1;
8
+ /** Above the noise floor, a reading must move by a tenth to be worth waking the bridge for. */
9
+ export declare const LIGHT_MIN_RELATIVE_CHANGE = 0.1;
10
+ /**
11
+ * The categories, with the illuminance references they come from. These are the numbers an app
12
+ * actually branches on, so they are pinned rather than left to each caller's guess.
13
+ *
14
+ * dark < 10 a room with the lights off; a phone screen is the brightest thing in it
15
+ * dim < 50 candlelight, a corridor at night, a cinema
16
+ * indoor < 1000 ordinary room and office lighting
17
+ * overcast < 10000 daylight through a window, or an overcast sky
18
+ * daylight < 30000 full daylight in shade
19
+ * sunlight >= 30000 direct sun, where a screen needs its brightest setting to be readable
20
+ */
21
+ export declare const LIGHT_CATEGORIES: readonly string[];
22
+ export declare const LIGHT_THRESHOLDS: readonly number[];
23
+ /** Which category a lux reading falls in. A negative or non-finite reading is `dark`: a sensor
24
+ * that reports nonsense is reporting no light, and inventing a separate "unknown" category
25
+ * would make every caller handle a case the hardware cannot distinguish anyway. */
26
+ export declare function luxCategory(lux: unknown): string;
27
+ /** Clamp an author-supplied interval into the band the sensor is honest at. Clamped rather than
28
+ * refused: a caller asking for 1 ms wants "as fast as you can", not an error. */
29
+ export declare function clampLightInterval(raw: unknown): number;
30
+ /**
31
+ * Should this reading be delivered?
32
+ *
33
+ * Yes when there is nothing to compare against, when the CATEGORY changed (which is what an app
34
+ * branches on, so it must never be filtered away), or when the value moved by more than the
35
+ * noise floor AND by more than a tenth of where it was. The relative test is what makes the
36
+ * filter work across four orders of magnitude: two lux of movement is everything in a dark room
37
+ * and nothing in direct sun.
38
+ */
39
+ export declare function shouldEmitLux(previous: number | null | undefined, next: unknown): boolean;
40
+ export interface LightSample {
41
+ readonly lux: number;
42
+ readonly category: string;
43
+ }
44
+ /** The shape every renderer emits, so markup reads one thing. A negative hardware reading is
45
+ * clamped to zero rather than passed through: there is no such thing as negative light, and a
46
+ * caller charting the value should not have to guard against it. */
47
+ export declare function lightSample(lux: unknown): LightSample;
48
+ //# sourceMappingURL=lightsensor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lightsensor.d.ts","sourceRoot":"","sources":["../src/lightsensor.ts"],"names":[],"mappings":"AAkBA,sEAAsE;AACtE,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,+FAA+F;AAC/F,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAE7C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAAiC,CAAC;AAEhF;;oFAEoF;AACpF,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAOhD;AAED;kFACkF;AAClF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAMvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAQzF;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;qEAEqE;AACrE,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAIrD"}
@@ -0,0 +1,97 @@
1
+ //
2
+ // lightsensor.ts — the SHARED PURE CORE behind Core/LightSensor (F17.9): what an ambient-light
3
+ // reading MEANS, decided once and run identically by all three renderers.
4
+ //
5
+ // WHY A SENSOR NEEDS A CORE AT ALL. A raw lux number is almost never what an app wants: it wants
6
+ // "is this a dark room?" so it can dim a reader, or "is this direct sun?" so it can raise the
7
+ // screen. Left to each caller, that threshold is invented three times per app and differs across
8
+ // platforms, so the BUCKETS are pinned here with real illuminance references.
9
+ //
10
+ // THE HYSTERESIS IS THE OTHER HALF, and it is not an optimisation. Android's TYPE_LIGHT fires
11
+ // on every hardware sample and the values jitter by several lux with no change in the room; an
12
+ // unfiltered stream wakes the JS bridge dozens of times a second to say nothing. The emit rule
13
+ // is therefore part of the contract rather than a per-facet detail: same stream shape, same
14
+ // battery cost, same test.
15
+ //
16
+ // Pinned by OpenSource/Conformance/light/ambient.json.
17
+ //
18
+ /** Faster than this and the values are hardware jitter, not light. */
19
+ export const LIGHT_MIN_INTERVAL_MS = 50;
20
+ export const LIGHT_DEFAULT_INTERVAL_MS = 1000;
21
+ /** Slower than a minute and the reading is stale enough to be misleading. */
22
+ export const LIGHT_MAX_INTERVAL_MS = 60000;
23
+ /** Below this absolute change, the difference is sensor noise on every device tested. */
24
+ export const LIGHT_MIN_ABSOLUTE_CHANGE = 1;
25
+ /** Above the noise floor, a reading must move by a tenth to be worth waking the bridge for. */
26
+ export const LIGHT_MIN_RELATIVE_CHANGE = 0.1;
27
+ /**
28
+ * The categories, with the illuminance references they come from. These are the numbers an app
29
+ * actually branches on, so they are pinned rather than left to each caller's guess.
30
+ *
31
+ * dark < 10 a room with the lights off; a phone screen is the brightest thing in it
32
+ * dim < 50 candlelight, a corridor at night, a cinema
33
+ * indoor < 1000 ordinary room and office lighting
34
+ * overcast < 10000 daylight through a window, or an overcast sky
35
+ * daylight < 30000 full daylight in shade
36
+ * sunlight >= 30000 direct sun, where a screen needs its brightest setting to be readable
37
+ */
38
+ export const LIGHT_CATEGORIES = [
39
+ "dark", "dim", "indoor", "overcast", "daylight", "sunlight",
40
+ ];
41
+ export const LIGHT_THRESHOLDS = [10, 50, 1000, 10000, 30000];
42
+ /** Which category a lux reading falls in. A negative or non-finite reading is `dark`: a sensor
43
+ * that reports nonsense is reporting no light, and inventing a separate "unknown" category
44
+ * would make every caller handle a case the hardware cannot distinguish anyway. */
45
+ export function luxCategory(lux) {
46
+ const n = typeof lux === "number" ? lux : Number(lux);
47
+ if (!Number.isFinite(n) || n < 0)
48
+ return LIGHT_CATEGORIES[0];
49
+ for (let i = 0; i < LIGHT_THRESHOLDS.length; i += 1) {
50
+ if (n < LIGHT_THRESHOLDS[i])
51
+ return LIGHT_CATEGORIES[i];
52
+ }
53
+ return LIGHT_CATEGORIES[LIGHT_CATEGORIES.length - 1];
54
+ }
55
+ /** Clamp an author-supplied interval into the band the sensor is honest at. Clamped rather than
56
+ * refused: a caller asking for 1 ms wants "as fast as you can", not an error. */
57
+ export function clampLightInterval(raw) {
58
+ const n = typeof raw === "number" ? raw : Number(raw);
59
+ if (!Number.isFinite(n) || n <= 0)
60
+ return LIGHT_DEFAULT_INTERVAL_MS;
61
+ if (n < LIGHT_MIN_INTERVAL_MS)
62
+ return LIGHT_MIN_INTERVAL_MS;
63
+ if (n > LIGHT_MAX_INTERVAL_MS)
64
+ return LIGHT_MAX_INTERVAL_MS;
65
+ return Math.round(n);
66
+ }
67
+ /**
68
+ * Should this reading be delivered?
69
+ *
70
+ * Yes when there is nothing to compare against, when the CATEGORY changed (which is what an app
71
+ * branches on, so it must never be filtered away), or when the value moved by more than the
72
+ * noise floor AND by more than a tenth of where it was. The relative test is what makes the
73
+ * filter work across four orders of magnitude: two lux of movement is everything in a dark room
74
+ * and nothing in direct sun.
75
+ */
76
+ export function shouldEmitLux(previous, next) {
77
+ const value = typeof next === "number" ? next : Number(next);
78
+ if (!Number.isFinite(value))
79
+ return false;
80
+ if (previous === null || previous === undefined || !Number.isFinite(previous))
81
+ return true;
82
+ if (luxCategory(previous) !== luxCategory(value))
83
+ return true;
84
+ const delta = Math.abs(value - previous);
85
+ if (delta < LIGHT_MIN_ABSOLUTE_CHANGE)
86
+ return false;
87
+ return delta >= Math.abs(previous) * LIGHT_MIN_RELATIVE_CHANGE;
88
+ }
89
+ /** The shape every renderer emits, so markup reads one thing. A negative hardware reading is
90
+ * clamped to zero rather than passed through: there is no such thing as negative light, and a
91
+ * caller charting the value should not have to guard against it. */
92
+ export function lightSample(lux) {
93
+ const n = typeof lux === "number" ? lux : Number(lux);
94
+ const value = Number.isFinite(n) && n > 0 ? n : 0;
95
+ return { lux: value, category: luxCategory(value) };
96
+ }
97
+ //# sourceMappingURL=lightsensor.js.map
@@ -0,0 +1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KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC;IACzC,IAAI,KAAK,GAAG,yBAAyB;QAAE,OAAO,KAAK,CAAC;IACpD,OAAO,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,yBAAyB,CAAC;AACjE,CAAC;AAOD;;qEAEqE;AACrE,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,MAAM,CAAC,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;AACtD,CAAC"}
@@ -0,0 +1,27 @@
1
+ /** What a refresh did, in the same closed-vocabulary spirit as the rest of the bus. */
2
+ export type RefreshOutcome = {
3
+ ok: true;
4
+ version: number;
5
+ routes: number;
6
+ } | {
7
+ ok: false;
8
+ reason: "unreachable" | "malformed" | "unsigned" | "bad_signature" | "rollback_detected" | "not_configured";
9
+ message: string;
10
+ };
11
+ export interface LinkRefreshOptions {
12
+ /** where the signed table lives — usually `<baseUrl>/dsx/link.json` */
13
+ url: string;
14
+ /** the author's Ed25519 public key, raw 32 bytes, base64 — the baked trust anchor */
15
+ publicKey: string;
16
+ /** the highest version accepted so far; a refresh may not regress below it */
17
+ minVersion?: number;
18
+ fetchImpl?: typeof fetch;
19
+ }
20
+ /**
21
+ * Fetch, verify and install a newer link table. Returns what happened; never throws.
22
+ *
23
+ * On ANY rejection the currently-installed table is untouched — the caller keeps serving from
24
+ * whatever it already had, which at worst is the generation zero compiled into the binary.
25
+ */
26
+ export declare function refreshLink(options: LinkRefreshOptions): Promise<RefreshOutcome>;
27
+ //# sourceMappingURL=link-refresh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-refresh.d.ts","sourceRoot":"","sources":["../src/link-refresh.ts"],"names":[],"mappings":"AA6CA,uFAAuF;AACvF,MAAM,MAAM,cAAc,GACtB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,eAAe,GAAG,mBAAmB,GAAG,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhJ,MAAM,WAAW,kBAAkB;IACjC,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAwCD;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC,CAkFtF"}
@@ -0,0 +1,166 @@
1
+ //
2
+ // link-refresh.ts — keeping a SHIPPED app in sync with a backend that redeploys without it.
3
+ //
4
+ // THE PROBLEM THIS EXISTS FOR. The emitted link table is baked into the build. On the web that is
5
+ // fine: client and server ship together. A NATIVE binary is different — it sits in an app store
6
+ // for weeks while the backend redeploys, so three things drift:
7
+ //
8
+ // 1. the base URL — the backend moves host/region
9
+ // 2. the route paths — /notes becomes /v2/notes
10
+ // 3. the route set — an action is added or withdrawn
11
+ //
12
+ // A build-time table is still the right FLOOR: it works offline, on first launch, with no round
13
+ // trip. What it needs is a refresh, and DSX already has the machinery for exactly this — the
14
+ // content plane's generation-zero + stale-while-revalidate ladder, and the signed-manifest load
15
+ // gate. This is that ladder applied to the link table:
16
+ //
17
+ // generation zero (in the binary) → always available, never fetched
18
+ // ↓ refreshed, SIGNED, anti-rollback
19
+ // the current table (from the deploy)
20
+ //
21
+ // WHY SIGNED, WHEN IT IS ALREADY HTTPS. remote-bundle-signing.md answers this and the answer
22
+ // applies here verbatim: HTTPS authenticates the CHANNEL — that you reached that host over that
23
+ // certificate. It does not authenticate the AUTHOR of the bytes. The link table decides which
24
+ // calls leave the device and where they go, so a poisoned CDN, a mis-issued certificate or a
25
+ // compromised cache could otherwise repoint every `dsx.module.*` call — WITH the user's bearer
26
+ // token attached. The author's key is the anchor, not the transport.
27
+ //
28
+ // THE CONTRACT IS THE ONE THAT ALREADY SHIPS (remote-bundle-signing.md, "the byte/format
29
+ // contract"), so one signer serves both and the build tooling signs this
30
+ // file's input unchanged:
31
+ // • Ed25519, raw 64-byte signature, over the EXACT fetched bytes — no re-serialisation, no
32
+ // normalisation, not one added or removed newline between signing and verifying.
33
+ // • detached, read header-first: `X-DSX-Signature`, else the `<url>.sig` sidecar; base64,
34
+ // standard or URL-safe, padded or not.
35
+ // • ANTI-ROLLBACK (C1): a monotonic `version` INSIDE the signed bytes. A regressing version
36
+ // still verifies cryptographically and is still refused, because replaying a genuinely-signed
37
+ // OLD table is how an attacker restores a route you deliberately withdrew.
38
+ //
39
+ // FAILURE IS ALWAYS "KEEP WHAT WE HAD". Every rejection leaves the current table in place and
40
+ // returns a reason; nothing is ever half-applied, and there is no path from a bad refresh to an
41
+ // unsigned table. The floor in the binary is the worst case, and the floor is a working app.
42
+ //
43
+ import { LinkSeam } from "./bus.js";
44
+ /** Accept base64 in any of the four shapes the signer or a header may produce. */
45
+ function fromBase64(value) {
46
+ const cleaned = value.trim().replace(/-/g, "+").replace(/_/g, "/");
47
+ const padded = cleaned.length % 4 === 0 ? cleaned : cleaned + "=".repeat(4 - (cleaned.length % 4));
48
+ try {
49
+ const binary = atob(padded);
50
+ const out = new Uint8Array(binary.length);
51
+ for (let i = 0; i < binary.length; i += 1)
52
+ out[i] = binary.charCodeAt(i);
53
+ return out;
54
+ }
55
+ catch {
56
+ return null;
57
+ }
58
+ }
59
+ /**
60
+ * Verify a raw-64 Ed25519 signature over `bytes` with a raw-32 public key.
61
+ *
62
+ * WebCrypto only — the same constraint identity.ts works under, so this runs unchanged in a
63
+ * browser, in Node and on an edge runtime. A platform without Ed25519 support answers `false`
64
+ * rather than throwing: an unverifiable table must be REFUSED, never accepted by default.
65
+ */
66
+ async function verifyEd25519(publicKeyRaw, signature, bytes) {
67
+ if (publicKeyRaw.length !== 32 || signature.length !== 64)
68
+ return false;
69
+ try {
70
+ const key = await crypto.subtle.importKey("raw", publicKeyRaw, { name: "Ed25519" }, false, ["verify"]);
71
+ return await crypto.subtle.verify({ name: "Ed25519" }, key, signature, bytes);
72
+ }
73
+ catch {
74
+ return false;
75
+ }
76
+ }
77
+ /**
78
+ * Fetch, verify and install a newer link table. Returns what happened; never throws.
79
+ *
80
+ * On ANY rejection the currently-installed table is untouched — the caller keeps serving from
81
+ * whatever it already had, which at worst is the generation zero compiled into the binary.
82
+ */
83
+ export async function refreshLink(options) {
84
+ const doFetch = options.fetchImpl ?? globalThis.fetch;
85
+ if (typeof doFetch !== "function")
86
+ return { ok: false, reason: "not_configured", message: "no fetch implementation on this platform" };
87
+ const anchor = fromBase64(options.publicKey);
88
+ if (anchor === null || anchor.length !== 32) {
89
+ return { ok: false, reason: "not_configured", message: "the trust anchor must be a raw 32-byte Ed25519 public key, base64" };
90
+ }
91
+ let response;
92
+ let raw;
93
+ try {
94
+ response = await doFetch(options.url, { headers: { accept: "application/json" } });
95
+ raw = await response.arrayBuffer();
96
+ }
97
+ catch (e) {
98
+ return { ok: false, reason: "unreachable", message: e instanceof Error ? e.message : String(e) };
99
+ }
100
+ if (!response.ok)
101
+ return { ok: false, reason: "unreachable", message: `the table endpoint answered ${response.status}` };
102
+ // THE EXACT BYTES, kept as bytes. Parsing to an object and re-serialising would change them
103
+ // (key order, spacing, the trailing newline) and the signature is over what the server sent.
104
+ const bytes = new Uint8Array(raw);
105
+ const header = response.headers.get("x-dsx-signature");
106
+ let signatureText = header;
107
+ if (signatureText === null || signatureText.trim() === "") {
108
+ try {
109
+ const sidecar = await doFetch(`${options.url}.sig`, { headers: { accept: "text/plain" } });
110
+ if (sidecar.ok)
111
+ signatureText = await sidecar.text();
112
+ }
113
+ catch {
114
+ /* the sidecar is the fallback; its absence is reported as `unsigned` below */
115
+ }
116
+ }
117
+ if (signatureText === null || signatureText.trim() === "") {
118
+ return { ok: false, reason: "unsigned", message: "no X-DSX-Signature header and no .sig sidecar — an unsigned table is never installed" };
119
+ }
120
+ const signature = fromBase64(signatureText);
121
+ if (signature === null)
122
+ return { ok: false, reason: "bad_signature", message: "the detached signature is not valid base64" };
123
+ if (!(await verifyEd25519(anchor, signature, bytes))) {
124
+ return { ok: false, reason: "bad_signature", message: "the table is not signed by the configured key" };
125
+ }
126
+ // Only AFTER the bytes are proven authentic is anything parsed out of them.
127
+ let doc;
128
+ try {
129
+ doc = JSON.parse(new TextDecoder().decode(bytes));
130
+ }
131
+ catch {
132
+ return { ok: false, reason: "malformed", message: "the signed table is not valid JSON" };
133
+ }
134
+ if (doc.format !== "despia:client-link@1") {
135
+ return { ok: false, reason: "malformed", message: `unexpected format ${String(doc.format)}` };
136
+ }
137
+ if (typeof doc.version !== "number" || !Number.isInteger(doc.version) || doc.version < 0) {
138
+ return { ok: false, reason: "malformed", message: "the table carries no integer `version` — anti-rollback cannot be enforced without one" };
139
+ }
140
+ if (!Array.isArray(doc.routes))
141
+ return { ok: false, reason: "malformed", message: "the table carries no `routes` array" };
142
+ // ONE monotonic mark law: no floor yet (nothing accepted this trust epoch) always installs; a
143
+ // floor is set only once a version has been accepted. Against a set floor, strictly older is
144
+ // refused (a genuine older table being replayed) and EQUAL is refused too (a byte identical
145
+ // table reinstalling the version already active is still a replay, not a fresh table); only
146
+ // strictly newer advances the floor. Cryptographically fine either way: this call already
147
+ // verified the signature above, and a valid signature over a stale or repeated version is
148
+ // exactly what a captured, genuinely signed table looks like when replayed.
149
+ if (options.minVersion !== undefined && doc.version <= options.minVersion) {
150
+ return { ok: false, reason: "rollback_detected", message: `version ${doc.version} does not advance past the accepted ${options.minVersion}` };
151
+ }
152
+ for (const route of doc.routes) {
153
+ if (typeof route?.chain !== "string" || typeof route?.action !== "string" || typeof route?.method !== "string" || typeof route?.path !== "string") {
154
+ return { ok: false, reason: "malformed", message: "a route row is missing chain/action/method/path" };
155
+ }
156
+ if (!route.path.startsWith("/")) {
157
+ // A table that could point a call at another origin is the whole reason this file verifies
158
+ // anything; the transport refuses it too, and refusing here keeps it out of the table.
159
+ return { ok: false, reason: "malformed", message: `route ${route.chain}.${route.action} has a non-rooted path` };
160
+ }
161
+ }
162
+ // Installed only once every check has passed, so a refresh is atomic from the caller's view.
163
+ LinkSeam.routes = doc.routes;
164
+ return { ok: true, version: doc.version, routes: doc.routes.length };
165
+ }
166
+ //# sourceMappingURL=link-refresh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-refresh.js","sourceRoot":"","sources":["../src/link-refresh.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,6FAA6F;AAC7F,EAAE;AACF,mGAAmG;AACnG,iGAAiG;AACjG,iEAAiE;AACjE,EAAE;AACF,4DAA4D;AAC5D,uDAAuD;AACvD,8DAA8D;AAC9D,EAAE;AACF,iGAAiG;AACjG,8FAA8F;AAC9F,iGAAiG;AACjG,wDAAwD;AACxD,EAAE;AACF,2EAA2E;AAC3E,mDAAmD;AACnD,2CAA2C;AAC3C,EAAE;AACF,8FAA8F;AAC9F,iGAAiG;AACjG,+FAA+F;AAC/F,8FAA8F;AAC9F,gGAAgG;AAChG,sEAAsE;AACtE,EAAE;AACF,0FAA0F;AAC1F,0EAA0E;AAC1E,2BAA2B;AAC3B,8FAA8F;AAC9F,sFAAsF;AACtF,6FAA6F;AAC7F,4CAA4C;AAC5C,+FAA+F;AAC/F,mGAAmG;AACn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