@muhgholy/next-drive 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/client/components/dialog.tsx"],"names":[],"mappings":"AAgBA,KAAK,gBAAgB,GAAG;
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/client/components/dialog.tsx"],"names":[],"mappings":"AAgBA,KAAK,gBAAgB,GAAG;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;AAGF,KAAK,YAAY,CAAC,CAAC,SAAS,SAAS,gBAAgB,EAAE,IAAI;KAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM;CAAE,CAAC;AAE9F,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,SAAS,gBAAgB,EAAE,GAAG,SAAS,GAAG,SAAS,EAC3F,OAAO,QAAQ,CAAC;IACX,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,CAAC,EAAE,CAAC,CAAA;IACV,SAAS,EAAE,CAAC,SAAS,SAAS,gBAAgB,EAAE,GAC9C,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,GACxE,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;IACzC,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAClC,CAAC,gCAmIN,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-chooser.d.ts","sourceRoot":"","sources":["../../src/client/file-chooser.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAWjD,eAAO,MAAM,gBAAgB,GAAI,OAAO,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"file-chooser.d.ts","sourceRoot":"","sources":["../../src/client/file-chooser.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAWjD,eAAO,MAAM,gBAAgB,GAAI,OAAO,QAAQ,CAAC;IAC5C,KAAK,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,IAAI,CAAC;IACxC,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC,sBAgPD,CAAC"}
|
package/dist/client/index.js
CHANGED
|
@@ -851,14 +851,16 @@ var DialogConfirmation = (props) => {
|
|
|
851
851
|
);
|
|
852
852
|
};
|
|
853
853
|
useEffect(() => {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
854
|
+
if (open) {
|
|
855
|
+
setInputsValue(
|
|
856
|
+
inputs?.reduce((acc, input) => ({
|
|
857
|
+
...acc,
|
|
858
|
+
[input.id]: input.default ?? ""
|
|
859
|
+
}), {}) ?? {}
|
|
860
|
+
);
|
|
861
|
+
setError(null);
|
|
862
|
+
}
|
|
863
|
+
}, [inputs, open]);
|
|
862
864
|
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs(
|
|
863
865
|
DialogContent,
|
|
864
866
|
{
|
|
@@ -2458,7 +2460,7 @@ var DriveFileChooser = (props) => {
|
|
|
2458
2460
|
)
|
|
2459
2461
|
] })
|
|
2460
2462
|
] }),
|
|
2461
|
-
/* @__PURE__ */ jsx("div", { className: "divide-y max-h-40 overflow-y-auto", children: displayFiles.map((file) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-2.5 py-1.5 hover:bg-muted/30", children: [
|
|
2463
|
+
/* @__PURE__ */ jsx("div", { className: "divide-y max-h-40 overflow-y-auto overflow-x-hidden", children: displayFiles.map((file) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-2.5 py-1.5 hover:bg-muted/30 overflow-hidden", children: [
|
|
2462
2464
|
/* @__PURE__ */ jsx("div", { className: "size-7 shrink-0 rounded overflow-hidden bg-muted flex items-center justify-center", children: file.file.mime.startsWith("image/") ? /* @__PURE__ */ jsx(
|
|
2463
2465
|
"img",
|
|
2464
2466
|
{
|
|
@@ -2467,13 +2469,14 @@ var DriveFileChooser = (props) => {
|
|
|
2467
2469
|
className: "size-full object-cover"
|
|
2468
2470
|
}
|
|
2469
2471
|
) : getFileIcon(file.file.mime, false, "size-3.5 text-muted-foreground") }),
|
|
2470
|
-
/* @__PURE__ */ jsx("
|
|
2472
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsx("p", { className: "text-sm truncate", children: file.file.name }) }),
|
|
2471
2473
|
!disabled && /* @__PURE__ */ jsx(
|
|
2472
2474
|
Button,
|
|
2473
2475
|
{
|
|
2474
2476
|
type: "button",
|
|
2475
2477
|
variant: "ghost",
|
|
2476
2478
|
size: "icon",
|
|
2479
|
+
className: "shrink-0",
|
|
2477
2480
|
onClick: () => handleRemove(file.id),
|
|
2478
2481
|
children: /* @__PURE__ */ jsx(X, { className: "size-3" })
|
|
2479
2482
|
}
|