
Company News
Socket Partners with Replit to Block Malicious Packages in AI-Powered Development
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.
The mashlib library (mashlib.js) is a solid-compatible code library of application-level functionality for the world of Solid. It compiles all of the following repositories into what we know as mashlib.js:
A colorful dependency tree can be seen here.
As part of the SolidOS stack, mashlib can be developed locally by setting up the SolidOS code. Read more about that on the SolidOS Readme.
Mashlib webpack now supports two explicit resolution modes:
package mode: default. Resolves solid-ui and solid-panes from node_modules, which is the correct behavior for npm installs and published builds.workspace mode: opt-in. Resolves selected SolidOS packages from sibling workspace source trees for local linked development.Use these scripts for local workspace builds:
npm run build:workspacenpm run watch:workspacenpm run start:workspacenpm run build, npm run watch, and npm run start stay on default package resolution.
The goals of mashlib overlap with the SolidOS Goals.
One major use of mashlib is as a "databrowser" for a personal data store.
Mashlib is used in SolidOS and contributes to:
mashlib is also used stand-alone as the SolidOS Databrowser Webapp and can be tried out at https://solidos.github.io/mashlib/dist/browse.html.
mashlib is also used as a library by adding mashlib.js (or minified version) directly to your applications. For example:
<script src="https://solidcommunity.net/mashlib.js"></script>.
Check out SolidOS Pod for an earlier version of this documentation.
The static/browse.html page is compiled one to one into the dist (output) folder of mashlib and makes mashlib available stand-alone as the SolidOS Databrowser Webapp.
You can see and try out a SolidOS Databrowser Webapp deployment at https://solidos.github.io/mashlib/dist/browse.html.
browse.htmlserves as a perfect example for Solid WebID authentication and for making use of mashlib functions and variables.
To run/test locally we created a script npm run start.
The src/databrowser.htmlpage is compiled into the SolidOS Databrowser Frontend which is displayed for each WebID on solidcommunity.net. This is the case because the solidcommunity.net Solid Server is configured with SolidOS as its front-end.
More information about the SolidOS Front-end and how to use it visit the User Guide.
SolidOS Data-Kitchen uses mashlib.jsas a direct import in its source code. Visit the code at SolidOS Data-Kitchen GitHub.
If one wants to use mashlib as a direct import (as a package dependency or script import), one needs to know which global variables and functions are available.
The availability of these global variables depends on how the sub-modules are imported and exported and on where the variables are instantiated. For a basic theoretical read, please see this resource.
What does global mean in mashlib? We mean the global object which depends on different environments. In mashlib, for now, we use the window context which means these variables will not work if directly used in non-window contexts such as Node.js environments. (This does not mean you cannot use mashlib in Node.js environments; just import it through npm). At some point, we will switch this to the globalThis.
These are the most important window context/global variables and the sub-repos from which they are exported:
SolidLogicUI variableUI variable, and solid-panes itself can be used through the panes variableFor backward compatibility reasons, there are now different ways to make use of the same variables from mashlib. For example:
UI BUT NOT panes.UI anymoreSolidLogic.authSession BUT NOT UI.authn.authSession nor panes.UI.authn.authSession anymoreSolidLogic.store BUT NOT UI.store nor panes.UI.store anymoreUI.rdf or panes.UI.rdf anymore but as $rdfSolidLogic.authn.currentUser() BUT NOT UI.auth.currentUser() nor panes.UI.authn.currentUser() anymoreYou can see example usage in the SolidOS Databrowser Webapp code.
One function has been renamed and does not have a backwards-compatible fallback. To make use of the login pop-up, one needs to call the UI.login.loginStatusBox function. The old UI.authn.loginStatusBox function will no longer work from v1.8.0 onwards.
Some packages have been moved and with them some functions too. Here we report on these changes:
authn as you might have known it in solid-ui pre mashlib version 1.7.18 (solid-ui 2.4.16).solid-ui/authn are now under solid-ui/login.Functions that moved:
currentUser, checkUser, saveUser, offlineTestID are now part of solid-logic/authn/SolidAuthnLogic.ts-> this is because authn itself moved to solid-logic.setACLUserPublic, fetchACLRel are now part of solid-logic/src/acl/aclLogic.ts/ and are exported in index.ts.loadIndex, loadTypeIndexes, ensureTypeIndexes, registerInTypeIndex and are exported in index.ts.This refers to a specific way in which the mashlib is deployed for users who at first only have a conventional web browser - a hypertext browser not a data browser. It is a hack -- in the original computing sense of a crafty, though not beautiful, little thing which gets the job done.
How does the data browser work?
databrowser.html, instead of the data.databrowser.html file loads the mashlib.js Javascript library, which can now understand the data.mashlib.js then re-requests the original data, but accepting data formats.mashlib.js code provides an editable visualization on the data.The mashlib part of SolidOS Databrowser Frontend is read-write; that is, the user is allowed to edit data and create new things. It is live, in that often the databrowser subscribed (using a websocket) for any changes which other users make, so users' screens are synchronized.
A major limitation of this data browser hack is that current web browsers are made to distrust any code loaded from one domain that uses data from another domain. This makes it hard, strangely complicated, and sometimes impossible to do some things.
The SolidOS team is using GitHub Copilot integrated in Visual Studio Code. We have added comments in the code to make it explicit which parts are 100% written by AI.
Auto model: Looking at these 2 files (databrowser.html and index.ts), I want to redesign mashlib and underlying panes. I have one design for web and another for mobile. How would I go about making sure I can also have a mobile version?
Claude-Opus 4.6: I don't think this is correct. Mashlib is bundling together all the panes. I do not need to add mashlib.layout or theme to the globals. I can just call the render of each pane with an interface of values or ...?
Raptor mini: I want to redesign the main page which contains GlobalDashboard and OutlineView. I keep the header and footer and I want to have a left side menu that changes content based on whether logged in or not and also changes based on whether it is mobile or not. If it is mobile, it should fold up in the header menu; if it is web, it should be rendered on the left side. I want a menu placeholder that changes according to mobile or not. I want to implement its functionality in solid-panes.
FAQs
Data mashup library
The npm package mashlib receives a total of 517 weekly downloads. As such, mashlib popularity was classified as not popular.
We found that mashlib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.