@liveblocks/react-lexical 1.12.0-lexical3 → 1.12.0-lexical6

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 (36) hide show
  1. package/dist/comments/comment-plugin-provider.js +2 -2
  2. package/dist/comments/comment-plugin-provider.js.map +1 -1
  3. package/dist/comments/comment-plugin-provider.mjs +2 -2
  4. package/dist/comments/comment-plugin-provider.mjs.map +1 -1
  5. package/dist/comments/thread-mark-node.js +1 -16
  6. package/dist/comments/thread-mark-node.js.map +1 -1
  7. package/dist/comments/thread-mark-node.mjs +1 -16
  8. package/dist/comments/thread-mark-node.mjs.map +1 -1
  9. package/dist/index.d.mts +61 -0
  10. package/dist/liveblocks-config.js +3 -3
  11. package/dist/liveblocks-config.js.map +1 -1
  12. package/dist/liveblocks-config.mjs +2 -2
  13. package/dist/liveblocks-config.mjs.map +1 -1
  14. package/dist/mentions/avatar.js +1 -1
  15. package/dist/mentions/avatar.js.map +1 -1
  16. package/dist/mentions/avatar.mjs +1 -1
  17. package/dist/mentions/avatar.mjs.map +1 -1
  18. package/dist/mentions/mention-node.js +16 -9
  19. package/dist/mentions/mention-node.js.map +1 -1
  20. package/dist/mentions/mention-node.mjs +16 -9
  21. package/dist/mentions/mention-node.mjs.map +1 -1
  22. package/dist/mentions/mention-plugin.js +35 -8
  23. package/dist/mentions/mention-plugin.js.map +1 -1
  24. package/dist/mentions/mention-plugin.mjs +36 -9
  25. package/dist/mentions/mention-plugin.mjs.map +1 -1
  26. package/dist/mentions/user.js +2 -2
  27. package/dist/mentions/user.js.map +1 -1
  28. package/dist/mentions/user.mjs +2 -2
  29. package/dist/mentions/user.mjs.map +1 -1
  30. package/dist/version.js +1 -1
  31. package/dist/version.mjs +1 -1
  32. package/package.json +16 -8
  33. package/src/styles/index.css +12 -0
  34. package/styles.css +1 -0
  35. package/styles.css.d.ts +1 -0
  36. package/styles.css.map +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"user.mjs","sources":["../../src/mentions/user.tsx"],"sourcesContent":["import { useSharedContextBundle } from \"@liveblocks/react\";\nimport type { HTMLAttributes } from \"react\";\nimport React, { forwardRef } from \"react\";\n\nexport interface UserProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> {\n userId: string;\n}\n\nconst User = forwardRef<HTMLSpanElement, UserProps>(\n function User(props, forwardedRef) {\n const { userId, ...spanProps } = props;\n const { useUser } = useSharedContextBundle();\n\n const { user, isLoading } = useUser(userId);\n\n const name = user === undefined ? \"Anonymous\" : user.name;\n\n return (\n <span\n data-loading={isLoading ? \"\" : undefined}\n {...spanProps}\n ref={forwardedRef}\n >\n {isLoading ? null : name}\n </span>\n );\n }\n);\n\nexport default User;\n"],"names":["User","React"],"mappings":";;;AASA,MAAM,IAAO,GAAA,UAAA;AAAA,EACX,SAASA,KAAK,CAAA,KAAA,EAAO,YAAc,EAAA;AACjC,IAAM,MAAA,EAAE,MAAW,EAAA,GAAA,SAAA,EAAc,GAAA,KAAA,CAAA;AACjC,IAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,sBAAuB,EAAA,CAAA;AAE3C,IAAA,MAAM,EAAE,IAAA,EAAM,SAAU,EAAA,GAAI,QAAQ,MAAM,CAAA,CAAA;AAE1C,IAAA,MAAM,IAAO,GAAA,IAAA,KAAS,KAAY,CAAA,GAAA,WAAA,GAAc,IAAK,CAAA,IAAA,CAAA;AAErD,IAAA,uBACGC,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,MACC,cAAA,EAAc,YAAY,EAAK,GAAA,KAAA,CAAA;AAAA,MAC9B,GAAG,SAAA;AAAA,MACJ,GAAK,EAAA,YAAA;AAAA,KAEJ,EAAA,SAAA,GAAY,OAAO,IACtB,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
1
+ {"version":3,"file":"user.mjs","sources":["../../src/mentions/user.tsx"],"sourcesContent":["import { useSharedContextBundle } from \"@liveblocks/react\";\nimport type { HTMLAttributes } from \"react\";\nimport React, { forwardRef } from \"react\";\n\nexport interface UserProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, \"children\"> {\n userId: string;\n}\n\nexport const User = forwardRef<HTMLSpanElement, UserProps>(\n function User(props, forwardedRef) {\n const { userId, ...spanProps } = props;\n const { useUser } = useSharedContextBundle();\n\n const { user, isLoading } = useUser(userId);\n\n const name = user === undefined || user === null ? \"Anonymous\" : user.name;\n\n return (\n <span\n data-loading={isLoading ? \"\" : undefined}\n {...spanProps}\n ref={forwardedRef}\n >\n {isLoading ? null : name}\n </span>\n );\n }\n);\n"],"names":["User","React"],"mappings":";;;AASO,MAAM,IAAO,GAAA,UAAA;AAAA,EAClB,SAASA,KAAK,CAAA,KAAA,EAAO,YAAc,EAAA;AACjC,IAAM,MAAA,EAAE,MAAW,EAAA,GAAA,SAAA,EAAc,GAAA,KAAA,CAAA;AACjC,IAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,sBAAuB,EAAA,CAAA;AAE3C,IAAA,MAAM,EAAE,IAAA,EAAM,SAAU,EAAA,GAAI,QAAQ,MAAM,CAAA,CAAA;AAE1C,IAAA,MAAM,OAAO,IAAS,KAAA,KAAA,CAAA,IAAa,IAAS,KAAA,IAAA,GAAO,cAAc,IAAK,CAAA,IAAA,CAAA;AAEtE,IAAA,uBACGC,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,MACC,cAAA,EAAc,YAAY,EAAK,GAAA,KAAA,CAAA;AAAA,MAC9B,GAAG,SAAA;AAAA,MACJ,GAAK,EAAA,YAAA;AAAA,KAEJ,EAAA,SAAA,GAAY,OAAO,IACtB,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const PKG_NAME = "@liveblocks/react-lexical";
4
- const PKG_VERSION = typeof "1.12.0-lexical2" === "string" && "1.12.0-lexical2";
4
+ const PKG_VERSION = typeof "1.12.0-lexical6" === "string" && "1.12.0-lexical6";
5
5
  const PKG_FORMAT = typeof "cjs" === "string" && "cjs";
6
6
 
7
7
  exports.PKG_FORMAT = PKG_FORMAT;
package/dist/version.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const PKG_NAME = "@liveblocks/react-lexical";
2
- const PKG_VERSION = typeof "1.12.0-lexical2" === "string" && "1.12.0-lexical2";
2
+ const PKG_VERSION = typeof "1.12.0-lexical6" === "string" && "1.12.0-lexical6";
3
3
  const PKG_FORMAT = typeof "esm" === "string" && "esm";
4
4
 
5
5
  export { PKG_FORMAT, PKG_NAME, PKG_VERSION };
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@liveblocks/react-lexical",
3
- "version": "1.12.0-lexical3",
3
+ "version": "1.12.0-lexical6",
4
4
  "description": "A lexical react plugin to enable collaboration, comments, live cursors, and more.",
5
5
  "license": "Apache-2.0",
6
+ "type": "commonjs",
6
7
  "main": "./dist/index.js",
7
8
  "types": "./dist/index.d.ts",
8
9
  "exports": {
@@ -17,27 +18,34 @@
17
18
  "default": "./dist/index.js"
18
19
  }
19
20
  },
20
- "./styles.css": "./styles.css"
21
+ "./styles.css": {
22
+ "types": "./styles.css.d.ts",
23
+ "default": "./styles.css"
24
+ }
21
25
  },
22
26
  "files": [
23
27
  "dist/**",
28
+ "**/*.css",
29
+ "**/*.css.d.ts",
30
+ "**/*.css.map",
24
31
  "README.md"
25
32
  ],
26
33
  "scripts": {
27
34
  "dev": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript --watch",
28
35
  "build": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
29
- "start": "npm run dev",
30
36
  "format": "eslint --fix src/; stylelint --fix src/styles/; prettier --write src/",
31
37
  "lint": "eslint src/; stylelint src/styles/",
38
+ "lint:package": "publint --strict && attw --pack",
39
+ "start": "npm run dev",
32
40
  "test": "jest --silent --verbose --color=always",
33
41
  "test:watch": "jest --silent --verbose --color=always --watch"
34
42
  },
35
43
  "dependencies": {
36
- "@liveblocks/client": "1.12.0-lexical2",
37
- "@liveblocks/core": "1.12.0-lexical2",
38
- "@liveblocks/react": "1.12.0-lexical2",
39
- "@liveblocks/react-comments": "1.12.0-lexical2",
40
- "@liveblocks/yjs": "1.12.0-lexical2",
44
+ "@liveblocks/client": "1.12.0-lexical6",
45
+ "@liveblocks/core": "1.12.0-lexical6",
46
+ "@liveblocks/react": "1.12.0-lexical6",
47
+ "@liveblocks/react-comments": "1.12.0-lexical6",
48
+ "@liveblocks/yjs": "1.12.0-lexical6",
41
49
  "use-sync-external-store": "^1.2.2",
42
50
  "yjs": "^13.6.14"
43
51
  },
@@ -0,0 +1,12 @@
1
+ .lb-lexical-threads-empty {
2
+ display: flex;
3
+ justify-content: center;
4
+ align-items: center;
5
+ block-size: max-content;
6
+ color: rgb(55 53 47 / 50%);
7
+ }
8
+
9
+ .lb-lexical-threads {
10
+ display: flex;
11
+ flex-direction: column;
12
+ }
package/styles.css ADDED
@@ -0,0 +1 @@
1
+ .lb-lexical-threads-empty{color:#37352f80;justify-content:center;align-items:center;block-size:max-content;display:flex}.lb-lexical-threads{flex-direction:column;display:flex}
@@ -0,0 +1 @@
1
+ declare module "@liveblocks/react-lexical/styles.css";
package/styles.css.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/styles/src/styles/index.css"],"names":[],"mappings":"AAAA,0BAAA,eAAA,CAAA,sBAAA,CAAA,kBAAA,CAAA,sBAAA,CAAA,YAAA,CAQA,oBAAA,qBAAA,CAAA,YAAA","file":"styles.css","sourcesContent":[".lb-lexical-threads-empty {\n display: flex;\n justify-content: center;\n align-items: center;\n block-size: max-content;\n color: rgb(55 53 47 / 50%);\n}\n\n.lb-lexical-threads {\n display: flex;\n flex-direction: column;\n}\n"]}