@liveblocks/emails 2.14.0-v2encoding → 2.15.0-debug1

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.mjs CHANGED
@@ -3,7 +3,7 @@ import { detectDupes } from "@liveblocks/core";
3
3
 
4
4
  // src/version.ts
5
5
  var PKG_NAME = "@liveblocks/emails";
6
- var PKG_VERSION = "2.14.0-v2encoding";
6
+ var PKG_VERSION = "2.15.0-debug1";
7
7
  var PKG_FORMAT = "esm";
8
8
 
9
9
  // ../../node_modules/lib0/map.js
@@ -7691,7 +7691,6 @@ import {
7691
7691
  html,
7692
7692
  htmlSafe
7693
7693
  } from "@liveblocks/core";
7694
- import React from "react";
7695
7694
 
7696
7695
  // src/lib/constants.ts
7697
7696
  var MENTION_CHARACTER = "@";
@@ -7925,6 +7924,7 @@ function findTiptapMentionNodeWithContext({
7925
7924
  }
7926
7925
 
7927
7926
  // src/liveblocks-text-editor.tsx
7927
+ import { jsx, jsxs } from "react/jsx-runtime";
7928
7928
  var baseLiveblocksTextEditorTextFormat = {
7929
7929
  bold: false,
7930
7930
  italic: false,
@@ -8055,23 +8055,26 @@ var resolveUsersInLiveblocksTextEditorNodes = async (nodes, resolveUsers) => {
8055
8055
  return resolvedUsers;
8056
8056
  };
8057
8057
  var baseComponents = {
8058
- Container: ({ children }) => /* @__PURE__ */ React.createElement("div", null, children),
8059
- Mention: ({ element, user }) => /* @__PURE__ */ React.createElement("span", { "data-mention": true }, MENTION_CHARACTER, user?.name ?? element.userId),
8058
+ Container: ({ children }) => /* @__PURE__ */ jsx("div", { children }),
8059
+ Mention: ({ element, user }) => /* @__PURE__ */ jsxs("span", { "data-mention": true, children: [
8060
+ MENTION_CHARACTER,
8061
+ user?.name ?? element.userId
8062
+ ] }),
8060
8063
  Text: ({ element }) => {
8061
8064
  let children = element.text;
8062
8065
  if (element.bold) {
8063
- children = /* @__PURE__ */ React.createElement("strong", null, children);
8066
+ children = /* @__PURE__ */ jsx("strong", { children });
8064
8067
  }
8065
8068
  if (element.italic) {
8066
- children = /* @__PURE__ */ React.createElement("em", null, children);
8069
+ children = /* @__PURE__ */ jsx("em", { children });
8067
8070
  }
8068
8071
  if (element.strikethrough) {
8069
- children = /* @__PURE__ */ React.createElement("s", null, children);
8072
+ children = /* @__PURE__ */ jsx("s", { children });
8070
8073
  }
8071
8074
  if (element.code) {
8072
- children = /* @__PURE__ */ React.createElement("code", null, children);
8075
+ children = /* @__PURE__ */ jsx("code", { children });
8073
8076
  }
8074
- return /* @__PURE__ */ React.createElement("span", null, children);
8077
+ return /* @__PURE__ */ jsx("span", { children });
8075
8078
  }
8076
8079
  };
8077
8080
  async function convertTextEditorNodesAsReact(nodes, options) {
@@ -8086,25 +8089,25 @@ async function convertTextEditorNodesAsReact(nodes, options) {
8086
8089
  const children = nodes.map((node, index) => {
8087
8090
  switch (node.type) {
8088
8091
  case "mention":
8089
- return /* @__PURE__ */ React.createElement(
8092
+ return /* @__PURE__ */ jsx(
8090
8093
  Components.Mention,
8091
8094
  {
8092
- key: `lb-text-editor-mention-${index}-${node.userId}`,
8093
8095
  element: node,
8094
8096
  user: resolvedUsers.get(node.userId)
8095
- }
8097
+ },
8098
+ `lb-text-editor-mention-${index}-${node.userId}`
8096
8099
  );
8097
8100
  case "text":
8098
- return /* @__PURE__ */ React.createElement(
8101
+ return /* @__PURE__ */ jsx(
8099
8102
  Components.Text,
8100
8103
  {
8101
- key: `lb-text-editor-text-${index}`,
8102
8104
  element: node
8103
- }
8105
+ },
8106
+ `lb-text-editor-text-${index}`
8104
8107
  );
8105
8108
  }
8106
8109
  });
8107
- return /* @__PURE__ */ React.createElement(Components.Container, { key: "lb-text-editor-container" }, children);
8110
+ return /* @__PURE__ */ jsx(Components.Container, { children }, "lb-text-editor-container");
8108
8111
  }
8109
8112
  var baseStyles = {
8110
8113
  container: {
@@ -8380,28 +8383,31 @@ import {
8380
8383
  stringifyCommentBody,
8381
8384
  toAbsoluteUrl
8382
8385
  } from "@liveblocks/core";
8383
- import React2 from "react";
8386
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
8384
8387
  var baseComponents2 = {
8385
- Container: ({ children }) => /* @__PURE__ */ React2.createElement("div", null, children),
8386
- Paragraph: ({ children }) => /* @__PURE__ */ React2.createElement("p", null, children),
8388
+ Container: ({ children }) => /* @__PURE__ */ jsx2("div", { children }),
8389
+ Paragraph: ({ children }) => /* @__PURE__ */ jsx2("p", { children }),
8387
8390
  Text: ({ element }) => {
8388
8391
  let children = element.text;
8389
8392
  if (element.bold) {
8390
- children = /* @__PURE__ */ React2.createElement("strong", null, children);
8393
+ children = /* @__PURE__ */ jsx2("strong", { children });
8391
8394
  }
8392
8395
  if (element.italic) {
8393
- children = /* @__PURE__ */ React2.createElement("em", null, children);
8396
+ children = /* @__PURE__ */ jsx2("em", { children });
8394
8397
  }
8395
8398
  if (element.strikethrough) {
8396
- children = /* @__PURE__ */ React2.createElement("s", null, children);
8399
+ children = /* @__PURE__ */ jsx2("s", { children });
8397
8400
  }
8398
8401
  if (element.code) {
8399
- children = /* @__PURE__ */ React2.createElement("code", null, children);
8402
+ children = /* @__PURE__ */ jsx2("code", { children });
8400
8403
  }
8401
- return /* @__PURE__ */ React2.createElement("span", null, children);
8404
+ return /* @__PURE__ */ jsx2("span", { children });
8402
8405
  },
8403
- Link: ({ element, href }) => /* @__PURE__ */ React2.createElement("a", { href, target: "_blank", rel: "noopener noreferrer" }, element.text ?? element.url),
8404
- Mention: ({ element, user }) => /* @__PURE__ */ React2.createElement("span", { "data-mention": true }, MENTION_CHARACTER, user?.name ?? element.id)
8406
+ Link: ({ element, href }) => /* @__PURE__ */ jsx2("a", { href, target: "_blank", rel: "noopener noreferrer", children: element.text ?? element.url }),
8407
+ Mention: ({ element, user }) => /* @__PURE__ */ jsxs2("span", { "data-mention": true, children: [
8408
+ MENTION_CHARACTER,
8409
+ user?.name ?? element.id
8410
+ ] })
8405
8411
  };
8406
8412
  async function convertCommentBodyAsReact(body, options) {
8407
8413
  const Components = {
@@ -8417,38 +8423,38 @@ async function convertCommentBodyAsReact(body, options) {
8417
8423
  case "paragraph": {
8418
8424
  const children = block.children.map((inline, inlineIndex) => {
8419
8425
  if (isCommentBodyMention(inline)) {
8420
- return inline.id ? /* @__PURE__ */ React2.createElement(
8426
+ return inline.id ? /* @__PURE__ */ jsx2(
8421
8427
  Components.Mention,
8422
8428
  {
8423
- key: `lb-comment-body-mention-${inlineIndex}`,
8424
8429
  element: inline,
8425
8430
  user: resolvedUsers.get(inline.id)
8426
- }
8431
+ },
8432
+ `lb-comment-body-mention-${inlineIndex}`
8427
8433
  ) : null;
8428
8434
  }
8429
8435
  if (isCommentBodyLink(inline)) {
8430
8436
  const href = toAbsoluteUrl(inline.url) ?? inline.url;
8431
- return /* @__PURE__ */ React2.createElement(
8437
+ return /* @__PURE__ */ jsx2(
8432
8438
  Components.Link,
8433
8439
  {
8434
- key: `lb-comment-body-link-${inlineIndex}`,
8435
8440
  element: inline,
8436
8441
  href
8437
- }
8442
+ },
8443
+ `lb-comment-body-link-${inlineIndex}`
8438
8444
  );
8439
8445
  }
8440
8446
  if (isCommentBodyText(inline)) {
8441
- return /* @__PURE__ */ React2.createElement(
8447
+ return /* @__PURE__ */ jsx2(
8442
8448
  Components.Text,
8443
8449
  {
8444
- key: `lb-comment-body-text-${inlineIndex}`,
8445
8450
  element: inline
8446
- }
8451
+ },
8452
+ `lb-comment-body-text-${inlineIndex}`
8447
8453
  );
8448
8454
  }
8449
8455
  return null;
8450
8456
  });
8451
- return /* @__PURE__ */ React2.createElement(Components.Paragraph, { key: `lb-comment-body-paragraph-${index}` }, children);
8457
+ return /* @__PURE__ */ jsx2(Components.Paragraph, { children }, `lb-comment-body-paragraph-${index}`);
8452
8458
  }
8453
8459
  default:
8454
8460
  console.warn(
@@ -8457,7 +8463,7 @@ async function convertCommentBodyAsReact(body, options) {
8457
8463
  return null;
8458
8464
  }
8459
8465
  });
8460
- return /* @__PURE__ */ React2.createElement(Components.Container, { key: "lb-comment-body-container" }, blocks);
8466
+ return /* @__PURE__ */ jsx2(Components.Container, { children: blocks }, "lb-comment-body-container");
8461
8467
  }
8462
8468
  var baseStyles2 = {
8463
8469
  paragraph: {