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

@jotx-labs/language

v2.4.130

Published

jotx language support - Syntax highlighting and diagnostics for VS Code and Monaco

Readme

@jotx-labs/language

Platform-agnostic language support for jotx files (.jot, .meet).

Provides syntax highlighting and diagnostics for both VS Code and Monaco Editor (web).


Features

Syntax Highlighting (TextMate grammar - works in VS Code & Monaco) ✅ Real-time Diagnostics (validation with red squiggles) ✅ Platform-agnostic (core logic works anywhere) ✅ VS Code integration (ready to use) ✅ Monaco integration (for web apps)


Installation

npm install @jotx-labs/language

Usage

For VS Code Extension

import * as vscode from 'vscode'
import { setupJotxLanguageForVSCode } from '@jotx-labs/language'

export function activate(context: vscode.ExtensionContext) {
  // Setup jotx language support (syntax + diagnostics)
  const languageProvider = setupJotxLanguageForVSCode(vscode, context)
  
  // Language support is now active!
  // Users will see:
  // - Syntax highlighting
  // - Real-time validation with red squiggles
  // - Error messages on hover
}

For Monaco Editor (Web)

import * as monaco from 'monaco-editor'
import { setupJotxLanguageForMonaco } from '@jotx-labs/language'

// Setup jotx language
const languageProvider = setupJotxLanguageForMonaco(monaco)

// Create editor
const editor = monaco.editor.create(document.getElementById('editor'), {
  value: 'hdef jot my_doc\n  title "Hello"',
  language: 'jotx',
  theme: 'vs-dark'
})

// Validate on change
editor.onDidChangeModelContent(() => {
  const model = editor.getModel()
  if (model) {
    const text = model.getValue()
    const markers = languageProvider.validate(text)
    monaco.editor.setModelMarkers(model, 'jotx', markers)
  }
})

Platform-agnostic Validation

import { DiagnosticProvider } from '@jotx-labs/language'

const provider = new DiagnosticProvider()

const text = `
hdef jot my_doc
  title "Test"
  
  def heading1 block_1
    text """Hello World"""
`

const result = provider.validate(text)

console.log('Valid:', result.isValid)
console.log('Errors:', result.diagnostics)

Architecture

@jotx/language
├── Diagnostics (Core)          Platform-agnostic validation
├── VS Code Integration         Diagnostic provider for VS Code
├── Monaco Integration          Language provider for Monaco
└── Grammar (TextMate)          Syntax highlighting (both)

Benefits:

  • ✅ Write validation logic once, use everywhere
  • ✅ Same syntax highlighting in VS Code and web
  • ✅ Easy to add support for other editors (Vim, Emacs, etc.)

API

DiagnosticProvider (Core)

class DiagnosticProvider {
  validate(text: string): DiagnosticResult
  isValid(text: string): boolean
  getErrors(text: string): JotxDiagnostic[]
  getWarnings(text: string): JotxDiagnostic[]
}

VSCodeLanguageProvider

class VSCodeLanguageProvider {
  register(context: ExtensionContext): void
  validateDocument(document: TextDocument): Diagnostic[]
  clear(): void
  dispose(): void
}

MonacoLanguageProvider

class MonacoLanguageProvider {
  register(): void
  validate(text: string): any[]  // Monaco markers
}

Supported Block Types

Syntax highlighting for all 21 jotx block types:

Document Types: jot, meeting, tasklist, journal Text Blocks: heading1-3, paragraph, quote Code/Media: code, math, image Containers: callout, toggle Lists: list, checklist Data: table, properties Separators: divider, link, attach Interactive: mermaid, chart, datetime, linkCard Custom: custom


Diagnostics

Real-time validation catches:

Errors:

  • Invalid block types
  • Missing required properties
  • Syntax errors
  • Parse failures

⚠️ Warnings:

  • Deprecated syntax
  • Unused properties

ℹ️ Info:

  • Style suggestions
  • Formatting hints

Development

# Build
npm run build

# Test
npm test

# Clean
npm run clean

License

MIT