Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ianstormtaylor/slate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: upsilonIT/slate
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 5 commits
  • 6 files changed
  • 1 contributor

Commits on Aug 13, 2019

  1. fixed #1237 which calls Selection.getRangeAt(0) when Selection.type =…

    … 'None' (#1)
    
    it should check the latest rangeCount, not the previous memorized one
    Timofey Dergachev authored Aug 13, 2019
    Copy the full SHA
    32130d3 View commit details
  2. fix: Unknown event handler property onEvent (#2)

    * fix: Unknown event handler property `onEvent`
    
    ```
    index.js:1 Warning: Unknown event handler property `onEvent`. It will be ignored.
    	in div (created by Content)
        in Content (created by Editor)
    ```
    
    * fix: make onEvent required
    
    Seems this prop is provided in `component/editor.js`
    Timofey Dergachev authored Aug 13, 2019
    Copy the full SHA
    f77cc60 View commit details
  3. Update package names

    Timofey Dergachev committed Aug 13, 2019
    Copy the full SHA
    543eba0 View commit details
  4. Copy the full SHA
    91bae87 View commit details
  5. Fix build

    Timofey Dergachev committed Aug 13, 2019
    Copy the full SHA
    a82c077 View commit details
Showing with 33 additions and 12 deletions.
  1. +2 −2 packages/slate-react/package.json
  2. +2 −1 packages/slate-react/src/components/content.js
  3. +2 −2 packages/slate/package.json
  4. +8 −7 support/rollup/factory.js
  5. +5 −0 support/webpack/config.js
  6. +14 −0 yarn.lock
4 changes: 2 additions & 2 deletions packages/slate-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "slate-react",
"name": "@upsilon/slate-react",
"description": "A set of React components for building completely customizable rich-text editors.",
"version": "0.22.4",
"version": "0.22.4-fork.1",
"license": "MIT",
"repository": "git://github.com/ianstormtaylor/slate.git",
"main": "lib/slate-react.js",
3 changes: 2 additions & 1 deletion packages/slate-react/src/components/content.js
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ class Content extends React.Component {
contentKey: Types.number,
editor: Types.object.isRequired,
id: Types.string,
onEvent: Types.func.isRequired,
readOnly: Types.bool.isRequired,
role: Types.string,
spellCheck: Types.bool.isRequired,
@@ -250,7 +251,7 @@ class Content extends React.Component {

// Otherwise, figure out which DOM nodes should be selected...
if (selection.isFocused && selection.isSet) {
const current = !!rangeCount && native.getRangeAt(0)
const current = !!native.rangeCount && native.getRangeAt(0)
const range = editor.findDOMRange(selection)

if (!range) {
4 changes: 2 additions & 2 deletions packages/slate/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "slate",
"name": "@upsilon/slate",
"description": "A completely customizable framework for building rich text editors.",
"version": "0.47.4",
"version": "0.47.4-fork.1",
"license": "MIT",
"repository": "git://github.com/ianstormtaylor/slate.git",
"main": "lib/slate.js",
15 changes: 8 additions & 7 deletions support/rollup/factory.js
Original file line number Diff line number Diff line change
@@ -21,7 +21,8 @@ function configure(pkg, env, target) {
const isProd = env === 'production'
const isUmd = target === 'umd'
const isModule = target === 'module'
const input = `packages/${pkg.name}/src/index.js`
const packageName = pkg.name.replace('@upsilon/', '')
const input = `packages/${packageName}/src/index.js`
const deps = []
.concat(pkg.dependencies ? Object.keys(pkg.dependencies) : [])
.concat(pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : [])
@@ -37,7 +38,7 @@ function configure(pkg, env, target) {
// modules by default.
isUmd &&
commonjs({
exclude: [`packages/${pkg.name}/src/**`],
exclude: [`packages/${packageName}/src/**`],
// HACK: Sometimes the CommonJS plugin can't identify named exports, so
// we have to manually specify named exports here for them to work.
// https://github.com/rollup/rollup-plugin-commonjs#custom-named-exports
@@ -71,7 +72,7 @@ function configure(pkg, env, target) {

// Use Babel to transpile the result, limiting it to the source code.
babel({
include: [`packages/${pkg.name}/src/**`],
include: [`packages/${packageName}/src/**`],
}),

// Register Node.js globals for browserify compatibility.
@@ -88,9 +89,9 @@ function configure(pkg, env, target) {
input,
output: {
format: 'umd',
file: `packages/${pkg.name}/${isProd ? pkg.umdMin : pkg.umd}`,
file: `packages/${packageName}/${isProd ? pkg.umdMin : pkg.umd}`,
exports: 'named',
name: startCase(pkg.name).replace(/ /g, ''),
name: startCase(packageName).replace(/ /g, ''),
globals: pkg.umdGlobals,
},
external: Object.keys(pkg.umdGlobals || {}),
@@ -103,12 +104,12 @@ function configure(pkg, env, target) {
input,
output: [
{
file: `packages/${pkg.name}/${pkg.module}`,
file: `packages/${packageName}/${pkg.module}`,
format: 'es',
sourcemap: true,
},
{
file: `packages/${pkg.name}/${pkg.main}`,
file: `packages/${packageName}/${pkg.main}`,
format: 'cjs',
exports: 'named',
sourcemap: true,
5 changes: 5 additions & 0 deletions support/webpack/config.js
Original file line number Diff line number Diff line change
@@ -32,6 +32,11 @@ const config = {
hot: true,
host: '0.0.0.0',
},
resolve: {
alias: {
'slate-react': '@upsilon/slate-react',
},
},
module: {
rules: [
{
14 changes: 14 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -7180,6 +7180,20 @@ slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"

slate@^0.47.4:
version "0.47.4"
resolved "https://registry.yarnpkg.com/slate/-/slate-0.47.4.tgz#9c8e7a73dac78d14615c68c576f0cfd2338daa84"
integrity sha512-kyZDN0NgjCtfYm2CrWZ7FixoO+dA6M3EFDb5q+Ig6zEmnt9IUKT1AlRNwN2mWCqTpRSY3SxEdgoUuzbvbUScUg==
dependencies:
debug "^3.1.0"
direction "^0.1.5"
esrever "^0.2.0"
is-plain-object "^2.0.4"
lodash "^4.17.4"
tiny-invariant "^1.0.1"
tiny-warning "^0.0.3"
type-of "^2.0.1"

slice-ansi@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d"