FSCSS Modules & Libraries

Structure a module, fill package.json, list it for discovery, support named @import, and optionally automate the browser IDE with libck / xfcmd.

What is this?

The fscss-modules / libs.json registry feeds Libraries discovery. A solid module is still just importable .fscss source that compiles to plain CSS.

Listing a repo in libs.json is discovery. Named @import((*) from my-lib) needs the pack registered for the compiler. IDE libck only needs a public repo + valid package.json (URL works even before registry listing).
package.json schema

Root package.json — modern example (helpers with signatures, xfcmd, empty directive when prefixes mix):

{
  "name": "my-widget",
  "version": "1.0.0",
  "description": "One-line summary for discovery cards",
  "extension": "fscss",
  "fscss_version": ">=1.2.4",
  "engines": { "fscss": ">=1.2.4" },
  "blocked_methods": [],
  "repository": {
    "type": "git",
    "url": "https://github.com/you/my-widget.fscss"
  },
  "bugs": {
    "url": "https://github.com/you/my-widget.fscss/issues"
  },
  "file": {
    "usage": {
      "directive": "widget-*",
      "helpers": [
        "widget-root(root:root)",
        "widget-card(sel:.widget-card)"
      ]
    },
    "modules": ["./my-widget.fscss"],
    "remote": "./my-widget.fscss"
  },
  "xfcmd": {
    "enable": "./xfcmds/enable.xfcmd",
    "disable": "./xfcmds/disable.xfcmd"
  },
  "author": { "name": "you" },
  "keywords": ["fscss", "css", "module"],
  "license": "MIT"
}
nameIDE / registry id: libck my-widget. Prefer a short name (not only fscss:…).
versionSemver; bump on release.
descriptionOne line on libraries / libck report.
extensionMust be "fscss".
fscss_versionSemver range vs compiler (>=, ^, \~). IDE warns if unsatisfied.
blocked_methodsBuilt-ins this pack must not use; else [].
repository / bugsGit URL and issues.
file.modulesRequired for libck — relative paths to source files.
file.remoteRequired — entry file for download / remote import.
file.usage.helpersPublic @define names; add (args) for better IDE snippets.
file.usage.directivePrefix pattern e.g. st-*, widget-*. Use "" if helpers are mixed (avoids false warnings).
xfcmd.enable / disablePaths to .xfcmd scripts for libon / liboff.
author / licenseShown on cards; MIT recommended.
Authoring walkthrough with enable scripts: hub create-module · xfcmds guide.
Discovery · named import · IDE enable

1. List in the registry (discovery)

PR to add your repo URL in assets/scripts/libs.json (remotes). Visible on /libraries.

2. Named import (@import((*) from name))

Compiler resolves registry / core style names without quotes. Until then, import by URL or path:

@import((*) from "https://cdn.jsdelivr.net/gh/you/my-widget.fscss@main/my-widget.fscss")
@import((widget-root, widget-card) from "./my-widget.fscss")

See Submit Guide and @import docs.

3. IDE libck / libon (automation)

In FSCSS IDE terminal:

libck my-widget
yes
# or full GitHub URL
libck https://github.com/you/my-widget.fscss
yes
liboff my-widget

libck loads package.json, checks fscss_version, downloads file.modules, verifies helpers exist as @define, then offers enable. Enable runs xfcmd.enable (snippets + optional demo). Disable removes snippets; does not delete demo files.

Entry file

Expose one entry — index.fscss or my-widget.fscss — self-contained or re-exporting internals. file.remote must point at that file. Public GitHub (or CDN) so libck and remote imports can fetch it.

Ecosystem libraries

st-core@v2

Array-driven pure CSS charts; package + xfcmd enable demos.

st-core.fscss

circle-progress

Rings, pies, steps via conic-gradient / masks.

Circle-progress.fscss

overlapui

Avatar / card / image / circle stacks; FSCSS + standalone CSS.

overlapui.fscss

icon-mask

CSS-mask icon pack, small surface area.

icon-mask.fscss

micros

mirror, stagger, alpha — import as fscss:micros.

micros.fscss

patterns

Plain-English pattern() library + tokens.

patterns.fscss

customizable

Page shell: nav, hero, features, footer, prose.

customizable.fscss

flex-control

Flex layout macros.

flex-control.fscss
Checklist before submit
Resources
Libraries Submit guide Create module (hub) IDE xfcmds guide @import libs.json Core (xfscss)