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

@vonage/vivid-bindings-vue

v3.49.0

Published

Typescript bindings for [Vivid 3](http://vivid.deno.dev) web components to be used with [VueJS 3](https://vuejs.org)

Downloads

189

Readme

vivid-bindings-vue

Typescript bindings for Vivid 3 web components to be used with VueJS 3

What's in the box(i.e. batteries included):

  • Few lines of code convergent initialization routine for Vivid design system
  • 100% Vivid components covered with bindings
  • ~100% automated process for NPM package generation & release. @vonage/vivid package is the release driver/trigger
  • Enhanced DevEx (VS Code intellisense) + Fully sound Typescript type checking for Vivid web components props/events/slots/cssProps/cssParts/etc. contracts
  • Abstraction layer for easier migration to future major versions of Vivid

How to integrate with VueJs App

Vivid can be initialized as easy as few lines of code

main.ts

import { createApp } from 'vue'
import App from './App.vue'
import { vivid3 } from '@vonage/vivid-bindings-vue'

const app = createApp(App)
app.use(vivid3, {
  font: 'oss',
  theme: 'dark'
})
app.mount('#app')

vite.config.ts

import { isCustomElement } from '@vonage/vivid-bindings-vue'

...

  plugins: [
    vue(
      {
        template: {
          compilerOptions: {
            isCustomElement
          },
        },
      }
    )
  ]

...

How to import components

Each Vivid component should be imported using single import statement. The Vivid major version is a part of the import v3. This enables seamless side by side usage of different major versions in a single project for pay as you go future migration path

<script setup lang="ts">
import { Connotation } from '@vonage/vivid'
import VwcButton from '@vonage/vivid-bindings-vue/v3/VwcButton'
import VwcIcon from '@vonage/vivid-bindings-vue/v3/VwcIcon'

function handleClick(e:PointerEvent) {}
</script>

<template>
  <VwcButton
     iconTrailing
     icon="github-mono"
     @click="handleClick"
     appearance='filled'
     label="I'm a Vivid button" />
  <VwcIcon
     name="key-solid"
     :connotation=Connotation.Alert
     :size=5 />
</template>

Releases

This package has a pipeline workflow which is checking for a new Vivid version on a dayly basis and if it detects that new version is out The new bindings are generated and published automatically, reflecting the same package version @vonage/vivid has. So the release driver is @vonage/vivid package itself.

Repository structure

The entire repository is a pure Typescript code, divided onto two main parts

  • ./src - is the Deno territory, contains the generator code, which is effectively generates the NPM package contents on top of the existing template
  • ./package - is the NPM package template

Rationale

  • Vivid web components since version 3.0 are shipped with the custom elements meta data alongside the code itself. Which allows to employ code generation practice to build near 100% automated typescript type safe bindings for VueJs components
  • Maintenance cost should be linear, it's always one component to be rendered, no matter how many elements there are actually in Vivid design system
  • Adds an abstraction layer to mitigate the custom web components namespacing conflicts issue, to enable usage of several major versions of Vivid components in the single application more info here, and how Salesforce Lightning web components are solving that issue here

Official bindings for Vue 2.x/3.x

https://github.com/Vonage/vivid-vue