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

@networld-to/vue-ap-timeline

v0.7.3

Published

[![NPM](https://nodei.co/npm/@networld-to/vue-ap-timeline.png?compact=true)](https://npmjs.org/package/@networld-to/vue-ap-timeline)

Downloads

19

Readme

Vue Component Library for ActivityPub Timelines

NPM

Integrate your Fediverse timeline into your Vue 3 with Bootstrap 5 application. Currently, tested with Mastodon and Akkoma via Mastodon compatible API calls.

Integrate a dark or light themed timeline into your own website.

Dark and light themed timeline

Getting Started

Add the Vue ActivityPub Timeline to your Vue 3 project.

$ yarn add @networld-to/vue-ap-timeline

# Add the following dependencies
$ yarn add [email protected] @popperjs/core

$ yarn install
$ yarn run dev

Add the following to your main.ts file.

import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap';
import VueApTimeline from '@networld-to/vue-ap-timeline';
import '@networld-to/vue-ap-timeline/dist/style.css';

var app = createApp(App);
app.use(VueApTimeline);
app.mount('#app');

Example how to include a dark and light themed timeline side by side, with optional the number of posts specified, to show the latest 10 posts.

<template>
  <main>
    <div class="container">
      <div class="row">
        <div class="col-6">
          <VueApTimeline
            fediverseHandle="[email protected]"
            fediversePlatform="mastodon"
            numberOfPosts="10"
            theme="dark"
          ></VueApTimeline>
        </div>
        <div class="col-6">
          <VueApTimeline
            fediverseHandle="[email protected]"
            fediversePlatform="mastodon"
            numberOfPosts="10"
            theme="light"
          ></VueApTimeline>
        </div>
      </div>
    </div>
  </main>
</template>

Currently only compatible with Mastodon through CORS issue of ActivityPub endpoints with all the tested Fediverse platforms.

fediverseHandle and fediversePlatform (with value mastodon or akkoma) are required.

The fediverseHandle can be also an alias, as long as the webfinger call returns the actually fediverse handle pointint to a real instance.

Supported ActivityPub Platforms

Through CORS issues making most, if not all, of the ActivityPub native endpoints inaccessible from the browser a fallback to the native platform API is required. The following list shows

| Platforms | fediversePlatform value | Supported Via | Tested | | --------- | ----------------------- | ------------------------------------------- | ----------------------------------------- | | Mastodon | mastodon | Mastodon API | Fully | | Akkoma | akkoma | Mastodon Compatible API | Partially | | Lemmy | N/A | Not supported, initial webfinger call fails | First fediverse-helper library call fails | | Friendica | friendica | Not supported | Fetching statuses fails |

More Screenshots

Dark themed timeline with profile Light themed timeline with profile

Developers

Getting Started

$ yarn build
$ tree dist
dist
├── components
│   ├── PostEntry.vue.d.ts
│   ├── PostThread.vue.d.ts
│   ├── Profile.vue.d.ts
│   └── VueApTimeline.vue.d.ts
├── index.d.ts
├── services
│   ├── Mastodon.d.ts
│   └── Utility.d.ts
├── style.css
├── vue-ap-timeline.es.js
└── vue-ap-timeline.umd.js

3 directories, 10 files

Testing Locally

Prepare your project by adding the following dependencies to your ../vue-ap-timeline-demo project. Change the project name and path accordingly.

# Execute the following from your test project `vue-ap-timeline-demo`
$ yarn add [email protected] @popperjs/core

$ yarn install && cd ../vue-ap-timeline && npm link && cd ../vue-ap-timeline-demo && npm link vue-ap-timeline