@fluidframework/presence 2.92.0 → 2.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/README.md +4 -4
  2. package/dist/alpha.d.ts +6 -4
  3. package/dist/beta.d.ts +5 -2
  4. package/dist/getPresence.d.ts +4 -9
  5. package/dist/getPresence.d.ts.map +1 -1
  6. package/dist/getPresence.js +6 -86
  7. package/dist/getPresence.js.map +1 -1
  8. package/dist/index.d.ts +4 -13
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +8 -8
  11. package/dist/index.js.map +1 -1
  12. package/dist/legacy.alpha.d.ts +6 -4
  13. package/dist/package.json +1 -15
  14. package/dist/public.d.ts +69 -0
  15. package/lib/alpha.d.ts +6 -4
  16. package/lib/beta.d.ts +5 -2
  17. package/lib/getPresence.d.ts +4 -9
  18. package/lib/getPresence.d.ts.map +1 -1
  19. package/lib/getPresence.js +6 -85
  20. package/lib/getPresence.js.map +1 -1
  21. package/lib/index.d.ts +4 -13
  22. package/lib/index.d.ts.map +1 -1
  23. package/lib/index.js +5 -4
  24. package/lib/index.js.map +1 -1
  25. package/lib/legacy.alpha.d.ts +6 -4
  26. package/lib/public.d.ts +69 -0
  27. package/lib/tsdoc-metadata.json +11 -0
  28. package/package.json +32 -78
  29. package/dist/baseTypes.d.ts +0 -24
  30. package/dist/baseTypes.d.ts.map +0 -1
  31. package/dist/baseTypes.js +0 -7
  32. package/dist/baseTypes.js.map +0 -1
  33. package/dist/broadcastControls.d.ts +0 -37
  34. package/dist/broadcastControls.d.ts.map +0 -1
  35. package/dist/broadcastControls.js +0 -60
  36. package/dist/broadcastControls.js.map +0 -1
  37. package/dist/broadcastControlsTypes.d.ts +0 -38
  38. package/dist/broadcastControlsTypes.d.ts.map +0 -1
  39. package/dist/broadcastControlsTypes.js +0 -7
  40. package/dist/broadcastControlsTypes.js.map +0 -1
  41. package/dist/exposedInternalTypes.d.ts +0 -138
  42. package/dist/exposedInternalTypes.d.ts.map +0 -1
  43. package/dist/exposedInternalTypes.js +0 -19
  44. package/dist/exposedInternalTypes.js.map +0 -1
  45. package/dist/exposedUtilityTypes.d.ts +0 -108
  46. package/dist/exposedUtilityTypes.d.ts.map +0 -1
  47. package/dist/exposedUtilityTypes.js +0 -7
  48. package/dist/exposedUtilityTypes.js.map +0 -1
  49. package/dist/internalUtils.d.ts +0 -125
  50. package/dist/internalUtils.d.ts.map +0 -1
  51. package/dist/internalUtils.js +0 -99
  52. package/dist/internalUtils.js.map +0 -1
  53. package/dist/latestMapTypes.d.ts +0 -343
  54. package/dist/latestMapTypes.d.ts.map +0 -1
  55. package/dist/latestMapTypes.js +0 -7
  56. package/dist/latestMapTypes.js.map +0 -1
  57. package/dist/latestMapValueManager.d.ts +0 -52
  58. package/dist/latestMapValueManager.d.ts.map +0 -1
  59. package/dist/latestMapValueManager.js +0 -250
  60. package/dist/latestMapValueManager.js.map +0 -1
  61. package/dist/latestTypes.d.ts +0 -183
  62. package/dist/latestTypes.d.ts.map +0 -1
  63. package/dist/latestTypes.js +0 -7
  64. package/dist/latestTypes.js.map +0 -1
  65. package/dist/latestValueManager.d.ts +0 -10
  66. package/dist/latestValueManager.d.ts.map +0 -1
  67. package/dist/latestValueManager.js +0 -117
  68. package/dist/latestValueManager.js.map +0 -1
  69. package/dist/latestValueTypes.d.ts +0 -108
  70. package/dist/latestValueTypes.d.ts.map +0 -1
  71. package/dist/latestValueTypes.js +0 -7
  72. package/dist/latestValueTypes.js.map +0 -1
  73. package/dist/notificationsManager.d.ts +0 -27
  74. package/dist/notificationsManager.d.ts.map +0 -1
  75. package/dist/notificationsManager.js +0 -98
  76. package/dist/notificationsManager.js.map +0 -1
  77. package/dist/notificationsManagerTypes.d.ts +0 -144
  78. package/dist/notificationsManagerTypes.d.ts.map +0 -1
  79. package/dist/notificationsManagerTypes.js +0 -7
  80. package/dist/notificationsManagerTypes.js.map +0 -1
  81. package/dist/packageVersion.d.ts +0 -9
  82. package/dist/packageVersion.d.ts.map +0 -1
  83. package/dist/packageVersion.js +0 -12
  84. package/dist/packageVersion.js.map +0 -1
  85. package/dist/presence.d.ts +0 -229
  86. package/dist/presence.d.ts.map +0 -1
  87. package/dist/presence.js +0 -23
  88. package/dist/presence.js.map +0 -1
  89. package/dist/presenceDatastoreManager.d.ts +0 -149
  90. package/dist/presenceDatastoreManager.d.ts.map +0 -1
  91. package/dist/presenceDatastoreManager.js +0 -667
  92. package/dist/presenceDatastoreManager.js.map +0 -1
  93. package/dist/presenceManager.d.ts +0 -16
  94. package/dist/presenceManager.d.ts.map +0 -1
  95. package/dist/presenceManager.js +0 -140
  96. package/dist/presenceManager.js.map +0 -1
  97. package/dist/presenceStates.d.ts +0 -102
  98. package/dist/presenceStates.d.ts.map +0 -1
  99. package/dist/presenceStates.js +0 -231
  100. package/dist/presenceStates.js.map +0 -1
  101. package/dist/protocol.d.ts +0 -111
  102. package/dist/protocol.d.ts.map +0 -1
  103. package/dist/protocol.js +0 -20
  104. package/dist/protocol.js.map +0 -1
  105. package/dist/runtimeTypes.d.ts +0 -26
  106. package/dist/runtimeTypes.d.ts.map +0 -1
  107. package/dist/runtimeTypes.js +0 -7
  108. package/dist/runtimeTypes.js.map +0 -1
  109. package/dist/stateDatastore.d.ts +0 -56
  110. package/dist/stateDatastore.d.ts.map +0 -1
  111. package/dist/stateDatastore.js +0 -22
  112. package/dist/stateDatastore.js.map +0 -1
  113. package/dist/stateFactory.d.ts +0 -18
  114. package/dist/stateFactory.d.ts.map +0 -1
  115. package/dist/stateFactory.js +0 -23
  116. package/dist/stateFactory.js.map +0 -1
  117. package/dist/statesManagerTypes.d.ts +0 -27
  118. package/dist/statesManagerTypes.d.ts.map +0 -1
  119. package/dist/statesManagerTypes.js +0 -7
  120. package/dist/statesManagerTypes.js.map +0 -1
  121. package/dist/systemWorkspace.d.ts +0 -58
  122. package/dist/systemWorkspace.d.ts.map +0 -1
  123. package/dist/systemWorkspace.js +0 -265
  124. package/dist/systemWorkspace.js.map +0 -1
  125. package/dist/timerManager.d.ts +0 -37
  126. package/dist/timerManager.d.ts.map +0 -1
  127. package/dist/timerManager.js +0 -65
  128. package/dist/timerManager.js.map +0 -1
  129. package/dist/types.d.ts +0 -132
  130. package/dist/types.d.ts.map +0 -1
  131. package/dist/types.js +0 -7
  132. package/dist/types.js.map +0 -1
  133. package/dist/validatableTypes.d.ts +0 -69
  134. package/dist/validatableTypes.d.ts.map +0 -1
  135. package/dist/validatableTypes.js +0 -7
  136. package/dist/validatableTypes.js.map +0 -1
  137. package/dist/validatedGetter.d.ts +0 -18
  138. package/dist/validatedGetter.d.ts.map +0 -1
  139. package/dist/validatedGetter.js +0 -43
  140. package/dist/validatedGetter.js.map +0 -1
  141. package/dist/valueManager.d.ts +0 -15
  142. package/dist/valueManager.d.ts.map +0 -1
  143. package/dist/valueManager.js +0 -22
  144. package/dist/valueManager.js.map +0 -1
  145. package/lib/baseTypes.d.ts +0 -24
  146. package/lib/baseTypes.d.ts.map +0 -1
  147. package/lib/baseTypes.js +0 -6
  148. package/lib/baseTypes.js.map +0 -1
  149. package/lib/broadcastControls.d.ts +0 -37
  150. package/lib/broadcastControls.d.ts.map +0 -1
  151. package/lib/broadcastControls.js +0 -55
  152. package/lib/broadcastControls.js.map +0 -1
  153. package/lib/broadcastControlsTypes.d.ts +0 -38
  154. package/lib/broadcastControlsTypes.d.ts.map +0 -1
  155. package/lib/broadcastControlsTypes.js +0 -6
  156. package/lib/broadcastControlsTypes.js.map +0 -1
  157. package/lib/exposedInternalTypes.d.ts +0 -138
  158. package/lib/exposedInternalTypes.d.ts.map +0 -1
  159. package/lib/exposedInternalTypes.js +0 -16
  160. package/lib/exposedInternalTypes.js.map +0 -1
  161. package/lib/exposedUtilityTypes.d.ts +0 -108
  162. package/lib/exposedUtilityTypes.d.ts.map +0 -1
  163. package/lib/exposedUtilityTypes.js +0 -6
  164. package/lib/exposedUtilityTypes.js.map +0 -1
  165. package/lib/internalUtils.d.ts +0 -125
  166. package/lib/internalUtils.d.ts.map +0 -1
  167. package/lib/internalUtils.js +0 -90
  168. package/lib/internalUtils.js.map +0 -1
  169. package/lib/latestMapTypes.d.ts +0 -343
  170. package/lib/latestMapTypes.d.ts.map +0 -1
  171. package/lib/latestMapTypes.js +0 -6
  172. package/lib/latestMapTypes.js.map +0 -1
  173. package/lib/latestMapValueManager.d.ts +0 -52
  174. package/lib/latestMapValueManager.d.ts.map +0 -1
  175. package/lib/latestMapValueManager.js +0 -246
  176. package/lib/latestMapValueManager.js.map +0 -1
  177. package/lib/latestTypes.d.ts +0 -183
  178. package/lib/latestTypes.d.ts.map +0 -1
  179. package/lib/latestTypes.js +0 -6
  180. package/lib/latestTypes.js.map +0 -1
  181. package/lib/latestValueManager.d.ts +0 -10
  182. package/lib/latestValueManager.d.ts.map +0 -1
  183. package/lib/latestValueManager.js +0 -113
  184. package/lib/latestValueManager.js.map +0 -1
  185. package/lib/latestValueTypes.d.ts +0 -108
  186. package/lib/latestValueTypes.d.ts.map +0 -1
  187. package/lib/latestValueTypes.js +0 -6
  188. package/lib/latestValueTypes.js.map +0 -1
  189. package/lib/notificationsManager.d.ts +0 -27
  190. package/lib/notificationsManager.d.ts.map +0 -1
  191. package/lib/notificationsManager.js +0 -94
  192. package/lib/notificationsManager.js.map +0 -1
  193. package/lib/notificationsManagerTypes.d.ts +0 -144
  194. package/lib/notificationsManagerTypes.d.ts.map +0 -1
  195. package/lib/notificationsManagerTypes.js +0 -6
  196. package/lib/notificationsManagerTypes.js.map +0 -1
  197. package/lib/packageVersion.d.ts +0 -9
  198. package/lib/packageVersion.d.ts.map +0 -1
  199. package/lib/packageVersion.js +0 -9
  200. package/lib/packageVersion.js.map +0 -1
  201. package/lib/presence.d.ts +0 -229
  202. package/lib/presence.d.ts.map +0 -1
  203. package/lib/presence.js +0 -20
  204. package/lib/presence.js.map +0 -1
  205. package/lib/presenceDatastoreManager.d.ts +0 -149
  206. package/lib/presenceDatastoreManager.d.ts.map +0 -1
  207. package/lib/presenceDatastoreManager.js +0 -663
  208. package/lib/presenceDatastoreManager.js.map +0 -1
  209. package/lib/presenceManager.d.ts +0 -16
  210. package/lib/presenceManager.d.ts.map +0 -1
  211. package/lib/presenceManager.js +0 -136
  212. package/lib/presenceManager.js.map +0 -1
  213. package/lib/presenceStates.d.ts +0 -102
  214. package/lib/presenceStates.d.ts.map +0 -1
  215. package/lib/presenceStates.js +0 -225
  216. package/lib/presenceStates.js.map +0 -1
  217. package/lib/protocol.d.ts +0 -111
  218. package/lib/protocol.d.ts.map +0 -1
  219. package/lib/protocol.js +0 -17
  220. package/lib/protocol.js.map +0 -1
  221. package/lib/runtimeTypes.d.ts +0 -26
  222. package/lib/runtimeTypes.d.ts.map +0 -1
  223. package/lib/runtimeTypes.js +0 -6
  224. package/lib/runtimeTypes.js.map +0 -1
  225. package/lib/stateDatastore.d.ts +0 -56
  226. package/lib/stateDatastore.d.ts.map +0 -1
  227. package/lib/stateDatastore.js +0 -17
  228. package/lib/stateDatastore.js.map +0 -1
  229. package/lib/stateFactory.d.ts +0 -18
  230. package/lib/stateFactory.d.ts.map +0 -1
  231. package/lib/stateFactory.js +0 -20
  232. package/lib/stateFactory.js.map +0 -1
  233. package/lib/statesManagerTypes.d.ts +0 -27
  234. package/lib/statesManagerTypes.d.ts.map +0 -1
  235. package/lib/statesManagerTypes.js +0 -6
  236. package/lib/statesManagerTypes.js.map +0 -1
  237. package/lib/systemWorkspace.d.ts +0 -58
  238. package/lib/systemWorkspace.d.ts.map +0 -1
  239. package/lib/systemWorkspace.js +0 -261
  240. package/lib/systemWorkspace.js.map +0 -1
  241. package/lib/timerManager.d.ts +0 -37
  242. package/lib/timerManager.d.ts.map +0 -1
  243. package/lib/timerManager.js +0 -61
  244. package/lib/timerManager.js.map +0 -1
  245. package/lib/types.d.ts +0 -132
  246. package/lib/types.d.ts.map +0 -1
  247. package/lib/types.js +0 -6
  248. package/lib/types.js.map +0 -1
  249. package/lib/validatableTypes.d.ts +0 -69
  250. package/lib/validatableTypes.d.ts.map +0 -1
  251. package/lib/validatableTypes.js +0 -6
  252. package/lib/validatableTypes.js.map +0 -1
  253. package/lib/validatedGetter.d.ts +0 -18
  254. package/lib/validatedGetter.d.ts.map +0 -1
  255. package/lib/validatedGetter.js +0 -39
  256. package/lib/validatedGetter.js.map +0 -1
  257. package/lib/valueManager.d.ts +0 -15
  258. package/lib/valueManager.d.ts.map +0 -1
  259. package/lib/valueManager.js +0 -17
  260. package/lib/valueManager.js.map +0 -1
@@ -1,60 +0,0 @@
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.RequiredBroadcastControl = exports.OptionalBroadcastControl = void 0;
8
- class ForcedRefreshControl {
9
- constructor(settings) {
10
- // this._forcedRefreshInterval = settings?.forcedRefreshIntervalMs;
11
- }
12
- get forcedRefreshIntervalMs() {
13
- return this._forcedRefreshInterval;
14
- }
15
- set forcedRefreshIntervalMs(value) {
16
- if (value === undefined) {
17
- this._forcedRefreshInterval = undefined;
18
- }
19
- else {
20
- this._forcedRefreshInterval = value >= 10 ? value : undefined;
21
- if (value >= 10) {
22
- // TODO: enable periodic forced refresh
23
- throw new Error("Forced Refresh feature is not implemented");
24
- }
25
- }
26
- }
27
- }
28
- /**
29
- * Implements {@link BroadcastControls} for States Managers
30
- * where returning `undefined` settings are allowed.
31
- */
32
- class OptionalBroadcastControl extends ForcedRefreshControl {
33
- constructor(settings) {
34
- super(settings);
35
- this.allowableUpdateLatencyMs = settings?.allowableUpdateLatencyMs;
36
- }
37
- }
38
- exports.OptionalBroadcastControl = OptionalBroadcastControl;
39
- /**
40
- * Implements {@link BroadcastControls} but always provides defined value for
41
- * {@link BroadcastControls.allowableUpdateLatencyMs | allowableUpdateLatencyMs}.
42
- *
43
- * If {@link BroadcastControls.allowableUpdateLatencyMs | allowableUpdateLatencyMs}
44
- * is set to `undefined`, the default will be restored.
45
- */
46
- class RequiredBroadcastControl extends ForcedRefreshControl {
47
- constructor(defaultAllowableUpdateLatencyMs) {
48
- super();
49
- this.defaultAllowableUpdateLatencyMs = defaultAllowableUpdateLatencyMs;
50
- this._allowableUpdateLatencyMs = defaultAllowableUpdateLatencyMs;
51
- }
52
- get allowableUpdateLatencyMs() {
53
- return this._allowableUpdateLatencyMs;
54
- }
55
- set allowableUpdateLatencyMs(value) {
56
- this._allowableUpdateLatencyMs = value ?? this.defaultAllowableUpdateLatencyMs;
57
- }
58
- }
59
- exports.RequiredBroadcastControl = RequiredBroadcastControl;
60
- //# sourceMappingURL=broadcastControls.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"broadcastControls.js","sourceRoot":"","sources":["../src/broadcastControls.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,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;;;GAGG;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;;;;;;GAMG;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\nimport type { BroadcastControls, BroadcastControlSettings } from \"./broadcastControlsTypes.js\";\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 * Implements {@link BroadcastControls} for States Managers\n * where returning `undefined` settings are allowed.\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 */\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"]}
@@ -1,38 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- /**
6
- * Common controls for States objects.
7
- *
8
- * @sealed
9
- * @beta
10
- */
11
- export interface BroadcastControls {
12
- /**
13
- * Maximum time in milliseconds that a local value update is allowed
14
- * to remain pending before it must be broadcast.
15
- *
16
- * @remarks
17
- * There is no guarantee of broadcast within time allowed
18
- * as other conditions such as disconnect or service throttling may
19
- * cause a delay.
20
- *
21
- * Setting to `undefined` will restore to a system default.
22
- */
23
- allowableUpdateLatencyMs: number | undefined;
24
- }
25
- /**
26
- * Value set to configure {@link BroadcastControls}.
27
- *
28
- * @beta
29
- */
30
- export interface BroadcastControlSettings {
31
- /**
32
- * {@inheritdoc BroadcastControls.allowableUpdateLatencyMs}
33
- *
34
- * @defaultValue 60 [milliseconds]
35
- */
36
- readonly allowableUpdateLatencyMs?: number;
37
- }
38
- //# sourceMappingURL=broadcastControlsTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"broadcastControlsTypes.d.ts","sourceRoot":"","sources":["../src/broadcastControlsTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;;;;;;OAUG;IACH,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAAC;CAc7C;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;;OAIG;IACH,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CAS3C"}
@@ -1,7 +0,0 @@
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
- //# sourceMappingURL=broadcastControlsTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"broadcastControlsTypes.js","sourceRoot":"","sources":["../src/broadcastControlsTypes.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 * Common controls for States objects.\n *\n * @sealed\n * @beta\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 * @beta\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"]}
@@ -1,138 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { OpaqueJsonDeserialized } from "@fluidframework/core-interfaces/internal/exposedUtilityTypes";
6
- /**
7
- * Collection of value types that are not intended to be used/imported
8
- * directly outside of this package.
9
- *
10
- * @beta
11
- * @system
12
- */
13
- export declare namespace InternalTypes {
14
- /**
15
- * Metadata for a value state.
16
- *
17
- * @system
18
- */
19
- interface ValueStateMetadata {
20
- rev: number;
21
- timestamp: number;
22
- }
23
- /**
24
- * Represents a state that may have a value.
25
- * And it includes standard metadata.
26
- *
27
- * @remarks
28
- * See {@link InternalPresenceTypes.ValueRequiredState}.
29
- *
30
- * @system
31
- */
32
- interface ValueOptionalState<TValue> extends ValueStateMetadata {
33
- value?: OpaqueJsonDeserialized<TValue>;
34
- }
35
- /**
36
- * Represents a state that must have a value.
37
- * And it includes standard metadata.
38
- *
39
- * @remarks
40
- * The value is wrapped in `OpaqueJsonDeserialized` as uses are expected
41
- * to involve generic or unknown types that will be filtered. It is here
42
- * mostly as a convenience to the many such uses that would otherwise
43
- * need to specify some wrapper themselves.
44
- *
45
- * For known cases, construct a custom interface that extends
46
- * {@link InternalPresenceTypes.ValueStateMetadata}.
47
- *
48
- * @system
49
- */
50
- interface ValueRequiredState<TValue> extends ValueStateMetadata {
51
- value: OpaqueJsonDeserialized<TValue>;
52
- }
53
- /**
54
- * A directory of values, where each value may be an optional state or another directory.
55
- *
56
- * @system
57
- */
58
- interface ValueDirectory<T> {
59
- rev: number;
60
- items: {
61
- [name: string | number]: ValueOptionalState<T> | ValueDirectory<T>;
62
- };
63
- }
64
- /**
65
- * Convenience type for a required state or a directory of values.
66
- *
67
- * @system
68
- */
69
- type ValueDirectoryOrState<T> = ValueRequiredState<T> | ValueDirectory<T>;
70
- /**
71
- * Collection of optional values in a "map" structure.
72
- *
73
- * @system
74
- */
75
- interface MapValueState<T, Keys extends string> {
76
- rev: number;
77
- items: {
78
- [name in Keys]: ValueOptionalState<T>;
79
- };
80
- }
81
- /**
82
- * Opaque type representing internal state datastore.
83
- *
84
- * @system
85
- */
86
- class StateDatastoreHandle<TKey, TValue extends ValueDirectoryOrState<unknown>> {
87
- private readonly StateDatastoreHandle;
88
- }
89
- /**
90
- * Brand to ensure state values internal type safety without revealing
91
- * internals that are subject to change.
92
- *
93
- * @system
94
- */
95
- class StateValueBrand<T> {
96
- private readonly StateValue;
97
- }
98
- /**
99
- * This type provides no additional functionality over the type it wraps.
100
- * It is used to ensure type safety within package.
101
- * Users may find it convenient to just use the type it wraps directly.
102
- *
103
- * @privateRemarks
104
- * Checkout filtering omitting unknown from T (`Omit<T,unknown> &`).
105
- *
106
- * @system
107
- */
108
- type StateValue<T> = T & StateValueBrand<T>;
109
- /**
110
- * Package internal function declaration for state and notification instantiation.
111
- *
112
- * @remarks
113
- * Direct use of this type is discouraged. If in need, try to use the type
114
- * returned by the factory functions instead, as those are more specific and
115
- * stable.
116
- *
117
- * @system
118
- */
119
- type ManagerFactory<TKey extends string, TValue extends ValueDirectoryOrState<unknown>, TManager> = {
120
- instanceBase: new (...args: any[]) => unknown;
121
- } & ((key: TKey, datastoreHandle: StateDatastoreHandle<TKey, TValue>) => {
122
- initialData?: {
123
- value: TValue;
124
- allowableUpdateLatencyMs: number | undefined;
125
- };
126
- manager: StateValue<TManager>;
127
- });
128
- /**
129
- * Structure of a generic notification "value".
130
- *
131
- * @system
132
- */
133
- interface NotificationType {
134
- name: string;
135
- args: unknown[];
136
- }
137
- }
138
- //# sourceMappingURL=exposedInternalTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exposedInternalTypes.d.ts","sourceRoot":"","sources":["../src/exposedInternalTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAC;AAE3G;;;;;;GAMG;AAEH,yBAAiB,aAAa,CAAC;IAC9B;;;;OAIG;IACH,UAAiB,kBAAkB;QAClC,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,EAAE,MAAM,CAAC;KAClB;IAED;;;;;;;;OAQG;IACH,UAAiB,kBAAkB,CAAC,MAAM,CAAE,SAAQ,kBAAkB;QACrE,KAAK,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;KAMvC;IAED;;;;;;;;;;;;;;OAcG;IACH,UAAiB,kBAAkB,CAAC,MAAM,CAAE,SAAQ,kBAAkB;QACrE,KAAK,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;KAMtC;IAED;;;;OAIG;IACH,UAAiB,cAAc,CAAC,CAAC;QAChC,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE;YAIN,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;SACnE,CAAC;KACF;IAED;;;;OAIG;IACH,KAAY,qBAAqB,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAEjF;;;;OAIG;IACH,UAAiB,aAAa,CAAC,CAAC,EAAE,IAAI,SAAS,MAAM;QACpD,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE;aAIL,IAAI,IAAI,IAAI,GAAG,kBAAkB,CAAC,CAAC,CAAC;SACrC,CAAC;KACF;IAED;;;;OAIG;IACH,MAAqB,oBAAoB,CACxC,IAAI,EACJ,MAAM,SAAS,qBAAqB,CAAC,OAAO,CAAC;QAE7C,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAqC;KAC1E;IAED;;;;;OAKG;IACH,MAAqB,eAAe,CAAC,CAAC;QACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgB;KAC3C;IAED;;;;;;;;;OASG;IACH,KAAY,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAEnD;;;;;;;;;OASG;IACH,KAAY,cAAc,CACzB,IAAI,SAAS,MAAM,EACnB,MAAM,SAAS,qBAAqB,CAAC,OAAO,CAAC,EAC7C,QAAQ,IACL;QAAE,YAAY,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAA;KAAE,GAAG,CAAC,CACxD,GAAG,EAAE,IAAI,EACT,eAAe,EAAE,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,KAC/C;QACJ,WAAW,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAAA;SAAE,CAAC;QAC9E,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;KAC9B,CAAC,CAAC;IAEH;;;;OAIG;IACH,UAAiB,gBAAgB;QAChC,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,OAAO,EAAE,CAAC;KAChB;CACD"}
@@ -1,19 +0,0 @@
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.InternalTypes = void 0;
8
- /**
9
- * Collection of value types that are not intended to be used/imported
10
- * directly outside of this package.
11
- *
12
- * @beta
13
- * @system
14
- */
15
- // eslint-disable-next-line @typescript-eslint/no-namespace
16
- var InternalTypes;
17
- (function (InternalTypes) {
18
- })(InternalTypes || (exports.InternalTypes = InternalTypes = {}));
19
- //# sourceMappingURL=exposedInternalTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exposedInternalTypes.js","sourceRoot":"","sources":["../src/exposedInternalTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;;;;GAMG;AACH,2DAA2D;AAC3D,IAAiB,aAAa,CA2J7B;AA3JD,WAAiB,aAAa;AA2J9B,CAAC,EA3JgB,aAAa,6BAAb,aAAa,QA2J7B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { OpaqueJsonDeserialized } 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 * @beta\n * @system\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace InternalTypes {\n\t/**\n\t * Metadata for a value state.\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 * Represents a state that may have a value.\n\t * And it includes standard metadata.\n\t *\n\t * @remarks\n\t * See {@link InternalPresenceTypes.ValueRequiredState}.\n\t *\n\t * @system\n\t */\n\texport interface ValueOptionalState<TValue> extends ValueStateMetadata {\n\t\tvalue?: OpaqueJsonDeserialized<TValue>;\n\n\t\t// Uncomment this property and rebuild to check more thoroughly\n\t\t// for incompatibilities between this non-validatable state\n\t\t// and ValidatableOptionalState.\n\t\t// validatedValue?: never;\n\t}\n\n\t/**\n\t * Represents a state that must have a value.\n\t * And it includes standard metadata.\n\t *\n\t * @remarks\n\t * The value is wrapped in `OpaqueJsonDeserialized` as uses are expected\n\t * to involve generic or unknown types that will be filtered. It is here\n\t * mostly as a convenience to the many such uses that would otherwise\n\t * need to specify some wrapper themselves.\n\t *\n\t * For known cases, construct a custom interface that extends\n\t * {@link InternalPresenceTypes.ValueStateMetadata}.\n\t *\n\t * @system\n\t */\n\texport interface ValueRequiredState<TValue> extends ValueStateMetadata {\n\t\tvalue: OpaqueJsonDeserialized<TValue>;\n\n\t\t// Uncomment this property and rebuild to check more thoroughly\n\t\t// for incompatibilities between this non-validatable state\n\t\t// and ValidatableOptionalState.\n\t\t// validatedValue?: never;\n\t}\n\n\t/**\n\t * A directory of values, where each value may be an optional state or another directory.\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 * Convenience type for a required state or a directory of values.\n\t *\n\t * @system\n\t */\n\texport type ValueDirectoryOrState<T> = ValueRequiredState<T> | ValueDirectory<T>;\n\n\t/**\n\t * Collection of optional values in a \"map\" structure.\n\t *\n\t * @system\n\t */\n\texport interface MapValueState<T, Keys extends string> {\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 * Opaque type representing internal state datastore.\n\t *\n\t * @system\n\t */\n\texport declare class StateDatastoreHandle<\n\t\tTKey,\n\t\tTValue extends ValueDirectoryOrState<unknown>,\n\t> {\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 * @remarks\n\t * Direct use of this type is discouraged. If in need, try to use the type\n\t * returned by the factory functions instead, as those are more specific and\n\t * stable.\n\t *\n\t * @system\n\t */\n\texport type ManagerFactory<\n\t\tTKey extends string,\n\t\tTValue extends ValueDirectoryOrState<unknown>,\n\t\tTManager,\n\t> = { instanceBase: new (...args: any[]) => unknown } & ((\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 * Structure of a generic notification \"value\".\n\t *\n\t * @system\n\t */\n\texport interface NotificationType {\n\t\tname: string;\n\t\targs: unknown[];\n\t}\n}\n"]}
@@ -1,108 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { InternalCoreInterfacesUtilityTypes, JsonDeserialized, JsonSerializable } from "@fluidframework/core-interfaces/internal/exposedUtilityTypes";
6
- import type { Attendee } from "./presence.js";
7
- /**
8
- * Collection of utility types that are not intended to be used/imported
9
- * directly outside of this package.
10
- *
11
- * @alpha
12
- * @system
13
- */
14
- export declare namespace InternalUtilityTypes {
15
- /**
16
- * Yields `IfParametersValid` when the given type is an acceptable shape for a
17
- * notification. `Else` otherwise.
18
- *
19
- * @system
20
- */
21
- type IfNotificationParametersSignature<Event, IfParametersValid, Else> = Event extends (...args: infer P) => void ? InternalCoreInterfacesUtilityTypes.IfSameType<P, JsonSerializable<P>, IfParametersValid, Else> : Else;
22
- /**
23
- * Yields `IfSubscriber` when the given type is an acceptable shape for a notification
24
- * listener (subscriber) function. `Else` otherwise.
25
- *
26
- * @system
27
- */
28
- type IfNotificationSubscriberSignature<Event, IfSubscriber, Else> = Event extends (sender: Attendee, ...args: infer P) => void ? InternalCoreInterfacesUtilityTypes.IfSameType<P, JsonSerializable<P>, IfSubscriber, Else> : Else;
29
- /**
30
- * Used to specify the kinds of notifications handled by a {@link NotificationListenable}
31
- * by describing the custom parameters in a function signature.
32
- *
33
- * @remarks
34
- *
35
- * Any object type is a valid NotificationListeners, but only the notification-like
36
- * properties of that type will be included.
37
- *
38
- * @example
39
- *
40
- * ```typescript
41
- * interface MyNotifications {
42
- * load: (user: string, data: IUserData) => void;
43
- * requestPause: (period: number) => void;
44
- * }
45
- * ```
46
- *
47
- * @system
48
- */
49
- type NotificationListeners<E> = {
50
- [P in keyof E as IfNotificationParametersSignature<E[P], P, never>]: E[P];
51
- };
52
- /**
53
- * Converts a notification subscriber signature into parameters signature
54
- * (by removing the `sender: Attendee` parameter).
55
- *
56
- * @remarks
57
- * No attempt is made to validate that the original signature is valid with
58
- * all parameters being JSON-serializable.
59
- *
60
- * @system
61
- */
62
- type NotificationParametersSignatureFromSubscriberSignature<Event> = Event extends (sender: Attendee, ...args: infer P) => void ? (...args: P) => void : never;
63
- /**
64
- * Used to specify the kinds of notifications handled by a {@link NotificationListenable}
65
- * by describing the subscriber signatures.
66
- *
67
- * @remarks
68
- *
69
- * Any object type is a valid NotificationListenersWithSubscriberSignatures,
70
- * but only the notification-like properties of that type will be included.
71
- *
72
- * @example
73
- *
74
- * ```typescript
75
- * interface MyNotifications {
76
- * load: (sender: Attendee, user: string, data: IUserData) => void;
77
- * requestPause: (sender: Attendee, period: number) => void;
78
- * }
79
- * ```
80
- *
81
- * @system
82
- */
83
- type NotificationListenersWithSubscriberSignatures<E> = {
84
- [P in keyof E as IfNotificationSubscriberSignature<E[P], P, never>]: E[P];
85
- };
86
- /**
87
- * Converts a record of notification subscriber signatures into
88
- * a record of base parameter signatures (which are the canonical form).
89
- *
90
- * @system
91
- */
92
- type NotificationListenersFromSubscriberSignatures<E extends NotificationListenersWithSubscriberSignatures<E>> = {
93
- [K in keyof NotificationListenersWithSubscriberSignatures<E>]: NotificationParametersSignatureFromSubscriberSignature<E[K]>;
94
- } extends infer TListeners ? NotificationListeners<TListeners> : never;
95
- /**
96
- * {@link @fluidframework/core-interfaces#JsonDeserialized} version of the parameters of a function.
97
- *
98
- * @system
99
- */
100
- type JsonDeserializedParameters<T extends (...args: any[]) => unknown> = T extends (...args: infer P) => unknown ? JsonDeserialized<P> : never;
101
- /**
102
- * {@link @fluidframework/core-interfaces#JsonSerializable} version of the parameters of a function.
103
- *
104
- * @system
105
- */
106
- type JsonSerializableParameters<T extends (...args: any[]) => unknown> = T extends (...args: infer P) => unknown ? JsonSerializable<P> : never;
107
- }
108
- //# sourceMappingURL=exposedUtilityTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exposedUtilityTypes.d.ts","sourceRoot":"","sources":["../src/exposedUtilityTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,kCAAkC,EAClC,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,8DAA8D,CAAC;AAEtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C;;;;;;GAMG;AAEH,yBAAiB,oBAAoB,CAAC;IACrC;;;;;OAKG;IACH,KAAY,iCAAiC,CAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,IAC3E,KAAK,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,IAAI,GACrC,kCAAkC,CAAC,UAAU,CAC7C,CAAC,EACD,gBAAgB,CAAC,CAAC,CAAC,EACnB,iBAAiB,EACjB,IAAI,CACJ,GACA,IAAI,CAAC;IAET;;;;;OAKG;IACH,KAAY,iCAAiC,CAAC,KAAK,EAAE,YAA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I,CAAC,SAAS,CACzF,GAAG,IAAI,EAAE,MAAM,CAAC,KACZ,OAAO,GACT,gBAAgB,CAAC,CAAC,CAAC,GACnB,KAAK,CAAC;IAET;;;;OAIG;IACH,KAAY,0BAA0B,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,IAAI,CAAC,SAAS,CACzF,GAAG,IAAI,EAAE,MAAM,CAAC,KACZ,OAAO,GACT,gBAAgB,CAAC,CAAC,CAAC,GACnB,KAAK,CAAC;CACT"}
@@ -1,7 +0,0 @@
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
- //# sourceMappingURL=exposedUtilityTypes.js.map
@@ -1 +0,0 @@
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\tInternalCoreInterfacesUtilityTypes,\n\tJsonDeserialized,\n\tJsonSerializable,\n} from \"@fluidframework/core-interfaces/internal/exposedUtilityTypes\";\n\nimport type { Attendee } from \"./presence.js\";\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 * Yields `IfParametersValid` when the given type is an acceptable shape for a\n\t * notification. `Else` otherwise.\n\t *\n\t * @system\n\t */\n\texport type IfNotificationParametersSignature<Event, IfParametersValid, Else> =\n\t\tEvent extends (...args: infer P) => void\n\t\t\t? InternalCoreInterfacesUtilityTypes.IfSameType<\n\t\t\t\t\tP,\n\t\t\t\t\tJsonSerializable<P>,\n\t\t\t\t\tIfParametersValid,\n\t\t\t\t\tElse\n\t\t\t\t>\n\t\t\t: Else;\n\n\t/**\n\t * Yields `IfSubscriber` when the given type is an acceptable shape for a notification\n\t * listener (subscriber) function. `Else` otherwise.\n\t *\n\t * @system\n\t */\n\texport type IfNotificationSubscriberSignature<Event, IfSubscriber, Else> = Event extends (\n\t\tsender: Attendee,\n\t\t...args: infer P\n\t) => void\n\t\t? InternalCoreInterfacesUtilityTypes.IfSameType<P, JsonSerializable<P>, IfSubscriber, Else>\n\t\t: Else;\n\n\t/**\n\t * Used to specify the kinds of notifications handled by a {@link NotificationListenable}\n\t * by describing the custom parameters in a function signature.\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 keyof E as IfNotificationParametersSignature<E[P], P, never>]: E[P];\n\t};\n\n\t/**\n\t * Converts a notification subscriber signature into parameters signature\n\t * (by removing the `sender: Attendee` parameter).\n\t *\n\t * @remarks\n\t * No attempt is made to validate that the original signature is valid with\n\t * all parameters being JSON-serializable.\n\t *\n\t * @system\n\t */\n\texport type NotificationParametersSignatureFromSubscriberSignature<Event> = Event extends (\n\t\tsender: Attendee,\n\t\t...args: infer P\n\t) => void\n\t\t? (...args: P) => void\n\t\t: never;\n\n\t/**\n\t * Used to specify the kinds of notifications handled by a {@link NotificationListenable}\n\t * by describing the subscriber signatures.\n\t *\n\t * @remarks\n\t *\n\t * Any object type is a valid NotificationListenersWithSubscriberSignatures,\n\t * but only the notification-like properties of that type will be included.\n\t *\n\t * @example\n\t *\n\t * ```typescript\n\t * interface MyNotifications {\n\t * load: (sender: Attendee, user: string, data: IUserData) => void;\n\t * requestPause: (sender: Attendee, period: number) => void;\n\t * }\n\t * ```\n\t *\n\t * @system\n\t */\n\texport type NotificationListenersWithSubscriberSignatures<E> = {\n\t\t[P in keyof E as IfNotificationSubscriberSignature<E[P], P, never>]: E[P];\n\t};\n\n\t/**\n\t * Converts a record of notification subscriber signatures into\n\t * a record of base parameter signatures (which are the canonical form).\n\t *\n\t * @system\n\t */\n\texport type NotificationListenersFromSubscriberSignatures<\n\t\tE extends NotificationListenersWithSubscriberSignatures<E>,\n\t> = {\n\t\t[K in keyof NotificationListenersWithSubscriberSignatures<E>]: NotificationParametersSignatureFromSubscriberSignature<\n\t\t\tE[K]\n\t\t>;\n\t} extends infer TListeners\n\t\t? // Additional filter is needed to convince TypeScript that the result is NotificationListeners shape\n\t\t\tNotificationListeners<TListeners>\n\t\t: never;\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[]) => unknown> = T extends (\n\t\t...args: infer P\n\t) => unknown\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[]) => unknown> = T extends (\n\t\t...args: infer P\n\t) => unknown\n\t\t? JsonSerializable<P>\n\t\t: never;\n}\n"]}
@@ -1,125 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { DeepReadonly, InternalCoreInterfacesUtilityTypes, JsonDeserialized, JsonSerializable, OpaqueJsonDeserialized, OpaqueJsonSerializable } from "@fluidframework/core-interfaces/internal";
6
- import type { ValidatableOptionalState, ValidatableRequiredState } from "./validatableTypes.js";
7
- /**
8
- * Returns union of types of values in a record.
9
- */
10
- export type RecordEntryTypes<T> = T[keyof T];
11
- type MapNumberIndicesToStrings<T> = {
12
- [K in keyof T as K extends number ? `${K}` : K]: T[K];
13
- };
14
- type KeyValuePairs<T> = {
15
- [K in keyof MapNumberIndicesToStrings<Required<T>>]: [K, Required<T>[K]];
16
- }[keyof MapNumberIndicesToStrings<Required<T>>][];
17
- type RequiredAndNotUndefined<T> = {
18
- [K in keyof T]-?: Exclude<T[K], undefined>;
19
- };
20
- /**
21
- * Object.entries retyped to preserve known keys and their types.
22
- *
23
- * @privateRemarks
24
- * The is a defect in this utility when a string index appears in the object.
25
- * In such a case, the only result is `[string, T]`, where `T` is the type
26
- * of the string index entry.
27
- */
28
- export declare const objectEntries: <const T>(o: T) => KeyValuePairs<T>;
29
- /**
30
- * Object.entries retyped to preserve known keys and their types.
31
- *
32
- * @remarks
33
- * Given `T` should not contain `undefined` values. If it does, use
34
- * {@link objectEntries} instead. Without `undefined` values, this
35
- * typing provides best handling of objects with optional properties.
36
- */
37
- export declare const objectEntriesWithoutUndefined: <const T>(o: T) => KeyValuePairs<RequiredAndNotUndefined<T>>;
38
- /**
39
- * Object.keys retyped to preserve known keys and their types.
40
- */
41
- export declare const objectKeys: <const T>(o: T) => (keyof MapNumberIndicesToStrings<T>)[];
42
- /**
43
- * Retrieve a value from a record with the given key, or create a new entry if
44
- * the key is not in the record.
45
- *
46
- * @param record - The record to index/update
47
- * @param key - The key to lookup in the record
48
- * @param defaultValue - a function which returns a default value. This is
49
- * called and used to set an initial value for the given key in the record if
50
- * none exists.
51
- * @returns either the existing value for the given key, or the newly-created
52
- * value (the result of `defaultValue`)
53
- */
54
- export declare function getOrCreateRecord<const K extends string | number | symbol, const V>(record: Record<K, V>, key: K, defaultValue: (key: K) => V): V;
55
- /**
56
- * No-runtime-effect helper to apply deep immutability to a value's type.
57
- */
58
- export declare function asDeeplyReadonly<T>(value: T): DeepReadonly<T>;
59
- export declare function asDeeplyReadonlyDeserializedJson<T>(value: OpaqueJsonDeserialized<T>): DeepReadonly<JsonDeserialized<T>>;
60
- export declare function asDeeplyReadonlyDeserializedJson<T>(value: OpaqueJsonDeserialized<T> | undefined): DeepReadonly<JsonDeserialized<T>> | undefined;
61
- /**
62
- * Conditional type that reveals the underlying JSON type of an opaque JSON value. If `T` is an object, the key values
63
- * will be revealed.
64
- */
65
- type RevealOpaqueJsonDeserialized<T> = T extends OpaqueJsonDeserialized<infer U> ? JsonDeserialized<U> : {
66
- [Key in keyof T]: RevealOpaqueJsonDeserialized<T[Key]>;
67
- };
68
- /**
69
- * No-runtime-effect helper to reveal the JSON type from a value's opaque JSON
70
- * types throughout a structure.
71
- *
72
- * @remarks
73
- * {@link OpaqueJsonDeserialized} instances will be replaced shallowly such
74
- * that nested instances are retained.
75
- */
76
- export declare function revealOpaqueJson<T>(value: T): RevealOpaqueJsonDeserialized<T>;
77
- /**
78
- * No-runtime-effect helper to automatically cast JSON type to Opaque JSON type
79
- * at outermost scope.
80
- *
81
- * @remarks
82
- * Types that satisfy {@link JsonSerializable} may also be deserialized. Thus,
83
- * the return type is both {@link OpaqueJsonSerializable} and
84
- * {@link OpaqueJsonDeserialized}.
85
- */
86
- export declare function toOpaqueJson<const T>(value: JsonSerializable<T>): OpaqueJsonSerializable<T> & OpaqueJsonDeserialized<T>;
87
- /**
88
- * Convert a union of types to an intersection of those types.
89
- *
90
- * @privateRemarks
91
- * First an always true extends clause is used (T extends T) to distribute T
92
- * into to a union of types contravariant over each member of the T union.
93
- * Then the constraint on the type parameter in this new context is inferred,
94
- * giving the intersection.
95
- *
96
- * Future: This definition is identical to one in `packages/dds/tree/src/util/typeUtils.ts`
97
- * and should be consolidated.
98
- */
99
- type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) extends (k: infer U) => unknown ? U : never;
100
- /**
101
- * Generates a union of types that are the remainder from a simple
102
- * Pick combination (that is the set of common properties).
103
- */
104
- type PickRemainder<T> = Pick<T, keyof T> extends infer Common ? T extends unknown ? Omit<T, keyof Common> : never : never;
105
- /**
106
- * Combines union of structure into a single structure where common properties
107
- * are unions of their respective types and optional properties are defined for
108
- * properties that are not common to each union member.
109
- *
110
- * @remarks
111
- * If a property is common to multiple, but not all union member and the
112
- * types are incompatible, the resulting type will be `never` for that
113
- * property. (This can be fixed, but might be best addressed by changing
114
- * T to be a tuple of types to be combined.)
115
- */
116
- export type FlattenUnionWithOptionals<T> = InternalCoreInterfacesUtilityTypes.FlattenIntersection<Pick<T, keyof T> & UnionToIntersection<Partial<PickRemainder<T>>>>;
117
- /**
118
- * Type guard to check if a state is a required state (has a value).
119
- *
120
- * @param state - The state to check
121
- * @returns True if the state has a value and is therefore a {@link ValidatableRequiredState}
122
- */
123
- export declare function isValueRequiredState<T>(state: ValidatableRequiredState<T> | ValidatableOptionalState<T>): state is ValidatableRequiredState<T>;
124
- export {};
125
- //# sourceMappingURL=internalUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internalUtils.d.ts","sourceRoot":"","sources":["../src/internalUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,YAAY,EACZ,kCAAkC,EAClC,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,EACX,wBAAwB,EACxB,wBAAwB,EACxB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE7C,KAAK,yBAAyB,CAAC,CAAC,IAAI;KAClC,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrD,CAAC;AAEF,KAAK,aAAa,CAAC,CAAC,IAAI;KACtB,CAAC,IAAI,MAAM,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACxE,CAAC,MAAM,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAA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