@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,752 @@
1
+ //
2
+ // motion-core.ts - the keyframe sampler: `@keyframes` plus an `animation` shorthand, folded to
3
+ // the property values one frame should show. The pure half of runtime-pressure R28.
4
+ //
5
+ // WHY THIS EXISTS. `@keyframes` and `animation` parse, lint, and sit in the DSX-CSS property
6
+ // catalogue as Tier B properties. They reach the generated native sheets VERBATIM - the IR in
7
+ // DSXCSSStyles.generated.{swift,kt} already carries every stop. And then both native CSS
8
+ // resolvers fall through on any at-rule that is not `@media`, so the declarations are inert.
9
+ // The catalogue promised the author motion on every target and two targets silently disagreed,
10
+ // which is worse than not having it: DSX has had no way to express a LOOP or a STAGGER off the
11
+ // web, and loops and stagger are most of ambient motion.
12
+ //
13
+ // WHAT IT DELIBERATELY DOES NOT DO. This is not a CSS animation engine. It sums to: read a
14
+ // timeline, read a spec, return the values at time t. It animates only the COMPOSITOR
15
+ // properties the native bridges can already apply without a layout pass - `opacity` and the
16
+ // transform family - and every other property in a keyframe is DROPPED rather than
17
+ // half-applied, because an animated `width` that only moves on the web is the exact defect
18
+ // this file exists to end. The dropped set is reported, never silent (`sampleMotion` returns
19
+ // `dropped`), so a renderer can log it once and an author can see it.
20
+ //
21
+ // The web renderer never calls this: a browser owns its own animations, and it is the
22
+ // reference the corpus is written against. The two native renderers drive it from the frame
23
+ // loop they already run, which is why sampling is a PURE function of elapsed time rather than
24
+ // a state machine - a paused tab, a backgrounded app and a deterministic test all reduce to
25
+ // passing a different number.
26
+ //
27
+ import { parseTransformList, normalizeTransform, formatTransformNumber as format, transformMatrix, transformOrigin, } from "./transform-core.js";
28
+ /** The only properties a keyframe may animate. Anything else is dropped and reported. */
29
+ export const MOTION_PROPERTIES = ["opacity", "transform"];
30
+ /**
31
+ * The attribute keys `animationSpec` reads - the bridged spelling of all nine `animation-*`
32
+ * properties in the DSX-CSS catalogue. A renderer keys its driving loop on exactly these, so an
33
+ * author editing any one of them restarts the animation, which is what CSS does.
34
+ */
35
+ export const MOTION_ANIMATION_KEYS = [
36
+ "animation", "animationName", "animationDuration", "animationDelay",
37
+ "animationEasing", "animationIterations", "animationDirection",
38
+ "animationFill", "animationPlayState",
39
+ ];
40
+ /**
41
+ * `animation-iteration-count: infinite`, as a number three languages can put in JSON. Not
42
+ * `Infinity`: JSON has no spelling for it (JSON.stringify writes `null`), Kotlin and Swift each
43
+ * have their own, and the corpus that judges all three is a JSON file. CSS has no negative
44
+ * iteration count, so -1 cannot collide with a real one.
45
+ */
46
+ export const MOTION_INFINITE = -1;
47
+ const NAMED_EASINGS = {
48
+ linear: [0, 0, 1, 1],
49
+ ease: [0.25, 0.1, 0.25, 1],
50
+ "ease-in": [0.42, 0, 1, 1],
51
+ "ease-out": [0, 0, 0.58, 1],
52
+ "ease-in-out": [0.42, 0, 0.58, 1],
53
+ };
54
+ const DIRECTIONS = new Set(["normal", "reverse", "alternate", "alternate-reverse"]);
55
+ const FILLS = new Set(["none", "forwards", "backwards", "both"]);
56
+ /**
57
+ * Parse an `animation` shorthand. CSS orders the shorthand loosely: the FIRST time is the
58
+ * duration and the second is the delay, and every other word is identified by what it is. A
59
+ * word this cannot classify becomes the name, which is CSS's rule too and is what makes
60
+ * `animation: 2s spin` and `animation: spin 2s` the same declaration.
61
+ */
62
+ export function parseAnimation(shorthand) {
63
+ // The OFF spec is returned whole rather than merged onto whatever was parsed before the
64
+ // refusal: `none: true` means every other field is a default, so a consumer cannot pick a
65
+ // duration off a spec that is not going to run.
66
+ const off = {
67
+ name: "", duration: 0, delay: 0, easing: "ease", iterations: 1,
68
+ direction: "normal", fill: "none", paused: false, none: true,
69
+ };
70
+ const spec = { ...off, none: false };
71
+ const text = shorthand.trim();
72
+ if (text === "" || text === "none")
73
+ return off;
74
+ let seenTime = 0;
75
+ for (const word of splitTopLevel(text)) {
76
+ const lower = word.toLowerCase();
77
+ const time = parseTime(lower);
78
+ if (time !== null) {
79
+ if (seenTime === 0)
80
+ spec.duration = time;
81
+ else if (seenTime === 1)
82
+ spec.delay = time;
83
+ seenTime += 1;
84
+ continue;
85
+ }
86
+ if (lower === "infinite") {
87
+ spec.iterations = MOTION_INFINITE;
88
+ continue;
89
+ }
90
+ if (NAMED_EASINGS[lower] !== undefined || lower.startsWith("cubic-bezier(")
91
+ || lower.startsWith("steps(")) {
92
+ spec.easing = lower;
93
+ continue;
94
+ }
95
+ if (DIRECTIONS.has(lower)) {
96
+ spec.direction = lower;
97
+ continue;
98
+ }
99
+ if (FILLS.has(lower) && lower !== "none") {
100
+ spec.fill = lower;
101
+ continue;
102
+ }
103
+ const count = Number(lower);
104
+ if (Number.isFinite(count) && count >= 0 && !lower.endsWith("s")) {
105
+ spec.iterations = count;
106
+ continue;
107
+ }
108
+ if (lower === "running") {
109
+ spec.paused = false;
110
+ continue;
111
+ }
112
+ if (lower === "paused") {
113
+ spec.paused = true;
114
+ continue;
115
+ }
116
+ if (spec.name === "")
117
+ spec.name = word;
118
+ }
119
+ if (spec.name === "")
120
+ return off;
121
+ return spec;
122
+ }
123
+ /**
124
+ * The spec an element's resolved attributes describe: the `animation` shorthand, then every
125
+ * longhand that overrides it. All nine `animation-*` properties sit in the DSX-CSS catalogue as
126
+ * Tier B, so all nine have to mean something here or the catalogue is lying again — which is the
127
+ * defect R28 exists to end, one layer down.
128
+ *
129
+ * A longhand ALONE is a complete declaration (`animation-name: spin; animation-duration: 2s`),
130
+ * so a name arriving that way turns the OFF spec on. That is CSS: the shorthand is a shorthand.
131
+ */
132
+ export function animationSpec(attrs) {
133
+ const spec = { ...parseAnimation(attrs["animation"] ?? "") };
134
+ const name = attrs["animationName"]?.trim();
135
+ if (name !== undefined && name !== "" && name !== "none") {
136
+ spec.name = name;
137
+ spec.none = false;
138
+ }
139
+ const duration = parseTime((attrs["animationDuration"] ?? "").trim().toLowerCase());
140
+ if (duration !== null)
141
+ spec.duration = duration;
142
+ const delay = parseTime((attrs["animationDelay"] ?? "").trim().toLowerCase());
143
+ if (delay !== null)
144
+ spec.delay = delay;
145
+ const easing = attrs["animationEasing"]?.trim().toLowerCase();
146
+ if (easing !== undefined && easing !== "")
147
+ spec.easing = easing;
148
+ const iterations = attrs["animationIterations"]?.trim().toLowerCase();
149
+ if (iterations === "infinite")
150
+ spec.iterations = MOTION_INFINITE;
151
+ else if (iterations !== undefined && iterations !== "") {
152
+ const count = Number(iterations);
153
+ if (Number.isFinite(count) && count >= 0)
154
+ spec.iterations = count;
155
+ }
156
+ const direction = attrs["animationDirection"]?.trim().toLowerCase();
157
+ if (direction !== undefined && DIRECTIONS.has(direction)) {
158
+ spec.direction = direction;
159
+ }
160
+ const fill = attrs["animationFill"]?.trim().toLowerCase();
161
+ if (fill !== undefined && FILLS.has(fill))
162
+ spec.fill = fill;
163
+ const play = attrs["animationPlayState"]?.trim().toLowerCase();
164
+ if (play === "paused")
165
+ spec.paused = true;
166
+ else if (play === "running")
167
+ spec.paused = false;
168
+ if (spec.name === "")
169
+ spec.none = true;
170
+ return spec;
171
+ }
172
+ /**
173
+ * Normalize a `@keyframes` body into ordered stops. Selectors are CSS's: `from` is 0, `to` is
174
+ * 1, `40%` is 0.4, and one rule may carry several (`0%, 80%, 100%`). Later stops at the same
175
+ * offset win, which is the cascade inside a keyframes block.
176
+ */
177
+ export function keyframeTimeline(rules) {
178
+ const byOffset = new Map();
179
+ for (const rule of rules) {
180
+ for (const part of rule.selector.split(",")) {
181
+ const offset = parseOffset(part.trim());
182
+ if (offset === null)
183
+ continue;
184
+ byOffset.set(offset, { ...(byOffset.get(offset) ?? {}), ...rule.declarations });
185
+ }
186
+ }
187
+ return [...byOffset.entries()]
188
+ .map(([offset, declarations]) => ({ offset, declarations }))
189
+ .sort((a, b) => a.offset - b.offset);
190
+ }
191
+ /**
192
+ * The values at `elapsed` milliseconds since the animation was installed.
193
+ *
194
+ * An animation with no duration shows its LAST stop and stops being active, which is what a
195
+ * browser does and what keeps `animation: spin 0s` from dividing by zero. Before the delay the
196
+ * element shows the first stop only under `backwards`/`both`, and after the last iteration the
197
+ * last stop only under `forwards`/`both` - CSS's fill rules, because half of them would make an
198
+ * element jump at the end.
199
+ */
200
+ export function sampleMotion(timeline, spec, elapsed) {
201
+ const dropped = droppedProperties(timeline);
202
+ if (spec.none || timeline.length === 0)
203
+ return { values: {}, dropped, active: false };
204
+ const infinite = spec.iterations === MOTION_INFINITE;
205
+ const total = infinite ? Infinity : spec.duration * spec.iterations;
206
+ const since = elapsed - spec.delay;
207
+ if (since < 0) {
208
+ const fills = spec.fill === "backwards" || spec.fill === "both";
209
+ return { values: fills ? valuesAt(timeline, startFraction(spec)) : {}, dropped, active: true };
210
+ }
211
+ if (spec.duration <= 0 || (!infinite && since >= total)) {
212
+ const fills = spec.fill === "forwards" || spec.fill === "both";
213
+ return { values: fills ? valuesAt(timeline, endFraction(spec)) : {}, dropped, active: false };
214
+ }
215
+ const iteration = Math.floor(since / spec.duration);
216
+ const within = (since % spec.duration) / spec.duration;
217
+ // CSS timing functions apply within each property’s keyframe segment.
218
+ const fraction = directed(within, iteration, spec.direction);
219
+ return { values: valuesAt(timeline, fraction, spec.easing), dropped, active: true };
220
+ }
221
+ // A SAMPLED FRAME IS ALREADY THE ATTRIBUTE MAP. Until this file also carried a
222
+ // `motionAttributes` fold that DECOMPOSED a sampled `transform` into the four attributes the two
223
+ // native ladders had - rotation, uniform scale, offsetX/offsetY - or refused the transform whole
224
+ // when it could not. The refusal is why a marquee written `translateX(-50%)` stood still on both
225
+ // phones (register row motion/keyframe-transform-inert). Both ladders now apply a MATRIX
226
+ // (transform-core.ts and its two twins, pinned against Chromium by
227
+ // Conformance/motion/transform.json), so `transform` is an attribute like any other and the fold
228
+ // has nothing left to do.
229
+ /** Every property a timeline mentions that this engine will not animate, sorted and unique. */
230
+ export function droppedProperties(timeline) {
231
+ const out = new Set();
232
+ for (const stop of timeline) {
233
+ for (const property of Object.keys(stop.declarations)) {
234
+ if (!MOTION_PROPERTIES.includes(property))
235
+ out.add(property);
236
+ }
237
+ }
238
+ return [...out].sort();
239
+ }
240
+ // ---------------------------------------------------------------------------- internals
241
+ function directed(within, iteration, direction) {
242
+ if (direction === "reverse")
243
+ return 1 - within;
244
+ if (direction === "alternate")
245
+ return iteration % 2 === 0 ? within : 1 - within;
246
+ if (direction === "alternate-reverse")
247
+ return iteration % 2 === 0 ? 1 - within : within;
248
+ return within;
249
+ }
250
+ /** Where a filled-backwards animation sits before it starts, and after it ends. */
251
+ function startFraction(spec) {
252
+ return spec.direction === "reverse" || spec.direction === "alternate-reverse" ? 1 : 0;
253
+ }
254
+ function endFraction(spec) {
255
+ const last = spec.iterations === MOTION_INFINITE
256
+ ? 0 : Math.max(0, Math.ceil(spec.iterations) - 1);
257
+ return directed(1, last, spec.direction);
258
+ }
259
+ /** Interpolate every animatable property across the two stops bracketing `fraction`. */
260
+ function valuesAt(timeline, fraction, easing = "linear") {
261
+ const out = {};
262
+ for (const property of MOTION_PROPERTIES) {
263
+ const stops = timeline.filter((s) => s.declarations[property] !== undefined);
264
+ if (stops.length === 0)
265
+ continue;
266
+ const value = interpolate(stops, property, fraction, easing);
267
+ if (value !== null)
268
+ out[property] = value;
269
+ }
270
+ return out;
271
+ }
272
+ function interpolate(stops, property, fraction, easing) {
273
+ let before = stops[0];
274
+ let after = stops[stops.length - 1];
275
+ for (const stop of stops) {
276
+ if (stop.offset <= fraction)
277
+ before = stop;
278
+ if (stop.offset >= fraction) {
279
+ after = stop;
280
+ break;
281
+ }
282
+ }
283
+ const a = before.declarations[property];
284
+ const b = after.declarations[property];
285
+ if (before === after || after.offset === before.offset)
286
+ return a;
287
+ const t = ease(easing, (fraction - before.offset) / (after.offset - before.offset));
288
+ return property === "opacity" ? mixNumber(a, b, t) : mixTransform(a, b, t);
289
+ }
290
+ function mixNumber(a, b, t) {
291
+ const from = Number(a.trim());
292
+ const to = Number(b.trim());
293
+ if (!Number.isFinite(from) || !Number.isFinite(to))
294
+ return a;
295
+ return format(from + (to - from) * t);
296
+ }
297
+ /**
298
+ * Transforms interpolate FUNCTION BY FUNCTION and only when both sides list the same functions
299
+ * in the same order, which is CSS's own rule. A mismatched pair does not blend to nonsense: it
300
+ * snaps at the midpoint, which is what a browser's discrete fallback looks like and is the one
301
+ * behaviour that cannot produce a shape the author never wrote. The parsing and the spelling are
302
+ * the transform algebra's, so an interpolated frame and a static declaration are one string.
303
+ */
304
+ function mixTransform(a, b, t) {
305
+ const from = parseTransformList(a);
306
+ const to = parseTransformList(b);
307
+ if (from === null || to === null || from.length !== to.length)
308
+ return t < 0.5 ? a : b;
309
+ const out = [];
310
+ for (let i = 0; i < from.length; i++) {
311
+ const f = from[i];
312
+ const g = to[i];
313
+ if (f.name !== g.name || f.args.length !== g.args.length)
314
+ return t < 0.5 ? a : b;
315
+ const args = [];
316
+ for (let j = 0; j < f.args.length; j++) {
317
+ const value = f.args[j];
318
+ const other = g.args[j];
319
+ args.push(value.unit !== other.unit
320
+ ? value
321
+ : { n: value.n + (other.n - value.n) * t, unit: value.unit });
322
+ }
323
+ out.push({ name: f.name, args });
324
+ }
325
+ return normalizeTransform(out);
326
+ }
327
+ /** The cubic-bezier solve, Newton then bisection - the shape every engine uses. */
328
+ /**
329
+ * The easing solve, exported so the transition ledger uses the SAME curve the keyframe sampler
330
+ * does. Two curve implementations in one engine is two answers to `ease-in-out`.
331
+ */
332
+ export function easeFraction(easing, t) {
333
+ return ease(easing, t);
334
+ }
335
+ function ease(easing, t) {
336
+ if (t <= 0)
337
+ return 0;
338
+ if (t >= 1)
339
+ return 1;
340
+ // `linear` is IDENTITY, short-circuited rather than solved. The bisection below converges to
341
+ // about 1e-6, which is invisible on screen and very visible in a corpus three languages
342
+ // compare strings against: it turned an exact 60px into 59.9999px.
343
+ if (easing === "linear")
344
+ return t;
345
+ const steps = /^steps\(\s*(\d+)/.exec(easing);
346
+ if (steps !== null) {
347
+ const n = Math.max(1, Number(steps[1]));
348
+ return easing.includes("start") ? Math.ceil(t * n) / n : Math.floor(t * n) / n;
349
+ }
350
+ const named = NAMED_EASINGS[easing];
351
+ const custom = /^cubic-bezier\(([^)]*)\)$/.exec(easing);
352
+ const p = named ?? (custom !== null
353
+ ? custom[1].split(",").map((x) => Number(x.trim()))
354
+ : NAMED_EASINGS["ease"]);
355
+ if (p.some((n) => !Number.isFinite(n)))
356
+ return t;
357
+ const [x1, y1, x2, y2] = p;
358
+ const bez = (a, b, u) => {
359
+ const v = 1 - u;
360
+ return 3 * v * v * u * a + 3 * v * u * u * b + u * u * u;
361
+ };
362
+ let lo = 0;
363
+ let hi = 1;
364
+ let u = t;
365
+ for (let i = 0; i < 24; i += 1) {
366
+ const x = bez(x1, x2, u);
367
+ if (Math.abs(x - t) < 1e-6)
368
+ break;
369
+ if (x < t)
370
+ lo = u;
371
+ else
372
+ hi = u;
373
+ u = (lo + hi) / 2;
374
+ }
375
+ return bez(y1, y2, u);
376
+ }
377
+ function parseTime(word) {
378
+ if (word.endsWith("ms")) {
379
+ const n = Number(word.slice(0, -2));
380
+ return Number.isFinite(n) ? n : null;
381
+ }
382
+ if (word.endsWith("s")) {
383
+ const n = Number(word.slice(0, -1));
384
+ return Number.isFinite(n) ? n * 1000 : null;
385
+ }
386
+ return null;
387
+ }
388
+ function parseOffset(selector) {
389
+ const lower = selector.toLowerCase();
390
+ if (lower === "from")
391
+ return 0;
392
+ if (lower === "to")
393
+ return 1;
394
+ if (!lower.endsWith("%"))
395
+ return null;
396
+ const n = Number(lower.slice(0, -1));
397
+ if (!Number.isFinite(n))
398
+ return null;
399
+ return Math.max(0, Math.min(1, n / 100));
400
+ }
401
+ /** Split on whitespace, but never inside `cubic-bezier(…)` or `steps(…)`. */
402
+ function splitTopLevel(source) {
403
+ const out = [];
404
+ let depth = 0;
405
+ let current = "";
406
+ for (const ch of source) {
407
+ if (ch === "(")
408
+ depth += 1;
409
+ if (ch === ")")
410
+ depth -= 1;
411
+ if (depth === 0 && (ch === " " || ch === "\t" || ch === "\n")) {
412
+ if (current !== "")
413
+ out.push(current);
414
+ current = "";
415
+ continue;
416
+ }
417
+ current += ch;
418
+ }
419
+ if (current !== "")
420
+ out.push(current);
421
+ return out;
422
+ }
423
+ /** The attribute names the bridges write the five properties under, in catalogue order. */
424
+ export const MOTION_OFFSET_KEYS = [
425
+ "offsetPath", "offsetDistance", "offsetRotate", "offsetAnchor", "offsetPosition",
426
+ ];
427
+ /** How finely a curve is walked: the browsers flatten too, and disagree by about a tenth of a
428
+ * point on the recorded rows, which is what the corpus tolerance admits. */
429
+ const MOTION_CURVE_STEPS = 192;
430
+ /**
431
+ * `offset-path` as a walkable path, or null when there is none to walk. Only `path()` is
432
+ * answered, for the reason at the top of this section.
433
+ * https://www.w3.org/TR/motion-1/#offset-path-property
434
+ */
435
+ export function parseOffsetPath(value) {
436
+ const raw = (value ?? "").trim();
437
+ if (raw === "" || raw.toLowerCase() === "none")
438
+ return null;
439
+ const open = raw.indexOf("(");
440
+ if (open < 0 || !raw.endsWith(")"))
441
+ return null;
442
+ if (raw.slice(0, open).trim().toLowerCase() !== "path")
443
+ return null;
444
+ let data = raw.slice(open + 1, raw.length - 1).trim();
445
+ if ((data.startsWith('"') && data.endsWith('"')) || (data.startsWith("'") && data.endsWith("'"))) {
446
+ data = data.slice(1, data.length - 1);
447
+ }
448
+ return flattenPathData(data);
449
+ }
450
+ /** The SVG path data of a `path()`, flattened to a polyline. Null on any command this file
451
+ * refuses, which drops the whole declaration rather than drawing half a path. */
452
+ export function flattenPathData(data) {
453
+ const tokens = tokenizePath(data);
454
+ if (tokens === null || tokens.length === 0)
455
+ return null;
456
+ const xs = [];
457
+ const ys = [];
458
+ const head0 = [];
459
+ const head1 = [];
460
+ let x = 0, y = 0, startX = 0, startY = 0;
461
+ let closed = false;
462
+ let lastCubicX = null, lastCubicY = null;
463
+ let lastQuadX = null, lastQuadY = null;
464
+ // A point, and with it the segment that ends at it: `from` and `to` are the true headings of
465
+ // the source at that segment's two ends, which a straight line answers with one number twice.
466
+ const push = (px, py, from, to) => {
467
+ if (xs.length > 0) {
468
+ const chord = degrees(Math.atan2(py - ys[ys.length - 1], px - xs[xs.length - 1]));
469
+ head0.push(from ?? chord);
470
+ head1.push(to ?? chord);
471
+ }
472
+ xs.push(px);
473
+ ys.push(py);
474
+ };
475
+ const curveTo = (cubic) => {
476
+ let from = cubicHeading(cubic, 0);
477
+ for (let i = 1; i <= MOTION_CURVE_STEPS; i++) {
478
+ const t = i / MOTION_CURVE_STEPS;
479
+ const u = 1 - t;
480
+ const to = cubicHeading(cubic, t);
481
+ push(u * u * u * cubic[0] + 3 * u * u * t * cubic[2] + 3 * u * t * t * cubic[4] + t * t * t * cubic[6], u * u * u * cubic[1] + 3 * u * u * t * cubic[3] + 3 * u * t * t * cubic[5] + t * t * t * cubic[7], from, to);
482
+ from = to;
483
+ }
484
+ };
485
+ let index = 0;
486
+ while (index < tokens.length) {
487
+ const command = tokens[index];
488
+ if (typeof command !== "string")
489
+ return null;
490
+ index += 1;
491
+ const relative = command === command.toLowerCase();
492
+ const upper = command.toUpperCase();
493
+ const need = { M: 2, L: 2, H: 1, V: 1, C: 6, S: 4, Q: 4, T: 2, Z: 0 }[upper];
494
+ if (need === undefined)
495
+ return null;
496
+ do {
497
+ const args = [];
498
+ for (let i = 0; i < need; i++) {
499
+ const value = tokens[index + i];
500
+ if (typeof value !== "number")
501
+ return null;
502
+ args.push(value);
503
+ }
504
+ index += need;
505
+ const dx = relative ? x : 0;
506
+ const dy = relative ? y : 0;
507
+ let cubic = null;
508
+ switch (upper) {
509
+ case "M":
510
+ x = args[0] + dx;
511
+ y = args[1] + dy;
512
+ startX = x;
513
+ startY = y;
514
+ if (xs.length > 0)
515
+ return null; // a second subpath is a shape this file will not walk
516
+ push(x, y, null, null);
517
+ break;
518
+ case "L":
519
+ x = args[0] + dx;
520
+ y = args[1] + dy;
521
+ push(x, y, null, null);
522
+ break;
523
+ case "H":
524
+ x = args[0] + dx;
525
+ push(x, y, null, null);
526
+ break;
527
+ case "V":
528
+ y = args[0] + dy;
529
+ push(x, y, null, null);
530
+ break;
531
+ case "C":
532
+ cubic = [x, y, args[0] + dx, args[1] + dy, args[2] + dx, args[3] + dy, args[4] + dx, args[5] + dy];
533
+ break;
534
+ case "S": {
535
+ const rx = lastCubicX === null ? x : 2 * x - lastCubicX;
536
+ const ry = lastCubicY === null ? y : 2 * y - lastCubicY;
537
+ cubic = [x, y, rx, ry, args[0] + dx, args[1] + dy, args[2] + dx, args[3] + dy];
538
+ break;
539
+ }
540
+ case "Q": {
541
+ const qx = args[0] + dx, qy = args[1] + dy;
542
+ cubic = quadraticAsCubic(x, y, qx, qy, args[2] + dx, args[3] + dy);
543
+ lastQuadX = qx;
544
+ lastQuadY = qy;
545
+ break;
546
+ }
547
+ case "T": {
548
+ const qx = lastQuadX === null ? x : 2 * x - lastQuadX;
549
+ const qy = lastQuadY === null ? y : 2 * y - lastQuadY;
550
+ cubic = quadraticAsCubic(x, y, qx, qy, args[0] + dx, args[1] + dy);
551
+ lastQuadX = qx;
552
+ lastQuadY = qy;
553
+ break;
554
+ }
555
+ case "Z":
556
+ closed = true;
557
+ if (x !== startX || y !== startY)
558
+ push(startX, startY, null, null);
559
+ x = startX;
560
+ y = startY;
561
+ break;
562
+ default: return null;
563
+ }
564
+ if (cubic !== null) {
565
+ curveTo(cubic);
566
+ lastCubicX = cubic[4];
567
+ lastCubicY = cubic[5];
568
+ x = cubic[6];
569
+ y = cubic[7];
570
+ }
571
+ if (upper !== "C" && upper !== "S") {
572
+ lastCubicX = null;
573
+ lastCubicY = null;
574
+ }
575
+ if (upper !== "Q" && upper !== "T") {
576
+ lastQuadX = null;
577
+ lastQuadY = null;
578
+ }
579
+ if (need === 0)
580
+ break;
581
+ } while (typeof tokens[index] === "number");
582
+ }
583
+ if (xs.length < 2)
584
+ return null;
585
+ const at = [0];
586
+ for (let i = 1; i < xs.length; i++) {
587
+ at.push(at[i - 1] + Math.hypot(xs[i] - xs[i - 1], ys[i] - ys[i - 1]));
588
+ }
589
+ const total = at[at.length - 1];
590
+ if (!(total > 0))
591
+ return null;
592
+ return { xs, ys, at, head0, head1, closed, total };
593
+ }
594
+ /** `M 0 0 L 1 1` to `["M", 0, 0, "L", 1, 1]`; null on anything that is not path data. */
595
+ function tokenizePath(data) {
596
+ const out = [];
597
+ let i = 0;
598
+ while (i < data.length) {
599
+ const ch = data[i];
600
+ if (ch === " " || ch === "\t" || ch === "\n" || ch === "\r" || ch === ",") {
601
+ i += 1;
602
+ continue;
603
+ }
604
+ if (/[a-zA-Z]/.test(ch)) {
605
+ out.push(ch);
606
+ i += 1;
607
+ continue;
608
+ }
609
+ const match = /^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?/.exec(data.slice(i));
610
+ if (match === null)
611
+ return null;
612
+ out.push(Number(match[0]));
613
+ i += match[0].length;
614
+ }
615
+ return out;
616
+ }
617
+ /** Degrees clockwise from east, which is what CSS angles are. */
618
+ function degrees(radians) { return radians * 180 / Math.PI; }
619
+ /** The true heading of a cubic at `t`, the chord's own direction where the derivative vanishes. */
620
+ function cubicHeading(c, t) {
621
+ const u = 1 - t;
622
+ const dx = 3 * u * u * (c[2] - c[0]) + 6 * u * t * (c[4] - c[2]) + 3 * t * t * (c[6] - c[4]);
623
+ const dy = 3 * u * u * (c[3] - c[1]) + 6 * u * t * (c[5] - c[3]) + 3 * t * t * (c[7] - c[5]);
624
+ if (Math.abs(dx) < 1e-9 && Math.abs(dy) < 1e-9)
625
+ return degrees(Math.atan2(c[7] - c[1], c[6] - c[0]));
626
+ return degrees(Math.atan2(dy, dx));
627
+ }
628
+ function quadraticAsCubic(x0, y0, qx, qy, x1, y1) {
629
+ return [x0, y0, x0 + (2 / 3) * (qx - x0), y0 + (2 / 3) * (qy - y0),
630
+ x1 + (2 / 3) * (qx - x1), y1 + (2 / 3) * (qy - y1), x1, y1];
631
+ }
632
+ /**
633
+ * The point a distance along the path, and the heading there. A distance past an OPEN path is
634
+ * clamped to its end and a distance past a CLOSED one wraps, which all three engines do.
635
+ * https://www.w3.org/TR/motion-1/#offset-distance-property
636
+ */
637
+ export function motionPathPoint(path, distance) {
638
+ let d = distance;
639
+ if (path.closed) {
640
+ d = d % path.total;
641
+ if (d < 0)
642
+ d += path.total;
643
+ }
644
+ else {
645
+ d = Math.min(Math.max(d, 0), path.total);
646
+ }
647
+ let hi = 1;
648
+ while (hi < path.at.length - 1 && path.at[hi] < d)
649
+ hi += 1;
650
+ const lo = hi - 1;
651
+ const span = path.at[hi] - path.at[lo];
652
+ const t = span > 0 ? (d - path.at[lo]) / span : 0;
653
+ const x = path.xs[lo] + (path.xs[hi] - path.xs[lo]) * t;
654
+ const y = path.ys[lo] + (path.ys[hi] - path.ys[lo]) * t;
655
+ // The heading is the SOURCE's, interpolated across the segment the sample fell in, so a point
656
+ // between two flattening steps of a curve reads the curve's tangent and not the chord's.
657
+ const a0 = path.head0[lo], a1 = path.head1[lo];
658
+ let turn = (a1 - a0) % 360;
659
+ if (turn > 180)
660
+ turn -= 360;
661
+ if (turn < -180)
662
+ turn += 360;
663
+ return { x, y, angle: a0 + turn * t };
664
+ }
665
+ /** `offset-distance` in points: a length as itself, a percentage of the path's own length. */
666
+ export function offsetDistanceLength(value, total) {
667
+ const raw = (value ?? "").trim();
668
+ if (raw === "")
669
+ return 0;
670
+ if (raw.endsWith("%")) {
671
+ const percent = Number(raw.slice(0, raw.length - 1));
672
+ return Number.isFinite(percent) ? (percent / 100) * total : 0;
673
+ }
674
+ const n = Number(raw.endsWith("px") ? raw.slice(0, raw.length - 2) : raw);
675
+ return Number.isFinite(n) ? n : 0;
676
+ }
677
+ /**
678
+ * `offset-rotate` in degrees, given the path's own heading: `auto` faces along the path,
679
+ * `auto <angle>` adds to it, `reverse` is `auto 180deg`, a bare angle ignores the path.
680
+ * https://www.w3.org/TR/motion-1/#offset-rotate-property
681
+ */
682
+ export function offsetRotateAngle(value, heading) {
683
+ const raw = (value ?? "").trim().toLowerCase();
684
+ if (raw === "" || raw === "auto")
685
+ return heading;
686
+ if (raw === "reverse")
687
+ return heading + 180;
688
+ let auto = false;
689
+ let angle = 0;
690
+ for (const word of raw.split(/\s+/)) {
691
+ if (word === "auto") {
692
+ auto = true;
693
+ continue;
694
+ }
695
+ if (word === "reverse") {
696
+ auto = true;
697
+ angle += 180;
698
+ continue;
699
+ }
700
+ const parsed = motionAngleDegrees(word);
701
+ if (parsed === null)
702
+ return heading;
703
+ angle += parsed;
704
+ }
705
+ return auto ? heading + angle : angle;
706
+ }
707
+ /** An angle in any CSS unit, as degrees. Null when the word is not an angle. */
708
+ export function motionAngleDegrees(word) {
709
+ const match = /^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?)(deg|rad|grad|turn)?$/.exec(word.trim());
710
+ if (match === null)
711
+ return null;
712
+ const n = Number(match[1]);
713
+ if (!Number.isFinite(n))
714
+ return null;
715
+ switch (match[2] ?? "deg") {
716
+ case "rad": return n * 180 / Math.PI;
717
+ case "grad": return n * 0.9;
718
+ case "turn": return n * 360;
719
+ default: return n;
720
+ }
721
+ }
722
+ /**
723
+ * THE MOTION MATRIX in the element's OWN frame: translate(point) rotate(heading) translate(-anchor).
724
+ * Null when no path is declared, which is also what a refused path answers.
725
+ *
726
+ * A `path()` is drawn in the element's own frame, not its container's: the same path under a
727
+ * child already placed at (100, 60) lands 100 by 60 further along in Chromium 149.0.7827.55,
728
+ * Firefox 151.0 and WebKit 26.5, recorded, so this matrix needs the box's size and
729
+ * nothing about where layout put it. `offset-anchor: auto` is the `transform-origin`, which is
730
+ * why the box's CENTRE rides the path by default, and the element's own transform keeps turning
731
+ * about that origin: compose this ON THE LEFT of it.
732
+ * Kotlin twin: MotionCore.offsetMatrix. Swift twin: MotionCore.offsetMatrix.
733
+ * https://www.w3.org/TR/motion-1/#calculating-path-transform
734
+ */
735
+ export function offsetMatrix(declarations, width, height, originX, originY) {
736
+ const path = parseOffsetPath(declarations.offsetPath);
737
+ if (path === null)
738
+ return null;
739
+ const point = motionPathPoint(path, offsetDistanceLength(declarations.offsetDistance, path.total));
740
+ const angle = offsetRotateAngle(declarations.offsetRotate, point.angle);
741
+ const anchorRaw = (declarations.offsetAnchor ?? "").trim().toLowerCase();
742
+ const anchor = anchorRaw === "" || anchorRaw === "auto"
743
+ ? [originX, originY]
744
+ : transformOrigin(anchorRaw, width, height, false);
745
+ const fns = [
746
+ { name: "translate", args: [{ n: point.x, unit: "px" }, { n: point.y, unit: "px" }] },
747
+ { name: "rotate", args: [{ n: angle, unit: "deg" }] },
748
+ { name: "translate", args: [{ n: -anchor[0], unit: "px" }, { n: -anchor[1], unit: "px" }] },
749
+ ];
750
+ return transformMatrix(fns, width, height);
751
+ }
752
+ //# sourceMappingURL=motion-core.js.map