@cocreate/crdt 1.18.27 → 1.19.0
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 +21 -0
- package/CoCreate.config.js +2 -2
- package/LICENSE +177 -177
- package/demo/index.html +10 -13
- package/docs/index.html +15 -15
- package/package.json +7 -8
- package/src/index.js +406 -381
- package/webpack.config.js +79 -73
package/demo/index.html
CHANGED
|
@@ -6,29 +6,26 @@
|
|
|
6
6
|
</head>
|
|
7
7
|
<body>
|
|
8
8
|
<textarea
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
array="apple"
|
|
10
|
+
object="6193e3f6cbf74500119cfae8"
|
|
11
|
+
key="test"
|
|
12
12
|
width="100%"
|
|
13
13
|
height="300px"></textarea>
|
|
14
|
-
<h1
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
name="test"></h1>
|
|
18
|
-
<!-- <h5 collection="apple" document_id="6193e3f6cbf74500119cfae8" name='test' contenteditable></h5> -->
|
|
19
|
-
<!--<iframe collection="apples" document_id="602c4dadb7fb6c9da35ca126" name='html' width="100%" height="300px"></iframe>-->
|
|
14
|
+
<h1 array="apple" object="6193e3f6cbf74500119cfae8" key="test"></h1>
|
|
15
|
+
<!-- <h5 array="apple" object="6193e3f6cbf74500119cfae8" key='test' contenteditable></h5> -->
|
|
16
|
+
<!--<iframe array="apples" object="602c4dadb7fb6c9da35ca126" key='html' width="100%" height="300px"></iframe>-->
|
|
20
17
|
|
|
21
18
|
<br />
|
|
22
|
-
CoCreate.crdt.replaceText({
|
|
19
|
+
CoCreate.crdt.replaceText({ array: "apples", object:
|
|
23
20
|
"602c4dadb7fb6c9da35ca126", name: "test", value: 'testing new value' })
|
|
24
21
|
<br />
|
|
25
|
-
CoCreate.crdt.getText({
|
|
22
|
+
CoCreate.crdt.getText({ array: 'apples', object:
|
|
26
23
|
'602c4dadb7fb6c9da35ca126', name: 'html' })
|
|
27
24
|
<br />
|
|
28
|
-
CoCreate.crdt.insertText({
|
|
25
|
+
CoCreate.crdt.insertText({ array: 'apples', object:
|
|
29
26
|
'602c4dadb7fb6c9da35ca126', name: 'html' value:'t', position '0' })
|
|
30
27
|
<br />
|
|
31
|
-
CoCreate.crdt.deleteText({
|
|
28
|
+
CoCreate.crdt.deleteText({ array: 'apples', object:
|
|
32
29
|
'602c4dadb7fb6c9da35ca126', name: 'html', position: '0', length: 2 })
|
|
33
30
|
|
|
34
31
|
<!--<script src="../dist/CoCreate-crdt.js"></script>-->
|
package/docs/index.html
CHANGED
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
sizes="32x32"
|
|
12
12
|
href="https://cocreate.app/images/favicon.ico" />
|
|
13
13
|
<meta
|
|
14
|
-
|
|
14
|
+
key="description"
|
|
15
15
|
content="A simple HTML5 and pure javascript component. Easy configuration using HTML5 attributes or Javscript api and highly styleable." />
|
|
16
16
|
<meta
|
|
17
|
-
|
|
17
|
+
key="keywords"
|
|
18
18
|
content="helper classes, utility classes, css framework, css library, inline style classes" />
|
|
19
19
|
<meta name="robots" content="index,follow" />
|
|
20
20
|
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
scroll="sticky-nav,hide-nav"
|
|
35
35
|
scroll-up="10"
|
|
36
36
|
scroll-down="10"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
array="files"
|
|
38
|
+
object="60395ef42b3ac232657040fd"
|
|
39
|
+
key="src"></nav>
|
|
40
40
|
<sidenav
|
|
41
41
|
id="menuL"
|
|
42
42
|
class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
|
|
43
43
|
resizable
|
|
44
|
-
resize-
|
|
44
|
+
resize-selector="[content_id='content']"
|
|
45
45
|
resize-property="margin-left"
|
|
46
46
|
resize-value="width">
|
|
47
47
|
<menu
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
array="files"
|
|
49
|
+
object="603717b07de7fb350ae9fec8"
|
|
50
|
+
key="src"></menu>
|
|
51
51
|
<div resize="right"></div>
|
|
52
52
|
</sidenav>
|
|
53
53
|
<main
|
|
@@ -194,9 +194,9 @@
|
|
|
194
194
|
<textarea
|
|
195
195
|
type="code"
|
|
196
196
|
lang="html"
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
array="demos"
|
|
198
|
+
object=""
|
|
199
|
+
key="demo"
|
|
200
200
|
save="false"
|
|
201
201
|
id="demo"
|
|
202
202
|
class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
show="#eye-slash"
|
|
220
220
|
hide="#eye, #demo-preview"
|
|
221
221
|
toggle="code-height"
|
|
222
|
-
toggle-
|
|
222
|
+
toggle-selector="#demo-code"
|
|
223
223
|
><i
|
|
224
224
|
class="height:18px fill:#505050"
|
|
225
225
|
src="/assets/svg/eye.svg"></i
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
show="#eye, #demo-preview"
|
|
232
232
|
hide="#eye-slash"
|
|
233
233
|
toggle="code-height"
|
|
234
|
-
toggle-
|
|
234
|
+
toggle-selector="#demo-code"
|
|
235
235
|
><i
|
|
236
236
|
class="height:20px fill:#505050"
|
|
237
237
|
src="/assets/svg/eye-slash.svg"></i
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
<a
|
|
259
259
|
class="margin-right:5px"
|
|
260
260
|
fullscreen
|
|
261
|
-
fullscreen-
|
|
261
|
+
fullscreen-selector="#playground"></a>
|
|
262
262
|
</div>
|
|
263
263
|
</div>
|
|
264
264
|
<!-- End SandBox -->
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/crdt",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "CoCreate crdt",
|
|
5
5
|
"author": "CoCreate LLC",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "AGPL-3.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "npx webpack --config webpack.config.js",
|
|
12
|
-
"build": "
|
|
12
|
+
"build": "npx webpack --mode=production --config webpack.config.js",
|
|
13
13
|
"dev": "npx webpack --config webpack.config.js --watch",
|
|
14
14
|
"postinstall": "node -e \"const { execSync } = require('child_process'); try { execSync('coc --version', { stdio: 'ignore' }); } catch (error) { try { execSync('npm install -g @cocreate/cli', { stdio: 'inherit' }); console.log('Installed \"@cocreate/cli\" globally.'); } catch (error) { console.error('Failed to install \"@cocreate/cli\" globally:', error); } }\""
|
|
15
15
|
},
|
|
@@ -40,10 +40,9 @@
|
|
|
40
40
|
"webpack-log": "^3.0.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@cocreate/
|
|
44
|
-
"@cocreate/
|
|
45
|
-
"@cocreate/
|
|
46
|
-
"@cocreate/
|
|
47
|
-
"@cocreate/utils": "^1.21.14"
|
|
43
|
+
"@cocreate/crud-client": "^1.21.24",
|
|
44
|
+
"@cocreate/local-storage": "^1.7.21",
|
|
45
|
+
"@cocreate/message-client": "^1.3.29",
|
|
46
|
+
"@cocreate/utils": "^1.21.16"
|
|
48
47
|
}
|
|
49
48
|
}
|