@tinacms/mdx 1.3.16 → 1.3.17

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.
@@ -52,7 +52,7 @@ var require_extend = __commonJS({
52
52
  }
53
53
  return toStr.call(arr) === "[object Array]";
54
54
  };
55
- var isPlainObject2 = function isPlainObject3(obj) {
55
+ var isPlainObject3 = function isPlainObject4(obj) {
56
56
  if (!obj || toStr.call(obj) !== "[object Object]") {
57
57
  return false;
58
58
  }
@@ -109,12 +109,12 @@ var require_extend = __commonJS({
109
109
  src = getProperty(target, name2);
110
110
  copy = getProperty(options, name2);
111
111
  if (target !== copy) {
112
- if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray4(copy)))) {
112
+ if (deep && copy && (isPlainObject3(copy) || (copyIsArray = isArray4(copy)))) {
113
113
  if (copyIsArray) {
114
114
  copyIsArray = false;
115
115
  clone = src && isArray4(src) ? src : [];
116
116
  } else {
117
- clone = src && isPlainObject2(src) ? src : {};
117
+ clone = src && isPlainObject3(src) ? src : {};
118
118
  }
119
119
  setProperty(target, { name: name2, newValue: extend4(deep, clone, copy) });
120
120
  } else if (typeof copy !== "undefined") {
@@ -35419,6 +35419,9 @@ function stringifyProps(element2, parentField, flatten2, imageCallback) {
35419
35419
  } else {
35420
35420
  const joiner = flatten2 ? " " : "\n";
35421
35421
  let val = "";
35422
+ if (isPlainObject2(value) && Object.keys(value).length === 0) {
35423
+ return;
35424
+ }
35422
35425
  assertShape(
35423
35426
  value,
35424
35427
  (value2) => value2.type === "root" && Array.isArray(value2.children),
@@ -35504,6 +35507,9 @@ function assertShape(value, callback, errorMessage) {
35504
35507
  throw new Error(errorMessage || `Failed to assert shape`);
35505
35508
  }
35506
35509
  }
35510
+ function isPlainObject2(value) {
35511
+ return typeof value === "object" && value !== null && !Array.isArray(value);
35512
+ }
35507
35513
 
35508
35514
  // src/stringify/marks.ts
35509
35515
  var matches = (a, b) => {
package/dist/index.js CHANGED
@@ -49,7 +49,7 @@ var require_extend = __commonJS({
49
49
  }
50
50
  return toStr.call(arr) === "[object Array]";
51
51
  };
52
- var isPlainObject2 = function isPlainObject3(obj) {
52
+ var isPlainObject3 = function isPlainObject4(obj) {
53
53
  if (!obj || toStr.call(obj) !== "[object Object]") {
54
54
  return false;
55
55
  }
@@ -106,12 +106,12 @@ var require_extend = __commonJS({
106
106
  src = getProperty(target, name2);
107
107
  copy = getProperty(options, name2);
108
108
  if (target !== copy) {
109
- if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray4(copy)))) {
109
+ if (deep && copy && (isPlainObject3(copy) || (copyIsArray = isArray4(copy)))) {
110
110
  if (copyIsArray) {
111
111
  copyIsArray = false;
112
112
  clone = src && isArray4(src) ? src : [];
113
113
  } else {
114
- clone = src && isPlainObject2(src) ? src : {};
114
+ clone = src && isPlainObject3(src) ? src : {};
115
115
  }
116
116
  setProperty(target, { name: name2, newValue: extend4(deep, clone, copy) });
117
117
  } else if (typeof copy !== "undefined") {
@@ -37303,6 +37303,9 @@ function stringifyProps(element, parentField, flatten2, imageCallback) {
37303
37303
  } else {
37304
37304
  const joiner = flatten2 ? " " : "\n";
37305
37305
  let val = "";
37306
+ if (isPlainObject2(value) && Object.keys(value).length === 0) {
37307
+ return;
37308
+ }
37306
37309
  assertShape(
37307
37310
  value,
37308
37311
  (value2) => value2.type === "root" && Array.isArray(value2.children),
@@ -37388,6 +37391,9 @@ function assertShape(value, callback, errorMessage) {
37388
37391
  throw new Error(errorMessage || `Failed to assert shape`);
37389
37392
  }
37390
37393
  }
37394
+ function isPlainObject2(value) {
37395
+ return typeof value === "object" && value !== null && !Array.isArray(value);
37396
+ }
37391
37397
 
37392
37398
  // src/stringify/marks.ts
37393
37399
  var matches = (a, b) => {
package/dist/index.mjs CHANGED
@@ -52,7 +52,7 @@ var require_extend = __commonJS({
52
52
  }
53
53
  return toStr.call(arr) === "[object Array]";
54
54
  };
55
- var isPlainObject2 = function isPlainObject3(obj) {
55
+ var isPlainObject3 = function isPlainObject4(obj) {
56
56
  if (!obj || toStr.call(obj) !== "[object Object]") {
57
57
  return false;
58
58
  }
@@ -109,12 +109,12 @@ var require_extend = __commonJS({
109
109
  src = getProperty(target, name2);
110
110
  copy = getProperty(options, name2);
111
111
  if (target !== copy) {
112
- if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray4(copy)))) {
112
+ if (deep && copy && (isPlainObject3(copy) || (copyIsArray = isArray4(copy)))) {
113
113
  if (copyIsArray) {
114
114
  copyIsArray = false;
115
115
  clone = src && isArray4(src) ? src : [];
116
116
  } else {
117
- clone = src && isPlainObject2(src) ? src : {};
117
+ clone = src && isPlainObject3(src) ? src : {};
118
118
  }
119
119
  setProperty(target, { name: name2, newValue: extend4(deep, clone, copy) });
120
120
  } else if (typeof copy !== "undefined") {
@@ -37291,6 +37291,9 @@ function stringifyProps(element, parentField, flatten2, imageCallback) {
37291
37291
  } else {
37292
37292
  const joiner = flatten2 ? " " : "\n";
37293
37293
  let val = "";
37294
+ if (isPlainObject2(value) && Object.keys(value).length === 0) {
37295
+ return;
37296
+ }
37294
37297
  assertShape(
37295
37298
  value,
37296
37299
  (value2) => value2.type === "root" && Array.isArray(value2.children),
@@ -37376,6 +37379,9 @@ function assertShape(value, callback, errorMessage) {
37376
37379
  throw new Error(errorMessage || `Failed to assert shape`);
37377
37380
  }
37378
37381
  }
37382
+ function isPlainObject2(value) {
37383
+ return typeof value === "object" && value !== null && !Array.isArray(value);
37384
+ }
37379
37385
 
37380
37386
  // src/stringify/marks.ts
37381
37387
  var matches = (a, b) => {
@@ -0,0 +1,2 @@
1
+ import { RichTextField } from '@tinacms/schema-tools';
2
+ export declare const field: RichTextField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/mdx",
3
- "version": "1.3.16",
3
+ "version": "1.3.17",
4
4
  "typings": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "browser": "dist/index.browser.mjs",
@@ -27,7 +27,7 @@
27
27
  ]
28
28
  },
29
29
  "dependencies": {
30
- "@tinacms/schema-tools": "1.4.10",
30
+ "@tinacms/schema-tools": "1.4.11",
31
31
  "acorn": "8.8.2",
32
32
  "ccount": "2.0.1",
33
33
  "estree-util-is-identifier-name": "2.1.0",