supervision 0.0.9000 → 0.1.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 (229) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +23 -2
  3. package/dist/constants/media-renderer.d.ts +9 -0
  4. package/dist/constants/media-renderer.d.ts.map +1 -0
  5. package/dist/detections/browser-cold-detection-frame-store.d.ts +5 -0
  6. package/dist/detections/browser-cold-detection-frame-store.d.ts.map +1 -0
  7. package/dist/detections/chunked-detection-frame-source.d.ts +3 -0
  8. package/dist/detections/chunked-detection-frame-source.d.ts.map +1 -0
  9. package/dist/detections/offset-detection-frame-source.d.ts +10 -0
  10. package/dist/detections/offset-detection-frame-source.d.ts.map +1 -0
  11. package/dist/editing/mask-brush-editor.d.ts +47 -0
  12. package/dist/editing/mask-brush-editor.d.ts.map +1 -0
  13. package/dist/editing.d.ts +8 -0
  14. package/dist/editing.d.ts.map +1 -0
  15. package/dist/editing.js +265 -0
  16. package/dist/editing.js.map +1 -0
  17. package/dist/index.d.ts +58 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +9419 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/mask-preparation.worker.js +823 -0
  22. package/dist/mask-preparation.worker.js.map +1 -0
  23. package/dist/media/decoded-video-sample-reader.d.ts +8 -0
  24. package/dist/media/decoded-video-sample-reader.d.ts.map +1 -0
  25. package/dist/media/media-metadata.d.ts +21 -0
  26. package/dist/media/media-metadata.d.ts.map +1 -0
  27. package/dist/media/media-normalization.d.ts +6 -0
  28. package/dist/media/media-normalization.d.ts.map +1 -0
  29. package/dist/media/media-preparation.d.ts +9 -0
  30. package/dist/media/media-preparation.d.ts.map +1 -0
  31. package/dist/media/media-probe.d.ts +3 -0
  32. package/dist/media/media-probe.d.ts.map +1 -0
  33. package/dist/media/media-source-state.d.ts +5 -0
  34. package/dist/media/media-source-state.d.ts.map +1 -0
  35. package/dist/media/media-source.d.ts +38 -0
  36. package/dist/media/media-source.d.ts.map +1 -0
  37. package/dist/media/media-stream-media-source.d.ts +27 -0
  38. package/dist/media/media-stream-media-source.d.ts.map +1 -0
  39. package/dist/media/mediabunny-media-source.d.ts +13 -0
  40. package/dist/media/mediabunny-media-source.d.ts.map +1 -0
  41. package/dist/media/static-image-media-source.d.ts +13 -0
  42. package/dist/media/static-image-media-source.d.ts.map +1 -0
  43. package/dist/playback/media-playback-controller.d.ts +24 -0
  44. package/dist/playback/media-playback-controller.d.ts.map +1 -0
  45. package/dist/render-preparation/default-render-preparation-worker.d.ts +8 -0
  46. package/dist/render-preparation/default-render-preparation-worker.d.ts.map +1 -0
  47. package/dist/render-preparation/embedded-mask-preparation-worker.d.ts +2 -0
  48. package/dist/render-preparation/embedded-mask-preparation-worker.d.ts.map +1 -0
  49. package/dist/render-preparation/mask-frame-artifact.d.ts +28 -0
  50. package/dist/render-preparation/mask-frame-artifact.d.ts.map +1 -0
  51. package/dist/render-preparation/mask-frame-compositor.d.ts +14 -0
  52. package/dist/render-preparation/mask-frame-compositor.d.ts.map +1 -0
  53. package/dist/render-preparation/mask-frame-preparer.d.ts +19 -0
  54. package/dist/render-preparation/mask-frame-preparer.d.ts.map +1 -0
  55. package/dist/render-preparation/mask-preparation-worker-count.d.ts +15 -0
  56. package/dist/render-preparation/mask-preparation-worker-count.d.ts.map +1 -0
  57. package/dist/render-preparation/mask-preparation-worker-protocol.d.ts +64 -0
  58. package/dist/render-preparation/mask-preparation-worker-protocol.d.ts.map +1 -0
  59. package/dist/render-preparation/mask-preparation.worker.d.ts +2 -0
  60. package/dist/render-preparation/mask-preparation.worker.d.ts.map +1 -0
  61. package/dist/render-preparation/prepared-render-window.d.ts +46 -0
  62. package/dist/render-preparation/prepared-render-window.d.ts.map +1 -0
  63. package/dist/render-preparation/prepared-window-timeline.d.ts +16 -0
  64. package/dist/render-preparation/prepared-window-timeline.d.ts.map +1 -0
  65. package/dist/renderers/media-renderer-core.d.ts +9 -0
  66. package/dist/renderers/media-renderer-core.d.ts.map +1 -0
  67. package/dist/renderers/media-renderer-scene.d.ts +77 -0
  68. package/dist/renderers/media-renderer-scene.d.ts.map +1 -0
  69. package/dist/renderers/media-renderer-state.d.ts +44 -0
  70. package/dist/renderers/media-renderer-state.d.ts.map +1 -0
  71. package/dist/renderers/media-renderer.d.ts +8 -0
  72. package/dist/renderers/media-renderer.d.ts.map +1 -0
  73. package/dist/renderers/pixi-annotation-overlay-layer.d.ts +25 -0
  74. package/dist/renderers/pixi-annotation-overlay-layer.d.ts.map +1 -0
  75. package/dist/renderers/pixi-box-layer.d.ts +28 -0
  76. package/dist/renderers/pixi-box-layer.d.ts.map +1 -0
  77. package/dist/renderers/pixi-focus-layer.d.ts +92 -0
  78. package/dist/renderers/pixi-focus-layer.d.ts.map +1 -0
  79. package/dist/renderers/pixi-id-mask-shader.d.ts +62 -0
  80. package/dist/renderers/pixi-id-mask-shader.d.ts.map +1 -0
  81. package/dist/renderers/pixi-interaction-layer.d.ts +63 -0
  82. package/dist/renderers/pixi-interaction-layer.d.ts.map +1 -0
  83. package/dist/renderers/pixi-interaction-presentation-layer.d.ts +84 -0
  84. package/dist/renderers/pixi-interaction-presentation-layer.d.ts.map +1 -0
  85. package/dist/renderers/pixi-label-layer.d.ts +32 -0
  86. package/dist/renderers/pixi-label-layer.d.ts.map +1 -0
  87. package/dist/renderers/pixi-mask-brush-preview.d.ts +26 -0
  88. package/dist/renderers/pixi-mask-brush-preview.d.ts.map +1 -0
  89. package/dist/renderers/pixi-mask-layer.d.ts +98 -0
  90. package/dist/renderers/pixi-mask-layer.d.ts.map +1 -0
  91. package/dist/renderers/pixi-media-scene.d.ts +6 -0
  92. package/dist/renderers/pixi-media-scene.d.ts.map +1 -0
  93. package/dist/renderers/pixi-path.d.ts +15 -0
  94. package/dist/renderers/pixi-path.d.ts.map +1 -0
  95. package/dist/renderers/pixi-polygon-layer.d.ts +32 -0
  96. package/dist/renderers/pixi-polygon-layer.d.ts.map +1 -0
  97. package/dist/renderers/pixi-scene-fit.d.ts +14 -0
  98. package/dist/renderers/pixi-scene-fit.d.ts.map +1 -0
  99. package/dist/renderers/pixi-scene-layer-slot.d.ts +23 -0
  100. package/dist/renderers/pixi-scene-layer-slot.d.ts.map +1 -0
  101. package/dist/renderers/pixi-vector-layer.d.ts +24 -0
  102. package/dist/renderers/pixi-vector-layer.d.ts.map +1 -0
  103. package/dist/sessions/media-session-defaults.d.ts +21 -0
  104. package/dist/sessions/media-session-defaults.d.ts.map +1 -0
  105. package/dist/sessions/media-session-detections.d.ts +16 -0
  106. package/dist/sessions/media-session-detections.d.ts.map +1 -0
  107. package/dist/sessions/media-session-media.d.ts +19 -0
  108. package/dist/sessions/media-session-media.d.ts.map +1 -0
  109. package/dist/sessions/media-session-state.d.ts +12 -0
  110. package/dist/sessions/media-session-state.d.ts.map +1 -0
  111. package/dist/sessions/media-session.d.ts +10 -0
  112. package/dist/sessions/media-session.d.ts.map +1 -0
  113. package/dist/types/media-normalization.d.ts +119 -0
  114. package/dist/types/media-normalization.d.ts.map +1 -0
  115. package/dist/types/media-preparation.d.ts +30 -0
  116. package/dist/types/media-preparation.d.ts.map +1 -0
  117. package/dist/types/media-renderer.d.ts +115 -0
  118. package/dist/types/media-renderer.d.ts.map +1 -0
  119. package/dist/types/media-session.d.ts +242 -0
  120. package/dist/types/media-session.d.ts.map +1 -0
  121. package/dist/types/render-preparation.d.ts +164 -0
  122. package/dist/types/render-preparation.d.ts.map +1 -0
  123. package/dist/workers/worker-rpc-client.d.ts +15 -0
  124. package/dist/workers/worker-rpc-client.d.ts.map +1 -0
  125. package/node_modules/supervision-js-core/dist/detections/array-detection-frame-source.d.ts +4 -0
  126. package/node_modules/supervision-js-core/dist/detections/array-detection-frame-source.d.ts.map +1 -0
  127. package/node_modules/supervision-js-core/dist/detections/buffered-detection-timeline.d.ts +14 -0
  128. package/node_modules/supervision-js-core/dist/detections/buffered-detection-timeline.d.ts.map +1 -0
  129. package/node_modules/supervision-js-core/dist/detections/cold-detection-frame-source.d.ts +6 -0
  130. package/node_modules/supervision-js-core/dist/detections/cold-detection-frame-source.d.ts.map +1 -0
  131. package/node_modules/supervision-js-core/dist/detections/composite-detection-frame-source.d.ts +3 -0
  132. package/node_modules/supervision-js-core/dist/detections/composite-detection-frame-source.d.ts.map +1 -0
  133. package/node_modules/supervision-js-core/dist/detections/editable-annotation-frame-session.d.ts +35 -0
  134. package/node_modules/supervision-js-core/dist/detections/editable-annotation-frame-session.d.ts.map +1 -0
  135. package/node_modules/supervision-js-core/dist/detections/memory-cold-detection-frame-store.d.ts +3 -0
  136. package/node_modules/supervision-js-core/dist/detections/memory-cold-detection-frame-store.d.ts.map +1 -0
  137. package/node_modules/supervision-js-core/dist/detections/writable-detection-frame-source.d.ts +8 -0
  138. package/node_modules/supervision-js-core/dist/detections/writable-detection-frame-source.d.ts.map +1 -0
  139. package/node_modules/supervision-js-core/dist/index.d.ts +65 -0
  140. package/node_modules/supervision-js-core/dist/index.d.ts.map +1 -0
  141. package/node_modules/supervision-js-core/dist/index.js +4277 -0
  142. package/node_modules/supervision-js-core/dist/index.js.map +1 -0
  143. package/node_modules/supervision-js-core/dist/interactions/annotation-editing-engine.d.ts +3 -0
  144. package/node_modules/supervision-js-core/dist/interactions/annotation-editing-engine.d.ts.map +1 -0
  145. package/node_modules/supervision-js-core/dist/interactions/annotation-handles.d.ts +13 -0
  146. package/node_modules/supervision-js-core/dist/interactions/annotation-handles.d.ts.map +1 -0
  147. package/node_modules/supervision-js-core/dist/interactions/detection-picker.d.ts +7 -0
  148. package/node_modules/supervision-js-core/dist/interactions/detection-picker.d.ts.map +1 -0
  149. package/node_modules/supervision-js-core/dist/interactions/viewport-controller.d.ts +6 -0
  150. package/node_modules/supervision-js-core/dist/interactions/viewport-controller.d.ts.map +1 -0
  151. package/node_modules/supervision-js-core/dist/styles/box-style.d.ts +44 -0
  152. package/node_modules/supervision-js-core/dist/styles/box-style.d.ts.map +1 -0
  153. package/node_modules/supervision-js-core/dist/styles/default-annotation-presentation.d.ts +20 -0
  154. package/node_modules/supervision-js-core/dist/styles/default-annotation-presentation.d.ts.map +1 -0
  155. package/node_modules/supervision-js-core/dist/styles/focus-style.d.ts +37 -0
  156. package/node_modules/supervision-js-core/dist/styles/focus-style.d.ts.map +1 -0
  157. package/node_modules/supervision-js-core/dist/styles/interaction-style.d.ts +64 -0
  158. package/node_modules/supervision-js-core/dist/styles/interaction-style.d.ts.map +1 -0
  159. package/node_modules/supervision-js-core/dist/styles/keypoint-style.d.ts +19 -0
  160. package/node_modules/supervision-js-core/dist/styles/keypoint-style.d.ts.map +1 -0
  161. package/node_modules/supervision-js-core/dist/styles/label-style.d.ts +61 -0
  162. package/node_modules/supervision-js-core/dist/styles/label-style.d.ts.map +1 -0
  163. package/node_modules/supervision-js-core/dist/styles/mask-style.d.ts +55 -0
  164. package/node_modules/supervision-js-core/dist/styles/mask-style.d.ts.map +1 -0
  165. package/node_modules/supervision-js-core/dist/styles/polygon-style.d.ts +15 -0
  166. package/node_modules/supervision-js-core/dist/styles/polygon-style.d.ts.map +1 -0
  167. package/node_modules/supervision-js-core/dist/styles/polyline-style.d.ts +14 -0
  168. package/node_modules/supervision-js-core/dist/styles/polyline-style.d.ts.map +1 -0
  169. package/node_modules/supervision-js-core/dist/styles/source-presentation.d.ts +22 -0
  170. package/node_modules/supervision-js-core/dist/styles/source-presentation.d.ts.map +1 -0
  171. package/node_modules/supervision-js-core/dist/styles/style-value.d.ts +4 -0
  172. package/node_modules/supervision-js-core/dist/styles/style-value.d.ts.map +1 -0
  173. package/node_modules/supervision-js-core/dist/types/box-style.d.ts +58 -0
  174. package/node_modules/supervision-js-core/dist/types/box-style.d.ts.map +1 -0
  175. package/node_modules/supervision-js-core/dist/types/detection-timeline.d.ts +325 -0
  176. package/node_modules/supervision-js-core/dist/types/detection-timeline.d.ts.map +1 -0
  177. package/node_modules/supervision-js-core/dist/types/detections.d.ts +183 -0
  178. package/node_modules/supervision-js-core/dist/types/detections.d.ts.map +1 -0
  179. package/node_modules/supervision-js-core/dist/types/editing.d.ts +140 -0
  180. package/node_modules/supervision-js-core/dist/types/editing.d.ts.map +1 -0
  181. package/node_modules/supervision-js-core/dist/types/focus-style.d.ts +36 -0
  182. package/node_modules/supervision-js-core/dist/types/focus-style.d.ts.map +1 -0
  183. package/node_modules/supervision-js-core/dist/types/interaction-style.d.ts +44 -0
  184. package/node_modules/supervision-js-core/dist/types/interaction-style.d.ts.map +1 -0
  185. package/node_modules/supervision-js-core/dist/types/interaction.d.ts +70 -0
  186. package/node_modules/supervision-js-core/dist/types/interaction.d.ts.map +1 -0
  187. package/node_modules/supervision-js-core/dist/types/keypoint-style.d.ts +30 -0
  188. package/node_modules/supervision-js-core/dist/types/keypoint-style.d.ts.map +1 -0
  189. package/node_modules/supervision-js-core/dist/types/label-style.d.ts +65 -0
  190. package/node_modules/supervision-js-core/dist/types/label-style.d.ts.map +1 -0
  191. package/node_modules/supervision-js-core/dist/types/mask-style.d.ts +59 -0
  192. package/node_modules/supervision-js-core/dist/types/mask-style.d.ts.map +1 -0
  193. package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts +204 -0
  194. package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts.map +1 -0
  195. package/node_modules/supervision-js-core/dist/types/media.d.ts +42 -0
  196. package/node_modules/supervision-js-core/dist/types/media.d.ts.map +1 -0
  197. package/node_modules/supervision-js-core/dist/types/polygon-style.d.ts +13 -0
  198. package/node_modules/supervision-js-core/dist/types/polygon-style.d.ts.map +1 -0
  199. package/node_modules/supervision-js-core/dist/types/polyline-style.d.ts +12 -0
  200. package/node_modules/supervision-js-core/dist/types/polyline-style.d.ts.map +1 -0
  201. package/node_modules/supervision-js-core/dist/types/session-lifecycle.d.ts +106 -0
  202. package/node_modules/supervision-js-core/dist/types/session-lifecycle.d.ts.map +1 -0
  203. package/node_modules/supervision-js-core/dist/types/style.d.ts +28 -0
  204. package/node_modules/supervision-js-core/dist/types/style.d.ts.map +1 -0
  205. package/node_modules/supervision-js-core/dist/types/viewport.d.ts +19 -0
  206. package/node_modules/supervision-js-core/dist/types/viewport.d.ts.map +1 -0
  207. package/node_modules/supervision-js-core/dist/utils/annotation-visibility.d.ts +5 -0
  208. package/node_modules/supervision-js-core/dist/utils/annotation-visibility.d.ts.map +1 -0
  209. package/node_modules/supervision-js-core/dist/utils/color-palette.d.ts +12 -0
  210. package/node_modules/supervision-js-core/dist/utils/color-palette.d.ts.map +1 -0
  211. package/node_modules/supervision-js-core/dist/utils/color.d.ts +4 -0
  212. package/node_modules/supervision-js-core/dist/utils/color.d.ts.map +1 -0
  213. package/node_modules/supervision-js-core/dist/utils/detection-conversions.d.ts +24 -0
  214. package/node_modules/supervision-js-core/dist/utils/detection-conversions.d.ts.map +1 -0
  215. package/node_modules/supervision-js-core/dist/utils/detection-frames.d.ts +16 -0
  216. package/node_modules/supervision-js-core/dist/utils/detection-frames.d.ts.map +1 -0
  217. package/node_modules/supervision-js-core/dist/utils/detection-masks.d.ts +31 -0
  218. package/node_modules/supervision-js-core/dist/utils/detection-masks.d.ts.map +1 -0
  219. package/node_modules/supervision-js-core/dist/utils/geometry.d.ts +11 -0
  220. package/node_modules/supervision-js-core/dist/utils/geometry.d.ts.map +1 -0
  221. package/node_modules/supervision-js-core/dist/utils/id-mask-frame.d.ts +18 -0
  222. package/node_modules/supervision-js-core/dist/utils/id-mask-frame.d.ts.map +1 -0
  223. package/node_modules/supervision-js-core/dist/utils/mask-style.d.ts +4 -0
  224. package/node_modules/supervision-js-core/dist/utils/mask-style.d.ts.map +1 -0
  225. package/node_modules/supervision-js-core/dist/utils/object.d.ts +2 -0
  226. package/node_modules/supervision-js-core/dist/utils/object.d.ts.map +1 -0
  227. package/node_modules/supervision-js-core/package.json +51 -0
  228. package/package.json +92 -16
  229. package/index.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-annotation-overlay-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-annotation-overlay-layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,uBAAuB,EAE5B,KAAK,sBAAsB,EAE3B,KAAK,oBAAoB,EAGzB,KAAK,cAAc,EACnB,KAAK,KAAK,EACV,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AAOxD,MAAM,WAAW,0BAA0B;IACzC,cAAc,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IACjE,IAAI,CAAC,OAAO,EAAE;QACZ,KAAK,EAAE,cAAc,GAAG,SAAS,CAAC;QAClC,oBAAoB,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;QACnD,OAAO,EAAE,KAAK,GAAG,IAAI,CAAC;QACtB,OAAO,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAC;QACxE,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,oBAAoB,CAAC;QAClC,cAAc,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;QAC3C,GAAG,EAAE,MAAM,CAAC;KACb,GAAG,IAAI,CAAC;CACV;AAED,wBAAgB,gCAAgC,CAC9C,aAAa,CAAC,EAAE,uBAAuB,EACvC,YAAY,CAAC,EAAE,sBAAsB,GAAG,IAAI,GAC3C,0BAA0B,CA2B5B"}
@@ -0,0 +1,28 @@
1
+ import { type BoxStyle } from "supervision-js-core";
2
+ import type { BufferedDetectionTimeline } from "supervision-js-core";
3
+ import type { AnnotationStyleContext, Detection } from "supervision-js-core";
4
+ import type { Graphics as PixiGraphics } from "pixi.js";
5
+ import type { Container as PixiContainer } from "pixi.js";
6
+ export interface PixiBoxLayerState {
7
+ readonly activeDetectionFrameTime: number | null;
8
+ readonly activeDetectionFrameIndex: number | null;
9
+ readonly activeDetectionCount: number;
10
+ readonly activeDetectionIndexes: readonly number[];
11
+ }
12
+ export interface PixiBoxLayer {
13
+ createContainer(): PixiContainer | undefined;
14
+ attachGraphics(graphics: PixiGraphics): void;
15
+ drawFrame(mediaTime: number, viewportScale?: number): PixiBoxLayerState;
16
+ setBoxStyle(boxStyle: BoxStyle | null | undefined): void;
17
+ invalidate(): void;
18
+ invalidateDetection(id: string | number): void;
19
+ translateDetection(id: string | number, x: number, y: number): boolean;
20
+ }
21
+ export declare function createPixiBoxLayer(options: {
22
+ readonly detectionTimeline: BufferedDetectionTimeline;
23
+ readonly boxStyle: BoxStyle | null | undefined;
24
+ readonly Container?: new () => PixiContainer;
25
+ readonly Graphics?: new () => PixiGraphics;
26
+ readonly resolveContextState?: (detection: Detection) => Partial<AnnotationStyleContext>;
27
+ }): PixiBoxLayer;
28
+ //# sourceMappingURL=pixi-box-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-box-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-box-layer.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAG1D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;CACpD;AAED,MAAM,WAAW,YAAY;IAC3B,eAAe,IAAI,aAAa,GAAG,SAAS,CAAC;IAC7C,cAAc,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7C,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC;IACxE,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IACzD,UAAU,IAAI,IAAI,CAAC;IACnB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/C,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACxE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,SAAS,CAAC,EAAE,UAAU,aAAa,CAAC;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,YAAY,CAAC;IAC3C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAC7B,SAAS,EAAE,SAAS,KACjB,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC,GAAG,YAAY,CAyIf"}
@@ -0,0 +1,92 @@
1
+ import type { PreparedPngIdMaskFrame } from "#render-preparation/mask-frame-artifact";
2
+ import type { FocusStyle } from "supervision-js-core";
3
+ import type { DetectionPickResult } from "supervision-js-core";
4
+ import type { Container as PixiContainer, ImageSource as PixiImageSource, Mesh as PixiMesh, MeshGeometry as PixiMeshGeometry, Shader as PixiShader, Texture as PixiTexture, UniformGroup as PixiUniformGroup } from "pixi.js";
5
+ type PixiFocusMesh = PixiMesh<PixiMeshGeometry, PixiShader>;
6
+ type GraphicsConstructor = new () => PixiFocusGraphics;
7
+ type ContainerConstructor = new () => PixiContainer;
8
+ type ImageSourceConstructor = new (options: {
9
+ autoGenerateMipmaps?: boolean;
10
+ dynamic: boolean;
11
+ height: number;
12
+ resource: HTMLCanvasElement;
13
+ scaleMode?: "linear" | "nearest";
14
+ width: number;
15
+ }) => PixiImageSource;
16
+ type MeshConstructor = new (options: {
17
+ geometry: PixiMeshGeometry;
18
+ shader: PixiShader;
19
+ }) => PixiFocusMesh;
20
+ type MeshGeometryConstructor = new (options: {
21
+ indices: Uint32Array;
22
+ positions: Float32Array;
23
+ shrinkBuffersToFit: boolean;
24
+ topology: "triangle-list";
25
+ uvs: Float32Array;
26
+ }) => PixiMeshGeometry;
27
+ type ShaderFactory = {
28
+ from(options: {
29
+ gl: {
30
+ fragment: string;
31
+ vertex: string;
32
+ };
33
+ resources: Record<string, unknown>;
34
+ }): PixiShader;
35
+ };
36
+ type UniformGroupConstructor = new (uniforms: Record<string, {
37
+ size?: number;
38
+ type: "f32";
39
+ value: Float32Array | number;
40
+ } | {
41
+ size?: number;
42
+ type: "vec4<f32>";
43
+ value: Float32Array;
44
+ }>) => PixiUniformGroup;
45
+ type PixiFocusGraphics = {
46
+ visible: boolean;
47
+ clear(): PixiFocusGraphics;
48
+ cut(): unknown;
49
+ fill(options: {
50
+ readonly alpha: number;
51
+ readonly color: number;
52
+ }): unknown;
53
+ setMask?: PixiContainer["setMask"];
54
+ rect(x: number, y: number, width: number, height: number): PixiFocusGraphics;
55
+ roundRect(x: number, y: number, width: number, height: number, radius: number): PixiFocusGraphics;
56
+ poly?(points: number[], close?: boolean): PixiFocusGraphics;
57
+ };
58
+ export interface PixiFocusMaskArtifact {
59
+ readonly frame: PreparedPngIdMaskFrame;
60
+ readonly texture: PixiTexture;
61
+ }
62
+ export interface PixiFocusLayerFrameContext {
63
+ readonly frame: FocusDrawFrame | undefined;
64
+ readonly hoveredPick: DetectionPickResult | null;
65
+ readonly idMaskArtifact?: PixiFocusMaskArtifact | null;
66
+ readonly mediaTime: number;
67
+ readonly selectedPick: DetectionPickResult | null;
68
+ readonly viewportScale?: number;
69
+ }
70
+ type FocusDrawFrame = Parameters<FocusStyle["resolve"]>[0]["frame"];
71
+ export interface PixiFocusLayer {
72
+ createDisplay(dimensions: {
73
+ readonly width: number;
74
+ readonly height: number;
75
+ }): PixiContainer | PixiFocusGraphics;
76
+ drawFrame(context: PixiFocusLayerFrameContext): void;
77
+ tick(timestamp: number): void;
78
+ setFocusStyle(focusStyle: FocusStyle | null | undefined): void;
79
+ destroy(): void;
80
+ }
81
+ export declare function createPixiFocusLayer(options: {
82
+ readonly Container?: ContainerConstructor;
83
+ readonly Graphics: GraphicsConstructor;
84
+ readonly ImageSource?: ImageSourceConstructor;
85
+ readonly Mesh?: MeshConstructor;
86
+ readonly MeshGeometry?: MeshGeometryConstructor;
87
+ readonly Shader?: ShaderFactory;
88
+ readonly UniformGroup?: UniformGroupConstructor;
89
+ readonly focusStyle?: FocusStyle | null;
90
+ }): PixiFocusLayer;
91
+ export {};
92
+ //# sourceMappingURL=pixi-focus-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-focus-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-focus-layer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAGtF,OAAO,KAAK,EAAwB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EACV,SAAS,IAAI,aAAa,EAC1B,WAAW,IAAI,eAAe,EAC9B,IAAI,IAAI,QA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1,62 @@
1
+ import type { PreparedPngIdMaskFrame } from "#render-preparation/mask-frame-artifact";
2
+ import type { ImageSource as PixiImageSource, Mesh as PixiMesh, MeshGeometry as PixiMeshGeometry, Shader as PixiShader, Texture as PixiTexture, UniformGroup as PixiUniformGroup } from "pixi.js";
3
+ type PixiIdMaskMesh = PixiMesh<PixiMeshGeometry, PixiShader>;
4
+ type MeshConstructor = new (options: {
5
+ geometry: PixiMeshGeometry;
6
+ shader: PixiShader;
7
+ }) => PixiIdMaskMesh;
8
+ type ImageSourceConstructor = new (options: {
9
+ autoGenerateMipmaps?: boolean;
10
+ dynamic: boolean;
11
+ height: number;
12
+ resource: HTMLCanvasElement;
13
+ scaleMode?: "linear" | "nearest";
14
+ width: number;
15
+ }) => PixiImageSource;
16
+ type MeshGeometryConstructor = new (options: {
17
+ indices: Uint32Array;
18
+ positions: Float32Array;
19
+ shrinkBuffersToFit: boolean;
20
+ topology: "triangle-list";
21
+ uvs: Float32Array;
22
+ }) => PixiMeshGeometry;
23
+ type ShaderFactory = {
24
+ from(options: {
25
+ gl: {
26
+ fragment: string;
27
+ vertex: string;
28
+ };
29
+ resources: Record<string, unknown>;
30
+ }): PixiShader;
31
+ };
32
+ type UniformGroupConstructor = new (uniforms: Record<string, {
33
+ type: "f32";
34
+ value: number;
35
+ } | {
36
+ size?: number;
37
+ type: "f32";
38
+ value: Float32Array;
39
+ } | {
40
+ size?: number;
41
+ type: "vec2<f32>" | "vec4<f32>";
42
+ value: Float32Array;
43
+ }>) => PixiUniformGroup;
44
+ export interface PixiIdMaskShaderRenderer {
45
+ readonly mesh: PixiIdMaskMesh;
46
+ clearTexture(): void;
47
+ hide(): void;
48
+ render(frame: PreparedPngIdMaskFrame, texture: PixiTexture): void;
49
+ setOpacity(opacity: number): void;
50
+ destroy(): void;
51
+ }
52
+ export declare function createPixiIdMaskShaderRenderer(options: {
53
+ readonly ImageSource: ImageSourceConstructor;
54
+ readonly Mesh: MeshConstructor;
55
+ readonly MeshGeometry: MeshGeometryConstructor;
56
+ readonly Shader: ShaderFactory;
57
+ readonly UniformGroup: UniformGroupConstructor;
58
+ readonly mediaHeight: number;
59
+ readonly mediaWidth: number;
60
+ }): PixiIdMaskShaderRenderer;
61
+ export {};
62
+ //# sourceMappingURL=pixi-id-mask-shader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-id-mask-shader.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-id-mask-shader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,IAAI,IAAI,QAAQ,EAChB,YAAY,IAAI,gBAAgB,EAChC,MAAM,IAAI,UAAU,EACpB,OAAO,IAAI,WAAW,EACtB,YAAY,IAAI,gBAAgB,EACjC,MAAM,SAAS,CAAC;AAEjB,KAAK,cAAc,GAAG,QAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;AAE7D,KAAK,eAAe,GAAG,KAAK,OAAO,EAAE;IACnC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,UAAU,CAAC;CACpB,KAAK,cAAc,CAAC;AAErB,KAAK,sBAAsB,GAAG,KAAK,OAAO,EAAE;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf,KAAK,eAAe,CAAC;AAEtB,KAAK,uBAAuB,GAAG,KAAK,OAAO,EAAE;IAC3C,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,YAAY,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,eAAe,CAAC;IAC1B,GAAG,EAAE,YAA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B,CAAC;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,GAAG,wBAAwB,CAiI3B"}
@@ -0,0 +1,63 @@
1
+ import type { BufferedDetectionTimeline } from "supervision-js-core";
2
+ import type { DetectionPickPoint, DetectionPickResult, DetectionSelectionOptions, MediaInteractionOptions, AnnotationEditingEngine } from "supervision-js-core";
3
+ type ContainerConstructor = new () => PixiInteractionContainer;
4
+ type RectangleConstructor = new (x: number, y: number, width: number, height: number) => unknown;
5
+ type InteractionEventName = "pointermove" | "pointerout" | "pointertap" | "pointerdown" | "pointerup" | "pointerupoutside";
6
+ type PixiInteractionContainer = {
7
+ cursor?: string;
8
+ eventMode?: string;
9
+ hitArea?: unknown;
10
+ addChild(...children: unknown[]): unknown;
11
+ on(eventName: InteractionEventName, handler: (event: PixiInteractionPointerEvent) => void): unknown;
12
+ };
13
+ type PixiInteractionPointerEvent = {
14
+ getLocalPosition(container: PixiInteractionContainer): DetectionPickPoint;
15
+ readonly shiftKey?: boolean;
16
+ readonly pointerId?: number;
17
+ readonly button?: number;
18
+ readonly detail?: number;
19
+ readonly timeStamp?: number;
20
+ };
21
+ export interface PixiInteractionLayerState {
22
+ readonly hoveredPick: DetectionPickResult | null;
23
+ readonly selectedPick: DetectionPickResult | null;
24
+ readonly selectedPicks: readonly DetectionPickResult[];
25
+ readonly marqueeRect: {
26
+ readonly x: number;
27
+ readonly y: number;
28
+ readonly width: number;
29
+ readonly height: number;
30
+ } | null;
31
+ readonly pointerPoint: DetectionPickPoint | null;
32
+ }
33
+ export interface PixiInteractionLayer {
34
+ createDisplay(dimensions: {
35
+ readonly width: number;
36
+ readonly height: number;
37
+ }): PixiInteractionContainer;
38
+ drawFrame(mediaTime: number): void;
39
+ setSelectedDetection(selection: DetectionSelectionOptions | null): DetectionPickResult | null;
40
+ getState(): PixiInteractionLayerState;
41
+ cycleSelection(direction?: 1 | -1): DetectionPickResult | null;
42
+ destroy(): void;
43
+ }
44
+ export declare function createPixiInteractionLayer(options: {
45
+ readonly Container: ContainerConstructor;
46
+ readonly Rectangle: RectangleConstructor;
47
+ readonly canInteract: () => boolean;
48
+ readonly detectionTimeline: BufferedDetectionTimeline;
49
+ readonly interaction: MediaInteractionOptions;
50
+ readonly onStateChange?: (state: PixiInteractionLayerState) => void;
51
+ readonly pickMaskDetectionAtPoint?: (point: DetectionPickPoint, mediaTime: number) => DetectionPickResult | null;
52
+ readonly pickLabelDetectionAtPoint?: (point: DetectionPickPoint, mediaTime: number) => DetectionPickResult | null;
53
+ readonly editingEngine?: AnnotationEditingEngine;
54
+ readonly getViewportScale?: () => number;
55
+ readonly getMediaDimensions?: () => {
56
+ readonly width: number;
57
+ readonly height: number;
58
+ };
59
+ readonly capturePointer?: (pointerId: number) => void;
60
+ readonly releasePointer?: (pointerId: number) => void;
61
+ }): PixiInteractionLayer;
62
+ export {};
63
+ //# sourceMappingURL=pixi-interaction-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-interaction-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-interaction-layer.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAU7B,KAAK,oBAAoB,GAAG,UAAU,wBAAwB,CAAC;AAC/D,KAAK,oBAAoB,GAAG,KAC1B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,KACX,OAAO,CAAC;AAEb,KAAK,oBAAoB,GACrB,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,WAAW,GACX,kBAAkB,CAAC;AAEvB,KAAK,wBAAwB,GAAG;IAC9B,MAAM,CA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F,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD,GAAG,oBAAoB,CAievB"}
@@ -0,0 +1,84 @@
1
+ import type { PreparedPngIdMaskFrame } from "#render-preparation/mask-frame-artifact";
2
+ import type { DetectionFrame } from "supervision-js-core";
3
+ import type { DetectionPickResult } from "supervision-js-core";
4
+ import { type InteractionStyle } from "supervision-js-core";
5
+ import type { Container as PixiContainer, Graphics as PixiGraphics, ImageSource as PixiImageSource, Mesh as PixiMesh, MeshGeometry as PixiMeshGeometry, Shader as PixiShader, Text as PixiText, Texture as PixiTexture, UniformGroup as PixiUniformGroup } from "pixi.js";
6
+ type PixiInteractionMesh = PixiMesh<PixiMeshGeometry, PixiShader>;
7
+ type ContainerConstructor = new () => PixiContainer;
8
+ type GraphicsConstructor = new () => PixiGraphics;
9
+ type TextConstructor = new (options: {
10
+ text?: string;
11
+ style?: unknown;
12
+ }) => PixiText;
13
+ type ImageSourceConstructor = new (options: {
14
+ autoGenerateMipmaps?: boolean;
15
+ dynamic: boolean;
16
+ height: number;
17
+ resource: HTMLCanvasElement;
18
+ scaleMode?: "linear" | "nearest";
19
+ width: number;
20
+ }) => PixiImageSource;
21
+ type MeshConstructor = new (options: {
22
+ geometry: PixiMeshGeometry;
23
+ shader: PixiShader;
24
+ }) => PixiInteractionMesh;
25
+ type MeshGeometryConstructor = new (options: {
26
+ indices: Uint32Array;
27
+ positions: Float32Array;
28
+ shrinkBuffersToFit: boolean;
29
+ topology: "triangle-list";
30
+ uvs: Float32Array;
31
+ }) => PixiMeshGeometry;
32
+ type ShaderFactory = {
33
+ from(options: {
34
+ gl: {
35
+ fragment: string;
36
+ vertex: string;
37
+ };
38
+ resources: Record<string, unknown>;
39
+ }): PixiShader;
40
+ };
41
+ type UniformGroupConstructor = new (uniforms: Record<string, {
42
+ size?: number;
43
+ type: "f32";
44
+ value: Float32Array | number;
45
+ } | {
46
+ size?: number;
47
+ type: "vec2<f32>" | "vec4<f32>";
48
+ value: Float32Array;
49
+ }>) => PixiUniformGroup;
50
+ export interface PixiInteractionMaskArtifact {
51
+ readonly frame: PreparedPngIdMaskFrame;
52
+ readonly texture: PixiTexture;
53
+ }
54
+ export interface PixiInteractionPresentationLayerFrameContext {
55
+ readonly frame: DetectionFrame | undefined;
56
+ readonly hoveredPick: DetectionPickResult | null;
57
+ readonly idMaskArtifact?: PixiInteractionMaskArtifact | null;
58
+ readonly mediaTime: number;
59
+ readonly selectedPick: DetectionPickResult | null;
60
+ readonly selectedPicks?: readonly DetectionPickResult[];
61
+ readonly viewportScale?: number;
62
+ }
63
+ export interface PixiInteractionPresentationLayer {
64
+ createDisplay(dimensions: {
65
+ readonly width: number;
66
+ readonly height: number;
67
+ }): PixiContainer;
68
+ drawFrame(context: PixiInteractionPresentationLayerFrameContext): void;
69
+ setInteractionStyle(interactionStyle: InteractionStyle | null | undefined): void;
70
+ destroy(): void;
71
+ }
72
+ export declare function createPixiInteractionPresentationLayer(options: {
73
+ readonly Container: ContainerConstructor;
74
+ readonly Graphics: GraphicsConstructor;
75
+ readonly ImageSource?: ImageSourceConstructor;
76
+ readonly Mesh?: MeshConstructor;
77
+ readonly MeshGeometry?: MeshGeometryConstructor;
78
+ readonly Shader?: ShaderFactory;
79
+ readonly Text: TextConstructor;
80
+ readonly UniformGroup?: UniformGroupConstructor;
81
+ readonly interactionStyle?: InteractionStyle | null;
82
+ }): PixiInteractionPresentationLayer;
83
+ export {};
84
+ //# sourceMappingURL=pixi-interaction-presentation-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-interaction-presentation-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-interaction-presentation-layer.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAUtF,OAAO,K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AC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,gCAAgC;IAC/C,aAAa,CAAC,UAAU,EAAE;QACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;KACzB,GAAG,aAAa,CAAC;IAClB,SAAS,CAAC,OAAO,EAAE,4CAA4C,GAAG,IAAI,CAAC;IACvE,mBAAmB,CACjB,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GACpD,IAAI,CAAC;IACR,OAAO,IAAI,IAAI,CAAC;CACjB;AASD,wBAAgB,sCAAsC,CAAC,OAAO,EAAE;IAC9D,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,sBAAsB,CAAC;IAC9C,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,uBAAuB,CAAC;IAChD,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,uBAAuB,CAAC;IAChD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACrD,GAAG,gCAAgC,CAuSnC"}
@@ -0,0 +1,32 @@
1
+ import type { BufferedDetectionTimeline } from "supervision-js-core";
2
+ import type { AnnotationStyleContext, Detection, LabelStyle, DetectionPickPoint, DetectionPickResult } from "supervision-js-core";
3
+ import type { Container as PixiContainer, Graphics as PixiGraphics, Text as PixiText } from "pixi.js";
4
+ export interface PixiLabelLayerOptions {
5
+ readonly Container: new () => PixiContainer;
6
+ readonly Graphics: new () => PixiGraphics;
7
+ readonly Text: new (options: {
8
+ text?: string;
9
+ style?: unknown;
10
+ }) => PixiText;
11
+ readonly detectionTimeline: BufferedDetectionTimeline;
12
+ readonly labelStyle: LabelStyle | undefined;
13
+ readonly resolveContextState?: (detection: Detection) => Partial<AnnotationStyleContext>;
14
+ }
15
+ export interface PixiLabelLayer {
16
+ createContainer(): PixiContainer;
17
+ drawFrame(mediaTime: number, viewportScale?: number): void;
18
+ /** Draw a transient creation label with the same style as committed data. */
19
+ drawCreationPreview(detection: Detection | null, mediaTime: number, viewportScale?: number): void;
20
+ setLabelStyle(labelStyle: LabelStyle | null): void;
21
+ translateDetection(id: string | number, x: number, y: number): boolean;
22
+ getDetectionLabelBounds(id: string | number): {
23
+ readonly x: number;
24
+ readonly y: number;
25
+ readonly width: number;
26
+ readonly height: number;
27
+ } | null;
28
+ pickDetectionAtPoint(point: DetectionPickPoint, mediaTime: number): DetectionPickResult | null;
29
+ destroy(): void;
30
+ }
31
+ export declare function createPixiLabelLayer({ Container, Graphics, Text, detectionTimeline, labelStyle, resolveContextState, }: PixiLabelLayerOptions): PixiLabelLayer;
32
+ //# sourceMappingURL=pixi-label-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-label-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-label-layer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,KAAK,EACV,sBAAsB,EACtB,SAAS,EAGT,UAAU,EAEV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EACV,SAAS,IAAI,aAAa,EAC1B,QAAQ,IAAI,YAAY,EACxB,IAAI,IAAI,QAAQ,EACjB,MAAM,SAAS,CAAC;AAkCjB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,SAAS,EAAE,UAAU,aAAa,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,UAAU,YAAY,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,KAAK,OA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I,EACJ,iBAAiB,EACjB,UAAU,EACV,mBAAmB,GACpB,EAAE,qBAAqB,GAAG,cAAc,CAqPxC"}
@@ -0,0 +1,26 @@
1
+ import type { MaskBrushPreviewOptions } from "#editing/mask-brush-editor";
2
+ import type { CanvasSource as PixiCanvasSource, Container as PixiContainer, Graphics as PixiGraphics, Sprite as PixiSprite, Texture as PixiTexture } from "pixi.js";
3
+ export interface PixiMaskBrushPreview {
4
+ readonly display: PixiContainer;
5
+ setViewportScale(scale: number): void;
6
+ destroy(): void;
7
+ }
8
+ export declare function createPixiMaskBrushPreview(options: {
9
+ readonly preview: MaskBrushPreviewOptions;
10
+ readonly CanvasSource: new (options: {
11
+ dynamic: boolean;
12
+ height: number;
13
+ resource: HTMLCanvasElement;
14
+ width: number;
15
+ }) => PixiCanvasSource;
16
+ readonly Container: new () => PixiContainer;
17
+ readonly Graphics: new () => PixiGraphics;
18
+ readonly Sprite: new (options: {
19
+ texture: PixiTexture;
20
+ }) => PixiSprite;
21
+ readonly Texture: new (options: {
22
+ dynamic: boolean;
23
+ source: PixiCanvasSource;
24
+ }) => PixiTexture;
25
+ }): PixiMaskBrushPreview;
26
+ //# sourceMappingURL=pixi-mask-brush-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-mask-brush-preview.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-mask-brush-preview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EACV,YAAY,IAAI,gBAAgB,EAChC,SAAS,IAAI,aAAa,EAC1B,QAAQ,IAAI,YAAY,EACxB,MAAM,IAAI,UAAU,EACpB,OAAO,IAAI,WAAW,EACvB,MAAM,SAAS,CAAC;AAIjB,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IAClD,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAC;IAC1C,QAAQ,CAAC,YAAY,EAAE,KAAK,OAAO,EAAE;QACnC,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,iBAAiB,CAAC;QAC5B,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,gBAAgB,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,UAAU,aAAa,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,UAAU,YAAY,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,KAAK,OAAO,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,KAAK,UAAU,CAAC;IACvE,QAAQ,CAAC,OAAO,EAAE,KAAK,OAAO,EAAE;QAC9B,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,gBAAgB,CAAC;KAC1B,KAAK,WAAW,CAAC;CACnB,GAAG,oBAAoB,CAoDvB"}
@@ -0,0 +1,98 @@
1
+ import { type PreparedRenderTimelineContext } from "#render-preparation/prepared-render-window";
2
+ import { type PreparedPngIdMaskFrame } from "#render-preparation/mask-frame-artifact";
3
+ import type { BufferedDetectionTimeline } from "supervision-js-core";
4
+ import type { DetectionPickPoint, DetectionPickResult } from "supervision-js-core";
5
+ import type { MaskStyle } from "supervision-js-core";
6
+ import type { RenderPreparationOptions, RenderPreparationArtifactKind, RenderPreparationPlaybackGateOptions } from "#types/render-preparation";
7
+ import type { SerializableMaskInstruction } from "#render-preparation/mask-preparation-worker-protocol";
8
+ import type { Container as PixiContainer, ImageSource as PixiImageSource, Mesh as PixiMesh, MeshGeometry as PixiMeshGeometry, Shader as PixiShader, Sprite as PixiSprite, Texture as PixiTexture, UniformGroup as PixiUniformGroup } from "pixi.js";
9
+ type ImageSourceConstructor = new (options: {
10
+ autoGenerateMipmaps?: boolean;
11
+ dynamic: boolean;
12
+ height: number;
13
+ resource: HTMLCanvasElement | ImageBitmap;
14
+ scaleMode?: "linear" | "nearest";
15
+ width: number;
16
+ }) => PixiImageSource;
17
+ type TextureConstructor = new (options: {
18
+ dynamic: boolean;
19
+ source: PixiImageSource;
20
+ }) => PixiTexture;
21
+ type TextureConstructorWithEmpty = TextureConstructor & {
22
+ readonly EMPTY: PixiTexture;
23
+ };
24
+ type SpriteConstructor = new (options?: {
25
+ texture?: PixiTexture;
26
+ }) => PixiSprite;
27
+ type ContainerConstructor = new () => PixiContainer;
28
+ type MeshConstructor = new (options: {
29
+ geometry: PixiMeshGeometry;
30
+ shader: PixiShader;
31
+ }) => PixiMesh;
32
+ type MeshGeometryConstructor = new (options: {
33
+ indices: Uint32Array;
34
+ positions: Float32Array;
35
+ shrinkBuffersToFit: boolean;
36
+ topology: "triangle-list";
37
+ uvs: Float32Array;
38
+ }) => PixiMeshGeometry;
39
+ type ShaderFactory = {
40
+ from(options: {
41
+ gl: {
42
+ fragment: string;
43
+ vertex: string;
44
+ };
45
+ resources: Record<string, unknown>;
46
+ }): PixiShader;
47
+ };
48
+ type UniformGroupConstructor = new (uniforms: Record<string, {
49
+ type: "f32";
50
+ value: number;
51
+ } | {
52
+ size?: number;
53
+ type: "f32";
54
+ value: Float32Array;
55
+ } | {
56
+ size?: number;
57
+ type: "vec2<f32>" | "vec4<f32>";
58
+ value: Float32Array;
59
+ }>) => PixiUniformGroup;
60
+ export interface PixiMaskLayer {
61
+ createSprite(dimensions: {
62
+ width: number;
63
+ height: number;
64
+ }): PixiContainer | PixiSprite;
65
+ drawFrame(mediaTime: number): void;
66
+ waitForRenderPreparation(mediaTime: number, options: RenderPreparationPlaybackGateOptions): Promise<void>;
67
+ pickDetectionAtPoint(point: DetectionPickPoint, mediaTime: number): DetectionPickResult | null;
68
+ getActiveIdMaskFrameTexture(): PixiActiveIdMaskFrameTexture | null;
69
+ setTimelineContext(context: PreparedRenderTimelineContext): void;
70
+ setMaskStyle(maskStyle: MaskStyle | null | undefined): void;
71
+ destroy(): void;
72
+ }
73
+ export interface PixiActiveIdMaskFrameTexture {
74
+ readonly frame: PreparedPngIdMaskFrame;
75
+ readonly texture: PixiTexture;
76
+ }
77
+ export declare function createPixiMaskLayer(options: {
78
+ readonly artifactKind?: RenderPreparationArtifactKind;
79
+ readonly Container?: ContainerConstructor;
80
+ readonly ImageSource: ImageSourceConstructor;
81
+ readonly Mesh?: MeshConstructor;
82
+ readonly MeshGeometry?: MeshGeometryConstructor;
83
+ readonly Shader?: ShaderFactory;
84
+ readonly Sprite: SpriteConstructor;
85
+ readonly Texture: TextureConstructorWithEmpty;
86
+ readonly UniformGroup?: UniformGroupConstructor;
87
+ readonly detectionTimeline: BufferedDetectionTimeline;
88
+ readonly maskStyle: MaskStyle;
89
+ readonly onActiveIdMaskFramePresented?: () => void;
90
+ readonly renderPreparation?: RenderPreparationOptions;
91
+ readonly resolveInstructions?: (options: {
92
+ readonly frame: import("supervision-js-core").DetectionFrame;
93
+ readonly maskStyle: MaskStyle;
94
+ readonly mediaTime: number;
95
+ }) => readonly SerializableMaskInstruction[];
96
+ }): PixiMaskLayer;
97
+ export {};
98
+ //# sourceMappingURL=pixi-mask-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-mask-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-mask-layer.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,6BAA6B,EACnC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,6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AAS,2BAA2B,EAAE,CAAC;CAC9C,GAAG,aAAa,CA2ZhB"}
@@ -0,0 +1,6 @@
1
+ import type { AnnotationVisibility } from "supervision-js-core";
2
+ import type { MediaRendererScene, MediaRendererSceneOptions } from "./media-renderer-scene";
3
+ export declare function observePixiContainerResize(container: HTMLElement, resize: () => void): () => void;
4
+ export declare function createPixiMediaScene(options: MediaRendererSceneOptions): Promise<MediaRendererScene>;
5
+ export declare function canReuseMaskVisibilityArtifacts(previous: AnnotationVisibility | undefined, next: AnnotationVisibility | undefined): boolean;
6
+ //# sourceMappingURL=pixi-media-scene.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-media-scene.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-media-scene.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EAG1B,MAAM,wBAAwB,CAAC;AA6BhC,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,WAAW,EACtB,MAAM,EAAE,MAAM,IAAI,GACjB,MAAM,IAAI,CASZ;AAUD,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,kBAAkB,CAAC,CAooC7B;AAED,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,oBAAoB,GAAG,SAAS,EAC1C,IAAI,EAAE,oBAAoB,GAAG,SAAS,WAoBvC"}
@@ -0,0 +1,15 @@
1
+ import { type BoxStrokeStyle, type Point } from "supervision-js-core";
2
+ import type { Graphics as PixiGraphics } from "pixi.js";
3
+ export declare function resolveScreenLength(value: number, viewportScale: number): number;
4
+ export declare function drawPixiPath(graphics: PixiGraphics, points: readonly Point[], closed: boolean, stroke: BoxStrokeStyle, viewportScale: number): void;
5
+ export declare function resolvePixiStroke(stroke: BoxStrokeStyle, viewportScale: number): {
6
+ alpha: number;
7
+ color: number;
8
+ width: number;
9
+ } | {
10
+ alignment: number;
11
+ alpha: number;
12
+ color: number;
13
+ width: number;
14
+ };
15
+ //# sourceMappingURL=pixi-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-path.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,KAAK,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AAExD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAEvE;AAED,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,cAAc,EACtB,aAAa,EAAE,MAAM,QAqBtB;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,aAAa,EAAE,MAAM;;;;;;;;;EAmBtB"}
@@ -0,0 +1,32 @@
1
+ import type { SerializableMaskInstruction } from "#render-preparation/mask-preparation-worker-protocol";
2
+ import { type AnnotationStyleContext, type Detection, type DetectionFrame, type PolygonDrawInstruction, type PolygonStyle } from "supervision-js-core";
3
+ import { createPixiMaskLayer, type PixiMaskLayer } from "./pixi-mask-layer";
4
+ type PixiMaskLayerOptions = Parameters<typeof createPixiMaskLayer>[0];
5
+ export interface PixiPolygonLayer {
6
+ createDisplay(dimensions: {
7
+ readonly height: number;
8
+ readonly width: number;
9
+ }): ReturnType<PixiMaskLayer["createSprite"]>;
10
+ drawFrame(mediaTime: number, viewportScale?: number): void;
11
+ getVectorFallbackStyle(): PolygonStyle;
12
+ setPolygonStyle(polygonStyle: PolygonStyle | null | undefined): void;
13
+ setTimelineContext: PixiMaskLayer["setTimelineContext"];
14
+ waitForRenderPreparation: PixiMaskLayer["waitForRenderPreparation"];
15
+ destroy(): void;
16
+ }
17
+ export declare function createPixiPolygonLayer(options: Omit<PixiMaskLayerOptions, "artifactKind" | "maskStyle" | "resolveInstructions"> & {
18
+ readonly polygonStyle: PolygonStyle;
19
+ readonly resolveContextState?: (detection: Detection) => Partial<AnnotationStyleContext>;
20
+ }): PixiPolygonLayer;
21
+ export declare function canPreparePolygonInstruction(instruction: PolygonDrawInstruction): boolean;
22
+ export declare function resolvePreparedPolygonInstructions(options: {
23
+ readonly frame: DetectionFrame;
24
+ readonly mediaHeight: number;
25
+ readonly mediaTime: number;
26
+ readonly mediaWidth: number;
27
+ readonly polygonStyle: PolygonStyle;
28
+ readonly resolveContextState?: (detection: Detection) => Partial<AnnotationStyleContext>;
29
+ readonly viewportScale: number;
30
+ }): readonly SerializableMaskInstruction[];
31
+ export {};
32
+ //# sourceMappingURL=pixi-polygon-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pixi-polygon-layer.d.ts","sourceRoot":"","sources":["../../src/renderers/pixi-polygon-layer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AAExG,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,cAAc,EAEnB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,mBAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE5E,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,UAAU,EAAE;QACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KACxB,GAAG,UAAU,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC;IAC9C,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3D,sBAAsB,IAAI,YAAY,CAAC;IACvC,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IACrE,kBAAkB,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACxD,wBAAwB,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;IACpE,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,IAAI,CACX,oBAAoB,EACpB,cAAc,GAAG,WAAW,GAAG,qBAAqB,CACrD,GAAG;IACF,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAC7B,SAAS,EAAE,SAAS,KACjB,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC,GACA,gBAAgB,CA6FlB;AAED,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,sBAAsB,WAWpC;AAED,wBAAgB,kCAAkC,CAAC,OAAO,EAAE;IAC1D,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAC7B,SAAS,EAAE,SAAS,KACjB,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,GAAG,SAAS,2BAA2B,EAAE,CAkDzC"}
@@ -0,0 +1,14 @@
1
+ import { MediaRendererFit } from "#types/media-renderer";
2
+ export interface PixiSceneFit {
3
+ readonly scale: number;
4
+ readonly x: number;
5
+ readonly y: number;
6
+ }
7
+ export declare function calculatePixiSceneFit(options: {
8
+ readonly fit: MediaRendererFit;
9
+ readonly mediaHeight: number;
10
+ readonly mediaWidth: number;
11
+ readonly screenHeight: number;
12
+ readonly screenWidth: number;
13
+ }): PixiSceneFit | undefined;
14
+ //# sourceMappingURL=pixi-scene-fit.d.ts.map