@apple-pie/slice 0.1.3 → 0.1.4

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.
Files changed (68) hide show
  1. package/README.md +47 -77
  2. package/dist/cjs/chunks/{Button-hg5kGC1P.js → Button-krf4dQeL.js} +4 -2
  3. package/dist/cjs/chunks/{FileList-BQgcnKPP.js → FileList-CkpMj-os.js} +1 -1
  4. package/dist/cjs/chunks/{ProgressIndicator-qjya_Yb5.js → ProgressIndicator-DVD-gD3T.js} +1 -1
  5. package/dist/cjs/chunks/{PromptInput-ZqHQUfXw.js → PromptInput-DULf5ock.js} +1 -1
  6. package/dist/cjs/chunks/SSEConnection-B_yE8cXz.js +140 -0
  7. package/dist/cjs/chunks/{TextArea-BhzVGfKA.js → TextArea-BJCjRUEG.js} +1 -1
  8. package/dist/cjs/chunks/{TextField-hIjxrOG9.js → TextField-CjT26H_6.js} +18 -16
  9. package/dist/cjs/chunks/{UploadArea-B4GA06LW.js → UploadArea-BE6but3t.js} +1 -1
  10. package/dist/cjs/chunks/WSConnection-DCBuJGmb.js +206 -0
  11. package/dist/cjs/chunks/{sseStore-Dg0WuXsI.js → sseStore-CIIeshjm.js} +3 -3
  12. package/dist/cjs/chunks/windowStore-CCxCOUqa.js +156 -0
  13. package/dist/cjs/components/Button/index.js +2 -2
  14. package/dist/cjs/components/FileList/index.js +2 -2
  15. package/dist/cjs/components/Progress/index.js +2 -2
  16. package/dist/cjs/components/PromptInput/index.js +4 -4
  17. package/dist/cjs/components/TextArea/index.js +3 -3
  18. package/dist/cjs/components/Textfield/index.js +3 -3
  19. package/dist/cjs/components/UploadArea/index.js +7 -8
  20. package/dist/cjs/hooks/useWindow.js +46 -11
  21. package/dist/cjs/index.js +2 -2
  22. package/dist/cjs/stores/SSE.js +2 -2
  23. package/dist/cjs/stores/WS.js +62 -0
  24. package/dist/cjs/stores/window.js +14 -3
  25. package/dist/cjs/stores.js +15 -4
  26. package/dist/cjs/utils/index.js +2 -2
  27. package/dist/cjs/utils/objects/index.js +4 -138
  28. package/dist/esm/chunks/{Button-DJDS7Yad.mjs → Button-kXFJmcKv.mjs} +4 -2
  29. package/dist/esm/chunks/{FileList-CmlXqPXl.mjs → FileList-Bon537-t.mjs} +1 -1
  30. package/dist/esm/chunks/{PromptInput-DSHVUuEf.mjs → PromptInput-DXFAZspz.mjs} +3 -3
  31. package/dist/esm/chunks/SSEConnection-Dj9P0SWE.mjs +140 -0
  32. package/dist/esm/chunks/{TextArea-CyVBzMoN.mjs → TextArea-DBmM6aQm.mjs} +1 -1
  33. package/dist/esm/chunks/{TextField-CYI2vbvO.mjs → TextField-DyUTMegV.mjs} +18 -16
  34. package/dist/esm/chunks/{UploadArea-Kez3VD4d.mjs → UploadArea-tT5V8q23.mjs} +3 -3
  35. package/dist/esm/chunks/WSConnection-DlYSitff.mjs +206 -0
  36. package/dist/esm/chunks/{sseStore-m3IPyLwJ.mjs → sseStore-DdqmnAAf.mjs} +2 -2
  37. package/dist/esm/chunks/windowStore-BOTh1g37.mjs +148 -0
  38. package/dist/esm/components/Button/index.mjs +2 -2
  39. package/dist/esm/components/FileList/index.mjs +2 -2
  40. package/dist/esm/components/Progress/index.mjs +3 -3
  41. package/dist/esm/components/PromptInput/index.mjs +4 -4
  42. package/dist/esm/components/TextArea/index.mjs +3 -3
  43. package/dist/esm/components/Textfield/index.mjs +3 -3
  44. package/dist/esm/components/UploadArea/index.mjs +7 -7
  45. package/dist/esm/hooks/useWindow.mjs +47 -11
  46. package/dist/esm/index.mjs +7 -7
  47. package/dist/esm/stores/SSE.mjs +2 -2
  48. package/dist/esm/stores/WS.mjs +59 -0
  49. package/dist/esm/stores/window.mjs +3 -1
  50. package/dist/esm/stores.mjs +5 -5
  51. package/dist/esm/utils/index.mjs +3 -1
  52. package/dist/esm/utils/objects/index.mjs +4 -139
  53. package/dist/types/hooks/index.d.ts +1 -1
  54. package/dist/types/hooks/useWindow/useWindow.d.ts +19 -0
  55. package/dist/types/index.d.ts +1 -1
  56. package/dist/types/stores/WS/_types.d.ts +17 -0
  57. package/dist/types/stores/WS/index.d.ts +2 -0
  58. package/dist/types/stores/WS/wsStore.d.ts +19 -0
  59. package/dist/types/stores/window/_types.d.ts +5 -0
  60. package/dist/types/stores/window/index.d.ts +3 -2
  61. package/dist/types/stores/window/windowStore.d.ts +8 -0
  62. package/dist/types/utils/index.d.ts +2 -2
  63. package/dist/types/utils/objects/WSConnection/WSConnection.d.ts +147 -0
  64. package/dist/types/utils/objects/index.d.ts +2 -0
  65. package/package.json +1 -1
  66. package/dist/cjs/chunks/windowStore-RaJswiHM.js +0 -70
  67. package/dist/esm/chunks/windowStore-CwW0i_le.mjs +0 -71
  68. package/dist/esm/chunks/{ProgressIndicator-h11R3FG1.mjs → ProgressIndicator-D2eairZl.mjs} +2 -2
@@ -0,0 +1,206 @@
1
+ "use strict";
2
+
3
+ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js");
4
+
5
+ exports.WSConnection = class {
6
+ get connected() {
7
+ var _a;
8
+ return (null === (_a = this.socket) || void 0 === _a ? void 0 : _a.readyState) === WebSocket.OPEN;
9
+ }
10
+ get connection() {
11
+ return this.socket;
12
+ }
13
+ constructor(options) {
14
+ var _a, _b, _c, _d, _e, _f, _g, _h;
15
+ if (this.socket = null, this.keepAliveTimer = null, this.reconnectIntervalTimer = null,
16
+ this.reconnectAttemptsCount = 0, this.manuallyClosed = !1,
17
+ /**
18
+ * Open handler
19
+ */
20
+ this.onOpen = event => tslib_es6.__awaiter(this, void 0, void 0, function*() {
21
+ var _a;
22
+ if (this.clearReconnectTimer(), this.reconnectAttemptsCount = 0, this.manuallyClosed = !1,
23
+ null === (_a = this.onOpenCallback) || void 0 === _a || _a.call(this, event), this.emitUnifiedMessage({
24
+ type: "open",
25
+ event: event
26
+ }), this.token) try {
27
+ const token = "string" == typeof this.token ? this.token : yield this.token();
28
+ if (!token) return void this.closeSocket({
29
+ code: 1e3,
30
+ reason: "Access token not provided"
31
+ });
32
+ this.send({
33
+ token: token
34
+ });
35
+ } catch (error) {
36
+ const errorEvent = new ErrorEvent("token error", {
37
+ message: "Failed to resolve access token",
38
+ error: error
39
+ });
40
+ return this.emitErrorEvent(errorEvent), void this.closeSocket({
41
+ code: 1011,
42
+ reason: "Access token resolution failed"
43
+ });
44
+ }
45
+ this.keepAlive && this.setKeepAlive();
46
+ }),
47
+ /**
48
+ * Message handler
49
+ */
50
+ this.onMessage = event => {
51
+ const data = this.parseEventData(event.data);
52
+ void 0 !== data && (this.emitParsedMessage(data), this.emitUnifiedMessage({
53
+ type: "message",
54
+ data: data,
55
+ event: event
56
+ }));
57
+ },
58
+ /**
59
+ * Close handler with the reconnection logic as needed
60
+ */
61
+ this.onClose = event => {
62
+ var _a;
63
+ null === (_a = this.onCloseCallback) || void 0 === _a || _a.call(this, event), this.emitUnifiedMessage({
64
+ type: "close",
65
+ event: event
66
+ }), this.closeSocket(event), this.shouldReconnect(event) && this.reconnect();
67
+ },
68
+ /**
69
+ * Error handler
70
+ */
71
+ this.onError = event => {
72
+ const error = event instanceof ErrorEvent ? event : new ErrorEvent("websocket error", {
73
+ message: "WebSocket connection error"
74
+ });
75
+ this.emitErrorEvent(error);
76
+ }, this.url = options.url, this.autoReconnect = null === (_a = options.autoReconnect) || void 0 === _a || _a,
77
+ this.reconnectInterval = null !== (_b = options.reconnectInterval) && void 0 !== _b ? _b : 1e3,
78
+ this.reconnectAttempts = null !== (_c = options.reconnectAttempts) && void 0 !== _c ? _c : 5,
79
+ this.reconnectFalloff = null === (_d = options.reconnectFalloff) || void 0 === _d || _d,
80
+ this.keepAlive = null === (_e = options.keepAlive) || void 0 === _e || _e, this.keepAliveInterval = null !== (_f = options.keepAliveInterval) && void 0 !== _f ? _f : 3e4,
81
+ this.unifiedMessages = null !== (_g = options.unifiedMessages) && void 0 !== _g && _g,
82
+ this.token = null !== (_h = options.token) && void 0 !== _h ? _h : "", this.onMessageCallback = options.onMessageCallback,
83
+ this.onOpenCallback = options.onOpenCallback, this.onCloseCallback = options.onCloseCallback,
84
+ this.onErrorCallback = options.onErrorCallback, "undefined" == typeof WebSocket) throw new TypeError("WebSocket is not supported in this environment.");
85
+ this.connect();
86
+ }
87
+ /**
88
+ * Gracefully handle sending messages
89
+ */ send(message) {
90
+ var _a;
91
+ const data = "string" == typeof message ? message : JSON.stringify(message);
92
+ null === (_a = this.socket) || void 0 === _a || _a.send(data);
93
+ }
94
+ /**
95
+ * Gracefully expose socket close
96
+ */ close(closeEvent) {
97
+ this.manuallyClosed = !0, this.clearReconnectTimer(), this.reconnectAttemptsCount = 0,
98
+ this.closeSocket(closeEvent);
99
+ }
100
+ /**
101
+ * Emit the parsed message content for standard mode
102
+ */ emitParsedMessage(data) {
103
+ if (this.unifiedMessages) return;
104
+ const callback = this.onMessageCallback;
105
+ null == callback || callback(data);
106
+ }
107
+ /**
108
+ * Emit a unified message if the unified flag is on
109
+ */ emitUnifiedMessage(message) {
110
+ if (!this.unifiedMessages) return;
111
+ const callback = this.onMessageCallback;
112
+ null == callback || callback(message);
113
+ }
114
+ /**
115
+ * Emit error
116
+ */ emitErrorEvent(error) {
117
+ var _a;
118
+ null === (_a = this.onErrorCallback) || void 0 === _a || _a.call(this, error), this.emitUnifiedMessage({
119
+ type: "error",
120
+ event: error
121
+ });
122
+ }
123
+ /**
124
+ * Safe JSON parse message content
125
+ */ parseEventData(rawData) {
126
+ if (rawData instanceof Blob || rawData instanceof ArrayBuffer || "string" == typeof rawData) {
127
+ if ("string" != typeof rawData) return rawData;
128
+ try {
129
+ return JSON.parse(rawData);
130
+ } catch (_a) {
131
+ return rawData;
132
+ }
133
+ }
134
+ this.emitErrorEvent(new ErrorEvent("parse error", {
135
+ message: "Unsupported websocket message data format"
136
+ }));
137
+ }
138
+ /**
139
+ * Attach socket listeners
140
+ */ attachEventListeners() {
141
+ this.socket && (this.socket.addEventListener("open", this.onOpen), this.socket.addEventListener("message", this.onMessage),
142
+ this.socket.addEventListener("close", this.onClose), this.socket.addEventListener("error", this.onError));
143
+ }
144
+ /**
145
+ * set keep alive pings
146
+ */ setKeepAlive() {
147
+ this.socket && this.keepAlive && (this.keepAliveTimer && clearInterval(this.keepAliveTimer),
148
+ this.keepAliveTimer = setInterval(() => {
149
+ var _a;
150
+ (null === (_a = this.socket) || void 0 === _a ? void 0 : _a.readyState) === WebSocket.OPEN && this.socket.send("ping");
151
+ }, this.keepAliveInterval));
152
+ }
153
+ /**
154
+ * Clear keep alive pings
155
+ */ clearKeepAliveTimer() {
156
+ this.keepAliveTimer && (clearInterval(this.keepAliveTimer), this.keepAliveTimer = null);
157
+ }
158
+ /**
159
+ * Clear reconnect timer
160
+ */ clearReconnectTimer() {
161
+ this.reconnectIntervalTimer && (clearTimeout(this.reconnectIntervalTimer), this.reconnectIntervalTimer = null);
162
+ }
163
+ /**
164
+ * detach all event listeners
165
+ */ detachEventListeners() {
166
+ this.socket && (this.socket.removeEventListener("open", this.onOpen), this.socket.removeEventListener("message", this.onMessage),
167
+ this.socket.removeEventListener("close", this.onClose), this.socket.removeEventListener("error", this.onError));
168
+ }
169
+ /**
170
+ * Connect the socket
171
+ */ connect() {
172
+ var _a, _b;
173
+ (null === (_a = this.socket) || void 0 === _a ? void 0 : _a.readyState) !== WebSocket.OPEN && (null === (_b = this.socket) || void 0 === _b ? void 0 : _b.readyState) !== WebSocket.CONNECTING && (this.socket = new WebSocket(this.url),
174
+ this.attachEventListeners());
175
+ }
176
+ /**
177
+ * Reconnect logic
178
+ */ reconnect() {
179
+ if (!this.autoReconnect || this.manuallyClosed) return;
180
+ if (this.reconnectIntervalTimer) return;
181
+ const nextAttempt = this.reconnectAttemptsCount + 1;
182
+ if (nextAttempt > this.reconnectAttempts) return;
183
+ this.reconnectAttemptsCount = nextAttempt;
184
+ const delay = this.getReconnectDelay(nextAttempt);
185
+ this.reconnectIntervalTimer = setTimeout(() => {
186
+ this.reconnectIntervalTimer = null, this.manuallyClosed || this.connect();
187
+ }, delay);
188
+ }
189
+ /**
190
+ * Calculate reconnect delay with fall off
191
+ */ getReconnectDelay(attempt) {
192
+ return this.reconnectFalloff ? this.reconnectInterval * Math.pow(2, attempt - 1) : this.reconnectInterval;
193
+ }
194
+ /**
195
+ * Determine if should reconnect based on the close event and props
196
+ */ shouldReconnect(event) {
197
+ var _a, _b;
198
+ return (null === (_a = this.socket) || void 0 === _a ? void 0 : _a.readyState) !== WebSocket.CONNECTING && (null === (_b = this.socket) || void 0 === _b ? void 0 : _b.readyState) !== WebSocket.OPEN && (this.autoReconnect && !this.manuallyClosed && !event.wasClean);
199
+ }
200
+ /**
201
+ * Internal close socket - does not reset retry logic
202
+ */ closeSocket(closeEvent) {
203
+ this.socket && (this.clearKeepAliveTimer(), this.detachEventListeners(), this.socket.readyState !== WebSocket.CLOSED && this.socket.readyState !== WebSocket.CLOSING && this.socket.close(closeEvent.code || 1e3, closeEvent.reason || "Clean shutdown"),
204
+ this.socket = null, this.keepAliveTimer = null);
205
+ }
206
+ };
@@ -4,7 +4,7 @@ var zustand = require("zustand");
4
4
 
5
5
  require("./tslib.es6-C8dZW5nY.js");
6
6
 
7
- var utils_objects = require("../utils/objects/index.js");
7
+ var SSEConnection = require("./SSEConnection-B_yE8cXz.js");
8
8
 
9
9
  const useSSEStore = zustand.create((set, get) => ({
10
10
  connections: [],
@@ -14,7 +14,7 @@ const useSSEStore = zustand.create((set, get) => ({
14
14
  addConnection: (name, options) => {
15
15
  const existingConnection = get().connections.find(c => c.name === name);
16
16
  null == existingConnection || existingConnection.connection.close();
17
- const userOnMessageCallback = options.onMessageCallback, connection = new utils_objects.SSEConnection(Object.assign(Object.assign({}, options), {
17
+ const userOnMessageCallback = options.onMessageCallback, connection = new SSEConnection.SSEConnection(Object.assign(Object.assign({}, options), {
18
18
  unifiedOnMessage: !0,
19
19
  onMessageCallback: message => {
20
20
  set({
@@ -53,7 +53,7 @@ exports.useIsConnected = connection => useSSEStore(state => {
53
53
  }), exports.useLastSSEMessage = () => useSSEStore.getState().message, exports.useMessage = function(type, connection) {
54
54
  return useSSEStore(state => {
55
55
  const sourceMessage = connection && !state.connections.some(c => c.name === connection) ? null : state.message;
56
- return type ? sourceMessage && sourceMessage.type === type ? "open" === type || "error" === type || "close" === type ? "event" in sourceMessage ? sourceMessage.event : null : "data" in sourceMessage ? sourceMessage.data : null : null : sourceMessage;
56
+ return type ? (null == sourceMessage ? void 0 : sourceMessage.type) !== type ? null : "open" === type || "error" === type || "close" === type ? "event" in sourceMessage ? sourceMessage.event : null : "data" in sourceMessage ? sourceMessage.data : null : sourceMessage;
57
57
  });
58
58
  }, exports.useSSE = () => useSSEStore(state => state.actions), exports.useSSEActions = useSSEActions,
59
59
  exports.useSSEStore = useSSEStore;
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+
3
+ var FormFactor, tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), zustand = require("zustand");
4
+
5
+ /**
6
+ * Form factor names
7
+ */
8
+ exports.FormFactor = void 0, (FormFactor = exports.FormFactor || (exports.FormFactor = {})).Mobile = "mobile",
9
+ FormFactor.Tablet = "tablet", FormFactor.Desktop = "desktop", FormFactor.DesktopL = "desktopL",
10
+ FormFactor.DesktopXL = "desktopXL";
11
+
12
+ /**
13
+ * Use bootstrap breakpoints
14
+ */
15
+ const bootstrapBreakPoints = {
16
+ [exports.FormFactor.Mobile]: 576,
17
+ [exports.FormFactor.Tablet]: 768,
18
+ [exports.FormFactor.Desktop]: 992,
19
+ [exports.FormFactor.DesktopL]: 1200,
20
+ [exports.FormFactor.DesktopXL]: 1400
21
+ }, orderedBps = Object.entries(bootstrapBreakPoints).sort((a, b) => -b[1] - a[1]), getFormFactor = width => {
22
+ if (!width || width <= 0) return exports.FormFactor.Mobile;
23
+ for (const [formFactor, breakpoint] of orderedBps) if (width >= breakpoint) return formFactor;
24
+ return exports.FormFactor.Mobile;
25
+ }, isBrowser = "undefined" != typeof globalThis && "undefined" != typeof navigator, initialSize = processWindowSize(), useWindowStore = zustand.create((set, get) => ({
26
+ formFactor: initialSize.formFactor,
27
+ viewportWidth: initialSize.viewportWidth,
28
+ viewportHeight: initialSize.viewportHeight,
29
+ height: initialSize.height,
30
+ isElectron: checkElectron(),
31
+ isAppleDevice: checkAppleDevice(),
32
+ isTouchDevice: checkTouchDevice(),
33
+ dpr: getDpr(),
34
+ locationError: null,
35
+ location: null,
36
+ gettingLocation: !1,
37
+ actions: {
38
+ initialize: () => {
39
+ if (!isBrowser) return () => {};
40
+ const win = getViewportWindow();
41
+ return null == win || win.addEventListener("resize", handleResize), handleResize(),
42
+ () => null == win ? void 0 : win.removeEventListener("resize", handleResize);
43
+ },
44
+ getLocation: () => tslib_es6.__awaiter(void 0, void 0, void 0, function*() {
45
+ if (!isBrowser || !("geolocation" in navigator)) {
46
+ const error = createLocationError("Geolocation is not supported in this browser.", 0);
47
+ throw set({
48
+ locationError: error,
49
+ gettingLocation: !1
50
+ }), error;
51
+ }
52
+ return set({
53
+ gettingLocation: !0,
54
+ locationError: null
55
+ }), yield new Promise((resolve, reject) => {
56
+ navigator.geolocation.getCurrentPosition(position => {
57
+ const location = {
58
+ latitude: position.coords.latitude,
59
+ longitude: position.coords.longitude,
60
+ accuracy: position.coords.accuracy,
61
+ altitude: position.coords.altitude,
62
+ altitudeAccuracy: position.coords.altitudeAccuracy,
63
+ heading: position.coords.heading,
64
+ speed: position.coords.speed,
65
+ timestamp: position.timestamp
66
+ };
67
+ set({
68
+ location: location,
69
+ gettingLocation: !1,
70
+ locationError: null
71
+ }), resolve(location);
72
+ }, err => {
73
+ const error = createLocationError(err.message, err.code);
74
+ set({
75
+ locationError: error,
76
+ gettingLocation: !1,
77
+ location: null
78
+ }), reject(error);
79
+ });
80
+ });
81
+ })
82
+ }
83
+ }));
84
+
85
+ function checkElectron() {
86
+ if (!isBrowser) return !1;
87
+ return navigator.userAgent.toLowerCase().includes("electron/");
88
+ }
89
+
90
+ function checkAppleDevice() {
91
+ return !!isBrowser && (navigator.platform.startsWith("Mac") || "iPhone" === navigator.platform);
92
+ }
93
+
94
+ function checkTouchDevice() {
95
+ return !!isBrowser && ("ontouchstart" in globalThis || navigator.maxTouchPoints > 0);
96
+ }
97
+
98
+ function getDpr() {
99
+ var _a;
100
+ return isBrowser && null !== (_a = Math.min(Math.ceil(window.devicePixelRatio), 3)) && void 0 !== _a ? _a : 1;
101
+ }
102
+
103
+ function createLocationError(message, code) {
104
+ return new Error(message, {
105
+ cause: {
106
+ code: code
107
+ }
108
+ });
109
+ }
110
+
111
+ function getViewportWindow() {
112
+ var _a;
113
+ return isBrowser ? null !== (_a = window.top) && void 0 !== _a ? _a : globalThis : null;
114
+ }
115
+
116
+ function handleResize() {
117
+ if (!isBrowser) return;
118
+ const {formFactor: formFactor, viewportWidth: viewportWidth, viewportHeight: viewportHeight, height: height} = processWindowSize();
119
+ useWindowStore.setState({
120
+ formFactor: formFactor,
121
+ viewportWidth: viewportWidth,
122
+ viewportHeight: viewportHeight,
123
+ height: height
124
+ });
125
+ }
126
+
127
+ function processWindowSize(top = !0) {
128
+ var _a, _b;
129
+ if (!isBrowser) return {
130
+ formFactor: exports.FormFactor.Mobile,
131
+ viewportWidth: -1,
132
+ viewportHeight: -1,
133
+ height: "100vh"
134
+ };
135
+ const viewport = top ? getViewportWindow() : globalThis, touch = checkTouchDevice(), windowWidth = null !== (_a = null == viewport ? void 0 : viewport.innerWidth) && void 0 !== _a ? _a : -1, windowHeight = null !== (_b = null == viewport ? void 0 : viewport.innerHeight) && void 0 !== _b ? _b : -1;
136
+ return {
137
+ formFactor: getFormFactor(windowWidth),
138
+ viewportWidth: windowWidth,
139
+ viewportHeight: windowHeight,
140
+ height: viewport && touch ? `${windowHeight}px` : "100vh"
141
+ };
142
+ }
143
+
144
+ exports.dpr = () => useWindowStore.getState().dpr, exports.formFactor = () => useWindowStore.getState().formFactor,
145
+ exports.gettingLocation = () => useWindowStore.getState().gettingLocation, exports.isAppleDevice = () => useWindowStore.getState().isAppleDevice,
146
+ exports.isElectron = () => useWindowStore.getState().isElectron, exports.isTouchDevice = () => useWindowStore.getState().isTouchDevice,
147
+ exports.location = () => useWindowStore.getState().location, exports.locationError = () => useWindowStore.getState().locationError,
148
+ exports.useDpr = () => useWindowStore(state => state.dpr), exports.useFormFactor = () => useWindowStore(state => state.formFactor),
149
+ exports.useGetLocation = () => useWindowStore(state => state.actions.getLocation),
150
+ exports.useGettingLocation = () => useWindowStore(state => state.gettingLocation),
151
+ exports.useInitializeWindow = () => useWindowStore(state => state.actions.initialize),
152
+ exports.useIsAppleDevice = () => useWindowStore(state => state.isAppleDevice), exports.useIsElectron = () => useWindowStore(state => state.isElectron),
153
+ exports.useIsTouchDevice = () => useWindowStore(state => state.isTouchDevice), exports.useLocation = () => useWindowStore(state => state.location),
154
+ exports.useLocationError = () => useWindowStore(state => state.locationError), exports.useViewportHeight = () => useWindowStore(state => state.viewportHeight),
155
+ exports.useViewportWidth = () => useWindowStore(state => state.viewportWidth), exports.useWindowStore = useWindowStore,
156
+ exports.viewportHeight = () => useWindowStore.getState().viewportHeight, exports.viewportWidth = () => useWindowStore.getState().viewportWidth;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var Button = require("../../chunks/Button-hg5kGC1P.js");
3
+ var Button = require("../../chunks/Button-krf4dQeL.js");
4
4
 
5
5
  require("../../chunks/tslib.es6-C8dZW5nY.js"), require("react/jsx-runtime"), require("motion/react"),
6
6
  require("react"), require("../../chunks/Badge-CY_DG6cD.js"), require("../../chunks/style-inject.es-CMuL-BfJ.js"),
@@ -8,5 +8,5 @@ require("../../chunks/Dot-_HCJ3qxd.js"), require("../../chunks/_types-C_zOsCbB.j
8
8
  require("../../hooks/useTheme.js"), require("../../theme/themes.js"), require("../../theme/colors.js"),
9
9
  require("../../theme/corners.js"), require("../../theme/elevations.js"), require("../../theme/motion.js"),
10
10
  require("../../theme/type.js"), require("../../hooks/useObserveTheme.js"), require("../../hooks/useWindow.js"),
11
- require("../../chunks/misc-C-M6KKsH.js"), require("../../chunks/ProgressIndicator-qjya_Yb5.js"),
11
+ require("../../chunks/misc-C-M6KKsH.js"), require("../../chunks/ProgressIndicator-DVD-gD3T.js"),
12
12
  require("../../chunks/sharedTypes-gCECyn2N.js"), exports.Button = Button.Button;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var FileList = require("../../chunks/FileList-BQgcnKPP.js");
3
+ var FileList = require("../../chunks/FileList-CkpMj-os.js");
4
4
 
5
5
  require("../../chunks/tslib.es6-C8dZW5nY.js"), require("react/jsx-runtime"), require("react"),
6
6
  require("../../chunks/misc-C-M6KKsH.js"), require("../../chunks/FileIcon-hYwcre20.js"),
@@ -8,5 +8,5 @@ require("../../hooks/useTheme.js"), require("../../theme/themes.js"), require(".
8
8
  require("../../theme/corners.js"), require("../../theme/elevations.js"), require("../../theme/motion.js"),
9
9
  require("../../theme/type.js"), require("../../hooks/useObserveTheme.js"), require("../../hooks/useWindow.js"),
10
10
  require("../../chunks/_types-C_zOsCbB.js"), require("../../chunks/style-inject.es-CMuL-BfJ.js"),
11
- require("../../chunks/ProgressIndicator-qjya_Yb5.js"), require("motion/react"),
11
+ require("../../chunks/ProgressIndicator-DVD-gD3T.js"), require("motion/react"),
12
12
  exports.FileList = FileList.FileList;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var ProgressIndicator = require("../../chunks/ProgressIndicator-qjya_Yb5.js");
3
+ var ProgressIndicator = require("../../chunks/ProgressIndicator-DVD-gD3T.js");
4
4
 
5
5
  require("react/jsx-runtime"), require("react"), require("../../hooks/useTheme.js"),
6
6
  require("../../theme/themes.js"), require("../../theme/colors.js"), require("../../theme/corners.js"),
7
7
  require("../../theme/elevations.js"), require("../../theme/motion.js"), require("../../theme/type.js"),
8
8
  require("../../hooks/useObserveTheme.js"), require("../../hooks/useWindow.js"),
9
- require("../../chunks/tslib.es6-C8dZW5nY.js"), require("../../chunks/_types-C_zOsCbB.js"),
9
+ require("../../chunks/_types-C_zOsCbB.js"), require("../../chunks/tslib.es6-C8dZW5nY.js"),
10
10
  require("../../chunks/misc-C-M6KKsH.js"), require("../../chunks/style-inject.es-CMuL-BfJ.js"),
11
11
  require("motion/react"), exports.DoneCheck = ProgressIndicator.DoneCheck, exports.ProgressIndicator = ProgressIndicator.ProgressIndicator;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
 
3
- var PromptInput = require("../../chunks/PromptInput-ZqHQUfXw.js");
3
+ var PromptInput = require("../../chunks/PromptInput-DULf5ock.js");
4
4
 
5
5
  require("react/jsx-runtime"), require("react"), require("../../hooks/useTheme.js"),
6
6
  require("../../theme/themes.js"), require("../../theme/colors.js"), require("../../theme/corners.js"),
7
7
  require("../../theme/elevations.js"), require("../../theme/motion.js"), require("../../theme/type.js"),
8
8
  require("../../hooks/useObserveTheme.js"), require("../../hooks/useWindow.js"),
9
- require("../../chunks/Button-hg5kGC1P.js"), require("../../chunks/tslib.es6-C8dZW5nY.js"),
9
+ require("../../chunks/Button-krf4dQeL.js"), require("../../chunks/tslib.es6-C8dZW5nY.js"),
10
10
  require("motion/react"), require("../../chunks/Badge-CY_DG6cD.js"), require("../../chunks/style-inject.es-CMuL-BfJ.js"),
11
11
  require("../../chunks/Dot-_HCJ3qxd.js"), require("../../chunks/_types-C_zOsCbB.js"),
12
- require("../../chunks/misc-C-M6KKsH.js"), require("../../chunks/ProgressIndicator-qjya_Yb5.js"),
13
- require("../../chunks/sharedTypes-gCECyn2N.js"), require("../../chunks/FileList-BQgcnKPP.js"),
12
+ require("../../chunks/misc-C-M6KKsH.js"), require("../../chunks/ProgressIndicator-DVD-gD3T.js"),
13
+ require("../../chunks/sharedTypes-gCECyn2N.js"), require("../../chunks/FileList-CkpMj-os.js"),
14
14
  require("../../chunks/FileIcon-hYwcre20.js"), exports.PromptInput = PromptInput.PromptInput;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var TextArea = require("../../chunks/TextArea-BhzVGfKA.js");
3
+ var TextArea = require("../../chunks/TextArea-BJCjRUEG.js");
4
4
 
5
5
  require("../../chunks/tslib.es6-C8dZW5nY.js"), require("react/jsx-runtime"), require("react"),
6
- require("../../chunks/Button-hg5kGC1P.js"), require("motion/react"), require("../../chunks/Badge-CY_DG6cD.js"),
6
+ require("../../chunks/Button-krf4dQeL.js"), require("motion/react"), require("../../chunks/Badge-CY_DG6cD.js"),
7
7
  require("../../chunks/style-inject.es-CMuL-BfJ.js"), require("../../chunks/Dot-_HCJ3qxd.js"),
8
8
  require("../../chunks/_types-C_zOsCbB.js"), require("../../hooks/useTheme.js"),
9
9
  require("../../theme/themes.js"), require("../../theme/colors.js"), require("../../theme/corners.js"),
10
10
  require("../../theme/elevations.js"), require("../../theme/motion.js"), require("../../theme/type.js"),
11
11
  require("../../hooks/useObserveTheme.js"), require("../../hooks/useWindow.js"),
12
- require("../../chunks/misc-C-M6KKsH.js"), require("../../chunks/ProgressIndicator-qjya_Yb5.js"),
12
+ require("../../chunks/misc-C-M6KKsH.js"), require("../../chunks/ProgressIndicator-DVD-gD3T.js"),
13
13
  require("../../chunks/sharedTypes-gCECyn2N.js"), exports.TextArea = TextArea.TextArea;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
 
3
- var TextField = require("../../chunks/TextField-hIjxrOG9.js");
3
+ var TextField = require("../../chunks/TextField-CjT26H_6.js");
4
4
 
5
5
  require("../../chunks/tslib.es6-C8dZW5nY.js"), require("react/jsx-runtime"), require("motion/react"),
6
6
  require("react"), require("../../hooks/useTheme.js"), require("../../theme/themes.js"),
7
7
  require("../../theme/colors.js"), require("../../theme/corners.js"), require("../../theme/elevations.js"),
8
8
  require("../../theme/motion.js"), require("../../theme/type.js"), require("../../hooks/useObserveTheme.js"),
9
- require("../../hooks/useWindow.js"), require("../../chunks/Button-hg5kGC1P.js"),
9
+ require("../../hooks/useWindow.js"), require("../../chunks/Button-krf4dQeL.js"),
10
10
  require("../../chunks/Badge-CY_DG6cD.js"), require("../../chunks/style-inject.es-CMuL-BfJ.js"),
11
11
  require("../../chunks/Dot-_HCJ3qxd.js"), require("../../chunks/_types-C_zOsCbB.js"),
12
- require("../../chunks/misc-C-M6KKsH.js"), require("../../chunks/ProgressIndicator-qjya_Yb5.js"),
12
+ require("../../chunks/misc-C-M6KKsH.js"), require("../../chunks/ProgressIndicator-DVD-gD3T.js"),
13
13
  require("../../chunks/sharedTypes-gCECyn2N.js"), require("../../chunks/IconButton-CBWmUZxR.js"),
14
14
  exports.TextField = TextField.TextField;
@@ -1,15 +1,14 @@
1
1
  "use strict";
2
2
 
3
- var UploadArea = require("../../chunks/UploadArea-B4GA06LW.js");
3
+ var UploadArea = require("../../chunks/UploadArea-BE6but3t.js");
4
4
 
5
5
  require("react/jsx-runtime"), require("react"), require("../../chunks/misc-C-M6KKsH.js"),
6
- require("../../chunks/tslib.es6-C8dZW5nY.js"), require("../../chunks/FileList-BQgcnKPP.js"),
7
- require("../../chunks/FileIcon-hYwcre20.js"), require("../../hooks/useTheme.js"),
8
- require("../../theme/themes.js"), require("../../theme/colors.js"), require("../../theme/corners.js"),
9
- require("../../theme/elevations.js"), require("../../theme/motion.js"), require("../../theme/type.js"),
10
- require("../../hooks/useObserveTheme.js"), require("../../hooks/useWindow.js"),
11
- require("../../chunks/_types-C_zOsCbB.js"), require("../../chunks/style-inject.es-CMuL-BfJ.js"),
12
- require("../../chunks/ProgressIndicator-qjya_Yb5.js"), require("motion/react"),
6
+ require("../../chunks/tslib.es6-C8dZW5nY.js"), require("../../chunks/_types-C_zOsCbB.js"),
7
+ require("../../hooks/useTheme.js"), require("../../theme/themes.js"), require("../../theme/colors.js"),
8
+ require("../../theme/corners.js"), require("../../theme/elevations.js"), require("../../theme/motion.js"),
9
+ require("../../theme/type.js"), require("../../hooks/useObserveTheme.js"), require("../../hooks/useWindow.js"),
10
+ require("../../chunks/style-inject.es-CMuL-BfJ.js"), require("../../chunks/ProgressIndicator-DVD-gD3T.js"),
11
+ require("motion/react"), require("../../chunks/FileList-CkpMj-os.js"), require("../../chunks/FileIcon-hYwcre20.js"),
13
12
  exports.UploadArea = UploadArea.UploadArea, exports.allTypes = UploadArea.allTypes,
14
13
  exports.audioTypes = UploadArea.audioTypes, exports.documentTypes = UploadArea.documentTypes,
15
14
  exports.imageTypes = UploadArea.imageTypes, exports.textTypes = UploadArea.textTypes,
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _a, FormFactor, React = require("react");
3
+ var FormFactor, React = require("react");
4
4
 
5
5
  /**
6
6
  * Form factor names
7
- */
8
- exports.FormFactor = void 0, (FormFactor = exports.FormFactor || (exports.FormFactor = {})).Mobile = "mobile",
7
+ */ exports.FormFactor = void 0, (FormFactor = exports.FormFactor || (exports.FormFactor = {})).Mobile = "mobile",
9
8
  FormFactor.Tablet = "tablet", FormFactor.Desktop = "desktop", FormFactor.DesktopL = "desktopL",
10
9
  FormFactor.DesktopXL = "desktopXL";
11
10
 
@@ -18,19 +17,50 @@ const bootstrapBreakPoints = {
18
17
  [exports.FormFactor.Desktop]: 992,
19
18
  [exports.FormFactor.DesktopL]: 1200,
20
19
  [exports.FormFactor.DesktopXL]: 1400
21
- };
22
-
23
- const isElectron = navigator.userAgent.toLowerCase().includes("electron/"), isAppleDevice = navigator.platform.startsWith("Mac") || "iPhone" === navigator.platform, dpr = null !== (_a = Math.min(Math.ceil(window.devicePixelRatio), 3)) && void 0 !== _a ? _a : 1, isTouchDevice = "ontouchstart" in globalThis || navigator.maxTouchPoints > 0, orderedBps = Object.entries(bootstrapBreakPoints).sort((a, b) => -b[1] - a[1]);
20
+ }, isBrowser = "undefined" != typeof window && "undefined" != typeof navigator;
24
21
 
25
22
  exports.useWindow = function(breakpoints = bootstrapBreakPoints, top = !0) {
26
- const [viewportWidth, setViewportWidth] = React.useState(null), [viewportHeight, setViewportHeight] = React.useState(null), [height, setHeight] = React.useState("100vh"), [formFactor, setFormFactor] = React.useState(exports.FormFactor.Desktop);
27
- React.useEffect(() => (handleResize(), window.addEventListener("resize", handleResize, !1),
28
- () => window.removeEventListener("resize", handleResize, !1)), []);
23
+ const isElectron = !!isBrowser && navigator.userAgent.toLowerCase().includes("electron/"), isAppleDevice = !!isBrowser && (navigator.platform.startsWith("Mac") || "iPhone" === navigator.platform), isTouchDevice = !!isBrowser && ("ontouchstart" in globalThis || navigator.maxTouchPoints > 0), dpr = isBrowser && null !== (_a = Math.min(Math.ceil(window.devicePixelRatio), 3)) && void 0 !== _a ? _a : 1;
24
+ var _a;
25
+ const [viewportWidth, setViewportWidth] = React.useState(null), [viewportHeight, setViewportHeight] = React.useState(null), [height, setHeight] = React.useState("100vh"), [formFactor, setFormFactor] = React.useState(exports.FormFactor.Desktop), [location, setLocation] = React.useState(null), [locationError, setLocationError] = React.useState(null), [gettingLocation, setGettingLocation] = React.useState(!1), geolocationSupported = "undefined" != typeof navigator && "geolocation" in navigator;
26
+ React.useEffect(() => {
27
+ if (isBrowser) return handleResize(), window.addEventListener("resize", handleResize, !1),
28
+ () => window.removeEventListener("resize", handleResize, !1);
29
+ }, []);
29
30
  const getFormFactor = React.useCallback(width => {
30
31
  if (!width || width <= 0) return exports.FormFactor.Mobile;
32
+ const orderedBps = Object.entries(breakpoints).sort((a, b) => b[1] - a[1]);
31
33
  for (const [formFactor, breakpoint] of orderedBps) if (width >= breakpoint) return formFactor;
32
34
  return exports.FormFactor.Mobile;
33
- }, []);
35
+ }, [ breakpoints ]), requestGeolocation = React.useCallback(() => {
36
+ if (!geolocationSupported) {
37
+ const error = new Error("Geolocation is not supported in this browser.", {
38
+ cause: {
39
+ code: 0
40
+ }
41
+ });
42
+ return void setLocationError(error);
43
+ }
44
+ setGettingLocation(!0), setLocationError(null), navigator.geolocation.getCurrentPosition(position => {
45
+ setLocation({
46
+ latitude: position.coords.latitude,
47
+ longitude: position.coords.longitude,
48
+ accuracy: position.coords.accuracy,
49
+ altitude: position.coords.altitude,
50
+ altitudeAccuracy: position.coords.altitudeAccuracy,
51
+ heading: position.coords.heading,
52
+ speed: position.coords.speed,
53
+ timestamp: position.timestamp
54
+ }), setGettingLocation(!1);
55
+ }, err => {
56
+ const error = new Error(err.message, {
57
+ cause: {
58
+ code: err.code
59
+ }
60
+ });
61
+ setLocationError(error), setGettingLocation(!1);
62
+ });
63
+ }, [ geolocationSupported ]);
34
64
  function handleResize() {
35
65
  var _a, _b, _c, _d;
36
66
  const windowWidth = top && null !== (_b = null === (_a = window.top) || void 0 === _a ? void 0 : _a.innerWidth) && void 0 !== _b ? _b : window.innerWidth, windowHeight = top && null !== (_d = null === (_c = window.top) || void 0 === _c ? void 0 : _c.innerHeight) && void 0 !== _d ? _d : window.innerHeight;
@@ -45,6 +75,11 @@ exports.useWindow = function(breakpoints = bootstrapBreakPoints, top = !0) {
45
75
  isElectron: isElectron,
46
76
  isAppleDevice: isAppleDevice,
47
77
  formFactor: formFactor,
48
- dpr: dpr
78
+ dpr: dpr,
79
+ geolocationSupported: geolocationSupported,
80
+ location: location,
81
+ locationError: locationError,
82
+ gettingLocation: gettingLocation,
83
+ requestGeolocation: requestGeolocation
49
84
  };
50
85
  };
package/dist/cjs/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var sharedTypes = require("./chunks/sharedTypes-gCECyn2N.js"), theme_themes = require("./theme/themes.js"), theme_colors = require("./theme/colors.js"), theme_elevations = require("./theme/elevations.js"), theme_motion = require("./theme/motion.js"), hooks_useTheme = require("./hooks/useTheme.js"), hooks_useObserveTheme = require("./hooks/useObserveTheme.js"), hooks_useDoubleClick = require("./hooks/useDoubleClick.js"), hooks_useToolTip = require("./hooks/useToolTip.js"), hooks_useKeyboardShortcuts = require("./hooks/useKeyboardShortcuts.js"), hooks_useLastUpdated = require("./hooks/useLastUpdated.js"), hooks_useLocalStore = require("./hooks/useLocalStore.js"), hooks_useWindow = require("./hooks/useWindow.js"), hooks_useObserveResize = require("./hooks/useObserveResize.js"), Avatar = require("./chunks/Avatar-YNcGDUzr.js"), AvatarGroup = require("./chunks/AvatarGroup-Dn5R1XIU.js"), Badge = require("./chunks/Badge-CY_DG6cD.js"), IconButton = require("./chunks/IconButton-CBWmUZxR.js"), Camera = require("./chunks/Camera-Dx_PT3pS.js"), CheckBox = require("./chunks/CheckBox-CLMxlUff.js"), DivInput = require("./chunks/DivInput-C73sqUF3.js"), DocIcons = require("./chunks/DocIcons-B5TcBqSH.js"), Dot = require("./chunks/Dot-_HCJ3qxd.js"), DrggablePanel = require("./chunks/DrggablePanel-BzvBBhS7.js"), DropDown = require("./chunks/DropDown-FZb52YxR.js"), ErrorSummary = require("./chunks/ErrorSummary-By4CjJ9a.js"), Grouper = require("./chunks/Grouper-Bgc1wrQM.js"), Overlay = require("./chunks/Overlay-DL0EJDyk.js"), FlexDiv = require("./chunks/FlexDiv-B3q6j3W9.js"), Pager = require("./chunks/Pager-TUxcWbmn.js"), PromptInput = require("./chunks/PromptInput-ZqHQUfXw.js"), ProgressIndicator = require("./chunks/ProgressIndicator-qjya_Yb5.js"), RadioButton = require("./chunks/RadioButton-Ce9uf54a.js"), RadioButtonList = require("./chunks/RadioButtonList-dhPr-Uhs.js"), Slider = require("./chunks/Slider-CrjpZooG.js"), Spacer = require("./chunks/Spacer-CtxV2Pww.js"), Switch = require("./chunks/Switch-Xqf0vwul.js"), TabBar = require("./chunks/TabBar-DuwypMB6.js"), TextArea = require("./chunks/TextArea-BhzVGfKA.js"), TextField = require("./chunks/TextField-hIjxrOG9.js"), providers_ThemeProvider = require("./providers/ThemeProvider.js"), Tip = require("./chunks/Tip-ik8-p4_4.js"), Toast = require("./chunks/Toast-DMUM1wuL.js"), Button = require("./chunks/Button-hg5kGC1P.js"), Chip = require("./chunks/Chip-CIy_Xe3i.js"), FileIcon = require("./chunks/FileIcon-hYwcre20.js"), _types = require("./chunks/_types-C_zOsCbB.js"), ButtonBar = require("./chunks/ButtonBar-C9Nm9faU.js"), Card = require("./chunks/Card-AgEMKJ4O.js"), Label = require("./chunks/Label-D15cIroT.js"), UploadArea = require("./chunks/UploadArea-B4GA06LW.js");
3
+ var sharedTypes = require("./chunks/sharedTypes-gCECyn2N.js"), theme_themes = require("./theme/themes.js"), theme_colors = require("./theme/colors.js"), theme_elevations = require("./theme/elevations.js"), theme_motion = require("./theme/motion.js"), hooks_useTheme = require("./hooks/useTheme.js"), hooks_useObserveTheme = require("./hooks/useObserveTheme.js"), hooks_useDoubleClick = require("./hooks/useDoubleClick.js"), hooks_useToolTip = require("./hooks/useToolTip.js"), hooks_useKeyboardShortcuts = require("./hooks/useKeyboardShortcuts.js"), hooks_useLastUpdated = require("./hooks/useLastUpdated.js"), hooks_useLocalStore = require("./hooks/useLocalStore.js"), hooks_useWindow = require("./hooks/useWindow.js"), hooks_useObserveResize = require("./hooks/useObserveResize.js"), Avatar = require("./chunks/Avatar-YNcGDUzr.js"), AvatarGroup = require("./chunks/AvatarGroup-Dn5R1XIU.js"), Badge = require("./chunks/Badge-CY_DG6cD.js"), IconButton = require("./chunks/IconButton-CBWmUZxR.js"), Camera = require("./chunks/Camera-Dx_PT3pS.js"), CheckBox = require("./chunks/CheckBox-CLMxlUff.js"), DivInput = require("./chunks/DivInput-C73sqUF3.js"), DocIcons = require("./chunks/DocIcons-B5TcBqSH.js"), Dot = require("./chunks/Dot-_HCJ3qxd.js"), DrggablePanel = require("./chunks/DrggablePanel-BzvBBhS7.js"), DropDown = require("./chunks/DropDown-FZb52YxR.js"), ErrorSummary = require("./chunks/ErrorSummary-By4CjJ9a.js"), Grouper = require("./chunks/Grouper-Bgc1wrQM.js"), Overlay = require("./chunks/Overlay-DL0EJDyk.js"), FlexDiv = require("./chunks/FlexDiv-B3q6j3W9.js"), Pager = require("./chunks/Pager-TUxcWbmn.js"), PromptInput = require("./chunks/PromptInput-DULf5ock.js"), ProgressIndicator = require("./chunks/ProgressIndicator-DVD-gD3T.js"), RadioButton = require("./chunks/RadioButton-Ce9uf54a.js"), RadioButtonList = require("./chunks/RadioButtonList-dhPr-Uhs.js"), Slider = require("./chunks/Slider-CrjpZooG.js"), Spacer = require("./chunks/Spacer-CtxV2Pww.js"), Switch = require("./chunks/Switch-Xqf0vwul.js"), TabBar = require("./chunks/TabBar-DuwypMB6.js"), TextArea = require("./chunks/TextArea-BJCjRUEG.js"), TextField = require("./chunks/TextField-CjT26H_6.js"), providers_ThemeProvider = require("./providers/ThemeProvider.js"), Tip = require("./chunks/Tip-ik8-p4_4.js"), Toast = require("./chunks/Toast-DMUM1wuL.js"), Button = require("./chunks/Button-krf4dQeL.js"), Chip = require("./chunks/Chip-CIy_Xe3i.js"), FileIcon = require("./chunks/FileIcon-hYwcre20.js"), _types = require("./chunks/_types-C_zOsCbB.js"), ButtonBar = require("./chunks/ButtonBar-C9Nm9faU.js"), Card = require("./chunks/Card-AgEMKJ4O.js"), Label = require("./chunks/Label-D15cIroT.js"), UploadArea = require("./chunks/UploadArea-BE6but3t.js");
4
4
 
5
5
  require("./theme/corners.js"), require("./theme/type.js"), require("react"), require("./chunks/tslib.es6-C8dZW5nY.js"),
6
6
  require("react/jsx-runtime"), require("./chunks/misc-C-M6KKsH.js"), require("./chunks/style-inject.es-CMuL-BfJ.js"),
7
- require("motion/react"), require("./chunks/colors-uej0anrN.js"), require("./chunks/FileList-BQgcnKPP.js"),
7
+ require("motion/react"), require("./chunks/colors-uej0anrN.js"), require("./chunks/FileList-CkpMj-os.js"),
8
8
  Object.defineProperty(exports, "ToolTipType", {
9
9
  enumerable: !0,
10
10
  get: function() {