@dxos/plugin-space 0.6.8-staging.77f93a3 → 0.6.8-staging.dec6b33
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/lib/browser/index.mjs +9 -30
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +8 -29
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/components/SpacePresence.d.ts +2 -4
- package/dist/types/src/components/SpacePresence.d.ts.map +1 -1
- package/package.json +28 -28
- package/src/SpacePlugin.tsx +1 -11
- package/src/components/SpacePresence.tsx +5 -15
|
@@ -1243,7 +1243,7 @@ import { PublicKey, useClient as useClient3 } from "@dxos/react-client";
|
|
|
1243
1243
|
import { getSpace as getSpace3, useMembers as useMembers2, fullyQualifiedId as fullyQualifiedId3 } from "@dxos/react-client/echo";
|
|
1244
1244
|
import { useIdentity } from "@dxos/react-client/halo";
|
|
1245
1245
|
import { Avatar, AvatarGroup, AvatarGroupItem, Tooltip as Tooltip2, useDensityContext, useTranslation as useTranslation14, List as List2, ListItem, useDefaultValue } from "@dxos/react-ui";
|
|
1246
|
-
import {
|
|
1246
|
+
import { AttentionGlyph } from "@dxos/react-ui-attention";
|
|
1247
1247
|
import { ComplexMap, keyToFallback } from "@dxos/util";
|
|
1248
1248
|
var REFRESH_INTERVAL = 5e3;
|
|
1249
1249
|
var ACTIVITY_DURATION = 3e4;
|
|
@@ -1351,7 +1351,7 @@ var PrensenceAvatar = ({ identity, showName, match, group, index, onClick }) =>
|
|
|
1351
1351
|
classNames: "text-sm truncate pli-2"
|
|
1352
1352
|
}, getName(identity)));
|
|
1353
1353
|
};
|
|
1354
|
-
var SmallPresenceLive = ({ viewers
|
|
1354
|
+
var SmallPresenceLive = ({ viewers }) => {
|
|
1355
1355
|
const [moment, setMoment] = useState7(Date.now());
|
|
1356
1356
|
useEffect4(() => {
|
|
1357
1357
|
const interval = setInterval(() => setMoment(Date.now()), REFRESH_INTERVAL);
|
|
@@ -1359,18 +1359,16 @@ var SmallPresenceLive = ({ viewers, onCloseClick }) => {
|
|
|
1359
1359
|
}, []);
|
|
1360
1360
|
const activeViewers = viewers ? Array.from(viewers.values()).filter(({ lastSeen }) => moment - lastSeen < ACTIVITY_DURATION) : [];
|
|
1361
1361
|
return /* @__PURE__ */ React15.createElement(SmallPresence, {
|
|
1362
|
-
count: activeViewers.length
|
|
1363
|
-
onCloseClick
|
|
1362
|
+
count: activeViewers.length
|
|
1364
1363
|
});
|
|
1365
1364
|
};
|
|
1366
|
-
var SmallPresence = ({ count
|
|
1365
|
+
var SmallPresence = ({ count }) => {
|
|
1367
1366
|
const { t } = useTranslation14(SPACE_PLUGIN);
|
|
1368
1367
|
return /* @__PURE__ */ React15.createElement(Tooltip2.Root, null, /* @__PURE__ */ React15.createElement(Tooltip2.Trigger, {
|
|
1369
1368
|
asChild: true
|
|
1370
|
-
}, /* @__PURE__ */ React15.createElement(
|
|
1369
|
+
}, /* @__PURE__ */ React15.createElement(AttentionGlyph, {
|
|
1371
1370
|
presence: count > 1 ? "many" : count === 1 ? "one" : "none",
|
|
1372
|
-
classNames: "self-center mie-1"
|
|
1373
|
-
onClick: onCloseClick
|
|
1371
|
+
classNames: "self-center mie-1"
|
|
1374
1372
|
})), /* @__PURE__ */ React15.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React15.createElement(Tooltip2.Content, {
|
|
1375
1373
|
side: "bottom",
|
|
1376
1374
|
classNames: "z-[70]"
|
|
@@ -1575,7 +1573,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
|
|
|
1575
1573
|
err: err.message
|
|
1576
1574
|
}, {
|
|
1577
1575
|
F: __dxlog_file3,
|
|
1578
|
-
L:
|
|
1576
|
+
L: 222,
|
|
1579
1577
|
S: void 0,
|
|
1580
1578
|
C: (f, a) => f(...a)
|
|
1581
1579
|
});
|
|
@@ -1764,26 +1762,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
|
|
|
1764
1762
|
return null;
|
|
1765
1763
|
case "presence--glyph": {
|
|
1766
1764
|
return isReactiveObject2(data.object) ? /* @__PURE__ */ React17.createElement(SmallPresenceLive, {
|
|
1767
|
-
viewers: state.values.viewersByObject[fullyQualifiedId4(data.object)]
|
|
1768
|
-
onCloseClick: () => {
|
|
1769
|
-
const objectId = fullyQualifiedId4(data.object);
|
|
1770
|
-
return intentPlugin?.provides.intent.dispatch({
|
|
1771
|
-
action: NavigationAction3.CLOSE,
|
|
1772
|
-
data: {
|
|
1773
|
-
activeParts: {
|
|
1774
|
-
main: [
|
|
1775
|
-
objectId
|
|
1776
|
-
],
|
|
1777
|
-
sidebar: [
|
|
1778
|
-
objectId
|
|
1779
|
-
],
|
|
1780
|
-
complementary: [
|
|
1781
|
-
objectId
|
|
1782
|
-
]
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
});
|
|
1786
|
-
}
|
|
1765
|
+
viewers: state.values.viewersByObject[fullyQualifiedId4(data.object)]
|
|
1787
1766
|
}) : /* @__PURE__ */ React17.createElement(SmallPresence, {
|
|
1788
1767
|
count: 0
|
|
1789
1768
|
});
|
|
@@ -1882,7 +1861,7 @@ var SpacePlugin = ({ firstRun, onFirstRun } = {}) => {
|
|
|
1882
1861
|
} else {
|
|
1883
1862
|
log2.warn("spaces order object not found", void 0, {
|
|
1884
1863
|
F: __dxlog_file3,
|
|
1885
|
-
L:
|
|
1864
|
+
L: 516,
|
|
1886
1865
|
S: void 0,
|
|
1887
1866
|
C: (f, a) => f(...a)
|
|
1888
1867
|
});
|