@zephytiju/prism-layout-templates
v1.0.0
Published
Immutable declarative Prism Workspace Shell and Operational Dashboard starting templates
Readme
PrismLayoutTemplates
Immutable page-layout starting templates for Prism. Workspace Shell provides a toolbar, main viewport, optional side panels and repeatable split columns. Operational Dashboard provides a vertical scroll root containing a responsive grid.
The package depends only on @zephytiju/[email protected]. It publishes
JSON releases, read-only exports, examples, migration metadata and conformance
vectors. It owns no registration service, catalog, authoring state or component
module. Template identity and authorized registration belong to
PrismCompositionService.
import { workspaceShell, operationalDashboard } from '@zephytiju/prism-layout-templates';
const release = workspaceShell;
// Supply the complete release to authorized template registration.
// For a NEW empty page, clone the shared model tree and pin the exact reference.
const initialLayout = structuredClone(release.definition.startingTree);
const templateRelease = release.reference;The release digest is the public composition model's canonicalDigest(definition);
reference is excluded from that digest. Changes require a new release version.
Do not substitute a package dist-tag for the exact template ID, release version
and digest. JavaScript exports are deeply frozen; JSON consumers must treat
release data as immutable and verify the digest before registration.
| Family | Starting tree | Constraints | |---|---|---| | Workspace Shell | column → toolbar + dock → side panels + split viewports | 1–4 viewports; 320 px viewport and 240 px panel minimum widths; collapse secondary panels or use tabs at narrower widths | | Operational Dashboard | vertical scroll → grid → four empty item slots | 1–48 items; 1/6/12 columns; row-major placement; integer spans; no masonry or freeform coordinates |
All initial slots are empty with visible labels and drop-target instructions. An optional panel is an empty structural placeholder, hidden until enabled; it is not removed from the canonical dock. See layout rules for breakpoint, drop, resize, overflow and accessibility semantics.
Component presets apply inside one placed component through the model API.
They materialize layoutConfig and optional appliedLayoutVariant provenance.
Template selection creates a starting canvas and never replaces an already
composed page. Preset and Custom transitions preserve the template reference,
page tree, placement, configuration, bindings and peer instances.
Conformance and migration
Run npm ci --ignore-scripts && npm run verify. Verification covers shared model
compatibility, canonical digests, deep immutability, typed consumption, deterministic
operations and failed-operation atomicity, component preset/Custom preservation,
and installation of the packed artifact in a fresh consumer directory.
The reference interpreter is test-only and excluded from the package. The vectors
in fixtures/ are declarative adapter conformance inputs and expected outputs;
Workshop and Composition must enforce them through their supported validation
and mutation boundaries. These tests do not claim a deployed Workshop outcome.
Version 1.0.0 is the first release. migrations/manifest.json intentionally has no
legacy mapping. Unknown predecessors and cross-family migrations are rejected;
an identical exact reference is a no-op. Existing revisions retain their original
canonical tree and exact release. Migration of populated pages requires a separately
approved, versioned mapping; consumers must never reset a page to startingTree.
Publication and CI describes immutable evidence and the first-publication/trusted-publisher setup.
Design references
Figma is the visual reference for the starting-layout choice. The approved textual design specifies both families; this repository delivers their data rather than implementing the surrounding Console form.
