dsh-codex-subscription 3.2.7 → 3.2.8
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/README.de.md +4 -4
- package/README.en.md +4 -4
- package/README.es.md +4 -4
- package/README.fr.md +4 -4
- package/README.ja.md +4 -4
- package/README.md +4 -4
- package/README.pt.md +4 -4
- package/README.ru.md +4 -4
- package/README.zh-CN.md +4 -4
- package/lib/client.image-viewer.js +397 -222
- package/lib/client.js +1166 -136
- package/lib/index.js +905 -447
- package/package.json +1 -3
|
@@ -29,22 +29,312 @@ window.__ModuleLoader__.load({
|
|
|
29
29
|
//#endregion
|
|
30
30
|
let react = require("react");
|
|
31
31
|
react = __toESM(react, 1);
|
|
32
|
-
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
33
|
-
_deepseek_ai_dsh_client_ui_primitives = __toESM(_deepseek_ai_dsh_client_ui_primitives, 1);
|
|
34
|
-
let react_dom = require("react-dom");
|
|
35
32
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
let react_dom = require("react-dom");
|
|
34
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js
|
|
35
|
+
function ArrowDownTrayIcon({ title, titleId, ...props }, svgRef) {
|
|
36
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
37
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
38
|
+
fill: "none",
|
|
39
|
+
viewBox: "0 0 24 24",
|
|
40
|
+
strokeWidth: 1.5,
|
|
41
|
+
stroke: "currentColor",
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
"data-slot": "icon",
|
|
44
|
+
ref: svgRef,
|
|
45
|
+
"aria-labelledby": titleId
|
|
46
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
47
|
+
strokeLinecap: "round",
|
|
48
|
+
strokeLinejoin: "round",
|
|
49
|
+
d: "M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
const ForwardRef$13 = /*#__PURE__*/ react.forwardRef(ArrowDownTrayIcon);
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ArrowsPointingOutIcon.js
|
|
55
|
+
function ArrowsPointingOutIcon({ title, titleId, ...props }, svgRef) {
|
|
56
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
57
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
58
|
+
fill: "none",
|
|
59
|
+
viewBox: "0 0 24 24",
|
|
60
|
+
strokeWidth: 1.5,
|
|
61
|
+
stroke: "currentColor",
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
"data-slot": "icon",
|
|
64
|
+
ref: svgRef,
|
|
65
|
+
"aria-labelledby": titleId
|
|
66
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
67
|
+
strokeLinecap: "round",
|
|
68
|
+
strokeLinejoin: "round",
|
|
69
|
+
d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
const ForwardRef$12 = /*#__PURE__*/ react.forwardRef(ArrowsPointingOutIcon);
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftEllipsisIcon.js
|
|
75
|
+
function ChatBubbleLeftEllipsisIcon({ title, titleId, ...props }, svgRef) {
|
|
76
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
77
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
78
|
+
fill: "none",
|
|
79
|
+
viewBox: "0 0 24 24",
|
|
80
|
+
strokeWidth: 1.5,
|
|
81
|
+
stroke: "currentColor",
|
|
82
|
+
"aria-hidden": "true",
|
|
83
|
+
"data-slot": "icon",
|
|
84
|
+
ref: svgRef,
|
|
85
|
+
"aria-labelledby": titleId
|
|
86
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
87
|
+
strokeLinecap: "round",
|
|
88
|
+
strokeLinejoin: "round",
|
|
89
|
+
d: "M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
const ForwardRef$11 = /*#__PURE__*/ react.forwardRef(ChatBubbleLeftEllipsisIcon);
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/CheckIcon.js
|
|
95
|
+
function CheckIcon({ title, titleId, ...props }, svgRef) {
|
|
96
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
97
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
98
|
+
fill: "none",
|
|
99
|
+
viewBox: "0 0 24 24",
|
|
100
|
+
strokeWidth: 1.5,
|
|
101
|
+
stroke: "currentColor",
|
|
102
|
+
"aria-hidden": "true",
|
|
103
|
+
"data-slot": "icon",
|
|
104
|
+
ref: svgRef,
|
|
105
|
+
"aria-labelledby": titleId
|
|
106
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
107
|
+
strokeLinecap: "round",
|
|
108
|
+
strokeLinejoin: "round",
|
|
109
|
+
d: "m4.5 12.75 6 6 9-13.5"
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
112
|
+
const ForwardRef$10 = /*#__PURE__*/ react.forwardRef(CheckIcon);
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ChevronLeftIcon.js
|
|
115
|
+
function ChevronLeftIcon({ title, titleId, ...props }, svgRef) {
|
|
116
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
117
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
118
|
+
fill: "none",
|
|
119
|
+
viewBox: "0 0 24 24",
|
|
120
|
+
strokeWidth: 1.5,
|
|
121
|
+
stroke: "currentColor",
|
|
122
|
+
"aria-hidden": "true",
|
|
123
|
+
"data-slot": "icon",
|
|
124
|
+
ref: svgRef,
|
|
125
|
+
"aria-labelledby": titleId
|
|
126
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
127
|
+
strokeLinecap: "round",
|
|
128
|
+
strokeLinejoin: "round",
|
|
129
|
+
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
130
|
+
}));
|
|
131
|
+
}
|
|
132
|
+
const ForwardRef$8 = /*#__PURE__*/ react.forwardRef(ChevronLeftIcon);
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ChevronRightIcon.js
|
|
135
|
+
function ChevronRightIcon({ title, titleId, ...props }, svgRef) {
|
|
136
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
137
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
138
|
+
fill: "none",
|
|
139
|
+
viewBox: "0 0 24 24",
|
|
140
|
+
strokeWidth: 1.5,
|
|
141
|
+
stroke: "currentColor",
|
|
142
|
+
"aria-hidden": "true",
|
|
143
|
+
"data-slot": "icon",
|
|
144
|
+
ref: svgRef,
|
|
145
|
+
"aria-labelledby": titleId
|
|
146
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
147
|
+
strokeLinecap: "round",
|
|
148
|
+
strokeLinejoin: "round",
|
|
149
|
+
d: "m8.25 4.5 7.5 7.5-7.5 7.5"
|
|
150
|
+
}));
|
|
151
|
+
}
|
|
152
|
+
const ForwardRef$7 = /*#__PURE__*/ react.forwardRef(ChevronRightIcon);
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/DocumentDuplicateIcon.js
|
|
155
|
+
function DocumentDuplicateIcon({ title, titleId, ...props }, svgRef) {
|
|
156
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
157
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
158
|
+
fill: "none",
|
|
159
|
+
viewBox: "0 0 24 24",
|
|
160
|
+
strokeWidth: 1.5,
|
|
161
|
+
stroke: "currentColor",
|
|
162
|
+
"aria-hidden": "true",
|
|
163
|
+
"data-slot": "icon",
|
|
164
|
+
ref: svgRef,
|
|
165
|
+
"aria-labelledby": titleId
|
|
166
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
167
|
+
strokeLinecap: "round",
|
|
168
|
+
strokeLinejoin: "round",
|
|
169
|
+
d: "M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"
|
|
170
|
+
}));
|
|
171
|
+
}
|
|
172
|
+
const ForwardRef$6 = /*#__PURE__*/ react.forwardRef(DocumentDuplicateIcon);
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/EllipsisHorizontalIcon.js
|
|
175
|
+
function EllipsisHorizontalIcon({ title, titleId, ...props }, svgRef) {
|
|
176
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
177
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
178
|
+
fill: "none",
|
|
179
|
+
viewBox: "0 0 24 24",
|
|
180
|
+
strokeWidth: 1.5,
|
|
181
|
+
stroke: "currentColor",
|
|
182
|
+
"aria-hidden": "true",
|
|
183
|
+
"data-slot": "icon",
|
|
184
|
+
ref: svgRef,
|
|
185
|
+
"aria-labelledby": titleId
|
|
186
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
187
|
+
strokeLinecap: "round",
|
|
188
|
+
strokeLinejoin: "round",
|
|
189
|
+
d: "M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
const ForwardRef$5 = /*#__PURE__*/ react.forwardRef(EllipsisHorizontalIcon);
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/PaintBrushIcon.js
|
|
195
|
+
function PaintBrushIcon({ title, titleId, ...props }, svgRef) {
|
|
196
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
197
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
198
|
+
fill: "none",
|
|
199
|
+
viewBox: "0 0 24 24",
|
|
200
|
+
strokeWidth: 1.5,
|
|
201
|
+
stroke: "currentColor",
|
|
202
|
+
"aria-hidden": "true",
|
|
203
|
+
"data-slot": "icon",
|
|
204
|
+
ref: svgRef,
|
|
205
|
+
"aria-labelledby": titleId
|
|
206
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
207
|
+
strokeLinecap: "round",
|
|
208
|
+
strokeLinejoin: "round",
|
|
209
|
+
d: "M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42"
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
const ForwardRef$4 = /*#__PURE__*/ react.forwardRef(PaintBrushIcon);
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/PencilSquareIcon.js
|
|
215
|
+
function PencilSquareIcon({ title, titleId, ...props }, svgRef) {
|
|
216
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
217
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
218
|
+
fill: "none",
|
|
219
|
+
viewBox: "0 0 24 24",
|
|
220
|
+
strokeWidth: 1.5,
|
|
221
|
+
stroke: "currentColor",
|
|
222
|
+
"aria-hidden": "true",
|
|
223
|
+
"data-slot": "icon",
|
|
224
|
+
ref: svgRef,
|
|
225
|
+
"aria-labelledby": titleId
|
|
226
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
227
|
+
strokeLinecap: "round",
|
|
228
|
+
strokeLinejoin: "round",
|
|
229
|
+
d: "m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
232
|
+
const ForwardRef$3 = /*#__PURE__*/ react.forwardRef(PencilSquareIcon);
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/PencilIcon.js
|
|
235
|
+
function PencilIcon({ title, titleId, ...props }, svgRef) {
|
|
236
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
237
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
238
|
+
fill: "none",
|
|
239
|
+
viewBox: "0 0 24 24",
|
|
240
|
+
strokeWidth: 1.5,
|
|
241
|
+
stroke: "currentColor",
|
|
242
|
+
"aria-hidden": "true",
|
|
243
|
+
"data-slot": "icon",
|
|
244
|
+
ref: svgRef,
|
|
245
|
+
"aria-labelledby": titleId
|
|
246
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
247
|
+
strokeLinecap: "round",
|
|
248
|
+
strokeLinejoin: "round",
|
|
249
|
+
d: "m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"
|
|
250
|
+
}));
|
|
251
|
+
}
|
|
252
|
+
const ForwardRef$2 = /*#__PURE__*/ react.forwardRef(PencilIcon);
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ScissorsIcon.js
|
|
255
|
+
function ScissorsIcon({ title, titleId, ...props }, svgRef) {
|
|
256
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
257
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
258
|
+
fill: "none",
|
|
259
|
+
viewBox: "0 0 24 24",
|
|
260
|
+
strokeWidth: 1.5,
|
|
261
|
+
stroke: "currentColor",
|
|
262
|
+
"aria-hidden": "true",
|
|
263
|
+
"data-slot": "icon",
|
|
264
|
+
ref: svgRef,
|
|
265
|
+
"aria-labelledby": titleId
|
|
266
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
267
|
+
strokeLinecap: "round",
|
|
268
|
+
strokeLinejoin: "round",
|
|
269
|
+
d: "m7.848 8.25 1.536.887M7.848 8.25a3 3 0 1 1-5.196-3 3 3 0 0 1 5.196 3Zm1.536.887a2.165 2.165 0 0 1 1.083 1.839c.005.351.054.695.14 1.024M9.384 9.137l2.077 1.199M7.848 15.75l1.536-.887m-1.536.887a3 3 0 1 1-5.196 3 3 3 0 0 1 5.196-3Zm1.536-.887a2.165 2.165 0 0 0 1.083-1.838c.005-.352.054-.695.14-1.025m-1.223 2.863 2.077-1.199m0-3.328a4.323 4.323 0 0 1 2.068-1.379l5.325-1.628a4.5 4.5 0 0 1 2.48-.044l.803.215-7.794 4.5m-2.882-1.664A4.33 4.33 0 0 0 10.607 12m3.736 0 7.794 4.5-.802.215a4.5 4.5 0 0 1-2.48-.043l-5.326-1.629a4.324 4.324 0 0 1-2.068-1.379M14.343 12l-2.882 1.664"
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
272
|
+
const ForwardRef$1 = /*#__PURE__*/ react.forwardRef(ScissorsIcon);
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/XMarkIcon.js
|
|
275
|
+
function XMarkIcon({ title, titleId, ...props }, svgRef) {
|
|
276
|
+
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
277
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
278
|
+
fill: "none",
|
|
279
|
+
viewBox: "0 0 24 24",
|
|
280
|
+
strokeWidth: 1.5,
|
|
281
|
+
stroke: "currentColor",
|
|
282
|
+
"aria-hidden": "true",
|
|
283
|
+
"data-slot": "icon",
|
|
284
|
+
ref: svgRef,
|
|
285
|
+
"aria-labelledby": titleId
|
|
286
|
+
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
287
|
+
strokeLinecap: "round",
|
|
288
|
+
strokeLinejoin: "round",
|
|
289
|
+
d: "M6 18 18 6M6 6l12 12"
|
|
290
|
+
}));
|
|
291
|
+
}
|
|
292
|
+
const ForwardRef = /*#__PURE__*/ react.forwardRef(XMarkIcon);
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/client-primitives.jsx
|
|
295
|
+
const classes = (...names) => names.filter(Boolean).join(" ");
|
|
296
|
+
const icon = (Icon, size) => function ControlIcon() {
|
|
297
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
298
|
+
width: size,
|
|
299
|
+
height: size,
|
|
300
|
+
"aria-hidden": "true"
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
const IconCheckOutline16 = icon(ForwardRef$10, 16);
|
|
304
|
+
const IconChevronLeftOutline14 = icon(ForwardRef$8, 14);
|
|
305
|
+
const IconChevronRightOutline14 = icon(ForwardRef$7, 14);
|
|
306
|
+
const IconCloseOutline16 = icon(ForwardRef, 16);
|
|
307
|
+
const IconCopyOutline16 = icon(ForwardRef$6, 16);
|
|
308
|
+
const IconDownloadOutline16 = icon(ForwardRef$13, 16);
|
|
309
|
+
const IconEditOutline16 = icon(ForwardRef$3, 16);
|
|
310
|
+
(0, react.forwardRef)(function Button({ variant = "ghost", size = "md", icon, className, children, ...props }, ref) {
|
|
311
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
312
|
+
ref,
|
|
313
|
+
type: "button",
|
|
314
|
+
className: classes("dcsButton", className),
|
|
315
|
+
"data-variant": variant,
|
|
316
|
+
"data-size": size,
|
|
317
|
+
...props,
|
|
318
|
+
children: [icon == null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
319
|
+
className: "dcsButtonIcon",
|
|
320
|
+
children: icon
|
|
321
|
+
}), children]
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
(0, react.forwardRef)(function Input({ className, ...props }, ref) {
|
|
325
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
326
|
+
className: classes("dcsInput", className),
|
|
327
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
328
|
+
ref,
|
|
329
|
+
...props
|
|
330
|
+
})
|
|
331
|
+
});
|
|
332
|
+
});
|
|
44
333
|
//#endregion
|
|
45
334
|
//#region src/subscription-image-viewer-styles.js
|
|
46
335
|
const SUBSCRIPTION_IMAGE_VIEWER_CSS = String.raw`
|
|
47
|
-
.dcsiv-root{position:fixed;inset:var(--dsh-frame-chrome-top,0px) 0 0;
|
|
336
|
+
.dcsiv-root{position:fixed;inset:var(--dsh-frame-chrome-top,0px) 0 0;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;pointer-events:auto;overflow:hidden;overscroll-behavior:none;background:color-mix(in srgb,#101116 94%,var(--dsw-alias-bg-mask-1,#101116));color:var(--dsw-alias-label-primary-inverted,#fff);outline:0}
|
|
337
|
+
.dcsiv-root::backdrop{background:none;touch-action:none}
|
|
48
338
|
.dcsiv-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
|
|
49
339
|
.dcsiv-topbar{position:absolute;right:50%;bottom:max(22px,env(safe-area-inset-bottom));z-index:6;max-width:calc(100vw - 36px);padding:5px;border:1px solid rgba(255,255,255,.12);border-radius:999px;background:#242529;box-shadow:0 6px 18px #0004;transform:translateX(50%)}
|
|
50
340
|
.dcsiv-actions{display:flex;align-items:center;gap:2px;overflow-x:auto;scrollbar-width:none}.dcsiv-actions::-webkit-scrollbar{display:none}.dcsiv-button,.dcsiv-download{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 10px;border:0;border-radius:999px;background:transparent;color:rgba(255,255,255,.9);font:inherit;font-size:12px;text-decoration:none;white-space:nowrap;cursor:pointer}.dcsiv-button:hover,.dcsiv-download:hover,.dcsiv-button[data-active=true]{background:rgba(255,255,255,.12)}.dcsiv-button:focus-visible,.dcsiv-download:focus-visible,.dcsiv-close-floating:focus-visible{outline:2px solid rgba(255,255,255,.9);outline-offset:2px}.dcsiv-button:disabled,.dcsiv-download:disabled{opacity:.38;cursor:default}.dcsiv-zoom{min-width:44px;color:rgba(255,255,255,.68);font-size:12px;font-variant-numeric:tabular-nums;text-align:center}
|
|
@@ -338,132 +628,13 @@ window.__ModuleLoader__.load({
|
|
|
338
628
|
};
|
|
339
629
|
}
|
|
340
630
|
//#endregion
|
|
341
|
-
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ArrowsPointingOutIcon.js
|
|
342
|
-
function ArrowsPointingOutIcon({ title, titleId, ...props }, svgRef) {
|
|
343
|
-
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
344
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
345
|
-
fill: "none",
|
|
346
|
-
viewBox: "0 0 24 24",
|
|
347
|
-
strokeWidth: 1.5,
|
|
348
|
-
stroke: "currentColor",
|
|
349
|
-
"aria-hidden": "true",
|
|
350
|
-
"data-slot": "icon",
|
|
351
|
-
ref: svgRef,
|
|
352
|
-
"aria-labelledby": titleId
|
|
353
|
-
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
354
|
-
strokeLinecap: "round",
|
|
355
|
-
strokeLinejoin: "round",
|
|
356
|
-
d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
|
|
357
|
-
}));
|
|
358
|
-
}
|
|
359
|
-
const ForwardRef$5 = /*#__PURE__*/ react.forwardRef(ArrowsPointingOutIcon);
|
|
360
|
-
//#endregion
|
|
361
|
-
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftEllipsisIcon.js
|
|
362
|
-
function ChatBubbleLeftEllipsisIcon({ title, titleId, ...props }, svgRef) {
|
|
363
|
-
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
364
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
365
|
-
fill: "none",
|
|
366
|
-
viewBox: "0 0 24 24",
|
|
367
|
-
strokeWidth: 1.5,
|
|
368
|
-
stroke: "currentColor",
|
|
369
|
-
"aria-hidden": "true",
|
|
370
|
-
"data-slot": "icon",
|
|
371
|
-
ref: svgRef,
|
|
372
|
-
"aria-labelledby": titleId
|
|
373
|
-
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
374
|
-
strokeLinecap: "round",
|
|
375
|
-
strokeLinejoin: "round",
|
|
376
|
-
d: "M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"
|
|
377
|
-
}));
|
|
378
|
-
}
|
|
379
|
-
const ForwardRef$4 = /*#__PURE__*/ react.forwardRef(ChatBubbleLeftEllipsisIcon);
|
|
380
|
-
//#endregion
|
|
381
|
-
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/EllipsisHorizontalIcon.js
|
|
382
|
-
function EllipsisHorizontalIcon({ title, titleId, ...props }, svgRef) {
|
|
383
|
-
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
384
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
385
|
-
fill: "none",
|
|
386
|
-
viewBox: "0 0 24 24",
|
|
387
|
-
strokeWidth: 1.5,
|
|
388
|
-
stroke: "currentColor",
|
|
389
|
-
"aria-hidden": "true",
|
|
390
|
-
"data-slot": "icon",
|
|
391
|
-
ref: svgRef,
|
|
392
|
-
"aria-labelledby": titleId
|
|
393
|
-
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
394
|
-
strokeLinecap: "round",
|
|
395
|
-
strokeLinejoin: "round",
|
|
396
|
-
d: "M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"
|
|
397
|
-
}));
|
|
398
|
-
}
|
|
399
|
-
const ForwardRef$3 = /*#__PURE__*/ react.forwardRef(EllipsisHorizontalIcon);
|
|
400
|
-
//#endregion
|
|
401
|
-
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/PaintBrushIcon.js
|
|
402
|
-
function PaintBrushIcon({ title, titleId, ...props }, svgRef) {
|
|
403
|
-
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
404
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
405
|
-
fill: "none",
|
|
406
|
-
viewBox: "0 0 24 24",
|
|
407
|
-
strokeWidth: 1.5,
|
|
408
|
-
stroke: "currentColor",
|
|
409
|
-
"aria-hidden": "true",
|
|
410
|
-
"data-slot": "icon",
|
|
411
|
-
ref: svgRef,
|
|
412
|
-
"aria-labelledby": titleId
|
|
413
|
-
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
414
|
-
strokeLinecap: "round",
|
|
415
|
-
strokeLinejoin: "round",
|
|
416
|
-
d: "M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42"
|
|
417
|
-
}));
|
|
418
|
-
}
|
|
419
|
-
const ForwardRef$2 = /*#__PURE__*/ react.forwardRef(PaintBrushIcon);
|
|
420
|
-
//#endregion
|
|
421
|
-
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/PencilIcon.js
|
|
422
|
-
function PencilIcon({ title, titleId, ...props }, svgRef) {
|
|
423
|
-
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
424
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
425
|
-
fill: "none",
|
|
426
|
-
viewBox: "0 0 24 24",
|
|
427
|
-
strokeWidth: 1.5,
|
|
428
|
-
stroke: "currentColor",
|
|
429
|
-
"aria-hidden": "true",
|
|
430
|
-
"data-slot": "icon",
|
|
431
|
-
ref: svgRef,
|
|
432
|
-
"aria-labelledby": titleId
|
|
433
|
-
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
434
|
-
strokeLinecap: "round",
|
|
435
|
-
strokeLinejoin: "round",
|
|
436
|
-
d: "m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"
|
|
437
|
-
}));
|
|
438
|
-
}
|
|
439
|
-
const ForwardRef$1 = /*#__PURE__*/ react.forwardRef(PencilIcon);
|
|
440
|
-
//#endregion
|
|
441
|
-
//#region node_modules/.pnpm/@heroicons+react@2.2.0_react@18.3.1/node_modules/@heroicons/react/24/outline/esm/ScissorsIcon.js
|
|
442
|
-
function ScissorsIcon({ title, titleId, ...props }, svgRef) {
|
|
443
|
-
return /*#__PURE__*/ react.createElement("svg", Object.assign({
|
|
444
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
445
|
-
fill: "none",
|
|
446
|
-
viewBox: "0 0 24 24",
|
|
447
|
-
strokeWidth: 1.5,
|
|
448
|
-
stroke: "currentColor",
|
|
449
|
-
"aria-hidden": "true",
|
|
450
|
-
"data-slot": "icon",
|
|
451
|
-
ref: svgRef,
|
|
452
|
-
"aria-labelledby": titleId
|
|
453
|
-
}, props), title ? /*#__PURE__*/ react.createElement("title", { id: titleId }, title) : null, /*#__PURE__*/ react.createElement("path", {
|
|
454
|
-
strokeLinecap: "round",
|
|
455
|
-
strokeLinejoin: "round",
|
|
456
|
-
d: "m7.848 8.25 1.536.887M7.848 8.25a3 3 0 1 1-5.196-3 3 3 0 0 1 5.196 3Zm1.536.887a2.165 2.165 0 0 1 1.083 1.839c.005.351.054.695.14 1.024M9.384 9.137l2.077 1.199M7.848 15.75l1.536-.887m-1.536.887a3 3 0 1 1-5.196 3 3 3 0 0 1 5.196-3Zm1.536-.887a2.165 2.165 0 0 0 1.083-1.838c.005-.352.054-.695.14-1.025m-1.223 2.863 2.077-1.199m0-3.328a4.323 4.323 0 0 1 2.068-1.379l5.325-1.628a4.5 4.5 0 0 1 2.48-.044l.803.215-7.794 4.5m-2.882-1.664A4.33 4.33 0 0 0 10.607 12m3.736 0 7.794 4.5-.802.215a4.5 4.5 0 0 1-2.48-.043l-5.326-1.629a4.324 4.324 0 0 1-2.068-1.379M14.343 12l-2.882 1.664"
|
|
457
|
-
}));
|
|
458
|
-
}
|
|
459
|
-
//#endregion
|
|
460
631
|
//#region src/subscription-image-viewer.jsx
|
|
461
632
|
const TOOL_ICONS = {
|
|
462
|
-
"remove-background":
|
|
463
|
-
erase: ForwardRef$
|
|
464
|
-
resize: ForwardRef$
|
|
465
|
-
sketch: ForwardRef$
|
|
466
|
-
annotate: ForwardRef$
|
|
633
|
+
"remove-background": ForwardRef$1,
|
|
634
|
+
erase: ForwardRef$4,
|
|
635
|
+
resize: ForwardRef$12,
|
|
636
|
+
sketch: ForwardRef$2,
|
|
637
|
+
annotate: ForwardRef$11
|
|
467
638
|
};
|
|
468
639
|
const ToolIcon = ({ id }) => {
|
|
469
640
|
const Icon = TOOL_ICONS[id];
|
|
@@ -757,6 +928,8 @@ window.__ModuleLoader__.load({
|
|
|
757
928
|
const drawingRef = (0, react.useRef)(false);
|
|
758
929
|
const maskRef = (0, react.useRef)(null);
|
|
759
930
|
const rootRef = (0, react.useRef)(null);
|
|
931
|
+
const openerRef = (0, react.useRef)();
|
|
932
|
+
if (request) openerRef.current = request.opener;
|
|
760
933
|
annotationsByImageRef.current = annotationsByImage;
|
|
761
934
|
(0, react.useEffect)(() => {
|
|
762
935
|
if (request === void 0) return;
|
|
@@ -813,92 +986,93 @@ window.__ModuleLoader__.load({
|
|
|
813
986
|
finishDraft();
|
|
814
987
|
service.close();
|
|
815
988
|
};
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
989
|
+
const open = request !== void 0;
|
|
990
|
+
(0, react.useLayoutEffect)(() => {
|
|
991
|
+
if (!open) return;
|
|
992
|
+
const dialog = rootRef.current;
|
|
993
|
+
dialog.showModal();
|
|
994
|
+
return () => {
|
|
995
|
+
dialog.close();
|
|
996
|
+
const document = dialog.ownerDocument;
|
|
997
|
+
const selector = "dialog:modal, [role=\"dialog\"][aria-modal=\"true\"]";
|
|
998
|
+
if (document.activeElement?.closest(selector)) return;
|
|
999
|
+
const other = Array.from(document.querySelectorAll(selector)).reverse().find((element) => element !== dialog && element.getClientRects().length > 0 && !element.closest("[inert]"));
|
|
1000
|
+
const opener = openerRef.current;
|
|
1001
|
+
const target = other && !other.contains(opener) ? other.querySelector("[data-modal-autofocus]") ?? other : opener;
|
|
1002
|
+
if (target?.isConnected) target.focus({ preventScroll: true });
|
|
1003
|
+
};
|
|
1004
|
+
}, [open]);
|
|
1005
|
+
const consumeKey = (event) => {
|
|
1006
|
+
event.preventDefault();
|
|
1007
|
+
event.stopPropagation();
|
|
1008
|
+
};
|
|
1009
|
+
const dismiss = (event) => {
|
|
1010
|
+
consumeKey(event);
|
|
1011
|
+
if (event.repeat) return;
|
|
1012
|
+
if (eraseRef.current.erasing !== void 0) {
|
|
1013
|
+
if (!eraseRef.current.sending) {
|
|
1014
|
+
setErasing(void 0);
|
|
1015
|
+
setStrokes([]);
|
|
843
1016
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
if (rootRef.current.contains(event.target) && event.target.closest?.(".dcsiv-inline-note")) {
|
|
1020
|
+
draftRef.current = void 0;
|
|
1021
|
+
setSelected(void 0);
|
|
1022
|
+
setDraft(void 0);
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
if (annotating) {
|
|
1026
|
+
finishDraft();
|
|
1027
|
+
setAnnotating(false);
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
closeViewer();
|
|
1031
|
+
};
|
|
1032
|
+
const onKeyDown = (event) => {
|
|
1033
|
+
if (event.defaultPrevented || event.nativeEvent.isComposing) return;
|
|
1034
|
+
if (event.key === "Escape") {
|
|
1035
|
+
dismiss(event);
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
if (event.key === "Tab") {
|
|
1039
|
+
event.stopPropagation();
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
if (eraseRef.current.erasing !== void 0) {
|
|
1043
|
+
const key = event.key.toLowerCase();
|
|
1044
|
+
if ((event.ctrlKey || event.metaKey) && key === "z") {
|
|
1045
|
+
consumeKey(event);
|
|
1046
|
+
if (!eraseRef.current.sending) setStrokes((current) => current.slice(0, -1));
|
|
857
1047
|
return;
|
|
858
1048
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
event.
|
|
862
|
-
|
|
863
|
-
} else if (!editing && event.key === "ArrowRight" && request.items.length > 1) {
|
|
864
|
-
event.preventDefault();
|
|
865
|
-
move(1);
|
|
866
|
-
} else if (!editing && (event.key === "+" || event.key === "=")) {
|
|
867
|
-
event.preventDefault();
|
|
868
|
-
const box = stageRef.current?.getBoundingClientRect();
|
|
869
|
-
if (box) setZoomAt(transformRef.current.zoom * 1.2, box.left + box.width / 2, box.top + box.height / 2);
|
|
870
|
-
} else if (!editing && event.key === "-") {
|
|
871
|
-
event.preventDefault();
|
|
872
|
-
const box = stageRef.current?.getBoundingClientRect();
|
|
873
|
-
if (box) setZoomAt(transformRef.current.zoom / 1.2, box.left + box.width / 2, box.top + box.height / 2);
|
|
874
|
-
} else if (!editing && event.key.toLowerCase() === "f") {
|
|
875
|
-
event.preventDefault();
|
|
876
|
-
fit();
|
|
877
|
-
} else if (event.key === "Tab") {
|
|
878
|
-
const controls = [...rootRef.current.querySelectorAll("button:not(:disabled),a[href],input:not(:disabled),textarea:not(:disabled),[tabindex]:not([tabindex=\"-1\"])")].filter((control) => control.getClientRects().length > 0);
|
|
879
|
-
const first = controls[0];
|
|
880
|
-
const last = controls.at(-1);
|
|
881
|
-
if (event.shiftKey && document.activeElement === first) {
|
|
882
|
-
event.preventDefault();
|
|
883
|
-
last?.focus();
|
|
884
|
-
} else if (!event.shiftKey && document.activeElement === last) {
|
|
885
|
-
event.preventDefault();
|
|
886
|
-
first?.focus();
|
|
887
|
-
}
|
|
1049
|
+
if (event.key === "[" || event.key === "]") {
|
|
1050
|
+
consumeKey(event);
|
|
1051
|
+
setBrush((value) => Math.round(clamp(value + (event.key === "]" ? .01 : -.01), .01, .15) * 100) / 100);
|
|
1052
|
+
return;
|
|
888
1053
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
1054
|
+
if (event.key === "ArrowLeft" || event.key === "ArrowRight") return;
|
|
1055
|
+
}
|
|
1056
|
+
const editing = event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement;
|
|
1057
|
+
if (!editing && event.key === "ArrowLeft" && request.items.length > 1) {
|
|
1058
|
+
consumeKey(event);
|
|
1059
|
+
move(-1);
|
|
1060
|
+
} else if (!editing && event.key === "ArrowRight" && request.items.length > 1) {
|
|
1061
|
+
consumeKey(event);
|
|
1062
|
+
move(1);
|
|
1063
|
+
} else if (!editing && (event.key === "+" || event.key === "=")) {
|
|
1064
|
+
consumeKey(event);
|
|
1065
|
+
const box = stageRef.current?.getBoundingClientRect();
|
|
1066
|
+
if (box) setZoomAt(transformRef.current.zoom * 1.2, box.left + box.width / 2, box.top + box.height / 2);
|
|
1067
|
+
} else if (!editing && event.key === "-") {
|
|
1068
|
+
consumeKey(event);
|
|
1069
|
+
const box = stageRef.current?.getBoundingClientRect();
|
|
1070
|
+
if (box) setZoomAt(transformRef.current.zoom / 1.2, box.left + box.width / 2, box.top + box.height / 2);
|
|
1071
|
+
} else if (!editing && event.key.toLowerCase() === "f") {
|
|
1072
|
+
consumeKey(event);
|
|
1073
|
+
fit();
|
|
1074
|
+
}
|
|
1075
|
+
};
|
|
902
1076
|
(0, react.useEffect)(() => {
|
|
903
1077
|
if (focusNote === void 0) return;
|
|
904
1078
|
(rootRef.current?.querySelector(`[data-note-id="${CSS.escape(focusNote)}"] textarea`))?.focus();
|
|
@@ -1102,13 +1276,14 @@ window.__ModuleLoader__.load({
|
|
|
1102
1276
|
visibility: geometry.width > 0 ? "visible" : "hidden"
|
|
1103
1277
|
};
|
|
1104
1278
|
};
|
|
1105
|
-
return
|
|
1279
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dialog", {
|
|
1106
1280
|
ref: rootRef,
|
|
1107
1281
|
className: "dcsiv-root",
|
|
1108
1282
|
role: "dialog",
|
|
1109
1283
|
"aria-modal": "true",
|
|
1110
1284
|
"aria-label": t("imagePreview"),
|
|
1111
|
-
|
|
1285
|
+
onKeyDown,
|
|
1286
|
+
onCancel: dismiss,
|
|
1112
1287
|
children: [
|
|
1113
1288
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1114
1289
|
className: "dcsiv-title dcsiv-sr-only",
|
|
@@ -1192,7 +1367,7 @@ window.__ModuleLoader__.load({
|
|
|
1192
1367
|
primaryActions.map((action) => renderAction(action)),
|
|
1193
1368
|
showMore ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ViewerMenu, {
|
|
1194
1369
|
label: t("imageMore"),
|
|
1195
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ForwardRef$
|
|
1370
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ForwardRef$5, {
|
|
1196
1371
|
className: "dcsiv-tool-icon",
|
|
1197
1372
|
"aria-hidden": "true"
|
|
1198
1373
|
}),
|
|
@@ -1413,7 +1588,7 @@ window.__ModuleLoader__.load({
|
|
|
1413
1588
|
]
|
|
1414
1589
|
})
|
|
1415
1590
|
]
|
|
1416
|
-
})
|
|
1591
|
+
});
|
|
1417
1592
|
}
|
|
1418
1593
|
//#endregion
|
|
1419
1594
|
exports.SUBSCRIPTION_IMAGE_VIEWER_CSS = SUBSCRIPTION_IMAGE_VIEWER_CSS;
|