fundus 0.0.2 → 0.0.4

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 (303) hide show
  1. package/README.md +73 -0
  2. package/build/client/_app/immutable/assets/0.DLhIsYA_.css.br +0 -0
  3. package/build/client/_app/immutable/assets/0.DLhIsYA_.css.gz +0 -0
  4. package/build/client/_app/immutable/assets/2.ohi-TClG.css +1 -0
  5. package/build/client/_app/immutable/assets/2.ohi-TClG.css.br +0 -0
  6. package/build/client/_app/immutable/assets/2.ohi-TClG.css.gz +0 -0
  7. package/build/client/_app/immutable/assets/3.JwgtcTEd.css +1 -0
  8. package/build/client/_app/immutable/assets/3.JwgtcTEd.css.br +0 -0
  9. package/build/client/_app/immutable/assets/3.JwgtcTEd.css.gz +0 -0
  10. package/build/client/_app/immutable/assets/4.p004hmEN.css +1 -0
  11. package/build/client/_app/immutable/assets/4.p004hmEN.css.br +0 -0
  12. package/build/client/_app/immutable/assets/4.p004hmEN.css.gz +0 -0
  13. package/build/client/_app/immutable/assets/ConfirmDialog.BdKlitwi.css +1 -0
  14. package/build/client/_app/immutable/assets/ConfirmDialog.BdKlitwi.css.br +0 -0
  15. package/build/client/_app/immutable/assets/ConfirmDialog.BdKlitwi.css.gz +0 -0
  16. package/build/client/_app/immutable/assets/LibraryContextMenu.CMefGNE2.css +1 -0
  17. package/build/client/_app/immutable/assets/LibraryContextMenu.CMefGNE2.css.br +0 -0
  18. package/build/client/_app/immutable/assets/LibraryContextMenu.CMefGNE2.css.gz +0 -0
  19. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.br +0 -0
  20. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.gz +0 -0
  21. package/build/client/_app/immutable/chunks/CNRz3sSw.js.br +0 -0
  22. package/build/client/_app/immutable/chunks/CNRz3sSw.js.gz +0 -0
  23. package/build/client/_app/immutable/chunks/CO4RBJfa.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/CO4RBJfa.js.gz +0 -0
  25. package/build/client/_app/immutable/chunks/DOpBpjxS.js +108 -0
  26. package/build/client/_app/immutable/chunks/DOpBpjxS.js.br +0 -0
  27. package/build/client/_app/immutable/chunks/DOpBpjxS.js.gz +0 -0
  28. package/{dist/editor/_app/immutable/chunks/BfPE5wdt.js → build/client/_app/immutable/chunks/DVEQFclp.js} +1 -1
  29. package/build/client/_app/immutable/chunks/DVEQFclp.js.br +1 -0
  30. package/build/client/_app/immutable/chunks/DVEQFclp.js.gz +0 -0
  31. package/{dist/editor/_app/immutable/chunks/DjvOiDmq.js → build/client/_app/immutable/chunks/DiFoWL2c.js} +1 -1
  32. package/build/client/_app/immutable/chunks/DiFoWL2c.js.br +0 -0
  33. package/build/client/_app/immutable/chunks/DiFoWL2c.js.gz +0 -0
  34. package/build/client/_app/immutable/chunks/DkADHpZF.js +1 -0
  35. package/build/client/_app/immutable/chunks/DkADHpZF.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/DkADHpZF.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/xihTtKlq.js.br +1 -0
  38. package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
  39. package/{dist/editor/_app/immutable/entry/app.BkqbfI8n.js → build/client/_app/immutable/entry/app.CKgtYXQb.js} +2 -2
  40. package/build/client/_app/immutable/entry/app.CKgtYXQb.js.br +0 -0
  41. package/build/client/_app/immutable/entry/app.CKgtYXQb.js.gz +0 -0
  42. package/build/client/_app/immutable/entry/start.CYZu5qE1.js +1 -0
  43. package/build/client/_app/immutable/entry/start.CYZu5qE1.js.br +0 -0
  44. package/build/client/_app/immutable/entry/start.CYZu5qE1.js.gz +0 -0
  45. package/{dist/editor/_app/immutable/nodes/0.xdMI5GEU.js → build/client/_app/immutable/nodes/0.I_1SApYQ.js} +1 -1
  46. package/build/client/_app/immutable/nodes/0.I_1SApYQ.js.br +0 -0
  47. package/build/client/_app/immutable/nodes/0.I_1SApYQ.js.gz +0 -0
  48. package/{dist/editor/_app/immutable/nodes/1.D9p2tfoJ.js → build/client/_app/immutable/nodes/1.v6eUTnWq.js} +1 -1
  49. package/build/client/_app/immutable/nodes/1.v6eUTnWq.js.br +2 -0
  50. package/build/client/_app/immutable/nodes/1.v6eUTnWq.js.gz +0 -0
  51. package/build/client/_app/immutable/nodes/2.DoA7Dfl-.js +3 -0
  52. package/build/client/_app/immutable/nodes/2.DoA7Dfl-.js.br +0 -0
  53. package/build/client/_app/immutable/nodes/2.DoA7Dfl-.js.gz +0 -0
  54. package/build/client/_app/immutable/nodes/3.C-DO70Bs.js +1 -0
  55. package/build/client/_app/immutable/nodes/3.C-DO70Bs.js.br +0 -0
  56. package/build/client/_app/immutable/nodes/3.C-DO70Bs.js.gz +0 -0
  57. package/build/client/_app/immutable/nodes/4.CALOuSyz.js +2 -0
  58. package/build/client/_app/immutable/nodes/4.CALOuSyz.js.br +0 -0
  59. package/build/client/_app/immutable/nodes/4.CALOuSyz.js.gz +0 -0
  60. package/build/client/_app/version.json +1 -0
  61. package/build/client/_app/version.json.br +0 -0
  62. package/build/client/_app/version.json.gz +0 -0
  63. package/build/env.js +100 -0
  64. package/build/env.js.map +1 -0
  65. package/build/handler.js +22 -0
  66. package/build/handler.js.map +1 -0
  67. package/build/index.js +145 -0
  68. package/build/index.js.map +1 -0
  69. package/build/server/chunks/chunks/context.js-BUZqFfWG.js +429 -0
  70. package/build/server/chunks/chunks/context.js-BUZqFfWG.js.map +1 -0
  71. package/build/server/chunks/chunks/core.js-xfrkaQpS.js +458 -0
  72. package/build/server/chunks/chunks/core.js-xfrkaQpS.js.map +1 -0
  73. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
  74. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js.map +1 -0
  75. package/build/server/chunks/chunks/exports.js-C0rwMMtk.js +152 -0
  76. package/build/server/chunks/chunks/exports.js-C0rwMMtk.js.map +1 -0
  77. package/build/server/chunks/chunks/folder-path.js-ytx9ucgg.js +64 -0
  78. package/build/server/chunks/chunks/folder-path.js-ytx9ucgg.js.map +1 -0
  79. package/build/server/chunks/chunks/http.js-DvopzwKh.js +100 -0
  80. package/build/server/chunks/chunks/http.js-DvopzwKh.js.map +1 -0
  81. package/build/server/chunks/chunks/internal.js-DGo2jPcg.js +5753 -0
  82. package/build/server/chunks/chunks/internal.js-DGo2jPcg.js.map +1 -0
  83. package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js +22 -0
  84. package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js.map +1 -0
  85. package/{dist/operations-DYM-5KVl.js → build/server/chunks/chunks/library-store.js-ZLudCJlT.js} +463 -492
  86. package/build/server/chunks/chunks/library-store.js-ZLudCJlT.js.map +1 -0
  87. package/build/server/chunks/chunks/manifest-appearance.js-DTk355LQ.js +146 -0
  88. package/build/server/chunks/chunks/manifest-appearance.js-DTk355LQ.js.map +1 -0
  89. package/build/server/chunks/chunks/routing.js-y-tryuip.js +213 -0
  90. package/build/server/chunks/chunks/routing.js-y-tryuip.js.map +1 -0
  91. package/build/server/chunks/chunks/shared.js-B1gC9MiJ.js +255 -0
  92. package/build/server/chunks/chunks/shared.js-B1gC9MiJ.js.map +1 -0
  93. package/build/server/chunks/chunks/utils.js-DnEJ3UjO.js +1048 -0
  94. package/build/server/chunks/chunks/utils.js-DnEJ3UjO.js.map +1 -0
  95. package/build/server/chunks/entries/endpoints/api/_...path_/_server.ts.js-Cq5gXVQT.js +27 -0
  96. package/build/server/chunks/entries/endpoints/api/_...path_/_server.ts.js-Cq5gXVQT.js.map +1 -0
  97. package/build/server/chunks/entries/endpoints/api/assets/_id_/_server.ts.js-RXbedi8q.js +24 -0
  98. package/build/server/chunks/entries/endpoints/api/assets/_id_/_server.ts.js-RXbedi8q.js.map +1 -0
  99. package/build/server/chunks/entries/endpoints/api/assets/_server.ts.js-D7Qae9vU.js +45 -0
  100. package/build/server/chunks/entries/endpoints/api/assets/_server.ts.js-D7Qae9vU.js.map +1 -0
  101. package/build/server/chunks/entries/endpoints/api/assets/delete/_server.ts.js-DtO20kgB.js +31 -0
  102. package/build/server/chunks/entries/endpoints/api/assets/delete/_server.ts.js-DtO20kgB.js.map +1 -0
  103. package/build/server/chunks/entries/endpoints/api/assets/move/_server.ts.js-BUebPbd5.js +31 -0
  104. package/build/server/chunks/entries/endpoints/api/assets/move/_server.ts.js-BUebPbd5.js.map +1 -0
  105. package/build/server/chunks/entries/endpoints/api/folders/_path_/_server.ts.js-BjT2qPMT.js +38 -0
  106. package/build/server/chunks/entries/endpoints/api/folders/_path_/_server.ts.js-BjT2qPMT.js.map +1 -0
  107. package/build/server/chunks/entries/endpoints/api/folders/_server.ts.js-DYRLsoT7.js +31 -0
  108. package/build/server/chunks/entries/endpoints/api/folders/_server.ts.js-DYRLsoT7.js.map +1 -0
  109. package/build/server/chunks/entries/endpoints/api/manifests/_name_/_server.ts.js-BbN2fGNN.js +24 -0
  110. package/build/server/chunks/entries/endpoints/api/manifests/_name_/_server.ts.js-BbN2fGNN.js.map +1 -0
  111. package/build/server/chunks/entries/endpoints/api/manifests/_server.ts.js-b_MKZ41b.js +31 -0
  112. package/build/server/chunks/entries/endpoints/api/manifests/_server.ts.js-b_MKZ41b.js.map +1 -0
  113. package/build/server/chunks/entries/endpoints/api/state/_server.ts.js-evEfMpvn.js +24 -0
  114. package/build/server/chunks/entries/endpoints/api/state/_server.ts.js-evEfMpvn.js.map +1 -0
  115. package/build/server/chunks/entries/endpoints/files/_...path_/_server.ts.js-C04XE_1w.js +27 -0
  116. package/build/server/chunks/entries/endpoints/files/_...path_/_server.ts.js-C04XE_1w.js.map +1 -0
  117. package/build/server/chunks/entries/endpoints/files/proxy/_...path_/_server.ts.js-DB8TdoEv.js +24 -0
  118. package/build/server/chunks/entries/endpoints/files/proxy/_...path_/_server.ts.js-DB8TdoEv.js.map +1 -0
  119. package/build/server/chunks/entries/endpoints/files/raw/_...path_/_server.ts.js-BrpaijZO.js +24 -0
  120. package/build/server/chunks/entries/endpoints/files/raw/_...path_/_server.ts.js-BrpaijZO.js.map +1 -0
  121. package/build/server/chunks/entries/hooks.server.js-BJJwZW_I.js +23 -0
  122. package/build/server/chunks/entries/hooks.server.js-BJJwZW_I.js.map +1 -0
  123. package/build/server/chunks/handler-DnbS2t1B.js +1475 -0
  124. package/build/server/chunks/handler-DnbS2t1B.js.map +1 -0
  125. package/build/server/chunks/index.js-g77q3Boj.js +3789 -0
  126. package/build/server/chunks/index.js-g77q3Boj.js.map +1 -0
  127. package/build/server/chunks/manifest.js-qmEXbstS.js +149 -0
  128. package/build/server/chunks/manifest.js-qmEXbstS.js.map +1 -0
  129. package/build/server/chunks/nodes/0.js-Bk6IZ-vD.js +11 -0
  130. package/build/server/chunks/nodes/0.js-Bk6IZ-vD.js.map +1 -0
  131. package/build/server/chunks/nodes/1.js-H-qwo4GJ.js +7 -0
  132. package/build/server/chunks/nodes/1.js-H-qwo4GJ.js.map +1 -0
  133. package/build/server/chunks/nodes/2.js-DRpXVLwp.js +7 -0
  134. package/build/server/chunks/nodes/2.js-DRpXVLwp.js.map +1 -0
  135. package/build/server/chunks/nodes/3.js-CDEzNFeU.js +7 -0
  136. package/build/server/chunks/nodes/3.js-CDEzNFeU.js.map +1 -0
  137. package/build/server/chunks/nodes/4.js-BKL7LSSm.js +7 -0
  138. package/build/server/chunks/nodes/4.js-BKL7LSSm.js.map +1 -0
  139. package/build/shims.js +33 -0
  140. package/build/shims.js.map +1 -0
  141. package/dist/cli.d.ts +2 -1
  142. package/dist/cli.js +116 -1336
  143. package/dist/config.d.ts +3 -2
  144. package/dist/config.js +2 -2
  145. package/dist/core/api-types.d.ts +141 -0
  146. package/dist/core/api-types.js +1 -0
  147. package/dist/core/asset-id.d.ts +28 -0
  148. package/dist/core/asset-id.js +59 -0
  149. package/dist/core/asset-reference.d.ts +23 -0
  150. package/dist/core/asset-reference.js +15 -0
  151. package/dist/core/canonicalize.d.ts +9 -0
  152. package/dist/core/canonicalize.js +36 -0
  153. package/dist/core/chroma-key.d.ts +30 -0
  154. package/dist/core/chroma-key.js +55 -0
  155. package/dist/core/config.d.ts +35 -0
  156. package/dist/core/config.js +4 -0
  157. package/dist/core/folder-path.d.ts +19 -0
  158. package/dist/core/folder-path.js +86 -0
  159. package/dist/core/index.d.ts +33 -499
  160. package/dist/core/index.js +17 -962
  161. package/dist/core/ingest.d.ts +24 -0
  162. package/dist/core/ingest.js +42 -0
  163. package/dist/core/library.d.ts +54 -0
  164. package/dist/core/library.js +138 -0
  165. package/dist/core/manifest-appearance.d.ts +35 -0
  166. package/dist/core/manifest-appearance.js +123 -0
  167. package/dist/core/manifest-entry.d.ts +104 -0
  168. package/dist/core/manifest-entry.js +1 -0
  169. package/dist/core/manifest-membership.d.ts +56 -0
  170. package/dist/core/manifest-membership.js +54 -0
  171. package/dist/core/plugins/audio.d.ts +26 -0
  172. package/dist/core/plugins/audio.js +44 -0
  173. package/dist/core/plugins/chroma-key-video.d.ts +29 -0
  174. package/dist/core/plugins/chroma-key-video.js +69 -0
  175. package/dist/core/plugins/contract.d.ts +35 -0
  176. package/dist/core/plugins/contract.js +1 -0
  177. package/dist/core/plugins/image.d.ts +30 -0
  178. package/dist/core/plugins/image.js +45 -0
  179. package/dist/core/plugins/registry.d.ts +16 -0
  180. package/dist/core/plugins/registry.js +52 -0
  181. package/dist/core/plugins/slice.d.ts +22 -0
  182. package/dist/core/plugins/slice.js +60 -0
  183. package/dist/core/plugins/video.d.ts +45 -0
  184. package/dist/core/plugins/video.js +77 -0
  185. package/dist/core/reference-graph.d.ts +41 -0
  186. package/dist/core/reference-graph.js +138 -0
  187. package/dist/core/slice-data.d.ts +61 -0
  188. package/dist/core/slice-data.js +49 -0
  189. package/dist/runtime/chroma-key-gl.d.ts +40 -22
  190. package/dist/runtime/chroma-key-gl.js +189 -183
  191. package/dist/runtime/components/ChromaKeyVideo.svelte +3 -3
  192. package/dist/runtime/components/ChromaKeyVideo.svelte.d.ts +21 -0
  193. package/dist/runtime/components/Image.svelte +1 -1
  194. package/dist/runtime/components/Image.svelte.d.ts +9 -0
  195. package/dist/runtime/components/Slice.svelte +1 -1
  196. package/dist/runtime/components/Slice.svelte.d.ts +19 -0
  197. package/dist/runtime/components/SliceCanvas.svelte +3 -3
  198. package/dist/runtime/components/SliceCanvas.svelte.d.ts +10 -0
  199. package/dist/runtime/components/SliceDom.svelte +3 -3
  200. package/dist/runtime/components/SliceDom.svelte.d.ts +10 -0
  201. package/dist/runtime/components/Video.svelte +2 -2
  202. package/dist/runtime/components/Video.svelte.d.ts +18 -0
  203. package/dist/runtime/geometry.d.ts +55 -35
  204. package/dist/runtime/geometry.js +186 -191
  205. package/dist/runtime/index.d.ts +9 -9
  206. package/dist/runtime/index.js +9 -9
  207. package/dist/runtime/kind-handlers.d.ts +33 -30
  208. package/dist/runtime/kind-handlers.js +85 -67
  209. package/dist/runtime/manifest.d.ts +53 -47
  210. package/dist/runtime/manifest.js +133 -113
  211. package/dist/runtime/observe-border-box-size.d.ts +1 -4
  212. package/dist/runtime/observe-border-box-size.js +9 -10
  213. package/dist/runtime/preload-registry.d.ts +22 -8
  214. package/dist/runtime/preload-registry.js +65 -62
  215. package/dist/server/build.d.ts +8 -0
  216. package/dist/server/build.js +25 -0
  217. package/dist/server/check.d.ts +24 -0
  218. package/dist/server/check.js +199 -0
  219. package/dist/server/cli-commands.d.ts +25 -0
  220. package/dist/server/cli-commands.js +1178 -0
  221. package/dist/server/cli-init.d.ts +3 -0
  222. package/dist/server/cli-init.js +53 -0
  223. package/dist/server/cli-io.d.ts +46 -0
  224. package/dist/server/cli-io.js +105 -0
  225. package/dist/server/codegen.d.ts +58 -0
  226. package/dist/server/codegen.js +185 -0
  227. package/dist/server/config-loader.d.ts +35 -0
  228. package/dist/server/config-loader.js +79 -0
  229. package/dist/server/context.d.ts +8 -0
  230. package/dist/server/context.js +19 -0
  231. package/dist/server/folder-filesystem.d.ts +7 -0
  232. package/dist/server/folder-filesystem.js +39 -0
  233. package/dist/server/http.d.ts +12 -0
  234. package/dist/server/http.js +100 -0
  235. package/dist/server/index.d.ts +17 -0
  236. package/dist/server/index.js +9 -0
  237. package/dist/server/job-hash.d.ts +10 -0
  238. package/dist/server/job-hash.js +23 -0
  239. package/dist/server/library-store.d.ts +82 -0
  240. package/dist/server/library-store.js +763 -0
  241. package/dist/server/operations.d.ts +87 -0
  242. package/dist/server/operations.js +427 -0
  243. package/dist/server/plugins/audio.d.ts +8 -0
  244. package/dist/server/plugins/audio.js +41 -0
  245. package/dist/server/plugins/chroma-key-video.d.ts +9 -0
  246. package/dist/server/plugins/chroma-key-video.js +40 -0
  247. package/dist/server/plugins/config.d.ts +13 -0
  248. package/dist/server/plugins/config.js +32 -0
  249. package/dist/server/plugins/contract.d.ts +114 -0
  250. package/dist/server/plugins/contract.js +16 -0
  251. package/dist/server/plugins/image.d.ts +9 -0
  252. package/dist/server/plugins/image.js +43 -0
  253. package/dist/server/plugins/slice.d.ts +15 -0
  254. package/dist/server/plugins/slice.js +76 -0
  255. package/dist/server/plugins/video.d.ts +7 -0
  256. package/dist/server/plugins/video.js +54 -0
  257. package/dist/server/plugins.d.ts +23 -0
  258. package/dist/server/plugins.js +35 -0
  259. package/dist/server/processing/audio-processing.d.ts +17 -0
  260. package/dist/server/processing/audio-processing.js +46 -0
  261. package/dist/server/processing/ffmpeg.d.ts +9 -0
  262. package/dist/server/processing/ffmpeg.js +50 -0
  263. package/dist/server/processing/image-processing.d.ts +16 -0
  264. package/dist/server/processing/image-processing.js +26 -0
  265. package/dist/server/processing/media-probe.d.ts +15 -0
  266. package/dist/server/processing/media-probe.js +27 -0
  267. package/dist/server/processing/processor.d.ts +50 -0
  268. package/dist/server/processing/processor.js +158 -0
  269. package/dist/server/processing/video-processing.d.ts +35 -0
  270. package/dist/server/processing/video-processing.js +87 -0
  271. package/dist/server/server.d.ts +13 -0
  272. package/dist/server/server.js +57 -0
  273. package/dist/server/start.d.ts +13 -0
  274. package/dist/server/start.js +80 -0
  275. package/package.json +31 -16
  276. package/dist/build-CZYFLLvl.js +0 -191
  277. package/dist/core/image-Dqmz8FXS.js +0 -54
  278. package/dist/core/reference-graph-CjuHbLDw.d.ts +0 -280
  279. package/dist/core/testing.d.ts +0 -27
  280. package/dist/core/testing.js +0 -80
  281. package/dist/editor/200.html +0 -37
  282. package/dist/editor/_app/immutable/assets/2.DIbbW7U1.css +0 -1
  283. package/dist/editor/_app/immutable/assets/3.C-9vFQ9A.css +0 -1
  284. package/dist/editor/_app/immutable/assets/4.BS8ElpOV.css +0 -1
  285. package/dist/editor/_app/immutable/assets/ConfirmDialog.CHEISE-L.css +0 -1
  286. package/dist/editor/_app/immutable/assets/LibraryContextMenu.CDjCmdV-.css +0 -1
  287. package/dist/editor/_app/immutable/chunks/Cx6qtxJg.js +0 -1
  288. package/dist/editor/_app/immutable/chunks/DjdrdRzT.js +0 -1
  289. package/dist/editor/_app/immutable/chunks/n7mvYc42.js +0 -5
  290. package/dist/editor/_app/immutable/entry/start.C8HHOLly.js +0 -1
  291. package/dist/editor/_app/immutable/nodes/2.BrA0Hyzu.js +0 -3
  292. package/dist/editor/_app/immutable/nodes/3.WO7tZH_d.js +0 -104
  293. package/dist/editor/_app/immutable/nodes/4.DQtx17aW.js +0 -2
  294. package/dist/editor/_app/version.json +0 -1
  295. package/dist/index.d.ts +0 -370
  296. package/dist/index.js +0 -4
  297. package/dist/start-Bhnqt9Dc.js +0 -279
  298. package/dist/start-D2IXOrni.js +0 -2
  299. /package/{dist/editor → build/client}/_app/immutable/assets/0.DLhIsYA_.css +0 -0
  300. /package/{dist/editor → build/client}/_app/immutable/chunks/Bjy-W4x2.js +0 -0
  301. /package/{dist/editor → build/client}/_app/immutable/chunks/CNRz3sSw.js +0 -0
  302. /package/{dist/editor → build/client}/_app/immutable/chunks/CO4RBJfa.js +0 -0
  303. /package/{dist/editor → build/client}/_app/immutable/chunks/xihTtKlq.js +0 -0
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Ask each asset's owning plugin for the references in its parameters. Assets
3
+ * whose type is unknown or whose parameters do not validate contribute no
4
+ * references — those problems are reported by the regular validation pass.
5
+ */
6
+ export function collectAllReferences(library, plugins) {
7
+ const referencesByAsset = {};
8
+ for (const [assetId, record] of Object.entries(library.assets)) {
9
+ referencesByAsset[assetId] = [];
10
+ const plugin = plugins[record.type];
11
+ if (!plugin?.collectReferences)
12
+ continue;
13
+ try {
14
+ referencesByAsset[assetId] = plugin.collectReferences(plugin.validateParameters(record.parameters));
15
+ }
16
+ catch {
17
+ // Invalid parameters — reported as a validation issue elsewhere.
18
+ }
19
+ }
20
+ return referencesByAsset;
21
+ }
22
+ /**
23
+ * Reference *errors* (they block build/codegen): a reference to an unknown
24
+ * asset, a target whose type is not among the field's expected types, and
25
+ * cycles (composition is acyclic by nature).
26
+ */
27
+ export function referenceErrors(library, referencesByAsset) {
28
+ const issues = [];
29
+ for (const [assetId, references] of Object.entries(referencesByAsset)) {
30
+ for (const reference of references) {
31
+ if (!Object.hasOwn(library.assets, reference.assetId)) {
32
+ issues.push({
33
+ assetId,
34
+ message: `Reference "${reference.field}" points at unknown asset "${reference.assetId}".`
35
+ });
36
+ continue;
37
+ }
38
+ const targetType = library.assets[reference.assetId].type;
39
+ if (reference.expectedTypes.length > 0 && !reference.expectedTypes.includes(targetType)) {
40
+ issues.push({
41
+ assetId,
42
+ message: `Reference "${reference.field}" points at "${reference.assetId}" of type ` +
43
+ `"${targetType}" — expected ${reference.expectedTypes.map((type) => `"${type}"`).join(' or ')}.`
44
+ });
45
+ }
46
+ }
47
+ }
48
+ issues.push(...cycleErrors(referencesByAsset));
49
+ return issues;
50
+ }
51
+ /** DFS cycle detection with an explicit stack path; each cycle reported once. */
52
+ function cycleErrors(referencesByAsset) {
53
+ const issues = [];
54
+ const finished = new Set();
55
+ const reportedCycles = new Set();
56
+ const stack = [];
57
+ const onStack = new Set();
58
+ function visit(assetId) {
59
+ if (finished.has(assetId))
60
+ return;
61
+ if (onStack.has(assetId)) {
62
+ const cyclePath = [...stack.slice(stack.indexOf(assetId)), assetId];
63
+ // Canonical key so `a → b → a` and `b → a → b` report once.
64
+ const cycleKey = [...new Set(cyclePath)].sort().join('\u0000');
65
+ if (!reportedCycles.has(cycleKey)) {
66
+ reportedCycles.add(cycleKey);
67
+ issues.push({
68
+ assetId: cyclePath[0],
69
+ message: `Reference cycle: ${cyclePath.map((id) => `"${id}"`).join(' → ')} — references express composition and must stay acyclic.`
70
+ });
71
+ }
72
+ return;
73
+ }
74
+ stack.push(assetId);
75
+ onStack.add(assetId);
76
+ for (const reference of referencesByAsset[assetId] ?? []) {
77
+ if (Object.hasOwn(referencesByAsset, reference.assetId))
78
+ visit(reference.assetId);
79
+ }
80
+ stack.pop();
81
+ onStack.delete(assetId);
82
+ finished.add(assetId);
83
+ }
84
+ for (const assetId of Object.keys(referencesByAsset))
85
+ visit(assetId);
86
+ return issues;
87
+ }
88
+ /**
89
+ * The transitive reference closure of a set of assets, including the starting
90
+ * set — the assets that must be delivered so the starting set renders as
91
+ * authored. Tolerates cycles and ignores dangling targets (both are reported
92
+ * as errors by `referenceErrors`).
93
+ */
94
+ export function referenceClosure(assetIds, referencesByAsset) {
95
+ const closure = new Set();
96
+ const pending = [...assetIds];
97
+ while (pending.length > 0) {
98
+ const assetId = pending.pop();
99
+ if (closure.has(assetId) || !Object.hasOwn(referencesByAsset, assetId))
100
+ continue;
101
+ closure.add(assetId);
102
+ for (const reference of referencesByAsset[assetId]) {
103
+ pending.push(reference.assetId);
104
+ }
105
+ }
106
+ return closure;
107
+ }
108
+ /**
109
+ * A dependencies-first order over `assetIds` and everything they transitively
110
+ * reference — the build order that lets each entry inline its references from
111
+ * already-built entries. Throws on a cycle (with the cycle path).
112
+ */
113
+ export function topologicalReferenceOrder(assetIds, referencesByAsset) {
114
+ const order = [];
115
+ const finished = new Set();
116
+ const stack = [];
117
+ const onStack = new Set();
118
+ function visit(assetId) {
119
+ if (finished.has(assetId) || !Object.hasOwn(referencesByAsset, assetId))
120
+ return;
121
+ if (onStack.has(assetId)) {
122
+ const cyclePath = [...stack.slice(stack.indexOf(assetId)), assetId];
123
+ throw new Error(`Reference cycle: ${cyclePath.map((id) => `"${id}"`).join(' → ')} — cannot order entries.`);
124
+ }
125
+ stack.push(assetId);
126
+ onStack.add(assetId);
127
+ for (const reference of referencesByAsset[assetId]) {
128
+ visit(reference.assetId);
129
+ }
130
+ stack.pop();
131
+ onStack.delete(assetId);
132
+ finished.add(assetId);
133
+ order.push(assetId);
134
+ }
135
+ for (const assetId of assetIds)
136
+ visit(assetId);
137
+ return order;
138
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * The slice data model keeps the source image separate from slicing metadata
3
+ * (Fundus tracks raw files and
4
+ * proxy dimensions separately), so there is no `SliceSource` here.
5
+ *
6
+ * The geometry is stored as **insets** (border thickness in source pixels), the
7
+ * canonical, render-ready form — equivalent to CSS `border-image-slice`.
8
+ * `slicedAxesFor` is the single source of truth for which axes each mode uses.
9
+ */
10
+ export declare const SLICE_MODES: readonly ["nine", "three-horizontal", "three-vertical", "one"];
11
+ export type SliceMode = (typeof SLICE_MODES)[number];
12
+ /** Border thickness in source pixels. Always integers (pixel-precise). */
13
+ export interface SliceInsets {
14
+ top: number;
15
+ right: number;
16
+ bottom: number;
17
+ left: number;
18
+ }
19
+ /**
20
+ * Full slicing description for an image, independent of which image it applies
21
+ * to. Stored in the library as (part of) the slice plugin's parameters and
22
+ * emitted into generated manifest entries.
23
+ */
24
+ export interface Slicing {
25
+ mode: SliceMode;
26
+ insets: SliceInsets;
27
+ /**
28
+ * Source pixels per CSS pixel — the scale the asset was exported at
29
+ * (`1` = @1x, `2` = @2x, `3` = @3x). All fixed slice dimensions (9-slice
30
+ * corners) are divided by this when rendering, so a high-resolution asset
31
+ * displays at its intended logical size.
32
+ */
33
+ pixelRatio: number;
34
+ /**
35
+ * Per-side thickness (in source pixels) of the image's baked-in overdraw — a
36
+ * drop shadow / glow painted around the actual element. The renderers treat
37
+ * the image **minus** the overdraw as the element: that core fills the layout
38
+ * box, and the overdraw band is painted outside it (like a CSS `box-shadow`).
39
+ * Optional: absent means no overdraw.
40
+ */
41
+ overdraw?: SliceInsets;
42
+ }
43
+ /** All-zero insets — the "no overdraw" value. */
44
+ export declare function createZeroInsets(): SliceInsets;
45
+ /**
46
+ * Default insets for a freshly ingested image: each border a quarter of the
47
+ * corresponding dimension (at least 1px where the image is large enough),
48
+ * always clamped so a center of at least one source pixel remains on each
49
+ * axis. For an axis too small for insets + a 1px center (width/height ≤ 2)
50
+ * the insets on that axis are 0 — structurally valid slicing for any size ≥ 1.
51
+ */
52
+ export declare function defaultInsetsForSize(width: number, height: number): SliceInsets;
53
+ /** Which source-image axes are sliced for a mode. */
54
+ export declare function slicedAxesFor(mode: SliceMode): {
55
+ horizontal: boolean;
56
+ vertical: boolean;
57
+ };
58
+ /** Maximum inset on one side while preserving the opposite inset. */
59
+ export declare function maxInset(insets: SliceInsets, side: keyof SliceInsets, width: number, height: number): number;
60
+ /** Maximum overdraw on one side while preserving at least one core source pixel. */
61
+ export declare function maxOverdraw(overdraw: SliceInsets, side: keyof SliceInsets, width: number, height: number): number;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The slice data model keeps the source image separate from slicing metadata
3
+ * (Fundus tracks raw files and
4
+ * proxy dimensions separately), so there is no `SliceSource` here.
5
+ *
6
+ * The geometry is stored as **insets** (border thickness in source pixels), the
7
+ * canonical, render-ready form — equivalent to CSS `border-image-slice`.
8
+ * `slicedAxesFor` is the single source of truth for which axes each mode uses.
9
+ */
10
+ export const SLICE_MODES = ['nine', 'three-horizontal', 'three-vertical', 'one'];
11
+ /** All-zero insets — the "no overdraw" value. */
12
+ export function createZeroInsets() {
13
+ return { top: 0, right: 0, bottom: 0, left: 0 };
14
+ }
15
+ /**
16
+ * Default insets for a freshly ingested image: each border a quarter of the
17
+ * corresponding dimension (at least 1px where the image is large enough),
18
+ * always clamped so a center of at least one source pixel remains on each
19
+ * axis. For an axis too small for insets + a 1px center (width/height ≤ 2)
20
+ * the insets on that axis are 0 — structurally valid slicing for any size ≥ 1.
21
+ */
22
+ export function defaultInsetsForSize(width, height) {
23
+ // max(1, quarter) is the desired border; min(…, floor((size − 1) / 2)) caps
24
+ // it so `2 × inset ≤ size − 1`, i.e. the center keeps ≥ 1 source pixel.
25
+ const horizontal = Math.min(Math.max(1, Math.floor(width / 4)), Math.floor((width - 1) / 2));
26
+ const vertical = Math.min(Math.max(1, Math.floor(height / 4)), Math.floor((height - 1) / 2));
27
+ return { top: vertical, right: horizontal, bottom: vertical, left: horizontal };
28
+ }
29
+ /** Which source-image axes are sliced for a mode. */
30
+ export function slicedAxesFor(mode) {
31
+ return {
32
+ horizontal: mode === 'nine' || mode === 'three-horizontal',
33
+ vertical: mode === 'nine' || mode === 'three-vertical'
34
+ };
35
+ }
36
+ /** Maximum inset on one side while preserving the opposite inset. */
37
+ export function maxInset(insets, side, width, height) {
38
+ if (side === 'left')
39
+ return width - insets.right;
40
+ if (side === 'right')
41
+ return width - insets.left;
42
+ if (side === 'top')
43
+ return height - insets.bottom;
44
+ return height - insets.top;
45
+ }
46
+ /** Maximum overdraw on one side while preserving at least one core source pixel. */
47
+ export function maxOverdraw(overdraw, side, width, height) {
48
+ return maxInset(overdraw, side, width, height) - 1;
49
+ }
@@ -1,23 +1,41 @@
1
- import { ChromaKeyParameters } from "#fundus/core";
2
-
3
- //#region src/chroma-key-gl.d.ts
4
- declare class ChromaKeyGl {
5
- #private;
6
- /** Returns null when WebGL2 is unavailable or the shader fails to compile. */
7
- static create(canvas: HTMLCanvasElement): ChromaKeyGl | null;
8
- private constructor();
9
- /**
10
- * Set (or clear) the grayscale shape mask multiplied onto the output alpha. The
11
- * mask is stretched over the full video frame, so author it at the video's aspect
12
- * ratio. Pass null to remove the mask.
13
- */
14
- setMask(image: TexImageSource | null): void;
15
- /**
16
- * Upload the video's current frame and render it keyed. Sizes the drawing buffer to
17
- * the video's intrinsic size on first draw (and after a size change).
18
- */
19
- draw(video: HTMLVideoElement, parameters: ChromaKeyParameters): void;
20
- dispose(): void;
1
+ /**
2
+ * WebGL2 chroma-key video renderer based on the public UnityChromakey shader
3
+ * (https://github.com/otdavies/UnityChromakey, `Shaders/ChromaKey.shader`) so a
4
+ * greenscreen video plays with a transparent background.
5
+ *
6
+ * The keying algorithm follows the upstream shader: the key color and each
7
+ * pixel are converted to YCbCr chroma (Cb/Cr), the squared chroma distance is mapped
8
+ * through a cutoff/feather window (`colorclose`), the resulting mask is blurred with a
9
+ * 3×3 neighbourhood + smoothstep-sharpened, the keyed color is despilled (green pulled
10
+ * toward the red/blue average, lost luminance re-added), and the output is
11
+ * `vec4(color * mask, mask)` the upstream output formula (tint fixed at white; tinting
12
+ * is host styling, not asset data) — emitted premultiplied (rgb × alpha) for the canvas
13
+ * compositor (see the fragColor note).
14
+ *
15
+ * Fundus adds an optional mask pass (`setMask`): a grayscale image
16
+ * sampled at the same UVs whose luminance multiplies the final alpha white keeps a
17
+ * pixel, black drops it, gray fades it (no alpha clip). Absent a mask, a 1×1 white
18
+ * fallback texture makes the pass a no-op.
19
+ *
20
+ * Owns its own GL context on the given canvas. `create` returns null when WebGL2 is
21
+ * unavailable. Browser-only; the caller drives it per frame with the playing <video>.
22
+ */
23
+ import type { ChromaKeyParameters } from '../core/index.js';
24
+ export declare class ChromaKeyGl {
25
+ #private;
26
+ /** Returns null when WebGL2 is unavailable or the shader fails to compile. */
27
+ static create(canvas: HTMLCanvasElement): ChromaKeyGl | null;
28
+ private constructor();
29
+ /**
30
+ * Set (or clear) the grayscale shape mask multiplied onto the output alpha. The
31
+ * mask is stretched over the full video frame, so author it at the video's aspect
32
+ * ratio. Pass null to remove the mask.
33
+ */
34
+ setMask(image: TexImageSource | null): void;
35
+ /**
36
+ * Upload the video's current frame and render it keyed. Sizes the drawing buffer to
37
+ * the video's intrinsic size on first draw (and after a size change).
38
+ */
39
+ draw(video: HTMLVideoElement, parameters: ChromaKeyParameters): void;
40
+ dispose(): void;
21
41
  }
22
- //#endregion
23
- export { ChromaKeyGl };