Limits and what is not available
Numeric limits
Section titled “Numeric limits”| Limit | Value |
|---|---|
Actions per event (on.press, on.commit) |
8 |
Entries in lifecycle.startup |
8 |
| State nesting depth | 12 levels |
| State path length | 512 characters |
Text value in setState or a condition |
10,000 characters |
setState and addRow record value |
4 levels, 32 keys per level, 64 values |
Rows in a list in document state, and in a local list after addRow |
500 |
One row addRow adds, once its reads are resolved |
16,384 JSON characters |
goToPage page key |
1–200 characters |
Steps pages |
1–50 distinct page keys |
| Object alias, field and input names | 64 characters |
| Declared objects per document | 32 |
| Declared host actions per document | 32 |
| Fields per level of a declaration (and inputs per capability) | 64 |
object field nesting |
6 levels |
enum values |
64 |
| Host type key | 128 characters |
Field pattern |
256 characters |
confirmation (create, update, delete) |
240 characters, one line |
Host error code |
128 characters |
Host error message and each field error |
1,000 characters |
| Field catalog entries | 512, labels up to 120 characters |
$format count wording (one, other) |
80 characters each |
$calc operands |
16 per calculation (round takes 1; difference, quotient and daysBetween take 2) |
$calc nesting |
3 levels, counting the outermost |
$calc round places |
0–6 |
$expr operands |
16 per expression (round, not and isEmpty take 1; difference, quotient, daysBetween and the six compares take 2; if takes 3; sum, product, min, max, and and or take 2–16) |
$expr nesting |
6 levels, counting the outermost |
$expr nodes |
32 per tree |
Refused on import
Section titled “Refused on import”These are refused with a message rather than dropped:
- List rules —
repeaton anything but a Stack or Grid, arepeatinside another repeated template,$item/$indexoutside a template,$indexin conditions or action params, a row read as a whole action param, and$bindItemover a collection, on a row’s key, or over a field another read lies inside; a collection’supdateordeletewithoutrow, androwanywhere else;addRoworremoveRowon a list no repeat renders, a list whose repeats disagree on its key, or a declared object’s rows, and anaddRowthat sets the key; asetStateinside a repeated list, or of the list itself with anything but a$statecopy; json-render’spushStateandremoveState. See lists. - Placements the designer cannot build — children on a component that takes none (a Text or Heading holding a Button), a Page anywhere but directly in the root PageStack, and a PageStack anywhere but the root.
- Watchers and slots — an element’s
watchandslots. To act when a person changes a field, use an Input’scommitevent. - Array field kinds — a field is never itself a list; a list of records is
a
cardinality: "many"collection. - Richer conditions —
$and, an$orinside a group or a list, an$orwith no group or more than 8, an empty group,notwith any value buttrue,$computed, a baretrue/false, and more than one comparison per part. - Display formatting outside bound text —
$formatanywhere but Text and Headingcontentand Valuevalue, in action params or conditions, a format outsidenumber,currency,percent,dateandcount, a missing or stray option, a literalvalue(only a$stateread,$itemin a template, or a$calcor number$expris formatted), a$formatinside another, and a date format around a$calcor$expr. See$format. - Calculations outside display props —
$calcanywhere$formatis not accepted, in action params and object inputs, invisible,$cond,requiredWhenor any other condition; a function outsidesum,product,difference,quotient,round,min,maxanddaysBetween; the wrong number of operands; a stray key; alistandfieldon any function butsum,minandmax; an operand that is not a number, one read or a nested$calc; anything but reads indaysBetween; and nesting deeper than 3. See$calc. $exproutside its slots —$exprinsetState, object inputs or host-action params; a boolean$exprin bound text; a number$exprasvisible,$condorrequiredWhen;now, an unknown function, nesting deeper than 6, more than 32 nodes, mixed$exprand$statecondition parts, and a type mismatch (if’s then and else, orandof a number).$expris a JSON AST only: no text syntax, no JS, no concat or templates, no host-declared functions.- Other events and actions — any event but Button
pressand Inputcommit, any action but the nine Mica verbs and a declared host action (see actions), and binding-levelconfirm. A host action namedvalidateis refused: that name is the ninth Mica verb. - Local
validatescope —validatechecks only ruled controls visible on the active page. Other pages and controls hidden byvisiblekeep their error slots; with none visible the action succeeds. Import still refusesvalidatewhen no control in the document carries validrules. - Unknown anything — an unknown top-level,
ui,meta, element, declaration or prop key (includingfixturesandgraph, which belong in the{stem}.mica-design.jsonsidecar, never the envelope); an unknown component type; a pack or pack version this build does not have; an expression a prop does not take, such as json-render’s$template, or$stateon a label, which is named in the message.
Not part of Mica today
Section titled “Not part of Mica today”- Decisions that count, and templates, in a document:
$calcand a number$exprshow a total but are never sent to the host; a boolean$exprmay hide or disable a control. Scores that count, pass marks and joined text such as “3 of 4” are the host’s. Functions beyond$expr’s set (an average,now, concat) and host-declared functions (json-render’s$computed). - Commit on typing:
commitfires when a person finishes an edit, never per keystroke or after a pause, and only on a form control. - Reordering or moving a local list’s rows, undo or confirmation for
removeRow, and a Button that writes a field of its own row. - For collection rows: per-row pending or error state, optimistic updates, automatic refetch after a write, per-field writability, and bulk writes.
- Sorting, text search and paging inside the document: a collection is filtered and sorted by the host through its fetch inputs. See filter and sort a list.
- Authentication, persistence and URL routing — the host owns them.
- AI-assisted editing, responsive breakpoint authoring and free x/y placement.
- Converting a document between packs, third-party packs, and per-pack web fonts. Both packs use system font stacks and load nothing from the network.
- A document naming or carrying a theme, or raw CSS in a theme. The host chooses a theme, which names font families but never loads them. (Themes are edited in the designer’s Theme panel; see make a theme in the designer.)
- An editor-embedding API:
mica/editorexports the designer’sAppbut takes no document or change callbacks yet.
The project README’s roadmap describes where these are headed. Items there are direction, not commitments, and none of them is available until it appears in these pages.