@creator-notes/cnotes 0.139.0 → 0.140.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creator-notes-cli",
3
- "version": "0.139.0",
3
+ "version": "0.140.0",
4
4
  "description": "CreatorNotes CLI: create notes, build canvases, search knowledge from the terminal",
5
5
  "author": {
6
6
  "name": "CreatorNotes",
@@ -1437,7 +1437,7 @@ and only warns.
1437
1437
  defineAddTextCommand("add-richtext", "[DEPRECATED — use `add-text`] Alias of `add-text`: adds the same Text element (richtext) with the same flags. Kept for existing scripts; prefer `add-text`.");
1438
1438
  canvas
1439
1439
  .command("add-section")
1440
- .description("Add a section frame — a named background region (Miro-style). Whatever sits inside moves with the frame when dragged; notes inside stay individually draggable. Mints a SECTION-<n> id: mention it from notes as [[SECTION-<n>]] to deep-link readers to that region, so name frames like places (\"Shaping\", \"Open Questions\"), not sentences. With --notes the frame is created WITH those notes laid out inside it (collision-aware, no coordinate math — the preferred way to build a populated section), and it stays ARRANGED: adding, editing or removing its cards re-lays it out, until someone moves a card by hand.")
1440
+ .description("Add a section frame — a named background region (Miro-style). Whatever sits inside moves with the frame when dragged; notes inside stay individually draggable. Mints a SECTION-<n> id: mention it from notes as [[SECTION-<n>]] to deep-link readers to that region, so name frames like places (\"Shaping\", \"Open Questions\"), not sentences. With --notes the frame is created WITH those notes laid out inside it (collision-aware, no coordinate math — the preferred way to build a populated section), and it stays ARRANGED: adding, editing, moving or removing its cards re-lays it out, until someone resizes the frame by hand.")
1441
1441
  .argument("<canvasId>", "Canvas ID")
1442
1442
  .requiredOption("--name <name>", "Frame title (shown on the floating chip; title case)")
1443
1443
  .option("--notes <ids>", "Note IDs (comma-separated, display IDs like TASK-6 or Convex IDs) to lay out INSIDE the frame; the frame sizes itself around them")
@@ -1920,8 +1920,9 @@ nothing.
1920
1920
  "edges":[{"from":"@A","to":"DECISION-12","label":"grounds"}]}
1921
1921
 
1922
1922
  Sections: a section container in the spec ({"kind":"section","name":…,"child":…})
1923
- creates an ARRANGED section. It keeps its cards laid out as they are added, edited
1924
- or removed, until someone moves a card by hand. Put more cards in it later with
1923
+ creates an ARRANGED section (every new section is). It keeps its cards laid out
1924
+ as they are added, edited, moved or removed; a card moved inside the frame takes
1925
+ the spot it was dropped on. Put more cards in it later with
1925
1926
  --into SECTION-<n>; never by picking coordinates inside the frame.
1926
1927
 
1927
1928
  Placement (relative to nodes already on the canvas):
@@ -1986,8 +1987,8 @@ Placement (relative to nodes already on the canvas):
1986
1987
  .description("Reflow EXISTING canvas nodes with the layout solver (no coordinate math). " +
1987
1988
  "`arrange --section SECTION-<n>` on its own tidies everything already inside that frame " +
1988
1989
  "(keeping the columns and rows it is roughly in), sizes the frame to fit, and leaves the " +
1989
- "section ARRANGED: it re-lays itself out as cards are added, edited or removed, until someone " +
1990
- "moves a card by hand. With --nodes or --spec, packs exactly those nodes (mixed kinds welcome) " +
1990
+ "section ARRANGED: it re-lays itself out as cards are added, edited, moved or removed, until " +
1991
+ "someone resizes the frame by hand. With --nodes or --spec, packs exactly those nodes (mixed kinds welcome) " +
1991
1992
  "into the frame, which then stays arranged the same way.")
1992
1993
  .argument("<canvasId>", "Canvas ID")
1993
1994
  .option("--section <id>", "Target SECTION-<n> (or raw id) to pack into; auto-resizes the frame around the new layout")
@@ -2054,7 +2055,7 @@ Examples:
2054
2055
  console.log(`Arranged ${data.cardCount} card${data.cardCount === 1 ? "" : "s"} in ${data.displayId ?? opts.section}: ` +
2055
2056
  `${data.movedCount} moved, frame ${data.width} × ${data.height}px` +
2056
2057
  (data.rippledCount ? `, ${data.rippledCount} item${data.rippledCount === 1 ? "" : "s"} below pushed down` : "") +
2057
- ". It keeps itself laid out until a card is moved by hand.");
2058
+ ". It keeps itself laid out until the frame is resized by hand.");
2058
2059
  }
2059
2060
  return;
2060
2061
  }
@@ -256,7 +256,7 @@ export function buildMcpSpec(z, opts) {
256
256
  "Edges resolve endpoints in priority order: '@<key>' of an item placed in this call, the noteId of a note placed in this call, or the displayId / id of a node already on the canvas.\n\n" +
257
257
  "NEW NOTES IN THE SAME CALL: pass `notes` (the cnotes_notes_create item shape, rubric rules included) and place each with a note leaf whose noteId is '@<key>'. Bodies cross-link with [@<key>: Title](relationship:<verb>); edges and anchors say '@<key>'. One call replaces notes_create then place. The notes are created only if the layout solves, and come back under `notes`.\n\n" +
258
258
  "placement: 'auto' (default, drops into a clear band below existing nodes and slides down to de-collide), 'append' (always below everything), 'exact' (honor origin verbatim).\n\n" +
259
- "SECTIONS ARRANGE THEMSELVES. A section container creates an ARRANGED section: it keeps its cards laid out as cards are added, edited or removed, until someone moves a card by hand. To add cards to an existing section, pass `intoSection: 'SECTION-<n>'` with a doc of just those items: they are appended to its layout and the frame resizes to fit. Never aim `origin` inside a frame.\n\n" +
259
+ "SECTIONS ARRANGE THEMSELVES. Every new section is ARRANGED: it keeps its cards laid out as cards are added, edited, moved or removed, and a card moved inside the frame takes the spot it was dropped on. To add cards to an existing section, pass `intoSection: 'SECTION-<n>'` with a doc of just those items: they are appended to its layout and the frame resizes to fit. Never aim `origin` inside a frame.\n\n" +
260
260
  "The schema is strict server-side: a typo'd key anywhere in the doc is rejected with the offending path named. If a large layout is refused as a whole, place it in two or three smaller calls — each is independent.",
261
261
  shape: {
262
262
  intent,
@@ -308,7 +308,7 @@ export function buildMcpSpec(z, opts) {
308
308
  "MOVING CARRIES THE CONTENTS. Pass BOTH x and y and the frame travels with everything sitting inside it, exactly as dragging it in the app does — so 'put this section where that one is' is one call. Frame membership is geometric (a card belongs to whichever frame its centre is in), and the response's `movedNodeCount` tells you how many travelled.\n\n" +
309
309
  "A MOVE IS ITS OWN CALL: send x/y alone, never alongside name, width/height or colorHex, and never one axis without the other. To shift a frame along one axis, read the other axis off cnotes_canvas_get and pass it unchanged. Resizing and renaming keep the frame's contents where they are; only a move takes them along. GROWING TALLER RIPPLES: the band below the frame's old bottom edge shifts down by the growth delta so the layout beneath survives (see `ripple` to opt out).\n\n" +
310
310
  `To reorder a canvas — 'the last section should replace section 7' — move the new frame onto the old one's position (read it off cnotes_canvas_get) and then remove the old frame with ${names.removeNodes}.\n\n` +
311
- "ARRANGE: `arrange: true` (on its own) tidies everything inside the frame, keeping the rows and columns the cards are roughly in, sizes the frame to fit, and leaves the section ARRANGED: it re-lays itself out as its cards are added, edited or removed, until someone moves a card by hand. Use it whenever a section's contents overlap or spill out of the frame. `arrange: false` stops arranging; nothing moves.",
311
+ "ARRANGE: `arrange: true` (on its own) tidies everything inside the frame, keeping the rows and columns the cards are roughly in, sizes the frame to fit, and leaves the section ARRANGED: it re-lays itself out as its cards are added, edited, moved or removed, until someone resizes the frame by hand. Use it whenever a section's contents overlap or spill out of the frame. `arrange: false` stops arranging; nothing moves.",
312
312
  shape: {
313
313
  intent,
314
314
  canvasId: canvasRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creator-notes/cnotes",
3
- "version": "0.139.0",
3
+ "version": "0.140.0",
4
4
  "description": "CLI for CreatorNotes — create notes, build canvases, search knowledge from the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -127,17 +127,20 @@ This is also how a card that `add-quote` or `add-node` dropped outside a frame g
127
127
 
128
128
  ## Arranged sections
129
129
 
130
- A section can lay out its own cards. Every section `place` creates from a
131
- section CONTAINER is arranged, and so is any section you run
132
- `cnotes canvas arrange <canvas> --section SECTION-<n>` on (no `--nodes`). An
133
- arranged section:
130
+ A section lays out its own cards. Every new section starts arranged, however
131
+ it is made, and so does any section you run
132
+ `cnotes canvas arrange <canvas> --section SECTION-<n>` on (no `--nodes`). A
133
+ frame drawn around another frame starts freeform. An arranged section:
134
134
 
135
135
  - tidies what is inside it, keeping the rows and columns the cards are roughly
136
136
  in, and sizes the frame to fit (what sits below is pushed down if it grows);
137
137
  - re-lays itself out when one of its cards is added, edited or removed: a text
138
138
  card that grows pushes the cards under it down, a deleted card's gap closes;
139
- - stays arranged until someone MOVES A CARD BY HAND (drag, `move-node`,
140
- `bulk-move`) or resizes the frame. Then it is freeform again and nothing moves.
139
+ - stays arranged when a card is MOVED (drag, `move-node`, `bulk-move`): a card
140
+ moved inside the frame takes the spot it was dropped on, a card moved out of
141
+ it leaves the section and its gap closes, a card moved in joins it there, and
142
+ moving every card at once re-reads the layout from where they landed;
143
+ - becomes freeform only when someone RESIZES THE FRAME by hand. Nothing moves.
141
144
  `arrange --section SECTION-<n> --stop` does the same on purpose.
142
145
 
143
146
  Put new cards into a section with the section, never with coordinates inside