@ifc-lite/mutations 1.18.0 → 1.19.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 +1 -1
- package/dist/change-set-to-ops.d.ts +61 -0
- package/dist/change-set-to-ops.d.ts.map +1 -0
- package/dist/change-set-to-ops.js +151 -0
- package/dist/change-set-to-ops.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -166,7 +166,7 @@ Pair this with `exportToStep(store, { applyMutations: true })` from `@ifc-lite/e
|
|
|
166
166
|
|
|
167
167
|
## API
|
|
168
168
|
|
|
169
|
-
See the [Property Editing Guide](https://
|
|
169
|
+
See the [Property Editing Guide](https://ifclite.dev/docs/guide/mutations/) and [API Reference](https://ifclite.dev/docs/api/typescript/#ifc-litemutations).
|
|
170
170
|
|
|
171
171
|
## License
|
|
172
172
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ChangeSet, PropertyValue } from './types.js';
|
|
2
|
+
/** Adapter over the store's id table, supplied by the caller at freeze time. */
|
|
3
|
+
export interface EntityIdentityResolver {
|
|
4
|
+
/** The entity's IFC `GlobalId`, when present and trusted. */
|
|
5
|
+
globalIdOf(expressId: number): string | undefined;
|
|
6
|
+
/** IFC type name, used by the content-derived fallback. */
|
|
7
|
+
ifcTypeOf?(expressId: number): string | undefined;
|
|
8
|
+
/** Stable spatial parent path (e.g. `/project/storey-EG`). */
|
|
9
|
+
spatialParentPathOf?(expressId: number): string | undefined;
|
|
10
|
+
/** Entity `Name`, used by the content-derived fallback. */
|
|
11
|
+
nameOf?(expressId: number): string | undefined;
|
|
12
|
+
}
|
|
13
|
+
/** Identity-map entry mirroring `ifclite::provenance.identity_map`. */
|
|
14
|
+
export interface DerivedIdentityEntry {
|
|
15
|
+
base: string;
|
|
16
|
+
here: string;
|
|
17
|
+
reason: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Component-granular semantic ops, in the shared componentKey vocabulary
|
|
21
|
+
* (`pset:<Name>`, `qset:<Name>`, `attr:core`). Values carry only what the
|
|
22
|
+
* change set knows; the publish path composes them onto the draft state.
|
|
23
|
+
*/
|
|
24
|
+
export type ChangeSetOp = {
|
|
25
|
+
op: 'set-component';
|
|
26
|
+
entity: string;
|
|
27
|
+
componentKey: string;
|
|
28
|
+
/** Property/attribute values; `null` removes the member. */
|
|
29
|
+
values: Record<string, PropertyValue | null>;
|
|
30
|
+
} | {
|
|
31
|
+
op: 'tombstone-component';
|
|
32
|
+
entity: string;
|
|
33
|
+
componentKey: string;
|
|
34
|
+
} | {
|
|
35
|
+
op: 'add-entity';
|
|
36
|
+
entity: string;
|
|
37
|
+
ifcType?: string;
|
|
38
|
+
} | {
|
|
39
|
+
op: 'tombstone-entity';
|
|
40
|
+
entity: string;
|
|
41
|
+
};
|
|
42
|
+
export interface ChangeSetOpsResult {
|
|
43
|
+
ops: ChangeSetOp[];
|
|
44
|
+
/** Content-derived identities, for the manifest's identity_map. */
|
|
45
|
+
identityMap: DerivedIdentityEntry[];
|
|
46
|
+
/** expressIds for which no identity could be established at all. */
|
|
47
|
+
unresolved: number[];
|
|
48
|
+
}
|
|
49
|
+
/** Content-derived fallback identity (04 §4.1(3)). */
|
|
50
|
+
export declare function deriveEntityIdentity(input: {
|
|
51
|
+
ifcType?: string;
|
|
52
|
+
spatialParentPath?: string;
|
|
53
|
+
name?: string;
|
|
54
|
+
}): string;
|
|
55
|
+
/**
|
|
56
|
+
* Map a change set's mutations onto component-granular ops keyed by
|
|
57
|
+
* stable entity identity. Mutations fold LWW per (entity, componentKey)
|
|
58
|
+
* in change-set order, matching layer composition semantics.
|
|
59
|
+
*/
|
|
60
|
+
export declare function changeSetToOps(changeSet: ChangeSet, resolver: EntityIdentityResolver): ChangeSetOpsResult;
|
|
61
|
+
//# sourceMappingURL=change-set-to-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,CAAC;AAE/C,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,WAAW,EAAE,CAAC;IACnB,mEAAmE;IACnE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,oEAAoE;IACpE,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAID,sDAAsD;AACtD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAOT;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,sBAAsB,GAC/B,kBAAkB,CAmEpB"}
|
|
@@ -0,0 +1,151 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* expressId → GlobalId bridge for layer publishing.
|
|
6
|
+
*
|
|
7
|
+
* `Mutation.entityId` is an expressId: model-scoped and unstable across
|
|
8
|
+
* exports. The publish path maps it to a stable identity at freeze time:
|
|
9
|
+
*
|
|
10
|
+
* 1. IFC GlobalId via the store's id table — primary identity
|
|
11
|
+
* 2. Content-derived fallback — blake3 over a stable subset
|
|
12
|
+
* (ifcType + spatial parent path + name) for entities with missing
|
|
13
|
+
* GlobalIds, always recorded into the identity map with
|
|
14
|
+
* `reason: "derived"` so a human can override
|
|
15
|
+
*
|
|
16
|
+
* There is no heuristic matcher: when identity cannot be established the
|
|
17
|
+
* entity is reported in `unresolved` rather than silently guessed.
|
|
18
|
+
*
|
|
19
|
+
* Spec: docs/architecture/layer-prs/04-identity.md §4.1, §4.3.
|
|
20
|
+
*/
|
|
21
|
+
import { blake3 } from '@noble/hashes/blake3.js';
|
|
22
|
+
import { bytesToHex } from '@noble/hashes/utils.js';
|
|
23
|
+
const textEncoder = new TextEncoder();
|
|
24
|
+
/** Content-derived fallback identity (04 §4.1(3)). */
|
|
25
|
+
export function deriveEntityIdentity(input) {
|
|
26
|
+
const canonical = JSON.stringify({
|
|
27
|
+
ifcType: input.ifcType ?? '',
|
|
28
|
+
name: input.name ?? '',
|
|
29
|
+
spatialParentPath: input.spatialParentPath ?? '',
|
|
30
|
+
});
|
|
31
|
+
return `derived:${bytesToHex(blake3(textEncoder.encode(canonical)))}`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Map a change set's mutations onto component-granular ops keyed by
|
|
35
|
+
* stable entity identity. Mutations fold LWW per (entity, componentKey)
|
|
36
|
+
* in change-set order, matching layer composition semantics.
|
|
37
|
+
*/
|
|
38
|
+
export function changeSetToOps(changeSet, resolver) {
|
|
39
|
+
const identityCache = new Map();
|
|
40
|
+
const identityMap = [];
|
|
41
|
+
const unresolved = [];
|
|
42
|
+
const identityOf = (expressId) => {
|
|
43
|
+
if (identityCache.has(expressId))
|
|
44
|
+
return identityCache.get(expressId);
|
|
45
|
+
let identity = resolver.globalIdOf(expressId);
|
|
46
|
+
if (identity === undefined) {
|
|
47
|
+
const ifcType = resolver.ifcTypeOf?.(expressId);
|
|
48
|
+
const name = resolver.nameOf?.(expressId);
|
|
49
|
+
const spatialParentPath = resolver.spatialParentPathOf?.(expressId);
|
|
50
|
+
if (ifcType !== undefined || name !== undefined || spatialParentPath !== undefined) {
|
|
51
|
+
identity = deriveEntityIdentity({ ifcType, name, spatialParentPath });
|
|
52
|
+
identityMap.push({ base: identity, here: identity, reason: 'derived' });
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
unresolved.push(expressId);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
identityCache.set(expressId, identity);
|
|
59
|
+
return identity;
|
|
60
|
+
};
|
|
61
|
+
// Fold per (entity, componentKey); entity-level ops tracked separately.
|
|
62
|
+
const components = new Map();
|
|
63
|
+
const entityOps = new Map();
|
|
64
|
+
const componentFor = (entity, componentKey) => {
|
|
65
|
+
let perEntity = components.get(entity);
|
|
66
|
+
if (!perEntity) {
|
|
67
|
+
perEntity = new Map();
|
|
68
|
+
components.set(entity, perEntity);
|
|
69
|
+
}
|
|
70
|
+
return perEntity;
|
|
71
|
+
};
|
|
72
|
+
const setMember = (entity, componentKey, member, value) => {
|
|
73
|
+
const perEntity = componentFor(entity, componentKey);
|
|
74
|
+
const existing = perEntity.get(componentKey);
|
|
75
|
+
const values = existing === null || existing === undefined ? {} : existing;
|
|
76
|
+
values[member] = value;
|
|
77
|
+
perEntity.set(componentKey, values);
|
|
78
|
+
};
|
|
79
|
+
for (const mutation of changeSet.mutations) {
|
|
80
|
+
const entity = identityOf(mutation.entityId);
|
|
81
|
+
if (entity === undefined)
|
|
82
|
+
continue;
|
|
83
|
+
applyMutation(mutation, entity, setMember, componentFor, entityOps, resolver);
|
|
84
|
+
}
|
|
85
|
+
const ops = [...entityOps.values()];
|
|
86
|
+
for (const [entity, perEntity] of components) {
|
|
87
|
+
for (const [componentKey, values] of perEntity) {
|
|
88
|
+
if (values === null) {
|
|
89
|
+
ops.push({ op: 'tombstone-component', entity, componentKey });
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
ops.push({ op: 'set-component', entity, componentKey, values });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return { ops, identityMap, unresolved };
|
|
97
|
+
}
|
|
98
|
+
function applyMutation(mutation, entity, setMember, componentFor, entityOps, resolver) {
|
|
99
|
+
switch (mutation.type) {
|
|
100
|
+
case 'CREATE_PROPERTY':
|
|
101
|
+
case 'UPDATE_PROPERTY':
|
|
102
|
+
if (mutation.psetName && mutation.propName) {
|
|
103
|
+
setMember(entity, `pset:${mutation.psetName}`, mutation.propName, mutation.newValue ?? null);
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case 'DELETE_PROPERTY':
|
|
107
|
+
if (mutation.psetName && mutation.propName) {
|
|
108
|
+
setMember(entity, `pset:${mutation.psetName}`, mutation.propName, null);
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
case 'CREATE_QUANTITY':
|
|
112
|
+
case 'UPDATE_QUANTITY':
|
|
113
|
+
if (mutation.psetName && mutation.propName) {
|
|
114
|
+
setMember(entity, `qset:${mutation.psetName}`, mutation.propName, mutation.newValue ?? null);
|
|
115
|
+
}
|
|
116
|
+
break;
|
|
117
|
+
case 'DELETE_QUANTITY':
|
|
118
|
+
if (mutation.psetName && mutation.propName) {
|
|
119
|
+
setMember(entity, `qset:${mutation.psetName}`, mutation.propName, null);
|
|
120
|
+
}
|
|
121
|
+
break;
|
|
122
|
+
case 'CREATE_PROPERTY_SET':
|
|
123
|
+
if (mutation.psetName) {
|
|
124
|
+
// Materialize the (possibly empty) set; members follow.
|
|
125
|
+
componentFor(entity, `pset:${mutation.psetName}`).set(`pset:${mutation.psetName}`, {});
|
|
126
|
+
}
|
|
127
|
+
break;
|
|
128
|
+
case 'DELETE_PROPERTY_SET':
|
|
129
|
+
if (mutation.psetName) {
|
|
130
|
+
componentFor(entity, `pset:${mutation.psetName}`).set(`pset:${mutation.psetName}`, null);
|
|
131
|
+
}
|
|
132
|
+
break;
|
|
133
|
+
case 'UPDATE_ATTRIBUTE':
|
|
134
|
+
case 'UPDATE_POSITIONAL_ATTRIBUTE':
|
|
135
|
+
if (mutation.attributeName) {
|
|
136
|
+
setMember(entity, 'attr:core', mutation.attributeName, mutation.newValue ?? null);
|
|
137
|
+
}
|
|
138
|
+
break;
|
|
139
|
+
case 'CREATE_ENTITY':
|
|
140
|
+
entityOps.set(entity, {
|
|
141
|
+
op: 'add-entity',
|
|
142
|
+
entity,
|
|
143
|
+
ifcType: resolver.ifcTypeOf?.(mutation.entityId),
|
|
144
|
+
});
|
|
145
|
+
break;
|
|
146
|
+
case 'DELETE_ENTITY':
|
|
147
|
+
entityOps.set(entity, { op: 'tombstone-entity', entity });
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=change-set-to-ops.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-set-to-ops.js","sourceRoot":"","sources":["../src/change-set-to-ops.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA+CpD,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;AAEtC,sDAAsD;AACtD,MAAM,UAAU,oBAAoB,CAAC,KAIpC;IACC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAC/B,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE;QAC5B,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;QACtB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,IAAI,EAAE;KACjD,CAAC,CAAC;IACH,OAAO,WAAW,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;AACxE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,SAAoB,EACpB,QAAgC;IAEhC,MAAM,aAAa,GAAG,IAAI,GAAG,EAA8B,CAAC;IAC5D,MAAM,WAAW,GAA2B,EAAE,CAAC;IAC/C,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,MAAM,UAAU,GAAG,CAAC,SAAiB,EAAsB,EAAE;QAC3D,IAAI,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC;YAAE,OAAO,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACtE,IAAI,QAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAC9C,IAAI,QAAQ,KAAK,S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
|
export { BulkQueryEngine, type SelectionCriteria, type BulkAction, type BulkQuery, type BulkQueryPreview, type BulkQueryResult, type PropertyFilter, type FilterOperator, } from './bulk-query-engine.js';
|
|
9
9
|
export { CsvConnector, type CsvRow, type MatchStrategy, type PropertyMapping, type DataMapping, type MatchResult, type ImportStats, type ImportProgress, type CsvParseOptions, } from './csv-connector.js';
|
|
10
|
+
export { changeSetToOps, deriveEntityIdentity, type ChangeSetOp, type ChangeSetOpsResult, type DerivedIdentityEntry, type EntityIdentityResolver, } from './change-set-to-ops.js';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACjH,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,YAAY,EACZ,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACjH,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,YAAY,EACZ,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,GAC5B,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,4 +10,5 @@ export { StoreEditor, OVERLAY_BYTE_OFFSET, setEntityTypeNormalizer, } from './st
|
|
|
10
10
|
export { ChangeSetManager } from './change-set.js';
|
|
11
11
|
export { BulkQueryEngine, } from './bulk-query-engine.js';
|
|
12
12
|
export { CsvConnector, } from './csv-connector.js';
|
|
13
|
+
export { changeSetToOps, deriveEntityIdentity, } from './change-set-to-ops.js';
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAkD,MAAM,4BAA4B,CAAC;AACjH,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,uBAAuB,GAExB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,eAAe,GAQhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,YAAY,GASb,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAkD,MAAM,4BAA4B,CAAC;AACjH,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,uBAAuB,GAExB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,eAAe,GAQhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,YAAY,GASb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,oBAAoB,GAKrB,MAAM,wBAAwB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifc-lite/mutations",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "Mutation tracking and property editing for IFC-Lite",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@
|
|
16
|
+
"@noble/hashes": "^2.2.0",
|
|
17
|
+
"@ifc-lite/data": "^2.5.3"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
20
|
"typescript": "^6.0.3",
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
"url": "https://github.com/LTplus-AG/ifc-lite.git",
|
|
27
28
|
"directory": "packages/mutations"
|
|
28
29
|
},
|
|
29
|
-
"homepage": "https://
|
|
30
|
+
"homepage": "https://ifclite.dev/docs/",
|
|
30
31
|
"bugs": "https://github.com/LTplus-AG/ifc-lite/issues",
|
|
31
32
|
"keywords": [
|
|
32
33
|
"ifc",
|