@kerusiweb/core 2.2.0 → 3.0.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/LICENSE +22 -22
- package/README.md +70 -68
- package/dist/kerusi/index.d.ts +4 -3
- package/dist/kerusi/index.d.ts.map +1 -1
- package/dist/kerusi/index.js +4 -3
- package/dist/kerusi/index.js.map +1 -1
- package/dist/kerusi/kerusi-geometry.d.ts +47 -0
- package/dist/kerusi/kerusi-geometry.d.ts.map +1 -0
- package/dist/kerusi/kerusi-geometry.js +111 -0
- package/dist/kerusi/kerusi-geometry.js.map +1 -0
- package/dist/kerusi/kerusi-map.model.d.ts +121 -68
- package/dist/kerusi/kerusi-map.model.d.ts.map +1 -1
- package/dist/kerusi/kerusi-map.model.js +6 -2
- package/dist/kerusi/kerusi-map.model.js.map +1 -1
- package/dist/kerusi/kerusi-rows.d.ts +2 -2
- package/dist/kerusi/kerusi-rows.js +2 -2
- package/dist/kerusi/kerusi-validator.d.ts +18 -9
- package/dist/kerusi/kerusi-validator.d.ts.map +1 -1
- package/dist/kerusi/kerusi-validator.js +301 -122
- package/dist/kerusi/kerusi-validator.js.map +1 -1
- package/dist/render/build-render-model.d.ts +8 -4
- package/dist/render/build-render-model.d.ts.map +1 -1
- package/dist/render/build-render-model.js +147 -45
- package/dist/render/build-render-model.js.map +1 -1
- package/dist/render/index.d.ts +1 -1
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +1 -1
- package/dist/render/index.js.map +1 -1
- package/dist/render/map-layout.d.ts +92 -0
- package/dist/render/map-layout.d.ts.map +1 -0
- package/dist/render/map-layout.js +93 -0
- package/dist/render/map-layout.js.map +1 -0
- package/dist/render/navigation-order.d.ts +20 -10
- package/dist/render/navigation-order.d.ts.map +1 -1
- package/dist/render/navigation-order.js +72 -57
- package/dist/render/navigation-order.js.map +1 -1
- package/dist/render/render-model.d.ts +48 -26
- package/dist/render/render-model.d.ts.map +1 -1
- package/dist/render/seat-shapes.d.ts +36 -3
- package/dist/render/seat-shapes.d.ts.map +1 -1
- package/dist/render/seat-shapes.js +50 -3
- package/dist/render/seat-shapes.js.map +1 -1
- package/dist/view/index.d.ts +2 -0
- package/dist/view/index.d.ts.map +1 -1
- package/dist/view/index.js +2 -0
- 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/rtl.d.ts +1 -1
- package/dist/view/rtl.js +1 -1
- package/dist/view/seat-aria.d.ts +6 -0
- package/dist/view/seat-aria.d.ts.map +1 -1
- package/dist/view/seat-aria.js +8 -0
- package/dist/view/seat-aria.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.d.ts +35 -7
- package/dist/view/viewport.d.ts.map +1 -1
- package/dist/view/viewport.js +56 -7
- package/dist/view/viewport.js.map +1 -1
- package/package.json +42 -42
- package/dist/kerusi/kerusi-layout-mode.d.ts +0 -58
- package/dist/kerusi/kerusi-layout-mode.d.ts.map +0 -1
- package/dist/kerusi/kerusi-layout-mode.js +0 -117
- package/dist/kerusi/kerusi-layout-mode.js.map +0 -1
- package/dist/render/section-layout.d.ts +0 -66
- package/dist/render/section-layout.d.ts.map +0 -1
- package/dist/render/section-layout.js +0 -186
- package/dist/render/section-layout.js.map +0 -1
|
@@ -98,8 +98,8 @@ export function seatBodyPath(x, y, width, height, inset = 0) {
|
|
|
98
98
|
* The width of the frame around a selected seat's core — feed it straight to
|
|
99
99
|
* {@link seatBodyPath}'s `inset` to get the core.
|
|
100
100
|
*
|
|
101
|
-
* A seat is always square: `
|
|
102
|
-
* `size × size`,
|
|
101
|
+
* A seat is always square: `map-layout` places every one of them as
|
|
102
|
+
* `size × size`, every seat in a section the same size. That makes the inset
|
|
103
103
|
* shape an *exact* scaled copy of the body about its centre, not merely a
|
|
104
104
|
* similar-looking one, so any mark that clears the body also clears the core
|
|
105
105
|
* when it is drawn to the core's own box. That is what lets the frame width
|
|
@@ -131,7 +131,7 @@ export const seatRingStroke = seatSelectedFrame;
|
|
|
131
131
|
* though, so pass the box the figure is meant to sit *on*: a selected seat
|
|
132
132
|
* draws it to the core's box, not the seat's, or the hips cross the frame.
|
|
133
133
|
*
|
|
134
|
-
* The ratios assume a square box, which is what `
|
|
134
|
+
* The ratios assume a square box, which is what `map-layout` always
|
|
135
135
|
* places. On a wide box the head, sized from the width, would outgrow the
|
|
136
136
|
* height.
|
|
137
137
|
*/
|
|
@@ -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 @@
|
|
|
1
|
-
{"version":3,"file":"seat-shapes.js","sourceRoot":"","sources":["../../src/render/seat-shapes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AACH,SAAS,CAAC,CAAC,KAAa;IACtB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAA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C,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"}
|
package/dist/view/index.d.ts
CHANGED
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
* A binding turns these into markup; none of them know how.
|
|
8
8
|
*/
|
|
9
9
|
export * from './control-strings.js';
|
|
10
|
+
export * from './kerusi-seat-style.js';
|
|
10
11
|
export * from './kerusi-seatmap-colors.js';
|
|
11
12
|
export * from './rtl.js';
|
|
13
|
+
export * from './seat-glyph.js';
|
|
12
14
|
export * from './seat-aria.js';
|
|
13
15
|
export * from './selection.js';
|
|
14
16
|
export * from './viewport.js';
|
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;;;;;;;GAOG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC"}
|
|
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
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
* A binding turns these into markup; none of them know how.
|
|
8
8
|
*/
|
|
9
9
|
export * from './control-strings.js';
|
|
10
|
+
export * from './kerusi-seat-style.js';
|
|
10
11
|
export * from './kerusi-seatmap-colors.js';
|
|
11
12
|
export * from './rtl.js';
|
|
13
|
+
export * from './seat-glyph.js';
|
|
12
14
|
export * from './seat-aria.js';
|
|
13
15
|
export * from './selection.js';
|
|
14
16
|
export * from './viewport.js';
|
package/dist/view/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/view/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC"}
|
|
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,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAA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C,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,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,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,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC3C,MAAM,IAAI,GACR,GAAG,CAAC,MAAM,KAAK,CAAC;QACd,CAAC,CAAC,GAAG;aACA,KAAK,CAAC,EAAE,CAAC;aACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;aACjB,IAAI,CAAC,EAAE,CAAC;QACb,CAAC,CAAC,GAAG,CAAC;IACV,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACjC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO;QACL,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;KACtC,CAAC;AACJ,CAAC"}
|
package/dist/view/rtl.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Which locales are written right-to-left.
|
|
3
3
|
*
|
|
4
|
-
* A binding needs this to decide whether to mirror
|
|
4
|
+
* A binding needs this to decide whether to mirror the whole canvas and swap the
|
|
5
5
|
* left/right arrow keys, and it would be written identically in every one —
|
|
6
6
|
* so it belongs here rather than in any of them.
|
|
7
7
|
*/
|
package/dist/view/rtl.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Which locales are written right-to-left.
|
|
3
3
|
*
|
|
4
|
-
* A binding needs this to decide whether to mirror
|
|
4
|
+
* A binding needs this to decide whether to mirror the whole canvas and swap the
|
|
5
5
|
* left/right arrow keys, and it would be written identically in every one —
|
|
6
6
|
* so it belongs here rather than in any of them.
|
|
7
7
|
*/
|
package/dist/view/seat-aria.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ import { DisallowedReason } from './selection.js';
|
|
|
15
15
|
export interface SeatAriaStrings {
|
|
16
16
|
rowSeat: (row: string, seat: string) => string;
|
|
17
17
|
seatOnly: (seat: string) => string;
|
|
18
|
+
/** Said when an aisle runs beside the seat (§4.3.5: a skipped `col`). */
|
|
19
|
+
besideAisle: string;
|
|
18
20
|
noPrice: string;
|
|
19
21
|
available: string;
|
|
20
22
|
booked: string;
|
|
@@ -35,6 +37,10 @@ export declare const DEFAULT_SEAT_ARIA_STRINGS: SeatAriaStrings;
|
|
|
35
37
|
* Builds a seat's accessible name, in the order a listener needs it: where the
|
|
36
38
|
* seat is, what kind it is, what it costs, whether it can be had, what
|
|
37
39
|
* accessibility it offers, and finally its descriptive tags.
|
|
40
|
+
*
|
|
41
|
+
* "Where" comes from the document's row and adjacency, never from `x`/`y`: an
|
|
42
|
+
* aisle is mentioned when the next seat along the row skips a `col` (§4.3.5),
|
|
43
|
+
* which is also where the arrow keys jump across it.
|
|
38
44
|
*/
|
|
39
45
|
export declare function seatAriaLabel(seat: RenderSeat, locale: string, strings?: SeatAriaStrings): string;
|
|
40
46
|
/** A hold expiry as a local clock time; falls back to the raw value. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-aria.d.ts","sourceRoot":"","sources":["../../src/view/seat-aria.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;;;;;;GAUG;AAEH,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CA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ACpC,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0CAA0C;IAC1C,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3D,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,yBAAyB,EAAE,eAyBvC,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,eAA2C,GACnD,MAAM,CAyBR;AAwCD,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAU9D;AAED,mEAAmE;AACnE,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,eAA2C,GACnD,MAAM,CAKR"}
|
package/dist/view/seat-aria.js
CHANGED
|
@@ -2,6 +2,7 @@ import { formatMoney } from '../kerusi/kerusi-locale.js';
|
|
|
2
2
|
export const DEFAULT_SEAT_ARIA_STRINGS = {
|
|
3
3
|
rowSeat: (row, seat) => `Row ${row}, seat ${seat}`,
|
|
4
4
|
seatOnly: (seat) => `Seat ${seat}`,
|
|
5
|
+
besideAisle: 'next to an aisle',
|
|
5
6
|
noPrice: 'no price',
|
|
6
7
|
available: 'available',
|
|
7
8
|
booked: 'booked, unavailable',
|
|
@@ -27,10 +28,17 @@ export const DEFAULT_SEAT_ARIA_STRINGS = {
|
|
|
27
28
|
* Builds a seat's accessible name, in the order a listener needs it: where the
|
|
28
29
|
* seat is, what kind it is, what it costs, whether it can be had, what
|
|
29
30
|
* accessibility it offers, and finally its descriptive tags.
|
|
31
|
+
*
|
|
32
|
+
* "Where" comes from the document's row and adjacency, never from `x`/`y`: an
|
|
33
|
+
* aisle is mentioned when the next seat along the row skips a `col` (§4.3.5),
|
|
34
|
+
* which is also where the arrow keys jump across it.
|
|
30
35
|
*/
|
|
31
36
|
export function seatAriaLabel(seat, locale, strings = DEFAULT_SEAT_ARIA_STRINGS) {
|
|
32
37
|
const parts = [];
|
|
33
38
|
parts.push(seat.rowLabel ? strings.rowSeat(seat.rowLabel, seat.label) : strings.seatOnly(seat.label));
|
|
39
|
+
if (seat.besideAisle) {
|
|
40
|
+
parts.push(strings.besideAisle);
|
|
41
|
+
}
|
|
34
42
|
if (seat.typeLabel && seat.typeLabel !== seat.type.id) {
|
|
35
43
|
parts.push(seat.typeLabel);
|
|
36
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-aria.js","sourceRoot":"","sources":["../../src/view/seat-aria.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"seat-aria.js","sourceRoot":"","sources":["../../src/view/seat-aria.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAsCzD,MAAM,CAAC,MAAM,yBAAyB,GAAoB;IACxD,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,GAAG,UAAU,IAAI,EAAE;IAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,IAAI,EAAE;IAClC,WAAW,EAAE,kBAAkB;IAC/B,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,qBAAqB;IAC7B,IAAI,EAAE,sBAAsB;IAC5B,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE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