@itwin/core-frontend 5.14.0-dev.1 → 5.14.0-dev.10
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/CHANGELOG.md +16 -1
- package/lib/cjs/BriefcaseConnection.d.ts +32 -0
- package/lib/cjs/BriefcaseConnection.d.ts.map +1 -1
- package/lib/cjs/BriefcaseConnection.js +43 -23
- package/lib/cjs/BriefcaseConnection.js.map +1 -1
- package/lib/cjs/TentativePoint.d.ts.map +1 -1
- package/lib/cjs/TentativePoint.js +5 -14
- package/lib/cjs/TentativePoint.js.map +1 -1
- package/lib/cjs/core-frontend.d.ts +1 -1
- package/lib/cjs/core-frontend.js.map +1 -1
- package/lib/cjs/tile/GltfReader.d.ts.map +1 -1
- package/lib/cjs/tile/GltfReader.js +4 -2
- package/lib/cjs/tile/GltfReader.js.map +1 -1
- package/lib/esm/BriefcaseConnection.d.ts +32 -0
- package/lib/esm/BriefcaseConnection.d.ts.map +1 -1
- package/lib/esm/BriefcaseConnection.js +44 -24
- package/lib/esm/BriefcaseConnection.js.map +1 -1
- package/lib/esm/TentativePoint.d.ts.map +1 -1
- package/lib/esm/TentativePoint.js +6 -15
- package/lib/esm/TentativePoint.js.map +1 -1
- package/lib/esm/core-frontend.d.ts +1 -1
- package/lib/esm/core-frontend.js.map +1 -1
- package/lib/esm/tile/GltfReader.d.ts.map +1 -1
- package/lib/esm/tile/GltfReader.js +4 -2
- package/lib/esm/tile/GltfReader.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +2 -2
- package/package.json +22 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
# Change Log - @itwin/core-frontend
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 03 Sep 2026 18:51:17 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.13.0
|
|
6
|
+
Thu, 03 Sep 2026 18:49:56 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- EmphasizeElements' default appearance applies even if no elements are emphasized.
|
|
11
|
+
- Fix OPC point clouds whose CRS has no vertical datum displaying offset vertically by the geoid-ellipsoid separation: their heights are now treated as orthometric.
|
|
12
|
+
- Update Units Schema to 01.00.11.
|
|
13
|
+
- Fix changeset not being updated and onChangesetChanged not being fired after BriefcaseConnection.pushChanges
|
|
14
|
+
- Map-layer credentials can now be restricted to trusted origins via the opt-in MapLayerFormatRegistry.restrictCredentialsToTrustedOrigins, and blocked requests are reported through MapLayerImageryProviderStatus.UntrustedOrigin. While the restriction is enabled, requests carrying credentials refuse redirects so that credentials cannot reach an unlisted origin. Server-provided attribution text, ArcGIS identify tooltip fields, and map-layer and reality-model names and properties are now rendered as plain text instead of HTML; WMS GetFeatureInfo responses from trusted origins intentionally keep their rich HTML, so applications must sanitize that content themselves.
|
|
15
|
+
- Handle incompatible format-provider entries during QuantityFormatter registry reload.
|
|
16
|
+
- Deprecate the existing @itwin/core-frontend TxnEntityMetadata export; use TxnEntityMetadata from @itwin/core-common instead. Frontend TxnEntityChange.metadata uses the shared contract.
|
|
17
|
+
- Invalidate cached decorations when always/never-drawn elements change.
|
|
18
|
+
- Upgrade wms-capabilities to 0.6.0 (drops minimist runtime dependency) and harden WMS GetCapabilities XML parsing against malformed and hostile input
|
|
4
19
|
|
|
5
20
|
## 5.12.5
|
|
6
21
|
Tue, 25 Aug 2026 21:22:08 GMT
|
|
@@ -46,6 +46,21 @@ export interface PullChangesOptions {
|
|
|
46
46
|
*/
|
|
47
47
|
abortSignal?: GenericAbortSignal;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Options for pushing iModel changes.
|
|
51
|
+
* @beta
|
|
52
|
+
*/
|
|
53
|
+
export interface PushChangesOptions {
|
|
54
|
+
/** Function called regularly to report progress of the download of the changes that must be merged before pushing. */
|
|
55
|
+
downloadProgressCallback?: OnDownloadProgress;
|
|
56
|
+
/** Interval for calling [[downloadProgressCallback]] (in milliseconds). */
|
|
57
|
+
downloadProgressInterval?: number;
|
|
58
|
+
/** Signal for cancelling the push.
|
|
59
|
+
* @note Currently this only cancels the download of the changes that must be merged before pushing - it has no effect once the local
|
|
60
|
+
* changeset is being uploaded.
|
|
61
|
+
*/
|
|
62
|
+
abortSignal?: GenericAbortSignal;
|
|
63
|
+
}
|
|
49
64
|
/**
|
|
50
65
|
* Provides access to lock information in the iModel.
|
|
51
66
|
* @see [[BriefcaseConnection.locks]]
|
|
@@ -151,6 +166,10 @@ export declare class BriefcaseConnection extends IModelConnection {
|
|
|
151
166
|
* @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use methods on EditCommand instead.
|
|
152
167
|
*/
|
|
153
168
|
abandonChanges(): Promise<void>;
|
|
169
|
+
/** Subscribes to changeset download progress events on `channel` and wires `abortSignal` to `cancel`.
|
|
170
|
+
* @returns a function that removes every listener that was added.
|
|
171
|
+
*/
|
|
172
|
+
private listenForChangesetDownloadProgress;
|
|
154
173
|
/** Pull (and potentially merge if there are local changes) up to a specified changeset from iModelHub into this briefcase
|
|
155
174
|
* @param toIndex The changeset index to pull changes to. If `undefined`, pull all changes.
|
|
156
175
|
* @param options Options for pulling changes.
|
|
@@ -160,9 +179,22 @@ export declare class BriefcaseConnection extends IModelConnection {
|
|
|
160
179
|
/** Create a changeset from local Txns and push to iModelHub. On success, clear Txn table.
|
|
161
180
|
* @param description The description for the changeset
|
|
162
181
|
* @returns the changesetId of the pushed changes
|
|
182
|
+
* @note Any changes made by other users are first pulled, applied, and merged with the local Txns. Only then is the resulting changeset
|
|
183
|
+
* uploaded.
|
|
163
184
|
* @see [[BriefcaseTxns.onChangesPushed]] for the event dispatched after changes are pushed.
|
|
185
|
+
* @public
|
|
164
186
|
*/
|
|
165
187
|
pushChanges(description: string): Promise<ChangesetIndexAndId>;
|
|
188
|
+
/** Create a changeset from local Txns and push to iModelHub. On success, clear Txn table.
|
|
189
|
+
* @param description The description for the changeset
|
|
190
|
+
* @param options Options reporting the progress of - and optionally cancelling - the download of the changes that are pulled before pushing.
|
|
191
|
+
* @returns the changesetId of the pushed changes
|
|
192
|
+
* @note Any changes made by other users are first pulled, applied, and merged with the local Txns. Only then is the resulting changeset
|
|
193
|
+
* uploaded.
|
|
194
|
+
* @see [[BriefcaseTxns.onChangesPushed]] for the event dispatched after changes are pushed.
|
|
195
|
+
* @beta
|
|
196
|
+
*/
|
|
197
|
+
pushChanges(description: string, options?: PushChangesOptions): Promise<ChangesetIndexAndId>;
|
|
166
198
|
/** The current graphical editing scope, if one is in progress.
|
|
167
199
|
* @see [[enterEditingScope]] to begin graphical editing.
|
|
168
200
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BriefcaseConnection.d.ts","sourceRoot":"","sources":["../../src/BriefcaseConnection.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,OAAO,EAA2B,UAAU,EAAE,OAAO,EAAE,UAAU,EAAgB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACxI,OAAO,EACL,wBAAwB,EAAE,cAAc,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"BriefcaseConnection.d.ts","sourceRoot":"","sources":["../../src/BriefcaseConnection.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,OAAO,EAA2B,UAAU,EAAE,OAAO,EAAE,UAAU,EAAgB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACxI,OAAO,EACL,wBAAwB,EAAE,cAAc,EAAE,mBAAmB,EACmC,SAAS,EAAE,kBAAkB,EAAE,qBAAqB,EACrJ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;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;;;;;OAKG;IACU,iBAAiB,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAIhE;;OAEG;IACH,SAAgB,sBAAsB,4BAAiC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,EAAI;CAChG"}
|
|
@@ -259,29 +259,38 @@ class BriefcaseConnection extends IModelConnection_1.IModelConnection {
|
|
|
259
259
|
async abandonChanges() {
|
|
260
260
|
await IpcApp_1.IpcApp.appFunctionIpc.abandonChanges(this.key); // eslint-disable-line @typescript-eslint/no-deprecated
|
|
261
261
|
}
|
|
262
|
+
/** Subscribes to changeset download progress events on `channel` and wires `abortSignal` to `cancel`.
|
|
263
|
+
* @returns a function that removes every listener that was added.
|
|
264
|
+
*/
|
|
265
|
+
listenForChangesetDownloadProgress(args) {
|
|
266
|
+
const { channel, cancel, downloadProgressCallback, abortSignal } = args;
|
|
267
|
+
const removeListeners = [];
|
|
268
|
+
if (downloadProgressCallback) {
|
|
269
|
+
const handleProgress = (_evt, data) => downloadProgressCallback(data);
|
|
270
|
+
removeListeners.push(IpcApp_1.IpcApp.addListener(channel, handleProgress));
|
|
271
|
+
}
|
|
272
|
+
if (abortSignal) {
|
|
273
|
+
const abort = () => void cancel();
|
|
274
|
+
abortSignal.addEventListener("abort", abort);
|
|
275
|
+
removeListeners.push(() => abortSignal.removeEventListener("abort", abort));
|
|
276
|
+
}
|
|
277
|
+
return () => removeListeners.forEach((remove) => remove());
|
|
278
|
+
}
|
|
262
279
|
/** Pull (and potentially merge if there are local changes) up to a specified changeset from iModelHub into this briefcase
|
|
263
280
|
* @param toIndex The changeset index to pull changes to. If `undefined`, pull all changes.
|
|
264
281
|
* @param options Options for pulling changes.
|
|
265
282
|
* @see [[BriefcaseTxns.onChangesPulled]] for the event dispatched after changes are pulled.
|
|
266
283
|
*/
|
|
267
284
|
async pullChanges(toIndex, options) {
|
|
268
|
-
const removeListeners = [];
|
|
269
|
-
const shouldReportProgress = !!options?.downloadProgressCallback;
|
|
270
|
-
if (shouldReportProgress) {
|
|
271
|
-
const handleProgress = (_evt, data) => {
|
|
272
|
-
options?.downloadProgressCallback?.(data);
|
|
273
|
-
};
|
|
274
|
-
const removeProgressListener = IpcApp_1.IpcApp.addListener((0, core_common_1.getPullChangesIpcChannel)(this.iModelId), handleProgress);
|
|
275
|
-
removeListeners.push(removeProgressListener);
|
|
276
|
-
}
|
|
277
|
-
if (options?.abortSignal) {
|
|
278
|
-
const abort = () => void IpcApp_1.IpcApp.appFunctionIpc.cancelPullChangesRequest(this.key);
|
|
279
|
-
options?.abortSignal.addEventListener("abort", abort);
|
|
280
|
-
removeListeners.push(() => options?.abortSignal?.removeEventListener("abort", abort));
|
|
281
|
-
}
|
|
282
285
|
this.requireTimeline();
|
|
286
|
+
const removeListeners = this.listenForChangesetDownloadProgress({
|
|
287
|
+
channel: (0, core_common_1.getPullChangesIpcChannel)(this.key),
|
|
288
|
+
cancel: async () => IpcApp_1.IpcApp.appFunctionIpc.cancelPullChangesRequest(this.key),
|
|
289
|
+
downloadProgressCallback: options?.downloadProgressCallback,
|
|
290
|
+
abortSignal: options?.abortSignal,
|
|
291
|
+
});
|
|
283
292
|
const ipcAppOptions = {
|
|
284
|
-
reportProgress:
|
|
293
|
+
reportProgress: !!options?.downloadProgressCallback,
|
|
285
294
|
progressInterval: options?.progressInterval,
|
|
286
295
|
enableCancellation: !!options?.abortSignal,
|
|
287
296
|
};
|
|
@@ -289,18 +298,29 @@ class BriefcaseConnection extends IModelConnection_1.IModelConnection {
|
|
|
289
298
|
this.changeset = await IpcApp_1.IpcApp.appFunctionIpc.pullChanges(this.key, toIndex, ipcAppOptions);
|
|
290
299
|
}
|
|
291
300
|
finally {
|
|
292
|
-
removeListeners
|
|
301
|
+
removeListeners();
|
|
293
302
|
}
|
|
294
303
|
await this.invalidateSchemaViewIfChanged();
|
|
295
304
|
}
|
|
296
|
-
|
|
297
|
-
* @param description The description for the changeset
|
|
298
|
-
* @returns the changesetId of the pushed changes
|
|
299
|
-
* @see [[BriefcaseTxns.onChangesPushed]] for the event dispatched after changes are pushed.
|
|
300
|
-
*/
|
|
301
|
-
async pushChanges(description) {
|
|
305
|
+
async pushChanges(description, options) {
|
|
302
306
|
this.requireTimeline();
|
|
303
|
-
|
|
307
|
+
const removeListeners = this.listenForChangesetDownloadProgress({
|
|
308
|
+
channel: (0, core_common_1.getPushChangesIpcChannel)(this.key),
|
|
309
|
+
cancel: async () => IpcApp_1.IpcApp.appFunctionIpc.cancelPushChangesRequest(this.key),
|
|
310
|
+
downloadProgressCallback: options?.downloadProgressCallback,
|
|
311
|
+
abortSignal: options?.abortSignal,
|
|
312
|
+
});
|
|
313
|
+
const ipcAppOptions = {
|
|
314
|
+
reportDownloadProgress: !!options?.downloadProgressCallback,
|
|
315
|
+
downloadProgressInterval: options?.downloadProgressInterval,
|
|
316
|
+
enableCancellation: !!options?.abortSignal,
|
|
317
|
+
};
|
|
318
|
+
try {
|
|
319
|
+
return this.changeset = await IpcApp_1.IpcApp.appFunctionIpc.pushChanges(this.key, description, ipcAppOptions);
|
|
320
|
+
}
|
|
321
|
+
finally {
|
|
322
|
+
removeListeners();
|
|
323
|
+
}
|
|
304
324
|
}
|
|
305
325
|
/** The current graphical editing scope, if one is in progress.
|
|
306
326
|
* @see [[enterEditingScope]] to begin graphical editing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BriefcaseConnection.js","sourceRoot":"","sources":["../../src/BriefcaseConnection.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAwI;AACxI,oDAG4B;AAC5B,mDAAgD;AAChD,mEAAgE;AAChE,2CAAwC;AACxC,yDAAsD;AACtD,qCAAkC;AAClC,8CAAqE;AACrE,yCAAsC;AA8CtC;;;GAGG;AACH,MAAM,kBAAkB;IACd,aAAa,CAAyB;IAC7B,UAAU,CAAsB;IAChC,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,cAAc,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC3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,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,WAAW,CAAC,WAAmB;QAC1C,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC,SAAS,GAAG,MAAM,eAAM,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IACzF,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,wBAAwB;QACnC,OAAO,eAAM,CAAC,cAAc,CAAC,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,iBAAiB;QAC5B,OAAO,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,CAAC;IACjD,CAAC;IAED;;OAEG;IACa,sBAAsB,GAAG,IAAI,sBAAO,EAA0C,CAAC;CAChG;AArMD,kDAqMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IModelConnection\r\n */\r\n\r\nimport { assert, BeEvent, CompressedId64Set, Guid, GuidString, Id64Set, Id64String, IModelStatus, OpenMode } from \"@itwin/core-bentley\";\r\nimport {\r\n BriefcaseConnectionProps, ChangesetIndex, ChangesetIndexAndId, getPullChangesIpcChannel, IModelError,\r\n PullChangesOptions as IpcAppPullChangesOptions, LockState, OpenBriefcaseProps, StandaloneOpenOptions,\r\n} from \"@itwin/core-common\";\r\nimport { BriefcaseTxns } from \"./BriefcaseTxns\";\r\nimport { GraphicalEditingScope } from \"./GraphicalEditingScope\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { IModelConnection } from \"./IModelConnection\";\r\nimport { IpcApp } from \"./IpcApp\";\r\nimport { disposeTileTreesForGeometricModels } from \"./tile/internal\";\r\nimport { Viewport } from \"./Viewport\";\r\n\r\n/**\r\n * Download progress information.\r\n * @public\r\n */\r\nexport interface DownloadProgressInfo {\r\n /** Bytes downloaded. */\r\n loaded: number;\r\n /** Total size of the download in bytes. */\r\n total: number;\r\n}\r\n\r\n/**\r\n * Called to show progress during a download.\r\n * @public\r\n */\r\nexport type OnDownloadProgress = (progress: DownloadProgressInfo) => void;\r\n\r\n/**\r\n * Partial interface of AbortSignal.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\r\n * @beta\r\n */\r\nexport interface GenericAbortSignal {\r\n /** Add Listener for abort signal. */\r\n addEventListener: (type: \"abort\", listener: (this: GenericAbortSignal, ev: any) => any) => void;\r\n /** Remove Listener for abort signal. */\r\n removeEventListener: (type: \"abort\", listener: (this: GenericAbortSignal, ev: any) => any) => void;\r\n}\r\n\r\n/**\r\n * Options for pulling iModel changes.\r\n * @public\r\n */\r\nexport interface PullChangesOptions {\r\n /** Function called regularly to report progress of changes download. */\r\n downloadProgressCallback?: OnDownloadProgress;\r\n /** Interval for calling progress callback (in milliseconds). */\r\n progressInterval?: number;\r\n /** Signal for cancelling the download.\r\n * @beta\r\n */\r\n abortSignal?: GenericAbortSignal;\r\n}\r\n\r\n/** Keeps track of changes to models, buffering them until synchronization points.\r\n * While a GraphicalEditingScope is open, the changes are buffered until the scope exits, at which point they are processed.\r\n * Otherwise, the buffered changes are processed after undo/redo, commit, or pull+merge changes.\r\n */\r\nclass ModelChangeMonitor {\r\n private _editingScope?: GraphicalEditingScope;\r\n private readonly _briefcase: BriefcaseConnection;\r\n private readonly _deletedModels = new Set<string>();\r\n private readonly _modelIdToGuid = new Map<string, string>();\r\n private readonly _removals: VoidFunction[] = [];\r\n\r\n public constructor(briefcase: BriefcaseConnection) {\r\n this._briefcase = briefcase;\r\n\r\n // Buffer updated geometry guids.\r\n this._removals.push(briefcase.txns.onModelGeometryChanged.addListener((changes) => {\r\n for (const change of changes) {\r\n this._deletedModels.delete(change.id);\r\n this._modelIdToGuid.set(change.id, change.guid);\r\n }\r\n }));\r\n\r\n // Buffer deletions of models.\r\n this._removals.push(briefcase.txns.onModelsChanged.addListener((changes) => {\r\n if (changes.deleted) {\r\n for (const id of CompressedId64Set.iterable(changes.deleted)) {\r\n this._modelIdToGuid.delete(id);\r\n this._deletedModels.add(id);\r\n }\r\n }\r\n }));\r\n\r\n // Outside of an editing scope, we want to update viewport contents after commit, undo/redo, or merging changes.\r\n const maybeProcess = async () => {\r\n if (this.editingScope)\r\n return;\r\n\r\n const modelIds = Array.from(this._modelIdToGuid.keys());\r\n if (modelIds.length > 0)\r\n await IModelApp.tileAdmin.purgeTileTrees(this._briefcase, modelIds);\r\n\r\n this.processBuffered();\r\n };\r\n\r\n this._removals.push(briefcase.txns.onCommitted.addListener(maybeProcess));\r\n this._removals.push(briefcase.txns.onReplayedExternalTxns.addListener(maybeProcess));\r\n this._removals.push(briefcase.txns.onAfterUndoRedo.addListener(maybeProcess));\r\n this._removals.push(briefcase.txns.onChangesPulled.addListener(maybeProcess));\r\n }\r\n\r\n public async close(): Promise<void> {\r\n for (const removal of this._removals)\r\n removal();\r\n\r\n this._removals.length = 0;\r\n\r\n if (this._editingScope) {\r\n await this._editingScope.exit();\r\n this._editingScope = undefined;\r\n }\r\n }\r\n\r\n public get editingScope(): GraphicalEditingScope | undefined {\r\n return this._editingScope;\r\n }\r\n\r\n public async enterEditingScope(): Promise<GraphicalEditingScope> {\r\n if (this._editingScope)\r\n throw new Error(\"Cannot create an editing scope for an iModel that already has one\");\r\n\r\n this._editingScope = await GraphicalEditingScope.enter(this._briefcase);\r\n\r\n const removeGeomListener = this._editingScope.onGeometryChanges.addListener((changes) => {\r\n const modelIds = [];\r\n for (const change of changes)\r\n modelIds.push(change.id);\r\n\r\n this.invalidateScenes(modelIds);\r\n });\r\n\r\n this._editingScope.onExited.addOnce((scope) => {\r\n assert(scope === this._editingScope);\r\n this._editingScope = undefined;\r\n removeGeomListener();\r\n this.processBuffered();\r\n });\r\n\r\n return this._editingScope;\r\n }\r\n\r\n private processBuffered(): void {\r\n const models = this._briefcase.models;\r\n for (const [id, guid] of this._modelIdToGuid) {\r\n const model = models.getLoaded(id)?.asGeometricModel;\r\n if (model)\r\n model.geometryGuid = guid;\r\n }\r\n\r\n const modelIds = new Set<string>(this._modelIdToGuid.keys());\r\n for (const deleted of this._deletedModels) {\r\n modelIds.add(deleted);\r\n models.unload(deleted);\r\n }\r\n\r\n this.invalidateScenes(modelIds);\r\n disposeTileTreesForGeometricModels(modelIds, this._briefcase);\r\n\r\n this._briefcase.onBufferedModelChanges.raiseEvent(modelIds);\r\n\r\n this._modelIdToGuid.clear();\r\n this._deletedModels.clear();\r\n }\r\n\r\n private invalidateScenes(changedModels: Iterable<Id64String>): void {\r\n for (const user of IModelApp.tileAdmin.tileUsers) {\r\n if (user instanceof Viewport && user.iModel === this._briefcase) {\r\n for (const modelId of changedModels) {\r\n if (user.view.viewsModel(modelId)) {\r\n user.invalidateScene();\r\n user.setFeatureOverrideProviderChanged();\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Provides access to lock information in the iModel.\r\n * @see [[BriefcaseConnection.locks]]\r\n * @alpha\r\n */\r\nexport interface LockService {\r\n /** Get all elements with exclusive locks owned by other briefcases. */\r\n getExclusiveForeignLocks(): Promise<Id64Set>;\r\n /** Get all elements with shared locks owned by other briefcases. */\r\n getSharedForeignLocks(): Promise<Id64Set>;\r\n /** Check whether it's possible to acquire a lock for the element. */\r\n checkElementLockAvailability(elementId: Id64String, lock: LockState): Promise<boolean>;\r\n}\r\n\r\n/** Function for creating a [[LockService]] for a [[BriefcaseConnection]].\r\n * @alpha\r\n */\r\nexport type LockServiceFactory = (iModel: BriefcaseConnection) => Promise<LockService>;\r\n\r\n/** Settings that can be used to control the behavior of [[Tool]]s that modify a [[BriefcaseConnection]].\r\n * For example, tools that want to create new elements can consult the briefcase's editor tool settings to\r\n * determine into which model and category to insert the elements.\r\n * Specialized tools are free to ignore these settings.\r\n * @see [[BriefcaseConnection.editorToolSettings]] to query or modify the current settings for a briefcase.\r\n * @see [CreateElementTool]($editor-frontend) for an example of a tool that uses these settings.\r\n * @beta\r\n */\r\nexport class BriefcaseEditorToolSettings {\r\n private _category?: Id64String;\r\n private _model?: Id64String;\r\n\r\n /** An event raised just after the default [[category]] is changed. */\r\n public readonly onCategoryChanged = new BeEvent<(previousCategory: Id64String | undefined) => void>();\r\n\r\n /** An event raised just after the default [[model]] is changed. */\r\n public readonly onModelChanged = new BeEvent<(previousModel: Id64String | undefined) => void>();\r\n\r\n /** The [Category]($backend) into which new elements should be inserted by default.\r\n * Specialized tools are free to ignore this setting and instead use their own logic to select an appropriate category.\r\n * @see [[onCategoryChanged]] to be notified when this property is modified.\r\n * @see [CreateElementTool.targetCategory]($editor-frontend) for an example of a tool that uses this setting.\r\n */\r\n public get category(): Id64String | undefined {\r\n return this._category;\r\n }\r\n public set category(category: Id64String | undefined) {\r\n const previousCategory = this.category;\r\n if (category !== this.category) {\r\n this._category = category;\r\n this.onCategoryChanged.raiseEvent(previousCategory);\r\n }\r\n }\r\n\r\n /** The [Model]($backend) into which new elements should be inserted by default.\r\n * Specialized tools are free to ignore this setting and instead use their own logic to select an appropriate model.\r\n * @see [[onModelChanged]] to be notified when this property is modified.\r\n * @see [CreateElementTool.targetModelId]($editor-frontend) for an example of a tool that uses this setting.\r\n */\r\n public get model(): Id64String | undefined {\r\n return this._model;\r\n }\r\n public set model(model: Id64String | undefined) {\r\n const previousModel = this.model;\r\n if (model !== this.model) {\r\n this._model = model;\r\n this.onModelChanged.raiseEvent(previousModel);\r\n }\r\n }\r\n}\r\n\r\n/** A connection to an editable briefcase on the backend. This class uses [Ipc]($docs/learning/IpcInterface.md) to communicate\r\n * to the backend and may only be used by [[IpcApp]]s.\r\n * @public\r\n */\r\nexport class BriefcaseConnection extends IModelConnection {\r\n protected _isClosed?: boolean;\r\n private readonly _modelsMonitor: ModelChangeMonitor;\r\n private _locks?: LockService;\r\n\r\n /** The ID of the briefcase.\r\n * @beta\r\n */\r\n public readonly briefcaseId?: number;\r\n\r\n /** Default settings that can be used to control the behavior of [[Tool]]s that modify this briefcase.\r\n * @beta\r\n */\r\n public readonly editorToolSettings = new BriefcaseEditorToolSettings();\r\n\r\n /** Manages local changes to the briefcase via [Txns]($docs/learning/InteractiveEditing.md). */\r\n public readonly txns: BriefcaseTxns;\r\n\r\n /** Information about locks held on this iModel.\r\n * @note This is intended to be used by tools and other UI elements, to provide information about the current lock state. Implementations are expected to cache lock information and so may not reflect changes to locks immediately.\r\n * @alpha\r\n */\r\n public get locks(): LockService | undefined { return this._locks; }\r\n\r\n public override isBriefcaseConnection(): this is BriefcaseConnection { return true; }\r\n\r\n /** The Guid that identifies the iTwin that owns this iModel. */\r\n public override get iTwinId(): GuidString { return super.iTwinId ?? Guid.empty; } // GuidString | undefined for IModelConnection, but required for BriefcaseConnection\r\n\r\n /** The Guid that identifies this iModel. */\r\n public override get iModelId(): GuidString { return super.iModelId ?? Guid.empty; } // GuidString | undefined for IModelConnection, but required for BriefcaseConnection\r\n\r\n protected constructor(props: BriefcaseConnectionProps, openMode: OpenMode) {\r\n super(props);\r\n this._openMode = openMode;\r\n this.briefcaseId = props.briefcaseId;\r\n this.txns = new BriefcaseTxns(this);\r\n this._modelsMonitor = new ModelChangeMonitor(this);\r\n if (OpenMode.ReadWrite === this._openMode)\r\n this.txns.onAfterUndoRedo.addListener(async () => { await IModelApp.toolAdmin.restartPrimitiveTool(); });\r\n\r\n this.categories.cache.attachToBriefcase(this);\r\n }\r\n\r\n /** Open a BriefcaseConnection to a [BriefcaseDb]($backend). */\r\n public static async openFile(briefcaseProps: OpenBriefcaseProps): Promise<BriefcaseConnection>;\r\n\r\n /** Open a BriefcaseConnection to a [BriefcaseDb]($backend).\r\n * @alpha\r\n */\r\n public static async openFile(briefcaseProps: OpenBriefcaseProps, lockServiceFactory?: LockServiceFactory): Promise<BriefcaseConnection>\r\n\r\n public static async openFile(briefcaseProps: OpenBriefcaseProps, lockServiceFactory?: LockServiceFactory): Promise<BriefcaseConnection> {\r\n const iModelProps = await IpcApp.appFunctionIpc.openBriefcase(briefcaseProps);\r\n const connection = new this({ ...briefcaseProps, ...iModelProps }, briefcaseProps.readonly ? OpenMode.Readonly : OpenMode.ReadWrite);\r\n if (lockServiceFactory)\r\n connection._locks = await lockServiceFactory(connection);\r\n\r\n IModelConnection.onOpen.raiseEvent(connection);\r\n return connection;\r\n }\r\n\r\n /** Open a BriefcaseConnection to a [StandaloneDb]($backend)\r\n * @note StandaloneDbs, by definition, may not push or pull changes. Attempting to do so will throw exceptions.\r\n */\r\n public static async openStandalone(filePath: string, openMode: OpenMode = OpenMode.ReadWrite, opts?: StandaloneOpenOptions): Promise<BriefcaseConnection> {\r\n const openResponse = await IpcApp.appFunctionIpc.openStandalone(filePath, openMode, opts);\r\n const connection = new this(openResponse, openMode);\r\n IModelConnection.onOpen.raiseEvent(connection);\r\n return connection;\r\n }\r\n\r\n /** Returns `true` if [[close]] has already been called. */\r\n public get isClosed(): boolean { return this._isClosed === true; }\r\n\r\n /**\r\n * Close this BriefcaseConnection.\r\n * @note make sure to call [[saveChanges]] before calling this method. Unsaved local changes are abandoned.\r\n */\r\n public async close(): Promise<void> {\r\n if (this.isClosed)\r\n return;\r\n\r\n await this._modelsMonitor.close();\r\n\r\n this.beforeClose();\r\n this.txns[Symbol.dispose]();\r\n\r\n this._isClosed = true;\r\n await IpcApp.appFunctionIpc.closeIModel(this._fileKey);\r\n }\r\n\r\n protected requireTimeline() {\r\n if (this.iTwinId === Guid.empty)\r\n throw new IModelError(IModelStatus.WrongIModel, \"iModel has no timeline\");\r\n }\r\n\r\n /** Query if there are any pending Txns in this briefcase that are waiting to be pushed. */\r\n public async hasPendingTxns(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\r\n return this.txns.hasPendingTxns();\r\n }\r\n\r\n /** Commit pending changes to this briefcase.\r\n * @param description Optional description of the changes.\r\n * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use methods on EditCommand instead.\r\n */\r\n public async saveChanges(description?: string): Promise<void> {\r\n await IpcApp.appFunctionIpc.saveChanges(this.key, description); // eslint-disable-line @typescript-eslint/no-deprecated\r\n }\r\n\r\n /** Abandon pending changes to this briefcase.\r\n * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use methods on EditCommand instead.\r\n */\r\n public async abandonChanges(): Promise<void> {\r\n await IpcApp.appFunctionIpc.abandonChanges(this.key); // eslint-disable-line @typescript-eslint/no-deprecated\r\n }\r\n\r\n /** Pull (and potentially merge if there are local changes) up to a specified changeset from iModelHub into this briefcase\r\n * @param toIndex The changeset index to pull changes to. If `undefined`, pull all changes.\r\n * @param options Options for pulling changes.\r\n * @see [[BriefcaseTxns.onChangesPulled]] for the event dispatched after changes are pulled.\r\n */\r\n public async pullChanges(toIndex?: ChangesetIndex, options?: PullChangesOptions): Promise<void> {\r\n const removeListeners: VoidFunction[] = [];\r\n const shouldReportProgress = !!options?.downloadProgressCallback;\r\n\r\n if (shouldReportProgress) {\r\n const handleProgress = (_evt: Event, data: { loaded: number, total: number }) => {\r\n options?.downloadProgressCallback?.(data);\r\n };\r\n\r\n const removeProgressListener = IpcApp.addListener(\r\n getPullChangesIpcChannel(this.iModelId),\r\n handleProgress,\r\n );\r\n removeListeners.push(removeProgressListener);\r\n }\r\n\r\n if (options?.abortSignal) {\r\n const abort = () => void IpcApp.appFunctionIpc.cancelPullChangesRequest(this.key);\r\n options?.abortSignal.addEventListener(\"abort\", abort);\r\n removeListeners.push(() => options?.abortSignal?.removeEventListener(\"abort\", abort));\r\n }\r\n\r\n this.requireTimeline();\r\n const ipcAppOptions: IpcAppPullChangesOptions = {\r\n reportProgress: shouldReportProgress,\r\n progressInterval: options?.progressInterval,\r\n enableCancellation: !!options?.abortSignal,\r\n };\r\n try {\r\n this.changeset = await IpcApp.appFunctionIpc.pullChanges(this.key, toIndex, ipcAppOptions);\r\n } finally {\r\n removeListeners.forEach((remove) => remove());\r\n }\r\n await this.invalidateSchemaViewIfChanged();\r\n }\r\n\r\n /** Create a changeset from local Txns and push to iModelHub. On success, clear Txn table.\r\n * @param description The description for the changeset\r\n * @returns the changesetId of the pushed changes\r\n * @see [[BriefcaseTxns.onChangesPushed]] for the event dispatched after changes are pushed.\r\n */\r\n public async pushChanges(description: string): Promise<ChangesetIndexAndId> {\r\n this.requireTimeline();\r\n return this.changeset = await IpcApp.appFunctionIpc.pushChanges(this.key, description);\r\n }\r\n\r\n /** The current graphical editing scope, if one is in progress.\r\n * @see [[enterEditingScope]] to begin graphical editing.\r\n */\r\n public get editingScope(): GraphicalEditingScope | undefined {\r\n return this._modelsMonitor.editingScope;\r\n }\r\n\r\n /** Return whether graphical editing is supported for this briefcase. It is not supported if the briefcase is read-only, or the briefcase contains a version of\r\n * the BisCore ECSchema older than v0.1.11.\r\n * @see [[enterEditingScope]] to enable graphical editing.\r\n */\r\n public async supportsGraphicalEditing(): Promise<boolean> {\r\n return IpcApp.appFunctionIpc.isGraphicalEditingSupported(this.key);\r\n }\r\n\r\n /** Begin a new graphical editing scope.\r\n * @throws Error if an editing scope already exists or one could not be created.\r\n * @see [[GraphicalEditingScope.exit]] to exit the scope.\r\n * @see [[supportsGraphicalEditing]] to determine whether this method should be expected to succeed.\r\n * @see [[editingScope]] to obtain the current editing scope, if one is in progress.\r\n */\r\n public async enterEditingScope(): Promise<GraphicalEditingScope> {\r\n return this._modelsMonitor.enterEditingScope();\r\n }\r\n\r\n /** Strictly for tests - dispatched from ModelChangeMonitor.processBuffered.\r\n * @internal\r\n */\r\n public readonly onBufferedModelChanges = new BeEvent<(changedModelIds: Set<string>) => void>();\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"BriefcaseConnection.js","sourceRoot":"","sources":["../../src/BriefcaseConnection.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAE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C,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;QACxG,CAAC;gBAAS,CAAC;YACT,eAAe,EAAE,CAAC;QACpB,CAAC;IACH,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,wBAAwB;QACnC,OAAO,eAAM,CAAC,cAAc,CAAC,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,iBAAiB;QAC5B,OAAO,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,CAAC;IACjD,CAAC;IAED;;OAEG;IACa,sBAAsB,GAAG,IAAI,sBAAO,EAA0C,CAAC;CAChG;AAjPD,kDAiPC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IModelConnection\r\n */\r\n\r\nimport { assert, BeEvent, CompressedId64Set, Guid, GuidString, Id64Set, Id64String, IModelStatus, OpenMode } from \"@itwin/core-bentley\";\r\nimport {\r\n BriefcaseConnectionProps, ChangesetIndex, ChangesetIndexAndId, getPullChangesIpcChannel, getPushChangesIpcChannel, IModelError,\r\n PullChangesOptions as IpcAppPullChangesOptions, PushChangesOptions as IpcAppPushChangesOptions, LockState, OpenBriefcaseProps, StandaloneOpenOptions,\r\n} from \"@itwin/core-common\";\r\nimport { BriefcaseTxns } from \"./BriefcaseTxns\";\r\nimport { GraphicalEditingScope } from \"./GraphicalEditingScope\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { IModelConnection } from \"./IModelConnection\";\r\nimport { IpcApp } from \"./IpcApp\";\r\nimport { disposeTileTreesForGeometricModels } from \"./tile/internal\";\r\nimport { Viewport } from \"./Viewport\";\r\n\r\n/**\r\n * Download progress information.\r\n * @public\r\n */\r\nexport interface DownloadProgressInfo {\r\n /** Bytes downloaded. */\r\n loaded: number;\r\n /** Total size of the download in bytes. */\r\n total: number;\r\n}\r\n\r\n/**\r\n * Called to show progress during a download.\r\n * @public\r\n */\r\nexport type OnDownloadProgress = (progress: DownloadProgressInfo) => void;\r\n\r\n/**\r\n * Partial interface of AbortSignal.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\r\n * @beta\r\n */\r\nexport interface GenericAbortSignal {\r\n /** Add Listener for abort signal. */\r\n addEventListener: (type: \"abort\", listener: (this: GenericAbortSignal, ev: any) => any) => void;\r\n /** Remove Listener for abort signal. */\r\n removeEventListener: (type: \"abort\", listener: (this: GenericAbortSignal, ev: any) => any) => void;\r\n}\r\n\r\n/**\r\n * Options for pulling iModel changes.\r\n * @public\r\n */\r\nexport interface PullChangesOptions {\r\n /** Function called regularly to report progress of changes download. */\r\n downloadProgressCallback?: OnDownloadProgress;\r\n /** Interval for calling progress callback (in milliseconds). */\r\n progressInterval?: number;\r\n /** Signal for cancelling the download.\r\n * @beta\r\n */\r\n abortSignal?: GenericAbortSignal;\r\n}\r\n\r\n/**\r\n * Options for pushing iModel changes.\r\n * @beta\r\n */\r\nexport interface PushChangesOptions {\r\n /** Function called regularly to report progress of the download of the changes that must be merged before pushing. */\r\n downloadProgressCallback?: OnDownloadProgress;\r\n /** Interval for calling [[downloadProgressCallback]] (in milliseconds). */\r\n downloadProgressInterval?: number;\r\n /** Signal for cancelling the push.\r\n * @note Currently this only cancels the download of the changes that must be merged before pushing - it has no effect once the local\r\n * changeset is being uploaded.\r\n */\r\n abortSignal?: GenericAbortSignal;\r\n}\r\n\r\n/** Keeps track of changes to models, buffering them until synchronization points.\r\n * While a GraphicalEditingScope is open, the changes are buffered until the scope exits, at which point they are processed.\r\n * Otherwise, the buffered changes are processed after undo/redo, commit, or pull+merge changes.\r\n */\r\nclass ModelChangeMonitor {\r\n private _editingScope?: GraphicalEditingScope;\r\n private readonly _briefcase: BriefcaseConnection;\r\n private readonly _deletedModels = new Set<string>();\r\n private readonly _modelIdToGuid = new Map<string, string>();\r\n private readonly _removals: VoidFunction[] = [];\r\n\r\n public constructor(briefcase: BriefcaseConnection) {\r\n this._briefcase = briefcase;\r\n\r\n // Buffer updated geometry guids.\r\n this._removals.push(briefcase.txns.onModelGeometryChanged.addListener((changes) => {\r\n for (const change of changes) {\r\n this._deletedModels.delete(change.id);\r\n this._modelIdToGuid.set(change.id, change.guid);\r\n }\r\n }));\r\n\r\n // Buffer deletions of models.\r\n this._removals.push(briefcase.txns.onModelsChanged.addListener((changes) => {\r\n if (changes.deleted) {\r\n for (const id of CompressedId64Set.iterable(changes.deleted)) {\r\n this._modelIdToGuid.delete(id);\r\n this._deletedModels.add(id);\r\n }\r\n }\r\n }));\r\n\r\n // Outside of an editing scope, we want to update viewport contents after commit, undo/redo, or merging changes.\r\n const maybeProcess = async () => {\r\n if (this.editingScope)\r\n return;\r\n\r\n const modelIds = Array.from(this._modelIdToGuid.keys());\r\n if (modelIds.length > 0)\r\n await IModelApp.tileAdmin.purgeTileTrees(this._briefcase, modelIds);\r\n\r\n this.processBuffered();\r\n };\r\n\r\n this._removals.push(briefcase.txns.onCommitted.addListener(maybeProcess));\r\n this._removals.push(briefcase.txns.onReplayedExternalTxns.addListener(maybeProcess));\r\n this._removals.push(briefcase.txns.onAfterUndoRedo.addListener(maybeProcess));\r\n this._removals.push(briefcase.txns.onChangesPulled.addListener(maybeProcess));\r\n }\r\n\r\n public async close(): Promise<void> {\r\n for (const removal of this._removals)\r\n removal();\r\n\r\n this._removals.length = 0;\r\n\r\n if (this._editingScope) {\r\n await this._editingScope.exit();\r\n this._editingScope = undefined;\r\n }\r\n }\r\n\r\n public get editingScope(): GraphicalEditingScope | undefined {\r\n return this._editingScope;\r\n }\r\n\r\n public async enterEditingScope(): Promise<GraphicalEditingScope> {\r\n if (this._editingScope)\r\n throw new Error(\"Cannot create an editing scope for an iModel that already has one\");\r\n\r\n this._editingScope = await GraphicalEditingScope.enter(this._briefcase);\r\n\r\n const removeGeomListener = this._editingScope.onGeometryChanges.addListener((changes) => {\r\n const modelIds = [];\r\n for (const change of changes)\r\n modelIds.push(change.id);\r\n\r\n this.invalidateScenes(modelIds);\r\n });\r\n\r\n this._editingScope.onExited.addOnce((scope) => {\r\n assert(scope === this._editingScope);\r\n this._editingScope = undefined;\r\n removeGeomListener();\r\n this.processBuffered();\r\n });\r\n\r\n return this._editingScope;\r\n }\r\n\r\n private processBuffered(): void {\r\n const models = this._briefcase.models;\r\n for (const [id, guid] of this._modelIdToGuid) {\r\n const model = models.getLoaded(id)?.asGeometricModel;\r\n if (model)\r\n model.geometryGuid = guid;\r\n }\r\n\r\n const modelIds = new Set<string>(this._modelIdToGuid.keys());\r\n for (const deleted of this._deletedModels) {\r\n modelIds.add(deleted);\r\n models.unload(deleted);\r\n }\r\n\r\n this.invalidateScenes(modelIds);\r\n disposeTileTreesForGeometricModels(modelIds, this._briefcase);\r\n\r\n this._briefcase.onBufferedModelChanges.raiseEvent(modelIds);\r\n\r\n this._modelIdToGuid.clear();\r\n this._deletedModels.clear();\r\n }\r\n\r\n private invalidateScenes(changedModels: Iterable<Id64String>): void {\r\n for (const user of IModelApp.tileAdmin.tileUsers) {\r\n if (user instanceof Viewport && user.iModel === this._briefcase) {\r\n for (const modelId of changedModels) {\r\n if (user.view.viewsModel(modelId)) {\r\n user.invalidateScene();\r\n user.setFeatureOverrideProviderChanged();\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Provides access to lock information in the iModel.\r\n * @see [[BriefcaseConnection.locks]]\r\n * @alpha\r\n */\r\nexport interface LockService {\r\n /** Get all elements with exclusive locks owned by other briefcases. */\r\n getExclusiveForeignLocks(): Promise<Id64Set>;\r\n /** Get all elements with shared locks owned by other briefcases. */\r\n getSharedForeignLocks(): Promise<Id64Set>;\r\n /** Check whether it's possible to acquire a lock for the element. */\r\n checkElementLockAvailability(elementId: Id64String, lock: LockState): Promise<boolean>;\r\n}\r\n\r\n/** Function for creating a [[LockService]] for a [[BriefcaseConnection]].\r\n * @alpha\r\n */\r\nexport type LockServiceFactory = (iModel: BriefcaseConnection) => Promise<LockService>;\r\n\r\n/** Settings that can be used to control the behavior of [[Tool]]s that modify a [[BriefcaseConnection]].\r\n * For example, tools that want to create new elements can consult the briefcase's editor tool settings to\r\n * determine into which model and category to insert the elements.\r\n * Specialized tools are free to ignore these settings.\r\n * @see [[BriefcaseConnection.editorToolSettings]] to query or modify the current settings for a briefcase.\r\n * @see [CreateElementTool]($editor-frontend) for an example of a tool that uses these settings.\r\n * @beta\r\n */\r\nexport class BriefcaseEditorToolSettings {\r\n private _category?: Id64String;\r\n private _model?: Id64String;\r\n\r\n /** An event raised just after the default [[category]] is changed. */\r\n public readonly onCategoryChanged = new BeEvent<(previousCategory: Id64String | undefined) => void>();\r\n\r\n /** An event raised just after the default [[model]] is changed. */\r\n public readonly onModelChanged = new BeEvent<(previousModel: Id64String | undefined) => void>();\r\n\r\n /** The [Category]($backend) into which new elements should be inserted by default.\r\n * Specialized tools are free to ignore this setting and instead use their own logic to select an appropriate category.\r\n * @see [[onCategoryChanged]] to be notified when this property is modified.\r\n * @see [CreateElementTool.targetCategory]($editor-frontend) for an example of a tool that uses this setting.\r\n */\r\n public get category(): Id64String | undefined {\r\n return this._category;\r\n }\r\n public set category(category: Id64String | undefined) {\r\n const previousCategory = this.category;\r\n if (category !== this.category) {\r\n this._category = category;\r\n this.onCategoryChanged.raiseEvent(previousCategory);\r\n }\r\n }\r\n\r\n /** The [Model]($backend) into which new elements should be inserted by default.\r\n * Specialized tools are free to ignore this setting and instead use their own logic to select an appropriate model.\r\n * @see [[onModelChanged]] to be notified when this property is modified.\r\n * @see [CreateElementTool.targetModelId]($editor-frontend) for an example of a tool that uses this setting.\r\n */\r\n public get model(): Id64String | undefined {\r\n return this._model;\r\n }\r\n public set model(model: Id64String | undefined) {\r\n const previousModel = this.model;\r\n if (model !== this.model) {\r\n this._model = model;\r\n this.onModelChanged.raiseEvent(previousModel);\r\n }\r\n }\r\n}\r\n\r\n/** A connection to an editable briefcase on the backend. This class uses [Ipc]($docs/learning/IpcInterface.md) to communicate\r\n * to the backend and may only be used by [[IpcApp]]s.\r\n * @public\r\n */\r\nexport class BriefcaseConnection extends IModelConnection {\r\n protected _isClosed?: boolean;\r\n private readonly _modelsMonitor: ModelChangeMonitor;\r\n private _locks?: LockService;\r\n\r\n /** The ID of the briefcase.\r\n * @beta\r\n */\r\n public readonly briefcaseId?: number;\r\n\r\n /** Default settings that can be used to control the behavior of [[Tool]]s that modify this briefcase.\r\n * @beta\r\n */\r\n public readonly editorToolSettings = new BriefcaseEditorToolSettings();\r\n\r\n /** Manages local changes to the briefcase via [Txns]($docs/learning/InteractiveEditing.md). */\r\n public readonly txns: BriefcaseTxns;\r\n\r\n /** Information about locks held on this iModel.\r\n * @note This is intended to be used by tools and other UI elements, to provide information about the current lock state. Implementations are expected to cache lock information and so may not reflect changes to locks immediately.\r\n * @alpha\r\n */\r\n public get locks(): LockService | undefined { return this._locks; }\r\n\r\n public override isBriefcaseConnection(): this is BriefcaseConnection { return true; }\r\n\r\n /** The Guid that identifies the iTwin that owns this iModel. */\r\n public override get iTwinId(): GuidString { return super.iTwinId ?? Guid.empty; } // GuidString | undefined for IModelConnection, but required for BriefcaseConnection\r\n\r\n /** The Guid that identifies this iModel. */\r\n public override get iModelId(): GuidString { return super.iModelId ?? Guid.empty; } // GuidString | undefined for IModelConnection, but required for BriefcaseConnection\r\n\r\n protected constructor(props: BriefcaseConnectionProps, openMode: OpenMode) {\r\n super(props);\r\n this._openMode = openMode;\r\n this.briefcaseId = props.briefcaseId;\r\n this.txns = new BriefcaseTxns(this);\r\n this._modelsMonitor = new ModelChangeMonitor(this);\r\n if (OpenMode.ReadWrite === this._openMode)\r\n this.txns.onAfterUndoRedo.addListener(async () => { await IModelApp.toolAdmin.restartPrimitiveTool(); });\r\n\r\n this.categories.cache.attachToBriefcase(this);\r\n }\r\n\r\n /** Open a BriefcaseConnection to a [BriefcaseDb]($backend). */\r\n public static async openFile(briefcaseProps: OpenBriefcaseProps): Promise<BriefcaseConnection>;\r\n\r\n /** Open a BriefcaseConnection to a [BriefcaseDb]($backend).\r\n * @alpha\r\n */\r\n public static async openFile(briefcaseProps: OpenBriefcaseProps, lockServiceFactory?: LockServiceFactory): Promise<BriefcaseConnection>\r\n\r\n public static async openFile(briefcaseProps: OpenBriefcaseProps, lockServiceFactory?: LockServiceFactory): Promise<BriefcaseConnection> {\r\n const iModelProps = await IpcApp.appFunctionIpc.openBriefcase(briefcaseProps);\r\n const connection = new this({ ...briefcaseProps, ...iModelProps }, briefcaseProps.readonly ? OpenMode.Readonly : OpenMode.ReadWrite);\r\n if (lockServiceFactory)\r\n connection._locks = await lockServiceFactory(connection);\r\n\r\n IModelConnection.onOpen.raiseEvent(connection);\r\n return connection;\r\n }\r\n\r\n /** Open a BriefcaseConnection to a [StandaloneDb]($backend)\r\n * @note StandaloneDbs, by definition, may not push or pull changes. Attempting to do so will throw exceptions.\r\n */\r\n public static async openStandalone(filePath: string, openMode: OpenMode = OpenMode.ReadWrite, opts?: StandaloneOpenOptions): Promise<BriefcaseConnection> {\r\n const openResponse = await IpcApp.appFunctionIpc.openStandalone(filePath, openMode, opts);\r\n const connection = new this(openResponse, openMode);\r\n IModelConnection.onOpen.raiseEvent(connection);\r\n return connection;\r\n }\r\n\r\n /** Returns `true` if [[close]] has already been called. */\r\n public get isClosed(): boolean { return this._isClosed === true; }\r\n\r\n /**\r\n * Close this BriefcaseConnection.\r\n * @note make sure to call [[saveChanges]] before calling this method. Unsaved local changes are abandoned.\r\n */\r\n public async close(): Promise<void> {\r\n if (this.isClosed)\r\n return;\r\n\r\n await this._modelsMonitor.close();\r\n\r\n this.beforeClose();\r\n this.txns[Symbol.dispose]();\r\n\r\n this._isClosed = true;\r\n await IpcApp.appFunctionIpc.closeIModel(this._fileKey);\r\n }\r\n\r\n protected requireTimeline() {\r\n if (this.iTwinId === Guid.empty)\r\n throw new IModelError(IModelStatus.WrongIModel, \"iModel has no timeline\");\r\n }\r\n\r\n /** Query if there are any pending Txns in this briefcase that are waiting to be pushed. */\r\n public async hasPendingTxns(): Promise<boolean> { // eslint-disable-line @itwin/prefer-get\r\n return this.txns.hasPendingTxns();\r\n }\r\n\r\n /** Commit pending changes to this briefcase.\r\n * @param description Optional description of the changes.\r\n * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use methods on EditCommand instead.\r\n */\r\n public async saveChanges(description?: string): Promise<void> {\r\n await IpcApp.appFunctionIpc.saveChanges(this.key, description); // eslint-disable-line @typescript-eslint/no-deprecated\r\n }\r\n\r\n /** Abandon pending changes to this briefcase.\r\n * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use methods on EditCommand instead.\r\n */\r\n public async abandonChanges(): Promise<void> {\r\n await IpcApp.appFunctionIpc.abandonChanges(this.key); // eslint-disable-line @typescript-eslint/no-deprecated\r\n }\r\n\r\n /** Subscribes to changeset download progress events on `channel` and wires `abortSignal` to `cancel`.\r\n * @returns a function that removes every listener that was added.\r\n */\r\n private listenForChangesetDownloadProgress(args: {\r\n channel: string,\r\n cancel: () => Promise<void>,\r\n downloadProgressCallback?: OnDownloadProgress,\r\n abortSignal?: GenericAbortSignal,\r\n }): VoidFunction {\r\n const { channel, cancel, downloadProgressCallback, abortSignal } = args;\r\n const removeListeners: VoidFunction[] = [];\r\n\r\n if (downloadProgressCallback) {\r\n const handleProgress = (_evt: Event, data: DownloadProgressInfo) => downloadProgressCallback(data);\r\n removeListeners.push(IpcApp.addListener(channel, handleProgress));\r\n }\r\n\r\n if (abortSignal) {\r\n const abort = () => void cancel();\r\n abortSignal.addEventListener(\"abort\", abort);\r\n removeListeners.push(() => abortSignal.removeEventListener(\"abort\", abort));\r\n }\r\n\r\n return () => removeListeners.forEach((remove) => remove());\r\n }\r\n\r\n /** Pull (and potentially merge if there are local changes) up to a specified changeset from iModelHub into this briefcase\r\n * @param toIndex The changeset index to pull changes to. If `undefined`, pull all changes.\r\n * @param options Options for pulling changes.\r\n * @see [[BriefcaseTxns.onChangesPulled]] for the event dispatched after changes are pulled.\r\n */\r\n public async pullChanges(toIndex?: ChangesetIndex, options?: PullChangesOptions): Promise<void> {\r\n this.requireTimeline();\r\n\r\n const removeListeners = this.listenForChangesetDownloadProgress({\r\n channel: getPullChangesIpcChannel(this.key),\r\n cancel: async () => IpcApp.appFunctionIpc.cancelPullChangesRequest(this.key),\r\n downloadProgressCallback: options?.downloadProgressCallback,\r\n abortSignal: options?.abortSignal,\r\n });\r\n\r\n const ipcAppOptions: IpcAppPullChangesOptions = {\r\n reportProgress: !!options?.downloadProgressCallback,\r\n progressInterval: options?.progressInterval,\r\n enableCancellation: !!options?.abortSignal,\r\n };\r\n try {\r\n this.changeset = await IpcApp.appFunctionIpc.pullChanges(this.key, toIndex, ipcAppOptions);\r\n } finally {\r\n removeListeners();\r\n }\r\n await this.invalidateSchemaViewIfChanged();\r\n }\r\n\r\n /** Create a changeset from local Txns and push to iModelHub. On success, clear Txn table.\r\n * @param description The description for the changeset\r\n * @returns the changesetId of the pushed changes\r\n * @note Any changes made by other users are first pulled, applied, and merged with the local Txns. Only then is the resulting changeset\r\n * uploaded.\r\n * @see [[BriefcaseTxns.onChangesPushed]] for the event dispatched after changes are pushed.\r\n * @public\r\n */\r\n public pushChanges(description: string): Promise<ChangesetIndexAndId>;\r\n /** Create a changeset from local Txns and push to iModelHub. On success, clear Txn table.\r\n * @param description The description for the changeset\r\n * @param options Options reporting the progress of - and optionally cancelling - the download of the changes that are pulled before pushing.\r\n * @returns the changesetId of the pushed changes\r\n * @note Any changes made by other users are first pulled, applied, and merged with the local Txns. Only then is the resulting changeset\r\n * uploaded.\r\n * @see [[BriefcaseTxns.onChangesPushed]] for the event dispatched after changes are pushed.\r\n * @beta\r\n */\r\n public pushChanges(description: string, options?: PushChangesOptions): Promise<ChangesetIndexAndId>;\r\n public async pushChanges(description: string, options?: PushChangesOptions): Promise<ChangesetIndexAndId> {\r\n this.requireTimeline();\r\n\r\n const removeListeners = this.listenForChangesetDownloadProgress({\r\n channel: getPushChangesIpcChannel(this.key),\r\n cancel: async () => IpcApp.appFunctionIpc.cancelPushChangesRequest(this.key),\r\n downloadProgressCallback: options?.downloadProgressCallback,\r\n abortSignal: options?.abortSignal,\r\n });\r\n\r\n const ipcAppOptions: IpcAppPushChangesOptions = {\r\n reportDownloadProgress: !!options?.downloadProgressCallback,\r\n downloadProgressInterval: options?.downloadProgressInterval,\r\n enableCancellation: !!options?.abortSignal,\r\n };\r\n try {\r\n return this.changeset = await IpcApp.appFunctionIpc.pushChanges(this.key, description, ipcAppOptions);\r\n } finally {\r\n removeListeners();\r\n }\r\n }\r\n\r\n /** The current graphical editing scope, if one is in progress.\r\n * @see [[enterEditingScope]] to begin graphical editing.\r\n */\r\n public get editingScope(): GraphicalEditingScope | undefined {\r\n return this._modelsMonitor.editingScope;\r\n }\r\n\r\n /** Return whether graphical editing is supported for this briefcase. It is not supported if the briefcase is read-only, or the briefcase contains a version of\r\n * the BisCore ECSchema older than v0.1.11.\r\n * @see [[enterEditingScope]] to enable graphical editing.\r\n */\r\n public async supportsGraphicalEditing(): Promise<boolean> {\r\n return IpcApp.appFunctionIpc.isGraphicalEditingSupported(this.key);\r\n }\r\n\r\n /** Begin a new graphical editing scope.\r\n * @throws Error if an editing scope already exists or one could not be created.\r\n * @see [[GraphicalEditingScope.exit]] to exit the scope.\r\n * @see [[supportsGraphicalEditing]] to determine whether this method should be expected to succeed.\r\n * @see [[editingScope]] to obtain the current editing scope, if one is in progress.\r\n */\r\n public async enterEditingScope(): Promise<GraphicalEditingScope> {\r\n return this._modelsMonitor.enterEditingScope();\r\n }\r\n\r\n /** Strictly for tests - dispatched from ModelChangeMonitor.processBuffered.\r\n * @internal\r\n */\r\n public readonly onBufferedModelChanges = new BeEvent<(changedModelIds: Set<string>) => void>();\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TentativePoint.d.ts","sourceRoot":"","sources":["../../src/TentativePoint.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"TentativePoint.d.ts","sourceRoot":"","sources":["../../src/TentativePoint.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAa,UAAU,EAAsB,MAAM,aAAa,CAAC;AAE5F,OAAO,EAAY,aAAa,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAG5C;;;GAGG;AACH,qBAAa,cAAc;IAClB,QAAQ,UAAS;IACjB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC,OAAO,KAAK,kBAAkB,GAA2B;IACzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IACjD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0B;IACpD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0B;IACrD,OAAO,CAAC,iBAAiB,CAAC,CAAkC;IACrD,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B,aAAa;IACb,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;IAE3C,yFAAyF;IACzF,IAAW,SAAS,IAAI,OAAO,CAAwC;IAEvE,gFAAgF;IACzE,WAAW,IAAI,UAAU,GAAG,SAAS;IAErC,QAAQ,IAAI,OAAO;IAKnB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAM9B,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAW7B,eAAe,IAAI,IAAI;IAYvB,WAAW,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI;IAMvC,aAAa,IAAI,IAAI;IAUrB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,UAAU,GAAG,SAAS;IAS5D,aAAa,CAAC,EAAE,EAAE,aAAa,GAAG,IAAI;IAoBtC,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;YAqCjC,OAAO;IA0CrB,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAE5B,OAAO,CAAC,EAAE,EAAE,aAAa,GAAG,IAAI;CAiExC"}
|
|
@@ -208,20 +208,11 @@ class TentativePoint {
|
|
|
208
208
|
const vp = (0, core_bentley_1.expectDefined)(ev.viewport);
|
|
209
209
|
if (vp.isSnapAdjustmentRequired) {
|
|
210
210
|
IModelApp_1.IModelApp.toolAdmin.adjustPointToACS(point, vp, false);
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
sourceId: "",
|
|
217
|
-
priority: HitDetail_1.HitPriority.Unknown,
|
|
218
|
-
distXY: 0,
|
|
219
|
-
distFraction: 0,
|
|
220
|
-
});
|
|
221
|
-
const snap = new HitDetail_1.SnapDetail(hit);
|
|
222
|
-
this.setCurrSnap(snap);
|
|
223
|
-
IModelApp_1.IModelApp.toolAdmin.adjustSnapPoint();
|
|
224
|
-
this.setPoint(this.getPoint());
|
|
211
|
+
// NOTE: Apply similar adjustments as ToolAdmin.adjustSnapPoint for snap that isn't hot with AccuDraw is active...
|
|
212
|
+
IModelApp_1.IModelApp.toolAdmin.adjustPointToGrid(point, vp);
|
|
213
|
+
if (!IModelApp_1.IModelApp.accuDraw.adjustPoint(point, vp, false))
|
|
214
|
+
IModelApp_1.IModelApp.toolAdmin.adjustPointToACS(point, vp, true);
|
|
215
|
+
this.setPoint(point);
|
|
225
216
|
}
|
|
226
217
|
else {
|
|
227
218
|
IModelApp_1.IModelApp.accuDraw.adjustPoint(point, vp, false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TentativePoint.js","sourceRoot":"","sources":["../../src/TentativePoint.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAA+C;AAC/C,yCAAsC;AAEtC,2CAAyG;AACzG,2CAAwC;AACxC,uCAAuD;AACvD,+CAA6D;AAG7D,sDAAoD;AAEpD;;;GAGG;AACH,MAAa,cAAc;IAClB,QAAQ,GAAG,KAAK,CAAC;IACjB,QAAQ,CAAc;IACtB,MAAM,CAAsB;IACnC,IAAY,kBAAkB,KAAa,OAAO,IAAI,CAAC,CAAC,CAAC;IACxC,MAAM,GAAY,IAAI,uBAAO,EAAE,CAAC;IAChC,SAAS,GAAY,IAAI,uBAAO,EAAE,CAAC;IACnC,UAAU,GAAY,IAAI,uBAAO,EAAE,CAAC;IAC7C,iBAAiB,CAAmC;IACrD,QAAQ,CAAkB;IAE1B,aAAa,KAAK,CAAC;IACnB,UAAU,CAAC,IAAyB,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IAEpE,yFAAyF;IACzF,IAAW,SAAS,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEvE,gFAAgF;IACzE,WAAW,KAA6B,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE/D,QAAQ;QACb,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;IAClD,CAAC;IAEM,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\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LocatingElements\r\n */\r\n\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\nimport { AccuSnap } from \"./AccuSnap\";\r\nimport { HitListHolder } from \"./ElementLocateManager\";\r\nimport { HitDetail, HitList, HitPriority, HitSource, SnapDetail, SnapHeat, SnapMode } from \"./HitDetail\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { BeButton, BeButtonEvent } from \"./tools/Tool\";\r\nimport { ViewHandleType, ViewManip } from \"./tools/ViewTool\";\r\nimport { DecorateContext } from \"./ViewContext\";\r\nimport { ScreenViewport } from \"./Viewport\";\r\nimport { expectDefined } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport class TentativePoint {\r\n public isActive = false;\r\n public currSnap?: SnapDetail;\r\n public tpHits?: HitList<HitDetail>;\r\n private get _hotDistanceInches(): number { return 0.21; }\r\n private readonly _point: Point3d = new Point3d();\r\n private readonly _rawPoint: Point3d = new Point3d();\r\n private readonly _viewPoint: Point3d = new Point3d();\r\n private _tentativePromise?: Promise<SnapDetail | undefined>;\r\n public viewport?: ScreenViewport;\r\n\r\n public onInitialized() { }\r\n public setHitList(list?: HitList<HitDetail>) { this.tpHits = list; }\r\n\r\n /** @return true if the tentative point is currently active and snapped to an element. */\r\n public get isSnapped(): boolean { return undefined !== this.currSnap; }\r\n\r\n /** @return The current snap path when TentativePoint.isSnapped or undefined. */\r\n public getCurrSnap(): SnapDetail | undefined { return this.currSnap; }\r\n\r\n public getPoint(): Point3d {\r\n const snap = this.currSnap;\r\n return !snap ? this._point : snap.adjustedPoint;\r\n }\r\n\r\n public setPoint(point: Point3d): void {\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n this._point.setFrom(point);\r\n }\r\n\r\n public clear(doErase: boolean): void {\r\n if (doErase) {\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n }\r\n IModelApp.accuSnap.destroy();\r\n this.isActive = false;\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public removeTentative(): void {\r\n this._tentativePromise = undefined;\r\n if (!this.isActive)\r\n return;\r\n IModelApp.accuSnap.erase();\r\n if (this.getCurrSnap())\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n else\r\n this.viewport?.invalidateDecorations();\r\n this.isActive = false;\r\n }\r\n\r\n public setCurrSnap(newSnap?: SnapDetail): void {\r\n if (newSnap)\r\n newSnap.setSnapPoint(newSnap.snapPoint, SnapHeat.InRange); // Reset adjustedPoint from pre-located snap and set SnapHeat...\r\n this.currSnap = newSnap;\r\n }\r\n\r\n public showTentative(): void {\r\n if (this.isSnapped) {\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n IModelApp.accuSnap.displayToolTip(this._viewPoint, expectDefined(this.viewport), undefined);\r\n } else {\r\n this.viewport?.invalidateDecorations();\r\n }\r\n this.isActive = true;\r\n }\r\n\r\n public getHitAndList(holder: HitListHolder): SnapDetail | undefined {\r\n const hit = this.currSnap;\r\n if (hit) {\r\n holder.setHitList(this.tpHits);\r\n this.tpHits = undefined;\r\n }\r\n return hit;\r\n }\r\n\r\n public onButtonEvent(ev: BeButtonEvent): void {\r\n switch (ev.button) {\r\n case BeButton.Data:\r\n if (!ev.isDown)\r\n return; // cleared on down...\r\n break;\r\n case BeButton.Reset:\r\n if (ev.isDown)\r\n return; // cleared on up...\r\n break;\r\n case BeButton.Middle:\r\n return;\r\n }\r\n\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public decorate(context: DecorateContext): void {\r\n const viewport = context.viewport;\r\n if (!this.isActive || !viewport)\r\n return;\r\n\r\n const tpSize = Math.floor(viewport.pixelsPerInch * 0.4) + 0.5;\r\n const toSizeOutline = tpSize + 1;\r\n const position = context.viewport.worldToView(this._point);\r\n position.x = Math.floor(position.x) + 0.5;\r\n position.y = Math.floor(position.y) + 0.5;\r\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\r\n ctx.lineWidth = 3;\r\n ctx.moveTo(-toSizeOutline, 0);\r\n ctx.lineTo(toSizeOutline, 0);\r\n ctx.moveTo(0, -toSizeOutline);\r\n ctx.lineTo(0, toSizeOutline);\r\n ctx.stroke();\r\n\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"white\";\r\n ctx.lineWidth = 1;\r\n if (!this.isSnapped)\r\n ctx.setLineDash([4, 1]);\r\n\r\n ctx.shadowColor = \"black\";\r\n ctx.shadowBlur = 5;\r\n ctx.moveTo(-tpSize, 0);\r\n ctx.lineTo(tpSize, 0);\r\n ctx.moveTo(0, -tpSize);\r\n ctx.lineTo(0, tpSize);\r\n ctx.stroke();\r\n };\r\n context.addCanvasDecoration({ position, drawDecoration });\r\n }\r\n\r\n private async getSnap(newSearch: boolean): Promise<SnapDetail | undefined> {\r\n // Use next hit from previous search when using tentative to cycle through hits...\r\n let thisHit = (!newSearch && undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n\r\n // Use existing AccuSnap hit list if one exists...\r\n if (undefined === thisHit) {\r\n this.tpHits = undefined;\r\n thisHit = IModelApp.accuSnap.getHitAndList(this);\r\n }\r\n\r\n if (undefined === thisHit) {\r\n // search for elements around the current raw point (search should not be affected by locks!)\r\n const aperture = (2.0 * expectDefined(this.viewport).pixelsFromInches(IModelApp.locateManager.apertureInches) / 2.0) + 1.5;\r\n const options = IModelApp.locateManager.options.clone(); // Copy to avoid changing out from under active Tool...\r\n const picker = IModelApp.locateManager.picker;\r\n\r\n options.hitSource = HitSource.TentativeSnap;\r\n if (0 === picker.doPick(expectDefined(this.viewport), this._rawPoint, aperture, options))\r\n return undefined;\r\n\r\n this.tpHits = picker.getHitList(true);\r\n thisHit = (undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n } else if (thisHit instanceof SnapDetail) {\r\n // Make the current AccuSnap the TentativePoint snap...\r\n return thisHit;\r\n }\r\n\r\n if (undefined === thisHit)\r\n return undefined;\r\n\r\n const snapModes = IModelApp.accuSnap.getActiveSnapModes(); // Get the list of point snap modes to consider\r\n if (1 === snapModes.length && SnapMode.Intersection === snapModes[0])\r\n snapModes.push(SnapMode.Nearest); // Add nearest when doing intersection by itself to support finding extended intersections...\r\n\r\n const thisSnap = await AccuSnap.requestSnap(thisHit, snapModes, this._hotDistanceInches, IModelApp.accuSnap.keypointDivisor, this.tpHits);\r\n\r\n if (undefined !== thisSnap)\r\n IModelApp.accuDraw.onSnap(thisSnap); // AccuDraw can adjust nearest snap to intersection of circle (polar distance lock) or line (axis lock) with snapped to curve...\r\n\r\n return thisSnap;\r\n }\r\n\r\n private static arePointsCloseEnough(pt1: Point3d, pt2: Point3d, pixelDistance: number): boolean { return pt1.distance(pt2) < (pixelDistance + 1.5); }\r\n\r\n public process(ev: BeButtonEvent): void {\r\n if (undefined !== this._tentativePromise)\r\n return;\r\n\r\n const currTool = IModelApp.toolAdmin.viewTool;\r\n if (currTool && currTool.inDynamicUpdate)\r\n return; // trying to tentative snap while view is changing isn't useful...\r\n\r\n const wasActive = this.isActive;\r\n this.removeTentative(); // remove the TP cross if it is already on the screen\r\n const lastPtView = this._viewPoint.clone();\r\n\r\n this.viewport = expectDefined(ev.viewport);\r\n this._point.setFrom(ev.point);\r\n this._rawPoint.setFrom(ev.rawPoint);\r\n this._viewPoint.setFrom(ev.viewPoint);\r\n\r\n const newSearch = (!this.isSnapped || !TentativePoint.arePointsCloseEnough(lastPtView, this._viewPoint, this.viewport.pixelsFromInches(IModelApp.locateManager.apertureInches)));\r\n const promise = this.getSnap(newSearch);\r\n this._tentativePromise = promise;\r\n\r\n promise.then((newSnap) => { // eslint-disable-line @typescript-eslint/no-floating-promises\r\n // Ignore response if we're no longer interested in this tentative.\r\n if (this._tentativePromise === promise) {\r\n this._tentativePromise = undefined;\r\n this.setCurrSnap(newSnap); // Adopt the snap as current\r\n IModelApp.accuSnap.clear(); // make sure there's no AccuSnap active after a tentative point (otherwise we continually snap to it).\r\n if (this.isSnapped)\r\n this._point.setFrom(expectDefined(this.currSnap).snapPoint);\r\n else if (wasActive && newSearch)\r\n this._point.setFrom(ev.rawPoint);\r\n this.showTentative(); // show the TP cross\r\n\r\n if (this.isSnapped) {\r\n IModelApp.toolAdmin.adjustSnapPoint();\r\n } else if (IModelApp.accuDraw.isActive) {\r\n const point = this.getPoint().clone();\r\n const vp = expectDefined(ev.viewport);\r\n if (vp.isSnapAdjustmentRequired) {\r\n IModelApp.toolAdmin.adjustPointToACS(point, vp, false);\r\n const hit = new HitDetail({\r\n testPoint: point,\r\n viewport: vp,\r\n hitSource: HitSource.TentativeSnap,\r\n hitPoint: point,\r\n sourceId: \"\",\r\n priority: HitPriority.Unknown,\r\n distXY: 0,\r\n distFraction: 0,\r\n });\r\n\r\n const snap = new SnapDetail(hit);\r\n this.setCurrSnap(snap);\r\n IModelApp.toolAdmin.adjustSnapPoint();\r\n this.setPoint(this.getPoint());\r\n } else {\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n const savePoint = point.clone();\r\n IModelApp.toolAdmin.adjustPointToGrid(point, vp);\r\n if (!point.isExactEqual(savePoint))\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n this.setPoint(point);\r\n }\r\n } else {\r\n IModelApp.toolAdmin.adjustPoint(this.getPoint(), expectDefined(ev.viewport));\r\n }\r\n\r\n IModelApp.accuDraw.onTentative();\r\n if (currTool && currTool instanceof ViewManip && currTool.viewHandles.hasHandle(ViewHandleType.TargetCenter))\r\n currTool.updateTargetCenter(); // Change target center to tentative location...\r\n else\r\n IModelApp.toolAdmin.updateDynamics(undefined, undefined, true); // Don't wait for motion to update dynamics...\r\n }\r\n });\r\n }\r\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EAAE,EAAE,CAAC,CAAC;wBACjD,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC;4BAChC,qBAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;wBACnD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;oBACvB,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,qBAAS,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAA,4BAAa,EAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC/E,CAAC;gBAED,qBAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACjC,IAAI,QAAQ,IAAI,QAAQ,YAAY,oBAAS,IAAI,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,yBAAc,CAAC,YAAY,CAAC;oBAC1G,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC,gDAAgD;;oBAE/E,qBAAS,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,8CAA8C;YAClH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AArPD,wCAqPC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LocatingElements\r\n */\r\n\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\nimport { AccuSnap } from \"./AccuSnap\";\r\nimport { HitListHolder } from \"./ElementLocateManager\";\r\nimport { HitDetail, HitList, HitSource, SnapDetail, SnapHeat, SnapMode } from \"./HitDetail\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { BeButton, BeButtonEvent } from \"./tools/Tool\";\r\nimport { ViewHandleType, ViewManip } from \"./tools/ViewTool\";\r\nimport { DecorateContext } from \"./ViewContext\";\r\nimport { ScreenViewport } from \"./Viewport\";\r\nimport { expectDefined } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport class TentativePoint {\r\n public isActive = false;\r\n public currSnap?: SnapDetail;\r\n public tpHits?: HitList<HitDetail>;\r\n private get _hotDistanceInches(): number { return 0.21; }\r\n private readonly _point: Point3d = new Point3d();\r\n private readonly _rawPoint: Point3d = new Point3d();\r\n private readonly _viewPoint: Point3d = new Point3d();\r\n private _tentativePromise?: Promise<SnapDetail | undefined>;\r\n public viewport?: ScreenViewport;\r\n\r\n public onInitialized() { }\r\n public setHitList(list?: HitList<HitDetail>) { this.tpHits = list; }\r\n\r\n /** @return true if the tentative point is currently active and snapped to an element. */\r\n public get isSnapped(): boolean { return undefined !== this.currSnap; }\r\n\r\n /** @return The current snap path when TentativePoint.isSnapped or undefined. */\r\n public getCurrSnap(): SnapDetail | undefined { return this.currSnap; }\r\n\r\n public getPoint(): Point3d {\r\n const snap = this.currSnap;\r\n return !snap ? this._point : snap.adjustedPoint;\r\n }\r\n\r\n public setPoint(point: Point3d): void {\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n this._point.setFrom(point);\r\n }\r\n\r\n public clear(doErase: boolean): void {\r\n if (doErase) {\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n }\r\n IModelApp.accuSnap.destroy();\r\n this.isActive = false;\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public removeTentative(): void {\r\n this._tentativePromise = undefined;\r\n if (!this.isActive)\r\n return;\r\n IModelApp.accuSnap.erase();\r\n if (this.getCurrSnap())\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n else\r\n this.viewport?.invalidateDecorations();\r\n this.isActive = false;\r\n }\r\n\r\n public setCurrSnap(newSnap?: SnapDetail): void {\r\n if (newSnap)\r\n newSnap.setSnapPoint(newSnap.snapPoint, SnapHeat.InRange); // Reset adjustedPoint from pre-located snap and set SnapHeat...\r\n this.currSnap = newSnap;\r\n }\r\n\r\n public showTentative(): void {\r\n if (this.isSnapped) {\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n IModelApp.accuSnap.displayToolTip(this._viewPoint, expectDefined(this.viewport), undefined);\r\n } else {\r\n this.viewport?.invalidateDecorations();\r\n }\r\n this.isActive = true;\r\n }\r\n\r\n public getHitAndList(holder: HitListHolder): SnapDetail | undefined {\r\n const hit = this.currSnap;\r\n if (hit) {\r\n holder.setHitList(this.tpHits);\r\n this.tpHits = undefined;\r\n }\r\n return hit;\r\n }\r\n\r\n public onButtonEvent(ev: BeButtonEvent): void {\r\n switch (ev.button) {\r\n case BeButton.Data:\r\n if (!ev.isDown)\r\n return; // cleared on down...\r\n break;\r\n case BeButton.Reset:\r\n if (ev.isDown)\r\n return; // cleared on up...\r\n break;\r\n case BeButton.Middle:\r\n return;\r\n }\r\n\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public decorate(context: DecorateContext): void {\r\n const viewport = context.viewport;\r\n if (!this.isActive || !viewport)\r\n return;\r\n\r\n const tpSize = Math.floor(viewport.pixelsPerInch * 0.4) + 0.5;\r\n const toSizeOutline = tpSize + 1;\r\n const position = context.viewport.worldToView(this._point);\r\n position.x = Math.floor(position.x) + 0.5;\r\n position.y = Math.floor(position.y) + 0.5;\r\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\r\n ctx.lineWidth = 3;\r\n ctx.moveTo(-toSizeOutline, 0);\r\n ctx.lineTo(toSizeOutline, 0);\r\n ctx.moveTo(0, -toSizeOutline);\r\n ctx.lineTo(0, toSizeOutline);\r\n ctx.stroke();\r\n\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"white\";\r\n ctx.lineWidth = 1;\r\n if (!this.isSnapped)\r\n ctx.setLineDash([4, 1]);\r\n\r\n ctx.shadowColor = \"black\";\r\n ctx.shadowBlur = 5;\r\n ctx.moveTo(-tpSize, 0);\r\n ctx.lineTo(tpSize, 0);\r\n ctx.moveTo(0, -tpSize);\r\n ctx.lineTo(0, tpSize);\r\n ctx.stroke();\r\n };\r\n context.addCanvasDecoration({ position, drawDecoration });\r\n }\r\n\r\n private async getSnap(newSearch: boolean): Promise<SnapDetail | undefined> {\r\n // Use next hit from previous search when using tentative to cycle through hits...\r\n let thisHit = (!newSearch && undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n\r\n // Use existing AccuSnap hit list if one exists...\r\n if (undefined === thisHit) {\r\n this.tpHits = undefined;\r\n thisHit = IModelApp.accuSnap.getHitAndList(this);\r\n }\r\n\r\n if (undefined === thisHit) {\r\n // search for elements around the current raw point (search should not be affected by locks!)\r\n const aperture = (2.0 * expectDefined(this.viewport).pixelsFromInches(IModelApp.locateManager.apertureInches) / 2.0) + 1.5;\r\n const options = IModelApp.locateManager.options.clone(); // Copy to avoid changing out from under active Tool...\r\n const picker = IModelApp.locateManager.picker;\r\n\r\n options.hitSource = HitSource.TentativeSnap;\r\n if (0 === picker.doPick(expectDefined(this.viewport), this._rawPoint, aperture, options))\r\n return undefined;\r\n\r\n this.tpHits = picker.getHitList(true);\r\n thisHit = (undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n } else if (thisHit instanceof SnapDetail) {\r\n // Make the current AccuSnap the TentativePoint snap...\r\n return thisHit;\r\n }\r\n\r\n if (undefined === thisHit)\r\n return undefined;\r\n\r\n const snapModes = IModelApp.accuSnap.getActiveSnapModes(); // Get the list of point snap modes to consider\r\n if (1 === snapModes.length && SnapMode.Intersection === snapModes[0])\r\n snapModes.push(SnapMode.Nearest); // Add nearest when doing intersection by itself to support finding extended intersections...\r\n\r\n const thisSnap = await AccuSnap.requestSnap(thisHit, snapModes, this._hotDistanceInches, IModelApp.accuSnap.keypointDivisor, this.tpHits);\r\n\r\n if (undefined !== thisSnap)\r\n IModelApp.accuDraw.onSnap(thisSnap); // AccuDraw can adjust nearest snap to intersection of circle (polar distance lock) or line (axis lock) with snapped to curve...\r\n\r\n return thisSnap;\r\n }\r\n\r\n private static arePointsCloseEnough(pt1: Point3d, pt2: Point3d, pixelDistance: number): boolean { return pt1.distance(pt2) < (pixelDistance + 1.5); }\r\n\r\n public process(ev: BeButtonEvent): void {\r\n if (undefined !== this._tentativePromise)\r\n return;\r\n\r\n const currTool = IModelApp.toolAdmin.viewTool;\r\n if (currTool && currTool.inDynamicUpdate)\r\n return; // trying to tentative snap while view is changing isn't useful...\r\n\r\n const wasActive = this.isActive;\r\n this.removeTentative(); // remove the TP cross if it is already on the screen\r\n const lastPtView = this._viewPoint.clone();\r\n\r\n this.viewport = expectDefined(ev.viewport);\r\n this._point.setFrom(ev.point);\r\n this._rawPoint.setFrom(ev.rawPoint);\r\n this._viewPoint.setFrom(ev.viewPoint);\r\n\r\n const newSearch = (!this.isSnapped || !TentativePoint.arePointsCloseEnough(lastPtView, this._viewPoint, this.viewport.pixelsFromInches(IModelApp.locateManager.apertureInches)));\r\n const promise = this.getSnap(newSearch);\r\n this._tentativePromise = promise;\r\n\r\n promise.then((newSnap) => { // eslint-disable-line @typescript-eslint/no-floating-promises\r\n // Ignore response if we're no longer interested in this tentative.\r\n if (this._tentativePromise === promise) {\r\n this._tentativePromise = undefined;\r\n this.setCurrSnap(newSnap); // Adopt the snap as current\r\n IModelApp.accuSnap.clear(); // make sure there's no AccuSnap active after a tentative point (otherwise we continually snap to it).\r\n if (this.isSnapped)\r\n this._point.setFrom(expectDefined(this.currSnap).snapPoint);\r\n else if (wasActive && newSearch)\r\n this._point.setFrom(ev.rawPoint);\r\n this.showTentative(); // show the TP cross\r\n\r\n if (this.isSnapped) {\r\n IModelApp.toolAdmin.adjustSnapPoint();\r\n } else if (IModelApp.accuDraw.isActive) {\r\n const point = this.getPoint().clone();\r\n const vp = expectDefined(ev.viewport);\r\n if (vp.isSnapAdjustmentRequired) {\r\n IModelApp.toolAdmin.adjustPointToACS(point, vp, false);\r\n // NOTE: Apply similar adjustments as ToolAdmin.adjustSnapPoint for snap that isn't hot with AccuDraw is active...\r\n IModelApp.toolAdmin.adjustPointToGrid(point, vp);\r\n if (!IModelApp.accuDraw.adjustPoint(point, vp, false))\r\n IModelApp.toolAdmin.adjustPointToACS(point, vp, true);\r\n this.setPoint(point);\r\n } else {\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n const savePoint = point.clone();\r\n IModelApp.toolAdmin.adjustPointToGrid(point, vp);\r\n if (!point.isExactEqual(savePoint))\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n this.setPoint(point);\r\n }\r\n } else {\r\n IModelApp.toolAdmin.adjustPoint(this.getPoint(), expectDefined(ev.viewport));\r\n }\r\n\r\n IModelApp.accuDraw.onTentative();\r\n if (currTool && currTool instanceof ViewManip && currTool.viewHandles.hasHandle(ViewHandleType.TargetCenter))\r\n currTool.updateTargetCenter(); // Change target center to tentative location...\r\n else\r\n IModelApp.toolAdmin.updateDynamics(undefined, undefined, true); // Don't wait for motion to update dynamics...\r\n }\r\n });\r\n }\r\n}\r\n"]}
|
|
@@ -103,7 +103,7 @@ export * from "./internal/render/webgl/IModelFrameLifecycle";
|
|
|
103
103
|
export type { TxnEntityChange, TxnEntityChangeIterable, TxnEntityChangeType, TxnEntityChanges, TxnEntityChangesFilterOptions, TxnEntityMetadataCriterion, } from "./TxnEntityChanges";
|
|
104
104
|
/** Deprecated frontend alias for the common TxnEntityMetadata interface.
|
|
105
105
|
* @public
|
|
106
|
-
* @deprecated in 5.13.0. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.
|
|
106
|
+
* @deprecated in 5.13.0 - will not be removed until after 2027-09-03. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.
|
|
107
107
|
*/
|
|
108
108
|
export type TxnEntityMetadata = _TxnEntityMetadata;
|
|
109
109
|
export { type TileTreeDiscloser, DisclosedTileTreeSet, type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf, readElementGraphics, type BatchTableProperties, RealityTileTree, type RealityTileGeometry, RealityTile, type RenderGraphicTileTreeArgs, type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin, type TileContent, type TiledGraphicsProvider, type TileDrawArgParams, TileDrawArgs, type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference, type GeometryTileTreeReferenceOptions, type TileParams, TileRequestChannels, type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel, TileRequest, type TileTreeOwner, type TileTreeParams, TileGraphicType, TileTreeReference, type TileTreeSupplier, TileTreeLoadStatus, TileTree, Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes, TileUsageMarker, TileUser, BingElevationProvider, QuadId, type QuadIdProps, MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme, type MapLayerIndex, MapTileProjection, MapTile, MapLayerTileTreeReference, MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources, MapLayerImageryProviderStatus, MapLayerImageryProvider, ImageryMapLayerFormat, MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry, type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient, type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord, MapCartoRectangle, ImageryMapLayerTreeReference, EllipsoidTerrainProvider, getCesiumAssetUrl, MapTileTreeScaleRangeVisibility, MapTileTree, type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider, type TerrainProvider, TerrainProviderRegistry, } from "./tile/internal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;;AAI/F,6CAA2B;AAC3B,6CAA2B;AAC3B,gDAA8B;AAC9B,iDAA+B;AAC/B,wDAAsC;AACtC,iDAA+B;AAC/B,kDAAgC;AAChC,sDAAoC;AACpC,0DAAwC;AACxC,uDAAqC;AACrC,gDAA8B;AAC9B,yDAAuC;AACvC,2CAAyB;AACzB,6DAA2C;AAC3C,gDAA8B;AAC9B,qDAAmC;AACnC,6CAA2B;AAC3B,sDAAoC;AACpC,qDAAmC;AACnC,yDAAuC;AACvC,sDAAoC;AACpC,gDAA8B;AAC9B,2DAAyC;AACzC,4DAA0C;AAC1C,kDAAgC;AAChC,sDAAoC;AACpC,8CAA4B;AAC5B,oDAAkC;AAClC,gDAA8B;AAC9B,gDAA8B;AAC9B,kDAAgC;AAChC,0DAAwC;AACxC,8CAA4B;AAC5B,8CAA4B;AAC5B,qDAAmC;AACnC,yDAAuC;AACvC,2CAAyB;AACzB,uDAAqC;AACrC,kDAAgC;AAChC,2CAAyB;AACzB,uDAAqC;AACrC,+CAA6B;AAC7B,8CAA4B;AAC5B,oDAAkC;AAClC,gDAA8B;AAC9B,wDAAsC;AACtC,+DAA6C;AAC7C,wDAAsC;AACtC,iDAA+B;AAC/B,mDAAiC;AACjC,4DAA0C;AAC1C,qDAAmC;AACnC,4CAA0B;AAC1B,iDAA+B;AAC/B,uDAAqC;AACrC,mDAAiC;AACjC,0CAAwB;AACxB,oDAAkC;AAClC,kDAAgC;AAChC,gDAA8B;AAC9B,uDAAqC;AACrC,iDAA+B;AAC/B,gDAA8B;AAC9B,6CAA2B;AAC3B,iDAA+B;AAC/B,6CAA2B;AAC3B,8CAA4B;AAC5B,+CAA6B;AAC7B,wDAAsC;AACtC,+EAA6D;AAC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AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;EAGE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport type { TxnEntityMetadata as _TxnEntityMetadata } from \"@itwin/core-common\";\r\n\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./GeoProviders\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CatalogConnection\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./CesiumAccessClient\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./common\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialClassifiersState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewportSync\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./extension/Extension\";\r\nexport * from \"./extension/providers/LocalExtensionProvider\";\r\nexport * from \"./extension/providers/RemoteExtensionProvider\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/CreateRenderMaterialArgs\";\r\nexport * from \"./render/CreateTextureArgs\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicTemplate\";\r\nexport * from \"./render/MeshArgs\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/PolylineArgs\";\r\nexport * from \"./render/RealityMeshParams\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./internal/render/webgl/IModelFrameLifecycle\";\r\nexport type {\r\n TxnEntityChange,\r\n TxnEntityChangeIterable,\r\n TxnEntityChangeType,\r\n TxnEntityChanges,\r\n TxnEntityChangesFilterOptions,\r\n TxnEntityMetadataCriterion,\r\n} from \"./TxnEntityChanges\";\r\n/** Deprecated frontend alias for the common TxnEntityMetadata interface.\r\n * @public\r\n * @deprecated in 5.13.0. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.\r\n */\r\nexport type TxnEntityMetadata = _TxnEntityMetadata;\r\nexport {\r\n type TileTreeDiscloser, DisclosedTileTreeSet,\r\n type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf,\r\n readElementGraphics,\r\n type BatchTableProperties, RealityTileTree,\r\n type RealityTileGeometry, RealityTile,\r\n type RenderGraphicTileTreeArgs,\r\n type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin,\r\n type TileContent,\r\n type TiledGraphicsProvider,\r\n type TileDrawArgParams, TileDrawArgs,\r\n type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference,\r\n type GeometryTileTreeReferenceOptions,\r\n type TileParams,\r\n TileRequestChannels,\r\n type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel,\r\n TileRequest,\r\n type TileTreeOwner,\r\n type TileTreeParams,\r\n TileGraphicType, TileTreeReference,\r\n type TileTreeSupplier,\r\n TileTreeLoadStatus, TileTree,\r\n Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes,\r\n TileUsageMarker,\r\n TileUser,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n BingElevationProvider,\r\n QuadId, type QuadIdProps,\r\n MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme,\r\n type MapLayerIndex,\r\n MapTileProjection, MapTile,\r\n MapLayerTileTreeReference,\r\n MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources,\r\n MapLayerImageryProviderStatus, MapLayerImageryProvider,\r\n ImageryMapLayerFormat,\r\n MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry,\r\n type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient,\r\n type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord,\r\n MapCartoRectangle,\r\n ImageryMapLayerTreeReference,\r\n EllipsoidTerrainProvider,\r\n getCesiumAssetUrl,\r\n MapTileTreeScaleRangeVisibility, MapTileTree,\r\n type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider,\r\n type TerrainProvider, TerrainProviderRegistry,\r\n} from \"./tile/internal\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tools/AccuDrawViewportUI\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/SetupCameraTools\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./workers/RegisterWorker\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./request/utils\";\r\nexport * from \"./RealityDataSource\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n// TODO/FIX: \"./extension/ExtensionRuntime\" import has to be last to avoid circular dependency errors.\r\nimport \"./extension/ExtensionRuntime\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing Extensions.\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n*/"]}
|
|
1
|
+
{"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;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------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport type { TxnEntityMetadata as _TxnEntityMetadata } from \"@itwin/core-common\";\r\n\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./GeoProviders\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CatalogConnection\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./CesiumAccessClient\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./common\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialClassifiersState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewportSync\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./extension/Extension\";\r\nexport * from \"./extension/providers/LocalExtensionProvider\";\r\nexport * from \"./extension/providers/RemoteExtensionProvider\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/CreateRenderMaterialArgs\";\r\nexport * from \"./render/CreateTextureArgs\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicTemplate\";\r\nexport * from \"./render/MeshArgs\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/PolylineArgs\";\r\nexport * from \"./render/RealityMeshParams\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./internal/render/webgl/IModelFrameLifecycle\";\r\nexport type {\r\n TxnEntityChange,\r\n TxnEntityChangeIterable,\r\n TxnEntityChangeType,\r\n TxnEntityChanges,\r\n TxnEntityChangesFilterOptions,\r\n TxnEntityMetadataCriterion,\r\n} from \"./TxnEntityChanges\";\r\n/** Deprecated frontend alias for the common TxnEntityMetadata interface.\r\n * @public\r\n * @deprecated in 5.13.0 - will not be removed until after 2027-09-03. Use [TxnEntityMetadata]($common) from @itwin/core-common instead.\r\n */\r\nexport type TxnEntityMetadata = _TxnEntityMetadata;\r\nexport {\r\n type TileTreeDiscloser, DisclosedTileTreeSet,\r\n type ReadGltfGraphicsArgs, type GltfGraphic, type GltfTemplate, readGltfGraphics, readGltfTemplate, readGltf,\r\n readElementGraphics,\r\n type BatchTableProperties, RealityTileTree,\r\n type RealityTileGeometry, RealityTile,\r\n type RenderGraphicTileTreeArgs,\r\n type GpuMemoryLimit, type GpuMemoryLimits, TileAdmin,\r\n type TileContent,\r\n type TiledGraphicsProvider,\r\n type TileDrawArgParams, TileDrawArgs,\r\n type CollectTileStatus, type TileGeometryCollectorOptions, TileGeometryCollector, type GeometryTileTreeReference,\r\n type GeometryTileTreeReferenceOptions,\r\n type TileParams,\r\n TileRequestChannels,\r\n type TileContentDecodingStatistics, TileRequestChannelStatistics, TileRequestChannel,\r\n TileRequest,\r\n type TileTreeOwner,\r\n type TileTreeParams,\r\n TileGraphicType, TileTreeReference,\r\n type TileTreeSupplier,\r\n TileTreeLoadStatus, TileTree,\r\n Tile, TileLoadStatus, TileVisibility, TileLoadPriority, TileBoundingBoxes,\r\n TileUsageMarker,\r\n TileUser,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n BingElevationProvider,\r\n QuadId, type QuadIdProps,\r\n MapTilingScheme, GeographicTilingScheme, WebMercatorProjection, WebMercatorTilingScheme,\r\n type MapLayerIndex,\r\n MapTileProjection, MapTile,\r\n MapLayerTileTreeReference,\r\n MapLayerSourceStatus, type MapLayerSourceProps, MapLayerSource, MapLayerSources,\r\n MapLayerImageryProviderStatus, MapLayerImageryProvider,\r\n ImageryMapLayerFormat,\r\n MapLayerFormat, type ValidateSourceArgs, type MapLayerFormatType, type MapLayerSourceValidation, type MapLayerOptions, MapLayerFormatRegistry,\r\n type MapLayerTokenEndpoint, type MapLayerAuthenticationInfo, type MapLayerAccessToken, type MapLayerAccessTokenParams, type MapLayerAccessClient,\r\n type MapFeatureInfoOptions, MapFeatureInfoRecord, type MapFeatureInfo, type MapLayerFeatureInfo, type MapSubLayerFeatureInfo, type MapLayerFeature, type MapLayerFeatureGeometry, type MapLayerFeatureAttribute, MapLayerFeatureRecord,\r\n MapCartoRectangle,\r\n ImageryMapLayerTreeReference,\r\n EllipsoidTerrainProvider,\r\n getCesiumAssetUrl,\r\n MapTileTreeScaleRangeVisibility, MapTileTree,\r\n type TerrainMeshProviderOptions, type RequestMeshDataArgs, type ReadMeshArgs, TerrainMeshProvider,\r\n type TerrainProvider, TerrainProviderRegistry,\r\n} from \"./tile/internal\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tools/AccuDrawViewportUI\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/SetupCameraTools\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./workers/RegisterWorker\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./request/utils\";\r\nexport * from \"./RealityDataSource\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n// TODO/FIX: \"./extension/ExtensionRuntime\" import has to be last to avoid circular dependency errors.\r\nimport \"./extension/ExtensionRuntime\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing Extensions.\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n/**\r\n * @docs-group-description TileStorage\r\n * Class for working with cloud storage using iTwin/object-storage cloud providers\r\n*/"]}
|