Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .changeset/eighty-donkeys-hammer.md

This file was deleted.

43 changes: 0 additions & 43 deletions .changeset/olive-poems-repeat.md

This file was deleted.

53 changes: 53 additions & 0 deletions packages/struktolab/CHANGELOG.md
Original file line numberDiff line numberDiff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/struktolab/package.json
Original file line numberDiff line numberDiff line change
@@ -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",
Expand Down
60 changes: 60 additions & 0 deletions platforms/vscode/CHANGELOG.md
Original file line numberDiff line numberDiff line change
@@ -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
25 changes: 19 additions & 6 deletions platforms/vscode/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -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",
Expand DownExpand Up@@ -36,18 +36,31 @@
"viewType": "struktolab.editor",
"displayName": "StruktoLab",
"selector": [
{ "filenamePattern": "*.struktolab", "scheme": "file" },
{ "filenamePattern": "*.struktolab", "scheme": "untitled" }
{
"filenamePattern": "*.struktolab",
"scheme": "file"
},
{
"filenamePattern": "*.struktolab",
"scheme": "untitled"
}
],
"priority": "default"
}
],
"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": [
Expand Down
21 changes: 21 additions & 0 deletions platforms/web/CHANGELOG.md
Original file line numberDiff line numberDiff line change
@@ -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
2 changes: 1 addition & 1 deletion platforms/web/package.json
Original file line numberDiff line numberDiff line change
@@ -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",
Expand Down
Loading