fluid-framework 2.4.0-297385 → 2.4.0-299707
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/api-report/fluid-framework.alpha.api.md +103 -0
- package/dist/alpha.d.ts +21 -1
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/lib/alpha.d.ts +21 -1
- package/lib/index.d.ts +22 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +24 -1
- package/lib/index.js.map +1 -1
- package/package.json +14 -14
- package/src/index.ts +29 -1
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
+
// @alpha
|
|
8
|
+
export function adaptEnum<TScope extends string, const TEnum extends Record<string, string | number>>(factory: SchemaFactory<TScope>, members: TEnum): (<TValue extends TEnum[keyof TEnum]>(value: TValue) => TreeNode & {
|
|
9
|
+
readonly value: TValue;
|
|
10
|
+
}) & { readonly [Property in keyof TEnum]: TreeNodeSchemaClass<ScopedSchemaName<TScope, TEnum[Property]>, NodeKind.Object, TreeNode & {
|
|
11
|
+
readonly value: TEnum[Property];
|
|
12
|
+
}, never, true, unknown> & (new () => TreeNode & {
|
|
13
|
+
readonly value: TEnum[Property];
|
|
14
|
+
}); };
|
|
15
|
+
|
|
7
16
|
// @public
|
|
8
17
|
export type AllowedTypes = readonly LazyItem<TreeNodeSchema>[];
|
|
9
18
|
|
|
@@ -34,6 +43,12 @@ export interface CommitMetadata {
|
|
|
34
43
|
readonly kind: CommitKind;
|
|
35
44
|
}
|
|
36
45
|
|
|
46
|
+
// @alpha
|
|
47
|
+
export function comparePersistedSchema(persisted: JsonCompatible, view: JsonCompatible, options: ICodecOptions, canInitialize: boolean): SchemaCompatibilityStatus;
|
|
48
|
+
|
|
49
|
+
// @alpha
|
|
50
|
+
export function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree>;
|
|
51
|
+
|
|
37
52
|
// @public
|
|
38
53
|
export enum ConnectionState {
|
|
39
54
|
CatchingUp = 1,
|
|
@@ -66,6 +81,15 @@ export interface ContainerSchema {
|
|
|
66
81
|
interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider"> {
|
|
67
82
|
}
|
|
68
83
|
|
|
84
|
+
// @alpha
|
|
85
|
+
export function enumFromStrings<TScope extends string, const Members extends string>(factory: SchemaFactory<TScope>, members: readonly Members[]): (<TValue extends Members>(value: TValue) => TreeNode & {
|
|
86
|
+
readonly value: TValue;
|
|
87
|
+
}) & Record<Members, TreeNodeSchemaClass<ScopedSchemaName<TScope, Members>, NodeKind.Object, TreeNode & {
|
|
88
|
+
readonly value: Members;
|
|
89
|
+
}, never, true, unknown> & (new () => TreeNode & {
|
|
90
|
+
readonly value: Members;
|
|
91
|
+
})>;
|
|
92
|
+
|
|
69
93
|
// @public @sealed
|
|
70
94
|
export abstract class ErasedType<out Name = unknown> {
|
|
71
95
|
static [Symbol.hasInstance](value: never): value is never;
|
|
@@ -75,6 +99,9 @@ export abstract class ErasedType<out Name = unknown> {
|
|
|
75
99
|
// @public
|
|
76
100
|
type ExtractItemType<Item extends LazyItem> = Item extends () => infer Result ? Result : Item;
|
|
77
101
|
|
|
102
|
+
// @alpha
|
|
103
|
+
export function extractPersistedSchema(schema: ImplicitFieldSchema): JsonCompatible;
|
|
104
|
+
|
|
78
105
|
// @public
|
|
79
106
|
type FieldHasDefault<T extends ImplicitFieldSchema> = T extends FieldSchema<FieldKind.Optional | FieldKind.Identifier> ? true : false;
|
|
80
107
|
|
|
@@ -141,6 +168,18 @@ export type FluidObject<T = unknown> = {
|
|
|
141
168
|
// @public
|
|
142
169
|
export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
|
|
143
170
|
|
|
171
|
+
// @alpha
|
|
172
|
+
export interface ForestOptions {
|
|
173
|
+
readonly forest?: ForestType;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// @alpha
|
|
177
|
+
export enum ForestType {
|
|
178
|
+
Expensive = 2,
|
|
179
|
+
Optimized = 1,
|
|
180
|
+
Reference = 0
|
|
181
|
+
}
|
|
182
|
+
|
|
144
183
|
// @alpha
|
|
145
184
|
export function getBranch(tree: ITree): TreeBranch;
|
|
146
185
|
|
|
@@ -150,6 +189,11 @@ export function getBranch(view: TreeView<ImplicitFieldSchema>): TreeBranch;
|
|
|
150
189
|
// @alpha
|
|
151
190
|
export function getJsonSchema(schema: ImplicitFieldSchema): JsonTreeSchema;
|
|
152
191
|
|
|
192
|
+
// @alpha
|
|
193
|
+
export interface ICodecOptions {
|
|
194
|
+
readonly jsonValidator: JsonValidator;
|
|
195
|
+
}
|
|
196
|
+
|
|
153
197
|
// @public
|
|
154
198
|
export interface IConnection {
|
|
155
199
|
readonly id: string;
|
|
@@ -552,6 +596,14 @@ export interface JsonArrayNodeSchema extends JsonNodeSchemaBase<NodeKind.Array,
|
|
|
552
596
|
readonly items: JsonFieldSchema;
|
|
553
597
|
}
|
|
554
598
|
|
|
599
|
+
// @alpha
|
|
600
|
+
export type JsonCompatible = string | number | boolean | null | JsonCompatible[] | JsonCompatibleObject;
|
|
601
|
+
|
|
602
|
+
// @alpha
|
|
603
|
+
export type JsonCompatibleObject = {
|
|
604
|
+
[P in string]?: JsonCompatible;
|
|
605
|
+
};
|
|
606
|
+
|
|
555
607
|
// @alpha @sealed
|
|
556
608
|
export type JsonFieldSchema = {
|
|
557
609
|
readonly description?: string | undefined;
|
|
@@ -609,6 +661,11 @@ export type JsonTreeSchema = JsonFieldSchema & {
|
|
|
609
661
|
readonly $defs: Record<JsonSchemaId, JsonNodeSchema>;
|
|
610
662
|
};
|
|
611
663
|
|
|
664
|
+
// @alpha
|
|
665
|
+
export interface JsonValidator {
|
|
666
|
+
compile<Schema extends TSchema>(schema: Schema): SchemaValidationFunction<Schema>;
|
|
667
|
+
}
|
|
668
|
+
|
|
612
669
|
// @public
|
|
613
670
|
export type LazyItem<Item = unknown> = Item | (() => Item);
|
|
614
671
|
|
|
@@ -670,6 +727,9 @@ export enum NodeKind {
|
|
|
670
727
|
Object = 2
|
|
671
728
|
}
|
|
672
729
|
|
|
730
|
+
// @alpha
|
|
731
|
+
export const noopValidator: JsonValidator;
|
|
732
|
+
|
|
673
733
|
// @public
|
|
674
734
|
type ObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = {
|
|
675
735
|
-readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField<T[Property]> : unknown;
|
|
@@ -793,6 +853,11 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
793
853
|
readonly string: TreeNodeSchema<"com.fluidframework.leaf.string", NodeKind.Leaf, string, string>;
|
|
794
854
|
}
|
|
795
855
|
|
|
856
|
+
// @alpha
|
|
857
|
+
export interface SchemaValidationFunction<Schema extends TSchema> {
|
|
858
|
+
check(data: unknown): data is Static<Schema>;
|
|
859
|
+
}
|
|
860
|
+
|
|
796
861
|
// @public
|
|
797
862
|
type ScopedSchemaName<TScope extends string | undefined, TName extends number | string> = TScope extends undefined ? `${TName}` : `${TScope}.${TName}`;
|
|
798
863
|
|
|
@@ -804,6 +869,32 @@ export interface SharedObjectKind<out TSharedObject = unknown> extends ErasedTyp
|
|
|
804
869
|
// @public
|
|
805
870
|
export const SharedTree: SharedObjectKind<ITree>;
|
|
806
871
|
|
|
872
|
+
// @alpha
|
|
873
|
+
export interface SharedTreeFormatOptions {
|
|
874
|
+
formatVersion: SharedTreeFormatVersion[keyof SharedTreeFormatVersion];
|
|
875
|
+
treeEncodeType: TreeCompressionStrategy;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
// @alpha
|
|
879
|
+
export const SharedTreeFormatVersion: {
|
|
880
|
+
readonly v1: 1;
|
|
881
|
+
readonly v2: 2;
|
|
882
|
+
readonly v3: 3;
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
// @alpha
|
|
886
|
+
export type SharedTreeFormatVersion = typeof SharedTreeFormatVersion;
|
|
887
|
+
|
|
888
|
+
// @alpha
|
|
889
|
+
export type SharedTreeOptions = Partial<ICodecOptions> & Partial<SharedTreeFormatOptions> & ForestOptions;
|
|
890
|
+
|
|
891
|
+
// @alpha
|
|
892
|
+
export function singletonSchema<TScope extends string, TName extends string | number>(factory: SchemaFactory<TScope, TName>, name: TName): TreeNodeSchemaClass<ScopedSchemaName<TScope, TName>, NodeKind.Object, TreeNode & {
|
|
893
|
+
readonly value: TName;
|
|
894
|
+
}, never, true, unknown> & (new () => TreeNode & {
|
|
895
|
+
readonly value: TName;
|
|
896
|
+
});
|
|
897
|
+
|
|
807
898
|
// @public
|
|
808
899
|
export interface Tagged<V, T extends string = string> {
|
|
809
900
|
// (undocumented)
|
|
@@ -894,6 +985,12 @@ export interface TreeChangeEventsBeta<TNode extends TreeNode = TreeNode> extends
|
|
|
894
985
|
nodeChanged: (data: NodeChangedData<TNode> & (TNode extends WithType<string, NodeKind.Map | NodeKind.Object> ? Required<Pick<NodeChangedData<TNode>, "changedProperties">> : unknown)) => void;
|
|
895
986
|
}
|
|
896
987
|
|
|
988
|
+
// @alpha
|
|
989
|
+
export enum TreeCompressionStrategy {
|
|
990
|
+
Compressed = 0,
|
|
991
|
+
Uncompressed = 1
|
|
992
|
+
}
|
|
993
|
+
|
|
897
994
|
// @public
|
|
898
995
|
export type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> = TSchema extends FieldSchema<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind, false> : TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes<TSchema> : unknown;
|
|
899
996
|
|
|
@@ -1013,6 +1110,12 @@ export interface TreeViewEvents {
|
|
|
1013
1110
|
schemaChanged(): void;
|
|
1014
1111
|
}
|
|
1015
1112
|
|
|
1113
|
+
// @alpha
|
|
1114
|
+
export const typeboxValidator: JsonValidator;
|
|
1115
|
+
|
|
1116
|
+
// @alpha
|
|
1117
|
+
export function typedObjectValues<TKey extends string, TValues>(object: Record<TKey, TValues>): TValues[];
|
|
1118
|
+
|
|
1016
1119
|
// @public @deprecated
|
|
1017
1120
|
const typeNameSymbol: unique symbol;
|
|
1018
1121
|
|
package/dist/alpha.d.ts
CHANGED
|
@@ -133,7 +133,12 @@ export {
|
|
|
133
133
|
|
|
134
134
|
// @alpha APIs
|
|
135
135
|
FixRecursiveArraySchema,
|
|
136
|
+
ForestOptions,
|
|
137
|
+
ForestType,
|
|
138
|
+
ICodecOptions,
|
|
136
139
|
JsonArrayNodeSchema,
|
|
140
|
+
JsonCompatible,
|
|
141
|
+
JsonCompatibleObject,
|
|
137
142
|
JsonFieldSchema,
|
|
138
143
|
JsonLeafNodeSchema,
|
|
139
144
|
JsonLeafSchemaType,
|
|
@@ -146,8 +151,23 @@ export {
|
|
|
146
151
|
JsonSchemaRef,
|
|
147
152
|
JsonSchemaType,
|
|
148
153
|
JsonTreeSchema,
|
|
154
|
+
JsonValidator,
|
|
155
|
+
SchemaValidationFunction,
|
|
156
|
+
SharedTreeFormatOptions,
|
|
157
|
+
SharedTreeFormatVersion,
|
|
158
|
+
SharedTreeOptions,
|
|
149
159
|
TreeBranch,
|
|
150
160
|
TreeBranchFork,
|
|
161
|
+
TreeCompressionStrategy,
|
|
162
|
+
adaptEnum,
|
|
163
|
+
comparePersistedSchema,
|
|
164
|
+
configuredSharedTree,
|
|
165
|
+
enumFromStrings,
|
|
166
|
+
extractPersistedSchema,
|
|
151
167
|
getBranch,
|
|
152
|
-
getJsonSchema
|
|
168
|
+
getJsonSchema,
|
|
169
|
+
noopValidator,
|
|
170
|
+
singletonSchema,
|
|
171
|
+
typeboxValidator,
|
|
172
|
+
typedObjectValues
|
|
153
173
|
} from "./index.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export type { isFluidHandle } from "@fluidframework/runtime-utils";
|
|
|
20
20
|
export * from "@fluidframework/tree/alpha";
|
|
21
21
|
import type { SharedObjectKind } from "@fluidframework/shared-object-base";
|
|
22
22
|
import type { ITree } from "@fluidframework/tree";
|
|
23
|
+
import { type SharedTreeOptions } from "@fluidframework/tree/internal";
|
|
23
24
|
/**
|
|
24
25
|
* A hierarchical data structure for collaboratively editing strongly typed JSON-like trees
|
|
25
26
|
* of objects, arrays, and other data types.
|
|
@@ -31,6 +32,27 @@ import type { ITree } from "@fluidframework/tree";
|
|
|
31
32
|
* @public
|
|
32
33
|
*/
|
|
33
34
|
export declare const SharedTree: SharedObjectKind<ITree>;
|
|
35
|
+
/**
|
|
36
|
+
* {@link SharedTree} but allowing a non-default configuration.
|
|
37
|
+
* @remarks
|
|
38
|
+
* This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import {
|
|
42
|
+
* ForestType,
|
|
43
|
+
* TreeCompressionStrategy,
|
|
44
|
+
* configuredSharedTree,
|
|
45
|
+
* typeboxValidator,
|
|
46
|
+
* } from "@fluid-framework/alpha";
|
|
47
|
+
* const SharedTree = configuredSharedTree({
|
|
48
|
+
* forest: ForestType.Reference,
|
|
49
|
+
* jsonValidator: typeboxValidator,
|
|
50
|
+
* treeEncodeType: TreeCompressionStrategy.Uncompressed,
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
* @alpha
|
|
54
|
+
*/
|
|
55
|
+
export declare function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree>;
|
|
34
56
|
export type { IDirectory, IDirectoryEvents, IDirectoryValueChanged, ISharedDirectory, ISharedDirectoryEvents, ISharedMap, ISharedMapEvents, IValueChanged, } from "@fluidframework/map/internal";
|
|
35
57
|
export { SharedDirectory, SharedMap } from "@fluidframework/map/internal";
|
|
36
58
|
export type { DeserializeCallback, InteriorSequencePlace, IInterval, IIntervalCollectionEvent, IIntervalCollection, IntervalIndex, IntervalStickiness, ISequenceDeltaRange, ISerializableInterval, ISerializedInterval, ISharedIntervalCollection, ISharedSegmentSequenceEvents, ISharedString, SequencePlace, SharedStringSegment, Side, ISharedSegmentSequence, } from "@fluidframework/sequence/internal";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAMH,YAAY,EACX,eAAe,IAAI,mBAAmB,EAAE,0CAA0C;AAClF,uBAAuB,GACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,YAAY,EACX,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,GACN,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EACX,UAAU,EACV,cAAc,EACd,WAAW,EACX,MAAM,EACN,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,8BAA8B,EAC9B,MAAM,EACN,4BAA4B,EAC5B,WAAW,EAAE,wBAAwB;AACrC,uBAAuB,GACvB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAKnE,cAAc,4BAA4B,CAAC;AAQ3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAMH,YAAY,EACX,eAAe,IAAI,mBAAmB,EAAE,0CAA0C;AAClF,uBAAuB,GACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,YAAY,EACX,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,GACN,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EACX,UAAU,EACV,cAAc,EACd,WAAW,EACX,MAAM,EACN,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,8BAA8B,EAC9B,MAAM,EACN,4BAA4B,EAC5B,WAAW,EAAE,wBAAwB;AACrC,uBAAuB,GACvB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAKnE,cAAc,4BAA4B,CAAC;AAQ3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAGN,KAAK,iBAAiB,EACtB,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,EAAE,gBAAgB,CAAC,KAAK,CAAsB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAExF;AAQD,YAAY,EACX,UAAU,EACV,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,aAAa,GACb,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE1E,YAAY,EACX,mBAAmB,EACnB,qBAAqB,EACrB,SAAS,EACT,wBAAwB,EACxB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,4BAA4B,EAC5B,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,IAAI,EACJ,sBAAsB,GACtB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,GACZ,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EACX,aAAa,EACb,mBAAmB,GACnB,MAAM,6CAA6C,CAAC;AAErD,YAAY,EACX,yBAAyB,EAAE,iCAAiC;AAC5D,aAAa,EAAE,yCAAyC;AACxD,MAAM,GACN,MAAM,6CAA6C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.SharedString = exports.SequenceMaintenanceEvent = exports.SequenceInterval = exports.SequenceEvent = exports.SequenceDeltaEvent = exports.IntervalType = exports.SharedMap = exports.SharedDirectory = exports.SharedTree = exports.ConnectionState = exports.AttachState = void 0;
|
|
21
|
+
exports.SharedString = exports.SequenceMaintenanceEvent = exports.SequenceInterval = exports.SequenceEvent = exports.SequenceDeltaEvent = exports.IntervalType = exports.SharedMap = exports.SharedDirectory = exports.configuredSharedTree = exports.SharedTree = exports.ConnectionState = exports.AttachState = void 0;
|
|
22
22
|
var container_definitions_1 = require("@fluidframework/container-definitions");
|
|
23
23
|
Object.defineProperty(exports, "AttachState", { enumerable: true, get: function () { return container_definitions_1.AttachState; } });
|
|
24
24
|
var container_loader_1 = require("@fluidframework/container-loader");
|
|
@@ -39,6 +39,30 @@ const internal_1 = require("@fluidframework/tree/internal");
|
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
41
41
|
exports.SharedTree = internal_1.SharedTree;
|
|
42
|
+
/**
|
|
43
|
+
* {@link SharedTree} but allowing a non-default configuration.
|
|
44
|
+
* @remarks
|
|
45
|
+
* This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import {
|
|
49
|
+
* ForestType,
|
|
50
|
+
* TreeCompressionStrategy,
|
|
51
|
+
* configuredSharedTree,
|
|
52
|
+
* typeboxValidator,
|
|
53
|
+
* } from "@fluid-framework/alpha";
|
|
54
|
+
* const SharedTree = configuredSharedTree({
|
|
55
|
+
* forest: ForestType.Reference,
|
|
56
|
+
* jsonValidator: typeboxValidator,
|
|
57
|
+
* treeEncodeType: TreeCompressionStrategy.Uncompressed,
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
* @alpha
|
|
61
|
+
*/
|
|
62
|
+
function configuredSharedTree(options) {
|
|
63
|
+
return (0, internal_1.configuredSharedTree)(options);
|
|
64
|
+
}
|
|
65
|
+
exports.configuredSharedTree = configuredSharedTree;
|
|
42
66
|
var internal_2 = require("@fluidframework/map/internal");
|
|
43
67
|
Object.defineProperty(exports, "SharedDirectory", { enumerable: true, get: function () { return internal_2.SharedDirectory; } });
|
|
44
68
|
Object.defineProperty(exports, "SharedMap", { enumerable: true, get: function () { return internal_2.SharedMap; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;AAiBH,+EAAoE;AAA3D,oHAAA,WAAW,OAAA;AACpB,qEAAmE;AAA1D,mHAAA,eAAe,OAAA;AAuCxB,mDAAmD;AACnD,4FAA4F;AAC5F,4EAA4E;AAC5E,6DAA2C;AAU3C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;AAiBH,+EAAoE;AAA3D,oHAAA,WAAW,OAAA;AACpB,qEAAmE;AAA1D,mHAAA,eAAe,OAAA;AAuCxB,mDAAmD;AACnD,4FAA4F;AAC5F,4EAA4E;AAC5E,6DAA2C;AAU3C,4DAIuC;AAEvC;;;;;;;;;GASG;AACU,QAAA,UAAU,GAA4B,qBAAkB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,oBAAoB,CAAC,OAA0B;IAC9D,OAAO,IAAA,+BAA4B,EAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAFD,oDAEC;AAmBD,yDAA0E;AAAjE,2GAAA,eAAe,OAAA;AAAE,qGAAA,SAAS,OAAA;AAsBnC,8DAO2C;AAN1C,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAClB,yGAAA,aAAa,OAAA;AACb,4GAAA,gBAAgB,OAAA;AAChB,oHAAA,wBAAwB,OAAA;AACxB,wGAAA,YAAY,OAAA;AAcb,4BAA4B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Bundles a collection of Fluid Framework client libraries for easy use when paired with a corresponding service client\n * package (e.g. `@fluidframework/azure-client`, `@fluidframework/tinylicious-client`, or `@fluidframework/odsp-client (BETA)`).\n *\n * @packageDocumentation\n */\n\n// ===============================================================\n// #region Public, Beta and Alpha (non-legacy) exports\n// #region Basic re-exports\n\nexport type {\n\tConnectionState as ConnectionStateType, // TODO: deduplicate ConnectionState types\n\tICriticalContainerError,\n} from \"@fluidframework/container-definitions\";\nexport { AttachState } from \"@fluidframework/container-definitions\";\nexport { ConnectionState } from \"@fluidframework/container-loader\";\nexport type {\n\tContainerAttachProps,\n\tContainerSchema,\n\tIConnection,\n\tIFluidContainer,\n\tIFluidContainerEvents,\n\tIMember,\n\tInitialObjects,\n\tIServiceAudience,\n\tIServiceAudienceEvents,\n\tMemberChangedListener,\n\tMyself,\n} from \"@fluidframework/fluid-static\";\nexport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nexport type {\n\tIErrorBase,\n\tIEventProvider,\n\tIDisposable,\n\tIEvent,\n\tIEventThisPlaceHolder,\n\tIErrorEvent,\n\tErasedType,\n\tIFluidHandle,\n\tIFluidLoadable,\n\tITelemetryBaseProperties,\n\tIEventTransformer,\n\tIProvideFluidLoadable,\n\tIFluidHandleErased,\n\tTransformedEvent,\n\tTelemetryBaseEventPropertyType,\n\tTagged,\n\tReplaceIEventThisPlaceHolder,\n\tFluidObject, // Linked in doc comment\n\tFluidObjectProviderKeys, // Used by FluidObject\n} from \"@fluidframework/core-interfaces\";\n\nexport type { isFluidHandle } from \"@fluidframework/runtime-utils\";\n\n// Let the tree package manage its own API surface.\n// Note: this only surfaces the `@public, @beta and @alpha` API items from the tree package.\n// eslint-disable-next-line no-restricted-syntax, import/no-internal-modules\nexport * from \"@fluidframework/tree/alpha\";\n\n// End of basic public+beta+alpha exports - nothing above this line should\n// depend on an /internal path.\n// #endregion Basic re-exports\n// ---------------------------------------------------------------\n// #region Custom re-exports\n\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nimport type { ITree } from \"@fluidframework/tree\";\nimport {\n\tSharedTree as OriginalSharedTree,\n\tconfiguredSharedTree as originalConfiguredSharedTree,\n\ttype SharedTreeOptions,\n} from \"@fluidframework/tree/internal\";\n\n/**\n * A hierarchical data structure for collaboratively editing strongly typed JSON-like trees\n * of objects, arrays, and other data types.\n * @privateRemarks\n * Here we reexport SharedTree, but with the `@alpha` types (`ISharedObjectKind`) removed, just keeping the `SharedObjectKind`.\n * Doing this requires creating this new typed export rather than relying on a reexport directly from the tree package.\n * The tree package itself does not do this because it's API needs to be usable from the encapsulated API which requires `ISharedObjectKind`.\n * This package however is not intended for use by users of the encapsulated API, and therefor it can discard that interface.\n * @public\n */\nexport const SharedTree: SharedObjectKind<ITree> = OriginalSharedTree;\n\n/**\n * {@link SharedTree} but allowing a non-default configuration.\n * @remarks\n * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.\n * @example\n * ```typescript\n * import {\n * \tForestType,\n * \tTreeCompressionStrategy,\n * \tconfiguredSharedTree,\n * \ttypeboxValidator,\n * } from \"@fluid-framework/alpha\";\n * const SharedTree = configuredSharedTree({\n * \tforest: ForestType.Reference,\n * \tjsonValidator: typeboxValidator,\n * \ttreeEncodeType: TreeCompressionStrategy.Uncompressed,\n * });\n * ```\n * @alpha\n */\nexport function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree> {\n\treturn originalConfiguredSharedTree(options);\n}\n\n// #endregion Custom re-exports\n// #endregion\n\n// ===============================================================\n// #region Legacy exports\n\nexport type {\n\tIDirectory,\n\tIDirectoryEvents,\n\tIDirectoryValueChanged,\n\tISharedDirectory,\n\tISharedDirectoryEvents,\n\tISharedMap,\n\tISharedMapEvents,\n\tIValueChanged,\n} from \"@fluidframework/map/internal\";\n\nexport { SharedDirectory, SharedMap } from \"@fluidframework/map/internal\";\n\nexport type {\n\tDeserializeCallback,\n\tInteriorSequencePlace,\n\tIInterval,\n\tIIntervalCollectionEvent,\n\tIIntervalCollection,\n\tIntervalIndex,\n\tIntervalStickiness,\n\tISequenceDeltaRange,\n\tISerializableInterval,\n\tISerializedInterval,\n\tISharedIntervalCollection,\n\tISharedSegmentSequenceEvents,\n\tISharedString,\n\tSequencePlace,\n\tSharedStringSegment,\n\tSide,\n\tISharedSegmentSequence,\n} from \"@fluidframework/sequence/internal\";\n\nexport {\n\tIntervalType,\n\tSequenceDeltaEvent,\n\tSequenceEvent,\n\tSequenceInterval,\n\tSequenceMaintenanceEvent,\n\tSharedString,\n} from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tISharedObject,\n\tISharedObjectEvents,\n} from \"@fluidframework/shared-object-base/internal\";\n\nexport type {\n\tISequencedDocumentMessage, // Leaked via ISharedObjectEvents\n\tIBranchOrigin, // Required for ISequencedDocumentMessage\n\tITrace, // Required for ISequencedDocumentMessage\n} from \"@fluidframework/driver-definitions/internal\";\n\n// #endregion Legacy exports\n"]}
|
package/lib/alpha.d.ts
CHANGED
|
@@ -133,7 +133,12 @@ export {
|
|
|
133
133
|
|
|
134
134
|
// @alpha APIs
|
|
135
135
|
FixRecursiveArraySchema,
|
|
136
|
+
ForestOptions,
|
|
137
|
+
ForestType,
|
|
138
|
+
ICodecOptions,
|
|
136
139
|
JsonArrayNodeSchema,
|
|
140
|
+
JsonCompatible,
|
|
141
|
+
JsonCompatibleObject,
|
|
137
142
|
JsonFieldSchema,
|
|
138
143
|
JsonLeafNodeSchema,
|
|
139
144
|
JsonLeafSchemaType,
|
|
@@ -146,8 +151,23 @@ export {
|
|
|
146
151
|
JsonSchemaRef,
|
|
147
152
|
JsonSchemaType,
|
|
148
153
|
JsonTreeSchema,
|
|
154
|
+
JsonValidator,
|
|
155
|
+
SchemaValidationFunction,
|
|
156
|
+
SharedTreeFormatOptions,
|
|
157
|
+
SharedTreeFormatVersion,
|
|
158
|
+
SharedTreeOptions,
|
|
149
159
|
TreeBranch,
|
|
150
160
|
TreeBranchFork,
|
|
161
|
+
TreeCompressionStrategy,
|
|
162
|
+
adaptEnum,
|
|
163
|
+
comparePersistedSchema,
|
|
164
|
+
configuredSharedTree,
|
|
165
|
+
enumFromStrings,
|
|
166
|
+
extractPersistedSchema,
|
|
151
167
|
getBranch,
|
|
152
|
-
getJsonSchema
|
|
168
|
+
getJsonSchema,
|
|
169
|
+
noopValidator,
|
|
170
|
+
singletonSchema,
|
|
171
|
+
typeboxValidator,
|
|
172
|
+
typedObjectValues
|
|
153
173
|
} from "./index.js";
|
package/lib/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export type { isFluidHandle } from "@fluidframework/runtime-utils";
|
|
|
20
20
|
export * from "@fluidframework/tree/alpha";
|
|
21
21
|
import type { SharedObjectKind } from "@fluidframework/shared-object-base";
|
|
22
22
|
import type { ITree } from "@fluidframework/tree";
|
|
23
|
+
import { type SharedTreeOptions } from "@fluidframework/tree/internal";
|
|
23
24
|
/**
|
|
24
25
|
* A hierarchical data structure for collaboratively editing strongly typed JSON-like trees
|
|
25
26
|
* of objects, arrays, and other data types.
|
|
@@ -31,6 +32,27 @@ import type { ITree } from "@fluidframework/tree";
|
|
|
31
32
|
* @public
|
|
32
33
|
*/
|
|
33
34
|
export declare const SharedTree: SharedObjectKind<ITree>;
|
|
35
|
+
/**
|
|
36
|
+
* {@link SharedTree} but allowing a non-default configuration.
|
|
37
|
+
* @remarks
|
|
38
|
+
* This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import {
|
|
42
|
+
* ForestType,
|
|
43
|
+
* TreeCompressionStrategy,
|
|
44
|
+
* configuredSharedTree,
|
|
45
|
+
* typeboxValidator,
|
|
46
|
+
* } from "@fluid-framework/alpha";
|
|
47
|
+
* const SharedTree = configuredSharedTree({
|
|
48
|
+
* forest: ForestType.Reference,
|
|
49
|
+
* jsonValidator: typeboxValidator,
|
|
50
|
+
* treeEncodeType: TreeCompressionStrategy.Uncompressed,
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
* @alpha
|
|
54
|
+
*/
|
|
55
|
+
export declare function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree>;
|
|
34
56
|
export type { IDirectory, IDirectoryEvents, IDirectoryValueChanged, ISharedDirectory, ISharedDirectoryEvents, ISharedMap, ISharedMapEvents, IValueChanged, } from "@fluidframework/map/internal";
|
|
35
57
|
export { SharedDirectory, SharedMap } from "@fluidframework/map/internal";
|
|
36
58
|
export type { DeserializeCallback, InteriorSequencePlace, IInterval, IIntervalCollectionEvent, IIntervalCollection, IntervalIndex, IntervalStickiness, ISequenceDeltaRange, ISerializableInterval, ISerializedInterval, ISharedIntervalCollection, ISharedSegmentSequenceEvents, ISharedString, SequencePlace, SharedStringSegment, Side, ISharedSegmentSequence, } from "@fluidframework/sequence/internal";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAMH,YAAY,EACX,eAAe,IAAI,mBAAmB,EAAE,0CAA0C;AAClF,uBAAuB,GACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,YAAY,EACX,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,GACN,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EACX,UAAU,EACV,cAAc,EACd,WAAW,EACX,MAAM,EACN,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,8BAA8B,EAC9B,MAAM,EACN,4BAA4B,EAC5B,WAAW,EAAE,wBAAwB;AACrC,uBAAuB,GACvB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAKnE,cAAc,4BAA4B,CAAC;AAQ3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAMH,YAAY,EACX,eAAe,IAAI,mBAAmB,EAAE,0CAA0C;AAClF,uBAAuB,GACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,YAAY,EACX,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,GACN,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EACX,UAAU,EACV,cAAc,EACd,WAAW,EACX,MAAM,EACN,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,8BAA8B,EAC9B,MAAM,EACN,4BAA4B,EAC5B,WAAW,EAAE,wBAAwB;AACrC,uBAAuB,GACvB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAKnE,cAAc,4BAA4B,CAAC;AAQ3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAGN,KAAK,iBAAiB,EACtB,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,EAAE,gBAAgB,CAAC,KAAK,CAAsB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAExF;AAQD,YAAY,EACX,UAAU,EACV,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,aAAa,GACb,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE1E,YAAY,EACX,mBAAmB,EACnB,qBAAqB,EACrB,SAAS,EACT,wBAAwB,EACxB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,4BAA4B,EAC5B,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,IAAI,EACJ,sBAAsB,GACtB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,GACZ,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EACX,aAAa,EACb,mBAAmB,GACnB,MAAM,6CAA6C,CAAC;AAErD,YAAY,EACX,yBAAyB,EAAE,iCAAiC;AAC5D,aAAa,EAAE,yCAAyC;AACxD,MAAM,GACN,MAAM,6CAA6C,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { ConnectionState } from "@fluidframework/container-loader";
|
|
|
8
8
|
// Note: this only surfaces the `@public, @beta and @alpha` API items from the tree package.
|
|
9
9
|
// eslint-disable-next-line no-restricted-syntax, import/no-internal-modules
|
|
10
10
|
export * from "@fluidframework/tree/alpha";
|
|
11
|
-
import { SharedTree as OriginalSharedTree } from "@fluidframework/tree/internal";
|
|
11
|
+
import { SharedTree as OriginalSharedTree, configuredSharedTree as originalConfiguredSharedTree, } from "@fluidframework/tree/internal";
|
|
12
12
|
/**
|
|
13
13
|
* A hierarchical data structure for collaboratively editing strongly typed JSON-like trees
|
|
14
14
|
* of objects, arrays, and other data types.
|
|
@@ -20,6 +20,29 @@ import { SharedTree as OriginalSharedTree } from "@fluidframework/tree/internal"
|
|
|
20
20
|
* @public
|
|
21
21
|
*/
|
|
22
22
|
export const SharedTree = OriginalSharedTree;
|
|
23
|
+
/**
|
|
24
|
+
* {@link SharedTree} but allowing a non-default configuration.
|
|
25
|
+
* @remarks
|
|
26
|
+
* This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* import {
|
|
30
|
+
* ForestType,
|
|
31
|
+
* TreeCompressionStrategy,
|
|
32
|
+
* configuredSharedTree,
|
|
33
|
+
* typeboxValidator,
|
|
34
|
+
* } from "@fluid-framework/alpha";
|
|
35
|
+
* const SharedTree = configuredSharedTree({
|
|
36
|
+
* forest: ForestType.Reference,
|
|
37
|
+
* jsonValidator: typeboxValidator,
|
|
38
|
+
* treeEncodeType: TreeCompressionStrategy.Uncompressed,
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
* @alpha
|
|
42
|
+
*/
|
|
43
|
+
export function configuredSharedTree(options) {
|
|
44
|
+
return originalConfiguredSharedTree(options);
|
|
45
|
+
}
|
|
23
46
|
export { SharedDirectory, SharedMap } from "@fluidframework/map/internal";
|
|
24
47
|
export { IntervalType, SequenceDeltaEvent, SequenceEvent, SequenceInterval, SequenceMaintenanceEvent, SharedString, } from "@fluidframework/sequence/internal";
|
|
25
48
|
// #endregion Legacy exports
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAuCnE,mDAAmD;AACnD,4FAA4F;AAC5F,4EAA4E;AAC5E,cAAc,4BAA4B,CAAC;AAU3C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAuCnE,mDAAmD;AACnD,4FAA4F;AAC5F,4EAA4E;AAC5E,cAAc,4BAA4B,CAAC;AAU3C,OAAO,EACN,UAAU,IAAI,kBAAkB,EAChC,oBAAoB,IAAI,4BAA4B,GAEpD,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,UAAU,GAA4B,kBAAkB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAA0B;IAC9D,OAAO,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAmBD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAsB1E,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,GACZ,MAAM,mCAAmC,CAAC;AAa3C,4BAA4B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Bundles a collection of Fluid Framework client libraries for easy use when paired with a corresponding service client\n * package (e.g. `@fluidframework/azure-client`, `@fluidframework/tinylicious-client`, or `@fluidframework/odsp-client (BETA)`).\n *\n * @packageDocumentation\n */\n\n// ===============================================================\n// #region Public, Beta and Alpha (non-legacy) exports\n// #region Basic re-exports\n\nexport type {\n\tConnectionState as ConnectionStateType, // TODO: deduplicate ConnectionState types\n\tICriticalContainerError,\n} from \"@fluidframework/container-definitions\";\nexport { AttachState } from \"@fluidframework/container-definitions\";\nexport { ConnectionState } from \"@fluidframework/container-loader\";\nexport type {\n\tContainerAttachProps,\n\tContainerSchema,\n\tIConnection,\n\tIFluidContainer,\n\tIFluidContainerEvents,\n\tIMember,\n\tInitialObjects,\n\tIServiceAudience,\n\tIServiceAudienceEvents,\n\tMemberChangedListener,\n\tMyself,\n} from \"@fluidframework/fluid-static\";\nexport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nexport type {\n\tIErrorBase,\n\tIEventProvider,\n\tIDisposable,\n\tIEvent,\n\tIEventThisPlaceHolder,\n\tIErrorEvent,\n\tErasedType,\n\tIFluidHandle,\n\tIFluidLoadable,\n\tITelemetryBaseProperties,\n\tIEventTransformer,\n\tIProvideFluidLoadable,\n\tIFluidHandleErased,\n\tTransformedEvent,\n\tTelemetryBaseEventPropertyType,\n\tTagged,\n\tReplaceIEventThisPlaceHolder,\n\tFluidObject, // Linked in doc comment\n\tFluidObjectProviderKeys, // Used by FluidObject\n} from \"@fluidframework/core-interfaces\";\n\nexport type { isFluidHandle } from \"@fluidframework/runtime-utils\";\n\n// Let the tree package manage its own API surface.\n// Note: this only surfaces the `@public, @beta and @alpha` API items from the tree package.\n// eslint-disable-next-line no-restricted-syntax, import/no-internal-modules\nexport * from \"@fluidframework/tree/alpha\";\n\n// End of basic public+beta+alpha exports - nothing above this line should\n// depend on an /internal path.\n// #endregion Basic re-exports\n// ---------------------------------------------------------------\n// #region Custom re-exports\n\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nimport type { ITree } from \"@fluidframework/tree\";\nimport {\n\tSharedTree as OriginalSharedTree,\n\tconfiguredSharedTree as originalConfiguredSharedTree,\n\ttype SharedTreeOptions,\n} from \"@fluidframework/tree/internal\";\n\n/**\n * A hierarchical data structure for collaboratively editing strongly typed JSON-like trees\n * of objects, arrays, and other data types.\n * @privateRemarks\n * Here we reexport SharedTree, but with the `@alpha` types (`ISharedObjectKind`) removed, just keeping the `SharedObjectKind`.\n * Doing this requires creating this new typed export rather than relying on a reexport directly from the tree package.\n * The tree package itself does not do this because it's API needs to be usable from the encapsulated API which requires `ISharedObjectKind`.\n * This package however is not intended for use by users of the encapsulated API, and therefor it can discard that interface.\n * @public\n */\nexport const SharedTree: SharedObjectKind<ITree> = OriginalSharedTree;\n\n/**\n * {@link SharedTree} but allowing a non-default configuration.\n * @remarks\n * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.\n * @example\n * ```typescript\n * import {\n * \tForestType,\n * \tTreeCompressionStrategy,\n * \tconfiguredSharedTree,\n * \ttypeboxValidator,\n * } from \"@fluid-framework/alpha\";\n * const SharedTree = configuredSharedTree({\n * \tforest: ForestType.Reference,\n * \tjsonValidator: typeboxValidator,\n * \ttreeEncodeType: TreeCompressionStrategy.Uncompressed,\n * });\n * ```\n * @alpha\n */\nexport function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree> {\n\treturn originalConfiguredSharedTree(options);\n}\n\n// #endregion Custom re-exports\n// #endregion\n\n// ===============================================================\n// #region Legacy exports\n\nexport type {\n\tIDirectory,\n\tIDirectoryEvents,\n\tIDirectoryValueChanged,\n\tISharedDirectory,\n\tISharedDirectoryEvents,\n\tISharedMap,\n\tISharedMapEvents,\n\tIValueChanged,\n} from \"@fluidframework/map/internal\";\n\nexport { SharedDirectory, SharedMap } from \"@fluidframework/map/internal\";\n\nexport type {\n\tDeserializeCallback,\n\tInteriorSequencePlace,\n\tIInterval,\n\tIIntervalCollectionEvent,\n\tIIntervalCollection,\n\tIntervalIndex,\n\tIntervalStickiness,\n\tISequenceDeltaRange,\n\tISerializableInterval,\n\tISerializedInterval,\n\tISharedIntervalCollection,\n\tISharedSegmentSequenceEvents,\n\tISharedString,\n\tSequencePlace,\n\tSharedStringSegment,\n\tSide,\n\tISharedSegmentSequence,\n} from \"@fluidframework/sequence/internal\";\n\nexport {\n\tIntervalType,\n\tSequenceDeltaEvent,\n\tSequenceEvent,\n\tSequenceInterval,\n\tSequenceMaintenanceEvent,\n\tSharedString,\n} from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tISharedObject,\n\tISharedObjectEvents,\n} from \"@fluidframework/shared-object-base/internal\";\n\nexport type {\n\tISequencedDocumentMessage, // Leaked via ISharedObjectEvents\n\tIBranchOrigin, // Required for ISequencedDocumentMessage\n\tITrace, // Required for ISequencedDocumentMessage\n} from \"@fluidframework/driver-definitions/internal\";\n\n// #endregion Legacy exports\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluid-framework",
|
|
3
|
-
"version": "2.4.0-
|
|
3
|
+
"version": "2.4.0-299707",
|
|
4
4
|
"description": "The main entry point into Fluid Framework public packages",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -57,23 +57,23 @@
|
|
|
57
57
|
"main": "lib/index.js",
|
|
58
58
|
"types": "lib/public.d.ts",
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@fluidframework/container-definitions": "2.4.0-
|
|
61
|
-
"@fluidframework/container-loader": "2.4.0-
|
|
62
|
-
"@fluidframework/core-interfaces": "2.4.0-
|
|
63
|
-
"@fluidframework/driver-definitions": "2.4.0-
|
|
64
|
-
"@fluidframework/fluid-static": "2.4.0-
|
|
65
|
-
"@fluidframework/map": "2.4.0-
|
|
66
|
-
"@fluidframework/runtime-utils": "2.4.0-
|
|
67
|
-
"@fluidframework/sequence": "2.4.0-
|
|
68
|
-
"@fluidframework/shared-object-base": "2.4.0-
|
|
69
|
-
"@fluidframework/tree": "2.4.0-
|
|
60
|
+
"@fluidframework/container-definitions": "2.4.0-299707",
|
|
61
|
+
"@fluidframework/container-loader": "2.4.0-299707",
|
|
62
|
+
"@fluidframework/core-interfaces": "2.4.0-299707",
|
|
63
|
+
"@fluidframework/driver-definitions": "2.4.0-299707",
|
|
64
|
+
"@fluidframework/fluid-static": "2.4.0-299707",
|
|
65
|
+
"@fluidframework/map": "2.4.0-299707",
|
|
66
|
+
"@fluidframework/runtime-utils": "2.4.0-299707",
|
|
67
|
+
"@fluidframework/sequence": "2.4.0-299707",
|
|
68
|
+
"@fluidframework/shared-object-base": "2.4.0-299707",
|
|
69
|
+
"@fluidframework/tree": "2.4.0-299707"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@arethetypeswrong/cli": "^0.
|
|
72
|
+
"@arethetypeswrong/cli": "^0.16.4",
|
|
73
73
|
"@biomejs/biome": "~1.8.3",
|
|
74
|
-
"@fluid-tools/build-cli": "^0.
|
|
74
|
+
"@fluid-tools/build-cli": "^0.48.0",
|
|
75
75
|
"@fluidframework/build-common": "^2.0.3",
|
|
76
|
-
"@fluidframework/build-tools": "^0.
|
|
76
|
+
"@fluidframework/build-tools": "^0.48.0",
|
|
77
77
|
"@fluidframework/eslint-config-fluid": "^5.4.0",
|
|
78
78
|
"@microsoft/api-extractor": "7.47.8",
|
|
79
79
|
"@types/node": "^18.19.0",
|
package/src/index.ts
CHANGED
|
@@ -71,7 +71,11 @@ export * from "@fluidframework/tree/alpha";
|
|
|
71
71
|
|
|
72
72
|
import type { SharedObjectKind } from "@fluidframework/shared-object-base";
|
|
73
73
|
import type { ITree } from "@fluidframework/tree";
|
|
74
|
-
import {
|
|
74
|
+
import {
|
|
75
|
+
SharedTree as OriginalSharedTree,
|
|
76
|
+
configuredSharedTree as originalConfiguredSharedTree,
|
|
77
|
+
type SharedTreeOptions,
|
|
78
|
+
} from "@fluidframework/tree/internal";
|
|
75
79
|
|
|
76
80
|
/**
|
|
77
81
|
* A hierarchical data structure for collaboratively editing strongly typed JSON-like trees
|
|
@@ -85,6 +89,30 @@ import { SharedTree as OriginalSharedTree } from "@fluidframework/tree/internal"
|
|
|
85
89
|
*/
|
|
86
90
|
export const SharedTree: SharedObjectKind<ITree> = OriginalSharedTree;
|
|
87
91
|
|
|
92
|
+
/**
|
|
93
|
+
* {@link SharedTree} but allowing a non-default configuration.
|
|
94
|
+
* @remarks
|
|
95
|
+
* This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* import {
|
|
99
|
+
* ForestType,
|
|
100
|
+
* TreeCompressionStrategy,
|
|
101
|
+
* configuredSharedTree,
|
|
102
|
+
* typeboxValidator,
|
|
103
|
+
* } from "@fluid-framework/alpha";
|
|
104
|
+
* const SharedTree = configuredSharedTree({
|
|
105
|
+
* forest: ForestType.Reference,
|
|
106
|
+
* jsonValidator: typeboxValidator,
|
|
107
|
+
* treeEncodeType: TreeCompressionStrategy.Uncompressed,
|
|
108
|
+
* });
|
|
109
|
+
* ```
|
|
110
|
+
* @alpha
|
|
111
|
+
*/
|
|
112
|
+
export function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree> {
|
|
113
|
+
return originalConfiguredSharedTree(options);
|
|
114
|
+
}
|
|
115
|
+
|
|
88
116
|
// #endregion Custom re-exports
|
|
89
117
|
// #endregion
|
|
90
118
|
|