Thank you for being patient! We're working hard on resolving the issue
An alias is a declarative row that hydrates into a tree of layout
AliasRow referencing the template gets the
expanded subtree.| Template | Hydrates into |
|---|---|
weather | column layout + column.weather renderer + optional column.logs child |
timezone | column layout + column.timezone renderer |
data | column layout + data-renderer children based on the source's data preset |
task | column layout + column.task renderer |
task-list | column layout + cascading task renderers across days |
calendar | column layout + column.calendar (list mode) + timeline[row].event (all-day) + timeline[column].event (timed) |
calendar-list | column layout + column.calendar list mode only |
calendar-allday | column layout + column.calendar + timeline[row].event |
Each template is an entry in ALIAS_TEMPLATES:
import { ALIAS_TEMPLATES } from "@tento-lona/sheets";
const weather = ALIAS_TEMPLATES.weather;
weather.props; // PropSchema entries the alias accepts
weather.staticRules; // unconditional child specs
weather.dynamicTail; // child-spec generator (data-driven)
import { expandAliasInstance } from "@tento-lona/sheets";
// Called automatically by Sheet.from / sheet.addRow when an alias
// row enters the tree. Re-call after a prop change:
expandAliasInstance(sheet, aliasRow);
Re-expansion is idempotent — instance.hydrated short-circuits
if nothing has changed.
Most consumers only need to know which layout child the alias is currently rendering through:
import { resolveAliasActiveLayout } from "@tento-lona/sheets";
const activeLayout = resolveAliasActiveLayout(sheet, aliasRow);
// → the LayoutRow descendant the alias points its render binding at
This is the function platform implementors reach for via
@tento-lona/platform (re-exported from this barrel).
import { AliasTemplate, BuiltinAliasFactory } from "@tento-lona/sheets";
const myTemplate: AliasTemplate = {
name: "my-alias",
props: { /* PropSchema entries */ },
staticRules: [ /* StaticRule entries */ ],
dynamicTail: { /* DynamicTail generator */ },
};
const myFactory: BuiltinAliasFactory = {
template: myTemplate,
defaults: () => ({ /* default props */ }),
};
// Register at client startup:
defaultBuiltinAliasFactories.register(myFactory);
After registration, any sheet adding an alias row with
template: "my-alias" hydrates through the new factory.
Alias children can read parent-alias props via
propagateChildAttrToAlias. When a child mutates an attribute
the parent template wants to track (e.g. weather.location set
on a child renderer), the call walks up to the alias and
re-applies its dynamicTail.
import { resolveInitialAliasProps } from "@tento-lona/sheets";
const props = resolveInitialAliasProps(template, descriptorOverrides);
Combines the template's defaults with any descriptor-level
overrides (AliasDescriptor.props).
AliasRow carries
the instance + template reference