sesaparcours
    Preparing search index...

    Base class for console and notebook GUI.

    Index

    Constructors

    Properties

    copyToClipboard: (text: string) => void

    Copy a text to clipboard.

    Accessors

    • get kernel(): KernelBase | undefined

      Kernel getter.

      Returns KernelBase | undefined

    • get kernelLoader(): KernelLoader

      KernelLoader getter.

      Returns KernelLoader

    • get kernelSafe(): KernelBase | null

      Returns KernelBase | null

    • get language(): string

      Language getter.

      Returns string

    Methods

    • Backup to checkpoints.

      Parameters

      • Optionalapproved: boolean

      Returns Promise<string | undefined>

    • Ask the user to confirm or cancel.

      Parameters

      • title: string
      • message: string
      • text: string
      • callback: () => void
      • textCancel: string
      • callbackCancel: () => void

      Returns void

    • Get the content (script or notebook content).

      Returns string

    • Compress a string to another string (URL safe).

      Parameters

      • content: string

      Returns Promise<string>

    • Download content to file.

      Parameters

      • Optionalfilename: string

      Returns void

    • Notify the user with an error.

      Parameters

      • title: string
      • message: string

      Returns void

    • Reverse version of deflate.

      Parameters

      • content: string

      Returns Promise<string>

    • Notify the user.

      Parameters

      • title: string
      • message: string

      Returns void

    • Initialize the GUI.

      Parameters

      • Optionaloptions: any

      Returns Promise<void>

    • Change loader text and call init function. If catchError is false, in case of error, we continue the init process, trying to do our best...

      Parameters

      • func: () => Promise<any>
      • message: string
      • catchError: boolean

      Returns Promise<any>

    • Restart the kernel.

      Returns void

    • Is last backup tagged as "approved"?

      Returns Promise<boolean | null | undefined>

    • Check if GUI is loaded.

      Returns Promise<void>

    • Loading the content from query string (ipynb=/script= or from=).

      Parameters

      • key: string

      Returns Promise<string | null>

    • Load content from local forage.

      Parameters

      • OptionalsetContent: boolean

      Returns Promise<string | null>

    • Load auxiliary files submited via URL (aux= parameter) (async).

      Returns Promise<void>

    • Load modules submited via URL (module= parameter) (async).

      Returns Promise<void>

    • Opening file (async) and load its content.

      Parameters

      Returns Promise<void>

    • Wait for par load (document.body available).

      Returns Promise<void>

    • Loading file in the (emulated) local filesystem (async).

      Parameters

      Returns Promise<void>

    • Register an extension and its callback.

      Parameters

      • name: string
      • callback: () => Promise<void>

      Returns void

    • Ask the user to select a choice.

      Parameters

      • title: string
      • message: string
      • choices: { handler: () => void; text: string }[]
      • textCancel: string
      • callbackCancel: () => void

      Returns void

    • Select a checkpoint to load in the script.

      Returns Promise<string | null>

    • Set the checkpoints manager (typically use with GUIOptions.noCheckpointsInit set to true).

      Parameters

      Returns void

    • Set the content (script or notebook content).

      Parameters

      • content: string

      Returns void

    • Returning the sharing link for the content.

      Parameters

      • key: string

      Returns Promise<string>

    • Get mode as a string (dark/light).

      Returns Promise<"light" | "dark" | undefined>

    • Tag last backup as "approved".

      Returns Promise<void>

    • Open an URL in a new tab or download a file.

      Parameters

      • url: string
      • Optionaldownload: string

      Returns void