-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSignage.ts
More file actions
144 lines (123 loc) · 3.78 KB
/
Copy pathSignage.ts
File metadata and controls
144 lines (123 loc) · 3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
import { SchemaDefinition } from '@sozialhelden/simpl-schema';
import { getPrefixedQuantitySchemaDefinition, Length, LengthSchema } from './Quantity.js';
import BooleanField from './BooleanField.js';
import { getLocalizedStringSchemaDefinition, LocalizedString } from './LocalizedString.js';
import { getInteractableSchemaDefinition, Interactable } from './Interactable.js';
export const SignageInteractions = [
'locateYourself',
'findYourDestination',
'useSitemap',
] as const;
export type SignageInteraction = typeof SignageInteractions[number];
export const SignageInteractionsSet = new Set(SignageInteractions);
/**
* Describes a signage / physical navigation system belonging to a location.
*/
export interface Signage extends Interactable<SignageInteraction> {
/**
* A description of the signage.
*/
description?: LocalizedString;
/**
* `true` if the signage has pictograms, `false` if not.
*/
hasPictograms?: boolean;
/**
* `true` if the signage has braille, `false` if not.
*/
hasBraille?: boolean;
/**
* `true` if the signage has raised letters, `false` if not.
*/
hasRaisedLetters?: boolean;
/**
* `true` if the signage has audio, `false` if not.
*/
hasAudio?: boolean;
/**
* `true` if the signage has video, `false` if not.
*/
hasVideo?: boolean;
/**
* `true` if the signage has tactile hand rails, `false` if not, `undefined` if condition is
* unknown.
*/
hasTactileHandRails?: boolean;
/**
* `true` if the signage has tactile room names, `false` if not, `undefined` if condition is
* unknown.
*/
hasTactileRoomNames?: boolean;
/**
* `true` if the signage has tactile north markers, `false` if not, `undefined` if condition is
* unknown.
*
* https://twitter.com/saizai/status/1210352258950598656
*/
hasTactileNorthMarkers?: boolean;
/**
* `true` if the signage has tactile guide strips, `false` if not, `undefined` if condition is
* nknown.
*/
hasTactileGuideStrips?: boolean;
/**
* `true` if the signage has tactile paving, `false` if not.
*/
hasTactilePaving?: boolean;
/**
* `true` if the signage has a virtual map, `false` if not.
*/
hasVirtualMap?: boolean;
/**
* `true` if the signage has a tactile map, `false` if not.
*/
hasTactileMap?: boolean;
/**
* `true` if the signage has a search function, `false` if not, `undefined` if condition is
* unknown.
*/
hasSearch?: boolean;
/**
* `true` if the signage uses a numbering scheme, `false` if not, `undefined` if condition is
* unknown.
*/
hasNumbers?: boolean;
/**
* `true` if the signage has text features, `false` if not.
*/
hasText?: boolean;
/**
* `true` if the signage has high contrast, `false` if not.
*/
isHighContrast?: boolean;
/**
* `true` if the signage has high legibility, `false` if not.
*/
highLegibility?: boolean;
/**
* The height of the font used on the signage. Most likely in millimeters, using a range.
*/
fontHeight?: Length;
}
export const getSignageSchemaDefinition: () => SchemaDefinition = () => ({
...getLocalizedStringSchemaDefinition('description'),
hasPictograms: BooleanField,
hasBraille: BooleanField,
hasRaisedLetters: BooleanField,
hasAudio: BooleanField,
hasVideo: BooleanField,
hasTactileHandRails: BooleanField,
hasTactileRoomNames: BooleanField,
hasTactileNorthMarkers: BooleanField,
hasTactileGuideStrips: BooleanField,
hasTactilePaving: BooleanField,
hasVirtualMap: BooleanField,
hasTactileMap: BooleanField,
hasSearch: BooleanField,
hasNumbers: BooleanField,
hasText: BooleanField,
isHighContrast: BooleanField,
highLegibility: BooleanField,
...getPrefixedQuantitySchemaDefinition('fontHeight', LengthSchema),
...getInteractableSchemaDefinition(SignageInteractionsSet),
});