@pluv/react 0.35.3 → 0.36.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.
@@ -1,18 +1,18 @@
1
1
 
2
- > @pluv/react@0.35.3 build /home/runner/work/pluv/pluv/packages/react
2
+ > @pluv/react@0.36.0 build /home/runner/work/pluv/pluv/packages/react
3
3
  > tsup src/index.ts --format esm,cjs --dts --external react
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.3.6
7
+ CLI tsup v8.4.0
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- CJS dist/index.js 13.98 KB
12
- CJS ⚡️ Build success in 115ms
13
- ESM dist/index.mjs 11.50 KB
14
- ESM ⚡️ Build success in 122ms
11
+ CJS dist/index.js 13.74 KB
12
+ CJS ⚡️ Build success in 85ms
13
+ ESM dist/index.mjs 11.36 KB
14
+ ESM ⚡️ Build success in 87ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 6695ms
17
- DTS dist/index.d.mts 5.58 KB
18
- DTS dist/index.d.ts 5.58 KB
16
+ DTS ⚡️ Build success in 6330ms
17
+ DTS dist/index.d.mts 5.39 KB
18
+ DTS dist/index.d.ts 5.39 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @pluv/react
2
2
 
3
+ ## 0.36.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2a84951: **BREAKING**
8
+
9
+ Removed re-exports of `@pluv/client` and `@pluv/crdt` parts from `@pluv/react`.
10
+
11
+ ```ts
12
+ // Before
13
+
14
+ import { createBundle, createClient } from "@pluv/react";
15
+
16
+ // After
17
+
18
+ import { createClient } from "@pluv/client";
19
+ import { createBundle } from "@pluv/react";
20
+ ```
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [4518b6d]
25
+ - @pluv/client@0.36.0
26
+ - @pluv/crdt@0.36.0
27
+ - @pluv/types@0.36.0
28
+
29
+ ## 0.35.4
30
+
31
+ ### Patch Changes
32
+
33
+ - @pluv/client@0.35.4
34
+ - @pluv/crdt@0.35.4
35
+ - @pluv/types@0.35.4
36
+
3
37
  ## 0.35.3
4
38
 
5
39
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,10 +1,7 @@
1
- import { PluvRoomDebug, PluvRouterEventConfig, MergeEvents, PluvClient, WebSocketConnection, UserInfo, AbstractRoom, MockedRoomEvents, PluvRoomAddon, PluvRouter } from '@pluv/client';
2
- export { ConnectionState, createClient, register } from '@pluv/client';
1
+ import { PluvRouterEventConfig, PluvClient, PluvRoomAddon, PluvRouter, MockedRoomEvents, MergeEvents, PluvRoomDebug, WebSocketConnection, UserInfo, AbstractRoom } from '@pluv/client';
3
2
  import { CrdtType, AbstractCrdtDoc, InferCrdtJson } from '@pluv/crdt';
4
- export { CrdtType, InferCrdtJson } from '@pluv/crdt';
5
3
  import { IOLike, JsonObject, InferIOOutput, Id, IOEventMessage, InferIOInput } from '@pluv/types';
6
- export { BaseUser, EventMessage, EventRecord, IOEventMessage } from '@pluv/types';
7
- import { ReactNode, FC, Dispatch } from 'react';
4
+ import { FC, ReactNode, Dispatch } from 'react';
8
5
 
9
6
  interface PluvProviderProps {
10
7
  children?: ReactNode;
@@ -21,7 +18,7 @@ type BaseRoomProviderProps<TPresence extends JsonObject, TStorage extends Record
21
18
  type MockedRoomProviderProps<TIO extends IOLike, TPresence extends JsonObject, TStorage extends Record<string, CrdtType<any, any>>, TEvents extends PluvRouterEventConfig<TIO, TPresence, TStorage> = {}> = BaseRoomProviderProps<TPresence, TStorage> & {
22
19
  events?: MockedRoomEvents<MergeEvents<TEvents, TIO>>;
23
20
  };
24
- type PluvRoomProviderProps<TIO extends IOLike, TMetadata extends JsonObject, TPresence extends JsonObject, TStorage extends Record<string, CrdtType<any, any>>> = BaseRoomProviderProps<TPresence, TStorage> & {
21
+ type PluvRoomProviderProps<TIO extends IOLike<any, any>, TMetadata extends JsonObject, TPresence extends JsonObject, TStorage extends Record<string, CrdtType<any, any>>> = BaseRoomProviderProps<TPresence, TStorage> & {
25
22
  debug?: boolean | PluvRoomDebug<TIO>;
26
23
  onAuthorizationFail?: (error: Error) => void;
27
24
  } & (keyof TMetadata extends never ? {
package/dist/index.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- import { PluvRoomDebug, PluvRouterEventConfig, MergeEvents, PluvClient, WebSocketConnection, UserInfo, AbstractRoom, MockedRoomEvents, PluvRoomAddon, PluvRouter } from '@pluv/client';
2
- export { ConnectionState, createClient, register } from '@pluv/client';
1
+ import { PluvRouterEventConfig, PluvClient, PluvRoomAddon, PluvRouter, MockedRoomEvents, MergeEvents, PluvRoomDebug, WebSocketConnection, UserInfo, AbstractRoom } from '@pluv/client';
3
2
  import { CrdtType, AbstractCrdtDoc, InferCrdtJson } from '@pluv/crdt';
4
- export { CrdtType, InferCrdtJson } from '@pluv/crdt';
5
3
  import { IOLike, JsonObject, InferIOOutput, Id, IOEventMessage, InferIOInput } from '@pluv/types';
6
- export { BaseUser, EventMessage, EventRecord, IOEventMessage } from '@pluv/types';
7
- import { ReactNode, FC, Dispatch } from 'react';
4
+ import { FC, ReactNode, Dispatch } from 'react';
8
5
 
9
6
  interface PluvProviderProps {
10
7
  children?: ReactNode;
@@ -21,7 +18,7 @@ type BaseRoomProviderProps<TPresence extends JsonObject, TStorage extends Record
21
18
  type MockedRoomProviderProps<TIO extends IOLike, TPresence extends JsonObject, TStorage extends Record<string, CrdtType<any, any>>, TEvents extends PluvRouterEventConfig<TIO, TPresence, TStorage> = {}> = BaseRoomProviderProps<TPresence, TStorage> & {
22
19
  events?: MockedRoomEvents<MergeEvents<TEvents, TIO>>;
23
20
  };
24
- type PluvRoomProviderProps<TIO extends IOLike, TMetadata extends JsonObject, TPresence extends JsonObject, TStorage extends Record<string, CrdtType<any, any>>> = BaseRoomProviderProps<TPresence, TStorage> & {
21
+ type PluvRoomProviderProps<TIO extends IOLike<any, any>, TMetadata extends JsonObject, TPresence extends JsonObject, TStorage extends Record<string, CrdtType<any, any>>> = BaseRoomProviderProps<TPresence, TStorage> & {
25
22
  debug?: boolean | PluvRoomDebug<TIO>;
26
23
  onAuthorizationFail?: (error: Error) => void;
27
24
  } & (keyof TMetadata extends never ? {
package/dist/index.js CHANGED
@@ -30,13 +30,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
- ConnectionState: () => import_client2.ConnectionState,
34
- createBundle: () => createBundle,
35
- createClient: () => import_client2.createClient,
36
- register: () => import_client2.register
33
+ createBundle: () => createBundle
37
34
  });
38
35
  module.exports = __toCommonJS(index_exports);
39
- var import_client2 = require("@pluv/client");
40
36
 
41
37
  // src/createBundle.tsx
42
38
  var import_client = require("@pluv/client");
@@ -398,8 +394,5 @@ var createBundle = (client, options = {}) => {
398
394
  };
399
395
  // Annotate the CommonJS export names for ESM import in node:
400
396
  0 && (module.exports = {
401
- ConnectionState,
402
- createBundle,
403
- createClient,
404
- register
397
+ createBundle
405
398
  });
package/dist/index.mjs CHANGED
@@ -1,6 +1,3 @@
1
- // src/index.ts
2
- import { ConnectionState, createClient, register } from "@pluv/client";
3
-
4
1
  // src/createBundle.tsx
5
2
  import { MockedRoom } from "@pluv/client";
6
3
  import fastDeepEqual from "fast-deep-equal";
@@ -360,8 +357,5 @@ var createBundle = (client, options = {}) => {
360
357
  };
361
358
  };
362
359
  export {
363
- ConnectionState,
364
- createBundle,
365
- createClient,
366
- register
360
+ createBundle
367
361
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/react",
3
- "version": "0.35.3",
3
+ "version": "0.36.0",
4
4
  "description": "@pluv/client React.js bindings",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -18,22 +18,22 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "fast-deep-equal": "^3.1.3",
21
- "@pluv/client": "^0.35.3",
22
- "@pluv/crdt": "^0.35.3",
23
- "@pluv/types": "^0.35.3"
21
+ "@pluv/client": "^0.36.0",
22
+ "@pluv/crdt": "^0.36.0",
23
+ "@pluv/types": "^0.36.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@types/react": "^18.0.0 || ^19.0.0",
27
27
  "react": "^18.0.0 || ^19.0.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@types/react": "^19.0.8",
30
+ "@types/react": "^19.0.10",
31
31
  "eslint": "^8.57.1",
32
32
  "react": "^19.0.0",
33
- "tsup": "^8.3.6",
33
+ "tsup": "^8.4.0",
34
34
  "typescript": "^5.7.3",
35
- "@pluv/tsconfig": "^0.35.3",
36
- "eslint-config-pluv": "^0.35.3"
35
+ "@pluv/tsconfig": "^0.36.0",
36
+ "eslint-config-pluv": "^0.36.0"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "tsup src/index.ts --format esm,cjs --dts --external react",
@@ -39,7 +39,7 @@ export type MockedRoomProviderProps<
39
39
  };
40
40
 
41
41
  export type PluvRoomProviderProps<
42
- TIO extends IOLike,
42
+ TIO extends IOLike<any, any>,
43
43
  TMetadata extends JsonObject,
44
44
  TPresence extends JsonObject,
45
45
  TStorage extends Record<string, CrdtType<any, any>>,
package/src/index.ts CHANGED
@@ -1,6 +1,3 @@
1
- export { ConnectionState, createClient, register } from "@pluv/client";
2
- export type { CrdtType, InferCrdtJson } from "@pluv/crdt";
3
- export type { BaseUser, EventMessage, EventRecord, IOEventMessage } from "@pluv/types";
4
1
  export { createBundle } from "./createBundle";
5
2
  export type {
6
3
  CreateBundle,