@liveblocks/react-ui 2.7.0-beta2 → 2.7.0-versions2
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/_private/README.md +5 -0
- package/_private/package.json +4 -0
- package/dist/_private/index.d.mts +72 -0
- package/dist/_private/index.d.ts +72 -0
- package/dist/_private/index.js +46 -0
- package/dist/_private/index.js.map +1 -0
- package/dist/_private/index.mjs +21 -0
- package/dist/_private/index.mjs.map +1 -0
- package/dist/components/Comment.js +7 -65
- package/dist/components/Comment.js.map +1 -1
- package/dist/components/Comment.mjs +9 -66
- package/dist/components/Comment.mjs.map +1 -1
- package/dist/components/Composer.js +101 -217
- package/dist/components/Composer.js.map +1 -1
- package/dist/components/Composer.mjs +104 -220
- package/dist/components/Composer.mjs.map +1 -1
- package/dist/components/HistoryVersionSummary.js +42 -0
- package/dist/components/HistoryVersionSummary.js.map +1 -0
- package/dist/components/HistoryVersionSummary.mjs +40 -0
- package/dist/components/HistoryVersionSummary.mjs.map +1 -0
- package/dist/components/HistoryVersionSummaryList.js +22 -0
- package/dist/components/HistoryVersionSummaryList.js.map +1 -0
- package/dist/components/HistoryVersionSummaryList.mjs +20 -0
- package/dist/components/HistoryVersionSummaryList.mjs.map +1 -0
- package/dist/components/InboxNotification.js +10 -28
- package/dist/components/InboxNotification.js.map +1 -1
- package/dist/components/InboxNotification.mjs +10 -28
- package/dist/components/InboxNotification.mjs.map +1 -1
- package/dist/components/Thread.js +0 -2
- package/dist/components/Thread.js.map +1 -1
- package/dist/components/Thread.mjs +0 -2
- package/dist/components/Thread.mjs.map +1 -1
- package/dist/components/internal/Button.js +8 -1
- package/dist/components/internal/Button.js.map +1 -1
- package/dist/components/internal/Button.mjs +8 -1
- package/dist/components/internal/Button.mjs.map +1 -1
- package/dist/components/internal/EmojiPicker.js +3 -3
- package/dist/components/internal/EmojiPicker.js.map +1 -1
- package/dist/components/internal/EmojiPicker.mjs +3 -3
- package/dist/components/internal/EmojiPicker.mjs.map +1 -1
- package/dist/components/internal/InboxNotificationThread.js +2 -10
- package/dist/components/internal/InboxNotificationThread.js.map +1 -1
- package/dist/components/internal/InboxNotificationThread.mjs +3 -11
- package/dist/components/internal/InboxNotificationThread.mjs.map +1 -1
- package/dist/components/internal/User.js +3 -19
- package/dist/components/internal/User.js.map +1 -1
- package/dist/components/internal/User.mjs +3 -19
- package/dist/components/internal/User.mjs.map +1 -1
- package/dist/icons/ArrowUp.js +15 -0
- package/dist/icons/ArrowUp.js.map +1 -0
- package/dist/icons/ArrowUp.mjs +13 -0
- package/dist/icons/ArrowUp.mjs.map +1 -0
- package/dist/icons/{Warning.js → Missing.js} +3 -3
- package/dist/icons/{Warning.js.map → Missing.js.map} +1 -1
- package/dist/icons/{Warning.mjs → Missing.mjs} +3 -3
- package/dist/icons/{Warning.mjs.map → Missing.mjs.map} +1 -1
- package/dist/icons/Restore.js +17 -0
- package/dist/icons/Restore.js.map +1 -0
- package/dist/icons/Restore.mjs +15 -0
- package/dist/icons/Restore.mjs.map +1 -0
- package/dist/icons/Spinner.js +9 -3
- package/dist/icons/Spinner.js.map +1 -1
- package/dist/icons/Spinner.mjs +10 -4
- package/dist/icons/Spinner.mjs.map +1 -1
- package/dist/index.d.mts +74 -70
- package/dist/index.d.ts +74 -70
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/dist/overrides.js +5 -6
- package/dist/overrides.js.map +1 -1
- package/dist/overrides.mjs +5 -6
- package/dist/overrides.mjs.map +1 -1
- package/dist/primitives/Composer/contexts.js +3 -17
- package/dist/primitives/Composer/contexts.js.map +1 -1
- package/dist/primitives/Composer/contexts.mjs +4 -15
- package/dist/primitives/Composer/contexts.mjs.map +1 -1
- package/dist/primitives/Composer/index.js +26 -185
- package/dist/primitives/Composer/index.js.map +1 -1
- package/dist/primitives/Composer/index.mjs +31 -188
- package/dist/primitives/Composer/index.mjs.map +1 -1
- package/dist/primitives/Composer/utils.js +0 -224
- package/dist/primitives/Composer/utils.js.map +1 -1
- package/dist/primitives/Composer/utils.mjs +1 -222
- package/dist/primitives/Composer/utils.mjs.map +1 -1
- package/dist/primitives/EmojiPicker/utils.js +2 -2
- package/dist/primitives/EmojiPicker/utils.js.map +1 -1
- package/dist/primitives/EmojiPicker/utils.mjs +1 -1
- package/dist/primitives/EmojiPicker/utils.mjs.map +1 -1
- package/dist/primitives/index.d.mts +3 -83
- package/dist/primitives/index.d.ts +3 -83
- package/dist/primitives/index.js +0 -4
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/index.mjs +0 -2
- package/dist/primitives/index.mjs.map +1 -1
- package/dist/utils/chunk.js +12 -0
- package/dist/utils/chunk.js.map +1 -0
- package/dist/utils/chunk.mjs +10 -0
- package/dist/utils/chunk.mjs.map +1 -0
- package/dist/utils/intl.js +0 -6
- package/dist/utils/intl.js.map +1 -1
- package/dist/utils/intl.mjs +1 -6
- package/dist/utils/intl.mjs.map +1 -1
- package/dist/utils/use-initial.js +1 -2
- package/dist/utils/use-initial.js.map +1 -1
- package/dist/utils/use-initial.mjs +2 -3
- package/dist/utils/use-initial.mjs.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/package.json +16 -4
- package/src/styles/dark/index.css +0 -1
- package/src/styles/index.css +219 -325
- package/src/styles/utils.css +6 -44
- package/styles/dark/attributes.css +1 -1
- package/styles/dark/attributes.css.map +1 -1
- package/styles/dark/media-query.css +1 -1
- package/styles/dark/media-query.css.map +1 -1
- package/styles.css +1 -1
- package/styles.css.map +1 -1
- package/dist/components/internal/Attachment.js +0 -207
- package/dist/components/internal/Attachment.js.map +0 -1
- package/dist/components/internal/Attachment.mjs +0 -205
- package/dist/components/internal/Attachment.mjs.map +0 -1
- package/dist/icons/Attachment.js +0 -15
- package/dist/icons/Attachment.js.map +0 -1
- package/dist/icons/Attachment.mjs +0 -13
- package/dist/icons/Attachment.mjs.map +0 -1
- package/dist/primitives/FileSize.js +0 -33
- package/dist/primitives/FileSize.js.map +0 -1
- package/dist/primitives/FileSize.mjs +0 -31
- package/dist/primitives/FileSize.mjs.map +0 -1
- package/dist/utils/download.js +0 -14
- package/dist/utils/download.js.map +0 -1
- package/dist/utils/download.mjs +0 -12
- package/dist/utils/download.mjs.map +0 -1
- package/dist/utils/format-file-size.js +0 -45
- package/dist/utils/format-file-size.js.map +0 -1
- package/dist/utils/format-file-size.mjs +0 -43
- package/dist/utils/format-file-size.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrowUp.mjs","sources":["../../src/icons/ArrowUp.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport React from \"react\";\n\nimport { Icon } from \"../components/internal/Icon\";\n\nexport function ArrowUpIcon(props: ComponentProps<\"svg\">) {\n return (\n <Icon {...props}>\n <path d=\"M10 16V4m-6 6 6-6 6 6\" />\n </Icon>\n );\n}\n"],"names":["React"],"mappings":";;;AAKO,SAAS,YAAY,KAA8B,EAAA;AACxD,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAM,GAAG,KAAA;AAAA,GAAA,kBACPA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAK,CAAE,EAAA,uBAAA;AAAA,GAAwB,CAClC,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var Icon = require('../components/internal/Icon.js');
|
|
5
5
|
|
|
6
|
-
function
|
|
6
|
+
function MissingIcon(props) {
|
|
7
7
|
return /* @__PURE__ */ React.createElement(Icon.Icon, {
|
|
8
8
|
...props
|
|
9
9
|
}, /* @__PURE__ */ React.createElement("path", {
|
|
@@ -15,5 +15,5 @@ function WarningIcon(props) {
|
|
|
15
15
|
}));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
exports.
|
|
19
|
-
//# sourceMappingURL=
|
|
18
|
+
exports.MissingIcon = MissingIcon;
|
|
19
|
+
//# sourceMappingURL=Missing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"Missing.js","sources":["../../src/icons/Missing.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport React from \"react\";\n\nimport { Icon } from \"../components/internal/Icon\";\n\nexport function MissingIcon(props: ComponentProps<\"svg\">) {\n return (\n <Icon {...props}>\n <path d=\"m3.794 13.526 5.326-9.89a1 1 0 0 1 1.76 0l5.326 9.89a1 1 0 0 1-.88 1.474H4.674a1 1 0 0 1-.88-1.474ZM10 7.5v2m0 2.5h.007\" />\n <circle cx={10} cy={12} r={0.25} />\n </Icon>\n );\n}\n"],"names":["Icon"],"mappings":";;;;;AAKO,SAAS,YAAY,KAA8B,EAAA;AACxD,EAAA,uBACG,KAAA,CAAA,aAAA,CAAAA,SAAA,EAAA;AAAA,IAAM,GAAG,KAAA;AAAA,GAAA,kBACP,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAK,CAAE,EAAA,yHAAA;AAAA,GAA0H,mBACjI,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,IAAO,EAAI,EAAA,EAAA;AAAA,IAAI,EAAI,EAAA,EAAA;AAAA,IAAI,CAAG,EAAA,IAAA;AAAA,GAAM,CACnC,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { Icon } from '../components/internal/Icon.mjs';
|
|
3
3
|
|
|
4
|
-
function
|
|
4
|
+
function MissingIcon(props) {
|
|
5
5
|
return /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6
6
|
...props
|
|
7
7
|
}, /* @__PURE__ */ React__default.createElement("path", {
|
|
@@ -13,5 +13,5 @@ function WarningIcon(props) {
|
|
|
13
13
|
}));
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export {
|
|
17
|
-
//# sourceMappingURL=
|
|
16
|
+
export { MissingIcon };
|
|
17
|
+
//# sourceMappingURL=Missing.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"Missing.mjs","sources":["../../src/icons/Missing.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport React from \"react\";\n\nimport { Icon } from \"../components/internal/Icon\";\n\nexport function MissingIcon(props: ComponentProps<\"svg\">) {\n return (\n <Icon {...props}>\n <path d=\"m3.794 13.526 5.326-9.89a1 1 0 0 1 1.76 0l5.326 9.89a1 1 0 0 1-.88 1.474H4.674a1 1 0 0 1-.88-1.474ZM10 7.5v2m0 2.5h.007\" />\n <circle cx={10} cy={12} r={0.25} />\n </Icon>\n );\n}\n"],"names":["React"],"mappings":";;;AAKO,SAAS,YAAY,KAA8B,EAAA;AACxD,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAM,GAAG,KAAA;AAAA,GAAA,kBACPA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAK,CAAE,EAAA,yHAAA;AAAA,GAA0H,mBACjIA,cAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,IAAO,EAAI,EAAA,EAAA;AAAA,IAAI,EAAI,EAAA,EAAA;AAAA,IAAI,CAAG,EAAA,IAAA;AAAA,GAAM,CACnC,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var Icon = require('../components/internal/Icon.js');
|
|
5
|
+
|
|
6
|
+
function RestoreIcon(props) {
|
|
7
|
+
return /* @__PURE__ */ React.createElement(Icon.Icon, {
|
|
8
|
+
...props
|
|
9
|
+
}, /* @__PURE__ */ React.createElement("path", {
|
|
10
|
+
d: "M3.674 7a7 7 0 1 1-.603 4"
|
|
11
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
12
|
+
d: "M3.5 3.5V7H7m3-.5V10l2.5 1.5"
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
exports.RestoreIcon = RestoreIcon;
|
|
17
|
+
//# sourceMappingURL=Restore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Restore.js","sources":["../../src/icons/Restore.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport React from \"react\";\n\nimport { Icon } from \"../components/internal/Icon\";\n\nexport function RestoreIcon(props: ComponentProps<\"svg\">) {\n return (\n <Icon {...props}>\n <path d=\"M3.674 7a7 7 0 1 1-.603 4\" />\n <path d=\"M3.5 3.5V7H7m3-.5V10l2.5 1.5\" />\n </Icon>\n );\n}\n"],"names":["Icon"],"mappings":";;;;;AAKO,SAAS,YAAY,KAA8B,EAAA;AACxD,EAAA,uBACG,KAAA,CAAA,aAAA,CAAAA,SAAA,EAAA;AAAA,IAAM,GAAG,KAAA;AAAA,GAAA,kBACP,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAK,CAAE,EAAA,2BAAA;AAAA,GAA4B,mBACnC,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAK,CAAE,EAAA,8BAAA;AAAA,GAA+B,CACzC,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { Icon } from '../components/internal/Icon.mjs';
|
|
3
|
+
|
|
4
|
+
function RestoreIcon(props) {
|
|
5
|
+
return /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6
|
+
...props
|
|
7
|
+
}, /* @__PURE__ */ React__default.createElement("path", {
|
|
8
|
+
d: "M3.674 7a7 7 0 1 1-.603 4"
|
|
9
|
+
}), /* @__PURE__ */ React__default.createElement("path", {
|
|
10
|
+
d: "M3.5 3.5V7H7m3-.5V10l2.5 1.5"
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { RestoreIcon };
|
|
15
|
+
//# sourceMappingURL=Restore.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Restore.mjs","sources":["../../src/icons/Restore.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport React from \"react\";\n\nimport { Icon } from \"../components/internal/Icon\";\n\nexport function RestoreIcon(props: ComponentProps<\"svg\">) {\n return (\n <Icon {...props}>\n <path d=\"M3.674 7a7 7 0 1 1-.603 4\" />\n <path d=\"M3.5 3.5V7H7m3-.5V10l2.5 1.5\" />\n </Icon>\n );\n}\n"],"names":["React"],"mappings":";;;AAKO,SAAS,YAAY,KAA8B,EAAA;AACxD,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAM,GAAG,KAAA;AAAA,GAAA,kBACPA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAK,CAAE,EAAA,2BAAA;AAAA,GAA4B,mBACnCA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAK,CAAE,EAAA,8BAAA;AAAA,GAA+B,CACzC,CAAA,CAAA;AAEJ;;;;"}
|
package/dist/icons/Spinner.js
CHANGED
|
@@ -7,9 +7,15 @@ function SpinnerIcon(props) {
|
|
|
7
7
|
return /* @__PURE__ */ React.createElement(Icon.Icon, {
|
|
8
8
|
...props
|
|
9
9
|
}, /* @__PURE__ */ React.createElement("path", {
|
|
10
|
-
d: "M3 10a7 7 0 0 1 7-7"
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
d: "M3 10a7 7 0 0 1 7-7"
|
|
11
|
+
}, /* @__PURE__ */ React.createElement("animateTransform", {
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
attributeName: "transform",
|
|
14
|
+
type: "rotate",
|
|
15
|
+
dur: "0.75s",
|
|
16
|
+
values: `0 ${Icon.ICON_WIDTH / 2} ${Icon.ICON_HEIGHT / 2};360 ${Icon.ICON_WIDTH / 2} ${Icon.ICON_HEIGHT / 2}`,
|
|
17
|
+
repeatCount: "indefinite"
|
|
18
|
+
})));
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
exports.SpinnerIcon = SpinnerIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.js","sources":["../../src/icons/Spinner.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport React from \"react\";\n\nimport { Icon } from \"../components/internal/Icon\";\n\nexport function SpinnerIcon(props: ComponentProps<\"svg\">) {\n return (\n <Icon {...props}>\n <path d=\"M3 10a7 7 0 0 1 7-7\"
|
|
1
|
+
{"version":3,"file":"Spinner.js","sources":["../../src/icons/Spinner.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport React from \"react\";\n\nimport { Icon, ICON_HEIGHT, ICON_WIDTH } from \"../components/internal/Icon\";\n\nexport function SpinnerIcon(props: ComponentProps<\"svg\">) {\n return (\n <Icon {...props}>\n <path d=\"M3 10a7 7 0 0 1 7-7\">\n <animateTransform\n xmlns=\"http://www.w3.org/2000/svg\"\n attributeName=\"transform\"\n type=\"rotate\"\n dur=\"0.75s\"\n values={`0 ${ICON_WIDTH / 2} ${ICON_HEIGHT / 2};360 ${\n ICON_WIDTH / 2\n } ${ICON_HEIGHT / 2}`}\n repeatCount=\"indefinite\"\n />\n </path>\n </Icon>\n );\n}\n"],"names":["Icon","ICON_WIDTH","ICON_HEIGHT"],"mappings":";;;;;AAKO,SAAS,YAAY,KAA8B,EAAA;AACxD,EAAA,uBACG,KAAA,CAAA,aAAA,CAAAA,SAAA,EAAA;AAAA,IAAM,GAAG,KAAA;AAAA,GAAA,kBACP,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAK,CAAE,EAAA,qBAAA;AAAA,GAAA,kBACL,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA;AAAA,IACC,KAAM,EAAA,4BAAA;AAAA,IACN,aAAc,EAAA,WAAA;AAAA,IACd,IAAK,EAAA,QAAA;AAAA,IACL,GAAI,EAAA,OAAA;AAAA,IACJ,MAAA,EAAQ,KAAKC,eAAa,GAAA,CAAA,CAAA,CAAA,EAAKC,mBAAc,CAC3C,CAAA,KAAA,EAAAD,eAAA,GAAa,KACXC,gBAAc,GAAA,CAAA,CAAA,CAAA;AAAA,IAClB,WAAY,EAAA,YAAA;AAAA,GACd,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
|
package/dist/icons/Spinner.mjs
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { Icon } from '../components/internal/Icon.mjs';
|
|
2
|
+
import { Icon, ICON_WIDTH, ICON_HEIGHT } from '../components/internal/Icon.mjs';
|
|
3
3
|
|
|
4
4
|
function SpinnerIcon(props) {
|
|
5
5
|
return /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6
6
|
...props
|
|
7
7
|
}, /* @__PURE__ */ React__default.createElement("path", {
|
|
8
|
-
d: "M3 10a7 7 0 0 1 7-7"
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
d: "M3 10a7 7 0 0 1 7-7"
|
|
9
|
+
}, /* @__PURE__ */ React__default.createElement("animateTransform", {
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
attributeName: "transform",
|
|
12
|
+
type: "rotate",
|
|
13
|
+
dur: "0.75s",
|
|
14
|
+
values: `0 ${ICON_WIDTH / 2} ${ICON_HEIGHT / 2};360 ${ICON_WIDTH / 2} ${ICON_HEIGHT / 2}`,
|
|
15
|
+
repeatCount: "indefinite"
|
|
16
|
+
})));
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
export { SpinnerIcon };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.mjs","sources":["../../src/icons/Spinner.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport React from \"react\";\n\nimport { Icon } from \"../components/internal/Icon\";\n\nexport function SpinnerIcon(props: ComponentProps<\"svg\">) {\n return (\n <Icon {...props}>\n <path d=\"M3 10a7 7 0 0 1 7-7\"
|
|
1
|
+
{"version":3,"file":"Spinner.mjs","sources":["../../src/icons/Spinner.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport React from \"react\";\n\nimport { Icon, ICON_HEIGHT, ICON_WIDTH } from \"../components/internal/Icon\";\n\nexport function SpinnerIcon(props: ComponentProps<\"svg\">) {\n return (\n <Icon {...props}>\n <path d=\"M3 10a7 7 0 0 1 7-7\">\n <animateTransform\n xmlns=\"http://www.w3.org/2000/svg\"\n attributeName=\"transform\"\n type=\"rotate\"\n dur=\"0.75s\"\n values={`0 ${ICON_WIDTH / 2} ${ICON_HEIGHT / 2};360 ${\n ICON_WIDTH / 2\n } ${ICON_HEIGHT / 2}`}\n repeatCount=\"indefinite\"\n />\n </path>\n </Icon>\n );\n}\n"],"names":["React"],"mappings":";;;AAKO,SAAS,YAAY,KAA8B,EAAA;AACxD,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAM,GAAG,KAAA;AAAA,GAAA,kBACPA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAA,IAAK,CAAE,EAAA,qBAAA;AAAA,GAAA,kBACLA,cAAA,CAAA,aAAA,CAAA,kBAAA,EAAA;AAAA,IACC,KAAM,EAAA,4BAAA;AAAA,IACN,aAAc,EAAA,WAAA;AAAA,IACd,IAAK,EAAA,QAAA;AAAA,IACL,GAAI,EAAA,OAAA;AAAA,IACJ,MAAA,EAAQ,KAAK,UAAa,GAAA,CAAA,CAAA,CAAA,EAAK,cAAc,CAC3C,CAAA,KAAA,EAAA,UAAA,GAAa,KACX,WAAc,GAAA,CAAA,CAAA,CAAA;AAAA,IAClB,WAAY,EAAA,YAAA;AAAA,GACd,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import React, { ElementType, ComponentPropsWithoutRef, ReactNode, MouseEvent,
|
|
1
|
+
import { CommentData, CommentBody, BaseMetadata, DM, HistoryVersion, InboxNotificationData, InboxNotificationThreadData, InboxNotificationTextMentionData, InboxNotificationCustomData, KDAD, ThreadData } from '@liveblocks/core';
|
|
2
|
+
import React, { ElementType, ComponentPropsWithoutRef, ReactNode, MouseEvent, ComponentType, FormEvent, RefAttributes, ComponentProps, PropsWithChildren } from 'react';
|
|
3
3
|
|
|
4
4
|
declare type Direction = "ltr" | "rtl";
|
|
5
5
|
declare type SlotProp = {
|
|
@@ -9,16 +9,6 @@ declare type SlotProp = {
|
|
|
9
9
|
asChild?: boolean;
|
|
10
10
|
};
|
|
11
11
|
declare type ComponentPropsWithSlot<TElement extends ElementType<any>> = ComponentPropsWithoutRef<TElement> & SlotProp;
|
|
12
|
-
interface CommentAttachmentArgs {
|
|
13
|
-
/**
|
|
14
|
-
* The attachment.
|
|
15
|
-
*/
|
|
16
|
-
attachment: CommentAttachment;
|
|
17
|
-
/**
|
|
18
|
-
* A presigned URL for the attachment.
|
|
19
|
-
*/
|
|
20
|
-
url: string;
|
|
21
|
-
}
|
|
22
12
|
|
|
23
13
|
interface LocalizationOverrides {
|
|
24
14
|
locale: string;
|
|
@@ -33,8 +23,6 @@ interface GlobalOverrides {
|
|
|
33
23
|
EMOJI_PICKER_SEARCH_PLACEHOLDER: string;
|
|
34
24
|
EMOJI_PICKER_EMPTY: ReactNode;
|
|
35
25
|
EMOJI_PICKER_ERROR: (error: Error) => ReactNode;
|
|
36
|
-
ATTACHMENT_TOO_LARGE: (maxSize?: string) => string;
|
|
37
|
-
ATTACHMENT_ERROR: (error: Error) => string;
|
|
38
26
|
}
|
|
39
27
|
interface CommentOverrides {
|
|
40
28
|
COMMENT_EDITED: ReactNode;
|
|
@@ -45,7 +33,6 @@ interface CommentOverrides {
|
|
|
45
33
|
COMMENT_EDIT_COMPOSER_CANCEL: string;
|
|
46
34
|
COMMENT_EDIT_COMPOSER_SAVE: string;
|
|
47
35
|
COMMENT_DELETE: string;
|
|
48
|
-
COMMENT_DELETE_ATTACHMENT: string;
|
|
49
36
|
COMMENT_ADD_REACTION: string;
|
|
50
37
|
COMMENT_REACTION_LIST: (list: ReactNode, emoji: string, count: number) => ReactNode;
|
|
51
38
|
COMMENT_REACTION_DESCRIPTION: (emoji: string, count: number) => string;
|
|
@@ -53,8 +40,6 @@ interface CommentOverrides {
|
|
|
53
40
|
interface ComposerOverrides {
|
|
54
41
|
COMPOSER_INSERT_MENTION: string;
|
|
55
42
|
COMPOSER_INSERT_EMOJI: string;
|
|
56
|
-
COMPOSER_ATTACH_FILES: string;
|
|
57
|
-
COMPOSER_REMOVE_ATTACHMENT: string;
|
|
58
43
|
COMPOSER_PLACEHOLDER: string;
|
|
59
44
|
COMPOSER_SEND: string;
|
|
60
45
|
}
|
|
@@ -74,7 +59,13 @@ interface InboxNotificationOverrides {
|
|
|
74
59
|
INBOX_NOTIFICATION_THREAD_MENTION: (user: ReactNode, room: ReactNode | undefined) => ReactNode;
|
|
75
60
|
INBOX_NOTIFICATION_TEXT_MENTION: (user: ReactNode, room: ReactNode | undefined) => ReactNode;
|
|
76
61
|
}
|
|
77
|
-
|
|
62
|
+
interface HistoryVersionPreviewOverrides {
|
|
63
|
+
HISTORY_VERSION_PREVIEW_AUTHORS_LIST: (list: ReactNode) => ReactNode;
|
|
64
|
+
HISTORY_VERSION_PREVIEW_RESTORE: string;
|
|
65
|
+
HISTORY_VERSION_PREVIEW_EMPTY: ReactNode;
|
|
66
|
+
HISTORY_VERSION_PREVIEW_ERROR: (error: Error) => ReactNode;
|
|
67
|
+
}
|
|
68
|
+
declare type Overrides = LocalizationOverrides & GlobalOverrides & ComposerOverrides & CommentOverrides & ThreadOverrides & InboxNotificationOverrides & HistoryVersionPreviewOverrides;
|
|
78
69
|
declare function useOverrides(overrides?: Partial<Overrides>): Overrides;
|
|
79
70
|
|
|
80
71
|
interface CommentProps extends ComponentPropsWithoutRef<"div"> {
|
|
@@ -94,10 +85,6 @@ interface CommentProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
94
85
|
* Whether to show reactions.
|
|
95
86
|
*/
|
|
96
87
|
showReactions?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Whether to show attachments.
|
|
99
|
-
*/
|
|
100
|
-
showAttachments?: boolean;
|
|
101
88
|
/**
|
|
102
89
|
* Whether to indent the comment's content.
|
|
103
90
|
*/
|
|
@@ -118,10 +105,6 @@ interface CommentProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
118
105
|
* The event handler called when clicking on a mention.
|
|
119
106
|
*/
|
|
120
107
|
onMentionClick?: (userId: string, event: MouseEvent<HTMLElement>) => void;
|
|
121
|
-
/**
|
|
122
|
-
* The event handler called when clicking on a comment's attachment.
|
|
123
|
-
*/
|
|
124
|
-
onAttachmentClick?: (args: CommentAttachmentArgs, event: MouseEvent<HTMLElement>) => void;
|
|
125
108
|
/**
|
|
126
109
|
* Override the component's strings.
|
|
127
110
|
*/
|
|
@@ -213,29 +196,11 @@ interface ComposerEditorProps extends Omit<ComponentPropsWithoutRef<"div">, "def
|
|
|
213
196
|
*/
|
|
214
197
|
components?: Partial<ComposerEditorComponents>;
|
|
215
198
|
}
|
|
216
|
-
interface ComposerFormProps extends ComponentPropsWithSlot<"form"> {
|
|
217
|
-
/**
|
|
218
|
-
* The event handler called when the form is submitted.
|
|
219
|
-
*/
|
|
220
|
-
onComposerSubmit?: (comment: ComposerSubmitComment, event: FormEvent<HTMLFormElement>) => Promise<void> | void;
|
|
221
|
-
/**
|
|
222
|
-
* Whether the composer is disabled.
|
|
223
|
-
*/
|
|
224
|
-
disabled?: boolean;
|
|
225
|
-
/**
|
|
226
|
-
* The composer's initial attachments.
|
|
227
|
-
*/
|
|
228
|
-
defaultAttachments?: CommentAttachment[];
|
|
229
|
-
}
|
|
230
199
|
interface ComposerSubmitComment {
|
|
231
200
|
/**
|
|
232
201
|
* The submitted comment's body.
|
|
233
202
|
*/
|
|
234
203
|
body: CommentBody;
|
|
235
|
-
/**
|
|
236
|
-
* The submitted comment's uploaded attachments.
|
|
237
|
-
*/
|
|
238
|
-
attachments: CommentAttachment[];
|
|
239
204
|
}
|
|
240
205
|
|
|
241
206
|
declare type ComposerCreateThreadProps<M extends BaseMetadata> = {
|
|
@@ -274,10 +239,6 @@ declare type ComposerProps<M extends BaseMetadata = DM> = Omit<ComponentPropsWit
|
|
|
274
239
|
* The composer's initial value.
|
|
275
240
|
*/
|
|
276
241
|
defaultValue?: ComposerEditorProps["defaultValue"];
|
|
277
|
-
/**
|
|
278
|
-
* The composer's initial attachments.
|
|
279
|
-
*/
|
|
280
|
-
defaultAttachments?: CommentAttachment[];
|
|
281
242
|
/**
|
|
282
243
|
* Whether the composer is collapsed. Setting a value will make the composer controlled.
|
|
283
244
|
*/
|
|
@@ -290,14 +251,10 @@ declare type ComposerProps<M extends BaseMetadata = DM> = Omit<ComponentPropsWit
|
|
|
290
251
|
* Whether the composer is initially collapsed. Setting a value will make the composer uncontrolled.
|
|
291
252
|
*/
|
|
292
253
|
defaultCollapsed?: boolean;
|
|
293
|
-
/**
|
|
294
|
-
* Whether to show and allow adding attachments.
|
|
295
|
-
*/
|
|
296
|
-
showAttachments?: boolean;
|
|
297
254
|
/**
|
|
298
255
|
* Whether the composer is disabled.
|
|
299
256
|
*/
|
|
300
|
-
disabled?:
|
|
257
|
+
disabled?: ComposerEditorProps["disabled"];
|
|
301
258
|
/**
|
|
302
259
|
* Whether to focus the composer on mount.
|
|
303
260
|
*/
|
|
@@ -315,6 +272,31 @@ declare type ComposerProps<M extends BaseMetadata = DM> = Omit<ComponentPropsWit
|
|
|
315
272
|
*/
|
|
316
273
|
declare const Composer: <M extends BaseMetadata = BaseMetadata>(props: ComposerProps<M> & RefAttributes<HTMLFormElement>) => JSX.Element;
|
|
317
274
|
|
|
275
|
+
interface HistoryVersionSummaryProps extends ComponentPropsWithoutRef<"button"> {
|
|
276
|
+
version: HistoryVersion;
|
|
277
|
+
selected?: boolean;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Displays some information about a version.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* <HistoryVersionSummary version={version} />
|
|
284
|
+
*/
|
|
285
|
+
declare const HistoryVersionSummary: React.ForwardRefExoticComponent<HistoryVersionSummaryProps & React.RefAttributes<HTMLButtonElement>>;
|
|
286
|
+
|
|
287
|
+
declare type HistoryVersionSummaryListProps = ComponentPropsWithoutRef<"ol">;
|
|
288
|
+
/**
|
|
289
|
+
* Displays versions summaries as a list.
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* <HistoryVersionSummaryList>
|
|
293
|
+
* {versions.map((version) => (
|
|
294
|
+
* <HistoryVersionSummary key={version.id} version={version} />
|
|
295
|
+
* ))}
|
|
296
|
+
* </HistoryVersionSummaryList>
|
|
297
|
+
*/
|
|
298
|
+
declare const HistoryVersionSummaryList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
299
|
+
|
|
318
300
|
interface GlobalComponents {
|
|
319
301
|
Anchor: ComponentType<ComponentPropsWithoutRef<"a">> | "a";
|
|
320
302
|
}
|
|
@@ -367,14 +349,6 @@ interface InboxNotificationThreadProps extends Omit<InboxNotificationProps, "kin
|
|
|
367
349
|
* Whether to show the room name in the title.
|
|
368
350
|
*/
|
|
369
351
|
showRoomName?: boolean;
|
|
370
|
-
/**
|
|
371
|
-
* Whether to show reactions.
|
|
372
|
-
*/
|
|
373
|
-
showReactions?: boolean;
|
|
374
|
-
/**
|
|
375
|
-
* Whether to show attachments.
|
|
376
|
-
*/
|
|
377
|
-
showAttachments?: boolean;
|
|
378
352
|
}
|
|
379
353
|
interface InboxNotificationTextMentionProps extends Omit<InboxNotificationProps, "kinds">, InboxNotificationSharedProps {
|
|
380
354
|
/**
|
|
@@ -486,10 +460,6 @@ interface ThreadProps<M extends BaseMetadata = DM> extends ComponentPropsWithout
|
|
|
486
460
|
* Whether to show deleted comments.
|
|
487
461
|
*/
|
|
488
462
|
showDeletedComments?: CommentProps["showDeleted"];
|
|
489
|
-
/**
|
|
490
|
-
* Whether to show attachments.
|
|
491
|
-
*/
|
|
492
|
-
showAttachments?: boolean;
|
|
493
463
|
/**
|
|
494
464
|
* The event handler called when changing the resolved status.
|
|
495
465
|
*/
|
|
@@ -515,10 +485,6 @@ interface ThreadProps<M extends BaseMetadata = DM> extends ComponentPropsWithout
|
|
|
515
485
|
* The event handler called when clicking on a mention.
|
|
516
486
|
*/
|
|
517
487
|
onMentionClick?: CommentProps["onMentionClick"];
|
|
518
|
-
/**
|
|
519
|
-
* The event handler called when clicking on a comment's attachment.
|
|
520
|
-
*/
|
|
521
|
-
onAttachmentClick?: CommentProps["onAttachmentClick"];
|
|
522
488
|
/**
|
|
523
489
|
* Override the component's strings.
|
|
524
490
|
*/
|
|
@@ -561,6 +527,44 @@ declare type LiveblocksUIConfigProps = PropsWithChildren<{
|
|
|
561
527
|
*/
|
|
562
528
|
declare function LiveblocksUIConfig({ overrides, components, portalContainer, children, }: LiveblocksUIConfigProps): React.JSX.Element;
|
|
563
529
|
|
|
530
|
+
interface TimestampProps extends Omit<ComponentPropsWithSlot<"time">, "children" | "title"> {
|
|
531
|
+
/**
|
|
532
|
+
* The date to display.
|
|
533
|
+
*/
|
|
534
|
+
date: Date | string | number;
|
|
535
|
+
/**
|
|
536
|
+
* A function to format the displayed date.
|
|
537
|
+
*/
|
|
538
|
+
children?: (date: Date, locale?: string) => ReactNode;
|
|
539
|
+
/**
|
|
540
|
+
* The `title` attribute's value or a function to format it.
|
|
541
|
+
*/
|
|
542
|
+
title?: string | ((date: Date, locale?: string) => string);
|
|
543
|
+
/**
|
|
544
|
+
* The interval in milliseconds at which the component will re-render.
|
|
545
|
+
* Can be set to `false` to disable re-rendering.
|
|
546
|
+
*/
|
|
547
|
+
interval?: number | false;
|
|
548
|
+
/**
|
|
549
|
+
* The locale used when formatting the date.
|
|
550
|
+
*/
|
|
551
|
+
locale?: string;
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Displays a formatted date, and automatically re-renders to support relative
|
|
555
|
+
* formatting. Defaults to relative formatting for recent dates and a short
|
|
556
|
+
* absolute formatting for older ones.
|
|
557
|
+
*
|
|
558
|
+
* @example
|
|
559
|
+
* <Timestamp date={new Date()} />
|
|
560
|
+
*
|
|
561
|
+
* @example
|
|
562
|
+
* <Timestamp date={new Date()} title={(date) => date.toISOString()} interval={false}>
|
|
563
|
+
* {(date) => date.toLocaleDateString()}
|
|
564
|
+
* </Timestamp>
|
|
565
|
+
*/
|
|
566
|
+
declare const Timestamp: React.ForwardRefExoticComponent<TimestampProps & React.RefAttributes<HTMLTimeElement>>;
|
|
567
|
+
|
|
564
568
|
/**
|
|
565
569
|
* @private For internal use only. Do not rely on this hook.
|
|
566
570
|
*
|
|
@@ -569,4 +573,4 @@ declare function LiveblocksUIConfig({ overrides, components, portalContainer, ch
|
|
|
569
573
|
*/
|
|
570
574
|
declare function useMentionSuggestions(search?: string): string[] | undefined;
|
|
571
575
|
|
|
572
|
-
export { Comment,
|
|
576
|
+
export { Comment, CommentOverrides, CommentProps, Composer, ComposerOverrides, ComposerProps, ComposerSubmitComment, GlobalOverrides, HistoryVersionSummary, HistoryVersionSummaryList, HistoryVersionSummaryListProps, HistoryVersionSummaryProps, InboxNotification, InboxNotificationAvatarProps, InboxNotificationCustomKindProps, InboxNotificationCustomProps, InboxNotificationIconProps, InboxNotificationList, InboxNotificationListProps, InboxNotificationOverrides, InboxNotificationProps, InboxNotificationTextMentionKindProps, InboxNotificationTextMentionProps, InboxNotificationThreadKindProps, InboxNotificationThreadProps, LiveblocksUIConfig, LocalizationOverrides, Overrides, Thread, ThreadOverrides, ThreadProps, Timestamp, useMentionSuggestions, useOverrides };
|