@parallelworks/tandem-web 0.151.0 → 0.152.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api/queries.js CHANGED
@@ -710,55 +710,6 @@ var a = i({
710
710
  })),
711
711
  retry: !1
712
712
  }), ge = (e, r) => i({
713
- queryKey: [
714
- "site",
715
- e,
716
- r
717
- ],
718
- queryFn: async ({ signal: i }) => n(await t.GET("/api/v1/sites/{workspace}/{site}", {
719
- params: { path: {
720
- workspace: e,
721
- site: r
722
- } },
723
- signal: i
724
- })),
725
- retry: !1
726
- }), _e = (e, r, a) => i({
727
- queryKey: [
728
- "site",
729
- e,
730
- r,
731
- "doc",
732
- a
733
- ],
734
- queryFn: async ({ signal: i }) => n(await t.GET("/api/v1/sites/{workspace}/{site}/docs/{doc}", {
735
- params: { path: {
736
- workspace: e,
737
- site: r,
738
- doc: a
739
- } },
740
- signal: i
741
- })),
742
- retry: !1
743
- }), ve = (e, r, a) => i({
744
- queryKey: [
745
- "site",
746
- e,
747
- r,
748
- "search",
749
- a
750
- ],
751
- queryFn: async ({ signal: i }) => n(await t.GET("/api/v1/sites/{workspace}/{site}/search", {
752
- params: {
753
- path: {
754
- workspace: e,
755
- site: r
756
- },
757
- query: { q: a }
758
- },
759
- signal: i
760
- }))
761
- }), ye = (e, r) => i({
762
713
  queryKey: [
763
714
  "shared",
764
715
  e,
@@ -772,7 +723,7 @@ var a = i({
772
723
  signal: i
773
724
  })),
774
725
  retry: !1
775
- }), be = (e, r) => i({
726
+ }), _e = (e, r) => i({
776
727
  queryKey: [
777
728
  "workspace",
778
729
  e,
@@ -790,7 +741,7 @@ var a = i({
790
741
  },
791
742
  signal: i
792
743
  })).entries
793
- }), xe = (e, r) => i({
744
+ }), ve = (e, r) => i({
794
745
  queryKey: [
795
746
  "workspace",
796
747
  e,
@@ -805,7 +756,7 @@ var a = i({
805
756
  } },
806
757
  signal: i
807
758
  }))
808
- }), Se = (e, r) => i({
759
+ }), ye = (e, r) => i({
809
760
  queryKey: [
810
761
  "workspace",
811
762
  e,
@@ -819,7 +770,7 @@ var a = i({
819
770
  },
820
771
  signal: i
821
772
  }))
822
- }), Ce = (e) => i({
773
+ }), be = (e) => i({
823
774
  queryKey: ["pages", e],
824
775
  queryFn: async ({ signal: r }) => n(await t.GET("/api/v1/attachments/{attachmentId}/page", {
825
776
  params: { path: { attachmentId: e } },
@@ -827,7 +778,7 @@ var a = i({
827
778
  })),
828
779
  staleTime: 3e5,
829
780
  retry: !1
830
- }), we = (e) => i({
781
+ }), xe = (e) => i({
831
782
  queryKey: [
832
783
  "workspace",
833
784
  e,
@@ -838,7 +789,7 @@ var a = i({
838
789
  params: { path: { workspace: e } },
839
790
  signal: r
840
791
  }))
841
- }), Te = (e, r) => i({
792
+ }), Se = (e, r) => i({
842
793
  queryKey: [
843
794
  "workspace",
844
795
  e,
@@ -853,7 +804,7 @@ var a = i({
853
804
  } },
854
805
  signal: i
855
806
  }))
856
- }), Ee = (e, r = !1) => i({
807
+ }), Ce = (e, r = !1) => i({
857
808
  queryKey: [
858
809
  "workspace",
859
810
  e,
@@ -868,7 +819,7 @@ var a = i({
868
819
  },
869
820
  signal: i
870
821
  })).areas
871
- }), De = (e, r) => i({
822
+ }), we = (e, r) => i({
872
823
  queryKey: [
873
824
  "workspace",
874
825
  e,
@@ -883,7 +834,7 @@ var a = i({
883
834
  },
884
835
  signal: i
885
836
  }))
886
- }), Oe = (e, r, a) => i({
837
+ }), Te = (e, r, a) => i({
887
838
  queryKey: [
888
839
  "workspace",
889
840
  e,
@@ -902,7 +853,7 @@ var a = i({
902
853
  },
903
854
  signal: i
904
855
  }))
905
- }), ke = (e, r = {}) => i({
856
+ }), Ee = (e, r = {}) => i({
906
857
  queryKey: [
907
858
  "workspace",
908
859
  e,
@@ -920,7 +871,7 @@ var a = i({
920
871
  },
921
872
  signal: i
922
873
  }))
923
- }), Ae = (e, r) => i({
874
+ }), De = (e, r) => i({
924
875
  queryKey: [
925
876
  "workspace",
926
877
  e,
@@ -935,7 +886,7 @@ var a = i({
935
886
  } },
936
887
  signal: i
937
888
  })).issues
938
- }), je = (e, r) => i({
889
+ }), Oe = (e, r) => i({
939
890
  queryKey: [
940
891
  "workspace",
941
892
  e,
@@ -947,7 +898,7 @@ var a = i({
947
898
  params: h(e, r),
948
899
  signal: i
949
900
  })).docs
950
- }), Me = (e, r) => i({
901
+ }), ke = (e, r) => i({
951
902
  queryKey: [
952
903
  "workspace",
953
904
  e,
@@ -962,7 +913,7 @@ var a = i({
962
913
  } },
963
914
  signal: i
964
915
  }))
965
- }), Ne = (e, r = {}) => i({
916
+ }), Ae = (e, r = {}) => i({
966
917
  queryKey: [
967
918
  "workspace",
968
919
  e,
@@ -978,7 +929,7 @@ var a = i({
978
929
  signal: i
979
930
  })).entries,
980
931
  staleTime: 6e4
981
- }), Pe = (e, r) => i({
932
+ }), je = (e, r) => i({
982
933
  queryKey: [
983
934
  "workspace",
984
935
  e,
@@ -993,7 +944,7 @@ var a = i({
993
944
  } },
994
945
  signal: i
995
946
  }))
996
- }), Fe = (e, r) => i({
947
+ }), Me = (e, r) => i({
997
948
  queryKey: [
998
949
  "workspace",
999
950
  e,
@@ -1008,7 +959,7 @@ var a = i({
1008
959
  } },
1009
960
  signal: i
1010
961
  }))
1011
- }), Ie = (e, r) => i({
962
+ }), Ne = (e, r) => i({
1012
963
  queryKey: [
1013
964
  "workspace",
1014
965
  e,
@@ -1023,18 +974,18 @@ var a = i({
1023
974
  } },
1024
975
  signal: i
1025
976
  })).events
1026
- }), Z = 6e4, Le = i({
977
+ }), Z = 6e4, Pe = i({
1027
978
  queryKey: ["decisions"],
1028
979
  queryFn: async ({ signal: e }) => n(await t.GET("/api/v1/decisions", { signal: e })).decisions,
1029
980
  refetchInterval: Z
1030
- }), Re = i({
981
+ }), Fe = i({
1031
982
  queryKey: ["decisions", "all"],
1032
983
  queryFn: async ({ signal: e }) => n(await t.GET("/api/v1/decisions", {
1033
984
  params: { query: { all: !0 } },
1034
985
  signal: e
1035
986
  })).decisions,
1036
987
  refetchInterval: Z
1037
- }), ze = (e) => i({
988
+ }), Ie = (e) => i({
1038
989
  queryKey: [
1039
990
  "workspace",
1040
991
  e,
@@ -1048,10 +999,10 @@ var a = i({
1048
999
  },
1049
1000
  signal: r
1050
1001
  })).decisions
1051
- }), Be = i({
1002
+ }), Le = i({
1052
1003
  queryKey: ["me", "github"],
1053
1004
  queryFn: async ({ signal: e }) => n(await t.GET("/api/v1/me/github", { signal: e }))
1054
- }), Ve = (e) => i({
1005
+ }), Re = (e) => i({
1055
1006
  queryKey: [
1056
1007
  "workspace",
1057
1008
  e,
@@ -1061,7 +1012,7 @@ var a = i({
1061
1012
  params: s(e),
1062
1013
  signal: r
1063
1014
  }))
1064
- }), He = (e) => i({
1015
+ }), ze = (e) => i({
1065
1016
  queryKey: [
1066
1017
  "workspace",
1067
1018
  e,
@@ -1072,7 +1023,7 @@ var a = i({
1072
1023
  signal: r
1073
1024
  })),
1074
1025
  refetchInterval: (e) => e.state.data?.repositories.some((e) => e.import?.status === "running") ? 3e3 : !1
1075
- }), Ue = (e, r) => i({
1026
+ }), Be = (e, r) => i({
1076
1027
  queryKey: [
1077
1028
  "workspace",
1078
1029
  e,
@@ -1094,7 +1045,7 @@ function Q(e) {
1094
1045
  members: e.members ?? []
1095
1046
  };
1096
1047
  }
1097
- var We = (e) => i({
1048
+ var Ve = (e) => i({
1098
1049
  queryKey: [
1099
1050
  "workspace",
1100
1051
  e,
@@ -1104,7 +1055,7 @@ var We = (e) => i({
1104
1055
  params: s(e),
1105
1056
  signal: r
1106
1057
  })).projects.map(Q)
1107
- }), Ge = (e, r) => i({
1058
+ }), $ = (e, r) => i({
1108
1059
  queryKey: [
1109
1060
  "workspace",
1110
1061
  e,
@@ -1119,7 +1070,7 @@ var We = (e) => i({
1119
1070
  } },
1120
1071
  signal: i
1121
1072
  })).updates
1122
- }), Ke = (e, r) => i({
1073
+ }), He = (e, r) => i({
1123
1074
  queryKey: [
1124
1075
  "workspace",
1125
1076
  e,
@@ -1134,7 +1085,7 @@ var We = (e) => i({
1134
1085
  } },
1135
1086
  signal: i
1136
1087
  })).events
1137
- }), qe = (e, r) => i({
1088
+ }), Ue = (e, r) => i({
1138
1089
  queryKey: [
1139
1090
  "workspace",
1140
1091
  e,
@@ -1148,7 +1099,7 @@ var We = (e) => i({
1148
1099
  } },
1149
1100
  signal: i
1150
1101
  })))
1151
- }), Je = (e, r) => i({
1102
+ }), We = (e, r) => i({
1152
1103
  queryKey: [
1153
1104
  "workspace",
1154
1105
  e,
@@ -1162,7 +1113,7 @@ var We = (e) => i({
1162
1113
  } },
1163
1114
  signal: i
1164
1115
  })).cycles
1165
- }), $ = (e, r) => i({
1116
+ }), Ge = (e, r) => i({
1166
1117
  queryKey: [
1167
1118
  "workspace",
1168
1119
  e,
@@ -1174,7 +1125,7 @@ var We = (e) => i({
1174
1125
  params: h(e, r),
1175
1126
  signal: i
1176
1127
  }))
1177
- }), Ye = (e, r) => i({
1128
+ }), Ke = (e, r) => i({
1178
1129
  queryKey: [
1179
1130
  "workspace",
1180
1131
  e,
@@ -1186,7 +1137,7 @@ var We = (e) => i({
1186
1137
  params: h(e, r),
1187
1138
  signal: i
1188
1139
  })).links
1189
- }), Xe = (e) => i({
1140
+ }), qe = (e) => i({
1190
1141
  queryKey: [
1191
1142
  "workspace",
1192
1143
  e,
@@ -1196,7 +1147,7 @@ var We = (e) => i({
1196
1147
  params: s(e),
1197
1148
  signal: r
1198
1149
  }))
1199
- }), Ze = (e) => i({
1150
+ }), Je = (e) => i({
1200
1151
  queryKey: [
1201
1152
  "workspace",
1202
1153
  e,
@@ -1207,7 +1158,7 @@ var We = (e) => i({
1207
1158
  params: s(e),
1208
1159
  signal: r
1209
1160
  })).accounts
1210
- }), Qe = (e, r) => i({
1161
+ }), Ye = (e, r) => i({
1211
1162
  queryKey: [
1212
1163
  "workspace",
1213
1164
  e,
@@ -1222,7 +1173,7 @@ var We = (e) => i({
1222
1173
  } },
1223
1174
  signal: i
1224
1175
  })).repositories
1225
- }), $e = (e, r) => i({
1176
+ }), Xe = (e, r) => i({
1226
1177
  queryKey: [
1227
1178
  "workspace",
1228
1179
  e,
@@ -1238,7 +1189,7 @@ var We = (e) => i({
1238
1189
  signal: i
1239
1190
  })).repositories,
1240
1191
  staleTime: 3e4
1241
- }), et = (e, r) => i({
1192
+ }), Ze = (e, r) => i({
1242
1193
  queryKey: [
1243
1194
  "workspace",
1244
1195
  e,
@@ -1250,7 +1201,7 @@ var We = (e) => i({
1250
1201
  params: h(e, r),
1251
1202
  signal: i
1252
1203
  })).pullRequests
1253
- }), tt = (e, r) => i({
1204
+ }), Qe = (e, r) => i({
1254
1205
  queryKey: [
1255
1206
  "workspace",
1256
1207
  e,
@@ -1262,7 +1213,7 @@ var We = (e) => i({
1262
1213
  params: h(e, r),
1263
1214
  signal: i
1264
1215
  })).branches
1265
- }), nt = (e, i) => r({
1216
+ }), $e = (e, i) => r({
1266
1217
  queryKey: [
1267
1218
  "workspace",
1268
1219
  e,
@@ -1285,7 +1236,7 @@ var We = (e) => i({
1285
1236
  })),
1286
1237
  initialPageParam: "",
1287
1238
  getNextPageParam: (e) => e.items.length === 50 ? e.items[49]?.id : void 0
1288
- }), rt = (e, i) => r({
1239
+ }), et = (e, i) => r({
1289
1240
  queryKey: [
1290
1241
  "workspace",
1291
1242
  e,
@@ -1305,7 +1256,7 @@ var We = (e) => i({
1305
1256
  })),
1306
1257
  initialPageParam: "",
1307
1258
  getNextPageParam: (e) => e.next
1308
- }), it = (e, r) => i({
1259
+ }), tt = (e, r) => i({
1309
1260
  queryKey: [
1310
1261
  "workspace",
1311
1262
  e,
@@ -1318,7 +1269,7 @@ var We = (e) => i({
1318
1269
  params: h(e, r),
1319
1270
  signal: i
1320
1271
  })).spans
1321
- }), at = (e, r, a) => i({
1272
+ }), nt = (e, r, a) => i({
1322
1273
  queryKey: [
1323
1274
  "workspace",
1324
1275
  e,
@@ -1336,4 +1287,4 @@ var We = (e) => i({
1336
1287
  signal: i
1337
1288
  })).days
1338
1289
  });
1339
- export { R as agentQuery, L as agentsQuery, ze as allDecisionsQuery, Te as areaThreadQuery, Ee as areasQuery, b as attachmentsQuery, rt as auditLogQuery, $e as availableRepositoriesQuery, tt as branchesQuery, Ze as codeHostAccountsQuery, Xe as codeHostQuery, y as commentsQuery, we as countsQuery, I as customerRequestsQuery, F as customersQuery, at as cycleReportQuery, Je as cyclesQuery, Me as docBacklinksQuery, le as docCommentsQuery, q as docDecisionsQuery, pe as docGraphQuery, Ae as docIssuesQuery, fe as docQuery, ce as docTemplatesQuery, de as docVersionQuery, ue as docVersionsQuery, se as docsQuery, x as eventsQuery, Y as favoritesQuery, Ue as followQuery, Be as githubAccountQuery, He as githubSettingsQuery, N as groupsQuery, J as inboxQuery, K as issueDecisionsQuery, je as issueDocsQuery, Ye as issueLinksQuery, g as issueQuery, m as issueSearchQuery, d as issueTemplatesQuery, p as issuesQuery, A as jiraImportQuery, Pe as knowledgeEntryQuery, Ie as knowledgeEventsQuery, Oe as knowledgeGraphQuery, Fe as knowledgeMentionsQuery, Ne as knowledgeQuery, ne as labelsQuery, j as linearImportQuery, be as lostSectionsQuery, a as meQuery, Se as measuresQuery, u as membersQuery, Re as myAllDecisionsQuery, Le as myDecisionsQuery, P as myModelsQuery, ae as notificationSettingsQuery, ie as notificationsQuery, Ce as pageLinkQuery, H as parallelWorksBucketsQuery, V as parallelWorksQuery, w as peopleQuery, O as permissionsQuery, nt as personActivityQuery, re as personCardQuery, k as projectAccessQuery, Ke as projectEventsQuery, Q as projectOf, qe as projectQuery, Ge as projectUpdatesQuery, We as projectsQuery, o as providersQuery, et as pullRequestsQuery, oe as pushSettingsQuery, v as reactionsQuery, $ as relatedIssuesQuery, Qe as repositoriesQuery, D as rolesQuery, W as runActivityQuery, xe as runReadsQuery, U as runnersQuery, G as runsQuery, B as sessionsQuery, me as shareLinksQuery, ye as sharedDocQuery, he as sharedQuery, _e as siteDocQuery, ge as siteQuery, ve as siteSearchQuery, M as slackQuery, Ve as ssoQuery, it as statusHistoryQuery, te as statusesQuery, _ as subscriptionQuery, E as teamAccessQuery, S as teamMembersQuery, C as teamRotationQuery, ee as teamsQuery, z as tokensQuery, De as unfiledQuery, X as viewsQuery, l as webhooksQuery, T as workspaceAccessQuery, ke as workspaceGraphQuery, c as workspaceQuery };
1290
+ export { R as agentQuery, L as agentsQuery, Ie as allDecisionsQuery, Se as areaThreadQuery, Ce as areasQuery, b as attachmentsQuery, et as auditLogQuery, Xe as availableRepositoriesQuery, Qe as branchesQuery, Je as codeHostAccountsQuery, qe as codeHostQuery, y as commentsQuery, xe as countsQuery, I as customerRequestsQuery, F as customersQuery, nt as cycleReportQuery, We as cyclesQuery, ke as docBacklinksQuery, le as docCommentsQuery, q as docDecisionsQuery, pe as docGraphQuery, De as docIssuesQuery, fe as docQuery, ce as docTemplatesQuery, de as docVersionQuery, ue as docVersionsQuery, se as docsQuery, x as eventsQuery, Y as favoritesQuery, Be as followQuery, Le as githubAccountQuery, ze as githubSettingsQuery, N as groupsQuery, J as inboxQuery, K as issueDecisionsQuery, Oe as issueDocsQuery, Ke as issueLinksQuery, g as issueQuery, m as issueSearchQuery, d as issueTemplatesQuery, p as issuesQuery, A as jiraImportQuery, je as knowledgeEntryQuery, Ne as knowledgeEventsQuery, Te as knowledgeGraphQuery, Me as knowledgeMentionsQuery, Ae as knowledgeQuery, ne as labelsQuery, j as linearImportQuery, _e as lostSectionsQuery, a as meQuery, ye as measuresQuery, u as membersQuery, Fe as myAllDecisionsQuery, Pe as myDecisionsQuery, P as myModelsQuery, ae as notificationSettingsQuery, ie as notificationsQuery, be as pageLinkQuery, H as parallelWorksBucketsQuery, V as parallelWorksQuery, w as peopleQuery, O as permissionsQuery, $e as personActivityQuery, re as personCardQuery, k as projectAccessQuery, He as projectEventsQuery, Q as projectOf, Ue as projectQuery, $ as projectUpdatesQuery, Ve as projectsQuery, o as providersQuery, Ze as pullRequestsQuery, oe as pushSettingsQuery, v as reactionsQuery, Ge as relatedIssuesQuery, Ye as repositoriesQuery, D as rolesQuery, W as runActivityQuery, ve as runReadsQuery, U as runnersQuery, G as runsQuery, B as sessionsQuery, me as shareLinksQuery, ge as sharedDocQuery, he as sharedQuery, M as slackQuery, Re as ssoQuery, tt as statusHistoryQuery, te as statusesQuery, _ as subscriptionQuery, E as teamAccessQuery, S as teamMembersQuery, C as teamRotationQuery, ee as teamsQuery, z as tokensQuery, we as unfiledQuery, X as viewsQuery, l as webhooksQuery, T as workspaceAccessQuery, Ee as workspaceGraphQuery, c as workspaceQuery };
@@ -3,195 +3,141 @@ import { api as t, unwrap as n } from "../api/client.js";
3
3
  import { shareLinksQuery as r } from "../api/queries.js";
4
4
  import { openShare as i, useShareTarget as a } from "../lib/share.js";
5
5
  import { useTime as o } from "../lib/time.js";
6
- import { Button as s, CopyButton as c, EmptyState as l, ErrorText as u, Input as d, Modal as f, ModalTitle as p, Select as m, Tooltip as h, useCopy as g } from "@parallelworks/ui";
7
- import { useState as _ } from "react";
8
- import { useErrorMessage as v } from "@parallelworks/problem/react";
9
- import { useTranslations as y } from "use-intl";
10
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
11
- import { useMutation as S, useQuery as C, useQueryClient as w } from "@tanstack/react-query";
6
+ import { Button as s, CopyButton as c, EmptyState as l, ErrorText as u, Input as d, Modal as f, ModalTitle as p } from "@parallelworks/ui";
7
+ import { useState as m } from "react";
8
+ import { useErrorMessage as h } from "@parallelworks/problem/react";
9
+ import { useTranslations as g } from "use-intl";
10
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
11
+ import { useMutation as y, useQuery as b, useQueryClient as x } from "@tanstack/react-query";
12
12
  // src/components/ShareDialog.tsx
13
- function T({ workspace: e }) {
13
+ function S({ workspace: e }) {
14
14
  let t = a();
15
- return t ? /* @__PURE__ */ b(E, {
15
+ return t ? /* @__PURE__ */ _(C, {
16
16
  workspace: e,
17
17
  target: t,
18
18
  onClose: () => i(null)
19
19
  }, JSON.stringify(t)) : null;
20
20
  }
21
- function E({ workspace: i, target: a, onClose: T }) {
22
- let E = y("share"), D = v(), O = o(), k = w(), A = "doc" in a ? { doc: a.doc } : { space: a.space }, j = C(r(i, A)), [M, N] = _("organization"), [P, F] = _(""), I = (t) => e(`/sites/${i}/${t}`), [L, R] = _(), { copy: z } = g(), B = () => k.invalidateQueries({ queryKey: r(i, A).queryKey }), V = S({
21
+ function C({ workspace: i, target: a, onClose: S }) {
22
+ let C = g("share"), w = h(), T = o(), E = x(), D = "doc" in a ? { doc: a.doc } : { space: a.space }, O = b(r(i, D)), [k, A] = m(), j = () => E.invalidateQueries({ queryKey: r(i, D).queryKey }), M = y({
23
23
  mutationFn: async () => n(await t.POST("/api/v1/workspaces/{workspace}/share-links", {
24
24
  params: { path: { workspace: i } },
25
25
  body: {
26
- ...A,
27
- audience: M,
28
- ...M === "anyone" && P.trim() && { site: P.trim() }
26
+ ...D,
27
+ audience: "organization"
29
28
  }
30
29
  })),
31
- onSuccess: (t) => {
32
- R(t.site ? I(t.site) : e(`/share/${t.secret}`)), F("");
33
- },
34
- onSettled: B
35
- }), H = S({
30
+ onSuccess: (t) => A(e(`/share/${t.secret}`)),
31
+ onSettled: j
32
+ }), N = y({
36
33
  mutationFn: async (e) => n(await t.DELETE("/api/v1/workspaces/{workspace}/share-links/{link}", { params: { path: {
37
34
  workspace: i,
38
35
  link: e
39
36
  } } })),
40
- onSettled: B
41
- }), U = [{
42
- value: "organization",
43
- label: E("organization"),
44
- description: E("organizationHint")
45
- }, ...j.data?.publicSharing ? [{
46
- value: "anyone",
47
- label: E("anyone"),
48
- description: E("anyoneHint")
49
- }] : []];
50
- return /* @__PURE__ */ x(f, {
37
+ onSettled: j
38
+ });
39
+ return /* @__PURE__ */ v(f, {
51
40
  open: !0,
52
- onClose: T,
41
+ onClose: S,
53
42
  className: "max-h-[85vh] w-full max-w-lg overflow-y-auto p-5",
54
43
  children: [
55
- /* @__PURE__ */ b(p, {
44
+ /* @__PURE__ */ _(p, {
56
45
  className: "text-sm font-semibold",
57
- children: E("doc" in a ? "titleDoc" : "titleSpace", { title: a.title })
46
+ children: C("doc" in a ? "titleDoc" : "titleSpace", { title: a.title })
58
47
  }),
59
- /* @__PURE__ */ b("p", {
48
+ /* @__PURE__ */ _("p", {
60
49
  className: "mt-1 text-sm text-muted-foreground",
61
- children: E("doc" in a ? "descriptionDoc" : "descriptionSpace")
50
+ children: C("doc" in a ? "descriptionDoc" : "descriptionSpace")
62
51
  }),
63
- /* @__PURE__ */ x("div", {
64
- className: "mt-4 flex items-center gap-2",
65
- children: [/* @__PURE__ */ b(m, {
66
- value: M,
67
- items: U,
68
- onValueChange: N,
69
- "aria-label": E("audience"),
70
- width: "content"
71
- }), /* @__PURE__ */ b(s, {
52
+ /* @__PURE__ */ v("div", {
53
+ className: "mt-4 flex items-center gap-3",
54
+ children: [/* @__PURE__ */ v("p", {
55
+ className: "min-w-0 text-sm",
56
+ children: [C("organization"), /* @__PURE__ */ _("span", {
57
+ className: "block text-xs text-muted-foreground",
58
+ children: C("organizationHint")
59
+ })]
60
+ }), /* @__PURE__ */ _(s, {
72
61
  type: "button",
73
62
  variant: "primary",
74
- onClick: () => V.mutate(),
75
- loading: V.isPending,
63
+ onClick: () => M.mutate(),
64
+ loading: M.isPending,
76
65
  className: "ml-auto",
77
- children: E("create")
66
+ children: C("create")
78
67
  })]
79
68
  }),
80
- M === "anyone" && /* @__PURE__ */ x("label", {
81
- className: "mt-3 block",
82
- children: [
83
- /* @__PURE__ */ b("span", {
84
- className: "text-xs font-medium text-muted-foreground",
85
- children: E("site")
86
- }),
87
- /* @__PURE__ */ x("span", {
88
- className: "mt-1 flex items-center gap-2",
89
- children: [/* @__PURE__ */ b("span", {
90
- className: "shrink-0 font-mono text-xs text-muted-foreground",
91
- children: `/sites/${i}/`
92
- }), /* @__PURE__ */ b("input", {
93
- value: P,
94
- onChange: (e) => F(e.target.value.toLowerCase()),
95
- placeholder: E("siteName"),
96
- "aria-label": E("siteName"),
97
- pattern: "[a-z0-9][a-z0-9-]{0,62}",
98
- className: "h-8 min-w-0 flex-1 rounded-md border border-border bg-background px-2 font-mono text-xs"
99
- })]
100
- }),
101
- /* @__PURE__ */ b("span", {
102
- className: "mt-1 block text-xs text-muted-foreground",
103
- children: E("siteHint")
104
- })
105
- ]
106
- }),
107
- !j.data?.publicSharing && j.data && /* @__PURE__ */ b("p", {
108
- className: "mt-2 text-xs text-muted-foreground",
109
- children: E("anyoneOff")
110
- }),
111
- V.isError && /* @__PURE__ */ b(u, {
69
+ M.isError && /* @__PURE__ */ _(u, {
112
70
  size: "md",
113
71
  className: "mt-2",
114
- children: D(V.error)
72
+ children: w(M.error)
115
73
  }),
116
- L && /* @__PURE__ */ x("div", {
74
+ k && /* @__PURE__ */ v("div", {
117
75
  className: "mt-4 rounded-md border border-border p-3",
118
- children: [/* @__PURE__ */ b("p", {
76
+ children: [/* @__PURE__ */ _("p", {
119
77
  className: "text-xs text-muted-foreground",
120
- children: E(L.includes("/sites/") ? "published" : "onlyNow")
121
- }), /* @__PURE__ */ x("div", {
78
+ children: C("onlyNow")
79
+ }), /* @__PURE__ */ v("div", {
122
80
  className: "mt-2 flex items-center gap-2",
123
- children: [/* @__PURE__ */ b(d, {
81
+ children: [/* @__PURE__ */ _(d, {
124
82
  readOnly: !0,
125
83
  mono: !0,
126
- value: L,
127
- "aria-label": E("link"),
84
+ value: k,
85
+ "aria-label": C("link"),
128
86
  onFocus: (e) => e.currentTarget.select(),
129
87
  className: "min-w-0 flex-1"
130
- }), /* @__PURE__ */ b(c, {
131
- text: L,
132
- label: E("linkNoun"),
88
+ }), /* @__PURE__ */ _(c, {
89
+ text: k,
90
+ label: C("linkNoun"),
133
91
  showLabel: !0,
134
92
  variant: "secondary"
135
93
  })]
136
94
  })]
137
95
  }),
138
- /* @__PURE__ */ b("h3", {
96
+ /* @__PURE__ */ _("h3", {
139
97
  className: "mt-5 text-xs font-medium text-muted-foreground",
140
- children: E("links")
98
+ children: C("links")
141
99
  }),
142
- j.data && j.data.links.length === 0 ? /* @__PURE__ */ b(l, {
100
+ O.data && O.data.links.length === 0 ? /* @__PURE__ */ _(l, {
143
101
  variant: "bare",
144
- title: E("none"),
102
+ title: C("none"),
145
103
  className: "mt-2"
146
- }) : /* @__PURE__ */ b("ul", {
104
+ }) : /* @__PURE__ */ _("ul", {
147
105
  className: "mt-2 divide-y divide-border rounded-md border border-border",
148
- children: j.data?.links.map((e) => /* @__PURE__ */ x("li", {
106
+ children: O.data?.links.map((e) => /* @__PURE__ */ v("li", {
149
107
  className: "flex items-center gap-3 px-3 py-2 text-sm",
150
- children: [/* @__PURE__ */ x("span", {
108
+ children: [/* @__PURE__ */ v("span", {
151
109
  className: "min-w-0 flex-1",
152
- children: [
153
- E(e.audience),
154
- e.site && /* @__PURE__ */ b(h, {
155
- content: E("copy"),
156
- children: /* @__PURE__ */ b("button", {
157
- type: "button",
158
- onClick: () => z(I(e.site ?? ""), { label: E("linkNoun") }),
159
- className: "block max-w-full truncate font-mono text-xs text-primary hover:underline",
160
- children: `/sites/${i}/${e.site}`
161
- })
162
- }),
163
- /* @__PURE__ */ b("span", {
164
- className: "block text-xs text-muted-foreground",
165
- children: E("madeBy", {
166
- name: e.creator,
167
- when: O.relative(e.createdAt)
168
- })
110
+ children: [C("organization"), /* @__PURE__ */ _("span", {
111
+ className: "block text-xs text-muted-foreground",
112
+ children: C("madeBy", {
113
+ name: e.creator,
114
+ when: T.relative(e.createdAt)
169
115
  })
170
- ]
171
- }), /* @__PURE__ */ b(s, {
116
+ })]
117
+ }), /* @__PURE__ */ _(s, {
172
118
  type: "button",
173
119
  variant: "danger-outline",
174
120
  size: "sm",
175
- onClick: () => H.mutate(e.id),
176
- disabled: H.isPending,
177
- children: E("revoke")
121
+ onClick: () => N.mutate(e.id),
122
+ disabled: N.isPending,
123
+ children: C("revoke")
178
124
  })]
179
125
  }, e.id))
180
126
  }),
181
- H.isError && /* @__PURE__ */ b(u, {
127
+ N.isError && /* @__PURE__ */ _(u, {
182
128
  size: "md",
183
129
  className: "mt-2",
184
- children: D(H.error)
130
+ children: w(N.error)
185
131
  }),
186
- /* @__PURE__ */ b("div", {
132
+ /* @__PURE__ */ _("div", {
187
133
  className: "mt-5 flex justify-end",
188
- children: /* @__PURE__ */ b(s, {
134
+ children: /* @__PURE__ */ _(s, {
189
135
  type: "button",
190
- onClick: T,
191
- children: E("done")
136
+ onClick: S,
137
+ children: C("done")
192
138
  })
193
139
  })
194
140
  ]
195
141
  });
196
142
  }
197
- export { T as ShareDialogHost };
143
+ export { S as ShareDialogHost };