0.9.5 • Published 6 months ago

@types/zumly v0.9.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/zumly

Summary

This package contains type definitions for zumly (https://zumly.org).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/zumly.

index.d.ts

// Type definitions for zumly 0.9
// Project: https://zumly.org
// Definitions by: edwinork <https://github.com/edwinork>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * Zumly powers your apps with a zoomable user interface (ZUI) taste.
 */
declare class zumly {
    /**
     * Creates a Zumly instance
     * @params options
     * @example
     *  new Zumly({
     *  mount: '.mount',
     *  initialView: 'home',
     *  views: {
     *   home,
     *   contact,
     *   ...
     *  }
     *
     */
    constructor(options: zumly.Options);

    init(): Promise<void>;

    zoomLevel(): number;

    zoomIn(el: Element): Promise<void>;

    zoomOut(): void;
}

declare namespace zumly {
    type WithRender = Record<string, unknown> & { render(): Promise<string> };

    interface Options {
        // Mount DOM Element
        mount: string;
        // First rendered view name
        initialView: string;
        // Store of all view objects
        views: Record<string, WithRender | string>;
        // Custom transitions
        transitions?: {
            // Effects for background views
            effects: Array<'blur' | 'sepia' | 'saturate'>;
            // How new injected view is adapted. String. Default 'width'
            cover: 'height' | 'width';
            // Transition duration. Default '1s'
            duration: string;
            // Transition ease. Default 'ease-in-out'
            ease: string;
        } | undefined;
        // Activate debug notifications
        debug?: boolean | undefined;
    }
}

export = zumly;

export as namespace zumly;

Additional Details

  • Last updated: Fri, 02 Jul 2021 16:32:18 GMT
  • Dependencies: none
  • Global values: zumly

Credits

These definitions were written by edwinork.

0.9.4

7 months ago

0.9.3

8 months ago

0.9.5

6 months ago

0.9.2

12 months ago

0.9.1

3 years ago

0.9.0

4 years ago