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,242 @@
1
+ import type { ColdDetectionFrameStore, ColdDetectionFrameStoreWriteSummary, DetectionBufferOptions, DetectionFrameRetentionOptions, DetectionFrameSelectionOptions, DetectionPlaybackGateOptions, DetectionFrameSource, MediaSessionLifecycleState, MediaSessionMode, MediaSessionStateListener as CoreMediaSessionStateListener, MediaSessionStateUnsubscribe, WritableDetectionFrameSource } from "supervision-js-core";
2
+ import type { DetectionFrame } from "supervision-js-core";
3
+ import type { MediaInteractionOptions } from "supervision-js-core";
4
+ import type { MediaNormalizationInputMetadata, MediaNormalizationProgress, MediaNormalizationOptions, NormalizedMedia, ProgressiveNormalizedMedia } from "#types/media-normalization";
5
+ import type { DetectionTimelineOrigin, MediaFrameDiagnostics, MediaRenderer, MediaRendererFit, MediaRendererPresentation, MediaRendererQuality, MediaRendererOptions, MediaRendererSource, MediaRendererState, MediaSourceState } from "#types/media-renderer";
6
+ import type { RenderPreparationDiagnostics } from "#types/render-preparation";
7
+ export { MediaSessionActivityKind, MediaSessionActivityStatus, MediaSessionMode, MediaSessionStatus, } from "supervision-js-core";
8
+ export type { MediaSessionActivity, MediaSessionStateUnsubscribe, } from "supervision-js-core";
9
+ /**
10
+ * Media input accepted by `createMediaSession`.
11
+ *
12
+ * Use a `Blob` for uploaded files, a URL string for already hosted media, or a
13
+ * custom renderer source when integrating a lower-level media adapter.
14
+ */
15
+ export type MediaSessionMedia = string | URL | Request | Blob | MediaRendererSource;
16
+ export interface MediaSessionNormalizationOptions extends MediaNormalizationOptions {
17
+ /**
18
+ * When true, media normalization may expose progressive output before the
19
+ * entire input has finished normalizing.
20
+ */
21
+ readonly stream?: boolean;
22
+ }
23
+ /**
24
+ * Options for session-owned streaming detection ingestion.
25
+ */
26
+ export interface MediaSessionAppendableDetectionOptions {
27
+ /**
28
+ * Optional cold store. If omitted, the session creates an in-memory store.
29
+ * `MemoryOnly` retention always uses an in-memory store.
30
+ */
31
+ readonly store?: ColdDetectionFrameStore;
32
+ readonly datasetId: string;
33
+ readonly chunkDurationSeconds?: number;
34
+ readonly clearOnCreate?: boolean;
35
+ readonly retention?: DetectionFrameRetentionOptions;
36
+ }
37
+ /**
38
+ * @deprecated Use `MediaSessionAppendableDetectionOptions`.
39
+ */
40
+ export type MediaSessionWritableDetectionOptions = MediaSessionAppendableDetectionOptions;
41
+ export type MediaSessionDetectionSyncOptions = DetectionFrameSelectionOptions;
42
+ export type MediaSessionDetectionSourcePresentation = Pick<MediaRendererPresentation, "boxStyle" | "keypointStyle" | "labelStyle" | "maskStyle" | "polygonStyle" | "polylineStyle">;
43
+ export interface MediaSessionDetectionSourceOptions {
44
+ /**
45
+ * Renderer-neutral source identity copied into composed detections.
46
+ */
47
+ readonly id: string;
48
+ /**
49
+ * Static detection frames known at session creation time.
50
+ */
51
+ readonly frames?: readonly DetectionFrame[];
52
+ /**
53
+ * Caller-owned source for loading detection frames by media-time range.
54
+ */
55
+ readonly source?: DetectionFrameSource;
56
+ /**
57
+ * Session-owned writable source for streaming detections into cold storage.
58
+ */
59
+ readonly appendable?: MediaSessionAppendableDetectionOptions;
60
+ /**
61
+ * Lower order sources are composed first. Later detections render on top.
62
+ */
63
+ readonly order?: number;
64
+ /**
65
+ * Optional geometry presentation overrides for this source.
66
+ *
67
+ * `undefined` falls back to the global presentation. `null` disables that
68
+ * layer for this source.
69
+ */
70
+ readonly presentation?: MediaSessionDetectionSourcePresentation;
71
+ /**
72
+ * Detection-frame selection options for this source.
73
+ */
74
+ readonly sync?: MediaSessionDetectionSyncOptions;
75
+ /**
76
+ * When false, playback gates skip this source's readiness checks.
77
+ */
78
+ readonly requiredForPlayback?: boolean;
79
+ }
80
+ export interface MediaSessionDetectionOptions {
81
+ /**
82
+ * Multiple detection sources composed into one active semantic frame.
83
+ */
84
+ readonly sources?: readonly MediaSessionDetectionSourceOptions[];
85
+ /**
86
+ * Static detection frames known at session creation time.
87
+ */
88
+ readonly frames?: readonly DetectionFrame[];
89
+ /**
90
+ * Caller-owned source for loading detection frames by media-time range.
91
+ */
92
+ readonly source?: DetectionFrameSource;
93
+ /**
94
+ * Session-owned writable source for streaming detections into cold storage.
95
+ * Prefer this name for new code.
96
+ */
97
+ readonly appendable?: MediaSessionAppendableDetectionOptions;
98
+ /**
99
+ * Backward-compatible alias for `appendable`.
100
+ *
101
+ * @deprecated Use `appendable`.
102
+ */
103
+ readonly writable?: MediaSessionWritableDetectionOptions;
104
+ /**
105
+ * Detection-frame selection options shared by the hot buffer and renderer.
106
+ */
107
+ readonly sync?: MediaSessionDetectionSyncOptions;
108
+ /**
109
+ * Hot detection-window loading options.
110
+ */
111
+ readonly buffer?: DetectionBufferOptions;
112
+ /**
113
+ * Optional playback gate that treats detection coverage as part of media
114
+ * readiness.
115
+ */
116
+ readonly playbackGate?: DetectionPlaybackGateOptions;
117
+ /**
118
+ * Clock used by supplied detection frames. Use `MediaStart` when inference
119
+ * timestamps begin at zero independently of the file's encoded PTS.
120
+ */
121
+ readonly timelineOrigin?: DetectionTimelineOrigin;
122
+ }
123
+ export interface MediaSessionRendererOptions {
124
+ readonly autoPlay?: boolean;
125
+ readonly loop?: boolean;
126
+ readonly playbackRate?: number;
127
+ readonly muted?: boolean;
128
+ readonly fit?: MediaRendererFit;
129
+ readonly maxDevicePixelRatio?: MediaRendererOptions["maxDevicePixelRatio"];
130
+ readonly interaction?: MediaInteractionOptions;
131
+ readonly renderPreparation?: MediaRendererOptions["renderPreparation"];
132
+ readonly diagnostics?: MediaRendererOptions["diagnostics"];
133
+ /**
134
+ * Caller-owned editing engine. The host persists committed edits and owns
135
+ * undo; the session only routes renderer gestures and previews.
136
+ */
137
+ readonly editingEngine?: MediaRendererOptions["editingEngine"];
138
+ /** Optional browser mask-brush preview rendered with the editing engine. */
139
+ readonly maskBrush?: MediaRendererOptions["maskBrush"];
140
+ readonly createMaskBrush?: MediaRendererOptions["createMaskBrush"];
141
+ /** Optional host-owned external preview rendered above annotations. */
142
+ readonly previewOverlay?: MediaRendererOptions["previewOverlay"];
143
+ readonly onFrame?: (diagnostics: MediaFrameDiagnostics) => void;
144
+ readonly onSource?: (state: MediaSourceState) => void;
145
+ readonly onState?: (state: MediaRendererState) => void;
146
+ }
147
+ /**
148
+ * Options for creating one renderer-owned media session.
149
+ */
150
+ export interface MediaSessionOptions {
151
+ /**
152
+ * DOM element where the renderer should mount its canvas.
153
+ */
154
+ readonly container: HTMLElement;
155
+ /**
156
+ * Media to prepare and render. This can be a URL, an uploaded file/blob, or a
157
+ * lower-level renderer source.
158
+ */
159
+ readonly media: MediaSessionMedia;
160
+ /**
161
+ * File mode is bounded media. Stream mode tunes defaults for live or
162
+ * append-only detection sources.
163
+ */
164
+ readonly mode?: MediaSessionMode;
165
+ /**
166
+ * Optional browser media normalization before rendering.
167
+ */
168
+ readonly normalize?: false | MediaSessionNormalizationOptions;
169
+ /**
170
+ * Detection frames or sources to render with the media.
171
+ */
172
+ readonly detections?: MediaSessionDetectionOptions;
173
+ /**
174
+ * Aggregate loading, playback, buffering, processing, and error state.
175
+ */
176
+ readonly onState?: (state: MediaSessionState) => void;
177
+ /**
178
+ * Box, mask, label, interaction, and focus presentation styles.
179
+ */
180
+ readonly presentation?: MediaRendererPresentation;
181
+ /**
182
+ * Renderer playback, interaction, diagnostics, and render-preparation options.
183
+ */
184
+ readonly renderer?: MediaSessionRendererOptions;
185
+ }
186
+ /**
187
+ * Prepared media state visible to host applications.
188
+ */
189
+ export interface MediaSessionMediaState {
190
+ readonly inputMetadata: MediaNormalizationInputMetadata | null;
191
+ readonly normalizedMedia: NormalizedMedia | ProgressiveNormalizedMedia | null;
192
+ readonly objectUrl: string | null;
193
+ }
194
+ export interface MediaSessionNormalizationState {
195
+ readonly active: boolean;
196
+ readonly progress: MediaNormalizationProgress | null;
197
+ }
198
+ /**
199
+ * Current aggregate browser-session state for media, renderer, detections,
200
+ * render preparation, loading activities, and errors.
201
+ */
202
+ export type MediaSessionState = MediaSessionLifecycleState<MediaSessionMediaState, MediaRendererState, MediaSessionNormalizationState, RenderPreparationDiagnostics>;
203
+ export type MediaSessionStateListener = CoreMediaSessionStateListener<MediaSessionState>;
204
+ export interface MediaSessionDetectionWriteOptions {
205
+ readonly sourceId?: string;
206
+ }
207
+ /**
208
+ * Public controller for one renderer-owned media item.
209
+ */
210
+ export interface MediaSession {
211
+ /**
212
+ * Detection source used by the renderer. Present when the session was created
213
+ * with static frames, a source, or an appendable source.
214
+ */
215
+ readonly detectionSource?: DetectionFrameSource | WritableDetectionFrameSource;
216
+ readonly media: MediaSessionMediaState;
217
+ readonly renderer: MediaRenderer;
218
+ /**
219
+ * Append semantic detection frames to a session-owned appendable source.
220
+ */
221
+ appendDetectionFrames(frames: readonly DetectionFrame[], options?: MediaSessionDetectionWriteOptions): Promise<ColdDetectionFrameStoreWriteSummary>;
222
+ replaceDetectionFrames(frames: readonly DetectionFrame[], options?: MediaSessionDetectionWriteOptions): Promise<ColdDetectionFrameStoreWriteSummary>;
223
+ clearDetectionFrames(options?: MediaSessionDetectionWriteOptions): Promise<void>;
224
+ /**
225
+ * Summary of frames written through `appendDetectionFrames`, when available.
226
+ */
227
+ getDetectionSummary(options?: MediaSessionDetectionWriteOptions): ColdDetectionFrameStoreWriteSummary | null;
228
+ play(): Promise<void>;
229
+ pause(): void;
230
+ seek(mediaTime: number): Promise<void>;
231
+ stepForward(): Promise<void>;
232
+ stepBackward(): Promise<void>;
233
+ setPlaybackRate(playbackRate: number): void;
234
+ /** Re-read semantic detections and redraw the current presentation. */
235
+ refresh(): Promise<void>;
236
+ setPresentation(presentation: MediaRendererPresentation): void;
237
+ setRenderQuality(quality: MediaRendererQuality): void;
238
+ subscribe(listener: MediaSessionStateListener): MediaSessionStateUnsubscribe;
239
+ getState(): MediaSessionState;
240
+ destroy(): void;
241
+ }
242
+ //# sourceMappingURL=media-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-session.d.ts","sourceRoot":"","sources":["../../src/types/media-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,mCAAmC,EACnC,sBAAsB,EACtB,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,oBAAoB,EACpB,0BAA0B,EAC1B,gBAAgB,EA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GAAG,IAAI,CAAC;IACtD,SAAS,CAAC,QAAQ,EAAE,yBAAyB,GAAG,4BAA4B,CAAC;IAC7E,QAAQ,IAAI,iBAAiB,CAAC;IAC9B,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Where renderer-owned artifact preparation should run.
3
+ */
4
+ export declare enum RenderPreparationMode {
5
+ /**
6
+ * Prefer workers when available, with a main-thread fallback.
7
+ */
8
+ Auto = "auto",
9
+ /**
10
+ * Prepare artifacts on the main thread.
11
+ */
12
+ MainThread = "mainThread",
13
+ /**
14
+ * Require preparation through the configured/default worker factory.
15
+ * Worker creation and runtime failures reject instead of falling back.
16
+ */
17
+ Worker = "worker"
18
+ }
19
+ /**
20
+ * Actual execution mode selected after worker availability is resolved.
21
+ */
22
+ export declare enum RenderPreparationExecutionMode {
23
+ MainThread = "mainThread",
24
+ Worker = "worker"
25
+ }
26
+ /**
27
+ * Worker lifecycle state for render-preparation diagnostics.
28
+ */
29
+ export declare enum RenderPreparationWorkerStatus {
30
+ Disabled = "disabled",
31
+ Ready = "ready",
32
+ Unavailable = "unavailable",
33
+ Error = "error"
34
+ }
35
+ /**
36
+ * Prepared artifact family.
37
+ */
38
+ export declare enum RenderPreparationArtifactKind {
39
+ /** Frame-level ID-mask artifact prepared from semantic masks. */
40
+ MaskFrame = "maskFrame",
41
+ /** Frame-level ID-mask artifact rasterized from semantic polygons. */
42
+ PolygonFrame = "polygonFrame"
43
+ }
44
+ /**
45
+ * Preparation status for the active artifact frame.
46
+ */
47
+ export declare enum RenderPreparationArtifactFrameStatus {
48
+ Disabled = "disabled",
49
+ Empty = "empty",
50
+ Pending = "pending",
51
+ Prepared = "prepared"
52
+ }
53
+ /**
54
+ * Worker creation hook for hosts that need custom CSP or deployment handling.
55
+ */
56
+ export interface RenderPreparationWorkerFactory {
57
+ createWorker(): Worker;
58
+ }
59
+ /**
60
+ * Options for preparing frame-level raster artifacts. Polygon frames reuse
61
+ * this bounded worker/cache policy so both dense geometry paths stay ahead of
62
+ * playback without duplicating scheduling controls.
63
+ */
64
+ export interface RenderPreparationMaskFrameOptions {
65
+ /**
66
+ * Maximum number of prepared mask frames retained in memory.
67
+ */
68
+ readonly maxCacheFrameCount?: number;
69
+ /**
70
+ * Maximum number of mask frames queued for preparation.
71
+ */
72
+ readonly maxPendingFrameCount?: number;
73
+ /**
74
+ * Target number of frames to prepare ahead of playback.
75
+ */
76
+ readonly prefetchFrameCount?: number;
77
+ /**
78
+ * Number of frames scheduled per preparation scan.
79
+ */
80
+ readonly scheduleBatchSize?: number;
81
+ /**
82
+ * How often the prepared window scans for refill work.
83
+ */
84
+ readonly scanIntervalSeconds?: number;
85
+ /**
86
+ * Worker count for mask artifact preparation.
87
+ */
88
+ readonly workerCount?: number;
89
+ }
90
+ /**
91
+ * Playback gate for prepared render artifacts.
92
+ */
93
+ export interface RenderPreparationPlaybackGateOptions {
94
+ /**
95
+ * Pause playback while required artifacts are not prepared.
96
+ */
97
+ readonly enabled?: boolean;
98
+ /**
99
+ * Soft target ahead of the active frame.
100
+ */
101
+ readonly minimumAheadSeconds?: number;
102
+ /**
103
+ * Required ahead time before playback can continue.
104
+ */
105
+ readonly requiredAheadSeconds?: number;
106
+ }
107
+ /**
108
+ * Diagnostics for the currently selected artifact frame.
109
+ */
110
+ export interface RenderPreparationActiveFrameDiagnostics {
111
+ readonly key: string;
112
+ readonly mediaTime: number;
113
+ readonly status: RenderPreparationArtifactFrameStatus;
114
+ }
115
+ /**
116
+ * Diagnostics for one prepared artifact window.
117
+ */
118
+ export interface RenderPreparationArtifactWindowDiagnostics {
119
+ readonly availableFrameCount: number;
120
+ readonly refillThresholdFrameCount: number;
121
+ readonly targetFrameCount: number;
122
+ }
123
+ /**
124
+ * Diagnostics for one prepared artifact family.
125
+ */
126
+ export interface RenderPreparationArtifactDiagnostics {
127
+ readonly activeFrame?: RenderPreparationActiveFrameDiagnostics | null;
128
+ readonly inFlightCount?: number;
129
+ readonly kind: RenderPreparationArtifactKind;
130
+ readonly maxInFlightCount?: number;
131
+ readonly maxPendingCount?: number;
132
+ readonly maxPreparedCount?: number;
133
+ readonly pendingCount: number;
134
+ readonly preparedAheadFrameCount?: number;
135
+ readonly preparedAheadSeconds?: number;
136
+ readonly prefetchCount?: number;
137
+ readonly preparedCount: number;
138
+ readonly refillThresholdCount?: number;
139
+ readonly scheduleBatchSize?: number;
140
+ readonly window?: RenderPreparationArtifactWindowDiagnostics;
141
+ }
142
+ /**
143
+ * Renderer-owned render-preparation diagnostics.
144
+ */
145
+ export interface RenderPreparationDiagnostics {
146
+ readonly artifacts: readonly RenderPreparationArtifactDiagnostics[];
147
+ readonly executionMode: RenderPreparationExecutionMode;
148
+ readonly message: string | null;
149
+ readonly workerStatus: RenderPreparationWorkerStatus;
150
+ }
151
+ /**
152
+ * Render-preparation configuration.
153
+ *
154
+ * Most applications can use the session defaults. Tune this when dense masks,
155
+ * long videos, worker policy, or playback gating need explicit behavior.
156
+ */
157
+ export interface RenderPreparationOptions {
158
+ readonly maskFrame?: RenderPreparationMaskFrameOptions;
159
+ readonly mode?: RenderPreparationMode;
160
+ readonly onDiagnostics?: (diagnostics: RenderPreparationDiagnostics) => void;
161
+ readonly playbackGate?: RenderPreparationPlaybackGateOptions;
162
+ readonly workerFactory?: RenderPreparationWorkerFactory;
163
+ }
164
+ //# sourceMappingURL=render-preparation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-preparation.d.ts","sourceRoot":"","sources":["../../src/types/render-preparation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,qBAAqB;IAC/B;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,UAAU,eAAe;IACzB;;;OAGG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,8BAA8B;IACxC,UAAU,eAAe;IACzB,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,6BAA6B;IACvC,QAAQ,aAAa;IACrB,KAAK,UA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,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,4BAA4B,KAAK,IAAI,CAAC;IAC7E,QAAQ,CAAC,YAAY,CAAC,EAAE,oCAAoC,CAAC;IAC7D,QAAQ,CAAC,aAAa,CAAC,EAAE,8BAA8B,CAAC;CACzD"}
@@ -0,0 +1,15 @@
1
+ export interface WorkerRpcMessage {
2
+ readonly requestId: number;
3
+ }
4
+ export interface WorkerRpcClient<Request extends WorkerRpcMessage, Response extends WorkerRpcMessage> {
5
+ destroy(): void;
6
+ getFailureMessage(): string | null;
7
+ request(message: Omit<Request, "requestId">): Promise<Response>;
8
+ }
9
+ export declare function createWorkerRpcClient<Request extends WorkerRpcMessage, Response extends WorkerRpcMessage>(options: {
10
+ readonly defaultErrorMessage: string;
11
+ readonly isResponse: (value: unknown) => value is Response;
12
+ readonly onOrphanedResponse?: (response: Response) => void;
13
+ readonly worker: Worker;
14
+ }): WorkerRpcClient<Request, Response>;
15
+ //# sourceMappingURL=worker-rpc-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-rpc-client.d.ts","sourceRoot":"","sources":["../../src/workers/worker-rpc-client.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAOD,MAAM,WAAW,eAAe,CAC9B,OAAO,SAAS,gBAAgB,EAChC,QAAQ,SAAS,gBAAgB;IAEjC,OAAO,IAAI,IAAI,CAAC;IAChB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CAAC;IACnC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CACjE;AAED,wBAAgB,qBAAqB,CACnC,OAAO,SAAS,gBAAgB,EAChC,QAAQ,SAAS,gBAAgB,EACjC,OAAO,EAAE;IACT,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAI,QAAQ,CAAC;IAC3D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,GAAG,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,CA+FrC"}
@@ -0,0 +1,4 @@
1
+ import type { DetectionFrameSource } from "#types/detection-timeline";
2
+ import type { DetectionFrame } from "#types/detections";
3
+ export declare function createArrayDetectionFrameSource(frames: readonly DetectionFrame[] | undefined): DetectionFrameSource;
4
+ //# sourceMappingURL=array-detection-frame-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-detection-frame-source.d.ts","sourceRoot":"","sources":["../../src/detections/array-detection-frame-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMxD,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,GAC5C,oBAAoB,CAUtB"}
@@ -0,0 +1,14 @@
1
+ import { type BufferedDetectionTimeline, type DetectionBufferOptions, type DetectionBufferState, type DetectionFrameSource } from "#types/detection-timeline";
2
+ import type { DetectionFrame } from "#types/detections";
3
+ /**
4
+ * Returns the timeline-owned hot-buffer snapshot without copying it.
5
+ *
6
+ * This is an internal platform-adapter fast path. Public callers should use
7
+ * `getBufferedFrames()`, which preserves the existing defensive-copy contract.
8
+ */
9
+ export declare function getBufferedDetectionTimelineFrameSnapshot(timeline: BufferedDetectionTimeline): readonly DetectionFrame[];
10
+ export declare function createBufferedDetectionTimeline(options: {
11
+ readonly source: DetectionFrameSource;
12
+ } & DetectionBufferOptions): BufferedDetectionTimeline;
13
+ export declare function createIdleDetectionBufferState(): DetectionBufferState;
14
+ //# sourceMappingURL=buffered-detection-timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buffered-detection-timeline.d.ts","sourceRoot":"","sources":["../../src/detections/buffered-detection-timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAE3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAG1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAqBxD;;;;;GAKG;AACH,wBAAgB,yCAAyC,CACvD,QAAQ,EAAE,yBAAyB,GAClC,SAAS,cAAc,EAAE,CAI3B;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE;IACP,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;CACvC,GAAG,sBAAsB,GACzB,yBAAyB,CA4kB3B;AAED,wBAAgB,8BAA8B,IAAI,oBAAoB,CAWrE"}
@@ -0,0 +1,6 @@
1
+ import type { ColdDetectionFrameStore, DetectionFrameSource } from "#types/detection-timeline";
2
+ export declare function createColdDetectionFrameSource(options: {
3
+ readonly store: ColdDetectionFrameStore;
4
+ readonly datasetId: string;
5
+ }): DetectionFrameSource;
6
+ //# sourceMappingURL=cold-detection-frame-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cold-detection-frame-source.d.ts","sourceRoot":"","sources":["../../src/detections/cold-detection-frame-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AAEnC,wBAAgB,8BAA8B,CAAC,OAAO,EAAE;IACtD,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,GAAG,oBAAoB,CAUvB"}
@@ -0,0 +1,3 @@
1
+ import { type CompositeDetectionFrameSourceOptions, type DetectionFrameSource } from "#types/detection-timeline";
2
+ export declare function createCompositeDetectionFrameSource(options: CompositeDetectionFrameSourceOptions): DetectionFrameSource;
3
+ //# sourceMappingURL=composite-detection-frame-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composite-detection-frame-source.d.ts","sourceRoot":"","sources":["../../src/detections/composite-detection-frame-source.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,oCAAoC,EACzC,KAAK,oBAAoB,EAG1B,MAAM,2BAA2B,CAAC;AAoBnC,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,oCAAoC,GAC5C,oBAAoB,CA2DtB"}
@@ -0,0 +1,35 @@
1
+ import type { Detection, DetectionFrame } from "#types/detections";
2
+ export type DetectionId = string | number;
3
+ export type EditableDetection = DeepMutable<Detection>;
4
+ export declare enum AnnotationFrameMutationKind {
5
+ Add = "add",
6
+ Remove = "remove",
7
+ Replace = "replace",
8
+ Transact = "transact",
9
+ Update = "update"
10
+ }
11
+ export interface AnnotationFrameMutation {
12
+ readonly kind: AnnotationFrameMutationKind;
13
+ readonly detectionIds: readonly DetectionId[];
14
+ readonly previous: DetectionFrame;
15
+ readonly current: DetectionFrame;
16
+ }
17
+ export type AnnotationFrameMutationListener = (mutation: AnnotationFrameMutation) => void;
18
+ export interface EditableAnnotationFrameSession {
19
+ getSnapshot(): DetectionFrame;
20
+ add(detection: Detection, index?: number): DetectionFrame;
21
+ update(id: DetectionId, update: Partial<Detection> | ((current: Detection) => Detection)): DetectionFrame;
22
+ remove(id: DetectionId): DetectionFrame;
23
+ replace(frame: DetectionFrame): DetectionFrame;
24
+ transact(mutate: (detections: EditableDetection[]) => void, detectionIds?: readonly DetectionId[]): DetectionFrame;
25
+ subscribe(listener: AnnotationFrameMutationListener): () => void;
26
+ destroy(): void;
27
+ }
28
+ export declare function createEditableAnnotationFrameSession(initialFrame: DetectionFrame): EditableAnnotationFrameSession;
29
+ type DeepMutable<T> = T extends (...args: never[]) => unknown ? T : T extends readonly [unknown, ...unknown[]] ? {
30
+ -readonly [TKey in keyof T]: DeepMutable<T[TKey]>;
31
+ } : T extends readonly (infer TValue)[] ? DeepMutable<TValue>[] : T extends object ? {
32
+ -readonly [TKey in keyof T]: DeepMutable<T[TKey]>;
33
+ } : T;
34
+ export {};
35
+ //# sourceMappingURL=editable-annotation-frame-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editable-annotation-frame-session.d.ts","sourceRoot":"","sources":["../../src/detections/editable-annotation-frame-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAC1C,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAEvD,oBAAY,2BAA2B;IACrC,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;IAC3C,QAAQ,CAAC,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC;AAED,MAAM,MAAM,+BAA+B,GAAG,CAC5C,QAAQ,EAAE,uBAAuB,KAC9B,IAAI,CAAC;AAEV,MAAM,WAAW,8BAA8B;IAC7C,WAAW,IAAI,cAAc,CAAC;IAC9B,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAC1D,MAAM,CACJ,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,KAAK,SAAS,CAAC,GAC/D,cAAc,CAAC;IAClB,MAAM,CAAC,EAAE,EAAE,WAAW,GAAG,cAAc,CAAC;IACxC,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CAAC;IAC/C,QAAQ,CACN,MAAM,EAAE,CAAC,UAAU,EAAE,iBAAiB,EAAE,KAAK,IAAI,EACjD,YAAY,CAAC,EAAE,SAAS,WAAW,EAAE,GACpC,cAAc,CAAC;IAClB,SAAS,CAAC,QAAQ,EAAE,+BAA+B,GAAG,MAAM,IAAI,CAAC;IACjE,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,oCAAoC,CAClD,YAAY,EAAE,cAAc,GAC3B,8BAA8B,CA+IhC;AAED,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,GACzD,CAAC,GACD,CAAC,SAAS,SAAS,CAAC,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC,GACxC;IAAE,CAAC,UAAU,IAAI,IAAI,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;CAAE,GACrD,CAAC,SAAS,SAAS,CAAC,MAAM,MAAM,CAAC,EAAE,GACjC,WAAW,CAAC,MAAM,CAAC,EAAE,GACrB,CAAC,SAAS,MAAM,GACd;IAAE,CAAC,UAAU,IAAI,IAAI,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;CAAE,GACrD,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ColdDetectionFrameStore } from "#types/detection-timeline";
2
+ export declare function createMemoryColdDetectionFrameStore(): ColdDetectionFrameStore;
3
+ //# sourceMappingURL=memory-cold-detection-frame-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-cold-detection-frame-store.d.ts","sourceRoot":"","sources":["../../src/detections/memory-cold-detection-frame-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EAIxB,MAAM,2BAA2B,CAAC;AAuBnC,wBAAgB,mCAAmC,IAAI,uBAAuB,CA0F7E"}
@@ -0,0 +1,8 @@
1
+ import type { ColdDetectionFrameStore, DetectionFrameRetentionOptions, WritableDetectionFrameSource } from "#types/detection-timeline";
2
+ export declare function createWritableDetectionFrameSource(options: {
3
+ readonly store: ColdDetectionFrameStore;
4
+ readonly datasetId: string;
5
+ readonly chunkDurationSeconds?: number;
6
+ readonly retention?: DetectionFrameRetentionOptions;
7
+ }): WritableDetectionFrameSource;
8
+ //# sourceMappingURL=writable-detection-frame-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writable-detection-frame-source.d.ts","sourceRoot":"","sources":["../../src/detections/writable-detection-frame-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EAEvB,8BAA8B,EAE9B,4BAA4B,EAC7B,MAAM,2BAA2B,CAAC;AAsBnC,wBAAgB,kCAAkC,CAAC,OAAO,EAAE;IAC1D,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,8BAA8B,CAAC;CACrD,GAAG,4BAA4B,CA6S/B"}
@@ -0,0 +1,65 @@
1
+ export { createArrayDetectionFrameSource } from "#detections/array-detection-frame-source";
2
+ export { createBufferedDetectionTimeline, createIdleDetectionBufferState, getBufferedDetectionTimelineFrameSnapshot, } from "#detections/buffered-detection-timeline";
3
+ export { createColdDetectionFrameSource } from "#detections/cold-detection-frame-source";
4
+ export { createCompositeDetectionFrameSource } from "#detections/composite-detection-frame-source";
5
+ export { AnnotationFrameMutationKind, createEditableAnnotationFrameSession, type AnnotationFrameMutation, type AnnotationFrameMutationListener, type DetectionId, type EditableDetection, type EditableAnnotationFrameSession, } from "#detections/editable-annotation-frame-session";
6
+ export { createMemoryColdDetectionFrameStore } from "#detections/memory-cold-detection-frame-store";
7
+ export { createWritableDetectionFrameSource } from "#detections/writable-detection-frame-source";
8
+ export { createDetectionPickKey, pickDetectionAtPoint, pickDetectionByMaskId, rebaseDetectionPickToFrame, } from "#interactions/detection-picker";
9
+ export { createViewportController, mediaToScreen, screenToMedia, } from "#interactions/viewport-controller";
10
+ export { createAnnotationEditingEngine } from "#interactions/annotation-editing-engine";
11
+ export { applyAnnotationHandleDrag, deleteAnnotationVertex, findClosestAnnotationSegment, getAnnotationHandles, offsetDetection, pickAnnotationHandle, } from "#interactions/annotation-handles";
12
+ export { BaseBoxStyle } from "#styles/box-style";
13
+ export type { BaseBoxStyleOptions } from "#styles/box-style";
14
+ export { BaseFocusStyle } from "#styles/focus-style";
15
+ export type { BaseFocusStyleOptions } from "#styles/focus-style";
16
+ export { BaseInteractionStyle } from "#styles/interaction-style";
17
+ export type { BaseInteractionStyleOptions } from "#styles/interaction-style";
18
+ export { BaseLabelStyle } from "#styles/label-style";
19
+ export type { BaseLabelStyleOptions } from "#styles/label-style";
20
+ export { BaseMaskStyle } from "#styles/mask-style";
21
+ export type { BaseMaskStyleOptions } from "#styles/mask-style";
22
+ export { BasePolygonStyle } from "#styles/polygon-style";
23
+ export type { BasePolygonStyleOptions } from "#styles/polygon-style";
24
+ export { BasePolylineStyle } from "#styles/polyline-style";
25
+ export type { BasePolylineStyleOptions } from "#styles/polyline-style";
26
+ export { BaseKeypointStyle } from "#styles/keypoint-style";
27
+ export type { BaseKeypointStyleOptions } from "#styles/keypoint-style";
28
+ export { createDefaultAnnotationPresentation, type DefaultAnnotationPresentationOptions, } from "#styles/default-annotation-presentation";
29
+ export { createSourceAwarePresentation, type PresentationStyleSet, type SourcePresentation, type SourcePresentationEntry, } from "#styles/source-presentation";
30
+ export { resolveStyleValue } from "#styles/style-value";
31
+ export { copySortedDetectionFrames, decodeCompressedRleMask, decodeCompressedRleCounts, detectionFrameOverlapsRange, encodeCompressedRleCounts, filterDetectionFramesForRange, selectDetectionFrame, validateDetectionFrames, type DecodedDetectionMask, } from "#utils/detection-frames";
32
+ export { convertDetectionBoxToMask, convertDetectionBoxToPolygon, convertDetectionMaskToBox, convertDetectionMaskToPolygon, convertDetectionPolygonToBox, convertDetectionPolygonToMask, mergeDetectionMasks, mergeDetectionPolygonsByClass, polygonToRect, rasterizePolygonToMask, rasterizeRectToMask, rectToPolygon, type MediaDimensions, } from "#utils/detection-conversions";
33
+ export { DetectionMaskPayloadFormat, computeDetectionMaskRect, computeMaskBounds, decodeDetectionMaskPayload, detectMaskBorders, encodeBinaryMask, encodeBinaryMaskWithBounds, encodeDetectionMaskPayload, extractMaskContour, extractMaskRectRuns, isDeflatedBase64DetectionMaskPayload, type DetectionMaskCompressionCodec, type EncodedBinaryMask, type MaskRectRun, } from "#utils/detection-masks";
34
+ export { centerRectToTopLeftRect, containsPoint, distanceToSegment, getDetectionRect, getPointsRect, pointInPolygon, polygonArea, rectArea, topLeftRectToCenterRect, } from "#utils/geometry";
35
+ export { canReuseMaskStyleArtifacts, resolveMaskStyleOpacity, } from "#utils/mask-style";
36
+ export { DEFAULT_DETECTION_CLASS_STYLES, DEFAULT_DETECTION_COLOR_SEQUENCE, SUPERVISION_ROBOFLOW_COLOR, normalizeDetectionClassName, resolveDetectionClassColorStyle, type DetectionClassColorStyle, } from "#utils/color-palette";
37
+ export { MAX_ID_MASK_PALETTE_ENTRIES, MAX_ID_MASK_STROKE_WIDTH, createIdMaskFrame, type IdMaskFrame, type IdMaskInstruction, } from "#utils/id-mask-frame";
38
+ export { includeDefined } from "#utils/object";
39
+ export { lightenColor, resolveContrastTextColor } from "#utils/color";
40
+ export { resolveAnnotationStyleState } from "#utils/annotation-visibility";
41
+ export { BoxShape, BoxStrokeAlignment } from "#types/box-style";
42
+ export type { ViewportController, ViewportTransform } from "#types/viewport";
43
+ export { AnnotationGeometryKind, AnnotationGestureStateKind, AnnotationHandleKind, type AnnotationCreationTool, type AnnotationEditingEngine, type AnnotationEditingEngineOptions, type AnnotationEditingPreviewStyleContext, type AnnotationEditingState, type AnnotationHandleDefinition, type AnnotationOverlayStyle, type AnnotationPointerInput, type PreviewOverlayData, type PreviewOverlayPoint, } from "#types/editing";
44
+ export type { BoxDrawInstruction, BoxFillStyle, BoxStrokeStyle, BoxStyle, BoxStyleContext, } from "#types/box-style";
45
+ export { DetectionBufferStatus, DetectionFrameRetentionMode, DetectionFrameSelectionMode, type BufferedDetectionTimeline, type ColdDetectionFrameStore, type ColdDetectionFrameStoreLoadOptions, type ColdDetectionFrameStoreWriteOptions, type ColdDetectionFrameStoreWriteSummary, type ChunkedDetectionFrameSourceOptions, type CompositeDetectionFrameSourceEntry, type CompositeDetectionFrameSourceOptions, type DetectionBufferOptions, type DetectionBufferPrepareOptions, type DetectionBufferState, type DetectionFrameChunk, type DetectionFrameChunkDescriptor, type DetectionFrameChunkFetch, type DetectionFrameChunkManifest, type DetectionFrameRetentionOptions, type DetectionFrameSelectionOptions, type DetectionFrameSource, type DetectionFrameSourceChanges, type DetectionFrameSourceVersionRange, type DetectionPlaybackGateOptions, type DetectionTimelineContext, type WritableDetectionFrameSource, } from "#types/detection-timeline";
46
+ export { DetectionMaskEncoding, KeypointVisibility, type CompressedRleDetectionMask, type Detection, type DetectionFrame, type DetectionMask, type KeypointEdge, type KeypointGeometry, type Point, type PolygonGeometry, type PolylineGeometry, type Rect, type SkeletonDefinition, type SkeletonDefinitions, type SkeletonEdgeDefinition, type SkeletonVertexDefinition, type TopLeftRect, } from "#types/detections";
47
+ export type { MediaFrameMetadata, MediaTimelineMetadata, PlatformMediaFrame, PlatformMediaFrameSource, } from "#types/media";
48
+ export { MediaRendererFit, MediaRendererPlaybackState, MediaSourceStatus, } from "#types/media-rendering";
49
+ export type { MediaFrameDiagnostics, MediaFrameRenderTimings, MediaRendererDiagnosticsOptions, MediaRendererPresentation, AnnotationVisibility, MediaDisplayAdjustments, MediaRendererQuality, MediaRendererState, MediaRendererStateController, MediaSourceState, } from "#types/media-rendering";
50
+ export { MediaSessionActivityKind, MediaSessionActivityStatus, MediaSessionMode, MediaSessionStatus, } from "#types/session-lifecycle";
51
+ export type { MediaSessionActivity, MediaSessionLifecycleState, MediaSessionStateListener, MediaSessionStateUnsubscribe, } from "#types/session-lifecycle";
52
+ export type { FocusDrawInstruction, FocusFallbackStyle, FocusFillStyle, FocusStyle, FocusStyleContext, FocusStyleValue, } from "#types/focus-style";
53
+ export { FocusTargetMode } from "#types/focus-style";
54
+ export { DetectionPickTarget, MediaInteractionMode, type DetectionPickOptions, type DetectionPickPoint, type DetectionPickResult, type DetectionSelectionOptions, type MediaInteractionOptions, } from "#types/interaction";
55
+ export { DetectionInteractionState, type InteractionPresentation, type InteractionStyle, type InteractionStyleContext, } from "#types/interaction-style";
56
+ export type { LabelBackgroundStyle, LabelDrawInstruction, LabelOffsetStyle, LabelStyle, LabelStyleContext, LabelTextStyle, } from "#types/label-style";
57
+ export { LabelPlacement, LabelVisibilityMode } from "#types/label-style";
58
+ export type { MaskDrawInstruction, MaskStrokeStyle, MaskStrokeStyleOptions, MaskStyle, MaskStyleContext, } from "#types/mask-style";
59
+ export { MaskRenderMode } from "#types/mask-style";
60
+ export type { PolygonDrawInstruction, PolygonStyle, PolygonStyleContext, } from "#types/polygon-style";
61
+ export type { PolylineDrawInstruction, PolylineStyle, PolylineStyleContext, } from "#types/polyline-style";
62
+ export { KeypointMarkerShape } from "#types/keypoint-style";
63
+ export type { KeypointDrawInstruction, KeypointEdgeDrawInstruction, KeypointMarkerDrawInstruction, KeypointStyle, KeypointStyleContext, } from "#types/keypoint-style";
64
+ export type { AnnotationStyleContext, DetectionStylePredicate, DetectionStyleValue, } from "#types/style";
65
+ //# sourceMappingURL=index.d.ts.map