@fluidframework/map 2.0.0-internal.7.2.2 → 2.0.0-internal.7.4.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 +8 -0
- package/api-extractor-lint.json +13 -0
- package/api-extractor.json +9 -1
- package/api-report/map.api.md +42 -44
- package/dist/{directory.js → directory.cjs} +228 -41
- package/dist/directory.cjs.map +1 -0
- package/dist/directory.d.ts +499 -38
- package/dist/directory.d.ts.map +1 -1
- package/dist/{index.js → index.cjs} +4 -4
- package/dist/index.cjs.map +1 -0
- package/dist/{interfaces.js → interfaces.cjs} +1 -1
- package/dist/interfaces.cjs.map +1 -0
- package/dist/interfaces.d.ts +10 -20
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/{internalInterfaces.js → internalInterfaces.cjs} +1 -1
- package/dist/internalInterfaces.cjs.map +1 -0
- package/dist/{localValues.js → localValues.cjs} +2 -3
- package/dist/localValues.cjs.map +1 -0
- package/dist/localValues.d.ts +2 -4
- package/dist/localValues.d.ts.map +1 -1
- package/dist/map-alpha.d.ts +979 -0
- package/dist/map-beta.d.ts +119 -0
- package/dist/map-public.d.ts +119 -0
- package/dist/map-untrimmed.d.ts +993 -0
- package/dist/{map.js → map.cjs} +5 -13
- package/dist/map.cjs.map +1 -0
- package/dist/map.d.ts +2 -10
- package/dist/map.d.ts.map +1 -1
- package/dist/{mapKernel.js → mapKernel.cjs} +2 -2
- package/dist/mapKernel.cjs.map +1 -0
- package/dist/{packageVersion.js → packageVersion.cjs} +2 -2
- package/dist/packageVersion.cjs.map +1 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/directory.d.ts +499 -38
- package/lib/directory.d.ts.map +1 -1
- package/lib/{directory.js → directory.mjs} +228 -41
- package/lib/directory.mjs.map +1 -0
- package/lib/index.d.ts +4 -15
- package/lib/index.d.ts.map +1 -1
- package/lib/index.mjs +8 -0
- package/lib/index.mjs.map +1 -0
- package/lib/interfaces.d.ts +10 -20
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/{interfaces.js → interfaces.mjs} +1 -1
- package/lib/interfaces.mjs.map +1 -0
- package/lib/internalInterfaces.d.ts +2 -2
- package/lib/internalInterfaces.d.ts.map +1 -1
- package/lib/{internalInterfaces.js → internalInterfaces.mjs} +1 -1
- package/{dist/internalInterfaces.js.map → lib/internalInterfaces.mjs.map} +1 -1
- package/lib/localValues.d.ts +3 -5
- package/lib/localValues.d.ts.map +1 -1
- package/lib/{localValues.js → localValues.mjs} +2 -3
- package/lib/localValues.mjs.map +1 -0
- package/lib/map-alpha.d.ts +979 -0
- package/lib/map-beta.d.ts +119 -0
- package/lib/map-public.d.ts +119 -0
- package/lib/map-untrimmed.d.ts +993 -0
- package/lib/map.d.ts +3 -11
- package/lib/map.d.ts.map +1 -1
- package/lib/{map.js → map.mjs} +5 -13
- package/lib/map.mjs.map +1 -0
- package/lib/mapKernel.d.ts +2 -2
- package/lib/mapKernel.d.ts.map +1 -1
- package/lib/{mapKernel.js → mapKernel.mjs} +2 -2
- package/lib/mapKernel.mjs.map +1 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/{packageVersion.js → packageVersion.mjs} +2 -2
- package/lib/packageVersion.mjs.map +1 -0
- package/map.test-files.tar +0 -0
- package/package.json +54 -33
- package/src/directory.ts +280 -62
- package/src/interfaces.ts +10 -20
- package/src/localValues.ts +2 -4
- package/src/map.ts +2 -10
- package/src/packageVersion.ts +1 -1
- package/tsc-multi.test.json +4 -0
- package/tsconfig.json +6 -5
- package/dist/directory.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/interfaces.js.map +0 -1
- package/dist/localValues.js.map +0 -1
- package/dist/map.js.map +0 -1
- package/dist/mapKernel.js.map +0 -1
- package/dist/packageVersion.js.map +0 -1
- package/lib/directory.js.map +0 -1
- package/lib/index.js +0 -19
- package/lib/index.js.map +0 -1
- package/lib/interfaces.js.map +0 -1
- package/lib/internalInterfaces.js.map +0 -1
- package/lib/localValues.js.map +0 -1
- package/lib/map.js.map +0 -1
- package/lib/mapKernel.js.map +0 -1
- package/lib/packageVersion.js.map +0 -1
- package/tsconfig.esnext.json +0 -7
package/lib/localValues.d.ts
CHANGED
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { IFluidHandle } from "@fluidframework/core-interfaces";
|
|
6
6
|
import { IFluidSerializer } from "@fluidframework/shared-object-base";
|
|
7
|
-
import { ISerializableValue, ISerializedValue } from "./interfaces";
|
|
7
|
+
import { ISerializableValue, ISerializedValue } from "./interfaces.mjs";
|
|
8
8
|
/**
|
|
9
9
|
* A local value to be stored in a container type Distributed Data Store (DDS).
|
|
10
|
-
*
|
|
11
|
-
* @public
|
|
10
|
+
* @alpha
|
|
12
11
|
*/
|
|
13
12
|
export interface ILocalValue {
|
|
14
13
|
/**
|
|
@@ -59,8 +58,7 @@ export declare class PlainLocalValue implements ILocalValue {
|
|
|
59
58
|
/**
|
|
60
59
|
* Enables a container type {@link https://fluidframework.com/docs/build/dds/ | DDS} to produce and store local
|
|
61
60
|
* values with minimal awareness of how those objects are stored, serialized, and deserialized.
|
|
62
|
-
*
|
|
63
|
-
* @public
|
|
61
|
+
* @alpha
|
|
64
62
|
*/
|
|
65
63
|
export declare class LocalValueMaker {
|
|
66
64
|
private readonly serializer;
|
package/lib/localValues.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localValues.d.ts","sourceRoot":"","sources":["../src/localValues.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"localValues.d.ts","sourceRoot":"","sources":["../src/localValues.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,YAAY,EAAE,MAAM,iCAAiC;OACvD,EACN,gBAAgB,EAKhB,MAAM,oCAAoC;OAEpC,EAAE,kBAAkB,EAAE,gBAAgB,EAAE;AAE/C;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IAGH,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC;IAEpB;;;;;OAKG;IACH,cAAc,CAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,GAAG,gBAAgB,CAAC;CACnF;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC/B,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,YAAY,GAEhB,kBAAkB,CAOpB;AAED;;GAEG;AACH,qBAAa,eAAgB,YAAW,WAAW;aAKf,KAAK,EAAE,OAAO;IAJjD;;;OAGG;gBACgC,KAAK,EAAE,OAAO;IAEjD;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;OAEG;IACI,cAAc,CAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,GAAG,gBAAgB;CAUzF;AAED;;;;GAIG;AACH,qBAAa,eAAe;IAKR,OAAO,CAAC,QAAQ,CAAC,UAAU;IAJ9C;;;OAGG;gBACiC,UAAU,EAAE,gBAAgB;IAEhE;;;OAGG;IAEI,gBAAgB,CAAC,YAAY,EAAE,kBAAkB,GAAG,WAAW;IAgBtE;;;;OAIG;IACI,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW;CAGhD"}
|
|
@@ -53,8 +53,7 @@ export class PlainLocalValue {
|
|
|
53
53
|
/**
|
|
54
54
|
* Enables a container type {@link https://fluidframework.com/docs/build/dds/ | DDS} to produce and store local
|
|
55
55
|
* values with minimal awareness of how those objects are stored, serialized, and deserialized.
|
|
56
|
-
*
|
|
57
|
-
* @public
|
|
56
|
+
* @alpha
|
|
58
57
|
*/
|
|
59
58
|
export class LocalValueMaker {
|
|
60
59
|
/**
|
|
@@ -91,4 +90,4 @@ export class LocalValueMaker {
|
|
|
91
90
|
return new PlainLocalValue(value);
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
|
-
//# sourceMappingURL=localValues.
|
|
93
|
+
//# sourceMappingURL=localValues.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localValues.mjs","sourceRoot":"","sources":["../src/localValues.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAGI,EAGN,YAAY,EACZ,gBAAgB,EAChB,SAAS,GACT,MAAM,oCAAoC;AA8B3C;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAC/B,UAAuB,EACvB,UAA4B,EAC5B,IAAkB;IAGlB,MAAM,KAAK,GAAG,UAAU,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC1D,OAAO;QACN,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,mEAAmE;QACnE,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;KAC7C,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,eAAe;IAC3B;;;OAGG;IACH,YAAmC,KAAc;QAAd,UAAK,GAAL,KAAK,CAAS;IAAG,CAAC;IAErD;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,cAAc,CAAC,UAA4B,EAAE,IAAkB;QACrE,2FAA2F;QAC3F,oBAAoB;QACpB,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QAE7D,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK;SACL,CAAC;IACH,CAAC;CACD;AAED;;;;GAIG;AACH,MAAM,OAAO,eAAe;IAC3B;;;OAGG;IACH,YAAoC,UAA4B;QAA5B,eAAU,GAAV,UAAU,CAAkB;IAAG,CAAC;IAEpE;;;OAGG;IACH,gDAAgD;IACzC,gBAAgB,CAAC,YAAgC;QACvD,2CAA2C;QAC3C,IAAI,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;YACtD,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC/C,MAAM,MAAM,GAAsB;gBACjC,IAAI,EAAE,kBAAkB;gBACxB,GAAG,EAAE,YAAY,CAAC,KAAe;aACjC,CAAC;YACF,YAAY,CAAC,KAAK,GAAG,MAAM,CAAC;SAC5B;QAED,MAAM,eAAe,GAAY,YAAY,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAEnF,OAAO,IAAI,eAAe,CAAC,eAAe,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,YAAY,CAAC,KAAc;QACjC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport {\n\tIFluidSerializer,\n\tISerializedHandle,\n\tparseHandles,\n\tserializeHandles,\n\tValueType,\n} from \"@fluidframework/shared-object-base\";\n// eslint-disable-next-line import/no-deprecated\nimport { ISerializableValue, ISerializedValue } from \"./interfaces\";\n\n/**\n * A local value to be stored in a container type Distributed Data Store (DDS).\n * @alpha\n */\nexport interface ILocalValue {\n\t/**\n\t * Type indicator of the value stored within.\n\t */\n\treadonly type: string;\n\n\t/**\n\t * The in-memory value stored within.\n\t */\n\t// TODO: Use `unknown` instead (breaking change).\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly value: any;\n\n\t/**\n\t * Retrieve the serialized form of the value stored within.\n\t * @param serializer - Data store runtime's serializer\n\t * @param bind - Container type's handle\n\t * @returns The serialized form of the contained value\n\t */\n\tmakeSerialized(serializer: IFluidSerializer, bind: IFluidHandle): ISerializedValue;\n}\n\n/**\n * Converts the provided `localValue` to its serialized form.\n *\n * @param localValue - The value to serialize.\n * @param serializer - Data store runtime's serializer.\n * @param bind - Container type's handle.\n *\n * @see {@link ILocalValue.makeSerialized}\n */\nexport function makeSerializable(\n\tlocalValue: ILocalValue,\n\tserializer: IFluidSerializer,\n\tbind: IFluidHandle,\n\t// eslint-disable-next-line import/no-deprecated\n): ISerializableValue {\n\tconst value = localValue.makeSerialized(serializer, bind);\n\treturn {\n\t\ttype: value.type,\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\tvalue: value.value && JSON.parse(value.value),\n\t};\n}\n\n/**\n * Manages a contained plain value. May also contain shared object handles.\n */\nexport class PlainLocalValue implements ILocalValue {\n\t/**\n\t * Create a new PlainLocalValue.\n\t * @param value - The value to store, which may contain shared object handles\n\t */\n\tpublic constructor(public readonly value: unknown) {}\n\n\t/**\n\t * {@inheritDoc ILocalValue.\"type\"}\n\t */\n\tpublic get type(): string {\n\t\treturn ValueType[ValueType.Plain];\n\t}\n\n\t/**\n\t * {@inheritDoc ILocalValue.makeSerialized}\n\t */\n\tpublic makeSerialized(serializer: IFluidSerializer, bind: IFluidHandle): ISerializedValue {\n\t\t// Stringify to convert to the serialized handle values - and then parse in order to create\n\t\t// a POJO for the op\n\t\tconst value = serializeHandles(this.value, serializer, bind);\n\n\t\treturn {\n\t\t\ttype: this.type,\n\t\t\tvalue,\n\t\t};\n\t}\n}\n\n/**\n * Enables a container type {@link https://fluidframework.com/docs/build/dds/ | DDS} to produce and store local\n * values with minimal awareness of how those objects are stored, serialized, and deserialized.\n * @alpha\n */\nexport class LocalValueMaker {\n\t/**\n\t * Create a new LocalValueMaker.\n\t * @param serializer - The serializer to serialize / parse handles.\n\t */\n\tpublic constructor(private readonly serializer: IFluidSerializer) {}\n\n\t/**\n\t * Create a new local value from an incoming serialized value.\n\t * @param serializable - The serializable value to make local\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\tpublic fromSerializable(serializable: ISerializableValue): ILocalValue {\n\t\t// Migrate from old shared value to handles\n\t\tif (serializable.type === ValueType[ValueType.Shared]) {\n\t\t\tserializable.type = ValueType[ValueType.Plain];\n\t\t\tconst handle: ISerializedHandle = {\n\t\t\t\ttype: \"__fluid_handle__\",\n\t\t\t\turl: serializable.value as string,\n\t\t\t};\n\t\t\tserializable.value = handle;\n\t\t}\n\n\t\tconst translatedValue: unknown = parseHandles(serializable.value, this.serializer);\n\n\t\treturn new PlainLocalValue(translatedValue);\n\t}\n\n\t/**\n\t * Create a new local value containing a given plain object.\n\t * @param value - The value to store\n\t * @returns An ILocalValue containing the value\n\t */\n\tpublic fromInMemory(value: unknown): ILocalValue {\n\t\treturn new PlainLocalValue(value);\n\t}\n}\n"]}
|