@fluidframework/presence 2.32.0 → 2.33.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/README.md +24 -24
- package/dist/alpha.d.ts +29 -25
- package/dist/baseTypes.d.ts +3 -3
- package/dist/baseTypes.js.map +1 -1
- package/dist/broadcastControls.d.ts +1 -1
- package/dist/broadcastControls.js.map +1 -1
- package/dist/datastorePresenceManagerFactory.d.ts +5 -5
- package/dist/datastorePresenceManagerFactory.d.ts.map +1 -1
- package/dist/datastorePresenceManagerFactory.js +6 -6
- package/dist/datastorePresenceManagerFactory.js.map +1 -1
- package/dist/experimentalAccess.d.ts +4 -4
- package/dist/experimentalAccess.d.ts.map +1 -1
- package/dist/experimentalAccess.js +6 -6
- package/dist/experimentalAccess.js.map +1 -1
- package/dist/exposedInternalTypes.d.ts +1 -1
- package/dist/exposedInternalTypes.js.map +1 -1
- package/dist/exposedUtilityTypes.d.ts +0 -8
- package/dist/exposedUtilityTypes.d.ts.map +1 -1
- package/dist/exposedUtilityTypes.js.map +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/dist/internalTypes.d.ts +3 -3
- package/dist/internalTypes.d.ts.map +1 -1
- package/dist/internalTypes.js.map +1 -1
- package/dist/internalUtils.d.ts +5 -0
- package/dist/internalUtils.d.ts.map +1 -1
- package/dist/internalUtils.js +8 -1
- package/dist/internalUtils.js.map +1 -1
- package/dist/latestMapValueManager.d.ts +57 -39
- package/dist/latestMapValueManager.d.ts.map +1 -1
- package/dist/latestMapValueManager.js +48 -39
- package/dist/latestMapValueManager.js.map +1 -1
- package/dist/latestValueManager.d.ts +38 -20
- package/dist/latestValueManager.d.ts.map +1 -1
- package/dist/latestValueManager.js +32 -28
- package/dist/latestValueManager.js.map +1 -1
- package/dist/latestValueTypes.d.ts +9 -10
- package/dist/latestValueTypes.d.ts.map +1 -1
- package/dist/latestValueTypes.js.map +1 -1
- package/dist/notificationsManager.d.ts +15 -10
- package/dist/notificationsManager.d.ts.map +1 -1
- package/dist/notificationsManager.js +8 -5
- package/dist/notificationsManager.js.map +1 -1
- package/dist/presence.d.ts +82 -66
- package/dist/presence.d.ts.map +1 -1
- package/dist/presence.js +5 -5
- package/dist/presence.js.map +1 -1
- package/dist/presenceDatastoreManager.d.ts +12 -10
- package/dist/presenceDatastoreManager.d.ts.map +1 -1
- package/dist/presenceDatastoreManager.js +10 -8
- package/dist/presenceDatastoreManager.js.map +1 -1
- package/dist/presenceManager.d.ts +2 -2
- package/dist/presenceManager.d.ts.map +1 -1
- package/dist/presenceManager.js +14 -22
- package/dist/presenceManager.js.map +1 -1
- package/dist/presenceStates.d.ts +14 -13
- package/dist/presenceStates.d.ts.map +1 -1
- package/dist/presenceStates.js +22 -15
- package/dist/presenceStates.js.map +1 -1
- package/dist/stateDatastore.d.ts +5 -4
- package/dist/stateDatastore.d.ts.map +1 -1
- package/dist/stateDatastore.js.map +1 -1
- package/dist/stateFactory.d.ts +22 -0
- package/dist/stateFactory.d.ts.map +1 -0
- package/dist/stateFactory.js +25 -0
- package/dist/stateFactory.js.map +1 -0
- package/dist/systemWorkspace.d.ts +7 -7
- package/dist/systemWorkspace.d.ts.map +1 -1
- package/dist/systemWorkspace.js +23 -23
- package/dist/systemWorkspace.js.map +1 -1
- package/dist/types.d.ts +50 -33
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/dist/types.js.map +1 -1
- package/lib/alpha.d.ts +29 -25
- package/lib/baseTypes.d.ts +3 -3
- package/lib/baseTypes.js.map +1 -1
- package/lib/broadcastControls.d.ts +1 -1
- package/lib/broadcastControls.js.map +1 -1
- package/lib/datastorePresenceManagerFactory.d.ts +5 -5
- package/lib/datastorePresenceManagerFactory.d.ts.map +1 -1
- package/lib/datastorePresenceManagerFactory.js +4 -4
- package/lib/datastorePresenceManagerFactory.js.map +1 -1
- package/lib/experimentalAccess.d.ts +4 -4
- package/lib/experimentalAccess.d.ts.map +1 -1
- package/lib/experimentalAccess.js +4 -4
- package/lib/experimentalAccess.js.map +1 -1
- package/lib/exposedInternalTypes.d.ts +1 -1
- package/lib/exposedInternalTypes.js.map +1 -1
- package/lib/exposedUtilityTypes.d.ts +0 -8
- package/lib/exposedUtilityTypes.d.ts.map +1 -1
- package/lib/exposedUtilityTypes.js.map +1 -1
- package/lib/index.d.ts +8 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -5
- package/lib/index.js.map +1 -1
- package/lib/internalTypes.d.ts +3 -3
- package/lib/internalTypes.d.ts.map +1 -1
- package/lib/internalTypes.js.map +1 -1
- package/lib/internalUtils.d.ts +5 -0
- package/lib/internalUtils.d.ts.map +1 -1
- package/lib/internalUtils.js +6 -0
- package/lib/internalUtils.js.map +1 -1
- package/lib/latestMapValueManager.d.ts +57 -39
- package/lib/latestMapValueManager.d.ts.map +1 -1
- package/lib/latestMapValueManager.js +47 -38
- package/lib/latestMapValueManager.js.map +1 -1
- package/lib/latestValueManager.d.ts +38 -20
- package/lib/latestValueManager.d.ts.map +1 -1
- package/lib/latestValueManager.js +31 -27
- package/lib/latestValueManager.js.map +1 -1
- package/lib/latestValueTypes.d.ts +9 -10
- package/lib/latestValueTypes.d.ts.map +1 -1
- package/lib/latestValueTypes.js.map +1 -1
- package/lib/notificationsManager.d.ts +15 -10
- package/lib/notificationsManager.d.ts.map +1 -1
- package/lib/notificationsManager.js +8 -5
- package/lib/notificationsManager.js.map +1 -1
- package/lib/presence.d.ts +82 -66
- package/lib/presence.d.ts.map +1 -1
- package/lib/presence.js +4 -4
- package/lib/presence.js.map +1 -1
- package/lib/presenceDatastoreManager.d.ts +12 -10
- package/lib/presenceDatastoreManager.d.ts.map +1 -1
- package/lib/presenceDatastoreManager.js +10 -8
- package/lib/presenceDatastoreManager.js.map +1 -1
- package/lib/presenceManager.d.ts +2 -2
- package/lib/presenceManager.d.ts.map +1 -1
- package/lib/presenceManager.js +14 -22
- package/lib/presenceManager.js.map +1 -1
- package/lib/presenceStates.d.ts +14 -13
- package/lib/presenceStates.d.ts.map +1 -1
- package/lib/presenceStates.js +22 -15
- package/lib/presenceStates.js.map +1 -1
- package/lib/stateDatastore.d.ts +5 -4
- package/lib/stateDatastore.d.ts.map +1 -1
- package/lib/stateDatastore.js.map +1 -1
- package/lib/stateFactory.d.ts +22 -0
- package/lib/stateFactory.d.ts.map +1 -0
- package/lib/stateFactory.js +22 -0
- package/lib/stateFactory.js.map +1 -0
- package/lib/systemWorkspace.d.ts +7 -7
- package/lib/systemWorkspace.d.ts.map +1 -1
- package/lib/systemWorkspace.js +24 -24
- package/lib/systemWorkspace.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/lib/types.d.ts +50 -33
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +0 -1
- package/lib/types.js.map +1 -1
- package/package.json +19 -19
package/README.md
CHANGED
|
@@ -44,9 +44,9 @@ API documentation for **@fluidframework/presence** is available at <https://flui
|
|
|
44
44
|
|
|
45
45
|
### Attendees
|
|
46
46
|
|
|
47
|
-
For the lifetime of a session, each client connecting will be established as a unique and stable `
|
|
47
|
+
For the lifetime of a session, each client connecting will be established as a unique and stable `Attendee`. The representation is stable because it will remain the same `Attendee` instance independent of connection drops and reconnections.
|
|
48
48
|
|
|
49
|
-
Client Ids maintained by `
|
|
49
|
+
Client Ids maintained by `Attendee` may be used to associate `Attendee` with quorum, audience, and service audience members.
|
|
50
50
|
|
|
51
51
|
### Workspaces
|
|
52
52
|
|
|
@@ -56,26 +56,26 @@ There are two types of workspaces: States and Notifications.
|
|
|
56
56
|
|
|
57
57
|
#### States Workspace
|
|
58
58
|
|
|
59
|
-
A
|
|
59
|
+
A `StatesWorkspace`, allows sharing of simple data across attendees where each attendee maintains their own data values that others may read, but not change. This is distinct from a Fluid DDS where data values might be manipulated by multiple clients and one ultimate value is derived. Shared, independent values are maintained by State objects that specialize in incrementality and history of values.
|
|
60
60
|
|
|
61
61
|
#### Notifications Workspace
|
|
62
62
|
|
|
63
|
-
A
|
|
63
|
+
A `NotificationsWorkspace`, is similar to states workspace, but is dedicated to notification use-cases via `NotificationsManager`.
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
###
|
|
66
|
+
### States
|
|
67
67
|
|
|
68
|
-
####
|
|
68
|
+
#### Latest
|
|
69
69
|
|
|
70
|
-
Latest
|
|
70
|
+
`Latest` retains the most recent atomic value each attendee has shared. Use `Latest` to add one to `StatesWorkspace`.
|
|
71
71
|
|
|
72
|
-
####
|
|
72
|
+
#### LatestMap
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
`LatestMap` retains the most recent atomic value each attendee has shared under arbitrary keys. Values associated with a key may be nullified (appears as deleted). Use `StateFactory.latestMap` to add one to `StatesWorkspace`.
|
|
75
75
|
|
|
76
76
|
#### NotificationsManager
|
|
77
77
|
|
|
78
|
-
Notifications
|
|
78
|
+
Notifications are special case where no data is retained during a session and all interactions appear as events that are sent and received. Notifications may be mixed into a `StatesWorkspace` for convenience. `NotificationsManager` is the only presence object permitted in a `NotificationsWorkspace`. Use `Notifications` to add one to `NotificationsWorkspace` or `StatesWorkspace`.
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
## Onboarding
|
|
@@ -83,7 +83,7 @@ Notifications value managers are special case where no data is retained during a
|
|
|
83
83
|
While this package is developing and other Fluid Framework internals are being updated to accommodate it, a temporary Shared Object must be added within container to gain access.
|
|
84
84
|
|
|
85
85
|
```typescript
|
|
86
|
-
import {
|
|
86
|
+
import { getPresenceViaDataObject, ExperimentalPresenceManager } from "@fluidframework/presence/alpha";
|
|
87
87
|
|
|
88
88
|
const containerSchema = {
|
|
89
89
|
initialObjects: {
|
|
@@ -91,7 +91,7 @@ const containerSchema = {
|
|
|
91
91
|
}
|
|
92
92
|
} satisfies ContainerSchema;
|
|
93
93
|
|
|
94
|
-
const presence = await
|
|
94
|
+
const presence = await getPresenceViaDataObject(container.initialObjects.presence);
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
|
|
@@ -108,16 +108,16 @@ Current API does not provide a mechanism to validate that state and notification
|
|
|
108
108
|
Example:
|
|
109
109
|
|
|
110
110
|
```typescript
|
|
111
|
-
presence.
|
|
111
|
+
presence.states.getWorkspace("app:v1states", { myState: StateFactory.latest({x: 0})});
|
|
112
112
|
```
|
|
113
113
|
is incompatible with
|
|
114
114
|
```typescript
|
|
115
|
-
presence.
|
|
115
|
+
presence.states.getWorkspace("app:v1states", { myState: StateFactory.latest({x: "text"})});
|
|
116
116
|
```
|
|
117
117
|
as "app:v1states"+"myState" have different value type expectations: `{x: number}` versus `{x: string}`.
|
|
118
118
|
|
|
119
119
|
```typescript
|
|
120
|
-
presence.
|
|
120
|
+
presence.states.getWorkspace("app:v1states", { myState2: StateFactory.latest({x: true})});
|
|
121
121
|
```
|
|
122
122
|
would be compatible with both of the prior schemas as "myState2" is a different name. Though in this situation none of the different clients would be able to observe each other.
|
|
123
123
|
|
|
@@ -132,12 +132,12 @@ Notifications are fundamentally unreliable at this time as there are no built-in
|
|
|
132
132
|
|
|
133
133
|
Presence updates are grouped together and throttled to prevent flooding the network with messages when presence values are rapidly updated. This means the presence infrastructure will not immediately broadcast updates but will broadcast them after a configurable delay.
|
|
134
134
|
|
|
135
|
-
The `allowableUpdateLatencyMs` property configures how long a local update may be delayed under normal circumstances, enabling grouping with other updates. The default `allowableUpdateLatencyMs` is **60 milliseconds** but may be (1) specified during configuration of a [States Workspace](#states-workspace) or [
|
|
135
|
+
The `allowableUpdateLatencyMs` property configures how long a local update may be delayed under normal circumstances, enabling grouping with other updates. The default `allowableUpdateLatencyMs` is **60 milliseconds** but may be (1) specified during configuration of a [States Workspace](#states-workspace) or [States](#states) and/or (2) updated later using the `controls` member of Workspace or States. [States Workspace](#states-workspace) configuration applies when States do not have their own setting.
|
|
136
136
|
|
|
137
137
|
Notifications are never queued; they effectively always have an `allowableUpdateLatencyMs` of 0. However, they may be grouped with other updates that were already queued.
|
|
138
138
|
|
|
139
139
|
Note that due to throttling, clients receiving updates may not see updates for all values set by another. For example,
|
|
140
|
-
with `Latest
|
|
140
|
+
with `Latest` and `LatestMap`, the only value sent is the value at the time the outgoing grouped message is sent. Previous
|
|
141
141
|
values set by the client will not be broadcast or seen by other clients.
|
|
142
142
|
|
|
143
143
|
#### Example
|
|
@@ -146,20 +146,20 @@ You can configure the grouping and throttling behavior using the `allowableUpdat
|
|
|
146
146
|
|
|
147
147
|
```ts
|
|
148
148
|
// Configure a states workspace
|
|
149
|
-
const stateWorkspace = presence.
|
|
149
|
+
const stateWorkspace = presence.states.getWorkspace("app:v1states",
|
|
150
150
|
{
|
|
151
|
-
// This
|
|
152
|
-
position:
|
|
153
|
-
// This
|
|
154
|
-
count:
|
|
151
|
+
// This Latest state has an allowable latency of 100ms.
|
|
152
|
+
position: StateFactory.latest({ x: 0, y: 0 }, { allowableUpdateLatencyMs: 100 }),
|
|
153
|
+
// This Latest state uses the workspace default.
|
|
154
|
+
count: StateFactory.latest({ num: 0 }),
|
|
155
155
|
},
|
|
156
|
-
// Specify the default for all
|
|
156
|
+
// Specify the default for all state in this workspace to 200ms,
|
|
157
157
|
// overriding the default value of 60ms.
|
|
158
158
|
{ allowableUpdateLatencyMs: 200 }
|
|
159
159
|
);
|
|
160
160
|
|
|
161
161
|
// Temporarily set count updates to send as soon as possible
|
|
162
|
-
const countState = stateWorkspace.
|
|
162
|
+
const countState = stateWorkspace.states.count;
|
|
163
163
|
countState.controls.allowableUpdateLatencyMs = 0;
|
|
164
164
|
countState.local = { num: 5000 };
|
|
165
165
|
|
package/dist/alpha.d.ts
CHANGED
|
@@ -18,44 +18,48 @@
|
|
|
18
18
|
|
|
19
19
|
export {
|
|
20
20
|
// @alpha APIs
|
|
21
|
+
Attendee,
|
|
22
|
+
AttendeeId,
|
|
23
|
+
AttendeeStatus,
|
|
24
|
+
AttendeesEvents,
|
|
21
25
|
BroadcastControlSettings,
|
|
22
26
|
BroadcastControls,
|
|
23
27
|
ClientConnectionId,
|
|
24
|
-
ClientSessionId,
|
|
25
28
|
ExperimentalPresenceDO,
|
|
26
29
|
ExperimentalPresenceManager,
|
|
27
|
-
IPresence,
|
|
28
|
-
ISessionClient,
|
|
29
30
|
InternalTypes,
|
|
30
31
|
InternalUtilityTypes,
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
LatestArguments,
|
|
33
|
+
LatestClientData,
|
|
34
|
+
LatestData,
|
|
35
|
+
LatestMapArguments,
|
|
36
|
+
LatestMapClientData,
|
|
33
37
|
LatestMapItemRemovedClientData,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
LatestValueManager,
|
|
41
|
-
LatestValueManagerEvents,
|
|
42
|
-
LatestValueMetadata,
|
|
38
|
+
LatestMapItemUpdatedClientData,
|
|
39
|
+
LatestMapRaw,
|
|
40
|
+
LatestMapRawEvents,
|
|
41
|
+
LatestMetadata,
|
|
42
|
+
LatestRaw,
|
|
43
|
+
LatestRawEvents,
|
|
43
44
|
NotificationEmitter,
|
|
44
45
|
NotificationListenable,
|
|
45
46
|
NotificationSubscriptions,
|
|
46
47
|
Notifications,
|
|
47
48
|
NotificationsManager,
|
|
48
49
|
NotificationsManagerEvents,
|
|
50
|
+
NotificationsWorkspace,
|
|
51
|
+
NotificationsWorkspaceSchema,
|
|
52
|
+
Presence,
|
|
49
53
|
PresenceEvents,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
StateFactory,
|
|
55
|
+
StateMap,
|
|
56
|
+
StatesWorkspace,
|
|
57
|
+
StatesWorkspaceEntries,
|
|
58
|
+
StatesWorkspaceEntry,
|
|
59
|
+
StatesWorkspaceSchema,
|
|
60
|
+
WorkspaceAddress,
|
|
61
|
+
getPresence,
|
|
62
|
+
getPresenceViaDataObject,
|
|
63
|
+
latest,
|
|
64
|
+
latestMap
|
|
61
65
|
} from "./index.js";
|
package/dist/baseTypes.d.ts
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* @remarks
|
|
9
9
|
* Each client connection is given a unique identifier for the duration of the
|
|
10
10
|
* connection. If a client disconnects and reconnects, it will be given a new
|
|
11
|
-
* identifier. Prefer use of {@link
|
|
12
|
-
* in a session. {@link
|
|
13
|
-
* connection identifier for a logical
|
|
11
|
+
* identifier. Prefer use of {@link Attendee} as a way to identify clients
|
|
12
|
+
* in a session. {@link Attendee.getConnectionId} will provide the current
|
|
13
|
+
* connection identifier for a logical attendee.
|
|
14
14
|
*
|
|
15
15
|
* @privateRemarks
|
|
16
16
|
* This represents what is commonly `clientId` in Fluid code. Ideally this is
|
package/dist/baseTypes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseTypes.js","sourceRoot":"","sources":["../src/baseTypes.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 * A Fluid client connection identifier.\n *\n * @remarks\n * Each client connection is given a unique identifier for the duration of the\n * connection. If a client disconnects and reconnects, it will be given a new\n * identifier. Prefer use of {@link
|
|
1
|
+
{"version":3,"file":"baseTypes.js","sourceRoot":"","sources":["../src/baseTypes.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 * A Fluid client connection identifier.\n *\n * @remarks\n * Each client connection is given a unique identifier for the duration of the\n * connection. If a client disconnects and reconnects, it will be given a new\n * identifier. Prefer use of {@link Attendee} as a way to identify clients\n * in a session. {@link Attendee.getConnectionId} will provide the current\n * connection identifier for a logical attendee.\n *\n * @privateRemarks\n * This represents what is commonly `clientId` in Fluid code. Ideally this is\n * moved somewhere more central and we brand it to avoid confusion with other\n * strings. Branding broadly is likely a breaking change and may take decent\n * effort to manage.\n *\n * @alpha\n */\nexport type ClientConnectionId = string;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcastControls.js","sourceRoot":"","sources":["../src/broadcastControls.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA0DH,MAAM,oBAAoB;IASzB,YAAmB,QAAmC;QACrD,mEAAmE;IACpE,CAAC;IAED,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACpC,CAAC;IACD,IAAW,uBAAuB,CAAC,KAAyB;QAC3D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACzB,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC;QACzC,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,sBAAsB,GAAG,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;gBACjB,uCAAuC;gBACvC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;YAC9D,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAED;;GAEG;AACH,MAAa,wBACZ,SAAQ,oBAAoB;IAK5B,YAAmB,QAAmC;QACrD,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,wBAAwB,GAAG,QAAQ,EAAE,wBAAwB,CAAC;IACpE,CAAC;CACD;AAVD,4DAUC;AAED;;;;;;;;GAQG;AACH,MAAa,wBACZ,SAAQ,oBAAoB;IAK5B,YAAoC,+BAAuC;QAC1E,KAAK,EAAE,CAAC;QAD2B,oCAA+B,GAA/B,+BAA+B,CAAQ;QAE1E,IAAI,CAAC,yBAAyB,GAAG,+BAA+B,CAAC;IAClE,CAAC;IAED,IAAW,wBAAwB;QAClC,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACvC,CAAC;IACD,IAAW,wBAAwB,CAAC,KAAyB;QAC5D,IAAI,CAAC,yBAAyB,GAAG,KAAK,IAAI,IAAI,CAAC,+BAA+B,CAAC;IAChF,CAAC;CACD;AAjBD,4DAiBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Common controls for
|
|
1
|
+
{"version":3,"file":"broadcastControls.js","sourceRoot":"","sources":["../src/broadcastControls.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA0DH,MAAM,oBAAoB;IASzB,YAAmB,QAAmC;QACrD,mEAAmE;IACpE,CAAC;IAED,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACpC,CAAC;IACD,IAAW,uBAAuB,CAAC,KAAyB;QAC3D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACzB,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC;QACzC,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,sBAAsB,GAAG,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;gBACjB,uCAAuC;gBACvC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;YAC9D,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAED;;GAEG;AACH,MAAa,wBACZ,SAAQ,oBAAoB;IAK5B,YAAmB,QAAmC;QACrD,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,wBAAwB,GAAG,QAAQ,EAAE,wBAAwB,CAAC;IACpE,CAAC;CACD;AAVD,4DAUC;AAED;;;;;;;;GAQG;AACH,MAAa,wBACZ,SAAQ,oBAAoB;IAK5B,YAAoC,+BAAuC;QAC1E,KAAK,EAAE,CAAC;QAD2B,oCAA+B,GAA/B,+BAA+B,CAAQ;QAE1E,IAAI,CAAC,yBAAyB,GAAG,+BAA+B,CAAC;IAClE,CAAC;IAED,IAAW,wBAAwB;QAClC,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACvC,CAAC;IACD,IAAW,wBAAwB,CAAC,KAAyB;QAC5D,IAAI,CAAC,yBAAyB,GAAG,KAAK,IAAI,IAAI,CAAC,+BAA+B,CAAC;IAChF,CAAC;CACD;AAjBD,4DAiBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Common controls for States objects.\n *\n * @sealed\n * @alpha\n */\nexport interface BroadcastControls {\n\t/**\n\t * Maximum time in milliseconds that a local value update is allowed\n\t * to remain pending before it must be broadcast.\n\t *\n\t * @remarks\n\t * There is no guarantee of broadcast within time allowed\n\t * as other conditions such as disconnect or service throttling may\n\t * cause a delay.\n\t *\n\t * Setting to `undefined` will restore to a system default.\n\t */\n\tallowableUpdateLatencyMs: number | undefined;\n\n\t/**\n\t * Target time in milliseconds between oldest changed local state\n\t * has been broadcast and forced rebroadcast of all local values.\n\t * A value of less than 10 disables forced refresh.\n\t *\n\t * @privateRemarks\n\t * Any time less than 10 milliseconds is likely to generate too\n\t * many signals. Ideally this feature becomes obsolete as\n\t * we understand the system better and account for holes.\n\t */\n\t// forcedRefreshIntervalMs is removed until it is supported.\n\t// forcedRefreshIntervalMs: number | undefined;\n}\n\n/**\n * Value set to configure {@link BroadcastControls}.\n *\n * @alpha\n */\nexport interface BroadcastControlSettings {\n\t/**\n\t * {@inheritdoc BroadcastControls.allowableUpdateLatencyMs}\n\t *\n\t * @defaultValue 60 [milliseconds]\n\t */\n\treadonly allowableUpdateLatencyMs?: number;\n\n\t/**\n\t * {@inheritdoc BroadcastControls.forcedRefreshIntervalMs}\n\t *\n\t * @defaultValue 0 (disabled)\n\t */\n\t// forcedRefreshIntervalMs is removed until it is supported.\n\t// readonly forcedRefreshIntervalMs?: number;\n}\n\nclass ForcedRefreshControl\n\timplements\n\t\tPick<\n\t\t\tBroadcastControls & { forcedRefreshIntervalMs: number | undefined },\n\t\t\t\"forcedRefreshIntervalMs\"\n\t\t>\n{\n\tprivate _forcedRefreshInterval: number | undefined;\n\n\tpublic constructor(settings?: BroadcastControlSettings) {\n\t\t// this._forcedRefreshInterval = settings?.forcedRefreshIntervalMs;\n\t}\n\n\tpublic get forcedRefreshIntervalMs(): number | undefined {\n\t\treturn this._forcedRefreshInterval;\n\t}\n\tpublic set forcedRefreshIntervalMs(value: number | undefined) {\n\t\tif (value === undefined) {\n\t\t\tthis._forcedRefreshInterval = undefined;\n\t\t} else {\n\t\t\tthis._forcedRefreshInterval = value >= 10 ? value : undefined;\n\t\t\tif (value >= 10) {\n\t\t\t\t// TODO: enable periodic forced refresh\n\t\t\t\tthrow new Error(\"Forced Refresh feature is not implemented\");\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * @internal\n */\nexport class OptionalBroadcastControl\n\textends ForcedRefreshControl\n\timplements BroadcastControls\n{\n\tpublic allowableUpdateLatencyMs: number | undefined;\n\n\tpublic constructor(settings?: BroadcastControlSettings) {\n\t\tsuper(settings);\n\t\tthis.allowableUpdateLatencyMs = settings?.allowableUpdateLatencyMs;\n\t}\n}\n\n/**\n * Implements {@link BroadcastControls} but always provides defined value for\n * {@link BroadcastControls.allowableUpdateLatencyMs | allowableUpdateLatencyMs}.\n *\n * If {@link BroadcastControls.allowableUpdateLatencyMs | allowableUpdateLatencyMs}\n * is set to `undefined`, the default will be restored.\n *\n * @internal\n */\nexport class RequiredBroadcastControl\n\textends ForcedRefreshControl\n\timplements BroadcastControls\n{\n\tprivate _allowableUpdateLatencyMs: number;\n\n\tpublic constructor(private readonly defaultAllowableUpdateLatencyMs: number) {\n\t\tsuper();\n\t\tthis._allowableUpdateLatencyMs = defaultAllowableUpdateLatencyMs;\n\t}\n\n\tpublic get allowableUpdateLatencyMs(): number {\n\t\treturn this._allowableUpdateLatencyMs;\n\t}\n\tpublic set allowableUpdateLatencyMs(value: number | undefined) {\n\t\tthis._allowableUpdateLatencyMs = value ?? this.defaultAllowableUpdateLatencyMs;\n\t}\n}\n"]}
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { IFluidLoadable } from "@fluidframework/core-interfaces";
|
|
6
6
|
import type { SharedObjectKind } from "@fluidframework/shared-object-base";
|
|
7
|
-
import type {
|
|
7
|
+
import type { Presence } from "./presence.js";
|
|
8
8
|
/**
|
|
9
9
|
* Brand for Experimental Presence Data Object.
|
|
10
10
|
*
|
|
11
11
|
* @remarks
|
|
12
|
-
* See {@link
|
|
12
|
+
* See {@link getPresenceViaDataObject} for example usage.
|
|
13
13
|
*
|
|
14
14
|
* @sealed
|
|
15
15
|
* @alpha
|
|
@@ -25,7 +25,7 @@ export declare class ExperimentalPresenceDO {
|
|
|
25
25
|
*/
|
|
26
26
|
export declare const ExperimentalPresenceManager: SharedObjectKind<IFluidLoadable & ExperimentalPresenceDO>;
|
|
27
27
|
/**
|
|
28
|
-
* Acquire
|
|
28
|
+
* Acquire Presence from a DataStore based Presence Manager
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* ```typescript
|
|
@@ -37,12 +37,12 @@ export declare const ExperimentalPresenceManager: SharedObjectKind<IFluidLoadabl
|
|
|
37
37
|
* ```
|
|
38
38
|
* then
|
|
39
39
|
* ```typescript
|
|
40
|
-
* const presence =
|
|
40
|
+
* const presence = getPresenceViaDataObject(
|
|
41
41
|
* container.initialObjects.experimentalPresence,
|
|
42
42
|
* );
|
|
43
43
|
* ```
|
|
44
44
|
*
|
|
45
45
|
* @alpha
|
|
46
46
|
*/
|
|
47
|
-
export declare function
|
|
47
|
+
export declare function getPresenceViaDataObject(fluidLoadable: ExperimentalPresenceDO): Presence;
|
|
48
48
|
//# sourceMappingURL=datastorePresenceManagerFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datastorePresenceManagerFactory.d.ts","sourceRoot":"","sources":["../src/datastorePresenceManagerFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"datastorePresenceManagerFactory.d.ts","sourceRoot":"","sources":["../src/datastorePresenceManagerFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAkD9C;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAsB;IAC1C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAyB;CAC/C;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,2DAGtC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,sBAAsB,GAAG,QAAQ,CAMxF"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.getPresenceViaDataObject = exports.ExperimentalPresenceManager = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
9
|
const datastoreSupport_js_1 = require("./datastoreSupport.js");
|
|
10
10
|
const presenceManager_js_1 = require("./presenceManager.js");
|
|
@@ -32,7 +32,7 @@ class PresenceManagerDataObject extends datastoreSupport_js_1.LoadableFluidObjec
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* Factory class to create {@link
|
|
35
|
+
* Factory class to create {@link Presence} in own data store.
|
|
36
36
|
*/
|
|
37
37
|
class PresenceManagerFactory {
|
|
38
38
|
constructor() {
|
|
@@ -50,7 +50,7 @@ class PresenceManagerFactory {
|
|
|
50
50
|
*/
|
|
51
51
|
exports.ExperimentalPresenceManager = new PresenceManagerFactory();
|
|
52
52
|
/**
|
|
53
|
-
* Acquire
|
|
53
|
+
* Acquire Presence from a DataStore based Presence Manager
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
56
56
|
* ```typescript
|
|
@@ -62,18 +62,18 @@ exports.ExperimentalPresenceManager = new PresenceManagerFactory();
|
|
|
62
62
|
* ```
|
|
63
63
|
* then
|
|
64
64
|
* ```typescript
|
|
65
|
-
* const presence =
|
|
65
|
+
* const presence = getPresenceViaDataObject(
|
|
66
66
|
* container.initialObjects.experimentalPresence,
|
|
67
67
|
* );
|
|
68
68
|
* ```
|
|
69
69
|
*
|
|
70
70
|
* @alpha
|
|
71
71
|
*/
|
|
72
|
-
function
|
|
72
|
+
function getPresenceViaDataObject(fluidLoadable) {
|
|
73
73
|
if (fluidLoadable instanceof PresenceManagerDataObject) {
|
|
74
74
|
return fluidLoadable.presenceManager();
|
|
75
75
|
}
|
|
76
76
|
throw new Error("Incompatible loadable; make sure to use ExperimentalPresenceManager");
|
|
77
77
|
}
|
|
78
|
-
exports.
|
|
78
|
+
exports.getPresenceViaDataObject = getPresenceViaDataObject;
|
|
79
79
|
//# sourceMappingURL=datastorePresenceManagerFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datastorePresenceManagerFactory.js","sourceRoot":"","sources":["../src/datastorePresenceManagerFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH,kEAA6D;AAI7D,+DAAmF;AAEnF,6DAA6D;AAI7D,SAAS,0BAA0B,CAClC,OAAkD;IAElD,IAAA,iBAAM,EAAC,OAAO,CAAC,QAAQ,KAAK,IAAI,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAC5E,8DAA8D;IAC9D,uEAAuE;AACxE,CAAC;AAED;;GAEG;AACH,MAAM,yBAA0B,SAAQ,yCAAmB;IAKnD,eAAe;QACrB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC5B,+EAA+E;YAC/E,8EAA8E;YAC9E,MAAM,OAAO,GAAG,IAAA,0CAAqB,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,OAA8B,EAAE,KAAc,EAAE,EAAE;gBAC5E,0BAA0B,CAAC,OAAO,CAAC,CAAC;gBACpC,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC;QACjC,CAAC;QACD,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC9B,CAAC;CACD;AAED;;GAEG;AACH,MAAM,sBAAsB;IAA5B;QAKiB,YAAO,GAAG,IAAI,2CAAqB,CAClD,0BAA0B,EAC1B,yBAAyB,CACzB,CAAC;IACH,CAAC;IARO,EAAE,CAAC,KAA8C;QACvD,OAAO,KAAK,YAAY,yBAAyB,CAAC;IACnD,CAAC;CAMD;AAeD;;;;;GAKG;AACU,QAAA,2BAA2B,GACvC,IAAI,sBAAsB,EAEzB,CAAC;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,
|
|
1
|
+
{"version":3,"file":"datastorePresenceManagerFactory.js","sourceRoot":"","sources":["../src/datastorePresenceManagerFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH,kEAA6D;AAI7D,+DAAmF;AAEnF,6DAA6D;AAI7D,SAAS,0BAA0B,CAClC,OAAkD;IAElD,IAAA,iBAAM,EAAC,OAAO,CAAC,QAAQ,KAAK,IAAI,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAC5E,8DAA8D;IAC9D,uEAAuE;AACxE,CAAC;AAED;;GAEG;AACH,MAAM,yBAA0B,SAAQ,yCAAmB;IAKnD,eAAe;QACrB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC5B,+EAA+E;YAC/E,8EAA8E;YAC9E,MAAM,OAAO,GAAG,IAAA,0CAAqB,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,OAA8B,EAAE,KAAc,EAAE,EAAE;gBAC5E,0BAA0B,CAAC,OAAO,CAAC,CAAC;gBACpC,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC;QACjC,CAAC;QACD,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC9B,CAAC;CACD;AAED;;GAEG;AACH,MAAM,sBAAsB;IAA5B;QAKiB,YAAO,GAAG,IAAI,2CAAqB,CAClD,0BAA0B,EAC1B,yBAAyB,CACzB,CAAC;IACH,CAAC;IARO,EAAE,CAAC,KAA8C;QACvD,OAAO,KAAK,YAAY,yBAAyB,CAAC;IACnD,CAAC;CAMD;AAeD;;;;;GAKG;AACU,QAAA,2BAA2B,GACvC,IAAI,sBAAsB,EAEzB,CAAC;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,wBAAwB,CAAC,aAAqC;IAC7E,IAAI,aAAa,YAAY,yBAAyB,EAAE,CAAC;QACxD,OAAO,aAAa,CAAC,eAAe,EAAE,CAAC;IACxC,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;AACxF,CAAC;AAND,4DAMC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * Hacky support for internal datastore based usages.\n */\n\nimport type { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IInboundSignalMessage } from \"@fluidframework/runtime-definitions/internal\";\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\n\nimport { BasicDataStoreFactory, LoadableFluidObject } from \"./datastoreSupport.js\";\nimport type { Presence } from \"./presence.js\";\nimport { createPresenceManager } from \"./presenceManager.js\";\n\nimport type { IExtensionMessage } from \"@fluidframework/presence/internal/container-definitions/internal\";\n\nfunction assertSignalMessageIsValid(\n\tmessage: IInboundSignalMessage | IExtensionMessage,\n): asserts message is IExtensionMessage {\n\tassert(message.clientId !== null, 0xa58 /* Signal must have a client ID */);\n\t// The other difference between messages is that `content` for\n\t// IExtensionMessage is JsonDeserialized and we are fine assuming that.\n}\n\n/**\n * Simple FluidObject holding Presence Manager.\n */\nclass PresenceManagerDataObject extends LoadableFluidObject {\n\t// Creation of presence manager is deferred until first acquisition to avoid\n\t// instantiations and stand-up by Summarizer that has no actual use.\n\tprivate _presenceManager: Presence | undefined;\n\n\tpublic presenceManager(): Presence {\n\t\tif (!this._presenceManager) {\n\t\t\t// TODO: investigate if ContainerExtensionStore (path-based address routing for\n\t\t\t// Signals) is readily detectable here and use that presence manager directly.\n\t\t\tconst manager = createPresenceManager(this.runtime);\n\t\t\tthis.runtime.on(\"signal\", (message: IInboundSignalMessage, local: boolean) => {\n\t\t\t\tassertSignalMessageIsValid(message);\n\t\t\t\tmanager.processSignal(\"\", message, local);\n\t\t\t});\n\t\t\tthis._presenceManager = manager;\n\t\t}\n\t\treturn this._presenceManager;\n\t}\n}\n\n/**\n * Factory class to create {@link Presence} in own data store.\n */\nclass PresenceManagerFactory {\n\tpublic is(value: IFluidLoadable | ExperimentalPresenceDO): value is ExperimentalPresenceDO {\n\t\treturn value instanceof PresenceManagerDataObject;\n\t}\n\n\tpublic readonly factory = new BasicDataStoreFactory(\n\t\t\"@fluidframework/presence\",\n\t\tPresenceManagerDataObject,\n\t);\n}\n\n/**\n * Brand for Experimental Presence Data Object.\n *\n * @remarks\n * See {@link getPresenceViaDataObject} for example usage.\n *\n * @sealed\n * @alpha\n */\nexport declare class ExperimentalPresenceDO {\n\tprivate readonly _self: ExperimentalPresenceDO;\n}\n\n/**\n * DataStore based Presence Manager that is used as fallback for preferred Container\n * Extension based version requires registration. Export SharedObjectKind for registration.\n *\n * @alpha\n */\nexport const ExperimentalPresenceManager =\n\tnew PresenceManagerFactory() as unknown as SharedObjectKind<\n\t\tIFluidLoadable & ExperimentalPresenceDO\n\t>;\n\n/**\n * Acquire Presence from a DataStore based Presence Manager\n *\n * @example\n * ```typescript\n * const containerSchema = {\n * \tinitialObjects: {\n * \t\texperimentalPresence: ExperimentalPresenceDO,\n * \t},\n * } satisfies ContainerSchema;\n * ```\n * then\n * ```typescript\n * const presence = getPresenceViaDataObject(\n * \tcontainer.initialObjects.experimentalPresence,\n * \t);\n * ```\n *\n * @alpha\n */\nexport function getPresenceViaDataObject(fluidLoadable: ExperimentalPresenceDO): Presence {\n\tif (fluidLoadable instanceof PresenceManagerDataObject) {\n\t\treturn fluidLoadable.presenceManager();\n\t}\n\n\tthrow new Error(\"Incompatible loadable; make sure to use ExperimentalPresenceManager\");\n}\n"]}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import type { IFluidContainer } from "@fluidframework/fluid-static";
|
|
6
|
-
import type {
|
|
6
|
+
import type { Presence } from "./presence.js";
|
|
7
7
|
/**
|
|
8
|
-
* Acquire an
|
|
8
|
+
* Acquire an Presence from a Fluid Container
|
|
9
9
|
* @param fluidContainer - Fluid Container to acquire the map from
|
|
10
|
-
* @returns the
|
|
10
|
+
* @returns the Presence
|
|
11
11
|
*
|
|
12
12
|
* @alpha
|
|
13
13
|
*/
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function getPresence(fluidContainer: IFluidContainer): Presence;
|
|
15
15
|
//# sourceMappingURL=experimentalAccess.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimentalAccess.d.ts","sourceRoot":"","sources":["../src/experimentalAccess.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAKpE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"experimentalAccess.d.ts","sourceRoot":"","sources":["../src/experimentalAccess.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAKpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AA2C9C;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,eAAe,GAAG,QAAQ,CAiBrE"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.getPresence = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
9
|
const internal_2 = require("@fluidframework/fluid-static/internal");
|
|
10
10
|
const presenceManager_js_1 = require("./presenceManager.js");
|
|
@@ -29,18 +29,18 @@ class ContainerPresenceManager {
|
|
|
29
29
|
}
|
|
30
30
|
ContainerPresenceManager.extensionId = "dis:bb89f4c0-80fd-4f0c-8469-4f2848ee7f4a";
|
|
31
31
|
/**
|
|
32
|
-
* Acquire an
|
|
32
|
+
* Acquire an Presence from a Fluid Container
|
|
33
33
|
* @param fluidContainer - Fluid Container to acquire the map from
|
|
34
|
-
* @returns the
|
|
34
|
+
* @returns the Presence
|
|
35
35
|
*
|
|
36
36
|
* @alpha
|
|
37
37
|
*/
|
|
38
|
-
function
|
|
38
|
+
function getPresence(fluidContainer) {
|
|
39
39
|
(0, internal_1.assert)((0, internal_2.isInternalFluidContainer)(fluidContainer), 0xa2f /* IFluidContainer was not recognized. Only Containers generated by the Fluid Framework are supported. */);
|
|
40
40
|
const innerContainer = fluidContainer.container;
|
|
41
|
-
(0, internal_1.assert)(isContainerExtensionStore(innerContainer), 0xa39 /* Container does not support extensions. Use
|
|
41
|
+
(0, internal_1.assert)(isContainerExtensionStore(innerContainer), 0xa39 /* Container does not support extensions. Use getPresenceViaDataObject. */);
|
|
42
42
|
const presence = innerContainer.acquireExtension(ContainerPresenceManager.extensionId, ContainerPresenceManager);
|
|
43
43
|
return presence;
|
|
44
44
|
}
|
|
45
|
-
exports.
|
|
45
|
+
exports.getPresence = getPresence;
|
|
46
46
|
//# sourceMappingURL=experimentalAccess.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimentalAccess.js","sourceRoot":"","sources":["../src/experimentalAccess.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA6D;AAE7D,oEAAiF;AAMjF,6DAA6D;AAS7D,SAAS,yBAAyB,CACjC,OAAiF;IAEjF,OAAQ,OAAmC,CAAC,gBAAgB,KAAK,SAAS,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,MAAM,wBAAwB;IAK7B,YAAmB,OAA0B;QAH7B,cAAS,GAAG,IAAI,CAAC;QAIhC,4FAA4F;QAC5F,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,GAAG,IAAA,0CAAqB,EACpD,OAAuC,CACvC,CAAC;IACH,CAAC;IAEM,YAAY;QAClB,QAAQ;IACT,CAAC;IAIM,aAAa,CAAC,OAAe,EAAE,OAA0B,EAAE,KAAc;QAC/E,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACrD,CAAC;;AAJsB,oCAAW,GAAG,0CAA0C,AAA7C,CAA8C;AAOjF;;;;;;GAMG;AACH,SAAgB,
|
|
1
|
+
{"version":3,"file":"experimentalAccess.js","sourceRoot":"","sources":["../src/experimentalAccess.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA6D;AAE7D,oEAAiF;AAMjF,6DAA6D;AAS7D,SAAS,yBAAyB,CACjC,OAAiF;IAEjF,OAAQ,OAAmC,CAAC,gBAAgB,KAAK,SAAS,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,MAAM,wBAAwB;IAK7B,YAAmB,OAA0B;QAH7B,cAAS,GAAG,IAAI,CAAC;QAIhC,4FAA4F;QAC5F,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,GAAG,IAAA,0CAAqB,EACpD,OAAuC,CACvC,CAAC;IACH,CAAC;IAEM,YAAY;QAClB,QAAQ;IACT,CAAC;IAIM,aAAa,CAAC,OAAe,EAAE,OAA0B,EAAE,KAAc;QAC/E,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACrD,CAAC;;AAJsB,oCAAW,GAAG,0CAA0C,AAA7C,CAA8C;AAOjF;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,cAA+B;IAC1D,IAAA,iBAAM,EACL,IAAA,mCAAwB,EAAC,cAAc,CAAC,EACxC,KAAK,CAAC,yGAAyG,CAC/G,CAAC;IACF,MAAM,cAAc,GAAG,cAAc,CAAC,SAAS,CAAC;IAEhD,IAAA,iBAAM,EACL,yBAAyB,CAAC,cAAc,CAAC,EACzC,KAAK,CAAC,0EAA0E,CAChF,CAAC;IAEF,MAAM,QAAQ,GAAG,cAAc,CAAC,gBAAgB,CAC/C,wBAAwB,CAAC,WAAW,EACpC,wBAAwB,CACxB,CAAC;IACF,OAAO,QAAQ,CAAC;AACjB,CAAC;AAjBD,kCAiBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IContainerExperimental } from \"@fluidframework/container-loader/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IFluidContainer } from \"@fluidframework/fluid-static\";\nimport { isInternalFluidContainer } from \"@fluidframework/fluid-static/internal\";\nimport type { IContainerRuntimeBase } from \"@fluidframework/runtime-definitions/internal\";\n\nimport type { IEphemeralRuntime } from \"./internalTypes.js\";\nimport type { Presence } from \"./presence.js\";\nimport type { PresenceExtensionInterface } from \"./presenceManager.js\";\nimport { createPresenceManager } from \"./presenceManager.js\";\n\nimport type {\n\tContainerExtensionStore,\n\tIContainerExtension,\n\tIExtensionMessage,\n\tIExtensionRuntime,\n} from \"@fluidframework/presence/internal/container-definitions/internal\";\n\nfunction isContainerExtensionStore(\n\tmanager: ContainerExtensionStore | IContainerRuntimeBase | IContainerExperimental,\n): manager is ContainerExtensionStore {\n\treturn (manager as ContainerExtensionStore).acquireExtension !== undefined;\n}\n\n/**\n * Common Presence manager for a container\n */\nclass ContainerPresenceManager implements IContainerExtension<never> {\n\tpublic readonly interface: Presence;\n\tpublic readonly extension = this;\n\tprivate readonly manager: PresenceExtensionInterface;\n\n\tpublic constructor(runtime: IExtensionRuntime) {\n\t\t// TODO create the appropriate ephemeral runtime (map address must be in submitSignal, etc.)\n\t\tthis.interface = this.manager = createPresenceManager(\n\t\t\truntime as unknown as IEphemeralRuntime,\n\t\t);\n\t}\n\n\tpublic onNewContext(): void {\n\t\t// No-op\n\t}\n\n\tpublic static readonly extensionId = \"dis:bb89f4c0-80fd-4f0c-8469-4f2848ee7f4a\";\n\n\tpublic processSignal(address: string, message: IExtensionMessage, local: boolean): void {\n\t\tthis.manager.processSignal(address, message, local);\n\t}\n}\n\n/**\n * Acquire an Presence from a Fluid Container\n * @param fluidContainer - Fluid Container to acquire the map from\n * @returns the Presence\n *\n * @alpha\n */\nexport function getPresence(fluidContainer: IFluidContainer): Presence {\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 innerContainer = fluidContainer.container;\n\n\tassert(\n\t\tisContainerExtensionStore(innerContainer),\n\t\t0xa39 /* Container does not support extensions. Use getPresenceViaDataObject. */,\n\t);\n\n\tconst presence = innerContainer.acquireExtension(\n\t\tContainerPresenceManager.extensionId,\n\t\tContainerPresenceManager,\n\t);\n\treturn presence;\n}\n"]}
|
|
@@ -79,7 +79,7 @@ export declare namespace InternalTypes {
|
|
|
79
79
|
*/
|
|
80
80
|
type StateValue<T> = T & StateValueBrand<T>;
|
|
81
81
|
/**
|
|
82
|
-
* Package internal function declaration for
|
|
82
|
+
* Package internal function declaration for state and notification instantiation.
|
|
83
83
|
*
|
|
84
84
|
* @system
|
|
85
85
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exposedInternalTypes.js","sourceRoot":"","sources":["../src/exposedInternalTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH;;;;;;GAMG;AACH,2DAA2D;AAC3D,IAAiB,aAAa,CA2G7B;AA3GD,WAAiB,aAAa;AA2G9B,CAAC,EA3GgB,aAAa,6BAAb,aAAa,QA2G7B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tJsonDeserialized,\n\tJsonSerializable,\n} from \"@fluidframework/core-interfaces/internal/exposedUtilityTypes\";\n\n/**\n * Collection of value types that are not intended to be used/imported\n * directly outside of this package.\n *\n * @alpha\n * @system\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace InternalTypes {\n\t/**\n\t * @system\n\t */\n\texport interface ValueStateMetadata {\n\t\trev: number;\n\t\ttimestamp: number;\n\t}\n\n\t/**\n\t * @system\n\t */\n\texport interface ValueOptionalState<TValue> extends ValueStateMetadata {\n\t\tvalue?: JsonDeserialized<TValue>;\n\t}\n\n\t/**\n\t * @system\n\t */\n\texport interface ValueRequiredState<TValue> extends ValueStateMetadata {\n\t\tvalue: JsonDeserialized<TValue>;\n\t}\n\n\t/**\n\t * @system\n\t */\n\texport interface ValueDirectory<T> {\n\t\trev: number;\n\t\titems: {\n\t\t\t// Caution: any particular item may or may not exist\n\t\t\t// Typescript does not support absent keys without forcing type to also be undefined.\n\t\t\t// See https://github.com/microsoft/TypeScript/issues/42810.\n\t\t\t[name: string | number]: ValueOptionalState<T> | ValueDirectory<T>;\n\t\t};\n\t}\n\n\t/**\n\t * @system\n\t */\n\texport type ValueDirectoryOrState<T> = ValueRequiredState<T> | ValueDirectory<T>;\n\n\t/**\n\t * @system\n\t */\n\texport interface MapValueState<T, Keys extends string | number> {\n\t\trev: number;\n\t\titems: {\n\t\t\t// Caution: any particular item may or may not exist\n\t\t\t// Typescript does not support absent keys without forcing type to also be undefined.\n\t\t\t// See https://github.com/microsoft/TypeScript/issues/42810.\n\t\t\t[name in Keys]: ValueOptionalState<T>;\n\t\t};\n\t}\n\n\t/**\n\t * @system\n\t */\n\texport declare class StateDatastoreHandle<TKey, TValue extends ValueDirectoryOrState<any>> {\n\t\tprivate readonly StateDatastoreHandle: StateDatastoreHandle<TKey, TValue>;\n\t}\n\n\t/**\n\t * Brand to ensure state values internal type safety without revealing\n\t * internals that are subject to change.\n\t *\n\t * @system\n\t */\n\texport declare class StateValueBrand<T> {\n\t\tprivate readonly StateValue: StateValue<T>;\n\t}\n\n\t/**\n\t * This type provides no additional functionality over the type it wraps.\n\t * It is used to ensure type safety within package.\n\t * Users may find it convenient to just use the type it wraps directly.\n\t *\n\t * @privateRemarks\n\t * Checkout filtering omitting unknown from T (`Omit<T,unknown> &`).\n\t *\n\t * @system\n\t */\n\texport type StateValue<T> = T & StateValueBrand<T>;\n\n\t/**\n\t * Package internal function declaration for
|
|
1
|
+
{"version":3,"file":"exposedInternalTypes.js","sourceRoot":"","sources":["../src/exposedInternalTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH;;;;;;GAMG;AACH,2DAA2D;AAC3D,IAAiB,aAAa,CA2G7B;AA3GD,WAAiB,aAAa;AA2G9B,CAAC,EA3GgB,aAAa,6BAAb,aAAa,QA2G7B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tJsonDeserialized,\n\tJsonSerializable,\n} from \"@fluidframework/core-interfaces/internal/exposedUtilityTypes\";\n\n/**\n * Collection of value types that are not intended to be used/imported\n * directly outside of this package.\n *\n * @alpha\n * @system\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace InternalTypes {\n\t/**\n\t * @system\n\t */\n\texport interface ValueStateMetadata {\n\t\trev: number;\n\t\ttimestamp: number;\n\t}\n\n\t/**\n\t * @system\n\t */\n\texport interface ValueOptionalState<TValue> extends ValueStateMetadata {\n\t\tvalue?: JsonDeserialized<TValue>;\n\t}\n\n\t/**\n\t * @system\n\t */\n\texport interface ValueRequiredState<TValue> extends ValueStateMetadata {\n\t\tvalue: JsonDeserialized<TValue>;\n\t}\n\n\t/**\n\t * @system\n\t */\n\texport interface ValueDirectory<T> {\n\t\trev: number;\n\t\titems: {\n\t\t\t// Caution: any particular item may or may not exist\n\t\t\t// Typescript does not support absent keys without forcing type to also be undefined.\n\t\t\t// See https://github.com/microsoft/TypeScript/issues/42810.\n\t\t\t[name: string | number]: ValueOptionalState<T> | ValueDirectory<T>;\n\t\t};\n\t}\n\n\t/**\n\t * @system\n\t */\n\texport type ValueDirectoryOrState<T> = ValueRequiredState<T> | ValueDirectory<T>;\n\n\t/**\n\t * @system\n\t */\n\texport interface MapValueState<T, Keys extends string | number> {\n\t\trev: number;\n\t\titems: {\n\t\t\t// Caution: any particular item may or may not exist\n\t\t\t// Typescript does not support absent keys without forcing type to also be undefined.\n\t\t\t// See https://github.com/microsoft/TypeScript/issues/42810.\n\t\t\t[name in Keys]: ValueOptionalState<T>;\n\t\t};\n\t}\n\n\t/**\n\t * @system\n\t */\n\texport declare class StateDatastoreHandle<TKey, TValue extends ValueDirectoryOrState<any>> {\n\t\tprivate readonly StateDatastoreHandle: StateDatastoreHandle<TKey, TValue>;\n\t}\n\n\t/**\n\t * Brand to ensure state values internal type safety without revealing\n\t * internals that are subject to change.\n\t *\n\t * @system\n\t */\n\texport declare class StateValueBrand<T> {\n\t\tprivate readonly StateValue: StateValue<T>;\n\t}\n\n\t/**\n\t * This type provides no additional functionality over the type it wraps.\n\t * It is used to ensure type safety within package.\n\t * Users may find it convenient to just use the type it wraps directly.\n\t *\n\t * @privateRemarks\n\t * Checkout filtering omitting unknown from T (`Omit<T,unknown> &`).\n\t *\n\t * @system\n\t */\n\texport type StateValue<T> = T & StateValueBrand<T>;\n\n\t/**\n\t * Package internal function declaration for state and notification instantiation.\n\t *\n\t * @system\n\t */\n\texport type ManagerFactory<\n\t\tTKey extends string,\n\t\tTValue extends ValueDirectoryOrState<any>,\n\t\tTManager,\n\t> = { instanceBase: new (...args: any[]) => any } & ((\n\t\tkey: TKey,\n\t\tdatastoreHandle: StateDatastoreHandle<TKey, TValue>,\n\t) => {\n\t\tinitialData?: { value: TValue; allowableUpdateLatencyMs: number | undefined };\n\t\tmanager: StateValue<TManager>;\n\t});\n\n\t/**\n\t * @system\n\t */\n\texport interface NotificationType {\n\t\tname: string;\n\t\targs: (JsonSerializable<unknown> & JsonDeserialized<unknown>)[];\n\t}\n}\n"]}
|
|
@@ -11,14 +11,6 @@ import type { InternalUtilityTypes as CoreInternalUtilityTypes, JsonDeserialized
|
|
|
11
11
|
* @system
|
|
12
12
|
*/
|
|
13
13
|
export declare namespace InternalUtilityTypes {
|
|
14
|
-
/**
|
|
15
|
-
* Recursively/deeply makes all properties of a type readonly.
|
|
16
|
-
*
|
|
17
|
-
* @system
|
|
18
|
-
*/
|
|
19
|
-
type FullyReadonly<T> = {
|
|
20
|
-
readonly [K in keyof T]: FullyReadonly<T[K]>;
|
|
21
|
-
};
|
|
22
14
|
/**
|
|
23
15
|
* `true` iff the given type is an acceptable shape for a notification.
|
|
24
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exposedUtilityTypes.d.ts","sourceRoot":"","sources":["../src/exposedUtilityTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,oBAAoB,IAAI,wBAAwB,EAChD,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,8DAA8D,CAAC;AAEtE;;;;;;GAMG;AAEH,yBAAiB,oBAAoB,CAAC;IACrC;;;;OAIG;IACH,KAAY,
|
|
1
|
+
{"version":3,"file":"exposedUtilityTypes.d.ts","sourceRoot":"","sources":["../src/exposedUtilityTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,oBAAoB,IAAI,wBAAwB,EAChD,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,8DAA8D,CAAC;AAEtE;;;;;;GAMG;AAEH,yBAAiB,oBAAoB,CAAC;IACrC;;;;OAIG;IACH,KAAY,sBAAsB,CAAC,KAAK,IAAI,KAAK,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,IAAI,GACjF,wBAAwB,CAAC,UAAU,CACnC,CAAC,EACD,gBAAgB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,EACzC,IAAI,EACJ,KAAK,CACL,GACA,KAAK,CAAC;IAET;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAY,qBAAqB,CAAC,CAAC,IAAI;SACrC,CAAC,IAAI,MAAM,GAAG,MAAM,CAAC,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;KACtF,CAAC;IAEF;;;;OAIG;IACH,KAAY,0BAA0B,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,SAAS,CACnF,GAAG,IAAI,EAAE,MAAM,CAAC,KACZ,GAAG,GACL,gBAAgB,CAAC,CAAC,CAAC,GACnB,KAAK,CAAC;IAET;;;;OAIG;IACH,KAAY,0BAA0B,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,SAAS,CACnF,GAAG,IAAI,EAAE,MAAM,CAAC,KACZ,GAAG,GACL,gBAAgB,CAAC,CAAC,CAAC,GACnB,KAAK,CAAC;CACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exposedUtilityTypes.js","sourceRoot":"","sources":["../src/exposedUtilityTypes.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\tInternalUtilityTypes as CoreInternalUtilityTypes,\n\tJsonDeserialized,\n\tJsonSerializable,\n} from \"@fluidframework/core-interfaces/internal/exposedUtilityTypes\";\n\n/**\n * Collection of utility types that are not intended to be used/imported\n * directly outside of this package.\n *\n * @alpha\n * @system\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace InternalUtilityTypes {\n\t/**\n\t *
|
|
1
|
+
{"version":3,"file":"exposedUtilityTypes.js","sourceRoot":"","sources":["../src/exposedUtilityTypes.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\tInternalUtilityTypes as CoreInternalUtilityTypes,\n\tJsonDeserialized,\n\tJsonSerializable,\n} from \"@fluidframework/core-interfaces/internal/exposedUtilityTypes\";\n\n/**\n * Collection of utility types that are not intended to be used/imported\n * directly outside of this package.\n *\n * @alpha\n * @system\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace InternalUtilityTypes {\n\t/**\n\t * `true` iff the given type is an acceptable shape for a notification.\n\t *\n\t * @system\n\t */\n\texport type IsNotificationListener<Event> = Event extends (...args: infer P) => void\n\t\t? CoreInternalUtilityTypes.IfSameType<\n\t\t\t\tP,\n\t\t\t\tJsonSerializable<P> & JsonDeserialized<P>,\n\t\t\t\ttrue,\n\t\t\t\tfalse\n\t\t\t>\n\t\t: false;\n\n\t/**\n\t * Used to specify the kinds of notifications emitted by a {@link NotificationListenable}.\n\t *\n\t * @remarks\n\t *\n\t * Any object type is a valid NotificationListeners, but only the notification-like\n\t * properties of that type will be included.\n\t *\n\t * @example\n\t *\n\t * ```typescript\n\t * interface MyNotifications {\n\t * load: (user: string, data: IUserData) => void;\n\t * requestPause: (period: number) => void;\n\t * }\n\t * ```\n\t *\n\t * @system\n\t */\n\texport type NotificationListeners<E> = {\n\t\t[P in string & keyof E as IsNotificationListener<E[P]> extends true ? P : never]: E[P];\n\t};\n\n\t/**\n\t * {@link @fluidframework/core-interfaces#JsonDeserialized} version of the parameters of a function.\n\t *\n\t * @system\n\t */\n\texport type JsonDeserializedParameters<T extends (...args: any) => any> = T extends (\n\t\t...args: infer P\n\t) => any\n\t\t? JsonDeserialized<P>\n\t\t: never;\n\n\t/**\n\t * {@link @fluidframework/core-interfaces#JsonSerializable} version of the parameters of a function.\n\t *\n\t * @system\n\t */\n\texport type JsonSerializableParameters<T extends (...args: any) => any> = T extends (\n\t\t...args: infer P\n\t) => any\n\t\t? JsonSerializable<P>\n\t\t: never;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,15 +10,16 @@
|
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
12
|
export type { ClientConnectionId } from "./baseTypes.js";
|
|
13
|
-
export type {
|
|
14
|
-
export { type
|
|
13
|
+
export type { NotificationsWorkspace, NotificationsWorkspaceSchema, StatesWorkspace, StatesWorkspaceEntries, StatesWorkspaceSchema, StatesWorkspaceEntry, WorkspaceAddress, } from "./types.js";
|
|
14
|
+
export { type Attendee, type AttendeesEvents, type AttendeeId, AttendeeStatus, type Presence, type PresenceEvents, } from "./presence.js";
|
|
15
15
|
export type { BroadcastControls, BroadcastControlSettings, } from "./broadcastControls.js";
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export type {
|
|
16
|
+
export { getPresence } from "./experimentalAccess.js";
|
|
17
|
+
export { getPresenceViaDataObject, type ExperimentalPresenceDO, ExperimentalPresenceManager, } from "./datastorePresenceManagerFactory.js";
|
|
18
|
+
export type { latestMap, LatestMapArguments, LatestMapRaw, LatestMapClientData, LatestMapRawEvents, LatestMapItemRemovedClientData, LatestMapItemUpdatedClientData, StateMap, } from "./latestMapValueManager.js";
|
|
19
|
+
export type { latest, LatestArguments, LatestRaw, LatestRawEvents, } from "./latestValueManager.js";
|
|
20
|
+
export type { LatestClientData, LatestData, LatestMetadata, } from "./latestValueTypes.js";
|
|
21
21
|
export { type NotificationEmitter, type NotificationListenable, type NotificationSubscriptions, Notifications, type NotificationsManager, type NotificationsManagerEvents, } from "./notificationsManager.js";
|
|
22
|
+
export { StateFactory } from "./stateFactory.js";
|
|
22
23
|
export type { InternalTypes } from "./exposedInternalTypes.js";
|
|
23
24
|
export type { InternalUtilityTypes } from "./exposedUtilityTypes.js";
|
|
24
25
|
//# sourceMappingURL=index.d.ts.map
|
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;;;;;;GAMG;AAEH,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,YAAY,EACX,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAEH,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,YAAY,EACX,sBAAsB,EACtB,4BAA4B,EAC5B,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,cAAc,EACd,KAAK,QAAQ,EACb,KAAK,cAAc,GACnB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACX,iBAAiB,EACjB,wBAAwB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EACN,wBAAwB,EACxB,KAAK,sBAAsB,EAC3B,2BAA2B,GAC3B,MAAM,sCAAsC,CAAC;AAE9C,YAAY,EACX,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,8BAA8B,EAC9B,8BAA8B,EAC9B,QAAQ,GACR,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACX,MAAM,EACN,eAAe,EACf,SAAS,EACT,eAAe,GACf,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACX,gBAAgB,EAChB,UAAU,EACV,cAAc,GACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAC/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,18 +4,16 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.StateFactory = exports.Notifications = exports.ExperimentalPresenceManager = exports.getPresenceViaDataObject = exports.getPresence = exports.AttendeeStatus = void 0;
|
|
8
8
|
var presence_js_1 = require("./presence.js");
|
|
9
|
-
Object.defineProperty(exports, "
|
|
9
|
+
Object.defineProperty(exports, "AttendeeStatus", { enumerable: true, get: function () { return presence_js_1.AttendeeStatus; } });
|
|
10
10
|
var experimentalAccess_js_1 = require("./experimentalAccess.js");
|
|
11
|
-
Object.defineProperty(exports, "
|
|
11
|
+
Object.defineProperty(exports, "getPresence", { enumerable: true, get: function () { return experimentalAccess_js_1.getPresence; } });
|
|
12
12
|
var datastorePresenceManagerFactory_js_1 = require("./datastorePresenceManagerFactory.js");
|
|
13
|
-
Object.defineProperty(exports, "
|
|
13
|
+
Object.defineProperty(exports, "getPresenceViaDataObject", { enumerable: true, get: function () { return datastorePresenceManagerFactory_js_1.getPresenceViaDataObject; } });
|
|
14
14
|
Object.defineProperty(exports, "ExperimentalPresenceManager", { enumerable: true, get: function () { return datastorePresenceManagerFactory_js_1.ExperimentalPresenceManager; } });
|
|
15
|
-
var latestMapValueManager_js_1 = require("./latestMapValueManager.js");
|
|
16
|
-
Object.defineProperty(exports, "LatestMap", { enumerable: true, get: function () { return latestMapValueManager_js_1.LatestMap; } });
|
|
17
|
-
var latestValueManager_js_1 = require("./latestValueManager.js");
|
|
18
|
-
Object.defineProperty(exports, "Latest", { enumerable: true, get: function () { return latestValueManager_js_1.Latest; } });
|
|
19
15
|
var notificationsManager_js_1 = require("./notificationsManager.js");
|
|
20
16
|
Object.defineProperty(exports, "Notifications", { enumerable: true, get: function () { return notificationsManager_js_1.Notifications; } });
|
|
17
|
+
var stateFactory_js_1 = require("./stateFactory.js");
|
|
18
|
+
Object.defineProperty(exports, "StateFactory", { enumerable: true, get: function () { return stateFactory_js_1.StateFactory; } });
|
|
21
19
|
//# sourceMappingURL=index.js.map
|