truecanvas 0.3.0 → 0.4.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.
@@ -5,10 +5,10 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Truecanvas</title>
7
7
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8
- <script type="module" crossorigin src="/assets/hub-UhU8yp5F.js"></script>
8
+ <script type="module" crossorigin src="/assets/hub-B5hqZCM2.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/react-DB-4Zxce.js">
10
- <link rel="modulepreload" crossorigin href="/assets/Menu-BFifVcgz.js">
11
- <link rel="stylesheet" crossorigin href="/assets/Menu-DXPm0EXo.css">
10
+ <link rel="modulepreload" crossorigin href="/assets/Menu-C0Ti-6T2.js">
11
+ <link rel="stylesheet" crossorigin href="/assets/Menu-BJ3OmqzH.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
@@ -5,10 +5,10 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Truecanvas</title>
7
7
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8
- <script type="module" crossorigin src="/assets/main-UtSaCfnK.js"></script>
8
+ <script type="module" crossorigin src="/assets/main-woTyWmya.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/react-DB-4Zxce.js">
10
- <link rel="modulepreload" crossorigin href="/assets/Menu-BFifVcgz.js">
11
- <link rel="stylesheet" crossorigin href="/assets/Menu-DXPm0EXo.css">
10
+ <link rel="modulepreload" crossorigin href="/assets/Menu-C0Ti-6T2.js">
11
+ <link rel="stylesheet" crossorigin href="/assets/Menu-BJ3OmqzH.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The share viewer: one static page that reads ./manifest.json and lays the
3
+ * frozen frames out at their canvas positions, with pan and zoom (drag,
4
+ * wheel, pinch, keys). Frames are sandboxed iframes without scripts, under a
5
+ * transparent layer that takes every pointer event. Self-contained: no
6
+ * build step, no dependencies, so the same file works locally and on a
7
+ * review site.
8
+ */
9
+ declare function viewerHtml(): string;
10
+
11
+ interface ShareFrame {
12
+ name: string;
13
+ x: number;
14
+ y: number;
15
+ width: number;
16
+ height: number;
17
+ theme: "light" | "dark" | null;
18
+ device: string | null;
19
+ /** paths inside the snapshot */
20
+ html: string;
21
+ image: string;
22
+ }
23
+ interface ShareManifest {
24
+ format: 1;
25
+ project: string;
26
+ canvas: string;
27
+ id: string;
28
+ createdAt: number;
29
+ frames: ShareFrame[];
30
+ /** assets that couldn't be fetched (shown as missing in the snapshot) */
31
+ missing: string[];
32
+ /** requests that left the dev server while rendering (a real API, analytics) */
33
+ external: string[];
34
+ }
35
+
36
+ export { type ShareFrame, type ShareManifest, viewerHtml };
@@ -0,0 +1,6 @@
1
+ import {
2
+ viewerHtml
3
+ } from "../chunk-M7B3W7EP.js";
4
+ export {
5
+ viewerHtml
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "truecanvas",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Design with your real React components: a Figma-like canvas for Next.js and Vite where layers are your .tsx and agents edit through MCP.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,6 +20,10 @@
20
20
  "types": "./dist/vite/index.d.ts",
21
21
  "default": "./dist/vite/index.js"
22
22
  },
23
+ "./share": {
24
+ "types": "./dist/share/index.d.ts",
25
+ "default": "./dist/share/index.js"
26
+ },
23
27
  "./core": {
24
28
  "types": "./dist/core/index.d.ts",
25
29
  "default": "./dist/core/index.js"