@liveblocks/react-tiptap 2.16.0-toolbars1 → 2.16.0-toolbars2

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.mjs","sources":["../../src/toolbar/shared.tsx"],"sourcesContent":["import { useLayoutEffect } from \"@liveblocks/react/_private\";\nimport {\n Children,\n type ComponentProps,\n createContext,\n forwardRef,\n useContext,\n useId,\n useMemo,\n} from \"react\";\n\n// This file is separate to avoid circular dependencies\n\ntype FloatingToolbarContext = {\n close: () => void;\n registerExternal: (id: string) => () => void;\n};\n\nexport const FloatingToolbarContext =\n createContext<FloatingToolbarContext | null>(null);\n\nexport const FloatingToolbarExternal = forwardRef<\n HTMLDivElement,\n ComponentProps<\"div\">\n>(({ children, style, ...props }, forwardedRef) => {\n const id = useId();\n const externalId = useMemo(\n () => `liveblocks-floating-toolbar-external-${id}`,\n [id]\n );\n const floatingToolbarContext = useContext(FloatingToolbarContext);\n const registerExternal = floatingToolbarContext?.registerExternal;\n\n useLayoutEffect(() => {\n if (!registerExternal) {\n return;\n }\n\n return registerExternal(externalId);\n }, [registerExternal, externalId]);\n\n if (!floatingToolbarContext || Children.count(children) === 0) {\n return <>{children}</>;\n }\n\n return (\n <div\n ref={forwardedRef}\n style={{ display: \"contents\", ...style }}\n data-liveblocks-floating-toolbar-external={id}\n {...props}\n id={externalId}\n >\n {children}\n </div>\n );\n});\n"],"names":[],"mappings":";;;;AAkBa,MAAA,sBAAA,GACX,cAA6C,IAAI,EAAA;AAEtC,MAAA,uBAAA,GAA0B,WAGrC,CAAC,EAAE,UAAU,KAAU,EAAA,GAAA,KAAA,IAAS,YAAiB,KAAA;AACjD,EAAA,MAAM,KAAK,KAAM,EAAA,CAAA;AACjB,EAAA,MAAM,UAAa,GAAA,OAAA;AAAA,IACjB,MAAM,CAAwC,qCAAA,EAAA,EAAA,CAAA,CAAA;AAAA,IAC9C,CAAC,EAAE,CAAA;AAAA,GACL,CAAA;AACA,EAAM,MAAA,sBAAA,GAAyB,WAAW,sBAAsB,CAAA,CAAA;AAChE,EAAA,MAAM,mBAAmB,sBAAwB,EAAA,gBAAA,CAAA;AAEjD,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,CAAC,gBAAkB,EAAA;AACrB,MAAA,OAAA;AAAA,KACF;AAEA,IAAA,OAAO,iBAAiB,UAAU,CAAA,CAAA;AAAA,GACjC,EAAA,CAAC,gBAAkB,EAAA,UAAU,CAAC,CAAA,CAAA;AAEjC,EAAA,IAAI,CAAC,sBAA0B,IAAA,QAAA,CAAS,KAAM,CAAA,QAAQ,MAAM,CAAG,EAAA;AAC7D,IAAO,uBAAA,GAAA,CAAA,QAAA,EAAA;AAAA,MAAG,QAAA;AAAA,KAAS,CAAA,CAAA;AAAA,GACrB;AAEA,EAAA,uBACG,GAAA,CAAA,KAAA,EAAA;AAAA,IACC,GAAK,EAAA,YAAA;AAAA,IACL,KAAO,EAAA,EAAE,OAAS,EAAA,UAAA,EAAY,GAAG,KAAM,EAAA;AAAA,IACvC,2CAA2C,EAAA,EAAA;AAAA,IAC1C,GAAG,KAAA;AAAA,IACJ,EAAI,EAAA,UAAA;AAAA,IAEH,QAAA;AAAA,GACH,CAAA,CAAA;AAEJ,CAAC;;;;"}
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const PKG_NAME = "@liveblocks/react-tiptap";
4
- const PKG_VERSION = typeof "2.16.0-toolbars1" === "string" && "2.16.0-toolbars1";
4
+ const PKG_VERSION = typeof "2.16.0-toolbars2" === "string" && "2.16.0-toolbars2";
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-tiptap";
2
- const PKG_VERSION = typeof "2.16.0-toolbars1" === "string" && "2.16.0-toolbars1";
2
+ const PKG_VERSION = typeof "2.16.0-toolbars2" === "string" && "2.16.0-toolbars2";
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@liveblocks/react-tiptap",
3
- "version": "2.16.0-toolbars1",
3
+ "version": "2.16.0-toolbars2",
4
4
  "description": "A tiptap react plugin to enable collaboration, comments, live cursors, and more.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",
@@ -42,11 +42,11 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@floating-ui/react-dom": "^2.1.2",
45
- "@liveblocks/client": "2.16.0-toolbars1",
46
- "@liveblocks/core": "2.16.0-toolbars1",
47
- "@liveblocks/react": "2.16.0-toolbars1",
48
- "@liveblocks/react-ui": "2.16.0-toolbars1",
49
- "@liveblocks/yjs": "2.16.0-toolbars1",
45
+ "@liveblocks/client": "2.16.0-toolbars2",
46
+ "@liveblocks/core": "2.16.0-toolbars2",
47
+ "@liveblocks/react": "2.16.0-toolbars2",
48
+ "@liveblocks/react-ui": "2.16.0-toolbars2",
49
+ "@liveblocks/yjs": "2.16.0-toolbars2",
50
50
  "@radix-ui/react-select": "^2.1.2",
51
51
  "@radix-ui/react-toggle": "^1.1.0",
52
52
  "@tiptap/core": "^2.7.2",
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var react = require('react');
4
-
5
- const FloatingToolbarContext = react.createContext(null);
6
-
7
- exports.FloatingToolbarContext = FloatingToolbarContext;
8
- //# sourceMappingURL=FloatingToolbarContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FloatingToolbarContext.js","sources":["../../src/toolbar/FloatingToolbarContext.ts"],"sourcesContent":["import { createContext } from \"react\";\n\n// This file is separate to avoid circular dependencies\n\ntype FloatingToolbarContext = {\n close: () => void;\n};\n\nexport const FloatingToolbarContext =\n createContext<FloatingToolbarContext | null>(null);\n"],"names":["createContext"],"mappings":";;;;AAQa,MAAA,sBAAA,GACXA,oBAA6C,IAAI;;;;"}
@@ -1,6 +0,0 @@
1
- import { createContext } from 'react';
2
-
3
- const FloatingToolbarContext = createContext(null);
4
-
5
- export { FloatingToolbarContext };
6
- //# sourceMappingURL=FloatingToolbarContext.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FloatingToolbarContext.mjs","sources":["../../src/toolbar/FloatingToolbarContext.ts"],"sourcesContent":["import { createContext } from \"react\";\n\n// This file is separate to avoid circular dependencies\n\ntype FloatingToolbarContext = {\n close: () => void;\n};\n\nexport const FloatingToolbarContext =\n createContext<FloatingToolbarContext | null>(null);\n"],"names":[],"mappings":";;AAQa,MAAA,sBAAA,GACX,cAA6C,IAAI;;;;"}