@fluidframework/map 2.53.1 → 2.60.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api-report/{map.legacy.alpha.api.md → map.legacy.beta.api.md} +15 -15
  3. package/dist/directory.d.ts +41 -91
  4. package/dist/directory.d.ts.map +1 -1
  5. package/dist/directory.js +447 -464
  6. package/dist/directory.js.map +1 -1
  7. package/dist/directoryFactory.d.ts +3 -6
  8. package/dist/directoryFactory.d.ts.map +1 -1
  9. package/dist/directoryFactory.js +2 -4
  10. package/dist/directoryFactory.js.map +1 -1
  11. package/dist/interfaces.d.ts +4 -8
  12. package/dist/interfaces.d.ts.map +1 -1
  13. package/dist/interfaces.js.map +1 -1
  14. package/dist/internalInterfaces.d.ts +1 -2
  15. package/dist/internalInterfaces.d.ts.map +1 -1
  16. package/dist/internalInterfaces.js.map +1 -1
  17. package/dist/mapFactory.d.ts +3 -6
  18. package/dist/mapFactory.d.ts.map +1 -1
  19. package/dist/mapFactory.js +2 -4
  20. package/dist/mapFactory.js.map +1 -1
  21. package/dist/packageVersion.d.ts +1 -1
  22. package/dist/packageVersion.js +1 -1
  23. package/dist/packageVersion.js.map +1 -1
  24. package/lib/directory.d.ts +41 -91
  25. package/lib/directory.d.ts.map +1 -1
  26. package/lib/directory.js +440 -457
  27. package/lib/directory.js.map +1 -1
  28. package/lib/directoryFactory.d.ts +3 -6
  29. package/lib/directoryFactory.d.ts.map +1 -1
  30. package/lib/directoryFactory.js +2 -4
  31. package/lib/directoryFactory.js.map +1 -1
  32. package/lib/interfaces.d.ts +4 -8
  33. package/lib/interfaces.d.ts.map +1 -1
  34. package/lib/interfaces.js.map +1 -1
  35. package/lib/internalInterfaces.d.ts +1 -2
  36. package/lib/internalInterfaces.d.ts.map +1 -1
  37. package/lib/internalInterfaces.js.map +1 -1
  38. package/lib/mapFactory.d.ts +3 -6
  39. package/lib/mapFactory.d.ts.map +1 -1
  40. package/lib/mapFactory.js +2 -4
  41. package/lib/mapFactory.js.map +1 -1
  42. package/lib/packageVersion.d.ts +1 -1
  43. package/lib/packageVersion.js +1 -1
  44. package/lib/packageVersion.js.map +1 -1
  45. package/package.json +17 -18
  46. package/src/directory.ts +564 -573
  47. package/src/directoryFactory.ts +3 -6
  48. package/src/interfaces.ts +4 -8
  49. package/src/internalInterfaces.ts +1 -2
  50. package/src/mapFactory.ts +3 -6
  51. package/src/packageVersion.ts +1 -1
@@ -9,8 +9,7 @@ import type { ISharedDirectory } from "./interfaces.js";
9
9
  * @privateRemarks
10
10
  * TODO: AB#35245: Deprecate and stop exporting this class.
11
11
  * @sealed
12
- * @legacy
13
- * @alpha
12
+ * @legacy @beta
14
13
  */
15
14
  export declare class DirectoryFactory implements IChannelFactory<ISharedDirectory> {
16
15
  /**
@@ -40,14 +39,12 @@ export declare class DirectoryFactory implements IChannelFactory<ISharedDirector
40
39
  }
41
40
  /**
42
41
  * Entrypoint for {@link ISharedDirectory} creation.
43
- * @legacy
44
- * @alpha
42
+ * @legacy @beta
45
43
  */
46
44
  export declare const SharedDirectory: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedDirectory> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedDirectory>;
47
45
  /**
48
46
  * Entrypoint for {@link ISharedDirectory} creation.
49
- * @legacy
50
- * @alpha
47
+ * @legacy @beta
51
48
  * @privateRemarks
52
49
  * This alias is for legacy compat from when the SharedDirectory class was exported as public.
53
50
  */
@@ -1 +1 @@
1
- {"version":3,"file":"directoryFactory.d.ts","sourceRoot":"","sources":["../src/directoryFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AAIxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGxD;;;;;;;GAOG;A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AAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,gBAAgB,CAAC;IAO5B;;OAEG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,gBAAgB;CAM5E;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,sLAA6D,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC"}
@@ -13,8 +13,7 @@ const packageVersion_js_1 = require("./packageVersion.js");
13
13
  * @privateRemarks
14
14
  * TODO: AB#35245: Deprecate and stop exporting this class.
15
15
  * @sealed
16
- * @legacy
17
- * @alpha
16
+ * @legacy @beta
18
17
  */
19
18
  class DirectoryFactory {
20
19
  /**
@@ -61,8 +60,7 @@ DirectoryFactory.Attributes = {
61
60
  };
62
61
  /**
63
62
  * Entrypoint for {@link ISharedDirectory} creation.
64
- * @legacy
65
- * @alpha
63
+ * @legacy @beta
66
64
  */
67
65
  exports.SharedDirectory = (0, internal_1.createSharedObjectKind)(DirectoryFactory);
68
66
  //# sourceMappingURL=directoryFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"directoryFactory.js","sourceRoot":"","sources":["../src/directoryFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,0EAAqF;AAErF,iDAA4E;AAE5E,2DAAiD;AAEjD;;;;;;;GAOG;AACH,MAAa,gBAAgB;IAe5B;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,gBAAgB,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACpC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,SAAS,GAAG,IAAI,8BAAuB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACvE,MAAM,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE/B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,SAAS,GAAG,IAAI,8BAAuB,CAAC,EAAE,EAAE,OAAO,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACxF,SAAS,CAAC,eAAe,EAAE,CAAC;QAE5B,OAAO,SAAS,CAAC;IAClB,CAAC;;AApDF,4CAqDC;AApDA;;GAEG;AACoB,qBAAI,GAAG,6CAA6C,CAAC;AAE5E;;GAEG;AACoB,2BAAU,GAAuB;IACvD,IAAI,EAAE,gBAAgB,CAAC,IAAI;IAC3B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,8BAAU;CAC1B,CAAC;AA0CH;;;;GAIG;AACU,QAAA,eAAe,GAAG,IAAA,iCAAsB,EAAmB,gBAAgB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { createSharedObjectKind } from \"@fluidframework/shared-object-base/internal\";\n\nimport { SharedDirectory as SharedDirectoryInternal } from \"./directory.js\";\nimport type { ISharedDirectory } from \"./interfaces.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedDirectory}.\n * @privateRemarks\n * TODO: AB#35245: Deprecate and stop exporting this class.\n * @sealed\n * @legacy\n * @alpha\n */\nexport class DirectoryFactory implements IChannelFactory<ISharedDirectory> {\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic static readonly Type = \"https://graph.microsoft.com/types/directory\";\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: DirectoryFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn DirectoryFactory.Type;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn DirectoryFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<ISharedDirectory> {\n\t\tconst directory = new SharedDirectoryInternal(id, runtime, attributes);\n\t\tawait directory.load(services);\n\n\t\treturn directory;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): ISharedDirectory {\n\t\tconst directory = new SharedDirectoryInternal(id, runtime, DirectoryFactory.Attributes);\n\t\tdirectory.initializeLocal();\n\n\t\treturn directory;\n\t}\n}\n\n/**\n * Entrypoint for {@link ISharedDirectory} creation.\n * @legacy\n * @alpha\n */\nexport const SharedDirectory = createSharedObjectKind<ISharedDirectory>(DirectoryFactory);\n\n/**\n * Entrypoint for {@link ISharedDirectory} creation.\n * @legacy\n * @alpha\n * @privateRemarks\n * This alias is for legacy compat from when the SharedDirectory class was exported as public.\n */\nexport type SharedDirectory = ISharedDirectory;\n"]}
1
+ {"version":3,"file":"directoryFactory.js","sourceRoot":"","sources":["../src/directoryFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,0EAAqF;AAErF,iDAA4E;AAE5E,2DAAiD;AAEjD;;;;;;GAMG;AACH,MAAa,gBAAgB;IAe5B;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,gBAAgB,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACpC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,SAAS,GAAG,IAAI,8BAAuB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACvE,MAAM,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE/B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,SAAS,GAAG,IAAI,8BAAuB,CAAC,EAAE,EAAE,OAAO,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACxF,SAAS,CAAC,eAAe,EAAE,CAAC;QAE5B,OAAO,SAAS,CAAC;IAClB,CAAC;;AApDF,4CAqDC;AApDA;;GAEG;AACoB,qBAAI,GAAG,6CAA6C,CAAC;AAE5E;;GAEG;AACoB,2BAAU,GAAuB;IACvD,IAAI,EAAE,gBAAgB,CAAC,IAAI;IAC3B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,8BAAU;CAC1B,CAAC;AA0CH;;;GAGG;AACU,QAAA,eAAe,GAAG,IAAA,iCAAsB,EAAmB,gBAAgB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { createSharedObjectKind } from \"@fluidframework/shared-object-base/internal\";\n\nimport { SharedDirectory as SharedDirectoryInternal } from \"./directory.js\";\nimport type { ISharedDirectory } from \"./interfaces.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedDirectory}.\n * @privateRemarks\n * TODO: AB#35245: Deprecate and stop exporting this class.\n * @sealed\n * @legacy @beta\n */\nexport class DirectoryFactory implements IChannelFactory<ISharedDirectory> {\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic static readonly Type = \"https://graph.microsoft.com/types/directory\";\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: DirectoryFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn DirectoryFactory.Type;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn DirectoryFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<ISharedDirectory> {\n\t\tconst directory = new SharedDirectoryInternal(id, runtime, attributes);\n\t\tawait directory.load(services);\n\n\t\treturn directory;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): ISharedDirectory {\n\t\tconst directory = new SharedDirectoryInternal(id, runtime, DirectoryFactory.Attributes);\n\t\tdirectory.initializeLocal();\n\n\t\treturn directory;\n\t}\n}\n\n/**\n * Entrypoint for {@link ISharedDirectory} creation.\n * @legacy @beta\n */\nexport const SharedDirectory = createSharedObjectKind<ISharedDirectory>(DirectoryFactory);\n\n/**\n * Entrypoint for {@link ISharedDirectory} creation.\n * @legacy @beta\n * @privateRemarks\n * This alias is for legacy compat from when the SharedDirectory class was exported as public.\n */\nexport type SharedDirectory = ISharedDirectory;\n"]}
@@ -94,8 +94,7 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
94
94
  * @remarks
95
95
  * These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories.
96
96
  * @sealed
97
- * @legacy
98
- * @alpha
97
+ * @legacy @beta
99
98
  */
100
99
  export interface ISharedDirectoryEvents extends ISharedObjectEvents {
101
100
  /**
@@ -221,8 +220,7 @@ export interface IDirectoryEvents extends IEvent {
221
220
  * The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.
222
221
  * SubDirectories can be retrieved for use as working directories.
223
222
  * @sealed
224
- * @legacy
225
- * @alpha
223
+ * @legacy @beta
226
224
  */
227
225
  export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>, Omit<IDirectory, "on" | "once" | "off"> {
228
226
  [Symbol.iterator](): IterableIterator<[string, any]>;
@@ -246,8 +244,7 @@ export interface IDirectoryValueChanged extends IValueChanged {
246
244
  /**
247
245
  * Events emitted in response to changes to the {@link ISharedMap | map} data.
248
246
  * @sealed
249
- * @legacy
250
- * @alpha
247
+ * @legacy @beta
251
248
  */
252
249
  export interface ISharedMapEvents extends ISharedObjectEvents {
253
250
  /**
@@ -286,8 +283,7 @@ export interface ISharedMapEvents extends ISharedObjectEvents {
286
283
  *
287
284
  * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.
288
285
  * @sealed
289
- * @legacy
290
- * @alpha
286
+ * @legacy @beta
291
287
  */
292
288
  export interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
293
289
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","source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cAAc,EACrB,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,KAAK,IAAI,OACxF;IAEF;;;;;;;;OAQG;IACH,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB,KAAK,IAAI,OAAE;CACpF;AAED;;;;;;;;;;;;;;GAcG;AAGH,MAAM,WAAW,UAAW,SAAQ,aAAa,CAAC,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IACpF;;;;OAIG;IAGH,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IAEzC;;;;;OAKG;IACH,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CAC9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIDisposable,\n\tIEvent,\n\tIEventProvider,\n\tIEventThisPlaceHolder,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tISharedObject,\n\tISharedObjectEvents,\n} from \"@fluidframework/shared-object-base/internal\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n * @sealed\n * @legacy\n * @public\n */\nexport interface IValueChanged {\n\t/**\n\t * The key storing the value that changed.\n\t */\n\treadonly key: string;\n\n\t/**\n\t * The value that was stored at the key prior to the change.\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly previousValue: any;\n}\n\n/**\n * Interface describing actions on a directory.\n *\n * @remarks When used as a Map, operates on its keys.\n * @sealed\n * @legacy\n * @public\n */\nexport interface IDirectory\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\textends Map<string, any>,\n\t\tIEventProvider<IDirectoryEvents>,\n\t\tPartial<IDisposable> {\n\t/**\n\t * The absolute path of the directory.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * Retrieves the value stored at the given key from the directory.\n\t * @param key - Key to retrieve from\n\t * @returns The stored value, or undefined if the key is not set\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tget<T = any>(key: string): T | undefined;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at\n\t * @param value - Value to set\n\t * @returns The IDirectory itself\n\t */\n\tset<T = unknown>(key: string, value: T): this;\n\n\t/**\n\t * Get the number of sub directory within the directory.\n\t * @returns The number of sub directory within a directory.\n\t */\n\tcountSubDirectory?(): number;\n\n\t/**\n\t * Creates an IDirectory child of this IDirectory, or retrieves the existing IDirectory child if one with the\n\t * same name already exists.\n\t * @param subdirName - Name of the new child directory to create\n\t * @returns The IDirectory child that was created or retrieved\n\t */\n\tcreateSubDirectory(subdirName: string): IDirectory;\n\n\t/**\n\t * Gets an IDirectory child of this IDirectory, if it exists.\n\t * @param subdirName - Name of the child directory to get\n\t * @returns The requested IDirectory\n\t */\n\tgetSubDirectory(subdirName: string): IDirectory | undefined;\n\n\t/**\n\t * Checks whether this directory has a child directory with the given name.\n\t * @param subdirName - Name of the child directory to check\n\t * @returns True if it exists, false otherwise\n\t */\n\thasSubDirectory(subdirName: string): boolean;\n\n\t/**\n\t * Deletes an IDirectory child of this IDirectory, if it exists, along with all descendent keys and directories.\n\t * @param subdirName - Name of the child directory to delete\n\t * @returns True if the IDirectory existed and was deleted, false if it did not exist\n\t */\n\tdeleteSubDirectory(subdirName: string): boolean;\n\n\t/**\n\t * Gets an iterator over the IDirectory children of this IDirectory.\n\t * @returns The IDirectory iterator\n\t */\n\tsubdirectories(): IterableIterator<[string, IDirectory]>;\n\n\t/**\n\t * Get an IDirectory within the directory, in order to use relative paths from that location.\n\t * @param relativePath - Path of the IDirectory to get, relative to this IDirectory\n\t * @returns The requested IDirectory\n\t */\n\tgetWorkingDirectory(relativePath: string): IDirectory | undefined;\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n *\n * @remarks\n * These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface ISharedDirectoryEvents extends ISharedObjectEvents {\n\t/**\n\t * Emitted when a key is set or deleted. This is emitted for any key in the {@link ISharedDirectory} or any\n\t * subdirectory.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed, its value prior to the change, and the path to the\n\t * key that changed.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"valueChanged\",\n\t\tlistener: (\n\t\t\tchanged: IDirectoryValueChanged,\n\t\t\tlocal: boolean,\n\t\t\ttarget: IEventThisPlaceHolder,\n\t\t) => void,\n\t);\n\n\t/**\n\t * Emitted when the {@link ISharedDirectory} is cleared.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `local` - Whether the clear originated from this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(event: \"clear\", listener: (local: boolean, target: IEventThisPlaceHolder) => void);\n\n\t/**\n\t * Emitted when a subdirectory is created.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is created.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the create originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryCreated\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is deleted.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the delete originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryDeleted\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n * @sealed\n * @legacy\n * @public\n */\nexport interface IDirectoryEvents extends IEvent {\n\t/**\n\t * Emitted when a key is set or deleted. As opposed to the\n\t * {@link ISharedDirectory}'s valueChanged event, this is emitted only on the {@link IDirectory} that directly\n\t * contains the key.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed and its value prior to the change.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(\n\t\tevent: \"containedValueChanged\",\n\t\tlistener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is created. Also emitted when a delete\n\t * of a subdirectory is rolled back.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is created.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the creation originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryCreated\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is deleted.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the delete originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryDeleted\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when this sub directory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(event: \"disposed\", listener: (target: IEventThisPlaceHolder) => void);\n\n\t/**\n\t * Emitted when this previously deleted sub directory is restored.\n\t * This event only needs to be handled in the case of rollback. If your application does\n\t * not use the local rollback feature, you can ignore this event.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(event: \"undisposed\", listener: (target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * Provides a hierarchical organization of map-like data structures as SubDirectories.\n * The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.\n * SubDirectories can be retrieved for use as working directories.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface ISharedDirectory\n\textends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>,\n\t\tOmit<IDirectory, \"on\" | \"once\" | \"off\"> {\n\t// The Omit type excludes symbols, which we don't want to exclude. Adding them back here manually.\n\t// https://github.com/microsoft/TypeScript/issues/31671\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[Symbol.iterator](): IterableIterator<[string, any]>;\n\treadonly [Symbol.toStringTag]: string;\n}\n\n/**\n * Type of \"valueChanged\" event parameter for {@link ISharedDirectory}.\n * @sealed\n * @legacy\n * @public\n */\nexport interface IDirectoryValueChanged extends IValueChanged {\n\t/**\n\t * The absolute path to the IDirectory storing the key which changed.\n\t * @readonly\n\t * @privateRemarks\n\t * When breaking changes can be made, `readonly` should be added.\n\t */\n\tpath: string;\n}\n\n/**\n * Events emitted in response to changes to the {@link ISharedMap | map} data.\n * @sealed\n * @legacy\n * @alpha\n */\nexport interface ISharedMapEvents extends ISharedObjectEvents {\n\t/**\n\t * Emitted when a key is set or deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed and its value prior to the change.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link ISharedMap} itself.\n\t */\n\t(\n\t\tevent: \"valueChanged\",\n\t\tlistener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when the map is cleared.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `local` - Whether the clear originated from this client.\n\t *\n\t * - `target` - The {@link ISharedMap} itself.\n\t */\n\t(event: \"clear\", listener: (local: boolean, target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * The SharedMap distributed data structure can be used to store key-value pairs.\n *\n * @remarks\n * SharedMap provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.\n * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a\n * {@link @fluidframework/datastore#FluidObjectHandle}.\n *\n * Note: unlike JavaScript maps, SharedMap does not make any guarantees regarding enumeration order.\n *\n * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.\n * @sealed\n * @legacy\n * @alpha\n */\n// TODO: Use `unknown` instead (breaking change).\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {\n\t/**\n\t * Retrieves the given key from the map if it exists.\n\t * @param key - Key to retrieve from\n\t * @returns The stored value, or undefined if the key is not set\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tget<T = any>(key: string): T | undefined;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set\n\t * @param value - Value to set\n\t * @returns The {@link ISharedMap} itself\n\t */\n\tset<T = unknown>(key: string, value: T): this;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIDisposable,\n\tIEvent,\n\tIEventProvider,\n\tIEventThisPlaceHolder,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tISharedObject,\n\tISharedObjectEvents,\n} from \"@fluidframework/shared-object-base/internal\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n * @sealed\n * @legacy\n * @public\n */\nexport interface IValueChanged {\n\t/**\n\t * The key storing the value that changed.\n\t */\n\treadonly key: string;\n\n\t/**\n\t * The value that was stored at the key prior to the change.\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly previousValue: any;\n}\n\n/**\n * Interface describing actions on a directory.\n *\n * @remarks When used as a Map, operates on its keys.\n * @sealed\n * @legacy\n * @public\n */\nexport interface IDirectory\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\textends Map<string, any>,\n\t\tIEventProvider<IDirectoryEvents>,\n\t\tPartial<IDisposable> {\n\t/**\n\t * The absolute path of the directory.\n\t */\n\treadonly absolutePath: string;\n\n\t/**\n\t * Retrieves the value stored at the given key from the directory.\n\t * @param key - Key to retrieve from\n\t * @returns The stored value, or undefined if the key is not set\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tget<T = any>(key: string): T | undefined;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set at\n\t * @param value - Value to set\n\t * @returns The IDirectory itself\n\t */\n\tset<T = unknown>(key: string, value: T): this;\n\n\t/**\n\t * Get the number of sub directory within the directory.\n\t * @returns The number of sub directory within a directory.\n\t */\n\tcountSubDirectory?(): number;\n\n\t/**\n\t * Creates an IDirectory child of this IDirectory, or retrieves the existing IDirectory child if one with the\n\t * same name already exists.\n\t * @param subdirName - Name of the new child directory to create\n\t * @returns The IDirectory child that was created or retrieved\n\t */\n\tcreateSubDirectory(subdirName: string): IDirectory;\n\n\t/**\n\t * Gets an IDirectory child of this IDirectory, if it exists.\n\t * @param subdirName - Name of the child directory to get\n\t * @returns The requested IDirectory\n\t */\n\tgetSubDirectory(subdirName: string): IDirectory | undefined;\n\n\t/**\n\t * Checks whether this directory has a child directory with the given name.\n\t * @param subdirName - Name of the child directory to check\n\t * @returns True if it exists, false otherwise\n\t */\n\thasSubDirectory(subdirName: string): boolean;\n\n\t/**\n\t * Deletes an IDirectory child of this IDirectory, if it exists, along with all descendent keys and directories.\n\t * @param subdirName - Name of the child directory to delete\n\t * @returns True if the IDirectory existed and was deleted, false if it did not exist\n\t */\n\tdeleteSubDirectory(subdirName: string): boolean;\n\n\t/**\n\t * Gets an iterator over the IDirectory children of this IDirectory.\n\t * @returns The IDirectory iterator\n\t */\n\tsubdirectories(): IterableIterator<[string, IDirectory]>;\n\n\t/**\n\t * Get an IDirectory within the directory, in order to use relative paths from that location.\n\t * @param relativePath - Path of the IDirectory to get, relative to this IDirectory\n\t * @returns The requested IDirectory\n\t */\n\tgetWorkingDirectory(relativePath: string): IDirectory | undefined;\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n *\n * @remarks\n * These events only emit on the {@link ISharedDirectory} itself, and not on subdirectories.\n * @sealed\n * @legacy @beta\n */\nexport interface ISharedDirectoryEvents extends ISharedObjectEvents {\n\t/**\n\t * Emitted when a key is set or deleted. This is emitted for any key in the {@link ISharedDirectory} or any\n\t * subdirectory.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed, its value prior to the change, and the path to the\n\t * key that changed.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"valueChanged\",\n\t\tlistener: (\n\t\t\tchanged: IDirectoryValueChanged,\n\t\t\tlocal: boolean,\n\t\t\ttarget: IEventThisPlaceHolder,\n\t\t) => void,\n\t);\n\n\t/**\n\t * Emitted when the {@link ISharedDirectory} is cleared.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `local` - Whether the clear originated from this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(event: \"clear\", listener: (local: boolean, target: IEventThisPlaceHolder) => void);\n\n\t/**\n\t * Emitted when a subdirectory is created.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is created.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the create originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryCreated\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is deleted.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the delete originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryDeleted\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n}\n\n/**\n * Events emitted in response to changes to the directory data.\n * @sealed\n * @legacy\n * @public\n */\nexport interface IDirectoryEvents extends IEvent {\n\t/**\n\t * Emitted when a key is set or deleted. As opposed to the\n\t * {@link ISharedDirectory}'s valueChanged event, this is emitted only on the {@link IDirectory} that directly\n\t * contains the key.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed and its value prior to the change.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(\n\t\tevent: \"containedValueChanged\",\n\t\tlistener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is created. Also emitted when a delete\n\t * of a subdirectory is rolled back.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is created.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the creation originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryCreated\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when a subdirectory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `path` - The relative path to the subdirectory that is deleted.\n\t * It is relative from the object which raises the event.\n\t *\n\t * - `local` - Whether the delete originated from the this client.\n\t *\n\t * - `target` - The {@link ISharedDirectory} itself.\n\t */\n\t(\n\t\tevent: \"subDirectoryDeleted\",\n\t\tlistener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when this sub directory is deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(event: \"disposed\", listener: (target: IEventThisPlaceHolder) => void);\n\n\t/**\n\t * Emitted when this previously deleted sub directory is restored.\n\t * This event only needs to be handled in the case of rollback. If your application does\n\t * not use the local rollback feature, you can ignore this event.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `target` - The {@link IDirectory} itself.\n\t */\n\t(event: \"undisposed\", listener: (target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * Provides a hierarchical organization of map-like data structures as SubDirectories.\n * The values stored within can be accessed like a map, and the hierarchy can be navigated using path syntax.\n * SubDirectories can be retrieved for use as working directories.\n * @sealed\n * @legacy @beta\n */\nexport interface ISharedDirectory\n\textends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>,\n\t\tOmit<IDirectory, \"on\" | \"once\" | \"off\"> {\n\t// The Omit type excludes symbols, which we don't want to exclude. Adding them back here manually.\n\t// https://github.com/microsoft/TypeScript/issues/31671\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[Symbol.iterator](): IterableIterator<[string, any]>;\n\treadonly [Symbol.toStringTag]: string;\n}\n\n/**\n * Type of \"valueChanged\" event parameter for {@link ISharedDirectory}.\n * @sealed\n * @legacy\n * @public\n */\nexport interface IDirectoryValueChanged extends IValueChanged {\n\t/**\n\t * The absolute path to the IDirectory storing the key which changed.\n\t * @readonly\n\t * @privateRemarks\n\t * When breaking changes can be made, `readonly` should be added.\n\t */\n\tpath: string;\n}\n\n/**\n * Events emitted in response to changes to the {@link ISharedMap | map} data.\n * @sealed\n * @legacy @beta\n */\nexport interface ISharedMapEvents extends ISharedObjectEvents {\n\t/**\n\t * Emitted when a key is set or deleted.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `changed` - Information on the key that changed and its value prior to the change.\n\t *\n\t * - `local` - Whether the change originated from this client.\n\t *\n\t * - `target` - The {@link ISharedMap} itself.\n\t */\n\t(\n\t\tevent: \"valueChanged\",\n\t\tlistener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n\n\t/**\n\t * Emitted when the map is cleared.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `local` - Whether the clear originated from this client.\n\t *\n\t * - `target` - The {@link ISharedMap} itself.\n\t */\n\t(event: \"clear\", listener: (local: boolean, target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * The SharedMap distributed data structure can be used to store key-value pairs.\n *\n * @remarks\n * SharedMap provides the same API for setting and retrieving values that JavaScript developers are accustomed to with the\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map | Map} built-in object.\n * However, the keys of a SharedMap must be strings, and the values must either be a JSON-serializable object or a\n * {@link @fluidframework/datastore#FluidObjectHandle}.\n *\n * Note: unlike JavaScript maps, SharedMap does not make any guarantees regarding enumeration order.\n *\n * For more information, including example usages, see {@link https://fluidframework.com/docs/data-structures/map/}.\n * @sealed\n * @legacy @beta\n */\n// TODO: Use `unknown` instead (breaking change).\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {\n\t/**\n\t * Retrieves the given key from the map if it exists.\n\t * @param key - Key to retrieve from\n\t * @returns The stored value, or undefined if the key is not set\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tget<T = any>(key: string): T | undefined;\n\n\t/**\n\t * Sets the value stored at key to the provided value.\n\t * @param key - Key to set\n\t * @param value - Value to set\n\t * @returns The {@link ISharedMap} itself\n\t */\n\tset<T = unknown>(key: string, value: T): this;\n}\n"]}
@@ -63,8 +63,7 @@ export interface IMapDeleteOperation {
63
63
  * channel ID.
64
64
  *
65
65
  * @deprecated This type is legacy and deprecated(AB#8004).
66
- * @legacy
67
- * @alpha
66
+ * @legacy @beta
68
67
  */
69
68
  export interface ISerializableValue {
70
69
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"internalInterfaces.d.ts","sourceRoot":"","sources":["../src/internalInterfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,EAAE,kBAAkB,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,KAAK,EAAE,GAAG,CAAC;CACX;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B"}
1
+ {"version":3,"file":"internalInterfaces.d.ts","sourceRoot":"","sources":["../src/internalInterfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,EAAE,kBAAkB,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,KAAK,EAAE,GAAG,CAAC;CACX;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"internalInterfaces.js","sourceRoot":"","sources":["../src/internalInterfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Operation indicating a value should be set for a key.\n */\nexport interface IMapSetOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"set\";\n\n\t/**\n\t * Map key being modified.\n\t */\n\tkey: string;\n\n\t/**\n\t * Value to be set on the key.\n\t */\n\tvalue: ISerializableValue;\n}\n\n/**\n * Operation indicating the map should be cleared.\n */\nexport interface IMapClearOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"clear\";\n}\n\n/**\n * Operation indicating a key should be deleted from the map.\n */\nexport interface IMapDeleteOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"delete\";\n\n\t/**\n\t * Map key being modified.\n\t */\n\tkey: string;\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * {@link ISerializableValue.\"type\"} to understand whether they're storing a Plain JavaScript object,\n * a {@link @fluidframework/shared-object-base#SharedObject}, or a value type.\n *\n * @remarks\n *\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n *\n * If type is Plain, it must be a plain JS object that can survive a JSON.stringify/parse. E.g. a URL object will\n * just get stringified to a URL string and not rehydrate as a URL object on the other side. It may contain members\n * that are ISerializedHandle (the serialized form of a handle).\n *\n * If type is a value type then it must be amongst the types registered via registerValueType or we won't know how\n * to serialize/deserialize it (we rely on its factory via .load() and .store()). Its value will be type-dependent.\n * If type is Shared, then the in-memory value will just be a reference to the SharedObject. Its value will be a\n * channel ID.\n *\n * @deprecated This type is legacy and deprecated(AB#8004).\n * @legacy\n * @alpha\n */\nexport interface ISerializableValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * The JSONable representation of the value.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tvalue: any;\n}\n\n/**\n * Serialized {@link ISerializableValue} counterpart.\n */\nexport interface ISerializedValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * String representation of the value.\n\t *\n\t * @remarks Will be undefined if the original value was undefined.\n\t */\n\tvalue: string | undefined;\n}\n"]}
1
+ {"version":3,"file":"internalInterfaces.js","sourceRoot":"","sources":["../src/internalInterfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Operation indicating a value should be set for a key.\n */\nexport interface IMapSetOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"set\";\n\n\t/**\n\t * Map key being modified.\n\t */\n\tkey: string;\n\n\t/**\n\t * Value to be set on the key.\n\t */\n\tvalue: ISerializableValue;\n}\n\n/**\n * Operation indicating the map should be cleared.\n */\nexport interface IMapClearOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"clear\";\n}\n\n/**\n * Operation indicating a key should be deleted from the map.\n */\nexport interface IMapDeleteOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"delete\";\n\n\t/**\n\t * Map key being modified.\n\t */\n\tkey: string;\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * {@link ISerializableValue.\"type\"} to understand whether they're storing a Plain JavaScript object,\n * a {@link @fluidframework/shared-object-base#SharedObject}, or a value type.\n *\n * @remarks\n *\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n *\n * If type is Plain, it must be a plain JS object that can survive a JSON.stringify/parse. E.g. a URL object will\n * just get stringified to a URL string and not rehydrate as a URL object on the other side. It may contain members\n * that are ISerializedHandle (the serialized form of a handle).\n *\n * If type is a value type then it must be amongst the types registered via registerValueType or we won't know how\n * to serialize/deserialize it (we rely on its factory via .load() and .store()). Its value will be type-dependent.\n * If type is Shared, then the in-memory value will just be a reference to the SharedObject. Its value will be a\n * channel ID.\n *\n * @deprecated This type is legacy and deprecated(AB#8004).\n * @legacy @beta\n */\nexport interface ISerializableValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * The JSONable representation of the value.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tvalue: any;\n}\n\n/**\n * Serialized {@link ISerializableValue} counterpart.\n */\nexport interface ISerializedValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * String representation of the value.\n\t *\n\t * @remarks Will be undefined if the original value was undefined.\n\t */\n\tvalue: string | undefined;\n}\n"]}
@@ -9,8 +9,7 @@ import type { ISharedMap } from "./interfaces.js";
9
9
  * @privateRemarks
10
10
  * TODO: AB#35245: Deprecate and stop exporting this class.
11
11
  * @sealed
12
- * @legacy
13
- * @alpha
12
+ * @legacy @beta
14
13
  */
15
14
  export declare class MapFactory implements IChannelFactory<ISharedMap> {
16
15
  /**
@@ -40,14 +39,12 @@ export declare class MapFactory implements IChannelFactory<ISharedMap> {
40
39
  }
41
40
  /**
42
41
  * Entrypoint for {@link ISharedMap} creation.
43
- * @legacy
44
- * @alpha
42
+ * @legacy @beta
45
43
  */
46
44
  export declare const SharedMap: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<ISharedMap> & import("@fluidframework/shared-object-base/internal").SharedObjectKind<ISharedMap>;
47
45
  /**
48
46
  * Entrypoint for {@link ISharedMap} creation.
49
- * @legacy
50
- * @alpha
47
+ * @legacy @beta
51
48
  * @privateRemarks
52
49
  * This alias is for legacy compat from when the SharedMap class was exported as public.
53
50
  */
@@ -1 +1 @@
1
- {"version":3,"file":"mapFactory.d.ts","sourceRoot":"","sources":["../src/mapFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,MAAM,gDAAgD,CAA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,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,UAAU,CAAC;IAOtB;;OAEG;IACI,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,UAAU;CAMtE;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,0KAAiD,CAAC;AAExE;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC"}
@@ -13,8 +13,7 @@ const packageVersion_js_1 = require("./packageVersion.js");
13
13
  * @privateRemarks
14
14
  * TODO: AB#35245: Deprecate and stop exporting this class.
15
15
  * @sealed
16
- * @legacy
17
- * @alpha
16
+ * @legacy @beta
18
17
  */
19
18
  class MapFactory {
20
19
  /**
@@ -61,8 +60,7 @@ MapFactory.Attributes = {
61
60
  };
62
61
  /**
63
62
  * Entrypoint for {@link ISharedMap} creation.
64
- * @legacy
65
- * @alpha
63
+ * @legacy @beta
66
64
  */
67
65
  exports.SharedMap = (0, internal_1.createSharedObjectKind)(MapFactory);
68
66
  //# sourceMappingURL=mapFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mapFactory.js","sourceRoot":"","sources":["../src/mapFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,0EAAqF;AAGrF,qCAA0D;AAC1D,2DAAiD;AAEjD;;;;;;;GAOG;AACH,MAAa,UAAU;IAetB;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,UAAU,CAAC,IAAI,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,UAAU,CAAC,UAAU,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,GAAG,GAAG,IAAI,kBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3D,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEzB,OAAO,GAAG,CAAC;IACZ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,GAAG,GAAG,IAAI,kBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;QACtE,GAAG,CAAC,eAAe,EAAE,CAAC;QAEtB,OAAO,GAAG,CAAC;IACZ,CAAC;;AApDF,gCAqDC;AApDA;;GAEG;AACoB,eAAI,GAAG,uCAAuC,CAAC;AAEtE;;GAEG;AACoB,qBAAU,GAAuB;IACvD,IAAI,EAAE,UAAU,CAAC,IAAI;IACrB,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,8BAAU;CAC1B,CAAC;AA0CH;;;;GAIG;AACU,QAAA,SAAS,GAAG,IAAA,iCAAsB,EAAa,UAAU,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { createSharedObjectKind } from \"@fluidframework/shared-object-base/internal\";\n\nimport type { ISharedMap } from \"./interfaces.js\";\nimport { SharedMap as SharedMapInternal } from \"./map.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedMap}.\n * @privateRemarks\n * TODO: AB#35245: Deprecate and stop exporting this class.\n * @sealed\n * @legacy\n * @alpha\n */\nexport class MapFactory implements IChannelFactory<ISharedMap> {\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic static readonly Type = \"https://graph.microsoft.com/types/map\";\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: MapFactory.Type,\n\t\tsnapshotFormatVersion: \"0.2\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn MapFactory.Type;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn MapFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<ISharedMap> {\n\t\tconst map = new SharedMapInternal(id, runtime, attributes);\n\t\tawait map.load(services);\n\n\t\treturn map;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): ISharedMap {\n\t\tconst map = new SharedMapInternal(id, runtime, MapFactory.Attributes);\n\t\tmap.initializeLocal();\n\n\t\treturn map;\n\t}\n}\n\n/**\n * Entrypoint for {@link ISharedMap} creation.\n * @legacy\n * @alpha\n */\nexport const SharedMap = createSharedObjectKind<ISharedMap>(MapFactory);\n\n/**\n * Entrypoint for {@link ISharedMap} creation.\n * @legacy\n * @alpha\n * @privateRemarks\n * This alias is for legacy compat from when the SharedMap class was exported as public.\n */\nexport type SharedMap = ISharedMap;\n"]}
1
+ {"version":3,"file":"mapFactory.js","sourceRoot":"","sources":["../src/mapFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,0EAAqF;AAGrF,qCAA0D;AAC1D,2DAAiD;AAEjD;;;;;;GAMG;AACH,MAAa,UAAU;IAetB;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,UAAU,CAAC,IAAI,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,UAAU,CAAC,UAAU,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,GAAG,GAAG,IAAI,kBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3D,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEzB,OAAO,GAAG,CAAC;IACZ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,GAAG,GAAG,IAAI,kBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;QACtE,GAAG,CAAC,eAAe,EAAE,CAAC;QAEtB,OAAO,GAAG,CAAC;IACZ,CAAC;;AApDF,gCAqDC;AApDA;;GAEG;AACoB,eAAI,GAAG,uCAAuC,CAAC;AAEtE;;GAEG;AACoB,qBAAU,GAAuB;IACvD,IAAI,EAAE,UAAU,CAAC,IAAI;IACrB,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,8BAAU;CAC1B,CAAC;AA0CH;;;GAGG;AACU,QAAA,SAAS,GAAG,IAAA,iCAAsB,EAAa,UAAU,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport { createSharedObjectKind } from \"@fluidframework/shared-object-base/internal\";\n\nimport type { ISharedMap } from \"./interfaces.js\";\nimport { SharedMap as SharedMapInternal } from \"./map.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link ISharedMap}.\n * @privateRemarks\n * TODO: AB#35245: Deprecate and stop exporting this class.\n * @sealed\n * @legacy @beta\n */\nexport class MapFactory implements IChannelFactory<ISharedMap> {\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic static readonly Type = \"https://graph.microsoft.com/types/map\";\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: MapFactory.Type,\n\t\tsnapshotFormatVersion: \"0.2\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn MapFactory.Type;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}\n\t */\n\tpublic get attributes(): IChannelAttributes {\n\t\treturn MapFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<ISharedMap> {\n\t\tconst map = new SharedMapInternal(id, runtime, attributes);\n\t\tawait map.load(services);\n\n\t\treturn map;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}\n\t */\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): ISharedMap {\n\t\tconst map = new SharedMapInternal(id, runtime, MapFactory.Attributes);\n\t\tmap.initializeLocal();\n\n\t\treturn map;\n\t}\n}\n\n/**\n * Entrypoint for {@link ISharedMap} creation.\n * @legacy @beta\n */\nexport const SharedMap = createSharedObjectKind<ISharedMap>(MapFactory);\n\n/**\n * Entrypoint for {@link ISharedMap} creation.\n * @legacy @beta\n * @privateRemarks\n * This alias is for legacy compat from when the SharedMap class was exported as public.\n */\nexport type SharedMap = ISharedMap;\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/map";
8
- export declare const pkgVersion = "2.53.1";
8
+ export declare const pkgVersion = "2.60.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/map";
11
- exports.pkgVersion = "2.53.1";
11
+ exports.pkgVersion = "2.60.0";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,qBAAqB,CAAC;AAChC,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/map\";\nexport const pkgVersion = \"2.53.1\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,qBAAqB,CAAC;AAChC,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/map\";\nexport const pkgVersion = \"2.60.0\";\n"]}
@@ -5,7 +5,6 @@
5
5
  import { TypedEventEmitter } from "@fluid-internal/client-utils";
6
6
  import type { IChannelAttributes, IFluidDataStoreRuntime, IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
7
7
  import { type ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
8
- import { RedBlackTree } from "@fluidframework/merge-tree/internal";
9
8
  import type { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions/internal";
10
9
  import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal";
11
10
  import { SharedObject } from "@fluidframework/shared-object-base/internal";
@@ -117,23 +116,25 @@ interface PendingKeySet {
117
116
  type: "set";
118
117
  path: string;
119
118
  value: unknown;
119
+ subdir: SubDirectory;
120
120
  }
121
121
  interface PendingKeyDelete {
122
122
  type: "delete";
123
123
  path: string;
124
124
  key: string;
125
+ subdir: SubDirectory;
125
126
  }
126
127
  interface PendingClear {
127
128
  type: "clear";
128
129
  path: string;
130
+ subdir: SubDirectory;
129
131
  }
130
132
  /**
131
133
  * Create info for the subdirectory.
132
134
  *
133
135
  * @deprecated - This interface will no longer be exported in the future(AB#8004).
134
136
  *
135
- * @legacy
136
- * @alpha
137
+ * @legacy @beta
137
138
  */
138
139
  export interface ICreateInfo {
139
140
  /**
@@ -155,8 +156,7 @@ export interface ICreateInfo {
155
156
  *
156
157
  * @deprecated - This interface will no longer be exported in the future(AB#8004).
157
158
  *
158
- * @legacy
159
- * @alpha
159
+ * @legacy @beta
160
160
  */
161
161
  export interface IDirectoryDataObject {
162
162
  /**
@@ -181,8 +181,7 @@ export interface IDirectoryDataObject {
181
181
  *
182
182
  * @deprecated - This interface will no longer be exported in the future(AB#8004).
183
183
  *
184
- * @legacy
185
- * @alpha
184
+ * @legacy @beta
186
185
  */
187
186
  export interface IDirectoryNewStorageFormat {
188
187
  /**
@@ -201,28 +200,6 @@ interface SequenceData {
201
200
  seq: number;
202
201
  clientSeq?: number;
203
202
  }
204
- /**
205
- * A utility class for tracking associations between keys and their creation indices.
206
- * This is relevant to support map iteration in insertion order, see
207
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator/%40%40iterator
208
- *
209
- * TODO: It can be combined with the creation tracker utilized in SharedMap
210
- */
211
- declare class DirectoryCreationTracker {
212
- readonly indexToKey: RedBlackTree<SequenceData, string>;
213
- readonly keyToIndex: Map<string, SequenceData>;
214
- constructor();
215
- set(key: string, seqData: SequenceData): void;
216
- has(keyOrSeqData: string | SequenceData): boolean;
217
- delete(keyOrSeqData: string | SequenceData): void;
218
- /**
219
- * Retrieves all subdirectories with creation order that satisfy an optional constraint function.
220
- * @param constraint - An optional constraint function that filters keys.
221
- * @returns An array of keys that satisfy the constraint (or all keys if no constraint is provided).
222
- */
223
- keys(constraint?: (key: string) => boolean): string[];
224
- get size(): number;
225
- }
226
203
  /**
227
204
  * {@inheritDoc ISharedDirectory}
228
205
  *
@@ -344,6 +321,11 @@ export declare class SharedDirectory extends SharedObject<ISharedDirectoryEvents
344
321
  * {@inheritDoc IDirectory.getWorkingDirectory}
345
322
  */
346
323
  getWorkingDirectory(relativePath: string): IDirectory | undefined;
324
+ /**
325
+ * Similar to `getWorkingDirectory`, but only returns directories that are sequenced.
326
+ * This can be useful for op processing since we only process ops on sequenced directories.
327
+ */
328
+ private getSequencedWorkingDirectory;
347
329
  /**
348
330
  * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
349
331
  */
@@ -385,12 +367,6 @@ export declare class SharedDirectory extends SharedObject<ISharedDirectoryEvents
385
367
  * @param relativePath - The path to convert
386
368
  */
387
369
  private makeAbsolute;
388
- /**
389
- * This checks if there is pending delete op for local delete for a any subdir in the relative path.
390
- * @param relativePath - path of sub directory.
391
- * @returns `true` if there is pending delete, `false` otherwise.
392
- */
393
- private isSubDirectoryDeletePending;
394
370
  /**
395
371
  * Set the message handlers for the directory.
396
372
  */
@@ -403,10 +379,12 @@ export declare class SharedDirectory extends SharedObject<ISharedDirectoryEvents
403
379
  }
404
380
  interface ICreateSubDirLocalOpMetadata {
405
381
  type: "createSubDir";
382
+ parentSubdir: SubDirectory;
406
383
  }
407
384
  interface IDeleteSubDirLocalOpMetadata {
408
385
  type: "deleteSubDir";
409
386
  subDirectory: SubDirectory | undefined;
387
+ parentSubdir: SubDirectory;
410
388
  }
411
389
  type SubDirLocalOpMetadata = ICreateSubDirLocalOpMetadata | IDeleteSubDirLocalOpMetadata;
412
390
  type EditLocalOpMetadata = PendingKeySet | PendingKeyDelete;
@@ -427,7 +405,6 @@ declare class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implement
427
405
  private readonly runtime;
428
406
  private readonly serializer;
429
407
  readonly absolutePath: string;
430
- private readonly logger;
431
408
  /**
432
409
  * Tells if the sub directory is deleted or not.
433
410
  */
@@ -437,35 +414,16 @@ declare class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implement
437
414
  */
438
415
  [Symbol.toStringTag]: string;
439
416
  /**
440
- * The subdirectories the directory is holding.
417
+ * The sequenced subdirectories the directory is holding independent of any pending
418
+ * create/delete subdirectory operations.
441
419
  */
442
- private readonly _subdirectories;
443
- /**
444
- * Subdirectories that have been deleted locally but not yet ack'd from the server. This maintains the record
445
- * of delete op that are pending or yet to be acked from server. This is maintained just to track the locally
446
- * deleted sub directory.
447
- */
448
- private readonly pendingDeleteSubDirectoriesTracker;
449
- /**
450
- * Subdirectories that have been created locally but not yet ack'd from the server. This maintains the record
451
- * of create op that are pending or yet to be acked from server. This is maintained just to track the locally
452
- * created sub directory.
453
- */
454
- private readonly pendingCreateSubDirectoriesTracker;
420
+ private readonly _sequencedSubdirectories;
455
421
  /**
456
422
  * Assigns a unique ID to each subdirectory created locally but pending for acknowledgement, facilitating the tracking
457
423
  * of the creation order.
458
424
  */
459
425
  localCreationSeq: number;
460
- /**
461
- * Maintains a bidirectional association between ack'd subdirectories and their seqData.
462
- * This helps to ensure iteration order which is consistent with the JS map spec.
463
- */
464
- readonly ackedCreationSeqTracker: DirectoryCreationTracker;
465
- /**
466
- * Similar to {@link ackedCreationSeqTracker}, but for local (unacked) entries.
467
- */
468
- readonly localCreationSeqTracker: DirectoryCreationTracker;
426
+ private readonly mc;
469
427
  /**
470
428
  * Constructor.
471
429
  * @param sequenceNumber - Message seq number at which this was created.
@@ -595,6 +553,11 @@ declare class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implement
595
553
  * even across remote operations and rollbacks.
596
554
  */
597
555
  private readonly pendingStorageData;
556
+ /**
557
+ * A data structure containing all local pending subdirectory create/deletes, which is used in combination
558
+ * with the _sequencedSubdirectories to compute optimistic values.
559
+ */
560
+ private readonly pendingSubDirectoryData;
598
561
  /**
599
562
  * An internal iterator that iterates over the entries in the directory.
600
563
  */
@@ -609,6 +572,14 @@ declare class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implement
609
572
  * This will return true even if the value is undefined.
610
573
  */
611
574
  private readonly optimisticallyHas;
575
+ /**
576
+ * Get the optimistic local subdirectory. This combines the sequenced data with
577
+ * any pending changes that have not yet been sequenced. By default, we do not
578
+ * consider disposed directories as optimistically existing, but if `getIfDisposed`
579
+ * is true, we will include them since some scenarios require this.
580
+ */
581
+ private readonly getOptimisticSubDirectory;
582
+ get sequencedSubdirectories(): ReadonlyMap<string, SubDirectory>;
612
583
  /**
613
584
  * Process a clear operation.
614
585
  * @param msg - The message from the server to apply.
@@ -677,13 +648,6 @@ declare class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implement
677
648
  * @param localOpMetadata - Metadata from the previous submit
678
649
  */
679
650
  resubmitKeyMessage(op: IDirectoryKeyOperation, localOpMetadata: EditLocalOpMetadata): void;
680
- private incrementPendingSubDirCount;
681
- private decrementPendingSubDirCount;
682
- /**
683
- * Update the count for pending create/delete of the sub directory so that it can be validated on receiving op
684
- * or while resubmitting the op.
685
- */
686
- private updatePendingSubDirMessageCount;
687
651
  /**
688
652
  * Submit a create subdirectory operation.
689
653
  * @param op - The operation
@@ -736,37 +700,23 @@ declare class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implement
736
700
  * This return true if the message is for the current instance of this sub directory. As the sub directory
737
701
  * can be deleted and created again, then this finds if the message is for current instance of directory or not.
738
702
  * @param msg - message for the directory
703
+ * @param targetSubdir - subdirectory instance we are targeting from local op metadata (if a local op)
739
704
  */
740
705
  private isMessageForCurrentInstanceOfSubDirectory;
706
+ private registerEventsOnSubDirectory;
707
+ private disposeSubDirectoryTree;
708
+ private emitDisposeForSubdirTree;
709
+ private undisposeSubdirectoryTree;
741
710
  /**
742
- * If our local operations that have not yet been ack'd will eventually overwrite an incoming operation, we should
743
- * not process the incoming operation.
744
- * @param op - Operation to check
745
- * @param local - Whether the message originated from the local client
746
- * @param message - The message
747
- * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
748
- * For messages from a remote client, this will be undefined.
749
- * @returns True if the operation should be processed, false otherwise
750
- */
751
- private needProcessSubDirectoryOperation;
752
- /**
753
- * Create subdirectory implementation used for both locally sourced creation as well as incoming remote creation.
754
- * @param subdirName - The name of the subdirectory being created
755
- * @param local - Whether the message originated from the local client
756
- * @param seqData - Sequence number and client sequence number at which this directory is created
757
- * @param clientId - Id of client which created this directory.
758
- * @returns True if is newly created, false if it already existed.
711
+ * Similar to {@link subdirectories}, but also includes subdirectories that are disposed.
759
712
  */
760
- private createSubDirectoryCore;
761
- private registerEventsOnSubDirectory;
713
+ private getSubdirectoriesEvenIfDisposed;
762
714
  /**
763
- * Delete subdirectory implementation used for both locally sourced creation as well as incoming remote creation.
764
- * @param subdirName - The name of the subdirectory being deleted
765
- * @param local - Whether the message originated from the local client
715
+ * Clears the sequenced data of a subdirectory but notably retains the pending
716
+ * storage data. This is done when disposing of a directory so if we need to
717
+ * re-create it, then we still have the pending ops.
766
718
  */
767
- private deleteSubDirectoryCore;
768
- private disposeSubDirectoryTree;
769
- private undeleteSubDirectoryTree;
719
+ clearSubDirectorySequencedData(): void;
770
720
  }
771
721
  export {};
772
722
  //# sourceMappingURL=directory.d.ts.map