truecanvas 0.4.0 → 0.5.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.
@@ -139,6 +139,8 @@ interface ComponentSpec {
139
139
  props: PropSpec[];
140
140
  acceptsClassName: boolean;
141
141
  acceptsChildren: boolean;
142
+ /** exported as the module's default (`export default Hero`): imported as `import Hero from` */
143
+ defaultExport?: boolean;
142
144
  }
143
145
 
144
146
  declare function parseCanvas(name: string, file: string, source: string): CanvasDoc;
@@ -215,7 +217,7 @@ declare class CanvasEditor {
215
217
  unwrap(node: CanvasNode): void;
216
218
  replace(node: CanvasNode, jsx: string): void;
217
219
  private added;
218
- ensureImport(name: string, from: string): void;
220
+ ensureImport(name: string, from: string, isDefault?: boolean): void;
219
221
  /**
220
222
  * Imports `name` from `from` and returns the local name to write in JSX. When
221
223
  * the name is already taken by something else (another import, a local
@@ -28,7 +28,7 @@ import {
28
28
  viteStylesheets,
29
29
  wrapConfigExport,
30
30
  writeCompare
31
- } from "../chunk-OVYSWA2F.js";
31
+ } from "../chunk-A4QIAVTG.js";
32
32
  import {
33
33
  injectIds
34
34
  } from "../chunk-TSHD2S36.js";
@@ -37,7 +37,7 @@ import {
37
37
  } from "../chunk-PBKX3SBC.js";
38
38
  import {
39
39
  Catalog
40
- } from "../chunk-WU7NBTJH.js";
40
+ } from "../chunk-2IIAMOFH.js";
41
41
  import {
42
42
  ICON_LIBRARIES,
43
43
  iconLibraries,
@@ -2,7 +2,10 @@
2
2
  * The share viewer: one static page that reads ./manifest.json and lays the
3
3
  * frozen frames out at their canvas positions, with pan and zoom (drag,
4
4
  * wheel, pinch, keys). Frames are sandboxed iframes without scripts, under a
5
- * transparent layer that takes every pointer event. Self-contained: no
5
+ * transparent layer that takes every pointer event. When the version has a
6
+ * live site, each frame gets a "View live" button: the real site in a
7
+ * device-sized window, scripts and animations included, on its own origin.
8
+ * Self-contained: no
6
9
  * build step, no dependencies, so the same file works locally and on a
7
10
  * review site.
8
11
  */
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  viewerHtml
3
- } from "../chunk-M7B3W7EP.js";
3
+ } from "../chunk-DV76O5SZ.js";
4
4
  export {
5
5
  viewerHtml
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "truecanvas",
3
- "version": "0.4.0",
3
+ "version": "0.5.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",