@fluidframework/fluid-static 2.92.0 → 2.93.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 +4 -0
- package/README.md +3 -1
- package/alpha.d.ts +11 -0
- package/api-extractor/api-extractor-lint-alpha.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-alpha.esm.json +5 -0
- package/api-extractor/api-extractor.current.json +4 -1
- package/api-report/fluid-static.alpha.api.md +89 -0
- package/api-report/fluid-static.beta.api.md +3 -0
- package/api-report/fluid-static.legacy.beta.api.md +3 -0
- package/api-report/fluid-static.legacy.public.api.md +3 -0
- package/api-report/fluid-static.public.api.md +3 -0
- package/dist/alpha.d.ts +37 -0
- package/dist/getPresence.d.ts +23 -0
- package/dist/getPresence.d.ts.map +1 -0
- package/dist/getPresence.js +32 -0
- package/dist/getPresence.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +2 -1
- package/dist/public.d.ts +2 -1
- package/eslint.config.mts +1 -1
- package/lib/alpha.d.ts +37 -0
- package/lib/getPresence.d.ts +23 -0
- package/lib/getPresence.d.ts.map +1 -0
- package/lib/getPresence.js +30 -0
- package/lib/getPresence.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +2 -1
- package/lib/public.d.ts +2 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +38 -25
- package/src/getPresence.ts +43 -0
- package/src/index.ts +1 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -30,6 +30,8 @@ For more information on the related support guarantees, see [API Support Levels]
|
|
|
30
30
|
|
|
31
31
|
To access the `public` ([SemVer](https://semver.org/)) APIs, import via `@fluidframework/fluid-static` like normal.
|
|
32
32
|
|
|
33
|
+
To access the `alpha` APIs, import via `@fluidframework/fluid-static/alpha`.
|
|
34
|
+
|
|
33
35
|
To access the `legacy` APIs, import via `@fluidframework/fluid-static/legacy`.
|
|
34
36
|
|
|
35
37
|
## API Documentation
|
|
@@ -63,7 +65,7 @@ When making such a request please include if the configuration already works (an
|
|
|
63
65
|
|
|
64
66
|
### Supported Runtimes
|
|
65
67
|
|
|
66
|
-
- NodeJs ^
|
|
68
|
+
- NodeJs ^22.22.2 except that we will drop support for it [when NodeJs 22 loses its upstream support on 2027-04-30](https://github.com/nodejs/release#release-schedule), and will support a newer LTS version of NodeJS at least 1 year before 22 is end-of-life.
|
|
67
69
|
- Running Fluid in a Node.js environment with the `--no-experimental-fetch` flag is not supported.
|
|
68
70
|
- Modern browsers supporting the es2022 standard library: in response to asks we can add explicit support for using babel to polyfill to target specific standards or runtimes (meaning we can avoid/remove use of things that don't polyfill robustly, but otherwise target modern standards).
|
|
69
71
|
|
package/alpha.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
+
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export * from "./lib/alpha.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/dist/alpha.d.ts"
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/lib/alpha.d.ts"
|
|
5
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
3
|
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.current.json",
|
|
4
|
-
"mainEntryPointFilePath": "<projectFolder>/lib/
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/lib/alpha.d.ts",
|
|
5
|
+
"apiReport": {
|
|
6
|
+
"reportVariants": ["public", "beta", "alpha"]
|
|
7
|
+
}
|
|
5
8
|
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
## Alpha API Report File for "@fluidframework/fluid-static"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
// @public
|
|
8
|
+
export type CompatibilityMode = "1" | "2";
|
|
9
|
+
|
|
10
|
+
// @public
|
|
11
|
+
export type ContainerAttachProps<T = unknown> = T;
|
|
12
|
+
|
|
13
|
+
// @public
|
|
14
|
+
export interface ContainerSchema {
|
|
15
|
+
readonly dynamicObjectTypes?: readonly SharedObjectKind[];
|
|
16
|
+
readonly initialObjects: Record<string, SharedObjectKind>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// @public
|
|
20
|
+
export const getPresence: (fluidContainer: IFluidContainer) => Presence;
|
|
21
|
+
|
|
22
|
+
// @alpha
|
|
23
|
+
export function getPresenceAlpha(fluidContainer: IFluidContainer): PresenceWithNotifications;
|
|
24
|
+
|
|
25
|
+
// @public
|
|
26
|
+
export interface IConnection {
|
|
27
|
+
readonly id: string;
|
|
28
|
+
readonly mode: "write" | "read";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// @public @sealed
|
|
32
|
+
export interface IFluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema> extends IEventProvider<IFluidContainerEvents> {
|
|
33
|
+
attach(props?: ContainerAttachProps): Promise<string>;
|
|
34
|
+
readonly attachState: AttachState;
|
|
35
|
+
connect(): void;
|
|
36
|
+
readonly connectionState: ConnectionState;
|
|
37
|
+
create<T extends IFluidLoadable>(objectClass: SharedObjectKind<T>): Promise<T>;
|
|
38
|
+
disconnect(): void;
|
|
39
|
+
dispose(): void;
|
|
40
|
+
readonly disposed: boolean;
|
|
41
|
+
readonly initialObjects: InitialObjects<TContainerSchema>;
|
|
42
|
+
readonly isDirty: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// @public @sealed
|
|
46
|
+
export interface IFluidContainerEvents extends IEvent {
|
|
47
|
+
(event: "connected", listener: () => void): void;
|
|
48
|
+
(event: "disconnected", listener: () => void): void;
|
|
49
|
+
(event: "saved", listener: () => void): void;
|
|
50
|
+
(event: "dirty", listener: () => void): void;
|
|
51
|
+
(event: "disposed", listener: (error?: ICriticalContainerError) => void): any;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// @public
|
|
55
|
+
export interface IMember {
|
|
56
|
+
readonly connections: IConnection[];
|
|
57
|
+
readonly id: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// @public
|
|
61
|
+
export type InitialObjects<T extends ContainerSchema> = {
|
|
62
|
+
[K in keyof T["initialObjects"]]: T["initialObjects"][K] extends SharedObjectKind<infer TChannel> ? TChannel : never;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// @public
|
|
66
|
+
export interface IServiceAudience<M extends IMember> extends IEventProvider<IServiceAudienceEvents<M>> {
|
|
67
|
+
getMembers(): ReadonlyMap<string, M>;
|
|
68
|
+
getMyself(): Myself<M> | undefined;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// @public
|
|
72
|
+
export interface IServiceAudienceEvents<M extends IMember> extends IEvent {
|
|
73
|
+
// @eventProperty
|
|
74
|
+
(event: "membersChanged", listener: () => void): void;
|
|
75
|
+
// @eventProperty
|
|
76
|
+
(event: "memberAdded", listener: MemberChangedListener<M>): void;
|
|
77
|
+
// @eventProperty
|
|
78
|
+
(event: "memberRemoved", listener: MemberChangedListener<M>): void;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// @public
|
|
82
|
+
export type MemberChangedListener<M extends IMember> = (clientId: string, member: M) => void;
|
|
83
|
+
|
|
84
|
+
// @public
|
|
85
|
+
export type Myself<M extends IMember = IMember> = M & {
|
|
86
|
+
readonly currentConnection: string;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
```
|
|
@@ -16,6 +16,9 @@ export interface ContainerSchema {
|
|
|
16
16
|
readonly initialObjects: Record<string, SharedObjectKind>;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
// @public
|
|
20
|
+
export const getPresence: (fluidContainer: IFluidContainer) => Presence;
|
|
21
|
+
|
|
19
22
|
// @public
|
|
20
23
|
export interface IConnection {
|
|
21
24
|
readonly id: string;
|
|
@@ -25,6 +25,9 @@ export function createTreeContainerRuntimeFactory(props: {
|
|
|
25
25
|
readonly minVersionForCollabOverride?: MinimumVersionForCollab;
|
|
26
26
|
}): IRuntimeFactory;
|
|
27
27
|
|
|
28
|
+
// @public
|
|
29
|
+
export const getPresence: (fluidContainer: IFluidContainer) => Presence;
|
|
30
|
+
|
|
28
31
|
// @public
|
|
29
32
|
export interface IConnection {
|
|
30
33
|
readonly id: string;
|
|
@@ -16,6 +16,9 @@ export interface ContainerSchema {
|
|
|
16
16
|
readonly initialObjects: Record<string, SharedObjectKind>;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
// @public
|
|
20
|
+
export const getPresence: (fluidContainer: IFluidContainer) => Presence;
|
|
21
|
+
|
|
19
22
|
// @public
|
|
20
23
|
export interface IConnection {
|
|
21
24
|
readonly id: string;
|
|
@@ -16,6 +16,9 @@ export interface ContainerSchema {
|
|
|
16
16
|
readonly initialObjects: Record<string, SharedObjectKind>;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
// @public
|
|
20
|
+
export const getPresence: (fluidContainer: IFluidContainer) => Presence;
|
|
21
|
+
|
|
19
22
|
// @public
|
|
20
23
|
export interface IConnection {
|
|
21
24
|
readonly id: string;
|
package/dist/alpha.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
+
* Generated by "flub generate entrypoints --resolutionConditions require --outFileLegacyBeta legacy --outDir ./dist" in @fluid-tools/build-cli.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Provides a simple and powerful way to consume collaborative Fluid data.
|
|
13
|
+
*
|
|
14
|
+
* @packageDocumentation
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
// #region @public APIs
|
|
19
|
+
CompatibilityMode,
|
|
20
|
+
ContainerAttachProps,
|
|
21
|
+
ContainerSchema,
|
|
22
|
+
IConnection,
|
|
23
|
+
IFluidContainer,
|
|
24
|
+
IFluidContainerEvents,
|
|
25
|
+
IMember,
|
|
26
|
+
IServiceAudience,
|
|
27
|
+
IServiceAudienceEvents,
|
|
28
|
+
InitialObjects,
|
|
29
|
+
MemberChangedListener,
|
|
30
|
+
Myself,
|
|
31
|
+
getPresence,
|
|
32
|
+
// #endregion
|
|
33
|
+
|
|
34
|
+
// #region @alpha APIs
|
|
35
|
+
getPresenceAlpha
|
|
36
|
+
// #endregion
|
|
37
|
+
} from "./index.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import type { Presence, PresenceWithNotifications } from "@fluid-internal/presence-definitions";
|
|
6
|
+
import type { IFluidContainer } from "./fluidContainer.js";
|
|
7
|
+
/**
|
|
8
|
+
* Acquire a {@link @fluidframework/presence#Presence} from a Fluid Container
|
|
9
|
+
* @param fluidContainer - Fluid Container to acquire the map from
|
|
10
|
+
* @returns the {@link @fluidframework/presence#Presence}
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare const getPresence: (fluidContainer: IFluidContainer) => Presence;
|
|
15
|
+
/**
|
|
16
|
+
* Acquire a {@link @fluidframework/presence#PresenceWithNotifications} from a Fluid Container
|
|
17
|
+
* @param fluidContainer - Fluid Container to acquire the map from
|
|
18
|
+
* @returns the {@link @fluidframework/presence#PresenceWithNotifications}
|
|
19
|
+
*
|
|
20
|
+
* @alpha
|
|
21
|
+
*/
|
|
22
|
+
export declare function getPresenceAlpha(fluidContainer: IFluidContainer): PresenceWithNotifications;
|
|
23
|
+
//# sourceMappingURL=getPresence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPresence.d.ts","sourceRoot":"","sources":["../src/getPresence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,QAAQ,EACR,yBAAyB,EACzB,MAAM,sCAAsC,CAAC;AAQ9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,cAAc,EAAE,eAAe,KAAK,QAA2B,CAAC;AAE3F;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,eAAe,GAAG,yBAAyB,CAO3F"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.getPresenceAlpha = exports.getPresence = void 0;
|
|
8
|
+
const extension_1 = require("@fluid-internal/presence-runtime/extension");
|
|
9
|
+
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
10
|
+
const fluidContainer_js_1 = require("./fluidContainer.js");
|
|
11
|
+
/**
|
|
12
|
+
* Acquire a {@link @fluidframework/presence#Presence} from a Fluid Container
|
|
13
|
+
* @param fluidContainer - Fluid Container to acquire the map from
|
|
14
|
+
* @returns the {@link @fluidframework/presence#Presence}
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
exports.getPresence = getPresenceAlpha;
|
|
19
|
+
/**
|
|
20
|
+
* Acquire a {@link @fluidframework/presence#PresenceWithNotifications} from a Fluid Container
|
|
21
|
+
* @param fluidContainer - Fluid Container to acquire the map from
|
|
22
|
+
* @returns the {@link @fluidframework/presence#PresenceWithNotifications}
|
|
23
|
+
*
|
|
24
|
+
* @alpha
|
|
25
|
+
*/
|
|
26
|
+
function getPresenceAlpha(fluidContainer) {
|
|
27
|
+
(0, internal_1.assert)((0, fluidContainer_js_1.isInternalFluidContainer)(fluidContainer), 0xa2f /* IFluidContainer was not recognized. Only Containers generated by the Fluid Framework are supported. */);
|
|
28
|
+
const presence = fluidContainer.acquireExtension(extension_1.extensionId, extension_1.ContainerPresenceFactory);
|
|
29
|
+
return presence;
|
|
30
|
+
}
|
|
31
|
+
exports.getPresenceAlpha = getPresenceAlpha;
|
|
32
|
+
//# sourceMappingURL=getPresence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPresence.js","sourceRoot":"","sources":["../src/getPresence.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH,0EAIoD;AACpD,kEAA6D;AAG7D,2DAA+D;AAE/D;;;;;;GAMG;AACU,QAAA,WAAW,GAAkD,gBAAgB,CAAC;AAE3F;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,cAA+B;IAC/D,IAAA,iBAAM,EACL,IAAA,4CAAwB,EAAC,cAAc,CAAC,EACxC,KAAK,CAAC,yGAAyG,CAC/G,CAAC;IACF,MAAM,QAAQ,GAAG,cAAc,CAAC,gBAAgB,CAAC,uBAAW,EAAE,oCAAwB,CAAC,CAAC;IACxF,OAAO,QAAQ,CAAC;AACjB,CAAC;AAPD,4CAOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tPresence,\n\tPresenceWithNotifications,\n} from \"@fluid-internal/presence-definitions\";\nimport {\n\tContainerPresenceFactory,\n\textensionId,\n\t// eslint-disable-next-line import-x/no-internal-modules -- any import spec is allowed for @fluid-internal/ imports - eslint-config-fluid needs updated\n} from \"@fluid-internal/presence-runtime/extension\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { IFluidContainer } from \"./fluidContainer.js\";\nimport { isInternalFluidContainer } from \"./fluidContainer.js\";\n\n/**\n * Acquire a {@link @fluidframework/presence#Presence} from a Fluid Container\n * @param fluidContainer - Fluid Container to acquire the map from\n * @returns the {@link @fluidframework/presence#Presence}\n *\n * @public\n */\nexport const getPresence: (fluidContainer: IFluidContainer) => Presence = getPresenceAlpha;\n\n/**\n * Acquire a {@link @fluidframework/presence#PresenceWithNotifications} from a Fluid Container\n * @param fluidContainer - Fluid Container to acquire the map from\n * @returns the {@link @fluidframework/presence#PresenceWithNotifications}\n *\n * @alpha\n */\nexport function getPresenceAlpha(fluidContainer: IFluidContainer): PresenceWithNotifications {\n\tassert(\n\t\tisInternalFluidContainer(fluidContainer),\n\t\t0xa2f /* IFluidContainer was not recognized. Only Containers generated by the Fluid Framework are supported. */,\n\t);\n\tconst presence = fluidContainer.acquireExtension(extensionId, ContainerPresenceFactory);\n\treturn presence;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
10
|
export { createFluidContainer, isInternalFluidContainer, type IFluidContainer, type IFluidContainerEvents, type IFluidContainerInternal, type InitialObjects, } from "./fluidContainer.js";
|
|
11
|
+
export { getPresence, getPresenceAlpha } from "./getPresence.js";
|
|
11
12
|
export { createDOProviderContainerRuntimeFactory } from "./rootDataObject.js";
|
|
12
13
|
export { createServiceAudience } from "./serviceAudience.js";
|
|
13
14
|
export { createTreeContainerRuntimeFactory } from "./treeRootDataObject.js";
|
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;;;;GAIG;AAEH,OAAO,EACN,oBAAoB,EACpB,wBAAwB,EACxB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAC5E,YAAY,EACX,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,EACN,mBAAmB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACN,oBAAoB,EACpB,wBAAwB,EACxB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAC5E,YAAY,EACX,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,EACN,mBAAmB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.isTreeContainerSchema = exports.createTreeContainerRuntimeFactory = exports.createServiceAudience = exports.createDOProviderContainerRuntimeFactory = exports.isInternalFluidContainer = exports.createFluidContainer = void 0;
|
|
7
|
+
exports.isTreeContainerSchema = exports.createTreeContainerRuntimeFactory = exports.createServiceAudience = exports.createDOProviderContainerRuntimeFactory = exports.getPresenceAlpha = exports.getPresence = exports.isInternalFluidContainer = exports.createFluidContainer = void 0;
|
|
8
8
|
/**
|
|
9
9
|
* Provides a simple and powerful way to consume collaborative Fluid data.
|
|
10
10
|
*
|
|
@@ -13,6 +13,9 @@ exports.isTreeContainerSchema = exports.createTreeContainerRuntimeFactory = expo
|
|
|
13
13
|
var fluidContainer_js_1 = require("./fluidContainer.js");
|
|
14
14
|
Object.defineProperty(exports, "createFluidContainer", { enumerable: true, get: function () { return fluidContainer_js_1.createFluidContainer; } });
|
|
15
15
|
Object.defineProperty(exports, "isInternalFluidContainer", { enumerable: true, get: function () { return fluidContainer_js_1.isInternalFluidContainer; } });
|
|
16
|
+
var getPresence_js_1 = require("./getPresence.js");
|
|
17
|
+
Object.defineProperty(exports, "getPresence", { enumerable: true, get: function () { return getPresence_js_1.getPresence; } });
|
|
18
|
+
Object.defineProperty(exports, "getPresenceAlpha", { enumerable: true, get: function () { return getPresence_js_1.getPresenceAlpha; } });
|
|
16
19
|
var rootDataObject_js_1 = require("./rootDataObject.js");
|
|
17
20
|
Object.defineProperty(exports, "createDOProviderContainerRuntimeFactory", { enumerable: true, get: function () { return rootDataObject_js_1.createDOProviderContainerRuntimeFactory; } });
|
|
18
21
|
var serviceAudience_js_1 = require("./serviceAudience.js");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;GAIG;AAEH,yDAO6B;AAN5B,yHAAA,oBAAoB,OAAA;AACpB,6HAAA,wBAAwB,OAAA;AAMzB,yDAA8E;AAArE,4IAAA,uCAAuC,OAAA;AAChD,2DAA6D;AAApD,2HAAA,qBAAqB,OAAA;AAC9B,iEAA4E;AAAnE,0IAAA,iCAAiC,OAAA;AAa1C,uCAAmD;AAA1C,iHAAA,qBAAqB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Provides a simple and powerful way to consume collaborative Fluid data.\n *\n * @packageDocumentation\n */\n\nexport {\n\tcreateFluidContainer,\n\tisInternalFluidContainer,\n\ttype IFluidContainer,\n\ttype IFluidContainerEvents,\n\ttype IFluidContainerInternal,\n\ttype InitialObjects,\n} from \"./fluidContainer.js\";\nexport { createDOProviderContainerRuntimeFactory } from \"./rootDataObject.js\";\nexport { createServiceAudience } from \"./serviceAudience.js\";\nexport { createTreeContainerRuntimeFactory } from \"./treeRootDataObject.js\";\nexport type {\n\tCompatibilityMode,\n\tContainerSchema,\n\tContainerAttachProps,\n\tIConnection,\n\tIMember,\n\tIServiceAudience,\n\tIServiceAudienceEvents,\n\tMemberChangedListener,\n\tMyself,\n\tTreeContainerSchema,\n} from \"./types.js\";\nexport { isTreeContainerSchema } from \"./utils.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;GAIG;AAEH,yDAO6B;AAN5B,yHAAA,oBAAoB,OAAA;AACpB,6HAAA,wBAAwB,OAAA;AAMzB,mDAAiE;AAAxD,6GAAA,WAAW,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AACtC,yDAA8E;AAArE,4IAAA,uCAAuC,OAAA;AAChD,2DAA6D;AAApD,2HAAA,qBAAqB,OAAA;AAC9B,iEAA4E;AAAnE,0IAAA,iCAAiC,OAAA;AAa1C,uCAAmD;AAA1C,iHAAA,qBAAqB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Provides a simple and powerful way to consume collaborative Fluid data.\n *\n * @packageDocumentation\n */\n\nexport {\n\tcreateFluidContainer,\n\tisInternalFluidContainer,\n\ttype IFluidContainer,\n\ttype IFluidContainerEvents,\n\ttype IFluidContainerInternal,\n\ttype InitialObjects,\n} from \"./fluidContainer.js\";\nexport { getPresence, getPresenceAlpha } from \"./getPresence.js\";\nexport { createDOProviderContainerRuntimeFactory } from \"./rootDataObject.js\";\nexport { createServiceAudience } from \"./serviceAudience.js\";\nexport { createTreeContainerRuntimeFactory } from \"./treeRootDataObject.js\";\nexport type {\n\tCompatibilityMode,\n\tContainerSchema,\n\tContainerAttachProps,\n\tIConnection,\n\tIMember,\n\tIServiceAudience,\n\tIServiceAudienceEvents,\n\tMemberChangedListener,\n\tMyself,\n\tTreeContainerSchema,\n} from \"./types.js\";\nexport { isTreeContainerSchema } from \"./utils.js\";\n"]}
|
package/dist/legacy.d.ts
CHANGED
package/dist/public.d.ts
CHANGED
package/eslint.config.mts
CHANGED
package/lib/alpha.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
+
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Provides a simple and powerful way to consume collaborative Fluid data.
|
|
13
|
+
*
|
|
14
|
+
* @packageDocumentation
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
// #region @public APIs
|
|
19
|
+
CompatibilityMode,
|
|
20
|
+
ContainerAttachProps,
|
|
21
|
+
ContainerSchema,
|
|
22
|
+
IConnection,
|
|
23
|
+
IFluidContainer,
|
|
24
|
+
IFluidContainerEvents,
|
|
25
|
+
IMember,
|
|
26
|
+
IServiceAudience,
|
|
27
|
+
IServiceAudienceEvents,
|
|
28
|
+
InitialObjects,
|
|
29
|
+
MemberChangedListener,
|
|
30
|
+
Myself,
|
|
31
|
+
getPresence,
|
|
32
|
+
// #endregion
|
|
33
|
+
|
|
34
|
+
// #region @alpha APIs
|
|
35
|
+
getPresenceAlpha
|
|
36
|
+
// #endregion
|
|
37
|
+
} from "./index.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import type { Presence, PresenceWithNotifications } from "@fluid-internal/presence-definitions";
|
|
6
|
+
import type { IFluidContainer } from "./fluidContainer.js";
|
|
7
|
+
/**
|
|
8
|
+
* Acquire a {@link @fluidframework/presence#Presence} from a Fluid Container
|
|
9
|
+
* @param fluidContainer - Fluid Container to acquire the map from
|
|
10
|
+
* @returns the {@link @fluidframework/presence#Presence}
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare const getPresence: (fluidContainer: IFluidContainer) => Presence;
|
|
15
|
+
/**
|
|
16
|
+
* Acquire a {@link @fluidframework/presence#PresenceWithNotifications} from a Fluid Container
|
|
17
|
+
* @param fluidContainer - Fluid Container to acquire the map from
|
|
18
|
+
* @returns the {@link @fluidframework/presence#PresenceWithNotifications}
|
|
19
|
+
*
|
|
20
|
+
* @alpha
|
|
21
|
+
*/
|
|
22
|
+
export declare function getPresenceAlpha(fluidContainer: IFluidContainer): PresenceWithNotifications;
|
|
23
|
+
//# sourceMappingURL=getPresence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPresence.d.ts","sourceRoot":"","sources":["../src/getPresence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,QAAQ,EACR,yBAAyB,EACzB,MAAM,sCAAsC,CAAC;AAQ9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,cAAc,EAAE,eAAe,KAAK,QAA2B,CAAC;AAE3F;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,eAAe,GAAG,yBAAyB,CAO3F"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { ContainerPresenceFactory, extensionId,
|
|
6
|
+
// eslint-disable-next-line import-x/no-internal-modules -- any import spec is allowed for @fluid-internal/ imports - eslint-config-fluid needs updated
|
|
7
|
+
} from "@fluid-internal/presence-runtime/extension";
|
|
8
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
9
|
+
import { isInternalFluidContainer } from "./fluidContainer.js";
|
|
10
|
+
/**
|
|
11
|
+
* Acquire a {@link @fluidframework/presence#Presence} from a Fluid Container
|
|
12
|
+
* @param fluidContainer - Fluid Container to acquire the map from
|
|
13
|
+
* @returns the {@link @fluidframework/presence#Presence}
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export const getPresence = getPresenceAlpha;
|
|
18
|
+
/**
|
|
19
|
+
* Acquire a {@link @fluidframework/presence#PresenceWithNotifications} from a Fluid Container
|
|
20
|
+
* @param fluidContainer - Fluid Container to acquire the map from
|
|
21
|
+
* @returns the {@link @fluidframework/presence#PresenceWithNotifications}
|
|
22
|
+
*
|
|
23
|
+
* @alpha
|
|
24
|
+
*/
|
|
25
|
+
export function getPresenceAlpha(fluidContainer) {
|
|
26
|
+
assert(isInternalFluidContainer(fluidContainer), 0xa2f /* IFluidContainer was not recognized. Only Containers generated by the Fluid Framework are supported. */);
|
|
27
|
+
const presence = fluidContainer.acquireExtension(extensionId, ContainerPresenceFactory);
|
|
28
|
+
return presence;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=getPresence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPresence.js","sourceRoot":"","sources":["../src/getPresence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,wBAAwB,EACxB,WAAW;AACX,uJAAuJ;EACvJ,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAG7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkD,gBAAgB,CAAC;AAE3F;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,cAA+B;IAC/D,MAAM,CACL,wBAAwB,CAAC,cAAc,CAAC,EACxC,KAAK,CAAC,yGAAyG,CAC/G,CAAC;IACF,MAAM,QAAQ,GAAG,cAAc,CAAC,gBAAgB,CAAC,WAAW,EAAE,wBAAwB,CAAC,CAAC;IACxF,OAAO,QAAQ,CAAC;AACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tPresence,\n\tPresenceWithNotifications,\n} from \"@fluid-internal/presence-definitions\";\nimport {\n\tContainerPresenceFactory,\n\textensionId,\n\t// eslint-disable-next-line import-x/no-internal-modules -- any import spec is allowed for @fluid-internal/ imports - eslint-config-fluid needs updated\n} from \"@fluid-internal/presence-runtime/extension\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { IFluidContainer } from \"./fluidContainer.js\";\nimport { isInternalFluidContainer } from \"./fluidContainer.js\";\n\n/**\n * Acquire a {@link @fluidframework/presence#Presence} from a Fluid Container\n * @param fluidContainer - Fluid Container to acquire the map from\n * @returns the {@link @fluidframework/presence#Presence}\n *\n * @public\n */\nexport const getPresence: (fluidContainer: IFluidContainer) => Presence = getPresenceAlpha;\n\n/**\n * Acquire a {@link @fluidframework/presence#PresenceWithNotifications} from a Fluid Container\n * @param fluidContainer - Fluid Container to acquire the map from\n * @returns the {@link @fluidframework/presence#PresenceWithNotifications}\n *\n * @alpha\n */\nexport function getPresenceAlpha(fluidContainer: IFluidContainer): PresenceWithNotifications {\n\tassert(\n\t\tisInternalFluidContainer(fluidContainer),\n\t\t0xa2f /* IFluidContainer was not recognized. Only Containers generated by the Fluid Framework are supported. */,\n\t);\n\tconst presence = fluidContainer.acquireExtension(extensionId, ContainerPresenceFactory);\n\treturn presence;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
10
|
export { createFluidContainer, isInternalFluidContainer, type IFluidContainer, type IFluidContainerEvents, type IFluidContainerInternal, type InitialObjects, } from "./fluidContainer.js";
|
|
11
|
+
export { getPresence, getPresenceAlpha } from "./getPresence.js";
|
|
11
12
|
export { createDOProviderContainerRuntimeFactory } from "./rootDataObject.js";
|
|
12
13
|
export { createServiceAudience } from "./serviceAudience.js";
|
|
13
14
|
export { createTreeContainerRuntimeFactory } from "./treeRootDataObject.js";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACN,oBAAoB,EACpB,wBAAwB,EACxB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAC5E,YAAY,EACX,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,EACN,mBAAmB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACN,oBAAoB,EACpB,wBAAwB,EACxB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAC5E,YAAY,EACX,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,EACN,mBAAmB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
10
|
export { createFluidContainer, isInternalFluidContainer, } from "./fluidContainer.js";
|
|
11
|
+
export { getPresence, getPresenceAlpha } from "./getPresence.js";
|
|
11
12
|
export { createDOProviderContainerRuntimeFactory } from "./rootDataObject.js";
|
|
12
13
|
export { createServiceAudience } from "./serviceAudience.js";
|
|
13
14
|
export { createTreeContainerRuntimeFactory } from "./treeRootDataObject.js";
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACN,oBAAoB,EACpB,wBAAwB,GAKxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAa5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Provides a simple and powerful way to consume collaborative Fluid data.\n *\n * @packageDocumentation\n */\n\nexport {\n\tcreateFluidContainer,\n\tisInternalFluidContainer,\n\ttype IFluidContainer,\n\ttype IFluidContainerEvents,\n\ttype IFluidContainerInternal,\n\ttype InitialObjects,\n} from \"./fluidContainer.js\";\nexport { createDOProviderContainerRuntimeFactory } from \"./rootDataObject.js\";\nexport { createServiceAudience } from \"./serviceAudience.js\";\nexport { createTreeContainerRuntimeFactory } from \"./treeRootDataObject.js\";\nexport type {\n\tCompatibilityMode,\n\tContainerSchema,\n\tContainerAttachProps,\n\tIConnection,\n\tIMember,\n\tIServiceAudience,\n\tIServiceAudienceEvents,\n\tMemberChangedListener,\n\tMyself,\n\tTreeContainerSchema,\n} from \"./types.js\";\nexport { isTreeContainerSchema } from \"./utils.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACN,oBAAoB,EACpB,wBAAwB,GAKxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAa5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Provides a simple and powerful way to consume collaborative Fluid data.\n *\n * @packageDocumentation\n */\n\nexport {\n\tcreateFluidContainer,\n\tisInternalFluidContainer,\n\ttype IFluidContainer,\n\ttype IFluidContainerEvents,\n\ttype IFluidContainerInternal,\n\ttype InitialObjects,\n} from \"./fluidContainer.js\";\nexport { getPresence, getPresenceAlpha } from \"./getPresence.js\";\nexport { createDOProviderContainerRuntimeFactory } from \"./rootDataObject.js\";\nexport { createServiceAudience } from \"./serviceAudience.js\";\nexport { createTreeContainerRuntimeFactory } from \"./treeRootDataObject.js\";\nexport type {\n\tCompatibilityMode,\n\tContainerSchema,\n\tContainerAttachProps,\n\tIConnection,\n\tIMember,\n\tIServiceAudience,\n\tIServiceAudienceEvents,\n\tMemberChangedListener,\n\tMyself,\n\tTreeContainerSchema,\n} from \"./types.js\";\nexport { isTreeContainerSchema } from \"./utils.js\";\n"]}
|
package/lib/legacy.d.ts
CHANGED
package/lib/public.d.ts
CHANGED
package/lib/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/fluid-static",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.93.0",
|
|
4
4
|
"description": "A tool to enable consumption of Fluid Data Objects without requiring custom container code.",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -23,6 +23,16 @@
|
|
|
23
23
|
"default": "./dist/index.js"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
"./alpha": {
|
|
27
|
+
"import": {
|
|
28
|
+
"types": "./lib/alpha.d.ts",
|
|
29
|
+
"default": "./lib/index.js"
|
|
30
|
+
},
|
|
31
|
+
"require": {
|
|
32
|
+
"types": "./dist/alpha.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
26
36
|
"./legacy": {
|
|
27
37
|
"import": {
|
|
28
38
|
"types": "./lib/legacy.d.ts",
|
|
@@ -69,37 +79,39 @@
|
|
|
69
79
|
"temp-directory": "nyc/.nyc_output"
|
|
70
80
|
},
|
|
71
81
|
"dependencies": {
|
|
72
|
-
"@fluid-internal/client-utils": "~2.
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@fluidframework/
|
|
76
|
-
"@fluidframework/container-
|
|
77
|
-
"@fluidframework/container-
|
|
78
|
-
"@fluidframework/
|
|
79
|
-
"@fluidframework/
|
|
80
|
-
"@fluidframework/
|
|
81
|
-
"@fluidframework/
|
|
82
|
-
"@fluidframework/
|
|
83
|
-
"@fluidframework/
|
|
84
|
-
"@fluidframework/
|
|
85
|
-
"@fluidframework/
|
|
86
|
-
"@fluidframework/
|
|
87
|
-
"@fluidframework/
|
|
82
|
+
"@fluid-internal/client-utils": "~2.93.0",
|
|
83
|
+
"@fluid-internal/presence-definitions": "~2.93.0",
|
|
84
|
+
"@fluid-internal/presence-runtime": "~2.93.0",
|
|
85
|
+
"@fluidframework/aqueduct": "~2.93.0",
|
|
86
|
+
"@fluidframework/container-definitions": "~2.93.0",
|
|
87
|
+
"@fluidframework/container-loader": "~2.93.0",
|
|
88
|
+
"@fluidframework/container-runtime": "~2.93.0",
|
|
89
|
+
"@fluidframework/container-runtime-definitions": "~2.93.0",
|
|
90
|
+
"@fluidframework/core-interfaces": "~2.93.0",
|
|
91
|
+
"@fluidframework/core-utils": "~2.93.0",
|
|
92
|
+
"@fluidframework/datastore-definitions": "~2.93.0",
|
|
93
|
+
"@fluidframework/driver-definitions": "~2.93.0",
|
|
94
|
+
"@fluidframework/request-handler": "~2.93.0",
|
|
95
|
+
"@fluidframework/runtime-definitions": "~2.93.0",
|
|
96
|
+
"@fluidframework/runtime-utils": "~2.93.0",
|
|
97
|
+
"@fluidframework/shared-object-base": "~2.93.0",
|
|
98
|
+
"@fluidframework/telemetry-utils": "~2.93.0",
|
|
99
|
+
"@fluidframework/tree": "~2.93.0"
|
|
88
100
|
},
|
|
89
101
|
"devDependencies": {
|
|
90
102
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
91
103
|
"@biomejs/biome": "~2.4.5",
|
|
92
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
104
|
+
"@fluid-internal/mocha-test-setup": "~2.93.0",
|
|
93
105
|
"@fluid-tools/build-cli": "^0.64.0",
|
|
94
106
|
"@fluidframework/build-common": "^2.0.3",
|
|
95
107
|
"@fluidframework/build-tools": "^0.64.0",
|
|
96
108
|
"@fluidframework/eslint-config-fluid": "^9.0.0",
|
|
97
|
-
"@fluidframework/fluid-static-previous": "npm:@fluidframework/fluid-static@2.
|
|
98
|
-
"@fluidframework/map": "~2.
|
|
99
|
-
"@fluidframework/sequence": "~2.
|
|
100
|
-
"@microsoft/api-extractor": "7.
|
|
109
|
+
"@fluidframework/fluid-static-previous": "npm:@fluidframework/fluid-static@2.92.0",
|
|
110
|
+
"@fluidframework/map": "~2.93.0",
|
|
111
|
+
"@fluidframework/sequence": "~2.93.0",
|
|
112
|
+
"@microsoft/api-extractor": "7.58.1",
|
|
101
113
|
"@types/mocha": "^10.0.10",
|
|
102
|
-
"@types/node": "~
|
|
114
|
+
"@types/node": "~22.19.17",
|
|
103
115
|
"c8": "^10.1.3",
|
|
104
116
|
"concurrently": "^9.2.1",
|
|
105
117
|
"copyfiles": "^2.4.1",
|
|
@@ -134,8 +146,10 @@
|
|
|
134
146
|
"check:biome": "biome check .",
|
|
135
147
|
"check:exports": "concurrently \"npm:check:exports:*\"",
|
|
136
148
|
"check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
|
|
149
|
+
"check:exports:cjs:alpha": "api-extractor run --config api-extractor/api-extractor-lint-alpha.cjs.json",
|
|
137
150
|
"check:exports:cjs:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.cjs.json",
|
|
138
151
|
"check:exports:cjs:public": "api-extractor run --config api-extractor/api-extractor-lint-public.cjs.json",
|
|
152
|
+
"check:exports:esm:alpha": "api-extractor run --config api-extractor/api-extractor-lint-alpha.esm.json",
|
|
139
153
|
"check:exports:esm:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.esm.json",
|
|
140
154
|
"check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
|
|
141
155
|
"check:format": "npm run check:biome",
|
|
@@ -157,7 +171,6 @@
|
|
|
157
171
|
"test:mocha:esm": "mocha",
|
|
158
172
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
159
173
|
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
160
|
-
"typetests:gen": "flub generate typetests --dir . -v"
|
|
161
|
-
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
|
174
|
+
"typetests:gen": "flub generate typetests --dir . -v"
|
|
162
175
|
}
|
|
163
176
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type {
|
|
7
|
+
Presence,
|
|
8
|
+
PresenceWithNotifications,
|
|
9
|
+
} from "@fluid-internal/presence-definitions";
|
|
10
|
+
import {
|
|
11
|
+
ContainerPresenceFactory,
|
|
12
|
+
extensionId,
|
|
13
|
+
// eslint-disable-next-line import-x/no-internal-modules -- any import spec is allowed for @fluid-internal/ imports - eslint-config-fluid needs updated
|
|
14
|
+
} from "@fluid-internal/presence-runtime/extension";
|
|
15
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
16
|
+
|
|
17
|
+
import type { IFluidContainer } from "./fluidContainer.js";
|
|
18
|
+
import { isInternalFluidContainer } from "./fluidContainer.js";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Acquire a {@link @fluidframework/presence#Presence} from a Fluid Container
|
|
22
|
+
* @param fluidContainer - Fluid Container to acquire the map from
|
|
23
|
+
* @returns the {@link @fluidframework/presence#Presence}
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export const getPresence: (fluidContainer: IFluidContainer) => Presence = getPresenceAlpha;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Acquire a {@link @fluidframework/presence#PresenceWithNotifications} from a Fluid Container
|
|
31
|
+
* @param fluidContainer - Fluid Container to acquire the map from
|
|
32
|
+
* @returns the {@link @fluidframework/presence#PresenceWithNotifications}
|
|
33
|
+
*
|
|
34
|
+
* @alpha
|
|
35
|
+
*/
|
|
36
|
+
export function getPresenceAlpha(fluidContainer: IFluidContainer): PresenceWithNotifications {
|
|
37
|
+
assert(
|
|
38
|
+
isInternalFluidContainer(fluidContainer),
|
|
39
|
+
0xa2f /* IFluidContainer was not recognized. Only Containers generated by the Fluid Framework are supported. */,
|
|
40
|
+
);
|
|
41
|
+
const presence = fluidContainer.acquireExtension(extensionId, ContainerPresenceFactory);
|
|
42
|
+
return presence;
|
|
43
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ export {
|
|
|
17
17
|
type IFluidContainerInternal,
|
|
18
18
|
type InitialObjects,
|
|
19
19
|
} from "./fluidContainer.js";
|
|
20
|
+
export { getPresence, getPresenceAlpha } from "./getPresence.js";
|
|
20
21
|
export { createDOProviderContainerRuntimeFactory } from "./rootDataObject.js";
|
|
21
22
|
export { createServiceAudience } from "./serviceAudience.js";
|
|
22
23
|
export { createTreeContainerRuntimeFactory } from "./treeRootDataObject.js";
|