index.d.ts 1.3 KB

1234567891011121314151617181920212223242526
  1. /* calcite custom elements */
  2. import type { Components, JSX } from "../types/components";
  3. /**
  4. * Used to manually set the base path where assets can be found.
  5. * If the script is used as "module", it's recommended to use "import.meta.url",
  6. * such as "setAssetPath(import.meta.url)". Other options include
  7. * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
  8. * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
  9. * But do note that this configuration depends on how your script is bundled, or lack of
  10. * bundling, and where your assets can be loaded from. Additionally custom bundling
  11. * will have to ensure the static assets are copied to its build directory.
  12. */
  13. export declare const setAssetPath: (path: string) => void;
  14. export interface SetPlatformOptions {
  15. raf?: (c: FrameRequestCallback) => number;
  16. ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
  17. rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
  18. }
  19. export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
  20. export type { Components, JSX };
  21. export * from '../types/components';