@dxos/plugin-deck 0.7.5-labs.f5080a1 → 0.7.5-labs.ff2ff30
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/{chunk-BTDY6SES.mjs → chunk-23KS5L3I.mjs} +8 -3
- package/dist/lib/browser/{chunk-BTDY6SES.mjs.map → chunk-23KS5L3I.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-FZOBKOA2.mjs → chunk-LCGBKOTZ.mjs} +6 -6
- package/dist/lib/browser/{chunk-M2L53AIH.mjs → chunk-PTLNGUND.mjs} +2 -2
- package/dist/lib/browser/{chunk-M2L53AIH.mjs.map → chunk-PTLNGUND.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/{intent-resolver-CSXFDKTC.mjs → intent-resolver-3HEWSJIM.mjs} +8 -5
- package/dist/lib/browser/{intent-resolver-CSXFDKTC.mjs.map → intent-resolver-3HEWSJIM.mjs.map} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-root-HIHLRMCW.mjs → react-root-YXW3ICOO.mjs} +4 -4
- package/dist/lib/browser/{react-surface-4QVWKQYY.mjs → react-surface-M4OZ4WV7.mjs} +4 -4
- package/dist/lib/browser/{settings-WACNLCPB.mjs → settings-CRQTVMN3.mjs} +2 -2
- package/dist/lib/browser/{state-VPOYUKK6.mjs → state-YEQA3IIB.mjs} +2 -2
- package/dist/lib/browser/types.mjs +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +2 -2
- package/dist/types/src/capabilities/set-active.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +1 -1
- package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
- package/dist/types/src/hooks/useNode.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +1 -1
- package/package.json +29 -30
- package/src/capabilities/intent-resolver.ts +3 -3
- package/src/capabilities/set-active.ts +4 -0
- package/src/components/DeckLayout/DeckLayout.tsx +13 -3
- package/src/hooks/useNode.ts +3 -1
- package/src/types.ts +1 -1
- /package/dist/lib/browser/{chunk-FZOBKOA2.mjs.map → chunk-LCGBKOTZ.mjs.map} +0 -0
- /package/dist/lib/browser/{react-root-HIHLRMCW.mjs.map → react-root-YXW3ICOO.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-4QVWKQYY.mjs.map → react-surface-M4OZ4WV7.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-WACNLCPB.mjs.map → settings-CRQTVMN3.mjs.map} +0 -0
- /package/dist/lib/browser/{state-VPOYUKK6.mjs.map → state-YEQA3IIB.mjs.map} +0 -0
|
@@ -149,16 +149,16 @@ export default (context: PluginsContext) =>
|
|
|
149
149
|
const current = deck.solo ? [deck.solo] : deck.active;
|
|
150
150
|
// When un-soloing, the solo entry is added to the deck.
|
|
151
151
|
const next = (
|
|
152
|
-
mode
|
|
152
|
+
mode !== 'deck' ? [subject ?? deck.solo ?? deck.active[0]] : [...deck.active, deck.solo]
|
|
153
153
|
).filter(nonNullable);
|
|
154
154
|
|
|
155
155
|
const removed = current.filter((id) => !next.includes(id));
|
|
156
156
|
const closed = Array.from(new Set([...deck.inactive.filter((id) => !next.includes(id)), ...removed]));
|
|
157
157
|
deck.inactive = closed;
|
|
158
158
|
|
|
159
|
-
if (mode
|
|
159
|
+
if (mode !== 'deck' && next[0]) {
|
|
160
160
|
deck.solo = next[0];
|
|
161
|
-
} else if (mode
|
|
161
|
+
} else if (mode === 'deck' && deck.solo) {
|
|
162
162
|
deck.solo = undefined;
|
|
163
163
|
deck.initialized = true;
|
|
164
164
|
}
|
|
@@ -28,6 +28,10 @@ export const setActive = ({ next, state, attention }: SetActiveOptions) => {
|
|
|
28
28
|
state.deck.active = next;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
if (state.deck.fullscreen && !state.deck.solo) {
|
|
32
|
+
state.deck.fullscreen = false;
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
if (attention) {
|
|
32
36
|
const attended = attention.current;
|
|
33
37
|
const [attendedId] = Array.from(attended);
|
|
@@ -290,10 +290,20 @@ export const DeckLayout = ({ overscroll, showHints, panels, onDismissToast }: De
|
|
|
290
290
|
</Popover.Portal>
|
|
291
291
|
|
|
292
292
|
{/* Global dialog. */}
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
{/* TODO(thure): End block alignment affecting `modal` and whether the surface renders in an overlay is tailored
|
|
294
|
+
to the needs of the ambient chat dialog. As the feature matures, consider separating concerns. */}
|
|
295
|
+
<Dialog.Root
|
|
296
|
+
modal={dialogBlockAlign !== 'end'}
|
|
297
|
+
open={dialogOpen}
|
|
298
|
+
onOpenChange={(nextOpen) => (context.dialogOpen = nextOpen)}
|
|
299
|
+
>
|
|
300
|
+
{dialogBlockAlign === 'end' ? (
|
|
295
301
|
<Surface role='dialog' data={dialogContent} limit={1} />
|
|
296
|
-
|
|
302
|
+
) : (
|
|
303
|
+
<Dialog.Overlay blockAlign={dialogBlockAlign}>
|
|
304
|
+
<Surface role='dialog' data={dialogContent} limit={1} />
|
|
305
|
+
</Dialog.Overlay>
|
|
306
|
+
)}
|
|
297
307
|
</Dialog.Root>
|
|
298
308
|
|
|
299
309
|
{/* Global toasts. */}
|
package/src/hooks/useNode.ts
CHANGED
|
@@ -34,7 +34,9 @@ export const useNode = <T = any>(graph: Graph, id?: string, timeout?: number): N
|
|
|
34
34
|
if (node) {
|
|
35
35
|
setNodeState(node);
|
|
36
36
|
}
|
|
37
|
-
} catch {
|
|
37
|
+
} catch {
|
|
38
|
+
// TODO(ZaymonFC): This leaves the resolved node in an invalid state in the case of a timeout.
|
|
39
|
+
}
|
|
38
40
|
});
|
|
39
41
|
|
|
40
42
|
return () => cancelAnimationFrame(frame);
|
package/src/types.ts
CHANGED
|
@@ -60,7 +60,7 @@ export const DeckState = S.mutable(
|
|
|
60
60
|
* Data to be passed to the dialog Surface.
|
|
61
61
|
*/
|
|
62
62
|
dialogContent: S.optional(S.Any),
|
|
63
|
-
dialogBlockAlign: S.optional(S.Literal('start', 'center')),
|
|
63
|
+
dialogBlockAlign: S.optional(S.Literal('start', 'center', 'end')),
|
|
64
64
|
dialogType: S.optional(S.Literal('default', 'alert')),
|
|
65
65
|
|
|
66
66
|
popoverOpen: S.Boolean,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|