UNPKG

@arcgis/coding-components

Version:
90 lines (74 loc) 3.54 kB
export { arcade } from "./utils/arcade-monaco/arcade-defaults"; export { sqlExpression } from "./utils/sql-expr-monaco/sql-expr-defaults"; export type * from "./components/types"; /** * Get a resolved path from where an asset can be loaded. * * @param suffix - The relative path for the asset. */ export function getAssetPath(suffix: string): string; /** * Used to manually set the base path where package assets (like localization * and icons) can be found. * * By default, the package assets are loaded from * `https://js.arcgis.com/<version>/<simplified-package-name>/`. We are hosting * our assets on a CDN (Content Delivery Network) to ensure fast and reliable * access. It is CORS-enabled, so you can load the assets from any domain. This * is the recommended way to load the assets and avoid bundling them with your * application. * * However, if you need to host the assets locally, you can copy them manually * as part of your build process and use `setAssetPath` to customize where the * browser will load the assets from. * * @param path - Relative or absolute path to the assets folder. */ export function setAssetPath(path: URL | string): void; import type { ArcgisArcadeEditor } from "./components/arcgis-arcade-editor/customElement.js"; import type { ArcgisCodeEditor } from "./components/arcgis-code-editor/customElement.js"; import type { CodeEditorShell } from "./components/arcgis-code-editor-shell/customElement.js"; import type { ArcgisCodeViewer } from "./components/arcgis-code-viewer/customElement.js"; import type { ArcgisSqlExpressionEditor } from "./components/arcgis-sql-expression-editor/customElement.js"; import type { ArcgisSqlLayerEditor } from "./components/arcgis-sql-layer-editor/customElement.js"; export { ToEvents, TargetedEvent } from "@arcgis/lumina"; export interface ArcgisArcadeEditorCustomEvent<T> extends CustomEvent<T> { detail: T; target: ArcgisArcadeEditor; currentTarget: ArcgisArcadeEditor; } export interface ArcgisCodeEditorCustomEvent<T> extends CustomEvent<T> { detail: T; target: ArcgisCodeEditor; currentTarget: ArcgisCodeEditor; } export interface ArcgisSqlExpressionEditorCustomEvent<T> extends CustomEvent<T> { detail: T; target: ArcgisSqlExpressionEditor; currentTarget: ArcgisSqlExpressionEditor; } export interface ArcgisSqlLayerEditorCustomEvent<T> extends CustomEvent<T> { detail: T; target: ArcgisSqlLayerEditor; currentTarget: ArcgisSqlLayerEditor; } declare global { interface HTMLElementTagNameMap { "arcgis-arcade-editor": ArcgisArcadeEditor; "arcgis-code-editor": ArcgisCodeEditor; "arcgis-code-editor-shell": CodeEditorShell; "arcgis-code-viewer": ArcgisCodeViewer; "arcgis-sql-expression-editor": ArcgisSqlExpressionEditor; "arcgis-sql-layer-editor": ArcgisSqlLayerEditor; } type HTMLArcgisArcadeEditorElementEventMap = ArcgisArcadeEditor["@eventTypes"]; type HTMLArcgisArcadeEditorElement = ArcgisArcadeEditor; type HTMLArcgisCodeEditorElementEventMap = ArcgisCodeEditor["@eventTypes"]; type HTMLArcgisCodeEditorElement = ArcgisCodeEditor; type HTMLArcgisCodeEditorShellElement = CodeEditorShell; type HTMLArcgisCodeViewerElement = ArcgisCodeViewer; type HTMLArcgisSqlExpressionEditorElementEventMap = ArcgisSqlExpressionEditor["@eventTypes"]; type HTMLArcgisSqlExpressionEditorElement = ArcgisSqlExpressionEditor; type HTMLArcgisSqlLayerEditorElementEventMap = ArcgisSqlLayerEditor["@eventTypes"]; type HTMLArcgisSqlLayerEditorElement = ArcgisSqlLayerEditor; }