github seek-oss/playroom v1.2.0

9 hours ago

Minor Changes

  • #479 6cc66fd Thanks @michaeltaranto! - frameSettings: Add support to custom frame props

    Add frameSettings config option to enable per-frame toggleable settings.
    Allows playroom owners to define boolean controls (e.g., RTL layout, debugging touch targets, etc) that users can independently toggle for each frame, with values passed to the custom FrameComponent for conditional rendering.

    Example Usage

    // playroom.config.js
    export default {
      ...,
      frameSettings: [
        { id: 'rtl', label: 'RTL Layout', defaultValue: false }
      ],
    };
    
    // FrameComponent.tsx
    export default ({ frameSettings, children }) => (
      <ThemeProvider rtl={frameSettings?.rtl}>{children}</ThemeProvider>
    );

Patch Changes

  • #479 6cc66fd Thanks @michaeltaranto! - types: Update PlayroomConfig and make available to consumers

    Enable type-safe configuration files by exporting PlayroomConfig type.

    // playroom.config.ts
    import type { PlayroomConfig } from 'playroom';
    
    export default {
      ...
    } satisfies PlayroomConfig;

Don't miss a new playroom release

NewReleases is sending notifications on new releases.