@cocreate/text 1.18.6 → 1.18.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/package.json +11 -11
- package/src/index.js +1 -7
- package/src/saveDomText.js +1 -7
- package/src/updateText.js +1 -7
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## [1.18.8](https://github.com/CoCreate-app/CoCreate-text/compare/v1.18.7...v1.18.8) (2022-11-25)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* bump dependencies ([56d1168](https://github.com/CoCreate-app/CoCreate-text/commit/56d11687bc22fd753c8bf0fc125e39827deeab03))
|
7
|
+
* CoCreate.crud.default removed bug causing default object ([b7b3f2b](https://github.com/CoCreate-app/CoCreate-text/commit/b7b3f2b0123efc7e126079f3250be3d6d7de1086))
|
8
|
+
|
9
|
+
## [1.18.7](https://github.com/CoCreate-app/CoCreate-text/compare/v1.18.6...v1.18.7) (2022-11-24)
|
10
|
+
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
* bump depenedencies ([1c2de1e](https://github.com/CoCreate-app/CoCreate-text/commit/1c2de1e6f608f2ac96304dad222041e5c78282aa))
|
15
|
+
|
1
16
|
## [1.18.6](https://github.com/CoCreate-app/CoCreate-text/compare/v1.18.5...v1.18.6) (2022-11-23)
|
2
17
|
|
3
18
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cocreate/text",
|
3
|
-
"version": "1.18.
|
3
|
+
"version": "1.18.8",
|
4
4
|
"description": "A simple text component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
|
5
5
|
"keywords": [
|
6
6
|
"text",
|
@@ -61,15 +61,15 @@
|
|
61
61
|
"webpack-log": "^3.0.1"
|
62
62
|
},
|
63
63
|
"dependencies": {
|
64
|
-
"@cocreate/actions": "^1.5.
|
65
|
-
"@cocreate/crdt": "^1.14.
|
66
|
-
"@cocreate/crud-client": "^1.
|
67
|
-
"@cocreate/cursors": "^1.12.
|
68
|
-
"@cocreate/docs": "^1.4.
|
69
|
-
"@cocreate/hosting": "^1.6.
|
70
|
-
"@cocreate/observer": "^1.5.
|
71
|
-
"@cocreate/selection": "^1.4.
|
72
|
-
"@cocreate/utils": "^1.
|
73
|
-
"@cocreate/uuid": "^1.2.
|
64
|
+
"@cocreate/actions": "^1.5.22",
|
65
|
+
"@cocreate/crdt": "^1.14.7",
|
66
|
+
"@cocreate/crud-client": "^1.15.1",
|
67
|
+
"@cocreate/cursors": "^1.12.7",
|
68
|
+
"@cocreate/docs": "^1.4.4",
|
69
|
+
"@cocreate/hosting": "^1.6.3",
|
70
|
+
"@cocreate/observer": "^1.5.27",
|
71
|
+
"@cocreate/selection": "^1.4.31",
|
72
|
+
"@cocreate/utils": "^1.12.0",
|
73
|
+
"@cocreate/uuid": "^1.2.25"
|
74
74
|
}
|
75
75
|
}
|
package/src/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*global CustomEvent, navigator*/
|
2
2
|
import observer from '@cocreate/observer';
|
3
|
-
import
|
3
|
+
import crud from '@cocreate/crud-client';
|
4
4
|
import crdt from '@cocreate/crdt';
|
5
5
|
import cursors from '@cocreate/cursors';
|
6
6
|
import uuid from '@cocreate/uuid';
|
@@ -10,12 +10,6 @@ import {getSelection, processSelection} from '@cocreate/selection';
|
|
10
10
|
import action from '@cocreate/actions';
|
11
11
|
import './saveDomText';
|
12
12
|
|
13
|
-
let crud
|
14
|
-
if (CRUD && CRUD.default)
|
15
|
-
crud = CRUD.default
|
16
|
-
else
|
17
|
-
crud = CRUD
|
18
|
-
|
19
13
|
let eventObj;
|
20
14
|
let selector = `[collection][document_id][name]`;
|
21
15
|
let selectors = `input${selector}, textarea${selector}, [contenteditable]${selector}:not([contenteditable='false'])`;
|
package/src/saveDomText.js
CHANGED
@@ -1,14 +1,8 @@
|
|
1
1
|
/*globals CustomEvent*/
|
2
2
|
import action from '@cocreate/actions';
|
3
|
-
import
|
3
|
+
import crud from '@cocreate/crud-client';
|
4
4
|
import crdt from '@cocreate/crdt';
|
5
5
|
|
6
|
-
let crud
|
7
|
-
if (CRUD && CRUD.default)
|
8
|
-
crud = CRUD.default
|
9
|
-
else
|
10
|
-
crud = CRUD
|
11
|
-
|
12
6
|
function save(btn){
|
13
7
|
const { collection, document_id, name, namespace, room, broadcast, broadcastSender, isUpsert} = crud.getAttributes(btn);
|
14
8
|
crdt.getText({collection, document_id, name}).then(response => {
|
package/src/updateText.js
CHANGED
@@ -1,13 +1,7 @@
|
|
1
|
-
import
|
1
|
+
import crud from '@cocreate/crud-client';
|
2
2
|
import crdt from '@cocreate/crdt';
|
3
3
|
import {getStringPosition} from '@cocreate/selection';
|
4
4
|
|
5
|
-
let crud
|
6
|
-
if (CRUD && CRUD.default)
|
7
|
-
crud = CRUD.default
|
8
|
-
else
|
9
|
-
crud = CRUD
|
10
|
-
|
11
5
|
export function insertAdjacentElement({ domTextEditor, target, position, element, elementValue }) {
|
12
6
|
let remove;
|
13
7
|
if (element && !elementValue) {
|