[{"data":1,"prerenderedAt":27},["ShallowReactive",2],{"docs-nav":3,"docs-page:instances":22},[4,7,10,13,16,19],{"route":5,"label":6},"\u002F","Home",{"route":8,"label":9},"\u002Fapi","1. API",{"route":11,"label":12},"\u002Fdevelopment","2. Development",{"route":14,"label":15},"\u002Finstances","3. Instances",{"route":17,"label":18},"\u002Fmap","4. Map",{"route":20,"label":21},"\u002Fdata","5. Data",{"route":14,"title":23,"html":24,"prev":25,"next":26},"Instances","\u003Ch1 id=\"instances\">Instances\u003C\u002Fh1>\n\u003Cblockquote>\n\u003Cp>Internal instance anatomy and orchestration boundaries.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2 id=\"anatomy-at-a-glance\">\u003Ca class=\"heading-anchor\" href=\"#anatomy-at-a-glance\">Anatomy at a glance\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>createInstance({ map, document? })\u003C\u002Fcode> first validates the consumer-injected map, then normalises input via \u003Ccode>normaliseInstanceDocument(...)\u003C\u002Fcode>, then delegates the resulting canonical InstanceDocument to \u003Ccode>createInstanceCore(map, ...)\u003C\u002Fcode>, which assembles one runtime core for one injected map.\u003C\u002Fp>\n\u003Cp>Key components:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\u003Cth>Component\u003C\u002Fth>\u003Cth>Responsibility\u003C\u002Fth>\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\u003Ctd>\u003Ccode>src\u002Fentry.js\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Factory entry: map duck-type validation, document normalisation, deep-clone, runtime creation.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>src\u002Fdocument\u002FinstanceDocument.js\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Canonical InstanceDocument shape, normalisation, serialisation, and validation.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>src\u002Fruntime\u002FcreateInstanceCore.js\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Runtime core orchestration, lifecycle, public API assembly, registry behaviour, destroy flow.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>src\u002Fruntime\u002FruntimeRegistry.js\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Internal \u003Ccode>WeakMap\u003C\u002Fcode> runtime storage keyed by the consumer map (\u003Ccode>get\u002Fset\u002Fdelete\u003C\u002Fcode>).\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>src\u002Fruntime\u002FcreateInstanceEvents.js\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Container event bus (\u003Ccode>on\u002Foff\u002Fonce\u002Femit\u003C\u002Fcode>); events are dispatched on \u003Ccode>map.getContainer()\u003C\u002Fcode>.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>src\u002Fruntime\u002Fstate\u002FcreateInstanceState.js\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Canonical runtime-state store (\u003Ccode>getSnapshot\u003C\u002Fcode>, \u003Ccode>dispatch\u003C\u002Fcode>, \u003Ccode>subscribe\u003C\u002Fcode>) and scoped\u002Fglobal state-event emission.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>src\u002Fconfig\u002FresolveConfig.js\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Runtime config resolution (debug) over \u003Ccode>defaultConfig\u003C\u002Fcode>.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>\u003Ccode>src\u002Fgeojson\u002F*\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>GeoJSON overlay internals — type-based render plans (\u003Ccode>createGeoJSONModule.js\u003C\u002Fcode>), feature interaction events (\u003Ccode>createFeatureInteractionModule.js\u003C\u002Fcode>). Documented in \u003Ccode>docs\u002F5.data.md\u003C\u002Fcode>.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003C\u002Fdiv>\n\u003Ch2 id=\"internal-orchestration-boundaries\">\u003Ca class=\"heading-anchor\" href=\"#internal-orchestration-boundaries\">Internal orchestration boundaries\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Public boundary\u003C\u002Fstrong>: \u003Ccode>createInstance({ map, document? })\u003C\u002Fcode> in \u003Ccode>src\u002Fentry.js\u003C\u002Fcode> returns \u003Ccode>WaymarkInstancePublicApi\u003C\u002Fcode> only.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Runtime boundary\u003C\u002Fstrong>: lifecycle phase, registry entries, and event-wiring handles stay internal.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>InstanceDocument boundary\u003C\u002Fstrong>: \u003Ccode>toJSON()\u003C\u002Fcode> is canonical serialisable output; it is separate from runtime lifecycle state.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Map injection details are documented separately:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fwaymark-js\u002Fmap\">Map boundaries\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"coremodules-boundary\">\u003Ca class=\"heading-anchor\" href=\"#coremodules-boundary\">core.modules boundary\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>core.modules\u003C\u002Fcode> in \u003Ccode>createInstanceCore(...)\u003C\u002Fcode> groups teardown-capable internals:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>geoJSON\u003C\u002Fcode> (source\u002Flayer lifecycle, type-based render planning, feature interaction via \u003Ccode>createFeatureInteractionModule.js\u003C\u002Fcode>)\u003C\u002Fli>\n\u003Cli>\u003Ccode>debug\u003C\u002Fcode> (console event logging)\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>This grouping is internal lifecycle wiring, not part of the consumer API.\u003C\u002Fp>\n\u003Ch2 id=\"module-state-boundaries\">\u003Ca class=\"heading-anchor\" href=\"#module-state-boundaries\">Module state boundaries\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Runtime mutable state lives in \u003Ccode>core.runtimeState\u003C\u002Fcode> (state module snapshot + dispatch) and covers \u003Ccode>debug\u003C\u002Fcode> and type visibility only.\u003C\u002Fli>\n\u003Cli>\u003Ccode>core.baseline\u003C\u002Fcode> keeps stable authored\u002Fdefault intent (\u003Ccode>debug\u003C\u002Fcode>, \u003Ccode>types\u003C\u002Fcode>) for delta generation.\u003C\u002Fli>\n\u003Cli>Serialisation emits a stable \u003Ccode>config\u003C\u002Fcode> baseline and a minimal \u003Ccode>state\u003C\u002Fcode> delta in \u003Ccode>toJSON()\u003C\u002Fcode> (unchanged branches omitted), using runtime-state snapshots as the current source. There is no map\u002Fcamera\u002Fbasemap slice.\u003C\u002Fli>\n\u003Cli>Internal mutators (for example, \u003Ccode>runtimeState.dispatch(...)\u003C\u002Fcode>) are runtime wiring and not public API.\u003C\u002Fli>\n\u003Cli>The \u003Ccode>geoJSON\u003C\u002Fcode> module owns a nested \u003Ccode>featureInteraction\u003C\u002Fcode> module that observes Waymark-owned layers and emits feature interaction events. It is not part of the public API surface: consumers receive \u003Ccode>waymark:feature.*\u003C\u002Fcode> events and \u003Ccode>core.modules.geoJSON.destroy()\u003C\u002Fcode> detaches its listeners.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"lifecycle-order\">\u003Ca class=\"heading-anchor\" href=\"#lifecycle-order\">Lifecycle order\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Create flow:\u003C\u002Fp>\n\u003Col>\n\u003Cli>Validate the injected map (\u003Ccode>src\u002Fentry.js\u003C\u002Fcode>) and normalise the incoming document.\u003C\u002Fli>\n\u003Cli>Check the \u003Ccode>WeakMap\u003C\u002Fcode> registry in \u003Ccode>src\u002Fruntime\u002FruntimeRegistry.js\u003C\u002Fcode>; if the map already has a runtime, throw.\u003C\u002Fli>\n\u003Cli>Resolve config (debug) and install the event bus on \u003Ccode>map.getContainer()\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Create the GeoJSON module: build render plans, register \u003Ccode>load\u003C\u002Fcode>\u002F\u003Ccode>style.load\u003C\u002Fcode> mount handlers, and wire the feature interaction module (\u003Ccode>click\u003C\u002Fcode>\u002F\u003Ccode>mousemove\u003C\u002Fcode>\u002F\u003Ccode>mouseout\u003C\u002Fcode>).\u003C\u002Fli>\n\u003Cli>Create runtime state (\u003Ccode>createInstanceState(...)\u003C\u002Fcode>) with initial debug and type-visibility state.\u003C\u002Fli>\n\u003Cli>Build the InstanceDocument adapter and public API.\u003C\u002Fli>\n\u003Cli>Register the runtime against the map in the \u003Ccode>WeakMap\u003C\u002Fcode> and emit \u003Ccode>waymark:instance.created\u003C\u002Fcode> on the map container.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Destroy flow:\u003C\u002Fp>\n\u003Col>\n\u003Cli>Mark lifecycle destroyed and emit \u003Ccode>waymark:instance.destroyed\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Run \u003Ccode>geoJSON.destroy()\u003C\u002Fcode> (remove Waymark-owned layers\u002Fsources, detach \u003Ccode>load\u003C\u002Fcode>\u002F\u003Ccode>style.load\u003C\u002Fcode>, destroy the feature interaction module and detach its \u003Ccode>click\u003C\u002Fcode>\u002F\u003Ccode>mousemove\u003C\u002Fcode>\u002F\u003Ccode>mouseout\u003C\u002Fcode> handlers) and \u003Ccode>debug.destroy()\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Delete the runtime registry entry for the map.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>The consumer&#39;s map and container are never removed or modified by Waymark.\u003C\u002Fp>\n\u003Ch2 id=\"extension-notes\">\u003Ca class=\"heading-anchor\" href=\"#extension-notes\">Extension notes\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>When adding internals to \u003Ccode>createInstanceCore(...)\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Keep dependencies explicit.\u003C\u002Fli>\n\u003Cli>Keep teardown deterministic.\u003C\u002Fli>\n\u003Cli>Keep ID-scoped names collision-safe.\u003C\u002Fli>\n\u003Cli>Keep the public API stable unless intentionally documented and tested.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>For module-level behaviour, update these docs alongside runtime changes:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>docs\u002F4.map.md\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Ful>\n",{"route":11,"label":12},{"route":17,"label":18},1792013384663]