@parallelworks/tandem-web 0.171.0 → 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 (170) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +1 -0
  2. package/_virtual/_virtual_i18n/es/common.js +1 -0
  3. package/_virtual/_virtual_i18n/ja/common.js +1 -0
  4. package/_virtual/_virtual_i18n/ko/common.js +1 -0
  5. package/_virtual/_virtual_i18n/zh/common.js +1 -0
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +57 -57
  8. package/components/ActorAvatar.js +4 -4
  9. package/components/AgentWork.js +494 -494
  10. package/components/AppLauncher.js +7 -7
  11. package/components/AreaLink.js +13 -13
  12. package/components/AreaTiles.js +13 -13
  13. package/components/AreaWork.js +22 -22
  14. package/components/Attachments.js +29 -29
  15. package/components/BlockHandle.js +3 -3
  16. package/components/BugRotation.js +8 -8
  17. package/components/CodeHostSettings.js +38 -38
  18. package/components/CollabEditor.js +13 -13
  19. package/components/CommandPalette.js +206 -206
  20. package/components/CustomFields.js +95 -95
  21. package/components/CustomerRequests.js +11 -11
  22. package/components/DashboardPanel.js +23 -23
  23. package/components/DateChip.js +21 -21
  24. package/components/DocHistory.js +14 -14
  25. package/components/DocIcon.js +4 -4
  26. package/components/DocIconPicker.js +4 -4
  27. package/components/DocLinkPicker.js +22 -22
  28. package/components/DocLook.js +16 -16
  29. package/components/DocProperties.js +81 -81
  30. package/components/DocTable.js +53 -53
  31. package/components/DocsTree.js +179 -179
  32. package/components/Editor.js +69 -69
  33. package/components/FavoritesNav.js +78 -78
  34. package/components/GitHub.js +87 -87
  35. package/components/Graph.js +14 -14
  36. package/components/HostActions.js +21 -21
  37. package/components/HostPanel.js +6 -6
  38. package/components/HoverCards.js +74 -74
  39. package/components/IssueBoard.js +13 -10
  40. package/components/IssueBreakdown.js +31 -31
  41. package/components/IssueCode.js +19 -19
  42. package/components/IssueEvent.js +12 -12
  43. package/components/IssueFilters.js +103 -99
  44. package/components/IssueGroup.js +16 -16
  45. package/components/IssueImport.js +13 -13
  46. package/components/IssueInsights.js +20 -20
  47. package/components/IssueListBlock.js +81 -81
  48. package/components/IssueRelations.js +34 -34
  49. package/components/IssueRow.js +31 -31
  50. package/components/IssueSentry.js +4 -4
  51. package/components/IssueTemplates.js +23 -23
  52. package/components/IssueTypes.js +40 -40
  53. package/components/MarkdownTransfer.js +10 -10
  54. package/components/MentionPicker.js +19 -19
  55. package/components/NewIssueDialog.js +53 -53
  56. package/components/NewProjectDialog.js +82 -82
  57. package/components/PersonActivity.js +13 -13
  58. package/components/PersonHoverCard.js +44 -44
  59. package/components/Planning.js +16 -16
  60. package/components/Reports.js +8 -8
  61. package/components/SettingsNav.js +15 -15
  62. package/components/ShareDialog.js +8 -8
  63. package/components/SharedViewer.js +23 -23
  64. package/components/SlashMenu.js +26 -26
  65. package/components/SubPages.js +10 -10
  66. package/components/TeamForm.js +9 -9
  67. package/components/TeamRepositories.js +21 -21
  68. package/components/TeamWorkflow.js +6 -6
  69. package/components/UnlinkedMentions.js +29 -29
  70. package/components/Updates.js +8 -8
  71. package/components/Widgets.js +4 -4
  72. package/components/WorkCounts.js +12 -12
  73. package/components/cycleCrumb.js +8 -8
  74. package/components/editorPlugins.js +101 -101
  75. package/components/settings.js +6 -6
  76. package/components/video.js +7 -7
  77. package/hostedApp.js +24 -24
  78. package/index.js +18 -18
  79. package/lib/assigneeOrder.js +6 -0
  80. package/lib/assignees.js +24 -20
  81. package/lib/attachments.js +12 -12
  82. package/lib/boardMove.js +27 -27
  83. package/lib/collab.js +1 -1
  84. package/lib/docs.js +115 -115
  85. package/lib/githubLink.js +7 -7
  86. package/lib/issueList.js +51 -51
  87. package/lib/issueMenu.js +117 -117
  88. package/lib/knowledge.js +134 -134
  89. package/lib/live.js +38 -38
  90. package/lib/notifications.js +47 -47
  91. package/lib/views.js +31 -31
  92. package/package.json +24 -24
  93. package/pages/area.js +64 -64
  94. package/pages/areas.js +199 -199
  95. package/pages/decisions.js +51 -51
  96. package/pages/issues.js +120 -120
  97. package/pages/projects.js +238 -238
  98. package/pages/triage.js +109 -109
  99. package/routes/_workspace/agents/_slug2.js +127 -127
  100. package/routes/_workspace/agents/index2.js +22 -22
  101. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  102. package/routes/_workspace/dashboards/index2.js +34 -34
  103. package/routes/_workspace/docs/_doc2.js +267 -267
  104. package/routes/_workspace/docs/space2._space.js +31 -31
  105. package/routes/_workspace/docs2.js +4 -4
  106. package/routes/_workspace/graph2.js +11 -11
  107. package/routes/_workspace/graph3.js +11 -11
  108. package/routes/_workspace/issues/_identifier2.js +477 -477
  109. package/routes/_workspace/issues/index.js +13 -13
  110. package/routes/_workspace/knowledge/_term2.js +175 -175
  111. package/routes/_workspace/knowledge/_term3.js +4 -4
  112. package/routes/_workspace/knowledge/index.js +12 -12
  113. package/routes/_workspace/knowledge/index2.js +117 -117
  114. package/routes/_workspace/measures2.js +8 -8
  115. package/routes/_workspace/measures3.js +29 -29
  116. package/routes/_workspace/notifications2.js +263 -263
  117. package/routes/_workspace/people/_username.js +10 -10
  118. package/routes/_workspace/people/_username2.js +41 -41
  119. package/routes/_workspace/projects/_projectId3.js +303 -303
  120. package/routes/_workspace/projects/_projectId4.js +4 -4
  121. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  122. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  123. package/routes/_workspace/projects/index.js +8 -8
  124. package/routes/_workspace/settings/account2.js +8 -8
  125. package/routes/_workspace/settings/audit-log2.js +8 -8
  126. package/routes/_workspace/settings/audit-log3.js +155 -155
  127. package/routes/_workspace/settings/connections2.js +4 -4
  128. package/routes/_workspace/settings/fields2.js +5 -5
  129. package/routes/_workspace/settings/github2.js +11 -11
  130. package/routes/_workspace/settings/gitlab2.js +5 -5
  131. package/routes/_workspace/settings/groups2.js +52 -52
  132. package/routes/_workspace/settings/import2.js +39 -39
  133. package/routes/_workspace/settings/index2.js +5 -5
  134. package/routes/_workspace/settings/intercom2.js +11 -11
  135. package/routes/_workspace/settings/labels2.js +33 -33
  136. package/routes/_workspace/settings/members2.js +81 -81
  137. package/routes/_workspace/settings/notifications2.js +46 -46
  138. package/routes/_workspace/settings/parallelworks2.js +20 -20
  139. package/routes/_workspace/settings/roles2.js +41 -41
  140. package/routes/_workspace/settings/runners2.js +15 -15
  141. package/routes/_workspace/settings/sentry2.js +15 -15
  142. package/routes/_workspace/settings/sessions2.js +9 -9
  143. package/routes/_workspace/settings/sessions3.js +4 -4
  144. package/routes/_workspace/settings/slack2.js +12 -12
  145. package/routes/_workspace/settings/sso2.js +37 -37
  146. package/routes/_workspace/settings/sso3.js +7 -7
  147. package/routes/_workspace/settings/teams2.js +29 -29
  148. package/routes/_workspace/settings/tokens2.js +32 -32
  149. package/routes/_workspace/settings/tokens3.js +4 -4
  150. package/routes/_workspace/settings/webhooks2.js +41 -41
  151. package/routes/_workspace/settings/zendesk2.js +11 -11
  152. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  153. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  154. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  155. package/routes/_workspace/teams/_key/issues.js +10 -10
  156. package/routes/_workspace/teams/_key/projects.js +6 -6
  157. package/routes/_workspace/teams/_key/settings2.js +396 -396
  158. package/routes/_workspace2.js +308 -308
  159. package/routes/_workspace3.js +8 -8
  160. package/routes/device2.js +4 -4
  161. package/routes/device3.js +4 -4
  162. package/routes/docs/_tag/_endpoint2.js +3 -3
  163. package/routes/docs/_tag/index2.js +3 -3
  164. package/routes/docs/route2.js +7 -7
  165. package/routes/index2.js +5 -5
  166. package/routes/login2.js +10 -10
  167. package/routes/new2.js +12 -12
  168. package/routes/new3.js +5 -5
  169. package/routes/request2._token.js +6 -6
  170. package/routes/share2._secret.js +4 -4
package/lib/live.js CHANGED
@@ -1,8 +1,8 @@
1
- import { basePath as e } from "./base.js";
2
- import { api as t } from "../api/client.js";
3
- import { usePathname as n } from "./router.js";
4
- import { invalidateIssueViews as r } from "../api/mutations.js";
5
- import { pageOf as i } from "./presencePage.js";
1
+ import { api as e } from "../api/client.js";
2
+ import { invalidateIssueViews as t } from "../api/mutations.js";
3
+ import { basePath as n } from "./base.js";
4
+ import { pageOf as r } from "./presencePage.js";
5
+ import { usePathname as i } from "./router.js";
6
6
  import { createContext as a, useCallback as o, useContext as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
7
7
  import { jsx as f } from "react/jsx-runtime";
8
8
  import { useQueryClient as p } from "@tanstack/react-query";
@@ -22,25 +22,25 @@ function _(e) {
22
22
  }
23
23
  var v = 1e4;
24
24
  function y({ workspace: a, children: s }) {
25
- let m = p(), [y, b] = d([]), x = l(() => crypto.randomUUID(), []), S = u({}), C = n(), w = i(C, a), T = u(w), E = u(/* @__PURE__ */ new Map()), D = o((e, t) => {
25
+ let m = p(), [y, b] = d([]), x = l(() => crypto.randomUUID(), []), S = u({}), C = i(), w = r(C, a), T = u(w), E = u(/* @__PURE__ */ new Map()), D = o((e, t) => {
26
26
  let n = E.current.get(e) ?? /* @__PURE__ */ new Set();
27
27
  return n.add(t), E.current.set(e, n), () => {
28
28
  n.delete(t);
29
29
  };
30
30
  }, []);
31
31
  c(() => {
32
- let t = new EventSource(`${e}/api/v1/workspaces/${encodeURIComponent(a)}/live`), n = () => {
32
+ let e = new EventSource(`${n}/api/v1/workspaces/${encodeURIComponent(a)}/live`), r = () => {
33
33
  m.invalidateQueries({ queryKey: ["workspace", a] }), m.invalidateQueries({ queryKey: ["decisions"] }), m.invalidateQueries({ queryKey: ["me"] });
34
34
  }, i = !1;
35
- t.addEventListener("open", () => {
36
- i && n(), i = !0;
37
- }), t.addEventListener("resync", n), t.addEventListener("presence", (e) => b(JSON.parse(e.data).people)), t.addEventListener("change", (e) => {
38
- let t = JSON.parse(e.data);
39
- if ((t.type.startsWith("decision.") || t.type.startsWith("run.")) && (m.invalidateQueries({ queryKey: [
35
+ e.addEventListener("open", () => {
36
+ i && r(), i = !0;
37
+ }), e.addEventListener("resync", r), e.addEventListener("presence", (e) => b(JSON.parse(e.data).people)), e.addEventListener("change", (e) => {
38
+ let n = JSON.parse(e.data);
39
+ if ((n.type.startsWith("decision.") || n.type.startsWith("run.")) && (m.invalidateQueries({ queryKey: [
40
40
  "workspace",
41
41
  a,
42
42
  "decisions"
43
- ] }), m.invalidateQueries({ queryKey: ["decisions"] })), t.type.startsWith("workspace.") && (m.invalidateQueries({ queryKey: ["workspace", a] }), m.invalidateQueries({ queryKey: ["me"] })), t.type.startsWith("area.") && (m.invalidateQueries({ queryKey: [
43
+ ] }), m.invalidateQueries({ queryKey: ["decisions"] })), n.type.startsWith("workspace.") && (m.invalidateQueries({ queryKey: ["workspace", a] }), m.invalidateQueries({ queryKey: ["me"] })), n.type.startsWith("area.") && (m.invalidateQueries({ queryKey: [
44
44
  "workspace",
45
45
  a,
46
46
  "areas"
@@ -54,11 +54,11 @@ function y({ workspace: a, children: s }) {
54
54
  a,
55
55
  "decisions",
56
56
  "counts"
57
- ] })), t.type.startsWith("agent.") && m.invalidateQueries({ queryKey: [
57
+ ] })), n.type.startsWith("agent.") && m.invalidateQueries({ queryKey: [
58
58
  "workspace",
59
59
  a,
60
60
  "agents"
61
- ] }), t.type.startsWith("knowledge.")) m.invalidateQueries({ queryKey: [
61
+ ] }), n.type.startsWith("knowledge.")) m.invalidateQueries({ queryKey: [
62
62
  "workspace",
63
63
  a,
64
64
  "knowledge"
@@ -67,7 +67,7 @@ function y({ workspace: a, children: s }) {
67
67
  a,
68
68
  "decisions"
69
69
  ] }), m.invalidateQueries({ queryKey: ["decisions"] });
70
- else if (t.type.startsWith("doc.") || t.doc) m.invalidateQueries({ queryKey: [
70
+ else if (n.type.startsWith("doc.") || n.doc) m.invalidateQueries({ queryKey: [
71
71
  "workspace",
72
72
  a,
73
73
  "docs"
@@ -76,47 +76,47 @@ function y({ workspace: a, children: s }) {
76
76
  a,
77
77
  "favorites"
78
78
  ] });
79
- else if (t.type === "issue.parent_changed" || t.type.startsWith("issue.relation_")) m.invalidateQueries({ queryKey: [
79
+ else if (n.type === "issue.parent_changed" || n.type.startsWith("issue.relation_")) m.invalidateQueries({ queryKey: [
80
80
  "workspace",
81
81
  a,
82
82
  "issues"
83
83
  ] });
84
- else if (t.type.startsWith("issue.reaction_") && t.identifier) m.invalidateQueries({ queryKey: [
84
+ else if (n.type.startsWith("issue.reaction_") && n.identifier) m.invalidateQueries({ queryKey: [
85
85
  "workspace",
86
86
  a,
87
87
  "issues",
88
- t.identifier.toUpperCase(),
88
+ n.identifier.toUpperCase(),
89
89
  "reactions"
90
90
  ] });
91
- else if (t.identifier) {
92
- let e = t.identifier.toUpperCase();
91
+ else if (n.identifier) {
92
+ let e = n.identifier.toUpperCase();
93
93
  m.invalidateQueries({ queryKey: [
94
94
  "workspace",
95
95
  a,
96
96
  "issues",
97
97
  e
98
- ] }), r(m, a, e);
99
- } else t.type.startsWith("project.") ? (m.invalidateQueries({ queryKey: [
98
+ ] }), t(m, a, e);
99
+ } else n.type.startsWith("project.") ? (m.invalidateQueries({ queryKey: [
100
100
  "workspace",
101
101
  a,
102
102
  "projects"
103
- ] }), t.type !== "project.created" && m.invalidateQueries({ queryKey: [
103
+ ] }), n.type !== "project.created" && m.invalidateQueries({ queryKey: [
104
104
  "workspace",
105
105
  a,
106
106
  "issues"
107
- ] })) : t.type.startsWith("cycle.") ? (m.invalidateQueries({ queryKey: [
107
+ ] })) : n.type.startsWith("cycle.") ? (m.invalidateQueries({ queryKey: [
108
108
  "workspace",
109
109
  a,
110
110
  "cycles"
111
- ] }), t.type !== "cycle.created" && m.invalidateQueries({ queryKey: [
111
+ ] }), n.type !== "cycle.created" && m.invalidateQueries({ queryKey: [
112
112
  "workspace",
113
113
  a,
114
114
  "issues"
115
- ] })) : t.type.startsWith("team.") ? (m.invalidateQueries({ queryKey: [
115
+ ] })) : n.type.startsWith("team.") ? (m.invalidateQueries({ queryKey: [
116
116
  "workspace",
117
117
  a,
118
118
  "teams"
119
- ] }), t.type.startsWith("team.status_") && m.invalidateQueries({ queryKey: [
119
+ ] }), n.type.startsWith("team.status_") && m.invalidateQueries({ queryKey: [
120
120
  "workspace",
121
121
  a,
122
122
  "issues"
@@ -124,16 +124,16 @@ function y({ workspace: a, children: s }) {
124
124
  "workspace",
125
125
  a,
126
126
  "cycles"
127
- ] })) : t.type.startsWith("label.") && (m.invalidateQueries({ queryKey: [
127
+ ] })) : n.type.startsWith("label.") && (m.invalidateQueries({ queryKey: [
128
128
  "workspace",
129
129
  a,
130
130
  "labels"
131
- ] }), t.type !== "label.created" && m.invalidateQueries({ queryKey: [
131
+ ] }), n.type !== "label.created" && m.invalidateQueries({ queryKey: [
132
132
  "workspace",
133
133
  a,
134
134
  "issues"
135
135
  ] }));
136
- }), t.addEventListener("notification", () => {
136
+ }), e.addEventListener("notification", () => {
137
137
  m.invalidateQueries({ queryKey: [
138
138
  "workspace",
139
139
  a,
@@ -143,7 +143,7 @@ function y({ workspace: a, children: s }) {
143
143
  let o = (e, t) => {
144
144
  for (let n of E.current.get(e) ?? []) n(t);
145
145
  };
146
- return t.addEventListener("doc_update", (e) => {
146
+ return e.addEventListener("doc_update", (e) => {
147
147
  let t = JSON.parse(e.data);
148
148
  o(h(t), {
149
149
  kind: "update",
@@ -152,30 +152,30 @@ function y({ workspace: a, children: s }) {
152
152
  connId: t.connId,
153
153
  update: _(t.update)
154
154
  });
155
- }), t.addEventListener("doc_reset", (e) => {
155
+ }), e.addEventListener("doc_reset", (e) => {
156
156
  let t = JSON.parse(e.data);
157
157
  o(h(t), {
158
158
  kind: "reset",
159
159
  generation: t.generation
160
160
  });
161
- }), t.addEventListener("doc_awareness", (e) => {
161
+ }), e.addEventListener("doc_awareness", (e) => {
162
162
  let t = JSON.parse(e.data);
163
163
  o(h(t), {
164
164
  kind: "awareness",
165
165
  connId: t.connId,
166
166
  update: _(t.update)
167
167
  });
168
- }), () => t.close();
168
+ }), () => e.close();
169
169
  }, [a, m]);
170
- let O = o((e = !1) => t.POST("/api/v1/workspaces/{workspace}/presence", {
170
+ let O = o((t = !1) => e.POST("/api/v1/workspaces/{workspace}/presence", {
171
171
  params: { path: { workspace: a } },
172
172
  body: {
173
173
  connId: x,
174
174
  ...S.current,
175
175
  ...T.current && { page: T.current },
176
- ...e && { leave: !0 }
176
+ ...t && { leave: !0 }
177
177
  },
178
- ...e && { keepalive: !0 }
178
+ ...t && { keepalive: !0 }
179
179
  }).catch(() => {}), [a, x]);
180
180
  c(() => {
181
181
  O();
@@ -1,55 +1,55 @@
1
- import { basePath as e } from "./base.js";
2
- import { api as t, unwrap as n } from "../api/client.js";
3
- import { notificationsQuery as r, pushSettingsQuery as i } from "../api/queries.js";
1
+ import { api as e, unwrap as t } from "../api/client.js";
2
+ import { notificationsQuery as n, pushSettingsQuery as r } from "../api/queries.js";
3
+ import { basePath as i } from "./base.js";
4
4
  import { markRead as a } from "./notificationRead.js";
5
5
  import { useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
6
6
  import { useTranslations as u } from "use-intl";
7
7
  import { useMutation as d, useQuery as f, useQueryClient as p } from "@tanstack/react-query";
8
8
  // src/lib/notifications.ts
9
- async function m(e, t, n, i) {
10
- let { queryKey: o } = r(t);
9
+ async function m(e, t, r, i) {
10
+ let { queryKey: o } = n(t);
11
11
  await e.cancelQueries({ queryKey: o });
12
12
  let s = (/* @__PURE__ */ new Date()).toISOString();
13
- e.setQueryData(o, (e) => e && a(e, n, i, s));
13
+ e.setQueryData(o, (e) => e && a(e, r, i, s));
14
14
  }
15
- function h(e) {
15
+ function h(r) {
16
16
  let i = p();
17
17
  return d({
18
- mutationFn: async (r) => {
19
- n(await t.POST("/api/v1/notifications/read", { body: {
20
- workspace: e,
21
- ...r && { ids: r }
22
- } })), await x(r);
18
+ mutationFn: async (n) => {
19
+ t(await e.POST("/api/v1/notifications/read", { body: {
20
+ workspace: r,
21
+ ...n && { ids: n }
22
+ } })), await x(n);
23
23
  },
24
- onMutate: (t) => m(i, e, t, !0),
25
- onSettled: () => i.invalidateQueries({ queryKey: r(e).queryKey })
24
+ onMutate: (e) => m(i, r, e, !0),
25
+ onSettled: () => i.invalidateQueries({ queryKey: n(r).queryKey })
26
26
  });
27
27
  }
28
- function g(e) {
28
+ function g(r) {
29
29
  let i = p();
30
30
  return d({
31
- mutationFn: async (r) => n(await t.POST("/api/v1/notifications/unread", { body: {
32
- workspace: e,
33
- ids: r
31
+ mutationFn: async (n) => t(await e.POST("/api/v1/notifications/unread", { body: {
32
+ workspace: r,
33
+ ids: n
34
34
  } })),
35
- onMutate: (t) => m(i, e, t, !1),
36
- onSettled: () => i.invalidateQueries({ queryKey: r(e).queryKey })
35
+ onMutate: (e) => m(i, r, e, !1),
36
+ onSettled: () => i.invalidateQueries({ queryKey: n(r).queryKey })
37
37
  });
38
38
  }
39
- function _(e) {
39
+ function _(r) {
40
40
  let i = p();
41
41
  return d({
42
- mutationFn: async (r) => {
43
- n(await t.POST("/api/v1/notifications/archive", { body: {
44
- workspace: e,
45
- ...r && { ids: r }
46
- } })), r && await x(r);
42
+ mutationFn: async (n) => {
43
+ t(await e.POST("/api/v1/notifications/archive", { body: {
44
+ workspace: r,
45
+ ...n && { ids: n }
46
+ } })), n && await x(n);
47
47
  },
48
- onSettled: () => i.invalidateQueries({ queryKey: r(e).queryKey })
48
+ onSettled: () => i.invalidateQueries({ queryKey: n(r).queryKey })
49
49
  });
50
50
  }
51
51
  function v(e, t) {
52
- let { data: n } = f(r(e)), { mutate: i } = h(e), a = c(/* @__PURE__ */ new Set()), o = t.toUpperCase(), l = (n?.notifications ?? []).filter((e) => !e.readAt && e.identifier.toUpperCase() === o && !a.current.has(e.id)).map((e) => e.id).join(",");
52
+ let { data: r } = f(n(e)), { mutate: i } = h(e), a = c(/* @__PURE__ */ new Set()), o = t.toUpperCase(), l = (r?.notifications ?? []).filter((e) => !e.readAt && e.identifier.toUpperCase() === o && !a.current.has(e.id)).map((e) => e.id).join(",");
53
53
  s(() => {
54
54
  if (!l) return;
55
55
  let e = l.split(",");
@@ -57,7 +57,7 @@ function v(e, t) {
57
57
  i(e);
58
58
  }, [l, i]);
59
59
  }
60
- var y = () => `${e}/`;
60
+ var y = () => `${i}/`;
61
61
  async function b() {
62
62
  if ("serviceWorker" in navigator) return navigator.serviceWorker.getRegistration(y());
63
63
  }
@@ -92,52 +92,52 @@ function T() {
92
92
  fallback: e.raw("fallback")
93
93
  }), [e]);
94
94
  }
95
- async function E(r, i) {
96
- await navigator.serviceWorker.register(`${e}/sw.js`, { scope: y() });
95
+ async function E(n, r) {
96
+ await navigator.serviceWorker.register(`${i}/sw.js`, { scope: y() });
97
97
  let a = await navigator.serviceWorker.ready;
98
98
  a.active?.postMessage({
99
99
  type: "messages",
100
- messages: i
100
+ messages: r
101
101
  });
102
- let o = C(r), s = await a.pushManager.getSubscription();
102
+ let o = C(n), s = await a.pushManager.getSubscription();
103
103
  s && !w(s, o) && (await s.unsubscribe(), s = null), s ??= await a.pushManager.subscribe({
104
104
  userVisibleOnly: !0,
105
105
  applicationServerKey: o
106
- }), n(await t.POST("/api/v1/push/subscriptions", { body: { endpoint: s.endpoint } }));
106
+ }), t(await e.POST("/api/v1/push/subscriptions", { body: { endpoint: s.endpoint } }));
107
107
  }
108
108
  function D() {
109
- let { data: e } = f(i), n = T(), [r, a] = l("off"), [c, u] = l(!1), d = o(async () => {
109
+ let { data: t } = f(r), n = T(), [i, a] = l("off"), [c, u] = l(!1), d = o(async () => {
110
110
  if (!S()) return a("unsupported");
111
- if (!e) return;
112
- if (!e.enabled) return a("unavailable");
111
+ if (!t) return;
112
+ if (!t.enabled) return a("unavailable");
113
113
  if (Notification.permission === "denied") return a("denied");
114
- let t = await (await b())?.pushManager.getSubscription();
115
- a(t && Notification.permission === "granted" ? "on" : "off");
116
- }, [e]);
114
+ let e = await (await b())?.pushManager.getSubscription();
115
+ a(e && Notification.permission === "granted" ? "on" : "off");
116
+ }, [t]);
117
117
  return s(() => {
118
118
  d();
119
119
  }, [d]), {
120
- state: r,
120
+ state: i,
121
121
  pending: c,
122
122
  enable: o(async () => {
123
- if (e?.publicKey) {
123
+ if (t?.publicKey) {
124
124
  u(!0);
125
125
  try {
126
- await Notification.requestPermission() === "granted" && await E(e.publicKey, n());
126
+ await Notification.requestPermission() === "granted" && await E(t.publicKey, n());
127
127
  } finally {
128
128
  u(!1), await d();
129
129
  }
130
130
  }
131
131
  }, [
132
- e,
132
+ t,
133
133
  n,
134
134
  d
135
135
  ]),
136
136
  disable: o(async () => {
137
137
  u(!0);
138
138
  try {
139
- let e = await (await b())?.pushManager.getSubscription();
140
- e && (await t.DELETE("/api/v1/push/subscriptions", { params: { query: { endpoint: e.endpoint } } }), await e.unsubscribe());
139
+ let t = await (await b())?.pushManager.getSubscription();
140
+ t && (await e.DELETE("/api/v1/push/subscriptions", { params: { query: { endpoint: t.endpoint } } }), await t.unsubscribe());
141
141
  } finally {
142
142
  u(!1), await d();
143
143
  }
@@ -145,7 +145,7 @@ function D() {
145
145
  };
146
146
  }
147
147
  function O() {
148
- let { data: e } = f(i), t = T();
148
+ let { data: e } = f(r), t = T();
149
149
  s(() => {
150
150
  S() && e?.enabled && e.publicKey && Notification.permission === "granted" && b().then(async (n) => {
151
151
  n && await n.pushManager.getSubscription() && await E(e.publicKey, t());
package/lib/views.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
- import { useNavigate as n } from "./router.js";
3
- import { viewsQuery as r } from "../api/queries.js";
4
- import { useLinkItems as i } from "./menus.js";
5
- import { useConfirm as a } from "./confirm.js";
2
+ import { viewsQuery as n } from "../api/queries.js";
3
+ import { ViewDialog as r } from "../components/ViewDialog.js";
4
+ import { useConfirm as i } from "./confirm.js";
5
+ import { useLinkItems as a } from "./menus.js";
6
6
  import { viewRef as o } from "./refs.js";
7
- import { issuesHref as s } from "./teamPaths.js";
8
- import { ViewDialog as c } from "../components/ViewDialog.js";
7
+ import { useNavigate as s } from "./router.js";
8
+ import { issuesHref as c } from "./teamPaths.js";
9
9
  import { menuDivider as l } from "@parallelworks/ui";
10
10
  import { useState as u } from "react";
11
11
  import { useTranslations as d } from "use-intl";
@@ -51,73 +51,73 @@ function x(e) {
51
51
  };
52
52
  }
53
53
  function S(e, t) {
54
- return s(e, x(t));
54
+ return c(e, x(t));
55
55
  }
56
- function C(n) {
57
- let i = _(), { data: a = [] } = g(r(n)), o = () => i.invalidateQueries({ queryKey: r(n).queryKey });
56
+ function C(r) {
57
+ let i = _(), { data: a = [] } = g(n(r)), o = () => i.invalidateQueries({ queryKey: n(r).queryKey });
58
58
  return {
59
59
  views: a,
60
60
  create: h({
61
- mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/views", {
62
- params: { path: { workspace: n } },
63
- body: r
61
+ mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/views", {
62
+ params: { path: { workspace: r } },
63
+ body: n
64
64
  })),
65
65
  onSettled: o
66
66
  }),
67
67
  update: h({
68
- mutationFn: async ({ id: r, ...i }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/views/{viewId}", {
68
+ mutationFn: async ({ id: n, ...i }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/views/{viewId}", {
69
69
  params: { path: {
70
- workspace: n,
71
- viewId: r
70
+ workspace: r,
71
+ viewId: n
72
72
  } },
73
73
  body: i
74
74
  })),
75
75
  onSettled: o
76
76
  }),
77
77
  remove: h({
78
- mutationFn: async (r) => t(await e.DELETE("/api/v1/workspaces/{workspace}/views/{viewId}", { params: { path: {
79
- workspace: n,
80
- viewId: r
78
+ mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/views/{viewId}", { params: { path: {
79
+ workspace: r,
80
+ viewId: n
81
81
  } } })),
82
82
  onSettled: o
83
83
  })
84
84
  };
85
85
  }
86
86
  function w(e) {
87
- let t = d("savedViews"), r = d("common"), o = n(), s = i(), { update: h, remove: g } = C(e), { confirm: _, dialog: v } = a(), [y, b] = u(null);
87
+ let t = d("savedViews"), n = d("common"), o = s(), c = a(), { update: h, remove: g } = C(e), { confirm: _, dialog: v } = i(), [y, b] = u(null);
88
88
  return {
89
- menu: (n) => [
89
+ menu: (r) => [
90
90
  {
91
- label: r("open"),
91
+ label: n("open"),
92
92
  onClick: () => o({
93
93
  to: "/$workspace/issues",
94
94
  params: { workspace: e },
95
- search: x(n)
95
+ search: x(r)
96
96
  })
97
97
  },
98
98
  {
99
99
  label: t("rename"),
100
- disabled: !n.canEdit,
101
- onClick: () => b(n)
100
+ disabled: !r.canEdit,
101
+ onClick: () => b(r)
102
102
  },
103
103
  l,
104
- ...s(S(e, n)),
104
+ ...c(S(e, r)),
105
105
  l,
106
106
  {
107
107
  label: t("delete"),
108
108
  destructive: !0,
109
- disabled: !n.canDelete,
109
+ disabled: !r.canDelete,
110
110
  onClick: () => _({
111
- title: t("deleteTitle", { name: n.name }),
112
- description: n.shared ? t("deleteShared") : t("deletePersonal"),
111
+ title: t("deleteTitle", { name: r.name }),
112
+ description: r.shared ? t("deleteShared") : t("deletePersonal"),
113
113
  confirmLabel: t("delete"),
114
- onConfirm: () => g.mutateAsync(n.id)
114
+ onConfirm: () => g.mutateAsync(r.id)
115
115
  })
116
116
  }
117
117
  ],
118
- dialogs: /* @__PURE__ */ m(f, { children: [v, y && /* @__PURE__ */ p(c, {
118
+ dialogs: /* @__PURE__ */ m(f, { children: [v, y && /* @__PURE__ */ p(r, {
119
119
  title: t("renameTitle"),
120
- submitLabel: r("save"),
120
+ submitLabel: n("save"),
121
121
  defaultName: y.name,
122
122
  onClose: () => b(null),
123
123
  onSubmit: ({ name: e }) => h.mutateAsync({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallelworks/tandem-web",
3
- "version": "0.171.0",
3
+ "version": "0.171.2",
4
4
  "description": "Tandem's pages, for a host app to render in its own",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -15,34 +15,34 @@
15
15
  "./styles.css": "./styles.css"
16
16
  },
17
17
  "dependencies": {
18
- "@dagrejs/dagre": "3.1.2",
18
+ "@dagrejs/dagre": "3.1.3",
19
19
  "@fontsource-variable/public-sans": "^5.3.0",
20
20
  "@parallelworks/api-docs": "^0.4.0",
21
21
  "@parallelworks/i18n": "^0.3.0",
22
- "@parallelworks/problem": "^0.6.0",
23
- "@tanstack/react-query": "^5.104.5",
24
- "@tanstack/react-virtual": "3.14.24",
25
- "@tiptap/extension-blockquote": "3.32.0",
26
- "@tiptap/extension-code-block-lowlight": "3.32.0",
27
- "@tiptap/extension-collaboration": "^3.32.0",
28
- "@tiptap/extension-collaboration-caret": "^3.32.0",
29
- "@tiptap/extension-details": "3.32.0",
30
- "@tiptap/extension-drag-handle": "3.32.0",
31
- "@tiptap/extension-drag-handle-react": "3.32.0",
32
- "@tiptap/extension-image": "^3.32.0",
33
- "@tiptap/extension-list": "^3.32.0",
34
- "@tiptap/extension-node-range": "3.32.0",
35
- "@tiptap/extension-table": "3.32.0",
36
- "@tiptap/extensions": "^3.32.0",
37
- "@tiptap/markdown": "^3.32.0",
38
- "@tiptap/pm": "^3.32.0",
39
- "@tiptap/react": "^3.32.0",
40
- "@tiptap/starter-kit": "^3.32.0",
41
- "@xyflow/react": "12.12.0",
22
+ "@parallelworks/problem": "^0.6.1",
23
+ "@tanstack/react-query": "^5.107.1",
24
+ "@tanstack/react-virtual": "3.14.26",
25
+ "@tiptap/extension-blockquote": "3.33.0",
26
+ "@tiptap/extension-code-block-lowlight": "3.33.0",
27
+ "@tiptap/extension-collaboration": "^3.33.0",
28
+ "@tiptap/extension-collaboration-caret": "^3.33.0",
29
+ "@tiptap/extension-details": "3.33.0",
30
+ "@tiptap/extension-drag-handle": "3.33.0",
31
+ "@tiptap/extension-drag-handle-react": "3.33.0",
32
+ "@tiptap/extension-image": "^3.33.0",
33
+ "@tiptap/extension-list": "^3.33.0",
34
+ "@tiptap/extension-node-range": "3.33.0",
35
+ "@tiptap/extension-table": "3.33.0",
36
+ "@tiptap/extensions": "^3.33.0",
37
+ "@tiptap/markdown": "^3.33.0",
38
+ "@tiptap/pm": "^3.33.0",
39
+ "@tiptap/react": "^3.33.0",
40
+ "@tiptap/starter-kit": "^3.33.0",
41
+ "@xyflow/react": "12.12.1",
42
42
  "highlight.js": "11.12.0",
43
- "katex": "^0.19.0",
43
+ "katex": "^0.19.1",
44
44
  "lowlight": "^3.3.0",
45
- "mermaid": "11.17.2",
45
+ "mermaid": "12.3.0",
46
46
  "openapi-fetch": "^0.17.0",
47
47
  "y-prosemirror": "^1.3.7",
48
48
  "y-protocols": "^1.0.7",