Skip to content

Commit

Permalink
Update exmples version to v0.4.20 (#822)
Browse files Browse the repository at this point in the history
* Update examples version to v0.4.20

* Use `import type` and `for...of`
  • Loading branch information
chacha912 authored May 24, 2024
1 parent 5098586 commit 67b3328
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 180 deletions.
2 changes: 1 addition & 1 deletion examples/nextjs-scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"react": "18.2.0",
"react-calendar": "^4.6.0",
"react-dom": "18.2.0",
"yorkie-js-sdk": "^0.4.19"
"yorkie-js-sdk": "^0.4.20"
},
"devDependencies": {
"@types/node": "20.4.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/profile-stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"vite": "^3.2.7"
},
"dependencies": {
"yorkie-js-sdk": "^0.4.19"
"yorkie-js-sdk": "^0.4.20"
}
}
2 changes: 1 addition & 1 deletion examples/react-tldraw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"unique-names-generator": "^4.7.1",
"yorkie-js-sdk": "^0.4.19"
"yorkie-js-sdk": "^0.4.20"
},
"devDependencies": {
"@types/lodash": "^4.14.198",
Expand Down
2 changes: 1 addition & 1 deletion examples/react-todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"todomvc-app-css": "^2.4.2",
"yorkie-js-sdk": "^0.4.19"
"yorkie-js-sdk": "^0.4.20"
},
"devDependencies": {
"@types/react": "^18.0.24",
Expand Down
2 changes: 1 addition & 1 deletion examples/simultaneous-cursors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"yorkie-js-sdk": "^0.4.19"
"yorkie-js-sdk": "^0.4.20"
},
"devDependencies": {
"@types/react": "^18.0.37",
Expand Down
2 changes: 1 addition & 1 deletion examples/vanilla-codemirror6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"@codemirror/state": "^6.1.2",
"@codemirror/view": "^6.3.1",
"codemirror": "^6.0.1",
"yorkie-js-sdk": "^0.4.19"
"yorkie-js-sdk": "^0.4.20"
}
}
11 changes: 6 additions & 5 deletions examples/vanilla-codemirror6/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable jsdoc/require-jsdoc */
import yorkie, { DocEventType, OperationInfo } from 'yorkie-js-sdk';
import yorkie, { DocEventType } from 'yorkie-js-sdk';
import type { TextOperationInfo, EditOpInfo } from 'yorkie-js-sdk';
import { basicSetup, EditorView } from 'codemirror';
import { keymap } from '@codemirror/view';
import {
Expand Down Expand Up @@ -112,14 +113,14 @@ async function main() {
});

// 03-3. define event handler that apply remote changes to local
function handleOperations(operations: Array<OperationInfo>) {
operations.forEach((op) => {
function handleOperations(operations: Array<TextOperationInfo>) {
for (const op of operations) {
if (op.type === 'edit') {
handleEditOp(op);
}
});
}
}
function handleEditOp(op: any) {
function handleEditOp(op: EditOpInfo) {
const changes = [
{
from: Math.max(0, op.from),
Expand Down
2 changes: 1 addition & 1 deletion examples/vanilla-quill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"quill": "^1.3.7",
"quill-cursors": "^4.0.0",
"quill-delta": "^5.0.0",
"yorkie-js-sdk": "^0.4.19"
"yorkie-js-sdk": "^0.4.20"
}
}
2 changes: 1 addition & 1 deletion examples/vuejs-kanban/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"vue": "^3.2.41",
"yorkie-js-sdk": "^0.4.19"
"yorkie-js-sdk": "^0.4.20"
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.1.2",
Expand Down
Loading

0 comments on commit 67b3328

Please sign in to comment.