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

@weavix/tracker-core

v0.1.7

Published

Shared TypeScript types and bridge layer for Tracker plugins

Readme

@weavix/tracker-core

Shared TypeScript types and a low-level bridge layer for Tracker plugins — slot context types, a typed hostApi, and trigger handler registration.

This package is a base layer used by @weavix/tracker-plugin-sdk and @weavix/tracker-plugin-sdk-react, which re-export everything from this package. If you are building a Tracker plugin, install one of those instead — reach for @weavix/tracker-core directly only if you need the types without the rest of the SDK.

Installation

npm install @weavix/tracker-core @weavix/sdk-core

Quick start

import { hostApi } from '@weavix/tracker-core';
import type { SlotContextMap } from '@weavix/tracker-core';

hostApi.init({ autoResize: true });
await hostApi.notifyReady();

// Typed per slot — for 'issue.action' this resolves to `Issue`
const context = await hostApi.getContext();

Slot contexts

Tracker plugins render into predefined slots — places in the UI such as an issue's action panel, a queue tab, or the navigation menu. Each slot passes a different shape of context data to the plugin, described by SlotContextMap.

import type { SlotContextMap } from '@weavix/tracker-core';

type IssueActionContext = SlotContextMap['issue.action']; // Issue

| Slot | Context type | What it contains | |------|--------------|-------------------| | issue.action, drawer.issue.action, issue.block, drawer.issue.block, issue.tab, drawer.issue.tab, issue.editor.action | Issue | Full issue data | | issue.comment.action | IssueCommentActionSlotContext | The comment the action was triggered from, with its attachments | | queue.action, queue.tab | QueueSlotContext | Queue data | | project.action, project.block, project.tab, project.editor.action | ProjectSlotContext | Project data with progress and board id | | portfolio.action, portfolio.block, portfolio.tab, portfolio.editor.action | PortfolioSlotContext | Portfolio data with progress | | goal.action, goal.block, goal.tab, goal.editor.action | GoalSlotContext | Goal data with progress | | board.tab | BoardTabSlotContext | Board data, including the active sprint if any | | attachment.viewer.action | AttachmentViewerActionSlotContext | The attachment blob and its metadata | | trigger.create.action | TriggerCreateActionsSlotContext | The queue the trigger is being created for | | trigger.edit.action | TriggerEditActionsSlotContext | The queue and the current trigger settings | | navigation | Record<string, never> | No entity context |

TRACKER_SLOTS is the runtime list of slot names, kept in sync with SlotContextMap by a compile-time check; TrackerSlot is the corresponding union type.

import { TRACKER_SLOTS } from '@weavix/tracker-core';
import type { TrackerSlot } from '@weavix/tracker-core';

const isTrackerSlot = (slot: string): slot is TrackerSlot =>
  (TRACKER_SLOTS as readonly string[]).includes(slot);

hostApi

A Tracker-typed wrapper over hostApi from @weavix/sdk-core: getContext() and close() are typed per slot via SlotContextMap and PluginClosePayloadMap. Every other method — lifecycle, theme, language, external APIs — behaves exactly as in @weavix/sdk-core.

import { hostApi } from '@weavix/tracker-core';

hostApi.init({ autoResize: true });
await hostApi.notifyReady();

const theme = await hostApi.getTheme();      // 'light' | 'dark' | ...
const slot = hostApi.getSlot();               // current slot name
const context = await hostApi.getContext();   // SlotContextMap[slot]

await hostApi.close(); // payload type depends on the slot

Editor and viewer slots (issue.editor.action, goal.editor.action, project.editor.action, portfolio.editor.action, attachment.viewer.action) expect a specific payload on close(), describing what the user did in the editor; every other slot closes without a payload. PluginClosePayloadMap and ClosePluginPayload<TSlot> describe these per slot.

For toast notifications, confirmation dialogs, navigation, shared storage, and Tracker Public API calls, use @weavix/tracker-plugin-sdk (or @weavix/sdk-core directly) — this package only covers the Tracker-typed subset above.


Trigger action data

Plugins registered in the trigger.create.action / trigger.edit.action slots configure a webhook trigger and hand its settings back to the host through a getData handler.

import { setHandler } from '@weavix/tracker-core';
import type { TriggerActionData } from '@weavix/tracker-core';

const data: TriggerActionData = {
  url: 'https://example.com/webhook',
  authentication: { type: 'NO_AUTH' },
};

setHandler('getData', () => data);

TriggerActionData describes the webhook URL and its authentication (BasicWebhookAuthContext, OAuth2WebhookAuthContext, NoAuthWebhookAuthContext, and their Vault-backed variants). The host reads the registered handler with getHandler('getData').


Localized strings

Some Tracker fields (for example, custom field names) are returned as a LocalizedString — either a plain string or an object with per-language values. getLocalizedString resolves it for the current language:

import { getLocalizedString } from '@weavix/tracker-core';

const label = getLocalizedString({ ru: 'Задача', en: 'Issue' }, 'en'); // 'Issue'
const plain = getLocalizedString('plain string', 'en');                // 'plain string'

Types

Tracker domain types, re-exported from @weavix/tracker-api-types for convenience:

import type {
  Issue,
  Attachment,
  EntityLink,
  MetaEntityV2,
  Reference,
  UserReferenceV2,
  LocalizedString,
  ObjectId,
  VaultId,
  DateTime,
  Direction,
  Relationship,
  IssueLinkType,
  IssueLinkChainId,
  IssueIndexReference,
  WebhookAuthContext,
  BasicWebhookAuthContext,
  OAuth2WebhookAuthContext,
  NoAuthWebhookAuthContext,
  VaultBasicWebhookAuthContext,
  VaultOAuth2WebhookAuthContext,
  WebhookTriggerActionInput,
  TriggerActionInput,
} from '@weavix/tracker-core';

Slot, close-payload, and handler types:

import type {
  SlotContextMap,
  TrackerSlot,
  ClosePluginPayload,
  PluginClosePayloadMap,
  TriggerActionData,
  GetDataResultMap,
} from '@weavix/tracker-core';

Message, RequestMessage, TrackerContract, and BaseContract describe the low-level postMessage protocol between the host and the plugin iframe. Most plugins never need them directly — they exist for advanced, host-side integrations.


Related packages

| Package | Purpose | |---------|---------| | @weavix/tracker-plugin-sdk | Full Tracker plugin SDK: hostApi, trackerApi, uiApi, storageApi (recommended) | | @weavix/tracker-plugin-sdk-react | React integration: TrackerPluginProvider, hooks | | @weavix/tracker-api-plugin | Typed Tracker Public API client | | @weavix/tracker-api-types | Tracker Public API v3 OpenAPI types | | @weavix/sdk-core | Base plugin runtime |

License

SEE LICENSE IN LICENSE