@hocuspocus/common 4.0.0-rc.6 → 4.0.0-rc.7

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/dist/index.d.ts CHANGED
@@ -1,40 +1,5 @@
1
- //#region node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.d.ts
2
- /**
3
- * A BinaryEncoder handles the encoding to an Uint8Array.
4
- */
5
- declare class Encoder {
6
- cpos: number;
7
- cbuf: Uint8Array<ArrayBuffer>;
8
- /**
9
- * @type {Array<Uint8Array>}
10
- */
11
- bufs: Array<Uint8Array>;
12
- }
13
- //#endregion
14
- //#region node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.d.ts
15
- /**
16
- * A Decoder handles the decoding of an Uint8Array.
17
- * @template {ArrayBufferLike} [Buf=ArrayBufferLike]
18
- */
19
- declare class Decoder<Buf extends ArrayBufferLike = ArrayBufferLike> {
20
- /**
21
- * @param {Uint8Array<Buf>} uint8Array Binary data to decode
22
- */
23
- constructor(uint8Array: Uint8Array<Buf>);
24
- /**
25
- * Decoding target.
26
- *
27
- * @type {Uint8Array<Buf>}
28
- */
29
- arr: Uint8Array<Buf>;
30
- /**
31
- * Current decoding position.
32
- *
33
- * @type {number}
34
- */
35
- pos: number;
36
- }
37
- //#endregion
1
+ import * as encoding from "lib0/encoding";
2
+ import * as decoding from "lib0/decoding";
38
3
  //#region packages/provider/src/types.d.ts
39
4
  type AuthorizedScope = "read-write" | "readonly";
40
5
  //#endregion
@@ -44,11 +9,11 @@ declare enum AuthMessageType {
44
9
  PermissionDenied = 1,
45
10
  Authenticated = 2
46
11
  }
47
- declare const writeAuthentication: (encoder: Encoder, auth: string) => void;
48
- declare const writePermissionDenied: (encoder: Encoder, reason: string) => void;
49
- declare const writeAuthenticated: (encoder: Encoder, scope: AuthorizedScope) => void;
50
- declare const writeTokenSyncRequest: (encoder: Encoder) => void;
51
- declare const readAuthMessage: (decoder: Decoder, sendToken: () => void, permissionDeniedHandler: (reason: string) => void, authenticatedHandler: (scope: string) => void) => void;
12
+ declare const writeAuthentication: (encoder: encoding.Encoder, auth: string) => void;
13
+ declare const writePermissionDenied: (encoder: encoding.Encoder, reason: string) => void;
14
+ declare const writeAuthenticated: (encoder: encoding.Encoder, scope: AuthorizedScope) => void;
15
+ declare const writeTokenSyncRequest: (encoder: encoding.Encoder) => void;
16
+ declare const readAuthMessage: (decoder: decoding.Decoder, sendToken: () => void, permissionDeniedHandler: (reason: string) => void, authenticatedHandler: (scope: string) => void) => void;
52
17
  //#endregion
53
18
  //#region packages/common/src/CloseEvents.d.ts
54
19
  interface CloseEvent {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hocuspocus/common",
3
3
  "description": "shared code for multiple Hocuspocus packages",
4
- "version": "4.0.0-rc.6",
4
+ "version": "4.0.0-rc.7",
5
5
  "homepage": "https://hocuspocus.dev",
6
6
  "keywords": [
7
7
  "hocuspocus"
@@ -25,7 +25,7 @@
25
25
  "src",
26
26
  "dist"
27
27
  ],
28
- "gitHead": "f8b039aea9d9c7f5b80b2cbb82381e2153ef8dc0",
28
+ "gitHead": "d214278ee34bd1d776054cdc2a2227e3f05449d7",
29
29
  "dependencies": {
30
30
  "lib0": "^0.2.87"
31
31
  },