@itwin/core-frontend
Version:
iTwin.js frontend components
301 lines • 15.7 kB
JavaScript
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module Extensions
*/
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable @itwin/no-internal-barrel-imports */
/* eslint-disable sort-imports */
const ExtensionHost_1 = require("./ExtensionHost");
const globalSymbol = Symbol.for("itwin.core.frontend.globals");
if (globalThis[globalSymbol]) {
// Get the stack trace from when the module was first loaded
const firstLoadStack = globalThis[globalSymbol].stack;
const error = new Error("Multiple @itwin/core-frontend imports detected! This may happen if:\n" +
"- You have multiple versions of the package installed\n" +
"- Your bundling configuration is incorrect\n" +
"- You're importing from both ESM and CommonJS versions");
/* eslint-disable no-console */
console.error("Duplicate @itwin/core-frontend import:", error);
console.error("First import occurred at:", firstLoadStack);
console.error("Current import occurred at:", error.stack);
/* eslint-enable no-console */
throw error;
}
// BEGIN GENERATED CODE
const core_frontend_1 = require("../core-frontend");
const core_common_1 = require("@itwin/core-common");
const extensionExports = {
ACSDisplayOptions: core_frontend_1.ACSDisplayOptions,
ACSType: core_frontend_1.ACSType,
AccuDrawHintBuilder: core_frontend_1.AccuDrawHintBuilder,
AccuSnap: core_frontend_1.AccuSnap,
ActivityMessageDetails: core_frontend_1.ActivityMessageDetails,
ActivityMessageEndReason: core_frontend_1.ActivityMessageEndReason,
AuxCoordSystem2dState: core_frontend_1.AuxCoordSystem2dState,
AuxCoordSystem3dState: core_frontend_1.AuxCoordSystem3dState,
AuxCoordSystemSpatialState: core_frontend_1.AuxCoordSystemSpatialState,
AuxCoordSystemState: core_frontend_1.AuxCoordSystemState,
BackgroundFill: core_common_1.BackgroundFill,
BackgroundMapType: core_common_1.BackgroundMapType,
BatchType: core_common_1.BatchType,
BeButton: core_frontend_1.BeButton,
BeButtonEvent: core_frontend_1.BeButtonEvent,
BeButtonState: core_frontend_1.BeButtonState,
BeModifierKeys: core_frontend_1.BeModifierKeys,
BeTouchEvent: core_frontend_1.BeTouchEvent,
BeWheelEvent: core_frontend_1.BeWheelEvent,
BingElevationProvider: core_frontend_1.BingElevationProvider,
BingLocationProvider: core_frontend_1.BingLocationProvider,
BisCodeSpec: core_common_1.BisCodeSpec,
BriefcaseIdValue: core_common_1.BriefcaseIdValue,
CategorySelectorState: core_frontend_1.CategorySelectorState,
ChangeFlags: core_frontend_1.ChangeFlags,
ChangeOpCode: core_common_1.ChangeOpCode,
ChangedValueState: core_common_1.ChangedValueState,
ChangesetType: core_common_1.ChangesetType,
ClipEventType: core_frontend_1.ClipEventType,
ClipIntersectionStyle: core_common_1.ClipIntersectionStyle,
Cluster: core_frontend_1.Cluster,
ColorByName: core_common_1.ColorByName,
ColorDef: core_common_1.ColorDef,
CommonLoggerCategory: core_common_1.CommonLoggerCategory,
ContextRealityModelState: core_frontend_1.ContextRealityModelState,
ContextRotationId: core_frontend_1.ContextRotationId,
CoordSource: core_frontend_1.CoordSource,
CoordSystem: core_frontend_1.CoordSystem,
CoordinateLockOverrides: core_frontend_1.CoordinateLockOverrides,
DecorateContext: core_frontend_1.DecorateContext,
Decorations: core_frontend_1.Decorations,
DisclosedTileTreeSet: core_frontend_1.DisclosedTileTreeSet,
DisplayStyle2dState: core_frontend_1.DisplayStyle2dState,
DisplayStyle3dState: core_frontend_1.DisplayStyle3dState,
DisplayStyleState: core_frontend_1.DisplayStyleState,
DrawingModelState: core_frontend_1.DrawingModelState,
DrawingViewState: core_frontend_1.DrawingViewState,
ECSqlSystemProperty: core_common_1.ECSqlSystemProperty,
ECSqlValueType: core_common_1.ECSqlValueType,
EditManipulator: core_frontend_1.EditManipulator,
ElementGeometryOpcode: core_common_1.ElementGeometryOpcode,
ElementLocateManager: core_frontend_1.ElementLocateManager,
ElementPicker: core_frontend_1.ElementPicker,
ElementState: core_frontend_1.ElementState,
EmphasizeElements: core_frontend_1.EmphasizeElements,
EntityState: core_frontend_1.EntityState,
EventController: core_frontend_1.EventController,
EventHandled: core_frontend_1.EventHandled,
FeatureOverrideType: core_common_1.FeatureOverrideType,
FeatureSymbology: core_frontend_1.FeatureSymbology,
FillDisplay: core_common_1.FillDisplay,
FillFlags: core_common_1.FillFlags,
FlashMode: core_frontend_1.FlashMode,
FlashSettings: core_frontend_1.FlashSettings,
FontType: core_common_1.FontType,
FrontendLoggerCategory: core_frontend_1.FrontendLoggerCategory,
FrustumAnimator: core_frontend_1.FrustumAnimator,
FrustumPlanes: core_common_1.FrustumPlanes,
GeoCoordStatus: core_common_1.GeoCoordStatus,
GeometricModel2dState: core_frontend_1.GeometricModel2dState,
GeometricModel3dState: core_frontend_1.GeometricModel3dState,
GeometricModelState: core_frontend_1.GeometricModelState,
GeometryClass: core_common_1.GeometryClass,
GeometryStreamFlags: core_common_1.GeometryStreamFlags,
GeometrySummaryVerbosity: core_common_1.GeometrySummaryVerbosity,
GlobeAnimator: core_frontend_1.GlobeAnimator,
GlobeMode: core_common_1.GlobeMode,
GraphicAssembler: core_frontend_1.GraphicAssembler,
GraphicBranch: core_frontend_1.GraphicBranch,
GraphicBuilder: core_frontend_1.GraphicBuilder,
GraphicType: core_frontend_1.GraphicType,
GridOrientationType: core_common_1.GridOrientationType,
HSVConstants: core_common_1.HSVConstants,
HiliteSet: core_frontend_1.HiliteSet,
HitDetail: core_frontend_1.HitDetail,
HitDetailType: core_frontend_1.HitDetailType,
HitGeomType: core_frontend_1.HitGeomType,
HitList: core_frontend_1.HitList,
HitParentGeomType: core_frontend_1.HitParentGeomType,
HitPriority: core_frontend_1.HitPriority,
HitSource: core_frontend_1.HitSource,
IModelConnection: core_frontend_1.IModelConnection,
IconSprites: core_frontend_1.IconSprites,
ImageBufferFormat: core_common_1.ImageBufferFormat,
ImageSourceFormat: core_common_1.ImageSourceFormat,
InputCollector: core_frontend_1.InputCollector,
InputSource: core_frontend_1.InputSource,
InteractiveTool: core_frontend_1.InteractiveTool,
IntersectDetail: core_frontend_1.IntersectDetail,
KeyinParseError: core_frontend_1.KeyinParseError,
LinePixels: core_common_1.LinePixels,
LocateAction: core_frontend_1.LocateAction,
LocateFilterStatus: core_frontend_1.LocateFilterStatus,
LocateOptions: core_frontend_1.LocateOptions,
LocateResponse: core_frontend_1.LocateResponse,
ManipulatorToolEvent: core_frontend_1.ManipulatorToolEvent,
MarginPercent: core_frontend_1.MarginPercent,
Marker: core_frontend_1.Marker,
MarkerSet: core_frontend_1.MarkerSet,
MassPropertiesOperation: core_common_1.MassPropertiesOperation,
MessageBoxIconType: core_frontend_1.MessageBoxIconType,
MessageBoxType: core_frontend_1.MessageBoxType,
MessageBoxValue: core_frontend_1.MessageBoxValue,
ModelSelectorState: core_frontend_1.ModelSelectorState,
ModelState: core_frontend_1.ModelState,
MonochromeMode: core_common_1.MonochromeMode,
NotificationHandler: core_frontend_1.NotificationHandler,
NotificationManager: core_frontend_1.NotificationManager,
NotifyMessageDetails: core_frontend_1.NotifyMessageDetails,
Npc: core_common_1.Npc,
OffScreenViewport: core_frontend_1.OffScreenViewport,
OrthographicViewState: core_frontend_1.OrthographicViewState,
OutputMessageAlert: core_frontend_1.OutputMessageAlert,
OutputMessagePriority: core_frontend_1.OutputMessagePriority,
OutputMessageType: core_frontend_1.OutputMessageType,
ParseAndRunResult: core_frontend_1.ParseAndRunResult,
ParticleCollectionBuilder: core_frontend_1.ParticleCollectionBuilder,
PerModelCategoryVisibility: core_frontend_1.PerModelCategoryVisibility,
PhysicalModelState: core_frontend_1.PhysicalModelState,
Pixel: core_frontend_1.Pixel,
PlanarClipMaskMode: core_common_1.PlanarClipMaskMode,
PlanarClipMaskPriority: core_common_1.PlanarClipMaskPriority,
PrimitiveTool: core_frontend_1.PrimitiveTool,
QParams2d: core_common_1.QParams2d,
QParams3d: core_common_1.QParams3d,
QPoint2d: core_common_1.QPoint2d,
QPoint2dBuffer: core_common_1.QPoint2dBuffer,
QPoint2dBufferBuilder: core_common_1.QPoint2dBufferBuilder,
QPoint2dList: core_common_1.QPoint2dList,
QPoint3d: core_common_1.QPoint3d,
QPoint3dBuffer: core_common_1.QPoint3dBuffer,
QPoint3dBufferBuilder: core_common_1.QPoint3dBufferBuilder,
QPoint3dList: core_common_1.QPoint3dList,
Quantization: core_common_1.Quantization,
QueryRowFormat: core_common_1.QueryRowFormat,
Rank: core_common_1.Rank,
RenderClipVolume: core_frontend_1.RenderClipVolume,
RenderContext: core_frontend_1.RenderContext,
RenderGraphic: core_frontend_1.RenderGraphic,
RenderGraphicOwner: core_frontend_1.RenderGraphicOwner,
RenderMode: core_common_1.RenderMode,
RenderSystem: core_frontend_1.RenderSystem,
Scene: core_frontend_1.Scene,
ScreenViewport: core_frontend_1.ScreenViewport,
SectionDrawingModelState: core_frontend_1.SectionDrawingModelState,
SectionType: core_common_1.SectionType,
SelectionMethod: core_frontend_1.SelectionMethod,
SelectionMode: core_frontend_1.SelectionMode,
SelectionProcessing: core_frontend_1.SelectionProcessing,
SelectionSet: core_frontend_1.SelectionSet,
SelectionSetEventType: core_frontend_1.SelectionSetEventType,
SheetModelState: core_frontend_1.SheetModelState,
SheetViewState: core_frontend_1.SheetViewState,
SkyBoxImageType: core_common_1.SkyBoxImageType,
SnapDetail: core_frontend_1.SnapDetail,
SnapHeat: core_frontend_1.SnapHeat,
SnapMode: core_frontend_1.SnapMode,
SnapStatus: core_frontend_1.SnapStatus,
SpatialClassifierInsideDisplay: core_common_1.SpatialClassifierInsideDisplay,
SpatialClassifierOutsideDisplay: core_common_1.SpatialClassifierOutsideDisplay,
SpatialLocationModelState: core_frontend_1.SpatialLocationModelState,
SpatialModelState: core_frontend_1.SpatialModelState,
SpatialViewState: core_frontend_1.SpatialViewState,
Sprite: core_frontend_1.Sprite,
SpriteLocation: core_frontend_1.SpriteLocation,
StandardViewId: core_frontend_1.StandardViewId,
StartOrResume: core_frontend_1.StartOrResume,
SyncMode: core_common_1.SyncMode,
TentativePoint: core_frontend_1.TentativePoint,
TerrainHeightOriginMode: core_common_1.TerrainHeightOriginMode,
TextureMapUnits: core_common_1.TextureMapUnits,
ThematicDisplayMode: core_common_1.ThematicDisplayMode,
ThematicGradientColorScheme: core_common_1.ThematicGradientColorScheme,
ThematicGradientMode: core_common_1.ThematicGradientMode,
ThematicGradientTransparencyMode: core_common_1.ThematicGradientTransparencyMode,
Tile: core_frontend_1.Tile,
TileAdmin: core_frontend_1.TileAdmin,
TileBoundingBoxes: core_frontend_1.TileBoundingBoxes,
TileDrawArgs: core_frontend_1.TileDrawArgs,
TileGraphicType: core_frontend_1.TileGraphicType,
TileLoadPriority: core_frontend_1.TileLoadPriority,
TileLoadStatus: core_frontend_1.TileLoadStatus,
TileRequest: core_frontend_1.TileRequest,
TileRequestChannel: core_frontend_1.TileRequestChannel,
TileRequestChannelStatistics: core_frontend_1.TileRequestChannelStatistics,
TileRequestChannels: core_frontend_1.TileRequestChannels,
TileTree: core_frontend_1.TileTree,
TileTreeLoadStatus: core_frontend_1.TileTreeLoadStatus,
TileTreeReference: core_frontend_1.TileTreeReference,
TileUsageMarker: core_frontend_1.TileUsageMarker,
TileVisibility: core_frontend_1.TileVisibility,
Tiles: core_frontend_1.Tiles,
Tool: core_frontend_1.Tool,
ToolAdmin: core_frontend_1.ToolAdmin,
ToolAssistance: core_frontend_1.ToolAssistance,
ToolAssistanceImage: core_frontend_1.ToolAssistanceImage,
ToolAssistanceInputMethod: core_frontend_1.ToolAssistanceInputMethod,
ToolSettings: core_frontend_1.ToolSettings,
TwoWayViewportFrustumSync: core_frontend_1.TwoWayViewportFrustumSync,
TwoWayViewportSync: core_frontend_1.TwoWayViewportSync,
TxnAction: core_common_1.TxnAction,
TypeOfChange: core_common_1.TypeOfChange,
UniformType: core_frontend_1.UniformType,
VaryingType: core_frontend_1.VaryingType,
ViewClipClearTool: core_frontend_1.ViewClipClearTool,
ViewClipDecoration: core_frontend_1.ViewClipDecoration,
ViewClipDecorationProvider: core_frontend_1.ViewClipDecorationProvider,
ViewClipTool: core_frontend_1.ViewClipTool,
ViewCreator2d: core_frontend_1.ViewCreator2d,
ViewCreator3d: core_frontend_1.ViewCreator3d,
ViewManager: core_frontend_1.ViewManager,
ViewManip: core_frontend_1.ViewManip,
ViewPose: core_frontend_1.ViewPose,
ViewPose2d: core_frontend_1.ViewPose2d,
ViewPose3d: core_frontend_1.ViewPose3d,
ViewRect: core_frontend_1.ViewRect,
ViewState: core_frontend_1.ViewState,
ViewState2d: core_frontend_1.ViewState2d,
ViewState3d: core_frontend_1.ViewState3d,
ViewStatus: core_frontend_1.ViewStatus,
ViewTool: core_frontend_1.ViewTool,
ViewingSpace: core_frontend_1.ViewingSpace,
Viewport: core_frontend_1.Viewport,
canvasToImageBuffer: core_frontend_1.canvasToImageBuffer,
canvasToResizedCanvasWithBars: core_frontend_1.canvasToResizedCanvasWithBars,
connectViewportFrusta: core_frontend_1.connectViewportFrusta,
connectViewportViews: core_frontend_1.connectViewportViews,
connectViewports: core_frontend_1.connectViewports,
extractImageSourceDimensions: core_frontend_1.extractImageSourceDimensions,
getCompressedJpegFromCanvas: core_frontend_1.getCompressedJpegFromCanvas,
getImageSourceFormatForMimeType: core_frontend_1.getImageSourceFormatForMimeType,
getImageSourceMimeType: core_frontend_1.getImageSourceMimeType,
imageBufferToBase64EncodedPng: core_frontend_1.imageBufferToBase64EncodedPng,
imageBufferToCanvas: core_frontend_1.imageBufferToCanvas,
imageBufferToPngDataUrl: core_frontend_1.imageBufferToPngDataUrl,
imageElementFromImageSource: core_frontend_1.imageElementFromImageSource,
imageElementFromUrl: core_frontend_1.imageElementFromUrl,
queryTerrainElevationOffset: core_frontend_1.queryTerrainElevationOffset,
readElementGraphics: core_frontend_1.readElementGraphics,
readGltfGraphics: core_frontend_1.readGltfGraphics,
synchronizeViewportFrusta: core_frontend_1.synchronizeViewportFrusta,
synchronizeViewportViews: core_frontend_1.synchronizeViewportViews,
};
// END GENERATED CODE
const getExtensionApi = (_id) => {
return {
exports: {
// exceptions
ExtensionHost: ExtensionHost_1.ExtensionHost,
// automated
...extensionExports,
},
};
};
globalThis[globalSymbol] = {
stack: new Error().stack,
getExtensionApi,
};
//# sourceMappingURL=ExtensionRuntime.js.map