@inditextech/weave-react 0.2.0 → 0.2.1

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/react.cjs CHANGED
@@ -25,6 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  const react = __toESM(require("react"));
26
26
  const __inditextech_weave_sdk = __toESM(require("@inditextech/weave-sdk"));
27
27
  require("konva");
28
+ require("yjs");
28
29
 
29
30
  //#region ../types/dist/types.js
30
31
  const WEAVE_INSTANCE_STATUS = {
package/dist/react.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import Konva from "konva";
3
3
  import { Vector2d } from "konva/lib/types";
4
- import { MappedTypeDescription } from "@syncedstore/core/types/doc";
4
+ import * as Y from "yjs";
5
5
  import { Doc } from "yjs";
6
6
  import Emittery from "emittery";
7
7
  import pino, { Logger } from "pino";
@@ -154,7 +154,11 @@ type WeaveCallbacks$1 = {
154
154
  onStateChange?: (state: WeaveState$1) => void;
155
155
  onUndoManagerStatusChange?: (undoManagerStatus: WeaveUndoRedoChange$1) => void;
156
156
  };
157
-
157
+ declare type docElementTypeDescription = "xml" | "text" | Array<any> | object;
158
+ declare type DocTypeDescription = {
159
+ [key: string]: docElementTypeDescription;
160
+ };
161
+ declare type MappedTypeDescription<T extends DocTypeDescription> = { readonly [P in keyof T]: T[P] extends "xml" ? Y.XmlFragment : T[P] extends "text" ? Y.Text : T[P] extends Array<any> ? T[P] : T[P] extends object ? Partial<T[P]> : never };
158
162
  //#endregion
159
163
  //#region src/base/node.d.ts
160
164
  interface WeaveNodeBase {
@@ -516,8 +520,6 @@ type WeaveCallbacks = {
516
520
 
517
521
  //#endregion
518
522
  //#region src/components/provider.d.ts
519
- //#endregion
520
- //#region src/base/node.d.ts
521
523
  type WeaveProviderType = {
522
524
  containerId: string;
523
525
  getUser: () => WeaveUser;
package/dist/react.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  import Konva from "konva";
3
- import { Vector2d } from "konva/lib/types";
4
- import { MappedTypeDescription } from "@syncedstore/core/types/doc";
3
+ import * as Y from "yjs";
5
4
  import { Doc } from "yjs";
5
+ import { Vector2d } from "konva/lib/types";
6
6
  import Emittery from "emittery";
7
7
  import pino, { Logger } from "pino";
8
8
  import { StageConfig } from "konva/lib/Stage";
@@ -154,7 +154,11 @@ type WeaveCallbacks$1 = {
154
154
  onStateChange?: (state: WeaveState$1) => void;
155
155
  onUndoManagerStatusChange?: (undoManagerStatus: WeaveUndoRedoChange$1) => void;
156
156
  };
157
-
157
+ declare type docElementTypeDescription = "xml" | "text" | Array<any> | object;
158
+ declare type DocTypeDescription = {
159
+ [key: string]: docElementTypeDescription;
160
+ };
161
+ declare type MappedTypeDescription<T extends DocTypeDescription> = { readonly [P in keyof T]: T[P] extends "xml" ? Y.XmlFragment : T[P] extends "text" ? Y.Text : T[P] extends Array<any> ? T[P] : T[P] extends object ? Partial<T[P]> : never };
158
162
  //#endregion
159
163
  //#region src/base/node.d.ts
160
164
  interface WeaveNodeBase {
@@ -516,8 +520,6 @@ type WeaveCallbacks = {
516
520
 
517
521
  //#endregion
518
522
  //#region src/components/provider.d.ts
519
- //#endregion
520
- //#region src/base/node.d.ts
521
523
  type WeaveProviderType = {
522
524
  containerId: string;
523
525
  getUser: () => WeaveUser;
package/dist/react.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { Weave, WeaveConnectedUsersPlugin, WeaveCopyPasteNodesPlugin, WeaveNodesSelectionPlugin, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveUsersPointersPlugin } from "@inditextech/weave-sdk";
3
3
  import Konva from "konva";
4
+ import "yjs";
4
5
 
5
6
  //#region ../types/dist/types.js
6
7
  const WEAVE_INSTANCE_STATUS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inditextech/weave-react",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Jesus Manuel Piñeiro Cid <jesusmpc@inditex.com>",
@@ -43,7 +43,7 @@
43
43
  "version:release": "npm version $RELEASE_VERSION -m \"[npm-scripts] prepare release $RELEASE_VERSION\" --tag-version-prefix \"\""
44
44
  },
45
45
  "dependencies": {
46
- "@inditextech/weave-sdk": "0.2.0",
46
+ "@inditextech/weave-sdk": "0.2.1",
47
47
  "@syncedstore/core": "0.6.0",
48
48
  "konva": "9.3.20",
49
49
  "yjs": "13.6.26"