WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.2.cjs

This file was deleted.

948 changes: 948 additions & 0 deletions .yarn/releases/yarn-4.9.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ packageExtensions:
dependencies:
prop-types: '*'

yarnPath: .yarn/releases/yarn-4.0.2.cjs
yarnPath: .yarn/releases/yarn-4.9.1.cjs
35 changes: 19 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"scripts": {
"build": "yarn build:rollup && yarn build:next",
"build:next": "cd ./site && next build && next export",
"build:next": "cd ./site && next build",
"build:rollup": "rollup --config ./config/rollup/rollup.config.js --bundleConfigAsCjs",
"changesetversion": "yarn changeset version && yarn install && git add .",
"clean": "rimraf './packages/*/{dist,lib,node_modules}' './site/{.next,out}' --glob",
Expand Down Expand Up @@ -57,16 +57,16 @@
"@changesets/cli": "^2.26.2",
"@emotion/css": "^11.11.2",
"@faker-js/faker": "^8.2.0",
"@playwright/test": "^1.39.0",
"@playwright/test": "^1.51.1",
"@types/is-hotkey": "^0.1.10",
"@types/is-url": "^1.2.32",
"@types/jest": "29.5.6",
"@types/jest": "29.5.14",
"@types/lodash": "^4.14.200",
"@types/mocha": "^10.0.3",
"@types/node": "^20.8.7",
"@types/prismjs": "^1.26.1",
"@types/react": "^18.2.41",
"@types/react-dom": "^18.2.13",
"@types/mocha": "^10.0.10",
"@types/node": "^22.14.1",
"@types/prismjs": "^1.26.5",
"@types/react": "^18.3.20",
"@types/react-dom": "^18.3.6",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"babel-eslint": "^10.1.0",
Expand All @@ -84,17 +84,17 @@
"is-url": "^1.2.4",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"lerna": "^7.4.1",
"lerna": "^7.4.2",
"lint-staged": "^15.0.1",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"next": "^13.5.6",
"next": "^15.3.0",
"npm-run-all": "^4.1.5",
"nx": "^16.10.0",
"prettier": "^3.0.3",
"prismjs": "^1.29.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-error-boundary": "^4.0.11",
"react-router-dom": "^6.17.0",
"react-values": "^0.3.3",
Expand All @@ -116,9 +116,9 @@
"slate-history": "workspace:*",
"slate-hyperscript": "workspace:*",
"slate-react": "workspace:*",
"source-map-loader": "^4.0.1",
"ts-jest": "^29.1.1",
"typescript": "5.2.2"
"source-map-loader": "^4.0.2",
"ts-jest": "^29.3.2",
"typescript": "5.8.3"
},
"simple-git-hooks": {
"pre-commit": "yarn lint-staged"
Expand All @@ -129,5 +129,8 @@
"eslint --fix"
]
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"dependencies": {
"@netlify/plugin-nextjs": "^5.10.6"
}
}
10 changes: 5 additions & 5 deletions packages/slate-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
"is-plain-object": "^5.0.0",
"lodash": "^4.17.21",
"scroll-into-view-if-needed": "^3.1.0",
"tiny-invariant": "1.3.1"
"tiny-invariant": "1.3.3"
},
"devDependencies": {
"@babel/runtime": "^7.23.2",
"@types/is-hotkey": "^0.1.8",
"@types/jest": "29.5.6",
"@types/jsdom": "^21.1.4",
"@types/is-hotkey": "^0.1.10",
"@types/jest": "29.5.14",
"@types/jsdom": "^21.1.7",
"@types/lodash": "^4.14.200",
"@types/resize-observer-browser": "^0.1.8",
"slate": "^0.113.0",
"slate-hyperscript": "^0.100.0",
"source-map-loader": "^4.0.1"
"source-map-loader": "^4.0.2"
},
"peerDependencies": {
"slate": ">=0.99.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/slate-history/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lodash": "^4.17.21",
"slate": "^0.113.0",
"slate-hyperscript": "^0.100.0",
"source-map-loader": "^4.0.1"
"source-map-loader": "^4.0.2"
},
"peerDependencies": {
"slate": ">=0.65.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/slate-hyperscript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"devDependencies": {
"@babel/runtime": "^7.23.2",
"slate": "^0.113.0",
"source-map-loader": "^4.0.1"
"source-map-loader": "^4.0.2"
},
"peerDependencies": {
"slate": ">=0.65.3"
Expand Down
8 changes: 6 additions & 2 deletions packages/slate-hyperscript/src/creators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ export function createSelection(
attributes: { [key: string]: any },
children: any[]
): Range {
const anchor: AnchorToken = children.find(c => c instanceof AnchorToken)
const focus: FocusToken = children.find(c => c instanceof FocusToken)
const anchor = children.find(c => c instanceof AnchorToken) as
| AnchorToken
| undefined
const focus = children.find(c => c instanceof FocusToken) as
| FocusToken
| undefined

if (!anchor || anchor.offset == null || anchor.path == null) {
throw new Error(
Expand Down
20 changes: 10 additions & 10 deletions packages/slate-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@
"is-plain-object": "^5.0.0",
"lodash": "^4.17.21",
"scroll-into-view-if-needed": "^3.1.0",
"tiny-invariant": "1.3.1"
"tiny-invariant": "1.3.3"
},
"devDependencies": {
"@babel/runtime": "^7.23.2",
"@testing-library/react": "^14.0.0",
"@types/is-hotkey": "^0.1.8",
"@types/jest": "29.5.6",
"@types/jsdom": "^21.1.4",
"@testing-library/react": "^14.3.1",
"@types/is-hotkey": "^0.1.10",
"@types/jest": "29.5.14",
"@types/jsdom": "^21.1.7",
"@types/lodash": "^4.14.200",
"@types/react": "^18.2.41",
"@types/react-dom": "^18.2.17",
"@types/react": "^18.3.20",
"@types/react-dom": "^18.3.6",
"@types/resize-observer-browser": "^0.1.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"slate": "^0.113.0",
"slate-dom": "^0.112.2",
"slate-hyperscript": "^0.100.0",
"source-map-loader": "^4.0.1"
"source-map-loader": "^4.0.2"
},
"peerDependencies": {
"react": ">=18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/slate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@babel/runtime": "^7.23.2",
"lodash": "^4.17.21",
"slate-hyperscript": "^0.100.0",
"source-map-loader": "^4.0.1"
"source-map-loader": "^4.0.2"
},
"keywords": [
"canvas",
Expand Down
8 changes: 4 additions & 4 deletions packages/slate/src/transforms-text/delete-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ export const deleteText: TextTransforms['delete'] = (editor, options = {}) => {
const isSingleText = Path.equals(start.path, end.path)
const startNonEditable = voids
? null
: Editor.void(editor, { at: start, mode: 'highest' }) ??
Editor.elementReadOnly(editor, { at: start, mode: 'highest' })
: (Editor.void(editor, { at: start, mode: 'highest' }) ??
Editor.elementReadOnly(editor, { at: start, mode: 'highest' }))
const endNonEditable = voids
? null
: Editor.void(editor, { at: end, mode: 'highest' }) ??
Editor.elementReadOnly(editor, { at: end, mode: 'highest' })
: (Editor.void(editor, { at: end, mode: 'highest' }) ??
Editor.elementReadOnly(editor, { at: end, mode: 'highest' }))

// If the start or end points are inside an inline void, nudge them out.
if (startNonEditable) {
Expand Down
4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ if (os.type() === 'Darwin') {
const retries = process.env.PLAYWRIGHT_RETRIES
? +process.env.PLAYWRIGHT_RETRIES
: process.env.CI
? 5
: 2
? 5
: 2

/**
* See https://playwright.dev/docs/test-configuration.
Expand Down
7 changes: 5 additions & 2 deletions playwright/integration/examples/code-highlighting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test.setTimeout(60 * 1000)

test.describe('code highlighting', () => {
test.beforeEach(async ({ page }) => {
page.goto('http://localhost:3000/examples/code-highlighting')
await page.goto('http://localhost:3000/examples/code-highlighting')
})

for (const testCase of getTestCases()) {
Expand Down Expand Up @@ -32,7 +32,10 @@ test.describe('code highlighting', () => {
async function setText(page: Page, text: string, language: string) {
await page.locator('[data-slate-editor]').fill('') // clear editor
await page.getByTestId('code-block-button').click() // convert first and the only one paragraph to code block
await page.getByTestId('language-select').selectOption({ value: language }) // select the language option
await page
.getByTestId('language-select')
.first()
.selectOption({ value: language }) // select the language option

await page.keyboard.type(text) // type text
}
Expand Down
4 changes: 2 additions & 2 deletions site/examples/js/components/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export const Button = React.forwardRef(
? 'white'
: '#aaa'
: active
? 'black'
: '#ccc'};
? 'black'
: '#ccc'};
`
)}
/>
Expand Down
2 changes: 1 addition & 1 deletion site/examples/ts/code-highlighting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const CodeBlockButton = () => {
)
Transforms.setNodes(
editor,
{ type: CodeLineType },
{ type: CodeLineType } as Partial<CustomElement>,
{ match: n => Element.isElement(n) && n.type === ParagraphType }
)
}
Expand Down
Loading
Loading