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

@brftech/filex-app-ui

v0.51.0

Published

filex app interface SDK: the bridge between an app's own sandboxed interface and filex (open, save, dirty, call the app's module)

Downloads

748

Readme

@brftech/filex-app-ui

The SDK an app's own interface bundles to talk to filex.

An app may bring its own HTML/JS/CSS interface. filex serves it from the app's approved package and runs it in a sandboxed frame whose policy allows no connection, no storage and no cookie (a browser cannot fully stop a page sending data out - see filex's APP-PLUGINS.md). Everything the interface does goes through filex over one checked channel, and this package is that channel: a few KB, no dependency.

npm install @brftech/filex-app-ui
import { connect } from '@brftech/filex-app-ui';

const fx = await connect();              // the handshake; rejects outside filex
const file = await fx.open();            // { name, ext, size, mime, readOnly, text(), bytes(), stream(), save() }
editor.value = await file.text();
editor.addEventListener('input', () => fx.dirty(true));
fx.onSave(() => editor.value);           // filex's Save, a draft's "Save to disk", Ctrl+S

Without a bundler, ship dist/filex-app-ui.iife.js in your bundle and load it with a <script src>: it defines window.FilexAppUI.connect.

| Call | What it does | |---|---| | fx.session | the app and view, the reader's language and direction, filex's colours, the person's display name, the files, the grants | | fx.open(i) / fx.save(data) / fx.saveAs(name, data) | read an opened file; save over it (a new version, or the draft it is); save a new file where the person picks | | fx.dirty(on), fx.title(t), fx.toast(t, tone), fx.confirm(opts), fx.close() | tell filex about unsaved changes; ask filex to draw a line, a question, to close (a toast and a question carry your app's name) | | fx.copy(text) | put text on the clipboard - call it from a click or a key press: without one, filex asks the person first | | fx.download(name, data, mime?) | hand the person a file for their own disk ("ui": { "download": true } in the manifest) - from a click, or filex asks; 256 MiB at most; Chromium streams it into the file they pick | | fx.call(method, params) | ask the app's own module (ui_call) | | fx.submit(action, params) | queue one of the app's actions on the opened files - like copy, from a click, or filex asks | | fx.state.get(key) / fx.state.set(key, value) | a small store for this app and this person | | fx.on('theme' \| 'locale' \| 'file.changed' \| 'close.request' \| 'app.updated', fn) | listen to filex |

connect() paints filex's colours (--fe-* custom properties), lang, dir and data-theme onto <html> and keeps them current; pass { applyTheme: false } to do it yourself.

The whole contract - manifest, serving policy, every message - is docs/APP-PLUGINS-API.md → "An app's own interface"; how to build and package an interface is docs/PLUGIN-KIT.md → "Writing an interface". The protocol itself is src/protocol.ts (also exported as @brftech/filex-app-ui/protocol), which filex's own frame imports, so the two sides cannot drift.

MIT © BRF Tech