@kerusiweb/core 2.1.0 → 2.3.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/render/seat-shapes.d.ts +33 -0
- package/dist/render/seat-shapes.d.ts.map +1 -1
- package/dist/render/seat-shapes.js +47 -0
- package/dist/render/seat-shapes.js.map +1 -1
- package/dist/view/control-strings.d.ts +45 -0
- package/dist/view/control-strings.d.ts.map +1 -0
- package/dist/view/control-strings.js +28 -0
- package/dist/view/control-strings.js.map +1 -0
- package/dist/view/index.d.ts +8 -2
- package/dist/view/index.d.ts.map +1 -1
- package/dist/view/index.js +8 -2
- package/dist/view/index.js.map +1 -1
- package/dist/view/kerusi-seat-style.d.ts +58 -0
- package/dist/view/kerusi-seat-style.d.ts.map +1 -0
- package/dist/view/kerusi-seat-style.js +32 -0
- package/dist/view/kerusi-seat-style.js.map +1 -0
- package/dist/view/kerusi-seatmap-colors.d.ts +41 -5
- package/dist/view/kerusi-seatmap-colors.d.ts.map +1 -1
- package/dist/view/kerusi-seatmap-colors.js +67 -8
- package/dist/view/kerusi-seatmap-colors.js.map +1 -1
- package/dist/view/seat-glyph.d.ts +137 -0
- package/dist/view/seat-glyph.d.ts.map +1 -0
- package/dist/view/seat-glyph.js +130 -0
- package/dist/view/seat-glyph.js.map +1 -0
- package/dist/view/viewport-gesture.d.ts +65 -0
- package/dist/view/viewport-gesture.d.ts.map +1 -0
- package/dist/view/viewport-gesture.js +145 -0
- package/dist/view/viewport-gesture.js.map +1 -0
- package/dist/view/viewport.d.ts +144 -0
- package/dist/view/viewport.d.ts.map +1 -0
- package/dist/view/viewport.js +218 -0
- package/dist/view/viewport.js.map +1 -0
- package/package.json +1 -1
|
@@ -69,4 +69,37 @@ export declare const seatRingStroke: typeof seatSelectedFrame;
|
|
|
69
69
|
export declare function seatOccupantPath(x: number, y: number, width: number, height: number): string;
|
|
70
70
|
/** The stroke width for the held variant of {@link seatOccupantPath} — drawn hollow. */
|
|
71
71
|
export declare function seatOccupantStroke(width: number, height: number): number;
|
|
72
|
+
/** An axis-aligned box in viewBox units. */
|
|
73
|
+
export interface SeatBox {
|
|
74
|
+
x: number;
|
|
75
|
+
y: number;
|
|
76
|
+
width: number;
|
|
77
|
+
height: number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The outline a seat is drawn with.
|
|
81
|
+
*
|
|
82
|
+
* - `'seat'`: the default tapered outline, {@link seatBodyPath}. The only one
|
|
83
|
+
* that shows which way a seat faces.
|
|
84
|
+
* - `'square'`: a square with the same slight corners as the seat's front.
|
|
85
|
+
* - `'rounded'`: a square with soft corners.
|
|
86
|
+
* - `'circle'`: a circle filling the box.
|
|
87
|
+
* - A function: given a box, return a closed path `d` inside it. It is called
|
|
88
|
+
* for the seat's box and again for the selected core's smaller box, so it
|
|
89
|
+
* must draw relative to the box it is given, not to fixed coordinates.
|
|
90
|
+
*/
|
|
91
|
+
export type KerusiSeatShape = 'seat' | 'square' | 'rounded' | 'circle' | ((box: SeatBox) => string);
|
|
92
|
+
/** A seat's outline in the given shape; `undefined` means the default `'seat'`. */
|
|
93
|
+
export declare function seatShapePath(shape: KerusiSeatShape | undefined, x: number, y: number, width: number, height: number): string;
|
|
94
|
+
/**
|
|
95
|
+
* Where the wheelchair marker's centre sits, as fractions of the box it is
|
|
96
|
+
* drawn on. The stock corner, (0.82, 0.18), overhangs a circle, so the circle
|
|
97
|
+
* pulls it in along the diagonal; every other preset keeps the stock corner. A
|
|
98
|
+
* function shape gets the stock corner too, so it should leave that corner
|
|
99
|
+
* filled.
|
|
100
|
+
*/
|
|
101
|
+
export declare function seatMarkerAnchor(shape: KerusiSeatShape | undefined): {
|
|
102
|
+
x: number;
|
|
103
|
+
y: number;
|
|
104
|
+
};
|
|
72
105
|
//# sourceMappingURL=seat-shapes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-shapes.d.ts","sourceRoot":"","sources":["../../src/render/seat-shapes.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K,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAwB5F;AAED,wFAAwF;AACxF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAExE;AAID,4CAA4C;AAC5C,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC;AAKpG,mFAAmF;AACnF,wBAAgB,aAAa,CAC3B,KAAK,EAAE,eAAe,GAAG,SAAS,EAClC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,MAAM,CAeR;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAE7F"}
|
|
@@ -158,4 +158,51 @@ export function seatOccupantPath(x, y, width, height) {
|
|
|
158
158
|
export function seatOccupantStroke(width, height) {
|
|
159
159
|
return Math.min(width, height) * OCCUPANT_STROKE;
|
|
160
160
|
}
|
|
161
|
+
/** The `'rounded'` preset's corner radius, as a fraction of the short edge. */
|
|
162
|
+
const ROUNDED_RADIUS = 0.25;
|
|
163
|
+
/** A seat's outline in the given shape; `undefined` means the default `'seat'`. */
|
|
164
|
+
export function seatShapePath(shape, x, y, width, height) {
|
|
165
|
+
if (typeof shape === 'function') {
|
|
166
|
+
return shape({ x, y, width, height });
|
|
167
|
+
}
|
|
168
|
+
const edge = Math.min(width, height);
|
|
169
|
+
switch (shape) {
|
|
170
|
+
case 'square':
|
|
171
|
+
return roundedRect(x, y, width, height, edge * FRONT_RADIUS);
|
|
172
|
+
case 'rounded':
|
|
173
|
+
return roundedRect(x, y, width, height, edge * ROUNDED_RADIUS);
|
|
174
|
+
case 'circle':
|
|
175
|
+
return ellipse(x, y, width, height);
|
|
176
|
+
default:
|
|
177
|
+
return seatBodyPath(x, y, width, height);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Where the wheelchair marker's centre sits, as fractions of the box it is
|
|
182
|
+
* drawn on. The stock corner, (0.82, 0.18), overhangs a circle, so the circle
|
|
183
|
+
* pulls it in along the diagonal; every other preset keeps the stock corner. A
|
|
184
|
+
* function shape gets the stock corner too, so it should leave that corner
|
|
185
|
+
* filled.
|
|
186
|
+
*/
|
|
187
|
+
export function seatMarkerAnchor(shape) {
|
|
188
|
+
return shape === 'circle' ? { x: 0.75, y: 0.25 } : { x: 0.82, y: 0.18 };
|
|
189
|
+
}
|
|
190
|
+
function roundedRect(x, y, width, height, radius) {
|
|
191
|
+
const points = [
|
|
192
|
+
[x, y],
|
|
193
|
+
[x + width, y],
|
|
194
|
+
[x + width, y + height],
|
|
195
|
+
[x, y + height],
|
|
196
|
+
];
|
|
197
|
+
return roundedPolygon(points, [radius, radius, radius, radius]);
|
|
198
|
+
}
|
|
199
|
+
/** An ellipse filling the box: two half arcs, since a circle cannot be a subpath. */
|
|
200
|
+
function ellipse(x, y, width, height) {
|
|
201
|
+
const rx = r(width / 2);
|
|
202
|
+
const ry = r(height / 2);
|
|
203
|
+
const cy = r(y + height / 2);
|
|
204
|
+
return (`M ${r(x)} ${cy} ` +
|
|
205
|
+
`A ${rx} ${ry} 0 1 1 ${r(x + width)} ${cy} ` +
|
|
206
|
+
`A ${rx} ${ry} 0 1 1 ${r(x)} ${cy} Z`);
|
|
207
|
+
}
|
|
161
208
|
//# sourceMappingURL=seat-shapes.js.map
|
|
@@ -1 +1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EAAE,MAAc;IAClE,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACxB,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACzB,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC;IAC7B,OAAO,CACL,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG;QAClB,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG;QAC5C,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CACtC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { KerusiSeatmapColors } from './kerusi-seatmap-colors.js';
|
|
2
|
+
/**
|
|
3
|
+
* The words on the zoom and maximize controls, for a translator to replace.
|
|
4
|
+
*
|
|
5
|
+
* Kept apart from `SeatAriaStrings` on purpose: that type is an object callers
|
|
6
|
+
* build in full, so a new required field there would break every one of them.
|
|
7
|
+
*/
|
|
8
|
+
export interface KerusiControlStrings {
|
|
9
|
+
/** The accessible name of the zoomable map's focusable viewport. */
|
|
10
|
+
viewport: string;
|
|
11
|
+
/** The accessible name of the group of zoom and maximize buttons. */
|
|
12
|
+
toolbar: string;
|
|
13
|
+
zoomIn: string;
|
|
14
|
+
zoomOut: string;
|
|
15
|
+
/** Back to fit-to-container. */
|
|
16
|
+
zoomReset: string;
|
|
17
|
+
/** The maximize button when the map is not maximized. */
|
|
18
|
+
maximize: string;
|
|
19
|
+
/** The maximize button when the map is maximized. */
|
|
20
|
+
restore: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const DEFAULT_KERUSI_CONTROL_STRINGS: KerusiControlStrings;
|
|
23
|
+
/** Fills the gaps in a partial set of strings with the English defaults. */
|
|
24
|
+
export declare function resolveControlStrings(strings?: Partial<KerusiControlStrings>): KerusiControlStrings;
|
|
25
|
+
/**
|
|
26
|
+
* Colours for the controls and the maximized backdrop, as CSS values.
|
|
27
|
+
*
|
|
28
|
+
* Nothing new for a theme to learn: the buttons borrow the fixture tokens
|
|
29
|
+
* (`elementBg`, `elementFg`, `elementMutedFg`) and go through {@link cssVar}
|
|
30
|
+
* like every other colour, so a `--kerusi-*` property in the consumer's
|
|
31
|
+
* stylesheet still beats the `[colors]` input, which still beats the default.
|
|
32
|
+
* The focus ring is the one exception, and is not here: a pseudo-class cannot
|
|
33
|
+
* be set inline, so it reads `--kerusi-focus-ring-input` from the stylesheet,
|
|
34
|
+
* the same way a seat's does.
|
|
35
|
+
*/
|
|
36
|
+
export interface KerusiControlStyle {
|
|
37
|
+
buttonBackground: string;
|
|
38
|
+
buttonColor: string;
|
|
39
|
+
buttonBorder: string;
|
|
40
|
+
/** Behind a maximized map. `backdrop`, or the page's own canvas if that is transparent. */
|
|
41
|
+
maximizedBackground: string;
|
|
42
|
+
maximizedColor: string;
|
|
43
|
+
}
|
|
44
|
+
export declare function controlStyle(colors?: KerusiSeatmapColors): KerusiControlStyle;
|
|
45
|
+
//# sourceMappingURL=control-strings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-strings.d.ts","sourceRoot":"","sources":["../../src/view/control-strings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,mBAAmB,EAAiB,MAAM,4BAA4B,CAAC;AAExF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,8BAA8B,EAAE,oBAQ5C,CAAC;AAEF,4EAA4E;AAC5E,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACtC,oBAAoB,CAEtB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,2FAA2F;IAC3F,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,kBAAkB,CAe7E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cssVar, resolveColors } from './kerusi-seatmap-colors.js';
|
|
2
|
+
export const DEFAULT_KERUSI_CONTROL_STRINGS = {
|
|
3
|
+
viewport: 'Zoomable seat map. Plus and minus zoom, zero resets, arrow keys pan.',
|
|
4
|
+
toolbar: 'Map controls',
|
|
5
|
+
zoomIn: 'Zoom in',
|
|
6
|
+
zoomOut: 'Zoom out',
|
|
7
|
+
zoomReset: 'Reset zoom',
|
|
8
|
+
maximize: 'Enter full screen',
|
|
9
|
+
restore: 'Exit full screen',
|
|
10
|
+
};
|
|
11
|
+
/** Fills the gaps in a partial set of strings with the English defaults. */
|
|
12
|
+
export function resolveControlStrings(strings) {
|
|
13
|
+
return { ...DEFAULT_KERUSI_CONTROL_STRINGS, ...strings };
|
|
14
|
+
}
|
|
15
|
+
export function controlStyle(colors) {
|
|
16
|
+
const resolved = resolveColors(colors);
|
|
17
|
+
return {
|
|
18
|
+
buttonBackground: cssVar('elementBg', resolved.elementBg),
|
|
19
|
+
buttonColor: cssVar('elementFg', resolved.elementFg),
|
|
20
|
+
buttonBorder: cssVar('elementMutedFg', resolved.elementMutedFg),
|
|
21
|
+
// A maximized map covers the page, so a transparent backdrop would show it
|
|
22
|
+
// through. `Canvas` / `CanvasText` are the page's own background and text
|
|
23
|
+
// colours, which keeps the pair legible in whichever scheme the host uses.
|
|
24
|
+
maximizedBackground: cssVar('backdrop', resolved.backdrop === 'transparent' ? 'Canvas' : resolved.backdrop),
|
|
25
|
+
maximizedColor: 'CanvasText',
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=control-strings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-strings.js","sourceRoot":"","sources":["../../src/view/control-strings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAuB,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAuBxF,MAAM,CAAC,MAAM,8BAA8B,GAAyB;IAClE,QAAQ,EAAE,sEAAsE;IAChF,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,YAAY;IACvB,QAAQ,EAAE,mBAAmB;IAC7B,OAAO,EAAE,kBAAkB;CAC5B,CAAC;AAEF,4EAA4E;AAC5E,MAAM,UAAU,qBAAqB,CACnC,OAAuC;IAEvC,OAAO,EAAE,GAAG,8BAA8B,EAAE,GAAG,OAAO,EAAE,CAAC;AAC3D,CAAC;AAsBD,MAAM,UAAU,YAAY,CAAC,MAA4B;IACvD,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO;QACL,gBAAgB,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,SAAS,CAAC;QACzD,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,SAAS,CAAC;QACpD,YAAY,EAAE,MAAM,CAAC,gBAAgB,EAAE,QAAQ,CAAC,cAAc,CAAC;QAC/D,2EAA2E;QAC3E,0EAA0E;QAC1E,2EAA2E;QAC3E,mBAAmB,EAAE,MAAM,CACzB,UAAU,EACV,QAAQ,CAAC,QAAQ,KAAK,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CACnE;QACD,cAAc,EAAE,YAAY;KAC7B,CAAC;AACJ,CAAC"}
|
package/dist/view/index.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Presentation policy that is still framework-free: the colour system a
|
|
3
|
-
* renderer resolves seat fills from, the ARIA strings it announces,
|
|
4
|
-
* selection rules that decide whether a seat may be toggled
|
|
3
|
+
* renderer resolves seat fills from, the ARIA strings it announces, the
|
|
4
|
+
* selection rules that decide whether a seat may be toggled, and the zoom, pan
|
|
5
|
+
* and gesture arithmetic behind a zoomable map.
|
|
5
6
|
*
|
|
6
7
|
* A binding turns these into markup; none of them know how.
|
|
7
8
|
*/
|
|
9
|
+
export * from './control-strings.js';
|
|
10
|
+
export * from './kerusi-seat-style.js';
|
|
8
11
|
export * from './kerusi-seatmap-colors.js';
|
|
9
12
|
export * from './rtl.js';
|
|
13
|
+
export * from './seat-glyph.js';
|
|
10
14
|
export * from './seat-aria.js';
|
|
11
15
|
export * from './selection.js';
|
|
16
|
+
export * from './viewport.js';
|
|
17
|
+
export * from './viewport-gesture.js';
|
|
12
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/view/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/view/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/view/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC"}
|
package/dist/view/index.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Presentation policy that is still framework-free: the colour system a
|
|
3
|
-
* renderer resolves seat fills from, the ARIA strings it announces,
|
|
4
|
-
* selection rules that decide whether a seat may be toggled
|
|
3
|
+
* renderer resolves seat fills from, the ARIA strings it announces, the
|
|
4
|
+
* selection rules that decide whether a seat may be toggled, and the zoom, pan
|
|
5
|
+
* and gesture arithmetic behind a zoomable map.
|
|
5
6
|
*
|
|
6
7
|
* A binding turns these into markup; none of them know how.
|
|
7
8
|
*/
|
|
9
|
+
export * from './control-strings.js';
|
|
10
|
+
export * from './kerusi-seat-style.js';
|
|
8
11
|
export * from './kerusi-seatmap-colors.js';
|
|
9
12
|
export * from './rtl.js';
|
|
13
|
+
export * from './seat-glyph.js';
|
|
10
14
|
export * from './seat-aria.js';
|
|
11
15
|
export * from './selection.js';
|
|
16
|
+
export * from './viewport.js';
|
|
17
|
+
export * from './viewport-gesture.js';
|
|
12
18
|
//# sourceMappingURL=index.js.map
|
package/dist/view/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/view/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/view/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { RenderSeat } from '../render/render-model.js';
|
|
2
|
+
import { KerusiSeatShape } from '../render/seat-shapes.js';
|
|
3
|
+
/**
|
|
4
|
+
* Per-seat styling from code: the TypeScript counterpart of the
|
|
5
|
+
* `--kerusi-seat-fill` / `--kerusi-seat-label` tokens, for when the decision
|
|
6
|
+
* lives in the application (a recommendation, a search result, the document's
|
|
7
|
+
* own `Seat.metadata`) rather than in a stylesheet.
|
|
8
|
+
*
|
|
9
|
+
* A style is an *identity* colour, exactly like `SeatType.color`, and it takes
|
|
10
|
+
* the same slot. It never replaces the selected or blocked treatment, and a held
|
|
11
|
+
* or booked seat keeps its wash and occupant figure over it, so status is still
|
|
12
|
+
* read from shape (decision D4 in #26). A future `states` field is where a
|
|
13
|
+
* per-status override would go, if a real need for one appears.
|
|
14
|
+
*/
|
|
15
|
+
export interface KerusiSeatStyle {
|
|
16
|
+
/**
|
|
17
|
+
* The seat's own colour, in place of its `SeatType.color` or `availableBg`.
|
|
18
|
+
* Never applied to a selected or blocked seat. Any CSS colour works; a
|
|
19
|
+
* stylesheet's `--kerusi-seat-fill` still wins over it.
|
|
20
|
+
*/
|
|
21
|
+
fill?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The number's colour on that fill. When omitted, a hex `fill` gets black or
|
|
24
|
+
* white, whichever reads better; any other `fill` (a `var()`, `hsl()`) falls
|
|
25
|
+
* back to `availableFg`, so set this alongside it.
|
|
26
|
+
*/
|
|
27
|
+
labelColor?: string;
|
|
28
|
+
/** Extra classes on the seat's `<g>`, for CSS that needs more than colour. */
|
|
29
|
+
className?: string | readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* The seat's outline, in place of the default tapered `'seat'`. The wash, the
|
|
32
|
+
* selected frame and core, and the focus outline follow it. Only `'seat'`
|
|
33
|
+
* shows which way a seat faces.
|
|
34
|
+
*/
|
|
35
|
+
shape?: KerusiSeatShape;
|
|
36
|
+
}
|
|
37
|
+
/** Styles keyed by `SeatType.id`, for the `seatTypeStyles` input/prop. */
|
|
38
|
+
export type SeatTypeStyles = Readonly<Record<string, KerusiSeatStyle>>;
|
|
39
|
+
/**
|
|
40
|
+
* The `seatStyle` input/prop: a style for one seat, or nothing to leave it be.
|
|
41
|
+
* Called for every seat whenever the selection, state or theme changes.
|
|
42
|
+
*/
|
|
43
|
+
export type SeatStyleFn = (seat: RenderSeat, ctx: {
|
|
44
|
+
selected: boolean;
|
|
45
|
+
}) => KerusiSeatStyle | null | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The style a seat is drawn with: its type's entry in `typeStyles`, with the
|
|
48
|
+
* per-seat `fn` result laid over it field by field. Classes from both are kept.
|
|
49
|
+
* `undefined` when neither has anything to say.
|
|
50
|
+
*
|
|
51
|
+
* `typeStyles` applies whether or not `typeColors` is on: that flag governs the
|
|
52
|
+
* document's own `SeatType.color`, while a type style is the application's
|
|
53
|
+
* explicit choice.
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveSeatStyle(seat: RenderSeat, selected: boolean, typeStyles?: SeatTypeStyles, fn?: SeatStyleFn): KerusiSeatStyle | undefined;
|
|
56
|
+
/** A `className` as a flat list of non-empty class names. */
|
|
57
|
+
export declare function classList(className: string | readonly string[] | undefined): string[];
|
|
58
|
+
//# sourceMappingURL=kerusi-seat-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kerusi-seat-style.d.ts","sourceRoot":"","sources":["../../src/view/kerusi-seat-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACvC;;;;OAIG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,0EAA0E;AAC1E,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CACxB,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,KACvB,eAAe,GAAG,IAAI,GAAG,SAAS,CAAC;AAExC;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,OAAO,EACjB,UAAU,CAAC,EAAE,cAAc,EAC3B,EAAE,CAAC,EAAE,WAAW,GACf,eAAe,GAAG,SAAS,CAa7B;AAED,6DAA6D;AAC7D,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAMrF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The style a seat is drawn with: its type's entry in `typeStyles`, with the
|
|
3
|
+
* per-seat `fn` result laid over it field by field. Classes from both are kept.
|
|
4
|
+
* `undefined` when neither has anything to say.
|
|
5
|
+
*
|
|
6
|
+
* `typeStyles` applies whether or not `typeColors` is on: that flag governs the
|
|
7
|
+
* document's own `SeatType.color`, while a type style is the application's
|
|
8
|
+
* explicit choice.
|
|
9
|
+
*/
|
|
10
|
+
export function resolveSeatStyle(seat, selected, typeStyles, fn) {
|
|
11
|
+
const byType = typeStyles?.[seat.type.id];
|
|
12
|
+
const bySeat = fn?.(seat, { selected }) ?? undefined;
|
|
13
|
+
if (!byType && !bySeat) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
const classes = [...classList(byType?.className), ...classList(bySeat?.className)];
|
|
17
|
+
return {
|
|
18
|
+
fill: bySeat?.fill ?? byType?.fill,
|
|
19
|
+
labelColor: bySeat?.labelColor ?? byType?.labelColor,
|
|
20
|
+
shape: bySeat?.shape ?? byType?.shape,
|
|
21
|
+
className: classes.length ? classes : undefined,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** A `className` as a flat list of non-empty class names. */
|
|
25
|
+
export function classList(className) {
|
|
26
|
+
if (!className) {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
const parts = typeof className === 'string' ? [className] : className;
|
|
30
|
+
return parts.flatMap((part) => part.split(/\s+/)).filter(Boolean);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=kerusi-seat-style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kerusi-seat-style.js","sourceRoot":"","sources":["../../src/view/kerusi-seat-style.ts"],"names":[],"mappings":"AAkDA;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAAgB,EAChB,QAAiB,EACjB,UAA2B,EAC3B,EAAgB;IAEhB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,SAAS,CAAC;IACrD,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,OAAO,GAAG,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IACnF,OAAO;QACL,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,MAAM,EAAE,IAAI;QAClC,UAAU,EAAE,MAAM,EAAE,UAAU,IAAI,MAAM,EAAE,UAAU;QACpD,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,MAAM,EAAE,KAAK;QACrC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;KAChD,CAAC;AACJ,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,SAAS,CAAC,SAAiD;IACzE,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { RenderSeat } from '../render/render-model.js';
|
|
1
|
+
import { RenderLegendEntry, RenderSeat } from '../render/render-model.js';
|
|
2
|
+
import { KerusiSeatStyle } from './kerusi-seat-style.js';
|
|
2
3
|
/**
|
|
3
4
|
* Theming for `<kerusi-seatmap>`.
|
|
4
5
|
*
|
|
@@ -93,15 +94,38 @@ export declare function resolveColors(colors?: KerusiSeatmapColors): Required<Ke
|
|
|
93
94
|
*
|
|
94
95
|
* `SeatType.color` deliberately does not go through here. That is the
|
|
95
96
|
* document's own value under §4.7, not the theme's, and {@link readableOn}
|
|
96
|
-
* still has to be able to parse it.
|
|
97
|
+
* still has to be able to parse it. It can only be overridden per seat, through
|
|
98
|
+
* {@link SEAT_FILL_VAR}, never by a global token.
|
|
97
99
|
*/
|
|
98
100
|
export declare function cssVar(key: keyof KerusiSeatmapColors, value: string): string;
|
|
99
101
|
/** `selectedBg` → `--kerusi-selected-bg`. */
|
|
100
102
|
export declare function cssVarName(key: keyof KerusiSeatmapColors): string;
|
|
103
|
+
/**
|
|
104
|
+
* The per-seat fill token. Unlike the `--kerusi-*` theme tokens above, this one
|
|
105
|
+
* is meant to be set on *some* seats, from a selector that picks them out:
|
|
106
|
+
*
|
|
107
|
+
* ```css
|
|
108
|
+
* .kerusi-seat[data-seat-type="vip"] { --kerusi-seat-fill: #d4a017; }
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* Custom properties inherit, so setting it on the seat's `<g>` reaches the body
|
|
112
|
+
* inside it. It replaces only the seat's own colour (the slot `SeatType.color`
|
|
113
|
+
* fills), never the selected or blocked treatment, so status stays readable.
|
|
114
|
+
* The library never sets it, and there is deliberately no global default: a
|
|
115
|
+
* document's type colour is overridden one targeted selector at a time.
|
|
116
|
+
*/
|
|
117
|
+
export declare const SEAT_FILL_VAR = "--kerusi-seat-fill";
|
|
118
|
+
/** The label colour that pairs with {@link SEAT_FILL_VAR}, set the same way. */
|
|
119
|
+
export declare const SEAT_LABEL_VAR = "--kerusi-seat-label";
|
|
101
120
|
/**
|
|
102
121
|
* The fill for a seat's body, in precedence order:
|
|
103
122
|
*
|
|
104
|
-
* selected → blocked → `
|
|
123
|
+
* selected → blocked → `--kerusi-seat-fill` → `style.fill` → `SeatType.color`
|
|
124
|
+
* → available
|
|
125
|
+
*
|
|
126
|
+
* `style` is the seat's resolved `seatStyle` / `seatTypeStyles` entry (see
|
|
127
|
+
* `resolveSeatStyle`). Like the CSS token it only fills the seat's own-colour
|
|
128
|
+
* slot, so it can never hide the selected or blocked treatment.
|
|
105
129
|
*
|
|
106
130
|
* For a selected seat this is the *frame*: {@link seatCoreFill}'s core is drawn
|
|
107
131
|
* inside it and covers most of the body, so `selectedBg` reads as a border
|
|
@@ -116,7 +140,7 @@ export declare function cssVarName(key: keyof KerusiSeatmapColors): string;
|
|
|
116
140
|
* whole signal, same as before. Attributes never affect the fill — §4.3.3
|
|
117
141
|
* makes them descriptive tags, not a rendering category.
|
|
118
142
|
*/
|
|
119
|
-
export declare function seatFill(seat: RenderSeat, selected: boolean, colors: Required<KerusiSeatmapColors>, useTypeColors: boolean): string;
|
|
143
|
+
export declare function seatFill(seat: RenderSeat, selected: boolean, colors: Required<KerusiSeatmapColors>, useTypeColors: boolean, style?: KerusiSeatStyle): string;
|
|
120
144
|
/**
|
|
121
145
|
* The bright core inside a selected seat's frame — the second of the two tones
|
|
122
146
|
* selection is drawn from, see the module doc comment. Everything drawn over
|
|
@@ -129,7 +153,17 @@ export declare function seatCoreFill(colors: Required<KerusiSeatmapColors>): str
|
|
|
129
153
|
* where the label sits on {@link seatCoreFill}'s core rather than on the frame,
|
|
130
154
|
* so the two tones swap round.
|
|
131
155
|
*/
|
|
132
|
-
export declare function seatTextFill(seat: RenderSeat, selected: boolean, colors: Required<KerusiSeatmapColors>, useTypeColors: boolean): string;
|
|
156
|
+
export declare function seatTextFill(seat: RenderSeat, selected: boolean, colors: Required<KerusiSeatmapColors>, useTypeColors: boolean, style?: KerusiSeatStyle): string;
|
|
157
|
+
/**
|
|
158
|
+
* A legend type swatch's fill: the same per-seat token and the same fallback as
|
|
159
|
+
* an available seat of that type, so a rule that sets `--kerusi-seat-fill` on
|
|
160
|
+
* `.kerusi-legend__item[data-seat-type="…"]` as well as on the seats keeps the
|
|
161
|
+
* key in step with the map. Pass the type's `seatTypeStyles` entry for the same
|
|
162
|
+
* reason; a per-seat `seatStyle` has no single value a legend could show.
|
|
163
|
+
*/
|
|
164
|
+
export declare function legendSwatchFill(entry: RenderLegendEntry, colors: Required<KerusiSeatmapColors>, useTypeColors: boolean, typeStyle?: KerusiSeatStyle): string;
|
|
165
|
+
/** The text colour that pairs with {@link legendSwatchFill}. */
|
|
166
|
+
export declare function legendSwatchText(entry: RenderLegendEntry, colors: Required<KerusiSeatmapColors>, useTypeColors: boolean, typeStyle?: KerusiSeatStyle): string;
|
|
133
167
|
/** Which occupant figure marks a seat, if any — see {@link seatFill}. */
|
|
134
168
|
export type SeatOccupantVariant = 'selected' | 'held' | 'booked';
|
|
135
169
|
/**
|
|
@@ -173,4 +207,6 @@ export declare function elementTextFill(tone: 'neutral' | 'accent' | 'muted', co
|
|
|
173
207
|
* the contrast each actually needs.
|
|
174
208
|
*/
|
|
175
209
|
export declare function readableOn(background: string): string;
|
|
210
|
+
/** Whether {@link readableOn} can read this colour: `#rgb` or `#rrggbb`. */
|
|
211
|
+
export declare function isHexColor(color: string): boolean;
|
|
176
212
|
//# sourceMappingURL=kerusi-seatmap-colors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kerusi-seatmap-colors.d.ts","sourceRoot":"","sources":["../../src/view/kerusi-seatmap-colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"kerusi-seatmap-colors.d.ts","sourceRoot":"","sources":["../../src/view/kerusi-seatmap-colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,mBAAmB;IAClC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uDAA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,4CAA4C;AAC5C,wBAAgB,eAAe,CAC7B,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,EACpC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GACpC,MAAM,CAMR;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAWrD;AAED,4EAA4E;AAC5E,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEjD"}
|
|
@@ -46,7 +46,8 @@ export function resolveColors(colors) {
|
|
|
46
46
|
*
|
|
47
47
|
* `SeatType.color` deliberately does not go through here. That is the
|
|
48
48
|
* document's own value under §4.7, not the theme's, and {@link readableOn}
|
|
49
|
-
* still has to be able to parse it.
|
|
49
|
+
* still has to be able to parse it. It can only be overridden per seat, through
|
|
50
|
+
* {@link SEAT_FILL_VAR}, never by a global token.
|
|
50
51
|
*/
|
|
51
52
|
export function cssVar(key, value) {
|
|
52
53
|
return `var(${cssVarName(key)}, ${value})`;
|
|
@@ -55,10 +56,32 @@ export function cssVar(key, value) {
|
|
|
55
56
|
export function cssVarName(key) {
|
|
56
57
|
return `--kerusi-${key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`;
|
|
57
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* The per-seat fill token. Unlike the `--kerusi-*` theme tokens above, this one
|
|
61
|
+
* is meant to be set on *some* seats, from a selector that picks them out:
|
|
62
|
+
*
|
|
63
|
+
* ```css
|
|
64
|
+
* .kerusi-seat[data-seat-type="vip"] { --kerusi-seat-fill: #d4a017; }
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* Custom properties inherit, so setting it on the seat's `<g>` reaches the body
|
|
68
|
+
* inside it. It replaces only the seat's own colour (the slot `SeatType.color`
|
|
69
|
+
* fills), never the selected or blocked treatment, so status stays readable.
|
|
70
|
+
* The library never sets it, and there is deliberately no global default: a
|
|
71
|
+
* document's type colour is overridden one targeted selector at a time.
|
|
72
|
+
*/
|
|
73
|
+
export const SEAT_FILL_VAR = '--kerusi-seat-fill';
|
|
74
|
+
/** The label colour that pairs with {@link SEAT_FILL_VAR}, set the same way. */
|
|
75
|
+
export const SEAT_LABEL_VAR = '--kerusi-seat-label';
|
|
58
76
|
/**
|
|
59
77
|
* The fill for a seat's body, in precedence order:
|
|
60
78
|
*
|
|
61
|
-
* selected → blocked → `
|
|
79
|
+
* selected → blocked → `--kerusi-seat-fill` → `style.fill` → `SeatType.color`
|
|
80
|
+
* → available
|
|
81
|
+
*
|
|
82
|
+
* `style` is the seat's resolved `seatStyle` / `seatTypeStyles` entry (see
|
|
83
|
+
* `resolveSeatStyle`). Like the CSS token it only fills the seat's own-colour
|
|
84
|
+
* slot, so it can never hide the selected or blocked treatment.
|
|
62
85
|
*
|
|
63
86
|
* For a selected seat this is the *frame*: {@link seatCoreFill}'s core is drawn
|
|
64
87
|
* inside it and covers most of the body, so `selectedBg` reads as a border
|
|
@@ -73,14 +96,34 @@ export function cssVarName(key) {
|
|
|
73
96
|
* whole signal, same as before. Attributes never affect the fill — §4.3.3
|
|
74
97
|
* makes them descriptive tags, not a rendering category.
|
|
75
98
|
*/
|
|
76
|
-
export function seatFill(seat, selected, colors, useTypeColors) {
|
|
99
|
+
export function seatFill(seat, selected, colors, useTypeColors, style) {
|
|
77
100
|
if (selected) {
|
|
78
101
|
return cssVar('selectedBg', colors.selectedBg);
|
|
79
102
|
}
|
|
80
103
|
if (seat.status === 'blocked') {
|
|
81
104
|
return cssVar('blockedBg', colors.blockedBg);
|
|
82
105
|
}
|
|
83
|
-
return (
|
|
106
|
+
return `var(${SEAT_FILL_VAR}, ${baseFill(seat.typeColor, colors, useTypeColors, style)})`;
|
|
107
|
+
}
|
|
108
|
+
/** A seat's own colour: its type's, when allowed, or the theme's available fill. */
|
|
109
|
+
function baseFill(typeColor, colors, useTypeColors, style) {
|
|
110
|
+
return style?.fill || (useTypeColors && typeColor) || cssVar('availableBg', colors.availableBg);
|
|
111
|
+
}
|
|
112
|
+
/** The label colour to pair with {@link baseFill}. */
|
|
113
|
+
function baseText(typeColor, colors, useTypeColors, style) {
|
|
114
|
+
if (style?.labelColor) {
|
|
115
|
+
return style.labelColor;
|
|
116
|
+
}
|
|
117
|
+
if (style?.fill) {
|
|
118
|
+
// Only a hex colour can be read for contrast; for anything else the theme's
|
|
119
|
+
// label colour is the safer guess, and the docs say to set `labelColor`.
|
|
120
|
+
return isHexColor(style.fill)
|
|
121
|
+
? readableOn(style.fill)
|
|
122
|
+
: cssVar('availableFg', colors.availableFg);
|
|
123
|
+
}
|
|
124
|
+
return useTypeColors && typeColor
|
|
125
|
+
? readableOn(typeColor)
|
|
126
|
+
: cssVar('availableFg', colors.availableFg);
|
|
84
127
|
}
|
|
85
128
|
/**
|
|
86
129
|
* The bright core inside a selected seat's frame — the second of the two tones
|
|
@@ -96,16 +139,28 @@ export function seatCoreFill(colors) {
|
|
|
96
139
|
* where the label sits on {@link seatCoreFill}'s core rather than on the frame,
|
|
97
140
|
* so the two tones swap round.
|
|
98
141
|
*/
|
|
99
|
-
export function seatTextFill(seat, selected, colors, useTypeColors) {
|
|
142
|
+
export function seatTextFill(seat, selected, colors, useTypeColors, style) {
|
|
100
143
|
if (selected) {
|
|
101
144
|
return cssVar('selectedBg', colors.selectedBg);
|
|
102
145
|
}
|
|
103
146
|
if (seat.status === 'blocked') {
|
|
104
147
|
return cssVar('blockedFg', colors.blockedFg);
|
|
105
148
|
}
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
|
|
149
|
+
return `var(${SEAT_LABEL_VAR}, ${baseText(seat.typeColor, colors, useTypeColors, style)})`;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* A legend type swatch's fill: the same per-seat token and the same fallback as
|
|
153
|
+
* an available seat of that type, so a rule that sets `--kerusi-seat-fill` on
|
|
154
|
+
* `.kerusi-legend__item[data-seat-type="…"]` as well as on the seats keeps the
|
|
155
|
+
* key in step with the map. Pass the type's `seatTypeStyles` entry for the same
|
|
156
|
+
* reason; a per-seat `seatStyle` has no single value a legend could show.
|
|
157
|
+
*/
|
|
158
|
+
export function legendSwatchFill(entry, colors, useTypeColors, typeStyle) {
|
|
159
|
+
return `var(${SEAT_FILL_VAR}, ${baseFill(entry.color, colors, useTypeColors, typeStyle)})`;
|
|
160
|
+
}
|
|
161
|
+
/** The text colour that pairs with {@link legendSwatchFill}. */
|
|
162
|
+
export function legendSwatchText(entry, colors, useTypeColors, typeStyle) {
|
|
163
|
+
return `var(${SEAT_LABEL_VAR}, ${baseText(entry.color, colors, useTypeColors, typeStyle)})`;
|
|
109
164
|
}
|
|
110
165
|
/**
|
|
111
166
|
* The occupant figure for a seat, or `null` for a seat with nothing to draw:
|
|
@@ -194,6 +249,10 @@ export function readableOn(background) {
|
|
|
194
249
|
const luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
195
250
|
return luminance > 0.179 ? '#000000' : '#ffffff';
|
|
196
251
|
}
|
|
252
|
+
/** Whether {@link readableOn} can read this colour: `#rgb` or `#rrggbb`. */
|
|
253
|
+
export function isHexColor(color) {
|
|
254
|
+
return parseHex(color) !== undefined;
|
|
255
|
+
}
|
|
197
256
|
/** `#rgb` or `#rrggbb` to channel values. Returns `undefined` for anything else. */
|
|
198
257
|
function parseHex(color) {
|
|
199
258
|
const hex = color.trim().replace(/^#/, '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kerusi-seatmap-colors.js","sourceRoot":"","sources":["../../src/view/kerusi-seatmap-colors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kerusi-seatmap-colors.js","sourceRoot":"","sources":["../../src/view/kerusi-seatmap-colors.ts"],"names":[],"mappings":"AAyEA,MAAM,CAAC,MAAM,qBAAqB,GAAkC;IAClE,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,QAAQ,EA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