@bigfootai/bigfoot-types 2.8.1 → 2.8.2
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/package.json +1 -2
- package/utils.js +0 -13
- package/utils.ts +0 -11
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Bigfoot",
|
|
3
3
|
"name": "@bigfootai/bigfoot-types",
|
|
4
|
-
"version": "2.8.
|
|
4
|
+
"version": "2.8.2",
|
|
5
5
|
"description": "The internal library for the types used in the Bigfoot platform",
|
|
6
6
|
"main": "model.js",
|
|
7
7
|
"license": "ISC",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"dev": "node model.js"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"jsdom": "^24.0.0",
|
|
15
14
|
"prosemirror-model": "^1.19.4",
|
|
16
15
|
"prosemirror-schema-basic": "^1.2.2",
|
|
17
16
|
"uuid": "^9.0.1"
|
package/utils.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseHtmlBodyToDocument = void 0;
|
|
4
|
-
const prosemirror_model_1 = require("prosemirror-model");
|
|
5
|
-
const prosemirror_schema_basic_1 = require("prosemirror-schema-basic");
|
|
6
|
-
const jsdom_1 = require("jsdom");
|
|
7
|
-
const parseHtmlBodyToDocument = (html) => {
|
|
8
|
-
const dom = new jsdom_1.JSDOM(html);
|
|
9
|
-
const document = dom.window.document;
|
|
10
|
-
// Only take the body of the document
|
|
11
|
-
return prosemirror_model_1.DOMParser.fromSchema(prosemirror_schema_basic_1.schema).parse(document.body);
|
|
12
|
-
};
|
|
13
|
-
exports.parseHtmlBodyToDocument = parseHtmlBodyToDocument;
|
package/utils.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DOMParser, Node } from 'prosemirror-model';
|
|
2
|
-
import { schema } from 'prosemirror-schema-basic';
|
|
3
|
-
import { JSDOM } from 'jsdom';
|
|
4
|
-
|
|
5
|
-
export const parseHtmlBodyToDocument = (html: string): Node => {
|
|
6
|
-
const dom = new JSDOM(html);
|
|
7
|
-
const document = dom.window.document;
|
|
8
|
-
|
|
9
|
-
// Only take the body of the document
|
|
10
|
-
return DOMParser.fromSchema(schema).parse(document.body);
|
|
11
|
-
};
|