diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a786129..7da7139 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Check +name: Check & publish on: push: diff --git a/examples/website/package-lock.json b/examples/website/package-lock.json index 4c0716e..ca35520 100644 --- a/examples/website/package-lock.json +++ b/examples/website/package-lock.json @@ -7,6 +7,7 @@ "name": "reconcile-example-website", "license": "GPL-3.0-or-later", "devDependencies": { + "copy-webpack-plugin": "^13.0.0", "css-loader": "^7.1.2", "html-webpack-plugin": "^5.6.3", "inline-source-webpack-plugin": "^3.0.1", @@ -27,7 +28,7 @@ }, "../../reconcile-js": { "name": "reconcile-text", - "version": "0.4.3", + "version": "0.4.10", "dev": true, "license": "MIT", "devDependencies": { @@ -1536,6 +1537,43 @@ "dev": true, "license": "MIT" }, + "node_modules/copy-webpack-plugin": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-13.0.0.tgz", + "integrity": "sha512-FgR/h5a6hzJqATDGd9YG41SeDViH+0bkHn6WNXCi5zKAZkeESeSxLySSsFLHqLEVCh0E+rITmCf0dusXWYukeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-parent": "^6.0.1", + "normalize-path": "^3.0.0", + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2", + "tinyglobby": "^0.2.12" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -4987,6 +5025,51 @@ "dev": true, "license": "MIT" }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/examples/website/package.json b/examples/website/package.json index ea75200..23588ff 100644 --- a/examples/website/package.json +++ b/examples/website/package.json @@ -22,12 +22,13 @@ ], "homepage": "https://github.com/schmelczer/reconcile#readme", "devDependencies": { - "reconcile-text": "file:../../reconcile-js", + "copy-webpack-plugin": "^13.0.0", "css-loader": "^7.1.2", "html-webpack-plugin": "^5.6.3", - "mini-css-extract-plugin": "^2.9.2", "inline-source-webpack-plugin": "^3.0.1", + "mini-css-extract-plugin": "^2.9.2", "prettier": "^3.6.2", + "reconcile-text": "file:../../reconcile-js", "resolve-url-loader": "^5.0.0", "sass": "^1.89.2", "sass-loader": "^16.0.5", diff --git a/examples/website/src/favicon.ico b/examples/website/src/favicon.ico new file mode 100644 index 0000000..b345eb5 Binary files /dev/null and b/examples/website/src/favicon.ico differ diff --git a/examples/website/src/index.html b/examples/website/src/index.html index ce656d2..1f83ca0 100644 --- a/examples/website/src/index.html +++ b/examples/website/src/index.html @@ -17,9 +17,11 @@ /> - + + + - Reconcile: conflict-free text merging + reconcile-text: conflict-free 3-way text merging @@ -37,13 +39,13 @@ rel="noopener noreferrer" >diff3 - or git merge, but with intelligent conflict resolution that - requires no user intervention. The + (or more specifically, git merge), but with intelligent conflict + resolution that requires no user intervention. The Reconcilereconcile-text library tackles a fundamental challenge in collaborative editing: what happens when multiple users edit the same text simultaneously, but the conflict @@ -52,18 +54,20 @@

Where traditional merge tools leave you with conflict markers to resolve - manually, Reconcile automatically weaves changes together. The - reconcile(parent, left, right) function takes conflicting edits - and produces clean, unified results using an algorithm inspired by Operational - Transformation. No more <<<<<<< markers - cluttering your text. + manually, reconcile-text automatically weaves changes together. + The reconcile(parent, left, right) function takes conflicting + edits and produces clean, unified results using an algorithm inspired by + Operational Transformation. No more + <<<<<<< markers jumbling your text.

The process starts with your chosen tokenisation strategy, then applies Myers' - diff algorithm to compare the original with both modified versions. These - diffs are optimised and transformed to preserve meaningful changes, before a - final merge strategy combines all modifications without losing any edits. + 2-way diff algorithm to compare the original with both modified versions. + These diffs are optimised and transformed to preserve the longest meaningful + changes, before a final merge strategy combines all inserts and deletes + without losing any edits. Cursor positions may be tracked and updated during + merging too.

@@ -74,12 +78,9 @@ rel="noopener noreferrer" >documentation - or try editing the text boxes below to see Reconcile in action. -

- -

- Use the tokenisation options below to experiment with different approaches — - the library also supports custom tokenisers. + or try editing the text boxes below to see reconcile-text in + action. Use the tokenisation options below to experiment with different + approaches — the Rust library also supports providing a custom tokeniser.

diff --git a/examples/website/src/og-image.png b/examples/website/src/og-image.png new file mode 100644 index 0000000..f13a1dc Binary files /dev/null and b/examples/website/src/og-image.png differ diff --git a/examples/website/webpack.config.js b/examples/website/webpack.config.js index df1d3e0..8a21293 100644 --- a/examples/website/webpack.config.js +++ b/examples/website/webpack.config.js @@ -3,6 +3,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin'); const InlineSourceWebpackPlugin = require('inline-source-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = (_env, argv) => ({ devtool: argv.mode === 'development' ? 'inline-source-map' : false, @@ -34,6 +35,18 @@ module.exports = (_env, argv) => ({ template: './src/index.html', }), new MiniCssExtractPlugin(), + new CopyWebpackPlugin({ + patterns: [ + { + from: 'src/*.ico', + to: '[name][ext]', + }, + { + from: 'src/*.png', + to: '[name][ext]', + }, + ], + }), argv.mode === 'production' ? new InlineSourceWebpackPlugin({ compress: true,