@itwin/editor-common 5.5.0-dev.2 → 5.5.0-dev.4
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 +6 -1
- package/lib/cjs/EditorBuiltInIpc.js.map +1 -1
- package/lib/cjs/EditorIpc.js.map +1 -1
- package/lib/cjs/editor-common.js.map +1 -1
- package/lib/esm/EditorBuiltInIpc.js.map +1 -1
- package/lib/esm/EditorIpc.js.map +1 -1
- package/lib/esm/editor-common.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# Change Log - @itwin/editor-common
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 02 Dec 2025 23:11:57 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.4.0
|
|
6
|
+
Tue, 02 Dec 2025 21:22:25 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
4
9
|
|
|
5
10
|
## 5.3.3
|
|
6
11
|
Thu, 20 Nov 2025 22:30:37 GMT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorBuiltInIpc.js","sourceRoot":"","sources":["../../src/EditorBuiltInIpc.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;GAEG;AACU,QAAA,mBAAmB,GAAG;IACjC,oBAAoB,EAAE,mBAAmB;CAC1C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Editing\n */\n\nimport { CompressedId64Set, Id64String, IModelStatus } from \"@itwin/core-bentley\";\nimport { Matrix3dProps, Range3dProps, TransformProps } from \"@itwin/core-geometry\";\nimport { EcefLocationProps, ElementGeometryBuilderParams, ElementGeometryInfo, ElementGeometryOpcode, GeometricElementProps, GeometryPartProps } from \"@itwin/core-common\";\nimport { EditCommandIpc } from \"./EditorIpc\";\n\n/** Command ids for built in EditCommandIpc classes.\n * @beta\n */\nexport const editorBuiltInCmdIds = {\n cmdBasicManipulation: \"basicManipulation\",\n};\n\n/** Optional criteria for requesting a GeometryStream from the backend.\n * @beta\n */\nexport interface FlatBufferGeometryFilter {\n /** Optional limit on number of displayable entries to accept */\n maxDisplayable?: number;\n /** Optional array of displayable opCodes to accept */\n accept?: ElementGeometryOpcode[];\n /** Optional array of displayable opCodes to reject */\n reject?: ElementGeometryOpcode[];\n /** Optional geometry type filter\n * curves - true to accept single curves and paths\n * surfaces - true to accept loops, planar regions, open polyfaces, and sheet bodies\n * solids - true to accept capped solids, closed polyfaces, and solid bodies\n */\n geometry?: { curves: boolean, surfaces: boolean, solids: boolean };\n}\n\n/** Interface for a backend EditCommand command that provides basic creation and modification operations.\n * @beta\n */\nexport interface BasicManipulationCommandIpc extends EditCommandIpc {\n addAllowedChannel(channelKey: string): Promise<void>;\n removeAllowedChannel(channelKey: string): Promise<void>;\n deleteElements(ids: CompressedId64Set): Promise<IModelStatus>;\n transformPlacement(ids: CompressedId64Set, transform: TransformProps): Promise<IModelStatus>;\n rotatePlacement(ids: CompressedId64Set, matrix: Matrix3dProps, aboutCenter: boolean): Promise<IModelStatus>;\n\n /** Create and insert a new geometric element.\n * @param props Properties for the new [GeometricElement]($backend)\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\n * @throws [[IModelError]] if unable to insert the element\n */\n insertGeometricElement(props: GeometricElementProps): Promise<Id64String>;\n\n /** Create and insert a new geometry part element.\n * @param props Properties for the new [GeometryPart]($backend)\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\n * @throws [[IModelError]] if unable to insert the element\n */\n insertGeometryPart(props: GeometryPartProps): Promise<Id64String>;\n\n /** Update an existing geometric element.\n * @param propsOrId Properties or element id to update for an existing [GeometricElement]($backend)\n * @param data Optional binary format GeometryStream representation used in lieu of [[GeometricElementProps.geom]] or [[GeometricElementProps.elementGeometryBuilderParams]].\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\n * @throws [[IModelError]] if unable to update the element\n */\n updateGeometricElement(propsOrId: GeometricElementProps | Id64String, data?: ElementGeometryBuilderParams): Promise<void>;\n\n /** Request geometry from an existing element. Because a GeometryStream can be large and may contain information\n * that is not always useful to frontend code, filter options are provided to restrict what GeometryStreams are returned.\n * For example, a tool may only be interested in a GeometryStream that stores a single CurveCollection.\n * @param id Element id of an existing [GeometricElement]($backend) or [GeometryPart]($backend).\n * @param filter Optional criteria for accepting a GeometryStream.\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\n * @throws [[IModelError]] if unable to query the element\n */\n requestElementGeometry(id: Id64String, filter?: FlatBufferGeometryFilter): Promise<ElementGeometryInfo | undefined>;\n\n /** Update the project extents for the iModel.\n * @param extents New project extents.\n * @throws [[IModelError]] if unable to aquire schema lock or update the extents property.\n */\n updateProjectExtents(extents: Range3dProps): Promise<void>;\n\n /** Update the position of the iModel on the earth.\n * @param ecefLocation New ecef location properties.\n * @throws [[IModelError]] if unable to aquire schema lock or update the ecef location property.\n * @note Clears the geographic coordinate reference system of the iModel, do not call when a valid GCS exists.\n */\n updateEcefLocation(ecefLocation: EcefLocationProps): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"EditorBuiltInIpc.js","sourceRoot":"","sources":["../../src/EditorBuiltInIpc.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;GAEG;AACU,QAAA,mBAAmB,GAAG;IACjC,oBAAoB,EAAE,mBAAmB;CAC1C,CAAC","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 Editing\r\n */\r\n\r\nimport { CompressedId64Set, Id64String, IModelStatus } from \"@itwin/core-bentley\";\r\nimport { Matrix3dProps, Range3dProps, TransformProps } from \"@itwin/core-geometry\";\r\nimport { EcefLocationProps, ElementGeometryBuilderParams, ElementGeometryInfo, ElementGeometryOpcode, GeometricElementProps, GeometryPartProps } from \"@itwin/core-common\";\r\nimport { EditCommandIpc } from \"./EditorIpc\";\r\n\r\n/** Command ids for built in EditCommandIpc classes.\r\n * @beta\r\n */\r\nexport const editorBuiltInCmdIds = {\r\n cmdBasicManipulation: \"basicManipulation\",\r\n};\r\n\r\n/** Optional criteria for requesting a GeometryStream from the backend.\r\n * @beta\r\n */\r\nexport interface FlatBufferGeometryFilter {\r\n /** Optional limit on number of displayable entries to accept */\r\n maxDisplayable?: number;\r\n /** Optional array of displayable opCodes to accept */\r\n accept?: ElementGeometryOpcode[];\r\n /** Optional array of displayable opCodes to reject */\r\n reject?: ElementGeometryOpcode[];\r\n /** Optional geometry type filter\r\n * curves - true to accept single curves and paths\r\n * surfaces - true to accept loops, planar regions, open polyfaces, and sheet bodies\r\n * solids - true to accept capped solids, closed polyfaces, and solid bodies\r\n */\r\n geometry?: { curves: boolean, surfaces: boolean, solids: boolean };\r\n}\r\n\r\n/** Interface for a backend EditCommand command that provides basic creation and modification operations.\r\n * @beta\r\n */\r\nexport interface BasicManipulationCommandIpc extends EditCommandIpc {\r\n addAllowedChannel(channelKey: string): Promise<void>;\r\n removeAllowedChannel(channelKey: string): Promise<void>;\r\n deleteElements(ids: CompressedId64Set): Promise<IModelStatus>;\r\n transformPlacement(ids: CompressedId64Set, transform: TransformProps): Promise<IModelStatus>;\r\n rotatePlacement(ids: CompressedId64Set, matrix: Matrix3dProps, aboutCenter: boolean): Promise<IModelStatus>;\r\n\r\n /** Create and insert a new geometric element.\r\n * @param props Properties for the new [GeometricElement]($backend)\r\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\r\n * @throws [[IModelError]] if unable to insert the element\r\n */\r\n insertGeometricElement(props: GeometricElementProps): Promise<Id64String>;\r\n\r\n /** Create and insert a new geometry part element.\r\n * @param props Properties for the new [GeometryPart]($backend)\r\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\r\n * @throws [[IModelError]] if unable to insert the element\r\n */\r\n insertGeometryPart(props: GeometryPartProps): Promise<Id64String>;\r\n\r\n /** Update an existing geometric element.\r\n * @param propsOrId Properties or element id to update for an existing [GeometricElement]($backend)\r\n * @param data Optional binary format GeometryStream representation used in lieu of [[GeometricElementProps.geom]] or [[GeometricElementProps.elementGeometryBuilderParams]].\r\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\r\n * @throws [[IModelError]] if unable to update the element\r\n */\r\n updateGeometricElement(propsOrId: GeometricElementProps | Id64String, data?: ElementGeometryBuilderParams): Promise<void>;\r\n\r\n /** Request geometry from an existing element. Because a GeometryStream can be large and may contain information\r\n * that is not always useful to frontend code, filter options are provided to restrict what GeometryStreams are returned.\r\n * For example, a tool may only be interested in a GeometryStream that stores a single CurveCollection.\r\n * @param id Element id of an existing [GeometricElement]($backend) or [GeometryPart]($backend).\r\n * @param filter Optional criteria for accepting a GeometryStream.\r\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\r\n * @throws [[IModelError]] if unable to query the element\r\n */\r\n requestElementGeometry(id: Id64String, filter?: FlatBufferGeometryFilter): Promise<ElementGeometryInfo | undefined>;\r\n\r\n /** Update the project extents for the iModel.\r\n * @param extents New project extents.\r\n * @throws [[IModelError]] if unable to aquire schema lock or update the extents property.\r\n */\r\n updateProjectExtents(extents: Range3dProps): Promise<void>;\r\n\r\n /** Update the position of the iModel on the earth.\r\n * @param ecefLocation New ecef location properties.\r\n * @throws [[IModelError]] if unable to aquire schema lock or update the ecef location property.\r\n * @note Clears the geographic coordinate reference system of the iModel, do not call when a valid GCS exists.\r\n */\r\n updateEcefLocation(ecefLocation: EcefLocationProps): Promise<void>;\r\n}\r\n"]}
|
package/lib/cjs/EditorIpc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorIpc.js","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gBAAgB;AACH,QAAA,gBAAgB,GAAG;IAC9B,OAAO,EAAE,qBAAqB;IAC9B,WAAW,EAAE,iBAAiB;CACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Editing\n */\n\n/** @internal */\nexport const editorIpcStrings = {\n channel: \"itwinjs-core/editor\",\n commandBusy: \"EditCommandBusy\",\n} as const;\n\n/**\n * Interface called from frontend `EditTool`s to start and drive the active `EditCommand` on the backend.\n * @beta\n */\nexport interface EditorIpc {\n\n /** Start a new instance of an `EditCommand` on the backend, and then call its `onStart` method.\n * @param commandId the Id of a registered `EditCommand` on the backend. If commandId === \"\", the current command is\n * requested to finish but no new EditCommand is started.\n * @param iModelKey the key that identifies the iModel that the EditCommand modifies.\n * @param args arguments passed to the constructor of the new `EditCommand`\n * @return the value returned by the new `EditCommand`'s `onStart` method.\n * @note The current `EditCommand` (if one is active) is asked to finish and clean up its operation via `EditCommand.requestFinish`\n * before the new `EditCommand` is constructed. If it cannot finish immediately, it may return a string that identifies\n * the work it is performing for `EditTools.busyHandler` to retry and/or display.\n */\n startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>;\n\n /** Call a method on the currently active `EditCommand` and return its value.\n * @param name the name of the method to invoke.\n * @param args arguments passed to the method.\n * @note throws an exception if there is no active `EditCommand`, or if the active EditCommand does not implement the supplied method. */\n callMethod: (name: string, ...args: any[]) => Promise<any>;\n}\n\n/**\n * Interface implemented by all backend `EditCommands`.\n * @beta\n */\nexport interface EditCommandIpc {\n /** Identify the current `EditCommand`'s name and version, optionally returning additional properties that describe its state. */\n ping: () => Promise<{ commandId: string, version: string, [propName: string]: any }>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"EditorIpc.js","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gBAAgB;AACH,QAAA,gBAAgB,GAAG;IAC9B,OAAO,EAAE,qBAAqB;IAC9B,WAAW,EAAE,iBAAiB;CACtB,CAAC","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 Editing\r\n */\r\n\r\n/** @internal */\r\nexport const editorIpcStrings = {\r\n channel: \"itwinjs-core/editor\",\r\n commandBusy: \"EditCommandBusy\",\r\n} as const;\r\n\r\n/**\r\n * Interface called from frontend `EditTool`s to start and drive the active `EditCommand` on the backend.\r\n * @beta\r\n */\r\nexport interface EditorIpc {\r\n\r\n /** Start a new instance of an `EditCommand` on the backend, and then call its `onStart` method.\r\n * @param commandId the Id of a registered `EditCommand` on the backend. If commandId === \"\", the current command is\r\n * requested to finish but no new EditCommand is started.\r\n * @param iModelKey the key that identifies the iModel that the EditCommand modifies.\r\n * @param args arguments passed to the constructor of the new `EditCommand`\r\n * @return the value returned by the new `EditCommand`'s `onStart` method.\r\n * @note The current `EditCommand` (if one is active) is asked to finish and clean up its operation via `EditCommand.requestFinish`\r\n * before the new `EditCommand` is constructed. If it cannot finish immediately, it may return a string that identifies\r\n * the work it is performing for `EditTools.busyHandler` to retry and/or display.\r\n */\r\n startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>;\r\n\r\n /** Call a method on the currently active `EditCommand` and return its value.\r\n * @param name the name of the method to invoke.\r\n * @param args arguments passed to the method.\r\n * @note throws an exception if there is no active `EditCommand`, or if the active EditCommand does not implement the supplied method. */\r\n callMethod: (name: string, ...args: any[]) => Promise<any>;\r\n}\r\n\r\n/**\r\n * Interface implemented by all backend `EditCommands`.\r\n * @beta\r\n */\r\nexport interface EditCommandIpc {\r\n /** Identify the current `EditCommand`'s name and version, optionally returning additional properties that describe its state. */\r\n ping: () => Promise<{ commandId: string, version: string, [propName: string]: any }>;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-common.js","sourceRoot":"","sources":["../../src/editor-common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,8CAA4B;AAC5B,qDAAmC;AAEnC;;GAEG;AAEH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./EditorIpc\";\nexport * from \"./EditorBuiltInIpc\";\n\n/** @docs-package-description\n * The editor-common package contains common functionality for editing iModels.\n */\n\n/**\n * @docs-group-description Editing\n * Classes containing functionality for Editing iModels common to the front and backends, including IPC.\n */\n"]}
|
|
1
|
+
{"version":3,"file":"editor-common.js","sourceRoot":"","sources":["../../src/editor-common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,8CAA4B;AAC5B,qDAAmC;AAEnC;;GAEG;AAEH;;;GAGG","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\nexport * from \"./EditorIpc\";\r\nexport * from \"./EditorBuiltInIpc\";\r\n\r\n/** @docs-package-description\r\n * The editor-common package contains common functionality for editing iModels.\r\n */\r\n\r\n/**\r\n * @docs-group-description Editing\r\n * Classes containing functionality for Editing iModels common to the front and backends, including IPC.\r\n */\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorBuiltInIpc.js","sourceRoot":"","sources":["../../src/EditorBuiltInIpc.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,oBAAoB,EAAE,mBAAmB;CAC1C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Editing\n */\n\nimport { CompressedId64Set, Id64String, IModelStatus } from \"@itwin/core-bentley\";\nimport { Matrix3dProps, Range3dProps, TransformProps } from \"@itwin/core-geometry\";\nimport { EcefLocationProps, ElementGeometryBuilderParams, ElementGeometryInfo, ElementGeometryOpcode, GeometricElementProps, GeometryPartProps } from \"@itwin/core-common\";\nimport { EditCommandIpc } from \"./EditorIpc\";\n\n/** Command ids for built in EditCommandIpc classes.\n * @beta\n */\nexport const editorBuiltInCmdIds = {\n cmdBasicManipulation: \"basicManipulation\",\n};\n\n/** Optional criteria for requesting a GeometryStream from the backend.\n * @beta\n */\nexport interface FlatBufferGeometryFilter {\n /** Optional limit on number of displayable entries to accept */\n maxDisplayable?: number;\n /** Optional array of displayable opCodes to accept */\n accept?: ElementGeometryOpcode[];\n /** Optional array of displayable opCodes to reject */\n reject?: ElementGeometryOpcode[];\n /** Optional geometry type filter\n * curves - true to accept single curves and paths\n * surfaces - true to accept loops, planar regions, open polyfaces, and sheet bodies\n * solids - true to accept capped solids, closed polyfaces, and solid bodies\n */\n geometry?: { curves: boolean, surfaces: boolean, solids: boolean };\n}\n\n/** Interface for a backend EditCommand command that provides basic creation and modification operations.\n * @beta\n */\nexport interface BasicManipulationCommandIpc extends EditCommandIpc {\n addAllowedChannel(channelKey: string): Promise<void>;\n removeAllowedChannel(channelKey: string): Promise<void>;\n deleteElements(ids: CompressedId64Set): Promise<IModelStatus>;\n transformPlacement(ids: CompressedId64Set, transform: TransformProps): Promise<IModelStatus>;\n rotatePlacement(ids: CompressedId64Set, matrix: Matrix3dProps, aboutCenter: boolean): Promise<IModelStatus>;\n\n /** Create and insert a new geometric element.\n * @param props Properties for the new [GeometricElement]($backend)\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\n * @throws [[IModelError]] if unable to insert the element\n */\n insertGeometricElement(props: GeometricElementProps): Promise<Id64String>;\n\n /** Create and insert a new geometry part element.\n * @param props Properties for the new [GeometryPart]($backend)\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\n * @throws [[IModelError]] if unable to insert the element\n */\n insertGeometryPart(props: GeometryPartProps): Promise<Id64String>;\n\n /** Update an existing geometric element.\n * @param propsOrId Properties or element id to update for an existing [GeometricElement]($backend)\n * @param data Optional binary format GeometryStream representation used in lieu of [[GeometricElementProps.geom]] or [[GeometricElementProps.elementGeometryBuilderParams]].\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\n * @throws [[IModelError]] if unable to update the element\n */\n updateGeometricElement(propsOrId: GeometricElementProps | Id64String, data?: ElementGeometryBuilderParams): Promise<void>;\n\n /** Request geometry from an existing element. Because a GeometryStream can be large and may contain information\n * that is not always useful to frontend code, filter options are provided to restrict what GeometryStreams are returned.\n * For example, a tool may only be interested in a GeometryStream that stores a single CurveCollection.\n * @param id Element id of an existing [GeometricElement]($backend) or [GeometryPart]($backend).\n * @param filter Optional criteria for accepting a GeometryStream.\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\n * @throws [[IModelError]] if unable to query the element\n */\n requestElementGeometry(id: Id64String, filter?: FlatBufferGeometryFilter): Promise<ElementGeometryInfo | undefined>;\n\n /** Update the project extents for the iModel.\n * @param extents New project extents.\n * @throws [[IModelError]] if unable to aquire schema lock or update the extents property.\n */\n updateProjectExtents(extents: Range3dProps): Promise<void>;\n\n /** Update the position of the iModel on the earth.\n * @param ecefLocation New ecef location properties.\n * @throws [[IModelError]] if unable to aquire schema lock or update the ecef location property.\n * @note Clears the geographic coordinate reference system of the iModel, do not call when a valid GCS exists.\n */\n updateEcefLocation(ecefLocation: EcefLocationProps): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"EditorBuiltInIpc.js","sourceRoot":"","sources":["../../src/EditorBuiltInIpc.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,oBAAoB,EAAE,mBAAmB;CAC1C,CAAC","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 Editing\r\n */\r\n\r\nimport { CompressedId64Set, Id64String, IModelStatus } from \"@itwin/core-bentley\";\r\nimport { Matrix3dProps, Range3dProps, TransformProps } from \"@itwin/core-geometry\";\r\nimport { EcefLocationProps, ElementGeometryBuilderParams, ElementGeometryInfo, ElementGeometryOpcode, GeometricElementProps, GeometryPartProps } from \"@itwin/core-common\";\r\nimport { EditCommandIpc } from \"./EditorIpc\";\r\n\r\n/** Command ids for built in EditCommandIpc classes.\r\n * @beta\r\n */\r\nexport const editorBuiltInCmdIds = {\r\n cmdBasicManipulation: \"basicManipulation\",\r\n};\r\n\r\n/** Optional criteria for requesting a GeometryStream from the backend.\r\n * @beta\r\n */\r\nexport interface FlatBufferGeometryFilter {\r\n /** Optional limit on number of displayable entries to accept */\r\n maxDisplayable?: number;\r\n /** Optional array of displayable opCodes to accept */\r\n accept?: ElementGeometryOpcode[];\r\n /** Optional array of displayable opCodes to reject */\r\n reject?: ElementGeometryOpcode[];\r\n /** Optional geometry type filter\r\n * curves - true to accept single curves and paths\r\n * surfaces - true to accept loops, planar regions, open polyfaces, and sheet bodies\r\n * solids - true to accept capped solids, closed polyfaces, and solid bodies\r\n */\r\n geometry?: { curves: boolean, surfaces: boolean, solids: boolean };\r\n}\r\n\r\n/** Interface for a backend EditCommand command that provides basic creation and modification operations.\r\n * @beta\r\n */\r\nexport interface BasicManipulationCommandIpc extends EditCommandIpc {\r\n addAllowedChannel(channelKey: string): Promise<void>;\r\n removeAllowedChannel(channelKey: string): Promise<void>;\r\n deleteElements(ids: CompressedId64Set): Promise<IModelStatus>;\r\n transformPlacement(ids: CompressedId64Set, transform: TransformProps): Promise<IModelStatus>;\r\n rotatePlacement(ids: CompressedId64Set, matrix: Matrix3dProps, aboutCenter: boolean): Promise<IModelStatus>;\r\n\r\n /** Create and insert a new geometric element.\r\n * @param props Properties for the new [GeometricElement]($backend)\r\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\r\n * @throws [[IModelError]] if unable to insert the element\r\n */\r\n insertGeometricElement(props: GeometricElementProps): Promise<Id64String>;\r\n\r\n /** Create and insert a new geometry part element.\r\n * @param props Properties for the new [GeometryPart]($backend)\r\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\r\n * @throws [[IModelError]] if unable to insert the element\r\n */\r\n insertGeometryPart(props: GeometryPartProps): Promise<Id64String>;\r\n\r\n /** Update an existing geometric element.\r\n * @param propsOrId Properties or element id to update for an existing [GeometricElement]($backend)\r\n * @param data Optional binary format GeometryStream representation used in lieu of [[GeometricElementProps.geom]] or [[GeometricElementProps.elementGeometryBuilderParams]].\r\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\r\n * @throws [[IModelError]] if unable to update the element\r\n */\r\n updateGeometricElement(propsOrId: GeometricElementProps | Id64String, data?: ElementGeometryBuilderParams): Promise<void>;\r\n\r\n /** Request geometry from an existing element. Because a GeometryStream can be large and may contain information\r\n * that is not always useful to frontend code, filter options are provided to restrict what GeometryStreams are returned.\r\n * For example, a tool may only be interested in a GeometryStream that stores a single CurveCollection.\r\n * @param id Element id of an existing [GeometricElement]($backend) or [GeometryPart]($backend).\r\n * @param filter Optional criteria for accepting a GeometryStream.\r\n * @see [GeometryStream]($docs/learning/common/geometrystream.md), [ElementGeometry]($common)\r\n * @throws [[IModelError]] if unable to query the element\r\n */\r\n requestElementGeometry(id: Id64String, filter?: FlatBufferGeometryFilter): Promise<ElementGeometryInfo | undefined>;\r\n\r\n /** Update the project extents for the iModel.\r\n * @param extents New project extents.\r\n * @throws [[IModelError]] if unable to aquire schema lock or update the extents property.\r\n */\r\n updateProjectExtents(extents: Range3dProps): Promise<void>;\r\n\r\n /** Update the position of the iModel on the earth.\r\n * @param ecefLocation New ecef location properties.\r\n * @throws [[IModelError]] if unable to aquire schema lock or update the ecef location property.\r\n * @note Clears the geographic coordinate reference system of the iModel, do not call when a valid GCS exists.\r\n */\r\n updateEcefLocation(ecefLocation: EcefLocationProps): Promise<void>;\r\n}\r\n"]}
|
package/lib/esm/EditorIpc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorIpc.js","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,gBAAgB;AAChB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,qBAAqB;IAC9B,WAAW,EAAE,iBAAiB;CACtB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Editing\n */\n\n/** @internal */\nexport const editorIpcStrings = {\n channel: \"itwinjs-core/editor\",\n commandBusy: \"EditCommandBusy\",\n} as const;\n\n/**\n * Interface called from frontend `EditTool`s to start and drive the active `EditCommand` on the backend.\n * @beta\n */\nexport interface EditorIpc {\n\n /** Start a new instance of an `EditCommand` on the backend, and then call its `onStart` method.\n * @param commandId the Id of a registered `EditCommand` on the backend. If commandId === \"\", the current command is\n * requested to finish but no new EditCommand is started.\n * @param iModelKey the key that identifies the iModel that the EditCommand modifies.\n * @param args arguments passed to the constructor of the new `EditCommand`\n * @return the value returned by the new `EditCommand`'s `onStart` method.\n * @note The current `EditCommand` (if one is active) is asked to finish and clean up its operation via `EditCommand.requestFinish`\n * before the new `EditCommand` is constructed. If it cannot finish immediately, it may return a string that identifies\n * the work it is performing for `EditTools.busyHandler` to retry and/or display.\n */\n startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>;\n\n /** Call a method on the currently active `EditCommand` and return its value.\n * @param name the name of the method to invoke.\n * @param args arguments passed to the method.\n * @note throws an exception if there is no active `EditCommand`, or if the active EditCommand does not implement the supplied method. */\n callMethod: (name: string, ...args: any[]) => Promise<any>;\n}\n\n/**\n * Interface implemented by all backend `EditCommands`.\n * @beta\n */\nexport interface EditCommandIpc {\n /** Identify the current `EditCommand`'s name and version, optionally returning additional properties that describe its state. */\n ping: () => Promise<{ commandId: string, version: string, [propName: string]: any }>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"EditorIpc.js","sourceRoot":"","sources":["../../src/EditorIpc.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,gBAAgB;AAChB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,qBAAqB;IAC9B,WAAW,EAAE,iBAAiB;CACtB,CAAC","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 Editing\r\n */\r\n\r\n/** @internal */\r\nexport const editorIpcStrings = {\r\n channel: \"itwinjs-core/editor\",\r\n commandBusy: \"EditCommandBusy\",\r\n} as const;\r\n\r\n/**\r\n * Interface called from frontend `EditTool`s to start and drive the active `EditCommand` on the backend.\r\n * @beta\r\n */\r\nexport interface EditorIpc {\r\n\r\n /** Start a new instance of an `EditCommand` on the backend, and then call its `onStart` method.\r\n * @param commandId the Id of a registered `EditCommand` on the backend. If commandId === \"\", the current command is\r\n * requested to finish but no new EditCommand is started.\r\n * @param iModelKey the key that identifies the iModel that the EditCommand modifies.\r\n * @param args arguments passed to the constructor of the new `EditCommand`\r\n * @return the value returned by the new `EditCommand`'s `onStart` method.\r\n * @note The current `EditCommand` (if one is active) is asked to finish and clean up its operation via `EditCommand.requestFinish`\r\n * before the new `EditCommand` is constructed. If it cannot finish immediately, it may return a string that identifies\r\n * the work it is performing for `EditTools.busyHandler` to retry and/or display.\r\n */\r\n startCommand: (commandId: string, iModelKey: string, ...args: any[]) => Promise<any>;\r\n\r\n /** Call a method on the currently active `EditCommand` and return its value.\r\n * @param name the name of the method to invoke.\r\n * @param args arguments passed to the method.\r\n * @note throws an exception if there is no active `EditCommand`, or if the active EditCommand does not implement the supplied method. */\r\n callMethod: (name: string, ...args: any[]) => Promise<any>;\r\n}\r\n\r\n/**\r\n * Interface implemented by all backend `EditCommands`.\r\n * @beta\r\n */\r\nexport interface EditCommandIpc {\r\n /** Identify the current `EditCommand`'s name and version, optionally returning additional properties that describe its state. */\r\n ping: () => Promise<{ commandId: string, version: string, [propName: string]: any }>;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-common.js","sourceRoot":"","sources":["../../src/editor-common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AAEnC;;GAEG;AAEH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./EditorIpc\";\nexport * from \"./EditorBuiltInIpc\";\n\n/** @docs-package-description\n * The editor-common package contains common functionality for editing iModels.\n */\n\n/**\n * @docs-group-description Editing\n * Classes containing functionality for Editing iModels common to the front and backends, including IPC.\n */\n"]}
|
|
1
|
+
{"version":3,"file":"editor-common.js","sourceRoot":"","sources":["../../src/editor-common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AAEnC;;GAEG;AAEH;;;GAGG","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\nexport * from \"./EditorIpc\";\r\nexport * from \"./EditorBuiltInIpc\";\r\n\r\n/** @docs-package-description\r\n * The editor-common package contains common functionality for editing iModels.\r\n */\r\n\r\n/**\r\n * @docs-group-description Editing\r\n * Classes containing functionality for Editing iModels common to the front and backends, including IPC.\r\n */\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/editor-common",
|
|
3
|
-
"version": "5.5.0-dev.
|
|
3
|
+
"version": "5.5.0-dev.4",
|
|
4
4
|
"description": "iTwin.js editing properties common to frontend and backend",
|
|
5
5
|
"main": "lib/cjs/editor-common.js",
|
|
6
6
|
"module": "lib/esm/editor-common.js",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"url": "http://www.bentley.com"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@itwin/core-bentley": "5.5.0-dev.
|
|
27
|
-
"@itwin/core-geometry": "5.5.0-dev.
|
|
28
|
-
"@itwin/core-common": "5.5.0-dev.
|
|
26
|
+
"@itwin/core-bentley": "5.5.0-dev.4",
|
|
27
|
+
"@itwin/core-geometry": "5.5.0-dev.4",
|
|
28
|
+
"@itwin/core-common": "5.5.0-dev.4"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@itwin/eslint-plugin": "5.2.2-dev.2",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"mocha": "^11.1.0",
|
|
37
37
|
"rimraf": "^6.0.1",
|
|
38
38
|
"typescript": "~5.6.2",
|
|
39
|
-
"@itwin/core-bentley": "5.5.0-dev.
|
|
40
|
-
"@itwin/core-
|
|
41
|
-
"@itwin/build-tools": "5.5.0-dev.
|
|
42
|
-
"@itwin/core-
|
|
39
|
+
"@itwin/core-bentley": "5.5.0-dev.4",
|
|
40
|
+
"@itwin/core-geometry": "5.5.0-dev.4",
|
|
41
|
+
"@itwin/build-tools": "5.5.0-dev.4",
|
|
42
|
+
"@itwin/core-common": "5.5.0-dev.4"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "npm run -s build:cjs && npm run -s build:esm",
|