@aivex/ui 1.2.0-dev.38 → 1.2.0-dev.39
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/dist/{Button-CuvXiYtX.js → Button-BrPqDGyO.js} +291 -229
- package/dist/Button-BrPqDGyO.js.map +1 -0
- package/dist/{Button-DXf0LWOC.cjs → Button-EEErevS-.cjs} +2 -2
- package/dist/Button-EEErevS-.cjs.map +1 -0
- package/dist/{IconButton-DusjiWye.js → IconButton-CK4en7H6.js} +2 -2
- package/dist/{IconButton-DusjiWye.js.map → IconButton-CK4en7H6.js.map} +1 -1
- package/dist/{IconButton-CrrS0BMg.cjs → IconButton-DBlsEy3m.cjs} +2 -2
- package/dist/{IconButton-CrrS0BMg.cjs.map → IconButton-DBlsEy3m.cjs.map} +1 -1
- package/dist/comment.cjs +1 -1
- package/dist/comment.js +2 -2
- package/dist/components/DataGrid/DataGridRows.d.ts +6 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +991 -990
- package/dist/index.js.map +1 -1
- package/dist/{keyboard-DUqwZll5.js → keyboard-BMCakKCv.js} +2 -2
- package/dist/{keyboard-DUqwZll5.js.map → keyboard-BMCakKCv.js.map} +1 -1
- package/dist/{keyboard-9B-R6uN0.cjs → keyboard-DCewgvMV.cjs} +2 -2
- package/dist/{keyboard-9B-R6uN0.cjs.map → keyboard-DCewgvMV.cjs.map} +1 -1
- package/dist/shape-editor.cjs +1 -1
- package/dist/shape-editor.js +61 -61
- package/dist/utils.cjs +1 -1
- package/package.json +1 -1
- package/dist/Button-CuvXiYtX.js.map +0 -1
- package/dist/Button-DXf0LWOC.cjs.map +0 -1
package/dist/shape-editor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./styles.css";
|
|
3
|
-
import {
|
|
4
|
-
import { a as p, c as m, i as h, n as g, r as _, s as v, t as y } from "./keyboard-
|
|
3
|
+
import { $r as e, Ai as t, Dt as n, Nr as r, Q as i, Wr as a, ar as o, la as s, nt as c, pi as l, pr as u, rr as d, t as f } from "./Button-BrPqDGyO.js";
|
|
4
|
+
import { a as p, c as m, i as h, n as g, r as _, s as v, t as y } from "./keyboard-BMCakKCv.js";
|
|
5
5
|
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
6
6
|
import { memo as C, useCallback as w, useEffect as T, useId as E, useImperativeHandle as D, useLayoutEffect as O, useMemo as k, useReducer as A, useRef as j, useState as M } from "react";
|
|
7
7
|
import N from "konva";
|
|
@@ -982,9 +982,9 @@ var ct = [
|
|
|
982
982
|
"simplifyStrength",
|
|
983
983
|
"zoomSensitivity"
|
|
984
984
|
]);
|
|
985
|
-
function lt({ value:
|
|
985
|
+
function lt({ value: t, defaults: n, onChange: r, labels: i = K.viewSettings, items: a = ct, openDown: o = !1, alignEnd: s = !1 }) {
|
|
986
986
|
return /* @__PURE__ */ S(v.Content, {
|
|
987
|
-
"aria-label":
|
|
987
|
+
"aria-label": i.title,
|
|
988
988
|
side: o ? "bottom" : "top",
|
|
989
989
|
align: s ? "end" : "start",
|
|
990
990
|
sideOffset: 8,
|
|
@@ -992,33 +992,33 @@ function lt({ value: e, defaults: t, onChange: n, labels: r = K.viewSettings, it
|
|
|
992
992
|
children: [
|
|
993
993
|
/* @__PURE__ */ x("div", {
|
|
994
994
|
className: "aivex:px-xs aivex:text-body-md",
|
|
995
|
-
children:
|
|
995
|
+
children: i.title
|
|
996
996
|
}),
|
|
997
997
|
/* @__PURE__ */ S("div", {
|
|
998
998
|
className: "aivex:flex aivex:flex-col aivex:gap-md",
|
|
999
999
|
children: [
|
|
1000
|
-
a.filter((e) => Y.has(e)).map((
|
|
1001
|
-
let
|
|
1000
|
+
a.filter((e) => Y.has(e)).map((e) => {
|
|
1001
|
+
let n = dt[e];
|
|
1002
1002
|
return /* @__PURE__ */ x(pt, {
|
|
1003
|
-
icon:
|
|
1004
|
-
label:
|
|
1005
|
-
value:
|
|
1003
|
+
icon: n.icon,
|
|
1004
|
+
label: i[e],
|
|
1005
|
+
value: n.format(t[e]),
|
|
1006
1006
|
children: /* @__PURE__ */ x(h, {
|
|
1007
|
-
...He[
|
|
1008
|
-
value: [e
|
|
1009
|
-
onValueChange: ([
|
|
1007
|
+
...He[e],
|
|
1008
|
+
value: [t[e]],
|
|
1009
|
+
onValueChange: ([t]) => r({ [e]: t })
|
|
1010
1010
|
})
|
|
1011
|
-
},
|
|
1011
|
+
}, e);
|
|
1012
1012
|
}),
|
|
1013
1013
|
/* @__PURE__ */ x("div", {
|
|
1014
1014
|
className: "aivex:flex aivex:flex-col aivex:gap-xs",
|
|
1015
|
-
children: a.filter((e) => !Y.has(e)).map((
|
|
1016
|
-
let
|
|
1015
|
+
children: a.filter((e) => !Y.has(e)).map((e) => {
|
|
1016
|
+
let n = ft[e];
|
|
1017
1017
|
return /* @__PURE__ */ x(mt, {
|
|
1018
|
-
checked:
|
|
1019
|
-
label:
|
|
1020
|
-
onChange: (e) => n
|
|
1021
|
-
},
|
|
1018
|
+
checked: n.checked(t),
|
|
1019
|
+
label: i[e],
|
|
1020
|
+
onChange: (e) => r(n.patch(e))
|
|
1021
|
+
}, e);
|
|
1022
1022
|
})
|
|
1023
1023
|
}),
|
|
1024
1024
|
/* @__PURE__ */ x(p, {})
|
|
@@ -1026,12 +1026,12 @@ function lt({ value: e, defaults: t, onChange: n, labels: r = K.viewSettings, it
|
|
|
1026
1026
|
}),
|
|
1027
1027
|
/* @__PURE__ */ x("div", {
|
|
1028
1028
|
className: "aivex:flex aivex:justify-end",
|
|
1029
|
-
children: /* @__PURE__ */ S(
|
|
1029
|
+
children: /* @__PURE__ */ S(f, {
|
|
1030
1030
|
variant: "solid",
|
|
1031
1031
|
color: "secondary",
|
|
1032
1032
|
size: "md",
|
|
1033
|
-
onClick: () =>
|
|
1034
|
-
children: [/* @__PURE__ */ x(
|
|
1033
|
+
onClick: () => r({ ...n }),
|
|
1034
|
+
children: [/* @__PURE__ */ x(e, { size: 20 }), i.reset]
|
|
1035
1035
|
})
|
|
1036
1036
|
})
|
|
1037
1037
|
]
|
|
@@ -1042,23 +1042,23 @@ function ut(e) {
|
|
|
1042
1042
|
}
|
|
1043
1043
|
var dt = {
|
|
1044
1044
|
brightness: {
|
|
1045
|
-
icon: /* @__PURE__ */ x(
|
|
1045
|
+
icon: /* @__PURE__ */ x(i, { size: 16 }),
|
|
1046
1046
|
format: ut
|
|
1047
1047
|
},
|
|
1048
1048
|
contrast: {
|
|
1049
|
-
icon: /* @__PURE__ */ x(
|
|
1049
|
+
icon: /* @__PURE__ */ x(n, { size: 16 }),
|
|
1050
1050
|
format: ut
|
|
1051
1051
|
},
|
|
1052
1052
|
strokeSize: {
|
|
1053
|
-
icon: /* @__PURE__ */ x(
|
|
1053
|
+
icon: /* @__PURE__ */ x(t, { size: 16 }),
|
|
1054
1054
|
format: String
|
|
1055
1055
|
},
|
|
1056
1056
|
simplifyStrength: {
|
|
1057
|
-
icon: /* @__PURE__ */ x(
|
|
1057
|
+
icon: /* @__PURE__ */ x(r, { size: 16 }),
|
|
1058
1058
|
format: String
|
|
1059
1059
|
},
|
|
1060
1060
|
zoomSensitivity: {
|
|
1061
|
-
icon: /* @__PURE__ */ x(
|
|
1061
|
+
icon: /* @__PURE__ */ x(s, { size: 16 }),
|
|
1062
1062
|
format: (e) => e.toFixed(1)
|
|
1063
1063
|
}
|
|
1064
1064
|
}, ft = {
|
|
@@ -1128,7 +1128,7 @@ var X = {
|
|
|
1128
1128
|
"bottom-right": "aivex:bottom-2 aivex:right-2",
|
|
1129
1129
|
"top-left": "aivex:top-2 aivex:left-2",
|
|
1130
1130
|
"top-right": "aivex:top-2 aivex:right-2"
|
|
1131
|
-
}, ht = C(function({ image: e, imageUrl:
|
|
1131
|
+
}, ht = C(function({ image: e, imageUrl: t, imageVisible: n = !0, loading: r = !1, region: i, roiMaskId: s, shapes: d, view: p, viewDefaults: m, onChangeView: h, nav: g, registerShape: _, rectRef: y, zoomLabelRef: b, onZoom100: C, open: w, onToggleOpen: T, position: E = "bottom-left", showSettings: D = !0, settingsOpen: O, onToggleSettings: k, onCloseSettings: A, labels: j = K.minimap, settingsLabels: M, settingsItems: N }) {
|
|
1132
1132
|
let { offX: P, offY: ee, dispW: F, dispH: I, zoomCentered: te } = g, ne = E.startsWith("top"), re = {
|
|
1133
1133
|
position: "absolute",
|
|
1134
1134
|
left: P,
|
|
@@ -1143,32 +1143,32 @@ var X = {
|
|
|
1143
1143
|
width: 204,
|
|
1144
1144
|
height: 204
|
|
1145
1145
|
},
|
|
1146
|
-
className: `aivex:relative aivex:touch-none aivex:overflow-hidden aivex:rounded-sm aivex:bg-static-gray ${
|
|
1147
|
-
onPointerDown:
|
|
1148
|
-
onPointerMove:
|
|
1149
|
-
onPointerUp:
|
|
1150
|
-
onPointerCancel:
|
|
1151
|
-
onWheel:
|
|
1152
|
-
"aria-busy":
|
|
1146
|
+
className: `aivex:relative aivex:touch-none aivex:overflow-hidden aivex:rounded-sm aivex:bg-static-gray ${r ? "aivex:cursor-default" : "aivex:cursor-grab aivex:active:cursor-grabbing"}`,
|
|
1147
|
+
onPointerDown: r ? void 0 : g.handleMinimapPointerDown,
|
|
1148
|
+
onPointerMove: r ? void 0 : g.handleMinimapPointerMove,
|
|
1149
|
+
onPointerUp: r ? void 0 : g.endMinimapDrag,
|
|
1150
|
+
onPointerCancel: r ? void 0 : g.endMinimapDrag,
|
|
1151
|
+
onWheel: r ? void 0 : g.handleMinimapWheel,
|
|
1152
|
+
"aria-busy": r,
|
|
1153
1153
|
children: /* @__PURE__ */ S("div", {
|
|
1154
1154
|
style: {
|
|
1155
1155
|
position: "absolute",
|
|
1156
1156
|
inset: 0,
|
|
1157
|
-
opacity: +!!
|
|
1158
|
-
transition:
|
|
1157
|
+
opacity: +!!n,
|
|
1158
|
+
transition: n ? "opacity 0.3s ease" : "none"
|
|
1159
1159
|
},
|
|
1160
1160
|
children: [
|
|
1161
|
-
|
|
1162
|
-
src:
|
|
1161
|
+
t && /* @__PURE__ */ x("img", {
|
|
1162
|
+
src: t,
|
|
1163
1163
|
alt: "",
|
|
1164
1164
|
crossOrigin: "anonymous",
|
|
1165
1165
|
draggable: !1,
|
|
1166
1166
|
style: re
|
|
1167
1167
|
}),
|
|
1168
|
-
p.showRegionMask &&
|
|
1168
|
+
p.showRegionMask && i && i.rects.length > 0 && /* @__PURE__ */ x(st, {
|
|
1169
1169
|
image: e,
|
|
1170
|
-
region:
|
|
1171
|
-
maskId:
|
|
1170
|
+
region: i,
|
|
1171
|
+
maskId: s,
|
|
1172
1172
|
width: F,
|
|
1173
1173
|
height: I,
|
|
1174
1174
|
strokeWidth: 1,
|
|
@@ -1191,7 +1191,7 @@ var X = {
|
|
|
1191
1191
|
pointerEvents: "none"
|
|
1192
1192
|
},
|
|
1193
1193
|
"aria-hidden": !0,
|
|
1194
|
-
children: ce(
|
|
1194
|
+
children: ce(d).filter(R).map((e) => /* @__PURE__ */ x(J, {
|
|
1195
1195
|
shape: e,
|
|
1196
1196
|
strokeSize: p.strokeSize,
|
|
1197
1197
|
register: _
|
|
@@ -1213,45 +1213,45 @@ var X = {
|
|
|
1213
1213
|
}), L = /* @__PURE__ */ S("div", {
|
|
1214
1214
|
className: "aivex:relative aivex:flex aivex:items-center aivex:gap-xs",
|
|
1215
1215
|
children: [
|
|
1216
|
-
/* @__PURE__ */ x(
|
|
1216
|
+
/* @__PURE__ */ x(f, {
|
|
1217
1217
|
variant: "ghost",
|
|
1218
1218
|
size: "icon-md",
|
|
1219
1219
|
"aria-label": j.zoomOut,
|
|
1220
1220
|
onClick: () => te(1 / 1.2),
|
|
1221
|
-
disabled:
|
|
1222
|
-
children: /* @__PURE__ */ x(
|
|
1221
|
+
disabled: r,
|
|
1222
|
+
children: /* @__PURE__ */ x(u, { size: 20 })
|
|
1223
1223
|
}),
|
|
1224
|
-
/* @__PURE__ */ x(
|
|
1224
|
+
/* @__PURE__ */ x(f, {
|
|
1225
1225
|
variant: "ghost",
|
|
1226
1226
|
size: "md",
|
|
1227
1227
|
"aria-label": j.zoom100,
|
|
1228
1228
|
onClick: C,
|
|
1229
|
-
disabled:
|
|
1229
|
+
disabled: r,
|
|
1230
1230
|
className: "aivex:w-[60px] aivex:tabular-nums",
|
|
1231
1231
|
children: /* @__PURE__ */ x("span", {
|
|
1232
1232
|
ref: b,
|
|
1233
1233
|
children: "100%"
|
|
1234
1234
|
})
|
|
1235
1235
|
}),
|
|
1236
|
-
/* @__PURE__ */ x(
|
|
1236
|
+
/* @__PURE__ */ x(f, {
|
|
1237
1237
|
variant: "ghost",
|
|
1238
1238
|
size: "icon-md",
|
|
1239
1239
|
"aria-label": j.zoomIn,
|
|
1240
1240
|
onClick: () => te(1.2),
|
|
1241
|
-
disabled:
|
|
1242
|
-
children: /* @__PURE__ */ x(
|
|
1241
|
+
disabled: r,
|
|
1242
|
+
children: /* @__PURE__ */ x(a, { size: 20 })
|
|
1243
1243
|
}),
|
|
1244
1244
|
D && /* @__PURE__ */ S(v, {
|
|
1245
1245
|
open: O,
|
|
1246
1246
|
onOpenChange: (e) => e ? k() : A(),
|
|
1247
1247
|
children: [/* @__PURE__ */ x(v.Trigger, {
|
|
1248
1248
|
asChild: !0,
|
|
1249
|
-
children: /* @__PURE__ */ x(
|
|
1249
|
+
children: /* @__PURE__ */ x(f, {
|
|
1250
1250
|
variant: "ghost",
|
|
1251
1251
|
size: "icon-md",
|
|
1252
1252
|
"aria-label": j.viewSettings,
|
|
1253
1253
|
className: O ? "aivex:text-text-brand" : void 0,
|
|
1254
|
-
children: /* @__PURE__ */ x(
|
|
1254
|
+
children: /* @__PURE__ */ x(l, { size: 20 })
|
|
1255
1255
|
})
|
|
1256
1256
|
}), /* @__PURE__ */ x(lt, {
|
|
1257
1257
|
value: p,
|
|
@@ -1263,7 +1263,7 @@ var X = {
|
|
|
1263
1263
|
alignEnd: E.endsWith("right")
|
|
1264
1264
|
})]
|
|
1265
1265
|
}),
|
|
1266
|
-
/* @__PURE__ */ x(
|
|
1266
|
+
/* @__PURE__ */ x(f, {
|
|
1267
1267
|
variant: "ghost",
|
|
1268
1268
|
size: "icon-md",
|
|
1269
1269
|
"aria-label": j.toggleMinimap,
|
|
@@ -1272,7 +1272,7 @@ var X = {
|
|
|
1272
1272
|
children: w ? /* @__PURE__ */ x(c, {
|
|
1273
1273
|
size: 20,
|
|
1274
1274
|
className: ne ? "aivex:rotate-180" : void 0
|
|
1275
|
-
}) : /* @__PURE__ */ x(
|
|
1275
|
+
}) : /* @__PURE__ */ x(o, { size: 20 })
|
|
1276
1276
|
})
|
|
1277
1277
|
]
|
|
1278
1278
|
});
|
|
@@ -5572,7 +5572,7 @@ var $r = "__draft_preview__", ei = new Set([
|
|
|
5572
5572
|
function ti(e, t) {
|
|
5573
5573
|
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
5574
5574
|
}
|
|
5575
|
-
function ni({ document: e, clipboardScope: t, renderImageState: n, dimmed: r = !1, selectedIds: i, activeTool: a, draftStyle: o, draftMeta: s, readOnly: c, disableMarquee: l, locked: u, onLockedInteraction:
|
|
5575
|
+
function ni({ document: e, clipboardScope: t, renderImageState: n, dimmed: r = !1, selectedIds: i, activeTool: a, draftStyle: o, draftMeta: s, readOnly: c, disableMarquee: l, locked: u, onLockedInteraction: f, onDrawAttemptWithoutDraft: p, onIdleEscape: m, overrideShapeInteraction: h, defaultViewSettings: g, viewSettings: _, onViewSettingsChange: v, showMinimap: y = !0, minimapPosition: b = "bottom-left", showViewSettings: C = !0, getContextMenuItems: A, strings: N, viewSettingItems: P, canMergeSelection: ee, brushSize: F = 20, zoomBound: I, zoomAnimationDuration: te = 300, decorationShapes: ne, regionMask: re, overlayMarkers: ie, renderOverlayMarker: ae, onOverlayMarkerClick: se, renderImageOverlay: ce, getSelectionLabel: B, hideSelectionLabelDot: V, formatSelectionInfo: H, externalTools: ue, assistant: de, keymap: fe, handleRef: pe, backend: me = "pixi", onActiveToolChange: he, onSelectionChange: ge, onEditingChange: _e, onShapesCreated: ve, onShapesUpdated: ye, onShapesDeleted: be, onDrawSessionChange: xe, onDraftShapeChange: Se, onViewportChange: Ce, onShapesTransformPreview: we }) {
|
|
5576
5576
|
let Te = j(null), U = j(null), Ee = j(null), De = j(null), Oe = j(null), ke = `${E()}-minimap`, [W, Ae] = M(null), [je, Me] = M(!1), [G, Ne] = M(!1), [Pe, Fe] = M(null), [Ie, Le] = M({
|
|
5577
5577
|
active: !1,
|
|
5578
5578
|
kind: "none",
|
|
@@ -5653,8 +5653,8 @@ function ni({ document: e, clipboardScope: t, renderImageState: n, dimmed: r = !
|
|
|
5653
5653
|
Rt.current = l;
|
|
5654
5654
|
let zt = j(u);
|
|
5655
5655
|
zt.current = u;
|
|
5656
|
-
let Bt = j(
|
|
5657
|
-
Bt.current =
|
|
5656
|
+
let Bt = j(f);
|
|
5657
|
+
Bt.current = f;
|
|
5658
5658
|
let Vt = j(p);
|
|
5659
5659
|
Vt.current = p;
|
|
5660
5660
|
let Ht = j(h);
|
|
@@ -6242,7 +6242,7 @@ function ni({ document: e, clipboardScope: t, renderImageState: n, dimmed: r = !
|
|
|
6242
6242
|
...Or ? [{
|
|
6243
6243
|
id: "assistExpand",
|
|
6244
6244
|
label: Z.contextMenu.assistExpand,
|
|
6245
|
-
icon: /* @__PURE__ */ x(
|
|
6245
|
+
icon: /* @__PURE__ */ x(d, { size: 14 }),
|
|
6246
6246
|
disabled: !kr,
|
|
6247
6247
|
onClick: () => {
|
|
6248
6248
|
Pe && kr && $.refineShape(kr, Pe.img, !0);
|
|
@@ -6250,7 +6250,7 @@ function ni({ document: e, clipboardScope: t, renderImageState: n, dimmed: r = !
|
|
|
6250
6250
|
}, {
|
|
6251
6251
|
id: "assistExclude",
|
|
6252
6252
|
label: Z.contextMenu.assistExclude,
|
|
6253
|
-
icon: /* @__PURE__ */ x(
|
|
6253
|
+
icon: /* @__PURE__ */ x(d, { size: 14 }),
|
|
6254
6254
|
disabled: !kr,
|
|
6255
6255
|
onClick: () => {
|
|
6256
6256
|
Pe && kr && $.refineShape(kr, Pe.img, !1);
|
package/dist/utils.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./Button-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./Button-EEErevS-.cjs`);let e=require(`clsx`);var t=(0,require(`tailwind-merge`).extendTailwindMerge)({extend:{classGroups:{"font-size":[{text:[`display-lg`,`display-md`,`heading-xl`,`heading-lg`,`heading-md`,`heading-sm`,`heading-xs`,`body-lg-regular`,`body-lg-medium`,`body-md-regular`,`body-md-medium`,`body-sm-regular`,`body-sm-medium`,`label-xl`,`label-lg`,`label-md`,`label-sm`,`caption-md`]}],"text-color":[{text:[`text-primary`,`text-secondary`,`text-tertiary`,`text-disabled`,`text-on-color`,`text-brand`,`text-danger`,`text-info`,`text-success`,`text-warning`,`category-blue-text`,`category-gray-text`,`category-red-text`,`category-green-text`,`category-yellow-text`,`category-orange-text`,`category-lime-text`,`category-split-training`,`category-split-validation`,`category-split-unassigned`,`category-teal-text`,`category-cyan-text`,`category-indigo-text`,`category-violet-text`,`category-pink-text`]}]}}});function n(...n){return t((0,e.clsx)(n))}exports.cn=n;
|
|
2
2
|
//# sourceMappingURL=utils.cjs.map
|