@dxos/plugin-deck 0.7.3-staging.971cd8d → 0.7.3-staging.d887a4b

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.
@@ -33,7 +33,7 @@ import { Sidebar as MenuIcon } from "@phosphor-icons/react";
33
33
  import { untracked } from "@preact/signals-core";
34
34
  import React14, { useCallback as useCallback2, useEffect as useEffect5, useMemo as useMemo5, useRef as useRef2, Fragment as Fragment2 } from "react";
35
35
  import { Surface as Surface9, firstIdInPart, usePlugin } from "@dxos/app-framework";
36
- import { Button as Button3, Dialog, Main as Main3, Popover as Popover2, useOnTransition, useTranslation as useTranslation5 } from "@dxos/react-ui";
36
+ import { AlertDialog, Button as Button3, Dialog as NaturalDialog, Main as Main3, Popover as Popover2, useOnTransition, useTranslation as useTranslation5 } from "@dxos/react-ui";
37
37
  import { Stack, StackContext as StackContext2, DEFAULT_HORIZONTAL_SIZE } from "@dxos/react-ui-stack";
38
38
  import { getSize, mainPaddingTransitions as mainPaddingTransitions2 } from "@dxos/react-ui-theme";
39
39
 
@@ -786,7 +786,7 @@ var PlankSeparator = ({ index }) => index > 0 ? /* @__PURE__ */ React14.createEl
786
786
  }) : null;
787
787
  var DeckLayout = ({ layoutParts, toasts, overscroll, showHints, panels, onDismissToast }) => {
788
788
  const context = useLayout();
789
- const { layoutMode, sidebarOpen, complementarySidebarOpen, dialogOpen, dialogContent, dialogBlockAlign, popoverOpen, popoverContent, popoverAnchorId } = context;
789
+ const { layoutMode, sidebarOpen, complementarySidebarOpen, dialogOpen, dialogContent, dialogBlockAlign, dialogType, popoverOpen, popoverContent, popoverAnchorId } = context;
790
790
  const { t } = useTranslation5(DECK_PLUGIN);
791
791
  const { plankSizing } = useDeckContext();
792
792
  const attentionPlugin = usePlugin("dxos.org/plugin/attention");
@@ -836,6 +836,7 @@ var DeckLayout = ({ layoutParts, toasts, overscroll, showHints, panels, onDismis
836
836
  overscroll,
837
837
  layoutParts.main
838
838
  ]);
839
+ const Dialog = dialogType === "alert" ? AlertDialog : NaturalDialog;
839
840
  return /* @__PURE__ */ React14.createElement(Popover2.Root, {
840
841
  modal: true,
841
842
  open: !!(popoverAnchorId && popoverOpen),
@@ -1241,6 +1242,7 @@ var DeckPlugin = ({ observability } = {}) => {
1241
1242
  dialogContent: null,
1242
1243
  dialogOpen: false,
1243
1244
  dialogBlockAlign: void 0,
1245
+ dialogType: void 0,
1244
1246
  popoverContent: null,
1245
1247
  popoverAnchorId: void 0,
1246
1248
  popoverOpen: false,
@@ -1262,7 +1264,7 @@ var DeckPlugin = ({ observability } = {}) => {
1262
1264
  const layoutModeHistory = create({
1263
1265
  values: []
1264
1266
  });
1265
- const handleSetLayout = ({ element, state, component, subject, anchorId, dialogBlockAlign }) => {
1267
+ const handleSetLayout = ({ element, state, component, subject, anchorId, dialogBlockAlign, dialogType }) => {
1266
1268
  switch (element) {
1267
1269
  case "sidebar": {
1268
1270
  layout.values.sidebarOpen = state ?? !layout.values.sidebarOpen;
@@ -1283,6 +1285,7 @@ var DeckPlugin = ({ observability } = {}) => {
1283
1285
  subject
1284
1286
  } : null;
1285
1287
  layout.values.dialogBlockAlign = dialogBlockAlign ?? "center";
1288
+ layout.values.dialogType = dialogType;
1286
1289
  return {
1287
1290
  data: true
1288
1291
  };
@@ -1561,7 +1564,7 @@ var DeckPlugin = ({ observability } = {}) => {
1561
1564
  } else {
1562
1565
  log.warn("Invalid layout mode", intent?.data?.layoutMode, {
1563
1566
  F: __dxlog_file,
1564
- L: 409,
1567
+ L: 412,
1565
1568
  S: void 0,
1566
1569
  C: (f, a) => f(...a)
1567
1570
  });