@oicl/openbridge-webcomponents 0.0.20260407101310 → 0.0.20260407112816
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/building-blocks/instrument-radial/instrument-radial.d.ts +3 -0
- package/dist/building-blocks/instrument-radial/instrument-radial.d.ts.map +1 -1
- package/dist/building-blocks/instrument-radial/instrument-radial.js +50 -22
- package/dist/building-blocks/instrument-radial/instrument-radial.js.map +1 -1
- package/dist/navigation-instruments/compass/arrow.d.ts +1 -1
- package/dist/navigation-instruments/compass/arrow.d.ts.map +1 -1
- package/dist/navigation-instruments/compass/arrow.js +3 -3
- package/dist/navigation-instruments/compass/arrow.js.map +1 -1
- package/dist/navigation-instruments/compass/compass.d.ts +12 -6
- package/dist/navigation-instruments/compass/compass.d.ts.map +1 -1
- package/dist/navigation-instruments/compass/compass.js +29 -24
- package/dist/navigation-instruments/compass/compass.js.map +1 -1
- package/dist/navigation-instruments/compass-flat/compass-flat.d.ts +37 -1
- package/dist/navigation-instruments/compass-flat/compass-flat.d.ts.map +1 -1
- package/dist/navigation-instruments/compass-flat/compass-flat.js +34 -3
- package/dist/navigation-instruments/compass-flat/compass-flat.js.map +1 -1
- package/dist/navigation-instruments/compass-sector/compass-sector.css.js +34 -0
- package/dist/navigation-instruments/compass-sector/compass-sector.css.js.map +1 -0
- package/dist/navigation-instruments/compass-sector/compass-sector.d.ts +101 -0
- package/dist/navigation-instruments/compass-sector/compass-sector.d.ts.map +1 -0
- package/dist/navigation-instruments/compass-sector/compass-sector.js +404 -0
- package/dist/navigation-instruments/compass-sector/compass-sector.js.map +1 -0
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.controller.d.ts +15 -2
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.controller.d.ts.map +1 -1
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.controller.js +50 -18
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.controller.js.map +1 -1
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.d.ts +40 -6
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.d.ts.map +1 -1
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.js +40 -47
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.js.map +1 -1
- package/dist/navigation-instruments/rate-of-turn/rot-renderer.d.ts +63 -0
- package/dist/navigation-instruments/rate-of-turn/rot-renderer.d.ts.map +1 -0
- package/dist/navigation-instruments/rate-of-turn/rot-renderer.js +211 -0
- package/dist/navigation-instruments/rate-of-turn/rot-renderer.js.map +1 -0
- package/dist/navigation-instruments/rot-sector/rot-sector.d.ts +10 -4
- package/dist/navigation-instruments/rot-sector/rot-sector.d.ts.map +1 -1
- package/dist/navigation-instruments/rot-sector/rot-sector.js +13 -3
- package/dist/navigation-instruments/rot-sector/rot-sector.js.map +1 -1
- package/dist/navigation-instruments/rudder/rudder.d.ts +4 -0
- package/dist/navigation-instruments/rudder/rudder.d.ts.map +1 -1
- package/dist/navigation-instruments/rudder/rudder.js +55 -19
- package/dist/navigation-instruments/rudder/rudder.js.map +1 -1
- package/dist/navigation-instruments/watch/advice.d.ts +3 -3
- package/dist/navigation-instruments/watch/advice.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/advice.js +68 -16
- package/dist/navigation-instruments/watch/advice.js.map +1 -1
- package/dist/navigation-instruments/watch/tickmark.d.ts +2 -1
- package/dist/navigation-instruments/watch/tickmark.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/tickmark.js +15 -13
- package/dist/navigation-instruments/watch/tickmark.js.map +1 -1
- package/dist/navigation-instruments/watch/watch.d.ts +29 -0
- package/dist/navigation-instruments/watch/watch.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/watch.js +256 -44
- package/dist/navigation-instruments/watch/watch.js.map +1 -1
- package/dist/navigation-instruments/watch-flat/watch-flat.d.ts +29 -1
- package/dist/navigation-instruments/watch-flat/watch-flat.d.ts.map +1 -1
- package/dist/navigation-instruments/watch-flat/watch-flat.js +162 -17
- package/dist/navigation-instruments/watch-flat/watch-flat.js.map +1 -1
- package/dist/svghelpers/arc-frame.d.ts +42 -0
- package/dist/svghelpers/arc-frame.d.ts.map +1 -0
- package/dist/svghelpers/arc-frame.js +123 -0
- package/dist/svghelpers/arc-frame.js.map +1 -0
- package/package.json +1 -1
- package/dist/navigation-instruments/compass/rot.d.ts +0 -4
- package/dist/navigation-instruments/compass/rot.d.ts.map +0 -1
- package/dist/navigation-instruments/compass/rot.js +0 -11
- package/dist/navigation-instruments/compass/rot.js.map +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { WatchArea } from '../navigation-instruments/watch/watch.js';
|
|
2
|
+
export interface ArcViewBox {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
viewBox: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ZoomToFitArcFrame extends ArcViewBox {
|
|
10
|
+
radiusOffset: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Compute the optimal radius enlargement and square viewBox so that a
|
|
14
|
+
* partial-arc watch face fills its container instead of leaving empty space.
|
|
15
|
+
*
|
|
16
|
+
* When `zoomToFitArc` is enabled on a clipped watch (e.g. rudder ±45°), the
|
|
17
|
+
* visible arc segment is small relative to the full circle — lots of space
|
|
18
|
+
* is wasted. This function finds a `radiusOffset` that, when added to every
|
|
19
|
+
* radius constant, enlarges the circle so the visible band fills the target
|
|
20
|
+
* viewport. Band thickness, tickmark sizes, and all decorative elements
|
|
21
|
+
* remain unchanged in SVG units; only the curvature flattens because the
|
|
22
|
+
* radius is larger.
|
|
23
|
+
*
|
|
24
|
+
* Uses binary search over `radiusOffset` so that the bounding box of the
|
|
25
|
+
* annular arc (outer + extension … inner) fits within `targetSize × (1 − 2 × margin)`.
|
|
26
|
+
*
|
|
27
|
+
* @param options.areas Visible arc segments (same array passed to `<obc-watch>`).
|
|
28
|
+
* @param options.outerRadius Base outer ring radius (typically `OUTER_RING_RADIUS`).
|
|
29
|
+
* @param options.innerRadius Base innermost visible radius (depends on `WatchCircleType`).
|
|
30
|
+
* @param options.extension Extra radial room beyond outer for tickmarks/labels.
|
|
31
|
+
* @param options.targetSize Default SVG viewport side length, e.g. `(176 + padding) * 2`.
|
|
32
|
+
* @param options.margin Fraction of computed extent used as padding (default 0.06).
|
|
33
|
+
*/
|
|
34
|
+
export declare function computeZoomToFitArcFrame(options: {
|
|
35
|
+
areas: WatchArea[];
|
|
36
|
+
outerRadius: number;
|
|
37
|
+
innerRadius: number;
|
|
38
|
+
extension: number;
|
|
39
|
+
targetSize: number;
|
|
40
|
+
margin?: number;
|
|
41
|
+
}): ZoomToFitArcFrame;
|
|
42
|
+
//# sourceMappingURL=arc-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arc-frame.d.ts","sourceRoot":"","sources":["../../src/svghelpers/arc-frame.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,0CAA0C,CAAC;AAExE,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IAChD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,iBAAiB,CAiFpB"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
function computeZoomToFitArcFrame(options) {
|
|
2
|
+
const {
|
|
3
|
+
areas,
|
|
4
|
+
outerRadius,
|
|
5
|
+
innerRadius,
|
|
6
|
+
extension,
|
|
7
|
+
targetSize,
|
|
8
|
+
margin = 0.06
|
|
9
|
+
} = options;
|
|
10
|
+
if (areas.length === 0) {
|
|
11
|
+
const side2 = targetSize;
|
|
12
|
+
return {
|
|
13
|
+
radiusOffset: 0,
|
|
14
|
+
x: -side2 / 2,
|
|
15
|
+
y: -side2 / 2,
|
|
16
|
+
width: side2,
|
|
17
|
+
height: side2,
|
|
18
|
+
viewBox: `${-side2 / 2} ${-side2 / 2} ${side2} ${side2}`
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const available = targetSize * (1 - 2 * margin);
|
|
22
|
+
const measureSize = (radiusOffset2) => {
|
|
23
|
+
const bbox2 = computeAnnularArcBBox(
|
|
24
|
+
areas,
|
|
25
|
+
outerRadius + radiusOffset2,
|
|
26
|
+
innerRadius + radiusOffset2,
|
|
27
|
+
extension
|
|
28
|
+
);
|
|
29
|
+
return Math.max(bbox2.xMax - bbox2.xMin, bbox2.yMax - bbox2.yMin);
|
|
30
|
+
};
|
|
31
|
+
let lo = 0;
|
|
32
|
+
let hi = targetSize;
|
|
33
|
+
for (let i = 0; i < 16 && measureSize(hi) < available; i++) {
|
|
34
|
+
hi *= 2;
|
|
35
|
+
}
|
|
36
|
+
for (let i = 0; i < 50; i++) {
|
|
37
|
+
const mid = (lo + hi) / 2;
|
|
38
|
+
const size = measureSize(mid);
|
|
39
|
+
if (size < available) {
|
|
40
|
+
lo = mid;
|
|
41
|
+
} else {
|
|
42
|
+
hi = mid;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const radiusOffset = Math.max(0, lo);
|
|
46
|
+
const bbox = computeAnnularArcBBox(
|
|
47
|
+
areas,
|
|
48
|
+
outerRadius + radiusOffset,
|
|
49
|
+
innerRadius + radiusOffset,
|
|
50
|
+
extension
|
|
51
|
+
);
|
|
52
|
+
const rawW = bbox.xMax - bbox.xMin;
|
|
53
|
+
const rawH = bbox.yMax - bbox.yMin;
|
|
54
|
+
const side = Math.max(rawW, rawH);
|
|
55
|
+
const padded = side * (1 + margin * 2);
|
|
56
|
+
const cx = (bbox.xMin + bbox.xMax) / 2;
|
|
57
|
+
const cy = (bbox.yMin + bbox.yMax) / 2;
|
|
58
|
+
const x = round4(cx - padded / 2);
|
|
59
|
+
const y = round4(cy - padded / 2);
|
|
60
|
+
const w = round4(padded);
|
|
61
|
+
const h = round4(padded);
|
|
62
|
+
return {
|
|
63
|
+
radiusOffset,
|
|
64
|
+
x,
|
|
65
|
+
y,
|
|
66
|
+
width: w,
|
|
67
|
+
height: h,
|
|
68
|
+
viewBox: `${x} ${y} ${w} ${h}`
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function computeAnnularArcBBox(areas, outerRadius, innerRadius, extension) {
|
|
72
|
+
const R_vis = outerRadius + extension;
|
|
73
|
+
const R_in = innerRadius;
|
|
74
|
+
let xMin = Infinity;
|
|
75
|
+
let xMax = -Infinity;
|
|
76
|
+
let yMin = Infinity;
|
|
77
|
+
let yMax = -Infinity;
|
|
78
|
+
const expand = (x, y) => {
|
|
79
|
+
if (x < xMin) xMin = x;
|
|
80
|
+
if (x > xMax) xMax = x;
|
|
81
|
+
if (y < yMin) yMin = y;
|
|
82
|
+
if (y > yMax) yMax = y;
|
|
83
|
+
};
|
|
84
|
+
for (const area of areas) {
|
|
85
|
+
const startRad = area.startAngle * Math.PI / 180;
|
|
86
|
+
const endRad = area.endAngle * Math.PI / 180;
|
|
87
|
+
for (const R of [R_vis, R_in]) {
|
|
88
|
+
expand(R * Math.sin(startRad), -R * Math.cos(startRad));
|
|
89
|
+
expand(R * Math.sin(endRad), -R * Math.cos(endRad));
|
|
90
|
+
}
|
|
91
|
+
const startNorm = (area.startAngle % 360 + 360) % 360;
|
|
92
|
+
const endNorm = (area.endAngle % 360 + 360) % 360;
|
|
93
|
+
const axes = [0, 90, 180, 270];
|
|
94
|
+
for (const axis of axes) {
|
|
95
|
+
if (arcContainsAngle(startNorm, endNorm, axis)) {
|
|
96
|
+
const axisRad = axis * Math.PI / 180;
|
|
97
|
+
for (const R of [R_vis, R_in]) {
|
|
98
|
+
expand(R * Math.sin(axisRad), -R * Math.cos(axisRad));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (xMin === Infinity) {
|
|
104
|
+
return { xMin: 0, xMax: 0, yMin: 0, yMax: 0 };
|
|
105
|
+
}
|
|
106
|
+
return { xMin, xMax, yMin, yMax };
|
|
107
|
+
}
|
|
108
|
+
function arcContainsAngle(startDeg, endDeg, testDeg) {
|
|
109
|
+
const s = (startDeg % 360 + 360) % 360;
|
|
110
|
+
const e = (endDeg % 360 + 360) % 360;
|
|
111
|
+
const t = (testDeg % 360 + 360) % 360;
|
|
112
|
+
if (s <= e) {
|
|
113
|
+
return t >= s && t <= e;
|
|
114
|
+
}
|
|
115
|
+
return t >= s || t <= e;
|
|
116
|
+
}
|
|
117
|
+
function round4(n) {
|
|
118
|
+
return Math.round(n * 1e4) / 1e4;
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
computeZoomToFitArcFrame
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=arc-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arc-frame.js","sources":["../../src/svghelpers/arc-frame.ts"],"sourcesContent":["import type {WatchArea} from '../navigation-instruments/watch/watch.js';\n\nexport interface ArcViewBox {\n x: number;\n y: number;\n width: number;\n height: number;\n viewBox: string;\n}\n\nexport interface ZoomToFitArcFrame extends ArcViewBox {\n radiusOffset: number;\n}\n\n/**\n * Compute the optimal radius enlargement and square viewBox so that a\n * partial-arc watch face fills its container instead of leaving empty space.\n *\n * When `zoomToFitArc` is enabled on a clipped watch (e.g. rudder ±45°), the\n * visible arc segment is small relative to the full circle — lots of space\n * is wasted. This function finds a `radiusOffset` that, when added to every\n * radius constant, enlarges the circle so the visible band fills the target\n * viewport. Band thickness, tickmark sizes, and all decorative elements\n * remain unchanged in SVG units; only the curvature flattens because the\n * radius is larger.\n *\n * Uses binary search over `radiusOffset` so that the bounding box of the\n * annular arc (outer + extension … inner) fits within `targetSize × (1 − 2 × margin)`.\n *\n * @param options.areas Visible arc segments (same array passed to `<obc-watch>`).\n * @param options.outerRadius Base outer ring radius (typically `OUTER_RING_RADIUS`).\n * @param options.innerRadius Base innermost visible radius (depends on `WatchCircleType`).\n * @param options.extension Extra radial room beyond outer for tickmarks/labels.\n * @param options.targetSize Default SVG viewport side length, e.g. `(176 + padding) * 2`.\n * @param options.margin Fraction of computed extent used as padding (default 0.06).\n */\nexport function computeZoomToFitArcFrame(options: {\n areas: WatchArea[];\n outerRadius: number;\n innerRadius: number;\n extension: number;\n targetSize: number;\n margin?: number;\n}): ZoomToFitArcFrame {\n const {\n areas,\n outerRadius,\n innerRadius,\n extension,\n targetSize,\n margin = 0.06,\n } = options;\n\n if (areas.length === 0) {\n const side = targetSize;\n return {\n radiusOffset: 0,\n x: -side / 2,\n y: -side / 2,\n width: side,\n height: side,\n viewBox: `${-side / 2} ${-side / 2} ${side} ${side}`,\n };\n }\n\n const available = targetSize * (1 - 2 * margin);\n\n const measureSize = (radiusOffset: number) => {\n const bbox = computeAnnularArcBBox(\n areas,\n outerRadius + radiusOffset,\n innerRadius + radiusOffset,\n extension\n );\n return Math.max(bbox.xMax - bbox.xMin, bbox.yMax - bbox.yMin);\n };\n\n // Dynamic upper bound: double until the band bbox exceeds the available space.\n let lo = 0;\n let hi = targetSize;\n for (let i = 0; i < 16 && measureSize(hi) < available; i++) {\n hi *= 2;\n }\n\n for (let i = 0; i < 50; i++) {\n const mid = (lo + hi) / 2;\n const size = measureSize(mid);\n if (size < available) {\n lo = mid;\n } else {\n hi = mid;\n }\n }\n\n const radiusOffset = Math.max(0, lo);\n\n // Final bbox at the computed offset\n const bbox = computeAnnularArcBBox(\n areas,\n outerRadius + radiusOffset,\n innerRadius + radiusOffset,\n extension\n );\n const rawW = bbox.xMax - bbox.xMin;\n const rawH = bbox.yMax - bbox.yMin;\n const side = Math.max(rawW, rawH);\n const padded = side * (1 + margin * 2);\n\n const cx = (bbox.xMin + bbox.xMax) / 2;\n const cy = (bbox.yMin + bbox.yMax) / 2;\n\n const x = round4(cx - padded / 2);\n const y = round4(cy - padded / 2);\n const w = round4(padded);\n const h = round4(padded);\n\n return {\n radiusOffset,\n x,\n y,\n width: w,\n height: h,\n viewBox: `${x} ${y} ${w} ${h}`,\n };\n}\n\n/**\n * Bounding box of an annular arc (the visible band between inner and outer radii).\n *\n * Samples arc endpoints and cardinal-axis crossings on both the outermost and\n * innermost circles. The result frames just the band, NOT the circle centre.\n */\nfunction computeAnnularArcBBox(\n areas: WatchArea[],\n outerRadius: number,\n innerRadius: number,\n extension: number\n): {xMin: number; xMax: number; yMin: number; yMax: number} {\n const R_vis = outerRadius + extension;\n const R_in = innerRadius;\n\n let xMin = Infinity;\n let xMax = -Infinity;\n let yMin = Infinity;\n let yMax = -Infinity;\n\n const expand = (x: number, y: number) => {\n if (x < xMin) xMin = x;\n if (x > xMax) xMax = x;\n if (y < yMin) yMin = y;\n if (y > yMax) yMax = y;\n };\n\n for (const area of areas) {\n const startRad = (area.startAngle * Math.PI) / 180;\n const endRad = (area.endAngle * Math.PI) / 180;\n\n for (const R of [R_vis, R_in]) {\n expand(R * Math.sin(startRad), -R * Math.cos(startRad));\n expand(R * Math.sin(endRad), -R * Math.cos(endRad));\n }\n\n const startNorm = ((area.startAngle % 360) + 360) % 360;\n const endNorm = ((area.endAngle % 360) + 360) % 360;\n const axes = [0, 90, 180, 270];\n for (const axis of axes) {\n if (arcContainsAngle(startNorm, endNorm, axis)) {\n const axisRad = (axis * Math.PI) / 180;\n for (const R of [R_vis, R_in]) {\n expand(R * Math.sin(axisRad), -R * Math.cos(axisRad));\n }\n }\n }\n }\n\n if (xMin === Infinity) {\n return {xMin: 0, xMax: 0, yMin: 0, yMax: 0};\n }\n\n return {xMin, xMax, yMin, yMax};\n}\n\nfunction arcContainsAngle(\n startDeg: number,\n endDeg: number,\n testDeg: number\n): boolean {\n const s = ((startDeg % 360) + 360) % 360;\n const e = ((endDeg % 360) + 360) % 360;\n const t = ((testDeg % 360) + 360) % 360;\n if (s <= e) {\n return t >= s && t <= e;\n }\n return t >= s || t <= e;\n}\n\nfunction round4(n: number): number {\n return Math.round(n * 10000) / 10000;\n}\n"],"names":["side","radiusOffset","bbox"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rot.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/compass/rot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,iBAAiB,EAAC,MAAM,KAAK,CAAC;AAE3C,iBAAS,GAAG,CACV,KAAK,GAAE,MAAoD,GAC1D,iBAAiB,CAKnB;AAED,OAAO,EAAC,GAAG,EAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { svg } from "lit";
|
|
2
|
-
function rot(color = "var(--instrument-regular-secondary-color)") {
|
|
3
|
-
return svg`<g transform="translate(-256, -256)">
|
|
4
|
-
<path d="M190.344 331.905C193.103 328.108 198.419 327.266 202.217 330.025C206.014 332.785 206.856 338.1 204.097 341.897C201.337 345.695 196.021 346.538 192.224 343.778C188.426 341.019 187.584 335.703 190.344 331.905ZM309.781 330.025C313.579 327.266 318.895 328.108 321.654 331.905C324.414 335.703 323.572 341.019 319.774 343.778C315.977 346.538 310.661 345.695 307.901 341.897C305.142 338.1 305.984 332.785 309.781 330.025ZM152.809 222.472C154.259 218.007 159.055 215.564 163.52 217.015C167.845 218.42 170.273 222.964 169.102 227.306L168.977 227.725C167.571 232.05 163.027 234.478 158.686 233.307L158.267 233.183C153.802 231.732 151.358 226.936 152.809 222.472ZM348.478 217.015C352.942 215.564 357.738 218.007 359.188 222.472C360.639 226.936 358.196 231.732 353.731 233.183C349.267 234.633 344.471 232.189 343.021 227.725C341.57 223.26 344.013 218.465 348.478 217.015ZM255.998 147.5C260.692 147.5 264.498 151.306 264.498 156C264.498 160.694 260.692 164.5 255.998 164.5C251.304 164.5 247.498 160.694 247.498 156C247.498 151.306 251.304 147.5 255.998 147.5Z" fill="${color}" stroke="var(--border-silhouette-color)"/>
|
|
5
|
-
</g>
|
|
6
|
-
`;
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
rot
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=rot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rot.js","sources":["../../../src/navigation-instruments/compass/rot.ts"],"sourcesContent":["import {svg, SVGTemplateResult} from 'lit';\n\nfunction rot(\n color: string = 'var(--instrument-regular-secondary-color)'\n): SVGTemplateResult {\n return svg`<g transform=\"translate(-256, -256)\">\n<path d=\"M190.344 331.905C193.103 328.108 198.419 327.266 202.217 330.025C206.014 332.785 206.856 338.1 204.097 341.897C201.337 345.695 196.021 346.538 192.224 343.778C188.426 341.019 187.584 335.703 190.344 331.905ZM309.781 330.025C313.579 327.266 318.895 328.108 321.654 331.905C324.414 335.703 323.572 341.019 319.774 343.778C315.977 346.538 310.661 345.695 307.901 341.897C305.142 338.1 305.984 332.785 309.781 330.025ZM152.809 222.472C154.259 218.007 159.055 215.564 163.52 217.015C167.845 218.42 170.273 222.964 169.102 227.306L168.977 227.725C167.571 232.05 163.027 234.478 158.686 233.307L158.267 233.183C153.802 231.732 151.358 226.936 152.809 222.472ZM348.478 217.015C352.942 215.564 357.738 218.007 359.188 222.472C360.639 226.936 358.196 231.732 353.731 233.183C349.267 234.633 344.471 232.189 343.021 227.725C341.57 223.26 344.013 218.465 348.478 217.015ZM255.998 147.5C260.692 147.5 264.498 151.306 264.498 156C264.498 160.694 260.692 164.5 255.998 164.5C251.304 164.5 247.498 160.694 247.498 156C247.498 151.306 251.304 147.5 255.998 147.5Z\" fill=\"${color}\" stroke=\"var(--border-silhouette-color)\"/>\n</g>\n`;\n}\n\nexport {rot};\n"],"names":[],"mappings":";AAEA,SAAS,IACP,QAAgB,6CACG;AACnB,SAAO;AAAA,yiCACgiC,KAAK;AAAA;AAAA;AAG9iC;"}
|