@flytedan/flytebot-design-system 0.87.2 → 0.87.3

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.d.cts CHANGED
@@ -5883,13 +5883,19 @@ declare function useCopyToClipboard(): [boolean, (text: string) => Promise<boole
5883
5883
  * top of each other; instead each renders into its own slot of this single stack, and the
5884
5884
  * stack lays the slots out one above the next.
5885
5885
  *
5886
- * The stack is fixed, so it takes no room in the page and would cover whatever scrolls
5887
- * beneath it. While a surface is showing it therefore publishes how far it reaches up from
5886
+ * The slots do not share a layer. The toasts are fixed at OVERLAY_CEILING: a message about what a
5887
+ * person just did is read over everything. The jobs slot sits just under the first overlay layer:
5888
+ * above the page, below every menu, popover, dialog and drawer, so a menu that opens over the bottom
5889
+ * of the page is never hidden by the tray, and the tray never covers one.
5890
+ *
5891
+ * The slots are fixed, so they take no room in the page and would cover whatever scrolls
5892
+ * beneath it. While the job tray is showing it therefore publishes how far it reaches up from
5888
5893
  * the viewport's bottom edge as `--fd-corner-stack-inset` on the document element, and the
5889
5894
  * app shell's content scroller adds that to its bottom padding: the last of the content can
5890
5895
  * always be scrolled clear of it.
5891
5896
  */
5892
- /** The custom property carrying the stack's reach up from the viewport bottom (0px when no surface shows). */
5897
+ /** The custom property carrying the job tray's reach up from the viewport bottom (0px when it is not showing). The toasts
5898
+ * stack above it, and the page scrolls clear of it; the toasts, which leave on their own, add no padding. */
5893
5899
  declare const CORNER_STACK_INSET_PROPERTY = "--fd-corner-stack-inset";
5894
5900
  /** Bottom to top: a surface earlier in this list sits closer to the corner. */
5895
5901
  declare const SLOTS: readonly ["jobs", "toasts"];
@@ -6048,7 +6054,8 @@ interface UseExportJobsOptions {
6048
6054
  }
6049
6055
  interface UseExportJobsResult {
6050
6056
  exports: ExportJob[];
6051
- /** Dismisses the export and re-reads the list. */
6057
+ /** Dismisses the export: it leaves the list at once, the server is told, and the list is re-read (which also puts the
6058
+ * export back if the server could not be told). */
6052
6059
  ackExport: (id: string) => void;
6053
6060
  /** Reads the list now instead of at the next poll: an export started elsewhere shows at once. */
6054
6061
  refresh: () => void;
package/dist/index.d.ts CHANGED
@@ -5883,13 +5883,19 @@ declare function useCopyToClipboard(): [boolean, (text: string) => Promise<boole
5883
5883
  * top of each other; instead each renders into its own slot of this single stack, and the
5884
5884
  * stack lays the slots out one above the next.
5885
5885
  *
5886
- * The stack is fixed, so it takes no room in the page and would cover whatever scrolls
5887
- * beneath it. While a surface is showing it therefore publishes how far it reaches up from
5886
+ * The slots do not share a layer. The toasts are fixed at OVERLAY_CEILING: a message about what a
5887
+ * person just did is read over everything. The jobs slot sits just under the first overlay layer:
5888
+ * above the page, below every menu, popover, dialog and drawer, so a menu that opens over the bottom
5889
+ * of the page is never hidden by the tray, and the tray never covers one.
5890
+ *
5891
+ * The slots are fixed, so they take no room in the page and would cover whatever scrolls
5892
+ * beneath it. While the job tray is showing it therefore publishes how far it reaches up from
5888
5893
  * the viewport's bottom edge as `--fd-corner-stack-inset` on the document element, and the
5889
5894
  * app shell's content scroller adds that to its bottom padding: the last of the content can
5890
5895
  * always be scrolled clear of it.
5891
5896
  */
5892
- /** The custom property carrying the stack's reach up from the viewport bottom (0px when no surface shows). */
5897
+ /** The custom property carrying the job tray's reach up from the viewport bottom (0px when it is not showing). The toasts
5898
+ * stack above it, and the page scrolls clear of it; the toasts, which leave on their own, add no padding. */
5893
5899
  declare const CORNER_STACK_INSET_PROPERTY = "--fd-corner-stack-inset";
5894
5900
  /** Bottom to top: a surface earlier in this list sits closer to the corner. */
5895
5901
  declare const SLOTS: readonly ["jobs", "toasts"];
@@ -6048,7 +6054,8 @@ interface UseExportJobsOptions {
6048
6054
  }
6049
6055
  interface UseExportJobsResult {
6050
6056
  exports: ExportJob[];
6051
- /** Dismisses the export and re-reads the list. */
6057
+ /** Dismisses the export: it leaves the list at once, the server is told, and the list is re-read (which also puts the
6058
+ * export back if the server could not be told). */
6052
6059
  ackExport: (id: string) => void;
6053
6060
  /** Reads the list now instead of at the next poll: an export started elsewhere shows at once. */
6054
6061
  refresh: () => void;
package/dist/index.js CHANGED
@@ -1598,33 +1598,36 @@ import * as React19 from "react";
1598
1598
  import * as React18 from "react";
1599
1599
  import { createPortal as createPortal4 } from "react-dom";
1600
1600
  var CORNER_STACK_INSET_PROPERTY = "--fd-corner-stack-inset";
1601
+ var JOBS_LAYER = ROOT_STEP - 1;
1601
1602
  var SLOTS = ["jobs", "toasts"];
1602
1603
  var references = /* @__PURE__ */ new Map();
1603
1604
  var host = null;
1604
1605
  var hostObserver = null;
1605
1606
  var slotElements = /* @__PURE__ */ new Map();
1607
+ var SLOT_LAYERS = { jobs: JOBS_LAYER, toasts: OVERLAY_CEILING };
1606
1608
  function createHost() {
1607
1609
  const stack = document.createElement("div");
1608
1610
  stack.className = "fd-corner-stack";
1609
- stack.style.zIndex = String(OVERLAY_CEILING);
1610
1611
  for (const slot of SLOTS) {
1611
1612
  const element = document.createElement("div");
1612
1613
  element.className = "fd-corner-stack-slot";
1613
1614
  element.dataset.cornerStackSlot = slot;
1615
+ element.style.zIndex = String(SLOT_LAYERS[slot]);
1614
1616
  stack.appendChild(element);
1615
1617
  slotElements.set(slot, element);
1616
1618
  }
1617
1619
  document.body.appendChild(stack);
1618
- publishInset(stack);
1620
+ const jobs2 = slotElements.get("jobs");
1621
+ publishInset(jobs2);
1619
1622
  if (typeof ResizeObserver === "function") {
1620
- hostObserver = new ResizeObserver(() => publishInset(stack));
1621
- hostObserver.observe(stack);
1623
+ hostObserver = new ResizeObserver(() => publishInset(jobs2));
1624
+ hostObserver.observe(jobs2);
1622
1625
  }
1623
1626
  return stack;
1624
1627
  }
1625
- function publishInset(stack) {
1626
- const height = stack.offsetHeight;
1627
- const inset = height > 0 ? height + parseFloat(getComputedStyle(stack).bottom) : 0;
1628
+ function publishInset(jobs2) {
1629
+ const height = jobs2.offsetHeight;
1630
+ const inset = height > 0 ? height + parseFloat(getComputedStyle(jobs2).bottom) : 0;
1628
1631
  document.documentElement.style.setProperty(CORNER_STACK_INSET_PROPERTY, `${inset}px`);
1629
1632
  }
1630
1633
  function acquire(slot) {
@@ -16288,7 +16291,10 @@ function useExportJobs({ list, acknowledge }) {
16288
16291
  }, [anyLive, reload]);
16289
16292
  const refresh2 = React95.useCallback(() => void reload(), [reload]);
16290
16293
  const ackExport = React95.useCallback(
16291
- (id) => void acknowledgeRef.current(id).then(reload),
16294
+ (id) => {
16295
+ setRows((current2) => current2.filter((row) => row.id !== id));
16296
+ void acknowledgeRef.current(id).then(reload, reload);
16297
+ },
16292
16298
  [acknowledgeRef, reload]
16293
16299
  );
16294
16300
  return { exports: rows, ackExport, refresh: refresh2 };