@parallelworks/tandem-web 0.171.1 → 0.171.2

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 (164) hide show
  1. package/components/AccessGrants.js +6 -6
  2. package/components/ActivityTimeline.js +57 -57
  3. package/components/ActorAvatar.js +4 -4
  4. package/components/AgentWork.js +494 -494
  5. package/components/AppLauncher.js +7 -7
  6. package/components/AreaLink.js +13 -13
  7. package/components/AreaTiles.js +13 -13
  8. package/components/AreaWork.js +22 -22
  9. package/components/Attachments.js +29 -29
  10. package/components/BlockHandle.js +3 -3
  11. package/components/BugRotation.js +8 -8
  12. package/components/CodeHostSettings.js +38 -38
  13. package/components/CollabEditor.js +13 -13
  14. package/components/CommandPalette.js +206 -206
  15. package/components/CustomFields.js +95 -95
  16. package/components/CustomerRequests.js +11 -11
  17. package/components/DashboardPanel.js +23 -23
  18. package/components/DateChip.js +21 -21
  19. package/components/DocHistory.js +14 -14
  20. package/components/DocIcon.js +4 -4
  21. package/components/DocIconPicker.js +4 -4
  22. package/components/DocLinkPicker.js +22 -22
  23. package/components/DocLook.js +16 -16
  24. package/components/DocProperties.js +81 -81
  25. package/components/DocTable.js +53 -53
  26. package/components/DocsTree.js +179 -179
  27. package/components/Editor.js +69 -69
  28. package/components/FavoritesNav.js +78 -78
  29. package/components/GitHub.js +87 -87
  30. package/components/Graph.js +14 -14
  31. package/components/HostActions.js +21 -21
  32. package/components/HostPanel.js +6 -6
  33. package/components/HoverCards.js +74 -74
  34. package/components/IssueBoard.js +13 -10
  35. package/components/IssueBreakdown.js +31 -31
  36. package/components/IssueCode.js +19 -19
  37. package/components/IssueEvent.js +12 -12
  38. package/components/IssueFilters.js +39 -39
  39. package/components/IssueGroup.js +16 -16
  40. package/components/IssueImport.js +13 -13
  41. package/components/IssueInsights.js +20 -20
  42. package/components/IssueListBlock.js +81 -81
  43. package/components/IssueRelations.js +34 -34
  44. package/components/IssueRow.js +31 -31
  45. package/components/IssueSentry.js +4 -4
  46. package/components/IssueTemplates.js +23 -23
  47. package/components/IssueTypes.js +40 -40
  48. package/components/MarkdownTransfer.js +10 -10
  49. package/components/MentionPicker.js +19 -19
  50. package/components/NewIssueDialog.js +53 -53
  51. package/components/NewProjectDialog.js +82 -82
  52. package/components/PersonActivity.js +13 -13
  53. package/components/PersonHoverCard.js +44 -44
  54. package/components/Planning.js +16 -16
  55. package/components/Reports.js +8 -8
  56. package/components/SettingsNav.js +15 -15
  57. package/components/ShareDialog.js +8 -8
  58. package/components/SharedViewer.js +23 -23
  59. package/components/SlashMenu.js +26 -26
  60. package/components/SubPages.js +10 -10
  61. package/components/TeamForm.js +9 -9
  62. package/components/TeamRepositories.js +21 -21
  63. package/components/TeamWorkflow.js +6 -6
  64. package/components/UnlinkedMentions.js +29 -29
  65. package/components/Updates.js +8 -8
  66. package/components/Widgets.js +4 -4
  67. package/components/WorkCounts.js +12 -12
  68. package/components/cycleCrumb.js +8 -8
  69. package/components/editorPlugins.js +101 -101
  70. package/components/settings.js +6 -6
  71. package/components/video.js +7 -7
  72. package/hostedApp.js +24 -24
  73. package/index.js +18 -18
  74. package/lib/assignees.js +3 -3
  75. package/lib/attachments.js +12 -12
  76. package/lib/boardMove.js +27 -27
  77. package/lib/collab.js +1 -1
  78. package/lib/docs.js +115 -115
  79. package/lib/githubLink.js +7 -7
  80. package/lib/issueList.js +51 -51
  81. package/lib/issueMenu.js +117 -117
  82. package/lib/knowledge.js +134 -134
  83. package/lib/live.js +38 -38
  84. package/lib/notifications.js +47 -47
  85. package/lib/views.js +31 -31
  86. package/package.json +24 -24
  87. package/pages/area.js +64 -64
  88. package/pages/areas.js +199 -199
  89. package/pages/decisions.js +51 -51
  90. package/pages/issues.js +120 -120
  91. package/pages/projects.js +238 -238
  92. package/pages/triage.js +109 -109
  93. package/routes/_workspace/agents/_slug2.js +127 -127
  94. package/routes/_workspace/agents/index2.js +22 -22
  95. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  96. package/routes/_workspace/dashboards/index2.js +34 -34
  97. package/routes/_workspace/docs/_doc2.js +267 -267
  98. package/routes/_workspace/docs/space2._space.js +31 -31
  99. package/routes/_workspace/docs2.js +4 -4
  100. package/routes/_workspace/graph2.js +11 -11
  101. package/routes/_workspace/graph3.js +11 -11
  102. package/routes/_workspace/issues/_identifier2.js +477 -477
  103. package/routes/_workspace/issues/index.js +13 -13
  104. package/routes/_workspace/knowledge/_term2.js +175 -175
  105. package/routes/_workspace/knowledge/_term3.js +4 -4
  106. package/routes/_workspace/knowledge/index.js +12 -12
  107. package/routes/_workspace/knowledge/index2.js +117 -117
  108. package/routes/_workspace/measures2.js +8 -8
  109. package/routes/_workspace/measures3.js +29 -29
  110. package/routes/_workspace/notifications2.js +263 -263
  111. package/routes/_workspace/people/_username.js +10 -10
  112. package/routes/_workspace/people/_username2.js +41 -41
  113. package/routes/_workspace/projects/_projectId3.js +303 -303
  114. package/routes/_workspace/projects/_projectId4.js +4 -4
  115. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  116. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  117. package/routes/_workspace/projects/index.js +8 -8
  118. package/routes/_workspace/settings/account2.js +8 -8
  119. package/routes/_workspace/settings/audit-log2.js +8 -8
  120. package/routes/_workspace/settings/audit-log3.js +155 -155
  121. package/routes/_workspace/settings/connections2.js +4 -4
  122. package/routes/_workspace/settings/fields2.js +5 -5
  123. package/routes/_workspace/settings/github2.js +11 -11
  124. package/routes/_workspace/settings/gitlab2.js +5 -5
  125. package/routes/_workspace/settings/groups2.js +52 -52
  126. package/routes/_workspace/settings/import2.js +39 -39
  127. package/routes/_workspace/settings/index2.js +5 -5
  128. package/routes/_workspace/settings/intercom2.js +11 -11
  129. package/routes/_workspace/settings/labels2.js +33 -33
  130. package/routes/_workspace/settings/members2.js +81 -81
  131. package/routes/_workspace/settings/notifications2.js +46 -46
  132. package/routes/_workspace/settings/parallelworks2.js +20 -20
  133. package/routes/_workspace/settings/roles2.js +41 -41
  134. package/routes/_workspace/settings/runners2.js +15 -15
  135. package/routes/_workspace/settings/sentry2.js +15 -15
  136. package/routes/_workspace/settings/sessions2.js +9 -9
  137. package/routes/_workspace/settings/sessions3.js +4 -4
  138. package/routes/_workspace/settings/slack2.js +12 -12
  139. package/routes/_workspace/settings/sso2.js +37 -37
  140. package/routes/_workspace/settings/sso3.js +7 -7
  141. package/routes/_workspace/settings/teams2.js +29 -29
  142. package/routes/_workspace/settings/tokens2.js +32 -32
  143. package/routes/_workspace/settings/tokens3.js +4 -4
  144. package/routes/_workspace/settings/webhooks2.js +41 -41
  145. package/routes/_workspace/settings/zendesk2.js +11 -11
  146. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  147. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  148. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  149. package/routes/_workspace/teams/_key/issues.js +10 -10
  150. package/routes/_workspace/teams/_key/projects.js +6 -6
  151. package/routes/_workspace/teams/_key/settings2.js +396 -396
  152. package/routes/_workspace2.js +308 -308
  153. package/routes/_workspace3.js +8 -8
  154. package/routes/device2.js +4 -4
  155. package/routes/device3.js +4 -4
  156. package/routes/docs/_tag/_endpoint2.js +3 -3
  157. package/routes/docs/_tag/index2.js +3 -3
  158. package/routes/docs/route2.js +7 -7
  159. package/routes/index2.js +5 -5
  160. package/routes/login2.js +10 -10
  161. package/routes/new2.js +12 -12
  162. package/routes/new3.js +5 -5
  163. package/routes/request2._token.js +6 -6
  164. package/routes/share2._secret.js +4 -4
@@ -1,13 +1,13 @@
1
- import { glossary as e, mentions as t } from "../lib/glossary.js";
2
- import { iconImageURL as n } from "./EntityIcon.js";
3
- import { docIcons as r } from "./DocIcon.js";
4
- import { attachmentIdOf as i, attachmentPrefix as a, attachmentSizes as o, attachmentURL as s, githubMedia as c, githubUpload as l, mediaURL as u, playableLink as d, videoName as f } from "../lib/attachments.js";
5
- import { docLooks as p } from "../lib/docLooks.js";
6
- import { githubLinkPage as m } from "../lib/githubLink.js";
7
- import { issueKeyOfHref as ee, issueKeyPattern as te, issueRefs as h } from "../lib/issueRefs.js";
8
- import { linkedIssues as g } from "../lib/linkedIssues.js";
9
- import { mentionable as _, mentionsIn as ne } from "../lib/mentions.js";
1
+ import { attachmentIdOf as e, attachmentPrefix as t, attachmentSizes as n, attachmentURL as r, githubMedia as i, githubUpload as a, mediaURL as o, playableLink as s, videoName as c } from "../lib/attachments.js";
2
+ import { docLooks as l } from "../lib/docLooks.js";
3
+ import { githubLinkPage as u } from "../lib/githubLink.js";
4
+ import { glossary as d, mentions as f } from "../lib/glossary.js";
5
+ import { issueKeyOfHref as p, issueKeyPattern as ee, issueRefs as m } from "../lib/issueRefs.js";
6
+ import { linkedIssues as h } from "../lib/linkedIssues.js";
7
+ import { mentionable as g, mentionsIn as _ } from "../lib/mentions.js";
10
8
  import { teamNames as v } from "../lib/teamNames.js";
9
+ import { docIcons as te } from "./DocIcon.js";
10
+ import { iconImageURL as ne } from "./EntityIcon.js";
11
11
  import { createElement as y } from "react";
12
12
  import { Extension as b } from "@tiptap/react";
13
13
  import { Plugin as x, PluginKey as S, TextSelection as re } from "@tiptap/pm/state";
@@ -36,20 +36,20 @@ function A(e, t) {
36
36
  }), t(r, n + 1), !1;
37
37
  });
38
38
  }
39
- function j(n, r) {
40
- let i = e.forms();
41
- if (i.length === 0) return w.empty;
42
- let a = [];
43
- return A(n, (e, n) => {
44
- for (let o of t(e, i)) a.push(C.inline(n + o.from, n + o.to, {
39
+ function j(e, t) {
40
+ let n = d.forms();
41
+ if (n.length === 0) return w.empty;
42
+ let r = [];
43
+ return A(e, (e, i) => {
44
+ for (let a of f(e, n)) r.push(C.inline(i + a.from, i + a.to, {
45
45
  class: "kb-term",
46
- "data-term": o.id,
47
- ...r && {
46
+ "data-term": a.id,
47
+ ...t && {
48
48
  tabindex: "0",
49
49
  role: "button"
50
50
  }
51
51
  }));
52
- }), w.create(n, a);
52
+ }), w.create(e, r);
53
53
  }
54
54
  function ie(e) {
55
55
  let t = /* @__PURE__ */ new Set();
@@ -58,41 +58,41 @@ function ie(e) {
58
58
  return !0;
59
59
  }), t;
60
60
  }
61
- function ae(e, n, r) {
62
- let i = [], a = /* @__PURE__ */ new Set();
63
- return A(e, (e, o) => {
64
- for (let s of t(e, n)) a.has(s.id) || (a.add(s.id), !r(s.id) && i.push({
65
- from: o + s.from,
66
- to: o + s.to,
67
- id: s.id,
68
- text: e.slice(s.from, s.to)
61
+ function ae(e, t, n) {
62
+ let r = [], i = /* @__PURE__ */ new Set();
63
+ return A(e, (e, a) => {
64
+ for (let o of f(e, t)) i.has(o.id) || (i.add(o.id), n(o.id) || r.push({
65
+ from: a + o.from,
66
+ to: a + o.to,
67
+ id: o.id,
68
+ text: e.slice(o.from, o.to)
69
69
  }));
70
- }), i;
70
+ }), r;
71
71
  }
72
72
  var oe = b.create({
73
73
  name: "knowledgeTerms",
74
74
  addProseMirrorPlugins() {
75
- let t = this.editor, n = "";
75
+ let e = this.editor, t = "";
76
76
  return [new x({
77
77
  key: D,
78
78
  state: {
79
- init: (e, n) => j(n.doc, !t.isEditable),
80
- apply: (e, n) => e.docChanged || e.getMeta(D) ? j(e.doc, !t.isEditable) : n.map(e.mapping, e.doc)
79
+ init: (t, n) => j(n.doc, !e.isEditable),
80
+ apply: (t, n) => t.docChanged || t.getMeta(D) ? j(t.doc, !e.isEditable) : n.map(t.mapping, t.doc)
81
81
  },
82
82
  props: {
83
83
  decorations: (e) => D.getState(e),
84
- handleKeyDown: (e, t) => (n = t.key, !1)
84
+ handleKeyDown: (e, n) => (t = n.key, !1)
85
85
  },
86
- view: (t) => ({
87
- update: (e, t) => {
86
+ view: (e) => ({
87
+ update: (e, n) => {
88
88
  let { selection: r } = e.state;
89
- if (!O.has(n) || !r.empty || t.selection.eq(r)) return;
90
- n = "";
89
+ if (!O.has(t) || !r.empty || n.selection.eq(r)) return;
90
+ t = "";
91
91
  let i = e.domAtPos(r.from);
92
92
  (i.node.nodeType === 1 ? i.node : i.node.parentElement)?.closest(".kb-term")?.dispatchEvent(new CustomEvent(k, { bubbles: !0 }));
93
93
  },
94
- destroy: e.subscribe(() => {
95
- t.isDestroyed || t.dispatch(t.state.tr.setMeta(D, !0));
94
+ destroy: d.subscribe(() => {
95
+ e.isDestroyed || e.dispatch(e.state.tr.setMeta(D, !0));
96
96
  })
97
97
  })
98
98
  })];
@@ -115,14 +115,14 @@ var ce = b.create({
115
115
  parseHTML() {
116
116
  return [{
117
117
  tag: "img[src]",
118
- getAttrs: (e) => {
119
- let t = e.getAttribute("src"), n = i(t);
120
- return n ? {
121
- src: a + n,
122
- alt: e.getAttribute("alt")
123
- } : c(t) ? {
124
- src: t,
125
- alt: e.getAttribute("alt")
118
+ getAttrs: (n) => {
119
+ let r = n.getAttribute("src"), a = e(r);
120
+ return a ? {
121
+ src: t + a,
122
+ alt: n.getAttribute("alt")
123
+ } : i(r) ? {
124
+ src: r,
125
+ alt: n.getAttribute("alt")
126
126
  } : !1;
127
127
  }
128
128
  }];
@@ -130,7 +130,7 @@ var ce = b.create({
130
130
  renderHTML({ HTMLAttributes: e }) {
131
131
  return ["img", {
132
132
  ...e,
133
- src: u(String(e.src ?? "")),
133
+ src: o(String(e.src ?? "")),
134
134
  class: "attachment-image",
135
135
  loading: "lazy"
136
136
  }];
@@ -138,7 +138,7 @@ var ce = b.create({
138
138
  addNodeView() {
139
139
  return ({ node: e }) => {
140
140
  let t = String(e.attrs.src ?? ""), n = document.createElement("img");
141
- if (n.src = u(t), n.className = "attachment-image", n.loading = "lazy", e.attrs.alt && (n.alt = String(e.attrs.alt)), e.attrs.title && (n.title = String(e.attrs.title)), !l(t)) return { dom: n };
141
+ if (n.src = o(t), n.className = "attachment-image", n.loading = "lazy", e.attrs.alt && (n.alt = String(e.attrs.alt)), e.attrs.title && (n.title = String(e.attrs.title)), !a(t)) return { dom: n };
142
142
  let r = document.createElement("span");
143
143
  return r.append(n), n.addEventListener("error", () => {
144
144
  n.replaceWith(N(t, (e) => F(e, t, !0)));
@@ -151,14 +151,14 @@ var ce = b.create({
151
151
  }).configure({ inline: !0 });
152
152
  function N(e, t) {
153
153
  let n = document.createElement("video");
154
- return n.className = "github-recording", n.src = u(e), n.controls = !0, n.preload = "metadata", n.contentEditable = "false", n.addEventListener("error", function r() {
155
- n.src !== e && l(e) ? n.src = e : (n.removeEventListener("error", r), t(n));
154
+ return n.className = "github-recording", n.src = o(e), n.controls = !0, n.preload = "metadata", n.contentEditable = "false", n.addEventListener("error", function r() {
155
+ n.src !== e && a(e) ? n.src = e : (n.removeEventListener("error", r), t(n));
156
156
  }), n;
157
157
  }
158
158
  var P = { linkHint: "" };
159
159
  function F(e, t, n) {
160
160
  let r = document.createElement("span");
161
- r.className = "recording-unplayable", r.contentEditable = "false", n && r.append(I(t)), e.replaceWith(r), l(t) && m().then((e) => {
161
+ r.className = "recording-unplayable", r.contentEditable = "false", n && r.append(I(t)), e.replaceWith(r), a(t) && u().then((e) => {
162
162
  if (!e || !P.linkHint) return;
163
163
  let t = document.createElement("a");
164
164
  t.className = "recording-hint", t.href = e, t.textContent = P.linkHint, r.append(t);
@@ -166,14 +166,14 @@ function F(e, t, n) {
166
166
  }
167
167
  function I(e) {
168
168
  let t = document.createElement("a");
169
- return t.href = s(e), t.textContent = e, t.rel = "noopener noreferrer", t.target = "_blank", t;
169
+ return t.href = r(e), t.textContent = e, t.rel = "noopener noreferrer", t.target = "_blank", t;
170
170
  }
171
171
  var L = new S("attachmentFiles");
172
172
  function R(e, t) {
173
173
  e.descendants((e, n) => {
174
174
  if (e.type.name !== "paragraph") return !0;
175
175
  let r = e.childCount === 1 ? e.firstChild : null, i = r?.marks.find((e) => e.type.name === "link")?.attrs.href;
176
- return r?.isText && i && d(i) && r.text?.trim() === i && t.push(C.widget(n + e.nodeSize - 1, () => {
176
+ return r?.isText && i && s(i) && r.text?.trim() === i && t.push(C.widget(n + e.nodeSize - 1, () => {
177
177
  let e = document.createElement("span");
178
178
  return e.className = "recording-box", e.contentEditable = "false", e.append(N(i, (e) => F(e, i, !1))), e;
179
179
  }, {
@@ -184,27 +184,27 @@ function R(e, t) {
184
184
  })), !1;
185
185
  });
186
186
  }
187
- function z(e) {
188
- let t = [];
189
- return R(e, t), e.descendants((e, n) => {
190
- if (!e.isText) return !0;
191
- let r = e.marks.find((e) => e.type.name === "link"), a = i(r?.attrs.href), c = a && o.get(a);
192
- c && t.push(C.inline(n, n + e.nodeSize, { "data-size": c }));
193
- let l = !o.get(a ?? "") && f.test(e.text ?? "");
194
- if (a && (o.isVideo(a) || l) && r) {
195
- let i = s(String(r.attrs.href));
196
- t.push(C.widget(n + e.nodeSize, () => {
197
- let e = document.createElement("video");
198
- return e.className = "attachment-video", e.src = i, e.controls = !0, e.preload = "metadata", e.contentEditable = "false", l && e.addEventListener("error", () => e.remove(), { once: !0 }), e;
187
+ function z(t) {
188
+ let i = [];
189
+ return R(t, i), t.descendants((t, a) => {
190
+ if (!t.isText) return !0;
191
+ let o = t.marks.find((e) => e.type.name === "link"), s = e(o?.attrs.href), l = s && n.get(s);
192
+ l && i.push(C.inline(a, a + t.nodeSize, { "data-size": l }));
193
+ let u = !n.get(s ?? "") && c.test(t.text ?? "");
194
+ if (s && (n.isVideo(s) || u) && o) {
195
+ let e = r(String(o.attrs.href));
196
+ i.push(C.widget(a + t.nodeSize, () => {
197
+ let t = document.createElement("video");
198
+ return t.className = "attachment-video", t.src = e, t.controls = !0, t.preload = "metadata", t.contentEditable = "false", u && t.addEventListener("error", () => t.remove(), { once: !0 }), t;
199
199
  }, {
200
200
  side: 1,
201
- key: `video-${a}`,
201
+ key: `video-${s}`,
202
202
  stopEvent: () => !0,
203
203
  ignoreSelection: !0
204
204
  }));
205
205
  }
206
206
  return !1;
207
- }), w.create(e, t);
207
+ }), w.create(t, i);
208
208
  }
209
209
  var B = b.create({
210
210
  name: "attachmentFiles",
@@ -218,22 +218,22 @@ var B = b.create({
218
218
  },
219
219
  props: {
220
220
  decorations: (e) => L.getState(e),
221
- handleClickOn: (e, t, n, r, a) => n.type.name !== "image" || !i(n.attrs.src) ? !1 : (a.preventDefault(), e.dom.dispatchEvent(new CustomEvent(M, {
221
+ handleClickOn: (t, n, r, i, a) => r.type.name !== "image" || !e(r.attrs.src) ? !1 : (a.preventDefault(), t.dom.dispatchEvent(new CustomEvent(M, {
222
222
  bubbles: !0,
223
223
  detail: {
224
- src: n.attrs.src,
225
- name: n.attrs.alt ?? ""
224
+ src: r.attrs.src,
225
+ name: r.attrs.alt ?? ""
226
226
  }
227
227
  })), !0),
228
- handleClick: (e, t, n) => {
229
- let r = n.target?.closest("a[href]")?.getAttribute("href");
230
- if (!r || !i(r) || n.button !== 0) return !1;
231
- n.preventDefault();
232
- let a = document.createElement("a");
233
- return a.href = s(r), a.download = "", a.click(), !0;
228
+ handleClick: (t, n, i) => {
229
+ let a = i.target?.closest("a[href]")?.getAttribute("href");
230
+ if (!a || !e(a) || i.button !== 0) return !1;
231
+ i.preventDefault();
232
+ let o = document.createElement("a");
233
+ return o.href = r(a), o.download = "", o.click(), !0;
234
234
  }
235
235
  },
236
- view: (e) => ({ destroy: o.subscribe(() => {
236
+ view: (e) => ({ destroy: n.subscribe(() => {
237
237
  e.isDestroyed || e.dispatch(e.state.tr.setMeta(L, !0));
238
238
  }) })
239
239
  })];
@@ -241,7 +241,7 @@ var B = b.create({
241
241
  }), V = new S("linkedIssues");
242
242
  function H(e) {
243
243
  let t = [], n, r = () => {
244
- let e = n && g.get(n.href);
244
+ let e = n && h.get(n.href);
245
245
  if (n && e) {
246
246
  let { identifier: r, title: i, status: a } = e;
247
247
  t.push(C.widget(n.end, () => {
@@ -276,10 +276,10 @@ var U = b.create({
276
276
  decorations: (e) => V.getState(e),
277
277
  handleDOMEvents: { click: (e, t) => {
278
278
  let n = t.target?.closest("[data-linked-issue]");
279
- return n ? (t.preventDefault(), g.open(n.dataset.linkedIssue ?? ""), !0) : !1;
279
+ return n ? (t.preventDefault(), h.open(n.dataset.linkedIssue ?? ""), !0) : !1;
280
280
  } }
281
281
  },
282
- view: (e) => ({ destroy: g.subscribe(() => {
282
+ view: (e) => ({ destroy: h.subscribe(() => {
283
283
  e.isDestroyed || e.dispatch(e.state.tr.setMeta(V, !0));
284
284
  }) })
285
285
  })];
@@ -290,10 +290,10 @@ function ue(e) {
290
290
  return t.className = "issue-mention-status", t.dataset.category = e, t.contentEditable = "false", t;
291
291
  }
292
292
  function G(e) {
293
- let t = h.workspace();
293
+ let t = m.workspace();
294
294
  if (!t) return w.empty;
295
295
  let n = [], r = [], i = (e, t, i, a) => {
296
- let o = h.get(i);
296
+ let o = m.get(i);
297
297
  if (!o) {
298
298
  r.push(i);
299
299
  return;
@@ -315,13 +315,13 @@ function G(e) {
315
315
  }));
316
316
  };
317
317
  A(e, (e, t) => {
318
- for (let n of e.matchAll(te)) {
318
+ for (let n of e.matchAll(ee)) {
319
319
  let e = n[1] ?? "";
320
320
  i(t + (n.index ?? 0), t + (n.index ?? 0) + e.length, e, !0);
321
321
  }
322
322
  });
323
323
  let a, o = () => {
324
- let e = a && ee(a.href, t);
324
+ let e = a && p(a.href, t);
325
325
  a && e && i(a.from, a.to, e, !1), a = void 0;
326
326
  };
327
327
  return e.descendants((e, t) => {
@@ -335,7 +335,7 @@ function G(e) {
335
335
  from: t,
336
336
  to: t + e.nodeSize
337
337
  }), !1;
338
- }), o(), r.length > 0 && h.want(r), w.create(e, n);
338
+ }), o(), r.length > 0 && m.want(r), w.create(e, n);
339
339
  }
340
340
  var de = b.create({
341
341
  name: "issueMentions",
@@ -347,22 +347,22 @@ var de = b.create({
347
347
  apply: (e, t) => e.docChanged || e.getMeta(W) ? G(e.doc) : t.map(e.mapping, e.doc)
348
348
  },
349
349
  props: { decorations: (e) => W.getState(e) },
350
- view: (e) => ({ destroy: h.subscribe(() => {
350
+ view: (e) => ({ destroy: m.subscribe(() => {
351
351
  e.isDestroyed || e.dispatch(e.state.tr.setMeta(W, !0));
352
352
  }) })
353
353
  })];
354
354
  }
355
355
  }), K = new S("teamNames");
356
356
  function q(e) {
357
- let n = v.forms();
358
- if (n.length === 0) return w.empty;
359
- let r = [];
360
- return A(e, (e, i) => {
361
- for (let a of t(e, n, !0)) r.push(C.inline(i + a.from, i + a.to, {
357
+ let t = v.forms();
358
+ if (t.length === 0) return w.empty;
359
+ let n = [];
360
+ return A(e, (e, r) => {
361
+ for (let i of f(e, t, !0)) n.push(C.inline(r + i.from, r + i.to, {
362
362
  class: "team-mention",
363
- "data-team": a.id
363
+ "data-team": i.id
364
364
  }));
365
- }), w.create(e, r);
365
+ }), w.create(e, n);
366
366
  }
367
367
  var fe = b.create({
368
368
  name: "teamNames",
@@ -383,7 +383,7 @@ var fe = b.create({
383
383
  function Y(e) {
384
384
  let t = [];
385
385
  return A(e, (e, n) => {
386
- for (let r of ne(e)) _.has(r.username) && t.push(C.inline(n + r.from, n + r.to, {
386
+ for (let r of _(e)) g.has(r.username) && t.push(C.inline(n + r.from, n + r.to, {
387
387
  class: "person-mention",
388
388
  "data-username": r.username
389
389
  }));
@@ -399,7 +399,7 @@ var X = b.create({
399
399
  apply: (e, t) => e.docChanged || e.getMeta(J) ? Y(e.doc) : t.map(e.mapping, e.doc)
400
400
  },
401
401
  props: { decorations: (e) => J.getState(e) },
402
- view: (e) => ({ destroy: _.subscribe(() => {
402
+ view: (e) => ({ destroy: g.subscribe(() => {
403
403
  e.isDestroyed || e.dispatch(e.state.tr.setMeta(J, !0));
404
404
  }) })
405
405
  })];
@@ -408,13 +408,13 @@ var X = b.create({
408
408
  function pe(e) {
409
409
  let t = document.createElement("span");
410
410
  t.className = "doc-link-icon", t.contentEditable = "false";
411
- let i = n(e), a = e.startsWith("icon:") ? r[e.slice(5)] : void 0;
412
- if (i) {
411
+ let n = ne(e), r = e.startsWith("icon:") ? te[e.slice(5)] : void 0;
412
+ if (n) {
413
413
  let e = document.createElement("img");
414
- e.src = i, e.alt = "", t.appendChild(e);
415
- } else if (a) {
414
+ e.src = n, e.alt = "", t.appendChild(e);
415
+ } else if (r) {
416
416
  let e = E(t);
417
- queueMicrotask(() => e.render(y(a, { className: "size-[0.95em]" }))), Q.set(t, e);
417
+ queueMicrotask(() => e.render(y(r, { className: "size-[0.95em]" }))), Q.set(t, e);
418
418
  } else t.textContent = e;
419
419
  return t;
420
420
  }
@@ -424,7 +424,7 @@ function $(e) {
424
424
  if (!e.isText) return !0;
425
425
  let a = e.marks.find((e) => e.type.name === "link"), o = String(a?.attrs.href ?? ""), s = !!a && o === r && i === n;
426
426
  if (r = a ? o : "", n = i + e.nodeSize, !a || s || !o.includes("/docs/")) return !1;
427
- let c = p.iconAt(o);
427
+ let c = l.iconAt(o);
428
428
  return c && t.push(C.widget(i, () => pe(c), {
429
429
  side: 1,
430
430
  marks: [a],
@@ -447,7 +447,7 @@ var me = b.create({
447
447
  apply: (e, t) => e.docChanged || e.getMeta(Z) ? $(e.doc) : t
448
448
  },
449
449
  props: { decorations: (e) => Z.getState(e) },
450
- view: (e) => ({ destroy: p.subscribe(() => {
450
+ view: (e) => ({ destroy: l.subscribe(() => {
451
451
  e.isDestroyed || e.dispatch(e.state.tr.setMeta(Z, !0));
452
452
  }) })
453
453
  })];
@@ -1,6 +1,6 @@
1
1
  import { usePageTitle as e } from "../lib/pageTitle.js";
2
- import { usePathname as t } from "../lib/router.js";
3
- import { useCan as n } from "../lib/roles.js";
2
+ import { useCan as t } from "../lib/roles.js";
3
+ import { usePathname as n } from "../lib/router.js";
4
4
  import { useSettingsPages as r } from "./SettingsNav.js";
5
5
  import { Callout as i, PageHeader as a } from "@parallelworks/ui";
6
6
  import { useParams as o } from "@tanstack/react-router";
@@ -18,8 +18,8 @@ function f() {
18
18
  };
19
19
  }
20
20
  function p(e) {
21
- let n = l("settingsNav"), { workspace: i = "" } = o({ strict: !1 }), a = t(), s = r(), c = [{
22
- label: n("label"),
21
+ let t = l("settingsNav"), { workspace: i = "" } = o({ strict: !1 }), a = n(), s = r(), c = [{
22
+ label: t("label"),
23
23
  href: `/${i}/settings`
24
24
  }], u;
25
25
  for (let e of s) for (let t of e.items) {
@@ -69,8 +69,8 @@ function m({ title: t, description: n, wide: r = !1, actions: i, toolbar: o, chi
69
69
  });
70
70
  }
71
71
  var h = "divide-y divide-border", g = "flex gap-2 border-t border-border px-3 py-2";
72
- function _({ workspace: e, permission: t = "manage_workspace" }) {
73
- let r = n(e, t), a = l("settings");
72
+ function _({ workspace: e, permission: n = "manage_workspace" }) {
73
+ let r = t(e, n), a = l("settings");
74
74
  return r ? null : /* @__PURE__ */ u(i, {
75
75
  tone: "muted",
76
76
  className: "mb-6",
@@ -1,6 +1,6 @@
1
1
  import { attachmentIdOf as e, githubMedia as t, githubUpload as n } from "../lib/attachments.js";
2
- import { plainLink as r, recordingPlayer as i, unplayable as a } from "./editorPlugins.js";
3
- import { videoMarkdown as o, videoTag as s } from "../lib/videoMarkdown.js";
2
+ import { videoMarkdown as r, videoTag as i } from "../lib/videoMarkdown.js";
3
+ import { plainLink as a, recordingPlayer as o, unplayable as s } from "./editorPlugins.js";
4
4
  import { Node as c, mergeAttributes as l } from "@tiptap/react";
5
5
  // src/components/video.ts
6
6
  function u(e) {
@@ -24,9 +24,9 @@ var d = c.create({
24
24
  controls: "",
25
25
  preload: "metadata"
26
26
  })],
27
- addNodeView: () => ({ node: o }) => {
28
- let s = String(o.attrs.src ?? ""), c = document.createElement("div");
29
- return c.className = "video-block", n(s) || t(s) || e(s) ? c.append(i(s, (e) => a(e, s, !0))) : c.append(r(s)), {
27
+ addNodeView: () => ({ node: r }) => {
28
+ let i = String(r.attrs.src ?? ""), c = document.createElement("div");
29
+ return c.className = "video-block", n(i) || t(i) || e(i) ? c.append(o(i, (e) => s(e, i, !0))) : c.append(a(i)), {
30
30
  dom: c,
31
31
  ignoreMutation: () => !0
32
32
  };
@@ -37,7 +37,7 @@ var d = c.create({
37
37
  level: "block",
38
38
  start: (e) => e.search(/^<video\b/im),
39
39
  tokenize: (e) => {
40
- let t = s(e);
40
+ let t = i(e);
41
41
  return t ? {
42
42
  type: "video",
43
43
  raw: t.raw,
@@ -46,6 +46,6 @@ var d = c.create({
46
46
  }
47
47
  },
48
48
  parseMarkdown: (e, t) => t.createNode("video", { src: e.text ?? "" }),
49
- renderMarkdown: (e) => o(String(e.attrs?.src ?? ""))
49
+ renderMarkdown: (e) => r(String(e.attrs?.src ?? ""))
50
50
  });
51
51
  export { d as VideoBlock };
package/hostedApp.js CHANGED
@@ -1,32 +1,32 @@
1
- import { PageTitle as e } from "./lib/pageTitle.js";
2
- import { SharedUI as t } from "./components/SharedUI.js";
3
- import { loadMessages as n, locales as r } from "./_virtual/_virtual_i18n.js";
4
- import { HostProvider as i } from "./lib/host.js";
5
- import { setShownPath as a } from "./lib/listSearch.js";
1
+ import { loadMessages as e, locales as t } from "./_virtual/_virtual_i18n.js";
2
+ import { SharedUI as n } from "./components/SharedUI.js";
3
+ import { HostProvider as r } from "./lib/host.js";
4
+ import { setShownPath as i } from "./lib/listSearch.js";
5
+ import { PageTitle as a } from "./lib/pageTitle.js";
6
6
  import { useRouter as o } from "@tanstack/react-router";
7
7
  import { use as s, useEffect as c, useRef as l } from "react";
8
8
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
9
  import { LocaleProvider as f, useSetLocale as p } from "@parallelworks/i18n/react";
10
10
  import { QueryClientProvider as m } from "@tanstack/react-query";
11
11
  // src/hostedApp.tsx
12
- function h({ host: n, queryClient: r, children: a }) {
13
- return /* @__PURE__ */ u(i, {
14
- host: n,
12
+ function h({ host: e, queryClient: t, children: i }) {
13
+ return /* @__PURE__ */ u(r, {
14
+ host: e,
15
15
  children: /* @__PURE__ */ u(y, {
16
- locale: n.locale,
16
+ locale: e.locale,
17
17
  children: /* @__PURE__ */ d(m, {
18
- client: r,
18
+ client: t,
19
19
  children: [
20
20
  /* @__PURE__ */ u(x, {
21
- identity: n.identity,
22
- queryClient: r
21
+ identity: e.identity,
22
+ queryClient: t
23
23
  }),
24
24
  /* @__PURE__ */ u(S, {}),
25
25
  /* @__PURE__ */ u(C, {}),
26
- /* @__PURE__ */ u(e, {}),
27
- /* @__PURE__ */ u(t, { children: /* @__PURE__ */ u("div", {
26
+ /* @__PURE__ */ u(a, {}),
27
+ /* @__PURE__ */ u(n, { children: /* @__PURE__ */ u("div", {
28
28
  className: "tandem flex h-full min-h-0 flex-col",
29
- children: a
29
+ children: i
30
30
  }) })
31
31
  ]
32
32
  })
@@ -34,21 +34,21 @@ function h({ host: n, queryClient: r, children: a }) {
34
34
  });
35
35
  }
36
36
  var g = /* @__PURE__ */ new Map();
37
- function _(e) {
38
- let t = g.get(e);
39
- return t || (t = n(e).catch(() => n("en")), g.set(e, t)), t;
37
+ function _(t) {
38
+ let n = g.get(t);
39
+ return n || (n = e(t).catch(() => e("en")), g.set(t, n)), n;
40
40
  }
41
- var v = (e) => r.includes(e) ? e : "en";
42
- function y({ locale: e, children: t }) {
43
- let r = l(v(e)), i = s(_(r.current));
41
+ var v = (e) => t.includes(e) ? e : "en";
42
+ function y({ locale: t, children: n }) {
43
+ let r = l(v(t)), i = s(_(r.current));
44
44
  return /* @__PURE__ */ d(f, {
45
45
  initial: {
46
46
  locale: r.current,
47
47
  messages: i
48
48
  },
49
- load: n,
49
+ load: e,
50
50
  fallbackLocale: "en",
51
- children: [/* @__PURE__ */ u(b, { locale: v(e) }), t]
51
+ children: [/* @__PURE__ */ u(b, { locale: v(t) }), n]
52
52
  });
53
53
  }
54
54
  function b({ locale: e }) {
@@ -65,7 +65,7 @@ function x({ identity: e, queryClient: t }) {
65
65
  }
66
66
  function S() {
67
67
  let e = o();
68
- return c(() => (a(e.state.location.pathname), e.subscribe("onResolved", ({ toLocation: e }) => a(e.pathname))), [e]), null;
68
+ return c(() => (i(e.state.location.pathname), e.subscribe("onResolved", ({ toLocation: e }) => i(e.pathname))), [e]), null;
69
69
  }
70
70
  function C() {
71
71
  return c(() => (document.body.dataset.tandem = "", () => {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { appPath as e, mountAt as t, routerBase as n } from "./lib/base.js";
2
- import { ErrorMessage as r, Pending as i } from "./components/status.js";
1
+ import { ErrorMessage as e, Pending as t } from "./components/status.js";
2
+ import { appPath as n, mountAt as r, routerBase as i } from "./lib/base.js";
3
3
  import { issueAddresses as a } from "./lib/branch.js";
4
4
  import { ErrorPage as o } from "@parallelworks/ui";
5
5
  import { notFound as s, redirect as c } from "@tanstack/react-router";
@@ -20,32 +20,32 @@ var d = /* @__PURE__ */ new Set([
20
20
  "icon-192.png"
21
21
  ]);
22
22
  function f({ mountPath: f }) {
23
- t(f);
23
+ r(f);
24
24
  let m, g, _ = () => (g ??= Promise.all([import("./hostedApp.js"), import("./lib/queryClient.js").then((e) => e.createQueryClient())]).then(([e, t]) => (m = {
25
25
  HostedApp: e.default,
26
26
  client: t
27
27
  }, m)), g), v, y, b, x = !1, S = async (e) => {
28
- let t = v, r = y;
29
- throw !t || !r ? Error("Tandem: call mount and connect before opening a page") : (b ??= import("./pages.js").then(({ splitPages: e }) => {
30
- let i = e();
31
- for (let e of i.frameless) Object.assign(e.options, { path: n + e.options.path });
32
- p(r.framed, i.framed), p(r.frameless, i.frameless), t.setRoutes(t.buildRouteTree()), x = !0;
28
+ let t = v, n = y;
29
+ throw !t || !n ? Error("Tandem: call mount and connect before opening a page") : (b ??= import("./pages.js").then(({ splitPages: e }) => {
30
+ let r = e();
31
+ for (let e of r.frameless) Object.assign(e.options, { path: i + e.options.path });
32
+ p(n.framed, r.framed), p(n.frameless, r.frameless), t.setRoutes(t.buildRouteTree()), x = !0;
33
33
  }), await b, c({
34
34
  href: e,
35
35
  replace: !0
36
36
  }));
37
37
  };
38
38
  return {
39
- mountPath: n,
39
+ mountPath: i,
40
40
  contains: h,
41
- hosts: (t) => h(t) && !d.has(e(t).split("/")[1] ?? ""),
41
+ hosts: (e) => h(e) && !d.has(n(e).split("/")[1] ?? ""),
42
42
  route: {
43
43
  beforeLoad: async ({ location: e }) => {
44
44
  let t = _();
45
45
  return x || await S(e.href), { queryClient: (await t).client };
46
46
  },
47
- pendingComponent: i,
48
- errorComponent: ({ error: e }) => /* @__PURE__ */ u(r, { error: e }),
47
+ pendingComponent: t,
48
+ errorComponent: ({ error: t }) => /* @__PURE__ */ u(e, { error: t }),
49
49
  notFoundComponent: (e) => /* @__PURE__ */ u("div", {
50
50
  className: "flex h-full",
51
51
  children: /* @__PURE__ */ u(o, { status: 404 })
@@ -56,7 +56,7 @@ function f({ mountPath: f }) {
56
56
  if (x) throw s();
57
57
  _(), await S(e.href);
58
58
  },
59
- pendingComponent: i
59
+ pendingComponent: t
60
60
  },
61
61
  mount(e, t) {
62
62
  y = {
@@ -81,13 +81,13 @@ function f({ mountPath: f }) {
81
81
  }
82
82
  };
83
83
  }
84
- function p(e, t) {
85
- for (let n of t) Object.assign(n.options, { getParentRoute: () => e });
86
- e.addChildren([...m(e), ...t]), g(t, (e) => {
87
- e.options.preloadStaleTime ??= 0, e.options.pendingComponent ??= i, e.options.errorComponent ??= ({ error: e }) => /* @__PURE__ */ u(r, { error: e });
84
+ function p(n, r) {
85
+ for (let e of r) Object.assign(e.options, { getParentRoute: () => n });
86
+ n.addChildren([...m(n), ...r]), g(r, (n) => {
87
+ n.options.preloadStaleTime ??= 0, n.options.pendingComponent ??= t, n.options.errorComponent ??= ({ error: t }) => /* @__PURE__ */ u(e, { error: t });
88
88
  });
89
89
  }
90
- var m = (e) => Array.isArray(e.children) ? e.children : Object.values(e.children ?? {}), h = (e) => e === n || e.startsWith(`${n}/`);
90
+ var m = (e) => Array.isArray(e.children) ? e.children : Object.values(e.children ?? {}), h = (e) => e === i || e.startsWith(`${i}/`);
91
91
  function g(e, t) {
92
92
  for (let n of e) t(n), n.children && g(m(n), t);
93
93
  }