@charisol/plexo-sdk 1.0.5 → 1.0.7
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 +3 -4
- package/dist/PlexoRenderer.d.ts +41 -0
- package/dist/components/AIResponseBubble.d.ts +17 -0
- package/dist/components/sidebarTabs/AiConfigSection.d.ts +8 -0
- package/dist/components/sidebarTabs/BodyGlobalSettingsTab.d.ts +4 -1
- package/dist/components/sidebarTabs/ImagesTab.d.ts +5 -0
- package/dist/components/sidebarTabs/PublishTab.d.ts +9 -0
- package/dist/components/sidebarTabs/SettingsTab.d.ts +17 -0
- package/dist/components/sidebarTabs/UploadsTab.d.ts +3 -0
- package/dist/index.js +13523 -12423
- package/dist/plexo-sdk.css +1 -1
- package/dist/utilities/aiHelper.d.ts +20 -19
- package/dist/utilities/apiConfig.d.ts +31 -0
- package/dist/utilities/colorUtils.d.ts +6 -0
- package/dist/utilities/playground.interfaces.d.ts +9 -7
- package/dist/utilities/plexoBuilderRuntime.d.ts +3 -1
- package/dist/utilities/types.d.ts +19 -0
- package/dist/utilities/useAIAction.d.ts +24 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -152,13 +152,12 @@ export default function EditorPage() {
|
|
|
152
152
|
| `autoSave` | `boolean` | `false` | Auto-save periodically |
|
|
153
153
|
| `autoSaveDuration` | `number` | `3000` | Auto-save interval in ms |
|
|
154
154
|
| `onUpload` | `(file: File) => Promise<string> \| string` | — | Custom image upload handler, returns URL |
|
|
155
|
-
| `backgroundColor` | `string` | `'#
|
|
156
|
-
| `themeBgColor` | `string` | `'#
|
|
155
|
+
| `backgroundColor` | `string` | `'#0e1526'` | Canvas background colour |
|
|
156
|
+
| `themeBgColor` | `string` | `'#4f46e5'` | Primary brand/accent colour |
|
|
157
157
|
| `themeFgColor` | `string` | `'#ffffff'` | Foreground colour on brand elements |
|
|
158
|
-
| `textColor` | `string` | `'#
|
|
158
|
+
| `textColor` | `string` | `'#e2e8f0'` | Default body text colour |
|
|
159
159
|
| `useAi` | `boolean` | `false` | Enable AI content generation |
|
|
160
160
|
| `aiProvider` | `'openai' \| 'gemini' \| 'claude'` | `'openai'` | AI provider |
|
|
161
|
-
| `aiApiKey` | `string` | — | API key for the AI provider (client-side) |
|
|
162
161
|
| `aiTier` | `'AUTO' \| 'BASIC' \| 'MEDIUM' \| 'HIGH'` | `'AUTO'` | AI model tier |
|
|
163
162
|
| `unsplashKey` | `string` | — | Unsplash API key for stock images |
|
|
164
163
|
| `pexelsKey` | `string` | — | Pexels API key for stock images |
|
package/dist/PlexoRenderer.d.ts
CHANGED
|
@@ -65,6 +65,15 @@ export declare const UploadedImageSchema: z.ZodObject<{
|
|
|
65
65
|
name: z.ZodString;
|
|
66
66
|
src: z.ZodString;
|
|
67
67
|
}, z.core.$strip>;
|
|
68
|
+
export declare const PublishConfigSchema: z.ZodObject<{
|
|
69
|
+
apiKeyOverride: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export declare const AiConfigSchema: z.ZodObject<{
|
|
72
|
+
useAi: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
74
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
75
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>;
|
|
68
77
|
export declare const BodyJSONSchema: z.ZodObject<{
|
|
69
78
|
style: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
70
79
|
rows: z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>;
|
|
@@ -77,6 +86,22 @@ export declare const BodyJSONSchema: z.ZodObject<{
|
|
|
77
86
|
name: z.ZodString;
|
|
78
87
|
src: z.ZodString;
|
|
79
88
|
}, z.core.$strip>>>;
|
|
89
|
+
publishedDomain: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
domain: z.ZodString;
|
|
91
|
+
type: z.ZodEnum<{
|
|
92
|
+
SUBDOMAIN: "SUBDOMAIN";
|
|
93
|
+
CUSTOM: "CUSTOM";
|
|
94
|
+
}>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
publishConfig: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
apiKeyOverride: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
aiConfig: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
useAi: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
102
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
103
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
80
105
|
}, z.core.$strip>;
|
|
81
106
|
export declare const TemplateJSONSchema: z.ZodObject<{
|
|
82
107
|
body: z.ZodObject<{
|
|
@@ -91,6 +116,22 @@ export declare const TemplateJSONSchema: z.ZodObject<{
|
|
|
91
116
|
name: z.ZodString;
|
|
92
117
|
src: z.ZodString;
|
|
93
118
|
}, z.core.$strip>>>;
|
|
119
|
+
publishedDomain: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
domain: z.ZodString;
|
|
121
|
+
type: z.ZodEnum<{
|
|
122
|
+
SUBDOMAIN: "SUBDOMAIN";
|
|
123
|
+
CUSTOM: "CUSTOM";
|
|
124
|
+
}>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
publishConfig: z.ZodOptional<z.ZodObject<{
|
|
127
|
+
apiKeyOverride: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
aiConfig: z.ZodOptional<z.ZodObject<{
|
|
130
|
+
useAi: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
132
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
133
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strip>>;
|
|
94
135
|
}, z.core.$strip>;
|
|
95
136
|
}, z.core.$strip>;
|
|
96
137
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AIActionStatus } from '../utilities/useAIAction';
|
|
3
|
+
interface AIResponseBubbleProps {
|
|
4
|
+
status: AIActionStatus;
|
|
5
|
+
summary?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
onRetry?: () => void;
|
|
8
|
+
onDismiss?: () => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Claude-Code-style loading/result bubble shared by the per-element "Edit with AI"
|
|
13
|
+
* popup and the whole-layout prompt bar: pulsing-dots loader with a rotating status
|
|
14
|
+
* label, a checkmark + summary on success, or a retry affordance on error.
|
|
15
|
+
*/
|
|
16
|
+
export declare const AIResponseBubble: React.FC<AIResponseBubbleProps>;
|
|
17
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface BodyGlobalSettingsTabProps {
|
|
3
3
|
template: any;
|
|
4
|
-
hydrateTemplate
|
|
4
|
+
/** Patches template.body.style without touching selection/undo state the way a full hydrateTemplate() would. */
|
|
5
|
+
updateBodyStyle: (style: Record<string, any>) => void;
|
|
5
6
|
openAccordions: Record<string, boolean>;
|
|
6
7
|
toggleAccordion: (key: string) => void;
|
|
7
8
|
notify?: (message: string) => void;
|
|
@@ -13,6 +14,8 @@ interface BodyGlobalSettingsTabProps {
|
|
|
13
14
|
Toggle: React.ComponentType<any>;
|
|
14
15
|
InlineTextInput: React.ComponentType<any>;
|
|
15
16
|
InlineTextArea: React.ComponentType<any>;
|
|
17
|
+
disableImageUpload?: boolean;
|
|
18
|
+
onOpenImageLibrary?: (tab: 'images' | 'uploads', target: any) => void;
|
|
16
19
|
}
|
|
17
20
|
export declare const BodyGlobalSettingsTab: React.FC<BodyGlobalSettingsTabProps>;
|
|
18
21
|
export {};
|
|
@@ -14,6 +14,11 @@ interface ImagesTabProps {
|
|
|
14
14
|
alt?: string;
|
|
15
15
|
}) => void;
|
|
16
16
|
ICONS: Record<string, React.ReactNode>;
|
|
17
|
+
panelBackgroundColor?: string;
|
|
17
18
|
}
|
|
19
|
+
export declare const chunkArray: <T>(arr: T[]) => Array<{
|
|
20
|
+
type: "cols-2" | "cols-3";
|
|
21
|
+
items: T[];
|
|
22
|
+
}>;
|
|
18
23
|
export declare const ImagesTab: React.FC<ImagesTabProps>;
|
|
19
24
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PublishTabProps {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
templateId?: string;
|
|
5
|
+
/** Mirrors PlexoBuilder's allowPublishLandingPage prop — when false, the user must supply their own API key before they can publish. */
|
|
6
|
+
allowPublishLandingPage?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const PublishTab: React.FC<PublishTabProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SettingsTabProps {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
templateId?: string;
|
|
5
|
+
theme?: {
|
|
6
|
+
textColor: string;
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
borderColor: string;
|
|
9
|
+
mutedTextColor: string;
|
|
10
|
+
};
|
|
11
|
+
allowPublishLandingPage?: boolean;
|
|
12
|
+
useAi?: boolean;
|
|
13
|
+
aiProvider?: string;
|
|
14
|
+
aiTier?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const SettingsTab: React.FC<SettingsTabProps>;
|
|
17
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface UploadsTabProps {
|
|
3
3
|
handleUploadMock: () => void;
|
|
4
|
+
disableImageUpload?: boolean;
|
|
4
5
|
searchUploadQuery: string;
|
|
5
6
|
setSearchUploadQuery: (value: string) => void;
|
|
6
7
|
filteredUploadedImages: Array<{
|
|
@@ -12,7 +13,9 @@ interface UploadsTabProps {
|
|
|
12
13
|
src: string;
|
|
13
14
|
alt?: string;
|
|
14
15
|
}) => void;
|
|
16
|
+
onDeleteUploadedImage?: (id: string) => void;
|
|
15
17
|
ICONS: Record<string, React.ReactNode>;
|
|
18
|
+
panelBackgroundColor?: string;
|
|
16
19
|
}
|
|
17
20
|
export declare const UploadsTab: React.FC<UploadsTabProps>;
|
|
18
21
|
export {};
|