Platform
Extend the vocabulary
SemText is a vocabulary, not a framework: an element is a custom
element with an agreed contract, and a namespace is a set of them
plus a loader. Nothing in the core needs to change for
<yelp-sem-org-chart> or
<yelp-sem-system-status> to
work in a served document. Two paths below — keep your vocabulary
private, or propose it upstream.
Your own vocabulary, today
Five files, generated for your namespace below. Each step says what an agent should produce or check; the wizard fills in the artifacts.
Name the namespace and its elements
A namespace prefix keeps your tags out of the core's way:
yelp-sem-org-chart, not
sem-org-chart. Custom-element
names must contain a hyphen and stay lowercase — the generator
validates and prefixes for you.
Generate the scaffold
The vocabulary base (a block box per element before any definition, so the document presents without script), one light-DOM element per tag, the manifest, the loader, and a demo page. Copy each file out as generated.
spec/conventions.md
§7): a CSS base, one light-DOM element per tag, a manifest, and a
loader that imports only the chunks the page uses.
Tags are validated as custom-element names and prefixed with the
namespace unless they already carry it.
Currently:<yelp-sem-org-chart> <yelp-sem-system-status>
Host it and load the loader
Serve the directory over HTTP(S) and put one
<script src="./your-ns-lazy.js">
on the page. The loader scans the document for its namespace's
tags and imports only the chunks those tags need — components
not on the page never download, and a failed chunk degrades only
its own elements to authored prose with a
role="alert" note. That is the
spec's hosted-lazy contract (§7) applied to your namespace.
Verify the degradation
Load the page with scripts off: every element shows its authored content, nothing hidden, the record intact. Then load it with scripts on and confirm the upgrade markers land. A vocabulary that fails either check is not done.
Propose it upstream
A vocabulary earns a place in the core when the need is shared. The
proposal needs the element's name, a one-line summary, why the
existing vocabulary cannot express it, its options, and a worked
example — the drafter shapes that into a prefilled issue on
noizu-labs-ml/npl-enhanced-content,
the spec's repository.
Submitting publishes the proposal to the review queue on proposals.semtext.dev; the GitHub-issue link stays as a fallback for anything the form cannot carry (very long examples, say).