@ceed/ads 1.2.2-next.1 → 1.2.2-next.3
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/index.cjs +301 -265
- package/dist/index.js +73 -43
- package/framer/index.js +30 -30
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -4190,21 +4190,28 @@ import React29, {
|
|
|
4190
4190
|
useRef as useRef6,
|
|
4191
4191
|
useState as useState8
|
|
4192
4192
|
} from "react";
|
|
4193
|
-
import { styled as styled18 } from "@mui/joy";
|
|
4193
|
+
import { styled as styled18, Input as Input2 } from "@mui/joy";
|
|
4194
4194
|
import MuiFileUploadIcon from "@mui/icons-material/CloudUploadRounded";
|
|
4195
4195
|
import MuiUploadFileIcon from "@mui/icons-material/UploadFileRounded";
|
|
4196
4196
|
import MuiClearIcon from "@mui/icons-material/ClearRounded";
|
|
4197
|
-
|
|
4198
|
-
import
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
import
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
import
|
|
4207
|
-
|
|
4197
|
+
var esmFiles = {
|
|
4198
|
+
combine: import(
|
|
4199
|
+
// @ts-ignore: build된 pragmatic-drag-and-drop의 esm file에 extension이 없어서 에러가 발생함. 따라서 빌드된 js파일을 direct로 import한다.
|
|
4200
|
+
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js"
|
|
4201
|
+
),
|
|
4202
|
+
adapter: import(
|
|
4203
|
+
// @ts-ignore: build된 pragmatic-drag-and-drop의 esm file에 extension이 없어서 에러가 발생함. 따라서 빌드된 js파일을 direct로 import한다.
|
|
4204
|
+
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js"
|
|
4205
|
+
),
|
|
4206
|
+
file: import(
|
|
4207
|
+
// @ts-ignore: build된 pragmatic-drag-and-drop의 esm file에 extension이 없어서 에러가 발생함. 따라서 빌드된 js파일을 direct로 import한다.
|
|
4208
|
+
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js"
|
|
4209
|
+
),
|
|
4210
|
+
preventUnhandled: import(
|
|
4211
|
+
// @ts-ignore: build된 pragmatic-drag-and-drop의 esm file에 extension이 없어서 에러가 발생함. 따라서 빌드된 js파일을 direct로 import한다.
|
|
4212
|
+
"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js"
|
|
4213
|
+
)
|
|
4214
|
+
};
|
|
4208
4215
|
var VisuallyHiddenInput = styled18(Input2)({
|
|
4209
4216
|
width: "1px",
|
|
4210
4217
|
height: "1px",
|
|
@@ -4373,12 +4380,15 @@ var Uploader = React29.memo(
|
|
|
4373
4380
|
() => accept.split(",").map((accept2) => accept2.trim()),
|
|
4374
4381
|
[accept]
|
|
4375
4382
|
);
|
|
4376
|
-
const parsedAccepts = useMemo10(
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4383
|
+
const parsedAccepts = useMemo10(
|
|
4384
|
+
() => accepts.flatMap((type) => {
|
|
4385
|
+
if (["image/*", "video/*", "audio/*"].includes(type)) {
|
|
4386
|
+
return ALL_EXTENSIONS_BY_TYPE[type];
|
|
4387
|
+
}
|
|
4388
|
+
return type;
|
|
4389
|
+
}),
|
|
4390
|
+
[accepts]
|
|
4391
|
+
);
|
|
4382
4392
|
const helperText = useMemo10(() => {
|
|
4383
4393
|
const [allAcceptedTypes, acceptedTypes] = [
|
|
4384
4394
|
accepts.filter(
|
|
@@ -4478,34 +4488,53 @@ var Uploader = React29.memo(
|
|
|
4478
4488
|
]
|
|
4479
4489
|
);
|
|
4480
4490
|
useEffect7(() => {
|
|
4481
|
-
|
|
4482
|
-
if (!el || disabled) {
|
|
4491
|
+
if (!dropZoneRef.current || disabled) {
|
|
4483
4492
|
return;
|
|
4484
4493
|
}
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
}
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4494
|
+
let cleanup;
|
|
4495
|
+
Promise.all([
|
|
4496
|
+
esmFiles.combine,
|
|
4497
|
+
esmFiles.adapter,
|
|
4498
|
+
esmFiles.file,
|
|
4499
|
+
esmFiles.preventUnhandled
|
|
4500
|
+
]).then(
|
|
4501
|
+
([
|
|
4502
|
+
combineModule,
|
|
4503
|
+
adapterModule,
|
|
4504
|
+
fileModule,
|
|
4505
|
+
preventUnhandledModule
|
|
4506
|
+
]) => {
|
|
4507
|
+
const { combine } = combineModule;
|
|
4508
|
+
const { dropTargetForExternal, monitorForExternal } = adapterModule;
|
|
4509
|
+
const { containsFiles, getFiles } = fileModule;
|
|
4510
|
+
const { preventUnhandled } = preventUnhandledModule;
|
|
4511
|
+
cleanup = combine(
|
|
4512
|
+
dropTargetForExternal({
|
|
4513
|
+
element: dropZoneRef.current,
|
|
4514
|
+
canDrop: containsFiles,
|
|
4515
|
+
onDragEnter: () => setPreviewState("over"),
|
|
4516
|
+
onDragLeave: () => setPreviewState("potential"),
|
|
4517
|
+
onDrop: async ({ source }) => {
|
|
4518
|
+
const files2 = await getFiles({ source });
|
|
4519
|
+
addFiles(files2);
|
|
4520
|
+
}
|
|
4521
|
+
}),
|
|
4522
|
+
monitorForExternal({
|
|
4523
|
+
canMonitor: containsFiles,
|
|
4524
|
+
onDragStart: () => {
|
|
4525
|
+
setPreviewState("potential");
|
|
4526
|
+
preventUnhandled.start();
|
|
4527
|
+
},
|
|
4528
|
+
onDrop: () => {
|
|
4529
|
+
setPreviewState("idle");
|
|
4530
|
+
preventUnhandled.stop();
|
|
4531
|
+
}
|
|
4532
|
+
})
|
|
4533
|
+
);
|
|
4534
|
+
}
|
|
4507
4535
|
);
|
|
4508
|
-
|
|
4536
|
+
return () => cleanup?.();
|
|
4537
|
+
}, [disabled, addFiles]);
|
|
4509
4538
|
useEffect7(() => {
|
|
4510
4539
|
if (inputRef.current && minCount) {
|
|
4511
4540
|
if (files.length < minCount) {
|
|
@@ -4604,6 +4633,7 @@ var Uploader = React29.memo(
|
|
|
4604
4633
|
));
|
|
4605
4634
|
}
|
|
4606
4635
|
);
|
|
4636
|
+
Uploader.displayName = "Uploader";
|
|
4607
4637
|
|
|
4608
4638
|
// src/components/Grid/Grid.tsx
|
|
4609
4639
|
import { Grid } from "@mui/joy";
|