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

@combos-fun/plugin-renderer-text

v0.1.20

Published

Text rendering

Readme

@combos-fun/plugin-renderer-text

@combos-fun/plugin-renderer-text — part of the Combos Fun engine monorepo.

Keywords: text, label, font, string, 2d.

Documentation

  • Per-package agent / developer notes: agent-skill.md
  • Machine-readable manifest: combos-plugin.json (validated against schemas/combos-plugin.schema.json in the repo root)
  • Entry skill (single source of truth for AI agents working with this monorepo): skills/combos-engine-development/SKILL.md

When consumed from npm, the manifest and agent notes are exposed as stable subpaths:

import manifest from '@combos-fun/plugin-renderer-text/plugin-manifest';
// or fetch the markdown directly:
// require.resolve('@combos-fun/plugin-renderer-text/agent-skill')

Host-driven i18n

Configure the source locale on the text system. Locale names use BCP 47 tags.

const textSystem = new TextSystem({
  sourceLocale: 'zh-CN',
  sourceTexts: [
    '{player} 获得了 {score} 分',
    '开始游戏',
    '下一屏文案',
  ],
});

Text uses its source template as the translation lookup key. Named replacements keep dynamic values independent from translated word order.

new Text({
  text: '{player} 获得了 {score} 分',
  replacements: {
    player: 'Alice',
    score: 100,
  },
});

The host injects window.combos into the game HTML head. The first requestI18n runs in beforeReady and holds combos-game:ready / start until the host replies. Labels stay empty until that reply so source copy does not paint first. Put every later-screen template in sourceTexts so those screens reuse the startup catalog instead of flashing source text. The system keeps one growing session catalog of source templates and translations; later requestI18n calls only send templates still missing from that catalog. If the host returns needed: true but a template is missing from translations, the system sends only the still-untranslated texts and waits for one more requestI18n before showing that label. After ready, the next render of a template that still has no translation requests it again. The same visible label does not request every frame; hiding it and showing it does. Returning to copy that is already in translations does not call requestI18n again. needed: false keeps source text and does not cancel later requests after needed: true. Translation is applied only when the result is needed: true:

if (typeof window.combos?.requestI18n !== 'function') return;

// First call (beforeReady): await, then start / ready
const result = await window.combos.requestI18n({
  sourceLocale: 'zh-CN',
  sourceTexts: [
    '{player} 获得了 {score} 分',
    '开始游戏',
  ],
});
// { needed: false } → keep source text
// { needed: true, locale, translations } → replace, then enter the game

Missing replacements fall back to the unchanged placeholder. Without the injected SDK, the game stays on the source text.

License

Internal workspace package, part of the Combos Fun engine monorepo.