@flytedan/flytebot-design-system 0.90.0 → 0.91.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
@@ -4754,6 +4754,8 @@ interface AgentChatPanelProps {
4754
4754
  usageLimits?: UsageLimit[];
4755
4755
  models?: Model[];
4756
4756
  moreModels?: Model[];
4757
+ /** The model menu's heading. Default "Models". */
4758
+ modelsHeading?: string;
4757
4759
  model?: string;
4758
4760
  onModelChange?: (id: string) => void;
4759
4761
  effortLevels?: string[];
@@ -4789,7 +4791,7 @@ interface AgentChatPanelProps {
4789
4791
  * renders only when its input is supplied. A panel with no telemetry shows no
4790
4792
  * telemetry, not zeroes.
4791
4793
  */
4792
- declare function AgentChatPanel({ contextType, contextId, draftOwner, apiAdapter, threadId, reloadKey, title, subtitle, showHeader, headerActions, onClose, assistantName, userName, assistantAvatar, userAvatar, assistantIcon, showAvatars, markdown, maxVisibleChars, messageActions, showSteps, showThinking, emptyTitle, emptyDescription, emptyIcon, suggestions, renderEmpty, packetSchemas, packetRenderers, packetDecisions, onApplyPacket, pendingTimeoutMs, describeWaiting, onOpenAttachment, errorCopy, placeholder, maxLength, hint, fileUploadHandler, acceptFiles, maxFileSize, largePasteThreshold, slashCommands, mentionSources, voiceHandler, initialMessage, contextUsage, sessionStats, usageLimits, models, model, onModelChange, effortLevels, effort, onEffortChange, fastMode, onFastModeChange, moreModels, threads, onSelectThread, onNewThread, onDeleteThread, surface, height, className, style, onPacket, onThreadReady, onError, onSend, onClear, onFeedback, onEditMessage, }: AgentChatPanelProps): React.JSX.Element;
4794
+ declare function AgentChatPanel({ contextType, contextId, draftOwner, apiAdapter, threadId, reloadKey, title, subtitle, showHeader, headerActions, onClose, assistantName, userName, assistantAvatar, userAvatar, assistantIcon, showAvatars, markdown, maxVisibleChars, messageActions, showSteps, showThinking, emptyTitle, emptyDescription, emptyIcon, suggestions, renderEmpty, packetSchemas, packetRenderers, packetDecisions, onApplyPacket, pendingTimeoutMs, describeWaiting, onOpenAttachment, errorCopy, placeholder, maxLength, hint, fileUploadHandler, acceptFiles, maxFileSize, largePasteThreshold, slashCommands, mentionSources, voiceHandler, initialMessage, contextUsage, sessionStats, usageLimits, models, model, onModelChange, effortLevels, effort, onEffortChange, fastMode, onFastModeChange, moreModels, modelsHeading, threads, onSelectThread, onNewThread, onDeleteThread, surface, height, className, style, onPacket, onThreadReady, onError, onSend, onClear, onFeedback, onEditMessage, }: AgentChatPanelProps): React.JSX.Element;
4793
4795
 
4794
4796
  /**
4795
4797
  * Staged files, the queue strip, the markdown editor, slash/mention triggers, send + stop.
@@ -4872,13 +4874,15 @@ interface ModelControlsProps {
4872
4874
  fastModeLabel?: string;
4873
4875
  /** Collapsed into a submenu. */
4874
4876
  moreModels?: Model[];
4877
+ /** The menu's heading over the models: what they are called where the app uses them (sizes, say). */
4878
+ modelsHeading?: string;
4875
4879
  narrow?: boolean;
4876
4880
  }
4877
4881
  /**
4878
4882
  * Model picker (+ optional effort and fast-mode). Renders only when `models` is
4879
4883
  * supplied. Shortcuts are hints; the app registers the real keys.
4880
4884
  */
4881
- declare function ModelControls({ models, model, onModelChange, effortLevels, effort, onEffortChange, fastMode, onFastModeChange, fastModeLabel, moreModels, narrow: _narrow, }: ModelControlsProps): React.JSX.Element | null;
4885
+ declare function ModelControls({ models, model, onModelChange, effortLevels, effort, onEffortChange, fastMode, onFastModeChange, fastModeLabel, moreModels, modelsHeading, narrow: _narrow, }: ModelControlsProps): React.JSX.Element | null;
4882
4886
 
4883
4887
  /**
4884
4888
  * Render context, built once by AgentChatPanel and threaded into every part.
package/dist/index.d.ts CHANGED
@@ -4754,6 +4754,8 @@ interface AgentChatPanelProps {
4754
4754
  usageLimits?: UsageLimit[];
4755
4755
  models?: Model[];
4756
4756
  moreModels?: Model[];
4757
+ /** The model menu's heading. Default "Models". */
4758
+ modelsHeading?: string;
4757
4759
  model?: string;
4758
4760
  onModelChange?: (id: string) => void;
4759
4761
  effortLevels?: string[];
@@ -4789,7 +4791,7 @@ interface AgentChatPanelProps {
4789
4791
  * renders only when its input is supplied. A panel with no telemetry shows no
4790
4792
  * telemetry, not zeroes.
4791
4793
  */
4792
- declare function AgentChatPanel({ contextType, contextId, draftOwner, apiAdapter, threadId, reloadKey, title, subtitle, showHeader, headerActions, onClose, assistantName, userName, assistantAvatar, userAvatar, assistantIcon, showAvatars, markdown, maxVisibleChars, messageActions, showSteps, showThinking, emptyTitle, emptyDescription, emptyIcon, suggestions, renderEmpty, packetSchemas, packetRenderers, packetDecisions, onApplyPacket, pendingTimeoutMs, describeWaiting, onOpenAttachment, errorCopy, placeholder, maxLength, hint, fileUploadHandler, acceptFiles, maxFileSize, largePasteThreshold, slashCommands, mentionSources, voiceHandler, initialMessage, contextUsage, sessionStats, usageLimits, models, model, onModelChange, effortLevels, effort, onEffortChange, fastMode, onFastModeChange, moreModels, threads, onSelectThread, onNewThread, onDeleteThread, surface, height, className, style, onPacket, onThreadReady, onError, onSend, onClear, onFeedback, onEditMessage, }: AgentChatPanelProps): React.JSX.Element;
4794
+ declare function AgentChatPanel({ contextType, contextId, draftOwner, apiAdapter, threadId, reloadKey, title, subtitle, showHeader, headerActions, onClose, assistantName, userName, assistantAvatar, userAvatar, assistantIcon, showAvatars, markdown, maxVisibleChars, messageActions, showSteps, showThinking, emptyTitle, emptyDescription, emptyIcon, suggestions, renderEmpty, packetSchemas, packetRenderers, packetDecisions, onApplyPacket, pendingTimeoutMs, describeWaiting, onOpenAttachment, errorCopy, placeholder, maxLength, hint, fileUploadHandler, acceptFiles, maxFileSize, largePasteThreshold, slashCommands, mentionSources, voiceHandler, initialMessage, contextUsage, sessionStats, usageLimits, models, model, onModelChange, effortLevels, effort, onEffortChange, fastMode, onFastModeChange, moreModels, modelsHeading, threads, onSelectThread, onNewThread, onDeleteThread, surface, height, className, style, onPacket, onThreadReady, onError, onSend, onClear, onFeedback, onEditMessage, }: AgentChatPanelProps): React.JSX.Element;
4793
4795
 
4794
4796
  /**
4795
4797
  * Staged files, the queue strip, the markdown editor, slash/mention triggers, send + stop.
@@ -4872,13 +4874,15 @@ interface ModelControlsProps {
4872
4874
  fastModeLabel?: string;
4873
4875
  /** Collapsed into a submenu. */
4874
4876
  moreModels?: Model[];
4877
+ /** The menu's heading over the models: what they are called where the app uses them (sizes, say). */
4878
+ modelsHeading?: string;
4875
4879
  narrow?: boolean;
4876
4880
  }
4877
4881
  /**
4878
4882
  * Model picker (+ optional effort and fast-mode). Renders only when `models` is
4879
4883
  * supplied. Shortcuts are hints; the app registers the real keys.
4880
4884
  */
4881
- declare function ModelControls({ models, model, onModelChange, effortLevels, effort, onEffortChange, fastMode, onFastModeChange, fastModeLabel, moreModels, narrow: _narrow, }: ModelControlsProps): React.JSX.Element | null;
4885
+ declare function ModelControls({ models, model, onModelChange, effortLevels, effort, onEffortChange, fastMode, onFastModeChange, fastModeLabel, moreModels, modelsHeading, narrow: _narrow, }: ModelControlsProps): React.JSX.Element | null;
4882
4886
 
4883
4887
  /**
4884
4888
  * Render context, built once by AgentChatPanel and threaded into every part.
package/dist/index.js CHANGED
@@ -3622,6 +3622,7 @@ function RowActionCell({ action }) {
3622
3622
  var cellOf = (c, row) => c.render ? c.render(row) : row[c.key];
3623
3623
  var cellClassOf = (c) => [c.numeric ? "is-num" : "", c.noWrap ? "fd-table-nowrap" : ""].filter(Boolean).join(" ") || void 0;
3624
3624
  var cardCellOf = (c, row) => c.phoneRender ? c.phoneRender(row) : cellOf(c, row);
3625
+ var hasContent = (node) => node !== null && node !== void 0 && typeof node !== "boolean" && node !== "";
3625
3626
  function rowInteraction(row, onRowClick) {
3626
3627
  if (!onRowClick) return {};
3627
3628
  return {
@@ -3753,6 +3754,7 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
3753
3754
  ] }) }, i)) : rows.map((r) => {
3754
3755
  const selected = isSelected(r);
3755
3756
  const action = rowAction ? rowAction(r) : null;
3757
+ const metaItems = secondary.map((c) => ({ column: c, cell: cardCellOf(c, r) })).filter((item2) => hasContent(item2.cell));
3756
3758
  const semantics = onRowClick ? { role: "button", "aria-pressed": selected } : { "aria-current": selected ? "true" : void 0 };
3757
3759
  return /* @__PURE__ */ jsxs40("div", { className: "fd-dt-item", children: [
3758
3760
  /* @__PURE__ */ jsxs40(
@@ -3765,10 +3767,10 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
3765
3767
  ...rowInteraction(r, onRowClick),
3766
3768
  children: [
3767
3769
  /* @__PURE__ */ jsx50("div", { className: "fd-dt-card-title", children: primary.map((c) => /* @__PURE__ */ jsx50("span", { className: c.numeric ? "is-num" : void 0, children: cardCellOf(c, r) }, c.key)) }),
3768
- secondary.length ? /* @__PURE__ */ jsx50("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ jsxs40("span", { className: cellClassOf(c), children: [
3770
+ metaItems.length ? /* @__PURE__ */ jsx50("div", { className: "fd-dt-card-meta", children: metaItems.map(({ column: c, cell }) => /* @__PURE__ */ jsxs40("span", { className: cellClassOf(c), children: [
3769
3771
  /* @__PURE__ */ jsx50("span", { className: "fd-dt-card-label", children: c.label }),
3770
3772
  " ",
3771
- cardCellOf(c, r)
3773
+ cell
3772
3774
  ] }, c.key)) }) : null
3773
3775
  ]
3774
3776
  }
@@ -14492,6 +14494,7 @@ function ModelControls({
14492
14494
  onFastModeChange,
14493
14495
  fastModeLabel = "Enable fast mode",
14494
14496
  moreModels,
14497
+ modelsHeading = "Models",
14495
14498
  narrow: _narrow
14496
14499
  }) {
14497
14500
  if (!models || !models.length) return null;
@@ -14515,7 +14518,7 @@ function ModelControls({
14515
14518
  shortcut: m.shortcut ? /* @__PURE__ */ jsx111(KeyHint, { keys: m.shortcut, size: "sm" }) : void 0,
14516
14519
  onSelect: () => onModelChange && onModelChange(m.id)
14517
14520
  });
14518
- const items = [{ kind: "section", label: "Models" }].concat(flat.map(item2));
14521
+ const items = [{ kind: "section", label: modelsHeading }].concat(flat.map(item2));
14519
14522
  Object.keys(grouped).forEach((g) => {
14520
14523
  items.push({ id: "grp_" + g, label: g, icon: "stack", submenu: grouped[g].map(item2) });
14521
14524
  });
@@ -14632,6 +14635,7 @@ function AgentChatPanel({
14632
14635
  fastMode,
14633
14636
  onFastModeChange,
14634
14637
  moreModels,
14638
+ modelsHeading,
14635
14639
  /* threads */
14636
14640
  threads,
14637
14641
  onSelectThread,
@@ -14731,6 +14735,7 @@ function AgentChatPanel({
14731
14735
  fastMode,
14732
14736
  onFastModeChange,
14733
14737
  moreModels,
14738
+ modelsHeading,
14734
14739
  narrow
14735
14740
  }
14736
14741
  );