@eventmodelers/cli 1.0.24 → 1.0.25
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/package.json
CHANGED
package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-outputs/SKILL.md
CHANGED
|
@@ -396,8 +396,8 @@ After this step is done, **every SCREEN and every AUTOMATION on the board must b
|
|
|
396
396
|
**Do not default to a single monolithic read model that supplies an entire screen.** For every screen identified in Step 5a as having 2+ components, break it apart into one screen copy per component before designing its read models:
|
|
397
397
|
|
|
398
398
|
- Each copy is the **same page**, so it **keeps the same screen name/title** — do not rename copies after their component (e.g. don't title one copy `"Librarian Dashboard — Statistics"` and another `"Librarian Dashboard — Recently Added"`; both stay `"Librarian Dashboard"`).
|
|
399
|
-
- Distinguish copies visually, not by name: **mark/highlight the one component each copy is about**, using the
|
|
400
|
-
- Use the `html-screen` skill to produce each copy: pass it the original screen's markup
|
|
399
|
+
- Distinguish copies visually, not by name: **mark/highlight the one component each copy is about**, using the `html-screen` skill's native Marks feature — see that skill's "Marks" section for the full mechanism. In short: the component of interest gets `data-em-mark-id`/`em-mark em-mark-<colorhex>` baked onto it in the page HTML, paired with a matching `meta.marks` entry (`{id, color, pageIndex, blurOutside: true}`) that blurs every other top-level section. Never hand-roll this with inline `filter`/`outline`/`opacity` CSS — that does not match how the app itself renders a mark.
|
|
400
|
+
- Use the `html-screen` skill to produce each copy: pass it the original screen's markup, explicitly asking it to mark/highlight the one component to keep crisp and blur the rest (this satisfies `html-screen`'s "only when the user explicitly asks for one" condition for its Marks feature — the ask comes from this step). This is the skill's job — don't hand-roll the markup here.
|
|
401
401
|
- Place each copy in its own column, one column to the right of the read model that will feed it — this is normally a different column per copy, since each component typically has a different natural source event.
|
|
402
402
|
|
|
403
403
|
Why this matters, beyond tidiness:
|
|
@@ -68,18 +68,56 @@ Guidelines:
|
|
|
68
68
|
|
|
69
69
|
### Marks — only when the user explicitly asks for one
|
|
70
70
|
|
|
71
|
-
The canvas has a native "Marks" feature (outline highlight, plus an optional "blur outside" or "white outside" spotlight) for calling out part of a screen —
|
|
71
|
+
The canvas has a native "Marks" feature (outline highlight, plus an optional "blur outside" or "white outside" spotlight) for calling out part of a screen — confirmed against the app's own source (`HtmlEditorModal.tsx`, `canvas/nodes/markHtml.ts`, `markBlur.ts`, `markStyles.ts`, `canvas/nodes/HtmlScreenNode.tsx`). **Do not add marks by default.** Only apply marks when the request explicitly asks to highlight/mark/call out/circle/spotlight, or blur/obscure/white-out part of the screen (e.g. "highlight the submit button", "blur everything except the email field", "white out everything but the header"), or when another skill's own instructions ask for a component to be marked/highlighted (e.g. `eventmodeling-identifying-outputs` Step 5b, which explicitly requests a mark per screen copy — that counts as an explicit ask). An ordinary "design a screen" request gets no marks.
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
**Never fake this with hand-written inline CSS** (`filter:blur(...)`, `outline:...`, `opacity:...`, `pointer-events:...` on page elements) — that is not how the native feature works and won't match how the app itself renders a mark. A real mark has **two halves that must both be set together**, in the same page/meta update:
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
- Combine the outline rule with either spotlight rule if the user asked to both mark *and* blur/white-out.
|
|
75
|
+
**Half 1 — bake the mark onto the target element, inside the page HTML itself.** Pick the one element that should stay sharp (a row, a card, a tile — whatever the "component" is) and add two attributes to it, merging into any `class`/other attributes it already has:
|
|
76
|
+
- `data-em-mark-id="em-<short-unique-id>"` — a unique id for this mark, referenced by half 2 below.
|
|
77
|
+
- `class="em-mark em-mark-<colorhex-without-#>"` — e.g. `em-mark em-mark-e74c3c` for the default red `#e74c3c`. This class is what actually draws the `outline:4px solid <color> !important;outline-offset:1px;` — its stylesheet is injected by the app itself at render time, not something to write into the page.
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
Do not add any blur/white styling directly to other elements — that part is entirely driven by half 2.
|
|
81
80
|
|
|
82
|
-
**
|
|
81
|
+
**Half 2 — add the matching entry to `meta.marks`**, an array of objects (one per mark on this node, across all its pages):
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"id": "em-<same-id-as-the-data-em-mark-id-attribute>",
|
|
86
|
+
"color": "#e74c3c",
|
|
87
|
+
"pageIndex": 0,
|
|
88
|
+
"blurOutside": true,
|
|
89
|
+
"whiteOutside": false
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
- `id` — must exactly match the `data-em-mark-id` value baked into the page in half 1. This is how the app's render script finds the marked element and applies blur/white to every *other* top-level branch of `<body>` (walking down, only recursing into branches that contain the marked element — see `markBlur.ts`'s `markOutsideScript`). No coordinates are needed or supported; targeting is purely by this shared id.
|
|
94
|
+
- `color` — must match the color used in the `em-mark-<colorhex>` class in half 1. Default `#e74c3c` (red) unless the user names one; other options mirror the app's mark picker: `#1e293b` (dark slate), `#2ecc71` (green), `#3b82f6` (blue), `#f1c40f` (yellow), `#ffffff` (white).
|
|
95
|
+
- `pageIndex` — which page in the `pages` array this mark's target element is on (0-based).
|
|
96
|
+
- `blurOutside` — `true` to blur every other top-level section (a spotlight effect). Mutually exclusive with `whiteOutside`.
|
|
97
|
+
- `whiteOutside` — `true` to collapse every other top-level section to solid white instead of blurring it. Use only when the user says "white out"/"whiteout" rather than "blur" — never set both `blurOutside` and `whiteOutside` on the same mark.
|
|
98
|
+
|
|
99
|
+
Set both halves in one `node:changed` call (or immediately paired calls) so the node is never left with one half but not the other:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
mcp__eventmodelers__submit_node_events {
|
|
103
|
+
"boardId": "<BOARD_ID>",
|
|
104
|
+
"events": [{
|
|
105
|
+
"id": "<event-uuid>", "eventType": "node:changed", "nodeId": "<NODE_ID>",
|
|
106
|
+
"boardId": "<BOARD_ID>", "timestamp": <NOW_MS>,
|
|
107
|
+
"meta": {
|
|
108
|
+
"type": "HTML_SCREEN",
|
|
109
|
+
"title": "<Screen Title>",
|
|
110
|
+
"pages": ["<div>...<tr data-em-mark-id=\"em-abc123\" class=\"em-mark em-mark-e74c3c\">...crisp row...</tr>...</div>"],
|
|
111
|
+
"marks": [{"id": "em-abc123", "color": "#e74c3c", "pageIndex": 0, "blurOutside": true, "whiteOutside": false}],
|
|
112
|
+
"fields": [...]
|
|
113
|
+
}
|
|
114
|
+
}]
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Pick a fresh, short random suffix for each mark id (`em-` + a few random alphanumeric characters) — don't reuse one across nodes/marks.
|
|
119
|
+
|
|
120
|
+
**Marked screens and field scoping**: when the same underlying screen is rendered multiple times as separate nodes — once per slice, each with a different mark calling out a different part of the UI — scope each node's `meta.fields` (Step 5 below) to only the data inside that node's marked area, not the full screen. Three slice-specific screen nodes sharing one visual base should end up with three different, narrower field lists, each matching what that node's mark calls out.
|
|
83
121
|
|
|
84
122
|
## Step 4 — Render the pages
|
|
85
123
|
|