Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.5.9 #5452

Merged
merged 30 commits into from
Aug 6, 2024
Merged

v2.5.9 #5452

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cc3497e
fix(core): address `enableContentCheck` insertion bug (#5390)
nperez0111 Jul 24, 2024
b012471
fix(core): isNodeEmpty no longer considers attributes for it's checks…
nperez0111 Jul 25, 2024
42dc27a
fix(react): if using a deps array, destroy the previous instance
nperez0111 Jul 26, 2024
d3e88e7
fix: emit a contentError on inserting invalid content
nperez0111 Jul 26, 2024
a1c5120
chore: publish a new release version (#5375)
github-actions[bot] Jul 26, 2024
940f9d5
fix(vue-3): copy missing provided parent values (#5396)
Rirax Jul 26, 2024
44e4eca
Shared rollup config (#5403)
bdbch Jul 27, 2024
5fb71f6
chore: package-lock
nperez0111 Jul 29, 2024
a08bf85
fix: do not consider text content as atoms resolve #5405 (#5407)
nperez0111 Jul 29, 2024
f7f644f
fix(vue-3): set editor's appContext.provide to forward inject chain (…
romansp Jul 29, 2024
ce141c2
chore(extension-table): remove unnecessary @ts-ignore, update view ty…
martinboksa Jul 29, 2024
99d7820
fix(react): always cleanup old editor instances (#5414)
nperez0111 Jul 30, 2024
4b9d8a3
chore: cleanup
nperez0111 Jul 30, 2024
7d6c939
chore(release): publish a new version 2.5.8 (#5408)
github-actions[bot] Jul 30, 2024
0ec0af6
fix: use Array.from when converting Set (#5428)
roblafeve Jul 31, 2024
6543f05
fix: allow task items to be parsed when only having `<li data-checked…
baseballyama Jul 31, 2024
068559d
chore: Use proper types for `configure` methods (Extension/Mark/Node)…
rfgamaral Jul 31, 2024
84ebd51
fix(core): resolve `isNodeEmpty` criteria #5415 (#5419)
nperez0111 Aug 1, 2024
7c8889a
fix(react): optimize `useEditor` and `useEditorState` to reduce numbe…
nperez0111 Aug 5, 2024
c1ff1b0
fix(placeholder): add back-compat to deprecated placeholder functiona…
nperez0111 Aug 5, 2024
3f4e280
build(deps): bump cypress-io/github-action from 6.7.1 to 6.7.2 (#5443)
dependabot[bot] Aug 5, 2024
e143fb4
build(deps): bump actions/upload-artifact from 4.3.3 to 4.3.5 (#5444)
dependabot[bot] Aug 5, 2024
efb27fa
fix(core): use correct position for getMarksBetween (#5412)
nperez0111 Aug 5, 2024
ae0254d
feat(core): add ignoreWhitespace option to isNodeEmpty (#5446)
nperez0111 Aug 6, 2024
174aefe
fix(collaboration): update y-prosemirror, respect `onFirstRender` (#5…
nperez0111 Aug 6, 2024
4b215f7
fix(code-block): respect `defaultLanguage` on code-block-lowlight add…
nperez0111 Aug 6, 2024
d6e56c4
fix(extension-code-block-lowlight): use lowlight v3 and update demos …
nperez0111 Aug 6, 2024
273e18b
Merge branch 'main' into develop
nperez0111 Aug 6, 2024
c01eccc
chore: make into a patch version
nperez0111 Aug 6, 2024
535dccc
chore(release): publish version v2.5.9 (#5451)
github-actions[bot] Aug 6, 2024
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
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ module.exports = {
node: true,
},
overrides: [
{
files: [
'./**/*.ts',
'./**/*.tsx',
'./**/*.js',
'./**/*.jsx',
],
extends: ['plugin:react-hooks/recommended'],
},
{
files: [
'./**/*.ts',
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:

- name: Test ${{ matrix.test-spec.name }}
id: cypress
uses: cypress-io/[email protected].1
uses: cypress-io/[email protected].2
with:
cache-key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
start: npm run serve
Expand All @@ -114,15 +114,15 @@ jobs:
quiet: true

- name: Export screenshots (on failure only)
uses: actions/[email protected].3
uses: actions/[email protected].5
if: failure()
with:
name: cypress-screenshots
path: tests/cypress/screenshots
retention-days: 7

- name: Export screen recordings (on failure only)
uses: actions/[email protected].3
uses: actions/[email protected].5
if: failure()
with:
name: cypress-videos
Expand Down
6 changes: 6 additions & 0 deletions demos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 2.4.2

### Patch Changes

- d6e56c4: declare lowlight to be a peer dep of extension-code-block-lowlight, update usage to v3

## 2.4.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion demos/includeDependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ highlight.js/lib/languages/xml
highlight.js/lib/core
linkifyjs
lowlight
lowlight/lib/core
prosemirror-commands
prosemirror-dropcursor
prosemirror-gapcursor
Expand All @@ -21,6 +20,7 @@ prosemirror-view
react
react-dom
react-dom/client
use-sync-external-store/shim/with-selector
shiki
simplify-js
tippy.js
Expand Down
8 changes: 4 additions & 4 deletions demos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiptap-demos",
"version": "2.4.1",
"version": "2.4.2",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -14,13 +14,13 @@
"@lexical/react": "^0.11.1",
"d3": "^7.3.0",
"fast-glob": "^3.2.11",
"highlight.js": "^11.6.0",
"highlight.js": "^11.10.0",
"lexical": "^0.11.1",
"lowlight": "^2.7.0",
"lowlight": "^3.1.0",
"remixicon": "^2.5.0",
"shiki": "^1.10.3",
"simplify-js": "^1.2.4",
"y-prosemirror": "^1.2.9",
"y-prosemirror": "^1.2.11",
"y-webrtc": "^10.3.0",
"yjs": "^13.6.18"
},
Expand Down
7 changes: 6 additions & 1 deletion demos/setup/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ export default function init(name: string, source: any) {

import(`../src/${demoCategory}/${demoName}/${frameworkName}/index.vue`)
.then(module => {
createApp(module.default).mount('#app')
const app = createApp(module.default)

if (typeof module.configureApp === 'function') {
module.configureApp(app)
}
app.mount('#app')
debug()
})
}
8 changes: 4 additions & 4 deletions demos/src/Commands/Cut/React/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import StarterKit from '@tiptap/starter-kit'
import React, { useCallback } from 'react'

const MenuBar = ({ editor }) => {
if (!editor) {
return null
}

const onCutToStart = useCallback(() => {
editor.chain().cut({ from: editor.state.selection.$from.pos, to: editor.state.selection.$to.pos }, 1).run()
}, [editor])
Expand All @@ -20,6 +16,10 @@ const MenuBar = ({ editor }) => {
editor.chain().cut({ from: editor.state.selection.$from.pos, to: editor.state.selection.$to.pos }, editor.state.doc.nodeSize - 2).run()
}, [editor])

if (!editor) {
return null
}

return (
<div className="control-group">
<div className="button-group">
Expand Down
25 changes: 13 additions & 12 deletions demos/src/Examples/CodeBlockLanguage/React/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// load specific languages only
// import { lowlight } from 'lowlight/lib/core'
// import javascript from 'highlight.js/lib/languages/javascript'
// lowlight.registerLanguage('javascript', javascript)
import './styles.scss'

import CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'
Expand All @@ -13,16 +9,21 @@ import css from 'highlight.js/lib/languages/css'
import js from 'highlight.js/lib/languages/javascript'
import ts from 'highlight.js/lib/languages/typescript'
import html from 'highlight.js/lib/languages/xml'
// load all highlight.js languages
import { lowlight } from 'lowlight'
// load all languages with "all" or common languages with "common"
import { all, createLowlight } from 'lowlight'
import React from 'react'

import CodeBlockComponent from './CodeBlockComponent.jsx'
// eslint-disable-next-line
import CodeBlockComponent from './CodeBlockComponent'

lowlight.registerLanguage('html', html)
lowlight.registerLanguage('css', css)
lowlight.registerLanguage('js', js)
lowlight.registerLanguage('ts', ts)
// create a lowlight instance
const lowlight = createLowlight(all)

// you can also register individual languages
lowlight.register('html', html)
lowlight.register('css', css)
lowlight.register('js', js)
lowlight.register('ts', ts)

const MenuBar = ({ editor }) => {
if (!editor) {
Expand Down Expand Up @@ -56,7 +57,7 @@ export default () => {
],
content: `
<p>
Thats a boring paragraph followed by a fenced code block:
That's a boring paragraph followed by a fenced code block:
</p>
<pre><code class="language-javascript">for (var i=1; i <= 20; i++)
{
Expand Down
21 changes: 10 additions & 11 deletions demos/src/Examples/CodeBlockLanguage/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,19 @@ import css from 'highlight.js/lib/languages/css'
import js from 'highlight.js/lib/languages/javascript'
import ts from 'highlight.js/lib/languages/typescript'
import html from 'highlight.js/lib/languages/xml'
// load all highlight.js languages
import { lowlight } from 'lowlight'
// load all languages with "all" or common languages with "common"
import { all, createLowlight } from 'lowlight'

import CodeBlockComponent from './CodeBlockComponent.vue'

lowlight.registerLanguage('html', html)
lowlight.registerLanguage('css', css)
lowlight.registerLanguage('js', js)
lowlight.registerLanguage('ts', ts)
// create a lowlight instance
const lowlight = createLowlight(all)

// load specific languages only
// import { lowlight } from 'lowlight/lib/core'
// import javascript from 'highlight.js/lib/languages/javascript'
// lowlight.registerLanguage('javascript', javascript)
// you can also register languages
lowlight.register('html', html)
lowlight.register('css', css)
lowlight.register('js', js)
lowlight.register('ts', ts)

export default {
components: {
Expand Down Expand Up @@ -63,7 +62,7 @@ export default {
],
content: `
<p>
Thats a boring paragraph followed by a fenced code block:
That's a boring paragraph followed by a fenced code block:
</p>
<pre><code class="language-javascript">for (var i=1; i <= 20; i++)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<template>
<node-view-wrapper class="vue-component">
<label>Vue Component</label>
<ValidateInject />
</node-view-wrapper>
</template>

<script>
import { nodeViewProps, NodeViewWrapper } from '@tiptap/vue-3'

import ValidateInject from './ValidateInject.vue'

export default {
components: {
NodeViewWrapper,
ValidateInject,
},

props: nodeViewProps,
}
</script>

<style lang="scss">
.tiptap {
/* Vue component */
.vue-component {
background-color: var(--purple-light);
border: 2px solid var(--purple);
border-radius: 0.5rem;
margin: 2rem 0;
position: relative;

label {
background-color: var(--purple);
border-radius: 0 0 0.5rem 0;
color: var(--white);
font-size: 0.75rem;
font-weight: bold;
padding: 0.25rem 0.5rem;
position: absolute;
top: 0;
}

.content {
margin-top: 1.5rem;
padding: 1rem;
}
}
}
</style>
Loading