@chengzhiyi/pi-excalidraw 0.1.1 → 0.1.2

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.
@@ -2559,8 +2559,8 @@
2559
2559
  },
2560
2560
  {
2561
2561
  "path": "./dist/runtime.js",
2562
- "bytes": 49796,
2563
- "sha256": "fe9ded4b87bce7dc101255e8b22022c28dba694a2f68b34307e3ca57aeb6ce24",
2562
+ "bytes": 49682,
2563
+ "sha256": "a5855be0da74c5c6c19463cfd31385d906464b9b87b901396675ce567cdd933e",
2564
2564
  "mime": "text/javascript"
2565
2565
  }
2566
2566
  ]
package/dist/runtime.js CHANGED
@@ -506,7 +506,6 @@ var Type = {
506
506
  Literal: (value) => ({ const: value, type: "string" }),
507
507
  Union: (items) => ({ anyOf: items }),
508
508
  Array: (items, options = {}) => ({ type: "array", items, ...options }),
509
- Tuple: (items) => ({ type: "array", items, minItems: items.length, maxItems: items.length }),
510
509
  Optional: (schema) => ({ ...schema, [optional]: true }),
511
510
  Object: (properties) => ({ type: "object", properties, required: Object.keys(properties).filter((k) => !properties[k][optional]) })
512
511
  };
@@ -518,7 +517,7 @@ var color = Type.String({ pattern: "^(#[a-fA-F0-9]{6}|#[a-fA-F0-9]{3}|transparen
518
517
  var style2 = { strokeColor: Type.Optional(color), backgroundColor: Type.Optional(color), strokeStyle: Type.Optional(Type.Union([Type.Literal("solid"), Type.Literal("dashed"), Type.Literal("dotted")])), fontSize: Type.Optional(Type.Number({ minimum: 12, maximum: 96 })) };
519
518
  var geometry2 = { x: Type.Optional(Type.Number({ minimum: -1e5, maximum: 1e5 })), y: Type.Optional(Type.Number({ minimum: -1e5, maximum: 1e5 })), width: Type.Optional(Type.Number({ minimum: 20, maximum: 1e4 })), height: Type.Optional(Type.Number({ minimum: 20, maximum: 1e4 })) };
520
519
  var node = Type.Object({ id, label: text, kind: Type.Optional(Type.Union(["process", "decision", "terminal", "text", "group"].map((k) => Type.Literal(k)))), ...geometry2, ...style2, groupId: Type.Optional(id) });
521
- var edge = Type.Object({ id, from: id, to: id, label: Type.Optional(text), ...style2, waypoints: Type.Optional(Type.Array(Type.Tuple([Type.Number({ minimum: -1e5, maximum: 1e5 }), Type.Number({ minimum: -1e5, maximum: 1e5 })]), { maxItems: 12 })) });
520
+ var edge = Type.Object({ id, from: id, to: id, label: Type.Optional(text), ...style2, waypoints: Type.Optional(Type.Array(Type.Array(Type.Number({ minimum: -1e5, maximum: 1e5 }), { minItems: 2, maxItems: 2 }), { maxItems: 12 })) });
522
521
  var graph = Type.Object({ nodes: Type.Array(node, { minItems: 1, maxItems: 30 }), edges: Type.Array(edge, { maxItems: 60 }), layout: Type.Optional(Type.Union([Type.Literal("top-down"), Type.Literal("left-right")])) });
523
522
  var patch = Type.Object({ addNodes: Type.Optional(Type.Array(node, { maxItems: 30 })), addEdges: Type.Optional(Type.Array(edge, { maxItems: 60 })), updateNodes: Type.Optional(Type.Array(Type.Object({ id, label: text }), { maxItems: 30 })), updateElements: Type.Optional(Type.Array(Type.Object({ id, label: Type.Optional(text), ...geometry2, ...style2 }), { maxItems: 60 })), removeIds: Type.Optional(Type.Array(id, { maxItems: 60 })) });
524
523
  function diagramTools() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chengzhiyi/pi-excalidraw",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Self-contained hosted v2 Excalidraw plugin for pi-webapp",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -53,8 +53,8 @@
53
53
  "directory": "packages/excalidraw"
54
54
  },
55
55
  "piRelease": {
56
- "fingerprint": "a5e25eda7092de7c81571a2875d5432617b184ab4d8f50bb22e24b63027bbdb4",
57
- "source": "3ec771c3a0de3f9d20c1f9947d9c31d36e154a64"
56
+ "fingerprint": "ce315999acb1ffe6c653ea6003303188e94ba15cb2a58788a86c1a32029a130f",
57
+ "source": "627e9d680d7978cf7398052b82e8afac5295e3b4"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "node scripts/build.mjs",