figdown 0.1.8 → 0.2.0
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/.claude-plugin/plugin.json +1 -1
- package/dist/figdown.js +255 -78
- package/dist/figdown.mjs +255 -78
- package/examples/evpn-fabric.svg +1 -1
- package/examples/showcase/arp-resolution.svg +1 -1
- package/examples/showcase/ethernet-frame.svg +1 -1
- package/examples/showcase/l2-forwarding-logic.svg +9 -9
- package/examples/showcase/tcp-handshake.svg +1 -1
- package/examples/showcase/tcp-header.svg +1 -1
- package/examples/showcase/tcp-state-machine.svg +77 -55
- package/guide/expressing.md +3 -3
- package/guide/layout.md +16 -16
- package/guide/showcase.md +62 -56
- package/package.json +2 -2
- package/skill/figdown/SKILL.md +26 -0
- package/skill/figdown/figdown.html +307 -99
- package/skill/figdown/reference/experimental/flowchart.md +59 -18
- package/skill/figdown/reference/experimental/statechart.md +92 -0
- package/skill/figdown/reference/reading.md +13 -1
- package/skill/figdown/reference/scene.md +18 -3
package/skill/figdown/SKILL.md
CHANGED
|
@@ -111,6 +111,7 @@ so you know which file you need before you need it.
|
|
|
111
111
|
| `table` — config, state, memory maps | `reference/table.md` | `reference/experimental/constructs.md` |
|
|
112
112
|
| `topology` | `reference/scene.md`, `reference/layout.md` | `reference/experimental/topology.md`, `reference/experimental/constructs.md` |
|
|
113
113
|
| `flowchart` | `reference/scene.md`, `reference/layout.md` | `reference/experimental/flowchart.md`, `reference/experimental/constructs.md` |
|
|
114
|
+
| `statechart` | `reference/scene.md`, `reference/layout.md` | `reference/experimental/statechart.md`, `reference/experimental/constructs.md` |
|
|
114
115
|
| `timing` | — | `reference/experimental/timing.md` |
|
|
115
116
|
|
|
116
117
|
Two more files answer a **task** rather than a genre:
|
|
@@ -126,6 +127,26 @@ Pick the genre by what the figure IS, not by its subject: the left-hand
|
|
|
126
127
|
column above says what each is for. Prefer the first three — they are the
|
|
127
128
|
portable ones.
|
|
128
129
|
|
|
130
|
+
**Load the genre file BEFORE you write line 2, not only when something
|
|
131
|
+
fails.** A scene genre may spell the thing and the line with **its own
|
|
132
|
+
domain's words**, and it may rank its keywords — preferring a precise one and
|
|
133
|
+
keeping a general one as the honest fallback. Neither is guessable from this
|
|
134
|
+
file, and neither is optional: the wrong spelling is a line error, and the
|
|
135
|
+
lazy spelling is a claim you did not mean to make. The genre file states both
|
|
136
|
+
in its first screen.
|
|
137
|
+
|
|
138
|
+
**Where a genre ranks its keywords, the general one means "the source does not
|
|
139
|
+
state this" — and nothing else.** It is the transcriber's honest line for a
|
|
140
|
+
source that leaves something unsaid, not a shrug and not a shortcut. It is
|
|
141
|
+
**not** the spelling for something FigDown cannot express: that is a **coverage
|
|
142
|
+
gap in the language**, and burying it in the general keyword makes the
|
|
143
|
+
language's hole look like your judgement, in a spelling no reader can tell
|
|
144
|
+
apart from a real decision. When your source states something no keyword
|
|
145
|
+
carries: write the general keyword, **name the missing thing in a `#` comment
|
|
146
|
+
on the same line**, and report the gap. The comment is text a reader can quote
|
|
147
|
+
and it survives every re-render; it is never parsed and never a second
|
|
148
|
+
semantic channel. Each genre file names its own ranking and its own fallback.
|
|
149
|
+
|
|
129
150
|
## The document skeleton
|
|
130
151
|
|
|
131
152
|
The grammar is **CLOSED**: an unknown line is an error, never ignored. Five
|
|
@@ -146,6 +167,11 @@ figdown 0.1 block # REQUIRED first significant line; comments and
|
|
|
146
167
|
# A later `figdown 0.1 <genre>` starts a new
|
|
147
168
|
# section with its own genre; one file still
|
|
148
169
|
# renders to one SVG.
|
|
170
|
+
# The VERSION is `0.1` or `0.2`. Write the LOWEST
|
|
171
|
+
# one that carries what the figure needs — `0.2`
|
|
172
|
+
# only for `statechart`, which does not exist at
|
|
173
|
+
# `0.1`. Sections may differ; each declares its
|
|
174
|
+
# own.
|
|
149
175
|
title "Some Title" # optional; the quotes are REQUIRED
|
|
150
176
|
# comments start with '#'; inside quotes the only escapes are \n \" \\
|
|
151
177
|
class hot "Congested path" stroke=#dc2626 # meaning + style, declared once
|