@uniformdev/richtext 20.47.0 → 20.47.1-alpha.9

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.esm.js CHANGED
@@ -60,7 +60,7 @@ function isRichTextValueConsideredEmpty(value) {
60
60
  if (!isRichTextNodeType(child, "paragraph")) {
61
61
  return false;
62
62
  }
63
- return child.children === void 0 || child.children.length === 0;
63
+ return !hasChildren(child);
64
64
  }
65
65
  function hasChildren(node) {
66
66
  return "children" in node && isArrayWithLength(node.children);
package/dist/index.js CHANGED
@@ -122,7 +122,7 @@ function isRichTextValueConsideredEmpty(value) {
122
122
  if (!isRichTextNodeType(child, "paragraph")) {
123
123
  return false;
124
124
  }
125
- return child.children === void 0 || child.children.length === 0;
125
+ return !hasChildren(child);
126
126
  }
127
127
  function hasChildren(node) {
128
128
  return "children" in node && isArrayWithLength(node.children);
package/dist/index.mjs CHANGED
@@ -60,7 +60,7 @@ function isRichTextValueConsideredEmpty(value) {
60
60
  if (!isRichTextNodeType(child, "paragraph")) {
61
61
  return false;
62
62
  }
63
- return child.children === void 0 || child.children.length === 0;
63
+ return !hasChildren(child);
64
64
  }
65
65
  function hasChildren(node) {
66
66
  return "children" in node && isArrayWithLength(node.children);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/richtext",
3
- "version": "20.47.0",
3
+ "version": "20.47.1-alpha.9+38d1d052b6",
4
4
  "description": "Common functionality and types for Uniform Rich Text parameters",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -34,19 +34,19 @@
34
34
  "dev": "run-s dev:ts",
35
35
  "dev:ts": "tsup --watch",
36
36
  "clean": "rimraf dist",
37
- "test": "jest --maxWorkers=1",
37
+ "test": "vitest run",
38
38
  "lint": "eslint \"src/**/*.{js,ts,tsx}\"",
39
39
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
40
40
  "document:prebuild": "api-extractor run --local"
41
41
  },
42
42
  "devDependencies": {
43
- "@lexical/headless": "0.25.0",
44
- "@lexical/html": "0.25.0",
45
- "@lexical/link": "0.25.0",
46
- "@lexical/list": "0.25.0",
47
- "@lexical/rich-text": "0.25.0",
48
- "@uniformdev/assets": "20.47.0",
49
- "lexical": "0.25.0"
43
+ "@lexical/headless": "0.39.0",
44
+ "@lexical/html": "0.39.0",
45
+ "@lexical/link": "0.39.0",
46
+ "@lexical/list": "0.39.0",
47
+ "@lexical/rich-text": "0.39.0",
48
+ "@uniformdev/assets": "20.47.1-alpha.9+38d1d052b6",
49
+ "lexical": "0.39.0"
50
50
  },
51
51
  "files": [
52
52
  "/dist"
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "446f701d32eee97220ab693e69b0952ed95cc1c5"
57
+ "gitHead": "38d1d052b632b873208982e8aefa300e871ba5b7"
58
58
  }