@instruments/taxonomy 1.1.6 → 1.2.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/assertions.d.ts +70 -0
- package/dist/authoring.d.ts +33 -0
- package/dist/axes/construction.d.ts +3 -0
- package/dist/axes/element-fabric.d.ts +2 -0
- package/dist/axes/element-fitout.d.ts +2 -0
- package/dist/axes/element-shared.d.ts +13 -0
- package/dist/axes/element.d.ts +2 -0
- package/dist/axes/finish.d.ts +9 -0
- package/dist/axes/format.d.ts +3 -0
- package/dist/axes/index.d.ts +62 -0
- package/dist/axes/installation-layout.d.ts +3 -0
- package/dist/axes/material.d.ts +3 -0
- package/dist/axes/mood-anchors.d.ts +4 -0
- package/dist/axes/mood.d.ts +2 -0
- package/dist/axes/palette.d.ts +7 -0
- package/dist/axes/pattern.d.ts +13 -0
- package/dist/axes/period-anchors.d.ts +4 -0
- package/dist/axes/period.d.ts +29 -0
- package/dist/axes/place-anchors.d.ts +4 -0
- package/dist/axes/place.d.ts +5 -0
- package/dist/axes/product-category.d.ts +3 -0
- package/dist/axes/requirement.d.ts +3 -0
- package/dist/axes/space/arrival.d.ts +2 -0
- package/dist/axes/space/circulation.d.ts +2 -0
- package/dist/axes/space/civic.d.ts +2 -0
- package/dist/axes/space/culture.d.ts +2 -0
- package/dist/axes/space/dining.d.ts +2 -0
- package/dist/axes/space/domestic.d.ts +2 -0
- package/dist/axes/space/fitness.d.ts +2 -0
- package/dist/axes/space/gathering.d.ts +2 -0
- package/dist/axes/space/healthcare.d.ts +2 -0
- package/dist/axes/space/learning.d.ts +2 -0
- package/dist/axes/space/market-neutral.d.ts +1 -0
- package/dist/axes/space/other.d.ts +2 -0
- package/dist/axes/space/outdoor.d.ts +2 -0
- package/dist/axes/space/retail.d.ts +2 -0
- package/dist/axes/space/sanitary.d.ts +2 -0
- package/dist/axes/space/service.d.ts +2 -0
- package/dist/axes/space/shared.d.ts +30 -0
- package/dist/axes/space/sleeping.d.ts +2 -0
- package/dist/axes/space/working.d.ts +2 -0
- package/dist/axes/space-anchors/arrival.d.ts +3 -0
- package/dist/axes/space-anchors/circulation.d.ts +3 -0
- package/dist/axes/space-anchors/civic.d.ts +3 -0
- package/dist/axes/space-anchors/culture.d.ts +3 -0
- package/dist/axes/space-anchors/dining.d.ts +3 -0
- package/dist/axes/space-anchors/domestic.d.ts +3 -0
- package/dist/axes/space-anchors/fitness.d.ts +3 -0
- package/dist/axes/space-anchors/gathering.d.ts +3 -0
- package/dist/axes/space-anchors/healthcare.d.ts +3 -0
- package/dist/axes/space-anchors/learning.d.ts +3 -0
- package/dist/axes/space-anchors/other.d.ts +3 -0
- package/dist/axes/space-anchors/outdoor.d.ts +3 -0
- package/dist/axes/space-anchors/retail.d.ts +3 -0
- package/dist/axes/space-anchors/sanitary.d.ts +3 -0
- package/dist/axes/space-anchors/service.d.ts +3 -0
- package/dist/axes/space-anchors/sleeping.d.ts +3 -0
- package/dist/axes/space-anchors/working.d.ts +3 -0
- package/dist/axes/space-anchors.d.ts +8 -0
- package/dist/axes/space.d.ts +61 -0
- package/dist/axes/style-anchors.d.ts +7 -0
- package/dist/axes/style.d.ts +2 -0
- package/dist/axes/tier.d.ts +42 -0
- package/dist/axes/typology.d.ts +2 -0
- package/dist/axes/unit-shape.d.ts +3 -0
- package/dist/canonicalisation.d.ts +44 -0
- package/dist/crosswalks/designshop.d.ts +30 -0
- package/dist/crosswalks/mapping.d.ts +29 -0
- package/dist/crosswalks/materialgraph.d.ts +38 -0
- package/dist/crosswalks/miu.d.ts +13 -0
- package/dist/crosswalks/strength.d.ts +19 -0
- package/dist/dictionaries.d.ts +4 -0
- package/dist/downstream-check-policy.d.ts +34 -0
- package/dist/env.d.ts +6 -0
- package/dist/estate/concepts.d.ts +116 -0
- package/dist/estate/decomposition.d.ts +40 -0
- package/dist/estate/index.d.ts +4 -0
- package/dist/estate/residue-report.d.ts +45 -0
- package/dist/estate/rows/architizer.d.ts +2 -0
- package/dist/estate/rows/designround.d.ts +2 -0
- package/dist/estate/rows/designshop.d.ts +2 -0
- package/dist/estate/rows/index.d.ts +2 -0
- package/dist/estate/rows/materia.d.ts +2 -0
- package/dist/estate/rows/materialgraph.d.ts +2 -0
- package/dist/estate/rows/samplize.d.ts +2 -0
- package/dist/estate/sources.d.ts +47 -0
- package/dist/index.d.ts +5 -339
- package/dist/index.js +52 -1
- package/dist/match.d.ts +107 -0
- package/dist/materialgraph-crossover-sources.d.ts +52 -0
- package/dist/search-corpus-source.d.ts +8 -0
- package/dist/taste-assertion.d.ts +112 -0
- package/dist/taste.d.ts +2 -0
- package/dist/term.d.ts +346 -0
- package/dist/v1.d.ts +141 -0
- package/package.json +13 -13
package/dist/taste.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { assertionMeaningFrom, type AmbiguousCanonicalisation, type CanonicalisationInput, type CanonicalisationVerdict, type DeclinedCanonicalisation, type ResolvedCanonicalisation, type UnresolvedCanonicalisation, } from "./canonicalisation.js";
|
|
2
|
+
export { type AmbiguousAssertionMeaning, type AssertionAuthority, type AssertionMeaning, type AssertionPolarity, type AssertionProvenance, type AssertionRole, type AssertionScope, type PortableAssertionTestVector, type PortableTasteAssertion, PORTABLE_ASSERTION_TEST_VECTORS, type ProjectContextAssertion, type RequirementAssertion, type RequirementConstraint, type RequirementOperator, type ResolvedAssertionMeaning, TAXONOMY_SNAPSHOT_VERSION, TASTE_ASSERTION_CONTRACT_VERSION, type TasteAssertion, type UnresolvedAssertionMeaning, } from "./taste-assertion.js";
|
package/dist/term.d.ts
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
/** An external vocabulary this package crosswalks out to. */
|
|
2
|
+
export type ExternalScheme =
|
|
3
|
+
/** Getty Art & Architecture Thesaurus. ODC-By 1.0 - redistributable with attribution. */
|
|
4
|
+
"aat"
|
|
5
|
+
/** Uniclass 2015 (NBS). CC BY-ND 4.0 - referenced by code, never adapted. */
|
|
6
|
+
| "uniclass"
|
|
7
|
+
/** Wikidata Q-items. CC0. */
|
|
8
|
+
| "wikidata";
|
|
9
|
+
/**
|
|
10
|
+
* SKOS mapping strength, using SKOS's own vocabulary so the published RDF is a direct rendering
|
|
11
|
+
* rather than a translation. `exact` asserts the two terms are interchangeable in retrieval;
|
|
12
|
+
* `close` asserts they are near enough to substitute in most contexts but not all; `broad` and
|
|
13
|
+
* `narrow` assert containment in the named direction; `related` asserts association only.
|
|
14
|
+
*/
|
|
15
|
+
export type MatchStrength = "exact" | "close" | "broad" | "narrow" | "related";
|
|
16
|
+
export interface ExternalMapping {
|
|
17
|
+
scheme: ExternalScheme;
|
|
18
|
+
/** The external identifier, verbatim: an AAT subject id, a Uniclass code, a Wikidata Q-number. */
|
|
19
|
+
identifier: string;
|
|
20
|
+
/** The external vocabulary's own label for that identifier, verbatim and unedited. */
|
|
21
|
+
label: string;
|
|
22
|
+
match: MatchStrength;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Where a term's content came from, and when. Ranks the SOURCE, never the accuracy: a term lifted
|
|
26
|
+
* verbatim from an upstream dictionary is `vendored` whether or not the upstream got it right.
|
|
27
|
+
* Using this field as a proxy for correctness is how confident wrong answers get made.
|
|
28
|
+
*/
|
|
29
|
+
export type SourceBasis =
|
|
30
|
+
/** Copied unedited from a named upstream dictionary at a stated snapshot. */
|
|
31
|
+
"vendored"
|
|
32
|
+
/** Written here, from scratch, by a named editor. */
|
|
33
|
+
| "authored"
|
|
34
|
+
/** Written here, but derived from measured usage in a named corpus. */
|
|
35
|
+
| "evidenced"
|
|
36
|
+
/** Written here from one or more named authoritative references, without adopting their term. */
|
|
37
|
+
| "referenced"
|
|
38
|
+
/** Adopted from a published external standard, with its identifier carried. */
|
|
39
|
+
| "standard";
|
|
40
|
+
export interface TermProvenance {
|
|
41
|
+
basis: SourceBasis;
|
|
42
|
+
/** The upstream file, corpus or standard. Free text, but always specific enough to re-read. */
|
|
43
|
+
source: string;
|
|
44
|
+
/** ISO date the source was read. Absent only for `authored`. */
|
|
45
|
+
snapshot?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A canonical identity governed by ColorScope rather than Taxonomy.
|
|
49
|
+
*
|
|
50
|
+
* This is authored data, not an inference from provenance prose. A vendored source explains where
|
|
51
|
+
* a row came from; it does not by itself decide which package owns the durable identifier.
|
|
52
|
+
*/
|
|
53
|
+
export interface ColorScopeAuthority {
|
|
54
|
+
authority: "colorscope";
|
|
55
|
+
authorityUri: "https://colorscope.materialinstruments.com";
|
|
56
|
+
identifier: string;
|
|
57
|
+
referenceKind: keyof ColorScopeReferenceKinds;
|
|
58
|
+
}
|
|
59
|
+
interface ColorScopeReferenceKinds {
|
|
60
|
+
"chroma-level": true;
|
|
61
|
+
"color-family": true;
|
|
62
|
+
"lightness-level": true;
|
|
63
|
+
"named-color": true;
|
|
64
|
+
"palette-mood": true;
|
|
65
|
+
"temperature-level": true;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A DATED NEGATIVE RESULT: a scheme that was searched for this term and did not have it.
|
|
69
|
+
*
|
|
70
|
+
* This is the field that makes the gap publishable. ADR 0001 section 8 softens the planned
|
|
71
|
+
* invariant "every STYLE and PERIOD term carries an AAT mapping" to "carries a mapping OR carries
|
|
72
|
+
* one of these", because AAT has no consumer interiors coverage at all - a live search for
|
|
73
|
+
* *japandi* returns nothing, and *farmhouse*, *transitional* and *coastal* are absent as interior
|
|
74
|
+
* idioms. Without this field an unmapped term is indistinguishable from an unchecked one, and the
|
|
75
|
+
* two are opposites: one is evidence and the other is a to-do.
|
|
76
|
+
*
|
|
77
|
+
* A dated negative against the best art-and-architecture thesaurus in the world is the clearest
|
|
78
|
+
* available statement of why this vocabulary needs to exist.
|
|
79
|
+
*/
|
|
80
|
+
export interface SearchedWithout {
|
|
81
|
+
scheme: ExternalScheme;
|
|
82
|
+
/** ISO date the search was run. */
|
|
83
|
+
date: string;
|
|
84
|
+
/** What was searched, so a reader can repeat it. */
|
|
85
|
+
query: string;
|
|
86
|
+
/** Where the search was run, e.g. the SPARQL endpoint. */
|
|
87
|
+
via: string;
|
|
88
|
+
}
|
|
89
|
+
export type TermStatus = "active" | "deprecated";
|
|
90
|
+
/**
|
|
91
|
+
* A band, never a count.
|
|
92
|
+
*
|
|
93
|
+
* THE SCALE, stated once so every axis uses the same one. Measured against the corpus named on the
|
|
94
|
+
* term: `dominant` is the top decile of values by frequency, `common` the next, `occasional` a
|
|
95
|
+
* value that appears regularly, `rare` one that barely does, and `unattested` a value the corpus
|
|
96
|
+
* never uses. Set `usage` only where the named corpus can actually speak to the term: omitting it
|
|
97
|
+
* says "not measured here", which is honest, whereas `unattested` against an unrelated corpus
|
|
98
|
+
* would read as a claim about the term rather than about the corpus. The usage figures behind these derive from Material Bank's warehouse and
|
|
99
|
+
* from the DesignShop capture; publishing a raw number would publish a figure from someone else's
|
|
100
|
+
* business. The band carries the signal a reader actually needs - is this term common or rare -
|
|
101
|
+
* and nothing more.
|
|
102
|
+
*/
|
|
103
|
+
export type UsageBand = "dominant" | "common" | "occasional" | "rare" | "unattested";
|
|
104
|
+
export interface TermUsage {
|
|
105
|
+
band: UsageBand;
|
|
106
|
+
/** The corpus the band was measured against, and when. */
|
|
107
|
+
corpus: string;
|
|
108
|
+
snapshot: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Why a term carries no usage band when the corpus plainly has something to say about it.
|
|
112
|
+
*
|
|
113
|
+
* The distinguishing case is `style.modernism`. DesignShop tags a dominant share of its room
|
|
114
|
+
* schemes `Modern`, but that is the crosswalk row that DECLINES: `Modern` reads as either
|
|
115
|
+
* `style.modernism` or `style.contemporary` and the source never recorded which. Attributing the
|
|
116
|
+
* usage would smuggle in the guess the crosswalk refused to make.
|
|
117
|
+
*
|
|
118
|
+
* Without this field, a reader sees "not measured" and cannot tell that apart from "nobody looked",
|
|
119
|
+
* and those are opposite claims. Same reasoning as `searchedWithout`: an absence somebody reasoned
|
|
120
|
+
* their way to is evidence, and an absence nobody has examined is a to-do.
|
|
121
|
+
*/
|
|
122
|
+
export interface UsageWithheld {
|
|
123
|
+
reason: string;
|
|
124
|
+
/** The corpus that would otherwise have supplied a band. */
|
|
125
|
+
corpus: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* A period's extent, as four numbers rather than two.
|
|
129
|
+
*
|
|
130
|
+
* Two dates cannot answer the questions consumers actually ask. "Is 1832 Georgian?" wants the
|
|
131
|
+
* outer edge; "give me a canonical date for Georgian" wants the core. So each period carries a
|
|
132
|
+
* fuzzy interval: `earliest` and `latest` bound what could defensibly be called this period,
|
|
133
|
+
* `start` and `end` bound what uncontroversially is.
|
|
134
|
+
*
|
|
135
|
+
* `end` and `latest` are NULLABLE, and that is load-bearing rather than tidy. An open-ended period
|
|
136
|
+
* closed with the current year needs an arbitrary edit at every release, and the edit is a lie in
|
|
137
|
+
* between: `contemporary` does not end in 2026, it has not ended.
|
|
138
|
+
*
|
|
139
|
+
* SIBLING SPANS ARE ALLOWED TO OVERLAP, deliberately. Georgian and Regency genuinely do. Resolving
|
|
140
|
+
* "what period is 1800?" is therefore an accessor's job, not the data's - see `periodAt`, which
|
|
141
|
+
* prefers the narrowest match and then the un-hedged one. Leaving that to each consumer would get
|
|
142
|
+
* it reinvented differently every time.
|
|
143
|
+
*/
|
|
144
|
+
export interface PeriodSpan {
|
|
145
|
+
/** The earliest year anyone would defensibly call this period. */
|
|
146
|
+
earliest: number;
|
|
147
|
+
/** The first year it uncontroversially is this period. */
|
|
148
|
+
start: number;
|
|
149
|
+
/** The last year it uncontroversially is. Null when the period has not ended. */
|
|
150
|
+
end: number | null;
|
|
151
|
+
/** The last year anyone would defensibly call it this. Null when the period has not ended. */
|
|
152
|
+
latest: number | null;
|
|
153
|
+
/** True when the boundaries are conventional rather than evidenced by an event. */
|
|
154
|
+
circa: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Where these dates apply, as ISO 3166-1 alpha-2, or `global`. Regional variance beyond this
|
|
157
|
+
* belongs in NARROWER TERMS with their own spans, never in a region-to-span map on one term: a
|
|
158
|
+
* map invites partial coverage, and a narrower term is something a relation can point at.
|
|
159
|
+
*/
|
|
160
|
+
regions: readonly string[];
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* What KIND of thing a style term is, because the three kinds have different truth conditions and
|
|
164
|
+
* conflating them is most of why style vocabularies rot.
|
|
165
|
+
*
|
|
166
|
+
* A `movement` has an art-historical literature, dates and adherents, and its boundaries are
|
|
167
|
+
* arguable in the way a scholarly claim is arguable. A `tradition` is a body of regional or
|
|
168
|
+
* vernacular practice, defined by what is done rather than by what was declared. A `market-idiom`
|
|
169
|
+
* is a prototype category the trade converged on, defined by resemblance to central cases and by
|
|
170
|
+
* nothing else - it has no manifesto to appeal to, and asking for necessary and sufficient
|
|
171
|
+
* conditions misunderstands it.
|
|
172
|
+
*
|
|
173
|
+
* Publishing the kind does two things. It tells a reader what sort of disagreement to expect: a
|
|
174
|
+
* dispute about Brutalism is a dispute about the record, a dispute about Farmhouse is a dispute
|
|
175
|
+
* about a prototype, and neither settles like the other. And it is the grouping a browse page needs
|
|
176
|
+
* once STYLE passes about fifty terms, when a flat alphabetical list stops being navigable.
|
|
177
|
+
*/
|
|
178
|
+
export type StyleKind = "movement" | "tradition" | "market-idiom";
|
|
179
|
+
/**
|
|
180
|
+
* How a decorator treats this element: the habit a surface is handled by when a scheme is applied
|
|
181
|
+
* to it. A decorating habit, and nothing else.
|
|
182
|
+
*
|
|
183
|
+
* It is NOT part-of composition, which `related` already carries and which cuts across this: a
|
|
184
|
+
* cornice is part of the wall and is painted with the ceiling, so its part-of edge and its
|
|
185
|
+
* placement disagree on purpose. It is NOT compositional role either - whether a surface is the
|
|
186
|
+
* field, the accent or the thing left alone is a decision a scheme makes about one room, and it
|
|
187
|
+
* changes from room to room, while placement is a property of the element itself.
|
|
188
|
+
*
|
|
189
|
+
* `field` is the broad plane a scheme's main colour lands on. `joinery` is shop-made woodwork
|
|
190
|
+
* handled as one body with its own colour. `trim` is the run of profile and opening frame a
|
|
191
|
+
* decorator cuts in by hand. `overhead` and `underfoot` are the two planes a room is bounded by
|
|
192
|
+
* above and below, each with its own conventions. `unpainted` is an element a decorator masks or
|
|
193
|
+
* works around rather than coats - glass, light fittings, sanitaryware and electrical accessories.
|
|
194
|
+
*
|
|
195
|
+
* `feature` is RESERVED and no element carries it. A feature wall is a scheme's decision about one
|
|
196
|
+
* room, not a fact about walls, so assigning it here would be authoring taste as canon. The value
|
|
197
|
+
* exists because consumers need a name for that decision in their own data; taxonomy supplies the
|
|
198
|
+
* word without ever asserting it.
|
|
199
|
+
*/
|
|
200
|
+
export type ElementPlacement = "field" | "joinery" | "trim" | "overhead" | "underfoot" | "feature" | "unpainted";
|
|
201
|
+
export interface Term {
|
|
202
|
+
/** Lowercase kebab-case path segment used only inside this concept's canonical URI. */
|
|
203
|
+
slug: string;
|
|
204
|
+
label: string;
|
|
205
|
+
/** Present when another package, currently ColorScope, owns this term's canonical identity. */
|
|
206
|
+
canonicalAuthority?: ColorScopeAuthority;
|
|
207
|
+
/**
|
|
208
|
+
* Parent term id. Carries TAXONOMIC SUBSUMPTION ONLY - every instance of this term must be an
|
|
209
|
+
* instance of the parent. Part-of, used-in, typically-found-in and evokes are relations, and
|
|
210
|
+
* belong in `related`, never here. See ADR 0001.
|
|
211
|
+
*/
|
|
212
|
+
broaderSlug?: string;
|
|
213
|
+
/** One sentence, stating the boundary rather than restating the label. */
|
|
214
|
+
definition?: string;
|
|
215
|
+
/** Other correct names for this term. */
|
|
216
|
+
altLabels?: readonly string[];
|
|
217
|
+
/**
|
|
218
|
+
* Labels observed in the wild that mean this term but are not correct names for it: upstream
|
|
219
|
+
* spellings, typos, and off-canon coinages. Published, because a crosswalk that hides the wrong
|
|
220
|
+
* forms cannot be used to clean anyone's data.
|
|
221
|
+
*/
|
|
222
|
+
seenAs?: readonly string[];
|
|
223
|
+
/** Non-taxonomic relations to other canonical terms, by predicate. */
|
|
224
|
+
related?: readonly TermRelation[];
|
|
225
|
+
external?: readonly ExternalMapping[];
|
|
226
|
+
/**
|
|
227
|
+
* Schemes searched for this term that did not have it. An absent `external` means nobody looked;
|
|
228
|
+
* a `searchedWithout` entry means somebody looked and the term is not there. Published, dated,
|
|
229
|
+
* and repeatable.
|
|
230
|
+
*/
|
|
231
|
+
searchedWithout?: readonly SearchedWithout[];
|
|
232
|
+
provenance?: TermProvenance;
|
|
233
|
+
/** ISO date this term first entered the published Taxonomy corpus; internal authoring metadata. */
|
|
234
|
+
introducedAt?: string;
|
|
235
|
+
/** ISO date this term's governed content was last reviewed; internal authoring metadata. */
|
|
236
|
+
reviewedAt?: string;
|
|
237
|
+
/**
|
|
238
|
+
* Position on this term's own ordered scale, low to high. Present only on ordinal axes.
|
|
239
|
+
*
|
|
240
|
+
* MOST AXES HERE ARE UNORDERED SETS and must stay that way: `style.brutalism` is not greater
|
|
241
|
+
* than `style.rustic`, and a consumer that sorted them would be inventing a claim. TIER is
|
|
242
|
+
* different - value really is below premium, and "one rung cheaper" is a question people ask of
|
|
243
|
+
* it - so the order is data rather than an accident of array position.
|
|
244
|
+
*
|
|
245
|
+
* Ranks are NOT comparable across facets. `tier.market.premium` and `tier.chain-scale.upscale`
|
|
246
|
+
* both sit at 3 on their own ladders and are not the same claim about the world; the ladders
|
|
247
|
+
* have different lengths and different subjects. Compare within a facet or not at all.
|
|
248
|
+
*
|
|
249
|
+
* Dense from 1 within a facet, and either present on every term there or on none - both checked
|
|
250
|
+
* in `axes.test.ts`, because a half-ranked facet silently drops its unranked half from any sort.
|
|
251
|
+
*/
|
|
252
|
+
rank?: number;
|
|
253
|
+
/** Present on PERIOD terms only. */
|
|
254
|
+
span?: PeriodSpan;
|
|
255
|
+
/** Present on STYLE terms only. */
|
|
256
|
+
styleKind?: StyleKind;
|
|
257
|
+
/** Present on ELEMENT terms only, and on every one of them. */
|
|
258
|
+
placement?: ElementPlacement;
|
|
259
|
+
usage?: TermUsage;
|
|
260
|
+
/**
|
|
261
|
+
* Set instead of `usage` when a corpus has evidence but it cannot honestly be attributed to this
|
|
262
|
+
* term. Never set alongside `usage`.
|
|
263
|
+
*/
|
|
264
|
+
usageWithheld?: UsageWithheld;
|
|
265
|
+
status?: TermStatus;
|
|
266
|
+
/** The term that replaced this one. Required when status is "deprecated". */
|
|
267
|
+
supersededByReference?: string;
|
|
268
|
+
/** Why the term is deprecated, or any other governance note a reader needs. */
|
|
269
|
+
note?: string;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* The named predicates a term may carry to another canonical term. Everything that is not ISA
|
|
273
|
+
* lives here, so `broaderSlug` never silently becomes a bag of loose associations.
|
|
274
|
+
*/
|
|
275
|
+
export type RelationPredicate =
|
|
276
|
+
/** This element is physically a component of that element. */
|
|
277
|
+
"part-of"
|
|
278
|
+
/** This application or element is typically found in that space. */
|
|
279
|
+
| "typically-in"
|
|
280
|
+
/** This term is a material-suitability claim about that space. */
|
|
281
|
+
| "suitable-for"
|
|
282
|
+
/**
|
|
283
|
+
* The subject exists to serve that sector's market, wherever the building that contains it
|
|
284
|
+
* stands: a hotel room in a mixed-use tower still serves hospitality, an operating room serves
|
|
285
|
+
* healthcare whoever the landlord is. An IDENTITY claim, never an occurrence claim - "occurs
|
|
286
|
+
* only in that sector" is false for almost any room (a multifamily amenity floor holds
|
|
287
|
+
* restrooms, a commercial kitchen and a gym inside `sector.residential`), which is why most
|
|
288
|
+
* rooms rightly carry no edge.
|
|
289
|
+
*
|
|
290
|
+
* ABSENCE IS A CLAIM, NOT A GAP. A SPACE term carrying no serves edge and inheriting none
|
|
291
|
+
* through `broaderSlug` asserts that no market is part of its identity: it serves whatever
|
|
292
|
+
* market its project serves, and a consumer must read it as unrestricted - fail-open - never as
|
|
293
|
+
* a restriction nobody wrote down. What makes that reading safe is `MARKET_NEUTRAL_SPACES`
|
|
294
|
+
* (`axes/space/market-neutral.ts`, with the authoring criterion): every SPACE term either
|
|
295
|
+
* carries an edge or is registered there as reviewed-neutral, and the build fails naming any
|
|
296
|
+
* term that is neither. A reviewed absence and an unreviewed one cannot be confused - the same
|
|
297
|
+
* move `searchedWithout` and `usageWithheld` make.
|
|
298
|
+
*
|
|
299
|
+
* Authored on SPACE only, and pinned there by test. The claim's shape would generalise, but
|
|
300
|
+
* TYPOLOGY must never carry it: sector moves when the tenant moves and typology does not, so a
|
|
301
|
+
* typology-to-sector edge dies on conversion - ADR 0001's converted warehouse full of flats is
|
|
302
|
+
* the standing counterexample.
|
|
303
|
+
*/
|
|
304
|
+
| "serves"
|
|
305
|
+
/** This style or idiom draws on that place idiom or period. */
|
|
306
|
+
| "evokes"
|
|
307
|
+
/** This style descends from that style. */
|
|
308
|
+
| "influenced-by"
|
|
309
|
+
/** This style is a deliberate blend of two or more named styles, and is defined by being so. */
|
|
310
|
+
| "blend-of"
|
|
311
|
+
/** This surface reads as a material it is not made of. */
|
|
312
|
+
| "reads-as"
|
|
313
|
+
/** Association with no stronger claim available. */
|
|
314
|
+
| "related-to";
|
|
315
|
+
/**
|
|
316
|
+
* How much of the thing a relation accounts for.
|
|
317
|
+
*
|
|
318
|
+
* Without this, a room whose whole scheme is built on a Japanese reference and a room with one
|
|
319
|
+
* rattan pendant both carry `evokes(place.region.japanese)`, and retrieval cannot tell the theme
|
|
320
|
+
* from the garnish. It matters more as annotation density rises than it does today, which is why
|
|
321
|
+
* it is optional: an edge with no role stated is a claim about presence and nothing more.
|
|
322
|
+
*/
|
|
323
|
+
export type RelationRole =
|
|
324
|
+
/** Remove it and the thing stops being what it is. */
|
|
325
|
+
"constitutive"
|
|
326
|
+
/** Present and deliberate, but the scheme survives without it. */
|
|
327
|
+
| "accent";
|
|
328
|
+
export interface TermRelation {
|
|
329
|
+
predicate: RelationPredicate;
|
|
330
|
+
/**
|
|
331
|
+
* Fully qualified target: `<axis>.<term id>`, or `<axis>.<facet>.<term id>` on a faceted axis.
|
|
332
|
+
*
|
|
333
|
+
* QUALIFICATION IS LOAD-BEARING, not a formatting preference. One `evokes` predicate works only
|
|
334
|
+
* because the target's axis types the reference: `evokes(place.region.nordic)` says "place"
|
|
335
|
+
* exactly once, and a consumer wanting the three-way split into place, period and typology
|
|
336
|
+
* reference recovers it losslessly by joining on the target's axis. A bare `nordic` would make
|
|
337
|
+
* that join impossible and would force a predicate per axis, which grows with the axis count.
|
|
338
|
+
*
|
|
339
|
+
* Twenty-one bare ids currently appear on more than one axis - `wall` on both application and
|
|
340
|
+
* element, `restaurant` on both space and typology, `contemporary` on both style and period -
|
|
341
|
+
* and every one of those pairs is deliberate. Qualification is what keeps them from colliding.
|
|
342
|
+
*/
|
|
343
|
+
target: string;
|
|
344
|
+
role?: RelationRole;
|
|
345
|
+
}
|
|
346
|
+
export {};
|
package/dist/v1.d.ts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { ElementPlacement, ExternalMapping, PeriodSpan, RelationPredicate, SearchedWithout, StyleKind, TermProvenance, TermUsage, UsageWithheld } from "./term.js";
|
|
2
|
+
export declare const TAXONOMY_BASE_URI: "https://taxonomy.materialinstruments.com";
|
|
3
|
+
export declare const TAXONOMY_SNAPSHOT: "2026-09-01";
|
|
4
|
+
export declare const TAXONOMY_VERSION: "1.2.0";
|
|
5
|
+
export type CanonicalConceptUri = `${typeof TAXONOMY_BASE_URI}/id/${string}`;
|
|
6
|
+
export type LifecycleStatus = "active" | "deprecated";
|
|
7
|
+
export interface Lifecycle {
|
|
8
|
+
introducedAt: string;
|
|
9
|
+
reviewedAt: string;
|
|
10
|
+
status: LifecycleStatus;
|
|
11
|
+
supersededBy?: CanonicalConceptUri;
|
|
12
|
+
}
|
|
13
|
+
export interface Governance {
|
|
14
|
+
explanation: string;
|
|
15
|
+
lifecycle: Lifecycle;
|
|
16
|
+
provenance: TermProvenance;
|
|
17
|
+
steward: "@instruments/taxonomy";
|
|
18
|
+
}
|
|
19
|
+
export interface AxisNode {
|
|
20
|
+
boundary: string;
|
|
21
|
+
gap?: string;
|
|
22
|
+
governance: Governance;
|
|
23
|
+
kind: "axis";
|
|
24
|
+
label: string;
|
|
25
|
+
lifecycle: Lifecycle;
|
|
26
|
+
order: number;
|
|
27
|
+
provenance: TermProvenance;
|
|
28
|
+
question: string;
|
|
29
|
+
slug: string;
|
|
30
|
+
status: "authored" | "declared";
|
|
31
|
+
uri: string;
|
|
32
|
+
}
|
|
33
|
+
export interface FacetNode {
|
|
34
|
+
axis: string;
|
|
35
|
+
governance: Governance;
|
|
36
|
+
kind: "facet";
|
|
37
|
+
label: string;
|
|
38
|
+
lifecycle: Lifecycle;
|
|
39
|
+
order: number;
|
|
40
|
+
provenance: TermProvenance;
|
|
41
|
+
slug: string;
|
|
42
|
+
uri: string;
|
|
43
|
+
}
|
|
44
|
+
export interface ExternalReference {
|
|
45
|
+
authority: "aat" | "uniclass" | "wikidata";
|
|
46
|
+
identifier: string;
|
|
47
|
+
label: string;
|
|
48
|
+
match: ExternalMapping["match"];
|
|
49
|
+
}
|
|
50
|
+
export interface ConceptNode {
|
|
51
|
+
altLabels?: readonly string[];
|
|
52
|
+
axis: string;
|
|
53
|
+
definition?: string;
|
|
54
|
+
externalReferences?: readonly ExternalReference[];
|
|
55
|
+
facet: string;
|
|
56
|
+
governance: Governance;
|
|
57
|
+
governedBy: "taxonomy";
|
|
58
|
+
kind: "concept";
|
|
59
|
+
label: string;
|
|
60
|
+
lifecycle: Lifecycle;
|
|
61
|
+
note?: string;
|
|
62
|
+
order: number;
|
|
63
|
+
placement?: ElementPlacement;
|
|
64
|
+
provenance: TermProvenance;
|
|
65
|
+
rank?: number;
|
|
66
|
+
searchedWithout?: readonly SearchedWithout[];
|
|
67
|
+
seenAs?: readonly string[];
|
|
68
|
+
slug: string;
|
|
69
|
+
span?: PeriodSpan;
|
|
70
|
+
styleKind?: StyleKind;
|
|
71
|
+
uri: CanonicalConceptUri;
|
|
72
|
+
usage?: TermUsage;
|
|
73
|
+
usageWithheld?: UsageWithheld;
|
|
74
|
+
}
|
|
75
|
+
export type KnowledgeGraphNode = AxisNode | FacetNode | ConceptNode;
|
|
76
|
+
export type GraphPredicate = RelationPredicate | "belongs-to-axis" | "belongs-to-facet" | "broader" | "narrower" | "has-concept" | "has-facet" | "has-part" | "typically-contains" | "supported-by" | "served-by" | "evoked-by" | "influences" | "blended-into" | "reading-of";
|
|
77
|
+
export interface KnowledgeGraphEdge {
|
|
78
|
+
assertion: "asserted" | "inverse";
|
|
79
|
+
from: string;
|
|
80
|
+
governance: Governance;
|
|
81
|
+
lifecycle: Lifecycle;
|
|
82
|
+
predicate: GraphPredicate;
|
|
83
|
+
provenance: TermProvenance;
|
|
84
|
+
role?: "constitutive" | "accent";
|
|
85
|
+
to: string;
|
|
86
|
+
}
|
|
87
|
+
export interface KnowledgeGraph {
|
|
88
|
+
edges: readonly KnowledgeGraphEdge[];
|
|
89
|
+
nodes: readonly KnowledgeGraphNode[];
|
|
90
|
+
}
|
|
91
|
+
export declare const KNOWLEDGE_GRAPH: KnowledgeGraph;
|
|
92
|
+
export interface TaxonomyTarget {
|
|
93
|
+
authority: "taxonomy";
|
|
94
|
+
role?: "primary" | "secondary";
|
|
95
|
+
uri: CanonicalConceptUri;
|
|
96
|
+
}
|
|
97
|
+
export declare const COLOR_SCOPE_REFERENCE_KINDS: readonly ["chroma-level", "color-family", "lightness-level", "named-color", "palette-mood", "temperature-level"];
|
|
98
|
+
export type ColorScopeReferenceKind = (typeof COLOR_SCOPE_REFERENCE_KINDS)[number];
|
|
99
|
+
export interface ColorScopeTarget {
|
|
100
|
+
authority: "colorscope";
|
|
101
|
+
authorityUri: "https://colorscope.materialinstruments.com";
|
|
102
|
+
identifier: string;
|
|
103
|
+
referenceKind: ColorScopeReferenceKind;
|
|
104
|
+
role?: "primary" | "secondary";
|
|
105
|
+
}
|
|
106
|
+
export type LexicalTarget = TaxonomyTarget | ColorScopeTarget;
|
|
107
|
+
export type LexicalContext = "colour" | "material";
|
|
108
|
+
interface LexicalBase {
|
|
109
|
+
explanation: string;
|
|
110
|
+
governance: Governance;
|
|
111
|
+
phrase: string;
|
|
112
|
+
}
|
|
113
|
+
export type LexicalEntry = (LexicalBase & {
|
|
114
|
+
outcome: "equivalent";
|
|
115
|
+
target: LexicalTarget;
|
|
116
|
+
}) | (LexicalBase & {
|
|
117
|
+
contextualPreferences?: readonly {
|
|
118
|
+
context: LexicalContext;
|
|
119
|
+
target: LexicalTarget;
|
|
120
|
+
}[];
|
|
121
|
+
/** An explicitly authored default reading; never inferred from array order. */
|
|
122
|
+
defaultTarget?: LexicalTarget;
|
|
123
|
+
outcome: "ambiguous";
|
|
124
|
+
readings: readonly [LexicalTarget, LexicalTarget, ...LexicalTarget[]];
|
|
125
|
+
}) | (LexicalBase & {
|
|
126
|
+
outcome: "declined";
|
|
127
|
+
reason: string;
|
|
128
|
+
});
|
|
129
|
+
/** Declarative readings only. Consumers choose indexing and application behaviour. */
|
|
130
|
+
export declare const LEXICAL_ENTRIES: readonly LexicalEntry[];
|
|
131
|
+
/** Content address for CI drift checks; changes whenever the public corpus representation changes. */
|
|
132
|
+
export declare const TAXONOMY_CORPUS_REVISION: string;
|
|
133
|
+
export declare const TAXONOMY_CORPUS_METADATA: {
|
|
134
|
+
readonly edgeCount: number;
|
|
135
|
+
readonly lexicalEntryCount: number;
|
|
136
|
+
readonly nodeCount: number;
|
|
137
|
+
readonly revision: string;
|
|
138
|
+
readonly snapshot: "2026-09-01";
|
|
139
|
+
readonly version: "1.2.0";
|
|
140
|
+
};
|
|
141
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instruments/taxonomy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Canonical data-only interiors and architecture knowledge graph and lexical corpus.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@howells/lint": "^2.2.0",
|
|
28
|
+
"@instruments/colorscope": "7.6.0",
|
|
29
|
+
"@taxonomy/lint-policy": "npm:@howells/lint@1.0.0",
|
|
30
|
+
"@types/node": "^26.4.1",
|
|
31
|
+
"tsup": "^8.5.1",
|
|
32
|
+
"typescript": "^7.0.2",
|
|
33
|
+
"vitest": "^5.0.0"
|
|
34
|
+
},
|
|
26
35
|
"scripts": {
|
|
27
|
-
"build": "
|
|
28
|
-
"lint": "howells-check .",
|
|
29
|
-
"prepare": "pnpm build",
|
|
36
|
+
"build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",
|
|
37
|
+
"lint": "node node_modules/@howells/lint/bin/howells-check.mjs .",
|
|
30
38
|
"smoke:packed": "node --experimental-strip-types scripts/smoke-packed-core.ts",
|
|
31
39
|
"sync:colorscope": "vitest run src/colorscope-sync.test.ts",
|
|
32
40
|
"test": "vitest run",
|
|
33
41
|
"typecheck": "tsc --noEmit"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@howells/lint": "^1.0.0",
|
|
37
|
-
"@instruments/colorscope": "7.3.0",
|
|
38
|
-
"@types/node": "^24.0.0",
|
|
39
|
-
"tsup": "^8.5.1",
|
|
40
|
-
"typescript": "^5.7.0",
|
|
41
|
-
"vitest": "^4.0.0"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|