fix import locations
This commit is contained in:
parent
bbc207aaa6
commit
814af5a3d7
@ -8,7 +8,7 @@
|
||||
"scripts": {
|
||||
"test": "npm run lint",
|
||||
"debug": "concurrently 'rollup -wc rollup.test.js' 'cutest-serve y.test.js -o'",
|
||||
"lint": "standard && documentation lint src/**",
|
||||
"lint": "standard",
|
||||
"docs": "esdocs",
|
||||
"serve-docs": "npm run docs && serve ./docs/",
|
||||
"dist": "rollup -c rollup.browser.js; rollup -c rollup.node.js",
|
||||
@ -18,7 +18,8 @@
|
||||
},
|
||||
"files": [
|
||||
"y.*",
|
||||
"src/*"
|
||||
"src/*",
|
||||
".esdoc.json"
|
||||
],
|
||||
"standard": {
|
||||
"ignore": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { deleteItemRange } from '../Struct/Delete.js'
|
||||
import ID from '../Util/ID/ID.js.js'
|
||||
import ID from '../Util/ID/ID.js'
|
||||
|
||||
export function stringifyDeleteSet (y, decoder, strBuilder) {
|
||||
let dsLength = decoder.readUint32()
|
||||
|
@ -2,8 +2,8 @@ import BinaryDecoder from '../Util/Binary/Decoder.js'
|
||||
import { stringifyStructs } from './integrateRemoteStructs.js'
|
||||
import { stringifySyncStep1 } from './syncStep1.js'
|
||||
import { stringifySyncStep2 } from './syncStep2.js'
|
||||
import ID from '../Util/ID/ID.js.js'
|
||||
import RootID from '../Util/ID/RootID.js.js'
|
||||
import ID from '../Util/ID/ID.js'
|
||||
import RootID from '../Util/ID/RootID.js'
|
||||
import Y from '../Y.js'
|
||||
|
||||
export function messageToString ([y, buffer]) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import BinaryEncoder from '../Util/Binary/Encoder.js'
|
||||
import { readStateSet, writeStateSet } from './stateSet.js'
|
||||
import { writeDeleteSet } from './deleteSet.js'
|
||||
import ID from '../Util/ID/ID.js.js'
|
||||
import { RootFakeUserID } from '../Util/ID/RootID.js.js'
|
||||
import ID from '../Util/ID/ID.js'
|
||||
import { RootFakeUserID } from '../Util/ID/RootID.js'
|
||||
|
||||
export function stringifySyncStep1 (y, decoder, strBuilder) {
|
||||
let auth = decoder.readVarString()
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Tree from '../Util/Tree.js'
|
||||
import ID from '../Util/ID/ID.js.js'
|
||||
import ID from '../Util/ID/ID.js'
|
||||
|
||||
class DSNode {
|
||||
constructor (id, len, gc) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Tree from '../Util/Tree.js'
|
||||
import RootID from '../Util/ID/RootID.js.js'
|
||||
import RootID from '../Util/ID/RootID.js'
|
||||
import { getStruct } from '../Util/structReferences.js'
|
||||
import { logID } from '../MessageHandler/messageToString.js'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import ID from '../Util/ID/ID.js.js'
|
||||
import ID from '../Util/ID/ID.js'
|
||||
|
||||
export default class StateStore {
|
||||
constructor (y) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { getReference } from '../Util/structReferences.js'
|
||||
import ID from '../Util/ID/ID.js.js'
|
||||
import { getStructReference } from '../Util/structReferences.js'
|
||||
import ID from '../Util/ID/ID.js'
|
||||
import { logID } from '../MessageHandler/messageToString.js'
|
||||
|
||||
/**
|
||||
@ -79,7 +79,7 @@ export default class Delete {
|
||||
* @param {BinaryEncoder} encoder The encoder to write data to.
|
||||
*/
|
||||
_toBinary (encoder) {
|
||||
encoder.writeUint8(getReference(this.constructor))
|
||||
encoder.writeUint8(getStructReference(this.constructor))
|
||||
encoder.writeID(this._targetID)
|
||||
encoder.writeVarUint(this._length)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { getReference } from '../Util/structReferences.js'
|
||||
import ID from '../Util/ID/ID.js.js'
|
||||
import { RootFakeUserID } from '../Util/ID/RootID.js.js'
|
||||
import { getStructReference } from '../Util/structReferences.js'
|
||||
import ID from '../Util/ID/ID.js'
|
||||
import { RootFakeUserID } from '../Util/ID/RootID.js'
|
||||
import Delete from './Delete.js'
|
||||
import { transactionTypeChanged } from '../Transaction.js'
|
||||
|
||||
@ -336,7 +336,7 @@ export default class Item {
|
||||
* @param {BinaryEncoder} encoder The encoder to write data to.
|
||||
*/
|
||||
_toBinary (encoder) {
|
||||
encoder.writeUint8(getReference(this.constructor))
|
||||
encoder.writeUint8(getStructReference(this.constructor))
|
||||
let info = 0
|
||||
if (this._origin !== null) {
|
||||
info += 0b1 // origin is defined
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Item from './Item.js'
|
||||
import EventHandler from '../Util/EventHandler.js'
|
||||
import ID from '../Util/ID/ID.js.js'
|
||||
import ID from '../Util/ID/ID.js'
|
||||
|
||||
// restructure children as if they were inserted one after another
|
||||
function integrateChildren (y, start) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import Type from '../Struct/Type.js'
|
||||
import ItemJSON from '../Struct/ItemJSON.js'
|
||||
import ItemString from '../Struct/ItemString.js'
|
||||
import { logID } from '../MessageHandler/messageToString.js'
|
||||
import YEvent from '../Util/YEvent.js'
|
||||
import Type from '../../Struct/Type.js'
|
||||
import ItemJSON from '../../Struct/ItemJSON.js'
|
||||
import ItemString from '../../Struct/ItemString.js'
|
||||
import { logID } from '../../MessageHandler/messageToString.js'
|
||||
import YEvent from '../../Util/YEvent.js'
|
||||
|
||||
/**
|
||||
* Event that describes the changes on a YArray
|
||||
|
@ -1,8 +1,8 @@
|
||||
import Type from '../Struct/Type.js'
|
||||
import Item from '../Struct/Item.js'
|
||||
import ItemJSON from '../Struct/ItemJSON.js'
|
||||
import { logID } from '../MessageHandler/messageToString.js'
|
||||
import YEvent from '../Util/YEvent.js'
|
||||
import Type from '../../Struct/Type.js'
|
||||
import Item from '../../Struct/Item.js'
|
||||
import ItemJSON from '../../Struct/ItemJSON.js'
|
||||
import { logID } from '../../MessageHandler/messageToString.js'
|
||||
import YEvent from '../../Util/YEvent.js'
|
||||
|
||||
/**
|
||||
* Event that describes the changes on a YMap.
|
||||
|
@ -1,8 +1,8 @@
|
||||
import ItemString from '../Struct/ItemString.js'
|
||||
import ItemEmbed from '../Struct/ItemEmbed.js'
|
||||
import ItemFormat from '../Struct/ItemFormat.js'
|
||||
import { logID } from '../MessageHandler/messageToString.js'
|
||||
import { YArrayEvent, default as YArray } from './YArray.js'
|
||||
import ItemString from '../../Struct/ItemString.js'
|
||||
import ItemEmbed from '../../Struct/ItemEmbed.js'
|
||||
import ItemFormat from '../../Struct/ItemFormat.js'
|
||||
import { logID } from '../../MessageHandler/messageToString.js'
|
||||
import { YArrayEvent, default as YArray } from '../YArray/YArray.js'
|
||||
|
||||
function integrateItem (item, parent, y, left, right) {
|
||||
item._origin = left
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { defaultDomFilter } from './utils.js'
|
||||
|
||||
import YMap from '../YMap.js'
|
||||
import YMap from '../YMap/YMap.js'
|
||||
import { YXmlFragment } from './YXml.js'
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@
|
||||
import { defaultDomFilter, applyChangesFromDom, reflectChangesOnDom } from './utils.js'
|
||||
import { beforeTransactionSelectionFixer, afterTransactionSelectionFixer } from './selection.js'
|
||||
|
||||
import YArray from '../YArray.js'
|
||||
import YArray from '../YArray/YArray.js'
|
||||
import YXmlEvent from './YXmlEvent.js'
|
||||
import { YXmlText, YXmlHook } from './YXml.js'
|
||||
import { logID } from '../../MessageHandler/messageToString.js'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import YMap from '../YMap.js'
|
||||
import YMap from '../YMap/YMap.js'
|
||||
import { getHook, addHook } from './hooks.js'
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,4 @@
|
||||
import YText from '../YText.js'
|
||||
import YText from '../YText/YText.js'
|
||||
|
||||
/**
|
||||
* Represents text in a Dom Element. In the future this type will also handle
|
||||
|
@ -1,5 +1,5 @@
|
||||
import ID from '../Util/ID/ID.js.js'
|
||||
import { default as RootID, RootFakeUserID } from '../Util/ID/RootID.js.js'
|
||||
import ID from '../ID/ID.js'
|
||||
import { default as RootID, RootFakeUserID } from '../ID/RootID.js'
|
||||
|
||||
/**
|
||||
* A BinaryDecoder handles the decoding of an ArrayBuffer.
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { RootFakeUserID } from '../Util/ID/RootID.js.js'
|
||||
import { RootFakeUserID } from '../ID/RootID.js'
|
||||
|
||||
const bits7 = 0b1111111
|
||||
const bits8 = 0b11111111
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { getReference } from './structReferences.js'
|
||||
import { getStructReference } from '../structReferences.js'
|
||||
|
||||
export const RootFakeUserID = 0xFFFFFF
|
||||
|
||||
@ -6,7 +6,7 @@ export default class RootID {
|
||||
constructor (name, typeConstructor) {
|
||||
this.user = RootFakeUserID
|
||||
this.name = name
|
||||
this.type = getReference(typeConstructor)
|
||||
this.type = getStructReference(typeConstructor)
|
||||
}
|
||||
equals (id) {
|
||||
return id !== null && id.user === this.user && id.name === this.name && id.type === this.type
|
||||
|
@ -1,4 +1,4 @@
|
||||
import ID from './ID.js'
|
||||
import ID from './ID/ID.js'
|
||||
|
||||
class ReverseOperation {
|
||||
constructor (y, transaction) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
import ID from '../Util/ID/ID.js.js'
|
||||
import ID from '../Util/ID/ID.js'
|
||||
import ItemJSON from '../Struct/ItemJSON.js'
|
||||
import ItemString from '../Struct/ItemString.js'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import ID from './ID.js'
|
||||
import RootID from './RootID.js'
|
||||
import ID from './ID/ID.js'
|
||||
import RootID from './ID/RootID.js'
|
||||
|
||||
/**
|
||||
* A relative position that is based on the Yjs model. In contrast to an
|
||||
|
2
src/Y.js
2
src/Y.js
@ -2,7 +2,7 @@ import DeleteStore from './Store/DeleteStore.js'
|
||||
import OperationStore from './Store/OperationStore.js'
|
||||
import StateStore from './Store/StateStore.js'
|
||||
import { generateUserID } from './Util/generateUserID.js'
|
||||
import RootID from './Util/ID/RootID.js.js'
|
||||
import RootID from './Util/ID/RootID.js'
|
||||
import NamedEventHandler from './Util/NamedEventHandler.js'
|
||||
import Transaction from './Transaction.js'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import RedBlackTree from '../src/Util/Tree.js'
|
||||
import ID from '../src/Util/ID/ID.js.js'
|
||||
import ID from '../src/Util/ID/ID.js'
|
||||
import Chance from 'chance'
|
||||
import { test, proxyConsole } from 'cutest'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user