@homebound/beam 4.12.0 → 4.13.0

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
 
@@ -10965,10 +10967,12 @@ type FormSectionLayoutProps = {
10965
10967
  /** When true, wraps in {@link AiCard} and applies AI title styling. */
10966
10968
  aiMode?: boolean;
10967
10969
  /**
10968
- * When true, show a JumpLinks rail from section titles (needs 2+ includable sections; hidden on `sm`).
10970
+ * When true, show a JumpLinks rail from section titles (needs 2+ includable links; hidden on `sm`).
10969
10971
  * Default false — opt in for FocusedForm / Stepper form steps that want the rail.
10970
10972
  */
10971
10973
  withJumpLinks?: boolean;
10974
+ /** When true with `withJumpLinks`, prepend the form `title` as the first rail link. */
10975
+ includeTitleJumpLink?: boolean;
10972
10976
  /**
10973
10977
  * Opt into the document-scroll detail pane (`useRightPane`).
10974
10978
  * Hosts JumpLinks + form — do not also set `withRightPane` on the inner `CenteredLayout`.
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
 
@@ -10965,10 +10967,12 @@ type FormSectionLayoutProps = {
10965
10967
  /** When true, wraps in {@link AiCard} and applies AI title styling. */
10966
10968
  aiMode?: boolean;
10967
10969
  /**
10968
- * When true, show a JumpLinks rail from section titles (needs 2+ includable sections; hidden on `sm`).
10970
+ * When true, show a JumpLinks rail from section titles (needs 2+ includable links; hidden on `sm`).
10969
10971
  * Default false — opt in for FocusedForm / Stepper form steps that want the rail.
10970
10972
  */
10971
10973
  withJumpLinks?: boolean;
10974
+ /** When true with `withJumpLinks`, prepend the form `title` as the first rail link. */
10975
+ includeTitleJumpLink?: boolean;
10972
10976
  /**
10973
10977
  * Opt into the document-scroll detail pane (`useRightPane`).
10974
10978
  * Hosts JumpLinks + form — do not also set `withRightPane` on the inner `CenteredLayout`.
package/dist/index.js CHANGED
@@ -14867,10 +14867,11 @@ import { jsx as jsx62, jsxs as jsxs41 } from "react/jsx-runtime";
14867
14867
  function AiLoadingPanel(props) {
14868
14868
  const {
14869
14869
  title = "Importing Details...",
14870
- message = defaultMessage,
14871
- omitBg = false
14870
+ omitBg = false,
14871
+ progressText
14872
14872
  } = props;
14873
14873
  const tid = useTestIds(props, "aiLoadingPanel");
14874
+ 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
14875
  const card = (
14875
14876
  // `status` rather than `alert` so assistive tech waits for a pause instead of interrupting, and
14876
14877
  // `aria-busy` so it knows the surrounding content is still settling.
@@ -14885,12 +14886,31 @@ function AiLoadingPanel(props) {
14885
14886
  "--color": "var(--b-on-surface)"
14886
14887
  }],
14887
14888
  textAlign: "tac"
14888
- }), ...tid.message, children: message })
14889
+ }), ...tid.message, children: message }),
14890
+ progressText !== void 0 && /* @__PURE__ */ jsxs41("div", { ...trussProps42({
14891
+ width: "w100",
14892
+ display: "df",
14893
+ alignItems: "aic",
14894
+ justifyContent: "jcc",
14895
+ gap: "g_1",
14896
+ marginTop: "mt1",
14897
+ paddingTop: "pt2",
14898
+ borderTopStyle: "bts_solid",
14899
+ borderTopWidth: "btw_1px",
14900
+ borderColor: ["bc_var", {
14901
+ "--borderColor": "var(--b-surface-separator)"
14902
+ }],
14903
+ fontWeight: "fw4",
14904
+ fontSize: "fz_12px",
14905
+ lineHeight: "lh_16px"
14906
+ }), children: [
14907
+ /* @__PURE__ */ jsx62(Icon, { icon: "time", inc: 2 }),
14908
+ /* @__PURE__ */ jsx62("span", { ...tid.progressText, children: progressText })
14909
+ ] })
14889
14910
  ] }) })
14890
14911
  );
14891
14912
  return omitBg ? card : /* @__PURE__ */ jsx62(AiPanel, { padding: "lg", ...tid, children: card });
14892
14913
  }
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
14914
 
14895
14915
  // src/components/AiSlimBanner.tsx
14896
14916
  import { jsx as jsx63, jsxs as jsxs42 } from "react/jsx-runtime";
@@ -29081,6 +29101,7 @@ function FormSectionLayout(props) {
29081
29101
  sections,
29082
29102
  aiMode = false,
29083
29103
  withJumpLinks = false,
29104
+ includeTitleJumpLink = false,
29084
29105
  withRightPane
29085
29106
  } = props;
29086
29107
  const tid = useTestIds(props, "formSectionLayout");
@@ -29088,13 +29109,19 @@ function FormSectionLayout(props) {
29088
29109
  sm: isMobile
29089
29110
  } = useBreakpoint();
29090
29111
  const rightPane = resolveWithRightPaneOptions(withRightPane);
29091
- const jumpLinks = (sections ?? []).filter((section) => !section.excludeJumpLink).map((section) => {
29112
+ const formSectionLayoutTitleId = "formSectionLayoutTitle";
29113
+ const sectionLinks = (sections ?? []).filter((section) => !section.excludeJumpLink).map((section) => {
29092
29114
  const id = defaultTestId(section.title);
29093
29115
  return {
29094
29116
  id,
29095
29117
  label: section.title
29096
29118
  };
29097
29119
  });
29120
+ const titleAnchor = withJumpLinks && includeTitleJumpLink;
29121
+ const jumpLinks = [...titleAnchor ? [{
29122
+ id: formSectionLayoutTitleId,
29123
+ label: title
29124
+ }] : [], ...sectionLinks];
29098
29125
  const showRail = withJumpLinks && jumpLinks.length >= 2 && !isMobile;
29099
29126
  const activeId = useActiveJumpLink(showRail ? jumpLinks.map((link) => link.id) : []);
29100
29127
  const content2 = /* @__PURE__ */ jsxs123("div", { ...trussProps134({
@@ -29108,7 +29135,16 @@ function FormSectionLayout(props) {
29108
29135
  paddingLeft: "pl3"
29109
29136
  } : {}
29110
29137
  }), children: [
29111
- /* @__PURE__ */ jsxs123("div", { className: "df fdc g_3", children: [
29138
+ /* @__PURE__ */ jsxs123("div", { id: titleAnchor ? formSectionLayoutTitleId : void 0, ...trussProps134({
29139
+ display: "df",
29140
+ flexDirection: "fdc",
29141
+ gap: "g_3",
29142
+ ...titleAnchor ? {
29143
+ scrollMarginTop: ["scrollMarginTop_var", {
29144
+ "--scrollMarginTop": maybeCssVar67(stickyNavAndHeaderOffset())
29145
+ }]
29146
+ } : {}
29147
+ }), children: [
29112
29148
  /* @__PURE__ */ jsx230(ContentHeader, { ...tid, title, description, actions, withAutoSave, level: 2, aiMode }),
29113
29149
  initialFields
29114
29150
  ] }),