jazz-tools 0.15.1 → 0.15.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.
- package/.turbo/turbo-build.log +38 -38
- package/CHANGELOG.md +11 -0
- package/dist/inspector/index.js +117 -98
- package/dist/inspector/index.js.map +1 -1
- package/dist/inspector/viewer/co-plain-text-view.d.ts +5 -0
- package/dist/inspector/viewer/co-plain-text-view.d.ts.map +1 -0
- package/dist/inspector/viewer/page.d.ts.map +1 -1
- package/dist/inspector/viewer/type-icon.d.ts.map +1 -1
- package/dist/inspector/viewer/use-resolve-covalue.d.ts +1 -1
- package/dist/inspector/viewer/use-resolve-covalue.d.ts.map +1 -1
- package/dist/inspector/viewer/value-renderer.d.ts.map +1 -1
- package/dist/react/index.js +2 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/testing.js +2 -0
- package/dist/react/testing.js.map +1 -1
- package/package.json +5 -5
- package/src/inspector/viewer/co-plain-text-view.tsx +17 -0
- package/src/inspector/viewer/page.tsx +5 -0
- package/src/inspector/viewer/type-icon.tsx +1 -0
- package/src/inspector/viewer/use-resolve-covalue.ts +1 -1
- package/src/inspector/viewer/value-renderer.tsx +4 -0
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> jazz-tools@0.15.
|
2
|
+
> jazz-tools@0.15.2 build /home/runner/_work/jazz/jazz/packages/jazz-tools
|
3
3
|
> tsup && pnpm types && pnpm build:svelte
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
|
@@ -107,24 +107,31 @@
|
|
107
107
|
[34mESM[39m Build start
|
108
108
|
[34mCLI[39m Cleaning output folder
|
109
109
|
[34mESM[39m Build start
|
110
|
-
[32mESM[39m [1mdist/browser-media-images/index.js [22m[32m3.01 KB[39m
|
111
|
-
[32mESM[39m [1mdist/browser-media-images/index.js.map [22m[32m5.68 KB[39m
|
112
|
-
[32mESM[39m ⚡️ Build success in 18ms
|
113
|
-
[32mESM[39m [1mdist/tiptap/index.js [22m[32m564.00 B[39m
|
114
|
-
[32mESM[39m [1mdist/tiptap/index.js.map [22m[32m1.21 KB[39m
|
115
|
-
[32mESM[39m ⚡️ Build success in 14ms
|
116
110
|
[32mESM[39m [1mdist/worker/index.js [22m[32m2.34 KB[39m
|
117
111
|
[32mESM[39m [1mdist/worker/index.js.map [22m[32m4.82 KB[39m
|
112
|
+
[32mESM[39m ⚡️ Build success in 13ms
|
113
|
+
[32mESM[39m [1mdist/tiptap/index.js [22m[32m564.00 B[39m
|
114
|
+
[32mESM[39m [1mdist/tiptap/index.js.map [22m[32m1.21 KB[39m
|
118
115
|
[32mESM[39m ⚡️ Build success in 14ms
|
116
|
+
[32mESM[39m [1mdist/browser-media-images/index.js [22m[32m3.01 KB[39m
|
117
|
+
[32mESM[39m [1mdist/browser-media-images/index.js.map [22m[32m5.68 KB[39m
|
118
|
+
[32mESM[39m ⚡️ Build success in 19ms
|
119
119
|
[32mESM[39m [1mdist/react-native-media-images/index.js [22m[32m6.19 KB[39m
|
120
120
|
[32mESM[39m [1mdist/react-native-media-images/index.js.map [22m[32m10.96 KB[39m
|
121
|
-
[32mESM[39m ⚡️ Build success in
|
121
|
+
[32mESM[39m ⚡️ Build success in 16ms
|
122
|
+
[32mESM[39m [1mdist/react-core/index.js [22m[32m8.37 KB[39m
|
123
|
+
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js [22m[32m279.00 B[39m
|
124
|
+
[32mESM[39m [1mdist/react-core/testing.js [22m[32m1.17 KB[39m
|
125
|
+
[32mESM[39m [1mdist/react-core/index.js.map [22m[32m16.39 KB[39m
|
126
|
+
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js.map [22m[32m533.00 B[39m
|
127
|
+
[32mESM[39m [1mdist/react-core/testing.js.map [22m[32m1.82 KB[39m
|
128
|
+
[32mESM[39m ⚡️ Build success in 19ms
|
122
129
|
[32mESM[39m [1mdist/expo/index.js [22m[32m4.65 KB[39m
|
123
130
|
[32mESM[39m [1mdist/expo/testing.js [22m[32m112.00 B[39m
|
124
131
|
[32mESM[39m [1mdist/expo/crypto.js [22m[32m109.00 B[39m
|
125
132
|
[32mESM[39m [1mdist/expo/index.js.map [22m[32m10.17 KB[39m
|
126
|
-
[32mESM[39m [1mdist/expo/testing.js.map [22m[32m168.00 B[39m
|
127
133
|
[32mESM[39m [1mdist/expo/crypto.js.map [22m[32m166.00 B[39m
|
134
|
+
[32mESM[39m [1mdist/expo/testing.js.map [22m[32m168.00 B[39m
|
128
135
|
[32mESM[39m ⚡️ Build success in 24ms
|
129
136
|
[32mESM[39m [1mdist/react-native/index.js [22m[32m2.53 KB[39m
|
130
137
|
[32mESM[39m [1mdist/react-native/crypto.js [22m[32m117.00 B[39m
|
@@ -132,60 +139,53 @@
|
|
132
139
|
[32mESM[39m [1mdist/react-native/index.js.map [22m[32m5.68 KB[39m
|
133
140
|
[32mESM[39m [1mdist/react-native/crypto.js.map [22m[32m174.00 B[39m
|
134
141
|
[32mESM[39m [1mdist/react-native/testing.js.map [22m[32m176.00 B[39m
|
135
|
-
[32mESM[39m ⚡️ Build success in
|
136
|
-
[32mESM[39m [1mdist/react-core/index.js [22m[32m8.37 KB[39m
|
137
|
-
[32mESM[39m [1mdist/react-core/testing.js [22m[32m1.17 KB[39m
|
138
|
-
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js [22m[32m279.00 B[39m
|
139
|
-
[32mESM[39m [1mdist/react-core/index.js.map [22m[32m16.39 KB[39m
|
140
|
-
[32mESM[39m [1mdist/react-core/testing.js.map [22m[32m1.82 KB[39m
|
141
|
-
[32mESM[39m [1mdist/react-core/chunk-7DYMJ74I.js.map [22m[32m533.00 B[39m
|
142
|
-
[32mESM[39m ⚡️ Build success in 24ms
|
143
|
-
[32mESM[39m [1mdist/react/index.js [22m[32m20.66 KB[39m
|
144
|
-
[32mESM[39m [1mdist/react/testing.js [22m[32m122.00 B[39m
|
145
|
-
[32mESM[39m [1mdist/react/testing.js.map [22m[32m165.00 B[39m
|
146
|
-
[32mESM[39m [1mdist/react/index.js.map [22m[32m34.07 KB[39m
|
147
|
-
[32mESM[39m ⚡️ Build success in 27ms
|
142
|
+
[32mESM[39m ⚡️ Build success in 22ms
|
148
143
|
[32mESM[39m [1mdist/browser/index.js [22m[32m13.36 KB[39m
|
149
144
|
[32mESM[39m [1mdist/browser/index.js.map [22m[32m28.57 KB[39m
|
150
|
-
[32mESM[39m ⚡️ Build success in
|
145
|
+
[32mESM[39m ⚡️ Build success in 26ms
|
151
146
|
[32mESM[39m [1mdist/react-native-core/index.js [22m[32m17.42 KB[39m
|
152
|
-
[32mESM[39m [1mdist/react-native-core/testing.js [22m[32m119.00 B[39m
|
153
147
|
[32mESM[39m [1mdist/react-native-core/crypto.js [22m[32m2.10 KB[39m
|
148
|
+
[32mESM[39m [1mdist/react-native-core/testing.js [22m[32m119.00 B[39m
|
154
149
|
[32mESM[39m [1mdist/react-native-core/index.js.map [22m[32m34.49 KB[39m
|
155
|
-
[32mESM[39m [1mdist/react-native-core/testing.js.map [22m[32m175.00 B[39m
|
156
150
|
[32mESM[39m [1mdist/react-native-core/crypto.js.map [22m[32m4.25 KB[39m
|
157
|
-
[32mESM[39m
|
158
|
-
[32mESM[39m
|
151
|
+
[32mESM[39m [1mdist/react-native-core/testing.js.map [22m[32m175.00 B[39m
|
152
|
+
[32mESM[39m ⚡️ Build success in 34ms
|
159
153
|
[32mESM[39m [1mdist/react/index.js [22m[32m20.64 KB[39m
|
154
|
+
[32mESM[39m [1mdist/react/ssr.js [22m[32m688.00 B[39m
|
160
155
|
[32mESM[39m [1mdist/react/testing.js [22m[32m107.00 B[39m
|
156
|
+
[32mESM[39m [1mdist/react/index.js.map [22m[32m34.07 KB[39m
|
161
157
|
[32mESM[39m [1mdist/react/ssr.js.map [22m[32m1.12 KB[39m
|
162
158
|
[32mESM[39m [1mdist/react/testing.js.map [22m[32m163.00 B[39m
|
163
|
-
[32mESM[39m
|
164
|
-
[32mESM[39m ⚡️ Build success in 38ms
|
159
|
+
[32mESM[39m ⚡️ Build success in 35ms
|
165
160
|
[32mESM[39m [1mdist/prosemirror/index.js [22m[32m76.90 KB[39m
|
166
161
|
[32mESM[39m [1mdist/prosemirror/index.js.map [22m[32m305.53 KB[39m
|
167
|
-
[32mESM[39m ⚡️ Build success in
|
168
|
-
[32mESM[39m [1mdist/
|
169
|
-
[32mESM[39m [1mdist/
|
170
|
-
[32mESM[39m
|
171
|
-
[32mESM[39m [1mdist/
|
162
|
+
[32mESM[39m ⚡️ Build success in 37ms
|
163
|
+
[32mESM[39m [1mdist/react/index.js [22m[32m20.66 KB[39m
|
164
|
+
[32mESM[39m [1mdist/react/testing.js [22m[32m122.00 B[39m
|
165
|
+
[32mESM[39m [1mdist/react/testing.js.map [22m[32m165.00 B[39m
|
166
|
+
[32mESM[39m [1mdist/react/index.js.map [22m[32m34.07 KB[39m
|
167
|
+
[32mESM[39m ⚡️ Build success in 36ms
|
168
|
+
[32mESM[39m [1mdist/inspector/index.js [22m[32m60.37 KB[39m
|
169
|
+
[32mESM[39m [1mdist/inspector/index.js.map [22m[32m107.85 KB[39m
|
170
|
+
[32mESM[39m ⚡️ Build success in 46ms
|
172
171
|
[32mESM[39m [1mdist/index.js [22m[32m16.19 KB[39m
|
172
|
+
[32mESM[39m [1mdist/testing.js [22m[32m6.32 KB[39m
|
173
173
|
[32mESM[39m [1mdist/chunk-VBDJM6Z5.js [22m[32m140.80 KB[39m
|
174
174
|
[32mESM[39m [1mdist/testing.js.map [22m[32m12.22 KB[39m
|
175
175
|
[32mESM[39m [1mdist/index.js.map [22m[32m29.03 KB[39m
|
176
176
|
[32mESM[39m [1mdist/chunk-VBDJM6Z5.js.map [22m[32m320.73 KB[39m
|
177
|
-
[32mESM[39m ⚡️ Build success in
|
177
|
+
[32mESM[39m ⚡️ Build success in 59ms
|
178
178
|
[32mESM[39m [1mdist/inspector/register-custom-element.js [22m[32m218.00 B[39m
|
179
179
|
[32mESM[39m [1mdist/inspector/register-custom-element.js.map [22m[32m314.00 B[39m
|
180
180
|
[32mESM[39m [1mdist/inspector/custom-element-CWW72LEG.js [22m[32m1.47 MB[39m
|
181
181
|
[32mESM[39m [1mdist/inspector/custom-element-CWW72LEG.js.map [22m[32m2.26 MB[39m
|
182
|
-
[32mESM[39m ⚡️ Build success in
|
182
|
+
[32mESM[39m ⚡️ Build success in 89ms
|
183
183
|
|
184
|
-
> jazz-tools@0.15.
|
184
|
+
> jazz-tools@0.15.2 types /home/runner/_work/jazz/jazz/packages/jazz-tools
|
185
185
|
> tsc --outDir dist
|
186
186
|
|
187
187
|
|
188
|
-
> jazz-tools@0.15.
|
188
|
+
> jazz-tools@0.15.2 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
|
189
189
|
> rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
|
190
190
|
|
191
191
|
src/svelte -> dist/svelte
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# jazz-tools
|
2
2
|
|
3
|
+
## 0.15.2
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 0e7e532: inspector: improve CoPlainText view
|
8
|
+
- Updated dependencies [4b964ed]
|
9
|
+
- cojson@0.15.2
|
10
|
+
- cojson-storage@0.15.2
|
11
|
+
- cojson-storage-indexeddb@0.15.2
|
12
|
+
- cojson-transport-ws@0.15.2
|
13
|
+
|
3
14
|
## 0.15.1
|
4
15
|
|
5
16
|
### Patch Changes
|
package/dist/inspector/index.js
CHANGED
@@ -685,7 +685,8 @@ var TypeIcon = ({
|
|
685
685
|
colist: "\u2630 CoList",
|
686
686
|
account: "\u{1F464} Account",
|
687
687
|
group: "\u{1F465} Group",
|
688
|
-
file: "\u{1F4C3} FileStream"
|
688
|
+
file: "\u{1F4C3} FileStream",
|
689
|
+
coplaintext: "\u{1F4C4} CoPlainText"
|
689
690
|
};
|
690
691
|
const iconKey = extendedType || type;
|
691
692
|
const icon2 = iconMap[iconKey];
|
@@ -982,6 +983,9 @@ var CoMapPreview = ({
|
|
982
983
|
if (snapshot === "unavailable" && !value) {
|
983
984
|
return /* @__PURE__ */ jsx14(Text, { inline: true, muted: true, children: "Unavailable" });
|
984
985
|
}
|
986
|
+
if (type === "coplaintext") {
|
987
|
+
return /* @__PURE__ */ jsx14(Fragment3, { children: value.toString() });
|
988
|
+
}
|
985
989
|
if (extendedType === "image" && isBrowserImage(snapshot)) {
|
986
990
|
return /* @__PURE__ */ jsxs5(ImagePreviewContainer2, { children: [
|
987
991
|
/* @__PURE__ */ jsx14(PreviewImage, { src: snapshot.placeholderDataURL }),
|
@@ -1213,10 +1217,22 @@ function AccountView({
|
|
1213
1217
|
] });
|
1214
1218
|
}
|
1215
1219
|
|
1220
|
+
// src/inspector/viewer/co-plain-text-view.tsx
|
1221
|
+
import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
1222
|
+
function CoPlainTextView({
|
1223
|
+
data
|
1224
|
+
}) {
|
1225
|
+
if (!data) return;
|
1226
|
+
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
1227
|
+
/* @__PURE__ */ jsx19("p", { children: Object.values(data).join("") }),
|
1228
|
+
/* @__PURE__ */ jsx19(RawDataCard, { data })
|
1229
|
+
] });
|
1230
|
+
}
|
1231
|
+
|
1216
1232
|
// src/inspector/ui/table.tsx
|
1217
1233
|
import { styled as styled12 } from "goober";
|
1218
1234
|
import React4 from "react";
|
1219
|
-
import { jsx as
|
1235
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
1220
1236
|
var StyledTable = styled12("table")`
|
1221
1237
|
width: 100%;
|
1222
1238
|
`;
|
@@ -1246,35 +1262,35 @@ var StyledTh = styled12("th")`
|
|
1246
1262
|
var StyledTd = styled12("td")`
|
1247
1263
|
padding: 0.5rem 0.75rem;
|
1248
1264
|
`;
|
1249
|
-
var Table = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */
|
1250
|
-
var TableHead = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */
|
1251
|
-
var TableBody = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */
|
1252
|
-
var TableRow = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */
|
1253
|
-
var TableHeader = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */
|
1254
|
-
var TableCell = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */
|
1265
|
+
var Table = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx20(StyledTable, { ref, ...props, children }));
|
1266
|
+
var TableHead = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx20(StyledThead, { ref, ...props, children }));
|
1267
|
+
var TableBody = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx20(StyledTbody, { ref, ...props, children }));
|
1268
|
+
var TableRow = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx20("tr", { ref, ...props, children }));
|
1269
|
+
var TableHeader = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx20(StyledTh, { ref, ...props, children }));
|
1270
|
+
var TableCell = React4.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsx20(StyledTd, { ref, ...props, children }));
|
1255
1271
|
|
1256
1272
|
// src/inspector/viewer/group-view.tsx
|
1257
|
-
import { Fragment as
|
1273
|
+
import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
|
1258
1274
|
function GroupView({
|
1259
1275
|
data,
|
1260
1276
|
onNavigate,
|
1261
1277
|
node
|
1262
1278
|
}) {
|
1263
|
-
return /* @__PURE__ */
|
1264
|
-
/* @__PURE__ */
|
1265
|
-
/* @__PURE__ */
|
1266
|
-
/* @__PURE__ */
|
1267
|
-
/* @__PURE__ */
|
1268
|
-
/* @__PURE__ */
|
1279
|
+
return /* @__PURE__ */ jsxs10(Fragment7, { children: [
|
1280
|
+
/* @__PURE__ */ jsx21(Text, { strong: true, children: "Members" }),
|
1281
|
+
/* @__PURE__ */ jsxs10(Table, { children: [
|
1282
|
+
/* @__PURE__ */ jsx21(TableHead, { children: /* @__PURE__ */ jsxs10(TableRow, { children: [
|
1283
|
+
/* @__PURE__ */ jsx21(TableHeader, { children: "Account" }),
|
1284
|
+
/* @__PURE__ */ jsx21(TableHeader, { children: "Permission" })
|
1269
1285
|
] }) }),
|
1270
|
-
/* @__PURE__ */
|
1271
|
-
"everyone" in data && typeof data.everyone === "string" ? /* @__PURE__ */
|
1272
|
-
/* @__PURE__ */
|
1273
|
-
/* @__PURE__ */
|
1286
|
+
/* @__PURE__ */ jsxs10(TableBody, { children: [
|
1287
|
+
"everyone" in data && typeof data.everyone === "string" ? /* @__PURE__ */ jsxs10(TableRow, { children: [
|
1288
|
+
/* @__PURE__ */ jsx21(TableCell, { children: "everyone" }),
|
1289
|
+
/* @__PURE__ */ jsx21(TableCell, { children: data.everyone })
|
1274
1290
|
] }) : null,
|
1275
1291
|
Object.entries(data).map(
|
1276
|
-
([key, value]) => isCoId(key) ? /* @__PURE__ */
|
1277
|
-
/* @__PURE__ */
|
1292
|
+
([key, value]) => isCoId(key) ? /* @__PURE__ */ jsxs10(TableRow, { children: [
|
1293
|
+
/* @__PURE__ */ jsx21(TableCell, { children: /* @__PURE__ */ jsx21(
|
1278
1294
|
AccountOrGroupText,
|
1279
1295
|
{
|
1280
1296
|
coId: key,
|
@@ -1285,17 +1301,17 @@ function GroupView({
|
|
1285
1301
|
}
|
1286
1302
|
}
|
1287
1303
|
) }),
|
1288
|
-
/* @__PURE__ */
|
1304
|
+
/* @__PURE__ */ jsx21(TableCell, { children: value })
|
1289
1305
|
] }, key) : null
|
1290
1306
|
)
|
1291
1307
|
] })
|
1292
1308
|
] }),
|
1293
|
-
/* @__PURE__ */
|
1309
|
+
/* @__PURE__ */ jsx21(RawDataCard, { data })
|
1294
1310
|
] });
|
1295
1311
|
}
|
1296
1312
|
|
1297
1313
|
// src/inspector/viewer/role-display.tsx
|
1298
|
-
import { jsxs as
|
1314
|
+
import { jsxs as jsxs11 } from "react/jsx-runtime";
|
1299
1315
|
function RoleDisplay({
|
1300
1316
|
node,
|
1301
1317
|
value
|
@@ -1314,7 +1330,7 @@ function RoleDisplay({
|
|
1314
1330
|
} else {
|
1315
1331
|
role = "unauthorized";
|
1316
1332
|
}
|
1317
|
-
return /* @__PURE__ */
|
1333
|
+
return /* @__PURE__ */ jsxs11(Text, { children: [
|
1318
1334
|
"Role: ",
|
1319
1335
|
role
|
1320
1336
|
] });
|
@@ -1323,7 +1339,7 @@ function RoleDisplay({
|
|
1323
1339
|
// src/inspector/viewer/table-viewer.tsx
|
1324
1340
|
import { styled as styled13 } from "goober";
|
1325
1341
|
import { useMemo, useState as useState6 } from "react";
|
1326
|
-
import { Fragment as
|
1342
|
+
import { Fragment as Fragment8, jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
1327
1343
|
var PaginationContainer = styled13("div")`
|
1328
1344
|
padding: 1rem 0;
|
1329
1345
|
display: flex;
|
@@ -1345,10 +1361,10 @@ function CoValuesTableView({
|
|
1345
1361
|
const resolvedRows = useResolvedCoValues(visibleRows, node);
|
1346
1362
|
const hasMore = visibleRowsCount < coIdArray.length;
|
1347
1363
|
if (!coIdArray.length) {
|
1348
|
-
return /* @__PURE__ */
|
1364
|
+
return /* @__PURE__ */ jsx22("div", { children: "No data to display" });
|
1349
1365
|
}
|
1350
1366
|
if (resolvedRows.length === 0) {
|
1351
|
-
return /* @__PURE__ */
|
1367
|
+
return /* @__PURE__ */ jsx22("div", { children: "Loading..." });
|
1352
1368
|
}
|
1353
1369
|
const keys = Array.from(
|
1354
1370
|
new Set(resolvedRows.flatMap((item) => Object.keys(item.snapshot || {})))
|
@@ -1356,11 +1372,11 @@ function CoValuesTableView({
|
|
1356
1372
|
const loadMore = () => {
|
1357
1373
|
setVisibleRowsCount((prevVisibleRows) => prevVisibleRows + 10);
|
1358
1374
|
};
|
1359
|
-
return /* @__PURE__ */
|
1360
|
-
/* @__PURE__ */
|
1361
|
-
/* @__PURE__ */
|
1362
|
-
/* @__PURE__ */
|
1363
|
-
keys.map((key) => /* @__PURE__ */
|
1375
|
+
return /* @__PURE__ */ jsxs12(Fragment8, { children: [
|
1376
|
+
/* @__PURE__ */ jsxs12(Table, { children: [
|
1377
|
+
/* @__PURE__ */ jsx22(TableHead, { children: /* @__PURE__ */ jsx22(TableRow, { children: [...keys, "Action"].map((key) => /* @__PURE__ */ jsx22(TableHeader, { children: key }, key)) }) }),
|
1378
|
+
/* @__PURE__ */ jsx22(TableBody, { children: resolvedRows.slice(0, visibleRowsCount).map((item, index) => /* @__PURE__ */ jsxs12(TableRow, { children: [
|
1379
|
+
keys.map((key) => /* @__PURE__ */ jsx22(TableCell, { children: /* @__PURE__ */ jsx22(
|
1364
1380
|
ValueRenderer,
|
1365
1381
|
{
|
1366
1382
|
json: item.snapshot[key],
|
@@ -1381,7 +1397,7 @@ function CoValuesTableView({
|
|
1381
1397
|
}
|
1382
1398
|
}
|
1383
1399
|
) }, key)),
|
1384
|
-
/* @__PURE__ */
|
1400
|
+
/* @__PURE__ */ jsx22(TableCell, { children: /* @__PURE__ */ jsx22(
|
1385
1401
|
Button,
|
1386
1402
|
{
|
1387
1403
|
variant: "secondary",
|
@@ -1396,15 +1412,15 @@ function CoValuesTableView({
|
|
1396
1412
|
) })
|
1397
1413
|
] }, index)) })
|
1398
1414
|
] }),
|
1399
|
-
/* @__PURE__ */
|
1400
|
-
/* @__PURE__ */
|
1415
|
+
/* @__PURE__ */ jsxs12(PaginationContainer, { children: [
|
1416
|
+
/* @__PURE__ */ jsxs12(Text, { muted: true, small: true, children: [
|
1401
1417
|
"Showing ",
|
1402
1418
|
Math.min(visibleRowsCount, coIdArray.length),
|
1403
1419
|
" of",
|
1404
1420
|
" ",
|
1405
1421
|
coIdArray.length
|
1406
1422
|
] }),
|
1407
|
-
hasMore && /* @__PURE__ */
|
1423
|
+
hasMore && /* @__PURE__ */ jsx22(Button, { variant: "secondary", onClick: loadMore, children: "Load more" })
|
1408
1424
|
] })
|
1409
1425
|
] });
|
1410
1426
|
}
|
@@ -1417,24 +1433,24 @@ function TableView({
|
|
1417
1433
|
return Array.isArray(data) && data.every((k) => isCoId(k));
|
1418
1434
|
}, [data]);
|
1419
1435
|
if (isListOfCoValues) {
|
1420
|
-
return /* @__PURE__ */
|
1436
|
+
return /* @__PURE__ */ jsx22(CoValuesTableView, { data, node, onNavigate });
|
1421
1437
|
}
|
1422
|
-
return /* @__PURE__ */
|
1423
|
-
/* @__PURE__ */
|
1424
|
-
/* @__PURE__ */
|
1425
|
-
/* @__PURE__ */
|
1438
|
+
return /* @__PURE__ */ jsxs12(Table, { children: [
|
1439
|
+
/* @__PURE__ */ jsx22(TableHead, { children: /* @__PURE__ */ jsxs12(TableRow, { children: [
|
1440
|
+
/* @__PURE__ */ jsx22(TableHeader, { style: { width: "5rem" }, children: "Index" }),
|
1441
|
+
/* @__PURE__ */ jsx22(TableHeader, { children: "Value" })
|
1426
1442
|
] }) }),
|
1427
|
-
/* @__PURE__ */
|
1428
|
-
/* @__PURE__ */
|
1429
|
-
/* @__PURE__ */
|
1443
|
+
/* @__PURE__ */ jsx22(TableBody, { children: Array.isArray(data) && data?.map((value, index) => /* @__PURE__ */ jsxs12(TableRow, { children: [
|
1444
|
+
/* @__PURE__ */ jsx22(TableCell, { children: /* @__PURE__ */ jsx22(Text, { mono: true, children: index }) }),
|
1445
|
+
/* @__PURE__ */ jsx22(TableCell, { children: /* @__PURE__ */ jsx22(ValueRenderer, { json: value }) })
|
1430
1446
|
] }, index)) })
|
1431
1447
|
] });
|
1432
1448
|
}
|
1433
1449
|
|
1434
1450
|
// src/inspector/viewer/page.tsx
|
1435
|
-
import { Fragment as
|
1451
|
+
import { Fragment as Fragment9, jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
1436
1452
|
var BasePageContainer = React5.forwardRef(
|
1437
|
-
({ isTopLevel, ...rest }, ref) => /* @__PURE__ */
|
1453
|
+
({ isTopLevel, ...rest }, ref) => /* @__PURE__ */ jsx23("div", { ref, ...rest })
|
1438
1454
|
);
|
1439
1455
|
var PageContainer = styled14(BasePageContainer)`
|
1440
1456
|
position: absolute;
|
@@ -1486,7 +1502,7 @@ function View(props) {
|
|
1486
1502
|
const { node, onNavigate } = props;
|
1487
1503
|
if (!snapshot || snapshot === "unavailable") return;
|
1488
1504
|
if (type === "costream") {
|
1489
|
-
return /* @__PURE__ */
|
1505
|
+
return /* @__PURE__ */ jsx23(
|
1490
1506
|
CoStreamView,
|
1491
1507
|
{
|
1492
1508
|
data: snapshot,
|
@@ -1497,15 +1513,18 @@ function View(props) {
|
|
1497
1513
|
);
|
1498
1514
|
}
|
1499
1515
|
if (extendedType === "group") {
|
1500
|
-
return /* @__PURE__ */
|
1516
|
+
return /* @__PURE__ */ jsx23(GroupView, { data: snapshot, node, onNavigate });
|
1501
1517
|
}
|
1502
1518
|
if (extendedType === "account") {
|
1503
|
-
return /* @__PURE__ */
|
1519
|
+
return /* @__PURE__ */ jsx23(AccountView, { data: snapshot, node, onNavigate });
|
1520
|
+
}
|
1521
|
+
if (type === "coplaintext") {
|
1522
|
+
return /* @__PURE__ */ jsx23(CoPlainTextView, { data: snapshot });
|
1504
1523
|
}
|
1505
1524
|
if (type === "colist" || extendedType === "record") {
|
1506
|
-
return /* @__PURE__ */
|
1525
|
+
return /* @__PURE__ */ jsx23(TableView, { data: snapshot, node, onNavigate });
|
1507
1526
|
}
|
1508
|
-
return /* @__PURE__ */
|
1527
|
+
return /* @__PURE__ */ jsx23(GridView, { data: snapshot, onNavigate, node });
|
1509
1528
|
}
|
1510
1529
|
function Page(props) {
|
1511
1530
|
const {
|
@@ -1521,13 +1540,13 @@ function Page(props) {
|
|
1521
1540
|
const coValue = useResolvedCoValue(coId, node);
|
1522
1541
|
const { value, snapshot, type, extendedType } = coValue;
|
1523
1542
|
if (snapshot === "unavailable") {
|
1524
|
-
return /* @__PURE__ */
|
1543
|
+
return /* @__PURE__ */ jsx23("div", { style, children: "Data unavailable" });
|
1525
1544
|
}
|
1526
1545
|
if (!snapshot) {
|
1527
|
-
return /* @__PURE__ */
|
1546
|
+
return /* @__PURE__ */ jsx23("div", { style });
|
1528
1547
|
}
|
1529
|
-
return /* @__PURE__ */
|
1530
|
-
!isTopLevel && /* @__PURE__ */
|
1548
|
+
return /* @__PURE__ */ jsxs13(PageContainer, { style, className, isTopLevel, children: [
|
1549
|
+
!isTopLevel && /* @__PURE__ */ jsx23(
|
1531
1550
|
BackButton,
|
1532
1551
|
{
|
1533
1552
|
"aria-label": "Back",
|
@@ -1537,27 +1556,27 @@ function Page(props) {
|
|
1537
1556
|
"aria-hidden": "true"
|
1538
1557
|
}
|
1539
1558
|
),
|
1540
|
-
/* @__PURE__ */
|
1541
|
-
/* @__PURE__ */
|
1559
|
+
/* @__PURE__ */ jsx23(HeaderContainer, { children: /* @__PURE__ */ jsxs13(TitleContainer, { children: [
|
1560
|
+
/* @__PURE__ */ jsx23(Title, { children: /* @__PURE__ */ jsxs13("span", { children: [
|
1542
1561
|
name,
|
1543
|
-
typeof snapshot === "object" && "name" in snapshot ? /* @__PURE__ */
|
1562
|
+
typeof snapshot === "object" && "name" in snapshot ? /* @__PURE__ */ jsxs13("span", { style: { color: "#57534e", fontWeight: 500 }, children: [
|
1544
1563
|
" ",
|
1545
1564
|
snapshot.name
|
1546
1565
|
] }) : null
|
1547
1566
|
] }) }),
|
1548
|
-
/* @__PURE__ */
|
1549
|
-
/* @__PURE__ */
|
1550
|
-
/* @__PURE__ */
|
1567
|
+
/* @__PURE__ */ jsxs13(BadgeContainer, { children: [
|
1568
|
+
/* @__PURE__ */ jsx23(Badge, { children: type && /* @__PURE__ */ jsx23(TypeIcon, { type, extendedType }) }),
|
1569
|
+
/* @__PURE__ */ jsx23(Badge, { children: coId })
|
1551
1570
|
] })
|
1552
1571
|
] }) }),
|
1553
|
-
/* @__PURE__ */
|
1554
|
-
/* @__PURE__ */
|
1555
|
-
extendedType !== "account" && extendedType !== "group" && /* @__PURE__ */
|
1556
|
-
/* @__PURE__ */
|
1557
|
-
/* @__PURE__ */
|
1572
|
+
/* @__PURE__ */ jsxs13(ContentContainer, { children: [
|
1573
|
+
/* @__PURE__ */ jsx23(View, { ...props, coValue }),
|
1574
|
+
extendedType !== "account" && extendedType !== "group" && /* @__PURE__ */ jsxs13(Fragment9, { children: [
|
1575
|
+
/* @__PURE__ */ jsx23(RoleDisplay, { node, value }),
|
1576
|
+
/* @__PURE__ */ jsxs13(Text, { muted: true, children: [
|
1558
1577
|
"Owned by",
|
1559
1578
|
" ",
|
1560
|
-
/* @__PURE__ */
|
1579
|
+
/* @__PURE__ */ jsx23(
|
1561
1580
|
AccountOrGroupText,
|
1562
1581
|
{
|
1563
1582
|
coId: value.group.id,
|
@@ -1575,7 +1594,7 @@ function Page(props) {
|
|
1575
1594
|
}
|
1576
1595
|
|
1577
1596
|
// src/inspector/viewer/page-stack.tsx
|
1578
|
-
import { Fragment as
|
1597
|
+
import { Fragment as Fragment10, jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
1579
1598
|
var PageStackContainer = styled15("div")`
|
1580
1599
|
position: relative;
|
1581
1600
|
padding: 0 0.75rem;
|
@@ -1593,9 +1612,9 @@ function PageStack({
|
|
1593
1612
|
}) {
|
1594
1613
|
const page = path[path.length - 1];
|
1595
1614
|
const index = path.length - 1;
|
1596
|
-
return /* @__PURE__ */
|
1615
|
+
return /* @__PURE__ */ jsx24(Fragment10, { children: /* @__PURE__ */ jsxs14(PageStackContainer, { children: [
|
1597
1616
|
children,
|
1598
|
-
node && page && /* @__PURE__ */
|
1617
|
+
node && page && /* @__PURE__ */ jsx24(
|
1599
1618
|
Page,
|
1600
1619
|
{
|
1601
1620
|
coId: page.coId,
|
@@ -1742,7 +1761,7 @@ var GlobalStyles = styled16("div")`
|
|
1742
1761
|
|
1743
1762
|
// src/inspector/viewer/inpsector-button.tsx
|
1744
1763
|
import { styled as styled17 } from "goober";
|
1745
|
-
import { jsx as
|
1764
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
1746
1765
|
var StyledInspectorButton = styled17("button")`
|
1747
1766
|
position: fixed;
|
1748
1767
|
width: 2.5rem;
|
@@ -1785,8 +1804,8 @@ function InspectorButton({
|
|
1785
1804
|
position = "right",
|
1786
1805
|
...buttonProps
|
1787
1806
|
}) {
|
1788
|
-
return /* @__PURE__ */
|
1789
|
-
/* @__PURE__ */
|
1807
|
+
return /* @__PURE__ */ jsxs15(StyledInspectorButton, { position, ...buttonProps, children: [
|
1808
|
+
/* @__PURE__ */ jsx25(
|
1790
1809
|
JazzIcon,
|
1791
1810
|
{
|
1792
1811
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -1794,7 +1813,7 @@ function InspectorButton({
|
|
1794
1813
|
height: "115",
|
1795
1814
|
viewBox: "0 0 119 115",
|
1796
1815
|
fill: "none",
|
1797
|
-
children: /* @__PURE__ */
|
1816
|
+
children: /* @__PURE__ */ jsx25(
|
1798
1817
|
"path",
|
1799
1818
|
{
|
1800
1819
|
fillRule: "evenodd",
|
@@ -1805,7 +1824,7 @@ function InspectorButton({
|
|
1805
1824
|
)
|
1806
1825
|
}
|
1807
1826
|
),
|
1808
|
-
/* @__PURE__ */
|
1827
|
+
/* @__PURE__ */ jsx25(
|
1809
1828
|
"span",
|
1810
1829
|
{
|
1811
1830
|
style: {
|
@@ -1840,7 +1859,7 @@ function useOpenInspector() {
|
|
1840
1859
|
}
|
1841
1860
|
|
1842
1861
|
// src/inspector/viewer/new-app.tsx
|
1843
|
-
import { Fragment as
|
1862
|
+
import { Fragment as Fragment11, jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
1844
1863
|
var InspectorContainer = styled18("div")`
|
1845
1864
|
position: fixed;
|
1846
1865
|
height: 50vh;
|
@@ -1888,7 +1907,7 @@ function JazzInspector({ position = "right" }) {
|
|
1888
1907
|
const localNode = context.node;
|
1889
1908
|
const me = "me" in context ? context.me : void 0;
|
1890
1909
|
if (process.env.NODE_ENV !== "development") return null;
|
1891
|
-
return /* @__PURE__ */
|
1910
|
+
return /* @__PURE__ */ jsx26(
|
1892
1911
|
JazzInspectorInternal,
|
1893
1912
|
{
|
1894
1913
|
position,
|
@@ -1913,12 +1932,12 @@ function JazzInspectorInternal({
|
|
1913
1932
|
setCoValueId("");
|
1914
1933
|
};
|
1915
1934
|
if (!open) {
|
1916
|
-
return /* @__PURE__ */
|
1935
|
+
return /* @__PURE__ */ jsx26(InspectorButton, { position, onClick: () => setOpen(true) });
|
1917
1936
|
}
|
1918
|
-
return /* @__PURE__ */
|
1919
|
-
/* @__PURE__ */
|
1920
|
-
/* @__PURE__ */
|
1921
|
-
/* @__PURE__ */
|
1937
|
+
return /* @__PURE__ */ jsxs16(InspectorContainer, { as: GlobalStyles, style: { zIndex: 999 }, children: [
|
1938
|
+
/* @__PURE__ */ jsxs16(HeaderContainer2, { children: [
|
1939
|
+
/* @__PURE__ */ jsx26(Breadcrumbs, { path, onBreadcrumbClick: goToIndex }),
|
1940
|
+
/* @__PURE__ */ jsx26(Form, { onSubmit: handleCoValueIdSubmit, children: path.length !== 0 && /* @__PURE__ */ jsx26(
|
1922
1941
|
Input,
|
1923
1942
|
{
|
1924
1943
|
label: "CoValue ID",
|
@@ -1929,23 +1948,23 @@ function JazzInspectorInternal({
|
|
1929
1948
|
onChange: (e) => setCoValueId(e.target.value)
|
1930
1949
|
}
|
1931
1950
|
) }),
|
1932
|
-
/* @__PURE__ */
|
1951
|
+
/* @__PURE__ */ jsx26(Button, { variant: "plain", type: "button", onClick: () => setOpen(false), children: "Close" })
|
1933
1952
|
] }),
|
1934
|
-
/* @__PURE__ */
|
1953
|
+
/* @__PURE__ */ jsx26(
|
1935
1954
|
PageStack,
|
1936
1955
|
{
|
1937
1956
|
path,
|
1938
1957
|
node: localNode,
|
1939
1958
|
goBack,
|
1940
1959
|
addPages,
|
1941
|
-
children: path.length <= 0 && /* @__PURE__ */
|
1960
|
+
children: path.length <= 0 && /* @__PURE__ */ jsxs16(
|
1942
1961
|
InitialForm,
|
1943
1962
|
{
|
1944
1963
|
onSubmit: handleCoValueIdSubmit,
|
1945
1964
|
"aria-hidden": path.length !== 0,
|
1946
1965
|
children: [
|
1947
|
-
/* @__PURE__ */
|
1948
|
-
/* @__PURE__ */
|
1966
|
+
/* @__PURE__ */ jsx26(Heading, { children: "Jazz CoValue Inspector" }),
|
1967
|
+
/* @__PURE__ */ jsx26(
|
1949
1968
|
Input,
|
1950
1969
|
{
|
1951
1970
|
label: "CoValue ID",
|
@@ -1956,10 +1975,10 @@ function JazzInspectorInternal({
|
|
1956
1975
|
onChange: (e) => setCoValueId(e.target.value)
|
1957
1976
|
}
|
1958
1977
|
),
|
1959
|
-
/* @__PURE__ */
|
1960
|
-
accountId && /* @__PURE__ */
|
1961
|
-
/* @__PURE__ */
|
1962
|
-
/* @__PURE__ */
|
1978
|
+
/* @__PURE__ */ jsx26(Button, { type: "submit", variant: "primary", children: "Inspect CoValue" }),
|
1979
|
+
accountId && /* @__PURE__ */ jsxs16(Fragment11, { children: [
|
1980
|
+
/* @__PURE__ */ jsx26(OrText, { children: "or" }),
|
1981
|
+
/* @__PURE__ */ jsx26(
|
1963
1982
|
Button,
|
1964
1983
|
{
|
1965
1984
|
variant: "secondary",
|
@@ -1982,7 +2001,7 @@ function JazzInspectorInternal({
|
|
1982
2001
|
// src/inspector/ui/select.tsx
|
1983
2002
|
import { styled as styled19 } from "goober";
|
1984
2003
|
import { useId as useId2 } from "react";
|
1985
|
-
import { jsx as
|
2004
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
1986
2005
|
var SelectContainer = styled19("div")`
|
1987
2006
|
display: grid;
|
1988
2007
|
gap: 0.25rem;
|
@@ -2024,11 +2043,11 @@ function Select(props) {
|
|
2024
2043
|
const { label, hideLabel, id: customId, className, ...selectProps } = props;
|
2025
2044
|
const generatedId = useId2();
|
2026
2045
|
const id = customId || generatedId;
|
2027
|
-
return /* @__PURE__ */
|
2028
|
-
/* @__PURE__ */
|
2029
|
-
/* @__PURE__ */
|
2030
|
-
/* @__PURE__ */
|
2031
|
-
/* @__PURE__ */
|
2046
|
+
return /* @__PURE__ */ jsxs17(SelectContainer, { className, children: [
|
2047
|
+
/* @__PURE__ */ jsx27("label", { htmlFor: id, className: hideLabel ? "j-sr-only" : "", children: label }),
|
2048
|
+
/* @__PURE__ */ jsxs17(SelectWrapper, { children: [
|
2049
|
+
/* @__PURE__ */ jsx27(StyledSelect, { ...selectProps, id, children: props.children }),
|
2050
|
+
/* @__PURE__ */ jsx27(SelectIcon, { children: /* @__PURE__ */ jsx27(Icon, { name: "chevronDown", size: "sm" }) })
|
2032
2051
|
] })
|
2033
2052
|
] });
|
2034
2053
|
}
|