fluid-framework 2.30.0 → 2.31.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.
- package/CHANGELOG.md +1307 -1192
- package/api-extractor/api-extractor.current.json +0 -3
- package/api-report/fluid-framework.alpha.api.md +236 -88
- package/api-report/fluid-framework.beta.api.md +83 -58
- package/api-report/fluid-framework.legacy.alpha.api.md +141 -61
- package/api-report/fluid-framework.legacy.public.api.md +83 -58
- package/api-report/fluid-framework.public.api.md +83 -58
- package/dist/alpha.d.ts +27 -1
- package/dist/beta.d.ts +5 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +8 -1
- package/dist/public.d.ts +5 -1
- package/lib/alpha.d.ts +27 -1
- package/lib/beta.d.ts +5 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +8 -1
- package/lib/public.d.ts +5 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +13 -15
- package/src/index.ts +5 -0
- package/prettier.config.cjs +0 -8
|
@@ -87,7 +87,7 @@ type ExtractItemType<Item extends LazyItem> = Item extends () => infer Result ?
|
|
|
87
87
|
type FieldHasDefault<T extends ImplicitFieldSchema> = T extends FieldSchema<FieldKind.Optional | FieldKind.Identifier> ? true : false;
|
|
88
88
|
|
|
89
89
|
// @public @sealed
|
|
90
|
-
type FieldHasDefaultUnsafe<T extends
|
|
90
|
+
type FieldHasDefaultUnsafe<T extends ImplicitFieldSchemaUnsafe> = T extends FieldSchemaUnsafe<FieldKind.Optional | FieldKind.Identifier, ImplicitAllowedTypesUnsafe> ? true : false;
|
|
91
91
|
|
|
92
92
|
// @public
|
|
93
93
|
export enum FieldKind {
|
|
@@ -105,10 +105,14 @@ export interface FieldProps<TCustomMetadata = unknown> {
|
|
|
105
105
|
|
|
106
106
|
// @public @sealed
|
|
107
107
|
export class FieldSchema<out Kind extends FieldKind = FieldKind, out Types extends ImplicitAllowedTypes = ImplicitAllowedTypes, out TCustomMetadata = unknown> {
|
|
108
|
+
protected constructor(
|
|
109
|
+
kind: Kind,
|
|
110
|
+
allowedTypes: Types,
|
|
111
|
+
props?: FieldProps<TCustomMetadata> | undefined);
|
|
108
112
|
readonly allowedTypes: Types;
|
|
109
113
|
get allowedTypeSet(): ReadonlySet<TreeNodeSchema>;
|
|
110
114
|
readonly kind: Kind;
|
|
111
|
-
get metadata(): FieldSchemaMetadata<TCustomMetadata
|
|
115
|
+
get metadata(): FieldSchemaMetadata<TCustomMetadata>;
|
|
112
116
|
readonly props?: FieldProps<TCustomMetadata> | undefined;
|
|
113
117
|
readonly requiresValue: boolean;
|
|
114
118
|
protected _typeCheck: MakeNominal;
|
|
@@ -120,8 +124,8 @@ export interface FieldSchemaMetadata<TCustomMetadata = unknown> {
|
|
|
120
124
|
readonly description?: string | undefined;
|
|
121
125
|
}
|
|
122
126
|
|
|
123
|
-
// @public
|
|
124
|
-
export interface FieldSchemaUnsafe<out Kind extends FieldKind, out Types extends
|
|
127
|
+
// @public @sealed
|
|
128
|
+
export interface FieldSchemaUnsafe<out Kind extends FieldKind, out Types extends ImplicitAllowedTypesUnsafe, out TCustomMetadata = unknown> extends FieldSchema<Kind, any, TCustomMetadata> {
|
|
125
129
|
readonly allowedTypes: Types;
|
|
126
130
|
readonly allowedTypeSet: ReadonlySet<TreeNodeSchema>;
|
|
127
131
|
readonly kind: Kind;
|
|
@@ -402,9 +406,15 @@ export interface IMember {
|
|
|
402
406
|
// @public
|
|
403
407
|
export type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema;
|
|
404
408
|
|
|
409
|
+
// @public
|
|
410
|
+
export type ImplicitAllowedTypesUnsafe = TreeNodeSchemaUnsafe | readonly LazyItem<Unenforced<TreeNodeSchema>>[];
|
|
411
|
+
|
|
405
412
|
// @public
|
|
406
413
|
export type ImplicitFieldSchema = FieldSchema | ImplicitAllowedTypes;
|
|
407
414
|
|
|
415
|
+
// @public
|
|
416
|
+
export type ImplicitFieldSchemaUnsafe = FieldSchemaUnsafe<FieldKind, ImplicitAllowedTypesUnsafe> | ImplicitAllowedTypesUnsafe;
|
|
417
|
+
|
|
408
418
|
// @public
|
|
409
419
|
export type InitialObjects<T extends ContainerSchema> = {
|
|
410
420
|
[K in keyof T["initialObjects"]]: T["initialObjects"][K] extends SharedObjectKind<infer TChannel> ? TChannel : never;
|
|
@@ -417,24 +427,26 @@ type _InlineTrick = 0;
|
|
|
417
427
|
export type Input<T extends never> = T;
|
|
418
428
|
|
|
419
429
|
// @public
|
|
420
|
-
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> =
|
|
430
|
+
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = RestrictiveStringRecord<ImplicitFieldSchema> extends T ? {
|
|
431
|
+
arbitraryKey: "arbitraryValue";
|
|
432
|
+
} extends T ? Record<string, never> : never : FlattenKeys<{
|
|
421
433
|
readonly [Property in keyof T]?: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
422
434
|
} & {
|
|
423
435
|
readonly [Property in keyof T as FieldHasDefault<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
424
436
|
}>;
|
|
425
437
|
|
|
426
438
|
// @public
|
|
427
|
-
export type InsertableObjectFromSchemaRecordUnsafe<T extends
|
|
428
|
-
readonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property]> extends false ? Property : never]: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property]>;
|
|
439
|
+
export type InsertableObjectFromSchemaRecordUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>> = {
|
|
440
|
+
readonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property & string]>;
|
|
429
441
|
} & {
|
|
430
|
-
readonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property]> extends true ? Property : never]?: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property]>;
|
|
442
|
+
readonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property & string]> extends true ? Property : never]?: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property & string]>;
|
|
431
443
|
};
|
|
432
444
|
|
|
433
445
|
// @public
|
|
434
446
|
export type InsertableTreeFieldFromImplicitField<TSchemaInput extends ImplicitFieldSchema, TSchema = UnionToIntersection<TSchemaInput>> = [TSchema] extends [FieldSchema<infer Kind, infer Types>] ? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypes<Types>, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TSchema> : never;
|
|
435
447
|
|
|
436
448
|
// @public
|
|
437
|
-
export type InsertableTreeFieldFromImplicitFieldUnsafe<TSchemaInput extends
|
|
449
|
+
export type InsertableTreeFieldFromImplicitFieldUnsafe<TSchemaInput extends ImplicitFieldSchemaUnsafe, TSchema = UnionToIntersection<TSchemaInput>> = [TSchema] extends [FieldSchemaUnsafe<infer Kind, infer Types>] ? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TSchema> : never;
|
|
438
450
|
|
|
439
451
|
// @public
|
|
440
452
|
export type InsertableTreeNodeFromAllowedTypes<TList extends AllowedTypes> = TList extends readonly [
|
|
@@ -443,7 +455,7 @@ LazyItem<infer TSchema extends TreeNodeSchema>,
|
|
|
443
455
|
] ? InsertableTypedNode<TSchema> | InsertableTreeNodeFromAllowedTypes<Rest> : never;
|
|
444
456
|
|
|
445
457
|
// @public
|
|
446
|
-
export type InsertableTreeNodeFromAllowedTypesUnsafe<TList extends
|
|
458
|
+
export type InsertableTreeNodeFromAllowedTypesUnsafe<TList extends AllowedTypesUnsafe> = TList extends readonly [
|
|
447
459
|
LazyItem<infer TSchema extends TreeNodeSchemaUnsafe>,
|
|
448
460
|
...infer Rest extends AllowedTypesUnsafe
|
|
449
461
|
] ? InsertableTypedNodeUnsafe<TSchema> | InsertableTreeNodeFromAllowedTypesUnsafe<Rest> : never;
|
|
@@ -454,13 +466,13 @@ TSchema
|
|
|
454
466
|
] extends [TreeNodeSchema] ? InsertableTypedNode<TSchema> : [TSchema] extends [AllowedTypes] ? InsertableTreeNodeFromAllowedTypes<TSchema> : never;
|
|
455
467
|
|
|
456
468
|
// @public
|
|
457
|
-
export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TSchema extends
|
|
469
|
+
export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TSchema extends ImplicitAllowedTypesUnsafe> = [TSchema] extends [TreeNodeSchemaUnsafe] ? InsertableTypedNodeUnsafe<TSchema> : [TSchema] extends [AllowedTypesUnsafe] ? InsertableTreeNodeFromAllowedTypesUnsafe<TSchema> : never;
|
|
458
470
|
|
|
459
471
|
// @public
|
|
460
472
|
export type InsertableTypedNode<TSchema extends TreeNodeSchema, T = UnionToIntersection<TSchema>> = (T extends TreeNodeSchema<string, NodeKind, TreeNode | TreeLeafValue, never, true> ? NodeBuilderData<T> : never) | (T extends TreeNodeSchema ? Unhydrated<TreeNode extends NodeFromSchema<T> ? never : NodeFromSchema<T>> : never);
|
|
461
473
|
|
|
462
474
|
// @public
|
|
463
|
-
type InsertableTypedNodeUnsafe<TSchema extends
|
|
475
|
+
type InsertableTypedNodeUnsafe<TSchema extends TreeNodeSchemaUnsafe, T = UnionToIntersection<TSchema>> = (T extends TreeNodeSchemaUnsafe<string, NodeKind, TreeNode | TreeLeafValue, never, true> ? NodeBuilderDataUnsafe<T> : never) | (T extends TreeNodeSchemaUnsafe ? NodeFromSchemaUnsafe<T> : never);
|
|
464
476
|
|
|
465
477
|
// @public @sealed
|
|
466
478
|
export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> {
|
|
@@ -560,6 +572,10 @@ export interface ITreeViewConfiguration<TSchema extends ImplicitFieldSchema = Im
|
|
|
560
572
|
// @public
|
|
561
573
|
export type LazyItem<Item = unknown> = Item | (() => Item);
|
|
562
574
|
|
|
575
|
+
// @public @sealed
|
|
576
|
+
export interface LeafSchema<Name extends string, T extends TreeLeafValue> extends TreeNodeSchemaNonClass<`com.fluidframework.leaf.${Name}`, NodeKind.Leaf, T, T, true> {
|
|
577
|
+
}
|
|
578
|
+
|
|
563
579
|
// @public @sealed
|
|
564
580
|
export interface Listenable<TListeners extends object> {
|
|
565
581
|
off<K extends keyof Listeners<TListeners>>(eventName: K, listener: TListeners[K]): void;
|
|
@@ -626,13 +642,13 @@ export interface NodeSchemaOptions<out TCustomMetadata = unknown> {
|
|
|
626
642
|
}
|
|
627
643
|
|
|
628
644
|
// @public
|
|
629
|
-
type ObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = {
|
|
645
|
+
type ObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = RestrictiveStringRecord<ImplicitFieldSchema> extends T ? {} : {
|
|
630
646
|
-readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField<T[Property]> : unknown;
|
|
631
647
|
};
|
|
632
648
|
|
|
633
649
|
// @public
|
|
634
|
-
type ObjectFromSchemaRecordUnsafe<T extends
|
|
635
|
-
-readonly [Property in keyof T]: TreeFieldFromImplicitFieldUnsafe<T[Property]
|
|
650
|
+
type ObjectFromSchemaRecordUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>> = {
|
|
651
|
+
-readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitFieldUnsafe<T[Property]> : unknown;
|
|
636
652
|
};
|
|
637
653
|
|
|
638
654
|
// @public
|
|
@@ -643,7 +659,7 @@ export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends Rea
|
|
|
643
659
|
}
|
|
644
660
|
|
|
645
661
|
// @public @sealed
|
|
646
|
-
interface ReadonlyMapInlined<K, T extends
|
|
662
|
+
interface ReadonlyMapInlined<K, T extends ImplicitAllowedTypesUnsafe> {
|
|
647
663
|
[Symbol.iterator](): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
|
|
648
664
|
entries(): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
|
|
649
665
|
// (undocumented)
|
|
@@ -721,24 +737,24 @@ export interface SchemaCompatibilityStatus {
|
|
|
721
737
|
}
|
|
722
738
|
|
|
723
739
|
// @public @sealed
|
|
724
|
-
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> {
|
|
740
|
+
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> implements SchemaStatics {
|
|
725
741
|
constructor(
|
|
726
742
|
scope: TScope);
|
|
727
743
|
array<const T extends TreeNodeSchema | readonly TreeNodeSchema[]>(allowedTypes: T): TreeNodeSchemaNonClass<ScopedSchemaName<TScope, `Array<${string}>`>, NodeKind.Array, TreeArrayNode<T> & WithType<ScopedSchemaName<TScope, `Array<${string}>`>, NodeKind.Array>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, true, T, undefined>;
|
|
728
744
|
array<const Name extends TName, const T extends ImplicitAllowedTypes>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Array, TreeArrayNode<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Array>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, true, T, undefined>;
|
|
729
|
-
arrayRecursive<const Name extends TName, const T extends
|
|
745
|
+
arrayRecursive<const Name extends TName, const T extends ImplicitAllowedTypesUnsafe>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Array, TreeArrayNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Array, unknown>, {
|
|
730
746
|
[Symbol.iterator](): Iterator<InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
731
747
|
}, false, T, undefined>;
|
|
732
|
-
readonly boolean:
|
|
733
|
-
static readonly boolean:
|
|
734
|
-
readonly handle:
|
|
735
|
-
static readonly handle:
|
|
748
|
+
readonly boolean: LeafSchema<"boolean", boolean>;
|
|
749
|
+
static readonly boolean: LeafSchema<"boolean", boolean>;
|
|
750
|
+
readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
751
|
+
static readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
736
752
|
get identifier(): FieldSchema<FieldKind.Identifier, typeof SchemaFactory.string>;
|
|
737
|
-
readonly leaves: readonly [
|
|
738
|
-
static readonly leaves: readonly [
|
|
753
|
+
readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
754
|
+
static readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
739
755
|
map<const T extends TreeNodeSchema | readonly TreeNodeSchema[]>(allowedTypes: T): TreeNodeSchemaNonClass<ScopedSchemaName<TScope, `Map<${string}>`>, NodeKind.Map, TreeMapNode<T> & WithType<ScopedSchemaName<TScope, `Map<${string}>`>, NodeKind.Map>, MapNodeInsertableData<T>, true, T, undefined>;
|
|
740
756
|
map<Name extends TName, const T extends ImplicitAllowedTypes>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Map, TreeMapNode<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Map>, MapNodeInsertableData<T>, true, T, undefined>;
|
|
741
|
-
mapRecursive<Name extends TName, const T extends
|
|
757
|
+
mapRecursive<Name extends TName, const T extends ImplicitAllowedTypesUnsafe>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Map, TreeMapNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Map, unknown>, {
|
|
742
758
|
[Symbol.iterator](): Iterator<[
|
|
743
759
|
string,
|
|
744
760
|
InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>
|
|
@@ -746,38 +762,44 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
746
762
|
} | {
|
|
747
763
|
readonly [x: string]: InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
748
764
|
}, false, T, undefined>;
|
|
749
|
-
readonly null:
|
|
750
|
-
static readonly null:
|
|
751
|
-
readonly number:
|
|
752
|
-
static readonly number:
|
|
765
|
+
readonly null: LeafSchema<"null", null>;
|
|
766
|
+
static readonly null: LeafSchema<"null", null>;
|
|
767
|
+
readonly number: LeafSchema<"number", number>;
|
|
768
|
+
static readonly number: LeafSchema<"number", number>;
|
|
753
769
|
object<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitFieldSchema>>(name: Name, fields: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, TreeObjectNode<T, ScopedSchemaName<TScope, Name>>, object & InsertableObjectFromSchemaRecord<T>, true, T>;
|
|
754
|
-
objectRecursive<const Name extends TName, const T extends
|
|
770
|
+
objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>>(name: Name, t: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & InsertableObjectFromSchemaRecordUnsafe<T>, false, T>;
|
|
755
771
|
readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
756
772
|
static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
757
|
-
readonly optionalRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<
|
|
758
|
-
static readonly optionalRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<
|
|
773
|
+
readonly optionalRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
774
|
+
static readonly optionalRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
759
775
|
readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
760
776
|
static readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
761
|
-
readonly requiredRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<
|
|
762
|
-
static readonly requiredRecursive: <const T extends unknown>(t: T, props?: Omit<FieldProps<
|
|
777
|
+
readonly requiredRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
778
|
+
static readonly requiredRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
763
779
|
readonly scope: TScope;
|
|
764
|
-
readonly string:
|
|
765
|
-
static readonly string:
|
|
780
|
+
readonly string: LeafSchema<"string", string>;
|
|
781
|
+
static readonly string: LeafSchema<"string", string>;
|
|
766
782
|
}
|
|
767
783
|
|
|
768
784
|
// @public @sealed
|
|
769
|
-
export
|
|
770
|
-
readonly
|
|
771
|
-
readonly
|
|
772
|
-
readonly
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
785
|
+
export interface SchemaStatics {
|
|
786
|
+
readonly boolean: LeafSchema<"boolean", boolean>;
|
|
787
|
+
readonly handle: LeafSchema<"handle", IFluidHandle>;
|
|
788
|
+
readonly leaves: readonly [
|
|
789
|
+
SchemaStatics["string"],
|
|
790
|
+
SchemaStatics["number"],
|
|
791
|
+
SchemaStatics["boolean"],
|
|
792
|
+
SchemaStatics["null"],
|
|
793
|
+
SchemaStatics["handle"]
|
|
794
|
+
];
|
|
795
|
+
readonly null: LeafSchema<"null", null>;
|
|
796
|
+
readonly number: LeafSchema<"number", number>;
|
|
776
797
|
readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
777
|
-
readonly
|
|
778
|
-
readonly
|
|
779
|
-
readonly requiredRecursive: <const
|
|
780
|
-
|
|
798
|
+
readonly optionalRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
799
|
+
readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
800
|
+
readonly requiredRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
801
|
+
readonly string: LeafSchema<"string", string>;
|
|
802
|
+
}
|
|
781
803
|
|
|
782
804
|
// @public
|
|
783
805
|
type ScopedSchemaName<TScope extends string | undefined, TName extends number | string> = TScope extends undefined ? `${TName}` : `${TScope}.${TName}`;
|
|
@@ -790,6 +812,12 @@ export interface SharedObjectKind<out TSharedObject = unknown> extends ErasedTyp
|
|
|
790
812
|
// @public
|
|
791
813
|
export const SharedTree: SharedObjectKind<ITree>;
|
|
792
814
|
|
|
815
|
+
// @public @sealed
|
|
816
|
+
export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCustomMetadata = unknown> {
|
|
817
|
+
readonly kind: TNodeKind;
|
|
818
|
+
readonly metadata: NodeSchemaMetadata<TCustomMetadata>;
|
|
819
|
+
}
|
|
820
|
+
|
|
793
821
|
// @public
|
|
794
822
|
export interface Tagged<V, T extends string = string> {
|
|
795
823
|
// (undocumented)
|
|
@@ -817,7 +845,7 @@ interface TreeApi extends TreeNodeApi {
|
|
|
817
845
|
}
|
|
818
846
|
|
|
819
847
|
// @public @sealed
|
|
820
|
-
export interface TreeArrayNode<TAllowedTypes extends
|
|
848
|
+
export interface TreeArrayNode<TAllowedTypes extends ImplicitAllowedTypesUnsafe = ImplicitAllowedTypes, out T = [TAllowedTypes] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TAllowedTypes> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, in TNew = [TAllowedTypes] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TAllowedTypes> : InsertableTreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, in TMoveFrom = ReadonlyArrayNode> extends ReadonlyArrayNode<T> {
|
|
821
849
|
insertAt(index: number, ...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
|
|
822
850
|
insertAtEnd(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
|
|
823
851
|
insertAtStart(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
|
|
@@ -844,7 +872,7 @@ export const TreeArrayNode: {
|
|
|
844
872
|
};
|
|
845
873
|
|
|
846
874
|
// @public @sealed
|
|
847
|
-
export interface TreeArrayNodeUnsafe<TAllowedTypes extends
|
|
875
|
+
export interface TreeArrayNodeUnsafe<TAllowedTypes extends ImplicitAllowedTypesUnsafe> extends TreeArrayNode<TAllowedTypes, TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>, InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>> {
|
|
848
876
|
}
|
|
849
877
|
|
|
850
878
|
// @public @sealed
|
|
@@ -857,7 +885,7 @@ export interface TreeChangeEvents {
|
|
|
857
885
|
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;
|
|
858
886
|
|
|
859
887
|
// @public
|
|
860
|
-
type TreeFieldFromImplicitFieldUnsafe<TSchema extends
|
|
888
|
+
type TreeFieldFromImplicitFieldUnsafe<TSchema extends ImplicitFieldSchemaUnsafe> = TSchema extends FieldSchemaUnsafe<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind> : TSchema extends ImplicitAllowedTypesUnsafe ? TreeNodeFromImplicitAllowedTypesUnsafe<TSchema> : unknown;
|
|
861
889
|
|
|
862
890
|
// @public
|
|
863
891
|
export type TreeLeafValue = number | string | boolean | IFluidHandle | null;
|
|
@@ -873,7 +901,7 @@ export interface TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTyp
|
|
|
873
901
|
}
|
|
874
902
|
|
|
875
903
|
// @public @sealed
|
|
876
|
-
export interface TreeMapNodeUnsafe<T extends
|
|
904
|
+
export interface TreeMapNodeUnsafe<T extends ImplicitAllowedTypesUnsafe> extends ReadonlyMapInlined<string, T>, TreeNode {
|
|
877
905
|
delete(key: string): void;
|
|
878
906
|
set(key: string, value: InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined): void;
|
|
879
907
|
}
|
|
@@ -903,7 +931,7 @@ export interface TreeNodeApi {
|
|
|
903
931
|
export type TreeNodeFromImplicitAllowedTypes<TSchema extends ImplicitAllowedTypes = TreeNodeSchema> = TSchema extends TreeNodeSchema ? NodeFromSchema<TSchema> : TSchema extends AllowedTypes ? NodeFromSchema<FlexListToUnion<TSchema>> : unknown;
|
|
904
932
|
|
|
905
933
|
// @public
|
|
906
|
-
type TreeNodeFromImplicitAllowedTypesUnsafe<TSchema extends
|
|
934
|
+
type TreeNodeFromImplicitAllowedTypesUnsafe<TSchema extends ImplicitAllowedTypesUnsafe> = TSchema extends TreeNodeSchemaUnsafe ? NodeFromSchemaUnsafe<TSchema> : TSchema extends AllowedTypesUnsafe ? NodeFromSchemaUnsafe<FlexListToUnion<TSchema>> : unknown;
|
|
907
935
|
|
|
908
936
|
// @public @sealed
|
|
909
937
|
export type TreeNodeSchema<Name extends string = string, Kind extends NodeKind = NodeKind, TNode extends TreeNode | TreeLeafValue = TreeNode | TreeLeafValue, TBuild = never, ImplicitlyConstructable extends boolean = boolean, Info = unknown, TCustomMetadata = unknown> = (TNode extends TreeNode ? TreeNodeSchemaClass<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info, never, TCustomMetadata> : never) | TreeNodeSchemaNonClass<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info, never, TCustomMetadata>;
|
|
@@ -916,22 +944,19 @@ export type TreeNodeSchemaClass<Name extends string = string, Kind extends NodeK
|
|
|
916
944
|
});
|
|
917
945
|
|
|
918
946
|
// @public
|
|
919
|
-
export interface TreeNodeSchemaClassUnsafe<out Name extends string, out Kind extends NodeKind, out TNode extends Unenforced<TreeNode>, in TInsertable, out ImplicitlyConstructable extends boolean, out Info> extends TreeNodeSchemaCore<Name, Kind, ImplicitlyConstructable, Info> {
|
|
947
|
+
export interface TreeNodeSchemaClassUnsafe<out Name extends string, out Kind extends NodeKind, out TNode extends Unenforced<TreeNode>, in TInsertable, out ImplicitlyConstructable extends boolean, out Info, out TCustomMetadata = unknown> extends TreeNodeSchemaCore<Name, Kind, ImplicitlyConstructable, Info, never, TCustomMetadata> {
|
|
920
948
|
// @sealed
|
|
921
949
|
new (data: TInsertable | InternalTreeNode): Unhydrated<TNode>;
|
|
922
950
|
}
|
|
923
951
|
|
|
924
952
|
// @public @sealed
|
|
925
|
-
export interface TreeNodeSchemaCore<out Name extends string, out Kind extends NodeKind, out ImplicitlyConstructable extends boolean, out Info = unknown, out TInsertable = never, out TCustomMetadata = unknown> {
|
|
953
|
+
export interface TreeNodeSchemaCore<out Name extends string, out Kind extends NodeKind, out ImplicitlyConstructable extends boolean, out Info = unknown, out TInsertable = never, out TCustomMetadata = unknown> extends SimpleNodeSchemaBase<Kind, TCustomMetadata> {
|
|
926
954
|
readonly childTypes: ReadonlySet<TreeNodeSchema>;
|
|
927
955
|
// @sealed
|
|
928
956
|
createFromInsertable(data: TInsertable): Unhydrated<TreeNode | TreeLeafValue>;
|
|
929
957
|
readonly identifier: Name;
|
|
930
958
|
readonly implicitlyConstructable: ImplicitlyConstructable;
|
|
931
959
|
readonly info: Info;
|
|
932
|
-
// (undocumented)
|
|
933
|
-
readonly kind: Kind;
|
|
934
|
-
readonly metadata?: NodeSchemaMetadata<TCustomMetadata> | undefined;
|
|
935
960
|
}
|
|
936
961
|
|
|
937
962
|
// @public @sealed
|
|
@@ -954,7 +979,7 @@ type TreeNodeSchemaUnsafe<Name extends string = string, Kind extends NodeKind =
|
|
|
954
979
|
export type TreeObjectNode<T extends RestrictiveStringRecord<ImplicitFieldSchema>, TypeName extends string = string> = TreeNode & ObjectFromSchemaRecord<T> & WithType<TypeName, NodeKind.Object, T>;
|
|
955
980
|
|
|
956
981
|
// @public
|
|
957
|
-
export type TreeObjectNodeUnsafe<T extends
|
|
982
|
+
export type TreeObjectNodeUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>, TypeName extends string = string> = TreeNode & ObjectFromSchemaRecordUnsafe<T> & WithType<TypeName, NodeKind.Object, T>;
|
|
958
983
|
|
|
959
984
|
// @public
|
|
960
985
|
export enum TreeStatus {
|
package/dist/alpha.d.ts
CHANGED
|
@@ -59,7 +59,9 @@ export {
|
|
|
59
59
|
ITreeConfigurationOptions,
|
|
60
60
|
ITreeViewConfiguration,
|
|
61
61
|
ImplicitAllowedTypes,
|
|
62
|
+
ImplicitAllowedTypesUnsafe,
|
|
62
63
|
ImplicitFieldSchema,
|
|
64
|
+
ImplicitFieldSchemaUnsafe,
|
|
63
65
|
InitialObjects,
|
|
64
66
|
Input,
|
|
65
67
|
InsertableObjectFromSchemaRecordUnsafe,
|
|
@@ -74,6 +76,7 @@ export {
|
|
|
74
76
|
IsListener,
|
|
75
77
|
IterableTreeArrayContent,
|
|
76
78
|
LazyItem,
|
|
79
|
+
LeafSchema,
|
|
77
80
|
Listenable,
|
|
78
81
|
Listeners,
|
|
79
82
|
MakeNominal,
|
|
@@ -96,8 +99,10 @@ export {
|
|
|
96
99
|
RunTransaction,
|
|
97
100
|
SchemaCompatibilityStatus,
|
|
98
101
|
SchemaFactory,
|
|
102
|
+
SchemaStatics,
|
|
99
103
|
SharedObjectKind,
|
|
100
104
|
SharedTree,
|
|
105
|
+
SimpleNodeSchemaBase,
|
|
101
106
|
Tagged,
|
|
102
107
|
TelemetryBaseEventPropertyType,
|
|
103
108
|
TransactionConstraint,
|
|
@@ -132,7 +137,6 @@ export {
|
|
|
132
137
|
WithType,
|
|
133
138
|
isFluidHandle,
|
|
134
139
|
rollback,
|
|
135
|
-
schemaStatics,
|
|
136
140
|
typeSchemaSymbol,
|
|
137
141
|
|
|
138
142
|
// @beta APIs
|
|
@@ -141,11 +145,17 @@ export {
|
|
|
141
145
|
TreeChangeEventsBeta,
|
|
142
146
|
|
|
143
147
|
// @alpha APIs
|
|
148
|
+
ArrayNodeCustomizableSchema,
|
|
149
|
+
ArrayNodeCustomizableSchemaUnsafe,
|
|
150
|
+
ArrayNodePojoEmulationSchema,
|
|
151
|
+
ArrayNodeSchema,
|
|
144
152
|
BranchableTree,
|
|
145
153
|
ConciseTree,
|
|
146
154
|
EncodeOptions,
|
|
147
155
|
FactoryContent,
|
|
148
156
|
FactoryContentObject,
|
|
157
|
+
FieldSchemaAlpha,
|
|
158
|
+
FieldSchemaAlphaUnsafe,
|
|
149
159
|
FixRecursiveArraySchema,
|
|
150
160
|
FluidClientVersion,
|
|
151
161
|
ForestOptions,
|
|
@@ -177,6 +187,11 @@ export {
|
|
|
177
187
|
JsonSchemaType,
|
|
178
188
|
JsonTreeSchema,
|
|
179
189
|
JsonValidator,
|
|
190
|
+
MapNodeCustomizableSchema,
|
|
191
|
+
MapNodeCustomizableSchemaUnsafe,
|
|
192
|
+
MapNodePojoEmulationSchema,
|
|
193
|
+
MapNodeSchema,
|
|
194
|
+
ObjectNodeSchema,
|
|
180
195
|
ParseOptions,
|
|
181
196
|
PopUnion,
|
|
182
197
|
ReadSchema,
|
|
@@ -190,7 +205,15 @@ export {
|
|
|
190
205
|
SharedTreeFormatOptions,
|
|
191
206
|
SharedTreeFormatVersion,
|
|
192
207
|
SharedTreeOptions,
|
|
208
|
+
SimpleArrayNodeSchema,
|
|
209
|
+
SimpleFieldSchema,
|
|
210
|
+
SimpleLeafNodeSchema,
|
|
211
|
+
SimpleMapNodeSchema,
|
|
212
|
+
SimpleNodeSchema,
|
|
213
|
+
SimpleObjectFieldSchema,
|
|
214
|
+
SimpleObjectNodeSchema,
|
|
193
215
|
SimpleTreeIndex,
|
|
216
|
+
SimpleTreeSchema,
|
|
194
217
|
TransactionCallbackStatus,
|
|
195
218
|
TransactionResult,
|
|
196
219
|
TransactionResultExt,
|
|
@@ -207,6 +230,7 @@ export {
|
|
|
207
230
|
TreeViewAlpha,
|
|
208
231
|
UnionToTuple,
|
|
209
232
|
UnsafeUnknownSchema,
|
|
233
|
+
ValueSchema,
|
|
210
234
|
VerboseTree,
|
|
211
235
|
VerboseTreeNode,
|
|
212
236
|
ViewContent,
|
|
@@ -221,11 +245,13 @@ export {
|
|
|
221
245
|
enumFromStrings,
|
|
222
246
|
evaluateLazySchema,
|
|
223
247
|
extractPersistedSchema,
|
|
248
|
+
generateSchemaFromSimpleSchema,
|
|
224
249
|
getBranch,
|
|
225
250
|
getJsonSchema,
|
|
226
251
|
independentInitializedView,
|
|
227
252
|
independentView,
|
|
228
253
|
noopValidator,
|
|
254
|
+
onAssertionFailure,
|
|
229
255
|
replaceConciseTreeHandles,
|
|
230
256
|
replaceHandles,
|
|
231
257
|
replaceVerboseTreeHandles,
|
package/dist/beta.d.ts
CHANGED
|
@@ -59,7 +59,9 @@ export {
|
|
|
59
59
|
ITreeConfigurationOptions,
|
|
60
60
|
ITreeViewConfiguration,
|
|
61
61
|
ImplicitAllowedTypes,
|
|
62
|
+
ImplicitAllowedTypesUnsafe,
|
|
62
63
|
ImplicitFieldSchema,
|
|
64
|
+
ImplicitFieldSchemaUnsafe,
|
|
63
65
|
InitialObjects,
|
|
64
66
|
Input,
|
|
65
67
|
InsertableObjectFromSchemaRecordUnsafe,
|
|
@@ -74,6 +76,7 @@ export {
|
|
|
74
76
|
IsListener,
|
|
75
77
|
IterableTreeArrayContent,
|
|
76
78
|
LazyItem,
|
|
79
|
+
LeafSchema,
|
|
77
80
|
Listenable,
|
|
78
81
|
Listeners,
|
|
79
82
|
MakeNominal,
|
|
@@ -96,8 +99,10 @@ export {
|
|
|
96
99
|
RunTransaction,
|
|
97
100
|
SchemaCompatibilityStatus,
|
|
98
101
|
SchemaFactory,
|
|
102
|
+
SchemaStatics,
|
|
99
103
|
SharedObjectKind,
|
|
100
104
|
SharedTree,
|
|
105
|
+
SimpleNodeSchemaBase,
|
|
101
106
|
Tagged,
|
|
102
107
|
TelemetryBaseEventPropertyType,
|
|
103
108
|
TransactionConstraint,
|
|
@@ -132,7 +137,6 @@ export {
|
|
|
132
137
|
WithType,
|
|
133
138
|
isFluidHandle,
|
|
134
139
|
rollback,
|
|
135
|
-
schemaStatics,
|
|
136
140
|
typeSchemaSymbol,
|
|
137
141
|
|
|
138
142
|
// @beta APIs
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type { SharedObjectKind } from "@fluidframework/shared-object-base";
|
|
|
17
17
|
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
18
|
FluidObjectProviderKeys, // Used by FluidObject
|
|
19
19
|
Listeners, IsListener, Listenable, Off, } from "@fluidframework/core-interfaces";
|
|
20
|
+
export { onAssertionFailure } from "@fluidframework/core-utils/internal";
|
|
20
21
|
export type { isFluidHandle } from "@fluidframework/runtime-utils";
|
|
21
22
|
export * from "@fluidframework/tree/alpha";
|
|
22
23
|
import type { SharedObjectKind } from "@fluidframework/shared-object-base";
|
|
@@ -56,7 +57,7 @@ export declare const SharedTree: SharedObjectKind<ITree>;
|
|
|
56
57
|
export declare function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree>;
|
|
57
58
|
export type { IDirectory, IDirectoryEvents, IDirectoryValueChanged, ISharedDirectory, ISharedDirectoryEvents, ISharedMap, ISharedMapEvents, IValueChanged, } from "@fluidframework/map/internal";
|
|
58
59
|
export { SharedDirectory, SharedMap } from "@fluidframework/map/internal";
|
|
59
|
-
export type { DeserializeCallback, InteriorSequencePlace, IInterval, IIntervalCollectionEvent, IIntervalCollection, IntervalIndex, IntervalStickiness, ISequenceDeltaRange, ISerializableInterval, ISerializedInterval, ISharedIntervalCollection, ISharedSegmentSequenceEvents, ISharedString, SequencePlace, SharedStringSegment, Side, ISharedSegmentSequence, } from "@fluidframework/sequence/internal";
|
|
60
|
+
export type { DeserializeCallback, InteriorSequencePlace, IInterval, IIntervalCollectionEvent, IIntervalCollection, IntervalIndex, IntervalStickiness, ISequenceDeltaRange, ISerializableInterval, ISerializedInterval, ISharedIntervalCollection, ISharedSegmentSequenceEvents, ISharedString, SequencePlace, SharedStringSegment, Side, ISharedSegmentSequence, ISequenceIntervalCollection, ISequenceIntervalCollectionEvents, SequenceIntervalIndex, } from "@fluidframework/sequence/internal";
|
|
60
61
|
export type { IntervalType, SequenceDeltaEvent, SequenceEvent, SequenceInterval, SequenceMaintenanceEvent, } from "@fluidframework/sequence/internal";
|
|
61
62
|
export { SharedString } from "@fluidframework/sequence/internal";
|
|
62
63
|
export type { ISharedObject, ISharedObjectEvents, } from "@fluidframework/shared-object-base/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,EAAE,sBAAsB;AAE/C,SAAS,EACT,UAAU,EACV,UAAU,EACV,GAAG,GAEH,MAAM,iCAAiC,CAAC;AAEzC,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;;;;;;;;;;;;;;;;;;;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,
|
|
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;AAEzC,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;;;;;;;;;;;;;;;;;;;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,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"}
|
package/dist/index.js
CHANGED
|
@@ -18,11 +18,14 @@ 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.ConnectionState = exports.AttachState = void 0;
|
|
21
|
+
exports.SharedString = exports.SharedMap = exports.SharedDirectory = exports.configuredSharedTree = exports.SharedTree = exports.onAssertionFailure = 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
|
+
// 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; } });
|
|
26
29
|
// Let the tree package manage its own API surface.
|
|
27
30
|
// Note: this only surfaces the `@public, @beta and @alpha` API items from the tree package.
|
|
28
31
|
/* eslint-disable-next-line
|
|
@@ -31,7 +34,7 @@ Object.defineProperty(exports, "ConnectionState", { enumerable: true, get: funct
|
|
|
31
34
|
import/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/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`.
|
|
32
35
|
*/
|
|
33
36
|
__exportStar(require("@fluidframework/tree/alpha"), exports);
|
|
34
|
-
const
|
|
37
|
+
const internal_2 = require("@fluidframework/tree/internal");
|
|
35
38
|
/**
|
|
36
39
|
* A hierarchical data structure for collaboratively editing strongly typed JSON-like trees
|
|
37
40
|
* of objects, arrays, and other data types.
|
|
@@ -42,7 +45,7 @@ const internal_1 = require("@fluidframework/tree/internal");
|
|
|
42
45
|
* This package however is not intended for use by users of the encapsulated API, and therefor it can discard that interface.
|
|
43
46
|
* @public
|
|
44
47
|
*/
|
|
45
|
-
exports.SharedTree =
|
|
48
|
+
exports.SharedTree = internal_2.SharedTree;
|
|
46
49
|
/**
|
|
47
50
|
* {@link SharedTree} but allowing a non-default configuration.
|
|
48
51
|
* @remarks
|
|
@@ -64,13 +67,13 @@ exports.SharedTree = internal_1.SharedTree;
|
|
|
64
67
|
* @alpha
|
|
65
68
|
*/
|
|
66
69
|
function configuredSharedTree(options) {
|
|
67
|
-
return (0,
|
|
70
|
+
return (0, internal_2.configuredSharedTree)(options);
|
|
68
71
|
}
|
|
69
72
|
exports.configuredSharedTree = configuredSharedTree;
|
|
70
|
-
var
|
|
71
|
-
Object.defineProperty(exports, "SharedDirectory", { enumerable: true, get: function () { return
|
|
72
|
-
Object.defineProperty(exports, "SharedMap", { enumerable: true, get: function () { return
|
|
73
|
-
var
|
|
74
|
-
Object.defineProperty(exports, "SharedString", { enumerable: true, get: function () { return
|
|
73
|
+
var internal_3 = require("@fluidframework/map/internal");
|
|
74
|
+
Object.defineProperty(exports, "SharedDirectory", { enumerable: true, get: function () { return internal_3.SharedDirectory; } });
|
|
75
|
+
Object.defineProperty(exports, "SharedMap", { enumerable: true, get: function () { return internal_3.SharedMap; } });
|
|
76
|
+
var internal_4 = require("@fluidframework/sequence/internal");
|
|
77
|
+
Object.defineProperty(exports, "SharedString", { enumerable: true, get: function () { return internal_4.SharedString; } });
|
|
75
78
|
// #endregion Legacy exports
|
|
76
79
|
//# 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;
|
|
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;AA0CxB,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;;;;;;;;;;;;;;;;;;;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;AAiCnC,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/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/export */\n} from \"@fluidframework/core-interfaces\";\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/no-internal-modules,\n\timport/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/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 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\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"]}
|