jazz-tools 0.18.21 → 0.18.22
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 +56 -54
- package/CHANGELOG.md +11 -0
- package/dist/inspector/{custom-element-G6SPZEBR.js → custom-element-XDJT5T57.js} +277 -206
- package/dist/inspector/custom-element-XDJT5T57.js.map +1 -0
- package/dist/inspector/index.js +282 -211
- package/dist/inspector/index.js.map +1 -1
- package/dist/inspector/register-custom-element.js +1 -1
- package/dist/inspector/ui/icon.d.ts +2 -0
- package/dist/inspector/ui/icon.d.ts.map +1 -1
- package/dist/inspector/ui/icons/caution.d.ts +2 -0
- package/dist/inspector/ui/icons/caution.d.ts.map +1 -0
- package/dist/inspector/viewer/table-viewer.d.ts.map +1 -1
- package/dist/worker/napi-crypto.d.ts +2 -0
- package/dist/worker/napi-crypto.d.ts.map +1 -0
- package/dist/worker/napi-crypto.js +3 -0
- package/dist/worker/napi-crypto.js.map +1 -0
- package/package.json +9 -4
- package/src/inspector/ui/icon.tsx +2 -0
- package/src/inspector/ui/icons/caution.tsx +18 -0
- package/src/inspector/viewer/table-viewer.tsx +79 -21
- package/src/worker/napi-crypto.ts +1 -0
- package/tsup.config.ts +1 -0
- package/dist/inspector/custom-element-G6SPZEBR.js.map +0 -1
@@ -1,7 +1,9 @@
|
|
1
|
+
import { CautionIcon } from "./icons/caution.js";
|
1
2
|
import { ChevronDownIcon } from "./icons/chevron-down-icon.js";
|
2
3
|
import { DeleteIcon } from "./icons/delete-icon.js";
|
3
4
|
import { LinkIcon } from "./icons/link-icon.js";
|
4
5
|
declare const icons: {
|
6
|
+
caution: typeof CautionIcon;
|
5
7
|
chevronDown: typeof ChevronDownIcon;
|
6
8
|
delete: typeof DeleteIcon;
|
7
9
|
link: typeof LinkIcon;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/inspector/ui/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,QAAA,MAAM,KAAK
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/inspector/ui/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,QAAA,MAAM,KAAK;;;;;CAKV,CAAC;AAGF,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;CAeV,CAAC;AAmBF,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,IAAW,EACX,SAAS,EACT,GAAG,QAAQ,EACZ,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;CAC3B,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,2CAiBhC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"caution.d.ts","sourceRoot":"","sources":["../../../../src/inspector/ui/icons/caution.tsx"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,2CAiB/D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"table-viewer.d.ts","sourceRoot":"","sources":["../../../src/inspector/viewer/table-viewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAc,MAAM,QAAQ,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAIzC,OAAO,EAAE,QAAQ,EAAU,MAAM,YAAY,CAAC;
|
1
|
+
{"version":3,"file":"table-viewer.d.ts","sourceRoot":"","sources":["../../../src/inspector/viewer/table-viewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAc,MAAM,QAAQ,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAIzC,OAAO,EAAE,QAAQ,EAAU,MAAM,YAAY,CAAC;AA0M9C,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,2CAiDA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"napi-crypto.d.ts","sourceRoot":"","sources":["../../src/worker/napi-crypto.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/worker/napi-crypto.ts"],"sourcesContent":["export * from \"cojson/crypto/NapiCrypto\";\n"],"mappings":";AAAA,cAAc;","names":[]}
|
package/package.json
CHANGED
@@ -178,11 +178,16 @@
|
|
178
178
|
"@jazz-tools/source": "./src/worker/edge-wasm.ts",
|
179
179
|
"types": "./dist/worker/edge-wasm.d.ts",
|
180
180
|
"default": "./dist/worker/edge-wasm.js"
|
181
|
+
},
|
182
|
+
"./workers/napi-crypto": {
|
183
|
+
"@jazz-tools/source": "./src/worker/napi-crypto.ts",
|
184
|
+
"types": "./dist/worker/napi-crypto.d.ts",
|
185
|
+
"default": "./dist/worker/napi-crypto.js"
|
181
186
|
}
|
182
187
|
},
|
183
188
|
"type": "module",
|
184
189
|
"license": "MIT",
|
185
|
-
"version": "0.18.
|
190
|
+
"version": "0.18.22",
|
186
191
|
"dependencies": {
|
187
192
|
"@manuscripts/prosemirror-recreate-steps": "^0.1.4",
|
188
193
|
"@scure/base": "1.2.1",
|
@@ -199,9 +204,9 @@
|
|
199
204
|
"prosemirror-transform": "^1.9.0",
|
200
205
|
"use-sync-external-store": "^1.5.0",
|
201
206
|
"zod": "4.1.11",
|
202
|
-
"cojson": "0.18.
|
203
|
-
"cojson-
|
204
|
-
"cojson-
|
207
|
+
"cojson": "0.18.22",
|
208
|
+
"cojson-transport-ws": "0.18.22",
|
209
|
+
"cojson-storage-indexeddb": "0.18.22"
|
205
210
|
},
|
206
211
|
"devDependencies": {
|
207
212
|
"@scure/bip39": "^1.3.0",
|
@@ -1,8 +1,10 @@
|
|
1
|
+
import { CautionIcon } from "./icons/caution.js";
|
1
2
|
import { ChevronDownIcon } from "./icons/chevron-down-icon.js";
|
2
3
|
import { DeleteIcon } from "./icons/delete-icon.js";
|
3
4
|
import { LinkIcon } from "./icons/link-icon.js";
|
4
5
|
|
5
6
|
const icons = {
|
7
|
+
caution: CautionIcon,
|
6
8
|
chevronDown: ChevronDownIcon,
|
7
9
|
delete: DeleteIcon,
|
8
10
|
link: LinkIcon,
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export function CautionIcon(props: React.SVGProps<SVGSVGElement>) {
|
2
|
+
return (
|
3
|
+
<svg
|
4
|
+
{...props}
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
6
|
+
width="24"
|
7
|
+
height="24"
|
8
|
+
viewBox="0 0 24 24"
|
9
|
+
fill="none"
|
10
|
+
stroke="currentColor"
|
11
|
+
strokeLinejoin="round"
|
12
|
+
>
|
13
|
+
<circle cx="12" cy="12" r="12" fill="currentColor" />
|
14
|
+
<rect x="10.5" y="6" width="3" height="7.5" rx="1.5" fill="#fff" />
|
15
|
+
<rect x="10.5" y="16.5" width="3" height="3" rx="1.5" fill="#fff" />
|
16
|
+
</svg>
|
17
|
+
);
|
18
|
+
}
|
@@ -16,6 +16,7 @@ import {
|
|
16
16
|
TableRow,
|
17
17
|
} from "../ui/table.js";
|
18
18
|
import { Text } from "../ui/text.js";
|
19
|
+
import { Icon } from "../ui/icon.js";
|
19
20
|
|
20
21
|
const PaginationContainer = styled("div")`
|
21
22
|
padding: 1rem 0;
|
@@ -25,6 +26,38 @@ const PaginationContainer = styled("div")`
|
|
25
26
|
gap: 0.5rem;
|
26
27
|
`;
|
27
28
|
|
29
|
+
const RedTooltip = styled("span")`
|
30
|
+
position:relative; /* making the .tooltip span a container for the tooltip text */
|
31
|
+
border-bottom:1px dashed #000; /* little indicater to indicate it's hoverable */
|
32
|
+
|
33
|
+
&:before {
|
34
|
+
content: attr(data-text);
|
35
|
+
background-color: red;
|
36
|
+
position:absolute;
|
37
|
+
|
38
|
+
/* vertically center */
|
39
|
+
top:50%;
|
40
|
+
transform:translateY(-50%);
|
41
|
+
|
42
|
+
/* move to right */
|
43
|
+
left:100%;
|
44
|
+
margin-left:15px; /* and add a small left margin */
|
45
|
+
|
46
|
+
/* basic styles */
|
47
|
+
width:200px;
|
48
|
+
padding:10px;
|
49
|
+
border-radius:10px;
|
50
|
+
color: #fff;
|
51
|
+
text-align:center;
|
52
|
+
|
53
|
+
display:none; /* hide by default */
|
54
|
+
}
|
55
|
+
|
56
|
+
&:hover:before {
|
57
|
+
display:block;
|
58
|
+
}
|
59
|
+
`;
|
60
|
+
|
28
61
|
function CoValuesTableView({
|
29
62
|
data,
|
30
63
|
node,
|
@@ -61,7 +94,11 @@ function CoValuesTableView({
|
|
61
94
|
}
|
62
95
|
|
63
96
|
const keys = Array.from(
|
64
|
-
new Set(
|
97
|
+
new Set(
|
98
|
+
resolvedRows
|
99
|
+
.filter((item) => item.snapshot !== "unavailable")
|
100
|
+
.flatMap((item) => Object.keys(item.snapshot || {})),
|
101
|
+
),
|
65
102
|
);
|
66
103
|
|
67
104
|
const loadMore = () => {
|
@@ -73,7 +110,7 @@ function CoValuesTableView({
|
|
73
110
|
<Table>
|
74
111
|
<TableHead>
|
75
112
|
<TableRow>
|
76
|
-
{[...keys, "Action"].map((key) => (
|
113
|
+
{["ID", ...keys, "Action"].map((key) => (
|
77
114
|
<TableHeader key={key}>{key}</TableHeader>
|
78
115
|
))}
|
79
116
|
{onRemove && <TableHeader></TableHeader>}
|
@@ -82,27 +119,48 @@ function CoValuesTableView({
|
|
82
119
|
<TableBody>
|
83
120
|
{resolvedRows.slice(0, visibleRowsCount).map((item, index) => (
|
84
121
|
<TableRow key={index}>
|
122
|
+
<TableCell>
|
123
|
+
<Text mono>
|
124
|
+
{item.snapshot === "unavailable" ? (
|
125
|
+
<RedTooltip data-text="Unavailable">
|
126
|
+
<Icon
|
127
|
+
name="caution"
|
128
|
+
color="red"
|
129
|
+
style={{
|
130
|
+
display: "inline-block",
|
131
|
+
marginRight: "0.5rem",
|
132
|
+
}}
|
133
|
+
/>
|
134
|
+
{visibleRows[index]}
|
135
|
+
</RedTooltip>
|
136
|
+
) : (
|
137
|
+
visibleRows[index]
|
138
|
+
)}
|
139
|
+
</Text>
|
140
|
+
</TableCell>
|
85
141
|
{keys.map((key) => (
|
86
142
|
<TableCell key={key}>
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
143
|
+
{item.snapshot !== "unavailable" && (
|
144
|
+
<ValueRenderer
|
145
|
+
json={item.snapshot[key]}
|
146
|
+
onCoIDClick={(coId) => {
|
147
|
+
async function handleClick() {
|
148
|
+
onNavigate([
|
149
|
+
{
|
150
|
+
coId: item.value!.id,
|
151
|
+
name: index.toString(),
|
152
|
+
},
|
153
|
+
{
|
154
|
+
coId: coId,
|
155
|
+
name: key,
|
156
|
+
},
|
157
|
+
]);
|
158
|
+
}
|
159
|
+
|
160
|
+
handleClick();
|
161
|
+
}}
|
162
|
+
/>
|
163
|
+
)}
|
106
164
|
</TableCell>
|
107
165
|
))}
|
108
166
|
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "cojson/crypto/NapiCrypto";
|