supervision 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/index.d.ts +11 -3
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1158 -97
  4. package/dist/index.js.map +1 -1
  5. package/dist/mask-preparation.worker.js +43 -9
  6. package/dist/mask-preparation.worker.js.map +1 -1
  7. package/dist/render-preparation/mask-frame-artifact.d.ts +6 -0
  8. package/dist/render-preparation/mask-frame-artifact.d.ts.map +1 -1
  9. package/dist/render-preparation/mask-frame-compositor.d.ts +1 -0
  10. package/dist/render-preparation/mask-frame-compositor.d.ts.map +1 -1
  11. package/dist/render-preparation/mask-frame-preparer.d.ts.map +1 -1
  12. package/dist/render-preparation/mask-preparation-worker-protocol.d.ts +1 -0
  13. package/dist/render-preparation/mask-preparation-worker-protocol.d.ts.map +1 -1
  14. package/dist/renderers/annotation-shape-styles.d.ts +17 -0
  15. package/dist/renderers/annotation-shape-styles.d.ts.map +1 -0
  16. package/dist/renderers/media-renderer-core.d.ts.map +1 -1
  17. package/dist/renderers/media-renderer-scene.d.ts +17 -2
  18. package/dist/renderers/media-renderer-scene.d.ts.map +1 -1
  19. package/dist/renderers/pixi-annotation-overlay-layer.d.ts.map +1 -1
  20. package/dist/renderers/pixi-focus-layer.d.ts +1 -0
  21. package/dist/renderers/pixi-focus-layer.d.ts.map +1 -1
  22. package/dist/renderers/pixi-interaction-layer.d.ts +2 -0
  23. package/dist/renderers/pixi-interaction-layer.d.ts.map +1 -1
  24. package/dist/renderers/pixi-interaction-presentation-layer.d.ts +2 -1
  25. package/dist/renderers/pixi-interaction-presentation-layer.d.ts.map +1 -1
  26. package/dist/renderers/pixi-mask-halo.d.ts +94 -0
  27. package/dist/renderers/pixi-mask-halo.d.ts.map +1 -0
  28. package/dist/renderers/pixi-mask-layer.d.ts +10 -1
  29. package/dist/renderers/pixi-mask-layer.d.ts.map +1 -1
  30. package/dist/renderers/pixi-media-scene.d.ts.map +1 -1
  31. package/dist/renderers/pixi-path.d.ts +13 -7
  32. package/dist/renderers/pixi-path.d.ts.map +1 -1
  33. package/dist/renderers/pixi-polygon-layer.d.ts.map +1 -1
  34. package/dist/renderers/pixi-region-layer.d.ts +42 -0
  35. package/dist/renderers/pixi-region-layer.d.ts.map +1 -0
  36. package/dist/renderers/pixi-scene-layer-slot.d.ts +1 -0
  37. package/dist/renderers/pixi-scene-layer-slot.d.ts.map +1 -1
  38. package/dist/renderers/pixi-vector-layer.d.ts +3 -1
  39. package/dist/renderers/pixi-vector-layer.d.ts.map +1 -1
  40. package/dist/sessions/media-session.d.ts.map +1 -1
  41. package/dist/types/media-renderer.d.ts +1 -1
  42. package/dist/types/media-renderer.d.ts.map +1 -1
  43. package/node_modules/supervision-js-core/dist/index.d.ts +17 -3
  44. package/node_modules/supervision-js-core/dist/index.d.ts.map +1 -1
  45. package/node_modules/supervision-js-core/dist/index.js +708 -74
  46. package/node_modules/supervision-js-core/dist/index.js.map +1 -1
  47. package/node_modules/supervision-js-core/dist/interactions/detection-picker.d.ts +18 -0
  48. package/node_modules/supervision-js-core/dist/interactions/detection-picker.d.ts.map +1 -1
  49. package/node_modules/supervision-js-core/dist/styles/annotation-renderer-presentation.d.ts.map +1 -1
  50. package/node_modules/supervision-js-core/dist/styles/annotation-renderer-registry.d.ts +13 -6
  51. package/node_modules/supervision-js-core/dist/styles/annotation-renderer-registry.d.ts.map +1 -1
  52. package/node_modules/supervision-js-core/dist/styles/box-corner-style.d.ts +14 -0
  53. package/node_modules/supervision-js-core/dist/styles/box-corner-style.d.ts.map +1 -0
  54. package/node_modules/supervision-js-core/dist/styles/box-style.d.ts.map +1 -1
  55. package/node_modules/supervision-js-core/dist/styles/default-annotation-presentation.d.ts +19 -0
  56. package/node_modules/supervision-js-core/dist/styles/default-annotation-presentation.d.ts.map +1 -1
  57. package/node_modules/supervision-js-core/dist/styles/interaction-style.d.ts.map +1 -1
  58. package/node_modules/supervision-js-core/dist/styles/keypoint-style.d.ts.map +1 -1
  59. package/node_modules/supervision-js-core/dist/styles/marker-style.d.ts +14 -0
  60. package/node_modules/supervision-js-core/dist/styles/marker-style.d.ts.map +1 -0
  61. package/node_modules/supervision-js-core/dist/styles/polygon-style.d.ts.map +1 -1
  62. package/node_modules/supervision-js-core/dist/styles/polyline-style.d.ts.map +1 -1
  63. package/node_modules/supervision-js-core/dist/styles/source-presentation.d.ts +8 -0
  64. package/node_modules/supervision-js-core/dist/styles/source-presentation.d.ts.map +1 -1
  65. package/node_modules/supervision-js-core/dist/styles/stroke-style.d.ts +12 -0
  66. package/node_modules/supervision-js-core/dist/styles/stroke-style.d.ts.map +1 -0
  67. package/node_modules/supervision-js-core/dist/types/annotation-renderer.d.ts +124 -4
  68. package/node_modules/supervision-js-core/dist/types/annotation-renderer.d.ts.map +1 -1
  69. package/node_modules/supervision-js-core/dist/types/box-corner-style.d.ts +31 -0
  70. package/node_modules/supervision-js-core/dist/types/box-corner-style.d.ts.map +1 -0
  71. package/node_modules/supervision-js-core/dist/types/box-style.d.ts +4 -17
  72. package/node_modules/supervision-js-core/dist/types/box-style.d.ts.map +1 -1
  73. package/node_modules/supervision-js-core/dist/types/ellipse-style.d.ts +30 -0
  74. package/node_modules/supervision-js-core/dist/types/ellipse-style.d.ts.map +1 -0
  75. package/node_modules/supervision-js-core/dist/types/interaction.d.ts +12 -0
  76. package/node_modules/supervision-js-core/dist/types/interaction.d.ts.map +1 -1
  77. package/node_modules/supervision-js-core/dist/types/marker-style.d.ts +46 -0
  78. package/node_modules/supervision-js-core/dist/types/marker-style.d.ts.map +1 -0
  79. package/node_modules/supervision-js-core/dist/types/mask-halo-style.d.ts +29 -0
  80. package/node_modules/supervision-js-core/dist/types/mask-halo-style.d.ts.map +1 -0
  81. package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts +18 -2
  82. package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts.map +1 -1
  83. package/node_modules/supervision-js-core/dist/types/paint-style.d.ts +36 -0
  84. package/node_modules/supervision-js-core/dist/types/paint-style.d.ts.map +1 -0
  85. package/node_modules/supervision-js-core/dist/types/shape-style.d.ts +112 -0
  86. package/node_modules/supervision-js-core/dist/types/shape-style.d.ts.map +1 -0
  87. package/node_modules/supervision-js-core/dist/utils/shape-geometry.d.ts +50 -0
  88. package/node_modules/supervision-js-core/dist/utils/shape-geometry.d.ts.map +1 -0
  89. package/package.json +1 -1
@@ -2,6 +2,24 @@ import { type DetectionFrame } from "#types/detections";
2
2
  import { type DetectionPickOptions, type DetectionPickPoint, type DetectionPickResult } from "#types/interaction";
3
3
  export declare function pickDetectionAtPoint(frame: DetectionFrame | undefined, point: DetectionPickPoint, options?: DetectionPickOptions): DetectionPickResult | null;
4
4
  export declare function createDetectionPickKey(pick: DetectionPickResult | null): string | null;
5
+ /**
6
+ * Compares the frame-independent membership of two ordered selections.
7
+ *
8
+ * Detection ids retain their runtime type, so numeric `1` and string `"1"`
9
+ * remain distinct identities. Anonymous detections keep their frame-local
10
+ * index identity.
11
+ */
12
+ export declare function haveSameDetectionPickIdentities(current: readonly DetectionPickResult[], next: readonly DetectionPickResult[]): boolean;
5
13
  export declare function rebaseDetectionPickToFrame(pick: DetectionPickResult | null, frame: DetectionFrame | undefined): DetectionPickResult | null;
14
+ /**
15
+ * Carries a pick forward onto a different frame of the same timeline.
16
+ *
17
+ * Same-frame rebases behave exactly like `rebaseDetectionPickToFrame`. Across
18
+ * frames, the pick follows its detection only when the detection id is defined
19
+ * and unique in both frames, so anonymous and duplicate-id detections keep the
20
+ * per-frame lifetime they have today. Returns `null` when the detection has no
21
+ * followable identity or has left the frame.
22
+ */
23
+ export declare function followDetectionPickAcrossFrames(pick: DetectionPickResult | null, frame: DetectionFrame | undefined): DetectionPickResult | null;
6
24
  export declare function pickDetectionByMaskId(frame: DetectionFrame | undefined, maskId: number, point: DetectionPickPoint): DetectionPickResult | null;
7
25
  //# sourceMappingURL=detection-picker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"detection-picker.d.ts","sourceRoot":"","sources":["../../src/interactions/detection-picker.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AA2B5B,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,cAAc,GAAG,SAAS,EACjC,KAAK,EAAE,kBAAkB,EACzB,OAAO,GAAE,oBAAyB,GACjC,mBAAmB,GAAG,IAAI,CA6K5B;AA8CD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,iBActE;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,mBAAmB,GAAG,IAAI,EAChC,KAAK,EAAE,cAAc,GAAG,SAAS,GAChC,mBAAmB,GAAG,IAAI,CA+B5B;AAsBD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,cAAc,GAAG,SAAS,EACjC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,kBAAkB,GACxB,mBAAmB,GAAG,IAAI,CAoB5B"}
1
+ {"version":3,"file":"detection-picker.d.ts","sourceRoot":"","sources":["../../src/interactions/detection-picker.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AA2B5B,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,cAAc,GAAG,SAAS,EACjC,KAAK,EAAE,kBAAkB,EACzB,OAAO,GAAE,oBAAyB,GACjC,mBAAmB,GAAG,IAAI,CA6K5B;AA8CD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,iBActE;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,SAAS,mBAAmB,EAAE,EACvC,IAAI,EAAE,SAAS,mBAAmB,EAAE,WAmBrC;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,mBAAmB,GAAG,IAAI,EAChC,KAAK,EAAE,cAAc,GAAG,SAAS,GAChC,mBAAmB,GAAG,IAAI,CA+B5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,mBAAmB,GAAG,IAAI,EAChC,KAAK,EAAE,cAAc,GAAG,SAAS,GAChC,mBAAmB,GAAG,IAAI,CAmC5B;AA8BD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,cAAc,GAAG,SAAS,EACjC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,kBAAkB,GACxB,mBAAmB,GAAG,IAAI,CAoB5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"annotation-renderer-presentation.d.ts","sourceRoot":"","sources":["../../src/styles/annotation-renderer-presentation.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,qCAAqC,CACnD,YAAY,EAAE,yBAAyB,GACtC,yBAAyB,CAsC3B"}
1
+ {"version":3,"file":"annotation-renderer-presentation.d.ts","sourceRoot":"","sources":["../../src/styles/annotation-renderer-presentation.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,qCAAqC,CACnD,YAAY,EAAE,yBAAyB,GACtC,yBAAyB,CA+C3B"}
@@ -1,21 +1,24 @@
1
1
  import type { AnnotationRendererKind, AnnotationRendererOfKind } from "#types/annotation-renderer";
2
2
  import type { MediaRendererPresentation } from "#types/media-rendering";
3
3
  /** The style contract configured by one renderer kind. */
4
- export type AnnotationRendererStyle<TKind extends AnnotationRendererKind> = NonNullable<AnnotationRendererOfKind<TKind>["style"]>;
4
+ export declare const styledAnnotationRendererKinds: readonly ["box", "box-corners", "ellipse", "keypoints", "label", "mask", "maskHalo", "marker", "polygon", "polyline"];
5
+ export type StyledAnnotationRendererKind = (typeof styledAnnotationRendererKinds)[number];
6
+ export type AnnotationRendererStyle<TKind extends StyledAnnotationRendererKind> = NonNullable<AnnotationRendererOfKind<TKind>["style"]>;
5
7
  /**
6
8
  * The presentation field that carries a renderer kind's style.
7
9
  *
8
10
  * The pairing is derived from the style contracts themselves, so a registry
9
11
  * entry that points a kind at the wrong presentation field does not compile.
10
12
  */
11
- export type AnnotationRendererStyleFieldFor<TKind extends AnnotationRendererKind> = {
13
+ export type AnnotationRendererStyleFieldFor<TKind extends StyledAnnotationRendererKind> = {
12
14
  [TField in keyof MediaRendererPresentation]-?: AnnotationRendererStyle<TKind> extends NonNullable<MediaRendererPresentation[TField]> ? NonNullable<MediaRendererPresentation[TField]> extends AnnotationRendererStyle<TKind> ? TField : never : never;
13
15
  }[keyof MediaRendererPresentation];
14
16
  /** Every presentation field owned by a built-in renderer kind. */
15
17
  export type AnnotationRendererStyleField = {
16
- [TKind in AnnotationRendererKind]: AnnotationRendererStyleFieldFor<TKind>;
17
- }[AnnotationRendererKind];
18
- export interface AnnotationRendererKindMetadata<TKind extends AnnotationRendererKind> {
18
+ [TKind in StyledAnnotationRendererKind]: AnnotationRendererStyleFieldFor<TKind>;
19
+ }[StyledAnnotationRendererKind];
20
+ export interface AnnotationRendererKindMetadata<TKind extends StyledAnnotationRendererKind> {
21
+ readonly cardinality: "singleton";
19
22
  /** Presentation field this kind reads its configured style from. */
20
23
  readonly styleField: AnnotationRendererStyleFieldFor<TKind>;
21
24
  /**
@@ -24,6 +27,9 @@ export interface AnnotationRendererKindMetadata<TKind extends AnnotationRenderer
24
27
  */
25
28
  readonly createCanonicalStyle: () => AnnotationRendererStyle<TKind>;
26
29
  }
30
+ export interface DirectAnnotationRendererKindMetadata {
31
+ readonly cardinality: "multiple";
32
+ }
27
33
  /**
28
34
  * The single source of built-in renderer presentation metadata.
29
35
  *
@@ -32,9 +38,10 @@ export interface AnnotationRendererKindMetadata<TKind extends AnnotationRenderer
32
38
  * registry instead of repeating the kind-to-style mapping.
33
39
  */
34
40
  export type AnnotationRendererRegistry = {
35
- readonly [TKind in AnnotationRendererKind]: AnnotationRendererKindMetadata<TKind>;
41
+ readonly [TKind in AnnotationRendererKind]: TKind extends StyledAnnotationRendererKind ? AnnotationRendererKindMetadata<TKind> : DirectAnnotationRendererKindMetadata;
36
42
  };
37
43
  export declare const annotationRendererRegistry: AnnotationRendererRegistry;
44
+ export declare function isStyleBackedAnnotationRendererKind(kind: AnnotationRendererKind): kind is StyledAnnotationRendererKind;
38
45
  /** Presentation fields owned by the given renderer kinds, in the same order. */
39
46
  export declare function resolveAnnotationRendererStyleFields(kinds: readonly AnnotationRendererKind[]): readonly AnnotationRendererStyleField[];
40
47
  //# sourceMappingURL=annotation-renderer-registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotation-renderer-registry.d.ts","sourceRoot":"","sources":["../../src/styles/annotation-renderer-registry.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,0DAA0D;AAC1D,MAAM,MAAM,uBAAuB,CAAC,KAAK,SAAS,sBAAsB,IACtE,WAAW,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;AAExD;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,CACzC,KAAK,SAAS,sBAAsB,IAClC;KAEA,MAAM,IAAI,MAAM,yBAAyB,CAC1C,CAAC,GAAG,uBAAuB,CAAC,KAAK,CAAC,SAAS,WAAW,CACrD,yBAAyB,CAAC,MAAM,CAAC,CAClC,GACG,WAAW,CACT,yBAAyB,CAAC,MAAM,CAAC,CAClC,SAAS,uBAAuB,CAAC,KAAK,CAAC,GACtC,MAAM,GACN,KAAK,GACP,KAAK;CACV,CAAC,MAAM,yBAAyB,CAAC,CAAC;AAEnC,kEAAkE;AAClE,MAAM,MAAM,4BAA4B,GAAG;KACxC,KAAK,IAAI,sBAAsB,GAAG,+BAA+B,CAAC,KAAK,CAAC;CAC1E,CAAC,sBAAsB,CAAC,CAAC;AAE1B,MAAM,WAAW,8BAA8B,CAC7C,KAAK,SAAS,sBAAsB;IAEpC,oEAAoE;IACpE,QAAQ,CAAC,UAAU,EAAE,+BAA+B,CAAC,KAAK,CAAC,CAAC;IAC5D;;;OAGG;IACH,QAAQ,CAAC,oBAAoB,EAAE,MAAM,uBAAuB,CAAC,KAAK,CAAC,CAAC;CACrE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EACN,KAAK,IAAI,sBAAsB,GAC9B,8BAA8B,CAAC,KAAK,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,0BAsBxC,CAAC;AAEF,gFAAgF;AAChF,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,SAAS,sBAAsB,EAAE,GACvC,SAAS,4BAA4B,EAAE,CAEzC"}
1
+ {"version":3,"file":"annotation-renderer-registry.d.ts","sourceRoot":"","sources":["../../src/styles/annotation-renderer-registry.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,0DAA0D;AAC1D,eAAO,MAAM,6BAA6B,uHAWhC,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,MAAM,uBAAuB,CACjC,KAAK,SAAS,4BAA4B,IACxC,WAAW,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,OAAO,CA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,EAAE,GACvC,SAAS,4BAA4B,EAAE,CAKzC"}
@@ -0,0 +1,14 @@
1
+ import type { Detection } from "#types/detections";
2
+ import type { BaseBoxCornerStyleOptions, BoxCornerDrawInstruction, BoxCornerStyle, BoxCornerStyleContext } from "#types/box-corner-style";
3
+ /**
4
+ * Configurable four-corner decoration derived from a detection rectangle.
5
+ *
6
+ * This is the BoxCornerAnnotator-style facade: it keeps the rectangle semantic
7
+ * and draws only its four open corner segments.
8
+ */
9
+ export declare class BaseBoxCornerStyle implements BoxCornerStyle {
10
+ protected readonly options: BaseBoxCornerStyleOptions;
11
+ constructor(options?: BaseBoxCornerStyleOptions);
12
+ resolve(detection: Detection, context: BoxCornerStyleContext): BoxCornerDrawInstruction | undefined;
13
+ }
14
+ //# sourceMappingURL=box-corner-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box-corner-style.d.ts","sourceRoot":"","sources":["../../src/styles/box-corner-style.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAWjC;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,cAAc;IACvD,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,yBAAyB,CAAC;gBAE1C,OAAO,GAAE,yBAA8B;IAInD,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,qBAAqB,GAC7B,wBAAwB,GAAG,SAAS;CAoExC"}
@@ -1 +1 @@
1
- {"version":3,"file":"box-style.d.ts","sourceRoot":"","sources":["../../src/styles/box-style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACL,QAAQ,EACR,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,QAAQ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AS,CAAC,YAAY,CACpB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,eAAe,GACvB,QAAQ;IAMX,SAAS,CAAC,mBAAmB,CAC3B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,QAAQ,GACd,MAAM,GAAG,SAAS;IAQrB,SAAS,CAAC,aAAa,CACrB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,eAAe,GACvB,cAAc,GAAG,SAAS;IAe7B,SAAS,CAAC,WAAW,CACnB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,eAAe,GACvB,YAAY,GAAG,SAAS;CAY5B"}
@@ -1,9 +1,13 @@
1
+ import { BaseBoxCornerStyle } from "#styles/box-corner-style";
1
2
  import { BaseBoxStyle } from "#styles/box-style";
2
3
  import { BaseKeypointStyle } from "#styles/keypoint-style";
3
4
  import { BaseLabelStyle } from "#styles/label-style";
4
5
  import { BaseMaskStyle } from "#styles/mask-style";
6
+ import { BaseMarkerStyle } from "#styles/marker-style";
7
+ import type { MaskHaloStyle } from "#types/mask-halo-style";
5
8
  import { BasePolygonStyle } from "#styles/polygon-style";
6
9
  import { BasePolylineStyle } from "#styles/polyline-style";
10
+ import type { EllipseStyle } from "#types/ellipse-style";
7
11
  import type { SkeletonDefinitions } from "#types/detections";
8
12
  import type { MediaRendererPresentation } from "#types/media-rendering";
9
13
  export interface DefaultAnnotationPresentationOptions {
@@ -31,9 +35,24 @@ export declare function createDefaultAnnotationPresentation(options?: DefaultAnn
31
35
  * {@link createDefaultAnnotationPresentation}.
32
36
  */
33
37
  export declare function createDefaultBoxStyle(options?: DefaultAnnotationPresentationOptions): BaseBoxStyle;
38
+ /** Canonical opt-in BoxCornerAnnotator-style presentation. */
39
+ export declare function createDefaultBoxCornerStyle(options?: DefaultAnnotationPresentationOptions): BaseBoxCornerStyle;
40
+ /**
41
+ * Matches the Python Supervision EllipseAnnotator: an elliptical footprint
42
+ * arc under the detection box, swept from -45deg to 235deg, in the class
43
+ * color.
44
+ */
45
+ export declare function createDefaultEllipseStyle(options?: DefaultAnnotationPresentationOptions): EllipseStyle;
34
46
  export declare function createDefaultKeypointStyle(options?: DefaultAnnotationPresentationOptions): BaseKeypointStyle;
35
47
  export declare function createDefaultLabelStyle(options?: DefaultAnnotationPresentationOptions): BaseLabelStyle;
36
48
  export declare function createDefaultMaskStyle(options?: DefaultAnnotationPresentationOptions): BaseMaskStyle;
49
+ /** Canonical opt-in marker presentation. */
50
+ export declare function createDefaultMarkerStyle(): BaseMarkerStyle;
51
+ /**
52
+ * Canonical mask halo: a class-colored glow that follows the mask silhouette.
53
+ * Used when the `maskHalo` renderer is listed without an explicit style.
54
+ */
55
+ export declare function createDefaultMaskHaloStyle(options?: DefaultAnnotationPresentationOptions): MaskHaloStyle;
37
56
  export declare function createDefaultPolygonStyle(options?: DefaultAnnotationPresentationOptions): BasePolygonStyle;
38
57
  export declare function createDefaultPolylineStyle(options?: DefaultAnnotationPresentationOptions): BasePolylineStyle;
39
58
  //# sourceMappingURL=default-annotation-presentation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-annotation-presentation.d.ts","sourceRoot":"","sources":["../../src/styles/default-annotation-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAa,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGxE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAkBxE,MAAM,WAAW,oCAAoC;IACnD;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CACvB,SAAS,EAAE,MAAM,GAAG,SAAS,KAC1B,MAAM,GAAG,SAAS,CAAC;IACxB,gEAAgE;IAChE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,wEAAwE;IACxE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CACpD;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CACjD,OAAO,GAAE,oCAAyC,GACjD,yBAAyB,CAS3B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,oCAAyC,GACjD,YAAY,CAuBd;AAED,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,oCAAyC,GACjD,iBAAiB,CAwBnB;AAED,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,oCAAyC,GACjD,cAAc,CAoBhB;AAED,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,oCAAyC,GACjD,aAAa,CAcf;AAED,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,oCAAyC,GACjD,gBAAgB,CAclB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,oCAAyC,GACjD,iBAAiB,CAUnB"}
1
+ {"version":3,"file":"default-annotation-presentation.d.ts","sourceRoot":"","sources":["../../src/styles/default-annotation-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,O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BAAmB,CAC7C,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,EAC9B,oBAAoB,CACrB,CAAC;IACF,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IACpE,QAAQ,CAAC,YAAY,CAAC,EAAE,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;CACvE;AAED,qBAAa,iBAAkB,YAAW,aAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,GAAE,wBAA6B;IAEnE,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,oBAAoB,GAC5B,uBAAuB,GAAG,SAAS;CA8FvC"}
@@ -0,0 +1,14 @@
1
+ import type { Detection } from "#types/detections";
2
+ import type { BaseMarkerStyleOptions, MarkerDrawInstruction, MarkerStyle, MarkerStyleContext } from "#types/marker-style";
3
+ /**
4
+ * Configurable marker renderer style anchored to semantic detection geometry.
5
+ *
6
+ * Use `center` for any domain-specific anchor (keypoint, centroid, or custom
7
+ * metadata). Without it, the marker lands at the detection rectangle center.
8
+ */
9
+ export declare class BaseMarkerStyle implements MarkerStyle {
10
+ protected readonly options: BaseMarkerStyleOptions;
11
+ constructor(options?: BaseMarkerStyleOptions);
12
+ resolve(detection: Detection, context: MarkerStyleContext): MarkerDrawInstruction | undefined;
13
+ }
14
+ //# sourceMappingURL=marker-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marker-style.d.ts","sourceRoot":"","sources":["../../src/styles/marker-style.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAM7B;;;;;GAKG;AACH,qBAAa,eAAgB,YAAW,WAAW;IACjD,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;gBAEvC,OAAO,GAAE,sBAA2B;IAIhD,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,kBAAkB,GAC1B,qBAAqB,GAAG,SAAS;CAkFrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"polygon-style.d.ts","sourceRoot":"","sources":["../../src/styles/polygon-style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EACV,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,mBAAmB,CACjC,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,EAC5B,mBAAmB,CACpB,CAAC;IACF,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CACnC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,EAC9B,mBAAmB,CACpB,CAAC;IACF,QAAQ,CAAC,YAAY,CAAC,EAAE,uBAAuB,CAAC,mBAAmB,CAAC,CAAC;CACtE;AAED,qBAAa,gBAAiB,YAAW,YAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,GAAE,uBAA4B;IAElE,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,mBAAmB,GAC3B,sBAAsB,GAAG,SAAS;CAsCtC"}
1
+ {"version":3,"file":"polygon-style.d.ts","sourceRoot":"","sources":["../../src/styles/polygon-style.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAA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E,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;CACvE;AAED,qBAAa,iBAAkB,YAAW,aAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,GAAE,wBAA6B;IAEnE,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,oBAAoB,GAC5B,uBAAuB,GAAG,SAAS;CA6BvC"}
1
+ {"version":3,"file":"polyline-style.d.ts","sourceRoot":"","sources":["../../src/styles/polyline-style.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EACV,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CACnC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,EAC9B,oBAAoB,CACrB,CAAC;IACF,QAAQ,CAAC,YAAY,CAAC,EAAE,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;CACvE;AAED,qBAAa,iBAAkB,YAAW,aAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,GAAE,wBAA6B;IAEnE,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,oBAAoB,GAC5B,uBAAuB,GAAG,SAAS;CAyBvC"}
@@ -1,15 +1,23 @@
1
+ import type { BoxCornerStyle } from "#types/box-corner-style";
1
2
  import type { AnnotationRendererKind } from "#types/annotation-renderer";
2
3
  import type { BoxStyle } from "#types/box-style";
4
+ import type { EllipseStyle } from "#types/ellipse-style";
3
5
  import type { LabelStyle } from "#types/label-style";
4
6
  import type { MaskStyle } from "#types/mask-style";
7
+ import type { MaskHaloStyle } from "#types/mask-halo-style";
8
+ import type { MarkerStyle } from "#types/marker-style";
5
9
  import type { PolygonStyle } from "#types/polygon-style";
6
10
  import type { PolylineStyle } from "#types/polyline-style";
7
11
  import type { KeypointStyle } from "#types/keypoint-style";
8
12
  export interface PresentationStyleSet {
9
13
  readonly boxStyle?: BoxStyle | null;
14
+ readonly boxCornerStyle?: BoxCornerStyle | null;
15
+ readonly ellipseStyle?: EllipseStyle | null;
10
16
  readonly keypointStyle?: KeypointStyle | null;
11
17
  readonly labelStyle?: LabelStyle | null;
18
+ readonly maskHaloStyle?: MaskHaloStyle | null;
12
19
  readonly maskStyle?: MaskStyle | null;
20
+ readonly markerStyle?: MarkerStyle | null;
13
21
  readonly polygonStyle?: PolygonStyle | null;
14
22
  readonly polylineStyle?: PolylineStyle | null;
15
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"source-presentation.d.ts","sourceRoot":"","sources":["../../src/styles/source-presentation.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAEV,QAAQ,EAET,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAEV,UAAU,EAEX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAEV,SAAS,EAEV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAEV,YAAY,EAEb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAEV,aAAa,EAEd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAEV,aAAa,EAEd,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;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;AAED,wBAAgB,6BAA6B,CAC3C,aAAa,SAAS,oBAAoB,EAE1C,kBAAkB,EAAE,aAAa,EACjC,OAAO,EAAE,SAAS,uBAAuB,EAAE,EAC3C,OAAO,CAAC,EAAE,8BAA8B,GACvC,aAAa,CAAC;AACjB,wBAAgB,6BAA6B,CAC3C,kBAAkB,EAAE,oBAAoB,GAAG,SAAS,EACpD,OAAO,EAAE,SAAS,uBAAuB,EAAE,EAC3C,OAAO,CAAC,EAAE,8BAA8B,GACvC,oBAAoB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { StrokeStyle } from "#types/paint-style";
2
+ /**
3
+ * Resolves the renderer-neutral stroke contract without dropping optional
4
+ * geometry controls as styles move from public configuration to draw
5
+ * instructions.
6
+ *
7
+ * Keep this as the single normalization point for every built-in style. That
8
+ * makes additions to `StrokeStyle` deliberate instead of relying on each style
9
+ * implementation to copy a growing property list correctly.
10
+ */
11
+ export declare function resolveStrokeStyle(stroke: Partial<StrokeStyle> | undefined, defaults: StrokeStyle): StrokeStyle;
12
+ //# sourceMappingURL=stroke-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stroke-style.d.ts","sourceRoot":"","sources":["../../src/styles/stroke-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS,EACxC,QAAQ,EAAE,WAAW,GACpB,WAAW,CAiBb"}
@@ -1,16 +1,22 @@
1
1
  import type { BoxStyle } from "#types/box-style";
2
+ import type { BoxCornerStyle } from "#types/box-corner-style";
3
+ import type { EllipseStyle } from "#types/ellipse-style";
2
4
  import type { KeypointStyle } from "#types/keypoint-style";
3
5
  import type { LabelStyle } from "#types/label-style";
6
+ import type { MaskHaloStyle } from "#types/mask-halo-style";
4
7
  import type { MaskStyle } from "#types/mask-style";
8
+ import type { MarkerStyle } from "#types/marker-style";
5
9
  import type { PolygonStyle } from "#types/polygon-style";
6
10
  import type { PolylineStyle } from "#types/polyline-style";
11
+ import type { AnnotationStyleContext } from "#types/style";
12
+ import type { Detection } from "#types/detections";
7
13
  /**
8
14
  * The built-in annotation renderer vocabulary.
9
15
  *
10
16
  * These stay plain string literals so `{ kind: "box" }` remains assignable to
11
17
  * the public descriptor union from JavaScript and TypeScript alike.
12
18
  */
13
- export declare const annotationRendererKinds: readonly ["box", "keypoints", "label", "mask", "polygon", "polyline"];
19
+ export declare const annotationRendererKinds: readonly ["box", "box-corners", "ellipse", "keypoints", "label", "mask", "maskHalo", "marker", "polygon", "polyline", "region"];
14
20
  /** One supported built-in annotation renderer kind. */
15
21
  export type AnnotationRendererKind = (typeof annotationRendererKinds)[number];
16
22
  /**
@@ -20,7 +26,7 @@ export type AnnotationRendererKind = (typeof annotationRendererKinds)[number];
20
26
  * consumes semantic detections and contributes to the renderer-owned scene;
21
27
  * individual backends decide how to draw or prepare it.
22
28
  */
23
- export type AnnotationRenderer = BoxAnnotationRenderer | KeypointAnnotationRenderer | LabelAnnotationRenderer | MaskAnnotationRenderer | PolygonAnnotationRenderer | PolylineAnnotationRenderer;
29
+ export type AnnotationRenderer = BoxAnnotationRenderer | BoxCornerAnnotationRenderer | EllipseAnnotationRenderer | KeypointAnnotationRenderer | LabelAnnotationRenderer | MaskAnnotationRenderer | MaskHaloAnnotationRenderer | MarkerAnnotationRenderer | PolygonAnnotationRenderer | PolylineAnnotationRenderer | RegionAnnotationRenderer;
24
30
  /**
25
31
  * The descriptor of one renderer kind.
26
32
  *
@@ -39,6 +45,14 @@ export interface BoxAnnotationRenderer extends BaseAnnotationRenderer {
39
45
  readonly kind: "box";
40
46
  readonly style?: BoxStyle | null;
41
47
  }
48
+ export interface BoxCornerAnnotationRenderer extends BaseAnnotationRenderer {
49
+ readonly kind: "box-corners";
50
+ readonly style?: BoxCornerStyle | null;
51
+ }
52
+ export interface EllipseAnnotationRenderer extends BaseAnnotationRenderer {
53
+ readonly kind: "ellipse";
54
+ readonly style?: EllipseStyle | null;
55
+ }
42
56
  export interface KeypointAnnotationRenderer extends BaseAnnotationRenderer {
43
57
  readonly kind: "keypoints";
44
58
  readonly style?: KeypointStyle | null;
@@ -51,6 +65,21 @@ export interface MaskAnnotationRenderer extends BaseAnnotationRenderer {
51
65
  readonly kind: "mask";
52
66
  readonly style?: MaskStyle | null;
53
67
  }
68
+ /**
69
+ * Soft glow that follows the exact mask silhouette.
70
+ *
71
+ * The backend blurs the prepared mask coverage on the GPU and reuses the
72
+ * mask renderer's prepared artifacts; listing this kind without the mask
73
+ * renderer still prepares the required mask coverage internally.
74
+ */
75
+ export interface MaskHaloAnnotationRenderer extends BaseAnnotationRenderer {
76
+ readonly kind: "maskHalo";
77
+ readonly style?: MaskHaloStyle | null;
78
+ }
79
+ export interface MarkerAnnotationRenderer extends BaseAnnotationRenderer {
80
+ readonly kind: "marker";
81
+ readonly style?: MarkerStyle | null;
82
+ }
54
83
  export interface PolygonAnnotationRenderer extends BaseAnnotationRenderer {
55
84
  readonly kind: "polygon";
56
85
  readonly style?: PolygonStyle | null;
@@ -59,11 +88,102 @@ export interface PolylineAnnotationRenderer extends BaseAnnotationRenderer {
59
88
  readonly kind: "polyline";
60
89
  readonly style?: PolylineStyle | null;
61
90
  }
91
+ /** Sources currently supported by a region renderer. */
92
+ export declare const RegionRendererSourceKind: {
93
+ readonly Asset: "asset";
94
+ };
95
+ export type RegionRendererSourceKind = (typeof RegionRendererSourceKind)[keyof typeof RegionRendererSourceKind];
96
+ /** Media-space regions currently supported by a region renderer. */
97
+ export declare const RegionRendererRegionKind: {
98
+ readonly Bounds: "bounds";
99
+ readonly KeypointAnchor: "keypoint-anchor";
100
+ };
101
+ export type RegionRendererRegionKind = (typeof RegionRendererRegionKind)[keyof typeof RegionRendererRegionKind];
102
+ /** Composition modes currently supported by a region renderer. */
103
+ export declare const RegionRendererComposeMode: {
104
+ readonly Over: "over";
105
+ };
106
+ export type RegionRendererComposeMode = (typeof RegionRendererComposeMode)[keyof typeof RegionRendererComposeMode];
107
+ export type RegionRendererTargetValue = string | number | readonly (string | number)[];
108
+ export type RegionRendererTargetContext = AnnotationStyleContext;
109
+ /** Selects detections consumed by a region renderer. All configured fields match. */
110
+ export interface RegionRendererTarget {
111
+ readonly id?: RegionRendererTargetValue;
112
+ readonly className?: string | readonly string[];
113
+ readonly sourceId?: string | readonly string[];
114
+ readonly resolve?: (detection: Detection, context: RegionRendererTargetContext) => boolean;
115
+ }
116
+ /** A browser-loadable image or animated GIF. Backend asset types stay private. */
117
+ export interface RegionRendererAssetReference {
118
+ readonly src: string;
119
+ }
120
+ export interface RegionRendererAssetSource {
121
+ readonly kind: typeof RegionRendererSourceKind.Asset;
122
+ readonly asset: RegionRendererAssetReference;
123
+ }
124
+ export interface RegionRendererBoundsRegion {
125
+ readonly kind: typeof RegionRendererRegionKind.Bounds;
126
+ }
127
+ /**
128
+ * Resolves one point-sized region from semantic keypoints.
129
+ *
130
+ * A numeric anchor addresses one keypoint index. `"head"` resolves the visible
131
+ * COCO face keypoints (indices 0 through 4) and falls back to the top of the
132
+ * detection bounds when those points are unavailable.
133
+ */
134
+ export interface RegionRendererKeypointAnchorRegion {
135
+ readonly kind: typeof RegionRendererRegionKind.KeypointAnchor;
136
+ readonly anchor: number | "head";
137
+ }
138
+ export type RegionRendererRegion = RegionRendererBoundsRegion | RegionRendererKeypointAnchorRegion;
139
+ /** Media-space transform applied after a target region is resolved. */
140
+ export interface RegionRendererTransform {
141
+ /** Uniform scale relative to the resolved region. Defaults to 1. */
142
+ readonly scale?: number;
143
+ /** Region-relative translation. `{ x: 1, y: 1 }` moves one region size. */
144
+ readonly offset?: {
145
+ readonly x: number;
146
+ readonly y: number;
147
+ };
148
+ /** Clockwise rotation in radians. Defaults to 0. */
149
+ readonly rotation?: number;
150
+ /** Sprite opacity from 0 through 1. Defaults to 1. */
151
+ readonly opacity?: number;
152
+ }
153
+ export interface RegionRendererCompose {
154
+ readonly mode: typeof RegionRendererComposeMode.Over;
155
+ /** Stable ordering among region renderers. Defaults to 0. */
156
+ readonly zIndex?: number;
157
+ }
158
+ /**
159
+ * Places a browser-loaded asset over a detection-owned region.
160
+ *
161
+ * This descriptor is intentionally semantic and backend-neutral. Asset
162
+ * loading, texture caching, sprites, and teardown remain backend details.
163
+ */
164
+ export interface RegionAnnotationRenderer extends BaseAnnotationRenderer {
165
+ readonly kind: "region";
166
+ readonly target: RegionRendererTarget;
167
+ readonly source: RegionRendererAssetSource;
168
+ readonly region: RegionRendererRegion;
169
+ readonly transform?: RegionRendererTransform;
170
+ readonly compose?: RegionRendererCompose;
171
+ }
62
172
  /** Creates the descriptor for every supported renderer kind. */
63
173
  export type AnnotationRendererFactory = {
64
- readonly [TKind in AnnotationRendererKind]: (options?: AnnotationRendererStyleOptions<TKind>) => AnnotationRendererOfKind<TKind>;
174
+ readonly box: (options?: AnnotationRendererStyleOptions<"box">) => BoxAnnotationRenderer;
175
+ readonly boxCorners: (options?: AnnotationRendererStyleOptions<"box-corners">) => BoxCornerAnnotationRenderer;
176
+ readonly ellipse: (options?: AnnotationRendererStyleOptions<"ellipse">) => EllipseAnnotationRenderer;
177
+ readonly keypoints: (options?: AnnotationRendererStyleOptions<"keypoints">) => KeypointAnnotationRenderer;
178
+ readonly label: (options?: AnnotationRendererStyleOptions<"label">) => LabelAnnotationRenderer;
179
+ readonly mask: (options?: AnnotationRendererStyleOptions<"mask">) => MaskAnnotationRenderer;
180
+ readonly maskHalo: (options?: AnnotationRendererStyleOptions<"maskHalo">) => MaskHaloAnnotationRenderer;
181
+ readonly marker: (options?: AnnotationRendererStyleOptions<"marker">) => MarkerAnnotationRenderer;
182
+ readonly polygon: (options?: AnnotationRendererStyleOptions<"polygon">) => PolygonAnnotationRenderer;
183
+ readonly polyline: (options?: AnnotationRendererStyleOptions<"polyline">) => PolylineAnnotationRenderer;
184
+ readonly region: (options: Omit<RegionAnnotationRenderer, "kind">) => RegionAnnotationRenderer;
65
185
  };
66
- type AnnotationRendererStyleOptions<TKind extends AnnotationRendererKind> = Pick<AnnotationRendererOfKind<TKind>, "style">;
186
+ type AnnotationRendererStyleOptions<TKind extends Exclude<AnnotationRendererKind, "region">> = Pick<AnnotationRendererOfKind<TKind>, "style">;
67
187
  /**
68
188
  * Creates built-in annotation renderer descriptors for
69
189
  * `MediaRendererPresentation.renderers`.
@@ -1 +1 @@
1
- {"version":3,"file":"annotation-renderer.d.ts","sourceRoot":"","sources":["../../src/types/annotation-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,uEAO1B,CAAC;AAEX,uDAAuD;AACvD,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAC1B,qBAAqB,GACrB,0BAA0B,GAC1B,uBAAuB,GACvB,sBAAsB,GACtB,yBAAyB,GACzB,0BAA0B,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,CAAC,KAAK,SAAS,sBAAsB,IACvE,OAAO,CAAC,kBAAkB,EAAE;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;AAE/C,UAAU,sBAAsB;IAC9B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,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0B,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,CACf,OAAO,CAAC,EAAE,8BAA8B,CAAC,QAAQ,CAAC,KAC/C,wBAAwB,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,CAChB,OAAO,CAAC,EAAE,8BAA8B,CAAC,SAAS,CAAC,KAChD,yBAAyB,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,CACjB,OAAO,CAAC,EAAE,8BAA8B,CAAC,UAAU,CAAC,KACjD,0BAA0B,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,CACf,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,KAC5C,wBAAwB,CAAC;CAC/B,CAAC;AAEF,KAAK,8BAA8B,CACjC,KAAK,SAAS,OAAO,CAAC,sBAAsB,EAAE,QAAQ,CAAC,IACrD,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;AAEnD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,yBAYjC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { Detection, Point } from "#types/detections";
2
+ import type { OpenStrokeStyle } from "#types/paint-style";
3
+ import type { AnnotationStyleContext, DetectionStylePredicate, DetectionStyleValue } from "#types/style";
4
+ export type BoxCornerStyleContext = AnnotationStyleContext;
5
+ /** Four open corner segments derived from one detection rectangle. */
6
+ export interface BoxCornerDrawInstruction {
7
+ readonly segments: readonly (readonly Point[])[];
8
+ readonly stroke: OpenStrokeStyle;
9
+ }
10
+ /**
11
+ * Style contract of the `box-corners` annotation renderer.
12
+ *
13
+ * The renderer is presentation-only: it never changes semantic detection
14
+ * geometry, picking, or editing. Segment coordinates are in media space while
15
+ * the stroke keeps the usual screen-space width semantics.
16
+ */
17
+ export interface BoxCornerStyle {
18
+ resolve(detection: Detection, context: BoxCornerStyleContext): BoxCornerDrawInstruction | undefined;
19
+ }
20
+ export interface BaseBoxCornerStyleOptions {
21
+ /**
22
+ * Visible length of each corner segment in screen pixels. The renderer
23
+ * converts it to media space so the decoration stays legible while zooming.
24
+ */
25
+ readonly length?: DetectionStyleValue<number, BoxCornerStyleContext>;
26
+ /** Open-path stroke used by each of the four corners. */
27
+ readonly stroke?: DetectionStyleValue<Partial<OpenStrokeStyle> | null, BoxCornerStyleContext>;
28
+ /** Return false to skip a detection. */
29
+ readonly shouldRender?: DetectionStylePredicate<BoxCornerStyleContext>;
30
+ }
31
+ //# sourceMappingURL=box-corner-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box-corner-style.d.ts","sourceRoot":"","sources":["../../src/types/box-corner-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAE3D,sEAAsE;AACtE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,CAAC;IACjD,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;CAClC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,qBAAqB,GAC7B,wBAAwB,GAAG,SAAS,CAAC;CACzC;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IACrE,yDAAyD;IACzD,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CACnC,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,EAC/B,qBAAqB,CACtB,CAAC;IACF,wCAAwC;IACxC,QAAQ,CAAC,YAAY,CAAC,EAAE,uBAAuB,CAAC,qBAAqB,CAAC,CAAC;CACxE"}
@@ -1,34 +1,21 @@
1
1
  import type { Detection, Rect } from "#types/detections";
2
+ import type { FillStyle, StrokeStyle } from "#types/paint-style";
2
3
  import type { AnnotationStyleContext } from "#types/style";
4
+ export { StrokeAlignment as BoxStrokeAlignment } from "#types/paint-style";
3
5
  export declare enum BoxShape {
4
6
  Rect = "rect",
5
7
  RoundedRect = "roundedRect"
6
8
  }
7
- export declare enum BoxStrokeAlignment {
8
- Inside = "inside",
9
- Center = "center",
10
- Outside = "outside"
11
- }
12
9
  /**
13
10
  * Stroke applied to a rendered detection rectangle.
14
11
  *
15
12
  * This belongs to presentation styling, not to the underlying detection data.
16
13
  */
17
- export interface BoxStrokeStyle {
18
- readonly color: number;
19
- readonly alpha: number;
20
- readonly width: number;
21
- readonly alignment?: BoxStrokeAlignment;
22
- /** Alternating dash and gap lengths in screen pixels. */
23
- readonly dash?: readonly number[];
24
- }
14
+ export type BoxStrokeStyle = StrokeStyle;
25
15
  /**
26
16
  * Fill applied behind or inside a rendered detection rectangle.
27
17
  */
28
- export interface BoxFillStyle {
29
- readonly color: number;
30
- readonly alpha: number;
31
- }
18
+ export type BoxFillStyle = FillStyle;
32
19
  /**
33
20
  * Per-frame context passed to a box style while resolving draw instructions.
34
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"box-style.d.ts","sourceRoot":"","sources":["../../src/types/box-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,WAAW,gBAAgB;CAC5B;AAED,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED;;;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AAC;AAE3E,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,WAAW,gBAAgB;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,eAAe,GACvB,kBAAkB,GAAG,SAAS,CAAC;CACnC"}
@@ -0,0 +1,30 @@
1
+ import type { Detection } from "#types/detections";
2
+ import type { ClosedEllipseShapeInstruction, EllipseArcShapeInstruction } from "#types/shape-style";
3
+ import type { AnnotationStyleContext } from "#types/style";
4
+ export type EllipseStyleContext = AnnotationStyleContext;
5
+ /**
6
+ * One closed ellipse drawn for a detection, in media coordinates.
7
+ *
8
+ * The annotation renderer omits only the internal shape discriminator; all
9
+ * geometry and paint constraints come from the shared ellipse primitive.
10
+ */
11
+ export type ClosedEllipseDrawInstruction = Omit<ClosedEllipseShapeInstruction, "kind">;
12
+ /**
13
+ * One elliptical arc drawn for a detection, in media coordinates.
14
+ *
15
+ * Angles are radians measured from the positive x axis before `rotation` is
16
+ * applied.
17
+ */
18
+ export type EllipseArcDrawInstruction = Omit<EllipseArcShapeInstruction, "kind">;
19
+ export type EllipseDrawInstruction = ClosedEllipseDrawInstruction | EllipseArcDrawInstruction;
20
+ /**
21
+ * Style contract of the `ellipse` annotation renderer.
22
+ *
23
+ * Resolves per detection to the ellipse drawn for it, or `undefined` to skip
24
+ * the detection. Ellipses are presentation only: they are never pickable and
25
+ * never become editable annotations.
26
+ */
27
+ export interface EllipseStyle {
28
+ resolve(detection: Detection, context: EllipseStyleContext): EllipseDrawInstruction | undefined;
29
+ }
30
+ //# sourceMappingURL=ellipse-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ellipse-style.d.ts","sourceRoot":"","sources":["../../src/types/ellipse-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EACV,6BAA6B,EAC7B,0BAA0B,EAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,6BAA6B,EAC7B,MAAM,CACP,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,0BAA0B,EAC1B,MAAM,CACP,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAChC,4BAA4B,GAAG,yBAAyB,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,CACL,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,mBAAmB,GAC3B,sBAAsB,GAAG,SAAS,CAAC;CACvC"}