@homebound/beam 4.12.1 → 4.13.1

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
@@ -7881,11 +7881,13 @@ type AiLoadingPanelProps = {
7881
7881
  title?: string;
7882
7882
  message?: ReactNode;
7883
7883
  omitBg?: boolean;
7884
+ /** Caller-owned footer progress status, such as "usually takes 3 minutes". Hidden when unset. */
7885
+ progressText?: string;
7884
7886
  };
7885
7887
  /**
7886
7888
  * Tells the user AI work is running, and that they're free to go do something else.
7887
7889
  *
7888
- * Indeterminate — these steps don't report progress, so this never shows a percentage or ETA.
7890
+ * The spinner stays indeterminate. `progressText` is an optional status line the caller supplies to give the user a better idea of the progress.
7889
7891
  */
7890
7892
  declare function AiLoadingPanel(props: AiLoadingPanelProps): React$1.JSX.Element;
7891
7893
 
package/dist/index.d.ts CHANGED
@@ -7881,11 +7881,13 @@ type AiLoadingPanelProps = {
7881
7881
  title?: string;
7882
7882
  message?: ReactNode;
7883
7883
  omitBg?: boolean;
7884
+ /** Caller-owned footer progress status, such as "usually takes 3 minutes". Hidden when unset. */
7885
+ progressText?: string;
7884
7886
  };
7885
7887
  /**
7886
7888
  * Tells the user AI work is running, and that they're free to go do something else.
7887
7889
  *
7888
- * Indeterminate — these steps don't report progress, so this never shows a percentage or ETA.
7890
+ * The spinner stays indeterminate. `progressText` is an optional status line the caller supplies to give the user a better idea of the progress.
7889
7891
  */
7890
7892
  declare function AiLoadingPanel(props: AiLoadingPanelProps): React$1.JSX.Element;
7891
7893
 
package/dist/index.js CHANGED
@@ -13916,23 +13916,32 @@ function GridTable(props) {
13916
13916
  }
13917
13917
  return /* @__PURE__ */ jsx51(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ jsxs33(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
13918
13918
  /* @__PURE__ */ jsx51("div", { ref: resizeRef, ...trussProps33(getTableRefWidthStyles(as === "virtual", inDocumentScrollLayout)), ...tid.probe }),
13919
- loading && /* @__PURE__ */ jsx51("div", { ...trussProps33({
13920
- position: "fixed",
13921
- top: "top0",
13922
- right: "r_0",
13923
- bottom: "bot_0",
13924
- left: "l_0",
13925
- display: "df",
13926
- alignItems: "aic",
13927
- justifyContent: "jcc",
13928
- pointerEvents: "pen",
13929
- zIndex: ["z_var", {
13930
- "--zIndex": maybeCssVar22(zIndices.tableLoadingOverlay)
13931
- }]
13932
- }), ...tid.loadingOverlay, children: /* @__PURE__ */ jsx51(Loader, { ...tid.loadingSpinner }) }),
13919
+ loading && /* @__PURE__ */ jsx51("div", { ...trussProps33(loadingOverlayCss), ...tid.loadingOverlay, children: /* @__PURE__ */ jsx51(Loader, { ...tid.loadingSpinner }) }),
13933
13920
  as === "card" ? /* @__PURE__ */ jsx51(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition, loading }) : _as === "virtual" ? /* @__PURE__ */ jsx51(VirtualGridTableView, { style: tableStyle, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, persistScrollPosition, loading }) : renders[_as](tableStyle, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, loading, infiniteScroll, tableContainerRef, persistScrollPosition)
13934
13921
  ] }) });
13935
13922
  }
13923
+ var loadingOverlayCss = {
13924
+ position: "fixed",
13925
+ top: ["top_var", {
13926
+ "--top": maybeCssVar22(__maybeInc12(stickyTableHeaderOffset()))
13927
+ }],
13928
+ bottom: ["bottom_var", {
13929
+ "--bottom": maybeCssVar22(__maybeInc12(getFloatingBottomOffset()))
13930
+ }],
13931
+ left: ["left_var", {
13932
+ "--left": maybeCssVar22(__maybeInc12(documentScrollChromeLeft()))
13933
+ }],
13934
+ width: ["w_var", {
13935
+ "--width": maybeCssVar22(__maybeInc12(`calc(${documentScrollChromeWidth()} - var(${beamRightPaneWidthVar}, 0px))`))
13936
+ }],
13937
+ display: "df",
13938
+ alignItems: "aic",
13939
+ justifyContent: "jcc",
13940
+ pointerEvents: "pen",
13941
+ zIndex: ["z_var", {
13942
+ "--zIndex": maybeCssVar22(zIndices.tableLoadingOverlay)
13943
+ }]
13944
+ };
13936
13945
  var renders = {
13937
13946
  table: renderTable,
13938
13947
  div: renderDiv
@@ -14867,10 +14876,11 @@ import { jsx as jsx62, jsxs as jsxs41 } from "react/jsx-runtime";
14867
14876
  function AiLoadingPanel(props) {
14868
14877
  const {
14869
14878
  title = "Importing Details...",
14870
- message = defaultMessage,
14871
- omitBg = false
14879
+ omitBg = false,
14880
+ progressText
14872
14881
  } = props;
14873
14882
  const tid = useTestIds(props, "aiLoadingPanel");
14883
+ const message = props.message ?? `${progressText === void 0 ? "This process can take a few minutes. " : ""}Feel free to keep working in another tab. Once imported, you may edit or add to content before saving.`;
14874
14884
  const card = (
14875
14885
  // `status` rather than `alert` so assistive tech waits for a pause instead of interrupting, and
14876
14886
  // `aria-busy` so it knows the surrounding content is still settling.
@@ -14885,12 +14895,31 @@ function AiLoadingPanel(props) {
14885
14895
  "--color": "var(--b-on-surface)"
14886
14896
  }],
14887
14897
  textAlign: "tac"
14888
- }), ...tid.message, children: message })
14898
+ }), ...tid.message, children: message }),
14899
+ progressText !== void 0 && /* @__PURE__ */ jsxs41("div", { ...trussProps42({
14900
+ width: "w100",
14901
+ display: "df",
14902
+ alignItems: "aic",
14903
+ justifyContent: "jcc",
14904
+ gap: "g_1",
14905
+ marginTop: "mt1",
14906
+ paddingTop: "pt2",
14907
+ borderTopStyle: "bts_solid",
14908
+ borderTopWidth: "btw_1px",
14909
+ borderColor: ["bc_var", {
14910
+ "--borderColor": "var(--b-surface-separator)"
14911
+ }],
14912
+ fontWeight: "fw4",
14913
+ fontSize: "fz_12px",
14914
+ lineHeight: "lh_16px"
14915
+ }), children: [
14916
+ /* @__PURE__ */ jsx62(Icon, { icon: "time", inc: 2 }),
14917
+ /* @__PURE__ */ jsx62("span", { ...tid.progressText, children: progressText })
14918
+ ] })
14889
14919
  ] }) })
14890
14920
  );
14891
14921
  return omitBg ? card : /* @__PURE__ */ jsx62(AiPanel, { padding: "lg", ...tid, children: card });
14892
14922
  }
14893
- var defaultMessage = "This process can take a few minutes. Feel free to keep working in another tab. Once imported, you may edit or add to content before saving.";
14894
14923
 
14895
14924
  // src/components/AiSlimBanner.tsx
14896
14925
  import { jsx as jsx63, jsxs as jsxs42 } from "react/jsx-runtime";