@rme-sdk/extension-diff 1.1.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.
@@ -0,0 +1,548 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
8
+ var __typeError = (msg) => {
9
+ throw TypeError(msg);
10
+ };
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
24
+ var __decoratorStart = (base) => {
25
+ var _a2;
26
+ return [, , , __create((_a2 = base == null ? void 0 : base[__knownSymbol("metadata")]) != null ? _a2 : null)];
27
+ };
28
+ var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
29
+ var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
30
+ var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
31
+ var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
32
+ var __runInitializers = (array, flags, self, value) => {
33
+ for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
34
+ return value;
35
+ };
36
+ var __decorateElement = (array, flags, name, decorators, target, extra) => {
37
+ var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
38
+ var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
39
+ var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
40
+ var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name]() {
41
+ return __privateGet(this, extra);
42
+ }, set [name](x) {
43
+ return __privateSet(this, extra, x);
44
+ } }, name));
45
+ k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
46
+ for (var i = decorators.length - 1; i >= 0; i--) {
47
+ ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
48
+ if (k) {
49
+ ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name in x };
50
+ if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
51
+ if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
52
+ }
53
+ it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
54
+ if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
55
+ else if (typeof it !== "object" || it === null) __typeError("Object expected");
56
+ else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
57
+ }
58
+ return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
59
+ };
60
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
61
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
62
+ var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
63
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
64
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
65
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
66
+
67
+ // src/diff-extension.ts
68
+ import {
69
+ command,
70
+ extension,
71
+ hasTransactionChanged,
72
+ helper,
73
+ invariant,
74
+ isDomNode,
75
+ isEmptyArray as isEmptyArray2,
76
+ isEqual,
77
+ isNumber,
78
+ isString,
79
+ PlainExtension
80
+ } from "@rme-sdk/core";
81
+ import { Mapping } from "@rme-sdk/pm/transform";
82
+ import { Decoration, DecorationSet } from "@rme-sdk/pm/view";
83
+
84
+ // src/diff-utils.ts
85
+ import { assertGet, isEmptyArray } from "@rme-sdk/core";
86
+ var Span = class {
87
+ constructor(props) {
88
+ __publicField(this, "from");
89
+ __publicField(this, "to");
90
+ __publicField(this, "commit");
91
+ const { from, to, commit } = props;
92
+ this.from = from;
93
+ this.to = to;
94
+ this.commit = commit;
95
+ }
96
+ };
97
+ var Commit = class {
98
+ constructor(props) {
99
+ __publicField(this, "message");
100
+ __publicField(this, "time");
101
+ __publicField(this, "steps");
102
+ __publicField(this, "maps");
103
+ __publicField(this, "hidden");
104
+ const { message, time, steps, maps, hidden } = props;
105
+ this.message = message;
106
+ this.time = time;
107
+ this.steps = steps;
108
+ this.maps = maps;
109
+ this.hidden = hidden;
110
+ }
111
+ };
112
+ var TrackState = class _TrackState {
113
+ constructor(props) {
114
+ __publicField(this, "blameMap");
115
+ __publicField(this, "commits");
116
+ __publicField(this, "uncommittedSteps");
117
+ __publicField(this, "uncommittedMaps");
118
+ const { blameMap, commits, uncommittedSteps, uncommittedMaps } = props;
119
+ this.blameMap = blameMap;
120
+ this.commits = commits;
121
+ this.uncommittedSteps = uncommittedSteps;
122
+ this.uncommittedMaps = uncommittedMaps;
123
+ }
124
+ /**
125
+ * Apply a transform to this state.
126
+ */
127
+ applyTransform(transform) {
128
+ const inverted = transform.steps.map(
129
+ (step, index) => step.invert(assertGet(transform.docs, index))
130
+ );
131
+ const newBlame = updateBlameMap({ map: this.blameMap, transform, id: this.commits.length });
132
+ return new _TrackState({
133
+ blameMap: newBlame,
134
+ commits: this.commits,
135
+ uncommittedSteps: [...this.uncommittedSteps, ...inverted],
136
+ uncommittedMaps: [...this.uncommittedMaps, ...transform.mapping.maps]
137
+ });
138
+ }
139
+ /**
140
+ * When a transaction is marked as a commit, this is used to put any
141
+ * uncommitted steps into a new commit.
142
+ */
143
+ applyCommit(message, time) {
144
+ if (isEmptyArray(this.uncommittedSteps)) {
145
+ return this;
146
+ }
147
+ const commit = new Commit({
148
+ message,
149
+ time,
150
+ steps: this.uncommittedSteps,
151
+ maps: this.uncommittedMaps
152
+ });
153
+ return new _TrackState({
154
+ blameMap: this.blameMap,
155
+ commits: [...this.commits, commit],
156
+ uncommittedSteps: [],
157
+ uncommittedMaps: []
158
+ });
159
+ }
160
+ };
161
+ function updateBlameMap({ map, transform, id }) {
162
+ const result = [];
163
+ const mapping = transform.mapping;
164
+ for (const span of map) {
165
+ const from = mapping.map(span.from, 1);
166
+ const to = mapping.map(span.to, -1);
167
+ if (from < to) {
168
+ result.push(new Span({ from, to, commit: span.commit }));
169
+ }
170
+ }
171
+ for (const [index, map2] of mapping.maps.entries()) {
172
+ const after = mapping.slice(index + 1);
173
+ map2.forEach((_s, _e, start, end) => {
174
+ insertIntoBlameMap({
175
+ map: result,
176
+ from: after.map(start, 1),
177
+ to: after.map(end, -1),
178
+ commit: id
179
+ });
180
+ });
181
+ }
182
+ return result;
183
+ }
184
+ function insertIntoBlameMap(props) {
185
+ let { from, to, map, commit } = props;
186
+ if (from >= to) {
187
+ return;
188
+ }
189
+ let pos = 0;
190
+ let next;
191
+ for (; pos < map.length; pos++) {
192
+ next = assertGet(map, pos);
193
+ if (next.commit === commit) {
194
+ if (next.to >= from) {
195
+ break;
196
+ }
197
+ continue;
198
+ }
199
+ if (next.to <= from) {
200
+ continue;
201
+ }
202
+ if (next.from < from) {
203
+ const left = new Span({ from: next.from, to: from, commit: next.commit });
204
+ if (next.to > to) {
205
+ map.splice(pos++, 0, left);
206
+ } else {
207
+ map[pos++] = left;
208
+ }
209
+ }
210
+ break;
211
+ }
212
+ while (next = map[pos]) {
213
+ if (next.commit === commit) {
214
+ if (next.from > to) {
215
+ break;
216
+ }
217
+ from = Math.min(from, next.from);
218
+ to = Math.max(to, next.to);
219
+ map.splice(pos, 1);
220
+ continue;
221
+ }
222
+ if (next.from >= to) {
223
+ break;
224
+ }
225
+ if (next.to > to) {
226
+ map[pos] = new Span({ from: to, to: next.to, commit: next.commit });
227
+ break;
228
+ }
229
+ map.splice(pos, 1);
230
+ }
231
+ map.splice(pos, 0, new Span({ from, to, commit }));
232
+ }
233
+
234
+ // src/diff-extension.ts
235
+ var _getCommit_dec, _getCommits_dec, _revertCommit_dec, _commitChange_dec, _removeHighlightedCommit_dec, _highlightCommit_dec, _a, _DiffExtension_decorators, _init;
236
+ _DiffExtension_decorators = [extension({
237
+ defaultOptions: {
238
+ blameMarkerClass: "blame-marker",
239
+ revertMessage: (message) => "Revert: '".concat(message, "'")
240
+ },
241
+ staticKeys: ["blameMarkerClass"],
242
+ handlerKeys: ["onMouseOverCommit", "onMouseLeaveCommit", "onSelectCommits", "onDeselectCommits"]
243
+ })];
244
+ var DiffExtension = class extends (_a = PlainExtension, _highlightCommit_dec = [command()], _removeHighlightedCommit_dec = [command()], _commitChange_dec = [command()], _revertCommit_dec = [command()], _getCommits_dec = [helper()], _getCommit_dec = [helper()], _a) {
245
+ constructor() {
246
+ super(...arguments);
247
+ __runInitializers(_init, 5, this);
248
+ __publicField(this, "hovered");
249
+ __publicField(this, "selections");
250
+ }
251
+ get name() {
252
+ return "diff";
253
+ }
254
+ /**
255
+ * Create the custom change tracking plugin.
256
+ *
257
+ * This has been adapted from the prosemirror website demo.
258
+ * https://github.com/ProseMirror/website/blob/master/example/track/index.js
259
+ */
260
+ createPlugin() {
261
+ return {
262
+ state: {
263
+ init: (_, state) => this.createInitialState(state),
264
+ apply: (tr, pluginState, _, state) => {
265
+ const newState = this.applyStateUpdates(tr, pluginState, state);
266
+ this.handleSelection(tr, newState);
267
+ return newState;
268
+ }
269
+ },
270
+ props: {
271
+ decorations: (state) => this.getPluginState(state).decorations,
272
+ handleDOMEvents: {
273
+ mouseover: (view, event) => this.handlerMouseOver(view, event),
274
+ mouseleave: (view, event) => this.handleMouseLeave(view, event)
275
+ }
276
+ }
277
+ };
278
+ }
279
+ highlightCommit(commit) {
280
+ return (props) => {
281
+ const { tr, dispatch } = props;
282
+ if (isString(commit)) {
283
+ commit = this.getIndexByName(commit);
284
+ }
285
+ if (!isNumber(commit)) {
286
+ commit = this.getCommitId(commit);
287
+ }
288
+ if (dispatch) {
289
+ dispatch(this.setMeta(tr, { add: commit }));
290
+ }
291
+ return true;
292
+ };
293
+ }
294
+ removeHighlightedCommit(commit) {
295
+ return (props) => {
296
+ const { tr, dispatch } = props;
297
+ if (isString(commit)) {
298
+ commit = this.getIndexByName(commit);
299
+ }
300
+ if (!isNumber(commit)) {
301
+ commit = this.getCommitId(commit);
302
+ }
303
+ if (dispatch) {
304
+ dispatch(this.setMeta(tr, { clear: commit }));
305
+ }
306
+ return true;
307
+ };
308
+ }
309
+ commitChange(message) {
310
+ return (props) => {
311
+ const { tr, dispatch } = props;
312
+ if (dispatch) {
313
+ dispatch(this.setMeta(tr, { message }));
314
+ }
315
+ return true;
316
+ };
317
+ }
318
+ revertCommit(commit) {
319
+ return (props) => {
320
+ var _a2;
321
+ const { state, tr, dispatch } = props;
322
+ if (!commit) {
323
+ commit = this.getCommit("last");
324
+ }
325
+ const { tracked } = this.getPluginState(state);
326
+ const index = tracked.commits.indexOf(commit);
327
+ if (index === -1) {
328
+ return false;
329
+ }
330
+ if (!isEmptyArray2(tracked.uncommittedSteps)) {
331
+ return false;
332
+ }
333
+ if (!dispatch) {
334
+ return true;
335
+ }
336
+ const commitMaps = [];
337
+ for (const commit2 of tracked.commits.slice(index)) {
338
+ commitMaps.push(...commit2.maps);
339
+ }
340
+ const remap = new Mapping(commitMaps);
341
+ for (let index2 = commit.steps.length - 1; index2 >= 0; index2--) {
342
+ const remapped = (_a2 = commit.steps[index2]) == null ? void 0 : _a2.map(remap.slice(index2 + 1));
343
+ if (!remapped) {
344
+ continue;
345
+ }
346
+ const result = tr.maybeStep(remapped);
347
+ if (result.doc) {
348
+ remap.appendMap(remapped.getMap(), index2);
349
+ }
350
+ }
351
+ if (tr.docChanged) {
352
+ this.setMeta(tr, { message: this.options.revertMessage(commit.message) });
353
+ dispatch(tr);
354
+ }
355
+ return true;
356
+ };
357
+ }
358
+ getCommits() {
359
+ return this.getPluginState().tracked.commits;
360
+ }
361
+ getIndexByName(name) {
362
+ const length = this.getPluginState().tracked.commits.length;
363
+ switch (name) {
364
+ case "first":
365
+ return 0;
366
+ default:
367
+ return length - 1;
368
+ }
369
+ }
370
+ getCommit(id) {
371
+ const commits = this.getPluginState().tracked.commits;
372
+ const commit = isString(id) ? commits[this.getIndexByName(id)] : commits[id];
373
+ invariant(commit, {});
374
+ return commit;
375
+ }
376
+ getCommitId(commit) {
377
+ const { tracked } = this.getPluginState();
378
+ return tracked.commits.indexOf(commit);
379
+ }
380
+ /**
381
+ * Get the meta data for this custom plugin.
382
+ */
383
+ getMeta(tr) {
384
+ var _a2;
385
+ return (_a2 = tr.getMeta(this.pluginKey)) != null ? _a2 : {};
386
+ }
387
+ /**
388
+ * Set the meta data for the plugin.
389
+ */
390
+ setMeta(tr, meta) {
391
+ tr.setMeta(this.pluginKey, __spreadValues(__spreadValues({}, this.getMeta(tr)), meta));
392
+ return tr;
393
+ }
394
+ /**
395
+ * Calls the selection handlers when the selection changes the number of
396
+ * commit spans covered.
397
+ */
398
+ handleSelection(tr, pluginState) {
399
+ if (!hasTransactionChanged(tr)) {
400
+ return;
401
+ }
402
+ const { from, to } = tr.selection;
403
+ const { blameMap, commits } = pluginState.tracked;
404
+ const selections = [];
405
+ for (const map of blameMap) {
406
+ const selectionIncludesSpan = map.from <= from && map.to >= from || map.from <= to && map.to >= to;
407
+ if (!selectionIncludesSpan || !isNumber(map.commit) || map.commit >= commits.length) {
408
+ continue;
409
+ }
410
+ selections.push({ commit: this.getCommit(map.commit), from: map.from, to: map.to });
411
+ }
412
+ const selectionHasCommit = selections.length > 0;
413
+ if (selectionHasCommit && !isEqual(selections, this.selections)) {
414
+ this.options.onSelectCommits(selections, this.selections);
415
+ this.selections = selections;
416
+ return;
417
+ }
418
+ if (this.selections) {
419
+ this.options.onDeselectCommits(this.selections);
420
+ this.selections = void 0;
421
+ }
422
+ }
423
+ /**
424
+ * Transform the view and event into a commit and span.
425
+ */
426
+ getHandlerPropsFromEvent(view, event) {
427
+ if (!isDomNode(event.target)) {
428
+ return;
429
+ }
430
+ const pos = view.posAtDOM(event.target, 0);
431
+ const { tracked } = this.getPluginState();
432
+ const span = tracked.blameMap.find((map) => map.from <= pos && map.to >= pos);
433
+ if (!span || !isNumber(span.commit)) {
434
+ return;
435
+ }
436
+ return { commit: this.getCommit(span.commit), from: span.from, to: span.to };
437
+ }
438
+ /**
439
+ * Capture the mouseover event and trigger the `onMouseOverCommit` handler
440
+ * when it is captured.
441
+ */
442
+ handlerMouseOver(view, event) {
443
+ const props = this.getHandlerPropsFromEvent(view, event);
444
+ if (props) {
445
+ this.hovered = props;
446
+ this.options.onMouseOverCommit(props);
447
+ }
448
+ return false;
449
+ }
450
+ /**
451
+ * Capture the mouseleave event and trigger the `onMouseLeaveCommit` handler.
452
+ */
453
+ handleMouseLeave(view, event) {
454
+ if (!this.hovered) {
455
+ return false;
456
+ }
457
+ const commit = this.getHandlerPropsFromEvent(view, event);
458
+ if (commit) {
459
+ this.hovered = void 0;
460
+ this.options.onMouseLeaveCommit(commit);
461
+ }
462
+ return false;
463
+ }
464
+ /**
465
+ * Create the initial plugin state for the custom plugin.
466
+ */
467
+ createInitialState(state) {
468
+ return {
469
+ tracked: new TrackState({
470
+ blameMap: [new Span({ from: 0, to: state.doc.content.size, commit: void 0 })],
471
+ commits: [],
472
+ uncommittedMaps: [],
473
+ uncommittedSteps: []
474
+ }),
475
+ decorations: DecorationSet.empty
476
+ };
477
+ }
478
+ /**
479
+ * Apply state updates in response to document changes.
480
+ */
481
+ applyStateUpdates(tr, pluginState, state) {
482
+ return __spreadValues(__spreadValues({}, this.updateTracked(tr, pluginState)), this.updateHighlights(tr, pluginState, state));
483
+ }
484
+ createDecorationSet(commits, pluginState, state) {
485
+ const { tracked } = pluginState;
486
+ const decorations = [];
487
+ for (const { commit, from, to } of tracked.blameMap) {
488
+ if (!isNumber(commit) || !commits.includes(commit)) {
489
+ continue;
490
+ }
491
+ decorations.push(Decoration.inline(from, to, { class: this.options.blameMarkerClass }));
492
+ }
493
+ return DecorationSet.create(state.doc, decorations);
494
+ }
495
+ /**
496
+ * Apply updates to the highlight decorations.
497
+ */
498
+ updateHighlights(tr, pluginState, state) {
499
+ var _a2;
500
+ const { add, clear } = this.getMeta(tr);
501
+ if (isNumber(add) && pluginState.commits && !pluginState.commits.includes(add)) {
502
+ const commits = [...pluginState.commits, add];
503
+ const decorations = this.createDecorationSet(commits, pluginState, state);
504
+ return { decorations, commits };
505
+ }
506
+ if (isNumber(clear) && pluginState.commits && pluginState.commits.includes(clear)) {
507
+ const commits = pluginState.commits.filter((commit) => commit !== clear);
508
+ const decorations = this.createDecorationSet(commits, pluginState, state);
509
+ return { decorations, commits };
510
+ }
511
+ if (tr.docChanged && !isEmptyArray2(pluginState.commits)) {
512
+ return {
513
+ decorations: pluginState.decorations.map(tr.mapping, tr.doc),
514
+ commits: pluginState.commits
515
+ };
516
+ }
517
+ return { decorations: pluginState.decorations, commits: (_a2 = pluginState.commits) != null ? _a2 : [] };
518
+ }
519
+ /**
520
+ * Apply updates for the commit tracker.
521
+ *
522
+ * Please note this isn't able to track marks and diffs. It can only
523
+ * track changes to content.
524
+ */
525
+ updateTracked(tr, state) {
526
+ let { tracked } = state;
527
+ if (tr.docChanged) {
528
+ tracked = tracked.applyTransform(tr);
529
+ }
530
+ const { message } = this.getMeta(tr);
531
+ if (message) {
532
+ tracked = tracked.applyCommit(message, tr.time);
533
+ }
534
+ return { tracked };
535
+ }
536
+ };
537
+ _init = __decoratorStart(_a);
538
+ __decorateElement(_init, 1, "highlightCommit", _highlightCommit_dec, DiffExtension);
539
+ __decorateElement(_init, 1, "removeHighlightedCommit", _removeHighlightedCommit_dec, DiffExtension);
540
+ __decorateElement(_init, 1, "commitChange", _commitChange_dec, DiffExtension);
541
+ __decorateElement(_init, 1, "revertCommit", _revertCommit_dec, DiffExtension);
542
+ __decorateElement(_init, 1, "getCommits", _getCommits_dec, DiffExtension);
543
+ __decorateElement(_init, 1, "getCommit", _getCommit_dec, DiffExtension);
544
+ DiffExtension = __decorateElement(_init, 0, "DiffExtension", _DiffExtension_decorators, DiffExtension);
545
+ __runInitializers(_init, 1, DiffExtension);
546
+ export {
547
+ DiffExtension
548
+ };
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@rme-sdk/extension-diff",
3
+ "version": "1.1.0",
4
+ "description": "Track diffs between your json documents.",
5
+ "keywords": [
6
+ "remirror",
7
+ "extension"
8
+ ],
9
+ "homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/remirror__extension-diff",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/remirror/remirror.git",
13
+ "directory": "packages/remirror__extension-diff"
14
+ },
15
+ "license": "MIT",
16
+ "contributors": [
17
+ "Ifiok Jr. <ifiokotung@gmail.com>"
18
+ ],
19
+ "sideEffects": false,
20
+ "type": "module",
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/rme-sdk-extension-diff.d.ts",
24
+ "import": "./dist/rme-sdk-extension-diff.js",
25
+ "require": "./dist/rme-sdk-extension-diff.cjs"
26
+ },
27
+ "./package.json": "./package.json"
28
+ },
29
+ "main": "./dist/rme-sdk-extension-diff.cjs",
30
+ "module": "./dist/rme-sdk-extension-diff.js",
31
+ "types": "./dist/rme-sdk-extension-diff.d.ts",
32
+ "files": [
33
+ "dist",
34
+ "dist-types"
35
+ ],
36
+ "dependencies": {
37
+ "@babel/runtime": "^7.27.0",
38
+ "@rme-sdk/core": "1.1.0",
39
+ "@rme-sdk/messages": "1.1.0"
40
+ },
41
+ "devDependencies": {
42
+ "@rme-sdk/cli": "1.1.0",
43
+ "@rme-sdk/pm": "1.1.0"
44
+ },
45
+ "peerDependencies": {
46
+ "@rme-sdk/pm": "1.1.0"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "@rme-sdk": {
52
+ "sizeLimit": "10 KB"
53
+ },
54
+ "scripts": {
55
+ "build": "remirror-cli build"
56
+ }
57
+ }