@masters-union/union-stack 0.3.15 → 0.3.16
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/cdn/loader.v1.global.js +2 -2
- package/dist/cdn/loader.v1.global.js.map +1 -1
- package/dist/{chunk-WQ5VYKST.cjs → chunk-3FCZBKNN.cjs} +8 -7
- package/dist/chunk-3FCZBKNN.cjs.map +1 -0
- package/dist/{chunk-U5MLTERT.js → chunk-7NJTA5ZD.js} +6 -55
- package/dist/chunk-7NJTA5ZD.js.map +1 -0
- package/dist/{chunk-ZOJLHPVE.cjs → chunk-EBE7EIOZ.cjs} +14 -64
- package/dist/chunk-EBE7EIOZ.cjs.map +1 -0
- package/dist/chunk-GTE65IAM.cjs +58 -0
- package/dist/chunk-GTE65IAM.cjs.map +1 -0
- package/dist/{chunk-IX6AZKPO.js → chunk-OZGVTEMZ.js} +4 -3
- package/dist/chunk-OZGVTEMZ.js.map +1 -0
- package/dist/chunk-XBQENFBZ.js +54 -0
- package/dist/chunk-XBQENFBZ.js.map +1 -0
- package/dist/{client-C0qMOfb3.d.ts → client-BCLIIiX2.d.ts} +1 -1
- package/dist/{client-DOTa3Mai.d.cts → client-CSZ-4GVl.d.cts} +1 -1
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/node.cjs +8 -7
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +2 -1
- package/dist/node.js.map +1 -1
- package/dist/picker.cjs +9 -2
- package/dist/picker.cjs.map +1 -1
- package/dist/picker.d.cts +3 -3
- package/dist/picker.d.ts +3 -3
- package/dist/picker.js +9 -2
- package/dist/picker.js.map +1 -1
- package/dist/react.cjs +4 -3
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +4 -4
- package/dist/react.d.ts +4 -4
- package/dist/react.js +3 -2
- package/dist/react.js.map +1 -1
- package/dist/{types-ZCfjNZls.d.ts → types-BWs1slkL.d.cts} +1 -1
- package/dist/{types-ZCfjNZls.d.cts → types-BWs1slkL.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-IX6AZKPO.js.map +0 -1
- package/dist/chunk-U5MLTERT.js.map +0 -1
- package/dist/chunk-WQ5VYKST.cjs.map +0 -1
- package/dist/chunk-ZOJLHPVE.cjs.map +0 -1
package/dist/picker.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { U as UnionStackClient, P as PickerOptions, a as PickerHandle } from './client-
|
|
2
|
-
export { b as PickerBranding, c as PickerTheme } from './client-
|
|
3
|
-
import { P as PickResponse } from './types-
|
|
1
|
+
import { U as UnionStackClient, P as PickerOptions, a as PickerHandle } from './client-CSZ-4GVl.cjs';
|
|
2
|
+
export { b as PickerBranding, c as PickerTheme } from './client-CSZ-4GVl.cjs';
|
|
3
|
+
import { P as PickResponse } from './types-BWs1slkL.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Single-shot file picker modal. Built imperatively (no framework) so it can
|
package/dist/picker.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { U as UnionStackClient, P as PickerOptions, a as PickerHandle } from './client-
|
|
2
|
-
export { b as PickerBranding, c as PickerTheme } from './client-
|
|
3
|
-
import { P as PickResponse } from './types-
|
|
1
|
+
import { U as UnionStackClient, P as PickerOptions, a as PickerHandle } from './client-BCLIIiX2.js';
|
|
2
|
+
export { b as PickerBranding, c as PickerTheme } from './client-BCLIIiX2.js';
|
|
3
|
+
import { P as PickResponse } from './types-BWs1slkL.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Single-shot file picker modal. Built imperatively (no framework) so it can
|
package/dist/picker.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { EMPTY_FILE_MESSAGE } from './chunk-XBQENFBZ.js';
|
|
2
|
+
|
|
1
3
|
// src/picker/styles.ts
|
|
2
4
|
var STYLE_ID = "unionstack-picker-styles";
|
|
3
5
|
var FONT_ID = "unionstack-picker-fonts";
|
|
@@ -1697,6 +1699,8 @@ var Picker = class {
|
|
|
1697
1699
|
const notices = [];
|
|
1698
1700
|
if (rejectedType > 0) notices.push(`${rejectedType} file${rejectedType > 1 ? "s" : ""} skipped \u2014 unsupported type`);
|
|
1699
1701
|
if (overCap > 0) notices.push(`${overCap} file${overCap > 1 ? "s" : ""} skipped \u2014 max ${cap} allowed`);
|
|
1702
|
+
const emptyCount = chosen.filter((f) => f.size === 0).length;
|
|
1703
|
+
if (emptyCount > 0) notices.push(`${emptyCount} empty file${emptyCount > 1 ? "s" : ""} skipped \u2014 open it in iCloud/Drive to download first`);
|
|
1700
1704
|
if (notices.length) this.flashNotice(notices.join(" \xB7 "));
|
|
1701
1705
|
for (const file of chosen) {
|
|
1702
1706
|
if (file.size === 0) {
|
|
@@ -1707,7 +1711,8 @@ var Picker = class {
|
|
|
1707
1711
|
edited: false,
|
|
1708
1712
|
state: "failed",
|
|
1709
1713
|
progress: 0,
|
|
1710
|
-
error:
|
|
1714
|
+
error: EMPTY_FILE_MESSAGE,
|
|
1715
|
+
errorCode: "EMPTY_FILE"
|
|
1711
1716
|
};
|
|
1712
1717
|
this.items.push(item2);
|
|
1713
1718
|
this.renderItem(item2);
|
|
@@ -2104,8 +2109,10 @@ var Picker = class {
|
|
|
2104
2109
|
const item = itemByUploadId.get(p.uploadId);
|
|
2105
2110
|
if (item) {
|
|
2106
2111
|
item.error = err.message;
|
|
2112
|
+
item.errorCode = err.code;
|
|
2107
2113
|
this.setItemState(item, "failed");
|
|
2108
2114
|
}
|
|
2115
|
+
if (err.code === "EMPTY_FILE") this.flashNotice(EMPTY_FILE_MESSAGE);
|
|
2109
2116
|
this.opts.onFileUploadFailed?.(p, err);
|
|
2110
2117
|
},
|
|
2111
2118
|
onUploadDone: (r) => {
|
|
@@ -2140,7 +2147,7 @@ var Picker = class {
|
|
|
2140
2147
|
source: "local"
|
|
2141
2148
|
},
|
|
2142
2149
|
error: {
|
|
2143
|
-
code: "VALIDATION",
|
|
2150
|
+
code: i.errorCode || "VALIDATION",
|
|
2144
2151
|
message: i.error || "failed",
|
|
2145
2152
|
retryable: false
|
|
2146
2153
|
}
|