supervision 0.1.2 → 0.1.3
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.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -16
- package/dist/index.js.map +1 -1
- package/dist/mask-preparation.worker.js.map +1 -1
- package/dist/renderers/media-renderer-core.d.ts.map +1 -1
- package/dist/renderers/pixi-focus-layer.d.ts.map +1 -1
- package/dist/sessions/media-session.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/index.d.ts +3 -1
- package/node_modules/supervision-js-core/dist/index.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/index.js +242 -89
- package/node_modules/supervision-js-core/dist/index.js.map +1 -1
- package/node_modules/supervision-js-core/dist/styles/annotation-renderer-presentation.d.ts +9 -0
- package/node_modules/supervision-js-core/dist/styles/annotation-renderer-presentation.d.ts.map +1 -0
- package/node_modules/supervision-js-core/dist/styles/annotation-renderer-registry.d.ts +40 -0
- package/node_modules/supervision-js-core/dist/styles/annotation-renderer-registry.d.ts.map +1 -0
- package/node_modules/supervision-js-core/dist/styles/default-annotation-presentation.d.ts +19 -0
- package/node_modules/supervision-js-core/dist/styles/default-annotation-presentation.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/styles/source-presentation.d.ts +10 -2
- package/node_modules/supervision-js-core/dist/styles/source-presentation.d.ts.map +1 -1
- package/node_modules/supervision-js-core/dist/types/annotation-renderer.d.ts +77 -0
- package/node_modules/supervision-js-core/dist/types/annotation-renderer.d.ts.map +1 -0
- package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts +10 -1
- package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MediaRendererPresentation } from "#types/media-rendering";
|
|
2
|
+
/**
|
|
3
|
+
* Resolves built-in renderer descriptors into the existing specialized style
|
|
4
|
+
* fields. The browser backend deliberately keeps ownership of its box, mask,
|
|
5
|
+
* label, polygon, polyline, and keypoint pipelines; this normalizer only
|
|
6
|
+
* supplies those pipelines with their configured style.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveAnnotationRendererPresentation(presentation: MediaRendererPresentation): MediaRendererPresentation;
|
|
9
|
+
//# sourceMappingURL=annotation-renderer-presentation.d.ts.map
|
package/node_modules/supervision-js-core/dist/styles/annotation-renderer-presentation.d.ts.map
ADDED
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AnnotationRendererKind, AnnotationRendererOfKind } from "#types/annotation-renderer";
|
|
2
|
+
import type { MediaRendererPresentation } from "#types/media-rendering";
|
|
3
|
+
/** The style contract configured by one renderer kind. */
|
|
4
|
+
export type AnnotationRendererStyle<TKind extends AnnotationRendererKind> = NonNullable<AnnotationRendererOfKind<TKind>["style"]>;
|
|
5
|
+
/**
|
|
6
|
+
* The presentation field that carries a renderer kind's style.
|
|
7
|
+
*
|
|
8
|
+
* The pairing is derived from the style contracts themselves, so a registry
|
|
9
|
+
* entry that points a kind at the wrong presentation field does not compile.
|
|
10
|
+
*/
|
|
11
|
+
export type AnnotationRendererStyleFieldFor<TKind extends AnnotationRendererKind> = {
|
|
12
|
+
[TField in keyof MediaRendererPresentation]-?: AnnotationRendererStyle<TKind> extends NonNullable<MediaRendererPresentation[TField]> ? NonNullable<MediaRendererPresentation[TField]> extends AnnotationRendererStyle<TKind> ? TField : never : never;
|
|
13
|
+
}[keyof MediaRendererPresentation];
|
|
14
|
+
/** Every presentation field owned by a built-in renderer kind. */
|
|
15
|
+
export type AnnotationRendererStyleField = {
|
|
16
|
+
[TKind in AnnotationRendererKind]: AnnotationRendererStyleFieldFor<TKind>;
|
|
17
|
+
}[AnnotationRendererKind];
|
|
18
|
+
export interface AnnotationRendererKindMetadata<TKind extends AnnotationRendererKind> {
|
|
19
|
+
/** Presentation field this kind reads its configured style from. */
|
|
20
|
+
readonly styleField: AnnotationRendererStyleFieldFor<TKind>;
|
|
21
|
+
/**
|
|
22
|
+
* Builds this kind's canonical default style on demand, so resolving one
|
|
23
|
+
* listed renderer never constructs the styles of the other kinds.
|
|
24
|
+
*/
|
|
25
|
+
readonly createCanonicalStyle: () => AnnotationRendererStyle<TKind>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The single source of built-in renderer presentation metadata.
|
|
29
|
+
*
|
|
30
|
+
* Adding a kind to {@link annotationRendererKinds} without a complete entry
|
|
31
|
+
* here is a compile error, and every consumer of renderer metadata reads this
|
|
32
|
+
* registry instead of repeating the kind-to-style mapping.
|
|
33
|
+
*/
|
|
34
|
+
export type AnnotationRendererRegistry = {
|
|
35
|
+
readonly [TKind in AnnotationRendererKind]: AnnotationRendererKindMetadata<TKind>;
|
|
36
|
+
};
|
|
37
|
+
export declare const annotationRendererRegistry: AnnotationRendererRegistry;
|
|
38
|
+
/** Presentation fields owned by the given renderer kinds, in the same order. */
|
|
39
|
+
export declare function resolveAnnotationRendererStyleFields(kinds: readonly AnnotationRendererKind[]): readonly AnnotationRendererStyleField[];
|
|
40
|
+
//# sourceMappingURL=annotation-renderer-registry.d.ts.map
|
|
@@ -0,0 +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,C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|
2
|
+
import { BaseKeypointStyle } from "#styles/keypoint-style";
|
|
3
|
+
import { BaseLabelStyle } from "#styles/label-style";
|
|
4
|
+
import { BaseMaskStyle } from "#styles/mask-style";
|
|
5
|
+
import { BasePolygonStyle } from "#styles/polygon-style";
|
|
6
|
+
import { BasePolylineStyle } from "#styles/polyline-style";
|
|
1
7
|
import type { SkeletonDefinitions } from "#types/detections";
|
|
2
8
|
import type { MediaRendererPresentation } from "#types/media-rendering";
|
|
3
9
|
export interface DefaultAnnotationPresentationOptions {
|
|
@@ -17,4 +23,17 @@ export interface DefaultAnnotationPresentationOptions {
|
|
|
17
23
|
* editing, focus, and theme behaviour so consumers can compose those layers.
|
|
18
24
|
*/
|
|
19
25
|
export declare function createDefaultAnnotationPresentation(options?: DefaultAnnotationPresentationOptions): MediaRendererPresentation;
|
|
26
|
+
/**
|
|
27
|
+
* The canonical default style of one built-in layer.
|
|
28
|
+
*
|
|
29
|
+
* These exist so a renderer kind can build only the style it needs instead of
|
|
30
|
+
* the whole default presentation. Keep them equivalent to the matching field of
|
|
31
|
+
* {@link createDefaultAnnotationPresentation}.
|
|
32
|
+
*/
|
|
33
|
+
export declare function createDefaultBoxStyle(options?: DefaultAnnotationPresentationOptions): BaseBoxStyle;
|
|
34
|
+
export declare function createDefaultKeypointStyle(options?: DefaultAnnotationPresentationOptions): BaseKeypointStyle;
|
|
35
|
+
export declare function createDefaultLabelStyle(options?: DefaultAnnotationPresentationOptions): BaseLabelStyle;
|
|
36
|
+
export declare function createDefaultMaskStyle(options?: DefaultAnnotationPresentationOptions): BaseMaskStyle;
|
|
37
|
+
export declare function createDefaultPolygonStyle(options?: DefaultAnnotationPresentationOptions): BasePolygonStyle;
|
|
38
|
+
export declare function createDefaultPolylineStyle(options?: DefaultAnnotationPresentationOptions): BasePolylineStyle;
|
|
20
39
|
//# sourceMappingURL=default-annotation-presentation.d.ts.map
|
package/node_modules/supervision-js-core/dist/styles/default-annotation-presentation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-annotation-presentation.d.ts","sourceRoot":"","sources":["../../src/styles/default-annotation-presentation.ts"],"names":[],"mappings":"
|
|
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,3 +1,4 @@
|
|
|
1
|
+
import type { AnnotationRendererKind } from "#types/annotation-renderer";
|
|
1
2
|
import type { BoxStyle } from "#types/box-style";
|
|
2
3
|
import type { LabelStyle } from "#types/label-style";
|
|
3
4
|
import type { MaskStyle } from "#types/mask-style";
|
|
@@ -17,6 +18,13 @@ export interface SourcePresentationEntry {
|
|
|
17
18
|
readonly id: string;
|
|
18
19
|
readonly presentation?: SourcePresentation;
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Limits source-level overrides when the host explicitly selects annotation
|
|
23
|
+
* renderers. Omit this option to retain legacy source-override behaviour.
|
|
24
|
+
*/
|
|
25
|
+
export interface SourceAwarePresentationOptions {
|
|
26
|
+
readonly enabledRendererKinds?: readonly AnnotationRendererKind[];
|
|
27
|
+
}
|
|
28
|
+
export declare function createSourceAwarePresentation<TPresentation extends PresentationStyleSet>(globalPresentation: TPresentation, sources: readonly SourcePresentationEntry[], options?: SourceAwarePresentationOptions): TPresentation;
|
|
29
|
+
export declare function createSourceAwarePresentation(globalPresentation: PresentationStyleSet | undefined, sources: readonly SourcePresentationEntry[], options?: SourceAwarePresentationOptions): PresentationStyleSet;
|
|
22
30
|
//# sourceMappingURL=source-presentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-presentation.d.ts","sourceRoot":"","sources":["../../src/styles/source-presentation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"source-presentation.d.ts","sourceRoot":"","sources":["../../src/styles/source-presentation.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAA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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,77 @@
|
|
|
1
|
+
import type { BoxStyle } from "#types/box-style";
|
|
2
|
+
import type { KeypointStyle } from "#types/keypoint-style";
|
|
3
|
+
import type { LabelStyle } from "#types/label-style";
|
|
4
|
+
import type { MaskStyle } from "#types/mask-style";
|
|
5
|
+
import type { PolygonStyle } from "#types/polygon-style";
|
|
6
|
+
import type { PolylineStyle } from "#types/polyline-style";
|
|
7
|
+
/**
|
|
8
|
+
* The built-in annotation renderer vocabulary.
|
|
9
|
+
*
|
|
10
|
+
* These stay plain string literals so `{ kind: "box" }` remains assignable to
|
|
11
|
+
* the public descriptor union from JavaScript and TypeScript alike.
|
|
12
|
+
*/
|
|
13
|
+
export declare const annotationRendererKinds: readonly ["box", "keypoints", "label", "mask", "polygon", "polyline"];
|
|
14
|
+
/** One supported built-in annotation renderer kind. */
|
|
15
|
+
export type AnnotationRendererKind = (typeof annotationRendererKinds)[number];
|
|
16
|
+
/**
|
|
17
|
+
* A renderer configured in a media presentation.
|
|
18
|
+
*
|
|
19
|
+
* Renderers are the public unit of annotation visualization. Every renderer
|
|
20
|
+
* consumes semantic detections and contributes to the renderer-owned scene;
|
|
21
|
+
* individual backends decide how to draw or prepare it.
|
|
22
|
+
*/
|
|
23
|
+
export type AnnotationRenderer = BoxAnnotationRenderer | KeypointAnnotationRenderer | LabelAnnotationRenderer | MaskAnnotationRenderer | PolygonAnnotationRenderer | PolylineAnnotationRenderer;
|
|
24
|
+
/**
|
|
25
|
+
* The descriptor of one renderer kind.
|
|
26
|
+
*
|
|
27
|
+
* This resolves to `never` for a kind that has no descriptor, which makes an
|
|
28
|
+
* incomplete addition to {@link annotationRendererKinds} fail to compile where
|
|
29
|
+
* the kind's metadata or factory is declared.
|
|
30
|
+
*/
|
|
31
|
+
export type AnnotationRendererOfKind<TKind extends AnnotationRendererKind> = Extract<AnnotationRenderer, {
|
|
32
|
+
kind: TKind;
|
|
33
|
+
}>;
|
|
34
|
+
interface BaseAnnotationRenderer {
|
|
35
|
+
/** Stable identity within one presentation. */
|
|
36
|
+
readonly id: string;
|
|
37
|
+
}
|
|
38
|
+
export interface BoxAnnotationRenderer extends BaseAnnotationRenderer {
|
|
39
|
+
readonly kind: "box";
|
|
40
|
+
readonly style?: BoxStyle | null;
|
|
41
|
+
}
|
|
42
|
+
export interface KeypointAnnotationRenderer extends BaseAnnotationRenderer {
|
|
43
|
+
readonly kind: "keypoints";
|
|
44
|
+
readonly style?: KeypointStyle | null;
|
|
45
|
+
}
|
|
46
|
+
export interface LabelAnnotationRenderer extends BaseAnnotationRenderer {
|
|
47
|
+
readonly kind: "label";
|
|
48
|
+
readonly style?: LabelStyle | null;
|
|
49
|
+
}
|
|
50
|
+
export interface MaskAnnotationRenderer extends BaseAnnotationRenderer {
|
|
51
|
+
readonly kind: "mask";
|
|
52
|
+
readonly style?: MaskStyle | null;
|
|
53
|
+
}
|
|
54
|
+
export interface PolygonAnnotationRenderer extends BaseAnnotationRenderer {
|
|
55
|
+
readonly kind: "polygon";
|
|
56
|
+
readonly style?: PolygonStyle | null;
|
|
57
|
+
}
|
|
58
|
+
export interface PolylineAnnotationRenderer extends BaseAnnotationRenderer {
|
|
59
|
+
readonly kind: "polyline";
|
|
60
|
+
readonly style?: PolylineStyle | null;
|
|
61
|
+
}
|
|
62
|
+
/** Creates the descriptor for every supported renderer kind. */
|
|
63
|
+
export type AnnotationRendererFactory = {
|
|
64
|
+
readonly [TKind in AnnotationRendererKind]: (options?: AnnotationRendererStyleOptions<TKind>) => AnnotationRendererOfKind<TKind>;
|
|
65
|
+
};
|
|
66
|
+
type AnnotationRendererStyleOptions<TKind extends AnnotationRendererKind> = Pick<AnnotationRendererOfKind<TKind>, "style">;
|
|
67
|
+
/**
|
|
68
|
+
* Creates built-in annotation renderer descriptors for
|
|
69
|
+
* `MediaRendererPresentation.renderers`.
|
|
70
|
+
*
|
|
71
|
+
* The currently supported renderers retain their established scene ordering:
|
|
72
|
+
* masks, polygons, vectors, labels. A later renderer kind may add a new
|
|
73
|
+
* composition capability without changing that ordering for existing scenes.
|
|
74
|
+
*/
|
|
75
|
+
export declare const annotationRenderers: AnnotationRendererFactory;
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=annotation-renderer.d.ts.map
|
|
@@ -0,0 +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,UAA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IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;AAEjD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,yBAOjC,CAAC"}
|
|
@@ -11,6 +11,7 @@ import type { PolygonStyle } from "#types/polygon-style";
|
|
|
11
11
|
import type { PolylineStyle } from "#types/polyline-style";
|
|
12
12
|
import type { KeypointStyle } from "#types/keypoint-style";
|
|
13
13
|
import type { AnnotationOverlayStyle } from "#types/editing";
|
|
14
|
+
import type { AnnotationRenderer } from "#types/annotation-renderer";
|
|
14
15
|
export declare enum MediaRendererFit {
|
|
15
16
|
/**
|
|
16
17
|
* Preserve media aspect ratio and fit the full frame inside the canvas.
|
|
@@ -136,7 +137,7 @@ export interface MediaRendererState {
|
|
|
136
137
|
readonly source: MediaSourceState;
|
|
137
138
|
}
|
|
138
139
|
/**
|
|
139
|
-
* Current
|
|
140
|
+
* Current annotation renderer, interaction, visibility, and scene presentation.
|
|
140
141
|
*/
|
|
141
142
|
export interface MediaRendererPresentation {
|
|
142
143
|
/**
|
|
@@ -146,6 +147,14 @@ export interface MediaRendererPresentation {
|
|
|
146
147
|
*/
|
|
147
148
|
readonly backgroundColor?: number;
|
|
148
149
|
readonly annotationOverlayStyle?: AnnotationOverlayStyle | null;
|
|
150
|
+
/**
|
|
151
|
+
* Built-in renderers that contribute semantic annotations to the
|
|
152
|
+
* renderer-owned scene. When present, this list selects the enabled
|
|
153
|
+
* built-in layers; the matching style field supplies the default for a
|
|
154
|
+
* descriptor without an explicit style. Existing style fields remain
|
|
155
|
+
* supported for compatibility and source-specific presentation overrides.
|
|
156
|
+
*/
|
|
157
|
+
readonly renderers?: readonly AnnotationRenderer[];
|
|
149
158
|
readonly boxStyle?: BoxStyle | null;
|
|
150
159
|
readonly focusStyle?: FocusStyle | null;
|
|
151
160
|
readonly interactionStyle?: InteractionStyle | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-rendering.d.ts","sourceRoot":"","sources":["../../src/types/media-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"media-rendering.d.ts","sourceRoot":"","sources":["../../src/types/media-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD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