fluid-framework 2.92.0 → 2.100.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.
@@ -154,9 +154,24 @@ export interface ContainerSchema {
154
154
  readonly initialObjects: Record<string, SharedObjectKind>;
155
155
  }
156
156
 
157
+ // @beta
158
+ export function createIdentifierIndex<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): IdentifierIndex;
159
+
157
160
  // @beta
158
161
  export function createIndependentTreeBeta<const TSchema extends ImplicitFieldSchema>(options?: ForestOptions): ViewableTree;
159
162
 
163
+ // @beta
164
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: (schema: TreeNodeSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): TreeIndex<TKey, TValue>;
165
+
166
+ // @beta
167
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: (schema: TSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): TreeIndex<TKey, TValue>;
168
+
169
+ // @beta
170
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): TreeIndex<TKey, TValue>;
171
+
172
+ // @beta
173
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): TreeIndex<TKey, TValue>;
174
+
160
175
  // @public @sealed @system
161
176
  interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider"> {
162
177
  }
@@ -189,7 +204,7 @@ export abstract class ErasedType<out Name = unknown> {
189
204
 
190
205
  // @beta
191
206
  export namespace ExtensibleUnionNode {
192
- export function createSchema<const T extends readonly TreeNodeSchema[], const TScope extends string, const TName extends string>(types: T, inputSchemaFactory: SchemaFactoryBeta<TScope>, name: TName): Statics<T> & TreeNodeSchemaCore_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, false, unknown, never, unknown> & (new (data: InternalTreeNode_2) => Members<TreeNodeFromImplicitAllowedTypes<T>> & TreeNode_2 & WithType_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, unknown>);
207
+ export function createSchema<const T extends readonly TreeNodeSchema[], const TScope extends string, const TName extends string>(types: T, inputSchemaFactory: SchemaFactoryBeta<TScope>, name: TName): Statics<T> & TreeNodeSchemaCore<ScopedSchemaName<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind, false, unknown, never, unknown> & (new (data: InternalTreeNode) => Members<TreeNodeFromImplicitAllowedTypes<T>> & TreeNode & WithType<ScopedSchemaName<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind, unknown>);
193
208
  export interface Members<T> {
194
209
  isValid(): boolean;
195
210
  readonly union: T | undefined;
@@ -256,6 +271,29 @@ type FlexList<Item = unknown> = readonly LazyItem<Item>[];
256
271
  // @public @system
257
272
  type FlexListToUnion<TList extends FlexList> = ExtractItemType<TList[number]>;
258
273
 
274
+ // @beta @sealed
275
+ export interface FluidIterable<T> {
276
+ [Symbol.iterator](): FluidIterableIterator<T>;
277
+ }
278
+
279
+ // @beta @sealed
280
+ export interface FluidIterableIterator<T> extends FluidIterable<T> {
281
+ next(): {
282
+ value: T;
283
+ done?: false;
284
+ } | {
285
+ value: any;
286
+ done: true;
287
+ };
288
+ }
289
+
290
+ // @beta @sealed
291
+ export interface FluidMap<K, V> extends FluidReadonlyMap<K, V> {
292
+ delete(key: K): void;
293
+ forEach(callbackfn: (value: V, key: K, map: FluidMap<K, V>) => void, thisArg?: any): void;
294
+ set(key: K, value: V): void;
295
+ }
296
+
259
297
  // @public
260
298
  export type FluidObject<T = unknown> = {
261
299
  [P in FluidObjectProviderKeys<T>]?: T[P];
@@ -264,26 +302,39 @@ export type FluidObject<T = unknown> = {
264
302
  // @public
265
303
  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;
266
304
 
305
+ // @beta @sealed
306
+ export interface FluidReadonlyMap<K, V> {
307
+ [Symbol.iterator](): FluidIterableIterator<[K, V]>;
308
+ readonly [Symbol.toStringTag]: string;
309
+ entries(): FluidIterableIterator<[K, V]>;
310
+ forEach(callbackfn: (value: V, key: K, map: FluidReadonlyMap<K, V>) => void, thisArg?: any): void;
311
+ get(key: K): V | undefined;
312
+ has(key: K): boolean;
313
+ keys(): FluidIterableIterator<K>;
314
+ readonly size: number;
315
+ values(): FluidIterableIterator<V>;
316
+ }
317
+
267
318
  // @beta
268
319
  export namespace FluidSerializableAsTree {
269
320
  // @sealed
270
321
  export class Array extends _APIExtractorWorkaroundArrayBase {
271
322
  }
272
- const Tree: readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>];
323
+ const Tree: readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
273
324
  export type Data = JsonCompatible<IFluidHandle>;
274
325
  const // @system
275
- _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass_2<"com.fluidframework.serializable.object", NodeKind_2.Record, TreeRecordNodeUnsafe_2<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>]> & WithType_2<"com.fluidframework.serializable.object", NodeKind_2.Record, unknown>, {
276
- readonly [x: string]: string | number | IFluidHandle<unknown> | System_Unsafe_2.InsertableTypedNodeUnsafe<LeafSchema_2<"boolean", boolean>, LeafSchema_2<"boolean", boolean>> | FluidSerializableObject | Array | null;
277
- }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>], undefined, unknown>;
326
+ _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass<"com.fluidframework.serializable.object", NodeKind.Record, TreeRecordNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>]> & WithType<"com.fluidframework.serializable.object", NodeKind.Record, unknown>, {
327
+ readonly [x: string]: string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null;
328
+ }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>], undefined, unknown>;
278
329
  // @sealed
279
330
  export class FluidSerializableObject extends _APIExtractorWorkaroundObjectBase {
280
331
  }
281
332
  // @system
282
333
  export type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<typeof Array>;
283
334
  const // @system
284
- _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass_2<"com.fluidframework.serializable.array", NodeKind_2.Array, System_Unsafe_2.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>]> & WithType_2<"com.fluidframework.serializable.array", NodeKind_2.Array, unknown>, {
285
- [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe_2.InsertableTypedNodeUnsafe<LeafSchema_2<"boolean", boolean>, LeafSchema_2<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
286
- }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>], undefined>;
335
+ _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass<"com.fluidframework.serializable.array", NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>]> & WithType<"com.fluidframework.serializable.array", NodeKind.Array, unknown>, {
336
+ [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
337
+ }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>], undefined>;
287
338
  // (undocumented)
288
339
  export type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;
289
340
  }
@@ -306,6 +357,9 @@ export const ForestTypeOptimized: ForestType;
306
357
  // @beta
307
358
  export const ForestTypeReference: ForestType;
308
359
 
360
+ // @public
361
+ export const getPresence: (fluidContainer: IFluidContainer) => Presence;
362
+
309
363
  // @beta @legacy
310
364
  export interface IBranchOrigin {
311
365
  id: string;
@@ -322,6 +376,9 @@ export interface IConnection {
322
376
  // @public
323
377
  export type ICriticalContainerError = IErrorBase;
324
378
 
379
+ // @beta
380
+ export type IdentifierIndex = TreeIndex<string, TreeNode>;
381
+
325
382
  // @public @sealed @legacy
326
383
  export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {
327
384
  readonly absolutePath: string;
@@ -728,7 +785,7 @@ export interface ISequenceDeltaRange<TOperation extends MergeTreeDeltaOperationT
728
785
  export interface ISequenceIntervalCollection extends TypedEventEmitter<ISequenceIntervalCollectionEvents> {
729
786
  // (undocumented)
730
787
  [Symbol.iterator](): Iterator<SequenceInterval>;
731
- add({ start, end, props, }: {
788
+ add(input: {
732
789
  start: SequencePlace;
733
790
  end: SequencePlace;
734
791
  props?: PropertySet;
@@ -738,7 +795,7 @@ export interface ISequenceIntervalCollection extends TypedEventEmitter<ISequence
738
795
  // (undocumented)
739
796
  readonly attached: boolean;
740
797
  attachIndex(index: SequenceIntervalIndex): void;
741
- change(id: string, { start, end, props }: {
798
+ change(id: string, input: {
742
799
  start?: SequencePlace;
743
800
  end?: SequencePlace;
744
801
  props?: PropertySet;
@@ -849,6 +906,12 @@ export interface ISharedObjectEvents extends IErrorEvent {
849
906
  (event: "op", listener: (op: ISequencedDocumentMessage, local: boolean, target: IEventThisPlaceHolder) => void): any;
850
907
  }
851
908
 
909
+ // @beta @legacy
910
+ export interface ISharedObjectKind<TSharedObject> {
911
+ create(runtime: IFluidDataStoreRuntime, id?: string): TSharedObject;
912
+ getFactory(): IChannelFactory<TSharedObject>;
913
+ }
914
+
852
915
  // @beta @legacy (undocumented)
853
916
  export interface ISharedSegmentSequence<T extends ISegment> extends ISharedObject<ISharedSegmentSequenceEvents>, MergeTreeRevertibleDriver {
854
917
  annotateAdjustRange(start: number, end: number, adjust: MapLike<AdjustParams>): void;
@@ -1280,13 +1343,13 @@ export interface SequenceMaintenanceEvent extends SequenceEvent<MergeTreeMainten
1280
1343
  export { SequencePlace }
1281
1344
 
1282
1345
  // @beta @legacy
1283
- export const SharedDirectory: ISharedObjectKind<ISharedDirectory> & SharedObjectKind_2<ISharedDirectory>;
1346
+ export const SharedDirectory: ISharedObjectKind<ISharedDirectory> & SharedObjectKind<ISharedDirectory>;
1284
1347
 
1285
1348
  // @beta @legacy
1286
1349
  export type SharedDirectory = ISharedDirectory;
1287
1350
 
1288
1351
  // @beta @legacy
1289
- export const SharedMap: ISharedObjectKind<ISharedMap> & SharedObjectKind_2<ISharedMap>;
1352
+ export const SharedMap: ISharedObjectKind<ISharedMap> & SharedObjectKind<ISharedMap>;
1290
1353
 
1291
1354
  // @beta @legacy
1292
1355
  export type SharedMap = ISharedMap;
@@ -1297,7 +1360,7 @@ export interface SharedObjectKind<out TSharedObject = unknown> extends ErasedTyp
1297
1360
  }
1298
1361
 
1299
1362
  // @beta @legacy
1300
- export const SharedString: ISharedObjectKind<ISharedString> & SharedObjectKind_2<ISharedString>;
1363
+ export const SharedString: ISharedObjectKind<ISharedString> & SharedObjectKind<ISharedString>;
1301
1364
 
1302
1365
  // @beta @legacy
1303
1366
  export type SharedString = ISharedString;
@@ -1369,22 +1432,22 @@ export namespace System_TableSchema {
1369
1432
  props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
1370
1433
  }), true, {
1371
1434
  readonly props: TPropsSchema;
1372
- readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
1435
+ readonly id: FieldSchema<FieldKind.Identifier, LeafSchema<"string", string>, unknown>;
1373
1436
  }>;
1374
1437
  // @system
1375
1438
  export type CreateRowOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
1376
1439
  // @system
1377
1440
  export function createRowSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, cellSchema: TCellSchema, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind.Object, TreeNode & TableSchema.Row<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind, unknown>, object & {
1378
1441
  readonly id?: string | undefined;
1379
- readonly cells: (InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>>;
1442
+ readonly cells: (InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>>;
1380
1443
  } & (FieldHasDefault<TPropsSchema> extends true ? {
1381
1444
  props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
1382
1445
  } : {
1383
1446
  props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
1384
1447
  }), true, {
1385
1448
  readonly props: TPropsSchema;
1386
- readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
1387
- readonly cells: FieldSchema_2<FieldKind_2.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
1449
+ readonly id: FieldSchema<FieldKind.Identifier, LeafSchema<"string", string>, unknown>;
1450
+ readonly cells: FieldSchema<FieldKind.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
1388
1451
  }>;
1389
1452
  // @system
1390
1453
  export function createTableSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TColumnSchema extends ColumnSchemaBase<TUserScope, TCellSchema>, const TRowSchema extends RowSchemaBase<TUserScope, TCellSchema>>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, _cellSchema: TCellSchema, columnSchema: TColumnSchema, rowSchema: TRowSchema): {
@@ -1674,6 +1737,17 @@ export interface TreeEncodingOptions<TKeyOptions = KeyEncodingOptions> {
1674
1737
  // @public
1675
1738
  export type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> = TSchema extends FieldSchema<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind> : TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes<TSchema> : TreeNode | TreeLeafValue | undefined;
1676
1739
 
1740
+ // @beta @sealed
1741
+ export interface TreeIndex<TKey, TValue> extends FluidReadonlyMap<TKey, TValue> {
1742
+ dispose(): void;
1743
+ }
1744
+
1745
+ // @beta
1746
+ export type TreeIndexKey = TreeLeafValue;
1747
+
1748
+ // @beta
1749
+ export type TreeIndexNodes<TNode> = readonly [first: TNode, ...rest: TNode[]];
1750
+
1677
1751
  // @public
1678
1752
  export type TreeLeafValue = number | string | boolean | IFluidHandle | null;
1679
1753
 
@@ -143,6 +143,9 @@ export type FluidObject<T = unknown> = {
143
143
  // @public
144
144
  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;
145
145
 
146
+ // @public
147
+ export const getPresence: (fluidContainer: IFluidContainer) => Presence;
148
+
146
149
  // @public
147
150
  export interface IConnection {
148
151
  readonly id: string;
@@ -143,6 +143,9 @@ export type FluidObject<T = unknown> = {
143
143
  // @public
144
144
  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;
145
145
 
146
+ // @public
147
+ export const getPresence: (fluidContainer: IFluidContainer) => Presence;
148
+
146
149
  // @public
147
150
  export interface IConnection {
148
151
  readonly id: string;
package/dist/alpha.d.ts CHANGED
@@ -131,6 +131,7 @@ export {
131
131
  ValidateRecursiveSchemaTemplate,
132
132
  ViewableTree,
133
133
  WithType,
134
+ getPresence,
134
135
  isFluidHandle,
135
136
  rollback,
136
137
  typeSchemaSymbol,
@@ -154,12 +155,17 @@ export {
154
155
  ErasedBaseType,
155
156
  ExtensibleUnionNode,
156
157
  FixRecursiveArraySchema,
158
+ FluidIterable,
159
+ FluidIterableIterator,
160
+ FluidMap,
161
+ FluidReadonlyMap,
157
162
  FluidSerializableAsTree,
158
163
  ForestOptions,
159
164
  ForestType,
160
165
  ForestTypeExpensiveDebug,
161
166
  ForestTypeOptimized,
162
167
  ForestTypeReference,
168
+ IdentifierIndex,
163
169
  JsonCompatible,
164
170
  JsonCompatibleObject,
165
171
  KeyEncodingOptions,
@@ -179,6 +185,9 @@ export {
179
185
  TreeBranch,
180
186
  TreeChangeEventsBeta,
181
187
  TreeEncodingOptions,
188
+ TreeIndex,
189
+ TreeIndexKey,
190
+ TreeIndexNodes,
182
191
  TreeRecordNode,
183
192
  TreeRecordNodeUnsafe,
184
193
  TreeViewBeta,
@@ -189,7 +198,9 @@ export {
189
198
  adaptEnum,
190
199
  asBeta,
191
200
  configuredSharedTreeBeta,
201
+ createIdentifierIndex,
192
202
  createIndependentTreeBeta,
203
+ createTreeIndex,
193
204
  enumFromStrings,
194
205
  singletonSchema,
195
206
  snapshotSchemaCompatibility,
@@ -206,6 +217,8 @@ export {
206
217
  ArrayNodeRemoveOp,
207
218
  ArrayNodeRetainOp,
208
219
  ArrayNodeSchema,
220
+ ArrayNodeTreeChangedDeltaOp,
221
+ ArrayNodeTreeChangedRetainOp,
209
222
  ArrayPlaceAnchor,
210
223
  ChangeMetadata,
211
224
  CodecName,
@@ -231,7 +244,6 @@ export {
231
244
  HandleConverter,
232
245
  ICodecOptions,
233
246
  ITreeAlpha,
234
- IdentifierIndex,
235
247
  IncrementalEncodingPolicy,
236
248
  IndependentViewOptions,
237
249
  Insertable,
@@ -267,6 +279,7 @@ export {
267
279
  NodeChangedDataAlpha,
268
280
  NodeChangedDataDelta,
269
281
  NodeChangedDataProperties,
282
+ NodeChangedDataTreeDelta,
270
283
  NodeProvider,
271
284
  NodeSchemaOptionsAlpha,
272
285
  ObjectNodeSchema,
@@ -314,9 +327,7 @@ export {
314
327
  TreeCompressionStrategy,
315
328
  TreeContextAlpha,
316
329
  TreeIdentifierUtils,
317
- TreeIndex,
318
- TreeIndexKey,
319
- TreeIndexNodes,
330
+ TreeMapNodeAlpha,
320
331
  TreeParsingOptions,
321
332
  TreeSchema,
322
333
  TreeSchemaEncodingOptions,
@@ -339,9 +350,7 @@ export {
339
350
  configuredSharedTreeAlpha,
340
351
  contentSchemaSymbol,
341
352
  createArrayInsertionAnchor,
342
- createIdentifierIndex,
343
353
  createIndependentTreeAlpha,
344
- createTreeIndex,
345
354
  decodeSchemaCompatibilitySnapshot,
346
355
  encodeSchemaCompatibilitySnapshot,
347
356
  eraseSchemaDetails,
@@ -351,6 +360,7 @@ export {
351
360
  extractPersistedSchema,
352
361
  generateSchemaFromSimpleSchema,
353
362
  getJsonSchema,
363
+ getPresenceAlpha,
354
364
  getSimpleSchema,
355
365
  importCompatibilitySchemaSnapshot,
356
366
  incrementalEncodingPolicyForAllowedTypes,
package/dist/beta.d.ts CHANGED
@@ -131,6 +131,7 @@ export {
131
131
  ValidateRecursiveSchemaTemplate,
132
132
  ViewableTree,
133
133
  WithType,
134
+ getPresence,
134
135
  isFluidHandle,
135
136
  rollback,
136
137
  typeSchemaSymbol,
@@ -154,12 +155,17 @@ export {
154
155
  ErasedBaseType,
155
156
  ExtensibleUnionNode,
156
157
  FixRecursiveArraySchema,
158
+ FluidIterable,
159
+ FluidIterableIterator,
160
+ FluidMap,
161
+ FluidReadonlyMap,
157
162
  FluidSerializableAsTree,
158
163
  ForestOptions,
159
164
  ForestType,
160
165
  ForestTypeExpensiveDebug,
161
166
  ForestTypeOptimized,
162
167
  ForestTypeReference,
168
+ IdentifierIndex,
163
169
  JsonCompatible,
164
170
  JsonCompatibleObject,
165
171
  KeyEncodingOptions,
@@ -179,6 +185,9 @@ export {
179
185
  TreeBranch,
180
186
  TreeChangeEventsBeta,
181
187
  TreeEncodingOptions,
188
+ TreeIndex,
189
+ TreeIndexKey,
190
+ TreeIndexNodes,
182
191
  TreeRecordNode,
183
192
  TreeRecordNodeUnsafe,
184
193
  TreeViewBeta,
@@ -189,7 +198,9 @@ export {
189
198
  adaptEnum,
190
199
  asBeta,
191
200
  configuredSharedTreeBeta,
201
+ createIdentifierIndex,
192
202
  createIndependentTreeBeta,
203
+ createTreeIndex,
193
204
  enumFromStrings,
194
205
  singletonSchema,
195
206
  snapshotSchemaCompatibility
package/dist/index.d.ts CHANGED
@@ -13,11 +13,12 @@ ICriticalContainerError, } from "@fluidframework/container-definitions";
13
13
  export { AttachState } from "@fluidframework/container-definitions";
14
14
  export { ConnectionState } from "@fluidframework/container-loader";
15
15
  export type { ContainerAttachProps, ContainerSchema, IConnection, IFluidContainer, IFluidContainerEvents, IMember, InitialObjects, IServiceAudience, IServiceAudienceEvents, MemberChangedListener, Myself, } from "@fluidframework/fluid-static";
16
+ export { getPresence, getPresenceAlpha } from "@fluidframework/fluid-static/internal";
16
17
  export type { SharedObjectKind } from "@fluidframework/shared-object-base";
17
18
  export type { IErrorBase, IEventProvider, IDisposable, IEvent, IEventThisPlaceHolder, IErrorEvent, ErasedType, IFluidHandle, IFluidLoadable, ITelemetryBaseProperties, IEventTransformer, IProvideFluidLoadable, IFluidHandleErased, TransformedEvent, TelemetryBaseEventPropertyType, Tagged, ReplaceIEventThisPlaceHolder, FluidObject, // Linked in doc comment
18
19
  FluidObjectProviderKeys, // Used by FluidObject
19
20
  Listeners, IsListener, Listenable, Off, } from "@fluidframework/core-interfaces";
20
- export type { ErasedBaseType } from "@fluidframework/core-interfaces/internal";
21
+ export type { ErasedBaseType, FluidIterable, FluidIterableIterator, FluidMap, FluidReadonlyMap, } from "@fluidframework/core-interfaces/internal";
21
22
  export { onAssertionFailure } from "@fluidframework/core-utils/internal";
22
23
  export type { isFluidHandle } from "@fluidframework/runtime-utils";
23
24
  export * from "@fluidframework/tree/alpha";
@@ -28,10 +29,10 @@ import { type SharedTreeOptions } from "@fluidframework/tree/internal";
28
29
  * A hierarchical data structure for collaboratively editing strongly typed JSON-like trees
29
30
  * of objects, arrays, and other data types.
30
31
  * @privateRemarks
31
- * Here we reexport SharedTree, but with the `@alpha` types (`ISharedObjectKind`) removed, just keeping the `SharedObjectKind`.
32
+ * Here we reexport SharedTree, but with the `@legacy` types (`ISharedObjectKind`) removed, just keeping the `SharedObjectKind`.
32
33
  * Doing this requires creating this new typed export rather than relying on a reexport directly from the tree package.
33
34
  * The tree package itself does not do this because it's API needs to be usable from the encapsulated API which requires `ISharedObjectKind`.
34
- * This package however is not intended for use by users of the encapsulated API, and therefor it can discard that interface.
35
+ * This package however is not intended for use by users of the encapsulated API, and therefore it can discard that interface.
35
36
  * @public
36
37
  */
37
38
  export declare const SharedTree: SharedObjectKind<ITree>;
@@ -66,7 +67,7 @@ export { SharedDirectory, SharedMap } from "@fluidframework/map/internal";
66
67
  export type { DeserializeCallback, InteriorSequencePlace, IInterval, IntervalStickiness, ISequenceDeltaRange, ISerializedInterval, ISharedSegmentSequenceEvents, ISharedString, SequencePlace, SharedStringSegment, Side, ISharedSegmentSequence, ISequenceIntervalCollection, ISequenceIntervalCollectionEvents, SequenceIntervalIndex, } from "@fluidframework/sequence/internal";
67
68
  export type { IntervalType, SequenceDeltaEvent, SequenceEvent, SequenceInterval, SequenceMaintenanceEvent, } from "@fluidframework/sequence/internal";
68
69
  export { SharedString } from "@fluidframework/sequence/internal";
69
- export type { ISharedObject, ISharedObjectEvents, } from "@fluidframework/shared-object-base/internal";
70
+ export type { ISharedObject, ISharedObjectEvents, ISharedObjectKind, } from "@fluidframework/shared-object-base/internal";
70
71
  export type { ISequencedDocumentMessage, // Leaked via ISharedObjectEvents
71
72
  IBranchOrigin, // Required for ISequencedDocumentMessage
72
73
  ITrace, } from "@fluidframework/driver-definitions/internal";
@@ -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,EAAE,sBAAsB;AAE/C,SAAS,EACT,UAAU,EACV,UAAU,EACV,GAAG,GAEH,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAG/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AASnE,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;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;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,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,4BAA4B,EAC5B,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,IAAI,EACJ,sBAAsB,EACtB,2BAA2B,EAC3B,iCAAiC,EACjC,qBAAqB,GACrB,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EACX,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,wBAAwB,GACxB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,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"}
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,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACtF,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,EAAE,sBAAsB;AAE/C,SAAS,EACT,UAAU,EACV,UAAU,EACV,GAAG,GAEH,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACX,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACR,gBAAgB,GAChB,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AASnE,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;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;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,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,4BAA4B,EAC5B,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,IAAI,EACJ,sBAAsB,EACtB,2BAA2B,EAC3B,iCAAiC,EACjC,qBAAqB,GACrB,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EACX,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,wBAAwB,GACxB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,YAAY,EACX,aAAa,EACb,mBAAmB,EACnB,iBAAiB,GACjB,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,14 +18,17 @@ 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.SharedMap = exports.SharedDirectory = exports.configuredSharedTree = exports.SharedTree = exports.onAssertionFailure = exports.ConnectionState = exports.AttachState = void 0;
21
+ exports.SharedString = exports.SharedMap = exports.SharedDirectory = exports.configuredSharedTree = exports.SharedTree = exports.onAssertionFailure = exports.getPresenceAlpha = exports.getPresence = 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");
25
25
  Object.defineProperty(exports, "ConnectionState", { enumerable: true, get: function () { return container_loader_1.ConnectionState; } });
26
+ var internal_1 = require("@fluidframework/fluid-static/internal");
27
+ Object.defineProperty(exports, "getPresence", { enumerable: true, get: function () { return internal_1.getPresence; } });
28
+ Object.defineProperty(exports, "getPresenceAlpha", { enumerable: true, get: function () { return internal_1.getPresenceAlpha; } });
26
29
  // This is an alpha API, but this package doesn't have an alpha entry point so its imported from "internal".
27
- var internal_1 = require("@fluidframework/core-utils/internal");
28
- Object.defineProperty(exports, "onAssertionFailure", { enumerable: true, get: function () { return internal_1.onAssertionFailure; } });
30
+ var internal_2 = require("@fluidframework/core-utils/internal");
31
+ Object.defineProperty(exports, "onAssertionFailure", { enumerable: true, get: function () { return internal_2.onAssertionFailure; } });
29
32
  // Let the tree package manage its own API surface.
30
33
  // Note: this only surfaces the `@public, @beta and @alpha` API items from the tree package.
31
34
  /* eslint-disable-next-line
@@ -34,18 +37,18 @@ Object.defineProperty(exports, "onAssertionFailure", { enumerable: true, get: fu
34
37
  import-x/export -- This re-exports all non-conflicting APIs from `@fluidframework/tree`. In cases where * exports conflict with named exports, the named exports take precedence per https://tc39.es/ecma262/multipage/ecmascript-language-scripts-and-modules.html#sec-getexportednames. This does trigger the `import-x/export` lint warning (which is intentionally disabled here). This approach ensures that the non-deprecated versions of the event APIs from `@fluidframework/core-interfaces` (provided as named indirect exports) eclipse the deprecated ones from `@fluidframework/tree`. The preferred versions of the event APIs are those exported via `@fluidframework/core-interfaces`.
35
38
  */
36
39
  __exportStar(require("@fluidframework/tree/alpha"), exports);
37
- const internal_2 = require("@fluidframework/tree/internal");
40
+ const internal_3 = require("@fluidframework/tree/internal");
38
41
  /**
39
42
  * A hierarchical data structure for collaboratively editing strongly typed JSON-like trees
40
43
  * of objects, arrays, and other data types.
41
44
  * @privateRemarks
42
- * Here we reexport SharedTree, but with the `@alpha` types (`ISharedObjectKind`) removed, just keeping the `SharedObjectKind`.
45
+ * Here we reexport SharedTree, but with the `@legacy` types (`ISharedObjectKind`) removed, just keeping the `SharedObjectKind`.
43
46
  * Doing this requires creating this new typed export rather than relying on a reexport directly from the tree package.
44
47
  * The tree package itself does not do this because it's API needs to be usable from the encapsulated API which requires `ISharedObjectKind`.
45
- * This package however is not intended for use by users of the encapsulated API, and therefor it can discard that interface.
48
+ * This package however is not intended for use by users of the encapsulated API, and therefore it can discard that interface.
46
49
  * @public
47
50
  */
48
- exports.SharedTree = internal_2.SharedTree;
51
+ exports.SharedTree = internal_3.SharedTree;
49
52
  /**
50
53
  * {@link SharedTree} but allowing a non-default configuration.
51
54
  * @remarks
@@ -72,13 +75,13 @@ exports.SharedTree = internal_2.SharedTree;
72
75
  * @alpha
73
76
  */
74
77
  function configuredSharedTree(options) {
75
- return (0, internal_2.configuredSharedTree)(options);
78
+ return (0, internal_3.configuredSharedTree)(options);
76
79
  }
77
80
  exports.configuredSharedTree = configuredSharedTree;
78
- var internal_3 = require("@fluidframework/map/internal");
79
- Object.defineProperty(exports, "SharedDirectory", { enumerable: true, get: function () { return internal_3.SharedDirectory; } });
80
- Object.defineProperty(exports, "SharedMap", { enumerable: true, get: function () { return internal_3.SharedMap; } });
81
- var internal_4 = require("@fluidframework/sequence/internal");
82
- Object.defineProperty(exports, "SharedString", { enumerable: true, get: function () { return internal_4.SharedString; } });
81
+ var internal_4 = require("@fluidframework/map/internal");
82
+ Object.defineProperty(exports, "SharedDirectory", { enumerable: true, get: function () { return internal_4.SharedDirectory; } });
83
+ Object.defineProperty(exports, "SharedMap", { enumerable: true, get: function () { return internal_4.SharedMap; } });
84
+ var internal_5 = require("@fluidframework/sequence/internal");
85
+ Object.defineProperty(exports, "SharedString", { enumerable: true, get: function () { return internal_5.SharedString; } });
83
86
  // #endregion Legacy exports
84
87
  //# sourceMappingURL=index.js.map
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;AA4CxB,4GAA4G;AAC5G,gEAAyE;AAAhE,8GAAA,kBAAkB,OAAA;AAI3B,mDAAmD;AACnD,4FAA4F;AAC5F;;;;MAIG;AACH,6DAA2C;AAU3C,4DAIuC;AAEvC;;;;;;;;;GASG;AACU,QAAA,UAAU,GAA4B,qBAAkB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;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;AA4BnC,8DAAiE;AAAxD,wGAAA,YAAY,OAAA;AAarB,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\t/* eslint-disable import-x/export -- The event APIs are known to conflict, and this is intended as the exports via `@fluidframework/core-interfaces` are preferred over the deprecated ones from `@fluidframework/tree`. */\n\tListeners,\n\tIsListener,\n\tListenable,\n\tOff,\n\t/* eslint-enable import-x/export */\n} from \"@fluidframework/core-interfaces\";\nexport type { ErasedBaseType } from \"@fluidframework/core-interfaces/internal\";\n\n// This is an alpha API, but this package doesn't have an alpha entry point so its imported from \"internal\".\nexport { onAssertionFailure } from \"@fluidframework/core-utils/internal\";\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\n\tno-restricted-syntax,\n\timport-x/no-internal-modules,\n\timport-x/export -- This re-exports all non-conflicting APIs from `@fluidframework/tree`. In cases where * exports conflict with named exports, the named exports take precedence per https://tc39.es/ecma262/multipage/ecmascript-language-scripts-and-modules.html#sec-getexportednames. This does trigger the `import-x/export` lint warning (which is intentionally disabled here). This approach ensures that the non-deprecated versions of the event APIs from `@fluidframework/core-interfaces` (provided as named indirect exports) eclipse the deprecated ones from `@fluidframework/tree`. The preferred versions of the event APIs are those exported via `@fluidframework/core-interfaces`.\n\t*/\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.\n * For example, it can be used to opt into extra validation or see if opting out of some optimizations fixes an issue.\n *\n * With great care, and knowledge of the support and stability of the options exposed here,\n * this can also be used to opt into some features early or for performance tuning.\n *\n * @example\n * ```typescript\n * import {\n * \tTreeCompressionStrategy,\n * \tconfiguredSharedTree,\n * \tFormatValidatorBasic,\n * \tForestTypeReference,\n * } from \"fluid-framework/alpha\";\n * const SharedTree = configuredSharedTree({\n * \tforest: ForestTypeReference,\n * \tjsonValidator: FormatValidatorBasic,\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\tIntervalStickiness,\n\tISequenceDeltaRange,\n\tISerializedInterval,\n\tISharedSegmentSequenceEvents,\n\tISharedString,\n\tSequencePlace,\n\tSharedStringSegment,\n\tSide,\n\tISharedSegmentSequence,\n\tISequenceIntervalCollection,\n\tISequenceIntervalCollectionEvents,\n\tSequenceIntervalIndex,\n} from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tIntervalType,\n\tSequenceDeltaEvent,\n\tSequenceEvent,\n\tSequenceInterval,\n\tSequenceMaintenanceEvent,\n} from \"@fluidframework/sequence/internal\";\n\nexport { SharedString } 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"]}
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;AAcxB,kEAAsF;AAA7E,uGAAA,WAAW,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAqCtC,4GAA4G;AAC5G,gEAAyE;AAAhE,8GAAA,kBAAkB,OAAA;AAI3B,mDAAmD;AACnD,4FAA4F;AAC5F;;;;MAIG;AACH,6DAA2C;AAU3C,4DAIuC;AAEvC;;;;;;;;;GASG;AACU,QAAA,UAAU,GAA4B,qBAAkB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;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;AA4BnC,8DAAiE;AAAxD,wGAAA,YAAY,OAAA;AAcrB,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 { getPresence, getPresenceAlpha } from \"@fluidframework/fluid-static/internal\";\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\t/* eslint-disable import-x/export -- The event APIs are known to conflict, and this is intended as the exports via `@fluidframework/core-interfaces` are preferred over the deprecated ones from `@fluidframework/tree`. */\n\tListeners,\n\tIsListener,\n\tListenable,\n\tOff,\n\t/* eslint-enable import-x/export */\n} from \"@fluidframework/core-interfaces\";\nexport type {\n\tErasedBaseType,\n\tFluidIterable,\n\tFluidIterableIterator,\n\tFluidMap,\n\tFluidReadonlyMap,\n} from \"@fluidframework/core-interfaces/internal\";\n\n// This is an alpha API, but this package doesn't have an alpha entry point so its imported from \"internal\".\nexport { onAssertionFailure } from \"@fluidframework/core-utils/internal\";\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\n\tno-restricted-syntax,\n\timport-x/no-internal-modules,\n\timport-x/export -- This re-exports all non-conflicting APIs from `@fluidframework/tree`. In cases where * exports conflict with named exports, the named exports take precedence per https://tc39.es/ecma262/multipage/ecmascript-language-scripts-and-modules.html#sec-getexportednames. This does trigger the `import-x/export` lint warning (which is intentionally disabled here). This approach ensures that the non-deprecated versions of the event APIs from `@fluidframework/core-interfaces` (provided as named indirect exports) eclipse the deprecated ones from `@fluidframework/tree`. The preferred versions of the event APIs are those exported via `@fluidframework/core-interfaces`.\n\t*/\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 `@legacy` 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 therefore 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.\n * For example, it can be used to opt into extra validation or see if opting out of some optimizations fixes an issue.\n *\n * With great care, and knowledge of the support and stability of the options exposed here,\n * this can also be used to opt into some features early or for performance tuning.\n *\n * @example\n * ```typescript\n * import {\n * \tTreeCompressionStrategy,\n * \tconfiguredSharedTree,\n * \tFormatValidatorBasic,\n * \tForestTypeReference,\n * } from \"fluid-framework/alpha\";\n * const SharedTree = configuredSharedTree({\n * \tforest: ForestTypeReference,\n * \tjsonValidator: FormatValidatorBasic,\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\tIntervalStickiness,\n\tISequenceDeltaRange,\n\tISerializedInterval,\n\tISharedSegmentSequenceEvents,\n\tISharedString,\n\tSequencePlace,\n\tSharedStringSegment,\n\tSide,\n\tISharedSegmentSequence,\n\tISequenceIntervalCollection,\n\tISequenceIntervalCollectionEvents,\n\tSequenceIntervalIndex,\n} from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tIntervalType,\n\tSequenceDeltaEvent,\n\tSequenceEvent,\n\tSequenceInterval,\n\tSequenceMaintenanceEvent,\n} from \"@fluidframework/sequence/internal\";\n\nexport { SharedString } from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tISharedObject,\n\tISharedObjectEvents,\n\tISharedObjectKind,\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/dist/legacy.d.ts CHANGED
@@ -131,6 +131,7 @@ export {
131
131
  ValidateRecursiveSchemaTemplate,
132
132
  ViewableTree,
133
133
  WithType,
134
+ getPresence,
134
135
  isFluidHandle,
135
136
  rollback,
136
137
  typeSchemaSymbol,
@@ -161,12 +162,17 @@ export {
161
162
  ErasedBaseType,
162
163
  ExtensibleUnionNode,
163
164
  FixRecursiveArraySchema,
165
+ FluidIterable,
166
+ FluidIterableIterator,
167
+ FluidMap,
168
+ FluidReadonlyMap,
164
169
  FluidSerializableAsTree,
165
170
  ForestOptions,
166
171
  ForestType,
167
172
  ForestTypeExpensiveDebug,
168
173
  ForestTypeOptimized,
169
174
  ForestTypeReference,
175
+ IdentifierIndex,
170
176
  JsonCompatible,
171
177
  JsonCompatibleObject,
172
178
  KeyEncodingOptions,
@@ -186,6 +192,9 @@ export {
186
192
  TreeBranch,
187
193
  TreeChangeEventsBeta,
188
194
  TreeEncodingOptions,
195
+ TreeIndex,
196
+ TreeIndexKey,
197
+ TreeIndexNodes,
189
198
  TreeRecordNode,
190
199
  TreeRecordNodeUnsafe,
191
200
  TreeViewBeta,
@@ -196,7 +205,9 @@ export {
196
205
  adaptEnum,
197
206
  asBeta,
198
207
  configuredSharedTreeBeta,
208
+ createIdentifierIndex,
199
209
  createIndependentTreeBeta,
210
+ createTreeIndex,
200
211
  enumFromStrings,
201
212
  singletonSchema,
202
213
  snapshotSchemaCompatibility,
@@ -217,6 +228,7 @@ export {
217
228
  ISharedMapEvents,
218
229
  ISharedObject,
219
230
  ISharedObjectEvents,
231
+ ISharedObjectKind,
220
232
  ISharedSegmentSequence,
221
233
  ISharedSegmentSequenceEvents,
222
234
  ISharedString,
package/dist/public.d.ts CHANGED
@@ -131,6 +131,7 @@ export {
131
131
  ValidateRecursiveSchemaTemplate,
132
132
  ViewableTree,
133
133
  WithType,
134
+ getPresence,
134
135
  isFluidHandle,
135
136
  rollback,
136
137
  typeSchemaSymbol
package/eslint.config.mts CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import type { Linter } from "eslint";
7
- import { strict } from "../../../common/build/eslint-config-fluid/flat.mts";
7
+ import { strict } from "@fluidframework/eslint-config-fluid/flat.mts";
8
8
 
9
9
  const config: Linter.Config[] = [...strict];
10
10