@itwin/core-backend 4.8.0-dev.3 → 4.8.0-dev.32
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 +57 -1
- package/lib/cjs/BackendHubAccess.d.ts +18 -16
- package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
- package/lib/cjs/BackendHubAccess.js +16 -15
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BackendLoggerCategory.d.ts +3 -1
- package/lib/cjs/BackendLoggerCategory.d.ts.map +1 -1
- package/lib/cjs/BackendLoggerCategory.js +2 -0
- package/lib/cjs/BackendLoggerCategory.js.map +1 -1
- package/lib/cjs/BlobContainerService.d.ts +3 -3
- package/lib/cjs/BlobContainerService.d.ts.map +1 -1
- package/lib/cjs/BlobContainerService.js.map +1 -1
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +19 -11
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/Category.d.ts +0 -6
- package/lib/cjs/Category.d.ts.map +1 -1
- package/lib/cjs/Category.js +0 -6
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangeSummaryManager.d.ts.map +1 -1
- package/lib/cjs/ChangeSummaryManager.js +11 -9
- package/lib/cjs/ChangeSummaryManager.js.map +1 -1
- package/lib/cjs/ChangedElementsDb.d.ts +1 -0
- package/lib/cjs/ChangedElementsDb.d.ts.map +1 -1
- package/lib/cjs/ChangedElementsDb.js +6 -4
- package/lib/cjs/ChangedElementsDb.js.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.js +26 -21
- package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
- package/lib/cjs/ChannelControl.d.ts +4 -26
- package/lib/cjs/ChannelControl.d.ts.map +1 -1
- package/lib/cjs/ChannelControl.js +2 -101
- package/lib/cjs/ChannelControl.js.map +1 -1
- package/lib/cjs/CheckpointManager.d.ts.map +1 -1
- package/lib/cjs/CheckpointManager.js +5 -3
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.d.ts.map +1 -1
- package/lib/cjs/ClassRegistry.js +3 -2
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.d.ts +49 -24
- package/lib/cjs/CloudSqlite.d.ts.map +1 -1
- package/lib/cjs/CloudSqlite.js +66 -7
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/CodeService.d.ts +4 -4
- package/lib/cjs/CodeService.d.ts.map +1 -1
- package/lib/cjs/CodeService.js.map +1 -1
- package/lib/cjs/DevTools.d.ts.map +1 -1
- package/lib/cjs/DevTools.js +2 -1
- package/lib/cjs/DevTools.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +0 -3
- package/lib/cjs/DisplayStyle.d.ts.map +1 -1
- package/lib/cjs/DisplayStyle.js +0 -3
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.d.ts +6 -1
- package/lib/cjs/ECDb.d.ts.map +1 -1
- package/lib/cjs/ECDb.js +19 -14
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js +2 -2
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/ECSqlStatement.d.ts +6 -3
- package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
- package/lib/cjs/ECSqlStatement.js +3 -3
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/Element.d.ts +3 -60
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +8 -64
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.d.ts +0 -5
- package/lib/cjs/ElementAspect.d.ts.map +1 -1
- package/lib/cjs/ElementAspect.js +4 -8
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/ElementGraphics.d.ts.map +1 -1
- package/lib/cjs/ElementGraphics.js +2 -1
- package/lib/cjs/ElementGraphics.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.d.ts +10 -0
- package/lib/cjs/GeoCoordConfig.d.ts.map +1 -1
- package/lib/cjs/GeoCoordConfig.js +22 -24
- package/lib/cjs/GeoCoordConfig.js.map +1 -1
- package/lib/cjs/GeographicCRSServices.js +2 -2
- package/lib/cjs/GeographicCRSServices.js.map +1 -1
- package/lib/cjs/GeometrySummary.d.ts.map +1 -1
- package/lib/cjs/GeometrySummary.js +2 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +33 -98
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +242 -156
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js +5 -4
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +13 -4
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +39 -32
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IpcHost.d.ts.map +1 -1
- package/lib/cjs/IpcHost.js +15 -13
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LocalHub.d.ts +2 -2
- package/lib/cjs/LocalHub.d.ts.map +1 -1
- package/lib/cjs/LocalHub.js +17 -17
- package/lib/cjs/LocalHub.js.map +1 -1
- package/lib/cjs/LockControl.d.ts +73 -0
- package/lib/cjs/LockControl.d.ts.map +1 -0
- package/lib/cjs/LockControl.js +11 -0
- package/lib/cjs/LockControl.js.map +1 -0
- package/lib/cjs/Material.d.ts +2 -5
- package/lib/cjs/Material.d.ts.map +1 -1
- package/lib/cjs/Material.js +6 -4
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.d.ts +0 -22
- package/lib/cjs/Model.d.ts.map +1 -1
- package/lib/cjs/Model.js +5 -26
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/PropertyStore.d.ts +17 -7
- package/lib/cjs/PropertyStore.d.ts.map +1 -1
- package/lib/cjs/PropertyStore.js +11 -5
- package/lib/cjs/PropertyStore.js.map +1 -1
- package/lib/cjs/Relationship.d.ts +0 -12
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +5 -16
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/SQLiteDb.d.ts +8 -4
- package/lib/cjs/SQLiteDb.d.ts.map +1 -1
- package/lib/cjs/SQLiteDb.js +25 -19
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/SchemaSync.d.ts +4 -1
- package/lib/cjs/SchemaSync.d.ts.map +1 -1
- package/lib/cjs/SchemaSync.js +24 -11
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/SchemaUtils.js +3 -3
- package/lib/cjs/SchemaUtils.js.map +1 -1
- package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
- package/lib/cjs/SqliteChangesetReader.js +2 -2
- package/lib/cjs/SqliteChangesetReader.js.map +1 -1
- package/lib/cjs/SqliteStatement.js +2 -2
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/TextAnnotationGeometry.d.ts +5 -1
- package/lib/cjs/TextAnnotationGeometry.d.ts.map +1 -1
- package/lib/cjs/TextAnnotationGeometry.js +11 -8
- package/lib/cjs/TextAnnotationGeometry.js.map +1 -1
- package/lib/cjs/TextAnnotationLayout.d.ts +21 -13
- package/lib/cjs/TextAnnotationLayout.d.ts.map +1 -1
- package/lib/cjs/TextAnnotationLayout.js +134 -92
- package/lib/cjs/TextAnnotationLayout.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +2 -1
- package/lib/cjs/TxnManager.d.ts.map +1 -1
- package/lib/cjs/TxnManager.js +4 -2
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +1 -18
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +1 -18
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/ViewStore.d.ts +16 -2
- package/lib/cjs/ViewStore.d.ts.map +1 -1
- package/lib/cjs/ViewStore.js +20 -6
- package/lib/cjs/ViewStore.js.map +1 -1
- package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +33 -0
- package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +17 -21
- package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +80 -38
- package/lib/cjs/assets/Settings/backend.setting.json5 +8 -119
- package/lib/cjs/core-backend.d.ts +4 -2
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +5 -6
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.d.ts +0 -10
- package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js +0 -10
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/domains/FunctionalSchema.d.ts.map +1 -1
- package/lib/cjs/domains/FunctionalSchema.js +2 -1
- package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
- package/lib/cjs/domains/GenericElements.d.ts +0 -18
- package/lib/cjs/domains/GenericElements.d.ts.map +1 -1
- package/lib/cjs/domains/GenericElements.js +0 -18
- package/lib/cjs/domains/GenericElements.js.map +1 -1
- package/lib/cjs/internal/ChangesetConflictArgs.d.ts +24 -0
- package/lib/cjs/internal/ChangesetConflictArgs.d.ts.map +1 -0
- package/lib/cjs/internal/ChangesetConflictArgs.js +7 -0
- package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -0
- package/lib/cjs/internal/ChannelAdmin.d.ts +34 -0
- package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -0
- package/lib/cjs/internal/ChannelAdmin.js +117 -0
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -0
- package/lib/cjs/internal/NativePlatform.d.ts +15 -0
- package/lib/cjs/internal/NativePlatform.d.ts.map +1 -0
- package/lib/cjs/internal/NativePlatform.js +49 -0
- package/lib/cjs/internal/NativePlatform.js.map +1 -0
- package/lib/cjs/internal/NoLocks.d.ts +6 -0
- package/lib/cjs/internal/NoLocks.d.ts.map +1 -0
- package/lib/cjs/internal/NoLocks.js +31 -0
- package/lib/cjs/internal/NoLocks.js.map +1 -0
- package/lib/cjs/{ServerBasedLocks.d.ts → internal/ServerBasedLocks.d.ts} +10 -16
- package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -0
- package/lib/cjs/{ServerBasedLocks.js → internal/ServerBasedLocks.js} +29 -18
- package/lib/cjs/internal/ServerBasedLocks.js.map +1 -0
- package/lib/cjs/internal/Symbols.d.ts +11 -0
- package/lib/cjs/internal/Symbols.d.ts.map +1 -0
- package/lib/cjs/internal/Symbols.js +21 -0
- package/lib/cjs/internal/Symbols.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +4 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -0
- package/lib/cjs/internal/cross-package.js +16 -0
- package/lib/cjs/internal/cross-package.js.map +1 -0
- package/lib/cjs/internal/workspace/SettingsImpl.d.ts +43 -0
- package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -0
- package/lib/cjs/internal/workspace/SettingsImpl.js +161 -0
- package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -0
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.d.ts +6 -0
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.d.ts.map +1 -0
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js +276 -0
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -0
- package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts +41 -0
- package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -0
- package/lib/cjs/internal/workspace/WorkspaceImpl.js +696 -0
- package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -0
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.d.ts +10 -0
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.d.ts.map +1 -0
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js +42 -0
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -0
- package/lib/cjs/rpc/tracing.d.ts.map +1 -1
- package/lib/cjs/rpc/tracing.js +5 -2
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -0
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +10 -6
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +5 -3
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Settings.d.ts +167 -138
- package/lib/cjs/workspace/Settings.d.ts.map +1 -1
- package/lib/cjs/workspace/Settings.js +68 -138
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.d.ts +112 -48
- package/lib/cjs/workspace/SettingsSchemas.d.ts.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.js +1 -172
- package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
- package/lib/cjs/workspace/Workspace.d.ts +411 -277
- package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
- package/lib/cjs/workspace/Workspace.js +76 -457
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.d.ts +245 -0
- package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -0
- package/lib/cjs/workspace/WorkspaceEditor.js +34 -0
- package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -0
- package/package.json +15 -14
- package/lib/cjs/ServerBasedLocks.d.ts.map +0 -1
- package/lib/cjs/ServerBasedLocks.js.map +0 -1
- package/lib/cjs/assets/Settings/Schemas/Cloud.Schema.json +0 -45
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module iModels
|
|
3
|
+
*/
|
|
4
|
+
import { Id64Arg, Id64String } from "@itwin/core-bentley";
|
|
5
|
+
import { _close, _elementWasCreated, _implementationProhibited, _releaseAllLocks } from "./internal/Symbols";
|
|
6
|
+
/**
|
|
7
|
+
* Interface for acquiring element locks to [coordinate simultaneous edits]($docs/learning/backend/ConcurrencyControl.md) from multiple briefcases.
|
|
8
|
+
* @see [[IModelDb.locks]] to access the locks for an iModel.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export interface LockControl {
|
|
12
|
+
/** @internal*/
|
|
13
|
+
readonly [_implementationProhibited]: unknown;
|
|
14
|
+
/**
|
|
15
|
+
* true if this LockControl uses a server-based concurrency approach.
|
|
16
|
+
*/
|
|
17
|
+
readonly isServerBased: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Close the local lock control database
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
[_close]: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Notification that a new element was just created. Called by [[Element.onInserted]]
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
[_elementWasCreated]: (id: Id64String) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Throw if locks are required and the exclusive lock is not held on the supplied element.
|
|
30
|
+
* Note: there is no need to check the shared locks on parents/models since an element cannot hold the exclusive lock without first obtaining them.
|
|
31
|
+
* Called by functions like [[Element.onUpdate]], [[Element.onDelete]], etc.
|
|
32
|
+
*/
|
|
33
|
+
checkExclusiveLock(id: Id64String, type: string, operation: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Throw if locks are required and a shared lock is not held on the supplied element.
|
|
36
|
+
* Called by [[Element.onInsert]] to ensure shared lock is held on the new element's model and parent element.
|
|
37
|
+
*/
|
|
38
|
+
checkSharedLock(id: Id64String, type: string, operation: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* Determine whether the owning iModel currently holds the exclusive lock on the specified element.
|
|
41
|
+
*/
|
|
42
|
+
holdsExclusiveLock(id: Id64String): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Determine whether the owning iModel currently holds a shared lock on the specified element.
|
|
45
|
+
*/
|
|
46
|
+
holdsSharedLock(id: Id64String): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Acquire locks on one or more elements from the lock server, if required and not already held.
|
|
49
|
+
* If any required lock is not available, this method throws an exception and *none* of the requested locks are acquired.
|
|
50
|
+
* @note Acquiring the exclusive lock on an element requires also obtaining a shared lock on all its owner elements. This method will
|
|
51
|
+
* attempt to acquire all necessary locks for both sets of input ids.
|
|
52
|
+
*/
|
|
53
|
+
acquireLocks(arg: {
|
|
54
|
+
/** if present, one or more elements to obtain shared lock */
|
|
55
|
+
shared?: Id64Arg;
|
|
56
|
+
/** if present, one or more elements to obtain exclusive lock */
|
|
57
|
+
exclusive?: Id64Arg;
|
|
58
|
+
}): Promise<void>;
|
|
59
|
+
/** Release all locks currently held by this briefcase from the locker server.
|
|
60
|
+
* This is typically done on your behalf by [[BriefcaseDb.pushChanges]].
|
|
61
|
+
* You may want to do it manually when abandoning all of your briefcase's local changes.
|
|
62
|
+
* You cannot release your locks if your briefcase contains local changes.
|
|
63
|
+
* @throws Error if the briefcase has local changes, or if any other error occurs while releasing the locks.
|
|
64
|
+
*/
|
|
65
|
+
releaseAllLocks(): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Release all locks currently held by this Briefcase from the lock server.
|
|
68
|
+
* Not possible to release locks unless push or abandon all changes. Should only be called internally.
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
[_releaseAllLocks]: () => Promise<void>;
|
|
72
|
+
}
|
|
73
|
+
//#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I,CAAC,CAAC;IAEjC;;;;OAIG;IACH,CAAC,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module iModels
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const Symbols_1 = require("./internal/Symbols");
|
|
11
|
+
//# sourceMappingURL=LockControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LockControl.js","sourceRoot":"","sources":["../../src/LockControl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAGH,gDAA6G","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 iModels\r\n */\r\n\r\nimport { Id64Arg, Id64String } from \"@itwin/core-bentley\";\r\nimport { _close, _elementWasCreated, _implementationProhibited, _releaseAllLocks } from \"./internal/Symbols\";\r\n\r\n/**\r\n * Interface for acquiring element locks to [coordinate simultaneous edits]($docs/learning/backend/ConcurrencyControl.md) from multiple briefcases.\r\n * @see [[IModelDb.locks]] to access the locks for an iModel.\r\n * @public\r\n */\r\nexport interface LockControl {\r\n /** @internal*/\r\n readonly [_implementationProhibited]: unknown;\r\n\r\n /**\r\n * true if this LockControl uses a server-based concurrency approach.\r\n */\r\n readonly isServerBased: boolean;\r\n\r\n /**\r\n * Close the local lock control database\r\n * @internal\r\n */\r\n [_close]: () => void;\r\n\r\n /**\r\n * Notification that a new element was just created. Called by [[Element.onInserted]]\r\n * @internal\r\n */\r\n [_elementWasCreated]: (id: Id64String) => void;\r\n\r\n /**\r\n * Throw if locks are required and the exclusive lock is not held on the supplied element.\r\n * Note: there is no need to check the shared locks on parents/models since an element cannot hold the exclusive lock without first obtaining them.\r\n * Called by functions like [[Element.onUpdate]], [[Element.onDelete]], etc.\r\n */\r\n checkExclusiveLock(id: Id64String, type: string, operation: string): void;\r\n\r\n /**\r\n * Throw if locks are required and a shared lock is not held on the supplied element.\r\n * Called by [[Element.onInsert]] to ensure shared lock is held on the new element's model and parent element.\r\n */\r\n checkSharedLock(id: Id64String, type: string, operation: string): void;\r\n\r\n /**\r\n * Determine whether the owning iModel currently holds the exclusive lock on the specified element.\r\n */\r\n holdsExclusiveLock(id: Id64String): boolean;\r\n\r\n /**\r\n * Determine whether the owning iModel currently holds a shared lock on the specified element.\r\n */\r\n holdsSharedLock(id: Id64String): boolean;\r\n\r\n /**\r\n * Acquire locks on one or more elements from the lock server, if required and not already held.\r\n * If any required lock is not available, this method throws an exception and *none* of the requested locks are acquired.\r\n * @note Acquiring the exclusive lock on an element requires also obtaining a shared lock on all its owner elements. This method will\r\n * attempt to acquire all necessary locks for both sets of input ids.\r\n */\r\n acquireLocks(arg: {\r\n /** if present, one or more elements to obtain shared lock */\r\n shared?: Id64Arg;\r\n /** if present, one or more elements to obtain exclusive lock */\r\n exclusive?: Id64Arg;\r\n }): Promise<void>;\r\n\r\n /** Release all locks currently held by this briefcase from the locker server.\r\n * This is typically done on your behalf by [[BriefcaseDb.pushChanges]].\r\n * You may want to do it manually when abandoning all of your briefcase's local changes.\r\n * You cannot release your locks if your briefcase contains local changes.\r\n * @throws Error if the briefcase has local changes, or if any other error occurs while releasing the locks.\r\n */\r\n releaseAllLocks(): Promise<void>;\r\n\r\n /**\r\n * Release all locks currently held by this Briefcase from the lock server.\r\n * Not possible to release locks unless push or abandon all changes. Should only be called internally.\r\n * @internal\r\n */\r\n [_releaseAllLocks]: () => Promise<void>;\r\n}\r\n"]}
|
package/lib/cjs/Material.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import { IModelElementCloneContext } from "./IModelElementCloneContext";
|
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
13
|
export declare abstract class PhysicalMaterial extends DefinitionElement {
|
|
14
|
-
/** @internal */
|
|
15
14
|
static get className(): string;
|
|
16
15
|
/** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.
|
|
17
16
|
* @param iModel The IModelDb
|
|
@@ -33,14 +32,12 @@ export declare abstract class PhysicalMaterial extends DefinitionElement {
|
|
|
33
32
|
* @public
|
|
34
33
|
*/
|
|
35
34
|
export declare class RenderMaterialElement extends DefinitionElement {
|
|
36
|
-
/** @internal */
|
|
37
35
|
static get className(): string;
|
|
38
36
|
/** The name of a palette that can be used to categorize multiple materials. */
|
|
39
37
|
paletteName: string;
|
|
40
38
|
/** An optional description of the material. */
|
|
41
39
|
description?: string;
|
|
42
|
-
|
|
43
|
-
constructor(props: RenderMaterialProps, iModel: IModelDb);
|
|
40
|
+
private constructor();
|
|
44
41
|
toJSON(): RenderMaterialProps;
|
|
45
42
|
/** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.
|
|
46
43
|
* @param iModel The IModelDb
|
|
@@ -68,7 +65,7 @@ export declare class RenderMaterialElement extends DefinitionElement {
|
|
|
68
65
|
* @throws [[IModelError]] if unable to insert the element.
|
|
69
66
|
*/
|
|
70
67
|
static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String;
|
|
71
|
-
/** @
|
|
68
|
+
/** @beta */
|
|
72
69
|
protected static onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps): void;
|
|
73
70
|
}
|
|
74
71
|
/** @public */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Material.d.ts","sourceRoot":"","sources":["../../src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AAO,CAAC,EAAE,MAAM,CAAC;QACxB,wBAAwB;QACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QAC/B;;;WAGG;QACI,UAAU,CAAC,EAAE,eAAe,CAAC;QACpC;;;;WAIG;QACI,SAAS,CAAC,EAAE,cAAc,GAAG;YAClC;;eAEG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;QAEF,gJAAgJ;oBAC7H,WAAW,EAAE,MAAM;KAGvC;CACF;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,qBAAqB,CAAC,MAAM;CAChF"}
|
package/lib/cjs/Material.js
CHANGED
|
@@ -17,7 +17,6 @@ const Element_1 = require("./Element");
|
|
|
17
17
|
* @public
|
|
18
18
|
*/
|
|
19
19
|
class PhysicalMaterial extends Element_1.DefinitionElement {
|
|
20
|
-
/** @internal */
|
|
21
20
|
static get className() { return "PhysicalMaterial"; }
|
|
22
21
|
/** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.
|
|
23
22
|
* @param iModel The IModelDb
|
|
@@ -50,9 +49,7 @@ exports.PhysicalMaterial = PhysicalMaterial;
|
|
|
50
49
|
* @public
|
|
51
50
|
*/
|
|
52
51
|
class RenderMaterialElement extends Element_1.DefinitionElement {
|
|
53
|
-
/** @internal */
|
|
54
52
|
static get className() { return "RenderMaterial"; }
|
|
55
|
-
/** @internal */
|
|
56
53
|
constructor(props, iModel) {
|
|
57
54
|
super(props, iModel);
|
|
58
55
|
this.paletteName = props.paletteName;
|
|
@@ -166,13 +163,18 @@ class RenderMaterialElement extends Element_1.DefinitionElement {
|
|
|
166
163
|
const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);
|
|
167
164
|
return iModelDb.elements.insertElement(renderMaterial.toJSON());
|
|
168
165
|
}
|
|
169
|
-
/** @
|
|
166
|
+
/** @beta */
|
|
170
167
|
static onCloned(context, sourceProps, targetProps) {
|
|
171
168
|
super.onCloned(context, sourceProps, targetProps);
|
|
172
169
|
for (const mapName in sourceProps.jsonProperties?.materialAssets?.renderMaterial?.Map ?? {}) {
|
|
173
170
|
if (typeof mapName !== "string")
|
|
174
171
|
continue;
|
|
175
172
|
const sourceMap = sourceProps.jsonProperties.materialAssets.renderMaterial.Map[mapName];
|
|
173
|
+
// sourceMap could be null/undefined, keep it the same in targetProps
|
|
174
|
+
if (!sourceMap) {
|
|
175
|
+
targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName] = sourceMap;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
176
178
|
if (!core_bentley_1.Id64.isValid(sourceMap.TextureId) || sourceMap.TextureId === undefined)
|
|
177
179
|
continue;
|
|
178
180
|
targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName].TextureId = context.findTargetElementId(sourceMap.TextureId ?? core_bentley_1.Id64.invalid);
|
package/lib/cjs/Material.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Material.js","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,oDAE4B;AAC5B,uCAA8C;AAI9C,yDAAyD;AAEzD;;;GAGG;AACH,MAAsB,gBAAiB,SAAQ,2BAAiB;IAC9D,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,kBAAkB,CAAC,CAAC,CAAC;IAC7E;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,MAAgB,EAAE,iBAAiC,EAAE,IAAY;QACxF,MAAM,QAAQ,GAAa,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,yBAAW,CAAC,gBAAgB,CAAC,CAAC;QACpF,OAAO,IAAI,kBAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChF,CAAC;IACD;;;;;;OAMG;IACI,MAAM,CAAC,MAA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AAC,SAAS,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,SAAS,KAAK,SAAS;gBACzE,SAAS;YACX,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,SAAS,IAAI,mBAAI,CAAC,OAAO,CAAC,CAAC;QACrJ,CAAC;IACH,CAAC;CACF;AAjJD,sDAiJC;AAED,cAAc;AACd,WAAiB,qBAAqB;IACpC;;;;OAIG;IACH,MAAa,MAAM;QA2CjB,gJAAgJ;QAChJ,YAAmB,WAAmB;YACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACjC,CAAC;KACF;IA/CY,4BAAM,SA+ClB,CAAA;AACH,CAAC,EAtDgB,qBAAqB,qCAArB,qBAAqB,QAsDrC","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 Elements\r\n */\r\n\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, ElementProps, NormalMapProps, RenderMaterialAssetMapsProps, RenderMaterialProps, RgbFactorProps, TextureMapProps,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** A PhysicalMaterial defines the matter that makes up physical elements.\r\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\r\n * @public\r\n */\r\nexport abstract class PhysicalMaterial extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"PhysicalMaterial\"; }\r\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n */\r\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\r\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\r\n }\r\n /** Create a PhysicalMaterial\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n * @returns The newly constructed PhysicalMaterial\r\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\r\n */\r\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n };\r\n return iModelDb.elements.createElement(elementProps);\r\n }\r\n}\r\n\r\n/** Defines a rendering material.\r\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\r\n * @public\r\n */\r\nexport class RenderMaterialElement extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"RenderMaterial\"; }\r\n\r\n /** The name of a palette that can be used to categorize multiple materials. */\r\n public paletteName: string;\r\n /** An optional description of the material. */\r\n public description?: string;\r\n /** @internal */\r\n constructor(props: RenderMaterialProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.paletteName = props.paletteName;\r\n this.description = props.description;\r\n }\r\n\r\n public override toJSON(): RenderMaterialProps {\r\n const val = super.toJSON() as RenderMaterialProps;\r\n val.paletteName = this.paletteName;\r\n val.description = this.description;\r\n return val;\r\n }\r\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\r\n * @param name The RenderMaterial name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.renderMaterial);\r\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\r\n }\r\n /**\r\n * Create a RenderMaterial with given parameters.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The newly constructed RenderMaterial element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): RenderMaterialElement {\r\n let maps: RenderMaterialAssetMapsProps | undefined;\r\n const pbr_normal = params.normalMap?.scale;\r\n if (params.patternMap || params.normalMap) {\r\n // If both normal and pattern map are present, their texture mapping modes, angles, scales, etc are expected to match.\r\n type TexMap = Omit<TextureMapProps, \"TextureId\">;\r\n function choose<K extends keyof TexMap>(obj: TexMap, key: K): void {\r\n const pat = params.patternMap;\r\n if (pat && undefined !== pat[key])\r\n obj[key] = pat[key];\r\n else if (params.normalMap && undefined !== params.normalMap[key])\r\n obj[key] = params.normalMap[key];\r\n }\r\n\r\n const baseProps: TexMap = {};\r\n choose(baseProps, \"pattern_angle\");\r\n choose(baseProps, \"pattern_u_flip\");\r\n choose(baseProps, \"pattern_flip\");\r\n choose(baseProps, \"pattern_scale\");\r\n choose(baseProps, \"pattern_offset\");\r\n choose(baseProps, \"pattern_scalemode\");\r\n choose(baseProps, \"pattern_mapping\");\r\n choose(baseProps, \"pattern_weight\");\r\n choose(baseProps, \"pattern_useconstantlod\");\r\n choose(baseProps, \"pattern_constantlod_repetitions\");\r\n choose(baseProps, \"pattern_constantlod_offset\");\r\n choose(baseProps, \"pattern_constantlod_mindistanceclamp\");\r\n choose(baseProps, \"pattern_constantlod_maxdistanceclamp\");\r\n\r\n maps = {};\r\n if (params.patternMap)\r\n maps.Pattern = { ...params.patternMap, ...baseProps };\r\n\r\n if (params.normalMap) {\r\n maps.Normal = {\r\n ...params.normalMap,\r\n ...baseProps,\r\n };\r\n\r\n delete (maps.Normal as any).scale;\r\n }\r\n }\r\n\r\n // const map = undefined !== params.patternMap ? { Pattern: params.patternMap } : undefined;\r\n const renderMaterialProps: RenderMaterialProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, materialName),\r\n paletteName: params.paletteName,\r\n description: params.description,\r\n jsonProperties: {\r\n materialAssets: {\r\n renderMaterial: {\r\n HasBaseColor: params.color !== undefined,\r\n color: params.color,\r\n HasSpecularColor: params.specularColor !== undefined,\r\n specular_color: params.specularColor,\r\n HasFinish: params.finish !== undefined,\r\n finish: params.finish,\r\n HasTransmit: params.transmit !== undefined,\r\n transmit: params.transmit,\r\n HasDiffuse: params.diffuse !== undefined,\r\n diffuse: params.diffuse,\r\n HasSpecular: params.specular !== undefined,\r\n specular: params.specular,\r\n HasReflect: params.reflect !== undefined,\r\n reflect: params.reflect,\r\n HasReflectColor: params.reflectColor !== undefined,\r\n reflect_color: params.reflectColor,\r\n Map: maps,\r\n pbr_normal,\r\n },\r\n },\r\n },\r\n model: definitionModelId,\r\n isPrivate: false,\r\n };\r\n\r\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a new RenderMaterial into a model.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new Texture into this DefinitionModel\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The Id of the newly inserted RenderMaterial element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String {\r\n const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);\r\n return iModelDb.elements.insertElement(renderMaterial.toJSON());\r\n }\r\n\r\n /** @internal */\r\n protected static override onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps) {\r\n super.onCloned(context, sourceProps, targetProps);\r\n for (const mapName in sourceProps.jsonProperties?.materialAssets?.renderMaterial?.Map ?? {}) {\r\n if (typeof mapName !== \"string\")\r\n continue;\r\n const sourceMap = sourceProps.jsonProperties.materialAssets.renderMaterial.Map[mapName];\r\n if (!Id64.isValid(sourceMap.TextureId) || sourceMap.TextureId === undefined)\r\n continue;\r\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName].TextureId = context.findTargetElementId(sourceMap.TextureId ?? Id64.invalid);\r\n }\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderMaterialElement { // eslint-disable-line no-redeclare\r\n /** Parameters used to construct a [[RenderMaterial]].\r\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\r\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\r\n * @deprecated in 3.6 because it is not useful to use a `class` - just use [[RenderMaterialElementParams]] directly instead.\r\n */\r\n export class Params {\r\n /** A required palette name that categorizes this RenderMaterial */\r\n public paletteName: string;\r\n /** An optional description of this RenderMaterial */\r\n public description?: string;\r\n /** If defined, the color to use for surface fill or diffuse illumination, overriding the surface's own color. */\r\n public color?: RgbFactorProps;\r\n /** The color to use for specular illumination. Default: black. */\r\n public specularColor?: RgbFactorProps;\r\n /** The specular exponent describing the surface's shininess, in the range 0 through 128.\r\n * Default: 0.\r\n */\r\n public finish?: number;\r\n /** A transparency to be applied to the surface, ranging from 0 (fully opaque) to 1 (fully transparent).\r\n * The surface's own transparency will be multiplied by `(1 - transmit)`. permitting the material to increase but not decrease the surface transparency.\r\n * Default: 13.5.\r\n */\r\n public transmit?: number;\r\n /** The surface's diffuse reflectivity from 0.0 to 1.0. Default: 0.6. */\r\n public diffuse?: number;\r\n /** The surface's specular reflectivity from 0.0 to 1.0. Default: 0.0. */\r\n public specular?: number;\r\n /** Currently unused. */\r\n public reflect?: number;\r\n /** Currently unused. */\r\n public reflectColor?: number[];\r\n /** Specifies a texture image to map onto the surface, replacing or mixing with the surface's own color and transparency.\r\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\r\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\r\n */\r\n public patternMap?: TextureMapProps;\r\n /** Specifies a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to apply to the surface to simulate more surface detail than is present in the\r\n * surface's geometry.\r\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\r\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\r\n */\r\n public normalMap?: NormalMapProps & {\r\n /** A factor by which to multiply the components of the normal vectors read from the texture.\r\n * Default: 1.\r\n */\r\n scale?: number;\r\n };\r\n\r\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\r\n public constructor(paletteName: string) {\r\n this.paletteName = paletteName;\r\n }\r\n }\r\n}\r\n\r\n/** Parameters used to create a [[RenderMaterial]] element.\r\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\r\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\r\n * @public\r\n */\r\nexport interface RenderMaterialElementParams extends RenderMaterialElement.Params { // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-empty-interface\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Material.js","sourceRoot":"","sources":["../../src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,EAtDgB,qBAAqB,qCAArB,qBAAqB,QAsDrC","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 Elements\r\n */\r\n\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, ElementProps, NormalMapProps, RenderMaterialAssetMapsProps, RenderMaterialProps, RgbFactorProps, TextureMapProps,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** A PhysicalMaterial defines the matter that makes up physical elements.\r\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\r\n * @public\r\n */\r\nexport abstract class PhysicalMaterial extends DefinitionElement {\r\n public static override get className(): string { return \"PhysicalMaterial\"; }\r\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n */\r\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\r\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\r\n }\r\n /** Create a PhysicalMaterial\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n * @returns The newly constructed PhysicalMaterial\r\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\r\n */\r\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n };\r\n return iModelDb.elements.createElement(elementProps);\r\n }\r\n}\r\n\r\n/** Defines a rendering material.\r\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\r\n * @public\r\n */\r\nexport class RenderMaterialElement extends DefinitionElement {\r\n public static override get className(): string { return \"RenderMaterial\"; }\r\n\r\n /** The name of a palette that can be used to categorize multiple materials. */\r\n public paletteName: string;\r\n /** An optional description of the material. */\r\n public description?: string;\r\n\r\n private constructor(props: RenderMaterialProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.paletteName = props.paletteName;\r\n this.description = props.description;\r\n }\r\n\r\n public override toJSON(): RenderMaterialProps {\r\n const val = super.toJSON() as RenderMaterialProps;\r\n val.paletteName = this.paletteName;\r\n val.description = this.description;\r\n return val;\r\n }\r\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\r\n * @param name The RenderMaterial name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.renderMaterial);\r\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\r\n }\r\n /**\r\n * Create a RenderMaterial with given parameters.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The newly constructed RenderMaterial element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): RenderMaterialElement {\r\n let maps: RenderMaterialAssetMapsProps | undefined;\r\n const pbr_normal = params.normalMap?.scale;\r\n if (params.patternMap || params.normalMap) {\r\n // If both normal and pattern map are present, their texture mapping modes, angles, scales, etc are expected to match.\r\n type TexMap = Omit<TextureMapProps, \"TextureId\">;\r\n function choose<K extends keyof TexMap>(obj: TexMap, key: K): void {\r\n const pat = params.patternMap;\r\n if (pat && undefined !== pat[key])\r\n obj[key] = pat[key];\r\n else if (params.normalMap && undefined !== params.normalMap[key])\r\n obj[key] = params.normalMap[key];\r\n }\r\n\r\n const baseProps: TexMap = {};\r\n choose(baseProps, \"pattern_angle\");\r\n choose(baseProps, \"pattern_u_flip\");\r\n choose(baseProps, \"pattern_flip\");\r\n choose(baseProps, \"pattern_scale\");\r\n choose(baseProps, \"pattern_offset\");\r\n choose(baseProps, \"pattern_scalemode\");\r\n choose(baseProps, \"pattern_mapping\");\r\n choose(baseProps, \"pattern_weight\");\r\n choose(baseProps, \"pattern_useconstantlod\");\r\n choose(baseProps, \"pattern_constantlod_repetitions\");\r\n choose(baseProps, \"pattern_constantlod_offset\");\r\n choose(baseProps, \"pattern_constantlod_mindistanceclamp\");\r\n choose(baseProps, \"pattern_constantlod_maxdistanceclamp\");\r\n\r\n maps = {};\r\n if (params.patternMap)\r\n maps.Pattern = { ...params.patternMap, ...baseProps };\r\n\r\n if (params.normalMap) {\r\n maps.Normal = {\r\n ...params.normalMap,\r\n ...baseProps,\r\n };\r\n\r\n delete (maps.Normal as any).scale;\r\n }\r\n }\r\n\r\n // const map = undefined !== params.patternMap ? { Pattern: params.patternMap } : undefined;\r\n const renderMaterialProps: RenderMaterialProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, materialName),\r\n paletteName: params.paletteName,\r\n description: params.description,\r\n jsonProperties: {\r\n materialAssets: {\r\n renderMaterial: {\r\n HasBaseColor: params.color !== undefined,\r\n color: params.color,\r\n HasSpecularColor: params.specularColor !== undefined,\r\n specular_color: params.specularColor,\r\n HasFinish: params.finish !== undefined,\r\n finish: params.finish,\r\n HasTransmit: params.transmit !== undefined,\r\n transmit: params.transmit,\r\n HasDiffuse: params.diffuse !== undefined,\r\n diffuse: params.diffuse,\r\n HasSpecular: params.specular !== undefined,\r\n specular: params.specular,\r\n HasReflect: params.reflect !== undefined,\r\n reflect: params.reflect,\r\n HasReflectColor: params.reflectColor !== undefined,\r\n reflect_color: params.reflectColor,\r\n Map: maps,\r\n pbr_normal,\r\n },\r\n },\r\n },\r\n model: definitionModelId,\r\n isPrivate: false,\r\n };\r\n\r\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a new RenderMaterial into a model.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new Texture into this DefinitionModel\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The Id of the newly inserted RenderMaterial element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String {\r\n const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);\r\n return iModelDb.elements.insertElement(renderMaterial.toJSON());\r\n }\r\n\r\n /** @beta */\r\n protected static override onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps) {\r\n super.onCloned(context, sourceProps, targetProps);\r\n for (const mapName in sourceProps.jsonProperties?.materialAssets?.renderMaterial?.Map ?? {}) {\r\n if (typeof mapName !== \"string\")\r\n continue;\r\n const sourceMap = sourceProps.jsonProperties.materialAssets.renderMaterial.Map[mapName];\r\n // sourceMap could be null/undefined, keep it the same in targetProps\r\n if (!sourceMap) {\r\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName] = sourceMap;\r\n continue;\r\n }\r\n if (!Id64.isValid(sourceMap.TextureId) || sourceMap.TextureId === undefined)\r\n continue;\r\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName].TextureId = context.findTargetElementId(sourceMap.TextureId ?? Id64.invalid);\r\n }\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderMaterialElement { // eslint-disable-line no-redeclare\r\n /** Parameters used to construct a [[RenderMaterial]].\r\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\r\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\r\n * @deprecated in 3.6 because it is not useful to use a `class` - just use [[RenderMaterialElementParams]] directly instead.\r\n */\r\n export class Params {\r\n /** A required palette name that categorizes this RenderMaterial */\r\n public paletteName: string;\r\n /** An optional description of this RenderMaterial */\r\n public description?: string;\r\n /** If defined, the color to use for surface fill or diffuse illumination, overriding the surface's own color. */\r\n public color?: RgbFactorProps;\r\n /** The color to use for specular illumination. Default: black. */\r\n public specularColor?: RgbFactorProps;\r\n /** The specular exponent describing the surface's shininess, in the range 0 through 128.\r\n * Default: 0.\r\n */\r\n public finish?: number;\r\n /** A transparency to be applied to the surface, ranging from 0 (fully opaque) to 1 (fully transparent).\r\n * The surface's own transparency will be multiplied by `(1 - transmit)`. permitting the material to increase but not decrease the surface transparency.\r\n * Default: 13.5.\r\n */\r\n public transmit?: number;\r\n /** The surface's diffuse reflectivity from 0.0 to 1.0. Default: 0.6. */\r\n public diffuse?: number;\r\n /** The surface's specular reflectivity from 0.0 to 1.0. Default: 0.0. */\r\n public specular?: number;\r\n /** Currently unused. */\r\n public reflect?: number;\r\n /** Currently unused. */\r\n public reflectColor?: number[];\r\n /** Specifies a texture image to map onto the surface, replacing or mixing with the surface's own color and transparency.\r\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\r\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\r\n */\r\n public patternMap?: TextureMapProps;\r\n /** Specifies a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to apply to the surface to simulate more surface detail than is present in the\r\n * surface's geometry.\r\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\r\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\r\n */\r\n public normalMap?: NormalMapProps & {\r\n /** A factor by which to multiply the components of the normal vectors read from the texture.\r\n * Default: 1.\r\n */\r\n scale?: number;\r\n };\r\n\r\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\r\n public constructor(paletteName: string) {\r\n this.paletteName = paletteName;\r\n }\r\n }\r\n}\r\n\r\n/** Parameters used to create a [[RenderMaterial]] element.\r\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\r\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\r\n * @public\r\n */\r\nexport interface RenderMaterialElementParams extends RenderMaterialElement.Params { // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-empty-interface\r\n}\r\n"]}
|
package/lib/cjs/Model.d.ts
CHANGED
|
@@ -47,7 +47,6 @@ export interface OnElementInModelIdArg extends OnModelIdArg {
|
|
|
47
47
|
* @public
|
|
48
48
|
*/
|
|
49
49
|
export declare class Model extends Entity {
|
|
50
|
-
/** @internal */
|
|
51
50
|
static get className(): string;
|
|
52
51
|
/** @internal */
|
|
53
52
|
static get protectedOperations(): string[];
|
|
@@ -161,7 +160,6 @@ export declare class Model extends Entity {
|
|
|
161
160
|
*/
|
|
162
161
|
export declare class GeometricModel extends Model {
|
|
163
162
|
geometryGuid?: GuidString;
|
|
164
|
-
/** @internal */
|
|
165
163
|
static get className(): string;
|
|
166
164
|
protected constructor(props: GeometricModelProps, iModel: IModelDb);
|
|
167
165
|
/** Query for the union of the extents of the elements contained by this model.
|
|
@@ -185,7 +183,6 @@ export declare abstract class GeometricModel3d extends GeometricModel {
|
|
|
185
183
|
readonly isNotSpatiallyLocated: boolean;
|
|
186
184
|
/** If true, then the elements in this GeometricModel3d are in real-world coordinates and will be in the spatial index. */
|
|
187
185
|
get isSpatiallyLocated(): boolean;
|
|
188
|
-
/** @internal */
|
|
189
186
|
static get className(): string;
|
|
190
187
|
protected constructor(props: GeometricModel3dProps, iModel: IModelDb);
|
|
191
188
|
toJSON(): GeometricModel3dProps;
|
|
@@ -196,7 +193,6 @@ export declare abstract class GeometricModel3d extends GeometricModel {
|
|
|
196
193
|
export declare abstract class GeometricModel2d extends GeometricModel {
|
|
197
194
|
/** The actual coordinates of (0,0) in modeling coordinates. An offset applied to all modeling coordinates. */
|
|
198
195
|
globalOrigin?: Point2d;
|
|
199
|
-
/** @internal */
|
|
200
196
|
static get className(): string;
|
|
201
197
|
protected constructor(props: GeometricModel2dProps, iModel: IModelDb);
|
|
202
198
|
toJSON(): GeometricModel2dProps;
|
|
@@ -205,7 +201,6 @@ export declare abstract class GeometricModel2d extends GeometricModel {
|
|
|
205
201
|
* @public
|
|
206
202
|
*/
|
|
207
203
|
export declare abstract class GraphicalModel2d extends GeometricModel2d {
|
|
208
|
-
/** @internal */
|
|
209
204
|
static get className(): string;
|
|
210
205
|
}
|
|
211
206
|
/** A container for persisting GraphicalElement3d instances.
|
|
@@ -214,14 +209,12 @@ export declare abstract class GraphicalModel2d extends GeometricModel2d {
|
|
|
214
209
|
* @public
|
|
215
210
|
*/
|
|
216
211
|
export declare abstract class GraphicalModel3d extends GeometricModel3d {
|
|
217
|
-
/** @internal */
|
|
218
212
|
static get className(): string;
|
|
219
213
|
}
|
|
220
214
|
/** A container for persisting 3d geometric elements that are spatially located.
|
|
221
215
|
* @public
|
|
222
216
|
*/
|
|
223
217
|
export declare abstract class SpatialModel extends GeometricModel3d {
|
|
224
|
-
/** @internal */
|
|
225
218
|
static get className(): string;
|
|
226
219
|
}
|
|
227
220
|
/** A container for persisting physical elements that model physical space.
|
|
@@ -229,7 +222,6 @@ export declare abstract class SpatialModel extends GeometricModel3d {
|
|
|
229
222
|
* @public
|
|
230
223
|
*/
|
|
231
224
|
export declare class PhysicalModel extends SpatialModel {
|
|
232
|
-
/** @internal */
|
|
233
225
|
static get className(): string;
|
|
234
226
|
/** Insert a PhysicalPartition and a PhysicalModel that sub-models it.
|
|
235
227
|
* @param iModelDb Insert into this iModel
|
|
@@ -246,7 +238,6 @@ export declare class PhysicalModel extends SpatialModel {
|
|
|
246
238
|
* @public
|
|
247
239
|
*/
|
|
248
240
|
export declare class SpatialLocationModel extends SpatialModel {
|
|
249
|
-
/** @internal */
|
|
250
241
|
static get className(): string;
|
|
251
242
|
/** Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it.
|
|
252
243
|
* @param iModelDb Insert into this iModel
|
|
@@ -262,14 +253,12 @@ export declare class SpatialLocationModel extends SpatialModel {
|
|
|
262
253
|
* @public
|
|
263
254
|
*/
|
|
264
255
|
export declare class DrawingModel extends GraphicalModel2d {
|
|
265
|
-
/** @internal */
|
|
266
256
|
static get className(): string;
|
|
267
257
|
}
|
|
268
258
|
/** A container for persisting section [[DrawingGraphic]]s.
|
|
269
259
|
* @public
|
|
270
260
|
*/
|
|
271
261
|
export declare class SectionDrawingModel extends DrawingModel {
|
|
272
|
-
/** @internal */
|
|
273
262
|
static get className(): string;
|
|
274
263
|
}
|
|
275
264
|
/** A container for persisting [[ViewAttachment]]s and [[DrawingGraphic]]s.
|
|
@@ -278,21 +267,18 @@ export declare class SectionDrawingModel extends DrawingModel {
|
|
|
278
267
|
* @public
|
|
279
268
|
*/
|
|
280
269
|
export declare class SheetModel extends GraphicalModel2d {
|
|
281
|
-
/** @internal */
|
|
282
270
|
static get className(): string;
|
|
283
271
|
}
|
|
284
272
|
/** A container for persisting role elements.
|
|
285
273
|
* @public
|
|
286
274
|
*/
|
|
287
275
|
export declare class RoleModel extends Model {
|
|
288
|
-
/** @internal */
|
|
289
276
|
static get className(): string;
|
|
290
277
|
}
|
|
291
278
|
/** A container for persisting information elements.
|
|
292
279
|
* @public
|
|
293
280
|
*/
|
|
294
281
|
export declare abstract class InformationModel extends Model {
|
|
295
|
-
/** @internal */
|
|
296
282
|
static get className(): string;
|
|
297
283
|
}
|
|
298
284
|
/** A container for persisting group information elements.
|
|
@@ -300,7 +286,6 @@ export declare abstract class InformationModel extends Model {
|
|
|
300
286
|
* @public
|
|
301
287
|
*/
|
|
302
288
|
export declare abstract class GroupInformationModel extends InformationModel {
|
|
303
|
-
/** @internal */
|
|
304
289
|
static get className(): string;
|
|
305
290
|
}
|
|
306
291
|
/** A container for persisting Information Record Elements
|
|
@@ -308,7 +293,6 @@ export declare abstract class GroupInformationModel extends InformationModel {
|
|
|
308
293
|
* @public
|
|
309
294
|
*/
|
|
310
295
|
export declare class InformationRecordModel extends InformationModel {
|
|
311
|
-
/** @internal */
|
|
312
296
|
static get className(): string;
|
|
313
297
|
/** Insert a InformationRecordPartition and a InformationRecordModel that sub-models it.
|
|
314
298
|
* @param iModelDb Insert into this iModel
|
|
@@ -324,7 +308,6 @@ export declare class InformationRecordModel extends InformationModel {
|
|
|
324
308
|
* @public
|
|
325
309
|
*/
|
|
326
310
|
export declare class DefinitionModel extends InformationModel {
|
|
327
|
-
/** @internal */
|
|
328
311
|
static get className(): string;
|
|
329
312
|
/** Insert a DefinitionPartition and a DefinitionModel that sub-models it.
|
|
330
313
|
* @param iModelDb Insert into this iModel
|
|
@@ -339,7 +322,6 @@ export declare class DefinitionModel extends InformationModel {
|
|
|
339
322
|
* @public
|
|
340
323
|
*/
|
|
341
324
|
export declare class RepositoryModel extends DefinitionModel {
|
|
342
|
-
/** @internal */
|
|
343
325
|
static get className(): string;
|
|
344
326
|
}
|
|
345
327
|
/** Contains a list of document elements.
|
|
@@ -347,7 +329,6 @@ export declare class RepositoryModel extends DefinitionModel {
|
|
|
347
329
|
* @public
|
|
348
330
|
*/
|
|
349
331
|
export declare class DocumentListModel extends InformationModel {
|
|
350
|
-
/** @internal */
|
|
351
332
|
static get className(): string;
|
|
352
333
|
/** Insert a DocumentPartition and a DocumentListModel that sub-models it.
|
|
353
334
|
* @param iModelDb Insert into this iModel
|
|
@@ -363,21 +344,18 @@ export declare class DocumentListModel extends InformationModel {
|
|
|
363
344
|
* @public
|
|
364
345
|
*/
|
|
365
346
|
export declare class LinkModel extends InformationModel {
|
|
366
|
-
/** @internal */
|
|
367
347
|
static get className(): string;
|
|
368
348
|
}
|
|
369
349
|
/** The singleton container for repository-specific definition elements.
|
|
370
350
|
* @public
|
|
371
351
|
*/
|
|
372
352
|
export declare class DictionaryModel extends DefinitionModel {
|
|
373
|
-
/** @internal */
|
|
374
353
|
static get className(): string;
|
|
375
354
|
}
|
|
376
355
|
/** Obtains and displays multi-resolution tiled raster organized according to the WebMercator tiling system.
|
|
377
356
|
* @public
|
|
378
357
|
*/
|
|
379
358
|
export declare class WebMercatorModel extends SpatialModel {
|
|
380
|
-
/** @internal */
|
|
381
359
|
static get className(): string;
|
|
382
360
|
}
|
|
383
361
|
//# sourceMappingURL=Model.d.ts.map
|
package/lib/cjs/Model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../src/Model.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAa,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAW,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EACnF,UAAU,EAAE,cAAc,EAC7D,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"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