0.1.7 • Published 4 years ago

@nteract/mythic-windowing v0.1.7

Weekly downloads
-
License
BSD-3-Clause
Repository
-
Last release
4 years ago

@nteract/mythic-windowing

This package implements a windowing system based on electron, using the myths framework.

Installation

$ yarn add @nteract/mythic-windowing
$ npm install --save @nteract/mythic-windowing

Usage

Initialize the package by including the windowing package in your store:

import { windowing, setWindowingBackend, electronBackend } from "@nteract/mythic-windowing";
import { makeConfigureStore } from "@nteract/myths";

export const configureStore = makeConfigureStore({
  packages: [windowing],
});

store.dispatch(setWindowingBackend.create(electronBackend));

const electronReady$ = new Observable((observer) => {
  (app as any).on("ready", launchInfo => observer.next(launchInfo));
});

electronReady$
  .subscribe(
    () => store.dispatch(
      showWindow.create({
        id: "splash",
        kind: "splash",
        width: 565,
        height: 233,
        path: join(__dirname, "..", "static", "splash.html"),
      })
    ),
    (err) => console.error(err),
    () => store.dispatch(
      closeWindow.create("splash")
    ),
  );

API

TBD

Support

If you experience an issue while using this package or have a feature request, please file an issue on the issue board and add the pkg:mythic-windowing label.

License

BSD-3-Clause

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.4-alpha.0

5 years ago

0.1.3-alpha.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago