makersclaw 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/package.json +1 -1
- package/r/activity-log.json +52 -0
- package/r/agent-changes.json +51 -0
- package/r/agent-chat.json +53 -0
- package/r/agent-column.json +85 -0
- package/r/agent-dock.json +57 -0
- package/r/agent-kit.json +49 -0
- package/r/agent-marks.json +49 -0
- package/r/agent-pane.json +93 -0
- package/r/ai-action.json +56 -0
- package/r/annotate.json +3 -3
- package/r/approval-request.json +2 -2
- package/r/approval.json +54 -0
- package/r/ask-bar.json +50 -0
- package/r/audio-player.json +2 -2
- package/r/auth-form.json +2 -2
- package/r/automation-editor.json +66 -0
- package/r/automation-list.json +57 -0
- package/r/automation-model.json +118 -0
- package/r/automations-screen.json +71 -0
- package/r/board.json +2 -2
- package/r/calendar-view.json +3 -3
- package/r/cart.json +2 -2
- package/r/chart.json +2 -2
- package/r/chat-pane.json +84 -0
- package/r/chat.json +2 -2
- package/r/code-editor.json +2 -2
- package/r/comment-box.json +3 -3
- package/r/connect-card.json +51 -0
- package/r/contact-section.json +2 -2
- package/r/core.json +13 -7
- package/r/cost.json +51 -0
- package/r/csv-import.json +3 -3
- package/r/data-picker.json +60 -0
- package/r/data-table.json +2 -2
- package/r/diagram.json +2 -2
- package/r/doc-editor.json +2 -2
- package/r/doc-page.json +3 -3
- package/r/email-render.json +2 -2
- package/r/faq.json +2 -2
- package/r/file-upload.json +2 -2
- package/r/first-run.json +63 -0
- package/r/fix-note.json +57 -0
- package/r/flow-canvas.json +2 -2
- package/r/flow-editor.json +79 -0
- package/r/footer.json +2 -2
- package/r/gantt.json +3 -3
- package/r/job-panel.json +2 -2
- package/r/json-editor.json +3 -3
- package/r/library-shelf.json +56 -0
- package/r/map.json +2 -2
- package/r/margin-notes.json +67 -0
- package/r/menubar.json +2 -2
- package/r/mind-map.json +3 -3
- package/r/navigation-menu.json +2 -2
- package/r/needs-you.json +55 -0
- package/r/order-detail.json +2 -2
- package/r/org-chart.json +3 -3
- package/r/pace-bar.json +69 -0
- package/r/page-builder.json +2 -2
- package/r/payment-methods.json +2 -2
- package/r/pdf-document.json +2 -2
- package/r/pdf-viewer.json +2 -2
- package/r/product-detail.json +2 -2
- package/r/product-grid.json +3 -3
- package/r/record-form.json +2 -2
- package/r/record-grid.json +52 -0
- package/r/record-notes.json +4 -4
- package/r/registry.json +4086 -1512
- package/r/run-history.json +52 -0
- package/r/run-view.json +80 -0
- package/r/schedule-card.json +54 -0
- package/r/schedule-engine.json +79 -0
- package/r/schedule-gantt.json +83 -0
- package/r/schedule-ruler.json +64 -0
- package/r/search-dialog.json +2 -2
- package/r/settings-list.json +2 -2
- package/r/setup-checklist.json +2 -2
- package/r/share-dialog.json +2 -2
- package/r/sidebar.json +2 -2
- package/r/signature-pad.json +2 -2
- package/r/sketch-canvas.json +2 -2
- package/r/source-receipt.json +52 -0
- package/r/spreadsheet.json +3 -3
- package/r/stat-cards.json +3 -3
- package/r/step-picker.json +53 -0
- package/r/step-settings.json +72 -0
- package/r/suggestion.json +58 -0
- package/r/sum-bar.json +64 -0
- package/r/task-list.json +3 -3
- package/r/task-model.json +2 -2
- package/r/testimonials.json +2 -2
- package/r/tier-map.json +67 -0
- package/r/time-grid.json +73 -0
- package/r/time-strip.json +64 -0
- package/r/top-bar.json +66 -0
- package/r/transaction-list.json +2 -2
- package/r/trigger-picker.json +61 -0
- package/r/whiteboard.json +3 -3
- package/r/workflow-view.json +55 -0
- package/registry/blocks/activity-log/README.md +112 -0
- package/registry/blocks/activity-log/activity-log.jsx +351 -0
- package/registry/blocks/activity-log/block.json +33 -0
- package/registry/blocks/activity-log/demo.jsx +48 -0
- package/registry/blocks/activity-log/index.js +4 -0
- package/registry/blocks/agent-changes/README.md +94 -0
- package/registry/blocks/agent-changes/agent-changes.jsx +118 -0
- package/registry/blocks/agent-changes/block.json +28 -0
- package/registry/blocks/agent-changes/demo.jsx +39 -0
- package/registry/blocks/agent-changes/index.js +3 -0
- package/registry/blocks/agent-chat/README.md +145 -0
- package/registry/blocks/agent-chat/agent-chat.jsx +415 -0
- package/registry/blocks/agent-chat/block.json +30 -0
- package/registry/blocks/agent-chat/demo.jsx +165 -0
- package/registry/blocks/agent-chat/index.js +3 -0
- package/registry/blocks/agent-column/README.md +197 -0
- package/registry/blocks/agent-column/agent-column.jsx +492 -0
- package/registry/blocks/agent-column/block.json +67 -0
- package/registry/blocks/agent-column/column-picker.jsx +163 -0
- package/registry/blocks/agent-column/demo.jsx +50 -0
- package/registry/blocks/agent-column/index.js +7 -0
- package/registry/blocks/agent-column/model.js +164 -0
- package/registry/blocks/agent-column/receipt.jsx +483 -0
- package/registry/blocks/agent-column/spreadsheet-type.jsx +24 -0
- package/registry/blocks/agent-dock/README.md +210 -0
- package/registry/blocks/agent-dock/agent-dock.jsx +356 -0
- package/registry/blocks/agent-dock/block.json +47 -0
- package/registry/blocks/agent-dock/demo.jsx +153 -0
- package/registry/blocks/agent-dock/dock-model.js +118 -0
- package/registry/blocks/agent-dock/index.js +5 -0
- package/registry/blocks/agent-kit/README.md +73 -0
- package/registry/blocks/agent-kit/agent-kit.jsx +86 -0
- package/registry/blocks/agent-kit/block.json +10 -0
- package/registry/blocks/agent-kit/demo.jsx +35 -0
- package/registry/blocks/agent-kit/index.js +3 -0
- package/registry/blocks/agent-marks/README.md +80 -0
- package/registry/blocks/agent-marks/agent-marks.jsx +133 -0
- package/registry/blocks/agent-marks/block.json +27 -0
- package/registry/blocks/agent-marks/demo.jsx +49 -0
- package/registry/blocks/agent-marks/index.js +3 -0
- package/registry/blocks/agent-pane/README.md +225 -0
- package/registry/blocks/agent-pane/agent-pane.jsx +244 -0
- package/registry/blocks/agent-pane/block.json +41 -0
- package/registry/blocks/agent-pane/composer.jsx +6 -0
- package/registry/blocks/agent-pane/demo.jsx +233 -0
- package/registry/blocks/agent-pane/dock-context.js +10 -0
- package/registry/blocks/agent-pane/index.js +4 -0
- package/registry/blocks/agent-pane/prose.jsx +84 -0
- package/registry/blocks/agent-pane/questions.jsx +134 -0
- package/registry/blocks/agent-pane/transcript.jsx +268 -0
- package/registry/blocks/agent-pane/work.jsx +368 -0
- package/registry/blocks/ai-action/README.md +94 -0
- package/registry/blocks/ai-action/ai-action.jsx +188 -0
- package/registry/blocks/ai-action/block.json +34 -0
- package/registry/blocks/ai-action/demo.jsx +93 -0
- package/registry/blocks/ai-action/index.js +3 -0
- package/registry/blocks/approval/README.md +145 -0
- package/registry/blocks/approval/approval.jsx +163 -0
- package/registry/blocks/approval/block.json +31 -0
- package/registry/blocks/approval/demo.jsx +121 -0
- package/registry/blocks/approval/index.js +3 -0
- package/registry/blocks/ask-bar/README.md +105 -0
- package/registry/blocks/ask-bar/ask-bar.jsx +166 -0
- package/registry/blocks/ask-bar/block.json +26 -0
- package/registry/blocks/ask-bar/demo.jsx +78 -0
- package/registry/blocks/ask-bar/index.js +3 -0
- package/registry/blocks/automation-editor/README.md +291 -0
- package/registry/blocks/automation-editor/automation-editor.jsx +656 -0
- package/registry/blocks/automation-editor/block.json +39 -0
- package/registry/blocks/automation-editor/demo.jsx +284 -0
- package/registry/blocks/automation-editor/index.js +4 -0
- package/registry/blocks/automation-editor/run-inputs.jsx +82 -0
- package/registry/blocks/automation-list/README.md +129 -0
- package/registry/blocks/automation-list/automation-list.jsx +476 -0
- package/registry/blocks/automation-list/block.json +35 -0
- package/registry/blocks/automation-list/demo.jsx +67 -0
- package/registry/blocks/automation-list/index.js +3 -0
- package/registry/blocks/automation-model/README.md +109 -0
- package/registry/blocks/automation-model/block.json +135 -0
- package/registry/blocks/automation-model/catalog.js +256 -0
- package/registry/blocks/automation-model/check.js +161 -0
- package/registry/blocks/automation-model/demo.jsx +42 -0
- package/registry/blocks/automation-model/edit.js +262 -0
- package/registry/blocks/automation-model/fixes.js +287 -0
- package/registry/blocks/automation-model/glyph.jsx +13 -0
- package/registry/blocks/automation-model/graph.js +410 -0
- package/registry/blocks/automation-model/index.js +33 -0
- package/registry/blocks/automation-model/overlay.js +175 -0
- package/registry/blocks/automation-model/parts.jsx +94 -0
- package/registry/blocks/automation-model/schedule.js +53 -0
- package/registry/blocks/automation-model/templates.js +128 -0
- package/registry/blocks/automation-model/values.js +29 -0
- package/registry/blocks/automation-model/words.js +439 -0
- package/registry/blocks/automations-screen/README.md +207 -0
- package/registry/blocks/automations-screen/automations-screen.jsx +452 -0
- package/registry/blocks/automations-screen/block.json +47 -0
- package/registry/blocks/automations-screen/demo.jsx +364 -0
- package/registry/blocks/automations-screen/index.js +4 -0
- package/registry/blocks/automations-screen/screen-model.js +129 -0
- package/registry/blocks/chat-pane/README.md +143 -0
- package/registry/blocks/chat-pane/block.json +48 -0
- package/registry/blocks/chat-pane/chat-attach.js +166 -0
- package/registry/blocks/chat-pane/chat-composer.jsx +195 -0
- package/registry/blocks/chat-pane/chat-context.js +17 -0
- package/registry/blocks/chat-pane/chat-model.js +43 -0
- package/registry/blocks/chat-pane/chat-pane.jsx +398 -0
- package/registry/blocks/chat-pane/chats-list.jsx +52 -0
- package/registry/blocks/chat-pane/demo.jsx +103 -0
- package/registry/blocks/chat-pane/index.js +9 -0
- package/registry/blocks/connect-card/README.md +99 -0
- package/registry/blocks/connect-card/block.json +10 -0
- package/registry/blocks/connect-card/connect-card.jsx +103 -0
- package/registry/blocks/connect-card/demo.jsx +49 -0
- package/registry/blocks/connect-card/index.js +3 -0
- package/registry/blocks/cost/README.md +115 -0
- package/registry/blocks/cost/block.json +10 -0
- package/registry/blocks/cost/cost.jsx +176 -0
- package/registry/blocks/cost/demo.jsx +66 -0
- package/registry/blocks/cost/index.js +3 -0
- package/registry/blocks/data-picker/README.md +81 -0
- package/registry/blocks/data-picker/block.json +38 -0
- package/registry/blocks/data-picker/data-picker.jsx +210 -0
- package/registry/blocks/data-picker/demo.jsx +34 -0
- package/registry/blocks/data-picker/fields.js +89 -0
- package/registry/blocks/data-picker/index.js +4 -0
- package/registry/blocks/data-table/demo.jsx +1 -1
- package/registry/blocks/first-run/README.md +118 -0
- package/registry/blocks/first-run/block.json +11 -0
- package/registry/blocks/first-run/demo.jsx +88 -0
- package/registry/blocks/first-run/first-run-model.js +51 -0
- package/registry/blocks/first-run/first-run.jsx +156 -0
- package/registry/blocks/first-run/index.js +5 -0
- package/registry/blocks/first-run/probe-rules.js +26 -0
- package/registry/blocks/fix-note/README.md +79 -0
- package/registry/blocks/fix-note/block.json +35 -0
- package/registry/blocks/fix-note/demo.jsx +30 -0
- package/registry/blocks/fix-note/fix-note.jsx +235 -0
- package/registry/blocks/fix-note/index.js +3 -0
- package/registry/blocks/flow-editor/README.md +108 -0
- package/registry/blocks/flow-editor/block.json +44 -0
- package/registry/blocks/flow-editor/demo.jsx +115 -0
- package/registry/blocks/flow-editor/flow-canvas.jsx +568 -0
- package/registry/blocks/flow-editor/flow-editor.jsx +154 -0
- package/registry/blocks/flow-editor/index.js +6 -0
- package/registry/blocks/flow-editor/minimap.jsx +78 -0
- package/registry/blocks/flow-editor/outline.jsx +134 -0
- package/registry/blocks/library-shelf/README.md +117 -0
- package/registry/blocks/library-shelf/block.json +28 -0
- package/registry/blocks/library-shelf/demo.jsx +68 -0
- package/registry/blocks/library-shelf/index.js +3 -0
- package/registry/blocks/library-shelf/library-shelf.jsx +211 -0
- package/registry/blocks/library-shelf/probe-rules.js +15 -0
- package/registry/blocks/margin-notes/README.md +222 -0
- package/registry/blocks/margin-notes/block.json +10 -0
- package/registry/blocks/margin-notes/demo.jsx +144 -0
- package/registry/blocks/margin-notes/index.js +20 -0
- package/registry/blocks/margin-notes/margin-model.js +224 -0
- package/registry/blocks/margin-notes/margin-notes.jsx +465 -0
- package/registry/blocks/needs-you/README.md +177 -0
- package/registry/blocks/needs-you/block.json +34 -0
- package/registry/blocks/needs-you/demo.jsx +143 -0
- package/registry/blocks/needs-you/index.js +3 -0
- package/registry/blocks/needs-you/needs-you.jsx +441 -0
- package/registry/blocks/pace-bar/README.md +230 -0
- package/registry/blocks/pace-bar/block.json +10 -0
- package/registry/blocks/pace-bar/demo.jsx +255 -0
- package/registry/blocks/pace-bar/index.js +22 -0
- package/registry/blocks/pace-bar/pace-bar.jsx +461 -0
- package/registry/blocks/pace-bar/pace-model.js +288 -0
- package/registry/blocks/record-grid/README.md +100 -0
- package/registry/blocks/record-grid/block.json +28 -0
- package/registry/blocks/record-grid/demo.jsx +43 -0
- package/registry/blocks/record-grid/index.js +3 -0
- package/registry/blocks/record-grid/record-grid.jsx +251 -0
- package/registry/blocks/run-history/README.md +138 -0
- package/registry/blocks/run-history/block.json +10 -0
- package/registry/blocks/run-history/demo.jsx +74 -0
- package/registry/blocks/run-history/index.js +3 -0
- package/registry/blocks/run-history/run-history.jsx +218 -0
- package/registry/blocks/run-view/README.md +174 -0
- package/registry/blocks/run-view/block.json +50 -0
- package/registry/blocks/run-view/demo.jsx +286 -0
- package/registry/blocks/run-view/index.js +5 -0
- package/registry/blocks/run-view/run-controls.jsx +266 -0
- package/registry/blocks/run-view/run-view.jsx +236 -0
- package/registry/blocks/run-view/runs-list.jsx +99 -0
- package/registry/blocks/schedule-card/README.md +121 -0
- package/registry/blocks/schedule-card/block.json +10 -0
- package/registry/blocks/schedule-card/demo.jsx +82 -0
- package/registry/blocks/schedule-card/index.js +3 -0
- package/registry/blocks/schedule-card/schedule-card.jsx +136 -0
- package/registry/blocks/schedule-engine/README.md +137 -0
- package/registry/blocks/schedule-engine/block.json +10 -0
- package/registry/blocks/schedule-engine/demo.jsx +82 -0
- package/registry/blocks/schedule-engine/engine.js +769 -0
- package/registry/blocks/schedule-engine/index.js +9 -0
- package/registry/blocks/schedule-engine/ops.js +71 -0
- package/registry/blocks/schedule-engine/place.js +294 -0
- package/registry/blocks/schedule-engine/tree.js +79 -0
- package/registry/blocks/schedule-engine/waits.js +80 -0
- package/registry/blocks/schedule-gantt/README.md +159 -0
- package/registry/blocks/schedule-gantt/block.json +10 -0
- package/registry/blocks/schedule-gantt/demo.jsx +223 -0
- package/registry/blocks/schedule-gantt/gantt-model.js +219 -0
- package/registry/blocks/schedule-gantt/geometry.js +176 -0
- package/registry/blocks/schedule-gantt/index.js +26 -0
- package/registry/blocks/schedule-gantt/schedule-gantt.jsx +882 -0
- package/registry/blocks/schedule-gantt/sheet.jsx +372 -0
- package/registry/blocks/schedule-gantt/track.jsx +190 -0
- package/registry/blocks/schedule-ruler/README.md +148 -0
- package/registry/blocks/schedule-ruler/block.json +10 -0
- package/registry/blocks/schedule-ruler/demo.jsx +181 -0
- package/registry/blocks/schedule-ruler/index.js +21 -0
- package/registry/blocks/schedule-ruler/ruler-model.js +239 -0
- package/registry/blocks/schedule-ruler/schedule-ruler.jsx +548 -0
- package/registry/blocks/source-receipt/README.md +97 -0
- package/registry/blocks/source-receipt/block.json +30 -0
- package/registry/blocks/source-receipt/demo.jsx +71 -0
- package/registry/blocks/source-receipt/index.js +3 -0
- package/registry/blocks/source-receipt/source-receipt.jsx +107 -0
- package/registry/blocks/spreadsheet/spreadsheet.jsx +15 -1
- package/registry/blocks/step-picker/README.md +78 -0
- package/registry/blocks/step-picker/block.json +31 -0
- package/registry/blocks/step-picker/demo.jsx +23 -0
- package/registry/blocks/step-picker/index.js +3 -0
- package/registry/blocks/step-picker/step-picker.jsx +144 -0
- package/registry/blocks/step-settings/README.md +100 -0
- package/registry/blocks/step-settings/block.json +44 -0
- package/registry/blocks/step-settings/demo.jsx +93 -0
- package/registry/blocks/step-settings/fields.jsx +58 -0
- package/registry/blocks/step-settings/flow-settings.jsx +115 -0
- package/registry/blocks/step-settings/index.js +5 -0
- package/registry/blocks/step-settings/step-settings.jsx +290 -0
- package/registry/blocks/suggestion/README.md +171 -0
- package/registry/blocks/suggestion/block.json +40 -0
- package/registry/blocks/suggestion/demo.jsx +91 -0
- package/registry/blocks/suggestion/index.js +3 -0
- package/registry/blocks/suggestion/suggestion.jsx +436 -0
- package/registry/blocks/sum-bar/README.md +122 -0
- package/registry/blocks/sum-bar/block.json +10 -0
- package/registry/blocks/sum-bar/demo.jsx +110 -0
- package/registry/blocks/sum-bar/index.js +5 -0
- package/registry/blocks/sum-bar/sum-bar.jsx +209 -0
- package/registry/blocks/sum-bar/sum-model.js +126 -0
- package/registry/blocks/tier-map/README.md +217 -0
- package/registry/blocks/tier-map/block.json +10 -0
- package/registry/blocks/tier-map/demo.jsx +222 -0
- package/registry/blocks/tier-map/index.js +24 -0
- package/registry/blocks/tier-map/tier-map.jsx +574 -0
- package/registry/blocks/tier-map/tier-model.js +318 -0
- package/registry/blocks/time-grid/README.md +305 -0
- package/registry/blocks/time-grid/block.json +10 -0
- package/registry/blocks/time-grid/demo.jsx +279 -0
- package/registry/blocks/time-grid/grid-model.js +322 -0
- package/registry/blocks/time-grid/index.js +25 -0
- package/registry/blocks/time-grid/time-grid.jsx +1325 -0
- package/registry/blocks/time-strip/README.md +141 -0
- package/registry/blocks/time-strip/block.json +10 -0
- package/registry/blocks/time-strip/demo.jsx +129 -0
- package/registry/blocks/time-strip/index.js +19 -0
- package/registry/blocks/time-strip/strip-model.js +178 -0
- package/registry/blocks/time-strip/time-strip.jsx +260 -0
- package/registry/blocks/top-bar/README.md +149 -0
- package/registry/blocks/top-bar/block.json +35 -0
- package/registry/blocks/top-bar/demo.jsx +78 -0
- package/registry/blocks/top-bar/index.js +5 -0
- package/registry/blocks/top-bar/probe-rules.js +74 -0
- package/registry/blocks/top-bar/top-bar-model.js +152 -0
- package/registry/blocks/top-bar/top-bar.jsx +244 -0
- package/registry/blocks/trigger-picker/README.md +98 -0
- package/registry/blocks/trigger-picker/block.json +38 -0
- package/registry/blocks/trigger-picker/demo.jsx +59 -0
- package/registry/blocks/trigger-picker/index.js +3 -0
- package/registry/blocks/trigger-picker/trigger-picker.jsx +374 -0
- package/registry/blocks/workflow-view/README.md +123 -0
- package/registry/blocks/workflow-view/block.json +10 -0
- package/registry/blocks/workflow-view/demo.jsx +90 -0
- package/registry/blocks/workflow-view/index.js +3 -0
- package/registry/blocks/workflow-view/workflow-view.jsx +203 -0
- package/src/install.mjs +77 -16
- package/src/registry.mjs +3 -0
- package/templates/next/browser/lib/data.js +6 -1
- package/templates/next/files/README.md +627 -24
- package/templates/next/files/check/automation-format.ts +2103 -0
- package/templates/next/files/check/automation-package.ts +142 -0
- package/templates/next/files/check/run.mjs +968 -9
- package/templates/next/files/components/ui/field.jsx +17 -4
- package/templates/next/files/components/ui/icon.jsx +13 -0
- package/templates/next/files/components/ui/index.js +2 -1
- package/templates/next/files/components/ui/layout.jsx +77 -2
- package/templates/next/files/components/ui/notice.jsx +70 -0
- package/templates/next/files/components/ui/page.jsx +124 -0
- package/templates/next/files/components/ui/stat.jsx +22 -7
- package/templates/next/files/components/ui/toast.jsx +6 -3
- package/templates/next/files/lib/automations.js +660 -0
- package/templates/next/files/lib/claw.js +241 -5
- package/templates/next/files/lib/door.js +92 -0
- package/templates/next/files/lib/hooks.js +1627 -8
- package/templates/next/files/lib/platform.js +529 -21
- package/templates/next/template.json +13 -3
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# FlowEditor
|
|
2
|
+
|
|
3
|
+
An automation as a node canvas, in the app's theme. It draws a definition
|
|
4
|
+
and says what was pressed; the screen around it holds the definition and
|
|
5
|
+
applies the edits (`automation-editor` is that screen, ready made).
|
|
6
|
+
|
|
7
|
+
- **The canvas** — drag the ground to pan; the wheel pans, Ctrl or ⌘ with
|
|
8
|
+
the wheel and a pinch zoom; **+**, **−**, **0** and the fit button; a map
|
|
9
|
+
in the corner you can press and drag. Icon cards with a port on each
|
|
10
|
+
side, curved connectors with arrowheads, the card's number above it and
|
|
11
|
+
its words below.
|
|
12
|
+
- **A + on every connector** and at the end of every path. A press opens
|
|
13
|
+
the step picker there and the new step lands exactly where the + was
|
|
14
|
+
(`onInsert(slot, kind)`).
|
|
15
|
+
- **Branches** — a condition draws its Yes and No paths one above the
|
|
16
|
+
other, labelled, and they meet again at a small join dot where the next
|
|
17
|
+
step carries on. A Stop ends its path.
|
|
18
|
+
- **For each** — a dashed box around its steps with a door in and a door
|
|
19
|
+
out; fold it to one card that lists them.
|
|
20
|
+
- **The agent and the model call** — an agent step is solid in the app's
|
|
21
|
+
accent (`primary`, as the kit's `AgentMark` draws the agent) with an "A"
|
|
22
|
+
mark; a model call is outlined in it with a "model" mark; every other step
|
|
23
|
+
is plain. Shape and a word say which, never colour alone.
|
|
24
|
+
- **A palette** along the bottom (wide enough), or a round + (narrow).
|
|
25
|
+
- **The outline** — the same flow as a nested list: the phone's second
|
|
26
|
+
view, and a way in by keyboard or a screen reader. Every step is a
|
|
27
|
+
button; every place a step can go has an "Add a step" button.
|
|
28
|
+
- **A run** — with an `overlay` (from `overlayOf`) every card wears how it
|
|
29
|
+
went (done, running, failed, waiting, skipped, fixed by the agent,
|
|
30
|
+
not reached), the path taken is lit and the others dimmed, and a looped
|
|
31
|
+
step says how many times. A **test run** (a dry run) draws a step that
|
|
32
|
+
stood in for itself as a dashed card with a pencil and one line of what
|
|
33
|
+
it would do ("Would send with send_email."); a step that needs what such
|
|
34
|
+
a step would have made says "Not checked". Both read off `overlayOf`'s
|
|
35
|
+
`would` state and the summary's `would` and `unchecked`.
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
import { FlowEditor } from "../components/blocks/flow-editor"; // a Makersclaw app
|
|
39
|
+
import { FlowEditor } from "@/components/makersclaw/blocks/flow-editor"; // a shadcn project
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`makersclaw add flow-editor` lays `step-picker` and `automation-model`
|
|
43
|
+
with it. A client component. It takes the width it is given and its own
|
|
44
|
+
width decides its layout; give it a parent with a height (it fills it, and
|
|
45
|
+
is at least 320 px tall). It never scrolls the page.
|
|
46
|
+
|
|
47
|
+
## Props
|
|
48
|
+
|
|
49
|
+
### FlowEditor
|
|
50
|
+
|
|
51
|
+
- `def` — the definition shown (`{ trigger, steps, … }`).
|
|
52
|
+
- `selectedId`, `onSelect(id | null)` — a step id, `"trigger"`, or none.
|
|
53
|
+
- `editable` — the + buttons and the palette. Leave it out to look.
|
|
54
|
+
- `onInsert(slot, kind)` — a + was pressed and a kind chosen. `slot` is
|
|
55
|
+
`{ list, index }`: pass it to automation-model's `insertStep` or
|
|
56
|
+
`addStep(def, slot, kind)`.
|
|
57
|
+
- `onAddAtSelection(kind)` — the palette (or the round add) chose a kind.
|
|
58
|
+
- `overlay` — a run's `overlayOf(layout, steps, status)`, or null.
|
|
59
|
+
- `flagged` — a `Set` of step ids with something to fix (a red mark).
|
|
60
|
+
- `prices` — a `Map` of step id → `{ credits, max }`: a paid step's price
|
|
61
|
+
tag ("about 3 cr"), from `priceMap(estimate)`.
|
|
62
|
+
- `fitKey` — changes when the picture should fit again (another
|
|
63
|
+
automation, another run). `revealId` — pan so this step is in view.
|
|
64
|
+
- `runnable` — a `Set` of the kinds the platform runs.
|
|
65
|
+
- `undo` — `{ canUndo, canRedo, onUndo, onRedo }`: draws the history
|
|
66
|
+
buttons. `onOpenFlow` — draws the gear (the automation's own settings).
|
|
67
|
+
- `className`.
|
|
68
|
+
|
|
69
|
+
### The parts
|
|
70
|
+
|
|
71
|
+
`FlowCanvas` (the canvas alone, given a `layout`), `StepOutline` (the
|
|
72
|
+
list), `Minimap`.
|
|
73
|
+
|
|
74
|
+
## Never
|
|
75
|
+
|
|
76
|
+
- Never edit the definition inside it: it only says what was pressed.
|
|
77
|
+
- Never a state by colour alone: each card has its mark and its word.
|
|
78
|
+
- Never a graph with a free arrow: the format is a tree, so a branch only
|
|
79
|
+
meets again where its condition ends.
|
|
80
|
+
|
|
81
|
+
## Example
|
|
82
|
+
|
|
83
|
+
```jsx
|
|
84
|
+
"use client";
|
|
85
|
+
import { useState } from "react";
|
|
86
|
+
import { addStep, blankAutomation } from "../components/blocks/automation-model";
|
|
87
|
+
import { FlowEditor } from "../components/blocks/flow-editor";
|
|
88
|
+
|
|
89
|
+
export default function Flow() {
|
|
90
|
+
const [def, setDef] = useState(() => ({ ...blankAutomation("Monday note", "monday-note", { type: "schedule", cron: "0 9 * * 1", tz: "team" }), steps: [{ id: "note", kind: "notify", message: "Look at the week ahead." }] }));
|
|
91
|
+
const [selected, setSelected] = useState(null);
|
|
92
|
+
return (
|
|
93
|
+
<div className="flex h-[560px] flex-col rounded-lg border border-border">
|
|
94
|
+
<FlowEditor
|
|
95
|
+
def={def}
|
|
96
|
+
editable
|
|
97
|
+
selectedId={selected}
|
|
98
|
+
onSelect={setSelected}
|
|
99
|
+
onInsert={(slot, kind) => {
|
|
100
|
+
const r = addStep(def, slot, kind);
|
|
101
|
+
setDef(r.def);
|
|
102
|
+
setSelected(r.id);
|
|
103
|
+
}}
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "flow-editor",
|
|
3
|
+
"title": "FlowEditor",
|
|
4
|
+
"description": "An automation as a node canvas, in the app's theme: pan, zoom, fit and a map; icon cards with ports and curved connectors with arrowheads; a + on every connector and at every path's end; labelled Yes/No branches that meet again at a join; a dashed for-each box that folds to one card; the app's accent on agent and model steps (solid for the agent, outlined for a model call); a palette of the kinds; undo and redo; and an outline view of the same flow for a thumb or a keyboard. FlowEditor draws a definition and says what was pressed (insert, select, fold); FlowCanvas, StepOutline and Minimap are its parts. In a run it wears an overlay: each card shows how it went, the path taken is lit and the others dimmed, a card the agent fixed says so.",
|
|
5
|
+
"useWhen": "An app shows what an automation does as a flow a member can read and change: a CRM's morning read, an inbox sweep, a nightly import, an event-driven workflow. For the whole page (header, panels, save) place automation-editor; for one run use run-view; for a read-only graph of a job's run top to bottom use workflow-view. Not a free-form board (flow-canvas) and not a mind map.",
|
|
6
|
+
"tags": [
|
|
7
|
+
"automation",
|
|
8
|
+
"workflow",
|
|
9
|
+
"canvas",
|
|
10
|
+
"node",
|
|
11
|
+
"flow",
|
|
12
|
+
"graph",
|
|
13
|
+
"trigger",
|
|
14
|
+
"steps",
|
|
15
|
+
"branches",
|
|
16
|
+
"condition",
|
|
17
|
+
"loop",
|
|
18
|
+
"for each",
|
|
19
|
+
"n8n",
|
|
20
|
+
"make",
|
|
21
|
+
"zapier",
|
|
22
|
+
"builder",
|
|
23
|
+
"editor",
|
|
24
|
+
"run",
|
|
25
|
+
"overlay"
|
|
26
|
+
],
|
|
27
|
+
"exports": [
|
|
28
|
+
"FlowCanvas",
|
|
29
|
+
"FlowEditor",
|
|
30
|
+
"Minimap",
|
|
31
|
+
"StepOutline"
|
|
32
|
+
],
|
|
33
|
+
"files": [
|
|
34
|
+
"index.js",
|
|
35
|
+
"flow-canvas.jsx",
|
|
36
|
+
"flow-editor.jsx",
|
|
37
|
+
"outline.jsx",
|
|
38
|
+
"minimap.jsx"
|
|
39
|
+
],
|
|
40
|
+
"requires": [
|
|
41
|
+
"automation-model",
|
|
42
|
+
"step-picker"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// FlowEditor with a pretend automation — the gallery's and the smoke
|
|
4
|
+
// test's surface. Not installed into apps. Edit it (a + inserts a step, a
|
|
5
|
+
// card selects), then look at a run: the path taken is lit and the others
|
|
6
|
+
// dimmed, a step the agent fixed says so. A width picker shows the layout
|
|
7
|
+
// at 1280, 800, 368 and 320 px of the block's own width.
|
|
8
|
+
import { useMemo, useState } from "react";
|
|
9
|
+
import { Button, ButtonGroup } from "../components/ui";
|
|
10
|
+
import { FlowEditor } from "../components/blocks/flow-editor";
|
|
11
|
+
import { addStep, flaggedSteps, checkAutomation, layoutAutomation, overlayOf, priceMap, triggerWords } from "../components/blocks/automation-model";
|
|
12
|
+
|
|
13
|
+
const MORNING = {
|
|
14
|
+
format: 1,
|
|
15
|
+
key: "morning-read",
|
|
16
|
+
name: "Morning read",
|
|
17
|
+
does: "Reads your mail, saves who you met, drafts the follow-ups that are owed.",
|
|
18
|
+
trigger: { type: "schedule", cron: "0 7 * * 1-5", tz: "team" },
|
|
19
|
+
inputs: {},
|
|
20
|
+
settings: { overlap: "skip", on_failure: "retry_then_agent", only_if_changed: false },
|
|
21
|
+
steps: [
|
|
22
|
+
{
|
|
23
|
+
id: "gate",
|
|
24
|
+
kind: "condition",
|
|
25
|
+
label: "Is the morning read on?",
|
|
26
|
+
if: "{{ trigger.at }}",
|
|
27
|
+
then: [{ id: "mail", kind: "tool", label: "Read the mail since the last read", needs: { category: "mail" }, tool: "list_messages", input: { since: "{{ trigger.at }}", limit: 200 } }],
|
|
28
|
+
else: [{ id: "off", kind: "stop", message: "Switched off" }],
|
|
29
|
+
},
|
|
30
|
+
{ id: "touches", kind: "action", label: "Save who wrote", action: "record_touches", input: { touches: "{{ steps.mail.output.messages }}" } },
|
|
31
|
+
{
|
|
32
|
+
id: "drafts",
|
|
33
|
+
kind: "loop",
|
|
34
|
+
over: "{{ steps.touches.output.owed }}",
|
|
35
|
+
max: 8,
|
|
36
|
+
steps: [
|
|
37
|
+
{ id: "draft", kind: "llm", label: "Write the follow-up", tier: "smart", prompt: "Write a short follow-up to {{ item.name }}." },
|
|
38
|
+
{ id: "save", kind: "action", label: "Save the draft", action: "suggest", input: { person: "{{ item.id }}", body: "{{ steps.draft.output.text }}" } },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{ id: "check", kind: "agent", label: "Look at anything odd", instructions: "Read the list and say what looks wrong.", cap_credits: 40 },
|
|
42
|
+
{ id: "tell", kind: "notify", message: "Morning read done." },
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const T0 = "2026-10-12T07:00:00.000Z";
|
|
47
|
+
const row = (step_id, over = {}) => ({ path: step_id, step_id, kind: "notify", attempt: 1, status: "done", started_at: T0, ended_at: T0, credits: 0, error: null, ...over });
|
|
48
|
+
const RUN = [
|
|
49
|
+
row("gate", { kind: "condition", output: { taken: "then" } }),
|
|
50
|
+
row("mail", { kind: "tool" }),
|
|
51
|
+
row("touches", { kind: "action", fix: { by: "agent", kind: "format", before: "Ana@x.com ", after: "ana@x.com", why: "The mail tool refuses spaces." } }),
|
|
52
|
+
row("drafts", { kind: "loop" }),
|
|
53
|
+
row("draft", { path: "drafts[0]/draft", kind: "llm", credits: 1.2 }),
|
|
54
|
+
row("save", { path: "drafts[0]/save", kind: "action" }),
|
|
55
|
+
row("draft", { path: "drafts[1]/draft", kind: "llm", credits: 1.1 }),
|
|
56
|
+
row("save", { path: "drafts[1]/save", kind: "action", status: "failed", error: { code: "x", words: "That person was removed." } }),
|
|
57
|
+
];
|
|
58
|
+
const ESTIMATE = { credits: 5, credits_max: 60, steps: [{ id: "draft", credits: 1.2, credits_max: 8 }, { id: "check", credits: 10, credits_max: 40 }] };
|
|
59
|
+
const WIDTHS = [1280, 800, 368, 320];
|
|
60
|
+
|
|
61
|
+
export default function FlowEditorDemo() {
|
|
62
|
+
const [width, setWidth] = useState(1280);
|
|
63
|
+
const [mode, setMode] = useState("edit");
|
|
64
|
+
const [def, setDef] = useState(MORNING);
|
|
65
|
+
const [selected, setSelected] = useState(null);
|
|
66
|
+
const [reveal, setReveal] = useState(null);
|
|
67
|
+
const issues = useMemo(() => checkAutomation(def), [def]);
|
|
68
|
+
const overlay = useMemo(() => overlayOf(layoutAutomation(def, { triggerWords: triggerWords(def.trigger) }), RUN, "failed"), [def]);
|
|
69
|
+
return (
|
|
70
|
+
<div className="grid gap-4 p-4">
|
|
71
|
+
<div className="flex flex-wrap gap-2">
|
|
72
|
+
<ButtonGroup aria-label="The block's width">
|
|
73
|
+
{WIDTHS.map((w) => (
|
|
74
|
+
<Button key={w} size="sm" variant={w === width ? "primary" : "secondary"} onClick={() => setWidth(w)}>
|
|
75
|
+
{w} px
|
|
76
|
+
</Button>
|
|
77
|
+
))}
|
|
78
|
+
</ButtonGroup>
|
|
79
|
+
<ButtonGroup aria-label="Editing or a run">
|
|
80
|
+
<Button size="sm" variant={mode === "edit" ? "primary" : "secondary"} onClick={() => setMode("edit")}>
|
|
81
|
+
Editing
|
|
82
|
+
</Button>
|
|
83
|
+
<Button size="sm" variant={mode === "run" ? "primary" : "secondary"} onClick={() => setMode("run")}>
|
|
84
|
+
A run
|
|
85
|
+
</Button>
|
|
86
|
+
</ButtonGroup>
|
|
87
|
+
</div>
|
|
88
|
+
<div className="flex h-[620px] w-full flex-col overflow-hidden rounded-lg border border-border" style={{ maxWidth: width }}>
|
|
89
|
+
<FlowEditor
|
|
90
|
+
def={def}
|
|
91
|
+
selectedId={selected}
|
|
92
|
+
onSelect={setSelected}
|
|
93
|
+
editable={mode === "edit"}
|
|
94
|
+
overlay={mode === "run" ? overlay : null}
|
|
95
|
+
flagged={mode === "edit" ? flaggedSteps(issues) : undefined}
|
|
96
|
+
prices={priceMap(ESTIMATE)}
|
|
97
|
+
fitKey={mode}
|
|
98
|
+
revealId={reveal}
|
|
99
|
+
onInsert={(slot, kind) => {
|
|
100
|
+
const r = addStep(def, slot, kind);
|
|
101
|
+
setDef(r.def);
|
|
102
|
+
setSelected(r.id);
|
|
103
|
+
setReveal(r.id);
|
|
104
|
+
}}
|
|
105
|
+
onAddAtSelection={(kind) => {
|
|
106
|
+
const r = addStep(def, { list: { at: "root" }, index: def.steps.length }, kind);
|
|
107
|
+
setDef(r.def);
|
|
108
|
+
setSelected(r.id);
|
|
109
|
+
setReveal(r.id);
|
|
110
|
+
}}
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
);
|
|
115
|
+
}
|