@instruments/taxonomy 5.2.0 → 5.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/README.md +4 -0
- package/dist/authoring.d.ts +0 -2
- package/dist/axes/construction-tile-body.d.ts +7 -0
- package/dist/index.js +220 -161
- package/dist/v1.d.ts +2 -2
- package/package.json +1 -1
- package/dist/canonicalization.d.ts +0 -44
- package/dist/taste-assertion.d.ts +0 -112
- package/dist/taste.d.ts +0 -2
package/dist/v1.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Axis, FacetHolds } from "./axes/index.js";
|
|
|
2
2
|
import type { ElementPlacement, ExternalMapping, ExternalScheme, PeriodSpan, RelationPredicate, SearchedWithout, StyleKind, TermProvenance, TermUsage, UsageWithheld } from "./term.js";
|
|
3
3
|
export type { FacetHolds } from "./axes/index.js";
|
|
4
4
|
export declare const TAXONOMY_SNAPSHOT: "2026-10-02";
|
|
5
|
-
export declare const TAXONOMY_VERSION: "5.
|
|
5
|
+
export declare const TAXONOMY_VERSION: "5.3.0";
|
|
6
6
|
export declare const COLORSCOPE_BASE_URI: "https://colorscope.materialinstruments.com";
|
|
7
7
|
export type ConceptId = string;
|
|
8
8
|
/** ColorScope's permanent URI for a concept it owns. */
|
|
@@ -158,5 +158,5 @@ export declare const TAXONOMY_CORPUS_METADATA: {
|
|
|
158
158
|
readonly phraseEntryCount: number;
|
|
159
159
|
readonly revision: string;
|
|
160
160
|
readonly snapshot: "2026-10-02";
|
|
161
|
-
readonly version: "5.
|
|
161
|
+
readonly version: "5.3.0";
|
|
162
162
|
};
|
package/package.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { CanonicalAlternatives, CanonicalBundle } from "./match.js";
|
|
2
|
-
import type { AssertionMeaning, AssertionProvenance } from "./taste-assertion.js";
|
|
3
|
-
import type { MatchStrength } from "./term.js";
|
|
4
|
-
export interface CanonicalizationInput {
|
|
5
|
-
sourceSystem: string;
|
|
6
|
-
sourceField: string;
|
|
7
|
-
sourceValue: string;
|
|
8
|
-
provenance: AssertionProvenance;
|
|
9
|
-
}
|
|
10
|
-
interface CanonicalizationBase extends CanonicalizationInput {
|
|
11
|
-
crosswalkVersion: string;
|
|
12
|
-
taxonomySnapshotVersion: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ResolvedCanonicalization extends CanonicalizationBase {
|
|
15
|
-
status: "resolved";
|
|
16
|
-
canonical: CanonicalBundle;
|
|
17
|
-
/**
|
|
18
|
-
* How strongly the canonical bundle stands for the source value, in SKOS's own vocabulary. A
|
|
19
|
-
* consumer may treat `exact` as an identity and must treat everything else as an approximation
|
|
20
|
-
* it has been told about. See `crosswalks/strength.ts` for the direction convention.
|
|
21
|
-
*/
|
|
22
|
-
match: MatchStrength;
|
|
23
|
-
/** Why the row is not exact. Present whenever `match` is not `exact`. */
|
|
24
|
-
note?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface AmbiguousCanonicalization extends CanonicalizationBase {
|
|
27
|
-
status: "ambiguous";
|
|
28
|
-
alternatives: CanonicalAlternatives;
|
|
29
|
-
/** How strongly each alternative would stand for the source value, were it the right reading. */
|
|
30
|
-
match: MatchStrength;
|
|
31
|
-
note?: string;
|
|
32
|
-
}
|
|
33
|
-
export interface UnresolvedCanonicalization extends CanonicalizationBase {
|
|
34
|
-
status: "unresolved";
|
|
35
|
-
}
|
|
36
|
-
export interface DeclinedCanonicalization extends CanonicalizationBase {
|
|
37
|
-
status: "declined";
|
|
38
|
-
reason: string;
|
|
39
|
-
}
|
|
40
|
-
/** Four honest outcomes: absence of a mapping is never silently treated as a decline or a match. */
|
|
41
|
-
export type CanonicalizationVerdict = ResolvedCanonicalization | AmbiguousCanonicalization | UnresolvedCanonicalization | DeclinedCanonicalization;
|
|
42
|
-
/** Convert a usable verdict to assertion meaning; a declined value does not assert anything. */
|
|
43
|
-
export declare const assertionMeaningFrom: (verdict: CanonicalizationVerdict) => AssertionMeaning | null;
|
|
44
|
-
export {};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import type { CanonicalAlternatives, CanonicalBundle } from "./match.js";
|
|
2
|
-
export declare const TASTE_ASSERTION_CONTRACT_VERSION: "1.0.0";
|
|
3
|
-
export declare const TAXONOMY_SNAPSHOT_VERSION: "2026-08-31";
|
|
4
|
-
export type AssertionRole = "taste" | "project_context" | "requirement";
|
|
5
|
-
export type AssertionAuthority = "explicit" | "behavioral" | "inferred";
|
|
6
|
-
export type AssertionPolarity = "positive" | "negative" | "never";
|
|
7
|
-
export type AssertionScope = {
|
|
8
|
-
kind: "person";
|
|
9
|
-
} | {
|
|
10
|
-
kind: "household";
|
|
11
|
-
householdId: string;
|
|
12
|
-
} | {
|
|
13
|
-
kind: "project";
|
|
14
|
-
projectId: string;
|
|
15
|
-
} | {
|
|
16
|
-
kind: "room_type";
|
|
17
|
-
roomTypeId: string;
|
|
18
|
-
} | {
|
|
19
|
-
kind: "room";
|
|
20
|
-
roomId: string;
|
|
21
|
-
} | {
|
|
22
|
-
kind: "surface";
|
|
23
|
-
roomId: string;
|
|
24
|
-
surfaceId: string;
|
|
25
|
-
};
|
|
26
|
-
export interface AssertionProvenance {
|
|
27
|
-
/** The application, import or instrument that produced the observation. */
|
|
28
|
-
sourceSystem: string;
|
|
29
|
-
/** Version of the source data, prompt, fixture or export used when the evidence was observed. */
|
|
30
|
-
sourceSnapshotVersion: string;
|
|
31
|
-
sourceRecordId?: string;
|
|
32
|
-
sourceUrl?: string;
|
|
33
|
-
/** Optional id for the observation from which this assertion was proposed. */
|
|
34
|
-
observationId?: string;
|
|
35
|
-
}
|
|
36
|
-
interface SourceMeaning {
|
|
37
|
-
/** Source vocabulary field, before canonicalization. */
|
|
38
|
-
sourceField: string;
|
|
39
|
-
/** Verbatim source value; never replaced by the canonical label. */
|
|
40
|
-
sourceValue: string;
|
|
41
|
-
/** Version of the source-specific mapping policy. */
|
|
42
|
-
crosswalkVersion: string;
|
|
43
|
-
/** Version of the canonical vocabulary against which mapping ran. */
|
|
44
|
-
taxonomySnapshotVersion: string;
|
|
45
|
-
}
|
|
46
|
-
export interface ResolvedAssertionMeaning extends SourceMeaning {
|
|
47
|
-
kind: "resolved";
|
|
48
|
-
canonical: CanonicalBundle;
|
|
49
|
-
}
|
|
50
|
-
export interface AmbiguousAssertionMeaning extends SourceMeaning {
|
|
51
|
-
kind: "ambiguous";
|
|
52
|
-
alternatives: CanonicalAlternatives;
|
|
53
|
-
}
|
|
54
|
-
export interface UnresolvedAssertionMeaning extends SourceMeaning {
|
|
55
|
-
kind: "unresolved";
|
|
56
|
-
}
|
|
57
|
-
export type AssertionMeaning = ResolvedAssertionMeaning | AmbiguousAssertionMeaning | UnresolvedAssertionMeaning;
|
|
58
|
-
interface PortableAssertionBase {
|
|
59
|
-
/** Stable application-owned identifier for this assertion event. */
|
|
60
|
-
id: string;
|
|
61
|
-
contractVersion: typeof TASTE_ASSERTION_CONTRACT_VERSION;
|
|
62
|
-
actorId: string;
|
|
63
|
-
/** Whose taste or project view the assertion describes; never inferred from actorId. */
|
|
64
|
-
subjectId: string;
|
|
65
|
-
/** Project context is explicit even when the assertion's scope is durable and personal. */
|
|
66
|
-
projectId: string;
|
|
67
|
-
authority: AssertionAuthority;
|
|
68
|
-
polarity: AssertionPolarity;
|
|
69
|
-
scope: AssertionScope;
|
|
70
|
-
meaning: AssertionMeaning;
|
|
71
|
-
provenance: AssertionProvenance;
|
|
72
|
-
observedAt: string;
|
|
73
|
-
confirmedAt?: string;
|
|
74
|
-
validFrom?: string;
|
|
75
|
-
validUntil?: string;
|
|
76
|
-
/** Logical withdrawal is append-only; physical privacy deletion is an application concern. */
|
|
77
|
-
retractedAt?: string;
|
|
78
|
-
supersedesAssertionId?: string;
|
|
79
|
-
}
|
|
80
|
-
export interface TasteAssertion extends PortableAssertionBase {
|
|
81
|
-
role: "taste";
|
|
82
|
-
}
|
|
83
|
-
export interface ProjectContextAssertion extends PortableAssertionBase {
|
|
84
|
-
role: "project_context";
|
|
85
|
-
}
|
|
86
|
-
export type RequirementOperator = "equals" | "not_equals" | "at_least" | "at_most" | "includes" | "excludes";
|
|
87
|
-
export interface RequirementConstraint {
|
|
88
|
-
operator: RequirementOperator;
|
|
89
|
-
value: boolean | number | string;
|
|
90
|
-
unit?: string;
|
|
91
|
-
}
|
|
92
|
-
export interface RequirementAssertion extends PortableAssertionBase {
|
|
93
|
-
role: "requirement";
|
|
94
|
-
/** The dimension is canonical meaning; the source-owned required value remains typed here. */
|
|
95
|
-
constraint: RequirementConstraint;
|
|
96
|
-
}
|
|
97
|
-
/** Portable evidence semantics only. Ranking weights and serving policy belong to each consumer. */
|
|
98
|
-
export type PortableTasteAssertion = TasteAssertion | ProjectContextAssertion | RequirementAssertion;
|
|
99
|
-
export interface PortableAssertionTestVector {
|
|
100
|
-
assertion: PortableTasteAssertion;
|
|
101
|
-
id: string;
|
|
102
|
-
expected: {
|
|
103
|
-
actorId: string;
|
|
104
|
-
subjectId: string;
|
|
105
|
-
projectId: string;
|
|
106
|
-
role: AssertionRole;
|
|
107
|
-
meaningKind: AssertionMeaning["kind"];
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
/** Executable fixtures for consumers serializing the portable envelope in another repository. */
|
|
111
|
-
export declare const PORTABLE_ASSERTION_TEST_VECTORS: readonly PortableAssertionTestVector[];
|
|
112
|
-
export {};
|
package/dist/taste.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { assertionMeaningFrom, type AmbiguousCanonicalization, type CanonicalizationInput, type CanonicalizationVerdict, type DeclinedCanonicalization, type ResolvedCanonicalization, type UnresolvedCanonicalization, } from "./canonicalization.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";
|