import { Plugin } from 'vite'; /** * Ion access token configuration. * * Supply a single string to use the same token in every environment, or an * object to select a token based on the current Vite `mode` * (e.g. `"development"`, `"staging"`, `"production"`). * * @example single token * ```ts * ionToken: "eyJhbGci..." * ``` * * @example per-environment tokens * ```ts * ionToken: { * development: "eyJhbGci...", // local dev token (lower quota) * production: "eyJhbGci...", // production token * } * ``` */ export type IonTokenConfig = string | Record; export type CesiumEngineOptions = { /** * Cesium Ion default access token, baked in at build time. * Accepts a plain string or a `{ [mode]: token }` map for per-environment * tokens (Vite `mode` is used as the key). * * When omitted, the plugin automatically checks the following environment * variables (loaded by Vite from your `.env` files): * - `CESIUM_ION_TOKEN_` — e.g. `CESIUM_ION_TOKEN_PRODUCTION` * - `CESIUM_ION_TOKEN` — generic fallback for any mode * * Explicit `ionToken` always takes priority over env vars. * * @see https://ion.cesium.com/tokens * @default undefined */ ionToken?: IonTokenConfig; /** * URL path under which Cesium's static assets will be served. * Must start with `/` and should match the `dest` folder used for copying. * * Useful when deploying to a CDN sub-path or a monorepo with a custom * public base. * * @default "/cesium" */ cesiumBaseUrl?: string; /** * Output folder (relative to Vite's `build.outDir`) where Cesium's static * assets are copied during build. * * Change this when your deployment expects assets under a custom path, e.g. * `"public/cesium"` for a Laravel/Rails project. * * @default "cesium" */ assetsPath?: string; /** * Emit debug logs showing which files are copied and which Ion token * (if any) is injected. Logs are prefixed with `[cesium-engine]`. * * @default false */ debug?: boolean; }; export declare function cesiumEngine(options?: CesiumEngineOptions): Plugin;