Repository navigation
Releases
Releases · phin-tech/dottie
Dottie 0.11.1
Drawings people drill into, on the web
- Export every page as a web page. File ▸ Export Pages as Web Page makes one HTML file holding every page, or
a folder withindex.htmlfor the first page and a file for each other page. A shape that links to a shape on
another page opens that page when clicked, so an overview can lead into its details. - Back works. In the single file each page has its own address (
site.html#Billing), so the browser's Back
and Forward go between pages and a link can open any of them. In the folder, links are ordinary pages. - Drill in. For agents,
drill_inmakes a shape lead to a page of its own: it adds the page (or uses the one
named), a title the link lands on, and a "← Overview" shape that leads back. simulatefollows links to other pages and takes abackstep, and a recording follows along, so a drill-in
path can be checked before exporting.dottie simulatetakes--back.- For agents and scripts:
export_animationtakespages: allorsplit, anddottie rendertakes
--all-pagesand--split. Neither needs an animation.
dottie.js
<dottie-player>takeshistory(each page shown gets its own address) andlinks(where a page exported on
its own finds the others), and firespagewhen the page shown changes.dottie-compile --all-pagesputs every page in the compiled script.
Dottie 0.11.0
Counters, expressions and logic for interactive pages
- Variables can be numbers. A page can keep a count, a step or a score as well as true-or-false switches.
- Conditions are expressions. Show an element when
count >= 3,stage % 2 == 0or
min(count * 2, 5) == 5: numbers, arithmetic, comparisons,&&and||, parentheses, andmin,max,abs,
floor,ceil,roundandclamp. Existing conditions work as they did. - Clicks can compute. A click can set
counttocount + 1or cycle a stage with(stage + 1) % 3, worked out
from the state before the click. - Labels show values. Text like
Clicked {count} timesfills in as the page plays. - Click logic. For what expressions can't say, a page can carry JavaScript handlers that its clicks run. Each
handler gets the variables and the click, and returns new values. It runs only on a click, in a sealed sandbox:
no access to the page, the network, timers, the clock or randomness, and limits on time and memory, so the same
click always gives the same result. A web page runs logic only when allowed (<dottie-player allow-logic>, or
Allow when exporting HTML). Elsewhere, a click does its own Set and Toggle instead. - For agents:
set_variabletakes numbers,click_settakes numbers and expressions,set_logicand
update_elementclick_runadd logic, andsimulateruns it.export_animationtakesallow_logic. Scripts
havedottie.logic()andclick: {run}.
Compatibility
- A drawing that uses number variables or computed clicks can't be opened by Dottie 0.10.0 or earlier.
- dottie.js:
<dottie-player>takesallow-logicand fireslogicerror. The engine,dottie-logic.min.js(about
850 KB), loads from beside the player only when a page with logic is clicked.dottie-compile --allow-logic
puts it in the compiled script instead.
Dottie 0.10.0
Containers and swimlanes
- Boxes that hold things. Select some shapes and choose Arrange ▸ Put in Container (⌥⌘K) to put a titled box
round them: a VPC, a subsystem, a team. It fits round what it holds, moving it moves them, and connectors attach
to it like any shape. Drop a shape in to add it, drag one out to take it out, and resize the box to keep it at
that size. Containers nest, and the Layers panel shows what each one holds. - Swimlanes. A container can stack containers inside it as rows or columns, one per lane, each with its title.
- Mermaid subgraphs come in as containers, nested as you wrote them, and go back out as subgraphs when you
export to Mermaid. draw.io swimlanes and containers, and Excalidraw frames, import as containers too. - For agents:
add_container,parentonadd_shapeandupdate_element, andclustersonbuild_diagram, which
lays out each cluster as one block. Scripts havedottie.container, and aparentoption on shapes, updates and
dottie.build.
Themes of your own
- Palettes. Every theme now has named colors: accent, muted, danger, warning, success and info, lighter on dark
pages. Click one of the swatches under Stroke or Fill to use a palette color, and it changes when the theme does. - Make a theme of the drawing's own on the Page tab, with its own page color, ink and palette colors, and add
colors of your own. Changing a palette color recolors everything that uses it. - For agents:
set_theme, and every color argument also takes a palette name. Scripts havedottie.theme().
Arrows go round shapes
- New elbow connectors route round the shapes in their way instead of cutting through them, and keep their plain
Z or L when nothing is in the way. Turn it off for a connector with Go Round Shapes in the inspector. Existing
drawings don't change.
For agents
export_pngtakesmax_widthfor a small preview,include_image: falseto save the image without sending it
back, andelements: "compact"for a short element list.simulatehas a{"routes": true}step: each flow's destination, the connectors it takes, its share and cost,
and why a flow reaches nothing, so you can check traffic in each state.dottie.connectandadd_connectortakestroke.- Script type checks no longer report TypeScript 7's strict-mode noise in plain JavaScript. They group problems by
kind and show mistakes in dottie calls first.
Fixes
- dottie.js:
***bold italic***and**bold *italic***in notes no longer leave stray asterisks.
Dottie 0.9.0
dottie.js: big drawings play without holding up the page
- Long, busy animations no longer freeze the page while they load. Before showing an animation without a
camera,<dottie-player>works out the view of every frame. For a big one that now happens in a worker, and the
drawing appears when it's done, looking exactly as it would have.setFile()returns at once andloadfires once
the drawing is showing. Small drawings, stills and camera animations show straight away as before. Where a worker
can't start, such as under aworker-srcpolicy, the player works it out in place. - If you host the module player yourself, serve
dottie-player.min.jsbesidedottie-player.js: the worker loads
it from there. The classic script, compiled drawings and the HTML export need nothing extra. - Faster everywhere. On a 400-shape drawing with about 1,100 hopping connectors and traffic flows, getting
ready to play is about nine times faster and each frame about fourteen times faster. Routing traffic, connector
hops, notes, buttons' over and down looks, and labels with very long unbroken words all got quicker; a
5,000-character word used to take minutes to wrap. Everything draws exactly as before.
dottie.js fixes
- A compiled drawing whose text contains
DOTTIE_OPTIONSorDOTTIE_FONTSno longer comes out broken. setFile()while asrcis still loading: the file you gave stays, instead of being replaced when the load
finishes.- When a drawing fails to load, the one that was showing stops, and its controls go away.
currentTimeon a still (at="5") reports the moment it shows, not 0.
Dottie 0.8.0
What's Changed
- Interactive pages: states, overrides, traffic flows and simulate by @sam-phinizy in #6
Full Changelog: v0.7.0...v0.8.0
Dottie 0.7.0
Diagrams people poke while they keep playing
- Page variables. A page can have named on/off variables. A click can toggle or set them, and any shape,
connector or packet can be shown only while a condition holds, likedownor!down && east. The animation
never stops: click a region to take it down, and its traffic reroutes while the dots keep flowing. Connectors go
with a shape that is hidden. - Looping scenes. A scene can loop: playing doesn't stop when it gets there, and it goes round from its end to
its start until a click or Next leaves it. Turn it on with Loop This Scene on the scene's menu in the timeline. - In the app, the Click section has Toggles and Shown when. The editor shows every element so each state
stays editable; exports and previews show the starting values. The web page export and<dottie-player>change
them on click.
Layout
- Auto-layout and diagrams built from a list of nodes and edges keep connector labels off the shapes. Long
edges get a lane of their own, and the gaps between rows grow to fit their labels.
Command line, MCP and dottie.js
dottie renderanddottie inspectread the app's open copy of a drawing, unsaved edits included, and say so
when it differs from the file.--diskreads the saved file.dottie <command> --helpprints the usage instead of making a folder called--help.- MCP:
set_variable;whenonadd_shape,add_connector,update_elementandsend_packet;click_setand
click_toggleonupdate_element;looponadd_sceneandupdate_scene.build_diagramedges take look
fields (dash, width, arrowheads, …), a stroke color andwhen.export_animationwrites a.pngof the poster
frame.list_elementsshows variables and conditions. - Scripts:
dottie.scene()returns the scene's name, which is whatclick: {scene}takes, and takes{loop}.
New:dottie.variable,dottie.variablesanddottie.loopScene;whenon everything;click: {set, toggle}.
A lookup that found nothing explains that elements a script gets back are snapshots: look them up again after
an update. - dottie.js 0.7.0 plays page variables and looping scenes.
<dottie-player>hasvariablesandsetState(), and
fires astateevent when a click changes them. - Files that use variables or looping scenes open in earlier versions with every element shown and scenes that stop.
Dottie 0.6.3
Dottie 0.6.2
Handwriting fonts
- Three handwriting fonts. Caveat (a quick pen), Patrick Hand (neat print) and Architects Daughter (draftsman's
lettering) come with Dottie, free under the SIL Open Font License. Pick one for any shape, connector label, text
box or note, in the Style tab's new Text section or the bar over the canvas. Caveat has a bold; the other two
draw bold and italic as regular. - Text size, in the same places: the bar's menu, or the Style tab's slider for any size.
- Your own fonts. The font menu lists every font on your Mac too. Dottie draws it, and exports name it but don't
carry it, so someone without it sees Helvetica Neue. - They travel. SVG and web page exports carry the handwriting fonts a drawing uses, so they look the same
anywhere. PNG, PDF, GIF, MP4 and Lottie draw them as they look in Dottie. - Files that set a font open in earlier versions in Helvetica Neue.
Command line, MCP and dottie.js
- MCP:
fontandfont_sizeonadd_shape,add_connectorandupdate_element, andfontonbuild_diagram
andimport_mermaidfor a whole diagram. A packet's label takes its connector's font. - Scripts:
fontandfontSizewith the other look fields,fontondottie.build, and both on the elements calls return. - dottie.js 0.6.2 lays out and draws the handwriting fonts exactly as Dottie does.
<dottie-player>loads the ones a
drawing uses fromfonts/beside its script (dist/fontson npm);dottie-compileanddottie render -f jsput
them in the compiled file. A connector label's box is no longer a point short at some text sizes. - Skills for agents:
npx skills add phin-tech/dottieinstallsdottie(MCP, the command line and scripting) and
dottie-extension.