@parallelworks/tandem-web 0.139.3 → 0.141.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.
@@ -0,0 +1,221 @@
1
+ import { api as e, unwrap as t } from "../api/client.js";
2
+ import { docQuery as n, docTemplatesQuery as r, docsQuery as i } from "../api/queries.js";
3
+ import { EditIcon as a } from "./icons.js";
4
+ import { docKey as o, docRef as s, useTemplateValues as c } from "../lib/docs.js";
5
+ import { closingFence as l } from "./toggle.js";
6
+ import { Button as u, Combobox as d, IconButton as f, Input as p, Popover as m, SegmentedControl as h, Select as g, Textarea as _ } from "@parallelworks/ui";
7
+ import { useNavigate as v, useParams as y } from "@tanstack/react-router";
8
+ import { useState as b } from "react";
9
+ import { useTranslations as x } from "use-intl";
10
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
11
+ import { useQuery as w } from "@tanstack/react-query";
12
+ import { Node as T, NodeViewWrapper as E, ReactNodeViewRenderer as D, mergeAttributes as O } from "@tiptap/react";
13
+ // src/components/DocButton.tsx
14
+ var k = /^:::button[ \t]*([^\n]*)\n/, A = /\s+(template|parent)=([\w-]+)/g, j = T.create({
15
+ name: "docButton",
16
+ group: "block",
17
+ atom: !0,
18
+ draggable: !0,
19
+ addAttributes: () => ({
20
+ label: { default: "" },
21
+ action: { default: "insert" },
22
+ blocks: { default: "" },
23
+ template: { default: "" },
24
+ parent: { default: "" }
25
+ }),
26
+ parseHTML: () => [{ tag: "div[data-doc-button]" }],
27
+ renderHTML: ({ node: e, HTMLAttributes: t }) => [
28
+ "div",
29
+ O(t, { "data-doc-button": "" }),
30
+ String(e.attrs.label)
31
+ ],
32
+ addNodeView: () => D(M, { stopEvent: ({ event: e }) => e.target instanceof Element && !!e.target.closest("[data-button-ui]") }),
33
+ markdownTokenName: "docButton",
34
+ markdownTokenizer: {
35
+ name: "docButton",
36
+ level: "block",
37
+ start: (e) => e.search(/^:::button/m),
38
+ tokenize: (e) => {
39
+ let t = k.exec(e);
40
+ if (!t) return;
41
+ let n = e.slice(t[0].length), r = l(n);
42
+ if (r) return {
43
+ type: "docButton",
44
+ raw: e.slice(0, t[0].length + r.index + r.length),
45
+ text: n.slice(0, r.index).trim(),
46
+ head: t[1] ?? ""
47
+ };
48
+ }
49
+ },
50
+ parseMarkdown: (e, t) => {
51
+ let n = String(e.head ?? ""), r = {};
52
+ for (let e of n.matchAll(A)) r[e[1] ?? ""] = e[2] ?? "";
53
+ return t.createNode("docButton", {
54
+ label: n.replace(A, "").trim(),
55
+ action: r.template ? "doc" : "insert",
56
+ blocks: e.text ?? "",
57
+ template: r.template ?? "",
58
+ parent: r.parent ?? ""
59
+ });
60
+ },
61
+ renderMarkdown: (e) => {
62
+ let t = e.attrs ?? {}, n = String(t.label ?? "").replace(/\n/g, " ");
63
+ if (t.action === "doc") {
64
+ let e = t.parent ? ` parent=${t.parent}` : "";
65
+ return `:::button ${n} template=${t.template ?? ""}${e}\n:::`;
66
+ }
67
+ return `:::button ${n}\n\n${String(t.blocks ?? "").trim()}\n\n:::`;
68
+ }
69
+ });
70
+ function M({ node: r, editor: i, getPos: l, updateAttributes: d }) {
71
+ let p = x("docButton"), h = v(), g = c(), { workspace: _ = "", doc: T = "" } = y({ strict: !1 }), { data: D } = w({
72
+ ...n(_, T),
73
+ enabled: !!_ && !!T
74
+ }), [O, k] = b(!1), A = String(r.attrs.label ?? "") || p("untitled"), j = r.attrs.action, M = j === "doc" ? !!r.attrs.template : !!String(r.attrs.blocks ?? "").trim(), P = async () => {
75
+ if (j === "insert") {
76
+ let e = g(), t = Object.entries(e).reduce((e, [t, n]) => e.replaceAll(`{{${t}}}`, n), String(r.attrs.blocks ?? "")), n = l();
77
+ if (n === void 0) return;
78
+ i.chain().focus().insertContentAt(n + r.nodeSize, t, { contentType: "markdown" }).run();
79
+ } else {
80
+ k(!0);
81
+ try {
82
+ let n = String(r.attrs.parent ?? "") || D?.key, i = t(await e.POST("/api/v1/workspaces/{workspace}/docs", {
83
+ params: { path: { workspace: _ } },
84
+ body: {
85
+ template: String(r.attrs.template),
86
+ variables: g(),
87
+ ...n && { parent: n }
88
+ }
89
+ }));
90
+ h({
91
+ to: "/$workspace/docs/$doc",
92
+ params: {
93
+ workspace: _,
94
+ doc: s(i)
95
+ }
96
+ });
97
+ } finally {
98
+ k(!1);
99
+ }
100
+ }
101
+ };
102
+ return /* @__PURE__ */ S(E, {
103
+ className: "doc-button",
104
+ contentEditable: !1,
105
+ children: /* @__PURE__ */ C("div", {
106
+ "data-button-ui": !0,
107
+ className: "flex items-center gap-1",
108
+ children: [/* @__PURE__ */ S(u, {
109
+ size: "sm",
110
+ onClick: () => void P(),
111
+ disabled: !i.isEditable || !M,
112
+ loading: O,
113
+ children: A
114
+ }), i.isEditable && /* @__PURE__ */ S(m, {
115
+ trigger: /* @__PURE__ */ S(f, {
116
+ variant: "ghost",
117
+ size: "xs",
118
+ icon: /* @__PURE__ */ S(a, {}),
119
+ label: p("edit")
120
+ }),
121
+ align: "start",
122
+ className: "w-96",
123
+ initialFocus: "first-control",
124
+ "aria-label": p("edit"),
125
+ children: /* @__PURE__ */ S(N, {
126
+ workspace: _,
127
+ attrs: r.attrs,
128
+ thisDoc: D?.key ?? (T ? o(T) : ""),
129
+ onChange: d
130
+ })
131
+ })]
132
+ })
133
+ });
134
+ }
135
+ function N({ workspace: e, attrs: t, thisDoc: n, onChange: a }) {
136
+ let o = x("docButton"), { data: s = [] } = w(r(e)), { data: c = [] } = w(i(e)), l = t.action;
137
+ return /* @__PURE__ */ C("div", {
138
+ className: "space-y-3 text-sm",
139
+ children: [
140
+ /* @__PURE__ */ C("label", {
141
+ className: "block text-xs font-medium text-muted-foreground",
142
+ children: [o("label"), /* @__PURE__ */ S(p, {
143
+ value: String(t.label ?? ""),
144
+ onChange: (e) => a({ label: e.target.value }),
145
+ placeholder: o("labelPlaceholder"),
146
+ className: "mt-1"
147
+ })]
148
+ }),
149
+ /* @__PURE__ */ S(h, {
150
+ label: o("does"),
151
+ size: "sm",
152
+ value: l,
153
+ onValueChange: (e) => a({ action: e }),
154
+ options: [{
155
+ value: "insert",
156
+ label: o("insert")
157
+ }, {
158
+ value: "doc",
159
+ label: o("makeDoc")
160
+ }]
161
+ }),
162
+ l === "insert" ? /* @__PURE__ */ C("label", {
163
+ className: "block text-xs font-medium text-muted-foreground",
164
+ children: [
165
+ o("blocks"),
166
+ /* @__PURE__ */ S(_, {
167
+ value: String(t.blocks ?? ""),
168
+ onChange: (e) => a({ blocks: e.target.value }),
169
+ rows: 6,
170
+ placeholder: o("blocksPlaceholder"),
171
+ className: "mt-1 font-mono text-xs"
172
+ }),
173
+ /* @__PURE__ */ S("span", {
174
+ className: "mt-1 block font-normal",
175
+ children: o("placeholders")
176
+ })
177
+ ]
178
+ }) : /* @__PURE__ */ C("div", {
179
+ className: "space-y-2",
180
+ children: [/* @__PURE__ */ C("div", {
181
+ className: "text-xs font-medium text-muted-foreground",
182
+ children: [o("template"), /* @__PURE__ */ S("div", {
183
+ className: "mt-1",
184
+ children: /* @__PURE__ */ S(g, {
185
+ value: String(t.template ?? ""),
186
+ items: [{
187
+ value: "",
188
+ label: o("chooseTemplate")
189
+ }, ...s.map((e) => ({
190
+ value: e.id,
191
+ label: e.title
192
+ }))],
193
+ onValueChange: (e) => a({ template: e }),
194
+ "aria-label": o("template"),
195
+ width: "content"
196
+ })
197
+ })]
198
+ }), /* @__PURE__ */ C("div", {
199
+ className: "text-xs font-medium text-muted-foreground",
200
+ children: [o("parent"), /* @__PURE__ */ S("div", {
201
+ className: "mt-1",
202
+ children: /* @__PURE__ */ S(d, {
203
+ items: [{
204
+ value: "",
205
+ label: o("thisDoc")
206
+ }, ...c.filter((e) => e.key !== n).map((e) => ({
207
+ value: e.key,
208
+ label: e.title
209
+ }))],
210
+ value: String(t.parent ?? ""),
211
+ onValueChange: (e) => e !== null && a({ parent: e }),
212
+ "aria-label": o("parent"),
213
+ placeholder: o("parent")
214
+ })
215
+ })]
216
+ })]
217
+ })
218
+ ]
219
+ });
220
+ }
221
+ export { j as DocButton };
@@ -3,87 +3,88 @@ import { Callout as l } from "./callout.js";
3
3
  import { DetailsContent as u, DetailsSummary as d, Toggle as f } from "./toggle.js";
4
4
  import { Columns as p } from "./columns.js";
5
5
  import { DateChip as m } from "./DateChip.js";
6
- import { DocLinkPicker as h } from "./DocLinkPicker.js";
7
- import { IssueListBlock as g } from "./IssueListBlock.js";
8
- import { LinkCard as _ } from "./LinkCard.js";
6
+ import { DocButton as h } from "./DocButton.js";
7
+ import { DocLinkPicker as g } from "./DocLinkPicker.js";
8
+ import { IssueListBlock as _ } from "./IssueListBlock.js";
9
+ import { LinkCard as ee } from "./LinkCard.js";
9
10
  import { MentionPicker as v } from "./MentionPicker.js";
10
11
  import { Diagrams as y, MathBlock as b, MathInline as x } from "./mathDiagrams.js";
11
12
  import { SlashMenu as S } from "./SlashMenu.js";
12
- import { SubPages as ee } from "./SubPages.js";
13
- import { MarkdownTable as te } from "./table.js";
14
- import { useEffect as C, useRef as w } from "react";
15
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
16
- import { EditorContent as O, useEditor as k } from "@tiptap/react";
17
- import { CodeBlockLowlight as A } from "@tiptap/extension-code-block-lowlight";
18
- import { TaskItem as j, TaskList as M } from "@tiptap/extension-list";
19
- import { TableKit as N } from "@tiptap/extension-table";
20
- import { Placeholder as P } from "@tiptap/extensions";
21
- import { Markdown as F } from "@tiptap/markdown";
22
- import I from "@tiptap/starter-kit";
23
- import L from "highlight.js/lib/languages/bash";
24
- import R from "highlight.js/lib/languages/css";
25
- import ne from "highlight.js/lib/languages/diff";
26
- import z from "highlight.js/lib/languages/dockerfile";
27
- import B from "highlight.js/lib/languages/go";
28
- import V from "highlight.js/lib/languages/ini";
29
- import H from "highlight.js/lib/languages/javascript";
30
- import U from "highlight.js/lib/languages/json";
31
- import W from "highlight.js/lib/languages/markdown";
32
- import G from "highlight.js/lib/languages/python";
33
- import K from "highlight.js/lib/languages/rust";
34
- import q from "highlight.js/lib/languages/shell";
35
- import J from "highlight.js/lib/languages/sql";
36
- import Y from "highlight.js/lib/languages/typescript";
37
- import X from "highlight.js/lib/languages/xml";
38
- import Z from "highlight.js/lib/languages/yaml";
39
- import { createLowlight as re } from "lowlight";
13
+ import { SubPages as te } from "./SubPages.js";
14
+ import { MarkdownTable as C } from "./table.js";
15
+ import { useEffect as w, useRef as T } from "react";
16
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
17
+ import { EditorContent as k, useEditor as A } from "@tiptap/react";
18
+ import { CodeBlockLowlight as j } from "@tiptap/extension-code-block-lowlight";
19
+ import { TaskItem as M, TaskList as N } from "@tiptap/extension-list";
20
+ import { TableKit as P } from "@tiptap/extension-table";
21
+ import { Placeholder as F } from "@tiptap/extensions";
22
+ import { Markdown as I } from "@tiptap/markdown";
23
+ import L from "@tiptap/starter-kit";
24
+ import R from "highlight.js/lib/languages/bash";
25
+ import ne from "highlight.js/lib/languages/css";
26
+ import z from "highlight.js/lib/languages/diff";
27
+ import B from "highlight.js/lib/languages/dockerfile";
28
+ import V from "highlight.js/lib/languages/go";
29
+ import H from "highlight.js/lib/languages/ini";
30
+ import U from "highlight.js/lib/languages/javascript";
31
+ import W from "highlight.js/lib/languages/json";
32
+ import G from "highlight.js/lib/languages/markdown";
33
+ import K from "highlight.js/lib/languages/python";
34
+ import q from "highlight.js/lib/languages/rust";
35
+ import J from "highlight.js/lib/languages/shell";
36
+ import Y from "highlight.js/lib/languages/sql";
37
+ import X from "highlight.js/lib/languages/typescript";
38
+ 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
41
  // src/components/Editor.tsx
41
- var ie = re({
42
- bash: L,
43
- css: R,
44
- diff: ne,
45
- dockerfile: z,
46
- go: B,
47
- ini: V,
48
- javascript: H,
49
- json: U,
50
- markdown: W,
51
- python: G,
52
- rust: K,
53
- shell: q,
54
- sql: J,
55
- typescript: Y,
56
- xml: X,
57
- yaml: Z
42
+ var ae = ie({
43
+ bash: R,
44
+ css: ne,
45
+ diff: z,
46
+ dockerfile: B,
47
+ go: V,
48
+ ini: H,
49
+ javascript: U,
50
+ json: W,
51
+ markdown: G,
52
+ python: K,
53
+ rust: q,
54
+ shell: J,
55
+ sql: Y,
56
+ typescript: X,
57
+ xml: Z,
58
+ yaml: re
58
59
  });
59
- function Q({ editable: h = !0, placeholder: v = "", collaborative: S = !1 } = {}) {
60
+ function Q({ editable: g = !0, placeholder: v = "", collaborative: S = !1 } = {}) {
60
61
  return [
61
- I.configure({
62
+ L.configure({
62
63
  link: {
63
- openOnClick: !h,
64
+ openOnClick: !g,
64
65
  autolink: !0
65
66
  },
66
67
  codeBlock: !1,
67
68
  blockquote: !1,
68
- ...h && !S ? {} : { trailingNode: !1 },
69
+ ...g && !S ? {} : { trailingNode: !1 },
69
70
  ...S ? { undoRedo: !1 } : {}
70
71
  }),
71
- A.configure({ lowlight: ie }),
72
+ j.configure({ lowlight: ae }),
72
73
  l,
73
- M,
74
- j.configure({ nested: !0 }),
74
+ N,
75
+ M.configure({ nested: !0 }),
75
76
  f,
76
- ee,
77
+ te,
77
78
  d,
78
79
  u,
79
80
  p,
80
- N.configure({ table: !1 }),
81
- te.configure({
81
+ P.configure({ table: !1 }),
82
+ C.configure({
82
83
  resizable: !1,
83
84
  allowTableNodeSelection: !1
84
85
  }),
85
- P.configure({ placeholder: v }),
86
- F,
86
+ F.configure({ placeholder: v }),
87
+ I,
87
88
  a,
88
89
  r,
89
90
  n,
@@ -93,11 +94,12 @@ function Q({ editable: h = !0, placeholder: v = "", collaborative: S = !1 } = {}
93
94
  s,
94
95
  c,
95
96
  i,
96
- _,
97
+ h,
98
+ ee,
97
99
  x,
98
100
  b,
99
101
  y,
100
- g,
102
+ _,
101
103
  m
102
104
  ];
103
105
  }
@@ -116,8 +118,8 @@ function $(e) {
116
118
  }
117
119
  };
118
120
  }
119
- function ae({ 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 }) {
120
- let f = w({
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 }) {
122
+ let f = T({
121
123
  onChange: t,
122
124
  onSubmit: n,
123
125
  onBlur: r,
@@ -129,9 +131,9 @@ function ae({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: i, placeho
129
131
  onBlur: r,
130
132
  onFocus: i
131
133
  };
132
- let p = w(u);
134
+ let p = T(u);
133
135
  p.current = u;
134
- let m = k({
136
+ let m = A({
135
137
  extensions: Q({
136
138
  editable: o,
137
139
  placeholder: a ?? ""
@@ -158,23 +160,23 @@ function ae({ value: e, onChange: t, onSubmit: n, onBlur: r, onFocus: i, placeho
158
160
  onBlur: ({ editor: e }) => f.current.onBlur?.(e.getMarkdown()),
159
161
  onFocus: () => f.current.onFocus?.()
160
162
  });
161
- C(() => {
163
+ w(() => {
162
164
  m && !m.isFocused && m.getMarkdown() !== e && m.commands.setContent(e, {
163
165
  contentType: "markdown",
164
166
  emitUpdate: !1
165
167
  });
166
- }, [m, e]), C(() => {
168
+ }, [m, e]), w(() => {
167
169
  m?.setEditable(o);
168
170
  }, [m, o]);
169
- let g = w(d);
170
- return g.current = d, C(() => (g.current?.(m), () => g.current?.(null)), [m]), /* @__PURE__ */ D(T, { children: [
171
- /* @__PURE__ */ E(O, { editor: m }),
172
- o && /* @__PURE__ */ E(h, { editor: m }),
173
- o && /* @__PURE__ */ E(S, {
171
+ let h = T(d);
172
+ return h.current = d, w(() => (h.current?.(m), () => h.current?.(null)), [m]), /* @__PURE__ */ O(E, { children: [
173
+ /* @__PURE__ */ D(k, { editor: m }),
174
+ o && /* @__PURE__ */ D(g, { editor: m }),
175
+ o && /* @__PURE__ */ D(S, {
174
176
  editor: m,
175
177
  onFiles: p
176
178
  }),
177
- o && /* @__PURE__ */ E(v, { editor: m })
179
+ o && /* @__PURE__ */ D(v, { editor: m })
178
180
  ] });
179
181
  }
180
- export { ae as Editor, Q as contentExtensions, $ as fileHandlers };
182
+ export { oe as Editor, Q as contentExtensions, $ as fileHandlers };
@@ -1,13 +1,13 @@
1
1
  import { Link as e } from "../lib/router.js";
2
2
  import { githubAccountQuery as t, meQuery as n } from "../api/queries.js";
3
- import { ChevronDownIcon as r, FolderIcon as i, HistoryIcon as a, KeyIcon as o, LinkIcon as s, NotificationIcon as c, RepositoryIcon as l, SettingsIcon as u, ShieldIcon as d, TagIcon as f, UserIcon as p, UsersIcon as m, WebhookIcon as h, WorkerIcon as g } from "./icons.js";
4
- import { useTranslations as _ } from "use-intl";
5
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
6
- import { useQuery as x, useSuspenseQuery as S } from "@tanstack/react-query";
3
+ import { ChevronDownIcon as r, CommentIcon as i, FolderIcon as a, HistoryIcon as o, KeyIcon as s, LinkIcon as c, NotificationIcon as l, RepositoryIcon as u, SettingsIcon as d, ShieldIcon as f, TagIcon as p, UserIcon as m, UsersIcon as h, WebhookIcon as g, WorkerIcon as _ } from "./icons.js";
4
+ import { useTranslations as v } from "use-intl";
5
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
6
+ import { useQuery as S, useSuspenseQuery as C } from "@tanstack/react-query";
7
7
  // src/components/SettingsNav.tsx
8
- var C = "flex h-8 items-center gap-2.5 rounded-md px-2 text-sm text-muted-foreground hover:bg-muted hover:text-foreground", w = "bg-[var(--theme-sidebar-active-bg,var(--theme-hover))] hover:bg-[var(--theme-sidebar-active-bg,var(--theme-hover))] !text-[var(--theme-sidebar-active-text,var(--theme-app))] font-medium", T = { className: w };
9
- function E() {
10
- let { data: e } = S(n), r = _("settingsNav"), v = e?.mode === "platform", { data: y } = x(t);
8
+ var w = "flex h-8 items-center gap-2.5 rounded-md px-2 text-sm text-muted-foreground hover:bg-muted hover:text-foreground", T = "bg-[var(--theme-sidebar-active-bg,var(--theme-hover))] hover:bg-[var(--theme-sidebar-active-bg,var(--theme-hover))] !text-[var(--theme-sidebar-active-text,var(--theme-app))] font-medium", E = { className: T };
9
+ function D() {
10
+ let { data: e } = C(n), r = v("settingsNav"), y = e?.mode === "platform", { data: b } = S(t);
11
11
  return [
12
12
  {
13
13
  label: r("account"),
@@ -15,31 +15,31 @@ function E() {
15
15
  {
16
16
  to: "/$workspace/settings/account",
17
17
  label: r("profile"),
18
- Icon: p
18
+ Icon: m
19
19
  },
20
20
  {
21
21
  to: "/$workspace/settings/notifications",
22
22
  label: r("notifications"),
23
- Icon: c
23
+ Icon: l
24
24
  },
25
25
  {
26
26
  to: "/$workspace/settings/runners",
27
27
  label: r("runners"),
28
- Icon: g
28
+ Icon: _
29
29
  },
30
- ...y?.enabled ? [{
30
+ ...b?.enabled ? [{
31
31
  to: "/$workspace/settings/connections",
32
32
  label: r("connections"),
33
- Icon: s
33
+ Icon: c
34
34
  }] : [],
35
- ...v ? [] : [{
35
+ ...y ? [] : [{
36
36
  to: "/$workspace/settings/tokens",
37
37
  label: r("tokens"),
38
- Icon: o
38
+ Icon: s
39
39
  }, {
40
40
  to: "/$workspace/settings/sessions",
41
41
  label: r("sessions"),
42
- Icon: d
42
+ Icon: f
43
43
  }]
44
44
  ]
45
45
  },
@@ -49,84 +49,92 @@ function E() {
49
49
  {
50
50
  to: "/$workspace/settings",
51
51
  label: r("general"),
52
- Icon: u
52
+ Icon: d
53
53
  },
54
54
  {
55
55
  to: "/$workspace/settings/members",
56
- label: r(v ? "access" : "members"),
57
- Icon: m
56
+ label: r(y ? "access" : "members"),
57
+ Icon: h
58
58
  },
59
59
  {
60
60
  to: "/$workspace/settings/roles",
61
61
  label: r("roles"),
62
- Icon: d
62
+ Icon: f
63
63
  },
64
64
  {
65
65
  to: "/$workspace/settings/groups",
66
66
  label: r("groups"),
67
- Icon: d
67
+ Icon: f
68
68
  },
69
69
  {
70
70
  to: "/$workspace/settings/teams",
71
71
  label: r("teams"),
72
- Icon: i
72
+ Icon: a
73
73
  },
74
74
  {
75
75
  to: "/$workspace/settings/labels",
76
76
  label: r("labels"),
77
- Icon: f
77
+ Icon: p
78
78
  },
79
79
  {
80
80
  to: "/$workspace/settings/audit-log",
81
81
  label: r("auditLog"),
82
- Icon: a
82
+ Icon: o
83
83
  },
84
- ...v ? [] : [{
84
+ ...y ? [] : [{
85
85
  to: "/$workspace/settings/sso",
86
86
  label: r("sso"),
87
- Icon: o
87
+ Icon: s
88
88
  }]
89
89
  ]
90
90
  },
91
91
  {
92
92
  label: r("integrations"),
93
- items: [{
94
- to: "/$workspace/settings/github",
95
- label: r("github"),
96
- Icon: l
97
- }, {
98
- to: "/$workspace/settings/webhooks",
99
- label: r("webhooks"),
100
- Icon: h
101
- }]
93
+ items: [
94
+ {
95
+ to: "/$workspace/settings/github",
96
+ label: r("github"),
97
+ Icon: u
98
+ },
99
+ {
100
+ to: "/$workspace/settings/slack",
101
+ label: r("slack"),
102
+ Icon: i
103
+ },
104
+ {
105
+ to: "/$workspace/settings/webhooks",
106
+ label: r("webhooks"),
107
+ Icon: g
108
+ }
109
+ ]
102
110
  }
103
111
  ];
104
112
  }
105
- function D({ workspace: t }) {
106
- let n = _("settingsNav"), i = E();
107
- return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ b(e, {
113
+ function O({ workspace: t }) {
114
+ let n = v("settingsNav"), i = D();
115
+ return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x(e, {
108
116
  to: "/$workspace/issues",
109
117
  params: { workspace: t },
110
118
  className: "flex h-9 items-center gap-2 rounded-md px-2 text-sm font-semibold hover:bg-muted",
111
- children: [/* @__PURE__ */ y(r, { className: "size-4 rotate-90 text-muted-foreground" }), n("label")]
112
- }), /* @__PURE__ */ y("nav", {
119
+ children: [/* @__PURE__ */ b(r, { className: "size-4 rotate-90 text-muted-foreground" }), n("label")]
120
+ }), /* @__PURE__ */ b("nav", {
113
121
  "aria-label": n("label"),
114
122
  className: "-mx-3 mt-2 min-h-0 flex-1 overflow-y-auto px-3",
115
- children: i.map((n) => /* @__PURE__ */ b("div", {
123
+ children: i.map((n) => /* @__PURE__ */ x("div", {
116
124
  className: "mt-4 first:mt-0",
117
- children: [/* @__PURE__ */ y("p", {
125
+ children: [/* @__PURE__ */ b("p", {
118
126
  className: "flex h-6 items-center px-2 text-xs font-medium text-muted-foreground",
119
127
  children: n.label
120
- }), /* @__PURE__ */ y("div", {
128
+ }), /* @__PURE__ */ b("div", {
121
129
  className: "mt-1 space-y-0.5",
122
- children: n.items.map(({ to: n, label: r, Icon: i }) => /* @__PURE__ */ b(e, {
130
+ children: n.items.map(({ to: n, label: r, Icon: i }) => /* @__PURE__ */ x(e, {
123
131
  to: n,
124
132
  params: { workspace: t },
125
- className: C,
126
- activeProps: T,
133
+ className: w,
134
+ activeProps: E,
127
135
  activeOptions: { exact: !0 },
128
136
  children: [
129
- /* @__PURE__ */ y(i, { className: "size-4" }),
137
+ /* @__PURE__ */ b(i, { className: "size-4" }),
130
138
  " ",
131
139
  r
132
140
  ]
@@ -135,4 +143,4 @@ function D({ workspace: t }) {
135
143
  }, n.label))
136
144
  })] });
137
145
  }
138
- export { D as SettingsNav, C as navItem, w as navOn, E as useSettingsPages };
146
+ export { O as SettingsNav, w as navItem, T as navOn, D as useSettingsPages };
@@ -58,6 +58,7 @@ var w = {
58
58
  file: "↥",
59
59
  table: "▦",
60
60
  docLink: "[[",
61
+ button: "▭",
61
62
  issueList: "☰",
62
63
  date: "@",
63
64
  page: "+",
@@ -103,6 +104,7 @@ var w = {
103
104
  withHeaderRow: !0
104
105
  }),
105
106
  docLink: (e) => e.insertContent("[["),
107
+ button: (e) => e.insertContent({ type: "docButton" }),
106
108
  issueList: (e) => e.insertContent({ type: "issueList" }),
107
109
  date: (e) => e.insertContent([{
108
110
  type: "dateChip",