@ifc-lite/sdk 8.0.0 → 9.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/README.md +42 -0
- package/dist/cost-store-backend.d.ts +2 -0
- package/dist/cost-store-backend.d.ts.map +1 -1
- package/dist/cost-store-backend.js.map +1 -1
- package/dist/group-store-backend.d.ts +5 -0
- package/dist/group-store-backend.d.ts.map +1 -0
- package/dist/group-store-backend.js +43 -0
- package/dist/group-store-backend.js.map +1 -0
- package/dist/headless-mutate.d.ts +0 -10
- package/dist/headless-mutate.d.ts.map +1 -1
- package/dist/headless-mutate.js +8 -2
- package/dist/headless-mutate.js.map +1 -1
- package/dist/host.d.ts +2 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +34 -11
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +6 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/namespaces/ids-authoring.d.ts +74 -0
- package/dist/namespaces/ids-authoring.d.ts.map +1 -0
- package/dist/namespaces/ids-authoring.js +99 -0
- package/dist/namespaces/ids-authoring.js.map +1 -0
- package/dist/namespaces/ids.d.ts +4 -0
- package/dist/namespaces/ids.d.ts.map +1 -1
- package/dist/namespaces/ids.js +11 -0
- package/dist/namespaces/ids.js.map +1 -1
- package/dist/namespaces/mutate.d.ts +3 -3
- package/dist/namespaces/mutate.d.ts.map +1 -1
- package/dist/namespaces/mutate.js +7 -3
- package/dist/namespaces/mutate.js.map +1 -1
- package/dist/namespaces/store-group.d.ts +9 -0
- package/dist/namespaces/store-group.d.ts.map +1 -0
- package/dist/namespaces/store-group.js +31 -0
- package/dist/namespaces/store-group.js.map +1 -0
- package/dist/namespaces/store-modelling.d.ts +70 -0
- package/dist/namespaces/store-modelling.d.ts.map +1 -0
- package/dist/namespaces/store-modelling.js +173 -0
- package/dist/namespaces/store-modelling.js.map +1 -0
- package/dist/namespaces/store.d.ts +15 -34
- package/dist/namespaces/store.d.ts.map +1 -1
- package/dist/namespaces/store.js +10 -52
- package/dist/namespaces/store.js.map +1 -1
- package/dist/review/bcf.d.ts +10 -0
- package/dist/review/bcf.d.ts.map +1 -0
- package/dist/review/bcf.js +33 -0
- package/dist/review/bcf.js.map +1 -0
- package/dist/review/cards.d.ts +60 -0
- package/dist/review/cards.d.ts.map +1 -0
- package/dist/review/cards.js +90 -0
- package/dist/review/cards.js.map +1 -0
- package/dist/review/disciplines.d.ts +3 -0
- package/dist/review/disciplines.d.ts.map +1 -0
- package/dist/review/disciplines.js +10 -0
- package/dist/review/disciplines.js.map +1 -0
- package/dist/review/identity.d.ts +27 -0
- package/dist/review/identity.d.ts.map +1 -0
- package/dist/review/identity.js +42 -0
- package/dist/review/identity.js.map +1 -0
- package/dist/review/snapshot.d.ts +15 -0
- package/dist/review/snapshot.d.ts.map +1 -0
- package/dist/review/snapshot.js +25 -0
- package/dist/review/snapshot.js.map +1 -0
- package/dist/review/types.d.ts +167 -0
- package/dist/review/types.d.ts.map +1 -0
- package/dist/review/types.js +11 -0
- package/dist/review/types.js.map +1 -0
- package/dist/review/validation.d.ts +14 -0
- package/dist/review/validation.d.ts.map +1 -0
- package/dist/review/validation.js +57 -0
- package/dist/review/validation.js.map +1 -0
- package/dist/review.d.ts +11 -0
- package/dist/review.d.ts.map +1 -0
- package/dist/review.js +12 -0
- package/dist/review.js.map +1 -0
- package/dist/schedule-types.d.ts +4 -0
- package/dist/schedule-types.d.ts.map +1 -1
- package/dist/store-align-command.d.ts +13 -0
- package/dist/store-align-command.d.ts.map +1 -0
- package/dist/store-align-command.js +31 -0
- package/dist/store-align-command.js.map +1 -0
- package/dist/store-authoring-exports.d.ts +10 -0
- package/dist/store-authoring-exports.d.ts.map +1 -0
- package/dist/store-authoring-exports.js +9 -0
- package/dist/store-authoring-exports.js.map +1 -0
- package/dist/store-authoring-types.d.ts +8 -0
- package/dist/store-authoring-types.d.ts.map +1 -0
- package/dist/store-authoring-types.js +2 -0
- package/dist/store-authoring-types.js.map +1 -0
- package/dist/store-group-types.d.ts +20 -0
- package/dist/store-group-types.d.ts.map +1 -0
- package/dist/store-group-types.js +2 -0
- package/dist/store-group-types.js.map +1 -0
- package/dist/store-modelling-backend.d.ts.map +1 -1
- package/dist/store-modelling-backend.js +73 -12
- package/dist/store-modelling-backend.js.map +1 -1
- package/dist/store-modelling-types.d.ts +33 -2
- package/dist/store-modelling-types.d.ts.map +1 -1
- package/dist/store-ordinary-backend.d.ts +10 -0
- package/dist/store-ordinary-backend.d.ts.map +1 -0
- package/dist/store-ordinary-backend.js +27 -0
- package/dist/store-ordinary-backend.js.map +1 -0
- package/dist/store-physical-backend.d.ts +5 -0
- package/dist/store-physical-backend.d.ts.map +1 -0
- package/dist/store-physical-backend.js +51 -0
- package/dist/store-physical-backend.js.map +1 -0
- package/dist/store-physical-types.d.ts +33 -0
- package/dist/store-physical-types.d.ts.map +1 -0
- package/dist/store-physical-types.js +5 -0
- package/dist/store-physical-types.js.map +1 -0
- package/dist/store-room-auto-all.d.ts +5 -0
- package/dist/store-room-auto-all.d.ts.map +1 -0
- package/dist/store-room-auto-all.js +94 -0
- package/dist/store-room-auto-all.js.map +1 -0
- package/dist/store-room-command.d.ts +91 -0
- package/dist/store-room-command.d.ts.map +1 -0
- package/dist/store-room-command.js +197 -0
- package/dist/store-room-command.js.map +1 -0
- package/dist/types.d.ts +12 -24
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +22 -15
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { buildCards } from './cards.js';
|
|
5
|
+
export function snapshotFrom(sources, models, onFailure) {
|
|
6
|
+
const runs = [];
|
|
7
|
+
const findings = [];
|
|
8
|
+
const failed = [];
|
|
9
|
+
for (const source of sources) {
|
|
10
|
+
try {
|
|
11
|
+
const result = source.collect(models);
|
|
12
|
+
for (const run of result.runs)
|
|
13
|
+
runs.push(run);
|
|
14
|
+
for (const finding of result.findings)
|
|
15
|
+
findings.push(finding);
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
onFailure?.(source.kind, error);
|
|
19
|
+
failed.push({ source: source.kind, message: error instanceof Error ? error.message : String(error) });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const { cards, totals } = buildCards(findings, models);
|
|
23
|
+
return { runs, findings, cards, totals, failed };
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/review/snapshot.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,UAAU,EAA4C,MAAM,YAAY,CAAC;AAYlF,MAAM,UAAU,YAAY,CAAgC,OAA0C,EAAE,MAA8B,EAAE,SAA+D;IACrM,MAAM,IAAI,GAA0B,EAAE,CAAC;IACvC,MAAM,QAAQ,GAA6B,EAAE,CAAC;IAC9C,MAAM,MAAM,GAAsC,EAAE,CAAC;IACrD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACtC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI;gBAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC9C,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,QAAQ;gBAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,SAAS,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACxG,CAAC;IACH,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACvD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified coordination findings (viewer AI P18, #6922).
|
|
3
|
+
*
|
|
4
|
+
* Every native analysis keeps its own run, status vocabulary and panel. The
|
|
5
|
+
* review workspace only *normalises* what those analyses already produced into
|
|
6
|
+
* one finding shape so findings that point at the same validated elements can
|
|
7
|
+
* be read together. Nothing here re-runs, re-scores or rewrites a native
|
|
8
|
+
* result: `nativeStatus` is copied verbatim and `evidence` points back to the
|
|
9
|
+
* exact native row so the original stays one click away.
|
|
10
|
+
*/
|
|
11
|
+
/** Host rendering metadata; the viewer instantiates this with its catalogued key type. */
|
|
12
|
+
export interface ReviewMessage {
|
|
13
|
+
labelKey: string;
|
|
14
|
+
params?: Readonly<Record<string, string | number>>;
|
|
15
|
+
}
|
|
16
|
+
/** The analyses a finding can come from. */
|
|
17
|
+
export type FindingSourceKind = 'clash' | 'validation' | 'comparison' | 'bcf' | 'linked';
|
|
18
|
+
export declare const FINDING_SOURCE_KINDS: readonly FindingSourceKind[];
|
|
19
|
+
/**
|
|
20
|
+
* One native run (or record set). `current` is the result held live in the
|
|
21
|
+
* viewer now; `historical` is saved evidence (a clash baseline, a saved
|
|
22
|
+
* comparison). Historical evidence never becomes current by matching.
|
|
23
|
+
*/
|
|
24
|
+
export interface FindingRun<Message extends ReviewMessage = ReviewMessage> {
|
|
25
|
+
/** Unique within one review snapshot. */
|
|
26
|
+
id: string;
|
|
27
|
+
source: FindingSourceKind;
|
|
28
|
+
temporal: 'current' | 'historical';
|
|
29
|
+
/** Native label (IDS title, rule set, comparison name, BCF project). */
|
|
30
|
+
label: string;
|
|
31
|
+
/** ISO time the native run finished or the evidence was saved; null when the source records none. */
|
|
32
|
+
capturedAt: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* The run evaluated its whole declared population: no cap, no failed check,
|
|
35
|
+
* no edits since it ran. Only a complete current run can confirm that a
|
|
36
|
+
* historical finding is no longer observed.
|
|
37
|
+
*/
|
|
38
|
+
complete: boolean;
|
|
39
|
+
/** Why the run is not complete; `detail` carries native wording such as a truncation reason. */
|
|
40
|
+
incomplete: RunGap<Message>[];
|
|
41
|
+
/** Durable names of the models the run evaluated. */
|
|
42
|
+
models: string[];
|
|
43
|
+
}
|
|
44
|
+
export type RunGapCode = 'truncated' | 'stale' | 'check-error' | 'sets-truncated' | 'partial-source' | 'geometry-unavailable' | 'placement-only' | 'excluded-classes';
|
|
45
|
+
export declare const RUN_GAP_CODES: readonly RunGapCode[];
|
|
46
|
+
/** `detail` is native wording shown verbatim; `message` is a catalogued sentence translated where it is rendered. */
|
|
47
|
+
export interface RunGap<Message extends ReviewMessage = ReviewMessage> {
|
|
48
|
+
code: RunGapCode;
|
|
49
|
+
detail?: string;
|
|
50
|
+
message?: Message;
|
|
51
|
+
}
|
|
52
|
+
/** An element a finding refers to, as the native source names it. */
|
|
53
|
+
export interface FindingElement {
|
|
54
|
+
/** IFC GlobalId. */
|
|
55
|
+
globalId: string;
|
|
56
|
+
/** Live viewer model id when the native source names one; null when it does not (BCF components, linked records). */
|
|
57
|
+
modelId: string | null;
|
|
58
|
+
/** Durable model name (file name) when known; historical evidence carries only this. */
|
|
59
|
+
modelName: string | null;
|
|
60
|
+
ifcType?: string;
|
|
61
|
+
name?: string;
|
|
62
|
+
/** The native source itself could not identify the element; it is never merged by GlobalId alone. */
|
|
63
|
+
nativeUnresolved?: 'ambiguous' | 'unmatched';
|
|
64
|
+
}
|
|
65
|
+
/** Exactly where the original evidence lives, so a click can open it. */
|
|
66
|
+
export type FindingEvidence = {
|
|
67
|
+
kind: 'clash';
|
|
68
|
+
clashId: string;
|
|
69
|
+
occurrenceKey: string;
|
|
70
|
+
reviewKey: string;
|
|
71
|
+
} | {
|
|
72
|
+
kind: 'clash-baseline';
|
|
73
|
+
reviewKey: string;
|
|
74
|
+
} | {
|
|
75
|
+
kind: 'clash-group-application';
|
|
76
|
+
applicationId: string;
|
|
77
|
+
groupId: string;
|
|
78
|
+
} | {
|
|
79
|
+
kind: 'saved-validation';
|
|
80
|
+
reportId: string;
|
|
81
|
+
rowId: string;
|
|
82
|
+
} | {
|
|
83
|
+
kind: 'validation';
|
|
84
|
+
specificationId: string;
|
|
85
|
+
modelId: string;
|
|
86
|
+
expressId: number;
|
|
87
|
+
} | {
|
|
88
|
+
kind: 'run-reconciliation';
|
|
89
|
+
baseRunId: string;
|
|
90
|
+
headRunId: string;
|
|
91
|
+
identity: string;
|
|
92
|
+
} | {
|
|
93
|
+
kind: 'comparison';
|
|
94
|
+
key: string;
|
|
95
|
+
} | {
|
|
96
|
+
kind: 'saved-comparison';
|
|
97
|
+
comparisonId: string;
|
|
98
|
+
key: string;
|
|
99
|
+
} | {
|
|
100
|
+
kind: 'bcf';
|
|
101
|
+
topicGuid: string;
|
|
102
|
+
} | {
|
|
103
|
+
kind: 'linked';
|
|
104
|
+
resourceId: string;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Lifecycle of one finding relative to the other runs of its own source.
|
|
108
|
+
* `observed`: current, no compatible earlier run to compare with.
|
|
109
|
+
* `new` / `persistent`: current, absent from / present in a compatible earlier run.
|
|
110
|
+
* On a historical finding, `persistent` means the compatible current run still reports it.
|
|
111
|
+
* `changed`: still reported by the compatible other run, with different failed requirements or values.
|
|
112
|
+
* `no-longer-observed`: historical only, and a complete compatible current run
|
|
113
|
+
* re-examined it (a resolution *candidate*, never a resolution).
|
|
114
|
+
* `not-evaluated`: historical only, and no complete compatible current run
|
|
115
|
+
* could have seen it.
|
|
116
|
+
* `record`: a coordination record (BCF topic or grouping receipt) whose native status is authoritative.
|
|
117
|
+
*/
|
|
118
|
+
export type FindingLifecycle = 'observed' | 'new' | 'persistent' | 'changed' | 'no-longer-observed' | 'not-evaluated' | 'record';
|
|
119
|
+
export interface ReviewFinding<Message extends ReviewMessage = ReviewMessage> {
|
|
120
|
+
/** Unique per run: `${run.id}#${native id}`. */
|
|
121
|
+
id: string;
|
|
122
|
+
/** Run-independent identity used to pair the same finding across runs of one source. */
|
|
123
|
+
lineage: string;
|
|
124
|
+
source: FindingSourceKind;
|
|
125
|
+
run: FindingRun<Message>;
|
|
126
|
+
elements: FindingElement[];
|
|
127
|
+
/** Native status, copied verbatim (clash class, IDS outcome, change state, topic status, severity). */
|
|
128
|
+
nativeStatus: string;
|
|
129
|
+
/** Short native description: rule, specification, change kinds, topic title. */
|
|
130
|
+
title: string;
|
|
131
|
+
/** Extra native lines for the detail view (failed requirements, changed components). */
|
|
132
|
+
detail: string[];
|
|
133
|
+
/** Catalogued explanations (why a historical finding was or was not re-checked), translated where rendered. */
|
|
134
|
+
notes?: Message[];
|
|
135
|
+
lifecycle: FindingLifecycle;
|
|
136
|
+
/** Discipline candidates from the native taxonomy; overlapping and empty lists stay as given. */
|
|
137
|
+
disciplines: string[];
|
|
138
|
+
/** Storey names when the native source or the live model can supply them. */
|
|
139
|
+
storeys: string[];
|
|
140
|
+
evidence: FindingEvidence;
|
|
141
|
+
}
|
|
142
|
+
/** What a source contributes to one review snapshot. */
|
|
143
|
+
export interface FindingSourceResult<Message extends ReviewMessage = ReviewMessage> {
|
|
144
|
+
runs: FindingRun<Message>[];
|
|
145
|
+
findings: ReviewFinding<Message>[];
|
|
146
|
+
}
|
|
147
|
+
/** A model as the review layer sees it: identity plus a GlobalId lookup. */
|
|
148
|
+
export interface ReviewModel {
|
|
149
|
+
id: string;
|
|
150
|
+
name: string;
|
|
151
|
+
/** Returns a positive express id, or a value <= 0 when the GlobalId is not in the model. */
|
|
152
|
+
expressIdOf(globalId: string): number;
|
|
153
|
+
globalIdOf(expressId: number): string;
|
|
154
|
+
storeyOf?(expressId: number): string | null;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The seam other packages plug into. A source reads its own native state
|
|
158
|
+
* (store slices, libraries) and returns normalised findings; the review layer
|
|
159
|
+
* never reaches into a source's internals. P10 clash groups, P16 semantic
|
|
160
|
+
* records and P17 comparison reconciliation add or replace an entry in
|
|
161
|
+
* `FINDING_SOURCES` (`sources/index.ts`) instead of editing the card logic.
|
|
162
|
+
*/
|
|
163
|
+
export interface FindingSource<Message extends ReviewMessage = ReviewMessage> {
|
|
164
|
+
kind: FindingSourceKind;
|
|
165
|
+
collect(models: readonly ReviewModel[]): FindingSourceResult<Message>;
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/review/types.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,0FAA0F;AAC1F,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;CACpD;AAED,4CAA4C;AAC5C,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,YAAY,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ,CAAC;AAGzF,eAAO,MAAM,oBAAoB,EAA2C,SAAS,iBAAiB,EAAE,CAAC;AAEzG;;;;GAIG;AACH,MAAM,WAAW,UAAU,CAAC,OAAO,SAAS,aAAa,GAAG,aAAa;IACvE,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,iBAAiB,CAAC;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,CAAC;IACzB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,uGAAuG;IACvG,YAAY,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,+GAA+G;IAC/G,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,iGAAiG;IACjG,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB,CAAC,OAAO,SAAS,aAAa,GAAG,aAAa;IAChF,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5B,QAAQ,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;CACpC;AAED,4EAA4E;AAC5E,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,4FAA4F;IAC5F,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,QAAQ,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa,CAAC,OAAO,SAAS,aAAa,GAAG,aAAa;IAC1E,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;CACvE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/** Keyed by every source kind, so the runtime list cannot drift from `FindingSourceKind`. */
|
|
5
|
+
const FINDING_SOURCE_KIND_SET = { clash: true, validation: true, comparison: true, bcf: true, linked: true };
|
|
6
|
+
export const FINDING_SOURCE_KINDS = Object.keys(FINDING_SOURCE_KIND_SET);
|
|
7
|
+
/** Keyed by every gap code, so adding a code to `RunGapCode` without listing it here fails the typecheck. */
|
|
8
|
+
const RUN_GAP_CODE_SET = { truncated: true, stale: true, 'check-error': true, 'sets-truncated': true, 'partial-source': true,
|
|
9
|
+
'geometry-unavailable': true, 'placement-only': true, 'excluded-classes': true };
|
|
10
|
+
export const RUN_GAP_CODES = Object.keys(RUN_GAP_CODE_SET);
|
|
11
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/review/types.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAqB/D,6FAA6F;AAC7F,MAAM,uBAAuB,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAqD,CAAC;AAChK,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAiC,CAAC;AA8BzG,6GAA6G;AAC7G,MAAM,gBAAgB,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI;IAC1H,sBAAsB,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAA8C,CAAC;AAC/H,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAA0B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IDS / information-validation findings: one finding per failed
|
|
3
|
+
* (specification, element) pair of the live report. Immutable saved failure
|
|
4
|
+
* facts are projected separately by saved-validation; count-only older
|
|
5
|
+
* snapshots never acquire invented element rows.
|
|
6
|
+
*/
|
|
7
|
+
import type { ValidationReport } from '@ifc-lite/ids';
|
|
8
|
+
import type { ReviewMessage, FindingSourceResult, ReviewModel } from './types.js';
|
|
9
|
+
export interface ValidationFindingInput {
|
|
10
|
+
report: ValidationReport;
|
|
11
|
+
stale: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function validationFindings<Message extends ReviewMessage = ReviewMessage>(input: ValidationFindingInput | null, models: readonly ReviewModel[]): FindingSourceResult<Message>;
|
|
14
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/review/validation.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAc,mBAAmB,EAAiB,WAAW,EAAU,MAAM,YAAY,CAAC;AAGrH,MAAM,WAAW,sBAAsB;IAAG,MAAM,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE;AAMpF,wBAAgB,kBAAkB,CAAC,OAAO,SAAS,aAAa,GAAG,aAAa,EAAE,KAAK,EAAE,sBAAsB,GAAG,IAAI,EAAE,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,mBAAmB,CAAC,OAAO,CAAC,CA8CpL"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { typeDisciplines } from './disciplines.js';
|
|
5
|
+
function sourceLabel(report) {
|
|
6
|
+
return report.source.kind === 'ids' ? report.source.document.info.title || 'IDS' : report.source.ruleSet.name;
|
|
7
|
+
}
|
|
8
|
+
export function validationFindings(input, models) {
|
|
9
|
+
if (!input)
|
|
10
|
+
return { runs: [], findings: [] };
|
|
11
|
+
const { report, stale } = input;
|
|
12
|
+
const names = new Map(models.map(model => [model.id, model.name]));
|
|
13
|
+
const incomplete = [
|
|
14
|
+
...report.specificationResults.filter(spec => spec.error).map(spec => ({ code: 'check-error', detail: `${spec.specification.name}: ${spec.error}` })),
|
|
15
|
+
...report.specificationResults.filter(spec => spec.setResultsTruncated).map(spec => ({ code: 'sets-truncated', detail: spec.specification.name })),
|
|
16
|
+
// #7372: native maxEntities keeps the full applicability population while
|
|
17
|
+
// passed+failed counts only evaluated elements. Hidden passing detail rows
|
|
18
|
+
// retain those counts and therefore do not imply incomplete evaluation.
|
|
19
|
+
...report.specificationResults.filter(spec => spec.passedCount + spec.failedCount < spec.applicableCount)
|
|
20
|
+
.map(spec => ({ code: 'truncated',
|
|
21
|
+
detail: `${spec.specification.name}: ${spec.passedCount + spec.failedCount}/${spec.applicableCount} applicable elements evaluated` })),
|
|
22
|
+
...(stale ? [{ code: 'stale' }] : []),
|
|
23
|
+
];
|
|
24
|
+
const timestamp = report.timestamp instanceof Date && Number.isFinite(report.timestamp.getTime()) ? report.timestamp.toISOString() : null;
|
|
25
|
+
const run = {
|
|
26
|
+
id: 'validation:current', source: 'validation', temporal: 'current', label: sourceLabel(report), capturedAt: timestamp,
|
|
27
|
+
complete: incomplete.length === 0, incomplete,
|
|
28
|
+
models: report.modelInfo.flatMap(info => names.get(info.modelId) ?? []),
|
|
29
|
+
};
|
|
30
|
+
const findings = [];
|
|
31
|
+
for (const spec of report.specificationResults) {
|
|
32
|
+
for (const entity of spec.entityResults) {
|
|
33
|
+
if (entity.passed)
|
|
34
|
+
continue;
|
|
35
|
+
const model = models.find(candidate => candidate.id === entity.modelId);
|
|
36
|
+
const globalId = entity.globalId ?? (model ? model.globalIdOf(entity.expressId) : '');
|
|
37
|
+
const storey = model?.storeyOf?.(entity.expressId) ?? null;
|
|
38
|
+
const failed = entity.requirementResults.filter(requirement => requirement.status === 'fail');
|
|
39
|
+
findings.push({
|
|
40
|
+
id: `${run.id}#${spec.specification.id}#${entity.modelId}#${entity.expressId}`,
|
|
41
|
+
lineage: `validation|${run.label}|${spec.specification.id}|${globalId || `${entity.modelId}#${entity.expressId}`}`,
|
|
42
|
+
source: 'validation', run,
|
|
43
|
+
elements: globalId ? [{ globalId, modelId: entity.modelId, modelName: names.get(entity.modelId) ?? null,
|
|
44
|
+
ifcType: entity.entityType, ...(entity.entityName ? { name: entity.entityName } : {}) }] : [],
|
|
45
|
+
nativeStatus: spec.specification.severity === 'warning' ? 'warning' : 'failed',
|
|
46
|
+
title: spec.specification.name,
|
|
47
|
+
detail: failed.slice(0, 8).map(requirement => [requirement.checkedDescription, requirement.failureReason,
|
|
48
|
+
requirement.actualValue !== undefined ? `actual ${requirement.actualValue}` : '',
|
|
49
|
+
requirement.expectedValue !== undefined ? `expected ${requirement.expectedValue}` : ''].filter(Boolean).join(' · ')),
|
|
50
|
+
lifecycle: 'observed', disciplines: typeDisciplines(entity.entityType), storeys: storey ? [storey] : [],
|
|
51
|
+
evidence: { kind: 'validation', specificationId: spec.specification.id, modelId: entity.modelId, expressId: entity.expressId },
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return { runs: [run], findings };
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/review/validation.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAW/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD,SAAS,WAAW,CAAC,MAAwB;IAC3C,OAAO,MAAM,CAAC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URCE_KINDS, RUN_GAP_CODES } from './review/types.js';
|
|
3
|
+
export type { FindingSourceKind, FindingRun, RunGapCode, RunGap, FindingElement, FindingEvidence, FindingLifecycle, ReviewFinding, FindingSourceResult, ReviewModel, FindingSource } from './review/types.js';
|
|
4
|
+
export { buildCards, totalsForCards } from './review/cards.js';
|
|
5
|
+
export type { CardElement, CardState, CoordinationCard, ReviewTotals } from './review/cards.js';
|
|
6
|
+
export { elementKey, resolveElement } from './review/identity.js';
|
|
7
|
+
export { validationFindings } from './review/validation.js';
|
|
8
|
+
export { bcfFindings } from './review/bcf.js';
|
|
9
|
+
export { typeDisciplines } from './review/disciplines.js';
|
|
10
|
+
export { snapshotFrom, type ReviewSnapshot } from './review/snapshot.js';
|
|
11
|
+
//# sourceMappingURL=review.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../src/review.ts"],"names":[],"mappings":"AAIA,uFAAuF;AACvF,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,EAC9F,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC/D,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/review.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/** Pure read-only coordination facts shared by native hosts and the viewer (#7372). */
|
|
5
|
+
export { FINDING_SOURCE_KINDS, RUN_GAP_CODES } from './review/types.js';
|
|
6
|
+
export { buildCards, totalsForCards } from './review/cards.js';
|
|
7
|
+
export { elementKey, resolveElement } from './review/identity.js';
|
|
8
|
+
export { validationFindings } from './review/validation.js';
|
|
9
|
+
export { bcfFindings } from './review/bcf.js';
|
|
10
|
+
export { typeDisciplines } from './review/disciplines.js';
|
|
11
|
+
export { snapshotFrom } from './review/snapshot.js';
|
|
12
|
+
//# sourceMappingURL=review.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.js","sourceRoot":"","sources":["../src/review.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,uFAAuF;AACvF,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGxE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAuB,MAAM,sBAAsB,CAAC"}
|
package/dist/schedule-types.d.ts
CHANGED
|
@@ -48,8 +48,12 @@ export interface ScheduleTaskData {
|
|
|
48
48
|
taskTime?: ScheduleTaskTimeData;
|
|
49
49
|
parentGlobalId?: string;
|
|
50
50
|
childGlobalIds: string[];
|
|
51
|
+
/** Products assigned via IfcRelAssignsToProcess (the task's inputs). */
|
|
51
52
|
productExpressIds: number[];
|
|
52
53
|
productGlobalIds: string[];
|
|
54
|
+
/** Products the task outputs via IfcRelAssignsToProduct (#6749). Absent ≡ `[]`. */
|
|
55
|
+
outputProductExpressIds?: number[];
|
|
56
|
+
outputProductGlobalIds?: string[];
|
|
53
57
|
controllingScheduleGlobalIds: string[];
|
|
54
58
|
/** IfcWorkCalendar globalIds assigned to this task via IfcRelAssignsToControl. */
|
|
55
59
|
calendarGlobalIds?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-types.d.ts","sourceRoot":"","sources":["../src/schedule-types.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,oBAAoB,GAC5B,aAAa,GAAG,cAAc,GAAG,cAAc,GAAG,eAAe,GACjE,aAAa,GAAG,YAAY,CAAC;AAEjC,MAAM,MAAM,wBAAwB,GAChC,UAAU,GAAG,aAAa,GAAG,YAAY,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAA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AAE,CAAC;IAC5C,0DAA0D;IAC1D,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;IACpD,oDAAoD;IACpD,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,oBAAoB,EAAE,CAAC;CACrD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type AlignMode, type PlanBox } from '@ifc-lite/create';
|
|
2
|
+
import type { CostStoreModelResolution } from './cost-store-backend.js';
|
|
3
|
+
import type { EntityRef } from './types.js';
|
|
4
|
+
export type AlignGeometryProvider = (model: CostStoreModelResolution, storeyId: number, ids: readonly number[]) => Promise<ReadonlyMap<number, PlanBox>>;
|
|
5
|
+
export interface AlignCommandHost {
|
|
6
|
+
historyHead(modelId: string): string;
|
|
7
|
+
record<T>(modelId: string, write: (model: CostStoreModelResolution) => T): T;
|
|
8
|
+
}
|
|
9
|
+
/** Native preparation completes before the one synchronous atomic history record. */
|
|
10
|
+
export declare function createAlignCommandBackend(resolve: (modelId: string) => CostStoreModelResolution, provide: AlignGeometryProvider, host: AlignCommandHost): {
|
|
11
|
+
alignElements(modelId: string, reference: number, targets: readonly number[], mode: AlignMode): Promise<EntityRef[]>;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=store-align-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-align-command.d.ts","sourceRoot":"","sources":["../src/store-align-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgD,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC9G,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACzJ,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACrC,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,CAAC,GAAG,CAAC,CAAC;CAC9E;AAED,qFAAqF;AACrF,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,wBAAwB,EAAE,OAAO,EAAE,qBAAqB,EAAE,IAAI,EAAE,gBAAgB;2BAIvH,MAAM,aAAa,MAAM,WAAW,SAAS,MAAM,EAAE,QAAQ,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;EAe7H"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { alignElementsInStore, alignmentStoreyInStore } from '@ifc-lite/create';
|
|
5
|
+
/** Native preparation completes before the one synchronous atomic history record. */
|
|
6
|
+
export function createAlignCommandBackend(resolve, provide, host) {
|
|
7
|
+
const preparing = new Set();
|
|
8
|
+
const journal = (model) => model.mutationView.getMutations().map(m => m.id).join('|');
|
|
9
|
+
return {
|
|
10
|
+
async alignElements(modelId, reference, targets, mode) {
|
|
11
|
+
if (preparing.has(modelId))
|
|
12
|
+
throw new Error('Another Align command is preparing this model');
|
|
13
|
+
preparing.add(modelId);
|
|
14
|
+
try {
|
|
15
|
+
const model = resolve(modelId), head = host.historyHead(modelId), changes = journal(model);
|
|
16
|
+
const params = { reference, targets: [...targets], mode };
|
|
17
|
+
const storey = alignmentStoreyInStore({ dataStore: model.store, view: model.mutationView }, params);
|
|
18
|
+
const boxes = await provide(model, storey, [reference, ...params.targets]);
|
|
19
|
+
const current = resolve(modelId);
|
|
20
|
+
if (current.store !== model.store || current.mutationView !== model.mutationView || head !== host.historyHead(modelId) || changes !== journal(current))
|
|
21
|
+
throw new Error('The model changed while native Align geometry was preparing; retry the command');
|
|
22
|
+
const result = host.record(modelId, draft => draft.editor.runAtomic(editor => alignElementsInStore({ dataStore: draft.store, view: editor.getMutationView(), editor }, params, boxes)));
|
|
23
|
+
return result.remesh.map(expressId => ({ modelId, expressId }));
|
|
24
|
+
}
|
|
25
|
+
finally {
|
|
26
|
+
preparing.delete(modelId);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=store-align-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-align-command.js","sourceRoot":"","sources":["../src/store-align-command.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAgC,MAAM,kBAAkB,CAAC;AAU9G,qFAAqF;AACrF,MAAM,UAAU,yBAAyB,CAAC,OAAsD,EAAE,OAA8B,EAAE,IAAsB;IACtJ,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;IACpC,MAAM,OAAO,GAAG,CAAC,KAA+B,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChH,OAAO;QACL,KAAK,CAAC,aAAa,CAAC,OAAe,EAAE,SAAiB,EAAE,OAA0B,EAAE,IAAe;YACjG,IAAI,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;YAC7F,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACvB,IAAI,CAAC;gBACH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SAAS,EAAE,CAAC,CAAC,CAAC;YAClE,CAAC;oBAAS,CAAC;gBAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAAC,CAAC;QAC1C,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { createCostStoreBackend, type CostStoreModelResolution, type CostStoreModelResolver } from './cost-store-backend.js';
|
|
2
|
+
export { createStructuralStoreBackend, type StructuralStoreModelResolver } from './store-structural-backend.js';
|
|
3
|
+
export { createModellingStoreBackend, type ModellingStoreModelResolver } from './store-modelling-backend.js';
|
|
4
|
+
export { createOrdinaryStoreBackend, type OrdinaryStoreBackendMethods } from './store-ordinary-backend.js';
|
|
5
|
+
export { createGroupStoreBackend } from './group-store-backend.js';
|
|
6
|
+
export type { CostStoreBackendMethods } from './store-cost-types.js';
|
|
7
|
+
export type { StructuralStoreBackendMethods } from './store-structural-types.js';
|
|
8
|
+
export type { ModellingStoreBackendMethods } from './store-modelling-types.js';
|
|
9
|
+
export type { GroupStoreBackendMethods, GroupStoreIdentity, GroupStoreSnapshot, GroupStoreCreateParams, GroupStorePatch } from './store-group-types.js';
|
|
10
|
+
//# sourceMappingURL=store-authoring-exports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-authoring-exports.d.ts","sourceRoot":"","sources":["../src/store-authoring-exports.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAC7H,OAAO,EAAE,4BAA4B,EAAE,KAAK,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAChH,OAAO,EAAE,2BAA2B,EAAE,KAAK,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC7G,OAAO,EAAE,0BAA0B,EAAE,KAAK,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC3G,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,YAAY,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,YAAY,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjF,YAAY,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC/E,YAAY,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
export { createCostStoreBackend } from './cost-store-backend.js';
|
|
5
|
+
export { createStructuralStoreBackend } from './store-structural-backend.js';
|
|
6
|
+
export { createModellingStoreBackend } from './store-modelling-backend.js';
|
|
7
|
+
export { createOrdinaryStoreBackend } from './store-ordinary-backend.js';
|
|
8
|
+
export { createGroupStoreBackend } from './group-store-backend.js';
|
|
9
|
+
//# sourceMappingURL=store-authoring-exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-authoring-exports.js","sourceRoot":"","sources":["../src/store-authoring-exports.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAC/D,OAAO,EAAE,sBAAsB,EAA8D,MAAM,yBAAyB,CAAC;AAC7H,OAAO,EAAE,4BAA4B,EAAqC,MAAM,+BAA+B,CAAC;AAChH,OAAO,EAAE,2BAA2B,EAAoC,MAAM,8BAA8B,CAAC;AAC7G,OAAO,EAAE,0BAA0B,EAAoC,MAAM,6BAA6B,CAAC;AAC3G,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CostStoreBackendMethods } from './store-cost-types.js';
|
|
2
|
+
import type { StructuralStoreBackendMethods } from './store-structural-types.js';
|
|
3
|
+
import type { ModellingStoreBackendMethods } from './store-modelling-types.js';
|
|
4
|
+
import type { GroupStoreBackendMethods } from './store-group-types.js';
|
|
5
|
+
/** Shared authoring capabilities keep the main backend declaration inside its size budget. */
|
|
6
|
+
export interface StoreAuthoringBackendMethods extends CostStoreBackendMethods, StructuralStoreBackendMethods, ModellingStoreBackendMethods, GroupStoreBackendMethods {
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=store-authoring-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-authoring-types.d.ts","sourceRoot":"","sources":["../src/store-authoring-types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,8FAA8F;AAC9F,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,wBAAwB;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-authoring-types.js","sourceRoot":"","sources":["../src/store-authoring-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { GroupInStoreParams, GroupInStorePatch, GroupRootIdentity, GroupSnapshot } from '@ifc-lite/create';
|
|
2
|
+
import type { EntityRef } from './types.js';
|
|
3
|
+
/** A current Root identity belonging to one explicit loaded source. */
|
|
4
|
+
export type GroupStoreIdentity = EntityRef & GroupRootIdentity;
|
|
5
|
+
export type GroupStoreSnapshot = GroupSnapshot & {
|
|
6
|
+
modelId: string;
|
|
7
|
+
};
|
|
8
|
+
export type GroupStoreCreateParams = Omit<GroupInStoreParams, 'RelatedObjects'> & {
|
|
9
|
+
RelatedObjects: readonly GroupStoreIdentity[];
|
|
10
|
+
};
|
|
11
|
+
export type GroupStorePatch = Omit<GroupInStorePatch, 'RelatedObjects'> & {
|
|
12
|
+
RelatedObjects: readonly GroupStoreIdentity[];
|
|
13
|
+
};
|
|
14
|
+
export interface GroupStoreBackendMethods {
|
|
15
|
+
readGroup?(target: GroupStoreIdentity): GroupStoreSnapshot;
|
|
16
|
+
addGroup?(modelId: string, params: GroupStoreCreateParams): GroupStoreIdentity;
|
|
17
|
+
updateGroup?(expected: GroupStoreSnapshot, patch: GroupStorePatch): GroupStoreIdentity;
|
|
18
|
+
removeGroup?(expected: GroupStoreSnapshot): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=store-group-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-group-types.d.ts","sourceRoot":"","sources":["../src/store-group-types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,iBAAiB,CAAC;AAC/D,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACrE,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,GAAG;IAAE,cAAc,EAAE,SAAS,kBAAkB,EAAE,CAAA;CAAE,CAAC;AACpI,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,GAAG;IAAE,cAAc,EAAE,SAAS,kBAAkB,EAAE,CAAA;CAAE,CAAC;AAE5H,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAAC;IAC3D,QAAQ,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,GAAG,kBAAkB,CAAC;IAC/E,WAAW,CAAC,CAAC,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,eAAe,GAAG,kBAAkB,CAAC;IACvF,WAAW,CAAC,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-group-types.js","sourceRoot":"","sources":["../src/store-group-types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-modelling-backend.d.ts","sourceRoot":"","sources":["../src/store-modelling-backend.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"store-modelling-backend.d.ts","sourceRoot":"","sources":["../src/store-modelling-backend.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAI/E,uEAAuE;AACvE,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,wBAAwB,CAAC;AAEzF,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,2BAA2B,GAAG,4BAA4B,CA6I9G"}
|