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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@live-change/vue3-components

v0.9.209

Published

Live Change Framework - vue components

Readme


title: @live-change/vue3-components

@live-change/vue3-components

Pakiet @live-change/vue3-components dostarcza zestaw gotowych komponentów Vue 3 zintegrowanych z Live Change:

  • komponenty logiczne (logic/*) – obserwacja danych, strefy ładowania i pracy, analityka
  • komponenty formularzy (form/*) – DefinedForm, CommandForm, FormBind
  • komponenty widoków (view/*) – ScrollLoader, VisibleArea, RangeViewer

W typowej aplikacji rejestrujesz komponenty globalnie:

import { createApp } from 'vue'
import { registerComponents } from '@live-change/vue3-components'
import App from './App.vue'

const app = createApp(App)

registerComponents(app, {
  // opcjonalne ustawienia, np. analytics
})

app.mount('#app')

Komponenty logiczne

Najważniejsze komponenty i helpery:

  • Loading, LoadingZone, LoadingWorkingZone – spójne wyświetlanie stanów ładowania
  • WorkingZone – zarządzanie „pracami” (operacjami) i ich błędami
  • Observe – reaktywne obserwowanie ścieżek DAO
  • analytics, useAnalytics, installRouterAnalytics – prosty system zdarzeń analitycznych
  • synchronized, synchronizedList – synchronizacja danych formularzy z widokami/akcjami

Przykład użycia synchronized (fragment z speed-dating):

import { synchronized } from '@live-change/vue3-components'
import { usePath, live, useActions } from '@live-change/vue3-ssr'

const path = usePath()
const actions = useActions()

const eventPath = computed(() => path.speedDating.event({ event }))
const eventData = await live(eventPath)

const synchronizedEvent = synchronized({
  source: eventData,
  update: actions.speedDating.updateEvent,
  identifiers: { event },
  recursive: true,
  autoSave: true,
  debounce: 600
})

const editable = synchronizedEvent.value

Przykład użycia synchronizedList (fragment z rcstreamer):

import { synchronizedList } from '@live-change/vue3-components'

const synchronizedAccessesList = synchronizedList({
  source: accesses,
  update: accessControlApi.updateSessionOrUserAndObjectOwnedAccess,
  delete: accessControlApi.resetSessionOrUserAndObjectOwnedAccess,
  identifiers: { object, objectType },
  objectIdentifiers: ({ to, sessionOrUser, sessionOrUserType }) => ({
    access: to, sessionOrUser, sessionOrUserType, object, objectType
  }),
  recursive: true
})

const synchronizedAccesses = synchronizedAccessesList.value
await synchronizedAccessesList.delete(synchronizedAccesses.value[0])

synchronizedList jest przeznaczony do edycji list elementów (np. role dostępów), gdzie:

  • source jest tablicą z live(...),
  • każdy element ma stabilne id,
  • identifiers przekazuje kontekst wspólny dla listy,
  • objectIdentifiers mapuje identyfikatory pojedynczego elementu pod akcje backendu.

Formularze: DefinedForm, CommandForm, FormBind

  • DefinedForm – renderuje formularz na podstawie definicji (np. definicji akcji)
  • CommandForm – integruje formularz bezpośrednio z akcją (wysyła komendę po submit)
  • FormBind – wiąże formularz z metadanymi i walidacją

Przykład prostego formularza opartego o definicję akcji:

<DefinedForm
  :definition="definition"
  v-model="editable"
  @submit="save"
/>

Widoki: ScrollLoader, VisibleArea, RangeViewer

Komponenty widoków są zintegrowane z DAO i RangeBuckets:

  • ScrollLoader – ładowanie kolejnych stron danych przy przewijaniu
  • VisibleArea – reagowanie na widoczność fragmentu DOM
  • RangeViewer – prezentacja danych podzielonych na zakresy

Użycie ScrollLoader w typowym widoku listy:

<scroll-loader :loadMore="loadMore" :canLoadMore="canLoadMore">
  <div v-for="item in items" :key="item.id">
    {{ item.name }}
  </div>
</scroll-loader>

Receptury z projektów

speed-dating – formularz edycji eventu

Plik front/src/pages/events/[event]/edit.vue pokazuje:

  • pobranie definicji modelu z vue3-ssr
  • użycie synchronized do auto-zapisu
  • AutoEditor z frontend-auto-form do generowania formularza na bazie modelu

speed-dating – wizytówka użytkownika

Plik front/src/components/profile/ProfileSettings.vue:

  • synchronized dla draftu wizytówki (draft service)
  • AutoField do mapowania właściwości modelu na pola formularza
  • integracja z PrimeVue i własnymi komponentami UI

family-tree – strefy ładowania i praca na danych

W family-tree komponenty z @live-change/vue3-components są użyte do:

  • synchronizacji identyfikacji użytkownika z analityką
  • emisji zdarzeń przez analytics.emit(...)

Te przykłady będą opisane szerzej w sekcji „receptur frontendu” w dokumentacji.