@standardnotes/bold-editor 1.6.3

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.
Files changed (57) hide show
  1. package/.babelrc +11 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc +29 -0
  4. package/CHANGELOG.md +82 -0
  5. package/LICENSE +661 -0
  6. package/README.md +98 -0
  7. package/app/App.js +18 -0
  8. package/app/components/Editor.js +415 -0
  9. package/app/main.js +8 -0
  10. package/app/stylesheets/main.scss +272 -0
  11. package/dist/dist.css +1 -0
  12. package/dist/dist.min.js +2 -0
  13. package/dist/dist.min.js.LICENSE.txt +42 -0
  14. package/dist/filesafe-js/EncryptionWorker.js +2 -0
  15. package/dist/filesafe-js/EncryptionWorker.js.LICENSE.txt +5 -0
  16. package/dist/index.html +1 -0
  17. package/dist/vendor.css +6 -0
  18. package/dist/vendor.js +1 -0
  19. package/editor.index.ejs +14 -0
  20. package/editor_bar.png +0 -0
  21. package/ext.json.sample +9 -0
  22. package/package.json +54 -0
  23. package/redactor/plugins/alignment/alignment.js +55 -0
  24. package/redactor/plugins/alignment/alignment.min.js +1 -0
  25. package/redactor/plugins/counter/counter.js +76 -0
  26. package/redactor/plugins/counter/counter.min.js +1 -0
  27. package/redactor/plugins/filesafe/filesafe.js +70 -0
  28. package/redactor/plugins/filesafe/filesafe.min.js +70 -0
  29. package/redactor/plugins/fontcolor/fontcolor.js +184 -0
  30. package/redactor/plugins/fontcolor/fontcolor.min.js +1 -0
  31. package/redactor/plugins/fontfamily/fontfamily.js +59 -0
  32. package/redactor/plugins/fontfamily/fontfamily.min.js +1 -0
  33. package/redactor/plugins/fontsize/fontsize.js +58 -0
  34. package/redactor/plugins/fontsize/fontsize.min.js +1 -0
  35. package/redactor/plugins/imagemanager/imagemanager.js +82 -0
  36. package/redactor/plugins/imagemanager/imagemanager.min.js +1 -0
  37. package/redactor/plugins/inlinestyle/inlinestyle.css +34 -0
  38. package/redactor/plugins/inlinestyle/inlinestyle.js +62 -0
  39. package/redactor/plugins/inlinestyle/inlinestyle.min.css +1 -0
  40. package/redactor/plugins/inlinestyle/inlinestyle.min.js +1 -0
  41. package/redactor/plugins/specialchars/specialchars.js +78 -0
  42. package/redactor/plugins/specialchars/specialchars.min.js +1 -0
  43. package/redactor/plugins/table/table.js +477 -0
  44. package/redactor/plugins/table/table.min.js +1 -0
  45. package/redactor/plugins/textdirection/textdirection.js +44 -0
  46. package/redactor/plugins/textdirection/textdirection.min.js +1 -0
  47. package/redactor/plugins/textexpander/textexpander.js +64 -0
  48. package/redactor/plugins/textexpander/textexpander.min.js +1 -0
  49. package/redactor/plugins/variable/variable.css +23 -0
  50. package/redactor/plugins/variable/variable.js +222 -0
  51. package/redactor/plugins/variable/variable.min.css +1 -0
  52. package/redactor/plugins/variable/variable.min.js +1 -0
  53. package/redactor/src/redactor.min.css +1 -0
  54. package/redactor/src/redactor.min.js +1 -0
  55. package/webpack.config.js +82 -0
  56. package/webpack.dev.js +20 -0
  57. package/webpack.prod.js +11 -0
@@ -0,0 +1,82 @@
1
+ const path = require('path');
2
+ const CopyWebpackPlugin = require('copy-webpack-plugin');
3
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
+ const HtmlWebpackPlugin = require('html-webpack-plugin');
5
+ const MergeIntoSingleFilePlugin = require('webpack-merge-and-include-globally');
6
+
7
+ module.exports = {
8
+ context: __dirname,
9
+ entry: [
10
+ path.resolve(__dirname, 'app/main.js'),
11
+ path.resolve(__dirname, 'app/stylesheets/main.scss'),
12
+ ],
13
+ output: {
14
+ path: path.resolve(__dirname, 'dist'),
15
+ filename: 'dist.min.js'
16
+ },
17
+ module: {
18
+ rules: [
19
+ {
20
+ test: /\.s[ac]ss$/i,
21
+ exclude: /node_modules/,
22
+ use: [
23
+ MiniCssExtractPlugin.loader,
24
+ "css-loader",
25
+ {
26
+ loader: "sass-loader",
27
+ options: {
28
+ sassOptions: {
29
+ includePaths: [
30
+ path.resolve(__dirname, 'app/stylesheets/main.scss')
31
+ ],
32
+ },
33
+ },
34
+ },
35
+ ],
36
+ },
37
+ {
38
+ test: /\.js[x]?$/,
39
+ include: [
40
+ path.resolve(__dirname, 'app'),
41
+ ],
42
+ exclude: /node_modules/,
43
+ use: ['babel-loader']
44
+ }
45
+ ]
46
+ },
47
+ resolve: {
48
+ extensions: ['.js', '.jsx'],
49
+ alias: {
50
+ stylekit: require.resolve('sn-stylekit/dist/stylekit.css'),
51
+ '@Components': path.resolve(__dirname, 'app/components'),
52
+ }
53
+ },
54
+ plugins: [
55
+ new MiniCssExtractPlugin({
56
+ filename: "dist.css"
57
+ }),
58
+ new HtmlWebpackPlugin({
59
+ title: "Bold Editor",
60
+ template: 'editor.index.ejs',
61
+ filename: 'index.html'
62
+ }),
63
+ new CopyWebpackPlugin({
64
+ patterns: [
65
+ { from: require.resolve('@standardnotes/editor-kit/dist/filesafe-js/EncryptionWorker.js'), to: 'filesafe-js/EncryptionWorker.js' },
66
+ ],
67
+ }),
68
+ new MergeIntoSingleFilePlugin({
69
+ files: {
70
+ "vendor.js": [
71
+ 'redactor/src/redactor.min.js',
72
+ 'redactor/plugins/**/*.min.js',
73
+ ],
74
+ "vendor.css": [
75
+ require.resolve('filesafe-embed/dist/dist.css'),
76
+ 'redactor/src/redactor.min.css',
77
+ 'redactor/plugins/inlinestyle/inlinestyle.min.css'
78
+ ]
79
+ }
80
+ }),
81
+ ]
82
+ };
package/webpack.dev.js ADDED
@@ -0,0 +1,20 @@
1
+ const path = require('path');
2
+ const { merge } = require('webpack-merge');
3
+ const config = require('./webpack.config.js');
4
+
5
+ module.exports = merge(config, {
6
+ mode: 'development',
7
+ devtool: 'cheap-source-map',
8
+ devServer: {
9
+ port: 8001,
10
+ contentBase: path.resolve(__dirname, 'dist'),
11
+ disableHostCheck: true,
12
+ historyApiFallback: true,
13
+ watchOptions: { aggregateTimeout: 300, poll: 1000 },
14
+ headers: {
15
+ 'Access-Control-Allow-Origin': '*',
16
+ 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
17
+ 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
18
+ }
19
+ },
20
+ });
@@ -0,0 +1,11 @@
1
+ const { merge } = require('webpack-merge');
2
+ const config = require('./webpack.config.js');
3
+ const TerserPlugin = require("terser-webpack-plugin");
4
+
5
+ module.exports = merge(config, {
6
+ mode: 'production',
7
+ optimization: {
8
+ minimize: true,
9
+ minimizer: [new TerserPlugin()]
10
+ }
11
+ });