Versioned contracts
Find the contract behind every behavior.
Follow the v0.1 browser runtime, character-pack, input, density, dismissal, security, and performance contracts.
01 · RELEASE BOUNDARY
This map describes published 0.1.0.
The public contract is the exact npm release built from the annotated
v0.1.0 source tag. Package exports, schema, declarations,
runtime behavior, and release evidence must agree before a field can be
described as part of that version.
Released artifact identity
peekling.min.js-
97,901 bytes. SHA-256
5c634d8ab59f8741cb27750cac5bc11b669c8b4169ac6a1753dc7424ca3469cd. peekling.css-
2,036 bytes. SHA-256
c3c044363689fc1d70b699378ae87b8d3fbe1656d3e7e7f1e41065bde3f1d6aa. @peekling/runtime- Version 0.1.0 with zero production dependencies.
source-
Annotated tag
v0.1.0, release commit5f7f9b4.
motion.type: "follow-pointer" is the complete motion vocabulary
in published 0.1.0, across its schema, declarations, and
runtime.
02 · PUBLIC SURFACES
One runtime, three ways in.
hatch()-
Named ESM export. Returns one owned instance with
ready,finished,emit,override,pause,resume, anddestroy. Peekling.hatch()- The same creation contract in the complete browser file.
<peekling-character>- A lifecycle facade. Connection hatches and disconnection destroys.
The ESM root also exports site visibility helpers and explicit Web Component
registration. Supported package subpaths are .,
./pack, ./preflight, ./browser, and
./peekling.css. These exports and subpaths define the complete
public API.
globalThis.Peekling value or foreign custom element. It reports
an occupied surface through peekling:collision.
03 · CONFIGURATION CONTRACT
Closed objects keep the boundary legible.
Serializable Configuration uses closed JSON objects. Static schema checks establish shape and lexical limits. Shared semantic validation then checks URLs, references, channel ownership, Pack Capabilities, and selected States.
- Pack source
-
At least one of
character,packUrl, orpack. Runtime precedence is inline Pack, explicit manifest, then registered alias. - Render bounds
-
scaleis an integer from 1 through 4.densityandmaxDensityaccept 1, 2, or 4. - Position
-
bottom-left,bottom-right,center, or finite coordinates from -100000 through 100000. - URLs
- Same-origin relative paths or canonical, credential-free absolute HTTPS URLs with valid authority data.
- JavaScript-only seams
- Host mounts, loggers, diagnostic callbacks, and injected browser objects live on the runtime Configuration object. Pack and Plan remain serialized data.
A Native format-1 Pack is data only. It declares identity, SPDX license,
metadata, PNG atlas candidates, States, optional Capabilities, timing, and
hashes. Every Pack includes idle. Its closed schema contains
character data, while the host owns Rules, callbacks, rendered HTML, and
application services.
04 · PLAN CONTRACT
Immutable policy, bounded runtime state.
- Plan
- One baseline plus at most 64 declaration-ordered Rules.
- Browser Events
-
pointer.click,pointer.move,document.visibility,window.focus,window.scroll,section.visibility, andpage.lifecycle. - Channels
-
motion,state, and namedsurface:<id>channels. Each Effect lists every channel it owns. - Motion
-
Published
0.1.0supports onlyfollow-pointer. Speed is 1 through 1000, with a default of 160. Arrival radius is 0 through 1000. - Disposition
-
A competing named surface explicitly chooses
update,replace,ignore, orinterrupt.
Application Events use a 32-item FIFO queue. Payloads are immutable JSON-like own data up to 8 KiB, with bounded depth, strings, collections, and value count. A full queue preserves every accepted Event and returns a rejection for the incoming Event.
An Override uses the same Effect model and leaves the immutable Plan intact. It owns declared channels for its lifetime. The runtime permits at most eight active disjoint Overrides. Every lifetime has a one-hour ceiling or an earlier explicit release.
05 · RESOURCE AND SECURITY CONTRACT
Every fetched byte keeps a named boundary.
Browser policy map
script-src- The ESM or complete browser runtime.
style-src- The external runtime stylesheet loaded into closed shadow roots.
connect-src- Manifest and atlas Fetch requests.
img-src blob:- The object URL created only after atlas bytes pass verification.
- Manifest and atlas requests have a 30-second deadline.
- Fetched Native manifests are limited to 64 KiB and Native atlas input to 4 MiB.
- Atlas dimensions are capped at 4096 by 4096 pixels.
- Every atlas candidate requires a lowercase SHA-256 declaration.
- Strict CSP uses external styles, registered event listeners, and static execution.
- The upstream runtime is telemetry-free and connectionless.
SRI, CSP, pinned URLs, CORS, and origin allowlists provide complementary layers of defense. Pair them with source provenance checks and provider review. Cross-origin assets also depend on correct browser policy and provider availability.
06 · LIFECYCLE AND ACCESSIBILITY
Park cleanly. Finish once.
-
readyresolves after Pack, stylesheet, Plan, first State, and owned DOM are usable. finishedalways settles once after terminal cleanup.- Host pause, hidden documents, and site dismissal compose as suspension reasons. Resume happens after the final reason clears.
- Reduced motion suppresses movement and renders a validated static tableau.
-
pagehideends the instance. SPA route changes require host teardown or Web Component disconnection. - The sprite is pointer-transparent and aria-hidden. Accessible content uses a separate surface, while focus stays where the visitor placed it.
Closed Shadow DOM provides presentation encapsulation. Validation, trusted host code, and browser security policy provide the security boundary. Host-rendered mount failures stay contained to the affected surface where browser behavior permits.
07 · RELEASE EVIDENCE
Measured promises stay bounded.
The canonical release measurement combines the complete production browser
file and required stylesheet. Under Node 22.14.0, npm 11.16.0, and Node zlib
defaults, release 0.1.0 records 32,287 bytes gzip and 28,635
bytes Brotli. Both formats have a 32 KiB cap and a required 256-byte
reserve.
Release browser coverage targets current evergreen Chromium, Firefox, and WebKit under the documented matrices. That evidence applies to the exact source, artifacts, browsers, machines, and scenarios tested. Each new host page, device, extension, and callback receives its own integration checks.
08 · CANONICAL PUBLIC REFERENCES