@zipify/wysiwyg 3.4.1-dev → 3.4.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.
- package/.release-it.json +1 -2
- package/dist/cli.js +3 -3
- package/dist/wysiwyg.css +11 -10
- package/dist/wysiwyg.mjs +1999 -1595
- package/lib/components/toolbar/Toolbar.vue +1 -0
- package/lib/components/toolbar/controls/AlignmentControl.vue +2 -3
- package/package.json +31 -39
- package/ci/example/deploy.sh +0 -25
- package/config/build/node.config.js +0 -38
- package/dist/wysiwyg.cjs +0 -16
- package/lib/entryNode.js +0 -2
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
|
-
import { inject
|
|
19
|
+
import { inject } from 'vue';
|
|
20
20
|
import { InjectionTokens } from '../../../injectionTokens';
|
|
21
21
|
import { Alignments } from '../../../enums';
|
|
22
22
|
import { ButtonToggle, Button, Icon } from '../../base';
|
|
@@ -56,8 +56,7 @@ export default {
|
|
|
56
56
|
|
|
57
57
|
setup(_, { emit }) {
|
|
58
58
|
const editor = inject(InjectionTokens.EDITOR);
|
|
59
|
-
const
|
|
60
|
-
const currentValue = computed(() => unref(alignment));
|
|
59
|
+
const currentValue = editor.commands.getAlignment();
|
|
61
60
|
|
|
62
61
|
function toggle(value) {
|
|
63
62
|
editor.chain().focus().applyAlignment(value).run();
|
package/package.json
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zipify/wysiwyg",
|
|
3
|
-
"version": "3.4.1
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Zipify modification of TipTap text editor",
|
|
5
|
-
"
|
|
6
|
-
".": {
|
|
7
|
-
"node": "./dist/wysiwyg.cjs",
|
|
8
|
-
"default": "./dist/wysiwyg.mjs"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
5
|
+
"main": "dist/wysiwyg.mjs",
|
|
11
6
|
"bin": {
|
|
12
7
|
"zipify-wysiwyg": "bin/cli"
|
|
13
8
|
},
|
|
@@ -26,32 +21,30 @@
|
|
|
26
21
|
"lib:release": "export $(cat ./.env | xargs) && release-it",
|
|
27
22
|
"cli:build": "NODE_ENV=production rollup --config config/build/cli.config.js --bundleConfigAsCjs",
|
|
28
23
|
"cli:dev": "NODE_ENV=development rollup --config config/build/cli.config.js --bundleConfigAsCjs --watch",
|
|
29
|
-
"node:build": "NODE_ENV=production rollup --config config/build/node.config.js --bundleConfigAsCjs",
|
|
30
24
|
"example:start": "NODE_ENV=development vite serve --config config/build/example.config.js",
|
|
31
25
|
"example:build": "NODE_ENV=production vite build --config config/build/example.config.js",
|
|
32
26
|
"test:unit": "jest .",
|
|
33
27
|
"lint:js": "eslint ./lib",
|
|
34
28
|
"lint:css": "stylelint ./lib/**/*.{css,vue}",
|
|
35
29
|
"optimize-svg": "svgo --config ./config/svgo.js",
|
|
36
|
-
"gzip": "gzipper compress",
|
|
37
30
|
"prepare": "husky install"
|
|
38
31
|
},
|
|
39
32
|
"dependencies": {
|
|
40
|
-
"@popperjs/core": "^2.11.
|
|
41
|
-
"@tiptap/core": "2.0.0
|
|
42
|
-
"@tiptap/extension-document": "2.0.0
|
|
43
|
-
"@tiptap/extension-heading": "2.0.0
|
|
44
|
-
"@tiptap/extension-history": "2.0.0
|
|
45
|
-
"@tiptap/extension-link": "2.0.0
|
|
46
|
-
"@tiptap/extension-list-item": "2.0.0
|
|
47
|
-
"@tiptap/extension-paragraph": "2.0.0
|
|
48
|
-
"@tiptap/extension-text": "2.0.0
|
|
49
|
-
"@tiptap/pm": "^2.0.0
|
|
50
|
-
"@tiptap/vue-2": "2.0.0
|
|
33
|
+
"@popperjs/core": "^2.11.7",
|
|
34
|
+
"@tiptap/core": "^2.0.0",
|
|
35
|
+
"@tiptap/extension-document": "^2.0.0",
|
|
36
|
+
"@tiptap/extension-heading": "^2.0.0",
|
|
37
|
+
"@tiptap/extension-history": "^2.0.0",
|
|
38
|
+
"@tiptap/extension-link": "^2.0.0",
|
|
39
|
+
"@tiptap/extension-list-item": "^2.0.0",
|
|
40
|
+
"@tiptap/extension-paragraph": "^2.0.0",
|
|
41
|
+
"@tiptap/extension-text": "^2.0.0",
|
|
42
|
+
"@tiptap/pm": "^2.0.0",
|
|
43
|
+
"@tiptap/vue-2": "^2.0.0",
|
|
51
44
|
"commander": "^10.0.0",
|
|
52
|
-
"jsdom": "^21.1.
|
|
45
|
+
"jsdom": "^21.1.1",
|
|
53
46
|
"lodash": "^4.17.21",
|
|
54
|
-
"simplebar": "^6.2.
|
|
47
|
+
"simplebar": "^6.2.4"
|
|
55
48
|
},
|
|
56
49
|
"peerDependencies": {
|
|
57
50
|
"@zipify/colorpicker": "^2.2",
|
|
@@ -66,11 +59,11 @@
|
|
|
66
59
|
}
|
|
67
60
|
},
|
|
68
61
|
"devDependencies": {
|
|
69
|
-
"@babel/core": "^7.
|
|
70
|
-
"@babel/eslint-parser": "^7.
|
|
71
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
62
|
+
"@babel/core": "^7.21.3",
|
|
63
|
+
"@babel/eslint-parser": "^7.21.3",
|
|
64
|
+
"@babel/plugin-transform-runtime": "^7.21.0",
|
|
72
65
|
"@babel/preset-env": "^7.20.2",
|
|
73
|
-
"@babel/runtime": "^7.
|
|
66
|
+
"@babel/runtime": "^7.21.0",
|
|
74
67
|
"@optimize-lodash/rollup-plugin": "^4.0.3",
|
|
75
68
|
"@rollup/plugin-babel": "^6.0.3",
|
|
76
69
|
"@rollup/plugin-commonjs": "^24.0.1",
|
|
@@ -79,25 +72,24 @@
|
|
|
79
72
|
"@rollup/plugin-replace": "^5.0.2",
|
|
80
73
|
"@rollup/plugin-terser": "^0.4.0",
|
|
81
74
|
"@vue/test-utils": "^1.3.4",
|
|
82
|
-
"@vue/vue2-jest": "^29.2.
|
|
83
|
-
"@zipify/colorpicker": "^2.
|
|
84
|
-
"@zipify/eslint-config": "^1.
|
|
85
|
-
"babel-jest": "^29.
|
|
86
|
-
"eslint": "8.
|
|
75
|
+
"@vue/vue2-jest": "^29.2.3",
|
|
76
|
+
"@zipify/colorpicker": "^2.3",
|
|
77
|
+
"@zipify/eslint-config": "^1.2.0",
|
|
78
|
+
"babel-jest": "^29.5.0",
|
|
79
|
+
"eslint": "8.37.0",
|
|
87
80
|
"eslint-plugin-import": "^2.27.5",
|
|
88
81
|
"eslint-plugin-jest": "^27.2.1",
|
|
89
|
-
"eslint-plugin-vue": "^9.
|
|
90
|
-
"gzipper": "^7.2.0",
|
|
82
|
+
"eslint-plugin-vue": "^9.10.0",
|
|
91
83
|
"husky": "^8.0.3",
|
|
92
|
-
"jest": "^29.
|
|
93
|
-
"jest-environment-jsdom": "^29.
|
|
94
|
-
"lint-staged": "^13.
|
|
84
|
+
"jest": "^29.5.0",
|
|
85
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
86
|
+
"lint-staged": "^13.2.0",
|
|
95
87
|
"postcss-html": "^1.5.0",
|
|
96
|
-
"release-it": "^15.
|
|
97
|
-
"rollup": "^3.
|
|
88
|
+
"release-it": "^15.9.3",
|
|
89
|
+
"rollup": "^3.20.2",
|
|
98
90
|
"stylelint": "^14.16.1",
|
|
99
91
|
"svgo": "^3.0.2",
|
|
100
|
-
"vite": "^4.
|
|
92
|
+
"vite": "^4.2.1",
|
|
101
93
|
"vite-plugin-vue2": "^2.0.3",
|
|
102
94
|
"vue": "^2.7.14",
|
|
103
95
|
"vue-template-compiler": "^2.7.14"
|
package/ci/example/deploy.sh
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
export AWS_CONFIG_FILE=./ci/example/.aws-credentials
|
|
4
|
-
|
|
5
|
-
function throw_error() {
|
|
6
|
-
echo -e "\033[0;31m \n\n$1\n\n";
|
|
7
|
-
exit;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
if ! command -v aws &> /dev/null; then
|
|
11
|
-
throw_error 'AWS CLI not found. Download from https://aws.amazon.com/cli/'
|
|
12
|
-
fi;
|
|
13
|
-
|
|
14
|
-
if [ ! -f "$AWS_CONFIG_FILE" ]; then
|
|
15
|
-
throw_error 'AWS credentials config not found'
|
|
16
|
-
fi;
|
|
17
|
-
|
|
18
|
-
echo Building... && \
|
|
19
|
-
rm -rf ./example/dist && \
|
|
20
|
-
npm run example:build > /dev/null && \
|
|
21
|
-
npx --yes gzipper compress ./example/dist > /dev/null && \
|
|
22
|
-
echo Uploading... && \
|
|
23
|
-
BRANCH_NAME=$(git branch --show-current) && \
|
|
24
|
-
aws s3 sync --acl public-read --cache-control 'max-age=0,no-cache,no-store,must-revalidate' "./example/dist" "s3://zipify-wysiwyg/$BRANCH_NAME" > /dev/null && \
|
|
25
|
-
echo "on https://zipify-wysiwyg.s3.eu-central-1.amazonaws.com/$BRANCH_NAME/index.html"
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
2
|
-
import { getBabelOutputPlugin } from '@rollup/plugin-babel';
|
|
3
|
-
import terser from '@rollup/plugin-terser';
|
|
4
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
5
|
-
import replace from '@rollup/plugin-replace';
|
|
6
|
-
import json from '@rollup/plugin-json';
|
|
7
|
-
import { resolvePath } from './settings';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
input: resolvePath('./lib/entryNode.js'),
|
|
11
|
-
output: {
|
|
12
|
-
file: resolvePath('./dist/wysiwyg.cjs'),
|
|
13
|
-
format: 'cjs',
|
|
14
|
-
plugins: [
|
|
15
|
-
getBabelOutputPlugin({
|
|
16
|
-
presets: [
|
|
17
|
-
['@babel/preset-env', { targets: { node: 18 } }]
|
|
18
|
-
]
|
|
19
|
-
}),
|
|
20
|
-
terser({ toplevel: true })
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
plugins: [
|
|
25
|
-
replace({
|
|
26
|
-
preventAssignment: true,
|
|
27
|
-
values: { 'import.meta.glob': '(() => ({}))' }
|
|
28
|
-
}),
|
|
29
|
-
nodeResolve({
|
|
30
|
-
extensions: ['*', '.js', '.json'],
|
|
31
|
-
preferBuiltins: true
|
|
32
|
-
}),
|
|
33
|
-
commonjs({ ignore: ['canvas'] }),
|
|
34
|
-
json()
|
|
35
|
-
],
|
|
36
|
-
|
|
37
|
-
external: ['jsdom']
|
|
38
|
-
};
|