@parallelworks/tandem-web 0.163.0 → 0.164.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.
@@ -2,14 +2,15 @@ import { Link as e } from "../lib/router.js";
2
2
  import { ChevronRightIcon as t } from "./icons.js";
3
3
  import { termRef as n } from "../lib/knowledgeKinds.js";
4
4
  import { AnsweredDecision as r } from "./AgentWork.js";
5
- import { useState as i } from "react";
6
- import { useTranslations as a } from "use-intl";
7
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
+ import { KnowledgeStatus as i } from "./HoverCards.js";
6
+ import { useState as a } from "react";
7
+ import { useTranslations as o } from "use-intl";
8
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
9
  // src/components/AreaWork.tsx
9
- var c = (...e) => e.filter(Boolean).join(" ");
10
- function l({ workspace: t, entry: r, isNew: i }) {
11
- let l = a("knowledge"), u = a("areaPage");
12
- return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ s(e, {
10
+ var l = (...e) => e.filter(Boolean).join(" ");
11
+ function u({ workspace: t, entry: r, isNew: a }) {
12
+ let l = o("knowledge"), u = o("areaPage");
13
+ return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(e, {
13
14
  to: "/$workspace/knowledge/$term",
14
15
  params: {
15
16
  workspace: t,
@@ -17,89 +18,89 @@ function l({ workspace: t, entry: r, isNew: i }) {
17
18
  },
18
19
  className: "flex min-w-0 items-baseline gap-2 px-3 py-2 text-sm hover:bg-muted",
19
20
  children: [
20
- /* @__PURE__ */ o("span", {
21
+ /* @__PURE__ */ s("span", {
21
22
  className: "shrink-0 font-medium",
22
23
  children: r.name
23
24
  }),
24
- /* @__PURE__ */ o("span", {
25
+ /* @__PURE__ */ s("span", {
25
26
  className: "shrink-0 text-xs text-muted-foreground",
26
27
  children: l(`kind.${r.kind}`)
27
28
  }),
28
- r.definition !== r.name && /* @__PURE__ */ o("span", {
29
+ r.definition !== r.name && /* @__PURE__ */ s("span", {
29
30
  className: "min-w-0 truncate text-muted-foreground",
30
31
  children: r.definition
31
32
  }),
32
- r.status === "proposed" && /* @__PURE__ */ o("span", {
33
- className: "ml-auto shrink-0 rounded border border-warning/60 px-1.5 text-[11px] text-warning",
34
- children: l("status.proposed")
33
+ r.status === "added" && /* @__PURE__ */ s("span", {
34
+ className: "ml-auto shrink-0",
35
+ children: /* @__PURE__ */ s(i, { status: r.status })
35
36
  }),
36
- i && /* @__PURE__ */ o("span", {
37
- className: c("shrink-0 text-[11px] font-medium text-primary", r.status !== "proposed" && "ml-auto"),
37
+ a && /* @__PURE__ */ s("span", {
38
+ className: "ml-auto shrink-0 text-[11px] font-medium text-primary",
38
39
  children: u("new")
39
40
  })
40
41
  ]
41
42
  }) });
42
43
  }
43
- var u = (e) => e.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
44
- function d({ workspace: e, decision: n, isNew: l, notInDocs: d }) {
45
- let f = a("areaPage"), [p, m] = i(!1), h = [n.options.find((e) => e.id === n.answer?.optionId)?.label, n.answer?.text && u(n.answer.text)].filter(Boolean).join(". ");
46
- return /* @__PURE__ */ s("li", { children: [/* @__PURE__ */ s("button", {
44
+ var d = (e) => e.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
45
+ function f({ workspace: e, decision: n, isNew: i, notInDocs: u }) {
46
+ let f = o("areaPage"), [p, m] = a(!1), h = [n.options.find((e) => e.id === n.answer?.optionId)?.label, n.answer?.text && d(n.answer.text)].filter(Boolean).join(". ");
47
+ return /* @__PURE__ */ c("li", { children: [/* @__PURE__ */ c("button", {
47
48
  type: "button",
48
49
  "aria-expanded": p,
49
50
  onClick: () => m((e) => !e),
50
51
  className: "flex w-full min-w-0 items-baseline gap-2 px-3 py-2 text-left text-sm hover:bg-muted",
51
52
  children: [
52
- /* @__PURE__ */ o(t, { className: c("size-3 shrink-0 self-center text-muted-foreground", p && "rotate-90") }),
53
- /* @__PURE__ */ o("span", {
53
+ /* @__PURE__ */ s(t, { className: l("size-3 shrink-0 self-center text-muted-foreground", p && "rotate-90") }),
54
+ /* @__PURE__ */ s("span", {
54
55
  className: "min-w-0 truncate text-muted-foreground",
55
- children: u(n.prompt)
56
+ children: d(n.prompt)
56
57
  }),
57
- /* @__PURE__ */ o("span", {
58
+ /* @__PURE__ */ s("span", {
58
59
  className: "min-w-0 shrink-0 truncate font-medium max-sm:hidden",
59
60
  children: h
60
61
  }),
61
- /* @__PURE__ */ s("span", {
62
+ /* @__PURE__ */ c("span", {
62
63
  className: "ml-auto flex shrink-0 items-center gap-2",
63
- children: [d && /* @__PURE__ */ o("span", {
64
+ children: [u && /* @__PURE__ */ s("span", {
64
65
  className: "rounded border border-border px-1.5 text-[11px] text-muted-foreground",
65
66
  children: f("notInDocs")
66
- }), l && /* @__PURE__ */ o("span", {
67
+ }), i && /* @__PURE__ */ s("span", {
67
68
  className: "text-[11px] font-medium text-primary",
68
69
  children: f("new")
69
70
  })]
70
71
  })
71
72
  ]
72
- }), p && /* @__PURE__ */ o("div", {
73
+ }), p && /* @__PURE__ */ s("div", {
73
74
  className: "px-3 pb-3",
74
- children: /* @__PURE__ */ o(r, {
75
+ children: /* @__PURE__ */ s(r, {
75
76
  workspace: e,
76
77
  decision: n,
77
78
  showIssue: !0
78
79
  })
79
80
  })] });
80
81
  }
81
- function f({ title: e, count: t, icon: n, extra: r, action: i, bare: a = !1, children: c }) {
82
- return /* @__PURE__ */ s("section", {
82
+ function p({ title: e, count: t, icon: n, extra: r, action: i, bare: a = !1, children: o }) {
83
+ return /* @__PURE__ */ c("section", {
83
84
  "aria-label": e,
84
- children: [/* @__PURE__ */ s("h2", {
85
+ children: [/* @__PURE__ */ c("h2", {
85
86
  className: "sticky top-0 z-10 flex h-9 items-center gap-2 border-b border-border bg-background px-4 text-xs font-medium md:px-5",
86
87
  children: [
87
88
  n,
88
- /* @__PURE__ */ o("span", {
89
+ /* @__PURE__ */ s("span", {
89
90
  className: "truncate",
90
91
  children: e
91
92
  }),
92
- /* @__PURE__ */ o("span", {
93
+ /* @__PURE__ */ s("span", {
93
94
  className: "text-muted-foreground tabular-nums",
94
95
  children: t
95
96
  }),
96
97
  r,
97
- i && /* @__PURE__ */ o("span", {
98
+ i && /* @__PURE__ */ s("span", {
98
99
  className: "ml-auto flex",
99
100
  children: i
100
101
  })
101
102
  ]
102
- }), t > 0 && (a ? c : /* @__PURE__ */ o("ul", { children: c }))]
103
+ }), t > 0 && (a ? o : /* @__PURE__ */ s("ul", { children: o }))]
103
104
  });
104
105
  }
105
- export { f as AreaGroup, d as FoldedAnswer, l as KnowledgeRow };
106
+ export { p as AreaGroup, f as FoldedAnswer, u as KnowledgeRow };
@@ -3,90 +3,92 @@ import { DetailsContent as t, DetailsSummary as n, Toggle as r } from "./toggle.
3
3
  import { Columns as i } from "./columns.js";
4
4
  import { DateChip as a } from "./DateChip.js";
5
5
  import { DocButton as o } from "./DocButton.js";
6
- import { AttachmentFiles as s, AttachmentImage as c, DocLinkIcons as l, DocLinks as u, IssueMentions as d, KnowledgeTerms as f, LinkedIssues as p, PeopleMentions as m, TeamNames as h } from "./editorPlugins.js";
7
- import { DocLinkPicker as g } from "./DocLinkPicker.js";
8
- import { DocViewBlock as _ } from "./DocViewBlock.js";
6
+ import { AttachmentFiles as s, AttachmentImage as c, DocLinkIcons as l, DocLinks as u, IssueMentions as d, KnowledgeTerms as f, LinkedIssues as p, PeopleMentions as m, TeamNames as h, recordingText as g } from "./editorPlugins.js";
7
+ import { DocLinkPicker as _ } from "./DocLinkPicker.js";
8
+ import { DocViewBlock as ee } from "./DocViewBlock.js";
9
9
  import { FigmaEmbedBlock as v } from "./Figma.js";
10
10
  import { IssueListBlock as y } from "./IssueListBlock.js";
11
11
  import { LinkCard as b } from "./LinkCard.js";
12
12
  import { MentionPicker as x } from "./MentionPicker.js";
13
- import { Diagrams as ee, MathBlock as te, MathInline as ne } from "./mathDiagrams.js";
14
- import { SlashMenu as S } from "./SlashMenu.js";
15
- import { SubPages as C } from "./SubPages.js";
16
- import { MarkdownTable as w } from "./table.js";
17
- import { useEffect as T, useRef as E } from "react";
18
- import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
19
- import { CodeBlockLowlight as A } from "@tiptap/extension-code-block-lowlight";
20
- import { TaskItem as j, TaskList as M } from "@tiptap/extension-list";
21
- import { TableKit as N } from "@tiptap/extension-table";
22
- import { Placeholder as P } from "@tiptap/extensions";
23
- import { Markdown as F } from "@tiptap/markdown";
24
- import { EditorContent as I, useEditor as L } from "@tiptap/react";
25
- import re from "@tiptap/starter-kit";
26
- import R from "highlight.js/lib/languages/bash";
27
- import z from "highlight.js/lib/languages/css";
28
- import B from "highlight.js/lib/languages/diff";
29
- import V from "highlight.js/lib/languages/dockerfile";
30
- import H from "highlight.js/lib/languages/go";
31
- import U from "highlight.js/lib/languages/ini";
32
- import W from "highlight.js/lib/languages/javascript";
33
- import G from "highlight.js/lib/languages/json";
34
- import K from "highlight.js/lib/languages/markdown";
35
- import q from "highlight.js/lib/languages/python";
36
- import J from "highlight.js/lib/languages/rust";
37
- import Y from "highlight.js/lib/languages/shell";
38
- import X from "highlight.js/lib/languages/sql";
39
- import Z from "highlight.js/lib/languages/typescript";
40
- import ie from "highlight.js/lib/languages/xml";
41
- import ae from "highlight.js/lib/languages/yaml";
42
- import { createLowlight as oe } from "lowlight";
13
+ import { Diagrams as te, MathBlock as ne, MathInline as S } from "./mathDiagrams.js";
14
+ import { SlashMenu as C } from "./SlashMenu.js";
15
+ import { SubPages as w } from "./SubPages.js";
16
+ import { MarkdownTable as T } from "./table.js";
17
+ import { VideoBlock as E } from "./video.js";
18
+ import { useEffect as D, useRef as O } from "react";
19
+ import { useTranslations as k } from "use-intl";
20
+ import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
21
+ import { CodeBlockLowlight as N } from "@tiptap/extension-code-block-lowlight";
22
+ import { TaskItem as P, TaskList as F } from "@tiptap/extension-list";
23
+ import { TableKit as I } from "@tiptap/extension-table";
24
+ import { Placeholder as L } from "@tiptap/extensions";
25
+ import { Markdown as R } from "@tiptap/markdown";
26
+ import { EditorContent as z, useEditor as B } from "@tiptap/react";
27
+ import V from "@tiptap/starter-kit";
28
+ import re from "highlight.js/lib/languages/bash";
29
+ import H from "highlight.js/lib/languages/css";
30
+ import U from "highlight.js/lib/languages/diff";
31
+ import W from "highlight.js/lib/languages/dockerfile";
32
+ import G from "highlight.js/lib/languages/go";
33
+ import K from "highlight.js/lib/languages/ini";
34
+ import q from "highlight.js/lib/languages/javascript";
35
+ import J from "highlight.js/lib/languages/json";
36
+ import Y from "highlight.js/lib/languages/markdown";
37
+ import X from "highlight.js/lib/languages/python";
38
+ import ie from "highlight.js/lib/languages/rust";
39
+ import ae from "highlight.js/lib/languages/shell";
40
+ import oe from "highlight.js/lib/languages/sql";
41
+ import se from "highlight.js/lib/languages/typescript";
42
+ import ce from "highlight.js/lib/languages/xml";
43
+ import Z from "highlight.js/lib/languages/yaml";
44
+ import { createLowlight as le } from "lowlight";
43
45
  // src/components/Editor.tsx
44
- var se = oe({
45
- bash: R,
46
- css: z,
47
- diff: B,
48
- dockerfile: V,
49
- go: H,
50
- ini: U,
51
- javascript: W,
52
- json: G,
53
- markdown: K,
54
- python: q,
55
- rust: J,
56
- shell: Y,
57
- sql: X,
58
- typescript: Z,
59
- xml: ie,
60
- yaml: ae
46
+ var ue = le({
47
+ bash: re,
48
+ css: H,
49
+ diff: U,
50
+ dockerfile: W,
51
+ go: G,
52
+ ini: K,
53
+ javascript: q,
54
+ json: J,
55
+ markdown: Y,
56
+ python: X,
57
+ rust: ie,
58
+ shell: ae,
59
+ sql: oe,
60
+ typescript: se,
61
+ xml: ce,
62
+ yaml: Z
61
63
  });
62
- function Q({ editable: g = !0, placeholder: x = "", collaborative: S = !1 } = {}) {
64
+ function Q({ editable: g = !0, placeholder: _ = "", collaborative: x = !1 } = {}) {
63
65
  return [
64
- re.configure({
66
+ V.configure({
65
67
  link: {
66
68
  openOnClick: !g,
67
69
  autolink: !0
68
70
  },
69
71
  codeBlock: !1,
70
72
  blockquote: !1,
71
- ...g && !S ? {} : { trailingNode: !1 },
72
- ...S ? { undoRedo: !1 } : {}
73
+ ...g && !x ? {} : { trailingNode: !1 },
74
+ ...x ? { undoRedo: !1 } : {}
73
75
  }),
74
- A.configure({ lowlight: se }),
76
+ N.configure({ lowlight: ue }),
75
77
  e,
76
- M,
77
- j.configure({ nested: !0 }),
78
+ F,
79
+ P.configure({ nested: !0 }),
78
80
  r,
79
- C,
81
+ w,
80
82
  n,
81
83
  t,
82
84
  i,
83
- N.configure({ table: !1 }),
84
- w.configure({
85
+ I.configure({ table: !1 }),
86
+ T.configure({
85
87
  resizable: !1,
86
88
  allowTableNodeSelection: !1
87
89
  }),
88
- P.configure({ placeholder: x }),
89
- F,
90
+ L.configure({ placeholder: _ }),
91
+ R,
90
92
  f,
91
93
  u,
92
94
  l,
@@ -96,13 +98,14 @@ function Q({ editable: g = !0, placeholder: x = "", collaborative: S = !1 } = {}
96
98
  m,
97
99
  h,
98
100
  d,
99
- _,
101
+ ee,
100
102
  o,
101
103
  b,
102
104
  v,
105
+ E,
106
+ S,
103
107
  ne,
104
108
  te,
105
- ee,
106
109
  y,
107
110
  a
108
111
  ];
@@ -122,8 +125,9 @@ function $(e) {
122
125
  }
123
126
  };
124
127
  }
125
- function ce({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: i, placeholder: a, editable: o = !0, autofocus: s = !1, className: c = "", label: l, onFiles: u, onEditor: d }) {
126
- let f = E({
128
+ function de({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: i, placeholder: a, editable: o = !0, autofocus: s = !1, className: c = "", label: l, onFiles: u, onEditor: d }) {
129
+ g.linkHint = k("video")("linkHint");
130
+ let f = O({
127
131
  onChange: t,
128
132
  onSubmit: n,
129
133
  onBlur: r,
@@ -135,9 +139,9 @@ function ce({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: i, placeho
135
139
  onBlur: r,
136
140
  onFocus: i
137
141
  };
138
- let p = E(u);
142
+ let p = O(u);
139
143
  p.current = u;
140
- let m = L({
144
+ let m = B({
141
145
  extensions: Q({
142
146
  editable: o,
143
147
  placeholder: a ?? ""
@@ -164,23 +168,23 @@ function ce({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: i, placeho
164
168
  onBlur: ({ editor: e }) => f.current.onBlur?.(e.getMarkdown()),
165
169
  onFocus: () => f.current.onFocus?.()
166
170
  });
167
- T(() => {
171
+ D(() => {
168
172
  m && !m.isFocused && m.getMarkdown() !== e && m.commands.setContent(e, {
169
173
  contentType: "markdown",
170
174
  emitUpdate: !1
171
175
  });
172
- }, [m, e]), T(() => {
176
+ }, [m, e]), D(() => {
173
177
  m?.setEditable(o);
174
178
  }, [m, o]);
175
- let h = E(d);
176
- return h.current = d, T(() => (h.current?.(m), () => h.current?.(null)), [m]), /* @__PURE__ */ k(D, { children: [
177
- /* @__PURE__ */ O(I, { editor: m }),
178
- o && /* @__PURE__ */ O(g, { editor: m }),
179
- o && /* @__PURE__ */ O(S, {
179
+ let h = O(d);
180
+ return h.current = d, D(() => (h.current?.(m), () => h.current?.(null)), [m]), /* @__PURE__ */ M(A, { children: [
181
+ /* @__PURE__ */ j(z, { editor: m }),
182
+ o && /* @__PURE__ */ j(_, { editor: m }),
183
+ o && /* @__PURE__ */ j(C, {
180
184
  editor: m,
181
185
  onFiles: p
182
186
  }),
183
- o && /* @__PURE__ */ O(x, { editor: m })
187
+ o && /* @__PURE__ */ j(x, { editor: m })
184
188
  ] });
185
189
  }
186
- export { ce as Editor, Q as contentExtensions, $ as fileHandlers };
190
+ export { de as Editor, Q as contentExtensions, $ as fileHandlers };
@@ -13,7 +13,7 @@ import w from "@dagrejs/dagre";
13
13
  import { Handle as T, MarkerType as E, Position as D, ReactFlow as O, ReactFlowProvider as k, useReactFlow as A } from "@xyflow/react";
14
14
  import "@xyflow/react/dist/style.css";
15
15
  // src/components/Graph.tsx
16
- var j = 196, M = 48, N = 22, P = (e) => e.kind === "doc" ? "bg-primary" : e.kind === "issue" ? e.status === "completed" || e.status === "canceled" ? "bg-muted-foreground/50" : "bg-primary" : e.status === "decided" ? "bg-success" : e.status === "proposed" ? "bg-warning" : "bg-muted-foreground/50", F = {
16
+ var j = 196, M = 48, N = 22, P = (e) => e.kind === "doc" ? "bg-primary" : e.kind === "issue" ? e.status === "completed" || e.status === "canceled" ? "bg-muted-foreground/50" : "bg-primary" : e.status === "decided" ? "bg-success" : e.status === "added" ? "bg-warning" : "bg-muted-foreground/50", F = {
17
17
  doc: s,
18
18
  issue: l,
19
19
  entry: c
@@ -177,8 +177,8 @@ function z({ workspace: n }) {
177
177
  });
178
178
  }
179
179
  var B = {
180
- proposed: "info",
181
- decided: "success"
180
+ decided: "success",
181
+ added: "info"
182
182
  };
183
183
  function V({ status: e }) {
184
184
  let t = k("knowledge.status");
@@ -216,7 +216,7 @@ function H({ workspace: e, entry: t }) {
216
216
  className: "text-xs text-muted-foreground",
217
217
  children: r(`kind.${t.kind}`)
218
218
  }),
219
- (t.kind !== "term" || t.status === "superseded") && /* @__PURE__ */ j("span", {
219
+ (t.kind !== "term" || t.status !== "decided") && /* @__PURE__ */ j("span", {
220
220
  className: "ml-auto",
221
221
  children: /* @__PURE__ */ j(V, { status: t.status })
222
222
  })
@@ -12,7 +12,7 @@ function s({ counts: s, teamId: c, className: l = "" }) {
12
12
  enabled: !!d
13
13
  });
14
14
  if (!s) return null;
15
- let p = f.find((e) => e.id === c)?.key, m = s.proposedEntries + s.proposedAreas, h = [
15
+ let p = f.find((e) => e.id === c)?.key, m = s.proposedAreas, h = [
16
16
  s.decisions > 0 && {
17
17
  key: "decisions",
18
18
  label: u("decisions", { count: s.decisions }),