Sha256: 4121cb2ddd37e9ec15c8fec05709ee0ec35d8d399a4618aecf3592f7930ca459

Contents?: true

Size: 824 Bytes

Versions: 5

Compression:

Stored size: 824 Bytes

Contents

import type { Application } from "@hotwired/stimulus";
import { ModalPresenter } from "./modal";
import { PopoverPresenter } from "./popover";
import RemoteNavigationController from "./controllers/remote-navigation";
import "./touch";

export { registerServiceWorker } from "./serviceworker";
export { currentLocale } from "./locale";

declare global {
  interface Window {
    ui?: {
      modal: ModalPresenter;
      popover: PopoverPresenter;
    };
  }
}

export async function start({
  application,
}: {
  application: Application;
}): Promise<void> {
  const root = document.createElement("div");
  root.id = "shimmer";
  document.body.append(root);
  application.register("remote-navigation", RemoteNavigationController);
  window.ui = {
    modal: new ModalPresenter(),
    popover: new PopoverPresenter(),
  };
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shimmer-0.0.9 src/index.ts
shimmer-0.0.8 src/index.ts
shimmer-0.0.7 src/index.ts
shimmer-0.0.6 src/index.ts
shimmer-0.0.5 src/index.ts