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

@contfu/core

v0.5.2

Published

Shared types, constants, query helpers, and rich-content utilities used across Contfu packages.

Readme

@contfu/core

Shared types, constants, query helpers, and rich-content utilities used across Contfu packages.

This package is a safe dependency for both browser and server environments. Import from the package root:

import { PropertyType, IntegrationType, renderBlocksMarkdown } from "@contfu/core";

Public exports

  • basic-auth — HTTP Basic auth helpers (BasicAuthConfig, buildBasicAuthHeader, checkBasicAuth, unauthorizedBasicAuthResponse).
  • blocks — rich-content block and inline tuple types (Block, BuiltInBlock, Component, Inline, ParagraphBlock, ImageBlock, etc.) plus type guards and text helpers.
  • collections — public collection shapes (Collection, CollectionIcon).
  • colors — native Color type and conversion helpers for 0xRRGGBBAA.
  • commands — connector command types (CommandType, Command, ConnectCommand, AckCommand).
  • enums — enum helper utilities (defineEnum, defineStringEnum, EnumValue).
  • events — sync event constants and payload types (EventType, ClientEventType, ItemEvent, SyncEvent).
  • filter-helpers — query filter builders (eq, ne, gt, and, or, contains, linksTo, linkedFrom) plus nested relation query builders (all, oneOf) and field-ref helpers (createItemRef, system field helpers, etc.).
  • i18n — BCP 47 locale lists, localization config types, locale canonicalization, map normalization, and locale resolution helpers.
  • integrations — integration types and capability helpers (IntegrationType, IntegrationRole, IntegrationCapability, SyncMode, integrationSupportsContentProvide, etc.).
  • items — item payload types (Item, PageProps).
  • markdown — rich-content Markdown renderers (renderBlockMarkdown, renderBlocksMarkdown, renderInlineMarkdown, custom renderer option types).
  • mime — MIME type lookup table (mimeTypes).
  • objects — structural object equality helper (isObjectEqual).
  • query-types — query option/result helper types plus normalizeQueryArgs, resolveQueryFilter, and QueryResultArray.
  • render — rich-content HTML renderers (renderBlock, renderBlocks, renderInline, buildFileUrl, custom renderer option types).
  • schemas — schema contracts and type generation (PropertyType, CollectionSchema, ComponentSchema, RefTargets, schemaType, schemaEnumValues, generateTypeScript, generateApplicationIntegrationTypes).
  • time — duration constants (SECONDS, MINUTES, HOURS, DAYS).
  • wire — compact sync wire protocol tuples and patch helpers (WireEvent, WireItem, WireItemPatch, diffWireItemPatch, materializeWireItemPatch, BatchEffectType).

Native Color values

PropertyType.COLOR fields are stored as a single unsigned 32-bit number in canonical 0xRRGGBBAA order: red in the most significant byte, alpha in the least significant byte.

Use Color for generated TypeScript fields and the helpers in colors to convert at application boundaries:

  • colorFromRgba(r, g, b, a = 255) / colorToRgba(color)
  • colorFromHex("#RRGGBB" | "#RRGGBBAA") / colorToHex(color)
  • colorToCss(color) for CSS-compatible #RRGGBBAA
  • asColor(value) / isColor(value) for validating existing numeric values