@ixo/editor 2.11.0 → 2.12.0
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.
|
@@ -16776,8 +16776,8 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
16776
16776
|
}
|
|
16777
16777
|
|
|
16778
16778
|
// src/mantine/components/CoverImage.tsx
|
|
16779
|
-
import
|
|
16780
|
-
import { Box as Box29,
|
|
16779
|
+
import React166, { useState as useState61, useRef as useRef11, useEffect as useEffect45 } from "react";
|
|
16780
|
+
import { Box as Box29, Group as Group51 } from "@mantine/core";
|
|
16781
16781
|
|
|
16782
16782
|
// src/core/lib/imageTransform.ts
|
|
16783
16783
|
var CLOUDFLARE_CDN_BASE = "https://www.ixo.earth/cdn-cgi/image";
|
|
@@ -16909,6 +16909,30 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
|
|
|
16909
16909
|
return transformImage(sourceUrl, options);
|
|
16910
16910
|
}
|
|
16911
16911
|
|
|
16912
|
+
// src/mantine/components/Base/CoverImageButton.tsx
|
|
16913
|
+
import React165 from "react";
|
|
16914
|
+
import { Button as Button32 } from "@mantine/core";
|
|
16915
|
+
function CoverImageButton({ isActive = false, children, onClick, style }) {
|
|
16916
|
+
return /* @__PURE__ */ React165.createElement(
|
|
16917
|
+
Button32,
|
|
16918
|
+
{
|
|
16919
|
+
onClick,
|
|
16920
|
+
variant: "filled",
|
|
16921
|
+
size: "xs",
|
|
16922
|
+
style: {
|
|
16923
|
+
backgroundColor: isActive ? "rgba(55, 53, 47, 0.9)" : "rgba(255, 255, 255, 0.9)",
|
|
16924
|
+
color: isActive ? "white" : "#37352f",
|
|
16925
|
+
fontSize: "12px",
|
|
16926
|
+
fontWeight: 500,
|
|
16927
|
+
padding: "4px 8px",
|
|
16928
|
+
height: "auto",
|
|
16929
|
+
...style
|
|
16930
|
+
}
|
|
16931
|
+
},
|
|
16932
|
+
children
|
|
16933
|
+
);
|
|
16934
|
+
}
|
|
16935
|
+
|
|
16912
16936
|
// src/mantine/components/CoverImage.tsx
|
|
16913
16937
|
function CoverImage({ coverImageUrl, logoUrl }) {
|
|
16914
16938
|
const { editor, handlers, editable } = useBlocknoteContext();
|
|
@@ -17009,7 +17033,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17009
17033
|
return null;
|
|
17010
17034
|
}
|
|
17011
17035
|
if (!hasCover) {
|
|
17012
|
-
return /* @__PURE__ */
|
|
17036
|
+
return /* @__PURE__ */ React166.createElement(
|
|
17013
17037
|
Box29,
|
|
17014
17038
|
{
|
|
17015
17039
|
style: {
|
|
@@ -17022,7 +17046,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17022
17046
|
onMouseEnter: () => editable && setIsHovering(true),
|
|
17023
17047
|
onMouseLeave: () => editable && setIsHovering(false)
|
|
17024
17048
|
},
|
|
17025
|
-
/* @__PURE__ */
|
|
17049
|
+
/* @__PURE__ */ React166.createElement("div", { style: { maxWidth: "900px", margin: "0 auto", position: "relative", height: "100%" } }, /* @__PURE__ */ React166.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }), /* @__PURE__ */ React166.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") }), editable && isHovering && !logoSrc && /* @__PURE__ */ React166.createElement(
|
|
17026
17050
|
Group51,
|
|
17027
17051
|
{
|
|
17028
17052
|
gap: "xs",
|
|
@@ -17033,45 +17057,12 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17033
17057
|
zIndex: 10
|
|
17034
17058
|
}
|
|
17035
17059
|
},
|
|
17036
|
-
/* @__PURE__ */
|
|
17037
|
-
|
|
17038
|
-
|
|
17039
|
-
variant: "filled",
|
|
17040
|
-
size: "xs",
|
|
17041
|
-
onClick: handleAddLogo,
|
|
17042
|
-
style: {
|
|
17043
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
17044
|
-
color: "#37352f",
|
|
17045
|
-
fontSize: "12px",
|
|
17046
|
-
fontWeight: 500,
|
|
17047
|
-
padding: "4px 8px",
|
|
17048
|
-
height: "auto"
|
|
17049
|
-
}
|
|
17050
|
-
},
|
|
17051
|
-
"Add icon"
|
|
17052
|
-
),
|
|
17053
|
-
/* @__PURE__ */ React165.createElement(
|
|
17054
|
-
Button32,
|
|
17055
|
-
{
|
|
17056
|
-
variant: "filled",
|
|
17057
|
-
size: "xs",
|
|
17058
|
-
onClick: handleAddCover,
|
|
17059
|
-
style: {
|
|
17060
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
17061
|
-
color: "#37352f",
|
|
17062
|
-
fontSize: "12px",
|
|
17063
|
-
fontWeight: 500,
|
|
17064
|
-
padding: "4px 8px",
|
|
17065
|
-
height: "auto"
|
|
17066
|
-
}
|
|
17067
|
-
},
|
|
17068
|
-
"Add cover"
|
|
17069
|
-
)
|
|
17070
|
-
), logoSrc && /* @__PURE__ */ React165.createElement(
|
|
17060
|
+
/* @__PURE__ */ React166.createElement(CoverImageButton, { onClick: handleAddLogo }, "Add icon"),
|
|
17061
|
+
/* @__PURE__ */ React166.createElement(CoverImageButton, { onClick: handleAddCover }, "Add cover")
|
|
17062
|
+
), logoSrc && /* @__PURE__ */ React166.createElement(
|
|
17071
17063
|
Box29,
|
|
17072
17064
|
{
|
|
17073
17065
|
style: {
|
|
17074
|
-
borderRadius: "100%",
|
|
17075
17066
|
position: "relative",
|
|
17076
17067
|
insetInlineStart: "0",
|
|
17077
17068
|
width: "120px",
|
|
@@ -17082,7 +17073,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17082
17073
|
zIndex: 11
|
|
17083
17074
|
}
|
|
17084
17075
|
},
|
|
17085
|
-
/* @__PURE__ */
|
|
17076
|
+
/* @__PURE__ */ React166.createElement(
|
|
17086
17077
|
"img",
|
|
17087
17078
|
{
|
|
17088
17079
|
src: logoSrc,
|
|
@@ -17090,12 +17081,13 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17090
17081
|
style: {
|
|
17091
17082
|
width: "100%",
|
|
17092
17083
|
height: "100%",
|
|
17084
|
+
borderRadius: "100%",
|
|
17093
17085
|
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
|
|
17094
17086
|
objectFit: "cover"
|
|
17095
17087
|
}
|
|
17096
17088
|
}
|
|
17097
17089
|
),
|
|
17098
|
-
editable && isHovering && /* @__PURE__ */
|
|
17090
|
+
editable && isHovering && /* @__PURE__ */ React166.createElement(
|
|
17099
17091
|
"div",
|
|
17100
17092
|
{
|
|
17101
17093
|
style: {
|
|
@@ -17110,62 +17102,14 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17110
17102
|
alignItems: "center"
|
|
17111
17103
|
}
|
|
17112
17104
|
},
|
|
17113
|
-
/* @__PURE__ */
|
|
17114
|
-
|
|
17115
|
-
|
|
17116
|
-
variant: "filled",
|
|
17117
|
-
size: "xs",
|
|
17118
|
-
onClick: handleChangeLogo,
|
|
17119
|
-
style: {
|
|
17120
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
17121
|
-
color: "#37352f",
|
|
17122
|
-
fontSize: "12px",
|
|
17123
|
-
fontWeight: 500,
|
|
17124
|
-
padding: "4px 8px",
|
|
17125
|
-
height: "auto"
|
|
17126
|
-
}
|
|
17127
|
-
},
|
|
17128
|
-
"Change"
|
|
17129
|
-
),
|
|
17130
|
-
/* @__PURE__ */ React165.createElement(
|
|
17131
|
-
Button32,
|
|
17132
|
-
{
|
|
17133
|
-
variant: "filled",
|
|
17134
|
-
size: "xs",
|
|
17135
|
-
onClick: handleRemoveLogo,
|
|
17136
|
-
style: {
|
|
17137
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
17138
|
-
color: "#37352f",
|
|
17139
|
-
fontSize: "12px",
|
|
17140
|
-
fontWeight: 500,
|
|
17141
|
-
padding: "4px 8px",
|
|
17142
|
-
height: "auto"
|
|
17143
|
-
}
|
|
17144
|
-
},
|
|
17145
|
-
"Remove"
|
|
17146
|
-
),
|
|
17147
|
-
/* @__PURE__ */ React165.createElement(
|
|
17148
|
-
Button32,
|
|
17149
|
-
{
|
|
17150
|
-
variant: "filled",
|
|
17151
|
-
size: "xs",
|
|
17152
|
-
onClick: handleAddCover,
|
|
17153
|
-
style: {
|
|
17154
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
17155
|
-
color: "#37352f",
|
|
17156
|
-
fontSize: "12px",
|
|
17157
|
-
fontWeight: 500,
|
|
17158
|
-
padding: "4px 8px",
|
|
17159
|
-
height: "auto"
|
|
17160
|
-
}
|
|
17161
|
-
},
|
|
17162
|
-
"Add cover"
|
|
17163
|
-
)
|
|
17105
|
+
/* @__PURE__ */ React166.createElement(CoverImageButton, { onClick: handleChangeLogo }, "Change"),
|
|
17106
|
+
/* @__PURE__ */ React166.createElement(CoverImageButton, { onClick: handleRemoveLogo }, "Remove"),
|
|
17107
|
+
/* @__PURE__ */ React166.createElement(CoverImageButton, { onClick: handleAddCover }, "Add cover")
|
|
17164
17108
|
)
|
|
17165
17109
|
))
|
|
17166
17110
|
);
|
|
17167
17111
|
}
|
|
17168
|
-
return /* @__PURE__ */
|
|
17112
|
+
return /* @__PURE__ */ React166.createElement(
|
|
17169
17113
|
Box29,
|
|
17170
17114
|
{
|
|
17171
17115
|
style: {
|
|
@@ -17186,7 +17130,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17186
17130
|
onMouseMove: handleMouseMove,
|
|
17187
17131
|
onClick: () => isRepositioning && setIsRepositioning(false)
|
|
17188
17132
|
},
|
|
17189
|
-
/* @__PURE__ */
|
|
17133
|
+
/* @__PURE__ */ React166.createElement(
|
|
17190
17134
|
"img",
|
|
17191
17135
|
{
|
|
17192
17136
|
src: coverUrl,
|
|
@@ -17204,7 +17148,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17204
17148
|
}
|
|
17205
17149
|
}
|
|
17206
17150
|
),
|
|
17207
|
-
editable && isHovering && /* @__PURE__ */
|
|
17151
|
+
editable && isHovering && /* @__PURE__ */ React166.createElement(
|
|
17208
17152
|
Group51,
|
|
17209
17153
|
{
|
|
17210
17154
|
gap: "xs",
|
|
@@ -17215,59 +17159,11 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17215
17159
|
zIndex: 10
|
|
17216
17160
|
}
|
|
17217
17161
|
},
|
|
17218
|
-
/* @__PURE__ */
|
|
17219
|
-
|
|
17220
|
-
|
|
17221
|
-
variant: "filled",
|
|
17222
|
-
size: "xs",
|
|
17223
|
-
onClick: handleChangeCover,
|
|
17224
|
-
style: {
|
|
17225
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
17226
|
-
color: "#37352f",
|
|
17227
|
-
fontSize: "12px",
|
|
17228
|
-
fontWeight: 500,
|
|
17229
|
-
padding: "4px 8px",
|
|
17230
|
-
height: "auto"
|
|
17231
|
-
}
|
|
17232
|
-
},
|
|
17233
|
-
"Change cover"
|
|
17234
|
-
),
|
|
17235
|
-
/* @__PURE__ */ React165.createElement(
|
|
17236
|
-
Button32,
|
|
17237
|
-
{
|
|
17238
|
-
variant: "filled",
|
|
17239
|
-
size: "xs",
|
|
17240
|
-
onClick: handleReposition,
|
|
17241
|
-
style: {
|
|
17242
|
-
backgroundColor: isRepositioning ? "rgba(55, 53, 47, 0.9)" : "rgba(255, 255, 255, 0.9)",
|
|
17243
|
-
color: isRepositioning ? "white" : "#37352f",
|
|
17244
|
-
fontSize: "12px",
|
|
17245
|
-
fontWeight: 500,
|
|
17246
|
-
padding: "4px 8px",
|
|
17247
|
-
height: "auto"
|
|
17248
|
-
}
|
|
17249
|
-
},
|
|
17250
|
-
isRepositioning ? "Done" : "Reposition"
|
|
17251
|
-
),
|
|
17252
|
-
/* @__PURE__ */ React165.createElement(
|
|
17253
|
-
Button32,
|
|
17254
|
-
{
|
|
17255
|
-
variant: "filled",
|
|
17256
|
-
size: "xs",
|
|
17257
|
-
onClick: handleRemoveCover,
|
|
17258
|
-
style: {
|
|
17259
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
17260
|
-
color: "#37352f",
|
|
17261
|
-
fontSize: "12px",
|
|
17262
|
-
fontWeight: 500,
|
|
17263
|
-
padding: "4px 8px",
|
|
17264
|
-
height: "auto"
|
|
17265
|
-
}
|
|
17266
|
-
},
|
|
17267
|
-
"Remove"
|
|
17268
|
-
)
|
|
17162
|
+
/* @__PURE__ */ React166.createElement(CoverImageButton, { onClick: handleChangeCover }, "Change cover"),
|
|
17163
|
+
/* @__PURE__ */ React166.createElement(CoverImageButton, { onClick: handleReposition, isActive: isRepositioning }, isRepositioning ? "Done" : "Reposition"),
|
|
17164
|
+
/* @__PURE__ */ React166.createElement(CoverImageButton, { onClick: handleRemoveCover }, "Remove")
|
|
17269
17165
|
),
|
|
17270
|
-
/* @__PURE__ */
|
|
17166
|
+
/* @__PURE__ */ React166.createElement("div", { style: { maxWidth: "900px", margin: "0 auto", position: "absolute", bottom: 0, left: -40, right: 0, height: "70px" } }, /* @__PURE__ */ React166.createElement(
|
|
17271
17167
|
Box29,
|
|
17272
17168
|
{
|
|
17273
17169
|
style: {
|
|
@@ -17276,17 +17172,16 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17276
17172
|
insetInlineStart: "0",
|
|
17277
17173
|
width: "120px",
|
|
17278
17174
|
height: "120px",
|
|
17279
|
-
zIndex: 11
|
|
17280
|
-
padding: 12,
|
|
17281
|
-
borderRadius: "100%"
|
|
17175
|
+
zIndex: 11
|
|
17282
17176
|
}
|
|
17283
17177
|
},
|
|
17284
|
-
logoSrc && /* @__PURE__ */
|
|
17178
|
+
logoSrc && /* @__PURE__ */ React166.createElement(
|
|
17285
17179
|
"img",
|
|
17286
17180
|
{
|
|
17287
17181
|
src: logoSrc,
|
|
17288
17182
|
alt: "Logo",
|
|
17289
17183
|
style: {
|
|
17184
|
+
borderRadius: "100%",
|
|
17290
17185
|
width: "100%",
|
|
17291
17186
|
height: "100%",
|
|
17292
17187
|
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
|
|
@@ -17294,9 +17189,9 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17294
17189
|
}
|
|
17295
17190
|
}
|
|
17296
17191
|
),
|
|
17297
|
-
editable && isHovering && /* @__PURE__ */
|
|
17192
|
+
editable && isHovering && /* @__PURE__ */ React166.createElement(React166.Fragment, null, logoSrc ? (
|
|
17298
17193
|
// Logo exists: Show Change/Remove buttons when hovering on cover
|
|
17299
|
-
/* @__PURE__ */
|
|
17194
|
+
/* @__PURE__ */ React166.createElement(
|
|
17300
17195
|
Group51,
|
|
17301
17196
|
{
|
|
17302
17197
|
gap: "xs",
|
|
@@ -17307,60 +17202,20 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17307
17202
|
zIndex: 12
|
|
17308
17203
|
}
|
|
17309
17204
|
},
|
|
17310
|
-
/* @__PURE__ */
|
|
17311
|
-
|
|
17312
|
-
{
|
|
17313
|
-
variant: "filled",
|
|
17314
|
-
size: "xs",
|
|
17315
|
-
onClick: handleChangeLogo,
|
|
17316
|
-
style: {
|
|
17317
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
17318
|
-
color: "#37352f",
|
|
17319
|
-
fontSize: "12px",
|
|
17320
|
-
fontWeight: 500,
|
|
17321
|
-
padding: "4px 8px",
|
|
17322
|
-
height: "auto"
|
|
17323
|
-
}
|
|
17324
|
-
},
|
|
17325
|
-
"Change"
|
|
17326
|
-
),
|
|
17327
|
-
/* @__PURE__ */ React165.createElement(
|
|
17328
|
-
Button32,
|
|
17329
|
-
{
|
|
17330
|
-
variant: "filled",
|
|
17331
|
-
size: "xs",
|
|
17332
|
-
onClick: handleRemoveLogo,
|
|
17333
|
-
style: {
|
|
17334
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
17335
|
-
color: "#37352f",
|
|
17336
|
-
fontSize: "12px",
|
|
17337
|
-
fontWeight: 500,
|
|
17338
|
-
padding: "4px 8px",
|
|
17339
|
-
height: "auto"
|
|
17340
|
-
}
|
|
17341
|
-
},
|
|
17342
|
-
"Remove"
|
|
17343
|
-
)
|
|
17205
|
+
/* @__PURE__ */ React166.createElement(CoverImageButton, { onClick: handleChangeLogo }, "Change"),
|
|
17206
|
+
/* @__PURE__ */ React166.createElement(CoverImageButton, { onClick: handleRemoveLogo }, "Remove")
|
|
17344
17207
|
)
|
|
17345
17208
|
) : (
|
|
17346
17209
|
// No logo: Show "Add icon" button when hovering anywhere on cover
|
|
17347
|
-
/* @__PURE__ */
|
|
17348
|
-
|
|
17210
|
+
/* @__PURE__ */ React166.createElement(
|
|
17211
|
+
CoverImageButton,
|
|
17349
17212
|
{
|
|
17350
|
-
variant: "filled",
|
|
17351
|
-
size: "xs",
|
|
17352
17213
|
onClick: handleAddLogo,
|
|
17353
17214
|
style: {
|
|
17354
17215
|
position: "absolute",
|
|
17355
17216
|
top: "50%",
|
|
17356
17217
|
left: "50%",
|
|
17357
17218
|
transform: "translate(-50%, -50%)",
|
|
17358
|
-
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
17359
|
-
color: "#37352f",
|
|
17360
|
-
fontSize: "12px",
|
|
17361
|
-
fontWeight: 500,
|
|
17362
|
-
padding: "4px 8px",
|
|
17363
|
-
height: "auto",
|
|
17364
17219
|
zIndex: 12
|
|
17365
17220
|
}
|
|
17366
17221
|
},
|
|
@@ -17368,13 +17223,13 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
17368
17223
|
)
|
|
17369
17224
|
))
|
|
17370
17225
|
)),
|
|
17371
|
-
/* @__PURE__ */
|
|
17372
|
-
/* @__PURE__ */
|
|
17226
|
+
/* @__PURE__ */ React166.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }),
|
|
17227
|
+
/* @__PURE__ */ React166.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") })
|
|
17373
17228
|
);
|
|
17374
17229
|
}
|
|
17375
17230
|
|
|
17376
17231
|
// src/mantine/components/PageHeader.tsx
|
|
17377
|
-
import
|
|
17232
|
+
import React167, { useState as useState62, useRef as useRef12, useEffect as useEffect46 } from "react";
|
|
17378
17233
|
function PageHeader({
|
|
17379
17234
|
title = "New page",
|
|
17380
17235
|
icon,
|
|
@@ -17406,14 +17261,14 @@ function PageHeader({
|
|
|
17406
17261
|
setIsMenuOpen(false);
|
|
17407
17262
|
}
|
|
17408
17263
|
};
|
|
17409
|
-
return /* @__PURE__ */
|
|
17264
|
+
return /* @__PURE__ */ React167.createElement("div", { style: styles.container }, /* @__PURE__ */ React167.createElement("div", { style: styles.leftSection }, /* @__PURE__ */ React167.createElement("span", { style: styles.icon }, icon || "\u{1F4C4}"), /* @__PURE__ */ React167.createElement("span", { style: styles.title }, title), isPrivate && /* @__PURE__ */ React167.createElement("button", { style: styles.privacyBadge }, /* @__PURE__ */ React167.createElement("span", { style: styles.lockIcon }, "\u{1F512}"), /* @__PURE__ */ React167.createElement("span", null, "Private"), /* @__PURE__ */ React167.createElement("span", { style: styles.chevron }, "\u25BE"))), /* @__PURE__ */ React167.createElement("div", { style: styles.rightSection }, lastEdited && /* @__PURE__ */ React167.createElement("span", { style: styles.editedText }, lastEdited), onShare && /* @__PURE__ */ React167.createElement("button", { style: styles.shareButton, onClick: onShare }, "Share"), onFavorite && /* @__PURE__ */ React167.createElement("button", { style: styles.iconButton, onClick: onFavorite }, isFavorited ? "\u2605" : "\u2606"), menuItems.length > 0 && /* @__PURE__ */ React167.createElement("div", { style: styles.menuContainer, ref: menuRef }, /* @__PURE__ */ React167.createElement(
|
|
17410
17265
|
"button",
|
|
17411
17266
|
{
|
|
17412
17267
|
style: styles.menuButton,
|
|
17413
17268
|
onClick: () => setIsMenuOpen(!isMenuOpen),
|
|
17414
17269
|
"aria-label": "Menu"
|
|
17415
17270
|
},
|
|
17416
|
-
/* @__PURE__ */
|
|
17271
|
+
/* @__PURE__ */ React167.createElement(
|
|
17417
17272
|
"svg",
|
|
17418
17273
|
{
|
|
17419
17274
|
width: "16",
|
|
@@ -17421,11 +17276,11 @@ function PageHeader({
|
|
|
17421
17276
|
viewBox: "0 0 16 16",
|
|
17422
17277
|
fill: "currentColor"
|
|
17423
17278
|
},
|
|
17424
|
-
/* @__PURE__ */
|
|
17425
|
-
/* @__PURE__ */
|
|
17426
|
-
/* @__PURE__ */
|
|
17279
|
+
/* @__PURE__ */ React167.createElement("circle", { cx: "3", cy: "8", r: "1.5" }),
|
|
17280
|
+
/* @__PURE__ */ React167.createElement("circle", { cx: "8", cy: "8", r: "1.5" }),
|
|
17281
|
+
/* @__PURE__ */ React167.createElement("circle", { cx: "13", cy: "8", r: "1.5" })
|
|
17427
17282
|
)
|
|
17428
|
-
), isMenuOpen && /* @__PURE__ */
|
|
17283
|
+
), isMenuOpen && /* @__PURE__ */ React167.createElement("div", { style: styles.dropdown }, menuItems.map((item, index) => /* @__PURE__ */ React167.createElement(React167.Fragment, { key: index }, item.divider && index > 0 && /* @__PURE__ */ React167.createElement("div", { style: styles.divider }), /* @__PURE__ */ React167.createElement(
|
|
17429
17284
|
"button",
|
|
17430
17285
|
{
|
|
17431
17286
|
style: {
|
|
@@ -17435,8 +17290,8 @@ function PageHeader({
|
|
|
17435
17290
|
onClick: () => handleMenuItemClick(item),
|
|
17436
17291
|
disabled: item.disabled
|
|
17437
17292
|
},
|
|
17438
|
-
item.icon && /* @__PURE__ */
|
|
17439
|
-
/* @__PURE__ */
|
|
17293
|
+
item.icon && /* @__PURE__ */ React167.createElement("span", { style: styles.menuItemIcon }, item.icon),
|
|
17294
|
+
/* @__PURE__ */ React167.createElement("span", null, item.label)
|
|
17440
17295
|
)))))));
|
|
17441
17296
|
}
|
|
17442
17297
|
var styles = {
|
|
@@ -17567,7 +17422,7 @@ var styles = {
|
|
|
17567
17422
|
};
|
|
17568
17423
|
|
|
17569
17424
|
// src/mantine/components/ExternalDropZone.tsx
|
|
17570
|
-
import
|
|
17425
|
+
import React168, { useCallback as useCallback42, useEffect as useEffect47, useRef as useRef13, useState as useState63 } from "react";
|
|
17571
17426
|
import { Box as Box30 } from "@mantine/core";
|
|
17572
17427
|
var SCROLL_ZONE_SIZE = 80;
|
|
17573
17428
|
var SCROLL_SPEED = 12;
|
|
@@ -17760,10 +17615,10 @@ var ExternalDropZone = ({ editor, onDrop, acceptedType = "application/x-artifact
|
|
|
17760
17615
|
}
|
|
17761
17616
|
};
|
|
17762
17617
|
}, []);
|
|
17763
|
-
const indicatorWithPosition = dropIndicator &&
|
|
17618
|
+
const indicatorWithPosition = dropIndicator && React168.isValidElement(dropIndicator) ? React168.cloneElement(dropIndicator, {
|
|
17764
17619
|
indicatorTop: typeof indicatorStyle.top === "number" ? indicatorStyle.top : void 0
|
|
17765
17620
|
}) : dropIndicator;
|
|
17766
|
-
return /* @__PURE__ */
|
|
17621
|
+
return /* @__PURE__ */ React168.createElement(
|
|
17767
17622
|
Box30,
|
|
17768
17623
|
{
|
|
17769
17624
|
ref: containerRef,
|
|
@@ -17774,19 +17629,19 @@ var ExternalDropZone = ({ editor, onDrop, acceptedType = "application/x-artifact
|
|
|
17774
17629
|
"data-external-drag": isValidDrag ? "true" : void 0
|
|
17775
17630
|
},
|
|
17776
17631
|
children,
|
|
17777
|
-
isValidDrag && indicatorWithPosition && /* @__PURE__ */
|
|
17632
|
+
isValidDrag && indicatorWithPosition && /* @__PURE__ */ React168.createElement(Box30, { style: { ...indicatorStyle, background: "none", border: "none", boxShadow: "none" } }, indicatorWithPosition)
|
|
17778
17633
|
);
|
|
17779
17634
|
};
|
|
17780
17635
|
|
|
17781
17636
|
// src/mantine/IxoEditor.tsx
|
|
17782
|
-
import
|
|
17637
|
+
import React170 from "react";
|
|
17783
17638
|
import { getDefaultReactSlashMenuItems, SuggestionMenuController } from "@blocknote/react";
|
|
17784
17639
|
import { BlockNoteView } from "@blocknote/mantine";
|
|
17785
17640
|
import { filterSuggestionItems } from "@blocknote/core";
|
|
17786
17641
|
import { MantineProvider } from "@mantine/core";
|
|
17787
17642
|
|
|
17788
17643
|
// src/mantine/components/PanelContent.tsx
|
|
17789
|
-
import
|
|
17644
|
+
import React169 from "react";
|
|
17790
17645
|
import { Box as Box31 } from "@mantine/core";
|
|
17791
17646
|
var panelStyles = {
|
|
17792
17647
|
light: {
|
|
@@ -17816,7 +17671,7 @@ function PanelContent({ theme }) {
|
|
|
17816
17671
|
const { activePanel, registeredPanels } = usePanelStore();
|
|
17817
17672
|
const isOpen = activePanel !== null;
|
|
17818
17673
|
const content = activePanel ? registeredPanels.get(activePanel) : null;
|
|
17819
|
-
return /* @__PURE__ */
|
|
17674
|
+
return /* @__PURE__ */ React169.createElement(
|
|
17820
17675
|
Box31,
|
|
17821
17676
|
{
|
|
17822
17677
|
pos: "sticky",
|
|
@@ -17855,7 +17710,7 @@ function IxoEditorContent({
|
|
|
17855
17710
|
}) {
|
|
17856
17711
|
const { activePanel } = usePanelStore();
|
|
17857
17712
|
const isPanelOpen = activePanel !== null;
|
|
17858
|
-
const editorContent = /* @__PURE__ */
|
|
17713
|
+
const editorContent = /* @__PURE__ */ React170.createElement(
|
|
17859
17714
|
BlockNoteView,
|
|
17860
17715
|
{
|
|
17861
17716
|
editor,
|
|
@@ -17870,7 +17725,7 @@ function IxoEditorContent({
|
|
|
17870
17725
|
onChange,
|
|
17871
17726
|
onSelectionChange
|
|
17872
17727
|
},
|
|
17873
|
-
config.slashMenu && /* @__PURE__ */
|
|
17728
|
+
config.slashMenu && /* @__PURE__ */ React170.createElement(
|
|
17874
17729
|
SuggestionMenuController,
|
|
17875
17730
|
{
|
|
17876
17731
|
triggerCharacter: "/",
|
|
@@ -17883,7 +17738,7 @@ function IxoEditorContent({
|
|
|
17883
17738
|
),
|
|
17884
17739
|
children
|
|
17885
17740
|
);
|
|
17886
|
-
return /* @__PURE__ */
|
|
17741
|
+
return /* @__PURE__ */ React170.createElement("div", { style: { display: "flex", height: "100%", width: "100%", gap: 0 } }, /* @__PURE__ */ React170.createElement(
|
|
17887
17742
|
"div",
|
|
17888
17743
|
{
|
|
17889
17744
|
className: `ixo-editor ixo-editor--theme-${config.theme} ${className}`,
|
|
@@ -17892,10 +17747,10 @@ function IxoEditorContent({
|
|
|
17892
17747
|
transition: "width 0.2s ease"
|
|
17893
17748
|
}
|
|
17894
17749
|
},
|
|
17895
|
-
selfNav && /* @__PURE__ */
|
|
17896
|
-
/* @__PURE__ */
|
|
17897
|
-
onExternalDrop ? /* @__PURE__ */
|
|
17898
|
-
), isPanelVisible && /* @__PURE__ */
|
|
17750
|
+
selfNav && /* @__PURE__ */ React170.createElement(PageHeader, { ...pageHeaderProps }),
|
|
17751
|
+
/* @__PURE__ */ React170.createElement(CoverImage, { coverImageUrl, logoUrl }),
|
|
17752
|
+
onExternalDrop ? /* @__PURE__ */ React170.createElement(ExternalDropZone, { editor, onDrop: onExternalDrop, acceptedType: externalDropType, dropIndicator }, editorContent) : editorContent
|
|
17753
|
+
), isPanelVisible && /* @__PURE__ */ React170.createElement(PanelContent, { theme: config.theme }));
|
|
17899
17754
|
}
|
|
17900
17755
|
function IxoEditor({
|
|
17901
17756
|
editor,
|
|
@@ -17932,7 +17787,7 @@ function IxoEditor({
|
|
|
17932
17787
|
tableHandles: true
|
|
17933
17788
|
};
|
|
17934
17789
|
const isEditable = editable;
|
|
17935
|
-
const editorContent = /* @__PURE__ */
|
|
17790
|
+
const editorContent = /* @__PURE__ */ React170.createElement(
|
|
17936
17791
|
BlocknoteProvider,
|
|
17937
17792
|
{
|
|
17938
17793
|
editor,
|
|
@@ -17943,7 +17798,7 @@ function IxoEditor({
|
|
|
17943
17798
|
getDynamicListData,
|
|
17944
17799
|
dynamicListPanelRenderer
|
|
17945
17800
|
},
|
|
17946
|
-
/* @__PURE__ */
|
|
17801
|
+
/* @__PURE__ */ React170.createElement(
|
|
17947
17802
|
IxoEditorContent,
|
|
17948
17803
|
{
|
|
17949
17804
|
isPanelVisible,
|
|
@@ -17965,13 +17820,13 @@ function IxoEditor({
|
|
|
17965
17820
|
)
|
|
17966
17821
|
);
|
|
17967
17822
|
if (mantineTheme) {
|
|
17968
|
-
return /* @__PURE__ */
|
|
17823
|
+
return /* @__PURE__ */ React170.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
|
|
17969
17824
|
}
|
|
17970
17825
|
return editorContent;
|
|
17971
17826
|
}
|
|
17972
17827
|
|
|
17973
17828
|
// src/mantine/components/EntitySigningSetup.tsx
|
|
17974
|
-
import
|
|
17829
|
+
import React171, { useState as useState64 } from "react";
|
|
17975
17830
|
import { Modal as Modal3, Stack as Stack112, Text as Text85, TextInput as TextInput6, Button as Button33, Alert as Alert23, Group as Group52 } from "@mantine/core";
|
|
17976
17831
|
import { IconAlertCircle as IconAlertCircle10, IconCheck as IconCheck5, IconKey as IconKey2 } from "@tabler/icons-react";
|
|
17977
17832
|
var EntitySigningSetup = ({
|
|
@@ -18025,15 +17880,15 @@ var EntitySigningSetup = ({
|
|
|
18025
17880
|
setSuccess(false);
|
|
18026
17881
|
}
|
|
18027
17882
|
};
|
|
18028
|
-
return /* @__PURE__ */
|
|
17883
|
+
return /* @__PURE__ */ React171.createElement(
|
|
18029
17884
|
Modal3,
|
|
18030
17885
|
{
|
|
18031
17886
|
opened,
|
|
18032
17887
|
onClose: handleClose,
|
|
18033
|
-
title: /* @__PURE__ */
|
|
17888
|
+
title: /* @__PURE__ */ React171.createElement(Group52, { gap: "xs" }, /* @__PURE__ */ React171.createElement(IconKey2, { size: 20 }), /* @__PURE__ */ React171.createElement(Text85, { fw: 600 }, "Entity Signing Setup")),
|
|
18034
17889
|
size: "md"
|
|
18035
17890
|
},
|
|
18036
|
-
/* @__PURE__ */
|
|
17891
|
+
/* @__PURE__ */ React171.createElement(Stack112, { gap: "md" }, success ? /* @__PURE__ */ React171.createElement(Alert23, { color: "green", icon: /* @__PURE__ */ React171.createElement(IconCheck5, { size: 16 }) }, "Entity signing key set up successfully!") : /* @__PURE__ */ React171.createElement(React171.Fragment, null, /* @__PURE__ */ React171.createElement(Text85, { size: "sm", c: "dimmed" }, "Flow authorization requires a signing key for", " ", /* @__PURE__ */ React171.createElement(Text85, { span: true, fw: 500 }, entityName || entityDid), "."), /* @__PURE__ */ React171.createElement(Alert23, { color: "blue", variant: "light" }, /* @__PURE__ */ React171.createElement(Text85, { size: "sm" }, "This is a ", /* @__PURE__ */ React171.createElement("strong", null, "one-time setup"), " that allows flows to grant permissions without requiring wallet signatures for each delegation.")), /* @__PURE__ */ React171.createElement(Stack112, { gap: "xs" }, /* @__PURE__ */ React171.createElement(Text85, { size: "sm", fw: 500 }, "What happens:"), /* @__PURE__ */ React171.createElement(Text85, { size: "sm", c: "dimmed" }, "1. A new signing key is generated"), /* @__PURE__ */ React171.createElement(Text85, { size: "sm", c: "dimmed" }, "2. Key is registered on the entity's DID document (requires wallet)"), /* @__PURE__ */ React171.createElement(Text85, { size: "sm", c: "dimmed" }, "3. Key is stored encrypted in the entity's Matrix room")), /* @__PURE__ */ React171.createElement(
|
|
18037
17892
|
TextInput6,
|
|
18038
17893
|
{
|
|
18039
17894
|
label: "Enter PIN to encrypt signing key",
|
|
@@ -18044,7 +17899,7 @@ var EntitySigningSetup = ({
|
|
|
18044
17899
|
onChange: (e) => setPin(e.currentTarget.value),
|
|
18045
17900
|
disabled: loading
|
|
18046
17901
|
}
|
|
18047
|
-
), /* @__PURE__ */
|
|
17902
|
+
), /* @__PURE__ */ React171.createElement(
|
|
18048
17903
|
TextInput6,
|
|
18049
17904
|
{
|
|
18050
17905
|
label: "Confirm PIN",
|
|
@@ -18054,12 +17909,12 @@ var EntitySigningSetup = ({
|
|
|
18054
17909
|
onChange: (e) => setConfirmPin(e.currentTarget.value),
|
|
18055
17910
|
disabled: loading
|
|
18056
17911
|
}
|
|
18057
|
-
), error && /* @__PURE__ */
|
|
17912
|
+
), error && /* @__PURE__ */ React171.createElement(Alert23, { color: "red", icon: /* @__PURE__ */ React171.createElement(IconAlertCircle10, { size: 16 }) }, error), /* @__PURE__ */ React171.createElement(Group52, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React171.createElement(Button33, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React171.createElement(
|
|
18058
17913
|
Button33,
|
|
18059
17914
|
{
|
|
18060
17915
|
onClick: handleSetup,
|
|
18061
17916
|
loading,
|
|
18062
|
-
leftSection: /* @__PURE__ */
|
|
17917
|
+
leftSection: /* @__PURE__ */ React171.createElement(IconKey2, { size: 16 })
|
|
18063
17918
|
},
|
|
18064
17919
|
"Setup Entity Signing"
|
|
18065
17920
|
))))
|
|
@@ -18067,7 +17922,7 @@ var EntitySigningSetup = ({
|
|
|
18067
17922
|
};
|
|
18068
17923
|
|
|
18069
17924
|
// src/mantine/components/FlowPermissionsPanel.tsx
|
|
18070
|
-
import
|
|
17925
|
+
import React172, { useState as useState65, useEffect as useEffect48, useMemo as useMemo53 } from "react";
|
|
18071
17926
|
import { Stack as Stack113, Text as Text86, Paper as Paper16, Group as Group53, Badge as Badge23, Button as Button34, ActionIcon as ActionIcon26, Loader as Loader23, Alert as Alert24, Divider as Divider11 } from "@mantine/core";
|
|
18072
17927
|
import { IconPlus as IconPlus5, IconTrash as IconTrash5, IconShieldCheck as IconShieldCheck2, IconUser as IconUser4, IconRobot as IconRobot3, IconBuilding } from "@tabler/icons-react";
|
|
18073
17928
|
var FlowPermissionsPanel = ({
|
|
@@ -18121,11 +17976,11 @@ var FlowPermissionsPanel = ({
|
|
|
18121
17976
|
const getIcon2 = (type) => {
|
|
18122
17977
|
switch (type) {
|
|
18123
17978
|
case "oracle":
|
|
18124
|
-
return /* @__PURE__ */
|
|
17979
|
+
return /* @__PURE__ */ React172.createElement(IconRobot3, { size: 16 });
|
|
18125
17980
|
case "entity":
|
|
18126
|
-
return /* @__PURE__ */
|
|
17981
|
+
return /* @__PURE__ */ React172.createElement(IconBuilding, { size: 16 });
|
|
18127
17982
|
default:
|
|
18128
|
-
return /* @__PURE__ */
|
|
17983
|
+
return /* @__PURE__ */ React172.createElement(IconUser4, { size: 16 });
|
|
18129
17984
|
}
|
|
18130
17985
|
};
|
|
18131
17986
|
const formatCapabilities = (caps) => {
|
|
@@ -18144,7 +17999,7 @@ var FlowPermissionsPanel = ({
|
|
|
18144
17999
|
if (date < /* @__PURE__ */ new Date()) return "Expired";
|
|
18145
18000
|
return date.toLocaleDateString();
|
|
18146
18001
|
};
|
|
18147
|
-
return /* @__PURE__ */
|
|
18002
|
+
return /* @__PURE__ */ React172.createElement(Stack113, { gap: "md" }, /* @__PURE__ */ React172.createElement(Stack113, { gap: "xs" }, /* @__PURE__ */ React172.createElement(Text86, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React172.createElement(Paper16, { p: "sm", withBorder: true }, /* @__PURE__ */ React172.createElement(Group53, { gap: "xs" }, /* @__PURE__ */ React172.createElement(IconShieldCheck2, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React172.createElement(Stack113, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React172.createElement(Text86, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React172.createElement(Text86, { size: "xs", c: "dimmed" }, rootCapability ? `Granted: ${new Date(rootCapability.issuedAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React172.createElement(Badge23, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React172.createElement(Divider11, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React172.createElement(Group53, { justify: "center", py: "xl" }, /* @__PURE__ */ React172.createElement(Loader23, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React172.createElement(Alert24, { color: "gray", variant: "light" }, /* @__PURE__ */ React172.createElement(Text86, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React172.createElement(Stack113, { gap: "xs" }, delegations.map(({ capability, displayName, type }) => /* @__PURE__ */ React172.createElement(Paper16, { key: capability.id, p: "sm", withBorder: true }, /* @__PURE__ */ React172.createElement(Group53, { justify: "space-between" }, /* @__PURE__ */ React172.createElement(Group53, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React172.createElement(Stack113, { gap: 2 }, /* @__PURE__ */ React172.createElement(Text86, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React172.createElement(Text86, { size: "xs", c: "dimmed" }, formatCapabilities(capability.capabilities)), /* @__PURE__ */ React172.createElement(Group53, { gap: "xs" }, /* @__PURE__ */ React172.createElement(Text86, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(capability.expiration)), /* @__PURE__ */ React172.createElement(Text86, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React172.createElement(Text86, { size: "xs", c: "dimmed" }, "Granted by: ", capability.issuer === entityDid ? "Entity" : capability.issuer.slice(-8))))), /* @__PURE__ */ React172.createElement(
|
|
18148
18003
|
ActionIcon26,
|
|
18149
18004
|
{
|
|
18150
18005
|
color: "red",
|
|
@@ -18153,11 +18008,11 @@ var FlowPermissionsPanel = ({
|
|
|
18153
18008
|
loading: revoking === capability.id,
|
|
18154
18009
|
disabled: !!revoking
|
|
18155
18010
|
},
|
|
18156
|
-
/* @__PURE__ */
|
|
18157
|
-
))))), /* @__PURE__ */
|
|
18011
|
+
/* @__PURE__ */ React172.createElement(IconTrash5, { size: 16 })
|
|
18012
|
+
))))), /* @__PURE__ */ React172.createElement(
|
|
18158
18013
|
Button34,
|
|
18159
18014
|
{
|
|
18160
|
-
leftSection: /* @__PURE__ */
|
|
18015
|
+
leftSection: /* @__PURE__ */ React172.createElement(IconPlus5, { size: 16 }),
|
|
18161
18016
|
variant: "light",
|
|
18162
18017
|
onClick: onGrantPermission
|
|
18163
18018
|
},
|
|
@@ -18166,7 +18021,7 @@ var FlowPermissionsPanel = ({
|
|
|
18166
18021
|
};
|
|
18167
18022
|
|
|
18168
18023
|
// src/mantine/components/GrantPermissionModal.tsx
|
|
18169
|
-
import
|
|
18024
|
+
import React173, { useState as useState66, useCallback as useCallback43 } from "react";
|
|
18170
18025
|
import {
|
|
18171
18026
|
Modal as Modal4,
|
|
18172
18027
|
Stack as Stack114,
|
|
@@ -18299,29 +18154,29 @@ var GrantPermissionModal = ({
|
|
|
18299
18154
|
resetForm();
|
|
18300
18155
|
}
|
|
18301
18156
|
};
|
|
18302
|
-
return /* @__PURE__ */
|
|
18157
|
+
return /* @__PURE__ */ React173.createElement(
|
|
18303
18158
|
Modal4,
|
|
18304
18159
|
{
|
|
18305
18160
|
opened,
|
|
18306
18161
|
onClose: handleClose,
|
|
18307
|
-
title: /* @__PURE__ */
|
|
18162
|
+
title: /* @__PURE__ */ React173.createElement(Group54, { gap: "xs" }, /* @__PURE__ */ React173.createElement(IconShieldPlus3, { size: 20 }), /* @__PURE__ */ React173.createElement(Text87, { fw: 600 }, "Grant Permission")),
|
|
18308
18163
|
size: "lg"
|
|
18309
18164
|
},
|
|
18310
|
-
/* @__PURE__ */
|
|
18165
|
+
/* @__PURE__ */ React173.createElement(Stack114, { gap: "md" }, /* @__PURE__ */ React173.createElement(Stack114, { gap: "xs" }, /* @__PURE__ */ React173.createElement(Text87, { size: "sm", fw: 500 }, "Recipient Type"), /* @__PURE__ */ React173.createElement(Radio6.Group, { value: recipientType, onChange: (v) => {
|
|
18311
18166
|
setRecipientType(v);
|
|
18312
18167
|
setSelectedRecipient(null);
|
|
18313
18168
|
setSearchResults([]);
|
|
18314
|
-
} }, /* @__PURE__ */
|
|
18169
|
+
} }, /* @__PURE__ */ React173.createElement(Group54, null, /* @__PURE__ */ React173.createElement(Radio6, { value: "user", label: "User" }), /* @__PURE__ */ React173.createElement(Radio6, { value: "oracle", label: "Oracle" }), /* @__PURE__ */ React173.createElement(Radio6, { value: "manual", label: "Enter DID" })))), recipientType !== "manual" ? /* @__PURE__ */ React173.createElement(Stack114, { gap: "xs" }, /* @__PURE__ */ React173.createElement(
|
|
18315
18170
|
TextInput7,
|
|
18316
18171
|
{
|
|
18317
18172
|
placeholder: recipientType === "oracle" ? "Search oracles..." : "Search users...",
|
|
18318
|
-
leftSection: /* @__PURE__ */
|
|
18319
|
-
rightSection: searching ? /* @__PURE__ */
|
|
18173
|
+
leftSection: /* @__PURE__ */ React173.createElement(IconSearch5, { size: 16 }),
|
|
18174
|
+
rightSection: searching ? /* @__PURE__ */ React173.createElement(Loader24, { size: 14 }) : null,
|
|
18320
18175
|
value: searchQuery,
|
|
18321
18176
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
18322
18177
|
onKeyDown: (e) => e.key === "Enter" && handleSearch()
|
|
18323
18178
|
}
|
|
18324
|
-
), selectedRecipient ? /* @__PURE__ */
|
|
18179
|
+
), selectedRecipient ? /* @__PURE__ */ React173.createElement(Paper17, { p: "sm", withBorder: true }, /* @__PURE__ */ React173.createElement(Group54, { justify: "space-between" }, /* @__PURE__ */ React173.createElement(Group54, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React173.createElement(IconRobot4, { size: 16 }) : /* @__PURE__ */ React173.createElement(IconUser5, { size: 16 }), /* @__PURE__ */ React173.createElement(Text87, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React173.createElement(Badge24, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React173.createElement(ActionIcon27, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React173.createElement(IconX8, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React173.createElement(Paper17, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React173.createElement(Stack114, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React173.createElement(
|
|
18325
18180
|
Button35,
|
|
18326
18181
|
{
|
|
18327
18182
|
key: result.did,
|
|
@@ -18331,7 +18186,7 @@ var GrantPermissionModal = ({
|
|
|
18331
18186
|
onClick: () => setSelectedRecipient(result)
|
|
18332
18187
|
},
|
|
18333
18188
|
result.displayName
|
|
18334
|
-
)))) : null) : /* @__PURE__ */
|
|
18189
|
+
)))) : null) : /* @__PURE__ */ React173.createElement(
|
|
18335
18190
|
TextInput7,
|
|
18336
18191
|
{
|
|
18337
18192
|
label: "Recipient DID",
|
|
@@ -18339,12 +18194,12 @@ var GrantPermissionModal = ({
|
|
|
18339
18194
|
value: manualDid,
|
|
18340
18195
|
onChange: (e) => setManualDid(e.currentTarget.value)
|
|
18341
18196
|
}
|
|
18342
|
-
), /* @__PURE__ */
|
|
18197
|
+
), /* @__PURE__ */ React173.createElement(Divider12, null), /* @__PURE__ */ React173.createElement(Stack114, { gap: "xs" }, /* @__PURE__ */ React173.createElement(Text87, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
|
|
18343
18198
|
// Single block mode: show fixed block info
|
|
18344
|
-
/* @__PURE__ */
|
|
18199
|
+
/* @__PURE__ */ React173.createElement(Paper17, { p: "sm", withBorder: true }, /* @__PURE__ */ React173.createElement(Group54, { gap: "xs" }, /* @__PURE__ */ React173.createElement(Badge24, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React173.createElement(Text87, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React173.createElement(Text87, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
|
|
18345
18200
|
) : (
|
|
18346
18201
|
// Multi-block mode: show scope selection
|
|
18347
|
-
/* @__PURE__ */
|
|
18202
|
+
/* @__PURE__ */ React173.createElement(React173.Fragment, null, /* @__PURE__ */ React173.createElement(Radio6.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React173.createElement(Stack114, { gap: "xs" }, /* @__PURE__ */ React173.createElement(Radio6, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React173.createElement(Radio6, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React173.createElement(Paper17, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React173.createElement(Stack114, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React173.createElement(
|
|
18348
18203
|
Checkbox12,
|
|
18349
18204
|
{
|
|
18350
18205
|
key: block.id,
|
|
@@ -18359,14 +18214,14 @@ var GrantPermissionModal = ({
|
|
|
18359
18214
|
}
|
|
18360
18215
|
}
|
|
18361
18216
|
)))))
|
|
18362
|
-
)), /* @__PURE__ */
|
|
18217
|
+
)), /* @__PURE__ */ React173.createElement(Divider12, null), /* @__PURE__ */ React173.createElement(Stack114, { gap: "xs" }, /* @__PURE__ */ React173.createElement(
|
|
18363
18218
|
Checkbox12,
|
|
18364
18219
|
{
|
|
18365
18220
|
label: "Set expiration",
|
|
18366
18221
|
checked: expirationEnabled,
|
|
18367
18222
|
onChange: (e) => setExpirationEnabled(e.currentTarget.checked)
|
|
18368
18223
|
}
|
|
18369
|
-
), expirationEnabled && /* @__PURE__ */
|
|
18224
|
+
), expirationEnabled && /* @__PURE__ */ React173.createElement(
|
|
18370
18225
|
NumberInput3,
|
|
18371
18226
|
{
|
|
18372
18227
|
label: "Expires in (days)",
|
|
@@ -18376,7 +18231,7 @@ var GrantPermissionModal = ({
|
|
|
18376
18231
|
min: 1,
|
|
18377
18232
|
max: 365
|
|
18378
18233
|
}
|
|
18379
|
-
)), /* @__PURE__ */
|
|
18234
|
+
)), /* @__PURE__ */ React173.createElement(
|
|
18380
18235
|
Checkbox12,
|
|
18381
18236
|
{
|
|
18382
18237
|
label: "Recipient can grant permissions to others",
|
|
@@ -18384,7 +18239,7 @@ var GrantPermissionModal = ({
|
|
|
18384
18239
|
checked: canDelegate,
|
|
18385
18240
|
onChange: (e) => setCanDelegate(e.currentTarget.checked)
|
|
18386
18241
|
}
|
|
18387
|
-
), /* @__PURE__ */
|
|
18242
|
+
), /* @__PURE__ */ React173.createElement(Divider12, null), /* @__PURE__ */ React173.createElement(
|
|
18388
18243
|
TextInput7,
|
|
18389
18244
|
{
|
|
18390
18245
|
label: "Enter your PIN to sign this delegation",
|
|
@@ -18393,7 +18248,7 @@ var GrantPermissionModal = ({
|
|
|
18393
18248
|
value: pin,
|
|
18394
18249
|
onChange: (e) => setPin(e.currentTarget.value)
|
|
18395
18250
|
}
|
|
18396
|
-
), error && /* @__PURE__ */
|
|
18251
|
+
), error && /* @__PURE__ */ React173.createElement(Alert25, { color: "red" }, error), /* @__PURE__ */ React173.createElement(Group54, { justify: "flex-end" }, /* @__PURE__ */ React173.createElement(Button35, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React173.createElement(Button35, { onClick: handleGrant, loading }, "Grant Permission")))
|
|
18397
18252
|
);
|
|
18398
18253
|
};
|
|
18399
18254
|
|
|
@@ -18499,4 +18354,4 @@ export {
|
|
|
18499
18354
|
ixoGraphQLClient,
|
|
18500
18355
|
getEntity
|
|
18501
18356
|
};
|
|
18502
|
-
//# sourceMappingURL=chunk-
|
|
18357
|
+
//# sourceMappingURL=chunk-5QJ4XXRA.mjs.map
|