@flamingo-stack/openframe-frontend-core 0.0.821 → 0.0.823

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.
Files changed (68) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/chat-protocol/citation-chip.d.ts +20 -0
  3. package/dist/chat-protocol/citation-chip.d.ts.map +1 -0
  4. package/dist/chat-protocol/citation-chip.js +25 -0
  5. package/dist/chat-protocol/index.cjs +25 -0
  6. package/dist/chat-protocol/index.d.ts +1 -0
  7. package/dist/chat-protocol/index.d.ts.map +1 -1
  8. package/dist/chat-protocol/index.js +1 -0
  9. package/dist/{chunk-YCE7A63X.cjs → chunk-2LT2WR4O.cjs} +24 -13
  10. package/dist/{chunk-OEKVCVOS.cjs → chunk-2U6MAM6D.cjs} +47 -47
  11. package/dist/{chunk-LQF5F7LF.cjs → chunk-3JCDSZ6D.cjs} +4 -4
  12. package/dist/{chunk-7DIWYZPQ.cjs → chunk-AK7MYM25.cjs} +3 -3
  13. package/dist/{chunk-2WHKEYDX.cjs → chunk-DEWT25QK.cjs} +53 -53
  14. package/dist/{chunk-FTD3CZAS.cjs → chunk-DYSMAPSI.cjs} +4 -4
  15. package/dist/{chunk-N2XHQVWX.cjs → chunk-GP2Y3DBE.cjs} +6 -6
  16. package/dist/{chunk-LWOXKF5P.cjs → chunk-HWXFUI3R.cjs} +19 -19
  17. package/dist/{chunk-7QGK76LC.cjs → chunk-K7NGDYBG.cjs} +108 -106
  18. package/dist/{chunk-P2ZIQ72J.cjs → chunk-KWS7YKCO.cjs} +10 -10
  19. package/dist/{chunk-GQHXJGA2.cjs → chunk-L7YE6APP.cjs} +9 -9
  20. package/dist/{chunk-QFNQSZ4H.cjs → chunk-SBXL5EKE.cjs} +16 -16
  21. package/dist/{chunk-3SE34JVB.cjs → chunk-TJFVIJPV.cjs} +2 -2
  22. package/dist/{chunk-BY2PLXYC.cjs → chunk-U7CH53FT.cjs} +7 -7
  23. package/dist/{chunk-V26M75GV.cjs → chunk-UUFL4FDS.cjs} +11 -11
  24. package/dist/{chunk-RRLJ5PNL.cjs → chunk-Y3MPERIZ.cjs} +3 -3
  25. package/dist/{chunk-IS6BQSL6.cjs → chunk-Y7BTM2NC.cjs} +39 -39
  26. package/dist/{chunk-CA7X6CCJ.cjs → chunk-YMDSCI4E.cjs} +32 -32
  27. package/dist/{cloud-tenants-M34P47GS.cjs → cloud-tenants-VQQ2KNJI.cjs} +4 -4
  28. package/dist/components/case-studies/index.cjs +16 -16
  29. package/dist/components/chat/index.cjs +3 -3
  30. package/dist/components/chat/remark-strip-citations.d.ts +3 -4
  31. package/dist/components/chat/remark-strip-citations.d.ts.map +1 -1
  32. package/dist/components/chat/remark-strip-citations.js +3 -13
  33. package/dist/components/chat/utils/cited-sources.d.ts.map +1 -1
  34. package/dist/components/chat/utils/cited-sources.js +2 -6
  35. package/dist/components/contact/index.cjs +5 -5
  36. package/dist/components/docs/index.cjs +8 -8
  37. package/dist/components/embeds/index.cjs +5 -5
  38. package/dist/components/faq/index.cjs +6 -6
  39. package/dist/components/features/index.cjs +4 -4
  40. package/dist/components/help-center-pages/index.cjs +61 -61
  41. package/dist/components/index.cjs +37 -37
  42. package/dist/components/meeting-scheduler/index.cjs +29 -29
  43. package/dist/components/navigation/index.cjs +7 -7
  44. package/dist/components/onboarding-guides/index.cjs +6 -6
  45. package/dist/components/product-demo/index.cjs +13 -13
  46. package/dist/components/tickets/index.cjs +9 -9
  47. package/dist/components/ui/file-upload.d.ts +3 -1
  48. package/dist/components/ui/file-upload.d.ts.map +1 -1
  49. package/dist/components/ui/file-upload.js +2 -1
  50. package/dist/components/ui/image-uploader.d.ts +3 -1
  51. package/dist/components/ui/image-uploader.d.ts.map +1 -1
  52. package/dist/components/ui/image-uploader.js +2 -1
  53. package/dist/components/ui/index.cjs +4 -4
  54. package/dist/{devices-SWFK4CPO.cjs → devices-KKJHYQ72.cjs} +5 -5
  55. package/dist/{embeddable-chat-J6CKPKKM.cjs → embeddable-chat-MQGYFYGX.cjs} +65 -69
  56. package/dist/index.cjs +8 -8
  57. package/dist/{knowledge-N5FDIA33.cjs → knowledge-VMLXNFDI.cjs} +5 -5
  58. package/dist/{logs-OEK7GMEB.cjs → logs-EFXRQ6LV.cjs} +12 -12
  59. package/dist/{policies-Q7AS5AL6.cjs → policies-SU3NQPFV.cjs} +8 -8
  60. package/dist/{scripts-3XWEDB2A.cjs → scripts-WLLAUOAA.cjs} +9 -9
  61. package/dist/{software-update-6FOBLAOF.cjs → software-update-WKUDBC3U.cjs} +7 -7
  62. package/package.json +1 -1
  63. package/src/chat-protocol/citation-chip.ts +46 -0
  64. package/src/chat-protocol/index.ts +2 -0
  65. package/src/components/chat/remark-strip-citations.ts +7 -26
  66. package/src/components/chat/utils/cited-sources.ts +2 -8
  67. package/src/components/ui/file-upload.tsx +4 -1
  68. package/src/components/ui/image-uploader.tsx +4 -1
@@ -8,7 +8,7 @@ var _chunkLHV2R6QUcjs = require('./chunk-LHV2R6QU.cjs');
8
8
  var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
9
9
 
10
10
 
11
- var _chunk7QGK76LCcjs = require('./chunk-7QGK76LC.cjs');
11
+ var _chunkK7NGDYBGcjs = require('./chunk-K7NGDYBG.cjs');
12
12
  require('./chunk-467T3LCG.cjs');
13
13
  require('./chunk-EHANO6UE.cjs');
14
14
  require('./chunk-IJCSQFLD.cjs');
@@ -21,10 +21,10 @@ require('./chunk-7Z536SPR.cjs');
21
21
  require('./chunk-7DNL734S.cjs');
22
22
  require('./chunk-MZ4KBSH7.cjs');
23
23
  require('./chunk-5SZ4ILU3.cjs');
24
- require('./chunk-QFNQSZ4H.cjs');
24
+ require('./chunk-SBXL5EKE.cjs');
25
25
 
26
26
 
27
- var _chunkYCE7A63Xcjs = require('./chunk-YCE7A63X.cjs');
27
+ var _chunk2LT2WR4Ocjs = require('./chunk-2LT2WR4O.cjs');
28
28
  require('./chunk-OBQ5WUNG.cjs');
29
29
  require('./chunk-6CZVQ72C.cjs');
30
30
  require('./chunk-ZRDVFADQ.cjs');
@@ -1905,10 +1905,10 @@ function KnowledgeScreen(_props) {
1905
1905
  const cast = _chunkLHV2R6QUcjs.useProductDemoCast.call(void 0, );
1906
1906
  const fixture = _react.useMemo.call(void 0, () => buildKnowledgeFixture(cast), [cast]);
1907
1907
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1908
- _chunk7QGK76LCcjs.KnowledgeBaseArticleView,
1908
+ _chunkK7NGDYBGcjs.KnowledgeBaseArticleView,
1909
1909
  {
1910
1910
  ...fixture.article,
1911
- content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYCE7A63Xcjs.SimpleMarkdownRenderer, { content: fixture.content, textSize: "compact" })
1911
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2LT2WR4Ocjs.SimpleMarkdownRenderer, { content: fixture.content, textSize: "compact" })
1912
1912
  }
1913
1913
  ) });
1914
1914
  }
@@ -16,7 +16,7 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
16
16
 
17
17
 
18
18
 
19
- var _chunk7QGK76LCcjs = require('./chunk-7QGK76LC.cjs');
19
+ var _chunkK7NGDYBGcjs = require('./chunk-K7NGDYBG.cjs');
20
20
  require('./chunk-467T3LCG.cjs');
21
21
  require('./chunk-EHANO6UE.cjs');
22
22
  require('./chunk-IJCSQFLD.cjs');
@@ -31,8 +31,8 @@ require('./chunk-MZ4KBSH7.cjs');
31
31
  require('./chunk-5SZ4ILU3.cjs');
32
32
 
33
33
 
34
- var _chunkQFNQSZ4Hcjs = require('./chunk-QFNQSZ4H.cjs');
35
- require('./chunk-YCE7A63X.cjs');
34
+ var _chunkSBXL5EKEcjs = require('./chunk-SBXL5EKE.cjs');
35
+ require('./chunk-2LT2WR4O.cjs');
36
36
  require('./chunk-OBQ5WUNG.cjs');
37
37
  require('./chunk-6CZVQ72C.cjs');
38
38
  require('./chunk-ZRDVFADQ.cjs');
@@ -1886,7 +1886,7 @@ function entry(logId, minutesAgo, severity, toolType, device2, summary) {
1886
1886
  id: logId,
1887
1887
  logId,
1888
1888
  timestamp: displayTime(_chunkFDZOE5TLcjs.demoMinutesAgo.call(void 0, minutesAgo)),
1889
- status: { label: severity, variant: _chunk7QGK76LCcjs.logSeverityVariant.call(void 0, severity) },
1889
+ status: { label: severity, variant: _chunkK7NGDYBGcjs.logSeverityVariant.call(void 0, severity) },
1890
1890
  source: { name: toolType, toolType },
1891
1891
  device: device2,
1892
1892
  description: { title: summary }
@@ -1958,13 +1958,13 @@ var NO_FILTERS = {};
1958
1958
  var ACTION_COLUMNS = ["copy", "quickView", "open"];
1959
1959
  var BESIDE_DRAWER_HIDDEN = [...ACTION_COLUMNS, "tool", "source"];
1960
1960
  var logHref = () => "#";
1961
- var copyAction = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7QGK76LCcjs.LogCopyIconButton, {});
1961
+ var copyAction = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.LogCopyIconButton, {});
1962
1962
  function LogsScreen({ compact = false }) {
1963
1963
  const [dock, setDock] = _react.useState.call(void 0, null);
1964
1964
  const selected = LOGS_FIXTURE_SELECTED;
1965
1965
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full bg-ods-bg", children: [
1966
1966
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 flex-1 overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1967
- _chunk7QGK76LCcjs.LogsPageView,
1967
+ _chunkK7NGDYBGcjs.LogsPageView,
1968
1968
  {
1969
1969
  showHeader: false,
1970
1970
  className: "p-[var(--spacing-system-l)]",
@@ -1972,7 +1972,7 @@ function LogsScreen({ compact = false }) {
1972
1972
  onSearchChange: noop,
1973
1973
  onOpenFilters: noop,
1974
1974
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1975
- _chunk7QGK76LCcjs.LogsTableView,
1975
+ _chunkK7NGDYBGcjs.LogsTableView,
1976
1976
  {
1977
1977
  logs: LOGS_FIXTURE_ENTRIES,
1978
1978
  facets: LOGS_FIXTURE_FACETS,
@@ -1986,8 +1986,8 @@ function LogsScreen({ compact = false }) {
1986
1986
  )
1987
1987
  }
1988
1988
  ) }),
1989
- !compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: setDock, className: "relative w-[calc(400px+var(--spacing-system-m))] shrink-0", children: dock && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7QGK76LCcjs.AppLayoutDrawerContainerContext.Provider, { value: dock, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1990
- _chunk7QGK76LCcjs.LogDrawer,
1989
+ !compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: setDock, className: "relative w-[calc(400px+var(--spacing-system-m))] shrink-0", children: dock && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.AppLayoutDrawerContainerContext.Provider, { value: dock, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1990
+ _chunkK7NGDYBGcjs.LogDrawer,
1991
1991
  {
1992
1992
  docked: true,
1993
1993
  isOpen: true,
@@ -1999,12 +1999,12 @@ function LogsScreen({ compact = false }) {
1999
1999
  { label: "Log ID", value: selected.logId },
2000
2000
  {
2001
2001
  label: "Source",
2002
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7QGK76LCcjs.ToolBadge, { toolType: _chunkQFNQSZ4Hcjs.normalizeToolTypeWithFallback.call(void 0, selected.source.toolType) })
2002
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.ToolBadge, { toolType: _chunkSBXL5EKEcjs.normalizeToolTypeWithFallback.call(void 0, selected.source.toolType) })
2003
2003
  },
2004
- { label: "Device", value: _chunk7QGK76LCcjs.logSourceLabels.call(void 0, selected.device).deviceName }
2004
+ { label: "Device", value: _chunkK7NGDYBGcjs.logSourceLabels.call(void 0, selected.device).deviceName }
2005
2005
  ],
2006
2006
  deviceCard: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2007
- _chunk7QGK76LCcjs.DeviceCard,
2007
+ _chunkK7NGDYBGcjs.DeviceCard,
2008
2008
  {
2009
2009
  ...LOGS_FIXTURE_DEVICE,
2010
2010
  actions: {
@@ -10,7 +10,7 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
10
10
 
11
11
 
12
12
 
13
- var _chunk7QGK76LCcjs = require('./chunk-7QGK76LC.cjs');
13
+ var _chunkK7NGDYBGcjs = require('./chunk-K7NGDYBG.cjs');
14
14
  require('./chunk-467T3LCG.cjs');
15
15
  require('./chunk-EHANO6UE.cjs');
16
16
  require('./chunk-IJCSQFLD.cjs');
@@ -23,8 +23,8 @@ require('./chunk-7Z536SPR.cjs');
23
23
  require('./chunk-7DNL734S.cjs');
24
24
  require('./chunk-MZ4KBSH7.cjs');
25
25
  require('./chunk-5SZ4ILU3.cjs');
26
- require('./chunk-QFNQSZ4H.cjs');
27
- require('./chunk-YCE7A63X.cjs');
26
+ require('./chunk-SBXL5EKE.cjs');
27
+ require('./chunk-2LT2WR4O.cjs');
28
28
  require('./chunk-OBQ5WUNG.cjs');
29
29
  require('./chunk-6CZVQ72C.cjs');
30
30
  require('./chunk-ZRDVFADQ.cjs');
@@ -1891,14 +1891,14 @@ var POLICIES = [
1891
1891
  policy("policy-local-admins", "No local admins", "No everyday account is a local administrator.", false, 0)
1892
1892
  ];
1893
1893
  var POLICIES_FIXTURE = {
1894
- summary: _chunk7QGK76LCcjs.computePolicySummary.call(void 0, POLICIES),
1894
+ summary: _chunkK7NGDYBGcjs.computePolicySummary.call(void 0, POLICIES),
1895
1895
  rows: POLICIES.map((item) => ({
1896
1896
  id: item.id,
1897
1897
  name: item.name,
1898
1898
  description: item.description,
1899
1899
  critical: item.critical,
1900
1900
  severityLabel: item.critical ? "Critical" : "Low",
1901
- status: _chunk7QGK76LCcjs.getPolicyTableStatus.call(void 0, item),
1901
+ status: _chunkK7NGDYBGcjs.getPolicyTableStatus.call(void 0, item),
1902
1902
  actions: [
1903
1903
  { label: "Policy Details", onClick: noop },
1904
1904
  { label: "Delete Policy", onClick: noop }
@@ -1912,16 +1912,16 @@ var POLICIES_FIXTURE = {
1912
1912
  var _jsxruntime = require('react/jsx-runtime');
1913
1913
  function PoliciesScreen({ compact = false }) {
1914
1914
  const table = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1915
- _chunk7QGK76LCcjs.PoliciesTable,
1915
+ _chunkK7NGDYBGcjs.PoliciesTable,
1916
1916
  {
1917
1917
  rows: POLICIES_FIXTURE.rows,
1918
1918
  rowAsLink: true,
1919
- rightSlot: compact ? void 0 : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7QGK76LCcjs.DataTable.RowCount, {}),
1919
+ rightSlot: compact ? void 0 : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.DataTable.RowCount, {}),
1920
1920
  emptyMessage: "No policies found."
1921
1921
  }
1922
1922
  );
1923
1923
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full flex-col gap-[var(--spacing-system-l)] bg-ods-bg p-[var(--spacing-system-l)]", children: [
1924
- !compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7QGK76LCcjs.PolicySummaryCards, { summary: POLICIES_FIXTURE.summary, now: POLICIES_FIXTURE.now }),
1924
+ !compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.PolicySummaryCards, { summary: POLICIES_FIXTURE.summary, now: POLICIES_FIXTURE.now }),
1925
1925
  table
1926
1926
  ] });
1927
1927
  }
@@ -13,7 +13,7 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
13
13
 
14
14
 
15
15
 
16
- var _chunk7QGK76LCcjs = require('./chunk-7QGK76LC.cjs');
16
+ var _chunkK7NGDYBGcjs = require('./chunk-K7NGDYBG.cjs');
17
17
  require('./chunk-467T3LCG.cjs');
18
18
  require('./chunk-EHANO6UE.cjs');
19
19
 
@@ -28,8 +28,8 @@ require('./chunk-7Z536SPR.cjs');
28
28
  require('./chunk-7DNL734S.cjs');
29
29
  require('./chunk-MZ4KBSH7.cjs');
30
30
  require('./chunk-5SZ4ILU3.cjs');
31
- require('./chunk-QFNQSZ4H.cjs');
32
- require('./chunk-YCE7A63X.cjs');
31
+ require('./chunk-SBXL5EKE.cjs');
32
+ require('./chunk-2LT2WR4O.cjs');
33
33
  require('./chunk-OBQ5WUNG.cjs');
34
34
  require('./chunk-6CZVQ72C.cjs');
35
35
  require('./chunk-ZRDVFADQ.cjs');
@@ -1995,8 +1995,8 @@ function buildScriptsFixture(cast) {
1995
1995
  var _jsxruntime = require('react/jsx-runtime');
1996
1996
  var WIDE_HIDDEN_COLUMNS = ["result", "open"];
1997
1997
  var COMPACT_COLUMNS = [
1998
- { ..._chunk7QGK76LCcjs.EXECUTION_COLUMNS.machineId, width: "flex-1 min-w-0", hideAt: void 0 },
1999
- _chunk7QGK76LCcjs.EXECUTION_COLUMNS.status
1998
+ { ..._chunkK7NGDYBGcjs.EXECUTION_COLUMNS.machineId, width: "flex-1 min-w-0", hideAt: void 0 },
1999
+ _chunkK7NGDYBGcjs.EXECUTION_COLUMNS.status
2000
2000
  ];
2001
2001
  var COMPACT_ROWS = 4;
2002
2002
  var TOKEN_CLASS = {
@@ -2055,7 +2055,7 @@ function ScriptCodePicture({ script }) {
2055
2055
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 items-center justify-between gap-[var(--spacing-system-m)]", children: [
2056
2056
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIJCSQFLDcjs.TruncateText, { variant: "h6", tone: "secondary", children: `Written by ${provenance.author} \xB7 approved by ${provenance.approver}` }),
2057
2057
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2058
- _chunk7QGK76LCcjs.ScriptShellBadge,
2058
+ _chunkK7NGDYBGcjs.ScriptShellBadge,
2059
2059
  {
2060
2060
  value: script.shellType,
2061
2061
  className: "shrink-0 text-ods-text-secondary text-h6",
@@ -2079,7 +2079,7 @@ function ScriptsScreen({ compact = false }) {
2079
2079
  return (
2080
2080
  // Four runs of the card's row height fill the frame; the padding is what is left round them.
2081
2081
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full overflow-hidden bg-ods-bg p-[var(--spacing-system-xsf)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2082
- _chunk7QGK76LCcjs.ScriptExecutionsTable,
2082
+ _chunkK7NGDYBGcjs.ScriptExecutionsTable,
2083
2083
  {
2084
2084
  rows: fixture.executions.slice(0, COMPACT_ROWS),
2085
2085
  columns: COMPACT_COLUMNS,
@@ -2089,13 +2089,13 @@ function ScriptsScreen({ compact = false }) {
2089
2089
  ) })
2090
2090
  );
2091
2091
  }
2092
- const renderOutput = (row) => row.id === fixture.openExecutionId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7QGK76LCcjs.ScriptExecutionResult, { result: row.result, empty: "\u2014" }) : null;
2092
+ const renderOutput = (row) => row.id === fixture.openExecutionId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.ScriptExecutionResult, { result: row.result, empty: "\u2014" }) : null;
2093
2093
  return (
2094
2094
  // The frame's tighter padding and no header row: the output opened under a run needs the height.
2095
2095
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full gap-[var(--spacing-system-m)] overflow-hidden bg-ods-bg p-[var(--spacing-system-m)]", children: [
2096
2096
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-[39%] shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScriptCodePicture, { script: fixture.script }) }),
2097
2097
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2098
- _chunk7QGK76LCcjs.ScriptExecutionsTable,
2098
+ _chunkK7NGDYBGcjs.ScriptExecutionsTable,
2099
2099
  {
2100
2100
  rows: fixture.executions,
2101
2101
  hideColumns: WIDE_HIDDEN_COLUMNS,
@@ -15,7 +15,7 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
15
15
 
16
16
 
17
17
 
18
- var _chunk7QGK76LCcjs = require('./chunk-7QGK76LC.cjs');
18
+ var _chunkK7NGDYBGcjs = require('./chunk-K7NGDYBG.cjs');
19
19
  require('./chunk-467T3LCG.cjs');
20
20
  require('./chunk-EHANO6UE.cjs');
21
21
 
@@ -30,8 +30,8 @@ require('./chunk-7Z536SPR.cjs');
30
30
  require('./chunk-7DNL734S.cjs');
31
31
  require('./chunk-MZ4KBSH7.cjs');
32
32
  require('./chunk-5SZ4ILU3.cjs');
33
- require('./chunk-QFNQSZ4H.cjs');
34
- require('./chunk-YCE7A63X.cjs');
33
+ require('./chunk-SBXL5EKE.cjs');
34
+ require('./chunk-2LT2WR4O.cjs');
35
35
  require('./chunk-OBQ5WUNG.cjs');
36
36
  require('./chunk-6CZVQ72C.cjs');
37
37
  require('./chunk-ZRDVFADQ.cjs');
@@ -1922,12 +1922,12 @@ function StaticPackageField({ value }) {
1922
1922
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1923
1923
  _chunkIJCSQFLDcjs.Autocomplete,
1924
1924
  {
1925
- label: _chunk7QGK76LCcjs.PACKAGE_SEARCH_LABEL,
1925
+ label: _chunkK7NGDYBGcjs.PACKAGE_SEARCH_LABEL,
1926
1926
  labelVariant: "large",
1927
1927
  options: value ? [{ value: value.id, label: value.name, description: _nullishCoalesce(value.description, () => ( void 0)) }] : [],
1928
1928
  value: _nullishCoalesce(_optionalChain([value, 'optionalAccess', _ => _.id]), () => ( null)),
1929
1929
  onChange: noop,
1930
- placeholder: _chunk7QGK76LCcjs.PACKAGE_SEARCH_PLACEHOLDER
1930
+ placeholder: _chunkK7NGDYBGcjs.PACKAGE_SEARCH_PLACEHOLDER
1931
1931
  }
1932
1932
  );
1933
1933
  }
@@ -1941,7 +1941,7 @@ function SoftwareUpdateScreen({ compact = false }) {
1941
1941
  [fixture.devices, fixture.selectedIds]
1942
1942
  );
1943
1943
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg pt-[var(--spacing-system-l)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1944
- _chunk7QGK76LCcjs.SoftwareActionForm,
1944
+ _chunkK7NGDYBGcjs.SoftwareActionForm,
1945
1945
  {
1946
1946
  action: fixture.action,
1947
1947
  showHeader: false,
@@ -1953,7 +1953,7 @@ function SoftwareUpdateScreen({ compact = false }) {
1953
1953
  initialValues: fixture.initialValues,
1954
1954
  renderPackageSearch,
1955
1955
  renderDevicePicker: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1956
- _chunk7QGK76LCcjs.DeviceSelector,
1956
+ _chunkK7NGDYBGcjs.DeviceSelector,
1957
1957
  {
1958
1958
  devices: selected,
1959
1959
  loading: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.821",
3
+ "version": "0.0.823",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -0,0 +1,46 @@
1
+ /**
2
+ * The `[N]` citation chip grammar: ONE definition for the server that writes chips into an answer and the clients
3
+ * that read them (the strip of cited sources) or hide them (beside cards).
4
+ *
5
+ * A chip names a retrieved source by its number: `[1]`, a comma list in one bracket (`[2, 3]`), or a run of them
6
+ * (`[1][2]`). A run counts as citations only when it stands apart from a word: whitespace or the start before it,
7
+ * whitespace, punctuation or the end after it, so `array[1]` or `foo[12]bar` in prose stays as written.
8
+ *
9
+ * Server-safe: no React, no browser APIs.
10
+ */
11
+
12
+ /** One bracket: a number of one or two digits, or a comma list of them. */
13
+ const CHIP = '\\[\\d{1,2}(?:\\s*,\\s*\\d{1,2})*\\]';
14
+
15
+ /** A run of chips standing apart from a word; group 1 is the whitespace (or nothing) before it. */
16
+ function chipRunScanner(): RegExp {
17
+ return new RegExp(`(^|\\s)(?:${CHIP})+(?=[\\s.,;:!?)\\]]|$)`, 'g');
18
+ }
19
+
20
+ /** The chips for these source numbers: `[1][3]`, each number once, in ascending order. */
21
+ export function formatCitationChips(numbers: Iterable<number>): string {
22
+ return [...new Set(numbers)]
23
+ .sort((a, b) => a - b)
24
+ .map(n => `[${n}]`)
25
+ .join('');
26
+ }
27
+
28
+ /**
29
+ * The text with its citation chips removed. A run goes with the spaces before it, so "the command [1]." reads
30
+ * "the command." and "the guide [3] covers it" reads "the guide covers it"; a line break before a run stays.
31
+ */
32
+ export function stripCitationChips(text: string): string {
33
+ return text.replace(chipRunScanner(), (_run: string, lead: string) => (lead === ' ' || lead === '\t' ? '' : lead));
34
+ }
35
+
36
+ /** The source numbers a text cites, in the order it first cites them, each once. */
37
+ export function citedSourceNumbers(text: string): number[] {
38
+ const numbers: number[] = [];
39
+ for (const run of text.matchAll(chipRunScanner())) {
40
+ for (const digits of run[0].matchAll(/\d+/g)) {
41
+ const n = Number.parseInt(digits[0], 10);
42
+ if (!numbers.includes(n)) numbers.push(n);
43
+ }
44
+ }
45
+ return numbers;
46
+ }
@@ -28,4 +28,6 @@ export { isRecord, unwrapEnvelope } from './wire-narrow';
28
28
  // The `[card://<type>:<id>]` grammar — the renderer's and the server's one
29
29
  // definition, so a reference the hub emits is one the client expands.
30
30
  export * from './card-marker';
31
+ // The `[N]` citation chip grammar — written by the server, read and hidden by the renderer.
32
+ export * from './citation-chip';
31
33
  export { escapeThinkingTags } from './leading-frames';
@@ -11,38 +11,23 @@
11
11
  *
12
12
  * Deliberately conservative:
13
13
  * - text leaves only (code/inline-code nodes are never visited);
14
- * - 1–2 digit indices, optionally comma-separated, and runs of them (`[1][2]`);
15
- * - the token must be delimiter-bounded on BOTH sides (start/whitespace
16
- * before; whitespace/punctuation/end after) so technical prose like
17
- * `array[1]` or `foo[12]bar` is untouched.
14
+ * - what counts as a citation is the chat protocol's one chip grammar
15
+ * (`chat-protocol/citation-chip.ts`), the same one the server writes, so
16
+ * technical prose like `array[1]` or `foo[12]bar` is untouched.
18
17
  */
19
18
 
20
19
  import type { Root, Text } from 'mdast';
21
20
  import type { Plugin } from 'unified';
22
21
  import { visit } from 'unist-util-visit';
23
-
24
- /** A run of citation markers (`[1]`, `[2, 3]`, `[1][2]`) bounded by whitespace or the start on the left and by
25
- * whitespace, punctuation or the end on the right. */
26
- const CITATION_REGEX = /(^|\s)(?:\[\d{1,2}(?:\s*,\s*\d{1,2})*\])+(?=[\s.,;:!?)\]]|$)/g;
27
-
28
- /** What a removed run leaves: nothing when punctuation or the end follows it (so "command [1]." reads "command."),
29
- * else the whitespace that preceded it. */
30
- function withoutRun(text: string): string {
31
- return text.replace(CITATION_REGEX, (run: string, lead: string, offset: number) => {
32
- const next = text.charAt(offset + run.length);
33
- return next === '' || /[.,;:!?)\]]/.test(next) ? '' : lead;
34
- });
35
- }
22
+ import { stripCitationChips } from '../../chat-protocol/citation-chip';
36
23
 
37
24
  export const remarkStripCitations: Plugin<[], Root> = () => {
38
25
  return (tree: Root) => {
39
26
  visit(tree, 'text', (node: Text, index, parent) => {
40
27
  if (!parent || typeof index !== 'number') return;
41
28
  if (!node.value || !node.value.includes('[')) return;
42
- const withoutCitations = withoutRun(node.value);
43
- // No citation matched → leave the node untouched, INCLUDING its
44
- // whitespace (collapsing unconditionally would rewrite deliberate
45
- // spacing in prose like `array[1] value`).
29
+ const withoutCitations = stripCitationChips(node.value);
30
+ // No citation matched → leave the node untouched.
46
31
  if (withoutCitations === node.value) return;
47
32
  // Replace the text node rather than editing `node.value` in place —
48
33
  // same idiom as remark-card-links / remark-mention-chips next door, and
@@ -50,11 +35,7 @@ export const remarkStripCitations: Plugin<[], Root> = () => {
50
35
  // `position` so source mapping survives. Length is unchanged, so the
51
36
  // walker needs no index steering: it has already captured the original
52
37
  // leaf and moves on to the next sibling, never re-entering this slot.
53
- parent.children.splice(index, 1, {
54
- ...node,
55
- // Collapse doubled spaces the removal can leave mid-sentence.
56
- value: withoutCitations.replace(/ {2,}/g, ' '),
57
- });
38
+ parent.children.splice(index, 1, { ...node, value: withoutCitations });
58
39
  });
59
40
  };
60
41
  };
@@ -1,4 +1,5 @@
1
1
  import { type CardReference, extractCardReferences } from '../../../chat-protocol/card-marker';
2
+ import { citedSourceNumbers } from '../../../chat-protocol/citation-chip';
2
3
  import { canonicalContentRefType } from '../../../utils/list-url';
3
4
  import { groupSourcesByTable } from '../../../utils/source-grouping';
4
5
  import type { ChatSource } from '../types/message.types';
@@ -14,9 +15,6 @@ export interface CitedSources {
14
15
  uncited: ChatSource[];
15
16
  }
16
17
 
17
- /** `[1]`, `[12]` — a citation marker in the answer body. */
18
- const CITATION = /\[(\d+)\]/g;
19
-
20
18
  /** Fenced blocks and inline code spans. */
21
19
  const CODE = /```[\s\S]*?```|~~~[\s\S]*?~~~|`[^`\n]*`/g;
22
20
 
@@ -63,11 +61,7 @@ export function splitCitedSources(sources: ChatSource[] | undefined, content: st
63
61
  const byCards = splitByCards(sources, extractCardReferences(withoutCode(content)));
64
62
  if (byCards.cited.length > 0) return byCards;
65
63
 
66
- const firstMentionAt = new Map<number, number>();
67
- for (const match of withoutCode(content).matchAll(CITATION)) {
68
- const index = Number.parseInt(match[1], 10);
69
- if (!firstMentionAt.has(index)) firstMentionAt.set(index, firstMentionAt.size);
70
- }
64
+ const firstMentionAt = new Map(citedSourceNumbers(withoutCode(content)).map((index, order) => [index, order]));
71
65
 
72
66
  const cited = sources
73
67
  .filter(source => firstMentionAt.has(source.index))
@@ -81,6 +81,8 @@ export interface FileUploadProps<T extends FileUploadCandidate = File> {
81
81
  description?: string;
82
82
  /** Field label above the component */
83
83
  fieldLabel?: string;
84
+ /** Scale of `fieldLabel`, as on the other field controls (`FieldWrapper`'s `labelVariant`). */
85
+ labelVariant?: 'default' | 'large';
84
86
  /** Whether the component is disabled */
85
87
  disabled?: boolean;
86
88
  /** Error message */
@@ -157,6 +159,7 @@ export function FileUpload<T extends FileUploadCandidate = File>({
157
159
  label = 'Upload Files',
158
160
  description = '(Click Here or Drag and Drop)',
159
161
  fieldLabel,
162
+ labelVariant,
160
163
  disabled = false,
161
164
  error,
162
165
  className,
@@ -353,7 +356,7 @@ export function FileUpload<T extends FileUploadCandidate = File>({
353
356
  const showDropzone = multiple || !hasFiles;
354
357
 
355
358
  return (
356
- <FieldWrapper label={fieldLabel} error={displayError} className={className}>
359
+ <FieldWrapper label={fieldLabel} labelVariant={labelVariant} error={displayError} className={className}>
357
360
  {/* Rendered even when `pickFiles` supersedes it: whether a host has a
358
361
  native picker is only knowable on the client, and dropping this node
359
362
  from the tree would make the prerendered HTML and the hydrated render
@@ -32,6 +32,8 @@ export interface ImageUploaderProps {
32
32
  hint?: ReactNode | null;
33
33
  /** Field label rendered above the component (via FieldWrapper). */
34
34
  fieldLabel?: string;
35
+ /** Scale of `fieldLabel`, as on the other field controls (`FieldWrapper`'s `labelVariant`). */
36
+ labelVariant?: 'default' | 'large';
35
37
  /** Disables interaction. */
36
38
  disabled?: boolean;
37
39
  /** Show loading state — disables interaction and renders a spinner overlay. */
@@ -91,6 +93,7 @@ export function ImageUploader({
91
93
  description = '(Click Here or Drag and Drop)',
92
94
  hint,
93
95
  fieldLabel,
96
+ labelVariant,
94
97
  disabled = false,
95
98
  loading = false,
96
99
  error,
@@ -167,7 +170,7 @@ export function ImageUploader({
167
170
  const isActionState = dragActive || (pressed && !hasImage);
168
171
 
169
172
  return (
170
- <FieldWrapper label={fieldLabel} error={displayError} className={className}>
173
+ <FieldWrapper label={fieldLabel} labelVariant={labelVariant} error={displayError} className={className}>
171
174
  <input
172
175
  ref={inputRef}
173
176
  type="file"