@makeswift/runtime 0.11.0 → 0.11.1

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.js CHANGED
@@ -1194,7 +1194,7 @@ async function fonts(_req, res, { getFonts } = {}) {
1194
1194
  const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
1195
1195
  return res.json(fonts2);
1196
1196
  }
1197
- const version = "0.11.0";
1197
+ const version = "0.11.1";
1198
1198
  async function handler(req, res, { apiKey, siteVersions }) {
1199
1199
  if (req.query.secret !== apiKey) {
1200
1200
  return res.status(401).json({ message: "Unauthorized" });
package/dist/index.es.js CHANGED
@@ -1161,7 +1161,7 @@ async function fonts(_req, res, { getFonts } = {}) {
1161
1161
  const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
1162
1162
  return res.json(fonts2);
1163
1163
  }
1164
- const version = "0.11.0";
1164
+ const version = "0.11.1";
1165
1165
  async function handler(req, res, { apiKey, siteVersions }) {
1166
1166
  if (req.query.secret !== apiKey) {
1167
1167
  return res.status(401).json({ message: "Unauthorized" });
@@ -2175,7 +2175,9 @@ function richTextDTOtoSelection(data) {
2175
2175
  }
2176
2176
  function richTextDTOtoDAO(data) {
2177
2177
  var _a, _b, _c2;
2178
- return (_c2 = (_b = (_a = data.document) == null ? void 0 : _a.nodes) == null ? void 0 : _b.flatMap(toNodeDAO)) != null ? _c2 : [];
2178
+ return (_c2 = (_b = (_a = data.document) == null ? void 0 : _a.nodes) == null ? void 0 : _b.flatMap(toNodeDAO)) != null ? _c2 : [
2179
+ { type: BlockType.Default, children: [{ text: "" }] }
2180
+ ];
2179
2181
  }
2180
2182
  function toInlineOrTextDTO(node) {
2181
2183
  var _a;
@@ -3864,7 +3866,7 @@ function isRichTextV1Data(value) {
3864
3866
  return value !== void 0 && typeof value === "object" && !Array.isArray(value) && "document" in value;
3865
3867
  }
3866
3868
  function richTextV2DataToDescendents(data) {
3867
- return data.descendants;
3869
+ return data.descendants.length === 0 ? [{ type: BlockType.Default, children: [{ text: "" }] }] : data.descendants;
3868
3870
  }
3869
3871
  function richTextV2DescendentsToData(descendants, key) {
3870
3872
  return {