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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@circlesquare/embedding-next

v1.0.1

Published

Next.js components for embedding your CircleSquare events and court availability

Readme

@circlesquare/embedding-next

Next.js components for embedding your clubs events and court availability.

Installation

npm install @circlesquare/embedding-next
# or
yarn add @circlesquare/embedding-next

Usage

All components must be used in client components. Add 'use client' at the top of your file.

Config Provider (Optional)

'use client'
import { CircleSquareEmbeddingConfigProvider } from '@circlesquare/embedding-next'

export default function RootLayout({ children }) {
  return (
    <CircleSquareEmbeddingConfigProvider
      merchantId="your-merchant-id"
      backgroundColor="#FFFFFF"
      language="en"
    >
      <>{children}</>
    </CircleSquareEmbeddingConfigProvider>
  )
}

Note: When using React 19 wrapping children with <></> might be required

Provider Config

  • merchantId (required): Your CircleSquare merchant ID
  • backgroundColor (optional): Background color for the embedded content
  • language (optional): Language of the embedded content (en / de). Will otherwise be selected automatically.

Events Component

'use client'
import { CSEvents, CsEventType } from "@circlesquare/embedding-next";

export default function EventsPage() {
  return (
    <div>
      <h1>Events</h1>
      <CSEvents
        merchantId="your-merchant-id"
        eventTypes={[CsEventType.OpenPlay, CsEventType.Training]}
        backgroundColor="#F5F5F5"
      />
    </div>
  )
}

CSEvents Config

  • merchantId (optional if in provider): Your CircleSquare merchant ID
  • hostId (optional): Filter events by host ID
  • backgroundColor (optional): Background color for the embedded content
  • language (optional): Language of the embedded content (en / de). Will otherwise be selected automatically.
  • eventTypes (optional): Array of event types to filter
    • OpenPlay
    • Training
    • Other
    • League
    • Americano
    • AmericanoTournament
    • KnockOutTournament
    • RoundRobinTournament
  • className (optional): Additional CSS class for the container
  • fallback (optional): A component to display in case the embedding iframe can not be loaded or displayed. If not provided, the default component will be used.
  • timeoutMs (optional): Time after which the fallback component is displayed. Defaults to 3000 (3 seconds)

Court Availability Component

'use client'
import { CSCourtAvailability } from '@circlesquare/embedding-next'

export default function CourtsPage() {
  return (
    <div>
      <h1>Court Availability</h1>
      <CSCourtAvailability
        merchantId="your-merchant-id"
        backgroundColor="#F5F5F5"
      />
    </div>
  )
}

CSCourtAvailability Config

  • merchantId (optional if in provider): Your CircleSquare merchant ID
  • language (optional): Language of the embedded content (en / de). Will otherwise be selected automatically.
  • backgroundColor (optional): Background color for the embedded content
  • className (optional): Additional CSS class for the container
  • fallback (optional): A component to display in case the embedding iframe can not be loaded or displayed. If not provided, the default component will be used.
  • timeoutMs (optional): Time after which the fallback component is displayed. Defaults to 3000 (3 seconds)