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

@rchh/lowcode-plugin-multiple-editor

v0.2.1

Published

This plugin lets you organize code in an arbitrarily nested file tree inside the Lowcode Engine.

Readme

Multiple file editor

This plugin lets you organize code in an arbitrarily nested file tree inside the Lowcode Engine.

Demo

import multipleFileCodeEditorFactory from '@rchh/lowcode-plugin-multiple-editor';

import { PrettierPlugin } from '@rchh/lowcode-plugin-multiple-editor/es/plugins/prettier-plugin';


const PLUGIN_NAME = 'multiple-file-code-editor';
// See the TypeScript type declarations for the full set of options
const plugin: any = multipleFileCodeEditorFactory({
  softSave: true, // when true, saving stores the code on the plugin instance instead of calling the engine's importSchema
  es6: true, // compile option; when true only es module compilation is performed
  // Plugins can be used to extend the functionality of the code editor
  plugins: [searchPlugin as any, lintPlugin, new PrettierPlugin()],
  // Built-in hook for running setup work when the plugin initializes, e.g. adding type declarations
  onInstall(controller: EditorController) {
    for (const [path, content] of extraLibList) {
      controller.addExtraLib(content, path);
    }
    controller.addComponentDeclarations(declarations);
    controller.onImportSchema(async (schema) => {
      // Todo sth.
    });
    window.codeEditorController = controller;
  },
  defaultFiles: {
    utils: `
export function helloWorld() {
  console.log('hello world');
}
    `
  }
});

plugin.pluginName = PLUGIN_NAME;

await plugins.register(plugin);

How it works

Every time you save while using this plugin:

  1. The code is compiled and an __initExtra function is generated; it initializes the real definitions of every method and lifecycle hook
  2. The constructor body is modified to call __initExtra. The constructor runs inside the rendering engine, and once it completes all methods and lifecycle hooks have their real definitions
  3. A file map is stored on the schema at schema.componentsTree[0]._sourceCodeMap

Usage notes

  1. Replacing every project.importSchema and project.exportSchema call with codeEditorController.importSchema and codeEditorController.exportSchema is recommended, because the plugin needs to post-process the file contents
  2. Functions and variables cannot be defined in index.js outside of the class; define them in another file instead
  3. Expressions cannot be used in the state definition of the index.js class
  4. To use type definitions inside a setter, enable singleton mode for base-editor by calling the following at your application entry point
  5. If the lowcode project uses code generation, the generator must be customized to emit the files from _sourceCodeMap into the project and to fix up the file references; the exact approach is up to you

Using singleton mode

import { configure } from '@rchh/lowcode-plugin-base-monaco-editor';
configure({ singleton: true });