@live-change/prosemirror-service 0.3.41 → 0.4.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/definition.js CHANGED
@@ -1,11 +1,12 @@
1
- const app = require("@live-change/framework").app()
1
+ import App from '@live-change/framework'
2
+ const app = App.app()
2
3
 
3
- const relationsPlugin = require('@live-change/relations-plugin')
4
- const userService = require('@live-change/user-service')
4
+ import relationsPlugin from '@live-change/relations-plugin'
5
+ import userService from '@live-change/user-service'
5
6
 
6
7
  const definition = app.createServiceDefinition({
7
8
  name: "prosemirror",
8
9
  use: [ relationsPlugin, userService ]
9
10
  })
10
11
 
11
- module.exports = definition
12
+ export default definition
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- const App = require("@live-change/framework")
1
+ import App from '@live-change/framework'
2
2
  const app = App.app()
3
3
 
4
- const definition = require('./definition.js')
4
+ import definition from './definition.js'
5
5
  const config = definition.config
6
6
  const {
7
7
  readerRoles = ['writer'],
@@ -19,7 +19,7 @@ const readerAccessControl = {
19
19
  objects: p => [{ objectType: p.targetType, object: p.target }]
20
20
  }
21
21
 
22
- const { Document, StepsBucket, Snapshot, schemas, getDocument } = require("./model.js")
22
+ import { Document, StepsBucket, Snapshot, schemas, getDocument } from "./model.js"
23
23
 
24
24
  const sleep = ms => new Promise(r => setTimeout(r, ms))
25
25
 
@@ -124,7 +124,6 @@ definition.action({
124
124
  name: 'createDocument',
125
125
  accessControl: writerAccessControl,
126
126
  waitForEvents: true,
127
- queuedBy: ['targetType', 'target'],
128
127
  properties: {
129
128
  targetType: {
130
129
  type: String,
@@ -168,7 +167,6 @@ definition.action({
168
167
  name: 'createDocumentIfNotExists',
169
168
  accessControl: writerAccessControl,
170
169
  waitForEvents: true,
171
- queuedBy: ['targetType', 'target'],
172
170
  properties: {
173
171
  targetType: {
174
172
  type: String,
@@ -214,7 +212,6 @@ definition.action({
214
212
  name: 'edit',
215
213
  accessControl: writerAccessControl,
216
214
  waitForEvents: true,
217
- queuedBy: ['targetType', 'target'],
218
215
  properties: {
219
216
  targetType: {
220
217
  type: String,
@@ -283,7 +280,6 @@ definition.action({
283
280
  name: 'takeSnapshot',
284
281
  accessControl: writerAccessControl,
285
282
  waitForEvents: true,
286
- queuedBy: ['targetType', 'target'],
287
283
  properties: {
288
284
  targetType: {
289
285
  type: String,
@@ -321,7 +317,6 @@ definition.action({
321
317
  definition.trigger({
322
318
  name: 'takeSnapshot',
323
319
  waitForEvents: true,
324
- queuedBy: ['targetType', 'target'],
325
320
  properties: {
326
321
  targetType: {
327
322
  type: String,
@@ -358,4 +353,4 @@ definition.trigger({
358
353
  })
359
354
 
360
355
 
361
- module.exports = definition
356
+ export default definition
package/model.js CHANGED
@@ -1,10 +1,10 @@
1
- const App = require("@live-change/framework")
1
+ import App from '@live-change/framework'
2
2
  const app = App.app()
3
- const definition = require('./definition.js')
3
+ import definition from './definition.js'
4
4
  const config = definition.config
5
- const LRU = require('lru-cache')
6
- const { Schema } = require('prosemirror-model')
7
- const { Step } = require('prosemirror-transform')
5
+ import LRU from 'lru-cache'
6
+ import { Schema } from 'prosemirror-model'
7
+ import { Step } from 'prosemirror-transform'
8
8
 
9
9
  const { snapshotAfterSteps = 230 } = config
10
10
 
@@ -216,4 +216,4 @@ definition.event({
216
216
  }
217
217
  })
218
218
 
219
- module.exports = { Document, StepsBucket, schemas, getDocument, readVersion }
219
+ export { Document, StepsBucket, Snapshot, schemas, getDocument, readVersion }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/prosemirror-service",
3
- "version": "0.3.41",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,13 +20,14 @@
20
20
  "name": "Michał Łaszczewski",
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
+ "type": "module",
23
24
  "dependencies": {
24
- "@live-change/framework": "0.7.39",
25
- "@live-change/relations-plugin": "0.7.39",
25
+ "@live-change/framework": "0.8.0",
26
+ "@live-change/relations-plugin": "0.8.0",
26
27
  "lru-cache": "^7.12.0",
27
28
  "pluralize": "^8.0.0",
28
29
  "progress-stream": "^2.0.0",
29
30
  "prosemirror-model": "^1.18.1"
30
31
  },
31
- "gitHead": "cf7a4196465c134c4685571526754330d7c70475"
32
+ "gitHead": "87010b19907140a326943f22cd538eafdc9c28f1"
32
33
  }