@mjml-agent-editor/editor 0.1.1 → 0.1.3

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/dist/index.cjs CHANGED
@@ -36,7 +36,7 @@ __export(index_exports, {
36
36
  EditorHeader: () => EditorHeader,
37
37
  EditorStoreProvider: () => EditorStoreProvider,
38
38
  Markdown: () => Markdown,
39
- STARTER_MJML: () => STARTER_MJML,
39
+ STARTER_MJML: () => import_core.STARTER_MJML,
40
40
  useCommentStore: () => useCommentStore,
41
41
  useDocumentStore: () => useDocumentStore
42
42
  });
@@ -68,20 +68,8 @@ function useCommentStore() {
68
68
  return useStores().comments;
69
69
  }
70
70
 
71
- // src/starter.ts
72
- var STARTER_MJML = `<mjml>
73
- <mj-body background-color="#f4f4f5">
74
- <mj-section background-color="#ffffff" padding="32px 24px">
75
- <mj-column>
76
- <mj-text font-size="22px" font-weight="bold">New email</mj-text>
77
- <mj-text color="#555555">
78
- Describe the email you need in the chat on the right \u2014 the agent
79
- will design the sections, content and images.
80
- </mj-text>
81
- </mj-column>
82
- </mj-section>
83
- </mj-body>
84
- </mjml>`;
71
+ // src/index.ts
72
+ var import_core = require("@mjml-agent-editor/core");
85
73
 
86
74
  // src/components/editor/EditorHeader.tsx
87
75
  var import_react2 = require("react");
@@ -1439,6 +1427,7 @@ function ToolActivity({ tools }) {
1439
1427
  function ChatPanel({
1440
1428
  docId,
1441
1429
  initialMessages,
1430
+ transport,
1442
1431
  onBeforeSend,
1443
1432
  onAgentFinish,
1444
1433
  onLiveUpdate,
@@ -1459,7 +1448,7 @@ function ChatPanel({
1459
1448
  };
1460
1449
  const { messages, sendMessage, status, stop } = (0, import_react4.useChat)({
1461
1450
  messages: initialMessages,
1462
- transport: new import_ai.DefaultChatTransport({
1451
+ transport: transport ?? new import_ai.DefaultChatTransport({
1463
1452
  // Same-origin: the agent is a route handler in this app, not a separate service.
1464
1453
  api: "/api/chat",
1465
1454
  body: { docId }