@zipify/wysiwyg 4.3.0 → 4.4.0-dev.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.
@@ -1,6 +1,6 @@
1
1
  import { resolve } from 'path';
2
- import { ContentSerializer, ContextWindow } from '../../services';
3
- import { NodeDomParser } from '../NodeDomParser';
2
+ import { ContentSerializer, ContextWindow } from '@/services';
3
+ import { NodeDomParser } from '@/node';
4
4
  import { Command } from './Command';
5
5
 
6
6
  export class ToJsonCommand extends Command {
@@ -0,0 +1,2 @@
1
+ export { ContentSerializer, ContextWindow } from './services';
2
+ export { NodeDomParser } from './node';
@@ -0,0 +1,16 @@
1
+ import { JSDOM } from 'jsdom';
2
+
3
+ export class NodeDomParser {
4
+ static createWindow(): Window {
5
+ return new JSDOM().window as unknown as Window;
6
+ }
7
+
8
+ types!: Window;
9
+
10
+ parse(html: string): Document {
11
+ const { window } = new JSDOM(html);
12
+
13
+ this.types = window as unknown as Window;
14
+ return window.document;
15
+ }
16
+ }
@@ -0,0 +1 @@
1
+ export * from './NodeDomParser';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zipify/wysiwyg",
3
- "version": "4.3.0",
3
+ "version": "4.4.0-dev.1",
4
4
  "description": "Zipify modification of TipTap text editor",
5
5
  "main": "dist/wysiwyg.mjs",
6
6
  "types": "dist/wysiwyg.d.ts",
@@ -21,6 +21,7 @@
21
21
  "lib:build": "npm run lib:build-types && vite build --config config/build/lib.config.ts",
22
22
  "lib:build-types": "vue-tsc -P ./tsconfig.types.json",
23
23
  "lib:release": "[ -f .env ] && export $(cat .env | xargs) && release-it",
24
+ "node:build": "NODE_ENV=production rollup --config config/build/node.config.js --bundleConfigAsCjs",
24
25
  "cli:build": "NODE_ENV=production rollup --config config/build/cli.config.js --bundleConfigAsCjs",
25
26
  "cli:dev": "NODE_ENV=development rollup --config config/build/cli.config.js --bundleConfigAsCjs --watch",
26
27
  "example:start": "NODE_ENV=development vite serve --config config/build/example.config.ts",
@@ -49,8 +50,8 @@
49
50
  },
50
51
  "peerDependencies": {
51
52
  "@zipify/colorpicker": "^3.2",
52
- "vue": "^3.4",
53
- "simplebar": "^6.2"
53
+ "simplebar": "^6.2",
54
+ "vue": "^3.4"
54
55
  },
55
56
  "peerDependenciesMeta": {
56
57
  "@zipify/colorpicker": {
@@ -69,19 +70,18 @@
69
70
  "@babel/plugin-transform-runtime": "^7.24.0",
70
71
  "@babel/preset-env": "^7.24.0",
71
72
  "@babel/runtime": "^7.24.0",
72
- "@optimize-lodash/rollup-plugin": "^4.0.4",
73
+ "@optimize-lodash/rollup-plugin": "^5.0.0",
73
74
  "@rollup/plugin-alias": "^5.1.0",
74
- "@rollup/plugin-commonjs": "^25.0.7",
75
+ "@rollup/plugin-commonjs": "^26.0.1",
75
76
  "@rollup/plugin-json": "^6.1.0",
76
77
  "@rollup/plugin-node-resolve": "^15.2.3",
77
- "@rollup/plugin-replace": "^5.0.5",
78
- "@rollup/plugin-terser": "^0.4.4",
78
+ "@rollup/plugin-replace": "^5.0.7",
79
79
  "@rushstack/eslint-patch": "^1.7.2",
80
80
  "@types/jest": "^29.5.12",
81
81
  "@types/node": "^20.10.0",
82
82
  "@typescript-eslint/eslint-plugin": "^7.2.0",
83
83
  "@typescript-eslint/parser": "^7.2.0",
84
- "@vitejs/plugin-vue": "^5.0.4",
84
+ "@vitejs/plugin-vue": "^5.1.2",
85
85
  "@vue/eslint-config-typescript": "^13.0.0",
86
86
  "@vue/test-utils": "^2.4.5",
87
87
  "@vue/tsconfig": "^0.5.1",
@@ -101,13 +101,14 @@
101
101
  "lint-staged": "^15.2.2",
102
102
  "postcss-html": "^1.6.0",
103
103
  "release-it": "^17.1.1",
104
- "rollup": "^4.13.0",
104
+ "rollup": "^4.21.1",
105
105
  "rollup-plugin-esbuild": "^6.1.1",
106
+ "rollup-plugin-esbuild-minify": "^1.1.2",
106
107
  "simplebar": "^6.2.5",
107
108
  "stylelint": "^14.16.1",
108
109
  "svgo": "^3.2.0",
109
110
  "typescript": "^5.4.2",
110
- "vite": "^5.1.6",
111
+ "vite": "^5.4.2",
111
112
  "vue": "3.4.21",
112
113
  "vue-tsc": "^2.0.6"
113
114
  },
@@ -1,16 +0,0 @@
1
- import { JSDOM } from 'jsdom';
2
-
3
- export class NodeDomParser {
4
- static createWindow() {
5
- return new JSDOM().window;
6
- }
7
-
8
- types;
9
-
10
- parse(html) {
11
- const { window } = new JSDOM(html);
12
-
13
- this.types = window;
14
- return window.document;
15
- }
16
- }