Catalog npm
Back to packageRELEASE DETAILS

0.1.2

npm

@0disoft/banora-vue

Optional Vue 3 adapter for the Banora 0.1 SDK. Install with `npm install @0disoft/banora @0disoft/banora-vue`. Build locally with `bun run build:adapters` from the repository root.

Published14 Oct 2026
Direct dependencies2
Transitive dependenciesNot calculated

README

Current package documentation

Banora Vue

Optional Vue 3 adapter for the Banora 0.1 SDK. Install with npm install @0disoft/banora @0disoft/banora-vue. Build locally with bun run build:adapters from the repository root.

ControlledBoard accepts a required plain state and @intent (onIntent) instead of a record controller. The host owns rules/records and supplies accepted snapshots. Common display/input props update the surface; @view borrows it and receives null on unmount. See the host-controlled guide.

<script setup lang="ts">
import {shallowRef} from 'vue';
import {RecordController} from '@0disoft/banora';
import {Board, Viewer, useRecordState} from '@0disoft/banora-vue';
const controller = shallowRef(new RecordController({sgf: '(;SZ[9];B[aa])'}));
const state = useRecordState(controller);
</script>
<template>
  <p>Move {{ state.position.moveNumber }}</p>
  <Board :controller="controller" read-only />
  <Viewer :controller="controller" @state-change="snapshot => console.log(snapshot.dirty)" />
</template>

Board accepts SDK board options; Viewer accepts viewer options except initial sgf. Both emit stateChange(snapshot) and forward attributes to their container. useRecordState(controllerOrRefOrGetter) runs inside setup and returns a read-only snapshot ref. Ordinary Vue refs are also accepted: the adapter unwraps controller proxies before SDK calls. Prefer shallowRef for controller handles; if directly calling a controller kept in a deep ref, call toRaw(controller.value) first, because the controller uses JavaScript private fields.

Configuration updates retain the record; controller replacement remounts the view. Unmounting releases views/subscriptions and preserves host-owned controllers. Without a supplied controller each component owns its own record and disposes it on unmount. Dispose host controllers only after all their views are unmounted. The framework owns the container, the SDK its descendants. SSR emits only containers and state text, with no browser globals or board DOM; client mount creates the SVG. Supply matching record content for hydration. Board HTML hydration is deferred. See the repository's SDK API, compatibility document and Vue consumer example.

The view(viewOrNull) event supplies a borrowed BoardView/ViewerView for exportSvg(options) or asynchronous exportPng(options). Keep it in a shallow ref; null clears the handle on unmount/controller replacement. Use component props for configuration and let the component dispose its view. Images do not save the SGF record or clear dirty state.

Pass drawing: {color:'#206650',width:0.08} to Board (inside board for Viewer) to enable the shared freehand tool; null disables it. Immutable state includes strokes, with controller add/remove/clear, Undo and SGF export/reopen. Read-only views display saved ink, and diagrams include it. SGF uses the private BPN extension, which other viewers may not display.

Pass touch: {mode:'confirm',magnifier:true} to Board or nested board.touch to Viewer for magnified touch aiming and confirmation. Release mode places on lift; null restores direct activation. Pending targets stay in the view, can be refined with keyboard arrows, and are cancelled by configuration/context changes or unmount. Ink takes priority; read-only views do not enter touch aiming.

Compose two Board components with nodeId, compareTo and referenceGeneration (the snapshot's recordGeneration) for read-only side-by-side comparisons. Pins display their own node/path without navigating/editing the shared controller; missing/stale pins become unavailable and cannot export until restored/rebound. Viewer follows its cursor and accepts board.compareTo. The Vue example includes pinning, configuration updates, ownership and remounts using the public API.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 4

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
vue
Environment
{
  "local_name": "vue",
  "alias": false,
  "peer_metadata": null
}
3.xdevelopment
@0disoft/banora
Environment
{
  "local_name": "@0disoft/banora",
  "alias": false,
  "peer_metadata": null
}
0.1.2development
vue
Environment
{
  "local_name": "vue",
  "alias": false,
  "peer_metadata": null
}
3.xpeer
@0disoft/banora
Environment
{
  "local_name": "@0disoft/banora",
  "alias": false,
  "peer_metadata": null
}
>=0.1.0-dev.0 <0.2.0peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "c5b9c181f1bfaf5b6c1cf72fd831de5b78975e1d",
  "tarball": "https://registry.npmjs.org/@0disoft/banora-vue/-/banora-vue-0.1.2.tgz",
  "fileCount": 6,
  "integrity": "sha512-3QSRXeEhomevZtfNACUX9A1sQhV1AU6jtKb56N4N8qox+NeSv6HoXOZObowwn+Z9D6Xnne+hmVMQ3Boj7GBelg==",
  "signatures": [
    {
      "sig": "MEUCICzD2bBpGKAlzMlB711skwmjuNQympCqu3+aakxswzxdAiEA9WfysVa+Nwtfo3jfCh0lIdFFkWgVDou6pOHtbPSuzHk=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    },
    {
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
      "sig": "MEYCIQCHiyfM+iD20UqqmJG988Xew2hEh3249Ly9AtAgnQZumAIhAJCuf0xRiT+BDcsLpSXNimU8IdYvyN4rkn7At3IolpYQ"
    }
  ],
  "attestations": {
    "url": "https://registry.npmjs.org/-/npm/v1/attestations/@0disoft%2fbanora-vue@0.1.2",
    "provenance": {
      "predicateType": "https://slsa.dev/provenance/v1"
    }
  },
  "unpackedSize": 24573
}

Repository

ACCESSIBLE
0disoft/banora

Shared repository data · GitHub

License detected in repository
MIT
License branch / ref
main
Last push
14 Oct 2026
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

0count
Gauge · observed snapshots21 Oct 2026
10.50
2026-10-21: 0 · observed 2026-10-21T15:06:55.9202097Z
21 Oct21 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2102026-10-21T15:06:55.9202097Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:07 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:586b3ce2e3576bd408c1c4bdae7f82a006bad4b24c064fdade8ec114d0e07a7d

Other collected versions

0.1.113 Oct0.1.012 Oct0.1.0-dev.112 Oct0.1.0-dev.012 Oct0.0.0-stage12 OctView all collected versions →