slidecanvas 1.0.4 → 1.0.6

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 CHANGED
@@ -72,7 +72,9 @@ import { PptEditor } from 'slidecanvas';
72
72
  export default function App() {
73
73
  const pptxUrl = "https://example.com/presentations/q1-report.pptx";
74
74
 
75
- return <PptEditor url={pptxUrl} />;
75
+ // Custom proxy endpoint (defaults to undefined, causing direct fetch)
76
+ // If your app has an API route at /api/proxy, specify it here:
77
+ return <PptEditor url={pptxUrl} proxyUrl="/api/proxy" />;
76
78
  }
77
79
  ```
78
80
 
@@ -98,6 +100,9 @@ export async function GET(request: NextRequest) {
98
100
  }
99
101
  ```
100
102
 
103
+ > [!IMPORTANT]
104
+ > To use the custom proxy above, pass its path to the `proxyUrl` prop in the `PptEditor` component (e.g., `<PptEditor proxyUrl="/api/proxy" ... />`).
105
+
101
106
  ### 3. Enabling AI Features
102
107
 
103
108
  SlideCanvas comes battery-included with Gemini AI support. To enable smart text actions (Shorten, Reframe, Lengthen), simply pass your Gemini API key to the component:
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
 
3
3
  type ElementType = 'text' | 'image' | 'shape';
4
- type ShapeType = 'rect' | 'ellipse' | 'triangle' | 'line';
4
+ type ShapeType = 'rect' | 'ellipse' | 'triangle' | 'rightTriangle' | 'rhombus' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'hexagon' | 'heptagon' | 'octagon' | 'heart' | 'smiley' | 'sun' | 'moon' | 'arrowRight' | 'arrowLeft' | 'arrowUp' | 'arrowDown' | 'arrowLeftRight' | 'arrowUpDown' | 'star4' | 'star5' | 'star6' | 'star8' | 'cloud' | 'lightning' | 'plus' | 'minus' | 'multiply' | 'divide' | 'equal' | 'line';
5
5
  type PresentationSource = 'scratch' | 'uploaded' | 'url';
6
6
  interface BaseElement {
7
7
  id: string;
@@ -60,6 +60,7 @@ interface PptEditorProps {
60
60
  showHomeOnEmpty?: boolean;
61
61
  initialSource?: PresentationSource;
62
62
  onSourceChange?: (source: PresentationSource, url?: string) => void;
63
+ proxyUrl?: string;
63
64
  }
64
65
  declare const PptEditor: React.FC<PptEditorProps>;
65
66
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
 
3
3
  type ElementType = 'text' | 'image' | 'shape';
4
- type ShapeType = 'rect' | 'ellipse' | 'triangle' | 'line';
4
+ type ShapeType = 'rect' | 'ellipse' | 'triangle' | 'rightTriangle' | 'rhombus' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'hexagon' | 'heptagon' | 'octagon' | 'heart' | 'smiley' | 'sun' | 'moon' | 'arrowRight' | 'arrowLeft' | 'arrowUp' | 'arrowDown' | 'arrowLeftRight' | 'arrowUpDown' | 'star4' | 'star5' | 'star6' | 'star8' | 'cloud' | 'lightning' | 'plus' | 'minus' | 'multiply' | 'divide' | 'equal' | 'line';
5
5
  type PresentationSource = 'scratch' | 'uploaded' | 'url';
6
6
  interface BaseElement {
7
7
  id: string;
@@ -60,6 +60,7 @@ interface PptEditorProps {
60
60
  showHomeOnEmpty?: boolean;
61
61
  initialSource?: PresentationSource;
62
62
  onSourceChange?: (source: PresentationSource, url?: string) => void;
63
+ proxyUrl?: string;
63
64
  }
64
65
  declare const PptEditor: React.FC<PptEditorProps>;
65
66