@kendew-agency/react-feedback-layer 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/index.cjs +2 -2
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +6 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -378,7 +378,7 @@ var normalizeRect = (a, b) => {
|
|
|
378
378
|
// src/components/comment-overlay.tsx
|
|
379
379
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
380
380
|
var DRAG_THRESHOLD = 4;
|
|
381
|
-
var CommentOverlay = ({ children }) => {
|
|
381
|
+
var CommentOverlay = ({ children, ...rest }) => {
|
|
382
382
|
const {
|
|
383
383
|
overlayState,
|
|
384
384
|
registerComment,
|
|
@@ -448,7 +448,7 @@ var CommentOverlay = ({ children }) => {
|
|
|
448
448
|
setPreview(null);
|
|
449
449
|
};
|
|
450
450
|
if (overlayState === "inactive") return children;
|
|
451
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { "data-overlay": true, style: { position: "relative" }, children: [
|
|
451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { "data-overlay": true, style: { position: "relative", ...rest.style }, ...rest, children: [
|
|
452
452
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
453
453
|
"div",
|
|
454
454
|
{
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { ReactNode, ElementType, ButtonHTMLAttributes
|
|
4
|
-
import { C as CommentType, a as CommentOverlayProps, b as CommentContext } from './comment.types-CSGuc1D_.cjs';
|
|
3
|
+
import { HTMLProps, ReactNode, ElementType, ButtonHTMLAttributes } from 'react';
|
|
4
|
+
import { C as CommentType, a as CommentOverlayProps$1, b as CommentContext } from './comment.types-CSGuc1D_.cjs';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
interface CommentOverlayProps extends HTMLProps<HTMLDivElement> {
|
|
7
7
|
children: ReactNode;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
|
+
declare const CommentOverlay: ({ children, ...rest }: CommentOverlayProps) => string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
9
10
|
|
|
10
11
|
type CommentRendererProps = {
|
|
11
12
|
Comment: ElementType<{
|
|
@@ -72,7 +73,7 @@ declare const Comment: {
|
|
|
72
73
|
*
|
|
73
74
|
* @param initialComments as the initial comments from the document
|
|
74
75
|
*/
|
|
75
|
-
declare const CommentContextProvider: ({ children, initialComments, initialOverlayState, onConfirm, onResolve, currentUser, subscription, config, onError, }: CommentOverlayProps) => react_jsx_runtime.JSX.Element;
|
|
76
|
+
declare const CommentContextProvider: ({ children, initialComments, initialOverlayState, onConfirm, onResolve, currentUser, subscription, config, onError, }: CommentOverlayProps$1) => react_jsx_runtime.JSX.Element;
|
|
76
77
|
declare const useComments: () => CommentContext;
|
|
77
78
|
|
|
78
79
|
type CommentScope = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { ReactNode, ElementType, ButtonHTMLAttributes
|
|
4
|
-
import { C as CommentType, a as CommentOverlayProps, b as CommentContext } from './comment.types-CSGuc1D_.js';
|
|
3
|
+
import { HTMLProps, ReactNode, ElementType, ButtonHTMLAttributes } from 'react';
|
|
4
|
+
import { C as CommentType, a as CommentOverlayProps$1, b as CommentContext } from './comment.types-CSGuc1D_.js';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
interface CommentOverlayProps extends HTMLProps<HTMLDivElement> {
|
|
7
7
|
children: ReactNode;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
|
+
declare const CommentOverlay: ({ children, ...rest }: CommentOverlayProps) => string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
9
10
|
|
|
10
11
|
type CommentRendererProps = {
|
|
11
12
|
Comment: ElementType<{
|
|
@@ -72,7 +73,7 @@ declare const Comment: {
|
|
|
72
73
|
*
|
|
73
74
|
* @param initialComments as the initial comments from the document
|
|
74
75
|
*/
|
|
75
|
-
declare const CommentContextProvider: ({ children, initialComments, initialOverlayState, onConfirm, onResolve, currentUser, subscription, config, onError, }: CommentOverlayProps) => react_jsx_runtime.JSX.Element;
|
|
76
|
+
declare const CommentContextProvider: ({ children, initialComments, initialOverlayState, onConfirm, onResolve, currentUser, subscription, config, onError, }: CommentOverlayProps$1) => react_jsx_runtime.JSX.Element;
|
|
76
77
|
declare const useComments: () => CommentContext;
|
|
77
78
|
|
|
78
79
|
type CommentScope = {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// src/components/comment-overlay.tsx
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
useRef,
|
|
4
|
+
useState
|
|
5
|
+
} from "react";
|
|
3
6
|
|
|
4
7
|
// src/contexts/comment-context.tsx
|
|
5
8
|
import { createContext, useContext, useEffect, useReducer } from "react";
|
|
@@ -333,7 +336,7 @@ var normalizeRect = (a, b) => {
|
|
|
333
336
|
// src/components/comment-overlay.tsx
|
|
334
337
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
335
338
|
var DRAG_THRESHOLD = 4;
|
|
336
|
-
var CommentOverlay = ({ children }) => {
|
|
339
|
+
var CommentOverlay = ({ children, ...rest }) => {
|
|
337
340
|
const {
|
|
338
341
|
overlayState,
|
|
339
342
|
registerComment,
|
|
@@ -403,7 +406,7 @@ var CommentOverlay = ({ children }) => {
|
|
|
403
406
|
setPreview(null);
|
|
404
407
|
};
|
|
405
408
|
if (overlayState === "inactive") return children;
|
|
406
|
-
return /* @__PURE__ */ jsxs("div", { "data-overlay": true, style: { position: "relative" }, children: [
|
|
409
|
+
return /* @__PURE__ */ jsxs("div", { "data-overlay": true, style: { position: "relative", ...rest.style }, ...rest, children: [
|
|
407
410
|
/* @__PURE__ */ jsx2(
|
|
408
411
|
"div",
|
|
409
412
|
{
|