@parallelworks/tandem-web 0.141.2 → 0.143.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.
Files changed (64) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +162 -5
  2. package/_virtual/_virtual_i18n/es/common.js +162 -5
  3. package/_virtual/_virtual_i18n/ja/common.js +162 -5
  4. package/_virtual/_virtual_i18n/ko/common.js +162 -5
  5. package/_virtual/_virtual_i18n/zh/common.js +162 -5
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +2 -0
  8. package/components/CodeHostSettings.js +25 -25
  9. package/components/CustomFields.js +349 -0
  10. package/components/DocProperties.js +320 -0
  11. package/components/DocTable.js +176 -0
  12. package/components/DocViewBlock.js +104 -0
  13. package/components/DocsTree.js +16 -6
  14. package/components/Editor.js +30 -28
  15. package/components/GitHub.js +22 -22
  16. package/components/IssueBoard.js +48 -43
  17. package/components/IssueEvent.js +2 -0
  18. package/components/IssueFilters.js +210 -122
  19. package/components/IssueImport.js +1 -1
  20. package/components/IssueRow.js +96 -79
  21. package/components/IssueTemplates.js +216 -156
  22. package/components/IssueTypes.js +318 -0
  23. package/components/NewIssueDialog.js +254 -216
  24. package/components/SettingsNav.js +40 -35
  25. package/components/SlashMenu.js +2 -0
  26. package/components/TeamForm.js +49 -35
  27. package/components/TeamRepositories.js +51 -51
  28. package/components/TeamWorkflow.js +8 -8
  29. package/components/Updates.js +8 -8
  30. package/lib/boardMove.js +69 -47
  31. package/lib/customFields.js +113 -0
  32. package/lib/docProperties.js +135 -0
  33. package/lib/issueDisplay.js +27 -12
  34. package/lib/issueList.js +166 -62
  35. package/lib/issueTypes.js +50 -0
  36. package/lib/teamTree.js +24 -0
  37. package/lib/views.js +13 -11
  38. package/package.json +1 -1
  39. package/pages/issues.js +331 -291
  40. package/routeTree.gen.js +174 -162
  41. package/routes/_workspace/agents/index2.js +9 -9
  42. package/routes/_workspace/docs/_doc2.js +147 -140
  43. package/routes/_workspace/docs/space._space.js +6 -0
  44. package/routes/_workspace/docs/space2._space.js +256 -0
  45. package/routes/_workspace/docs2.js +3 -3
  46. package/routes/_workspace/issues/_identifier2.js +433 -370
  47. package/routes/_workspace/projects/_projectId3.js +213 -201
  48. package/routes/_workspace/settings/audit-log3.js +2 -0
  49. package/routes/_workspace/settings/fields.js +6 -0
  50. package/routes/_workspace/settings/fields2.js +30 -0
  51. package/routes/_workspace/settings/fields3.js +5 -0
  52. package/routes/_workspace/settings/groups2.js +74 -74
  53. package/routes/_workspace/settings/labels2.js +33 -33
  54. package/routes/_workspace/settings/members2.js +35 -35
  55. package/routes/_workspace/settings/roles2.js +24 -24
  56. package/routes/_workspace/settings/runners2.js +18 -18
  57. package/routes/_workspace/settings/sessions2.js +9 -9
  58. package/routes/_workspace/settings/slack2.js +8 -8
  59. package/routes/_workspace/settings/sso2.js +50 -50
  60. package/routes/_workspace/settings/tokens2.js +15 -15
  61. package/routes/_workspace/settings/webhooks2.js +42 -42
  62. package/routes/_workspace/teams/_key/settings2.js +138 -76
  63. package/routes/_workspace2.js +321 -319
  64. package/styles.css +39 -0
@@ -0,0 +1,176 @@
1
+ import { docsQuery as e } from "../api/queries.js";
2
+ import { docRef as t } from "../lib/docs.js";
3
+ import { usePeople as n } from "../lib/people.js";
4
+ import { useCan as r } from "../lib/roles.js";
5
+ import { DocIcon as i } from "./DocIcon.js";
6
+ import { docPropertiesQuery as a, spaceScope as o, useDocPropertyActions as s } from "../lib/docProperties.js";
7
+ import { usePropertyText as c } from "./DocProperties.js";
8
+ import { cx as l } from "@parallelworks/ui";
9
+ import { Link as u } from "@tanstack/react-router";
10
+ import { useState as d } from "react";
11
+ import { useFormatter as f, useTranslations as p } from "use-intl";
12
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
13
+ import { keepPreviousData as g, useQuery as _ } from "@tanstack/react-query";
14
+ // src/components/DocTable.tsx
15
+ var v = (e) => e.kind === "select" || e.kind === "person";
16
+ function y(t, n, r) {
17
+ let i = Object.entries(r.filters ?? {}).map(([e, t]) => `${e}=${t}`), { data: o = [], isPending: s } = _({
18
+ ...e(t, {
19
+ ...n === "workspace" ? { workspace: !0 } : { team: n },
20
+ ...i.length > 0 && { property: i }
21
+ }),
22
+ placeholderData: g
23
+ }), { data: l = [] } = _(a(t, n)), u = c(t), d = r.sort ?? "title", f = l.find((e) => e.id === d), p = (e) => {
24
+ if (d === "updated") return e.updatedAt;
25
+ if (!f) return e.title.toLowerCase();
26
+ let t = e.properties?.[f.id];
27
+ return f.kind === "number" ? typeof t == "number" ? t : -Infinity : u(f, t).toLowerCase();
28
+ };
29
+ return {
30
+ docs: o.filter((e) => !e.template).sort((e, t) => {
31
+ let n = p(e), i = p(t), a = n < i ? -1 : +(n > i);
32
+ return r.desc ? -a : a;
33
+ }),
34
+ props: l,
35
+ isPending: s
36
+ };
37
+ }
38
+ function b({ workspace: e, space: n, layout: r, config: a }) {
39
+ let o = p("docViews"), s = f(), { docs: l, props: d, isPending: g } = y(e, n, a), _ = c(e), b = (e, t) => e.properties?.[t.id];
40
+ if (g) return /* @__PURE__ */ m("p", {
41
+ className: "p-4 text-sm text-muted-foreground",
42
+ children: o("loading")
43
+ });
44
+ if (r === "board") {
45
+ let t = d.find((e) => e.id === a.groupBy && v(e));
46
+ return t ? /* @__PURE__ */ m(x, {
47
+ workspace: e,
48
+ space: n,
49
+ docs: l,
50
+ props: d,
51
+ by: t
52
+ }) : /* @__PURE__ */ m("p", {
53
+ className: "p-4 text-sm text-muted-foreground",
54
+ children: o("pickGroup")
55
+ });
56
+ }
57
+ let S = a.columns ? a.columns.flatMap((e) => d.filter((t) => t.id === e)) : d;
58
+ return l.length === 0 ? /* @__PURE__ */ m("p", {
59
+ className: "p-4 text-sm text-muted-foreground",
60
+ children: o("none")
61
+ }) : /* @__PURE__ */ m("div", {
62
+ className: "overflow-x-auto",
63
+ children: /* @__PURE__ */ h("table", {
64
+ className: "doc-table w-full min-w-max text-sm",
65
+ children: [/* @__PURE__ */ m("thead", { children: /* @__PURE__ */ h("tr", { children: [
66
+ /* @__PURE__ */ m("th", {
67
+ scope: "col",
68
+ children: o("docTitle")
69
+ }),
70
+ S.map((e) => /* @__PURE__ */ m("th", {
71
+ scope: "col",
72
+ children: e.name
73
+ }, e.id)),
74
+ /* @__PURE__ */ m("th", {
75
+ scope: "col",
76
+ children: o("updated")
77
+ })
78
+ ] }) }), /* @__PURE__ */ m("tbody", { children: l.map((n) => /* @__PURE__ */ h("tr", { children: [
79
+ /* @__PURE__ */ m("td", { children: /* @__PURE__ */ h(u, {
80
+ to: "/$workspace/docs/$doc",
81
+ params: {
82
+ workspace: e,
83
+ doc: t(n)
84
+ },
85
+ className: "flex items-center gap-2 font-medium hover:underline",
86
+ children: [/* @__PURE__ */ m(i, { icon: n.icon }), /* @__PURE__ */ m("span", {
87
+ className: "truncate",
88
+ children: n.title
89
+ })]
90
+ }) }),
91
+ S.map((e) => /* @__PURE__ */ m("td", { children: _(e, b(n, e)) }, e.id)),
92
+ /* @__PURE__ */ m("td", {
93
+ className: "text-muted-foreground",
94
+ children: s.dateTime(new Date(n.updatedAt), { dateStyle: "medium" })
95
+ })
96
+ ] }, n.id)) })]
97
+ })
98
+ });
99
+ }
100
+ function x({ workspace: e, space: a, docs: f, props: g, by: _ }) {
101
+ let v = p("docViews"), { members: y } = n(e), b = c(e), x = r(e, "edit_docs", o(a)), S = s(e), [C, w] = d(null), [T, E] = d(null), D = [..._.kind === "select" ? _.options.map((e) => ({
102
+ key: e.id ?? "",
103
+ label: e.name
104
+ })) : y.map((e) => ({
105
+ key: e.user.username,
106
+ label: e.user.name
107
+ })), {
108
+ key: "",
109
+ label: v("noValue", { property: _.name })
110
+ }], O = (e) => {
111
+ let t = e.properties?.[_.id];
112
+ return typeof t == "string" ? t : "";
113
+ }, k = D.filter((e) => _.kind === "select" || e.key === "" || f.some((t) => O(t) === e.key)), A = g.filter((e) => e.id !== _.id).slice(0, 2);
114
+ return /* @__PURE__ */ m("ul", {
115
+ className: "flex gap-3 overflow-x-auto p-3",
116
+ "aria-label": v("board"),
117
+ children: k.map((n) => {
118
+ let r = f.filter((e) => O(e) === n.key);
119
+ return /* @__PURE__ */ h("li", {
120
+ "aria-label": n.label,
121
+ onDragOver: (e) => {
122
+ C && (e.preventDefault(), E(n.key));
123
+ },
124
+ onDragLeave: () => E((e) => e === n.key ? null : e),
125
+ onDrop: (e) => {
126
+ e.preventDefault(), C && S.setValues.mutate({
127
+ doc: C,
128
+ values: { [_.id]: n.key || null }
129
+ }), w(null), E(null);
130
+ },
131
+ className: l("flex w-64 shrink-0 flex-col rounded-lg border bg-muted/30", T === n.key ? "border-primary" : "border-border"),
132
+ children: [/* @__PURE__ */ h("p", {
133
+ className: "flex items-center gap-2 px-3 py-2 text-xs font-medium",
134
+ children: [/* @__PURE__ */ m("span", {
135
+ className: "truncate",
136
+ children: n.label
137
+ }), /* @__PURE__ */ m("span", {
138
+ className: "text-muted-foreground tabular-nums",
139
+ children: r.length
140
+ })]
141
+ }), /* @__PURE__ */ m("ul", {
142
+ className: "flex flex-col gap-2 px-2 pb-2",
143
+ children: r.map((n) => /* @__PURE__ */ h("li", {
144
+ draggable: x,
145
+ onDragStart: () => w(n.key),
146
+ onDragEnd: () => w(null),
147
+ className: "rounded-md border border-border bg-card p-2.5 text-sm shadow-xs",
148
+ children: [/* @__PURE__ */ h(u, {
149
+ to: "/$workspace/docs/$doc",
150
+ params: {
151
+ workspace: e,
152
+ doc: t(n)
153
+ },
154
+ className: "flex items-center gap-2 font-medium hover:underline",
155
+ children: [/* @__PURE__ */ m(i, { icon: n.icon }), /* @__PURE__ */ m("span", {
156
+ className: "truncate",
157
+ children: n.title
158
+ })]
159
+ }), A.map((e) => {
160
+ let t = b(e, n.properties?.[e.id]);
161
+ return t ? /* @__PURE__ */ h("p", {
162
+ className: "mt-1 truncate text-xs text-muted-foreground",
163
+ children: [
164
+ e.name,
165
+ ": ",
166
+ t
167
+ ]
168
+ }, e.id) : null;
169
+ })]
170
+ }, n.id))
171
+ })]
172
+ }, n.key || "none");
173
+ })
174
+ });
175
+ }
176
+ export { b as DocTable, v as groupable, y as useSpaceDocs };
@@ -0,0 +1,104 @@
1
+ import { docQuery as e, teamsQuery as t } from "../api/queries.js";
2
+ import { docViewQuery as n, docViewsQuery as r, readConfig as i } from "../lib/docProperties.js";
3
+ import { DocTable as a } from "./DocTable.js";
4
+ import { Select as o } from "@parallelworks/ui";
5
+ import { Link as s, useParams as c } from "@tanstack/react-router";
6
+ import { useTranslations as l } from "use-intl";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ import { useQuery as f } from "@tanstack/react-query";
9
+ import { Node as p, NodeViewWrapper as m, ReactNodeViewRenderer as h, mergeAttributes as g } from "@tiptap/react";
10
+ // src/components/DocViewBlock.tsx
11
+ var _ = p.create({
12
+ name: "docView",
13
+ group: "block",
14
+ atom: !0,
15
+ draggable: !0,
16
+ addAttributes: () => ({ view: { default: "" } }),
17
+ parseHTML: () => [{ tag: "div[data-doc-view]" }],
18
+ renderHTML: ({ HTMLAttributes: e }) => ["div", g(e, { "data-doc-view": "" })],
19
+ addNodeView: () => h(v, { stopEvent: ({ event: e }) => !e.type.startsWith("drag") && e.target instanceof Element && !!e.target.closest("[data-view-ui]") }),
20
+ markdownTokenName: "docView",
21
+ markdownTokenizer: {
22
+ name: "docView",
23
+ level: "block",
24
+ start: (e) => e.search(/^:::docview/m),
25
+ tokenize: (e) => {
26
+ let t = /^:::docview[ \t]*([0-9a-f-]{36})?[ \t]*\n[ \t]*:::[ \t]*(?:\n|$)/.exec(e);
27
+ return t ? {
28
+ type: "docView",
29
+ raw: t[0],
30
+ text: t[1] ?? ""
31
+ } : void 0;
32
+ }
33
+ },
34
+ parseMarkdown: (e, t) => t.createNode("docView", { view: e.text ?? "" }),
35
+ renderMarkdown: (e) => `:::docview ${String(e.attrs?.view ?? "")}\n:::`
36
+ });
37
+ function v({ node: p, editor: h, updateAttributes: g }) {
38
+ let _ = l("docViews"), { workspace: v = "", doc: y = "" } = c({ strict: !1 }), b = String(p.attrs.view ?? ""), { data: x = [] } = f(t(v)), { data: S } = f({
39
+ ...n(v, b),
40
+ enabled: !!v && !!b
41
+ }), { data: C } = f({
42
+ ...e(v, y),
43
+ enabled: !b && !!y
44
+ }), w = x.find((e) => e.id === C?.teamId)?.key ?? "workspace", { data: T = [] } = f({
45
+ ...r(v, w),
46
+ enabled: !b && !!v
47
+ });
48
+ if (!b || !S) return /* @__PURE__ */ u(m, {
49
+ className: "doc-view-block",
50
+ contentEditable: !1,
51
+ children: /* @__PURE__ */ u("div", {
52
+ "data-view-ui": !0,
53
+ className: "p-3",
54
+ children: h.isEditable ? /* @__PURE__ */ u(o, {
55
+ value: "",
56
+ items: [{
57
+ value: "",
58
+ label: _("embedPick")
59
+ }, ...T.map((e) => ({
60
+ value: e.id,
61
+ label: e.name
62
+ }))],
63
+ onValueChange: (e) => e && g({ view: e }),
64
+ "aria-label": _("embedPick"),
65
+ size: "sm",
66
+ width: "content"
67
+ }) : /* @__PURE__ */ u("p", {
68
+ className: "text-xs text-muted-foreground",
69
+ children: _("loading")
70
+ })
71
+ })
72
+ });
73
+ let E = x.find((e) => e.id === S.teamId)?.key ?? "workspace";
74
+ return /* @__PURE__ */ u(m, {
75
+ className: "doc-view-block not-prose",
76
+ contentEditable: !1,
77
+ "data-drag-handle": !0,
78
+ children: /* @__PURE__ */ d("div", {
79
+ "data-view-ui": !0,
80
+ children: [/* @__PURE__ */ d("div", {
81
+ className: "flex items-center gap-2 border-b border-border px-3 py-1.5 text-xs",
82
+ children: [/* @__PURE__ */ u("span", {
83
+ className: "min-w-0 flex-1 truncate font-medium",
84
+ children: S.name
85
+ }), /* @__PURE__ */ u(s, {
86
+ to: "/$workspace/docs/space/$space",
87
+ params: {
88
+ workspace: v,
89
+ space: E
90
+ },
91
+ search: { view: S.id },
92
+ className: "text-primary hover:underline",
93
+ children: _("open")
94
+ })]
95
+ }), /* @__PURE__ */ u(a, {
96
+ workspace: v,
97
+ space: E,
98
+ layout: S.layout,
99
+ config: i(S.config)
100
+ })]
101
+ })
102
+ });
103
+ }
104
+ export { _ as DocViewBlock };
@@ -9,7 +9,7 @@ import { EntityIcon as _ } from "./EntityIcon.js";
9
9
  import { DocIcon as v } from "./DocIcon.js";
10
10
  import { indentLevel as y, revealed as b, saveTree as ee, savedTree as te, spaceOf as x, toggled as S } from "../lib/docTree.js";
11
11
  import { useMarkdownTransfer as C } from "./MarkdownTransfer.js";
12
- import { Combobox as w, IconButton as ne, RelativeTime as T, SearchInput as re, Tooltip as E, buttonClasses as ie, menuDivider as D, useOpenMenu as O } from "@parallelworks/ui";
12
+ import { Combobox as ne, IconButton as w, RelativeTime as T, SearchInput as re, Tooltip as E, buttonClasses as ie, menuDivider as D, useOpenMenu as O } from "@parallelworks/ui";
13
13
  import { useEffect as k, useRef as ae, useState as A, useSyncExternalStore as oe } from "react";
14
14
  import { useTranslations as j } from "use-intl";
15
15
  import { Fragment as se, jsx as M, jsxs as N } from "react/jsx-runtime";
@@ -121,7 +121,7 @@ function G({ workspace: r, current: d, page: f = !1, onIndex: p = !1, menu: v, t
121
121
  },
122
122
  search: { rename: !0 }
123
123
  }) })
124
- }, Te = /* @__PURE__ */ N(se, { children: [/* @__PURE__ */ M(ne, {
124
+ }, Te = /* @__PURE__ */ N(se, { children: [/* @__PURE__ */ M(w, {
125
125
  variant: "ghost",
126
126
  size: "xs",
127
127
  icon: /* @__PURE__ */ M(u, {}),
@@ -131,7 +131,7 @@ function G({ workspace: r, current: d, page: f = !1, onIndex: p = !1, menu: v, t
131
131
  W((e) => !e), K("");
132
132
  },
133
133
  className: f ? "" : z
134
- }), Z.length === 0 ? /* @__PURE__ */ M(ne, {
134
+ }), Z.length === 0 ? /* @__PURE__ */ M(w, {
135
135
  variant: "ghost",
136
136
  size: "xs",
137
137
  icon: /* @__PURE__ */ M(s, {}),
@@ -139,7 +139,7 @@ function G({ workspace: r, current: d, page: f = !1, onIndex: p = !1, menu: v, t
139
139
  onClick: () => B.create.mutate({}),
140
140
  disabled: B.create.isPending,
141
141
  className: f ? "" : z
142
- }) : /* @__PURE__ */ M(w, {
142
+ }) : /* @__PURE__ */ M(ne, {
143
143
  items: [{
144
144
  value: "",
145
145
  label: D.name
@@ -204,7 +204,7 @@ function G({ workspace: r, current: d, page: f = !1, onIndex: p = !1, menu: v, t
204
204
  })]
205
205
  }),
206
206
  Te,
207
- /* @__PURE__ */ M(ne, {
207
+ /* @__PURE__ */ M(w, {
208
208
  variant: "ghost",
209
209
  size: "xs",
210
210
  icon: /* @__PURE__ */ M(c, { className: R(!Q && "rotate-90") }),
@@ -284,11 +284,21 @@ function G({ workspace: r, current: d, page: f = !1, onIndex: p = !1, menu: v, t
284
284
  });
285
285
  }
286
286
  function pe({ ctx: e, id: n, team: i, name: a, icon: o, docs: l, closed: u, onToggle: m, row: g = !1 }) {
287
- let _ = j("docs"), v = j("common"), y = O(), b = h(e.workspace), ee = f(), te = t(), x = e.workspace, { data: S = [] } = F(r(x)), C = `docs-space-${n}`, w = () => [
287
+ let _ = j("docs"), v = j("common"), y = O(), b = h(e.workspace), ee = f(), te = t(), x = e.workspace, { data: S = [] } = F(r(x)), C = `docs-space-${n}`, ne = j("docViews"), w = () => [
288
288
  {
289
289
  label: _("newInSpace"),
290
290
  onClick: () => b.create.mutate({ team: i?.key })
291
291
  },
292
+ {
293
+ label: ne("openTable"),
294
+ onClick: () => te({
295
+ to: "/$workspace/docs/space/$space",
296
+ params: {
297
+ workspace: x,
298
+ space: i?.key ?? "workspace"
299
+ }
300
+ })
301
+ },
292
302
  {
293
303
  label: _("newFromTemplate"),
294
304
  items: S.map((e) => ({
@@ -5,12 +5,13 @@ import { Columns as p } from "./columns.js";
5
5
  import { DateChip as m } from "./DateChip.js";
6
6
  import { DocButton as h } from "./DocButton.js";
7
7
  import { DocLinkPicker as g } from "./DocLinkPicker.js";
8
- import { IssueListBlock as _ } from "./IssueListBlock.js";
9
- import { LinkCard as ee } from "./LinkCard.js";
10
- import { MentionPicker as v } from "./MentionPicker.js";
11
- import { Diagrams as y, MathBlock as b, MathInline as x } from "./mathDiagrams.js";
12
- import { SlashMenu as S } from "./SlashMenu.js";
13
- import { SubPages as te } from "./SubPages.js";
8
+ import { DocViewBlock as _ } from "./DocViewBlock.js";
9
+ import { IssueListBlock as ee } from "./IssueListBlock.js";
10
+ import { LinkCard as v } from "./LinkCard.js";
11
+ import { MentionPicker as y } from "./MentionPicker.js";
12
+ import { Diagrams as b, MathBlock as te, MathInline as ne } from "./mathDiagrams.js";
13
+ import { SlashMenu as x } from "./SlashMenu.js";
14
+ import { SubPages as S } from "./SubPages.js";
14
15
  import { MarkdownTable as C } from "./table.js";
15
16
  import { useEffect as w, useRef as T } from "react";
16
17
  import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
@@ -21,8 +22,8 @@ import { TableKit as P } from "@tiptap/extension-table";
21
22
  import { Placeholder as F } from "@tiptap/extensions";
22
23
  import { Markdown as I } from "@tiptap/markdown";
23
24
  import L from "@tiptap/starter-kit";
24
- import R from "highlight.js/lib/languages/bash";
25
- import ne from "highlight.js/lib/languages/css";
25
+ import re from "highlight.js/lib/languages/bash";
26
+ import R from "highlight.js/lib/languages/css";
26
27
  import z from "highlight.js/lib/languages/diff";
27
28
  import B from "highlight.js/lib/languages/dockerfile";
28
29
  import V from "highlight.js/lib/languages/go";
@@ -36,12 +37,12 @@ import J from "highlight.js/lib/languages/shell";
36
37
  import Y from "highlight.js/lib/languages/sql";
37
38
  import X from "highlight.js/lib/languages/typescript";
38
39
  import Z from "highlight.js/lib/languages/xml";
39
- import re from "highlight.js/lib/languages/yaml";
40
- import { createLowlight as ie } from "lowlight";
40
+ import ie from "highlight.js/lib/languages/yaml";
41
+ import { createLowlight as ae } from "lowlight";
41
42
  // src/components/Editor.tsx
42
- var ae = ie({
43
- bash: R,
44
- css: ne,
43
+ var oe = ae({
44
+ bash: re,
45
+ css: R,
45
46
  diff: z,
46
47
  dockerfile: B,
47
48
  go: V,
@@ -55,9 +56,9 @@ var ae = ie({
55
56
  sql: Y,
56
57
  typescript: X,
57
58
  xml: Z,
58
- yaml: re
59
+ yaml: ie
59
60
  });
60
- function Q({ editable: g = !0, placeholder: v = "", collaborative: S = !1 } = {}) {
61
+ function Q({ editable: g = !0, placeholder: y = "", collaborative: x = !1 } = {}) {
61
62
  return [
62
63
  L.configure({
63
64
  link: {
@@ -66,15 +67,15 @@ function Q({ editable: g = !0, placeholder: v = "", collaborative: S = !1 } = {}
66
67
  },
67
68
  codeBlock: !1,
68
69
  blockquote: !1,
69
- ...g && !S ? {} : { trailingNode: !1 },
70
- ...S ? { undoRedo: !1 } : {}
70
+ ...g && !x ? {} : { trailingNode: !1 },
71
+ ...x ? { undoRedo: !1 } : {}
71
72
  }),
72
- j.configure({ lowlight: ae }),
73
+ j.configure({ lowlight: oe }),
73
74
  l,
74
75
  N,
75
76
  M.configure({ nested: !0 }),
76
77
  f,
77
- te,
78
+ S,
78
79
  d,
79
80
  u,
80
81
  p,
@@ -83,7 +84,7 @@ function Q({ editable: g = !0, placeholder: v = "", collaborative: S = !1 } = {}
83
84
  resizable: !1,
84
85
  allowTableNodeSelection: !1
85
86
  }),
86
- F.configure({ placeholder: v }),
87
+ F.configure({ placeholder: y }),
87
88
  I,
88
89
  a,
89
90
  r,
@@ -94,12 +95,13 @@ function Q({ editable: g = !0, placeholder: v = "", collaborative: S = !1 } = {}
94
95
  s,
95
96
  c,
96
97
  i,
98
+ _,
97
99
  h,
98
- ee,
99
- x,
100
+ v,
101
+ ne,
102
+ te,
100
103
  b,
101
- y,
102
- _,
104
+ ee,
103
105
  m
104
106
  ];
105
107
  }
@@ -118,7 +120,7 @@ function $(e) {
118
120
  }
119
121
  };
120
122
  }
121
- function oe({ 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 }) {
123
+ function se({ 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 }) {
122
124
  let f = T({
123
125
  onChange: t,
124
126
  onSubmit: n,
@@ -172,11 +174,11 @@ function oe({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: i, placeho
172
174
  return h.current = d, w(() => (h.current?.(m), () => h.current?.(null)), [m]), /* @__PURE__ */ O(E, { children: [
173
175
  /* @__PURE__ */ D(k, { editor: m }),
174
176
  o && /* @__PURE__ */ D(g, { editor: m }),
175
- o && /* @__PURE__ */ D(S, {
177
+ o && /* @__PURE__ */ D(x, {
176
178
  editor: m,
177
179
  onFiles: p
178
180
  }),
179
- o && /* @__PURE__ */ D(v, { editor: m })
181
+ o && /* @__PURE__ */ D(y, { editor: m })
180
182
  ] });
181
183
  }
182
- export { oe as Editor, Q as contentExtensions, $ as fileHandlers };
184
+ export { se as Editor, Q as contentExtensions, $ as fileHandlers };
@@ -1,9 +1,9 @@
1
1
  import { basePath as e } from "../lib/base.js";
2
2
  import { api as t, unwrap as n } from "../api/client.js";
3
3
  import { githubAccountQuery as r, githubSettingsQuery as i, teamsQuery as a } from "../api/queries.js";
4
- import { CheckIcon as o, CodeHostIcon as s } from "./icons.js";
5
- import { cardList as c, useFormError as l } from "./settings.js";
6
- import { useConfirm as u } from "../lib/confirm.js";
4
+ import { useConfirm as o } from "../lib/confirm.js";
5
+ import { CheckIcon as s, CodeHostIcon as c } from "./icons.js";
6
+ import { cardList as l, useFormError as u } from "./settings.js";
7
7
  import { ConnectionCard as d } from "./ConnectionCard.js";
8
8
  import { TeamName as f } from "./TeamName.js";
9
9
  import { Button as p, ErrorText as m, ProgressBar as h, Select as g, SettingsCard as _, StatusLabel as v, Tooltip as y, buttonClasses as b } from "@parallelworks/ui";
@@ -44,15 +44,15 @@ async function I(e) {
44
44
  }
45
45
  var L = () => window.location.pathname.slice(e.length) || "/";
46
46
  function R() {
47
- let { data: e } = M(r), i = T("github"), a = j(), o = l(), c = P(), f = k({
47
+ let { data: e } = M(r), i = T("github"), a = j(), s = u(), l = P(), f = k({
48
48
  mutationFn: () => I(async () => n(await t.POST("/api/v1/me/github", { body: { returnTo: L() } }))),
49
- onMutate: o.clear,
50
- onError: o.set
49
+ onMutate: s.clear,
50
+ onError: s.set
51
51
  }), m = k({
52
52
  mutationFn: async () => n(await t.DELETE("/api/v1/me/github")),
53
- onMutate: o.clear,
53
+ onMutate: s.clear,
54
54
  onSettled: () => a.invalidateQueries({ queryKey: r.queryKey })
55
- }), { confirm: h, dialog: g } = u();
55
+ }), { confirm: h, dialog: g } = o();
56
56
  if (!e.enabled) return null;
57
57
  let _ = e.keepsTokens ? i("accountDescriptionBothWays") : i("accountDescription"), y = e.login ? /* @__PURE__ */ D(z, {
58
58
  login: e.login,
@@ -62,7 +62,7 @@ function R() {
62
62
  children: i("notLinkedLabel")
63
63
  });
64
64
  if (e.linkedByHost) return /* @__PURE__ */ D(d, {
65
- icon: /* @__PURE__ */ D(s, { className: "size-7" }),
65
+ icon: /* @__PURE__ */ D(c, { className: "size-7" }),
66
66
  name: i("accountTitle"),
67
67
  status: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
68
68
  className: "block",
@@ -79,10 +79,10 @@ function R() {
79
79
  });
80
80
  let S = !!e.login && e.keepsTokens && !e.actsAsYou;
81
81
  return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(d, {
82
- icon: /* @__PURE__ */ D(s, { className: "size-7" }),
82
+ icon: /* @__PURE__ */ D(c, { className: "size-7" }),
83
83
  name: i("accountTitle"),
84
84
  status: y,
85
- error: o.error,
85
+ error: s.error,
86
86
  action: e.login ? /* @__PURE__ */ D(p, {
87
87
  variant: "outline",
88
88
  type: "button",
@@ -101,7 +101,7 @@ function R() {
101
101
  onClick: () => f.mutate(),
102
102
  children: i("link")
103
103
  })] }),
104
- children: (c || S) && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(F, { outcome: c }), S && /* @__PURE__ */ O("div", {
104
+ children: (l || S) && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(F, { outcome: l }), S && /* @__PURE__ */ O("div", {
105
105
  className: "flex items-center gap-3 rounded-lg border border-border px-4 py-3 text-sm",
106
106
  children: [/* @__PURE__ */ D("p", {
107
107
  className: "min-w-0 flex-1",
@@ -134,7 +134,7 @@ function B({ workspace: e }) {
134
134
  title: r("settingsTitle"),
135
135
  description: r("settingsDescription"),
136
136
  children: /* @__PURE__ */ O("ul", {
137
- className: c,
137
+ className: l,
138
138
  children: [t.repositories.map((t) => {
139
139
  let i = n.find((e) => e.key === t.team)?.name ?? t.team;
140
140
  return /* @__PURE__ */ D("li", {
@@ -167,8 +167,8 @@ function B({ workspace: e }) {
167
167
  }) : null;
168
168
  }
169
169
  var V = "", H = 2e3;
170
- function U({ workspace: e, repository: r, teamName: s, children: c }) {
171
- let d = T("github"), h = j(), _ = l(), { confirm: v, dialog: y } = u(), { data: b } = A(i(e)), { data: C = [] } = A(a(e)), w = (e) => C.find((t) => t.key === e) ?? {
170
+ function U({ workspace: e, repository: r, teamName: c, children: l }) {
171
+ let d = T("github"), h = j(), _ = u(), { confirm: v, dialog: y } = o(), { data: b } = A(i(e)), { data: C = [] } = A(a(e)), w = (e) => C.find((t) => t.key === e) ?? {
172
172
  icon: "",
173
173
  name: e
174
174
  }, M = (e) => w(e).name, N = (e) => () => /* @__PURE__ */ D(f, { team: w(e) }), P = (b?.repositories ?? []).filter((e) => e.id === r.id && e.team !== r.team), F = P.find((e) => e.syncMode), [I, L] = S(!1);
@@ -224,12 +224,12 @@ function U({ workspace: e, repository: r, teamName: s, children: c }) {
224
224
  repository: r.fullName
225
225
  }),
226
226
  description: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("p", { children: d.rich("takeOverIntro", {
227
- teamName: s,
227
+ teamName: c,
228
228
  team: N(r.team)
229
229
  }) }), /* @__PURE__ */ O("ul", {
230
230
  className: "mt-2 list-disc space-y-1 pl-5",
231
231
  children: [/* @__PURE__ */ D("li", { children: d.rich("takeOverNew", {
232
- teamName: s,
232
+ teamName: c,
233
233
  team: N(r.team)
234
234
  }) }), F.imported > 0 && /* @__PURE__ */ D("li", { children: d.rich("takeOverKeeps", {
235
235
  fromName: t,
@@ -237,7 +237,7 @@ function U({ workspace: e, repository: r, teamName: s, children: c }) {
237
237
  count: F.imported
238
238
  }) })]
239
239
  })] }),
240
- confirmLabel: d("takeOver", { team: s }),
240
+ confirmLabel: d("takeOver", { team: c }),
241
241
  destructive: !1,
242
242
  onConfirm: () => B.mutateAsync({
243
243
  syncMode: e,
@@ -255,12 +255,12 @@ function U({ workspace: e, repository: r, teamName: s, children: c }) {
255
255
  /* @__PURE__ */ O("div", {
256
256
  className: "flex flex-wrap items-center gap-2",
257
257
  children: [
258
- c,
258
+ l,
259
259
  I && /* @__PURE__ */ O("span", {
260
260
  role: "status",
261
261
  className: "flex items-center gap-1 text-xs text-muted-foreground",
262
262
  children: [
263
- /* @__PURE__ */ D(o, { className: "size-3.5" }),
263
+ /* @__PURE__ */ D(s, { className: "size-3.5" }),
264
264
  " ",
265
265
  d("saved")
266
266
  ]
@@ -268,7 +268,7 @@ function U({ workspace: e, repository: r, teamName: s, children: c }) {
268
268
  /* @__PURE__ */ D(g, {
269
269
  "aria-label": d("modeFor", {
270
270
  repository: r.fullName,
271
- team: s
271
+ team: c
272
272
  }),
273
273
  value: K,
274
274
  disabled: B.isPending,
@@ -411,7 +411,7 @@ function q({ links: e }) {
411
411
  target: "_blank",
412
412
  rel: "noreferrer",
413
413
  className: "inline-flex h-6 min-w-0 items-center gap-1.5 rounded-md border border-border px-1.5 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",
414
- children: [/* @__PURE__ */ D(s, { className: "size-3.5" }), /* @__PURE__ */ D("span", {
414
+ children: [/* @__PURE__ */ D(c, { className: "size-3.5" }), /* @__PURE__ */ D("span", {
415
415
  className: "truncate",
416
416
  children: J(e.url)
417
417
  })]