@knapsack/tiptap-utils 4.66.0 → 4.66.1--canary.4361.11e6d94.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
 
2
- > @knapsack/tiptap-utils@4.65.8 build /home/runner/work/app-monorepo/app-monorepo/libs/tiptap-utils
2
+ > @knapsack/tiptap-utils@4.66.0 build /home/runner/work/app-monorepo/app-monorepo/libs/tiptap-utils
3
3
  > tsc
4
4
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @knapsack/tiptap-utils@4.65.8 lint /home/runner/work/app-monorepo/app-monorepo/libs/tiptap-utils
2
+ > @knapsack/tiptap-utils@4.66.0 lint /home/runner/work/app-monorepo/app-monorepo/libs/tiptap-utils
3
3
  > eslint ./
4
4
 
@@ -1,3 +1,4 @@
1
1
  import { JSONContent } from './tiptap-extensions.js';
2
2
  export declare function convertHtmlToTipTapJson(html: string): JSONContent;
3
+ export declare function convertTipTapJsonToHtml(json: JSONContent): string;
3
4
  //# sourceMappingURL=tiptap-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap-utils.d.ts","sourceRoot":"","sources":["../src/tiptap-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,WAAW,EAAQ,MAAM,wBAAwB,CAAC;AAE1E,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAmBjE"}
1
+ {"version":3,"file":"tiptap-utils.d.ts","sourceRoot":"","sources":["../src/tiptap-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,WAAW,EAAQ,MAAM,wBAAwB,CAAC;AAE1E,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAmBjE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAEjE"}
@@ -1,4 +1,4 @@
1
- import { generateJSON } from '@tiptap/html';
1
+ import { generateJSON, generateHTML } from '@tiptap/html';
2
2
  import { allExtensions, Link } from './tiptap-extensions.js';
3
3
  export function convertHtmlToTipTapJson(html) {
4
4
  return generateJSON(html, [
@@ -17,4 +17,7 @@ export function convertHtmlToTipTapJson(html) {
17
17
  }),
18
18
  ]);
19
19
  }
20
+ export function convertTipTapJsonToHtml(json) {
21
+ return generateHTML(json, allExtensions);
22
+ }
20
23
  //# sourceMappingURL=tiptap-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap-utils.js","sourceRoot":"","sources":["../src/tiptap-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAe,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE1E,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,OAAO,YAAY,CAAC,IAAI,EAAE;QACxB,0EAA0E;QAC1E,GAAG,aAAa,CAAC,MAAM,CACrB,CAAC,GAAG,EAAE,EAAE,CACN,CAAC;YACC,IAAI,CAAC,IAAI;YACT,2CAA2C;SAC5C,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CACvB;QACD,gFAAgF;QAChF,kBAAkB;QAClB,yDAAyD;QACzD,IAAI,CAAC,MAAM,CAAC;YACV,SAAS;gBACP,OAAO,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;YAC9B,CAAC;SACF,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"tiptap-utils.js","sourceRoot":"","sources":["../src/tiptap-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAe,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE1E,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,OAAO,YAAY,CAAC,IAAI,EAAE;QACxB,0EAA0E;QAC1E,GAAG,aAAa,CAAC,MAAM,CACrB,CAAC,GAAG,EAAE,EAAE,CACN,CAAC;YACC,IAAI,CAAC,IAAI;YACT,2CAA2C;SAC5C,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CACvB;QACD,gFAAgF;QAChF,kBAAkB;QAClB,yDAAyD;QACzD,IAAI,CAAC,MAAM,CAAC;YACV,SAAS;gBACP,OAAO,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;YAC9B,CAAC;SACF,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,IAAiB;IACvD,OAAO,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AAC3C,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knapsack/tiptap-utils",
3
3
  "description": "",
4
- "version": "4.66.0",
4
+ "version": "4.66.1--canary.4361.11e6d94.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -18,7 +18,7 @@
18
18
  "lint": "eslint ./"
19
19
  },
20
20
  "dependencies": {
21
- "@knapsack/utils": "4.66.0",
21
+ "@knapsack/utils": "4.66.1--canary.4361.11e6d94.0",
22
22
  "@tiptap/core": "^2.2.4",
23
23
  "@tiptap/extension-blockquote": "^2.2.4",
24
24
  "@tiptap/extension-bold": "^2.2.4",
@@ -52,9 +52,9 @@
52
52
  "@tiptap/pm": "^2.2.4"
53
53
  },
54
54
  "devDependencies": {
55
- "@knapsack/eslint-config-starter": "4.66.0",
56
- "@knapsack/prettier-config": "4.66.0",
57
- "@knapsack/typescript-config-starter": "4.66.0",
55
+ "@knapsack/eslint-config-starter": "4.66.1--canary.4361.11e6d94.0",
56
+ "@knapsack/prettier-config": "4.66.1--canary.4361.11e6d94.0",
57
+ "@knapsack/typescript-config-starter": "4.66.1--canary.4361.11e6d94.0",
58
58
  "@types/node": "^20.12.12",
59
59
  "eslint": "^8.57.0",
60
60
  "typescript": "^5.5.3"
@@ -68,5 +68,5 @@
68
68
  "directory": "libs/tiptap-utils",
69
69
  "type": "git"
70
70
  },
71
- "gitHead": "93d8e0b1b7c65af2ba22d3dc9ef79dcbf966c65d"
71
+ "gitHead": "11e6d94cff8d4d0623e30dfd188dc6bb53d3e6d8"
72
72
  }
@@ -1,4 +1,5 @@
1
- import { generateJSON } from '@tiptap/html';
1
+ import { generateJSON, generateHTML } from '@tiptap/html';
2
+
2
3
  import { allExtensions, JSONContent, Link } from './tiptap-extensions.js';
3
4
 
4
5
  export function convertHtmlToTipTapJson(html: string): JSONContent {
@@ -21,3 +22,7 @@ export function convertHtmlToTipTapJson(html: string): JSONContent {
21
22
  }),
22
23
  ]);
23
24
  }
25
+
26
+ export function convertTipTapJsonToHtml(json: JSONContent): string {
27
+ return generateHTML(json, allExtensions);
28
+ }