ponzu 1.78.3 → 1.78.5
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/README.md +1 -1
- package/dist/chromium.js +7 -0
- package/dist/index.js +22 -3
- package/package.json +1 -1
- package/studio/assets/index-DS7LTuUk.js +2383 -0
- package/studio/assets/index-kADA5Fx7.css +2 -0
- package/studio/index.html +2 -2
- package/studio/assets/index-BZh-aQhF.css +0 -2
- package/studio/assets/index-CrJfa9LL.js +0 -2383
package/README.md
CHANGED
|
@@ -106,7 +106,7 @@ Each artboard file holds one `<section data-artboard>`. Its size is the `width`
|
|
|
106
106
|
- **Edit it however you like.** Ponzu watches the folder. An edit from your editor, `sed` or another agent shows up live and becomes an event agents can react to.
|
|
107
107
|
- **Ids are lazy.** Hand-written elements get stable ids derived from their position. Ponzu writes an id into a file only when something needs to point at it.
|
|
108
108
|
- **Inert by default.** `<script>`, `on*` handlers and `javascript:` URLs are stripped on load. The one script kept is a scene (below), which is data, never code.
|
|
109
|
-
- **Comments are pins.** A thread in `comments.json` sits on an artboard (`artboardId`, plus `nodeId` for a node in it) or on a page's open canvas (`pageId`), at `x`/`y`. One missing a field isn't shown, and stays in the file until it's fixed.
|
|
109
|
+
- **Comments are pins.** A thread in `comments.json` sits on an artboard (`artboardId`, plus `nodeId` for a node in it and `offset`, the pin's place in that node, so it moves with it) or on a page's open canvas (`pageId`), at `x`/`y`. One missing a field isn't shown, and stays in the file until it's fixed.
|
|
110
110
|
- **Agents can read the format too.** `get_guide('format')` gives them every file's fields, with examples, for importing or generating a design by writing it directly.
|
|
111
111
|
- **Fonts just work.** Google Fonts named in `font-family` load automatically on the canvas and in screenshots.
|
|
112
112
|
- **Examples stay off your home screen.** `"example": true` in `design.json` marks a sample design. The home screen lists an example only once you open it yourself (from Finder, the app, or `ponzu serve path/to/example.design`), not when it's merely found: by Spotlight, by a scan of your folders, or because an agent started in a folder that has one. Agents still open and use examples like any other design. The ones in [`examples/`](examples) are marked.
|
package/dist/chromium.js
CHANGED
|
@@ -596,6 +596,13 @@ function applyOp(doc, op) {
|
|
|
596
596
|
else
|
|
597
597
|
thread.nodeId = op.nodeId;
|
|
598
598
|
}
|
|
599
|
+
if (op.offset !== undefined) {
|
|
600
|
+
inverse.offset = thread.offset ?? null;
|
|
601
|
+
if (op.offset === null)
|
|
602
|
+
delete thread.offset;
|
|
603
|
+
else
|
|
604
|
+
thread.offset = { ...op.offset };
|
|
605
|
+
}
|
|
599
606
|
if (op.x !== undefined) {
|
|
600
607
|
inverse.x = thread.x;
|
|
601
608
|
thread.x = op.x;
|
package/dist/index.js
CHANGED
|
@@ -7557,6 +7557,13 @@ function applyOp(doc, op) {
|
|
|
7557
7557
|
else
|
|
7558
7558
|
thread.nodeId = op.nodeId;
|
|
7559
7559
|
}
|
|
7560
|
+
if (op.offset !== undefined) {
|
|
7561
|
+
inverse.offset = thread.offset ?? null;
|
|
7562
|
+
if (op.offset === null)
|
|
7563
|
+
delete thread.offset;
|
|
7564
|
+
else
|
|
7565
|
+
thread.offset = { ...op.offset };
|
|
7566
|
+
}
|
|
7560
7567
|
if (op.x !== undefined) {
|
|
7561
7568
|
inverse.x = thread.x;
|
|
7562
7569
|
thread.x = op.x;
|
|
@@ -33165,7 +33172,7 @@ var converseTools = [
|
|
|
33165
33172
|
const thread = {
|
|
33166
33173
|
id: newId("th"),
|
|
33167
33174
|
artboardId: hit.artboard.id,
|
|
33168
|
-
...hit.parent ? { nodeId: hit.node.id } : {},
|
|
33175
|
+
...hit.parent ? { nodeId: hit.node.id, offset: { x: 0, y: 0 } } : {},
|
|
33169
33176
|
x: 24,
|
|
33170
33177
|
y: 24,
|
|
33171
33178
|
status: "open",
|
|
@@ -33550,6 +33557,7 @@ var FORMAT_EXAMPLE = {
|
|
|
33550
33557
|
"id": "th_title",
|
|
33551
33558
|
"artboardId": "ab_cart",
|
|
33552
33559
|
"nodeId": "n_title",
|
|
33560
|
+
"offset": { "x": 0, "y": 0 },
|
|
33553
33561
|
"x": 24,
|
|
33554
33562
|
"y": 24,
|
|
33555
33563
|
"status": "open",
|
|
@@ -33725,6 +33733,7 @@ ${FORMAT_EXAMPLE["comments.json"]}
|
|
|
33725
33733
|
\`\`\`
|
|
33726
33734
|
- Every thread needs id, x, y, status ("open" or "resolved"), createdAt, updatedAt and at least one message. Times are milliseconds since 1970.
|
|
33727
33735
|
- On an artboard: artboardId, and nodeId to pin it to a node inside. x and y are measured from the artboard's top-left corner.
|
|
33736
|
+
- On a node, offset ({ "x", "y" }, optional) is the pin's place in the node, from its top-left corner, so the pin moves with the node. Without it the pin stays at x, y, kept within the node.
|
|
33728
33737
|
- On a page's open canvas: pageId instead. x and y are its place on the page, the same space as data-x and data-y.
|
|
33729
33738
|
- Each message needs id, author ({ "kind": "user" or "agent", "name" }), text and createdAt. Bringing comments over from another tool, keep who wrote them.
|
|
33730
33739
|
- A thread missing any of this isn't shown. get_basic_info says which thread and what it needs; the file keeps it until you fix it.`,
|
|
@@ -44451,7 +44460,7 @@ function parseThreads(text, problems) {
|
|
|
44451
44460
|
raw.threads.forEach((t, i) => {
|
|
44452
44461
|
const missing = threadFaults(t);
|
|
44453
44462
|
if (!missing.length)
|
|
44454
|
-
return threads.push(t);
|
|
44463
|
+
return threads.push(withOffset(t));
|
|
44455
44464
|
unreadable.push(t);
|
|
44456
44465
|
const id = t?.id;
|
|
44457
44466
|
const which = typeof id === "string" && id ? id : `#${i + 1}`;
|
|
@@ -44462,6 +44471,16 @@ function parseThreads(text, problems) {
|
|
|
44462
44471
|
});
|
|
44463
44472
|
return { threads, unreadable };
|
|
44464
44473
|
}
|
|
44474
|
+
function withOffset(t) {
|
|
44475
|
+
const o = t.offset;
|
|
44476
|
+
if (o === undefined)
|
|
44477
|
+
return t;
|
|
44478
|
+
const num = (v) => typeof v === "number" && Number.isFinite(v);
|
|
44479
|
+
if (o && typeof o === "object" && num(o.x) && num(o.y))
|
|
44480
|
+
return t;
|
|
44481
|
+
const { offset: _, ...rest } = t;
|
|
44482
|
+
return rest;
|
|
44483
|
+
}
|
|
44465
44484
|
function threadFaults(t) {
|
|
44466
44485
|
if (!t || typeof t !== "object")
|
|
44467
44486
|
return ["to be an object"];
|
|
@@ -49976,7 +49995,7 @@ function remoteUpdater(endpoint, token) {
|
|
|
49976
49995
|
// apps/cli/package.json
|
|
49977
49996
|
var package_default = {
|
|
49978
49997
|
name: "ponzu",
|
|
49979
|
-
version: "1.78.
|
|
49998
|
+
version: "1.78.5",
|
|
49980
49999
|
description: "The open source canvas your agent draws on in HTML and CSS.",
|
|
49981
50000
|
type: "module",
|
|
49982
50001
|
license: "MIT",
|