@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,652 @@
1
+ //
2
+ // controls-core.ts — the U07 PURE CORE: the gradient resolver (linear · radial · angular ·
3
+ // mesh, with the angle convention pinned), the `<gauge>` value-to-arc solver, the
4
+ // `<colorpicker>` hex/swatch/name folds, and the `<masked>` mode fold.
5
+ //
6
+ // The law is the corpus, OpenSource/Conformance/controls/{gradients,gauge,colorpicker,masked}.json
7
+ // (parity/U07-controls.md); the Kotlin twin is :core ControlsCore.kt and the Swift twin is
8
+ // Engine/Swift/ControlsCore.swift. Everything platform-shaped lives OUTSIDE this file —
9
+ // LinearGradient/Brush/CSS, the system ColorPicker sheet, `.mask()`/BlendMode/mask-image —
10
+ // because keeping the DECISION separate from the PLUMBING is what lets one corpus judge three
11
+ // renderers.
12
+ //
13
+ // THE ANGLE CONVENTION, stated once: 0deg points UP and increases CLOCKWISE. That is CSS's
14
+ // convention; SwiftUI's UnitPoint model is unrelated and Compose's Offset model is a third
15
+ // thing. Pinning one convention here and converting at each boundary is the only way
16
+ // `gradientAngle="135deg"` looks the same on three renderers.
17
+ //
18
+ import { isDict } from "./jse/values.js";
19
+ /** THE DECLARED CONTROL BOOLEAN, the one reader of `disabled=`, `checked=` and every other
20
+ * attribute whose value is a boolean the AUTHOR wrote.
21
+ *
22
+ * The value is READ, never merely tested for presence. In DSX an attribute is always an
23
+ * interpolated string, so a bound `{{ locked }}` arrives here as "1" or as "", and an author
24
+ * who writes `disabled="false"` has said ENABLED as plainly as a language allows. A presence
25
+ * check, or `truthy` whose string law makes `truthy("false")` true, reads both of those as
26
+ * disabled and turns an explicit enable into a dead control.
27
+ *
28
+ * The predicate: the trimmed value is "true", or a DECIMAL number that is not zero. Everything
29
+ * else, the empty string and "false" included, is false. `truthy` stays the reader of
30
+ * `disabled-if=`, which is a CONDITION and not a declared value.
31
+ *
32
+ * DECIMAL is spelled as a grammar rather than left to each language's own string-to-number
33
+ * parser, because those three parsers do not agree: `Number("0x10")` is sixteen here where
34
+ * Kotlin and Swift refuse it, and Kotlin's and Swift's parsers read "NaN" and "Infinity" where
35
+ * the `Number.isNaN` guard rejected only the first. Three parsers, three answers, one
36
+ * attribute. The grammar below is what all four renderers actually share.
37
+ *
38
+ * Corpus: OpenSource/Conformance/controls/declared-boolean.json. */
39
+ const DECLARED_DECIMAL = /^[+-]?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;
40
+ export function declaredBool(value) {
41
+ if (value === null || value === undefined)
42
+ return false;
43
+ const v = value.trim();
44
+ if (v === "true")
45
+ return true;
46
+ if (!DECLARED_DECIMAL.test(v))
47
+ return false;
48
+ return Number(v) !== 0;
49
+ }
50
+ export const GRADIENT_TYPES = ["linear", "radial", "angular", "mesh"];
51
+ /** Neither `gradientAngle` nor `gradientDir` declared = today's behaviour: top to bottom. */
52
+ export const GRADIENT_ANGLE_DEFAULT = 180;
53
+ /** Six decimals: enough for sub-pixel placement, few enough that three languages agree. */
54
+ function round6(value) {
55
+ return Math.round(value * 1e6) / 1e6;
56
+ }
57
+ function clamp01(value) {
58
+ return value < 0 ? 0 : value > 1 ? 1 : value;
59
+ }
60
+ /** `135deg` · `135` · `0.25turn` · `1.57rad` · `150grad`. An ANGLE and nothing else: the three
61
+ * direction words that used to be accepted here were a private vocabulary for three points on a
62
+ * scale CSS already spells, and a word that is not an angle is now refused the way every other
63
+ * unparsable angle is, with null. */
64
+ export function parseGradientAngle(input) {
65
+ if (input === null || input === undefined)
66
+ return null;
67
+ const text = String(input).trim().toLowerCase();
68
+ if (text === "")
69
+ return null;
70
+ let value;
71
+ if (text.endsWith("grad"))
72
+ value = Number(text.slice(0, -4)) * 0.9;
73
+ else if (text.endsWith("turn"))
74
+ value = Number(text.slice(0, -4)) * 360;
75
+ else if (text.endsWith("deg"))
76
+ value = Number(text.slice(0, -3));
77
+ else if (text.endsWith("rad"))
78
+ value = (Number(text.slice(0, -3)) * 180) / Math.PI;
79
+ else
80
+ value = Number(text);
81
+ if (!Number.isFinite(value))
82
+ return null;
83
+ return ((value % 360) + 360) % 360;
84
+ }
85
+ /** The gradient axis as unit points, from the pinned angle convention. */
86
+ export function gradientUnitPoints(angle) {
87
+ const radians = (angle * Math.PI) / 180;
88
+ const sine = Math.sin(radians);
89
+ const cosine = Math.cos(radians);
90
+ return {
91
+ start: { x: round6(0.5 - sine / 2), y: round6(0.5 + cosine / 2) },
92
+ end: { x: round6(0.5 + sine / 2), y: round6(0.5 - cosine / 2) },
93
+ };
94
+ }
95
+ function parseUnitScalar(token) {
96
+ const text = token.trim();
97
+ if (text === "")
98
+ return null;
99
+ const value = text.endsWith("%") ? Number(text.slice(0, -1)) / 100 : Number(text);
100
+ return Number.isFinite(value) ? clamp01(value) : null;
101
+ }
102
+ /** `gradientCenter="0.25 0.75"` / `"25% 75%"`. A single value means both axes. */
103
+ export function parseUnitPoint(input, fallback) {
104
+ const parts = (input ?? "").trim().replace(/,/g, " ").split(" ").filter((part) => part !== "");
105
+ if (parts.length >= 2) {
106
+ const x = parseUnitScalar(parts[0]);
107
+ const y = parseUnitScalar(parts[1]);
108
+ if (x !== null && y !== null)
109
+ return { x: round6(x), y: round6(y) };
110
+ }
111
+ else if (parts.length === 1) {
112
+ const only = parseUnitScalar(parts[0]);
113
+ if (only !== null)
114
+ return { x: round6(only), y: round6(only) };
115
+ }
116
+ return fallback;
117
+ }
118
+ /** `gradientRadius` as a fraction of the box's larger side. Default 0.5, capped at 4. */
119
+ export function parseGradientRadius(input) {
120
+ const text = String(input ?? "").trim();
121
+ if (text === "")
122
+ return 0.5;
123
+ const value = text.endsWith("%") ? Number(text.slice(0, -1)) / 100 : Number(text);
124
+ if (!Number.isFinite(value) || value <= 0)
125
+ return 0.5;
126
+ return round6(Math.min(4, value));
127
+ }
128
+ /**
129
+ * The colour bound. A gradient is a handful of stops; a list in the thousands is a bug or an
130
+ * attack, and every renderer turns each colour into shader geometry. The desktop lane already
131
+ * bounded this on its own, which made the bound a property of one renderer instead of the
132
+ * grammar - so it lives here now, where all four read it.
133
+ *
134
+ * TRUNCATION rather than rejection: a bounded gradient still paints, and past sixty-four stops
135
+ * no display can show the difference. Refusing to paint would turn a cosmetic excess into a
136
+ * blank element.
137
+ */
138
+ export const MAX_GRADIENT_COLORS = 64;
139
+ /** `gradient="c1|c2|…"` — the shorthand every existing app already writes. */
140
+ export function parseGradientColors(input) {
141
+ if (input === null || input === undefined)
142
+ return [];
143
+ const parts = String(input).split("|").map((part) => part.trim()).filter((part) => part !== "");
144
+ return parts.length > MAX_GRADIENT_COLORS ? parts.slice(0, MAX_GRADIENT_COLORS) : parts;
145
+ }
146
+ /**
147
+ * `gradientStops` — positions matching the colour list. A COUNT MISMATCH FALLS BACK TO EVEN
148
+ * SPACING rather than guessing which colour lost its stop: a gradient that silently reorders
149
+ * itself when the author adds a colour is worse than one that ignores the attribute.
150
+ * Values are clamped to 0…1 and forced monotonically non-decreasing.
151
+ */
152
+ export function parseGradientStops(input, count) {
153
+ if (count === 0)
154
+ return [];
155
+ if (count === 1)
156
+ return [0];
157
+ const even = Array.from({ length: count }, (_, index) => round6(index / (count - 1)));
158
+ const text = (input ?? "").trim();
159
+ if (text === "")
160
+ return even;
161
+ const raw = text.replace(/\|/g, ",").split(",").map((part) => part.trim()).filter((part) => part !== "");
162
+ if (raw.length !== count)
163
+ return even;
164
+ const stops = [];
165
+ let previous = 0;
166
+ for (const token of raw) {
167
+ const value = token.endsWith("%") ? Number(token.slice(0, -1)) / 100 : Number(token);
168
+ if (!Number.isFinite(value))
169
+ return even;
170
+ const monotonic = Math.max(previous, clamp01(value));
171
+ previous = monotonic;
172
+ stops.push(round6(monotonic));
173
+ }
174
+ return stops;
175
+ }
176
+ /**
177
+ * `gradientPoints` — the mesh control grid. Rows are `;`-separated, points `,`-separated, and
178
+ * each point is `x y color`. The grid must be rectangular and at least 2x2; anything else
179
+ * returns null and the caller degrades to a linear gradient rather than painting a blank.
180
+ */
181
+ export function parseMeshPoints(input) {
182
+ const text = (input ?? "").trim();
183
+ if (text === "")
184
+ return null;
185
+ const rows = [];
186
+ for (const rowText of text.split(";")) {
187
+ if (rowText.trim() === "")
188
+ continue;
189
+ const cells = rowText.split(",").filter((cell) => cell.trim() !== "");
190
+ const row = [];
191
+ for (const cell of cells) {
192
+ const parts = cell.trim().split(" ").filter((part) => part !== "");
193
+ if (parts.length < 3)
194
+ return null;
195
+ const x = Number(parts[0]);
196
+ const y = Number(parts[1]);
197
+ if (!Number.isFinite(x) || !Number.isFinite(y))
198
+ return null;
199
+ row.push({ x: round6(clamp01(x)), y: round6(clamp01(y)), color: parts.slice(2).join(" ").trim() });
200
+ }
201
+ rows.push(row);
202
+ }
203
+ if (rows.length < 2)
204
+ return null;
205
+ const columns = rows[0].length;
206
+ if (columns < 2)
207
+ return null;
208
+ for (const row of rows)
209
+ if (row.length !== columns)
210
+ return null;
211
+ return { columns, rows: rows.length, points: rows.flat() };
212
+ }
213
+ /**
214
+ * The declared mesh degradation, used by every target that cannot draw a real mesh (Android,
215
+ * the web, and iOS below 18): one radial per control point over a base fill, painted row-major.
216
+ * The base is the control point nearest the centre, chosen by index so it is deterministic.
217
+ */
218
+ export function meshFallbackLayers(mesh) {
219
+ const spread = Math.max(1 / (mesh.columns - 1), 1 / (mesh.rows - 1));
220
+ const radius = round6(0.75 * spread);
221
+ const baseIndex = Math.floor(mesh.rows / 2) * mesh.columns + Math.floor(mesh.columns / 2);
222
+ return {
223
+ base: mesh.points[baseIndex].color,
224
+ layers: mesh.points.map((point) => ({ center: { x: point.x, y: point.y }, radius, color: point.color })),
225
+ };
226
+ }
227
+ /** Fold every gradient attribute into the one descriptor each renderer paints from. */
228
+ export function resolveGradient(attributes) {
229
+ let colors = parseGradientColors(attributes.gradient);
230
+ const typeWord = (attributes.gradientType ?? "").trim();
231
+ let type = GRADIENT_TYPES.includes(typeWord)
232
+ ? typeWord
233
+ : "linear";
234
+ let angle = parseGradientAngle(attributes.gradientAngle);
235
+ if (angle === null)
236
+ angle = parseGradientAngle(attributes.gradientDir);
237
+ if (angle === null)
238
+ angle = GRADIENT_ANGLE_DEFAULT;
239
+ let mesh = type === "mesh" ? parseMeshPoints(attributes.gradientPoints) : null;
240
+ if (type === "mesh" && mesh === null)
241
+ type = "linear";
242
+ if (type === "mesh" && mesh !== null)
243
+ colors = mesh.points.map((point) => point.color);
244
+ const stops = parseGradientStops(attributes.gradientStops, colors.length);
245
+ const axis = gradientUnitPoints(angle);
246
+ return {
247
+ type,
248
+ colors,
249
+ stops,
250
+ angle: round6(angle),
251
+ start: axis.start,
252
+ end: axis.end,
253
+ center: parseUnitPoint(attributes.gradientCenter, { x: 0.5, y: 0.5 }),
254
+ radius: parseGradientRadius(attributes.gradientRadius),
255
+ valid: colors.length >= 2,
256
+ mesh,
257
+ meshFallback: mesh === null ? null : meshFallbackLayers(mesh),
258
+ };
259
+ }
260
+ /** The circular arc starts at 225 and sweeps 270, leaving the 90-degree gap at the bottom that
261
+ * makes a gauge read as a gauge and not as a progress ring. */
262
+ export const GAUGE_VARIANTS = {
263
+ circular: { arcStart: 225, arcSweep: 270, thickness: 6, showsCurrentLabel: true, showsBoundLabels: true },
264
+ accessoryCircular: { arcStart: 225, arcSweep: 270, thickness: 4, showsCurrentLabel: true, showsBoundLabels: false },
265
+ linear: { arcStart: 0, arcSweep: 0, thickness: 6, showsCurrentLabel: true, showsBoundLabels: true },
266
+ accessoryLinear: { arcStart: 0, arcSweep: 0, thickness: 4, showsCurrentLabel: false, showsBoundLabels: false },
267
+ };
268
+ function finite(value, fallback) {
269
+ return typeof value === "number" && Number.isFinite(value) ? value : fallback;
270
+ }
271
+ /** How the raw value reads aloud when no `currentLabel` is given. Integers lose the `.0`. */
272
+ function defaultValueText(value) {
273
+ return Number.isInteger(value) ? String(Math.trunc(value)) : String(value);
274
+ }
275
+ /**
276
+ * `<gauge>` — value to arc, plus the meter semantics that are contract, not follow-up. An
277
+ * inverted or empty range resolves to fraction 0 rather than NaN, because a gauge that renders
278
+ * nothing is recoverable and one that renders invalid output is not.
279
+ */
280
+ export function resolveGauge(args) {
281
+ const word = (args.variant ?? "").trim();
282
+ const variant = (Object.prototype.hasOwnProperty.call(GAUGE_VARIANTS, word) ? word : "circular");
283
+ const metrics = GAUGE_VARIANTS[variant];
284
+ const value = finite(args.value, 0);
285
+ const min = finite(args.min, 0);
286
+ const max = finite(args.max, 1);
287
+ const fraction = max <= min ? 0 : clamp01((value - min) / (max - min));
288
+ const clamped = Math.min(Math.max(value, min), max);
289
+ const valueAngle = ((metrics.arcStart + fraction * metrics.arcSweep) % 360 + 360) % 360;
290
+ const label = (args.currentLabel ?? "").trim();
291
+ return {
292
+ ...metrics,
293
+ variant,
294
+ fraction: round6(fraction),
295
+ clampedValue: round6(clamped),
296
+ valueAngle: round6(valueAngle),
297
+ a11y: {
298
+ role: "meter",
299
+ min: round6(min),
300
+ max: round6(max),
301
+ now: round6(clamped),
302
+ percent: Math.round(fraction * 100),
303
+ valueText: label === "" ? defaultValueText(value) : label,
304
+ },
305
+ };
306
+ }
307
+ /**
308
+ * The value-following tint: which two colours of `tint="a|b|c"` the needle sits between, and
309
+ * how far. Colour RESOLUTION is per-renderer (tokens differ), so the core returns indices and
310
+ * an interpolation factor and lets each target mix in its own colour space.
311
+ */
312
+ export function gaugeTintSegment(colors, stops, fraction) {
313
+ if (colors.length === 0)
314
+ return null;
315
+ if (colors.length === 1)
316
+ return { fromIndex: 0, toIndex: 0, t: 0 };
317
+ const value = clamp01(fraction);
318
+ for (let index = 0; index < stops.length - 1; index++) {
319
+ const low = stops[index];
320
+ const high = stops[index + 1];
321
+ if (value <= high || index === stops.length - 2) {
322
+ const span = high - low;
323
+ return { fromIndex: index, toIndex: index + 1, t: round6(clamp01(span <= 0 ? 0 : (value - low) / span)) };
324
+ }
325
+ }
326
+ return { fromIndex: colors.length - 2, toIndex: colors.length - 1, t: 1 };
327
+ }
328
+ /** The pinned name table the picker announces from. Small on purpose: a screen reader saying
329
+ * "cornflower blue" is not more useful than "blue", and a big table is a big disagreement. */
330
+ export const COLOR_NAMES = [
331
+ { name: "black", hex: "#000000" }, { name: "white", hex: "#FFFFFF" },
332
+ { name: "gray", hex: "#808080" }, { name: "silver", hex: "#C0C0C0" },
333
+ { name: "red", hex: "#FF0000" }, { name: "maroon", hex: "#800000" },
334
+ { name: "orange", hex: "#FFA500" }, { name: "brown", hex: "#A52A2A" },
335
+ { name: "yellow", hex: "#FFFF00" }, { name: "olive", hex: "#808000" },
336
+ { name: "lime", hex: "#00FF00" }, { name: "green", hex: "#008000" },
337
+ { name: "teal", hex: "#008080" }, { name: "cyan", hex: "#00FFFF" },
338
+ { name: "blue", hex: "#0000FF" }, { name: "navy", hex: "#000080" },
339
+ { name: "indigo", hex: "#4B0082" }, { name: "purple", hex: "#800080" },
340
+ { name: "magenta", hex: "#FF00FF" }, { name: "pink", hex: "#FFC0CB" },
341
+ { name: "tan", hex: "#D2B48C" }, { name: "gold", hex: "#FFD700" },
342
+ { name: "beige", hex: "#F5F5DC" }, { name: "turquoise", hex: "#40E0D0" },
343
+ ];
344
+ /** Extra tones of the table's own names (common UI palette steps), so the perceptual nearest match lands on the word a person
345
+ * would say: #DB2777 is pink, #16A34A green, #0A84FF blue. Every anchor names a table entry. */
346
+ export const COLOR_NAME_ANCHORS = [
347
+ { name: "black", hex: "#111827" },
348
+ { name: "black", hex: "#18181B" },
349
+ { name: "gray", hex: "#6B7280" },
350
+ { name: "gray", hex: "#4B5563" },
351
+ { name: "gray", hex: "#64748B" },
352
+ { name: "silver", hex: "#9CA3AF" },
353
+ { name: "silver", hex: "#D1D5DB" },
354
+ { name: "red", hex: "#EF4444" },
355
+ { name: "red", hex: "#DC2626" },
356
+ { name: "maroon", hex: "#7F1D1D" },
357
+ { name: "orange", hex: "#F97316" },
358
+ { name: "orange", hex: "#EA580C" },
359
+ { name: "brown", hex: "#8B4513" },
360
+ { name: "brown", hex: "#92400E" },
361
+ { name: "yellow", hex: "#EAB308" },
362
+ { name: "yellow", hex: "#FACC15" },
363
+ { name: "olive", hex: "#65A30D" },
364
+ { name: "lime", hex: "#84CC16" },
365
+ { name: "green", hex: "#22C55E" },
366
+ { name: "green", hex: "#16A34A" },
367
+ { name: "green", hex: "#15803D" },
368
+ { name: "green", hex: "#166534" },
369
+ { name: "green", hex: "#14532D" },
370
+ { name: "green", hex: "#1B4332" },
371
+ { name: "teal", hex: "#14B8A6" },
372
+ { name: "teal", hex: "#0D9488" },
373
+ { name: "cyan", hex: "#06B6D4" },
374
+ { name: "blue", hex: "#3B82F6" },
375
+ { name: "blue", hex: "#2563EB" },
376
+ { name: "blue", hex: "#1D4ED8" },
377
+ { name: "blue", hex: "#0A84FF" },
378
+ { name: "navy", hex: "#1E3A8A" },
379
+ { name: "navy", hex: "#243247" },
380
+ { name: "indigo", hex: "#6366F1" },
381
+ { name: "indigo", hex: "#4F46E5" },
382
+ { name: "purple", hex: "#8B5CF6" },
383
+ { name: "purple", hex: "#7C3AED" },
384
+ { name: "purple", hex: "#A855F7" },
385
+ { name: "purple", hex: "#9333EA" },
386
+ { name: "magenta", hex: "#D946EF" },
387
+ { name: "magenta", hex: "#C026D3" },
388
+ { name: "pink", hex: "#EC4899" },
389
+ { name: "pink", hex: "#DB2777" },
390
+ { name: "pink", hex: "#F472B6" },
391
+ { name: "pink", hex: "#F9A8D4" },
392
+ { name: "pink", hex: "#FDA4AF" },
393
+ ];
394
+ const HEX_DIGITS = "0123456789abcdef";
395
+ /** `#RGB` · `#RGBA` · `#RRGGBB` · `#RRGGBBAA` → channels, or null. Nothing else is a colour here. */
396
+ export function parseHexColor(input) {
397
+ const text = (input ?? "").trim();
398
+ if (!text.startsWith("#"))
399
+ return null;
400
+ let body = text.slice(1).toLowerCase();
401
+ for (const character of body)
402
+ if (!HEX_DIGITS.includes(character))
403
+ return null;
404
+ if (body.length === 3 || body.length === 4) {
405
+ body = body.split("").map((character) => character + character).join("");
406
+ }
407
+ if (body.length === 6)
408
+ body += "ff";
409
+ if (body.length !== 8)
410
+ return null;
411
+ return {
412
+ r: parseInt(body.slice(0, 2), 16),
413
+ g: parseInt(body.slice(2, 4), 16),
414
+ b: parseInt(body.slice(4, 6), 16),
415
+ a: parseInt(body.slice(6, 8), 16),
416
+ };
417
+ }
418
+ /** Uppercase output, and the alpha pair only when it is both allowed and not opaque. */
419
+ export function formatHexColor(color, alphaAllowed = false) {
420
+ const pair = (value) => value.toString(16).padStart(2, "0").toUpperCase();
421
+ const base = `#${pair(color.r)}${pair(color.g)}${pair(color.b)}`;
422
+ return alphaAllowed && color.a !== 255 ? `${base}${pair(color.a)}` : base;
423
+ }
424
+ const linear = (channel) => { const c = channel / 255; return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4; };
425
+ /** sRGB channels -> OKLab (L, a, b). */
426
+ function oklabOf(color) {
427
+ const r = linear(color.r), g = linear(color.g), b = linear(color.b);
428
+ const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
429
+ const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
430
+ const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
431
+ return [0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s, 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s, 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s];
432
+ }
433
+ /** Nearest name by squared OKLab distance over the table and its anchors, ties broken by order (table first). Deterministic. */
434
+ export function nearestColorName(color) {
435
+ const [l, a, b] = oklabOf(color);
436
+ let best = COLOR_NAMES[0].name;
437
+ let bestDistance = Number.POSITIVE_INFINITY;
438
+ for (const entry of [...COLOR_NAMES, ...COLOR_NAME_ANCHORS]) {
439
+ const [tl, ta, tb] = oklabOf(parseHexColor(entry.hex));
440
+ const distance = (l - tl) ** 2 + (a - ta) ** 2 + (b - tb) ** 2;
441
+ if (distance < bestDistance) {
442
+ bestDistance = distance;
443
+ best = entry.name;
444
+ }
445
+ }
446
+ return best;
447
+ }
448
+ /** Presets shown first. Invalid entries drop, duplicates collapse, and the list caps at 24. */
449
+ export function resolveSwatches(input, alphaAllowed = false) {
450
+ if (input === null || input === undefined)
451
+ return [];
452
+ const out = [];
453
+ const seen = new Set();
454
+ for (const token of String(input).replace(/\|/g, ",").split(",")) {
455
+ const parsed = parseHexColor(token);
456
+ if (parsed === null)
457
+ continue;
458
+ const text = formatHexColor(parsed, alphaAllowed);
459
+ if (seen.has(text))
460
+ continue;
461
+ seen.add(text);
462
+ out.push(text);
463
+ if (out.length === 24)
464
+ break;
465
+ }
466
+ return out;
467
+ }
468
+ export const COLOR_PICKER_MODES = ["wheel", "sliders", "swatches"];
469
+ /** Undeclared mode: swatches when presets exist (they are the fast path), otherwise the wheel. */
470
+ export function resolveColorPickerMode(mode, _alpha, swatchCount) {
471
+ const word = (mode ?? "").trim();
472
+ if (COLOR_PICKER_MODES.includes(word))
473
+ return word;
474
+ return swatchCount > 0 ? "swatches" : "wheel";
475
+ }
476
+ /** `<input type="color">` supports neither alpha nor presets, so the web ejects to its own panel. */
477
+ export function webNeedsCustomColorPanel(alpha, swatchCount) {
478
+ return alpha === true || swatchCount > 0;
479
+ }
480
+ export function resolveMask(mode, invert) {
481
+ const word = (mode ?? "").trim();
482
+ const resolved = word === "luminance" ? "luminance" : "alpha";
483
+ const inverted = invert === true || String(invert ?? "").trim().toLowerCase() === "true";
484
+ return {
485
+ mode: resolved,
486
+ invert: inverted,
487
+ blend: inverted ? "dstOut" : "dstIn",
488
+ cssMaskMode: resolved,
489
+ webLayers: inverted
490
+ ? [{ image: "opaque", composite: "add" }, { image: "mask", composite: "subtract" }]
491
+ : [{ image: "mask", composite: "add" }],
492
+ maskChildHidden: true,
493
+ contentSemanticsPreserved: true,
494
+ };
495
+ }
496
+ // ─────────────────────────────────────────────────────────────────────────────────────────────
497
+ // MENU ROW LIMITS — the one check every lane of <menubar>, <menu-sidebar> and the MenuBar
498
+ // package runs on the rows an app hands it (OpenSource/Conformance/controls/menu-rows.json).
499
+ //
500
+ // WHY A DEFAULT EXISTS AT ALL (a safety line, constitution "DSX has no opinion"): rows are often
501
+ // remote data, drawn as controls and copied into the echoed `select` payload on the interface
502
+ // thread, so an unbounded feed could stall or exhaust the app. The numbers are DEFAULTS, never a
503
+ // fixed cap: the app raises any of them on the element (`max-items="64"`; the limit names below are the API spelling, the attribute is their kebab-case) or, for the package's
504
+ // own presenter, in the MenuBar package's settings.
505
+ //
506
+ // OVER A LIMIT THE ROWS ARE REFUSED, NEVER CUT: a cut id or route is a silent wrong answer, and
507
+ // lanes that cut in different orders (a Swift dictionary has no order) disagree. The answer is
508
+ // the first limit in MENU_ROW_LIMIT_ORDER the rows exceed. `maxValues` is decided by the total
509
+ // count, whatever order a lane walks in, and only when it holds is the walk complete, so the
510
+ // text answer is order-free too.
511
+ //
512
+ // What is counted: `maxItems` is the length of the list (every entry); `maxValues` is every entry
513
+ // of every object and list inside the rows, at any depth, together, which also bounds how deep a
514
+ // row can nest, so there is no separate depth or per-row count; `maxTextCharacters` is the
515
+ // length of every string and every key, in Unicode code points.
516
+ // ─────────────────────────────────────────────────────────────────────────────────────────────
517
+ export const MENU_ROW_LIMITS = Object.freeze({
518
+ maxItems: 32,
519
+ maxValues: 1_024,
520
+ maxTextCharacters: 128,
521
+ });
522
+ /** The order a refusal names its limit in; the same list on every lane. */
523
+ export const MENU_ROW_LIMIT_ORDER = Object.freeze([
524
+ "maxItems", "maxValues", "maxTextCharacters",
525
+ ]);
526
+ /** One limit as an app wrote it: a whole number of zero or more (a fraction is floored), as a
527
+ * number or as decimal text. Anything else reads as the default. */
528
+ export function menuRowLimit(value, fallback) {
529
+ if (typeof value === "number")
530
+ return Number.isFinite(value) && value >= 0 ? Math.floor(value) : fallback;
531
+ if (typeof value === "string") {
532
+ const text = value.trim();
533
+ return /^\d+(\.\d+)?$/.test(text) ? Math.floor(Number(text)) : fallback;
534
+ }
535
+ return fallback;
536
+ }
537
+ /** The three limits from a reader of the element's attributes (or the package's settings). */
538
+ export function menuRowLimits(read) {
539
+ const out = {};
540
+ for (const name of MENU_ROW_LIMIT_ORDER)
541
+ out[name] = menuRowLimit(read(name), MENU_ROW_LIMITS[name]);
542
+ return Object.freeze(out);
543
+ }
544
+ function ownData(value, key) {
545
+ try {
546
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
547
+ return descriptor !== undefined && "value" in descriptor ? descriptor.value : undefined;
548
+ }
549
+ catch {
550
+ return undefined;
551
+ }
552
+ }
553
+ function longerThan(text, max) {
554
+ if (text.length <= max)
555
+ return false; // UTF-16 units never undercount code points
556
+ let count = 0;
557
+ for (const _ of text) {
558
+ count += 1;
559
+ if (count > max)
560
+ return true;
561
+ }
562
+ return false;
563
+ }
564
+ /** null when the rows are within every limit (or are not a list: nothing to show), else the first
565
+ * limit they exceed. Reads own data properties only and never invokes an accessor. */
566
+ export function menuRowsRefusal(input, limits = MENU_ROW_LIMITS) {
567
+ let length = 0;
568
+ try {
569
+ if (!Array.isArray(input))
570
+ return null;
571
+ length = input.length;
572
+ }
573
+ catch {
574
+ return null;
575
+ }
576
+ if (length > limits.maxItems)
577
+ return { limit: "maxItems", max: limits.maxItems };
578
+ let longText = false;
579
+ let values = 0;
580
+ // An object met again inside the same row (a cycle, or one object referenced twice) is counted
581
+ // as the entry that holds it and not walked again: the echoed copy has it as null there, and no
582
+ // JSON row, the only kind a native lane receives, can hold one.
583
+ let seen = new WeakSet();
584
+ const visit = (value) => {
585
+ if (typeof value === "string") {
586
+ if (longerThan(value, limits.maxTextCharacters))
587
+ longText = true;
588
+ return true;
589
+ }
590
+ let array = false;
591
+ try {
592
+ array = Array.isArray(value);
593
+ }
594
+ catch {
595
+ return true;
596
+ }
597
+ if (array) {
598
+ if (seen.has(value))
599
+ return true;
600
+ seen.add(value);
601
+ let count = 0;
602
+ try {
603
+ count = value.length;
604
+ }
605
+ catch {
606
+ return true;
607
+ }
608
+ for (let index = 0; index < count; index += 1) {
609
+ values += 1;
610
+ if (values > limits.maxValues)
611
+ return false;
612
+ if (!visit(ownData(value, String(index))))
613
+ return false;
614
+ }
615
+ return true;
616
+ }
617
+ let dictionary = false;
618
+ try {
619
+ dictionary = isDict(value);
620
+ }
621
+ catch {
622
+ return true;
623
+ }
624
+ if (!dictionary)
625
+ return true;
626
+ if (seen.has(value))
627
+ return true;
628
+ seen.add(value);
629
+ try {
630
+ for (const key in value) {
631
+ if (!Object.prototype.hasOwnProperty.call(value, key))
632
+ continue;
633
+ values += 1;
634
+ if (values > limits.maxValues)
635
+ return false;
636
+ if (longerThan(key, limits.maxTextCharacters))
637
+ longText = true;
638
+ if (!visit(ownData(value, key)))
639
+ return false;
640
+ }
641
+ }
642
+ catch { /* a hostile object counts what it gave before it threw */ }
643
+ return true;
644
+ };
645
+ for (let index = 0; index < length; index += 1) {
646
+ seen = new WeakSet();
647
+ if (!visit(ownData(input, String(index))))
648
+ return { limit: "maxValues", max: limits.maxValues };
649
+ }
650
+ return longText ? { limit: "maxTextCharacters", max: limits.maxTextCharacters } : null;
651
+ }
652
+ //# sourceMappingURL=controls-core.js.map