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

@yanzongzhen/openmaic-courseware-react

v0.1.4

Published

React renderer package for OpenMAIC courseware.

Readme

@yanzongzhen/openmaic-courseware-react

React integration package for rendering OpenMAIC courseware with the embeddable OpenMAIC StageCore: scene rendering, navigation, media playback, fullscreen presentation, and generated-agent hydration without the OpenMAIC page shell, editor, whiteboard, or AI workspace.

Install

npm install @yanzongzhen/openmaic-courseware-react
import '@yanzongzhen/openmaic-courseware-react/styles.css';
import { OpenMAICCourseware } from '@yanzongzhen/openmaic-courseware-react';

Functional Entrypoints

The package is split by renderer capability:

import { OpenMAICCourseware } from '@yanzongzhen/openmaic-courseware-react';
import { OpenMAICCourseware as OpenMAICCoursewareCore } from '@yanzongzhen/openmaic-courseware-react/core';
import { CoursewareRenderer, StageCore, SceneRendererCore } from '@yanzongzhen/openmaic-courseware-react/stage';
import { SlideRenderer } from '@yanzongzhen/openmaic-courseware-react/slide';
import { QuizView, QuizRenderer } from '@yanzongzhen/openmaic-courseware-react/quiz';
import { InteractiveRenderer } from '@yanzongzhen/openmaic-courseware-react/interactive';
import { PBLFallbackRenderer } from '@yanzongzhen/openmaic-courseware-react/pbl';
  • Root / core: recommended external integration surface.
  • stage: lower-level stage and scene rendering primitives.
  • slide, quiz, interactive: scene-type modules for hosts that compose their own shell. slide exports a read-only viewer runtime, not the OpenMAIC slide editor. Chart, LaTeX, and table rendering are split into lazy chunks so ordinary slide playback does not eagerly load richer element renderers such as ECharts. quiz exports a lightweight viewer with local choice grading; it does not call OpenMAIC AI grading APIs or include speech input. interactive renders iframe-based widgets, including visualization3d Three.js HTML generated by OpenMAIC.
  • pbl: lightweight fallback contract only. Full OpenMAIC PBL AI workspace/chat is intentionally not bundled into the npm renderer.

Component mode: direct data

Use this mode when your backend proxies OpenMAIC data and the browser should not call OpenMAIC directly.

<OpenMAICCourseware classroom={classroom} height="100vh" />

Component mode: remote data

Use this mode when the browser can call OpenMAIC APIs.

<OpenMAICCourseware
  baseUrl="https://openmaic.example.com"
  classroomId="courseware001"
  apiKey="optional-service-api-key"
  height="100vh"
  initialSceneId="scene-2"
  showToolbar
  readonly
  theme="system"
  onSceneChange={(scene) => console.log(scene.id)}
  onComplete={() => console.log('complete')}
/>

For public websites, prefer backend proxy + direct data mode so service API keys stay server-side.

iframe fallback

<OpenMAICCourseware
  renderUrl="https://openmaic.example.com/embed/classroom/courseware001"
  height="100vh"
/>

The package defaults to component rendering. renderUrl is only for compatibility when a host application prefers iframe isolation.

Props

type OpenMAICCoursewareProps = {
  baseUrl?: string;
  apiKey?: string;
  classroomId?: string;
  classroom?: OpenMAICClassroomData;
  renderUrl?: string;
  height?: number | string;
  initialSceneId?: string;
  showToolbar?: boolean;
  readonly?: boolean;
  theme?: 'light' | 'dark' | 'system';
  className?: string;
  loadingFallback?: React.ReactNode;
  errorFallback?: (error: Error) => React.ReactNode;
  pblFallback?: React.ReactNode | ((scene: OpenMAICScene) => React.ReactNode);
  onReady?: (classroom: OpenMAICClassroomData) => void;
  onError?: (error: Error) => void;
  onSceneChange?: (scene: OpenMAICScene) => void;
  onComplete?: () => void;
};

The package uses the lightweight courseware runtime by default. PBL scenes do not pull in OpenMAIC's AI workspace/chat renderer; pass pblFallback to show a host-specific placeholder or action for those scenes. The default runtime also excludes OpenMAIC's slide editor, whiteboard, AI quiz grading, speech input, and media generation retry controls. Slide chart, LaTeX, and table elements remain supported through on-demand chunks. 3D scenes are supported through interactive visualization3d iframes; Three.js is not bundled into the default React runtime.

Package Check

pnpm --filter @yanzongzhen/openmaic-courseware-react build
pnpm --filter @yanzongzhen/openmaic-courseware-react check-package

check-package verifies the dist size budget and scans entries/chunks for accidental inclusion of PBL/AI-heavy, editor, AI quiz grading, speech, animation, OSS, or server runtime markers. It also keeps the default slide runtime under budget and prevents ECharts from re-entering SlideViewerCore.