From ca30b2faeb9967aa07dc30ceaf9a3afa716cc204 Mon Sep 17 00:00:00 2001 From: Arun George Date: Mon, 16 May 2022 17:12:49 -0400 Subject: [PATCH 1/5] try to clean up and sort the generation script --- core/extension/codeGen/generate-exports.js | 69 +- core/extension/index.d.ts | 740 +++++++++--------- core/extension/index.js | 277 +++---- core/extension/preview.d.ts | 4 + .../src/extension/ExtensionRuntime.ts | 566 +++++++------- 5 files changed, 842 insertions(+), 814 deletions(-) diff --git a/core/extension/codeGen/generate-exports.js b/core/extension/codeGen/generate-exports.js index e6220ac99b9b..35b6dbbefb85 100644 --- a/core/extension/codeGen/generate-exports.js +++ b/core/extension/codeGen/generate-exports.js @@ -64,25 +64,19 @@ function generateDeclarationCode(exportList) { // Make real and type exports for each package for (const packageName in exportList) { - let realExports = "export {\n"; - let typeExports = "export type {\n"; - const exportTrailer = `} from "${packageName}";\n\n`; + const realExports = "export {\n\t"; + const typeExports = "export type {\n\t"; + const exportTrailer = `\n} from "${packageName}";\n\n`; - exportList[packageName].enum.forEach((enumExport) => { - realExports += `\t${enumExport},\n`; - }); - exportList[packageName].real.forEach((realExport) => { - realExports += `\t${realExport},\n`; - }); + const reals = [...exportList[packageName].enum, ...exportList[packageName].real] + .sort() + .join(",\n\t"); - exportList[packageName].interface.forEach((interfaceExport) => { - typeExports += `\t${interfaceExport},\n`; - }); - exportList[packageName].type.forEach((typeExport) => { - typeExports += `\t${typeExport},\n`; - }); + const types = [...exportList[packageName].interface, ...exportList[packageName].type] + .sort() + .join(",\n\t"); - exportCode += realExports + exportTrailer + typeExports + exportTrailer; + exportCode += realExports + reals + exportTrailer + typeExports + types + exportTrailer; }; return exportCode; @@ -90,18 +84,16 @@ function generateDeclarationCode(exportList) { // Create the export code for the .js file function generateJsCode(exportList) { - let exportCode = "export const {\n"; - const exportTrailer = "} = ext.exports;\n"; + let exportCode = "export const {"; + const exportTrailer = "\n} = ext.exports;\n"; // Only make exports for reals in each package for (const packageName in exportList) { - exportCode += `// ${packageName}:\n`; - exportList[packageName].enum.forEach((enumExport) => { - exportCode += `\t${enumExport},\n`; - }); - exportList[packageName].real.forEach((realExport) => { - exportCode += `\t${realExport},\n`; - }); + exportCode += `\n// ${packageName}:`; + const _exports = [...exportList[packageName].enum, ...exportList[packageName].real] + .sort() + .join(",\n\t"); + exportCode += _exports ? `\n\t${_exports},` : ''; }; return exportCode + exportTrailer; @@ -109,11 +101,12 @@ function generateJsCode(exportList) { // Create the export code for the .ts file function generateRuntimeCode(exportListPreview, exportList) { + const tab = " "; // two space tab let exportCode = ""; - let exports = "const extensionExports = {\n"; - const exportTrailer = `};\n\n`; + let exportsApi = `const extensionExports = {\n${tab}`; + const _exports = []; + const exportTrailer = `\n};\n\n`; const addComment = (packageName, release, kind) => ` // @${release} ${kind}(s) from ${packageName}\n`; - const tab = " "; // two space tab for (const packageName in exportList) { let imports = "import {\n"; @@ -123,33 +116,35 @@ function generateRuntimeCode(exportListPreview, exportList) { importTrailer = `} from "../core-frontend";\n\n`; imports += exportListPreview[packageName].enum.length > 0 ? addComment(packageName, 'preview', 'enum') : ""; - exportListPreview[packageName].enum.forEach((enumExport) => { + exportListPreview[packageName].enum.sort().forEach((enumExport) => { imports += `${tab}${enumExport},\n`; - exports += `${tab}${enumExport},\n`; + _exports.push(enumExport); }); imports += exportListPreview[packageName].real.length > 0 ? addComment(packageName, 'preview', 'real') : ""; - exportListPreview[packageName].real.forEach((realExport) => { + exportListPreview[packageName].real.sort().forEach((realExport) => { imports += `${tab}${realExport},\n`; - exports += `${tab}${realExport},\n`; + _exports.push(realExport); }); imports += exportList[packageName].enum.length > 0 ? addComment(packageName, 'public', 'enum') : ""; - exportList[packageName].enum.forEach((enumExport) => { + exportList[packageName].enum.sort().forEach((enumExport) => { imports += `${tab}${enumExport},\n`; - exports += `${tab}${enumExport},\n`; + _exports.push(enumExport); }); imports += exportList[packageName].real.length > 0 ? addComment(packageName, 'public', 'real') : ""; - exportList[packageName].real.forEach((realExport) => { + exportList[packageName].real.sort().forEach((realExport) => { imports += `${tab}${realExport},\n`; - exports += `${tab}${realExport},\n`; + _exports.push(realExport); }); exportCode += imports + importTrailer; }; - return exportCode + exports + exportTrailer; + exportsApi += _exports.sort().join(`,\n${tab}`) + ","; + + return exportCode + exportsApi + exportTrailer; } // Find the extension linter's output file and convert to a set of useful lists diff --git a/core/extension/index.d.ts b/core/extension/index.d.ts index 8abf6ad119da..64344a7efa06 100644 --- a/core/extension/index.d.ts +++ b/core/extension/index.d.ts @@ -26,560 +26,568 @@ export declare class ExtensionHost { // BEGIN GENERATED CODE export { - ContextRotationId, - ACSType, ACSDisplayOptions, - CoordSystem, - LocateAction, - LocateFilterStatus, - SnapStatus, - FlashMode, - FrontendLoggerCategory, - SnapMode, - SnapHeat, - HitSource, - HitGeomType, - HitParentGeomType, - HitPriority, - HitDetailType, - OutputMessageType, - OutputMessagePriority, - OutputMessageAlert, - ActivityMessageEndReason, - MessageBoxType, - MessageBoxIconType, - MessageBoxValue, - GraphicType, - UniformType, - VaryingType, - SelectionSetEventType, - StandardViewId, - TileLoadStatus, - TileVisibility, - TileLoadPriority, - TileBoundingBoxes, - TileTreeLoadStatus, - TileGraphicType, - ClipEventType, - SelectionMethod, - SelectionMode, - SelectionProcessing, - BeButton, - CoordinateLockOverrides, - InputSource, - CoordSource, - BeModifierKeys, - EventHandled, - ParseAndRunResult, - KeyinParseError, - StartOrResume, - ManipulatorToolEvent, - ToolAssistanceImage, - ToolAssistanceInputMethod, - ViewStatus, + ACSType, AccuDrawHintBuilder, AccuSnap, - AuxCoordSystemState, + ActivityMessageDetails, + ActivityMessageEndReason, AuxCoordSystem2dState, AuxCoordSystem3dState, AuxCoordSystemSpatialState, + AuxCoordSystemState, + BeButton, + BeButtonEvent, + BeButtonState, + BeModifierKeys, + BeTouchEvent, + BeWheelEvent, + BingElevationProvider, BingLocationProvider, CategorySelectorState, ChangeFlags, + ClipEventType, + Cluster, ContextRealityModelState, - DisplayStyleState, + ContextRotationId, + CoordSource, + CoordSystem, + CoordinateLockOverrides, + Decorations, + DisclosedTileTreeSet, DisplayStyle2dState, DisplayStyle3dState, + DisplayStyleState, + DrawingModelState, DrawingViewState, - LocateOptions, - LocateResponse, - ElementPicker, + EditManipulator, ElementLocateManager, + ElementPicker, + ElementState, EmphasizeElements, EntityState, - ElementState, + EventController, + EventHandled, + FeatureSymbology, + FlashMode, FlashSettings, + FrontendLoggerCategory, FrustumAnimator, + GeometricModel2dState, + GeometricModel3dState, + GeometricModelState, GlobeAnimator, + GraphicBranch, + GraphicBuilder, + GraphicType, + HiliteSet, HitDetail, - SnapDetail, - IntersectDetail, + HitDetailType, + HitGeomType, HitList, - canvasToResizedCanvasWithBars, - imageBufferToCanvas, - canvasToImageBuffer, - getImageSourceMimeType, - getImageSourceFormatForMimeType, - imageElementFromImageSource, - imageElementFromUrl, - extractImageSourceDimensions, - imageBufferToPngDataUrl, - imageBufferToBase64EncodedPng, - getCompressedJpegFromCanvas, + HitParentGeomType, + HitPriority, + HitSource, IModelConnection, - NotificationHandler, + IconSprites, + InputCollector, + InputSource, + InteractiveTool, + IntersectDetail, + KeyinParseError, + LocateAction, + LocateFilterStatus, + LocateOptions, + LocateResponse, + ManipulatorToolEvent, MarginPercent, Marker, - Cluster, MarkerSet, + MessageBoxIconType, + MessageBoxType, + MessageBoxValue, ModelSelectorState, ModelState, - GeometricModelState, - GeometricModel2dState, - GeometricModel3dState, - SheetModelState, - SpatialModelState, - PhysicalModelState, - SpatialLocationModelState, - DrawingModelState, - SectionDrawingModelState, - NotifyMessageDetails, - ActivityMessageDetails, + NotificationHandler, NotificationManager, + NotifyMessageDetails, + OrthographicViewState, + OutputMessageAlert, + OutputMessagePriority, + OutputMessageType, + ParseAndRunResult, PerModelCategoryVisibility, - Decorations, - FeatureSymbology, - GraphicBranch, - GraphicBuilder, + PhysicalModelState, Pixel, + PrimitiveTool, RenderClipVolume, RenderGraphic, RenderGraphicOwner, RenderSystem, Scene, - HiliteSet, + SectionDrawingModelState, + SelectionMethod, + SelectionMode, + SelectionProcessing, SelectionSet, + SelectionSetEventType, + SheetModelState, SheetViewState, + SnapDetail, + SnapHeat, + SnapMode, + SnapStatus, + SpatialLocationModelState, + SpatialModelState, SpatialViewState, - OrthographicViewState, Sprite, - IconSprites, SpriteLocation, + StandardViewId, + StartOrResume, TentativePoint, - DisclosedTileTreeSet, - readElementGraphics, - BingElevationProvider, Tile, TileAdmin, + TileBoundingBoxes, TileDrawArgs, + TileGraphicType, + TileLoadPriority, + TileLoadStatus, TileRequest, - TileRequestChannelStatistics, TileRequestChannel, + TileRequestChannelStatistics, TileRequestChannels, TileTree, + TileTreeLoadStatus, TileTreeReference, TileUsageMarker, + TileVisibility, Tiles, - ViewClipTool, - ViewClipClearTool, - ViewClipDecorationProvider, - EditManipulator, - EventController, - PrimitiveTool, - BeButtonState, - BeButtonEvent, - BeTouchEvent, - BeWheelEvent, Tool, - InteractiveTool, - InputCollector, ToolAdmin, ToolAssistance, + ToolAssistanceImage, + ToolAssistanceInputMethod, ToolSettings, - ViewTool, - ViewManip, + TwoWayViewportFrustumSync, + TwoWayViewportSync, + UniformType, + VaryingType, + ViewClipClearTool, + ViewClipDecorationProvider, + ViewClipTool, ViewCreator2d, ViewCreator3d, - queryTerrainElevationOffset, - ViewingSpace, ViewManager, + ViewManip, ViewPose, ViewRect, ViewState, - ViewState3d, ViewState2d, + ViewState3d, + ViewStatus, + ViewTool, + ViewingSpace, + canvasToImageBuffer, + canvasToResizedCanvasWithBars, + connectViewportFrusta, + connectViewportViews, + connectViewports, + extractImageSourceDimensions, + getCompressedJpegFromCanvas, + getImageSourceFormatForMimeType, + getImageSourceMimeType, + imageBufferToBase64EncodedPng, + imageBufferToCanvas, + imageBufferToPngDataUrl, + imageElementFromImageSource, + imageElementFromUrl, + queryTerrainElevationOffset, + readElementGraphics, + synchronizeViewportFrusta, + synchronizeViewportViews } from "@itwin/core-frontend"; export type { - OsmBuildingDisplayOptions, - HitListHolder, + Animator, + BatchOptions, + BeButtonEventProps, + BeTouchEventProps, + BeWheelEventProps, + CanvasDecoration, + CanvasDecorationList, + ComputeChordToleranceArgs, + CreateTextureArgs, + CreateTextureFromSourceArgs, + CustomGraphicBuilderOptions, + Decorator, + ExtentLimits, FeatureOverrideProvider, - IModelIdArg, - FuzzySearchResult, + FlashSettingsOptions, FrontendSecurityOptions, - ToolTipOptions, - CanvasDecoration, + FuzzySearchResult, + GlobalAlignmentOptions, + GlobalLocation, + GlobalLocationArea, + GpuMemoryLimit, + GpuMemoryLimits, + GraphicArc, + GraphicArc2d, GraphicBranchOptions, - BatchOptions, - PickableGraphicOptions, GraphicBuilderOptions, - ViewportGraphicBuilderOptions, - ComputeChordToleranceArgs, - CustomGraphicBuilderOptions, - GraphicPrimitive2d, GraphicLineString, GraphicLineString2d, + GraphicList, + GraphicLoop, + GraphicPath, GraphicPointString, GraphicPointString2d, + GraphicPolyface, + GraphicPrimitive, + GraphicPrimitive2d, GraphicShape, GraphicShape2d, - GraphicArc, - GraphicArc2d, - GraphicPath, - GraphicLoop, - GraphicPolyface, GraphicSolidPrimitive, + HitListHolder, + IModelIdArg, + MarginOptions, + MarkerFillStyle, + MarkerImage, + MarkerTextAlign, + MarkerTextBaseline, + OnViewExtentsError, + OsmBuildingDisplayOptions, + ParseKeyinError, + ParseKeyinResult, + ParsedKeyin, + ParticleCollectionBuilder, ParticleCollectionBuilderParams, ParticleProps, - ParticleCollectionBuilder, - TextureCacheOwnership, - TextureImage, - CreateTextureArgs, - CreateTextureFromSourceArgs, - Uniform, - UniformContext, - UniformParams, - UniformArrayParams, - ScreenSpaceEffectSource, + PickableGraphicOptions, + ScreenSpaceEffectBuilder, ScreenSpaceEffectBuilderParams, ScreenSpaceEffectContext, - ScreenSpaceEffectBuilder, + ScreenSpaceEffectSource, SelectAddEvent, SelectRemoveEvent, SelectReplaceEvent, - TileTreeDiscloser, - GpuMemoryLimits, + SelectedViewportChangedArgs, + SelectionSetEvent, + SynchronizeViewports, + TextureCacheKey, + TextureCacheOwnership, + TextureImage, + TextureImageSource, + TextureOwnership, TileContent, - TiledGraphicsProvider, TileDrawArgParams, TileParams, + TileTreeDiscloser, TileTreeOwner, TileTreeParams, TileTreeSupplier, - ViewClipEventHandler, - BeButtonEventProps, - BeTouchEventProps, - BeWheelEventProps, - ParseKeyinError, - ParsedKeyin, - ToolAssistanceKeyboardInfo, + TiledGraphicsProvider, ToolAssistanceInstruction, - ToolAssistanceSection, ToolAssistanceInstructions, - Animator, + ToolAssistanceKeyboardInfo, + ToolAssistanceSection, + ToolList, + ToolTipOptions, + ToolType, + Uniform, + UniformArrayParams, + UniformContext, + UniformParams, ViewAnimationOptions, - GlobalAlignmentOptions, - OnViewExtentsError, - MarginOptions, ViewChangeOptions, + ViewClipEventHandler, ViewCreator2dOptions, ViewCreator3dOptions, - GlobalLocationArea, - GlobalLocation, - Decorator, - SelectedViewportChangedArgs, - ExtentLimits, - FlashSettingsOptions, - MarkerImage, - MarkerFillStyle, - MarkerTextAlign, - MarkerTextBaseline, - CanvasDecorationList, - GraphicPrimitive, - GraphicList, - TextureCacheKey, - TextureOwnership, - TextureImageSource, - SelectionSetEvent, - GpuMemoryLimit, - ToolType, - ToolList, - ParseKeyinResult, + ViewportGraphicBuilderOptions } from "@itwin/core-frontend"; export { + BackgroundFill, BackgroundMapType, - GlobeMode, - BriefcaseIdValue, - SyncMode, - TypeOfChange, - ChangesetType, + BatchType, BisCodeSpec, - CommonLoggerCategory, - QueryRowFormat, - MonochromeMode, - ECSqlValueType, + BriefcaseIdValue, ChangeOpCode, ChangedValueState, + ChangesetType, + ColorByName, + ColorDef, + CommonLoggerCategory, ECSqlSystemProperty, - SectionType, - Rank, + ECSqlValueType, + ElementGeometryOpcode, FeatureOverrideType, - BatchType, + FillDisplay, + FillFlags, FontType, - Npc, GeoCoordStatus, - ElementGeometryOpcode, - GeometryStreamFlags, - FillDisplay, - BackgroundFill, GeometryClass, + GeometryStreamFlags, GeometrySummaryVerbosity, - FillFlags, + GlobeMode, + GridOrientationType, HSVConstants, ImageBufferFormat, ImageSourceFormat, LinePixels, MassPropertiesOperation, - TextureMapUnits, + MonochromeMode, + Npc, PlanarClipMaskMode, PlanarClipMaskPriority, + QueryRowFormat, + Rank, + RenderMode, + SectionType, SkyBoxImageType, SpatialClassifierInsideDisplay, SpatialClassifierOutsideDisplay, + SyncMode, TerrainHeightOriginMode, - ThematicGradientMode, - ThematicGradientColorScheme, + TextureMapUnits, ThematicDisplayMode, + ThematicGradientColorScheme, + ThematicGradientMode, TxnAction, - GridOrientationType, - RenderMode, - ColorByName, - ColorDef, + TypeOfChange } from "@itwin/core-common"; export type { + AdditionalTransformProps, + AffineTransformProps, + AmbientLightProps, AnalysisStyleDisplacementProps, - AnalysisStyleThematicProps, AnalysisStyleProps, + AnalysisStyleThematicProps, + AppearanceOverrideProps, + AreaFillProps, + AuxCoordSystem2dProps, + AuxCoordSystem3dProps, + AuxCoordSystemProps, + AxisAlignedBox3d, + AxisAlignedBox3dProps, + BRepPrimitive, BackgroundMapProps, - DeprecatedBackgroundMapProps, - LocalBriefcaseProps, - RequestNewBriefcaseProps, + BackgroundMapProviderName, + Base64EncodedString, + BaseReaderOptions, + BriefcaseId, + CalloutProps, CameraProps, + Carto2DDegreesProps, + CartographicProps, + CategoryProps, + CategorySelectorProps, ChangedElements, - EntityIdAndClassId, ChangedEntities, - ChangesetIndexAndId, + ChangesetId, ChangesetIdWithIndex, + ChangesetIndex, + ChangesetIndexAndId, + ChangesetIndexOrId, ChangesetRange, - CutStyleProps, + ChannelRootAspectProps, ClipStyleProps, CodeProps, - QueryLimit, - QueryQuota, - BaseReaderOptions, - QueryOptions, + CodeScopeProps, + ColorDefProps, ContextRealityModelProps, ContextRealityModelsContainer, - DisplayStyleSubCategoryProps, + CutStyleProps, + DanishSystem34Region, + DefinitionElementProps, + DeletedElementGeometryChange, + DeprecatedBackgroundMapProps, + DisplayStyle3dProps, + DisplayStyle3dSettingsProps, + DisplayStyleLoadProps, DisplayStyleModelAppearanceProps, + DisplayStyleOverridesOptions, DisplayStylePlanarClipMaskProps, - DisplayStyleSettingsProps, - DisplayStyle3dSettingsProps, DisplayStyleProps, - DisplayStyle3dProps, - DisplayStyleOverridesOptions, DisplayStyleSettingsOptions, - FunctionalElementProps, - ViewAttachmentLabelProps, - CalloutProps, - NavigationValue, - NavigationBindingValue, - RelatedElementProps, - ElementProps, - GeometricElementProps, - Placement3dProps, - Placement2dProps, - GeometricElement3dProps, - PhysicalElementProps, - SectionDrawingProps, - SectionDrawingLocationProps, - GeometricElement2dProps, - GeometryPartProps, - ViewAttachmentProps, - SubjectProps, - SheetProps, - DefinitionElementProps, - TypeDefinitionElementProps, - PhysicalTypeProps, - InformationPartitionElementProps, - DisplayStyleLoadProps, - RenderTimelineLoadProps, + DisplayStyleSettingsProps, + DisplayStyleSubCategoryProps, + DynamicGraphicsRequest2dProps, + DynamicGraphicsRequest3dProps, + DynamicGraphicsRequestProps, + EasingFunction, + EcefLocationProps, + ElementAlignedBox2d, + ElementAlignedBox3d, + ElementAspectProps, + ElementGeometryChange, + ElementGeometryDataEntry, + ElementGraphicsRequestProps, + ElementIdsAndRangesProps, ElementLoadOptions, ElementLoadProps, - ElementAspectProps, - ExternalSourceAspectProps, - ChannelRootAspectProps, - LineStyleProps, - CategoryProps, - SubCategoryProps, - UrlLinkProps, - RepositoryLinkProps, - RenderTimelineProps, - AppearanceOverrideProps, + ElementProps, EmphasizeElementsProps, + EntityIdAndClassId, + EntityIdAndClassIdIterable, EntityProps, - SourceAndTarget, - RelationshipProps, EntityQueryParams, EnvironmentProps, + ExtantElementGeometryChange, + ExternalSourceAspectProps, FeatureAppearanceProps, - FeatureAppearanceSource, FeatureAppearanceProvider, + FeatureAppearanceSource, + FilePropertyProps, + FlatBufferGeometryStream, + FontId, FontMapProps, - Helmert2DWithZOffsetProps, - AdditionalTransformProps, - CartographicProps, - HorizontalCRSExtentProps, - HorizontalCRSProps, - VerticalCRSProps, - GeographicCRSProps, - ElementGeometryDataEntry, - XyzRotationProps, + FresnelSettingsProps, + FunctionalElementProps, GeocentricTransformProps, - PositionalVectorTransformProps, - GridFileDefinitionProps, - GridFileTransformProps, - GeodeticTransformProps, GeodeticDatumProps, GeodeticEllipsoidProps, + GeodeticTransformMethod, + GeodeticTransformProps, + GeographicCRSProps, + GeometricElement2dProps, + GeometricElement3dProps, + GeometricElementProps, + GeometricModel2dProps, + GeometricModel3dProps, + GeometricModelProps, GeometryAppearanceProps, - AreaFillProps, - MaterialProps, + GeometryContainmentRequestProps, + GeometryContainmentResponseProps, GeometryPartInstanceProps, - GeometryStreamHeaderProps, - GeometryStreamEntryProps, - TextStringPrimitive, - ImagePrimitive, - PartReference, - BRepPrimitive, + GeometryPartProps, GeometryPrimitive, + GeometryStreamEntryProps, + GeometryStreamHeaderProps, GeometryStreamIteratorEntry, - ImageGraphicProps, - AffineTransformProps, - ProjectionProps, - Carto2DDegreesProps, - TextStringProps, - GeometryContainmentRequestProps, - GeometryContainmentResponseProps, + GeometryStreamPrimitive, + GeometryStreamProps, GeometrySummaryOptions, GeometrySummaryRequestProps, + GraphicsRequestProps, + GridFileDefinitionProps, + GridFileDirection, + GridFileFormat, + GridFileTransformProps, GroundPlaneProps, - EcefLocationProps, - RootSubjectProps, - FilePropertyProps, - ModelIdAndGeometryGuid, - SolarLightProps, - AmbientLightProps, + Helmert2DWithZOffsetProps, + HemisphereEnum, HemisphereLightsProps, - FresnelSettingsProps, + HorizontalCRSExtentProps, + HorizontalCRSProps, + ImageGraphicCornersProps, + ImageGraphicProps, + ImagePrimitive, + InformationPartitionElementProps, + InterpolationFunction, + JsonGeometryStream, LightSettingsProps, + LineStyleProps, + LocalAlignedBox3d, + LocalBriefcaseProps, Localization, MassPropertiesRequestProps, MassPropertiesResponseProps, - TextureMapProps, - RenderMaterialAssetProps, - RenderMaterialProps, + MaterialProps, ModelClipGroupProps, - ElementIdsAndRangesProps, - ModelGeometryChangesProps, - ExtantElementGeometryChange, - DeletedElementGeometryChange, ModelGeometryChanges, - ModelProps, + ModelGeometryChangesProps, + ModelIdAndGeometryGuid, ModelLoadProps, + ModelProps, ModelQueryParams, - GeometricModelProps, - GeometricModel2dProps, - GeometricModel3dProps, - PlanarClipMaskProps, + ModelSelectorProps, + NavigationBindingValue, + NavigationValue, + PartReference, + PersistentBackgroundMapProps, + PersistentGraphicsRequestProps, + PhysicalElementProps, + PhysicalTypeProps, + Placement, + Placement2dProps, + Placement3dProps, + PlacementProps, PlanProjectionSettingsProps, + PlanarClipMaskProps, + Point2dProps, + PositionalVectorTransformProps, + ProjectionMethod, + ProjectionProps, + QueryLimit, + QueryOptions, + QueryQuota, + RelatedElementProps, + RelationshipProps, + RemoveFunction, + RenderMaterialAssetProps, + RenderMaterialProps, + RenderTimelineLoadProps, + RenderTimelineProps, + RepositoryLinkProps, + RequestNewBriefcaseProps, RgbColorProps, + RgbFactorProps, + RootSubjectProps, RpcActivity, + SectionDrawingLocationProps, + SectionDrawingProps, + SectionDrawingViewProps, SessionProps, - SkyCubeProps, + SheetProps, + SkyBoxImageProps, SkyBoxProps, + SkyCubeProps, + SolarLightProps, SolarShadowSettingsProps, + SourceAndTarget, SpatialClassifierFlagsProps, SpatialClassifierProps, SpatialClassifiersContainer, + SpatialViewDefinitionProps, + SubCategoryProps, + SubjectProps, TerrainProps, - TextureProps, - TextureLoadProps, + TerrainProviderName, + TextStringPrimitive, + TextStringProps, TextureData, - ThematicGradientSettingsProps, + TextureLoadProps, + TextureMapProps, + TextureProps, + ThematicDisplayProps, ThematicDisplaySensorProps, ThematicDisplaySensorSettingsProps, - ThematicDisplayProps, + ThematicGradientSettingsProps, ThumbnailFormatProps, ThumbnailProps, - GraphicsRequestProps, - PersistentGraphicsRequestProps, - JsonGeometryStream, - FlatBufferGeometryStream, - DynamicGraphicsRequestProps, - DynamicGraphicsRequest2dProps, - DynamicGraphicsRequest3dProps, TileVersionInfo, - ViewDetailsProps, + TweenCallback, + TypeDefinitionElementProps, + UnitType, + UpdateCallback, + UrlLinkProps, + VerticalCRSProps, + ViewAttachmentLabelProps, + ViewAttachmentProps, + ViewDefinition2dProps, + ViewDefinition3dProps, + ViewDefinitionProps, ViewDetails3dProps, + ViewDetailsProps, + ViewFlagOverrides, ViewFlagProps, - SectionDrawingViewProps, - ViewStateProps, - ViewStateLoadProps, - ModelSelectorProps, - CategorySelectorProps, + ViewFlagsProperties, ViewQueryParams, - ViewDefinitionProps, - ViewDefinition3dProps, - SpatialViewDefinitionProps, - ViewDefinition2dProps, - AuxCoordSystemProps, - AuxCoordSystem2dProps, - AuxCoordSystem3dProps, + ViewStateLoadProps, + ViewStateProps, WhiteOnWhiteReversalProps, - BackgroundMapProviderName, - PersistentBackgroundMapProps, - Base64EncodedString, - BriefcaseId, - EntityIdAndClassIdIterable, - ChangesetId, - ChangesetIndex, - ChangesetIndexOrId, - CodeScopeProps, - ColorDefProps, - PlacementProps, - FontId, - UnitType, - GeodeticTransformMethod, - GridFileFormat, - GridFileDirection, - GeometryStreamProps, - GeometryStreamPrimitive, - ImageGraphicCornersProps, - AxisAlignedBox3d, - AxisAlignedBox3dProps, - ElementAlignedBox3d, - ElementAlignedBox2d, - LocalAlignedBox3d, - Placement, - ProjectionMethod, - HemisphereEnum, - DanishSystem34Region, - RemoveFunction, - RgbFactorProps, - Point2dProps, - ElementGeometryChange, - SkyBoxImageProps, - TerrainProviderName, - ElementGraphicsRequestProps, - TweenCallback, - UpdateCallback, - EasingFunction, - InterpolationFunction, - ViewFlagsProperties, - ViewFlagOverrides, + XyzRotationProps } from "@itwin/core-common"; // END GENERATED CODE diff --git a/core/extension/index.js b/core/extension/index.js index c7320123f5d4..e318e0ec2068 100644 --- a/core/extension/index.js +++ b/core/extension/index.js @@ -15,226 +15,233 @@ export const { ExtensionHost } = ext.exports; // BEGIN GENERATED CODE export const { // @itwin/core-frontend: - ContextRotationId, - ACSType, ACSDisplayOptions, - CoordSystem, - LocateAction, - LocateFilterStatus, - SnapStatus, - FlashMode, - FrontendLoggerCategory, - SnapMode, - SnapHeat, - HitSource, - HitGeomType, - HitParentGeomType, - HitPriority, - HitDetailType, - OutputMessageType, - OutputMessagePriority, - OutputMessageAlert, - ActivityMessageEndReason, - MessageBoxType, - MessageBoxIconType, - MessageBoxValue, - GraphicType, - UniformType, - VaryingType, - SelectionSetEventType, - StandardViewId, - TileLoadStatus, - TileVisibility, - TileLoadPriority, - TileBoundingBoxes, - TileTreeLoadStatus, - TileGraphicType, - ClipEventType, - SelectionMethod, - SelectionMode, - SelectionProcessing, - BeButton, - CoordinateLockOverrides, - InputSource, - CoordSource, - BeModifierKeys, - EventHandled, - ParseAndRunResult, - KeyinParseError, - StartOrResume, - ManipulatorToolEvent, - ToolAssistanceImage, - ToolAssistanceInputMethod, - ViewStatus, + ACSType, AccuDrawHintBuilder, AccuSnap, - AuxCoordSystemState, + ActivityMessageDetails, + ActivityMessageEndReason, AuxCoordSystem2dState, AuxCoordSystem3dState, AuxCoordSystemSpatialState, + AuxCoordSystemState, + BeButton, + BeButtonEvent, + BeButtonState, + BeModifierKeys, + BeTouchEvent, + BeWheelEvent, + BingElevationProvider, BingLocationProvider, CategorySelectorState, ChangeFlags, + ClipEventType, + Cluster, ContextRealityModelState, - DisplayStyleState, + ContextRotationId, + CoordSource, + CoordSystem, + CoordinateLockOverrides, + Decorations, + DisclosedTileTreeSet, DisplayStyle2dState, DisplayStyle3dState, + DisplayStyleState, + DrawingModelState, DrawingViewState, - LocateOptions, - LocateResponse, - ElementPicker, + EditManipulator, ElementLocateManager, + ElementPicker, + ElementState, EmphasizeElements, EntityState, - ElementState, + EventController, + EventHandled, + FeatureSymbology, + FlashMode, FlashSettings, + FrontendLoggerCategory, FrustumAnimator, + GeometricModel2dState, + GeometricModel3dState, + GeometricModelState, GlobeAnimator, + GraphicBranch, + GraphicBuilder, + GraphicType, + HiliteSet, HitDetail, - SnapDetail, - IntersectDetail, + HitDetailType, + HitGeomType, HitList, - canvasToResizedCanvasWithBars, - imageBufferToCanvas, - canvasToImageBuffer, - getImageSourceMimeType, - getImageSourceFormatForMimeType, - imageElementFromImageSource, - imageElementFromUrl, - extractImageSourceDimensions, - imageBufferToPngDataUrl, - imageBufferToBase64EncodedPng, - getCompressedJpegFromCanvas, + HitParentGeomType, + HitPriority, + HitSource, IModelConnection, - NotificationHandler, + IconSprites, + InputCollector, + InputSource, + InteractiveTool, + IntersectDetail, + KeyinParseError, + LocateAction, + LocateFilterStatus, + LocateOptions, + LocateResponse, + ManipulatorToolEvent, MarginPercent, Marker, - Cluster, MarkerSet, + MessageBoxIconType, + MessageBoxType, + MessageBoxValue, ModelSelectorState, ModelState, - GeometricModelState, - GeometricModel2dState, - GeometricModel3dState, - SheetModelState, - SpatialModelState, - PhysicalModelState, - SpatialLocationModelState, - DrawingModelState, - SectionDrawingModelState, - NotifyMessageDetails, - ActivityMessageDetails, + NotificationHandler, NotificationManager, + NotifyMessageDetails, + OrthographicViewState, + OutputMessageAlert, + OutputMessagePriority, + OutputMessageType, + ParseAndRunResult, PerModelCategoryVisibility, - Decorations, - FeatureSymbology, - GraphicBranch, - GraphicBuilder, + PhysicalModelState, Pixel, + PrimitiveTool, RenderClipVolume, RenderGraphic, RenderGraphicOwner, RenderSystem, Scene, - HiliteSet, + SectionDrawingModelState, + SelectionMethod, + SelectionMode, + SelectionProcessing, SelectionSet, + SelectionSetEventType, + SheetModelState, SheetViewState, + SnapDetail, + SnapHeat, + SnapMode, + SnapStatus, + SpatialLocationModelState, + SpatialModelState, SpatialViewState, - OrthographicViewState, Sprite, - IconSprites, SpriteLocation, + StandardViewId, + StartOrResume, TentativePoint, - DisclosedTileTreeSet, - readElementGraphics, - BingElevationProvider, Tile, TileAdmin, + TileBoundingBoxes, TileDrawArgs, + TileGraphicType, + TileLoadPriority, + TileLoadStatus, TileRequest, - TileRequestChannelStatistics, TileRequestChannel, + TileRequestChannelStatistics, TileRequestChannels, TileTree, + TileTreeLoadStatus, TileTreeReference, TileUsageMarker, + TileVisibility, Tiles, - ViewClipTool, - ViewClipClearTool, - ViewClipDecorationProvider, - EditManipulator, - EventController, - PrimitiveTool, - BeButtonState, - BeButtonEvent, - BeTouchEvent, - BeWheelEvent, Tool, - InteractiveTool, - InputCollector, ToolAdmin, ToolAssistance, + ToolAssistanceImage, + ToolAssistanceInputMethod, ToolSettings, - ViewTool, - ViewManip, + TwoWayViewportFrustumSync, + TwoWayViewportSync, + UniformType, + VaryingType, + ViewClipClearTool, + ViewClipDecorationProvider, + ViewClipTool, ViewCreator2d, ViewCreator3d, - queryTerrainElevationOffset, - ViewingSpace, ViewManager, + ViewManip, ViewPose, ViewRect, ViewState, - ViewState3d, ViewState2d, + ViewState3d, + ViewStatus, + ViewTool, + ViewingSpace, + canvasToImageBuffer, + canvasToResizedCanvasWithBars, + connectViewportFrusta, + connectViewportViews, + connectViewports, + extractImageSourceDimensions, + getCompressedJpegFromCanvas, + getImageSourceFormatForMimeType, + getImageSourceMimeType, + imageBufferToBase64EncodedPng, + imageBufferToCanvas, + imageBufferToPngDataUrl, + imageElementFromImageSource, + imageElementFromUrl, + queryTerrainElevationOffset, + readElementGraphics, + synchronizeViewportFrusta, + synchronizeViewportViews, // @itwin/core-common: + BackgroundFill, BackgroundMapType, - GlobeMode, - BriefcaseIdValue, - SyncMode, - TypeOfChange, - ChangesetType, + BatchType, BisCodeSpec, - CommonLoggerCategory, - QueryRowFormat, - MonochromeMode, - ECSqlValueType, + BriefcaseIdValue, ChangeOpCode, ChangedValueState, + ChangesetType, + ColorByName, + ColorDef, + CommonLoggerCategory, ECSqlSystemProperty, - SectionType, - Rank, + ECSqlValueType, + ElementGeometryOpcode, FeatureOverrideType, - BatchType, + FillDisplay, + FillFlags, FontType, - Npc, GeoCoordStatus, - ElementGeometryOpcode, - GeometryStreamFlags, - FillDisplay, - BackgroundFill, GeometryClass, + GeometryStreamFlags, GeometrySummaryVerbosity, - FillFlags, + GlobeMode, + GridOrientationType, HSVConstants, ImageBufferFormat, ImageSourceFormat, LinePixels, MassPropertiesOperation, - TextureMapUnits, + MonochromeMode, + Npc, PlanarClipMaskMode, PlanarClipMaskPriority, + QueryRowFormat, + Rank, + RenderMode, + SectionType, SkyBoxImageType, SpatialClassifierInsideDisplay, SpatialClassifierOutsideDisplay, + SyncMode, TerrainHeightOriginMode, - ThematicGradientMode, - ThematicGradientColorScheme, + TextureMapUnits, ThematicDisplayMode, + ThematicGradientColorScheme, + ThematicGradientMode, TxnAction, - GridOrientationType, - RenderMode, - ColorByName, - ColorDef, + TypeOfChange, } = ext.exports; // END GENERATED CODE diff --git a/core/extension/preview.d.ts b/core/extension/preview.d.ts index bd63a76eadd1..4f39b130a7e3 100644 --- a/core/extension/preview.d.ts +++ b/core/extension/preview.d.ts @@ -4,15 +4,19 @@ *--------------------------------------------------------------------------------------------*/ // BEGIN GENERATED CODE export { + } from "@itwin/core-frontend"; export type { + } from "@itwin/core-frontend"; export { + } from "@itwin/core-common"; export type { + } from "@itwin/core-common"; // END GENERATED CODE diff --git a/core/frontend/src/extension/ExtensionRuntime.ts b/core/frontend/src/extension/ExtensionRuntime.ts index 0ff0821a20cb..dfafa7859ecc 100644 --- a/core/frontend/src/extension/ExtensionRuntime.ts +++ b/core/frontend/src/extension/ExtensionRuntime.ts @@ -20,455 +20,469 @@ if ((globalThis as any)[globalSymbol]) // BEGIN GENERATED CODE import { // @public enum(s) from @itwin/core-frontend - ContextRotationId, - ACSType, ACSDisplayOptions, + ACSType, + ActivityMessageEndReason, + BeButton, + BeModifierKeys, + ClipEventType, + ContextRotationId, + CoordSource, CoordSystem, - LocateAction, - LocateFilterStatus, - SnapStatus, + CoordinateLockOverrides, + EventHandled, FlashMode, FrontendLoggerCategory, - SnapMode, - SnapHeat, - HitSource, + GraphicType, + HitDetailType, HitGeomType, HitParentGeomType, HitPriority, - HitDetailType, - OutputMessageType, - OutputMessagePriority, - OutputMessageAlert, - ActivityMessageEndReason, - MessageBoxType, + HitSource, + InputSource, + KeyinParseError, + LocateAction, + LocateFilterStatus, + ManipulatorToolEvent, MessageBoxIconType, + MessageBoxType, MessageBoxValue, - GraphicType, - UniformType, - VaryingType, - SelectionSetEventType, - StandardViewId, - TileLoadStatus, - TileVisibility, - TileLoadPriority, - TileBoundingBoxes, - TileTreeLoadStatus, - TileGraphicType, - ClipEventType, + OutputMessageAlert, + OutputMessagePriority, + OutputMessageType, + ParseAndRunResult, SelectionMethod, SelectionMode, SelectionProcessing, - BeButton, - CoordinateLockOverrides, - InputSource, - CoordSource, - BeModifierKeys, - EventHandled, - ParseAndRunResult, - KeyinParseError, + SelectionSetEventType, + SnapHeat, + SnapMode, + SnapStatus, + StandardViewId, StartOrResume, - ManipulatorToolEvent, + TileBoundingBoxes, + TileGraphicType, + TileLoadPriority, + TileLoadStatus, + TileTreeLoadStatus, + TileVisibility, ToolAssistanceImage, ToolAssistanceInputMethod, + UniformType, + VaryingType, ViewStatus, // @public real(s) from @itwin/core-frontend AccuDrawHintBuilder, AccuSnap, - AuxCoordSystemState, + ActivityMessageDetails, AuxCoordSystem2dState, AuxCoordSystem3dState, AuxCoordSystemSpatialState, + AuxCoordSystemState, + BeButtonEvent, + BeButtonState, + BeTouchEvent, + BeWheelEvent, + BingElevationProvider, BingLocationProvider, CategorySelectorState, ChangeFlags, + Cluster, ContextRealityModelState, - DisplayStyleState, + Decorations, + DisclosedTileTreeSet, DisplayStyle2dState, DisplayStyle3dState, + DisplayStyleState, + DrawingModelState, DrawingViewState, - LocateOptions, - LocateResponse, - ElementPicker, + EditManipulator, ElementLocateManager, + ElementPicker, + ElementState, EmphasizeElements, EntityState, - ElementState, + EventController, + FeatureSymbology, FlashSettings, FrustumAnimator, + GeometricModel2dState, + GeometricModel3dState, + GeometricModelState, GlobeAnimator, + GraphicBranch, + GraphicBuilder, + HiliteSet, HitDetail, - SnapDetail, - IntersectDetail, HitList, - canvasToResizedCanvasWithBars, - imageBufferToCanvas, - canvasToImageBuffer, - getImageSourceMimeType, - getImageSourceFormatForMimeType, - imageElementFromImageSource, - imageElementFromUrl, - extractImageSourceDimensions, - imageBufferToPngDataUrl, - imageBufferToBase64EncodedPng, - getCompressedJpegFromCanvas, IModelConnection, - NotificationHandler, + IconSprites, + InputCollector, + InteractiveTool, + IntersectDetail, + LocateOptions, + LocateResponse, MarginPercent, Marker, - Cluster, MarkerSet, ModelSelectorState, ModelState, - GeometricModelState, - GeometricModel2dState, - GeometricModel3dState, - SheetModelState, - SpatialModelState, - PhysicalModelState, - SpatialLocationModelState, - DrawingModelState, - SectionDrawingModelState, - NotifyMessageDetails, - ActivityMessageDetails, + NotificationHandler, NotificationManager, + NotifyMessageDetails, + OrthographicViewState, PerModelCategoryVisibility, - Decorations, - FeatureSymbology, - GraphicBranch, - GraphicBuilder, + PhysicalModelState, Pixel, + PrimitiveTool, RenderClipVolume, RenderGraphic, RenderGraphicOwner, RenderSystem, Scene, - HiliteSet, + SectionDrawingModelState, SelectionSet, + SheetModelState, SheetViewState, + SnapDetail, + SpatialLocationModelState, + SpatialModelState, SpatialViewState, - OrthographicViewState, Sprite, - IconSprites, SpriteLocation, TentativePoint, - DisclosedTileTreeSet, - readElementGraphics, - BingElevationProvider, Tile, TileAdmin, TileDrawArgs, TileRequest, - TileRequestChannelStatistics, TileRequestChannel, + TileRequestChannelStatistics, TileRequestChannels, TileTree, TileTreeReference, TileUsageMarker, Tiles, - ViewClipTool, - ViewClipClearTool, - ViewClipDecorationProvider, - EditManipulator, - EventController, - PrimitiveTool, - BeButtonState, - BeButtonEvent, - BeTouchEvent, - BeWheelEvent, Tool, - InteractiveTool, - InputCollector, ToolAdmin, ToolAssistance, ToolSettings, - ViewTool, - ViewManip, + TwoWayViewportFrustumSync, + TwoWayViewportSync, + ViewClipClearTool, + ViewClipDecorationProvider, + ViewClipTool, ViewCreator2d, ViewCreator3d, - queryTerrainElevationOffset, - ViewingSpace, ViewManager, + ViewManip, ViewPose, ViewRect, ViewState, - ViewState3d, ViewState2d, + ViewState3d, + ViewTool, + ViewingSpace, + canvasToImageBuffer, + canvasToResizedCanvasWithBars, + connectViewportFrusta, + connectViewportViews, + connectViewports, + extractImageSourceDimensions, + getCompressedJpegFromCanvas, + getImageSourceFormatForMimeType, + getImageSourceMimeType, + imageBufferToBase64EncodedPng, + imageBufferToCanvas, + imageBufferToPngDataUrl, + imageElementFromImageSource, + imageElementFromUrl, + queryTerrainElevationOffset, + readElementGraphics, + synchronizeViewportFrusta, + synchronizeViewportViews, } from "../core-frontend"; import { // @public enum(s) from @itwin/core-common + BackgroundFill, BackgroundMapType, - GlobeMode, - BriefcaseIdValue, - SyncMode, - TypeOfChange, - ChangesetType, + BatchType, BisCodeSpec, - CommonLoggerCategory, - QueryRowFormat, - MonochromeMode, - ECSqlValueType, + BriefcaseIdValue, ChangeOpCode, ChangedValueState, + ChangesetType, + CommonLoggerCategory, ECSqlSystemProperty, - SectionType, - Rank, + ECSqlValueType, + ElementGeometryOpcode, FeatureOverrideType, - BatchType, + FillDisplay, + FillFlags, FontType, - Npc, GeoCoordStatus, - ElementGeometryOpcode, - GeometryStreamFlags, - FillDisplay, - BackgroundFill, GeometryClass, + GeometryStreamFlags, GeometrySummaryVerbosity, - FillFlags, + GlobeMode, + GridOrientationType, HSVConstants, ImageBufferFormat, ImageSourceFormat, LinePixels, MassPropertiesOperation, - TextureMapUnits, + MonochromeMode, + Npc, PlanarClipMaskMode, PlanarClipMaskPriority, + QueryRowFormat, + Rank, + RenderMode, + SectionType, SkyBoxImageType, SpatialClassifierInsideDisplay, SpatialClassifierOutsideDisplay, + SyncMode, TerrainHeightOriginMode, - ThematicGradientMode, - ThematicGradientColorScheme, + TextureMapUnits, ThematicDisplayMode, + ThematicGradientColorScheme, + ThematicGradientMode, TxnAction, - GridOrientationType, - RenderMode, + TypeOfChange, // @public real(s) from @itwin/core-common ColorByName, ColorDef, } from "@itwin/core-common"; const extensionExports = { - ContextRotationId, - ACSType, ACSDisplayOptions, - CoordSystem, - LocateAction, - LocateFilterStatus, - SnapStatus, - FlashMode, - FrontendLoggerCategory, - SnapMode, - SnapHeat, - HitSource, - HitGeomType, - HitParentGeomType, - HitPriority, - HitDetailType, - OutputMessageType, - OutputMessagePriority, - OutputMessageAlert, - ActivityMessageEndReason, - MessageBoxType, - MessageBoxIconType, - MessageBoxValue, - GraphicType, - UniformType, - VaryingType, - SelectionSetEventType, - StandardViewId, - TileLoadStatus, - TileVisibility, - TileLoadPriority, - TileBoundingBoxes, - TileTreeLoadStatus, - TileGraphicType, - ClipEventType, - SelectionMethod, - SelectionMode, - SelectionProcessing, - BeButton, - CoordinateLockOverrides, - InputSource, - CoordSource, - BeModifierKeys, - EventHandled, - ParseAndRunResult, - KeyinParseError, - StartOrResume, - ManipulatorToolEvent, - ToolAssistanceImage, - ToolAssistanceInputMethod, - ViewStatus, + ACSType, AccuDrawHintBuilder, AccuSnap, - AuxCoordSystemState, + ActivityMessageDetails, + ActivityMessageEndReason, AuxCoordSystem2dState, AuxCoordSystem3dState, AuxCoordSystemSpatialState, + AuxCoordSystemState, + BackgroundFill, + BackgroundMapType, + BatchType, + BeButton, + BeButtonEvent, + BeButtonState, + BeModifierKeys, + BeTouchEvent, + BeWheelEvent, + BingElevationProvider, BingLocationProvider, + BisCodeSpec, + BriefcaseIdValue, CategorySelectorState, ChangeFlags, + ChangeOpCode, + ChangedValueState, + ChangesetType, + ClipEventType, + Cluster, + ColorByName, + ColorDef, + CommonLoggerCategory, ContextRealityModelState, - DisplayStyleState, + ContextRotationId, + CoordSource, + CoordSystem, + CoordinateLockOverrides, + Decorations, + DisclosedTileTreeSet, DisplayStyle2dState, DisplayStyle3dState, + DisplayStyleState, + DrawingModelState, DrawingViewState, - LocateOptions, - LocateResponse, - ElementPicker, + ECSqlSystemProperty, + ECSqlValueType, + EditManipulator, + ElementGeometryOpcode, ElementLocateManager, + ElementPicker, + ElementState, EmphasizeElements, EntityState, - ElementState, + EventController, + EventHandled, + FeatureOverrideType, + FeatureSymbology, + FillDisplay, + FillFlags, + FlashMode, FlashSettings, + FontType, + FrontendLoggerCategory, FrustumAnimator, + GeoCoordStatus, + GeometricModel2dState, + GeometricModel3dState, + GeometricModelState, + GeometryClass, + GeometryStreamFlags, + GeometrySummaryVerbosity, GlobeAnimator, + GlobeMode, + GraphicBranch, + GraphicBuilder, + GraphicType, + GridOrientationType, + HSVConstants, + HiliteSet, HitDetail, - SnapDetail, - IntersectDetail, + HitDetailType, + HitGeomType, HitList, - canvasToResizedCanvasWithBars, - imageBufferToCanvas, - canvasToImageBuffer, - getImageSourceMimeType, - getImageSourceFormatForMimeType, - imageElementFromImageSource, - imageElementFromUrl, - extractImageSourceDimensions, - imageBufferToPngDataUrl, - imageBufferToBase64EncodedPng, - getCompressedJpegFromCanvas, + HitParentGeomType, + HitPriority, + HitSource, IModelConnection, - NotificationHandler, + IconSprites, + ImageBufferFormat, + ImageSourceFormat, + InputCollector, + InputSource, + InteractiveTool, + IntersectDetail, + KeyinParseError, + LinePixels, + LocateAction, + LocateFilterStatus, + LocateOptions, + LocateResponse, + ManipulatorToolEvent, MarginPercent, Marker, - Cluster, MarkerSet, + MassPropertiesOperation, + MessageBoxIconType, + MessageBoxType, + MessageBoxValue, ModelSelectorState, ModelState, - GeometricModelState, - GeometricModel2dState, - GeometricModel3dState, - SheetModelState, - SpatialModelState, - PhysicalModelState, - SpatialLocationModelState, - DrawingModelState, - SectionDrawingModelState, - NotifyMessageDetails, - ActivityMessageDetails, + MonochromeMode, + NotificationHandler, NotificationManager, + NotifyMessageDetails, + Npc, + OrthographicViewState, + OutputMessageAlert, + OutputMessagePriority, + OutputMessageType, + ParseAndRunResult, PerModelCategoryVisibility, - Decorations, - FeatureSymbology, - GraphicBranch, - GraphicBuilder, + PhysicalModelState, Pixel, + PlanarClipMaskMode, + PlanarClipMaskPriority, + PrimitiveTool, + QueryRowFormat, + Rank, RenderClipVolume, RenderGraphic, RenderGraphicOwner, + RenderMode, RenderSystem, Scene, - HiliteSet, + SectionDrawingModelState, + SectionType, + SelectionMethod, + SelectionMode, + SelectionProcessing, SelectionSet, + SelectionSetEventType, + SheetModelState, SheetViewState, + SkyBoxImageType, + SnapDetail, + SnapHeat, + SnapMode, + SnapStatus, + SpatialClassifierInsideDisplay, + SpatialClassifierOutsideDisplay, + SpatialLocationModelState, + SpatialModelState, SpatialViewState, - OrthographicViewState, Sprite, - IconSprites, SpriteLocation, + StandardViewId, + StartOrResume, + SyncMode, TentativePoint, - DisclosedTileTreeSet, - readElementGraphics, - BingElevationProvider, + TerrainHeightOriginMode, + TextureMapUnits, + ThematicDisplayMode, + ThematicGradientColorScheme, + ThematicGradientMode, Tile, TileAdmin, + TileBoundingBoxes, TileDrawArgs, + TileGraphicType, + TileLoadPriority, + TileLoadStatus, TileRequest, - TileRequestChannelStatistics, TileRequestChannel, + TileRequestChannelStatistics, TileRequestChannels, TileTree, + TileTreeLoadStatus, TileTreeReference, TileUsageMarker, + TileVisibility, Tiles, - ViewClipTool, - ViewClipClearTool, - ViewClipDecorationProvider, - EditManipulator, - EventController, - PrimitiveTool, - BeButtonState, - BeButtonEvent, - BeTouchEvent, - BeWheelEvent, Tool, - InteractiveTool, - InputCollector, ToolAdmin, ToolAssistance, + ToolAssistanceImage, + ToolAssistanceInputMethod, ToolSettings, - ViewTool, - ViewManip, + TwoWayViewportFrustumSync, + TwoWayViewportSync, + TxnAction, + TypeOfChange, + UniformType, + VaryingType, + ViewClipClearTool, + ViewClipDecorationProvider, + ViewClipTool, ViewCreator2d, ViewCreator3d, - queryTerrainElevationOffset, - ViewingSpace, ViewManager, + ViewManip, ViewPose, ViewRect, ViewState, - ViewState3d, ViewState2d, - BackgroundMapType, - GlobeMode, - BriefcaseIdValue, - SyncMode, - TypeOfChange, - ChangesetType, - BisCodeSpec, - CommonLoggerCategory, - QueryRowFormat, - MonochromeMode, - ECSqlValueType, - ChangeOpCode, - ChangedValueState, - ECSqlSystemProperty, - SectionType, - Rank, - FeatureOverrideType, - BatchType, - FontType, - Npc, - GeoCoordStatus, - ElementGeometryOpcode, - GeometryStreamFlags, - FillDisplay, - BackgroundFill, - GeometryClass, - GeometrySummaryVerbosity, - FillFlags, - HSVConstants, - ImageBufferFormat, - ImageSourceFormat, - LinePixels, - MassPropertiesOperation, - TextureMapUnits, - PlanarClipMaskMode, - PlanarClipMaskPriority, - SkyBoxImageType, - SpatialClassifierInsideDisplay, - SpatialClassifierOutsideDisplay, - TerrainHeightOriginMode, - ThematicGradientMode, - ThematicGradientColorScheme, - ThematicDisplayMode, - TxnAction, - GridOrientationType, - RenderMode, - ColorByName, - ColorDef, + ViewState3d, + ViewStatus, + ViewTool, + ViewingSpace, + canvasToImageBuffer, + canvasToResizedCanvasWithBars, + connectViewportFrusta, + connectViewportViews, + connectViewports, + extractImageSourceDimensions, + getCompressedJpegFromCanvas, + getImageSourceFormatForMimeType, + getImageSourceMimeType, + imageBufferToBase64EncodedPng, + imageBufferToCanvas, + imageBufferToPngDataUrl, + imageElementFromImageSource, + imageElementFromUrl, + queryTerrainElevationOffset, + readElementGraphics, + synchronizeViewportFrusta, + synchronizeViewportViews, }; // END GENERATED CODE From fea08e026e3d4b8846d615f9eab59d97a85b860d Mon Sep 17 00:00:00 2001 From: Arun George Date: Mon, 16 May 2022 17:15:28 -0400 Subject: [PATCH 2/5] rush change --- .../sorted-ext-api-gen_2022-05-16-21-15.json | 10 ++++++++++ .../sorted-ext-api-gen_2022-05-16-21-15.json | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 common/changes/@itwin/core-extension/sorted-ext-api-gen_2022-05-16-21-15.json create mode 100644 common/changes/@itwin/core-frontend/sorted-ext-api-gen_2022-05-16-21-15.json diff --git a/common/changes/@itwin/core-extension/sorted-ext-api-gen_2022-05-16-21-15.json b/common/changes/@itwin/core-extension/sorted-ext-api-gen_2022-05-16-21-15.json new file mode 100644 index 000000000000..8c767bd2ea91 --- /dev/null +++ b/common/changes/@itwin/core-extension/sorted-ext-api-gen_2022-05-16-21-15.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-extension", + "comment": "", + "type": "none" + } + ], + "packageName": "@itwin/core-extension" +} \ No newline at end of file diff --git a/common/changes/@itwin/core-frontend/sorted-ext-api-gen_2022-05-16-21-15.json b/common/changes/@itwin/core-frontend/sorted-ext-api-gen_2022-05-16-21-15.json new file mode 100644 index 000000000000..ac11a63efe7e --- /dev/null +++ b/common/changes/@itwin/core-frontend/sorted-ext-api-gen_2022-05-16-21-15.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@itwin/core-frontend", + "comment": "", + "type": "none" + } + ], + "packageName": "@itwin/core-frontend" +} \ No newline at end of file From 24cc9a3a9c4ae79ee750d8db7779b4b6f1b5cd96 Mon Sep 17 00:00:00 2001 From: Arun George Date: Tue, 17 May 2022 09:24:51 -0400 Subject: [PATCH 3/5] rename var --- core/extension/codeGen/generate-exports.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/extension/codeGen/generate-exports.js b/core/extension/codeGen/generate-exports.js index 35b6dbbefb85..a9ccafe8cbf5 100644 --- a/core/extension/codeGen/generate-exports.js +++ b/core/extension/codeGen/generate-exports.js @@ -102,7 +102,7 @@ function generateJsCode(exportList) { // Create the export code for the .ts file function generateRuntimeCode(exportListPreview, exportList) { const tab = " "; // two space tab - let exportCode = ""; + let importCode = ""; let exportsApi = `const extensionExports = {\n${tab}`; const _exports = []; const exportTrailer = `\n};\n\n`; @@ -139,12 +139,12 @@ function generateRuntimeCode(exportListPreview, exportList) { _exports.push(realExport); }); - exportCode += imports + importTrailer; + importCode += imports + importTrailer; }; exportsApi += _exports.sort().join(`,\n${tab}`) + ","; - return exportCode + exportsApi + exportTrailer; + return importCode + exportsApi + exportTrailer; } // Find the extension linter's output file and convert to a set of useful lists From ff530a0cb289f3ef37ded60201a3c76d26de6b22 Mon Sep 17 00:00:00 2001 From: Paul Connelly <22944042+pmconne@users.noreply.github.com> Date: Tue, 17 May 2022 09:36:30 -0400 Subject: [PATCH 4/5] build code plz --- .../core-extension/sorted-ext-api-gen_2022-05-16-21-15.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/changes/@itwin/core-extension/sorted-ext-api-gen_2022-05-16-21-15.json b/common/changes/@itwin/core-extension/sorted-ext-api-gen_2022-05-16-21-15.json index 8c767bd2ea91..d8e9e418a2e5 100644 --- a/common/changes/@itwin/core-extension/sorted-ext-api-gen_2022-05-16-21-15.json +++ b/common/changes/@itwin/core-extension/sorted-ext-api-gen_2022-05-16-21-15.json @@ -2,9 +2,9 @@ "changes": [ { "packageName": "@itwin/core-extension", - "comment": "", + "comment": " ", "type": "none" } ], "packageName": "@itwin/core-extension" -} \ No newline at end of file +} From 55573e864fea5f95950964d76192f047d40f465c Mon Sep 17 00:00:00 2001 From: Arun George Date: Tue, 17 May 2022 09:48:03 -0400 Subject: [PATCH 5/5] rm unecessary new line --- core/extension/codeGen/generate-exports.js | 10 ++++++---- core/extension/preview.d.ts | 4 ---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/core/extension/codeGen/generate-exports.js b/core/extension/codeGen/generate-exports.js index a9ccafe8cbf5..94845cdc507e 100644 --- a/core/extension/codeGen/generate-exports.js +++ b/core/extension/codeGen/generate-exports.js @@ -64,18 +64,20 @@ function generateDeclarationCode(exportList) { // Make real and type exports for each package for (const packageName in exportList) { - const realExports = "export {\n\t"; - const typeExports = "export type {\n\t"; + const realExports = "export {"; + const typeExports = "export type {"; const exportTrailer = `\n} from "${packageName}";\n\n`; - const reals = [...exportList[packageName].enum, ...exportList[packageName].real] + let reals = [...exportList[packageName].enum, ...exportList[packageName].real] .sort() .join(",\n\t"); - const types = [...exportList[packageName].interface, ...exportList[packageName].type] + let types = [...exportList[packageName].interface, ...exportList[packageName].type] .sort() .join(",\n\t"); + reals = reals ? `\n\t${reals}` : ''; + types = types ? `\n\t${types}` : ""; exportCode += realExports + reals + exportTrailer + typeExports + types + exportTrailer; }; diff --git a/core/extension/preview.d.ts b/core/extension/preview.d.ts index 4f39b130a7e3..bd63a76eadd1 100644 --- a/core/extension/preview.d.ts +++ b/core/extension/preview.d.ts @@ -4,19 +4,15 @@ *--------------------------------------------------------------------------------------------*/ // BEGIN GENERATED CODE export { - } from "@itwin/core-frontend"; export type { - } from "@itwin/core-frontend"; export { - } from "@itwin/core-common"; export type { - } from "@itwin/core-common"; // END GENERATED CODE