@opendaw/lib-box 0.0.6
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/README.md +1 -0
- package/dist/address.d.ts +47 -0
- package/dist/address.d.ts.map +1 -0
- package/dist/address.js +133 -0
- package/dist/array.d.ts +19 -0
- package/dist/array.d.ts.map +1 -0
- package/dist/array.js +32 -0
- package/dist/box.d.ts +51 -0
- package/dist/box.d.ts.map +1 -0
- package/dist/box.js +122 -0
- package/dist/dispatchers.d.ts +16 -0
- package/dist/dispatchers.d.ts.map +1 -0
- package/dist/dispatchers.js +127 -0
- package/dist/editing.d.ts +21 -0
- package/dist/editing.d.ts.map +1 -0
- package/dist/editing.js +131 -0
- package/dist/field.d.ts +42 -0
- package/dist/field.d.ts.map +1 -0
- package/dist/field.js +80 -0
- package/dist/graph-edges.d.ts +16 -0
- package/dist/graph-edges.d.ts.map +1 -0
- package/dist/graph-edges.js +109 -0
- package/dist/graph.d.ts +55 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +262 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/object.d.ts +17 -0
- package/dist/object.d.ts.map +1 -0
- package/dist/object.js +19 -0
- package/dist/pointer-hub.d.ts +26 -0
- package/dist/pointer-hub.d.ts.map +1 -0
- package/dist/pointer-hub.js +110 -0
- package/dist/pointer.d.ts +32 -0
- package/dist/pointer.d.ts.map +1 -0
- package/dist/pointer.js +82 -0
- package/dist/primitive.d.ts +110 -0
- package/dist/primitive.d.ts.map +1 -0
- package/dist/primitive.js +152 -0
- package/dist/serializer.d.ts +7 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/serializer.js +29 -0
- package/dist/sync-source.d.ts +11 -0
- package/dist/sync-source.d.ts.map +1 -0
- package/dist/sync-source.js +72 -0
- package/dist/sync-target.d.ts +5 -0
- package/dist/sync-target.d.ts.map +1 -0
- package/dist/sync-target.js +40 -0
- package/dist/sync.d.ts +24 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +1 -0
- package/dist/updates.d.ts +70 -0
- package/dist/updates.d.ts.map +1 -0
- package/dist/updates.js +178 -0
- package/dist/vertex.d.ts +41 -0
- package/dist/vertex.d.ts.map +1 -0
- package/dist/vertex.js +1 -0
- package/package.json +33 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
import { Field, FieldConstruct } from "./field";
|
2
|
+
import { PointerTypes, UnreferenceableType } from "./pointer";
|
3
|
+
import { ByteArrayInput, ByteArrayOutput, DataInput, DataOutput, float, int, MutableObservableValue, Nullish, ObservableValue, Observer, Subscription } from "@opendaw/lib-std";
|
4
|
+
import { VertexVisitor } from "./vertex";
|
5
|
+
export type PrimitiveValues = float | int | string | boolean | Readonly<Int8Array>;
|
6
|
+
export declare enum PrimitiveType {
|
7
|
+
Boolean = "boolean",
|
8
|
+
Float32 = "float32",
|
9
|
+
Int32 = "int32",
|
10
|
+
String = "string",
|
11
|
+
Bytes = "bytes"
|
12
|
+
}
|
13
|
+
export interface ValueSerialization<V extends PrimitiveValues = PrimitiveValues> {
|
14
|
+
get type(): PrimitiveType;
|
15
|
+
encode(output: DataOutput, value: V): void;
|
16
|
+
decode(input: DataInput): V;
|
17
|
+
}
|
18
|
+
export declare const ValueSerialization: {
|
19
|
+
readonly boolean: {
|
20
|
+
readonly type: PrimitiveType.Boolean;
|
21
|
+
readonly encode: (output: DataOutput, value: boolean) => void;
|
22
|
+
readonly decode: (input: DataInput) => boolean;
|
23
|
+
};
|
24
|
+
readonly float32: {
|
25
|
+
readonly type: PrimitiveType.Float32;
|
26
|
+
readonly encode: (output: DataOutput, value: float) => void;
|
27
|
+
readonly decode: (input: DataInput) => float;
|
28
|
+
};
|
29
|
+
readonly int32: {
|
30
|
+
readonly type: PrimitiveType.Int32;
|
31
|
+
readonly encode: (output: DataOutput, value: int) => void;
|
32
|
+
readonly decode: (input: DataInput) => int;
|
33
|
+
};
|
34
|
+
readonly string: {
|
35
|
+
readonly type: PrimitiveType.String;
|
36
|
+
readonly encode: (output: DataOutput, value: string) => void;
|
37
|
+
readonly decode: (input: DataInput) => string;
|
38
|
+
};
|
39
|
+
readonly bytes: {
|
40
|
+
readonly type: PrimitiveType.Bytes;
|
41
|
+
readonly encode: (output: DataOutput, value: Readonly<Int8Array>) => void;
|
42
|
+
readonly decode: (input: DataInput) => Readonly<Int8Array>;
|
43
|
+
};
|
44
|
+
};
|
45
|
+
export declare abstract class PrimitiveField<V extends PrimitiveValues = PrimitiveValues, P extends PointerTypes = UnreferenceableType> extends Field<P, never> implements MutableObservableValue<V> {
|
46
|
+
#private;
|
47
|
+
protected constructor(field: FieldConstruct<P>, type: PrimitiveType, value: V);
|
48
|
+
accept<RETURN>(visitor: VertexVisitor<RETURN>): Nullish<RETURN>;
|
49
|
+
subscribe(observer: Observer<ObservableValue<V>>): Subscription;
|
50
|
+
catchupAndSubscribe(observer: Observer<ObservableValue<V>>): Subscription;
|
51
|
+
abstract serialization(): ValueSerialization<V>;
|
52
|
+
abstract equals(value: V): boolean;
|
53
|
+
abstract clamp(value: V): V;
|
54
|
+
get type(): PrimitiveType;
|
55
|
+
get initValue(): V;
|
56
|
+
setInitValue(value: V): void;
|
57
|
+
getValue(): V;
|
58
|
+
setValue(value: V): void;
|
59
|
+
writeValue(output: ByteArrayOutput, value: V): void;
|
60
|
+
readValue(input: ByteArrayInput): V;
|
61
|
+
reset(): void;
|
62
|
+
}
|
63
|
+
export declare class BooleanField<E extends PointerTypes = UnreferenceableType> extends PrimitiveField<boolean, E> {
|
64
|
+
static create<E extends PointerTypes = UnreferenceableType>(construct: FieldConstruct<E>, value?: boolean): BooleanField<E>;
|
65
|
+
private constructor();
|
66
|
+
toggle(): void;
|
67
|
+
serialization(): ValueSerialization<boolean>;
|
68
|
+
equals(value: boolean): boolean;
|
69
|
+
clamp(value: boolean): boolean;
|
70
|
+
read(input: DataInput): void;
|
71
|
+
write(output: DataOutput): void;
|
72
|
+
}
|
73
|
+
export declare class Float32Field<E extends PointerTypes = UnreferenceableType> extends PrimitiveField<float, E> {
|
74
|
+
static create<E extends PointerTypes = UnreferenceableType>(construct: FieldConstruct<E>, value?: float): Float32Field<E>;
|
75
|
+
private constructor();
|
76
|
+
serialization(): ValueSerialization<float>;
|
77
|
+
equals(value: float): boolean;
|
78
|
+
clamp(value: float): float;
|
79
|
+
read(input: DataInput): void;
|
80
|
+
write(output: DataOutput): void;
|
81
|
+
}
|
82
|
+
export declare class Int32Field<E extends PointerTypes = UnreferenceableType> extends PrimitiveField<int, E> {
|
83
|
+
static create<E extends PointerTypes = UnreferenceableType>(construct: FieldConstruct<E>, value?: int): Int32Field<E>;
|
84
|
+
private constructor();
|
85
|
+
serialization(): ValueSerialization<int>;
|
86
|
+
equals(value: int): boolean;
|
87
|
+
clamp(value: int): int;
|
88
|
+
read(input: DataInput): void;
|
89
|
+
write(output: DataOutput): void;
|
90
|
+
}
|
91
|
+
export declare class StringField<E extends PointerTypes = UnreferenceableType> extends PrimitiveField<string, E> {
|
92
|
+
static create<E extends PointerTypes = UnreferenceableType>(construct: FieldConstruct<E>, value?: string): StringField<E>;
|
93
|
+
private constructor();
|
94
|
+
serialization(): ValueSerialization<string>;
|
95
|
+
equals(value: string): boolean;
|
96
|
+
clamp(value: string): string;
|
97
|
+
read(input: DataInput): void;
|
98
|
+
write(output: DataOutput): void;
|
99
|
+
}
|
100
|
+
export declare class ByteArrayField<E extends PointerTypes = UnreferenceableType> extends PrimitiveField<Readonly<Int8Array>, E> {
|
101
|
+
#private;
|
102
|
+
static create<E extends PointerTypes = UnreferenceableType>(construct: FieldConstruct<E>, value?: Readonly<Int8Array>): ByteArrayField<E>;
|
103
|
+
private constructor();
|
104
|
+
serialization(): ValueSerialization<Readonly<Int8Array>>;
|
105
|
+
equals(value: Readonly<Int8Array>): boolean;
|
106
|
+
clamp(value: Readonly<Int8Array>): Readonly<Int8Array>;
|
107
|
+
read(input: DataInput): void;
|
108
|
+
write(output: DataOutput): void;
|
109
|
+
}
|
110
|
+
//# sourceMappingURL=primitive.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"primitive.d.ts","sourceRoot":"","sources":["../src/primitive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,MAAM,SAAS,CAAA;AAC7C,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAC,MAAM,WAAW,CAAA;AAC3D,OAAO,EAEH,cAAc,EACd,eAAe,EACf,SAAS,EACT,UAAU,EAEV,KAAK,EACL,GAAG,EAEH,sBAAsB,EACtB,OAAO,EACP,eAAe,EACf,QAAQ,EAER,YAAY,EACf,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAA;AAEtC,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAA;AAElF,oBAAY,aAAa;IACrB,OAAO,YAAY;IAAE,OAAO,YAAY;IAAE,KAAK,UAAU;IAAE,MAAM,WAAW;IAAE,KAAK,UAAU;CAChG;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe;IAC3E,IAAI,IAAI,IAAI,aAAa,CAAA;IACzB,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;IAC1C,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,CAAC,CAAA;CAC9B;AAED,eAAO,MAAM,kBAAkB;;;kCAGN,UAAU,SAAS,OAAO,KAAG,IAAI;iCAClC,SAAS,KAAG,OAAO;;;;kCAIlB,UAAU,SAAS,KAAK,KAAG,IAAI;iCAChC,SAAS,KAAG,KAAK;;;;kCAIhB,UAAU,SAAS,GAAG,KAAG,IAAI;iCAC9B,SAAS,KAAG,GAAG;;;;kCAId,UAAU,SAAS,MAAM,KAAG,IAAI;iCACjC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kBAAkB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACxD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,OAAO;IAG3C,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC;IACtD,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAK5B,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;CAKlC"}
|
@@ -0,0 +1,152 @@
|
|
1
|
+
import { Field } from "./field";
|
2
|
+
import { assert, Float, Integer, safeExecute } from "@opendaw/lib-std";
|
3
|
+
import { Propagation } from "./dispatchers";
|
4
|
+
export var PrimitiveType;
|
5
|
+
(function (PrimitiveType) {
|
6
|
+
PrimitiveType["Boolean"] = "boolean";
|
7
|
+
PrimitiveType["Float32"] = "float32";
|
8
|
+
PrimitiveType["Int32"] = "int32";
|
9
|
+
PrimitiveType["String"] = "string";
|
10
|
+
PrimitiveType["Bytes"] = "bytes";
|
11
|
+
})(PrimitiveType || (PrimitiveType = {}));
|
12
|
+
export const ValueSerialization = {
|
13
|
+
[PrimitiveType.Boolean]: {
|
14
|
+
type: PrimitiveType.Boolean,
|
15
|
+
encode: (output, value) => output.writeBoolean(value),
|
16
|
+
decode: (input) => input.readBoolean()
|
17
|
+
},
|
18
|
+
[PrimitiveType.Float32]: {
|
19
|
+
type: PrimitiveType.Float32,
|
20
|
+
encode: (output, value) => output.writeFloat(value),
|
21
|
+
decode: (input) => input.readFloat()
|
22
|
+
},
|
23
|
+
[PrimitiveType.Int32]: {
|
24
|
+
type: PrimitiveType.Int32,
|
25
|
+
encode: (output, value) => output.writeInt(value),
|
26
|
+
decode: (input) => input.readInt()
|
27
|
+
},
|
28
|
+
[PrimitiveType.String]: {
|
29
|
+
type: PrimitiveType.String,
|
30
|
+
encode: (output, value) => output.writeString(value),
|
31
|
+
decode: (input) => input.readString()
|
32
|
+
},
|
33
|
+
[PrimitiveType.Bytes]: {
|
34
|
+
type: PrimitiveType.Bytes,
|
35
|
+
encode: (output, value) => {
|
36
|
+
output.writeInt(value.length);
|
37
|
+
output.writeBytes(value);
|
38
|
+
},
|
39
|
+
decode: (input) => {
|
40
|
+
const array = new Int8Array(input.readInt());
|
41
|
+
input.readBytes(array);
|
42
|
+
return array;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
};
|
46
|
+
export class PrimitiveField extends Field {
|
47
|
+
#type;
|
48
|
+
#initValue;
|
49
|
+
#value;
|
50
|
+
constructor(field, type, value) {
|
51
|
+
super(field);
|
52
|
+
this.#type = type;
|
53
|
+
this.#initValue = this.clamp(value);
|
54
|
+
this.#value = this.#initValue;
|
55
|
+
}
|
56
|
+
accept(visitor) {
|
57
|
+
return safeExecute(visitor.visitPrimitiveField, this);
|
58
|
+
}
|
59
|
+
subscribe(observer) {
|
60
|
+
return this.graph.subscribeVertexUpdates(Propagation.This, this.address, () => observer(this));
|
61
|
+
}
|
62
|
+
catchupAndSubscribe(observer) {
|
63
|
+
observer(this);
|
64
|
+
return this.subscribe(observer);
|
65
|
+
}
|
66
|
+
get type() { return this.#type; }
|
67
|
+
get initValue() { return this.#initValue; }
|
68
|
+
setInitValue(value) {
|
69
|
+
assert(this.graph.constructingBox(), "Cannot change initial value at runtime");
|
70
|
+
this.setValue(this.#initValue = value);
|
71
|
+
}
|
72
|
+
getValue() { return this.#value; }
|
73
|
+
setValue(value) {
|
74
|
+
const oldValue = this.#value;
|
75
|
+
const newValue = this.clamp(value);
|
76
|
+
if (this.equals(newValue)) {
|
77
|
+
return;
|
78
|
+
}
|
79
|
+
this.#value = value;
|
80
|
+
this.graph.onPrimitiveValueUpdate(this, oldValue, newValue);
|
81
|
+
}
|
82
|
+
writeValue(output, value) { this.serialization().encode(output, value); }
|
83
|
+
readValue(input) { return this.serialization().decode(input); }
|
84
|
+
reset() { this.setValue(this.#initValue); }
|
85
|
+
}
|
86
|
+
export class BooleanField extends PrimitiveField {
|
87
|
+
static create(construct, value = false) {
|
88
|
+
return new BooleanField(construct, value);
|
89
|
+
}
|
90
|
+
constructor(construct, value) { super(construct, PrimitiveType.Boolean, value); }
|
91
|
+
toggle() { this.setValue(!this.getValue()); }
|
92
|
+
serialization() { return ValueSerialization[PrimitiveType.Boolean]; }
|
93
|
+
equals(value) { return this.getValue() === value; }
|
94
|
+
clamp(value) { return value; }
|
95
|
+
read(input) { this.setValue(input.readBoolean()); }
|
96
|
+
write(output) { output.writeBoolean(this.getValue()); }
|
97
|
+
}
|
98
|
+
export class Float32Field extends PrimitiveField {
|
99
|
+
static create(construct, value = 0.0) {
|
100
|
+
return new Float32Field(construct, value);
|
101
|
+
}
|
102
|
+
constructor(construct, value) { super(construct, PrimitiveType.Float32, value); }
|
103
|
+
serialization() { return ValueSerialization[PrimitiveType.Float32]; }
|
104
|
+
equals(value) { return this.getValue() === value; }
|
105
|
+
clamp(value) { return Float.toFloat32(value); }
|
106
|
+
read(input) { this.setValue(input.readFloat()); }
|
107
|
+
write(output) { output.writeFloat(this.getValue()); }
|
108
|
+
}
|
109
|
+
export class Int32Field extends PrimitiveField {
|
110
|
+
static create(construct, value = 0) {
|
111
|
+
return new Int32Field(construct, value);
|
112
|
+
}
|
113
|
+
constructor(construct, value) { super(construct, PrimitiveType.Int32, value); }
|
114
|
+
serialization() { return ValueSerialization[PrimitiveType.Int32]; }
|
115
|
+
equals(value) { return this.getValue() === value; }
|
116
|
+
clamp(value) { return Integer.toInt(value); }
|
117
|
+
read(input) { this.setValue(input.readInt()); }
|
118
|
+
write(output) { output.writeInt(this.getValue()); }
|
119
|
+
}
|
120
|
+
export class StringField extends PrimitiveField {
|
121
|
+
static create(construct, value = "") {
|
122
|
+
return new StringField(construct, value);
|
123
|
+
}
|
124
|
+
constructor(construct, value) { super(construct, PrimitiveType.String, value); }
|
125
|
+
serialization() { return ValueSerialization[PrimitiveType.String]; }
|
126
|
+
equals(value) { return this.getValue() === value; }
|
127
|
+
clamp(value) { return value; }
|
128
|
+
read(input) { this.setValue(input.readString()); }
|
129
|
+
write(output) { output.writeString(this.getValue()); }
|
130
|
+
}
|
131
|
+
export class ByteArrayField extends PrimitiveField {
|
132
|
+
static create(construct, value = this.#empty) {
|
133
|
+
return new ByteArrayField(construct, value);
|
134
|
+
}
|
135
|
+
static #empty = Object.freeze(new Int8Array(0));
|
136
|
+
constructor(construct, value) { super(construct, PrimitiveType.Bytes, value); }
|
137
|
+
serialization() { return ValueSerialization[PrimitiveType.Bytes]; }
|
138
|
+
equals(value) {
|
139
|
+
return this.getValue().length === value.length && this.getValue().every((x, index) => value[index] === x);
|
140
|
+
}
|
141
|
+
clamp(value) { return value; }
|
142
|
+
read(input) {
|
143
|
+
const bytes = new Int8Array(input.readInt());
|
144
|
+
input.readBytes(bytes);
|
145
|
+
this.setValue(bytes);
|
146
|
+
}
|
147
|
+
write(output) {
|
148
|
+
const bytes = this.getValue();
|
149
|
+
output.writeInt(bytes.length);
|
150
|
+
output.writeBytes(bytes);
|
151
|
+
}
|
152
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Fields } from "./field";
|
2
|
+
import { DataInput, DataOutput } from "@opendaw/lib-std";
|
3
|
+
export declare namespace Serializer {
|
4
|
+
const writeFields: <FIELDS extends Fields>(output: DataOutput, fields: FIELDS) => void;
|
5
|
+
const readFields: <FIELDS extends Fields>(input: DataInput, fields: FIELDS) => void;
|
6
|
+
}
|
7
|
+
//# sourceMappingURL=serializer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAC,MAAM,SAAS,CAAA;AACxC,OAAO,EAA0C,SAAS,EAAE,UAAU,EAAC,MAAM,kBAAkB,CAAA;AAE/F,yBAAiB,UAAU,CAAC;IAEjB,MAAM,WAAW,GAAI,MAAM,SAAS,MAAM,EAAE,QAAQ,UAAU,EAAE,QAAQ,MAAM,SAYpF,CAAA;IAEM,MAAM,UAAU,GAAI,MAAM,SAAS,MAAM,EAAE,OAAO,SAAS,EAAE,QAAQ,MAAM,SAUjF,CAAA;CACJ"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { assert, ByteArrayInput, ByteArrayOutput } from "@opendaw/lib-std";
|
2
|
+
export var Serializer;
|
3
|
+
(function (Serializer) {
|
4
|
+
const MAGIC_HEADER = 0x464c4453;
|
5
|
+
Serializer.writeFields = (output, fields) => {
|
6
|
+
const entries = Object.entries(fields);
|
7
|
+
output.writeInt(MAGIC_HEADER);
|
8
|
+
output.writeShort(entries.length);
|
9
|
+
entries.forEach(([key, field]) => {
|
10
|
+
const bytes = ByteArrayOutput.create();
|
11
|
+
field.write(bytes);
|
12
|
+
const buffer = new Int8Array(bytes.toArrayBuffer());
|
13
|
+
output.writeShort(Number(key));
|
14
|
+
output.writeInt(buffer.length);
|
15
|
+
output.writeBytes(buffer);
|
16
|
+
});
|
17
|
+
};
|
18
|
+
Serializer.readFields = (input, fields) => {
|
19
|
+
assert(input.readInt() === MAGIC_HEADER, "Serializer header is corrupt");
|
20
|
+
const numFields = input.readShort();
|
21
|
+
for (let fieldIndex = 0; fieldIndex < numFields; fieldIndex++) {
|
22
|
+
const key = input.readShort();
|
23
|
+
const byteLength = input.readInt();
|
24
|
+
const bytes = new Int8Array(byteLength);
|
25
|
+
input.readBytes(bytes);
|
26
|
+
fields[key]?.read(new ByteArrayInput(bytes.buffer));
|
27
|
+
}
|
28
|
+
};
|
29
|
+
})(Serializer || (Serializer = {}));
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Terminable } from "@opendaw/lib-std";
|
2
|
+
import { Messenger } from "@opendaw/lib-runtime";
|
3
|
+
import { BoxGraph } from "./graph";
|
4
|
+
export declare class SyncSource<M> implements Terminable {
|
5
|
+
#private;
|
6
|
+
static readonly DEBUG_CHECKSUM = false;
|
7
|
+
constructor(graph: BoxGraph<M>, messenger: Messenger, initialize?: boolean);
|
8
|
+
checksum(value: Int8Array): Promise<void>;
|
9
|
+
terminate(): void;
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=sync-source.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sync-source.d.ts","sourceRoot":"","sources":["../src/sync-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,UAAU,EAAa,MAAM,kBAAkB,CAAA;AACjF,OAAO,EAAe,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAA;AAIhC,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,UAAU;;IAC5C,MAAM,CAAC,QAAQ,CAAC,cAAc,SAAQ;gBAK1B,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO;IAkE1E,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IACzC,SAAS;CACZ"}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import { Arrays, EmptyExec, panic, Terminator } from "@opendaw/lib-std";
|
2
|
+
import { Communicator } from "@opendaw/lib-runtime";
|
3
|
+
export class SyncSource {
|
4
|
+
static DEBUG_CHECKSUM = false;
|
5
|
+
#terminator;
|
6
|
+
#caller;
|
7
|
+
constructor(graph, messenger, initialize) {
|
8
|
+
this.#terminator = new Terminator();
|
9
|
+
this.#caller = Communicator.sender(messenger, ({ dispatchAndForget, dispatchAndReturn }) => new class {
|
10
|
+
sendUpdates(updates) {
|
11
|
+
dispatchAndForget(this.sendUpdates, updates);
|
12
|
+
}
|
13
|
+
checksum(value) {
|
14
|
+
return dispatchAndReturn(this.checksum, value);
|
15
|
+
}
|
16
|
+
});
|
17
|
+
if (initialize === true) {
|
18
|
+
const boxes = graph.boxes();
|
19
|
+
if (boxes.length > 0) {
|
20
|
+
this.#caller.sendUpdates(boxes.map(box => ({ type: "new", name: box.name, uuid: box.address.uuid, buffer: box.toArrayBuffer() })));
|
21
|
+
}
|
22
|
+
}
|
23
|
+
const updates = [];
|
24
|
+
this.#terminator.own(graph.subscribeTransaction({
|
25
|
+
onBeginTransaction: EmptyExec,
|
26
|
+
onEndTransaction: () => {
|
27
|
+
this.#caller.sendUpdates(updates);
|
28
|
+
if (SyncSource.DEBUG_CHECKSUM) {
|
29
|
+
this.#caller.checksum(graph.checksum()).then(EmptyExec, (reason) => panic(reason));
|
30
|
+
}
|
31
|
+
Arrays.clear(updates);
|
32
|
+
}
|
33
|
+
}));
|
34
|
+
this.#terminator.own(graph.subscribeToAllUpdatesImmediate({
|
35
|
+
onUpdate: (update) => {
|
36
|
+
if (update.type === "new") {
|
37
|
+
updates.push({
|
38
|
+
type: "new",
|
39
|
+
name: update.name,
|
40
|
+
uuid: update.uuid,
|
41
|
+
buffer: update.settings
|
42
|
+
});
|
43
|
+
}
|
44
|
+
else if (update.type === "primitive") {
|
45
|
+
updates.push({
|
46
|
+
type: "update-primitive",
|
47
|
+
address: update.address.decompose(),
|
48
|
+
value: update.newValue
|
49
|
+
});
|
50
|
+
}
|
51
|
+
else if (update.type === "pointer") {
|
52
|
+
updates.push({
|
53
|
+
type: "update-pointer",
|
54
|
+
address: update.address.decompose(),
|
55
|
+
target: update.newValue.unwrapOrNull()?.decompose()
|
56
|
+
});
|
57
|
+
}
|
58
|
+
else if (update.type === "delete") {
|
59
|
+
updates.push({
|
60
|
+
type: "delete",
|
61
|
+
uuid: update.uuid
|
62
|
+
});
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
return panic(`Unknown ${update}`);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}));
|
69
|
+
}
|
70
|
+
checksum(value) { return this.#caller.checksum(value); }
|
71
|
+
terminate() { this.#terminator.terminate(); }
|
72
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { Terminable } from "@opendaw/lib-std";
|
2
|
+
import { Messenger } from "@opendaw/lib-runtime";
|
3
|
+
import { BoxGraph } from "./graph";
|
4
|
+
export declare const createSyncTarget: <M>(graph: BoxGraph<M>, messenger: Messenger) => Terminable;
|
5
|
+
//# sourceMappingURL=sync-target.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sync-target.d.ts","sourceRoot":"","sources":["../src/sync-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,UAAU,EAAO,MAAM,kBAAkB,CAAA;AAC5F,OAAO,EAAe,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAA;AAMhC,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,WAAW,SAAS,KAAG,UAiC9E,CAAA"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { Arrays, ByteArrayInput, isDefined, Option, UUID } from "@opendaw/lib-std";
|
2
|
+
import { Communicator } from "@opendaw/lib-runtime";
|
3
|
+
import { Address } from "./address";
|
4
|
+
export const createSyncTarget = (graph, messenger) => {
|
5
|
+
return Communicator.executor(messenger, new class {
|
6
|
+
sendUpdates(updates) {
|
7
|
+
graph.beginTransaction();
|
8
|
+
updates.forEach(update => {
|
9
|
+
const type = update.type;
|
10
|
+
if (type === "new") {
|
11
|
+
graph.createBox(update.name, update.uuid, box => box.read(new ByteArrayInput(update.buffer)));
|
12
|
+
}
|
13
|
+
else if (type === "update-primitive") {
|
14
|
+
graph.findVertex(Address.reconstruct(update.address))
|
15
|
+
.unwrap(() => `Could not find primitive field ${update.address}`)
|
16
|
+
.setValue(update.value);
|
17
|
+
}
|
18
|
+
else if (type === "update-pointer") {
|
19
|
+
graph.findVertex(Address.reconstruct(update.address))
|
20
|
+
.unwrap(() => `Could not find pointer field ${update.address}`)
|
21
|
+
.targetAddress = isDefined(update.target)
|
22
|
+
? Option.wrap(Address.reconstruct(update.target))
|
23
|
+
: Option.None;
|
24
|
+
}
|
25
|
+
else if (update.type === "delete") {
|
26
|
+
graph.unstageBox(graph.findBox(update.uuid).unwrap(() => `Could not find box ${UUID.toString(update.uuid)}`));
|
27
|
+
}
|
28
|
+
});
|
29
|
+
graph.endTransaction();
|
30
|
+
}
|
31
|
+
checksum(value) {
|
32
|
+
if (Arrays.equals(graph.checksum(), value)) {
|
33
|
+
return Promise.resolve();
|
34
|
+
}
|
35
|
+
else {
|
36
|
+
return Promise.reject("Checksum mismatch");
|
37
|
+
}
|
38
|
+
}
|
39
|
+
});
|
40
|
+
};
|
package/dist/sync.d.ts
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
import { Nullish, UUID } from "@opendaw/lib-std";
|
2
|
+
import { AddressLayout } from "./address";
|
3
|
+
export type UpdateTask<M> = {
|
4
|
+
type: "new";
|
5
|
+
name: keyof M;
|
6
|
+
uuid: UUID.Format;
|
7
|
+
buffer: ArrayBufferLike;
|
8
|
+
} | {
|
9
|
+
type: "update-primitive";
|
10
|
+
address: AddressLayout;
|
11
|
+
value: unknown;
|
12
|
+
} | {
|
13
|
+
type: "update-pointer";
|
14
|
+
address: AddressLayout;
|
15
|
+
target: Nullish<AddressLayout>;
|
16
|
+
} | {
|
17
|
+
type: "delete";
|
18
|
+
uuid: UUID.Format;
|
19
|
+
};
|
20
|
+
export interface Synchronization<M> {
|
21
|
+
sendUpdates(updates: ReadonlyArray<UpdateTask<M>>): void;
|
22
|
+
checksum(value: Int8Array): Promise<void>;
|
23
|
+
}
|
24
|
+
//# sourceMappingURL=sync.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAC,aAAa,EAAC,MAAM,WAAW,CAAA;AAEvC,MAAM,MAAM,UAAU,CAAC,CAAC,IAClB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,GAC1E;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,OAAO,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GACpE;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;CAAE,GAClF;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAA;CAAE,CAAA;AAE3C,MAAM,WAAW,eAAe,CAAC,CAAC;IAC9B,WAAW,CAAC,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;IACxD,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5C"}
|
package/dist/sync.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import { PrimitiveField, PrimitiveValues, ValueSerialization } from "./primitive";
|
2
|
+
import { Address } from "./address";
|
3
|
+
import { PointerField } from "./pointer";
|
4
|
+
import { DataInput, DataOutput, Option, UUID } from "@opendaw/lib-std";
|
5
|
+
import { BoxGraph } from "./graph";
|
6
|
+
export type Update = NewUpdate | PrimitiveUpdate | PointerUpdate | DeleteUpdate;
|
7
|
+
export declare namespace Updates {
|
8
|
+
const decode: (input: DataInput) => ReadonlyArray<Update>;
|
9
|
+
}
|
10
|
+
interface Modification {
|
11
|
+
forward(graph: BoxGraph): void;
|
12
|
+
inverse(graph: BoxGraph): void;
|
13
|
+
write(output: DataOutput): void;
|
14
|
+
}
|
15
|
+
export declare class NewUpdate implements Modification {
|
16
|
+
#private;
|
17
|
+
readonly type = "new";
|
18
|
+
constructor(uuid: UUID.Format, name: string, settings: ArrayBufferLike);
|
19
|
+
get uuid(): UUID.Format;
|
20
|
+
get name(): string;
|
21
|
+
get settings(): ArrayBufferLike;
|
22
|
+
forward(graph: BoxGraph): void;
|
23
|
+
inverse(graph: BoxGraph): void;
|
24
|
+
write(output: DataOutput): void;
|
25
|
+
toString(): string;
|
26
|
+
toDebugString(_graph: BoxGraph): string;
|
27
|
+
}
|
28
|
+
export type FieldUpdate = PrimitiveUpdate | PointerUpdate;
|
29
|
+
export declare class PrimitiveUpdate<V extends PrimitiveValues = PrimitiveValues> implements Modification {
|
30
|
+
#private;
|
31
|
+
readonly type = "primitive";
|
32
|
+
constructor(address: Address, serialization: ValueSerialization<V>, oldValue: V, newValue: V);
|
33
|
+
get address(): Address;
|
34
|
+
get oldValue(): V;
|
35
|
+
get newValue(): V;
|
36
|
+
matches(field: PrimitiveField): boolean;
|
37
|
+
inverse(graph: BoxGraph): void;
|
38
|
+
forward(graph: BoxGraph): void;
|
39
|
+
field(graph: BoxGraph): PrimitiveField<V>;
|
40
|
+
write(output: DataOutput): void;
|
41
|
+
toString(): string;
|
42
|
+
}
|
43
|
+
export declare class PointerUpdate implements Modification {
|
44
|
+
#private;
|
45
|
+
readonly type = "pointer";
|
46
|
+
constructor(address: Address, oldValue: Option<Address>, newValue: Option<Address>);
|
47
|
+
get address(): Address;
|
48
|
+
get oldValue(): Option<Address>;
|
49
|
+
get newValue(): Option<Address>;
|
50
|
+
matches(field: PointerField): boolean;
|
51
|
+
inverse(graph: BoxGraph): void;
|
52
|
+
forward(graph: BoxGraph): void;
|
53
|
+
field(graph: BoxGraph): PointerField;
|
54
|
+
write(output: DataOutput): void;
|
55
|
+
toString(): string;
|
56
|
+
}
|
57
|
+
export declare class DeleteUpdate implements Modification {
|
58
|
+
#private;
|
59
|
+
readonly type = "delete";
|
60
|
+
constructor(uuid: UUID.Format, name: string, settings: ArrayBufferLike);
|
61
|
+
get uuid(): UUID.Format;
|
62
|
+
get name(): string;
|
63
|
+
get settings(): ArrayBufferLike;
|
64
|
+
forward(graph: BoxGraph): void;
|
65
|
+
inverse(graph: BoxGraph): void;
|
66
|
+
write(output: DataOutput): void;
|
67
|
+
toString(): string;
|
68
|
+
}
|
69
|
+
export {};
|
70
|
+
//# sourceMappingURL=updates.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updates.d.ts","sourceRoot":"","sources":["../src/updates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAiB,eAAe,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAA;AAC9F,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,EAAC,YAAY,EAAC,MAAM,WAAW,CAAA;AACtC,OAAO,EAAyB,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAC5F,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAA;AAEhC,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,eAAe,GAAG,aAAa,GAAG,YAAY,CAAA;AAE/E,yBAAiB,OAAO,CAAC;IACd,MAAM,MAAM,GAAI,OAAO,SAAS,KAAG,aAAa,CAAC,MAAM,CAmC7D,CAAA;CACJ;AAED,UAAU,YAAY;IAClB,OAAO,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC9B,OAAO,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAA;CAClC;AAED,qBAAa,SAAU,YAAW,YAAY;;IAC1C,QAAQ,CAAC,IAAI,SAAQ;gBAMT,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe;IAMtE,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,CAAoB;IAC3C,IAAI,IAAI,IAAI,MAAM,CAAoB;IACtC,IAAI,QAAQ,IAAI,eAAe,CA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