{"name":"flowchart","title":"Flowchart","description":"","kind":"block","category":"agent","status":"beta","props":{"triggers":{"type":"array","items":{"value":"string","label":"string","caption":"string?"},"description":"What can start the workflow."},"trigger":{"type":"string","model":true,"description":"Value of the chosen trigger."},"source":{"type":"string","default":"record","description":"Name of the record the conditions read."},"properties":{"type":"array","items":{"value":"string","label":"string"},"description":"Properties a condition can test."},"choices":{"type":"object","description":"Values per property: { [property]: { value, label, meta? }[] }."},"conditions":{"type":"array","model":true,"items":{"id":"string","property":"string","value":"string"},"description":"The If / Else rows in order."},"labels":{"type":"object","description":"The fixed strings, partial: { trigger, condition, conditions, if, and, is, addCondition, rowOptions, rowProperty, rowValue, moveUp, moveDown, remove }. {n} in rowOptions / rowProperty / rowValue is the row's number."},"kind":{"type":"enum","values":["trigger","condition"],"part":"node","description":"Set per node; tints the kind pill and picks the card."}},"playground":{"name":"Playground","props":{"triggers":[{"value":"workspace-created","label":"Workspace created","caption":"Runs when a customer signs up"},{"value":"trial-ending","label":"Trial ends in 3 days","caption":"Runs three days before a trial ends"},{"value":"first-booking","label":"First booking made","caption":"Runs on a workspace's first booking"}],"trigger":"workspace-created","source":"workspace","properties":[{"value":"plan","label":"plan"},{"value":"industry","label":"industry"},{"value":"team-size","label":"team size"},{"value":"source","label":"signup source"}],"choices":{"plan":[{"value":"starter","label":"Starter","meta":"$19 / seat"},{"value":"team","label":"Team","meta":"$49 / seat"},{"value":"business","label":"Business","meta":"$99 / seat"},{"value":"enterprise","label":"Enterprise","meta":"Custom"}],"industry":[{"value":"dental","label":"Dental"},{"value":"healthcare","label":"Healthcare"},{"value":"logistics","label":"Logistics"},{"value":"real-estate","label":"Real estate"}],"team-size":[{"value":"1-5","label":"1–5 people"},{"value":"6-25","label":"6–25 people"},{"value":"26-100","label":"26–100 people"},{"value":"100+","label":"More than 100"}],"source":[{"value":"search","label":"Search"},{"value":"referral","label":"Customer referral"},{"value":"partner","label":"Partner: Dental Association of Oregon"}]},"conditions":[{"id":"c1","property":"plan","value":"business"}]},"width":420},"exampleFiles":[{"file":"default","title":"Onboard new Business workspaces"},{"file":"guided-setup","title":"Send partner dental groups to guided setup"},{"file":"no-conditions","title":"Remind every trial before it ends"}],"worstCase":[{"name":"Long names","width":360,"props":{"triggers":[{"value":"long","label":"A new wholesale order was created by Aleksandra Wiśniewska-Kowalczyk Logistics Holdings","caption":"Runs whenever bartholomew.fitzgerald@northwind-industries-holdings.example.com places a wholesale order for any location"}],"trigger":"long","source":"wholesale-order-line-item","properties":[{"value":"plan","label":"plan of the account including legacy contracts"}],"choices":{"plan":[{"value":"enterprise-plus","label":"Enterprise annual contract with premium support, SSO and data residency","meta":"Monthly"}]},"conditions":[{"id":"c1","property":"plan","value":"enterprise-plus"},{"id":"c2","property":"plan","value":"enterprise-plus"}]}},{"name":"One condition","width":420,"props":{"triggers":[{"value":"t","label":"T"}],"trigger":"t","source":"o","properties":[{"value":"p","label":"p"}],"choices":{"p":[{"value":"1","label":"1"}]},"conditions":[{"id":"c1","property":"p","value":"1"}]}},{"name":"Zero conditions","width":420,"props":{"triggers":[{"value":"order-created","label":"New order created","caption":"Runs when a new order is created"}],"trigger":"order-created","properties":[{"value":"plan","label":"plan"}],"choices":{"plan":[{"value":"enterprise","label":"Enterprise"}]},"conditions":[]}},{"name":"Huge values, twelve conditions","width":420,"props":{"triggers":[{"value":"big","label":"Order total above $12,480,000.00","caption":"Runs when 12,480 orders clear in one day"}],"trigger":"big","properties":[{"value":"total","label":"total"},{"value":"seats","label":"seats"}],"choices":{"total":[{"value":"huge","label":"$12,480,000,000.00"},{"value":"small","label":"$1"}],"seats":[{"value":"many","label":"12,480"}]},"conditions":[{"id":"c1","property":"total","value":"huge"},{"id":"c2","property":"seats","value":"many"},{"id":"c3","property":"total","value":"small"},{"id":"c4","property":"total","value":"huge"},{"id":"c5","property":"seats","value":"many"},{"id":"c6","property":"total","value":"huge"},{"id":"c7","property":"total","value":"small"},{"id":"c8","property":"seats","value":"many"},{"id":"c9","property":"total","value":"huge"},{"id":"c10","property":"total","value":"huge"},{"id":"c11","property":"seats","value":"many"},{"id":"c12","property":"total","value":"small"}]}},{"name":"Right-to-left","width":420,"props":{"triggers":[{"value":"new","label":"تم إنشاء طلب جديد","caption":"يعمل عند إنشاء طلب جديد"},{"value":"paid","label":"تم دفع الطلب"}],"trigger":"new","source":"الطلب","properties":[{"value":"plan","label":"الخطة"},{"value":"size","label":"الحجم"}],"choices":{"plan":[{"value":"team","label":"الفريق","meta":"شهري"},{"value":"enterprise","label":"المؤسسات"}],"size":[{"value":"large","label":"كبير"}]},"conditions":[{"id":"c1","property":"plan","value":"team"},{"id":"c2","property":"size","value":"large"}],"labels":{"trigger":"المُشغِّل","condition":"إذا / وإلا","conditions":"الشروط","if":"إذا","and":"و","is":"هو","addCondition":"إضافة شرط","rowOptions":"خيارات الشرط {n}","rowProperty":"خاصية الشرط {n}","rowValue":"قيمة الشرط {n}","moveUp":"تحريك لأعلى","moveDown":"تحريك لأسفل","remove":"إزالة"}}}],"anatomy":[{"part":"root","element":"div","description":"The dotted canvas"},{"part":"node","element":"div","repeat":true,"description":"Kind pill above a card; its kind (trigger or condition) is a recipe variant"},{"part":"kind","element":"span","description":"Kind pill, tinted by the kind variant"},{"part":"card","element":"button | div","description":"Trigger: the button that is its Menu trigger (data-state=open|closed, marked data-menu=\"trigger\"). Condition: role=group, labelled Conditions"},{"part":"icon","element":"span","description":"Tinted 36px icon box of the trigger card"},{"part":"text","element":"span"},{"part":"title","element":"span","description":"Trigger label; wraps, never truncates"},{"part":"caption","element":"span","optional":true},{"part":"caret","element":"span","description":"Says the card opens a menu; does not rotate"},{"part":"edge","element":"div","description":"Connector between the nodes, drawn in CSS from color.line-strong; aria-hidden"},{"part":"conditions","element":"ol"},{"part":"row","element":"li","repeat":true,"description":"Handle, joiner, clause. data-entering (set and cleared by the shared helper) while a row the pointer added is revealed; data-collapsed for its first frame (0fr)"},{"part":"handle","element":"button","description":"Grip; the trigger of the row Menu (Move up, Move down, Remove; marked data-menu=\"trigger\") and of our Tooltip with the same text. aria-label Condition N options"},{"part":"joiner","element":"span","description":"'If' on the first row, 'and' after"},{"part":"clause","element":"span","description":"Source, property select, operator, value select; wraps under itself"},{"part":"source","element":"span","description":"The record the condition reads (e.g. order); title carries the full name"},{"part":"source-icon","element":"span"},{"part":"source-text","element":"span","description":"Truncates; the full name is the source's title"},{"part":"operator","element":"span"},{"part":"add","element":"button","description":"The real Button (ghost sm) Add condition, marked data-flowchart=\"add\""}],"events":{"triggerChange":"(value: string)","conditionsChange":"(conditions: { id, property, value }[]) after a value or property change, an add, a move or a removal"},"states":["hover","press","focus-visible","open","disabled"],"tokens":["color.page","color.surface","color.hover","color.hover-2","color.ink","color.ink-2","color.ink-3","color.line-strong","color.accent","color.orange","shadow.hairline","shadow.card","shadow.raised","shadow.btn","radius.chip","radius.control","radius.card","radius.window","text.xs","text.sm","duration.fast","duration.base","duration.enter","easing.out-strong"],"a11y":{"role":"group of conditions (ordered list) under a trigger menu button","keyboard":["Tab order: trigger card, then per row the handle, the property select and the value select, then Add condition","Trigger card: Enter / Space / ArrowDown open the trigger menu (menu contract); picking a trigger updates the card and closes the menu; focus returns to the card","Row handle: Enter / Space / ArrowDown open Move up / Move down / Remove; after a move focus follows the row's handle, after a removal it lands on the next row's handle (or Add condition)","Property and value: the select contract; a new property resets the value to that property's first choice","Add condition: Enter / Space add a row and move focus to its property select; from the keyboard the row appears without the reveal"],"notes":["Reordering never needs a drag: the handle's menu moves the row.","Every select and handle is labelled with its row number ('Condition 2 value').","The connector is decoration (aria-hidden); order is carried by the DOM."]},"motion":["added row: it opens its room (its one grid row 0fr → 1fr over duration.reveal, easing.out-strong, clipped while it opens, so the card grows with it instead of snapping) while it fades up (fndn-fade-up over duration.enter, easing.out-strong), once (data-entering is removed when it ends, so a reorder cannot replay it); keyboard adds are instant","nothing else animates: no node drag, no connector draw, no caret rotation; reorders and removals are instant","trigger card and handle: colour / shadow feedback at duration.fast and duration.base; the selects, menus and button keep their own motion"]}