Registry / serialization / vfl-compiler

vfl-compiler

JSON →
library1.1.3jsnpmunverified

Converts GSS-flavored Visual Format Language (VFL) statements into GSS-flavored Constraint CSS (CCSS). Current stable version is 1.1.3, released in maintenance mode with no recent activity. It is part of the Grid Style Sheets (GSS) ecosystem and serves as a transpilation step for layout descriptions. Differentiates from Apple's VFL by targeting GSS constraint system rather than Auto Layout.

npm install vfl-compiler
INSTALL
IMPORT
SIG · VFL-COMPILER
V
vfl-compiler
serializationjavascriptv1.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import compiler from 'vfl-compiler'
const compiler = require('vfl-compiler')
Package exports CommonJS by default; ESM import works with bundlers. Use default import to get compile function.
compile
import compile from 'vfl-compiler'
The compile function is the default export.
CompileOutput
import type { CompileOutput } from 'vfl-compiler'
TypeScript users can import the type for the returned output object.

Demonstrates compiling a VFL string to CCSS and handling potential errors.

import compile from 'vfl-compiler'; const vfl = '|-50-[button1(100)]-20-[button2(button1)]-50-|'; try { const result = compile(vfl); console.log(result.ccss); // Compiled CCSS string console.log(result.errors); // Array of errors, if any } catch (err) { console.error('Compilation failed:', err); }
vfl-compiler --version
Debug
Known issues
gotchaInput VFL must be GSS-flavored (e.g., supports @horizontal and @vertical), not Apple's VFL.
fix
Ensure VFL syntax follows GSS specification (http://gridstylesheets.org/guides/vfl/).
affects: >=1.0.0
deprecatedThe ccss-compiler dependency was removed in v1.1.3, but it may still be a peer dependency in some setups.
fix
Install 'ccss-compiler' separately if needed for downstream processing.
affects: >=1.1.3
Errors
Common errors & fixes
Cannot find module 'error-reporter'
Missing 'error-reporter' dependency.
fix
npm install error-reporter
Upgrade
Version history
1.1.3latest on npm
Audit
Dependencies
error-reporterrequiredused for error reporting during compilation
Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
vfl-compiler — npm install vfl-compiler · libregistry