@trycourier/react-designer 0.0.0-canary-20250725092737 → 0.0.0-canary-20250828155722

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
@@ -150,10 +150,10 @@ function SaveButtonComponent() {
150
150
  await publishTemplate();
151
151
  }
152
152
 
153
- return (
154
- <TemplateProvider templateId="template-123" tenantId="tenant-123" token="jwt">
153
+ return (
154
+ <TemplateProvider templateId="template-123" tenantId="tenant-123" token="jwt">
155
155
  <TemplateEditor hidePublish />
156
- <button onClick={handlePublishTemplate}>Save Template</button>;
156
+ <button onClick={handlePublishTemplate}>Save Template</button>;
157
157
  </TemplateProvider>
158
158
  );
159
159
  }
@@ -214,10 +214,10 @@ function SaveButtonComponent() {
214
214
  await publishTemplate();
215
215
  }
216
216
 
217
- return (
218
- <TemplateProvider templateId="template-123" tenantId="tenant-123" token="jwt">
217
+ return (
218
+ <TemplateProvider templateId="template-123" tenantId="tenant-123" token="jwt">
219
219
  <TemplateEditor autoSave={false} hidePublish />
220
- <button onClick={handleSaveTemplate}>Save Template</button>;
220
+ <button onClick={handleSaveTemplate}>Save Template</button>;
221
221
  </TemplateProvider>
222
222
  );
223
223
  }
@@ -263,20 +263,20 @@ function App() {
263
263
  <TemplateProvider templateId="template-123" tenantId="tenant-123" token="jwt">
264
264
  <TemplateEditor
265
265
  variables={{
266
- "user": {
267
- "firstName": "John",
268
- "lastName": "Doe",
269
- "email": "john@example.com"
270
- },
271
- "company": {
272
- "name": "Acme Inc",
273
- "address": {
274
- "street": "123 Main St",
275
- "city": "San Francisco"
276
- }
277
- }
278
- }}
279
- />
266
+ "user": {
267
+ "firstName": "John",
268
+ "lastName": "Doe",
269
+ "email": "john@example.com"
270
+ },
271
+ "company": {
272
+ "name": "Acme Inc",
273
+ "address": {
274
+ "street": "123 Main St",
275
+ "city": "San Francisco"
276
+ }
277
+ }
278
+ }}
279
+ />
280
280
  </TemplateProvider>
281
281
  );
282
282
  }
@@ -374,6 +374,7 @@ The Editor component is the core element that provides the template editing inte
374
374
  | brandProps | BrandEditorProps | | Configuration options for the brand editor when enabled. Passed directly to the BrandEditor component. |
375
375
  | hidePublish | boolean | false | When true, hides the "Publish Changes" button in the editor interface. |
376
376
  | onChange | (value: ElementalContent) => void | | Callback function that fires whenever the editor content changes, providing the updated ElementalContent structure. |
377
+ | routing | { method: string; channels: string[] } | | Configures multi-channel routing behavior. The `method` property determines how channels are selected: "single" (send to the first channel) or "all" (send to all channels). The `channels` array specifies available delivery channels like ["email", "sms", "push"]. |
377
378
  | theme | ThemeObj | cssClass | | Controls the visual appearance of the editor. Can be a Theme object with styling properties or a CSS class name. |
378
379
  | value | ElementalContent | | Initial content for the editor in ElementalContent format. Used as the starting template when the editor loads. |
379
380
  | variables | Record<string, any | | Custom variables available for template personalization. These can be referenced within the template content. |