mudlet-map-renderer 1.2.2 → 2.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.
- package/dist/MapState.d.ts +6 -1
- package/dist/ScenePipeline.d.ts +1 -1
- package/dist/SvgTypes.d.ts +1 -1
- package/dist/camera/Camera.d.ts +1 -1
- package/dist/draw/DrawCommand.d.ts +4 -4
- package/dist/export/CanvasExporter.d.ts +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +887 -637
- package/dist/index.mjs.map +1 -1
- package/dist/render/RecordingLayer.d.ts +4 -3
- package/dist/render/canvasGradient.d.ts +2 -0
- package/dist/rendering/KonvaRenderBackend.d.ts +9 -7
- package/dist/rendering/MapRenderer.d.ts +6 -1
- package/dist/scene/OverlayStyle.d.ts +7 -3
- package/dist/scene/Shape.d.ts +56 -2
- package/dist/scene/elements/OverlayLayout.d.ts +3 -0
- package/dist/style/index.d.ts +8 -1
- package/dist/style/shape/GradientRoomsStyle.d.ts +23 -0
- package/dist/style/shape/index.d.ts +2 -0
- package/dist/style/shape/paintMap.d.ts +6 -6
- package/dist/types/Settings.d.ts +11 -3
- package/package.json +1 -1
package/dist/MapState.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ import { SvgOverlays } from './SvgTypes';
|
|
|
6
6
|
import { TypedEventEmitter } from './TypedEventEmitter';
|
|
7
7
|
import { RoomLens } from './lens/RoomLens';
|
|
8
8
|
export type HighlightEntry = {
|
|
9
|
+
/** Highlight colours; one draws a ring, two or more split it into pie wedges. */
|
|
10
|
+
colors: string[];
|
|
11
|
+
/** @deprecated Use {@link colors}. Kept for back-compat; equals `colors[0]`. */
|
|
9
12
|
color: string;
|
|
10
13
|
area: number;
|
|
11
14
|
z: number;
|
|
@@ -30,6 +33,8 @@ export type MapStateEventMap = {
|
|
|
30
33
|
};
|
|
31
34
|
highlight: {
|
|
32
35
|
roomId: number;
|
|
36
|
+
colors: string[] | undefined;
|
|
37
|
+
/** @deprecated Use {@link colors}. Equals `colors?.[0]`. */
|
|
33
38
|
color: string | undefined;
|
|
34
39
|
};
|
|
35
40
|
path: undefined;
|
|
@@ -78,7 +83,7 @@ export declare class MapState {
|
|
|
78
83
|
clearPosition(): void;
|
|
79
84
|
setCenterRoom(roomId: number, instant?: boolean): boolean;
|
|
80
85
|
needsAreaRedraw(room: MapData.Room): boolean;
|
|
81
|
-
addHighlight(roomId: number, color: string): boolean;
|
|
86
|
+
addHighlight(roomId: number, color: string | string[]): boolean;
|
|
82
87
|
removeHighlight(roomId: number): void;
|
|
83
88
|
hasHighlight(roomId: number): boolean;
|
|
84
89
|
clearHighlights(): void;
|
package/dist/ScenePipeline.d.ts
CHANGED
|
@@ -170,7 +170,7 @@ export type SceneBuildResult = {
|
|
|
170
170
|
* consumers need (cull entries, hit zones, drawn-geometry snapshots).
|
|
171
171
|
*
|
|
172
172
|
* The pipeline knows nothing about Konva, SVG, Canvas, or the
|
|
173
|
-
* {@link
|
|
173
|
+
* {@link buildDrawCommands}: callers run the shape lists through whatever
|
|
174
174
|
* renderer fits their target. Both the interactive
|
|
175
175
|
* {@link KonvaRenderBackend} and the exporters consume the same
|
|
176
176
|
* {@link SceneBuildResult} this pipeline produces.
|
package/dist/SvgTypes.d.ts
CHANGED
package/dist/camera/Camera.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type CameraEventMap = {
|
|
|
10
10
|
/**
|
|
11
11
|
* Engine-agnostic camera — owns transform state, drag, and animation.
|
|
12
12
|
*
|
|
13
|
-
* Subscribers ({@link
|
|
13
|
+
* Subscribers ({@link KonvaRenderBackend}, {@link CullingManager}, {@link HitTester},
|
|
14
14
|
* scene overlays) listen to the `change` event to react to view updates.
|
|
15
15
|
*
|
|
16
16
|
* No Konva, no DOM. Only dependency is requestAnimationFrame (with a
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { LayerId } from '../scene/Shape';
|
|
1
|
+
import { FillStyle, LayerId } from '../scene/Shape';
|
|
2
2
|
export interface RectCommand {
|
|
3
3
|
type: "rect";
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
6
|
w: number;
|
|
7
7
|
h: number;
|
|
8
|
-
fill?:
|
|
8
|
+
fill?: FillStyle;
|
|
9
9
|
stroke?: string;
|
|
10
10
|
/** Stroke width in render units. */
|
|
11
11
|
sw: number;
|
|
@@ -18,7 +18,7 @@ export interface CircleCommand {
|
|
|
18
18
|
cx: number;
|
|
19
19
|
cy: number;
|
|
20
20
|
r: number;
|
|
21
|
-
fill?:
|
|
21
|
+
fill?: FillStyle;
|
|
22
22
|
stroke?: string;
|
|
23
23
|
sw: number;
|
|
24
24
|
dash?: number[];
|
|
@@ -38,7 +38,7 @@ export interface LineCommand {
|
|
|
38
38
|
export interface PolygonCommand {
|
|
39
39
|
type: "polygon";
|
|
40
40
|
vertices: number[];
|
|
41
|
-
fill?:
|
|
41
|
+
fill?: FillStyle;
|
|
42
42
|
stroke?: string;
|
|
43
43
|
sw: number;
|
|
44
44
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,15 +17,16 @@ export { IDENTITY_TRANSFORM } from './coord/CoordFn';
|
|
|
17
17
|
export { DrawCommandLayerNode, MaterializingLayerNode, RecordingLayerNode, RecordingGroupNode, } from './render/RecordingLayer';
|
|
18
18
|
export type { DrawEntry, RecordingDrawCommand } from './render/RecordingLayer';
|
|
19
19
|
export { shapeToRecording } from './render/shapeToRecording';
|
|
20
|
-
export type { Shape, ShapeBase, RectShape, CircleShape, LineShape, PolygonShape, TextShape, ImageShape, GroupShape, Paint, HitInfo, LayerId, Bbox, SceneIR, } from './scene/Shape';
|
|
20
|
+
export type { Shape, ShapeBase, RectShape, CircleShape, LineShape, PolygonShape, TextShape, ImageShape, GroupShape, Paint, HitInfo, LayerId, Bbox, SceneIR, FillStyle, LinearGradient, RadialGradient, GradientStop, } from './scene/Shape';
|
|
21
|
+
export { isGradientFill, transformFill } from './scene/Shape';
|
|
21
22
|
export type { DrawCommand, DrawCommandBatch, RectCommand, CircleCommand, LineCommand, PolygonCommand, TextCommand, ImageCommand, PrimitiveDrawCommand, StackDrawCommand, PushTransformCommand, PopTransformCommand, PushClipCommand, PopClipCommand, } from './draw/DrawCommand';
|
|
22
23
|
export { buildDrawCommands } from './draw/DrawCommandBuilder';
|
|
23
24
|
export type { CameraTransform } from './draw/DrawCommandBuilder';
|
|
24
25
|
export { svgFromBatches } from './render/SvgRenderer';
|
|
25
26
|
export { renderToCanvas } from './render/CanvasRenderer';
|
|
26
27
|
export type { ImageFactory, CanvasRenderOptions } from './render/CanvasRenderer';
|
|
27
|
-
export { Parchment, Blueprint, Neon, Sketchy, Isometric, Construction, SciFi, compose, identityStyle, applyStyleToShapes, } from './style';
|
|
28
|
-
export type { Style, StyleContext, SketchyOptions, IsometricOptions, IsometricRotation, } from './style';
|
|
28
|
+
export { Parchment, Blueprint, Neon, Sketchy, Isometric, Construction, SciFi, GradientRooms, compose, identityStyle, applyStyleToShapes, } from './style';
|
|
29
|
+
export type { Style, StyleContext, SketchyOptions, IsometricOptions, IsometricRotation, GradientRoomsOptions, } from './style';
|
|
29
30
|
export type { Exporter, ExportContext, ExportCanvas } from './export/Exporter';
|
|
30
31
|
export { SvgExporter } from './export/SvgExporter';
|
|
31
32
|
export { PngExporter, PngBlobExporter } from './export/PngExporter';
|