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

@extscreen/vue

v10000.0.0

Published

Hippy Vue for TV

Downloads

2

Readme

Hippy Vue

Write Hippy cross platform app with Vue Web technology.

Hippy Group

Features

  • Fully compatible with Vue ecosystem, include the directives and Vue-Router.
  • Full compatible web development, able to output webpage, iOS, Android versions at one time.
  • High quality assurance.
  • Using flex layout by default.

How to use

Just replace the runtime to hippy-vue, but if you require to use Vue.Native to retrieve the device properties, write a hippy-vue alias to vue in webpack config will be ok.

// import Vue from 'vue';
import Vue from '@hippy/vue'; // Replace original vue to hippy-vue, others are all the same.

Advanced topics

Custom component

hippy-vue has concepts of Pure Component(Element) is mapping to Native component, and Component With Method(Vue custom component) define for the component with some methods.

Pure component(Element)

Pure component use for define the component and native mapping, for example:

IMPORTANT: Element can't with methods, need method, use Vue.component() in next section.

import Vue from '@hippy/vue';

/*
 * Register the ComponentName as same as native defined directly
 * Use with <ComponentName /> in <template>
 */
Vue.registerElement('ComponentName');

/*
 * It's possible to register tagname with lowercase.
 * Then use `component.name` to map to native component defined.
 * However, tagname must not be the same as ComponentName after the case ignored.
 * Use with <tagname /> in <template>.
 */
Vue.registerElement('tagname', {
    component: {
        name: 'ComponentName',
    },
});

Component With Method(Vue custom component)

Use Vue component registration to define the component with methods.

For example:

import Vue from '@hippy/vue';

// Define a `BeautyText` element
Vue.registerElement('BeautyText');

// Define the component with methods
Vue.component('btext', {
  methods: {
    // Custom the focus method
    focus() {
      // Use this.$refs.instance to pass the Node ID
      Vue.Native.callUIFunction(this.$refs.instance, 'focus', []);
    },
  },
  // Use the template to render the `BeautyText` component
  template: `<BeautyText ref="instance" />`,
})

Access the native capability.

All of native capability is encapsulated in Vue.Native property, with this property, app could determine running in native app or web browsre.

The most important is the methods to call native methods:

  • Vue.Native.callNative([MODULE], [METHOD], [ARGUMENTS]): call native module and methods.
  • Vue.Native.callNativeWithPromise([MODULE], [METHOD], [ARGUMENTS]): call native module and methods with promise returns.
  • Vue.Native.callUIFunction([REF], [METHOD], [ARGUMENTS]): call the UI function.

Access the native capability just create a simple function.

import Vue from '@hippy/vue';

function callNativeCapability(...args) {
  Vue.Native.callNative('ModuleName', 'MethodName', args);
}

For more information, see src/runtime/native.js.

Limitation

Because the native implementation there are some web browser features that can't support.

  1. Percentage of size

All of percentage of size unit are can't support, we recommend to use Flex layout.

  1. CSS Selector in style section of vue file

CSS Selector can't do complex query so far, but we will improve it.

TODO

A lot of things.

  1. ~~Convert CSS px unit value to pt.~~ -- implemented at 08/01/2018.
  2. ~~textarea value support, because in native value is a props.~~ - implemented at 08/06/2018.
  3. ~~v-if/v-show support, native framework should support display css property first.~~ - implemented at 08/28/2018.
  4. ~~v-model support, it's hard to handle onChange event.~~ - implemented at 08/22/2018.
  5. ~~transition support.~~ - Instead by animation component, implemented at 11/15/2018 released 1.1.9.
  6. Pseudo class selector event handler, such as .class-name:hover.
  7. Specific platform stylesheet.
  8. Form element and events.
  9. ~~vue-router integration.~~ - implemented at 08/31/2018.
  10. Split the values to multiple property for CSS loader.
  11. Style scope support