@itwin/core-common 5.0.0-dev.57 → 5.0.0-dev.58
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/lib/cjs/Code.d.ts +0 -5
- package/lib/cjs/Code.d.ts.map +1 -1
- package/lib/cjs/Code.js +0 -11
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/FeatureSymbology.d.ts +0 -27
- package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/FeatureSymbology.js +0 -33
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/Localization.d.ts +0 -10
- package/lib/cjs/Localization.d.ts.map +1 -1
- package/lib/cjs/Localization.js +0 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/RenderMaterial.d.ts +0 -43
- package/lib/cjs/RenderMaterial.d.ts.map +1 -1
- package/lib/cjs/RenderMaterial.js +0 -62
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderTexture.d.ts +0 -20
- package/lib/cjs/RenderTexture.d.ts.map +1 -1
- package/lib/cjs/RenderTexture.js +0 -25
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/TerrainSettings.d.ts +0 -7
- package/lib/cjs/TerrainSettings.d.ts.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/ViewProps.d.ts +0 -4
- package/lib/cjs/ViewProps.d.ts.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/core-common.d.ts +0 -1
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +0 -1
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +2 -2
- package/lib/cjs/internal/BackendTypes.d.ts.map +1 -0
- package/lib/cjs/internal/BackendTypes.js.map +1 -0
- package/lib/cjs/internal/RenderMaterialParams.d.ts +47 -0
- package/lib/cjs/internal/RenderMaterialParams.d.ts.map +1 -0
- package/lib/cjs/internal/RenderMaterialParams.js +68 -0
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -0
- package/lib/cjs/internal/RenderTextureParams.d.ts +25 -0
- package/lib/cjs/internal/RenderTextureParams.d.ts.map +1 -0
- package/lib/cjs/internal/RenderTextureParams.js +37 -0
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +3 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +5 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.d.ts +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/Code.d.ts +0 -5
- package/lib/esm/Code.d.ts.map +1 -1
- package/lib/esm/Code.js +0 -11
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/FeatureSymbology.d.ts +0 -27
- package/lib/esm/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/FeatureSymbology.js +0 -33
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/Localization.d.ts +0 -10
- package/lib/esm/Localization.d.ts.map +1 -1
- package/lib/esm/Localization.js +0 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/RenderMaterial.d.ts +0 -43
- package/lib/esm/RenderMaterial.d.ts.map +1 -1
- package/lib/esm/RenderMaterial.js +0 -62
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderTexture.d.ts +0 -20
- package/lib/esm/RenderTexture.d.ts.map +1 -1
- package/lib/esm/RenderTexture.js +0 -25
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/TerrainSettings.d.ts +0 -7
- package/lib/esm/TerrainSettings.d.ts.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/ViewProps.d.ts +0 -4
- package/lib/esm/ViewProps.d.ts.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/core-common.d.ts +0 -1
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +0 -1
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +2 -2
- package/lib/esm/internal/BackendTypes.d.ts.map +1 -0
- package/lib/esm/internal/BackendTypes.js.map +1 -0
- package/lib/esm/internal/RenderMaterialParams.d.ts +47 -0
- package/lib/esm/internal/RenderMaterialParams.d.ts.map +1 -0
- package/lib/esm/internal/RenderMaterialParams.js +64 -0
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -0
- package/lib/esm/internal/RenderTextureParams.d.ts +25 -0
- package/lib/esm/internal/RenderTextureParams.d.ts.map +1 -0
- package/lib/esm/internal/RenderTextureParams.js +33 -0
- package/lib/esm/internal/RenderTextureParams.js.map +1 -0
- package/lib/esm/internal/cross-package.d.ts +3 -0
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +2 -0
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.d.ts +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts +1 -1
- package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/package.json +6 -6
- package/lib/cjs/BackendTypes.d.ts.map +0 -1
- package/lib/cjs/BackendTypes.js.map +0 -1
- package/lib/esm/BackendTypes.d.ts.map +0 -1
- package/lib/esm/BackendTypes.js.map +0 -1
- /package/lib/cjs/{BackendTypes.js → internal/BackendTypes.js} +0 -0
- /package/lib/esm/{BackendTypes.js → internal/BackendTypes.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe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;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;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 \"./AmbientOcclusion\";\nexport * from \"./AnalysisStyle\";\nexport * from \"./annotation/TextAnnotation\";\nexport * from \"./annotation/TextBlock\";\nexport * from \"./annotation/TextBlockGeometryProps\";\nexport * from \"./annotation/TextBlockLayoutResult\";\nexport * from \"./annotation/TextStyle\";\nexport * from \"./Atmosphere\";\nexport * from \"./AuthorizationClient\";\nexport * from \"./BackgroundMapProvider\";\nexport * from \"./BackgroundMapSettings\";\nexport * from \"./Base64EncodedString\";\nexport * from \"./BriefcaseTypes\";\nexport * from \"./Camera\";\nexport * from \"./ChangedElements\";\nexport * from \"./ChangedEntities\";\nexport * from \"./ChangesetProps\";\nexport * from \"./ClipStyle\";\nexport * from \"./Code\";\nexport * from \"./ColorByName\";\nexport * from \"./ColorDef\";\nexport * from \"./CommonLoggerCategory\";\nexport * from \"./ContextRealityModel\";\nexport * from \"./DisplayStyleSettings\";\nexport * from \"./domains/FunctionalElementProps\";\nexport * from \"./domains/GenericElementProps\";\nexport * from \"./ECSqlTypes\";\nexport * from \"./ECSchemaProps\";\nexport * from \"./ElementMesh\";\nexport * from \"./ElementProps\";\nexport * from \"./EmphasizeElementsProps\";\nexport * from \"./EntityProps\";\nexport * from \"./EntityReference\";\nexport * from \"./Environment\";\nexport * from \"./FeatureIndex\";\nexport * from \"./FeatureSymbology\";\nexport * from \"./FeatureTable\";\nexport * from \"./Fonts\";\nexport * from \"./Frustum\";\nexport * from \"./GenericInstanceFilter\";\nexport * from \"./GeoCoordinateServices\";\nexport * from \"./geometry/AdditionalTransform\";\nexport * from \"./geometry/AreaPattern\";\nexport * from \"./geometry/BoundingSphere\";\nexport * from \"./geometry/Cartographic\";\nexport * from \"./geometry/CoordinateReferenceSystem\";\nexport * from \"./geometry/ElementGeometry\";\nexport * from \"./geometry/FrustumPlanes\";\nexport * from \"./geometry/GeodeticDatum\";\nexport * from \"./geometry/GeodeticEllipsoid\";\nexport * from \"./geometry/GeometryStream\";\nexport * from \"./geometry/ImageGraphic\";\nexport * from \"./geometry/LineStyle\";\nexport * from \"./geometry/Placement\";\nexport * from \"./geometry/Projection\";\nexport * from \"./geometry/TextString\";\nexport * from \"./GeometryContainment\";\nexport * from \"./GeometryParams\";\nexport * from \"./GeometrySummary\";\nexport * from \"./Gradient\";\nexport * from \"./GraphicParams\";\nexport * from \"./GroundPlane\";\nexport * from \"./HiddenLine\";\nexport * from \"./Hilite\";\nexport * from \"./HSLColor\";\nexport * from \"./HSVColor\";\nexport * from \"./Image\";\nexport * from \"./IModel\";\nexport * from \"./IModelError\";\nexport * from \"./IModelVersion\";\nexport * from \"./ITwinError\";\nexport * from \"./ipc/IpcSocket\";\nexport * from \"./ipc/IpcWebSocket\";\nexport * from \"./ipc/IpcWebSocketTransport\";\nexport * from \"./ipc/IpcSession\";\nexport * from \"./IpcAppProps\";\nexport * from \"./LightSettings\";\nexport * from \"./LinePixels\";\nexport * from \"./Localization\";\nexport * from \"./MapImagerySettings\";\nexport * from \"./MapLayerSettings\";\nexport * from \"./MassProperties\";\nexport * from \"./MaterialProps\";\nexport * from \"./ModelClipGroup\";\nexport * from \"./ModelProps\";\nexport * from \"./NativeAppProps\";\nexport * from \"./OctEncodedNormal\";\nexport * from \"./ConcurrentQuery\";\nexport * from \"./ECSqlReader\";\nexport * from \"./PlanarClipMask\";\nexport * from \"./ModelGeometryChanges\";\nexport * from \"./PlanProjectionSettings\";\nexport * from \"./BackendTypes\";\nexport * from \"./QPoint\";\nexport * from \"./RealityDataAccessProps\";\nexport * from \"./RealityModelDisplaySettings\";\nexport * from \"./RenderPolyline\";\nexport * from \"./RenderMaterial\";\nexport * from \"./RenderSchedule\";\nexport * from \"./RenderTexture\";\nexport * from \"./RgbColor\";\nexport * from \"./RpcManager\";\nexport * from \"./SessionProps\";\nexport * from \"./SkyBox\";\nexport * from \"./SolarCalculate\";\nexport * from \"./SolarShadows\";\nexport * from \"./SpatialClassification\";\nexport * from \"./SubCategoryAppearance\";\nexport * from \"./SubCategoryOverride\";\nexport * from \"./TerrainSettings\";\nexport * from \"./TextureMapping\";\nexport * from \"./TextureProps\";\nexport * from \"./ThematicDisplay\";\nexport * from \"./ContourDisplay\";\nexport * from \"./Thumbnail\";\nexport * from \"./TileProps\";\nexport * from \"./Tween\";\nexport * from \"./TxnAction\";\nexport * from \"./ViewDetails\";\nexport * from \"./ViewFlags\";\nexport * from \"./ViewProps\";\nexport * from \"./rpc/core/RpcConstants\";\nexport * from \"./rpc/core/RpcControl\";\nexport * from \"./rpc/core/RpcInvocation\";\nexport * from \"./rpc/core/RpcSessionInvocation\";\nexport * from \"./rpc/core/RpcMarshaling\";\nexport * from \"./rpc/core/RpcOperation\";\nexport * from \"./rpc/core/RpcPendingQueue\";\nexport * from \"./rpc/core/RpcProtocol\";\nexport * from \"./rpc/core/RpcRegistry\";\nexport * from \"./rpc/core/RpcRequest\";\nexport * from \"./rpc/core/RpcRequestContext\";\nexport * from \"./rpc/core/RpcRoutingToken\";\nexport * from \"./rpc/core/RpcPush\";\nexport * from \"./rpc/core/RpcConfiguration\";\nexport * from \"./rpc/DevToolsRpcInterface\";\nexport * from \"./rpc/IModelReadRpcInterface\";\nexport * from \"./rpc/IModelTileRpcInterface\";\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\nexport * from \"./rpc/TestRpcManager\";\nexport * from \"./RpcInterface\";\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\nexport * from \"./rpc/web/OpenAPI\";\nexport * from \"./rpc/web/RpcMultipart\";\nexport * from \"./rpc/web/WebAppRpcProtocol\";\nexport * from \"./rpc/web/WebAppRpcRequest\";\nexport * from \"./rpc/web/WebAppRpcLogging\";\nexport * from \"./tile/B3dmTileIO\";\nexport * from \"./tile/CompositeTileIO\";\nexport * from \"./tile/ElementGraphics\";\nexport * from \"./tile/GltfTileIO\";\nexport * from \"./tile/I3dmTileIO\";\nexport * from \"./tile/IModelTileIO\";\nexport * from \"./tile/PntsTileIO\";\nexport * from \"./tile/TileIO\";\nexport * from \"./tile/TileMetadata\";\nexport * from \"./tile/Tileset3dSchema\";\nexport * from \"./WhiteOnWhiteReversalSettings\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Entities\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\n */\n/**\n * @docs-group-description Codes\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\n */\n/**\n * @docs-group-description Geometry\n * Types for working with geometry.\n */\n/**\n * @docs-group-description Serialization\n * Types for serializing geometry\n */\n/**\n * @docs-group-description Views\n * Types for defining graphical views of the contents of an iModel.\n */\n/**\n * @docs-group-description DisplayStyles\n * Types for describing how the contents of Views should be rendered.\n */\n/**\n * @docs-group-description Rendering\n * Types describing geometry, views, and symbology for consumption by a display system.\n */\n/**\n * @docs-group-description Symbology\n * Types that define the appearance of geometry.\n */\n/**\n * @docs-group-description iModels\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\n */\n/**\n * @docs-group-description RpcInterface\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n/**\n * @docs-group-description IpcSocket\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\n */\n/**\n * @docs-group-description ECSQL\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description CloudStorage\n * Types for working with Cloud Storage.\n */\n/**\n * @docs-group-description Tween\n * Tweening library adapted from tween.js.\n */\n/**\n * @docs-group-description Tile\n * Types for working with 3d tile formats.\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description NativeApp\n * [Native applications]($docs/learning/NativeApps.md)\n */\n/**\n * @docs-group-description Localization\n * Classes for internationalization and localization of your app.\n */\n/**\n * @docs-group-description Authorization\n * Classes for managing AccessToken used for all requests in other classes.\n */\n/**\n * @docs-group-description RealityData\n * Types for working with the RealityData API.\n */\n/**\n * @docs-group-description MapLayers\n * Types for working with the MapLayers API.\n */\n/**\n * @docs-group-description Annotation\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\n */\n"]}
|
|
1
|
+
{"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBA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;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;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 \"./AmbientOcclusion\";\nexport * from \"./AnalysisStyle\";\nexport * from \"./annotation/TextAnnotation\";\nexport * from \"./annotation/TextBlock\";\nexport * from \"./annotation/TextBlockGeometryProps\";\nexport * from \"./annotation/TextBlockLayoutResult\";\nexport * from \"./annotation/TextStyle\";\nexport * from \"./Atmosphere\";\nexport * from \"./AuthorizationClient\";\nexport * from \"./BackgroundMapProvider\";\nexport * from \"./BackgroundMapSettings\";\nexport * from \"./Base64EncodedString\";\nexport * from \"./BriefcaseTypes\";\nexport * from \"./Camera\";\nexport * from \"./ChangedElements\";\nexport * from \"./ChangedEntities\";\nexport * from \"./ChangesetProps\";\nexport * from \"./ClipStyle\";\nexport * from \"./Code\";\nexport * from \"./ColorByName\";\nexport * from \"./ColorDef\";\nexport * from \"./CommonLoggerCategory\";\nexport * from \"./ContextRealityModel\";\nexport * from \"./DisplayStyleSettings\";\nexport * from \"./domains/FunctionalElementProps\";\nexport * from \"./domains/GenericElementProps\";\nexport * from \"./ECSqlTypes\";\nexport * from \"./ECSchemaProps\";\nexport * from \"./ElementMesh\";\nexport * from \"./ElementProps\";\nexport * from \"./EmphasizeElementsProps\";\nexport * from \"./EntityProps\";\nexport * from \"./EntityReference\";\nexport * from \"./Environment\";\nexport * from \"./FeatureIndex\";\nexport * from \"./FeatureSymbology\";\nexport * from \"./FeatureTable\";\nexport * from \"./Fonts\";\nexport * from \"./Frustum\";\nexport * from \"./GenericInstanceFilter\";\nexport * from \"./GeoCoordinateServices\";\nexport * from \"./geometry/AdditionalTransform\";\nexport * from \"./geometry/AreaPattern\";\nexport * from \"./geometry/BoundingSphere\";\nexport * from \"./geometry/Cartographic\";\nexport * from \"./geometry/CoordinateReferenceSystem\";\nexport * from \"./geometry/ElementGeometry\";\nexport * from \"./geometry/FrustumPlanes\";\nexport * from \"./geometry/GeodeticDatum\";\nexport * from \"./geometry/GeodeticEllipsoid\";\nexport * from \"./geometry/GeometryStream\";\nexport * from \"./geometry/ImageGraphic\";\nexport * from \"./geometry/LineStyle\";\nexport * from \"./geometry/Placement\";\nexport * from \"./geometry/Projection\";\nexport * from \"./geometry/TextString\";\nexport * from \"./GeometryContainment\";\nexport * from \"./GeometryParams\";\nexport * from \"./GeometrySummary\";\nexport * from \"./Gradient\";\nexport * from \"./GraphicParams\";\nexport * from \"./GroundPlane\";\nexport * from \"./HiddenLine\";\nexport * from \"./Hilite\";\nexport * from \"./HSLColor\";\nexport * from \"./HSVColor\";\nexport * from \"./Image\";\nexport * from \"./IModel\";\nexport * from \"./IModelError\";\nexport * from \"./IModelVersion\";\nexport * from \"./ITwinError\";\nexport * from \"./ipc/IpcSocket\";\nexport * from \"./ipc/IpcWebSocket\";\nexport * from \"./ipc/IpcWebSocketTransport\";\nexport * from \"./ipc/IpcSession\";\nexport * from \"./IpcAppProps\";\nexport * from \"./LightSettings\";\nexport * from \"./LinePixels\";\nexport * from \"./Localization\";\nexport * from \"./MapImagerySettings\";\nexport * from \"./MapLayerSettings\";\nexport * from \"./MassProperties\";\nexport * from \"./MaterialProps\";\nexport * from \"./ModelClipGroup\";\nexport * from \"./ModelProps\";\nexport * from \"./NativeAppProps\";\nexport * from \"./OctEncodedNormal\";\nexport * from \"./ConcurrentQuery\";\nexport * from \"./ECSqlReader\";\nexport * from \"./PlanarClipMask\";\nexport * from \"./ModelGeometryChanges\";\nexport * from \"./PlanProjectionSettings\";\nexport * from \"./QPoint\";\nexport * from \"./RealityDataAccessProps\";\nexport * from \"./RealityModelDisplaySettings\";\nexport * from \"./RenderPolyline\";\nexport * from \"./RenderMaterial\";\nexport * from \"./RenderSchedule\";\nexport * from \"./RenderTexture\";\nexport * from \"./RgbColor\";\nexport * from \"./RpcManager\";\nexport * from \"./SessionProps\";\nexport * from \"./SkyBox\";\nexport * from \"./SolarCalculate\";\nexport * from \"./SolarShadows\";\nexport * from \"./SpatialClassification\";\nexport * from \"./SubCategoryAppearance\";\nexport * from \"./SubCategoryOverride\";\nexport * from \"./TerrainSettings\";\nexport * from \"./TextureMapping\";\nexport * from \"./TextureProps\";\nexport * from \"./ThematicDisplay\";\nexport * from \"./ContourDisplay\";\nexport * from \"./Thumbnail\";\nexport * from \"./TileProps\";\nexport * from \"./Tween\";\nexport * from \"./TxnAction\";\nexport * from \"./ViewDetails\";\nexport * from \"./ViewFlags\";\nexport * from \"./ViewProps\";\nexport * from \"./rpc/core/RpcConstants\";\nexport * from \"./rpc/core/RpcControl\";\nexport * from \"./rpc/core/RpcInvocation\";\nexport * from \"./rpc/core/RpcSessionInvocation\";\nexport * from \"./rpc/core/RpcMarshaling\";\nexport * from \"./rpc/core/RpcOperation\";\nexport * from \"./rpc/core/RpcPendingQueue\";\nexport * from \"./rpc/core/RpcProtocol\";\nexport * from \"./rpc/core/RpcRegistry\";\nexport * from \"./rpc/core/RpcRequest\";\nexport * from \"./rpc/core/RpcRequestContext\";\nexport * from \"./rpc/core/RpcRoutingToken\";\nexport * from \"./rpc/core/RpcPush\";\nexport * from \"./rpc/core/RpcConfiguration\";\nexport * from \"./rpc/DevToolsRpcInterface\";\nexport * from \"./rpc/IModelReadRpcInterface\";\nexport * from \"./rpc/IModelTileRpcInterface\";\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\nexport * from \"./rpc/TestRpcManager\";\nexport * from \"./RpcInterface\";\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\nexport * from \"./rpc/web/OpenAPI\";\nexport * from \"./rpc/web/RpcMultipart\";\nexport * from \"./rpc/web/WebAppRpcProtocol\";\nexport * from \"./rpc/web/WebAppRpcRequest\";\nexport * from \"./rpc/web/WebAppRpcLogging\";\nexport * from \"./tile/B3dmTileIO\";\nexport * from \"./tile/CompositeTileIO\";\nexport * from \"./tile/ElementGraphics\";\nexport * from \"./tile/GltfTileIO\";\nexport * from \"./tile/I3dmTileIO\";\nexport * from \"./tile/IModelTileIO\";\nexport * from \"./tile/PntsTileIO\";\nexport * from \"./tile/TileIO\";\nexport * from \"./tile/TileMetadata\";\nexport * from \"./tile/Tileset3dSchema\";\nexport * from \"./WhiteOnWhiteReversalSettings\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Entities\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\n */\n/**\n * @docs-group-description Codes\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\n */\n/**\n * @docs-group-description Geometry\n * Types for working with geometry.\n */\n/**\n * @docs-group-description Serialization\n * Types for serializing geometry\n */\n/**\n * @docs-group-description Views\n * Types for defining graphical views of the contents of an iModel.\n */\n/**\n * @docs-group-description DisplayStyles\n * Types for describing how the contents of Views should be rendered.\n */\n/**\n * @docs-group-description Rendering\n * Types describing geometry, views, and symbology for consumption by a display system.\n */\n/**\n * @docs-group-description Symbology\n * Types that define the appearance of geometry.\n */\n/**\n * @docs-group-description iModels\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\n */\n/**\n * @docs-group-description RpcInterface\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n/**\n * @docs-group-description IpcSocket\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\n */\n/**\n * @docs-group-description ECSQL\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description CloudStorage\n * Types for working with Cloud Storage.\n */\n/**\n * @docs-group-description Tween\n * Tweening library adapted from tween.js.\n */\n/**\n * @docs-group-description Tile\n * Types for working with 3d tile formats.\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description NativeApp\n * [Native applications]($docs/learning/NativeApps.md)\n */\n/**\n * @docs-group-description Localization\n * Classes for internationalization and localization of your app.\n */\n/**\n * @docs-group-description Authorization\n * Classes for managing AccessToken used for all requests in other classes.\n */\n/**\n * @docs-group-description RealityData\n * Types for working with the RealityData API.\n */\n/**\n * @docs-group-description MapLayers\n * Types for working with the MapLayers API.\n */\n/**\n * @docs-group-description Annotation\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\n */\n"]}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Readable, Writable } from "stream";
|
|
5
5
|
import type { Buffer } from "buffer";
|
|
6
|
-
/** @
|
|
6
|
+
/** @internal @deprecated in 3.x. This type was mistakenly made public in the common scope. */
|
|
7
7
|
export type BackendReadable = Readable;
|
|
8
|
-
/** @
|
|
8
|
+
/** @internal @deprecated in 3.x. This type was mistakenly made public in the common scope. */
|
|
9
9
|
export type BackendWritable = Writable;
|
|
10
10
|
/** @internal @deprecated in 3.x. This type was mistakenly made public in the common scope. */
|
|
11
11
|
export type BackendBuffer = Buffer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../../src/internal/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,8FAA8F;AAC9F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,8FAA8F;AAC9F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,8FAA8F;AAC9F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackendTypes.js","sourceRoot":"","sources":["../../../src/internal/BackendTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Utils\n */\n\nimport type { Readable, Writable } from \"stream\"; // Must be \"import type\" to avoid webpack polyfill errors\nimport type { Buffer } from \"buffer\"; // Must be \"import type\" to avoid webpack polyfill errors\n\n/*\nIMPORTANT:\nThis is a temporary source file for backwards compatibility only.\nDo not add any new types to this file.\nAll types here will be removed in 4.0\n*/\n\n/** @internal @deprecated in 3.x. This type was mistakenly made public in the common scope. */\nexport type BackendReadable = Readable;\n\n/** @internal @deprecated in 3.x. This type was mistakenly made public in the common scope. */\nexport type BackendWritable = Writable;\n\n/** @internal @deprecated in 3.x. This type was mistakenly made public in the common scope. */\nexport type BackendBuffer = Buffer;\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Rendering
|
|
3
|
+
*/
|
|
4
|
+
import { ColorDef } from "../ColorDef";
|
|
5
|
+
import { TextureMapping } from "../TextureMapping";
|
|
6
|
+
/** Params for use in old CreateMaterial functions. Use [CreateRenderMaterialArgs]($frontend) instead.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare class RenderMaterialParams {
|
|
10
|
+
/** If the material originates from a Material element in the [[IModel]], the Id of that element. */
|
|
11
|
+
key?: string;
|
|
12
|
+
/** Diffuse color, or undefined if this material does not override the surface's own color. */
|
|
13
|
+
diffuseColor?: ColorDef;
|
|
14
|
+
/** Specular color. Defaults to white if undefined. */
|
|
15
|
+
specularColor?: ColorDef;
|
|
16
|
+
/** Currently unused. @alpha */
|
|
17
|
+
emissiveColor?: ColorDef;
|
|
18
|
+
/** Currently unused. @alpha */
|
|
19
|
+
reflectColor?: ColorDef;
|
|
20
|
+
/** Optional pattern mapping applied to the surface. */
|
|
21
|
+
textureMapping?: TextureMapping;
|
|
22
|
+
/** Diffuse weight in [0..1] */
|
|
23
|
+
diffuse: number;
|
|
24
|
+
/** Specular weight in [0..1] */
|
|
25
|
+
specular: number;
|
|
26
|
+
specularExponent: number;
|
|
27
|
+
/** Currently unused. @alpha */
|
|
28
|
+
reflect: number;
|
|
29
|
+
/** Currently unused. @alpha */
|
|
30
|
+
refract: number;
|
|
31
|
+
/** Currently unused. @alpha */
|
|
32
|
+
ambient: number;
|
|
33
|
+
/** Currently unused. @alpha */
|
|
34
|
+
shadows: boolean;
|
|
35
|
+
private _alpha?;
|
|
36
|
+
constructor(key?: string);
|
|
37
|
+
/** Obtain an immutable instance of a RenderMaterial with all default properties. */
|
|
38
|
+
static readonly defaults: RenderMaterialParams;
|
|
39
|
+
/** A value from 0.0 (fully-transparent) to 1.0 (fully-opaque) controlling the transparency of surfaces to which this material is applied;
|
|
40
|
+
* or undefined if this material does not override surface transparency.
|
|
41
|
+
*/
|
|
42
|
+
get alpha(): number | undefined;
|
|
43
|
+
set alpha(alpha: number | undefined);
|
|
44
|
+
/** Create a RenderMaterial params object using specified key and ColorDef values, as well as an optional texture mapping. */
|
|
45
|
+
static fromColors(key?: string, diffuseColor?: ColorDef, specularColor?: ColorDef, emissiveColor?: ColorDef, reflectColor?: ColorDef, textureMap?: TextureMapping): RenderMaterialParams;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=RenderMaterialParams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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QAAQ,EAAE,YAAY,CAAC,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,cAAc,GAAG,oBAAoB;CAUhM"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Rendering
|
|
7
|
+
*/
|
|
8
|
+
function clampToNormalizedRange(value) {
|
|
9
|
+
return Math.max(0.0, Math.min(1.0, value));
|
|
10
|
+
}
|
|
11
|
+
/** Params for use in old CreateMaterial functions. Use [CreateRenderMaterialArgs]($frontend) instead.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export class RenderMaterialParams {
|
|
15
|
+
/** If the material originates from a Material element in the [[IModel]], the Id of that element. */
|
|
16
|
+
key;
|
|
17
|
+
/** Diffuse color, or undefined if this material does not override the surface's own color. */
|
|
18
|
+
diffuseColor;
|
|
19
|
+
/** Specular color. Defaults to white if undefined. */
|
|
20
|
+
specularColor;
|
|
21
|
+
/** Currently unused. @alpha */
|
|
22
|
+
emissiveColor;
|
|
23
|
+
/** Currently unused. @alpha */
|
|
24
|
+
reflectColor;
|
|
25
|
+
/** Optional pattern mapping applied to the surface. */
|
|
26
|
+
textureMapping;
|
|
27
|
+
/** Diffuse weight in [0..1] */
|
|
28
|
+
diffuse = 0.6;
|
|
29
|
+
/** Specular weight in [0..1] */
|
|
30
|
+
specular = 0.4;
|
|
31
|
+
specularExponent = 13.5;
|
|
32
|
+
/** Currently unused. @alpha */
|
|
33
|
+
reflect = 0.0;
|
|
34
|
+
/** Currently unused. @alpha */
|
|
35
|
+
refract = 1.0;
|
|
36
|
+
/** Currently unused. @alpha */
|
|
37
|
+
ambient = .3;
|
|
38
|
+
/** Currently unused. @alpha */
|
|
39
|
+
shadows = true;
|
|
40
|
+
_alpha;
|
|
41
|
+
constructor(key) { this.key = key; }
|
|
42
|
+
/** Obtain an immutable instance of a RenderMaterial with all default properties. */
|
|
43
|
+
static defaults = new RenderMaterialParams();
|
|
44
|
+
/** A value from 0.0 (fully-transparent) to 1.0 (fully-opaque) controlling the transparency of surfaces to which this material is applied;
|
|
45
|
+
* or undefined if this material does not override surface transparency.
|
|
46
|
+
*/
|
|
47
|
+
get alpha() { return this._alpha; }
|
|
48
|
+
set alpha(alpha) {
|
|
49
|
+
this._alpha = undefined !== alpha ? clampToNormalizedRange(alpha) : undefined;
|
|
50
|
+
}
|
|
51
|
+
/** Create a RenderMaterial params object using specified key and ColorDef values, as well as an optional texture mapping. */
|
|
52
|
+
static fromColors(key, diffuseColor, specularColor, emissiveColor, reflectColor, textureMap) {
|
|
53
|
+
const materialParams = new RenderMaterialParams();
|
|
54
|
+
materialParams.key = key;
|
|
55
|
+
materialParams.diffuseColor = diffuseColor;
|
|
56
|
+
materialParams.specularColor = specularColor;
|
|
57
|
+
materialParams.emissiveColor = emissiveColor;
|
|
58
|
+
materialParams.reflectColor = reflectColor;
|
|
59
|
+
materialParams.textureMapping = textureMap;
|
|
60
|
+
return materialParams;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
Object.freeze(RenderMaterialParams.defaults);
|
|
64
|
+
//# sourceMappingURL=RenderMaterialParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderMaterialParams.js","sourceRoot":"","sources":["../../../src/internal/RenderMaterialParams.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,SAAS,sBAAsB,CAAC,KAAa;IAC3C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED;;EAEE;AACF,MAAM,OAAO,oBAAoB;IAC/B,oGAAoG;IAC7F,GA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QAC7C,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;QAC3C,cAAc,CAAC,cAAc,GAAG,UAAU,CAAC;QAC3C,OAAO,cAAc,CAAC;IACxB,CAAC;;AAGH,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,QAAQ,CAAC,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 Rendering\n */\n\nimport { ColorDef } from \"../ColorDef\";\nimport { TextureMapping } from \"../TextureMapping\";\n\nfunction clampToNormalizedRange(value: number): number {\n return Math.max(0.0, Math.min(1.0, value));\n}\n\n/** Params for use in old CreateMaterial functions. Use [CreateRenderMaterialArgs]($frontend) instead.\n * @internal\n*/\nexport class RenderMaterialParams {\n /** If the material originates from a Material element in the [[IModel]], the Id of that element. */\n public key?: string;\n /** Diffuse color, or undefined if this material does not override the surface's own color. */\n public diffuseColor?: ColorDef;\n /** Specular color. Defaults to white if undefined. */\n public specularColor?: ColorDef;\n /** Currently unused. @alpha */\n public emissiveColor?: ColorDef;\n /** Currently unused. @alpha */\n public reflectColor?: ColorDef;\n /** Optional pattern mapping applied to the surface. */\n public textureMapping?: TextureMapping;\n /** Diffuse weight in [0..1] */\n public diffuse: number = 0.6;\n /** Specular weight in [0..1] */\n public specular: number = 0.4;\n public specularExponent: number = 13.5;\n /** Currently unused. @alpha */\n public reflect: number = 0.0;\n /** Currently unused. @alpha */\n public refract: number = 1.0;\n /** Currently unused. @alpha */\n public ambient: number = .3;\n /** Currently unused. @alpha */\n public shadows = true;\n private _alpha?: number;\n\n public constructor(key?: string) { this.key = key; }\n\n /** Obtain an immutable instance of a RenderMaterial with all default properties. */\n public static readonly defaults = new RenderMaterialParams();\n\n /** A value from 0.0 (fully-transparent) to 1.0 (fully-opaque) controlling the transparency of surfaces to which this material is applied;\n * or undefined if this material does not override surface transparency.\n */\n public get alpha(): number | undefined { return this._alpha; }\n public set alpha(alpha: number | undefined) {\n this._alpha = undefined !== alpha ? clampToNormalizedRange(alpha) : undefined;\n }\n\n /** Create a RenderMaterial params object using specified key and ColorDef values, as well as an optional texture mapping. */\n public static fromColors(key?: string, diffuseColor?: ColorDef, specularColor?: ColorDef, emissiveColor?: ColorDef, reflectColor?: ColorDef, textureMap?: TextureMapping): RenderMaterialParams {\n const materialParams = new RenderMaterialParams();\n materialParams.key = key;\n materialParams.diffuseColor = diffuseColor;\n materialParams.specularColor = specularColor;\n materialParams.emissiveColor = emissiveColor;\n materialParams.reflectColor = reflectColor;\n materialParams.textureMapping = textureMap;\n return materialParams;\n }\n}\n\nObject.freeze(RenderMaterialParams.defaults);\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Rendering
|
|
3
|
+
*/
|
|
4
|
+
import { RenderTexture } from "../RenderTexture";
|
|
5
|
+
/** Parameters used to construct a [[RenderTexture]] in old RenderTexture functions.
|
|
6
|
+
* Use RenderSystem.createTexture and CreateTextureArgs instead.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare class RenderTextureParams {
|
|
10
|
+
/** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element.
|
|
11
|
+
* Textures created on the front-end generally have no key.
|
|
12
|
+
*/
|
|
13
|
+
readonly key?: string;
|
|
14
|
+
/** Indicates the type of texture. */
|
|
15
|
+
readonly type: RenderTexture.Type;
|
|
16
|
+
/** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.
|
|
17
|
+
* An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.
|
|
18
|
+
*/
|
|
19
|
+
readonly isOwned: boolean;
|
|
20
|
+
constructor(key?: string, type?: RenderTexture.Type, isOwned?: boolean);
|
|
21
|
+
get isTileSection(): boolean;
|
|
22
|
+
get isGlyph(): boolean;
|
|
23
|
+
get isSkyBox(): boolean;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=RenderTextureParams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderTextureParams.d.ts","sourceRoot":"","sources":["../../../src/internal/RenderTextureParams.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B;;MAEE;IACF,SAAgB,GAAG,CAAC,EAAE,MAAM,CAAC;IAC7B,qCAAqC;IACrC,SAAgB,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC;IACzC;;OAEG;IACH,SAAgB,OAAO,EAAE,OAAO,CAAC;gBAEd,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,aAAa,CAAC,IAAgC,EAAE,OAAO,GAAE,OAAe;IAM/G,IAAW,aAAa,IAAI,OAAO,CAAyD;IAC5F,IAAW,OAAO,IAAI,OAAO,CAAmD;IAChF,IAAW,QAAQ,IAAI,OAAO,CAAoD;CACnF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Rendering
|
|
7
|
+
*/
|
|
8
|
+
import { RenderTexture } from "../RenderTexture";
|
|
9
|
+
/** Parameters used to construct a [[RenderTexture]] in old RenderTexture functions.
|
|
10
|
+
* Use RenderSystem.createTexture and CreateTextureArgs instead.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export class RenderTextureParams {
|
|
14
|
+
/** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element.
|
|
15
|
+
* Textures created on the front-end generally have no key.
|
|
16
|
+
*/
|
|
17
|
+
key;
|
|
18
|
+
/** Indicates the type of texture. */
|
|
19
|
+
type;
|
|
20
|
+
/** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.
|
|
21
|
+
* An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.
|
|
22
|
+
*/
|
|
23
|
+
isOwned;
|
|
24
|
+
constructor(key, type = RenderTexture.Type.Normal, isOwned = false) {
|
|
25
|
+
this.key = key;
|
|
26
|
+
this.type = type;
|
|
27
|
+
this.isOwned = isOwned;
|
|
28
|
+
}
|
|
29
|
+
get isTileSection() { return RenderTexture.Type.TileSection === this.type; }
|
|
30
|
+
get isGlyph() { return RenderTexture.Type.Glyph === this.type; }
|
|
31
|
+
get isSkyBox() { return RenderTexture.Type.SkyBox === this.type; }
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=RenderTextureParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderTextureParams.js","sourceRoot":"","sources":["../../../src/internal/RenderTextureParams.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;MAEE;IACc,GAAG,CAAU;IAC7B,qCAAqC;IACrB,IAAI,CAAqB;IACzC;;OAEG;IACa,OAAO,CAAU;IAEjC,YAAmB,GAAY,EAAE,OAA2B,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,UAAmB,KAAK;QAC7G,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,IAAW,aAAa,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,IAAW,OAAO,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAW,QAAQ,KAAc,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CACnF","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 Rendering\n */\nimport { RenderTexture } from \"../RenderTexture\";\n\n/** Parameters used to construct a [[RenderTexture]] in old RenderTexture functions.\n * Use RenderSystem.createTexture and CreateTextureArgs instead.\n * @internal\n */\nexport class RenderTextureParams {\n /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element.\n * Textures created on the front-end generally have no key.\n */\n public readonly key?: string;\n /** Indicates the type of texture. */\n public readonly type: RenderTexture.Type;\n /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.\n * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.\n */\n public readonly isOwned: boolean;\n\n public constructor(key?: string, type: RenderTexture.Type = RenderTexture.Type.Normal, isOwned: boolean = false) {\n this.key = key;\n this.type = type;\n this.isOwned = isOwned;\n }\n\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\n}"]}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export type { DecorationGeometryProps, SnapRequestProps, SnapResponseProps } from "./Snapping";
|
|
2
2
|
export { EdgeArgs, MeshEdge, MeshEdges, MeshPolyline, type MeshPolylineList, PolylineEdgeArgs, SilhouetteEdgeArgs } from "./RenderMesh";
|
|
3
3
|
export { MultiModelPackedFeatureTable, PackedFeatureModelTable, PackedFeatureTable } from "./PackedFeatureTable";
|
|
4
|
+
export type { BackendReadable, BackendWritable, BackendBuffer } from "./BackendTypes";
|
|
5
|
+
export { RenderMaterialParams } from "./RenderMaterialParams";
|
|
6
|
+
export { RenderTextureParams } from "./RenderTextureParams";
|
|
4
7
|
//# sourceMappingURL=cross-package.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-package.d.ts","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EACL,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EACzG,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,4BAA4B,EAAE,uBAAuB,EAAE,kBAAkB,EAC1E,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"cross-package.d.ts","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EACL,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EACzG,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,4BAA4B,EAAE,uBAAuB,EAAE,kBAAkB,EAC1E,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -4,4 +4,6 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
export { EdgeArgs, MeshEdge, MeshEdges, MeshPolyline, PolylineEdgeArgs, SilhouetteEdgeArgs } from "./RenderMesh";
|
|
6
6
|
export { MultiModelPackedFeatureTable, PackedFeatureModelTable, PackedFeatureTable } from "./PackedFeatureTable";
|
|
7
|
+
export { RenderMaterialParams } from "./RenderMaterialParams";
|
|
8
|
+
export { RenderTextureParams } from "./RenderTextureParams";
|
|
7
9
|
//# sourceMappingURL=cross-package.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAG/F,OAAO,EACL,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAyB,gBAAgB,EAAE,kBAAkB,EACzG,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,4BAA4B,EAAE,uBAAuB,EAAE,kBAAkB,EAC1E,MAAM,sBAAsB,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\nexport type { DecorationGeometryProps, SnapRequestProps, SnapResponseProps } from \"./Snapping\";\nexport {\n EdgeArgs, MeshEdge, MeshEdges, MeshPolyline, type MeshPolylineList, PolylineEdgeArgs, SilhouetteEdgeArgs\n} from \"./RenderMesh\";\nexport {\n MultiModelPackedFeatureTable, PackedFeatureModelTable, PackedFeatureTable\n} from \"./PackedFeatureTable\";\n"]}
|
|
1
|
+
{"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAG/F,OAAO,EACL,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAyB,gBAAgB,EAAE,kBAAkB,EACzG,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,4BAA4B,EAAE,uBAAuB,EAAE,kBAAkB,EAC1E,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,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\nexport type { DecorationGeometryProps, SnapRequestProps, SnapResponseProps } from \"./Snapping\";\nexport {\n EdgeArgs, MeshEdge, MeshEdges, MeshPolyline, type MeshPolylineList, PolylineEdgeArgs, SilhouetteEdgeArgs\n} from \"./RenderMesh\";\nexport {\n MultiModelPackedFeatureTable, PackedFeatureModelTable, PackedFeatureTable\n} from \"./PackedFeatureTable\";\nexport type { BackendReadable, BackendWritable, BackendBuffer } from \"./BackendTypes\";\nexport { RenderMaterialParams } from \"./RenderMaterialParams\";\nexport { RenderTextureParams } from \"./RenderTextureParams\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RpcMarshaling.d.ts","sourceRoot":"","sources":["../../../../src/rpc/core/RpcMarshaling.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RpcMarshaling.d.ts","sourceRoot":"","sources":["../../../../src/rpc/core/RpcMarshaling.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAY5C,gBAAgB;AAChB,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,IAAI,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;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MAAM,CAAC,CAAC;gBACxB,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC;YAC7B,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,YAAY,CAAC,KAAc;QACxC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC;YACtD,KAAK,CAAC,OAAO,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;YACtF,KAAK,CAAC,IAAI,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;YACzF,KAAK,CAAC,OAAO,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;YAC/F,KAAK,CAAC,KAAK,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;YAC3F,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF","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 RpcInterface\n */\nimport { BentleyStatus } from \"@itwin/core-bentley\";\nimport { IModelError } from \"../../IModelError\";\nimport { BackendReadable } from \"../../BackendTypes\";\nimport { RpcProtocol } from \"./RpcProtocol\";\n\n// cspell:ignore unmarshal\n/* eslint-disable @typescript-eslint/no-deprecated */\n\nfunction isBuffer(val: any): boolean {\n return val && typeof (val.constructor) !== \"undefined\" && typeof (val.constructor.isBuffer) === \"function\" && val.constructor.isBuffer(val);\n}\n\nlet marshalingTarget: RpcSerializedValue;\nlet chunkThreshold = 0;\n\n/** @internal */\nexport interface MarshalingBinaryMarker {\n isBinary: true;\n index: number;\n size: number;\n chunks: number;\n}\n\n/** @internal */\nexport namespace MarshalingBinaryMarker {\n export function createDefault(): MarshalingBinaryMarker {\n return { isBinary: true, index: 0, size: -1, chunks: 1 };\n }\n}\n\n/** @internal */\nexport interface RpcSerializedValue {\n objects: string;\n data: Uint8Array[];\n chunks?: number;\n stream?: BackendReadable;\n}\n\n/** @internal */\nexport namespace RpcSerializedValue {\n export function create(objects = \"\", data: Uint8Array[] = []): RpcSerializedValue {\n return { objects, data };\n }\n}\n\n/** @internal */\nexport class RpcMarshaling {\n private constructor() { }\n\n /** Serializes a value. */\n public static serialize(protocol: RpcProtocol | undefined, value: any): RpcSerializedValue {\n const serialized = RpcSerializedValue.create();\n\n if (value === undefined)\n return serialized;\n\n marshalingTarget = serialized;\n chunkThreshold = protocol ? protocol.transferChunkThreshold : 0;\n serialized.objects = JSON.stringify(value, (_key, _value) => WireFormat.marshal(_key, _value));\n marshalingTarget = undefined as any;\n chunkThreshold = 0;\n\n return serialized;\n }\n\n /** Deserializes a value. */\n public static deserialize(protocol: RpcProtocol | undefined, value: RpcSerializedValue): any {\n if (value.objects === \"\") {\n return undefined;\n }\n\n marshalingTarget = value;\n chunkThreshold = protocol ? protocol.transferChunkThreshold : 0;\n let result;\n try {\n result = JSON.parse(value.objects, (_key, _value) => WireFormat.unmarshal(_key, _value));\n } catch (error) {\n if (error instanceof SyntaxError)\n throw new IModelError(BentleyStatus.ERROR, `Invalid JSON: \"${value.objects}\"`);\n throw error;\n }\n marshalingTarget = undefined as any;\n chunkThreshold = 0;\n\n return result;\n }\n}\n\nclass WireFormat {\n /** JSON.stringify replacer callback. */\n public static marshal(this: any, _key: string, value: any) {\n const asBinary = WireFormat.marshalBinary(value);\n if (asBinary) {\n return asBinary;\n }\n\n const asError = WireFormat.marshalError(value);\n if (asError) {\n return asError;\n }\n\n return value;\n }\n\n /** JSON.parse reviver callback. */\n public static unmarshal(_key: string, value: any) {\n if (typeof (value) === \"object\" && value !== null && value.hasOwnProperty(\"isBinary\") && value.isBinary) {\n return WireFormat.unmarshalBinary(value);\n }\n\n return value;\n }\n\n private static marshalBinary(value: Uint8Array): MarshalingBinaryMarker | undefined {\n if (value instanceof Uint8Array || isBuffer(value)) {\n const marker: MarshalingBinaryMarker = { isBinary: true, index: -1, size: value.byteLength, chunks: 1 };\n\n if (chunkThreshold && value.byteLength > chunkThreshold) {\n marker.index = marshalingTarget.data.length;\n marker.chunks = 0;\n\n let cursor = value.byteOffset;\n const end = cursor + value.byteLength;\n let chunk = chunkThreshold;\n\n for (; ;) {\n if (cursor >= end) {\n break;\n }\n\n marshalingTarget.data.push(new Uint8Array(value.buffer, cursor, chunk));\n ++marker.chunks;\n cursor += chunk;\n\n const consumed = cursor - value.byteOffset;\n const remaining = value.byteLength - consumed;\n chunk = Math.min(chunkThreshold, remaining);\n }\n } else {\n marker.index = marshalingTarget.data.push(value) - 1;\n }\n\n return marker;\n } else {\n return undefined;\n }\n }\n\n private static unmarshalBinary(value: MarshalingBinaryMarker): Uint8Array {\n if (value.index >= marshalingTarget.data.length) {\n throw new IModelError(BentleyStatus.ERROR, `Cannot unmarshal missing binary value.`);\n }\n\n if (value.chunks === 0) {\n return new Uint8Array();\n } else if (value.chunks === 1) {\n return new Uint8Array(marshalingTarget.data[value.index]);\n } else {\n const buffer = new ArrayBuffer(value.size);\n const view = new Uint8Array(buffer);\n\n let cursor = 0;\n for (let c = 0; c !== value.chunks; ++c) {\n const chunk = marshalingTarget.data[value.index + c];\n view.set(chunk, cursor);\n cursor += chunk.byteLength;\n }\n\n return view;\n }\n }\n\n private static marshalError(value: unknown) {\n if (value instanceof Error) {\n const props = Object.getOwnPropertyDescriptors(value);\n props.isError = { configurable: true, enumerable: true, writable: true, value: true };\n props.name = { configurable: true, enumerable: true, writable: true, value: value.name };\n props.message = { configurable: true, enumerable: true, writable: true, value: value.message };\n props.stack = { configurable: true, enumerable: true, writable: true, value: value.stack };\n return Object.create(Object.prototype, props);\n }\n\n return undefined;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RpcMarshaling.js","sourceRoot":"","sources":["../../../../src/rpc/core/RpcMarshaling.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,0BAA0B;AAC1B,qDAAqD;AAErD,SAAS,QAAQ,CAAC,GAAQ;IACxB,OAAO,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,UAAU,IAAI,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC9I,CAAC;AAED,IAAI,gBAAoC,CAAC;AACzC,IAAI,cAAc,GAAG,CAAC,CAAC;AAUvB,gBAAgB;AAChB,MAAM,KAAW,sBAAsB,CAItC;AAJD,WAAiB,sBAAsB;IACrC,SAAgB,aAAa;QAC3B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IAC3D,CAAC;IAFe,oCAAa,gBAE5B,CAAA;AACH,CAAC,EAJgB,sBAAsB,KAAtB,sBAAsB,QAItC;AAUD,gBAAgB;AAChB,MAAM,KAAW,kBAAkB,CAIlC;AAJD,WAAiB,kBAAk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E,IAAI,EAAE,CAAC;YACtF,KAAK,CAAC,IAAI,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;YACzF,KAAK,CAAC,OAAO,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;YAC/F,KAAK,CAAC,KAAK,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;YAC3F,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF","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 RpcInterface\n */\nimport { BentleyStatus } from \"@itwin/core-bentley\";\nimport { IModelError } from \"../../IModelError\";\nimport { BackendReadable } from \"../../internal/BackendTypes\";\nimport { RpcProtocol } from \"./RpcProtocol\";\n\n// cspell:ignore unmarshal\n/* eslint-disable @typescript-eslint/no-deprecated */\n\nfunction isBuffer(val: any): boolean {\n return val && typeof (val.constructor) !== \"undefined\" && typeof (val.constructor.isBuffer) === \"function\" && val.constructor.isBuffer(val);\n}\n\nlet marshalingTarget: RpcSerializedValue;\nlet chunkThreshold = 0;\n\n/** @internal */\nexport interface MarshalingBinaryMarker {\n isBinary: true;\n index: number;\n size: number;\n chunks: number;\n}\n\n/** @internal */\nexport namespace MarshalingBinaryMarker {\n export function createDefault(): MarshalingBinaryMarker {\n return { isBinary: true, index: 0, size: -1, chunks: 1 };\n }\n}\n\n/** @internal */\nexport interface RpcSerializedValue {\n objects: string;\n data: Uint8Array[];\n chunks?: number;\n stream?: BackendReadable;\n}\n\n/** @internal */\nexport namespace RpcSerializedValue {\n export function create(objects = \"\", data: Uint8Array[] = []): RpcSerializedValue {\n return { objects, data };\n }\n}\n\n/** @internal */\nexport class RpcMarshaling {\n private constructor() { }\n\n /** Serializes a value. */\n public static serialize(protocol: RpcProtocol | undefined, value: any): RpcSerializedValue {\n const serialized = RpcSerializedValue.create();\n\n if (value === undefined)\n return serialized;\n\n marshalingTarget = serialized;\n chunkThreshold = protocol ? protocol.transferChunkThreshold : 0;\n serialized.objects = JSON.stringify(value, (_key, _value) => WireFormat.marshal(_key, _value));\n marshalingTarget = undefined as any;\n chunkThreshold = 0;\n\n return serialized;\n }\n\n /** Deserializes a value. */\n public static deserialize(protocol: RpcProtocol | undefined, value: RpcSerializedValue): any {\n if (value.objects === \"\") {\n return undefined;\n }\n\n marshalingTarget = value;\n chunkThreshold = protocol ? protocol.transferChunkThreshold : 0;\n let result;\n try {\n result = JSON.parse(value.objects, (_key, _value) => WireFormat.unmarshal(_key, _value));\n } catch (error) {\n if (error instanceof SyntaxError)\n throw new IModelError(BentleyStatus.ERROR, `Invalid JSON: \"${value.objects}\"`);\n throw error;\n }\n marshalingTarget = undefined as any;\n chunkThreshold = 0;\n\n return result;\n }\n}\n\nclass WireFormat {\n /** JSON.stringify replacer callback. */\n public static marshal(this: any, _key: string, value: any) {\n const asBinary = WireFormat.marshalBinary(value);\n if (asBinary) {\n return asBinary;\n }\n\n const asError = WireFormat.marshalError(value);\n if (asError) {\n return asError;\n }\n\n return value;\n }\n\n /** JSON.parse reviver callback. */\n public static unmarshal(_key: string, value: any) {\n if (typeof (value) === \"object\" && value !== null && value.hasOwnProperty(\"isBinary\") && value.isBinary) {\n return WireFormat.unmarshalBinary(value);\n }\n\n return value;\n }\n\n private static marshalBinary(value: Uint8Array): MarshalingBinaryMarker | undefined {\n if (value instanceof Uint8Array || isBuffer(value)) {\n const marker: MarshalingBinaryMarker = { isBinary: true, index: -1, size: value.byteLength, chunks: 1 };\n\n if (chunkThreshold && value.byteLength > chunkThreshold) {\n marker.index = marshalingTarget.data.length;\n marker.chunks = 0;\n\n let cursor = value.byteOffset;\n const end = cursor + value.byteLength;\n let chunk = chunkThreshold;\n\n for (; ;) {\n if (cursor >= end) {\n break;\n }\n\n marshalingTarget.data.push(new Uint8Array(value.buffer, cursor, chunk));\n ++marker.chunks;\n cursor += chunk;\n\n const consumed = cursor - value.byteOffset;\n const remaining = value.byteLength - consumed;\n chunk = Math.min(chunkThreshold, remaining);\n }\n } else {\n marker.index = marshalingTarget.data.push(value) - 1;\n }\n\n return marker;\n } else {\n return undefined;\n }\n }\n\n private static unmarshalBinary(value: MarshalingBinaryMarker): Uint8Array {\n if (value.index >= marshalingTarget.data.length) {\n throw new IModelError(BentleyStatus.ERROR, `Cannot unmarshal missing binary value.`);\n }\n\n if (value.chunks === 0) {\n return new Uint8Array();\n } else if (value.chunks === 1) {\n return new Uint8Array(marshalingTarget.data[value.index]);\n } else {\n const buffer = new ArrayBuffer(value.size);\n const view = new Uint8Array(buffer);\n\n let cursor = 0;\n for (let c = 0; c !== value.chunks; ++c) {\n const chunk = marshalingTarget.data[value.index + c];\n view.set(chunk, cursor);\n cursor += chunk.byteLength;\n }\n\n return view;\n }\n }\n\n private static marshalError(value: unknown) {\n if (value instanceof Error) {\n const props = Object.getOwnPropertyDescriptors(value);\n props.isError = { configurable: true, enumerable: true, writable: true, value: true };\n props.name = { configurable: true, enumerable: true, writable: true, value: value.name };\n props.message = { configurable: true, enumerable: true, writable: true, value: value.message };\n props.stack = { configurable: true, enumerable: true, writable: true, value: value.stack };\n return Object.create(Object.prototype, props);\n }\n\n return undefined;\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module RpcInterface
|
|
3
3
|
*/
|
|
4
|
-
import { BackendBuffer, BackendReadable } from "../../BackendTypes";
|
|
4
|
+
import { BackendBuffer, BackendReadable } from "../../internal/BackendTypes";
|
|
5
5
|
import { RpcSerializedValue } from "../core/RpcMarshaling";
|
|
6
6
|
import { HttpServerRequest } from "../web/WebAppRpcProtocol";
|
|
7
7
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RpcMultipart.d.ts","sourceRoot":"","sources":["../../../../src/rpc/web/RpcMultipart.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RpcMultipart.d.ts","sourceRoot":"","sources":["../../../../src/rpc/web/RpcMultipart.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAI7D,gBAAgB;AAChB,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,aAAa,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrF;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,UAAU,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACtC;AAED;;GAEG;AACH,qBAAa,YAAY;IACvB,wDAAwD;WAC1C,UAAU,CAAC,KAAK,EAAE,kBAAkB,GAAG,QAAQ;IAM7D,mDAAmD;WACrC,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,gBAAgB;IAIvE,2DAA2D;WACvC,YAAY,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBA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K,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;YAC7C,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,QAAQ,GAAG;QACvB,YAAY,CAAC,MAA0B;YACrC,MAAM,IAAI,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QAC3D,CAAC;QACD,KAAK,CAAC,YAAY,CAAC,IAAuB;YACxC,MAAM,IAAI,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QAC3D,CAAC;QACD,YAAY,CAAC,CAAS,EAAE,IAAoB,EAAE,KAAyB;YACrE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC;QAC5F,CAAC;KACF,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 RpcInterface\n */\n\nimport { BentleyStatus } from \"@itwin/core-bentley\";\nimport { IModelError } from \"../../IModelError\";\nimport { BackendBuffer, BackendReadable } from \"../../BackendTypes\";\nimport { RpcSerializedValue } from \"../core/RpcMarshaling\";\nimport { HttpServerRequest } from \"../web/WebAppRpcProtocol\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** @internal */\nexport interface FormDataCommon {\n append(name: string, value: string | Blob | BackendBuffer, fileName?: string): void;\n}\n\n/** @internal */\nexport interface ReadableFormData extends BackendReadable {\n getHeaders(): { [key: string]: any };\n}\n\n/** Support for transporting RPC values using the HTTP multipart content type.\n * @internal\n */\nexport class RpcMultipart {\n /** Creates a multipart form object for an RPC value. */\n public static createForm(value: RpcSerializedValue): FormData {\n const form = new FormData();\n RpcMultipart.writeValueToForm(form, value);\n return form;\n }\n\n /** Creates a multipart stream for an RPC value. */\n public static createStream(value: RpcSerializedValue): ReadableFormData {\n return this.platform.createStream(value);\n }\n\n /** Obtains the RPC value from a multipart HTTP request. */\n public static async parseRequest(req: HttpServerRequest): Promise<RpcSerializedValue> {\n return this.platform.parseRequest(req);\n }\n\n /** @internal */\n public static writeValueToForm(form: FormDataCommon, value: RpcSerializedValue) {\n form.append(\"objects\", value.objects);\n\n for (let i = 0; i !== value.data.length; ++i) {\n this.platform.appendToForm(i, form, value);\n }\n }\n\n /** @internal */\n public static platform = {\n createStream(_value: RpcSerializedValue): ReadableFormData {\n throw new IModelError(BentleyStatus.ERROR, \"Not bound.\");\n },\n async parseRequest(_req: HttpServerRequest): Promise<RpcSerializedValue> {\n throw new IModelError(BentleyStatus.ERROR, \"Not bound.\");\n },\n appendToForm(i: number, form: FormDataCommon, value: RpcSerializedValue): void {\n form.append(`data-${i}`, new Blob([value.data[i]], { type: \"application/octet-stream\" }));\n },\n };\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"RpcMultipart.js","sourceRoot":"","sources":["../../../../src/rpc/web/RpcMultipart.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAiBhD;;GAEG;AACH,MAAM,OAAO,YAAY;IACvB,wDAAwD;IACjD,MAAM,CAAC,UAAU,CAAC,KAAyB;QAChD,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC5B,YAAY,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,mDAAmD;IAC5C,MAAM,CAAC,YAAY,CAAC,KAAyB;QAClD,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,2DAA2D;IACpD,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,GAAsB;QACrD,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACzC,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,gBAAgB,CAAC,IAAoB,EAAE,KAAyB;QAC5E,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;YAC7C,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,QAAQ,GAAG;QACvB,YAAY,CAAC,MAA0B;YACrC,MAAM,IAAI,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QAC3D,CAAC;QACD,KAAK,CAAC,YAAY,CAAC,IAAuB;YACxC,MAAM,IAAI,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QAC3D,CAAC;QACD,YAAY,CAAC,CAAS,EAAE,IAAoB,EAAE,KAAyB;YACrE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC;QAC5F,CAAC;KACF,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 RpcInterface\n */\n\nimport { BentleyStatus } from \"@itwin/core-bentley\";\nimport { IModelError } from \"../../IModelError\";\nimport { BackendBuffer, BackendReadable } from \"../../internal/BackendTypes\";\nimport { RpcSerializedValue } from \"../core/RpcMarshaling\";\nimport { HttpServerRequest } from \"../web/WebAppRpcProtocol\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** @internal */\nexport interface FormDataCommon {\n append(name: string, value: string | Blob | BackendBuffer, fileName?: string): void;\n}\n\n/** @internal */\nexport interface ReadableFormData extends BackendReadable {\n getHeaders(): { [key: string]: any };\n}\n\n/** Support for transporting RPC values using the HTTP multipart content type.\n * @internal\n */\nexport class RpcMultipart {\n /** Creates a multipart form object for an RPC value. */\n public static createForm(value: RpcSerializedValue): FormData {\n const form = new FormData();\n RpcMultipart.writeValueToForm(form, value);\n return form;\n }\n\n /** Creates a multipart stream for an RPC value. */\n public static createStream(value: RpcSerializedValue): ReadableFormData {\n return this.platform.createStream(value);\n }\n\n /** Obtains the RPC value from a multipart HTTP request. */\n public static async parseRequest(req: HttpServerRequest): Promise<RpcSerializedValue> {\n return this.platform.parseRequest(req);\n }\n\n /** @internal */\n public static writeValueToForm(form: FormDataCommon, value: RpcSerializedValue) {\n form.append(\"objects\", value.objects);\n\n for (let i = 0; i !== value.data.length; ++i) {\n this.platform.appendToForm(i, form, value);\n }\n }\n\n /** @internal */\n public static platform = {\n createStream(_value: RpcSerializedValue): ReadableFormData {\n throw new IModelError(BentleyStatus.ERROR, \"Not bound.\");\n },\n async parseRequest(_req: HttpServerRequest): Promise<RpcSerializedValue> {\n throw new IModelError(BentleyStatus.ERROR, \"Not bound.\");\n },\n appendToForm(i: number, form: FormDataCommon, value: RpcSerializedValue): void {\n form.append(`data-${i}`, new Blob([value.data[i]], { type: \"application/octet-stream\" }));\n },\n };\n}\n\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module RpcInterface
|
|
3
3
|
*/
|
|
4
|
-
import { BackendReadable, BackendWritable } from "../../BackendTypes";
|
|
4
|
+
import { BackendReadable, BackendWritable } from "../../internal/BackendTypes";
|
|
5
5
|
import { RpcConfiguration } from "../core/RpcConfiguration";
|
|
6
6
|
import { RpcContentType, RpcRequestStatus } from "../core/RpcConstants";
|
|
7
7
|
import { RpcOperation } from "../core/RpcOperation";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebAppRpcProtocol.d.ts","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcProtocol.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WebAppRpcProtocol.d.ts","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcProtocol.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAqB,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAwB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAA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gB,CAAC,eAAe,CAAC,CAAC,OAAO,GAAG,CAAC;YAClD,OAAO,CAAC,CAAC,OAAO,GAAG,CAAC;QACtB,CAAC;IACH,CAAC;IAEe,sBAAsB,GAAG,IAAI,CAAC;IAE9C,+DAA+D;IACxD,SAAS,CAAC,IAAY;QAC3B,OAAO,IAAI,KAAK,GAAG,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAW,kBAAkB,KAAK,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAO3E,mCAAmC;IACnC,YAAmB,aAA+B;QAChD,KAAK,CAAC,aAAa,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IACrG,CAAC;CACF","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 RpcInterface\n */\n\nimport { BentleyError, Logger } from \"@itwin/core-bentley\";\nimport { CommonLoggerCategory } from \"../../CommonLoggerCategory\";\nimport { BackendReadable, BackendWritable } from \"../../BackendTypes\";\nimport { RpcConfiguration } from \"../core/RpcConfiguration\";\nimport { RpcContentType, RpcRequestStatus, WEB_RPC_CONSTANTS } from \"../core/RpcConstants\";\nimport { RpcOperation } from \"../core/RpcOperation\";\nimport { RpcProtocol, SerializedRpcRequest } from \"../core/RpcProtocol\";\nimport { OpenAPIInfo, OpenAPIParameter, RpcOpenAPIDescription } from \"./OpenAPI\";\nimport { WebAppRpcLogging } from \"./WebAppRpcLogging\";\nimport { WebAppRpcRequest } from \"./WebAppRpcRequest\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** An HTTP server request object.\n * @public\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\n */\nexport interface HttpServerRequest extends BackendReadable {\n aborted: boolean;\n httpVersion: string;\n httpVersionMajor: number;\n httpVersionMinor: number;\n complete: boolean;\n connection: any;\n headers: { [header: string]: string | string[] | undefined };\n rawHeaders: string[];\n trailers: { [key: string]: string | undefined };\n trailersDistinct: NodeJS.Dict<string[]>;\n rawTrailers: string[];\n setTimeout(msecs: number, callback: () => void): void;\n setTimeout(msecs: number, callback: () => void): this;\n url?: string;\n statusCode?: number;\n statusMessage?: string;\n socket: any;\n destroy(error?: Error): this;\n body: string | Buffer;\n path: string;\n method: string;\n ip?: string;\n header: (field: string) => string | undefined;\n headersDistinct: NodeJS.Dict<string[]>;\n}\n\n/** An HTTP server response object.\n * @public\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\n */\nexport interface HttpServerResponse extends BackendWritable {\n send(body?: any): HttpServerResponse;\n status(code: number): HttpServerResponse;\n set(field: string, value: string): void;\n}\n\n/** The HTTP application protocol.\n * @internal\n */\nexport abstract class WebAppRpcProtocol extends RpcProtocol {\n public override preserveStreams = true;\n\n /** Convenience handler for an RPC operation get request for an HTTP server. */\n public async handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse) {\n return this.handleOperationPostRequest(req, res);\n }\n\n /** Convenience handler for an RPC operation post request for an HTTP server. */\n public async handleOperationPostRequest(req: HttpServerRequest, res: HttpServerResponse) {\n let request: SerializedRpcRequest;\n try {\n request = await WebAppRpcRequest.parseRequest(this, req);\n } catch (error) {\n const message = BentleyError.getErrorMessage(error);\n Logger.logError(CommonLoggerCategory.RpcInterfaceBackend, `Failed to parse request: ${message}`, BentleyError.getErrorMetadata(error));\n res.status(400);\n res.send(JSON.stringify({ message, isError: true }));\n return;\n }\n const fulfillment = await this.fulfill(request);\n await WebAppRpcRequest.sendResponse(this, request, fulfillment, req, res);\n }\n\n /** Convenience handler for an OpenAPI description request for an HTTP server. */\n public handleOpenApiDescriptionRequest(_req: HttpServerRequest, res: HttpServerResponse) {\n const description = JSON.stringify(this.openAPIDescription);\n res.send(description);\n }\n\n /** Converts an HTTP content type value to an RPC content type value. */\n public static computeContentType(httpType: string | null | undefined): RpcContentType {\n if (!httpType)\n return RpcContentType.Unknown;\n\n if (httpType.indexOf(WEB_RPC_CONSTANTS.ANY_TEXT) === 0) {\n return RpcContentType.Text;\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.BINARY) === 0) {\n return RpcContentType.Binary;\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.MULTIPART) === 0) {\n return RpcContentType.Multipart;\n } else {\n return RpcContentType.Unknown;\n }\n }\n\n /** The OpenAPI-compatible info object for this protocol. */\n public abstract info: OpenAPIInfo;\n\n /** An optional prefix for RPC operation URI paths. */\n public pathPrefix: string = \"\";\n\n /** The RPC request class for this protocol. */\n public readonly requestType = WebAppRpcRequest;\n\n /** Supplies the status corresponding to a protocol-specific code value. */\n public override getStatus(code: number): RpcRequestStatus {\n switch (code) {\n case 404: return RpcRequestStatus.NotFound;\n case 202: return RpcRequestStatus.Pending;\n case 200: return RpcRequestStatus.Resolved;\n case 500: return RpcRequestStatus.Rejected;\n case 204: return RpcRequestStatus.NoContent;\n case 502: return RpcRequestStatus.BadGateway;\n case 503: return RpcRequestStatus.ServiceUnavailable;\n case 504: return RpcRequestStatus.GatewayTimeout;\n case 408: return RpcRequestStatus.RequestTimeout;\n case 429: return RpcRequestStatus.TooManyRequests;\n default: return RpcRequestStatus.Unknown;\n }\n }\n\n /** Supplies the protocol-specific code corresponding to a status value. */\n public override getCode(status: RpcRequestStatus): number {\n switch (status) {\n case RpcRequestStatus.NotFound: return 404;\n case RpcRequestStatus.Pending: return 202;\n case RpcRequestStatus.Resolved: return 200;\n case RpcRequestStatus.Rejected: return 500;\n case RpcRequestStatus.NoContent: return 204;\n case RpcRequestStatus.BadGateway: return 502;\n case RpcRequestStatus.ServiceUnavailable: return 503;\n case RpcRequestStatus.GatewayTimeout: return 504;\n case RpcRequestStatus.RequestTimeout: return 408;\n case RpcRequestStatus.TooManyRequests: return 429;\n default: return 501;\n }\n }\n\n public override supportsStatusCategory = true;\n\n /** Whether an HTTP status code indicates a request timeout. */\n public isTimeout(code: number): boolean {\n return code === 504;\n }\n\n /** An OpenAPI-compatible description of this protocol.\n * @internal\n */\n public get openAPIDescription() { return new RpcOpenAPIDescription(this); }\n\n /** Returns the OpenAPI-compatible URI path parameters for an RPC operation.\n * @internal\n */\n public abstract supplyPathParametersForOperation(_operation: RpcOperation): OpenAPIParameter[];\n\n /** Constructs an HTTP protocol. */\n public constructor(configuration: RpcConfiguration) {\n super(configuration);\n this.events.addListener(async (event, object) => WebAppRpcLogging.logProtocolEvent(event, object));\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"WebAppRpcProtocol.js","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcProtocol.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE3F,OAAO,EAAE,WAAW,EAAwB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAiC,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA6CtD;;GAEG;AACH,MAAM,OAAgB,iBAAkB,SAAQ,WAAW;IACzC,eAAe,GAAG,IAAI,CAAC;IAEvC,+EAA+E;IACxE,KAAK,CAAC,yBAAyB,CAAC,GAAsB,EAAE,GAAuB;QACpF,OAAO,IAAI,CAAC,0BAA0B,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACnD,CAAC;IA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C,CAAC;IACrG,CAAC;CACF","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 RpcInterface\n */\n\nimport { BentleyError, Logger } from \"@itwin/core-bentley\";\nimport { CommonLoggerCategory } from \"../../CommonLoggerCategory\";\nimport { BackendReadable, BackendWritable } from \"../../internal/BackendTypes\";\nimport { RpcConfiguration } from \"../core/RpcConfiguration\";\nimport { RpcContentType, RpcRequestStatus, WEB_RPC_CONSTANTS } from \"../core/RpcConstants\";\nimport { RpcOperation } from \"../core/RpcOperation\";\nimport { RpcProtocol, SerializedRpcRequest } from \"../core/RpcProtocol\";\nimport { OpenAPIInfo, OpenAPIParameter, RpcOpenAPIDescription } from \"./OpenAPI\";\nimport { WebAppRpcLogging } from \"./WebAppRpcLogging\";\nimport { WebAppRpcRequest } from \"./WebAppRpcRequest\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** An HTTP server request object.\n * @public\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\n */\nexport interface HttpServerRequest extends BackendReadable {\n aborted: boolean;\n httpVersion: string;\n httpVersionMajor: number;\n httpVersionMinor: number;\n complete: boolean;\n connection: any;\n headers: { [header: string]: string | string[] | undefined };\n rawHeaders: string[];\n trailers: { [key: string]: string | undefined };\n trailersDistinct: NodeJS.Dict<string[]>;\n rawTrailers: string[];\n setTimeout(msecs: number, callback: () => void): void;\n setTimeout(msecs: number, callback: () => void): this;\n url?: string;\n statusCode?: number;\n statusMessage?: string;\n socket: any;\n destroy(error?: Error): this;\n body: string | Buffer;\n path: string;\n method: string;\n ip?: string;\n header: (field: string) => string | undefined;\n headersDistinct: NodeJS.Dict<string[]>;\n}\n\n/** An HTTP server response object.\n * @public\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\n */\nexport interface HttpServerResponse extends BackendWritable {\n send(body?: any): HttpServerResponse;\n status(code: number): HttpServerResponse;\n set(field: string, value: string): void;\n}\n\n/** The HTTP application protocol.\n * @internal\n */\nexport abstract class WebAppRpcProtocol extends RpcProtocol {\n public override preserveStreams = true;\n\n /** Convenience handler for an RPC operation get request for an HTTP server. */\n public async handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse) {\n return this.handleOperationPostRequest(req, res);\n }\n\n /** Convenience handler for an RPC operation post request for an HTTP server. */\n public async handleOperationPostRequest(req: HttpServerRequest, res: HttpServerResponse) {\n let request: SerializedRpcRequest;\n try {\n request = await WebAppRpcRequest.parseRequest(this, req);\n } catch (error) {\n const message = BentleyError.getErrorMessage(error);\n Logger.logError(CommonLoggerCategory.RpcInterfaceBackend, `Failed to parse request: ${message}`, BentleyError.getErrorMetadata(error));\n res.status(400);\n res.send(JSON.stringify({ message, isError: true }));\n return;\n }\n const fulfillment = await this.fulfill(request);\n await WebAppRpcRequest.sendResponse(this, request, fulfillment, req, res);\n }\n\n /** Convenience handler for an OpenAPI description request for an HTTP server. */\n public handleOpenApiDescriptionRequest(_req: HttpServerRequest, res: HttpServerResponse) {\n const description = JSON.stringify(this.openAPIDescription);\n res.send(description);\n }\n\n /** Converts an HTTP content type value to an RPC content type value. */\n public static computeContentType(httpType: string | null | undefined): RpcContentType {\n if (!httpType)\n return RpcContentType.Unknown;\n\n if (httpType.indexOf(WEB_RPC_CONSTANTS.ANY_TEXT) === 0) {\n return RpcContentType.Text;\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.BINARY) === 0) {\n return RpcContentType.Binary;\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.MULTIPART) === 0) {\n return RpcContentType.Multipart;\n } else {\n return RpcContentType.Unknown;\n }\n }\n\n /** The OpenAPI-compatible info object for this protocol. */\n public abstract info: OpenAPIInfo;\n\n /** An optional prefix for RPC operation URI paths. */\n public pathPrefix: string = \"\";\n\n /** The RPC request class for this protocol. */\n public readonly requestType = WebAppRpcRequest;\n\n /** Supplies the status corresponding to a protocol-specific code value. */\n public override getStatus(code: number): RpcRequestStatus {\n switch (code) {\n case 404: return RpcRequestStatus.NotFound;\n case 202: return RpcRequestStatus.Pending;\n case 200: return RpcRequestStatus.Resolved;\n case 500: return RpcRequestStatus.Rejected;\n case 204: return RpcRequestStatus.NoContent;\n case 502: return RpcRequestStatus.BadGateway;\n case 503: return RpcRequestStatus.ServiceUnavailable;\n case 504: return RpcRequestStatus.GatewayTimeout;\n case 408: return RpcRequestStatus.RequestTimeout;\n case 429: return RpcRequestStatus.TooManyRequests;\n default: return RpcRequestStatus.Unknown;\n }\n }\n\n /** Supplies the protocol-specific code corresponding to a status value. */\n public override getCode(status: RpcRequestStatus): number {\n switch (status) {\n case RpcRequestStatus.NotFound: return 404;\n case RpcRequestStatus.Pending: return 202;\n case RpcRequestStatus.Resolved: return 200;\n case RpcRequestStatus.Rejected: return 500;\n case RpcRequestStatus.NoContent: return 204;\n case RpcRequestStatus.BadGateway: return 502;\n case RpcRequestStatus.ServiceUnavailable: return 503;\n case RpcRequestStatus.GatewayTimeout: return 504;\n case RpcRequestStatus.RequestTimeout: return 408;\n case RpcRequestStatus.TooManyRequests: return 429;\n default: return 501;\n }\n }\n\n public override supportsStatusCategory = true;\n\n /** Whether an HTTP status code indicates a request timeout. */\n public isTimeout(code: number): boolean {\n return code === 504;\n }\n\n /** An OpenAPI-compatible description of this protocol.\n * @internal\n */\n public get openAPIDescription() { return new RpcOpenAPIDescription(this); }\n\n /** Returns the OpenAPI-compatible URI path parameters for an RPC operation.\n * @internal\n */\n public abstract supplyPathParametersForOperation(_operation: RpcOperation): OpenAPIParameter[];\n\n /** Constructs an HTTP protocol. */\n public constructor(configuration: RpcConfiguration) {\n super(configuration);\n this.events.addListener(async (event, object) => WebAppRpcLogging.logProtocolEvent(event, object));\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-common",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.58",
|
|
4
4
|
"description": "iTwin.js components common to frontend and backend",
|
|
5
5
|
"main": "lib/cjs/core-common.js",
|
|
6
6
|
"module": "lib/esm/core-common.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"js-base64": "^3.6.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@itwin/core-bentley": "5.0.0-dev.
|
|
31
|
-
"@itwin/core-geometry": "5.0.0-dev.
|
|
30
|
+
"@itwin/core-bentley": "5.0.0-dev.58",
|
|
31
|
+
"@itwin/core-geometry": "5.0.0-dev.58"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@itwin/eslint-plugin": "5.0.0-dev.1",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"rimraf": "^3.0.2",
|
|
43
43
|
"typescript": "~5.6.2",
|
|
44
44
|
"vitest": "^2.1.0",
|
|
45
|
-
"@itwin/build-tools": "5.0.0-dev.
|
|
46
|
-
"@itwin/core-bentley": "5.0.0-dev.
|
|
47
|
-
"@itwin/core-geometry": "5.0.0-dev.
|
|
45
|
+
"@itwin/build-tools": "5.0.0-dev.58",
|
|
46
|
+
"@itwin/core-bentley": "5.0.0-dev.58",
|
|
47
|
+
"@itwin/core-geometry": "5.0.0-dev.58"
|
|
48
48
|
},
|
|
49
49
|
"nyc": {
|
|
50
50
|
"extends": "./node_modules/@itwin/build-tools/.nycrc",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,8FAA8F;AAC9F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BackendTypes.js","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Utils\n */\n\nimport type { Readable, Writable } from \"stream\"; // Must be \"import type\" to avoid webpack polyfill errors\nimport type { Buffer } from \"buffer\"; // Must be \"import type\" to avoid webpack polyfill errors\n\n/*\nIMPORTANT:\nThis is a temporary source file for backwards compatibility only.\nDo not add any new types to this file.\nAll types here will be removed in 4.0\n*/\n\n/** @public @deprecated in 3.x. This type was mistakenly made public in the common scope. */\nexport type BackendReadable = Readable;\n\n/** @public @deprecated in 3.x. This type was mistakenly made public in the common scope. */\nexport type BackendWritable = Writable;\n\n/** @internal @deprecated in 3.x. This type was mistakenly made public in the common scope. */\nexport type BackendBuffer = Buffer;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BackendTypes.d.ts","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AASrC,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC,8FAA8F;AAC9F,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BackendTypes.js","sourceRoot":"","sources":["../../src/BackendTypes.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","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 Utils\n */\n\nimport type { Readable, Writable } from \"stream\"; // Must be \"import type\" to avoid webpack polyfill errors\nimport type { Buffer } from \"buffer\"; // Must be \"import type\" to avoid webpack polyfill errors\n\n/*\nIMPORTANT:\nThis is a temporary source file for backwards compatibility only.\nDo not add any new types to this file.\nAll types here will be removed in 4.0\n*/\n\n/** @public @deprecated in 3.x. This type was mistakenly made public in the common scope. */\nexport type BackendReadable = Readable;\n\n/** @public @deprecated in 3.x. This type was mistakenly made public in the common scope. */\nexport type BackendWritable = Writable;\n\n/** @internal @deprecated in 3.x. This type was mistakenly made public in the common scope. */\nexport type BackendBuffer = Buffer;\n"]}
|
|
File without changes
|
|
File without changes
|