diff --git a/.changeset/eighty-donkeys-hammer.md b/.changeset/eighty-donkeys-hammer.md deleted file mode 100644 index 8cb71f8..0000000 --- a/.changeset/eighty-donkeys-hammer.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"struktolab": minor -"struktolab-studio": minor -"web": minor ---- - -Add StruktoLab Studio, a VS Code extension that opens `.struktolab` files as a -structogram instead of as JSON, and split the repository into a pnpm workspace to -make room for it: the component library moves to `packages/struktolab`, the web app -to `platforms/web`, and the extension lives in `platforms/vscode`. - -The editor gains an `embedded` attribute for hosts that own the file — it hides the -Save/Load buttons and turns PNG/SVG export into an `export-image` event — and a -shared document envelope (`serializeDocument`, `applyDocument`) so a structogram -moves between a file and a shared URL unchanged. diff --git a/.changeset/olive-poems-repeat.md b/.changeset/olive-poems-repeat.md deleted file mode 100644 index 5d9ca1f..0000000 --- a/.changeset/olive-poems-repeat.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -"struktolab": minor -"struktolab-studio": minor ---- - -Six usability changes to the editor. - -- **Undo and redo.** Every structural edit is now reversible, with `Ctrl+Z` / - `Ctrl+Shift+Z`, toolbar buttons, and `editor.undo()` / `editor.redo()` on the - component. Deleting a node is no longer a one-way door. Under `embedded` the - history is left to the host, so VS Code's own undo stack stays in charge. -- **Touch works.** Moving nodes and dragging column dividers use Pointer Events - instead of mouse-only handlers, and hit areas grow on coarse pointers, so - tablets can do everything a mouse can. -- **Keyboard and screen reader access.** The diagram is one tab stop with arrow - navigation in reading order, `Enter` to edit, `+` to insert, `Delete` to - remove, and a visible focus ring. Each node is exposed as a button named like - `If/Else: a[i] > max`. -- **Editing moved onto the diagram.** Hovering the seam between two nodes shows a - green bar with a `+` that opens the type menu right there, and each node - carries its own move and delete buttons, revealed on hover or focus. The - toolbar's row of node types and its delete mode are gone entirely; what - remains is undo/redo, a view-settings popover (language, size, scale, colours) - and the file actions, on one row that collapses to icons on narrow screens. -- **Moving a node is a drag.** Dragging the grip sends a label along with the - pointer and thickens the slot it would land in; tapping the grip and then a - slot still works, and `m` does it from the keyboard. The node being carried is - outlined, the diagram no longer grows and slides out from under the pointer - when a move starts, and `Escape` puts it back. -- **Fixed: moving a node into itself deleted it.** `moveNode` detached the node - before looking for the target, so a target inside that node could no longer be - found and the half-finished move was returned with the node — and everything - nested in it — gone. It is now a no-op, and those slots are not offered in the - first place. -- **Loop headers are translated.** A count loop written `i = 2 bis n` now - generates `for i in range(2, n + 1)`, `for (int i = 2; i <= n; i++)` and the - JavaScript equivalent, instead of repeating the German verbatim. Text that is - not a range is still passed through untouched. -- **`struktolab/core`**, a new DOM-free entry point exporting the parser, the code - generator and the tree operations for use in Node. - -In VS Code, `StruktoLab: Open Generated Code` and `Copy Generated Code` turn the -active structogram into Python, Java or JavaScript. diff --git a/packages/struktolab/CHANGELOG.md b/packages/struktolab/CHANGELOG.md index 25aa2ec..79c06a5 100644 --- a/packages/struktolab/CHANGELOG.md +++ b/packages/struktolab/CHANGELOG.md @@ -1,5 +1,58 @@ # struktolab +## 0.6.0 + +### Minor Changes + +- 21aaf82: Add StruktoLab Studio, a VS Code extension that opens `.struktolab` files as a + structogram instead of as JSON, and split the repository into a pnpm workspace to + make room for it: the component library moves to `packages/struktolab`, the web app + to `platforms/web`, and the extension lives in `platforms/vscode`. + + The editor gains an `embedded` attribute for hosts that own the file — it hides the + Save/Load buttons and turns PNG/SVG export into an `export-image` event — and a + shared document envelope (`serializeDocument`, `applyDocument`) so a structogram + moves between a file and a shared URL unchanged. + +- 21aaf82: Six usability changes to the editor. + + - **Undo and redo.** Every structural edit is now reversible, with `Ctrl+Z` / + `Ctrl+Shift+Z`, toolbar buttons, and `editor.undo()` / `editor.redo()` on the + component. Deleting a node is no longer a one-way door. Under `embedded` the + history is left to the host, so VS Code's own undo stack stays in charge. + - **Touch works.** Moving nodes and dragging column dividers use Pointer Events + instead of mouse-only handlers, and hit areas grow on coarse pointers, so + tablets can do everything a mouse can. + - **Keyboard and screen reader access.** The diagram is one tab stop with arrow + navigation in reading order, `Enter` to edit, `+` to insert, `Delete` to + remove, and a visible focus ring. Each node is exposed as a button named like + `If/Else: a[i] > max`. + - **Editing moved onto the diagram.** Hovering the seam between two nodes shows a + green bar with a `+` that opens the type menu right there, and each node + carries its own move and delete buttons, revealed on hover or focus. The + toolbar's row of node types and its delete mode are gone entirely; what + remains is undo/redo, a view-settings popover (language, size, scale, colours) + and the file actions, on one row that collapses to icons on narrow screens. + - **Moving a node is a drag.** Dragging the grip sends a label along with the + pointer and thickens the slot it would land in; tapping the grip and then a + slot still works, and `m` does it from the keyboard. The node being carried is + outlined, the diagram no longer grows and slides out from under the pointer + when a move starts, and `Escape` puts it back. + - **Fixed: moving a node into itself deleted it.** `moveNode` detached the node + before looking for the target, so a target inside that node could no longer be + found and the half-finished move was returned with the node — and everything + nested in it — gone. It is now a no-op, and those slots are not offered in the + first place. + - **Loop headers are translated.** A count loop written `i = 2 bis n` now + generates `for i in range(2, n + 1)`, `for (int i = 2; i <= n; i++)` and the + JavaScript equivalent, instead of repeating the German verbatim. Text that is + not a range is still passed through untouched. + - **`struktolab/core`**, a new DOM-free entry point exporting the parser, the code + generator and the tree operations for use in Node. + + In VS Code, `StruktoLab: Open Generated Code` and `Copy Generated Code` turn the + active structogram into Python, Java or JavaScript. + ## 0.5.0 ### Minor Changes diff --git a/packages/struktolab/package.json b/packages/struktolab/package.json index 43b8cbd..a8c377b 100644 --- a/packages/struktolab/package.json +++ b/packages/struktolab/package.json @@ -1,6 +1,6 @@ { "name": "struktolab", - "version": "0.5.0", + "version": "0.6.0", "description": "A web-based structogram (Nassi-Shneiderman diagram) editor and renderer with code generation", "type": "module", "main": "dist/editor/struktolab-editor.umd.js", diff --git a/platforms/vscode/CHANGELOG.md b/platforms/vscode/CHANGELOG.md new file mode 100644 index 0000000..c801b1a --- /dev/null +++ b/platforms/vscode/CHANGELOG.md @@ -0,0 +1,60 @@ +# struktolab-studio + +## 0.5.0 + +### Minor Changes + +- 21aaf82: Add StruktoLab Studio, a VS Code extension that opens `.struktolab` files as a + structogram instead of as JSON, and split the repository into a pnpm workspace to + make room for it: the component library moves to `packages/struktolab`, the web app + to `platforms/web`, and the extension lives in `platforms/vscode`. + + The editor gains an `embedded` attribute for hosts that own the file — it hides the + Save/Load buttons and turns PNG/SVG export into an `export-image` event — and a + shared document envelope (`serializeDocument`, `applyDocument`) so a structogram + moves between a file and a shared URL unchanged. + +- 21aaf82: Six usability changes to the editor. + + - **Undo and redo.** Every structural edit is now reversible, with `Ctrl+Z` / + `Ctrl+Shift+Z`, toolbar buttons, and `editor.undo()` / `editor.redo()` on the + component. Deleting a node is no longer a one-way door. Under `embedded` the + history is left to the host, so VS Code's own undo stack stays in charge. + - **Touch works.** Moving nodes and dragging column dividers use Pointer Events + instead of mouse-only handlers, and hit areas grow on coarse pointers, so + tablets can do everything a mouse can. + - **Keyboard and screen reader access.** The diagram is one tab stop with arrow + navigation in reading order, `Enter` to edit, `+` to insert, `Delete` to + remove, and a visible focus ring. Each node is exposed as a button named like + `If/Else: a[i] > max`. + - **Editing moved onto the diagram.** Hovering the seam between two nodes shows a + green bar with a `+` that opens the type menu right there, and each node + carries its own move and delete buttons, revealed on hover or focus. The + toolbar's row of node types and its delete mode are gone entirely; what + remains is undo/redo, a view-settings popover (language, size, scale, colours) + and the file actions, on one row that collapses to icons on narrow screens. + - **Moving a node is a drag.** Dragging the grip sends a label along with the + pointer and thickens the slot it would land in; tapping the grip and then a + slot still works, and `m` does it from the keyboard. The node being carried is + outlined, the diagram no longer grows and slides out from under the pointer + when a move starts, and `Escape` puts it back. + - **Fixed: moving a node into itself deleted it.** `moveNode` detached the node + before looking for the target, so a target inside that node could no longer be + found and the half-finished move was returned with the node — and everything + nested in it — gone. It is now a no-op, and those slots are not offered in the + first place. + - **Loop headers are translated.** A count loop written `i = 2 bis n` now + generates `for i in range(2, n + 1)`, `for (int i = 2; i <= n; i++)` and the + JavaScript equivalent, instead of repeating the German verbatim. Text that is + not a range is still passed through untouched. + - **`struktolab/core`**, a new DOM-free entry point exporting the parser, the code + generator and the tree operations for use in Node. + + In VS Code, `StruktoLab: Open Generated Code` and `Copy Generated Code` turn the + active structogram into Python, Java or JavaScript. + +### Patch Changes + +- Updated dependencies [21aaf82] +- Updated dependencies [21aaf82] + - struktolab@0.6.0 diff --git a/platforms/vscode/package.json b/platforms/vscode/package.json index 213e640..c79c731 100644 --- a/platforms/vscode/package.json +++ b/platforms/vscode/package.json @@ -2,7 +2,7 @@ "name": "struktolab-studio", "displayName": "StruktoLab Studio", "description": "Visual editor for .struktolab files — Nassi-Shneiderman structograms", - "version": "0.4.2", + "version": "0.5.0", "publisher": "openpatch", "author": "Mike Barkmin", "license": "MIT", @@ -36,8 +36,14 @@ "viewType": "struktolab.editor", "displayName": "StruktoLab", "selector": [ - { "filenamePattern": "*.struktolab", "scheme": "file" }, - { "filenamePattern": "*.struktolab", "scheme": "untitled" } + { + "filenamePattern": "*.struktolab", + "scheme": "file" + }, + { + "filenamePattern": "*.struktolab", + "scheme": "untitled" + } ], "priority": "default" } @@ -45,9 +51,16 @@ "languages": [ { "id": "struktolab", - "extensions": [".struktolab"], - "aliases": ["StruktoLab"], - "icon": { "light": "./icon.png", "dark": "./icon.png" } + "extensions": [ + ".struktolab" + ], + "aliases": [ + "StruktoLab" + ], + "icon": { + "light": "./icon.png", + "dark": "./icon.png" + } } ], "commands": [ diff --git a/platforms/web/CHANGELOG.md b/platforms/web/CHANGELOG.md new file mode 100644 index 0000000..14cf1e1 --- /dev/null +++ b/platforms/web/CHANGELOG.md @@ -0,0 +1,21 @@ +# web + +## 0.5.0 + +### Minor Changes + +- 21aaf82: Add StruktoLab Studio, a VS Code extension that opens `.struktolab` files as a + structogram instead of as JSON, and split the repository into a pnpm workspace to + make room for it: the component library moves to `packages/struktolab`, the web app + to `platforms/web`, and the extension lives in `platforms/vscode`. + + The editor gains an `embedded` attribute for hosts that own the file — it hides the + Save/Load buttons and turns PNG/SVG export into an `export-image` event — and a + shared document envelope (`serializeDocument`, `applyDocument`) so a structogram + moves between a file and a shared URL unchanged. + +### Patch Changes + +- Updated dependencies [21aaf82] +- Updated dependencies [21aaf82] + - struktolab@0.6.0 diff --git a/platforms/web/package.json b/platforms/web/package.json index b6f3e87..c780961 100644 --- a/platforms/web/package.json +++ b/platforms/web/package.json @@ -1,6 +1,6 @@ { "name": "web", - "version": "0.4.2", + "version": "0.5.0", "description": "The StruktoLab web app, served at struktolab.openpatch.org", "private": true, "type": "module",