npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

view-with-transition

v0.1.4

Published

Angular state transitions with block containers made simple

Downloads

5

Readme

view-with-transition

Allows you to implement Angular 1.x ngRoute/routerUi transitions with display:block state containers (normally used by frameworks like Bootstrap 3).

Angular route transitions are awesome but they need the state containers to have an absolute position to achieve content overlaping during the transition. This is because the DOM doesn't allow elements with position:static to overlap other elements. The only way to do it is to remove the DOM element you want to overlap from the layout changing its position to absolute. But doing this you will loose the position and size of the element you extract from the layout so you have to make some fixes.

This small library contain an unique directive to do this tasks programatically with no fuss for you.

Installation

Using Bower

bower install view-with-transition

Using npm

npm install view-with-transition

Declare in angular app manifest

angular.module('myApp', ['ui.route', 'dzegarra.utils.transitions']);

Use

For be able of managing the transition is required to move the ui-view element inside a container.

HTML

<head>
    ...
    <link rel="stylesheet" href="view-with-transition.min.css">
    ...
</head>
<body>
    ...
    <main class="view-container">
        <ui-view view-with-transition></ui-view>
    </main>
    ...
    <script src="view-with-transition.min.js"></script>
    <script src="app.js"></script>
</body>

Custom transitions

By default the transition used is fade. You can set new transitions passing the name of the CSS class with the transition as a value of view-with-transition directive.

This library came with a few transition effects:

  • zoom-in
  • slide-left
  • slide-right
  • slide-up
  • slide-down

For can use these this way:

<main class="view-container">
    <ui-view view-with-transition="zoom-in"></ui-view>
</main>

And yep, you can create your own transitions and use then this way.

How it works

If you want to know how it works just check the code bro.

I'm just kidding.

What the directive view-with-transition does is play with the min-height CSS property of the container of all states and change to position:absolute each state container during the duration of the transition.

Only during the transition the height of the container is slowly changed and the overlaping of the states containers are allowed.

I encourage to read the script and, if you found something to improve or fix, to register a new issue or a pull request.