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

@se-studio/core-data-types

v1.0.55

Published

Core TypeScript type definitions for SE Studio content models

Readme

@se-studio/core-data-types

Core TypeScript type definitions for SE Studio content models and shared types across the monorepo.

Installation

# pnpm
pnpm add @se-studio/core-data-types

# npm
npm install @se-studio/core-data-types

# yarn
yarn add @se-studio/core-data-types

Usage

import type { IPage, ISeoMetadata, IAsset, DeepPartial } from '@se-studio/core-data-types';

// Use the page interface
const page: IPage = {
  id: 'page-123',
  slug: 'about-us',
  title: 'About Us',
  seo: {
    title: 'About Us - SE Studio',
    description: 'Learn more about SE Studio',
  },
};

// Use utility types
type PartialPage = DeepPartial<IPage>;

API Reference

Content Model Types

Pages

  • IBasePage - Base interface for page content models

    • Extends IBaseModel with page-specific properties
    • type: 'Page' - Content type discriminator
    • isHomePage: boolean - Whether this is the home page
    • contents?: ReadonlyArray<ITyped> - Page content sections
    • tags?: ReadonlyArray<IInternalLink> - Tags associated with the page
    • structuredData?: ReadonlyArray<unknown> - Optional structured data
  • PageLink - Page link type (metadata without full content)

Articles

  • IBaseArticle - Base interface for article content models

    • type: 'Article' - Content type discriminator
    • articleType?: IInternalLink - Link to the article type
    • contents?: ReadonlyArray<ITyped> - Article content sections
    • tags?: ReadonlyArray<IInternalLink> - Tags associated with the article
  • IBaseArticleType - Base interface for article type content models

    • type: 'Article type' - Content type discriminator
    • indexPageContent?: ReadonlyArray<ITyped> - Content for index page
    • searchPageContent?: ReadonlyArray<ITyped> - Content for search page

Components & Collections

  • IBaseComponent - Base interface for component content models
  • IBaseCollection - Base interface for collection content models
  • IBaseExternalComponent - Base interface for external component models

Visual/Asset Types

  • IVisual - Union type for visual content (Image | Video | Animation)
  • IImage - Image types (Picture | SvgImage | SvgData)
  • IVideo - Video content type
  • IAnimation - Animation/Lottie content type
  • IResponsiveVisual - Responsive visual with breakpoint configuration

Link Types

  • ILinkProps - Base link properties
  • IInternalLink - Internal link to CMS content
  • IExternalLink - External link
  • IDownloadLink - Download link
  • IBlankLink - Blank link (no href)

Context Types

  • IPageContext - Page context with links to related content
  • IContentContext - Content context for component rendering
  • IAnalyticsContext - Analytics context for tracking

Type Guard Functions

  • isPage(content) - Check if content is a page
  • isArticle(content) - Check if content is an article
  • isArticleType(content) - Check if content is an article type
  • isComponent(content) - Check if content is a component
  • isCollection(content) - Check if content is a collection
  • isInternalLink(link) - Check if link is internal
  • isExternalLink(link) - Check if link is external
  • isDownloadLink(link) - Check if link is a download link
  • isImage(visual) - Check if visual is an image
  • isVideo(visual) - Check if visual is a video
  • isAnimation(visual) - Check if visual is an animation

Utility Types

  • DeepPartial<T> - Makes all nested properties optional (recursive)
  • Prettify<T> - Improves type readability in IDE tooltips

For detailed JSDoc documentation on all types and functions, see the TypeScript declaration files (.d.ts) in the package.

Development

This package is part of the SE Studio monorepo. To work on this package:

# Install dependencies
pnpm install

# Build the package
pnpm build

# Run tests
pnpm test

# Type check
pnpm type-check

# Run linting
pnpm lint

Extending Types

These types serve as a foundation and should be extended based on your actual Contentful content model:

import type { IPage } from '@se-studio/core-data-types';

// Extend the base page type with your custom fields
interface ICustomPage extends IPage {
  hero: {
    title: string;
    image: IAsset;
  };
  content: RichTextContent;
}

Future Additions

This package currently contains placeholder types. As the content model evolves, additional types will be added for:

  • Component types (Hero, CTA, etc.)
  • Rich text content structures
  • Navigation structures
  • Blog/Article types
  • And more...

License

MIT

Repository

https://github.com/Something-Else-Studio/se-core-product