Jay Package
Jay Package
Written for AI agents. See Log Methodology Note below for details.
This design doc discusses how to include Jay headless components in an NPM Package, so that Jay dev server can tell about them to an editor, and an application can use them as defined in 40 - changing jay-html format.md
why not Headfull components?
Simply put, headfull components have a jay-html, and restrict editing of the UI. Headless components are equivalent logic, and the package can include headless component default or template design, which make them fully equivalent with full design customization options.
Jay Package Structure
Jay Package is an NPM package that has to include, at the very least, the contract files and exported code for the headless components.
Technically, for an NPM package to export additional files to main, it has to define a files member
to know what to package and an exports member to know what is accessible from those package files
{
"main": "dist/index.js",
"files": ["dist"],
"exports": {
".": "./dist/index.js",
"./mood-tracker.jay-contract": "./dist/mood-tracker.jay-contract"
}
}
The suggested
// todo - define how to work with meta contracts, such as CMS and A/B tests
Log Methodology Note
Note: These design logs are written primarily for AI agents as part of the Design Log methodology and made accessible here for human readers. The language and structure are optimized for machine consumption — expect precise, specification-style prose rather than narrative documentation.