@huukhanhnguyen/model / core/isolated
core/isolated
flatLaneExtras()
flatLaneExtras(
model,consumer?):FlatLaneScopeExtras
Scope hooks a TRULY-FLAT isolated evaluation (evaluateFlatComponent/ evaluateFlatOperations — a sheet's ad hoc operations, a flat-context component resolve) needs beyond resolveComponent — the 4 shared hooks above, PLUS resolvePlacedNesting. There is deliberately NO placeComponent hook here: paper places a VIEW (the sheets→components cut), and components.ts wires the one refusing resolver. See sharedIsolatedHooks's doc for the consumer reasoning.
Parameters
model
consumer?
Returns
imageUrlOf()
imageUrlOf(
model,ref):string
Resolve an attached-image reference to its url: a url-method parameter KEY resolves to that parameter's literal url (with a REAL dependency edge — dependOn registers the currently-evaluating node, the same cascade an ordinary expression reference gets, replacing the old images[]-lane RecordNode); anything else (a raw https:/data: URI, an unknown key) passes through unchanged. Every scope hook that needs it (the root scope's imageUrlOf, flatLaneExtras) calls this.
Parameters
model
ref
string
Returns
string
sharedIsolatedHooks()
sharedIsolatedHooks(
model,consumer?):SharedIsolatedHooks
The 4 isolated-scope hooks shared by BOTH a truly-flat scope (flatLaneExtras) and a component's own "component"-lane scope (componentScopeExtras) — factored out to avoid duplicating them. consumer, when given, is the OUTER lane node actually doing the resolve (a ComponentNode/SheetNode) — these hooks then register the dependency edge EXPLICITLY onto it (linkRead(target, consumer)) instead of relying on the generic evaluation-stack's dependOn (core/evaluationStack.ts): an isolated scope (buildIsolatedParameterScope's synthetic owner has no .parent, see components.ts's module doc) means a throwaway DataNode/ParameterNode built fresh INSIDE it would otherwise sit on top of the stack and shadow the outer consumer — any edge registered through stack inference would be a dead end once that throwaway node is discarded. Absent consumer (a one-off, uncached caller like evaluateDrawingSet/evaluateSheetOperations — nothing to invalidate). The root scope gets its OWN, separate resolvePlacedView/ Table wiring in the constructor (not this method) — same underlying ChainNodes. Neither version swallows: a genuine self-reference (a view/whole-scene table reading back into the live scene[] graph it is part of) throws a named "Circular dependency" error that propagates to the READING step's DataNode._stepFailed — recorded on that node's error and logged, which is the contract ModelScope's resolvePlacedView/Table docs state. See the constructor's wiring and sceneFrame / fold-depth guard.
Parameters
model
consumer?
Returns
urlParamNodeOf()
urlParamNodeOf(
model,key):ParameterNode|undefined
Find a url-method parameter by key (an attached file is an ordinary parameter — the ONLY "asset" the graph still resolves by name).
Parameters
model
key
string
Returns
ParameterNode | undefined