Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

courthive-components

Latest version: v7.22.2

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: courthive
4 Stars
2 Forks
82 Versions
9.4K Downloads
TypeScript Repo language

Scan summary

courthive-components was last scanned on 23 Nov 2026 at version 7.22.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 82 versions; the latest 5 were published within 4 days (20–23 Nov 2026).
  • Findings: 1 rule fired in version 7.22.2 (1 medium). The score describes this version only.
  • Downloads: 9,432 downloads.

Versions

82 versions published
Versions and the rules that fired in each
VersionPublishedStatus
7.22.2 LATEST 23 Nov 2026 1 rule fired
7.22.1 23 Nov 2026 1 rule fired
7.22.0 22 Nov 2026 1 rule fired
7.21.1 21 Nov 2026 Not shown
7.21.0 20 Nov 2026 Not shown

Rules fired in 7.22.2: 1

Findings

1 Medium

Findings for v7.22.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

Function reached through a chain of indirect calls

The code obtains a function through a computed property lookup whose key is not a plain literal, calls it, and then calls the value it returns. Obfuscated loaders use this double indirection to reach the Function constructor without its name appearing in the source. This is a code shape, not evidence of intent, and is shown to help review obfuscated code.

MEDIUM
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

The score describes 7.22.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

courthive-components

Documentation & Storybook

Browse interactive examples, component APIs and integration guides.

Framework-independent TypeScript UI components for tournament management and competition displays.

Storybook npm version License: MIT

Overview

This library provides the UI components of the CourtHive competition management platform. Components are framework-agnostic (vanilla TypeScript) and render CODES records — CourtHive's canonical competition data standard, a superset of the ITF's TODS — as produced by the Competition Factory engine.

Used by:

Installation

Requires Node.js 24 or later (engines.node is >=24; 22 is maintenance-only, end of life April 2027).

pnpm add courthive-components

(External consumers may also use npm install courthive-components or yarn add courthive-components. Inside the CourtHive monorepo, pnpm is the only supported manager.)

Feature imports

SVG-only consumers such as a marketing hero can import from courthive-components/courts. The segmented bar is also available from courthive-components/segmented-bar. These additive ESM entries avoid loading the root editor, scoring and engine dependencies. Import courthive-components/features.css for their styles; it contains the small court/bar stylesheets. The existing root export and dist/courthive-components.css remain supported with their existing cascade. Run pnpm build && pnpm verify:consumer-bundle to check consumer JS and feature CSS budgets. Update a budget deliberately with pnpm verify:consumer-bundle --update-baseline after reviewing the measurements.

Quick Start

import { renderMatchUp, openScoreEntryDialog, compositions } from 'courthive-components';

// Render a match display
const matchUpElement = renderMatchUp({
  matchUp: myMatchUpData,
  composition: compositions.Australian
});
document.getElementById('container').appendChild(matchUpElement);

// Open the score entry dialog
openScoreEntryDialog({
  matchUp: myMatchUpData,
  sides: [{ participantName: 'Ann' }, { participantName: 'Bea' }],
  onSubmit: ({ outcome }) => {
    console.log('Engine-ready outcome:', outcome);
  }
});

Components

Display Components
renderMatchUp

Display a single match with scores, participants, and status indicators.

import { renderMatchUp, compositions } from 'courthive-components';

const element = renderMatchUp({
  matchUp: matchUpData,
  composition: compositions.Wimbledon,
  isLucky: false
});
renderStructure

Display a complete draw structure (bracket, round robin, etc.).

import { renderStructure, compositions } from 'courthive-components';

const element = renderStructure({
  matchUps: drawMatchUps,
  composition: compositions.Basic
});
renderRound

Display a single round of matches within a structure.

import { renderRound } from 'courthive-components';

const element = renderRound({
  matchUps: roundMatchUps,
  roundNumber: 1
});
renderParticipant

Display participant information (name, rating, country, etc.).

import { renderParticipant } from 'courthive-components';

const element = renderParticipant({
  participant: participantData
});
renderRoundHeader

Display round headers for draw structures.

import { renderRoundHeader } from 'courthive-components';

const element = renderRoundHeader({
  roundName: 'Quarterfinals',
  roundNumber: 3
});
renderContainer

Wrapper component for draw containers with scrolling and layout.

Input Components
renderParticipantInput

Autocomplete input for participant selection.

import { renderParticipantInput } from 'courthive-components';

const input = renderParticipantInput({
  matchUp: matchUpData,
  side: matchUpData.sides[0],
  composition: { configuration: { participantProvider: () => participantsList } },
  eventHandlers: { assignParticipant: ({ participant }) => console.log('Selected:', participant) }
});
Modal Components
cModal

Base modal system with flexible configuration.

import { cModal } from 'courthive-components';

cModal.open({
  title: 'Confirm Action',
  content: 'Are you sure?',
  buttons: [
    { label: 'Cancel', close: true },
    { label: 'Confirm', onClick: handleConfirm, close: true }
  ]
});
openScoreEntryDialog

Score entry in a modal: three interchangeable approaches over one card, a live format picker, irregular endings with their policy reason codes, and reopening a recorded outcome.

import { openScoreEntryDialog } from 'courthive-components';

openScoreEntryDialog({
  matchUp, // prefills a recorded outcome: matchUp.score.sets, matchUpStatus, winningSide
  sides: [{ participantName: 'Ann', seed: '1' }, { participantName: 'Bea' }],
  approach: 'dynamicSets', // 'dynamicSets' | 'freeScore' | 'dialPad'; the operator can switch in the dialog
  statusCodeGroups, // the scoring policy's matchUpStatusCodes; omit and no reason chips are drawn
  clearable: true, // false when a later match depends on the result, so an empty submit is refused
  disabledMatchUpStatuses: [], // statuses the engine's SCORE action refuses for this matchUp
  onApproachChange: (approach) => savePreference(approach),
  onSubmit: ({ outcome, sets }) => {
    // outcome is engine-ready: hand it to setMatchUpStatus as is
  }
});

Scoring Approaches:

  • dynamicSets - Set-by-set entry with real-time validation
  • freeScore - Flexible text-based entry (e.g., "6-4 6-3")
  • dialPad - Touch-friendly numeric keypad
getMatchUpFormatModal

Interactive modal for selecting/editing match formats.

import { getMatchUpFormatModal } from 'courthive-components';

getMatchUpFormatModal({
  existingMatchUpFormat: 'SET3-S:6/TB7',
  callback: (newFormat) => {
    console.log('Format:', newFormat);
  }
});
Form Components
renderForm

Render dynamic forms from configuration.

import { renderForm } from 'courthive-components';

const inputs = renderForm(container, [
  { field: 'name', label: 'Name', type: 'text' },
  { field: 'age', label: 'Age', type: 'number' }
]);
renderField

Render individual form fields.

renderButtons

Render button groups with consistent styling.

renderMenu

Render dropdown/context menus.

validator

Form validation utilities.

UI Components
drawer

Slide-out drawer component for side panels.

import { drawer, initDrawer } from 'courthive-components';

initDrawer(); // Initialize once

drawer.open({
  title: 'Details',
  content: myContent,
  side: 'right' // 'left' | 'right'
});
tipster

Tooltip/popover system using Tippy.js.

import { tipster } from 'courthive-components';

tipster({
  target: buttonElement,
  content: 'Click to edit',
  placement: 'top'
});
Compositions

Pre-configured visual themes matching Grand Slam tournaments:

import { compositions } from 'courthive-components';

// Available compositions:
compositions.Australian; // Australian Open colors
compositions.French; // Roland Garros colors
compositions.Wimbledon; // Wimbledon colors
compositions['US Open']; // US Open colors

See the composition options reference for serving indicators, header/footer visibility, theme inheritance and editor behavior.

Constants
MATCH_FORMATS

Pre-defined match format codes.

import { MATCH_FORMATS } from 'courthive-components';

console.log(MATCH_FORMATS.SET3_S6_TB7);
// 'SET3-S:6/TB7'
Utilities
courthiveComponentsVersion

Get the current package version.

import { courthiveComponentsVersion } from 'courthive-components';

console.log(courthiveComponentsVersion());

Documentation

📚 Interactive Documentation: Storybook

The Storybook includes:

  • Live component demos
  • Interactive examples
  • Configuration options
  • Usage patterns
  • Integration guides

Styling

Import the bundled CSS:

import 'courthive-components/dist/courthive-components.css';
Theme tokens — two families, on purpose

Colour is driven entirely by CSS custom properties defined in src/styles/theme.css, in a :root block (light) and a [data-theme='dark'] block. Never hardcode a colour in component CSS, and never use Bulma classes or --bulma-*: class names that merely follow Bulma's naming are ours and are fine, but the palette must resolve through a token or it cannot follow the theme.

family what it is use it for
--chc-* The general design system. Semantic roles — --chc-text-primary, --chc-bg-elevated, --chc-border-primary, --chc-container-* intents and their --chc-on-* foregrounds. Anything shared: draws, cards, tables, buttons, notifications.
--sp-* A slate palette with translucent, layered surfaces (--sp-panel-bg, --sp-card-bg, --sp-border) plus finer border and status intensities. The schedule page, scheduling profile, policy catalog, topology builder and interactive scoring — surfaces designed as panels over a ground.

They are not duplicates. --chc-* began as a compatibility layer whose light values match previously hardcoded ones; --sp-* is a newer, denser palette with alpha-composited surfaces --chc-* has no equivalent for. Consumers bridge both: TMX aliases 29 --chc-* and 13 --sp-* to its own --tmx-* system.

Rules that keep them working:

  • Every token must be defined in theme.css, in both blocks. A token used but never defined renders its call-site fallback in both themes — which is how --sp-border-focus shipped an invisible focus border.
  • Do not write a fallback. var(--sp-muted), never var(--sp-muted, #888). Fallbacks drift from the definition — --sp-muted once had five different ones — and the token stops being a single source of truth.
  • The library must not reference a consumer's tokens. --tmx-* belongs to TMX; reaching for it from here inverts the dependency.
  • --chc-on-* is the readable foreground for a --chc-container-* fill. Both themes are held to WCAG AA by src/styles/theme-contrast.test.ts; change a container colour and that test tells you whether its foreground still works.
  • Brand themes (src/styles/themes.css, .chc-theme-*) keep literal colours. A brand does not follow the light/dark theme.

TypeScript Support

The package includes TypeScript definitions:

import { openScoreEntryDialog } from 'courthive-components';
import type { ScoreEntryDialogParams } from 'courthive-components';

const params: ScoreEntryDialogParams = {
  matchUp: myMatchUp,
  sides: [{ participantName: 'Ann' }, { participantName: 'Bea' }],
  onSubmit: ({ winningSide, outcome }) => {
    console.log('Winner:', winningSide, 'engine outcome:', outcome);
  }
};
openScoreEntryDialog(params);

Integration with Competition Factory

Components read the CODES records that tods-competition-factory produces:

import { tournamentEngine } from 'tods-competition-factory';
import { renderMatchUp, openScoreEntryDialog } from 'courthive-components';

// Get match data from factory
const { matchUp } = tournamentEngine.findMatchUp({ matchUpId });

// Render with components
const display = renderMatchUp({ matchUp });

// Score with the dialog; its outcome is already the shape setMatchUpStatus reads
openScoreEntryDialog({
  matchUp,
  sides: matchUp.sides.map((side) => ({ participantName: side.participant?.participantName ?? '' })),
  onSubmit: ({ outcome }) => {
    tournamentEngine.setMatchUpStatus({ matchUpId, drawId: matchUp.drawId, outcome });
  }
});

Development

# Install dependencies
pnpm install

# Start Storybook
pnpm storybook

# Build library
pnpm build

# Run tests
pnpm test

# Build Storybook for deployment
pnpm build-storybook
Publishing documentation

Every stable GitHub release builds Storybook from its release tag before publishing the npm package. After npm publication succeeds, the release workflow publishes that same Storybook artifact to GitHub Pages. Prereleases leave the stable documentation in place. The site's release.json records its package version, tag and source commit.

The workflow uses the existing Release Bot App to push gh-pages, so GitHub starts the Pages build. Publishing is serialized, and older release runs cannot replace the latest release's documentation. PR CI also builds the production Storybook to catch documentation build failures before release.

To refresh the latest stable release's documentation without publishing npm again, run Publish package and Storybook from the Actions tab with its existing release tag and storybook_only checked:

gh workflow run npm-publish.yml --ref main -f tag=v7.8.0 -F storybook_only=true

Replace v7.8.0 with the latest stable release tag. If only the documentation publishing job failed, rerun that failed job. A dev-to-main checkpoint updates the release PR; merging the release PR publishes the release and starts the package/documentation workflow.

Contributing

Contributions are welcome! This library is actively used in production tournament management applications. Branch from dev and open pull requests against dev; main advances at release checkpoints.

Guidelines
  • Maintain framework-agnostic vanilla TypeScript
  • Follow existing component patterns
  • Add Storybook stories for new components
  • Include TypeScript types
  • Test with Competition Factory integration

License

MIT — see LICENSE.

Links

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm courthive-components

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

Frame 2085668439 (1)
Group 1261154229