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.5.
The public contract is the exact npm release built from the immutable
v0.1.5 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-
117,503 bytes. SHA-256
5b88583691fc2780933b2f85e739ff44aedca0813846f9d326ba136bbb4d4a20. peekling.css-
3,234 bytes. SHA-256
af83c829e6d99504dbd896877d089b42a4311da29c8b0957b5330312f0d350f6. @peekling/runtime- Version 0.1.5 with zero production dependencies.
source-
Immutable tag
v0.1.5, release commita8182b7.
0.1.5 keeps one versioned Plan contract across its JSON
schema, declarations, validator, 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, ./canvas,
./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.5supportsfollow-pointer,viewport-traverse,move-to,move-to-target,jump-to, andsvg-path. Each form has bounded, validated inputs. - 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. - Sprite art stays aria-hidden. An accessible interaction control and host content surfaces expose actions without moving focus unexpectedly.
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.5 records 38,428 bytes gzip and 33,684
bytes Brotli. Both formats have a 40 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