@masters-union/union-stack 0.3.9 → 0.3.11

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/react.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk27RCQJAE_cjs = require('./chunk-27RCQJAE.cjs');
4
- require('./chunk-ZOOUTUWU.cjs');
3
+ var chunkNIO443GV_cjs = require('./chunk-NIO443GV.cjs');
4
+ require('./chunk-NOAB2Q4B.cjs');
5
5
  var React3 = require('react');
6
6
 
7
7
  function _interopNamespace(e) {
@@ -27,7 +27,7 @@ var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
27
27
  var UnionStackContext = React3__namespace.createContext(null);
28
28
  function UnionStackProvider({ children, ...cfg }) {
29
29
  const client = React3__namespace.useMemo(
30
- () => new chunk27RCQJAE_cjs.UnionStackClient(cfg),
30
+ () => new chunkNIO443GV_cjs.UnionStackClient(cfg),
31
31
  // eslint-disable-next-line react-hooks/exhaustive-deps
32
32
  [cfg.apiKey, cfg.chunkSize]
33
33
  );
package/dist/react.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { U as UnionStackClient, P as PickerOptions } from './client-DP2jyZzm.cjs';
3
- export { b as PickerBranding, a as PickerHandle, c as PickerTheme } from './client-DP2jyZzm.cjs';
4
- import { C as ClientConfig, e as UploadedFile, a as PickedFile, U as UploadError, B as BatchUploadOptions, P as PickResponse } from './types-50o0pbff.cjs';
5
- export { b as ProgressEvent, c as UploadErrorCode, d as UploadOptions } from './types-50o0pbff.cjs';
2
+ import { U as UnionStackClient, P as PickerOptions } from './client-DOTa3Mai.cjs';
3
+ export { b as PickerBranding, a as PickerHandle, c as PickerTheme } from './client-DOTa3Mai.cjs';
4
+ import { C as ClientConfig, e as UploadedFile, a as PickedFile, U as UploadError, B as BatchUploadOptions, P as PickResponse } from './types-ZCfjNZls.cjs';
5
+ export { b as ProgressEvent, c as UploadErrorCode, d as UploadOptions } from './types-ZCfjNZls.cjs';
6
6
 
7
7
  interface UnionStackProviderProps extends ClientConfig {
8
8
  children: React.ReactNode;
package/dist/react.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { U as UnionStackClient, P as PickerOptions } from './client-B1KPVLJR.js';
3
- export { b as PickerBranding, a as PickerHandle, c as PickerTheme } from './client-B1KPVLJR.js';
4
- import { C as ClientConfig, e as UploadedFile, a as PickedFile, U as UploadError, B as BatchUploadOptions, P as PickResponse } from './types-50o0pbff.js';
5
- export { b as ProgressEvent, c as UploadErrorCode, d as UploadOptions } from './types-50o0pbff.js';
2
+ import { U as UnionStackClient, P as PickerOptions } from './client-C0qMOfb3.js';
3
+ export { b as PickerBranding, a as PickerHandle, c as PickerTheme } from './client-C0qMOfb3.js';
4
+ import { C as ClientConfig, e as UploadedFile, a as PickedFile, U as UploadError, B as BatchUploadOptions, P as PickResponse } from './types-ZCfjNZls.js';
5
+ export { b as ProgressEvent, c as UploadErrorCode, d as UploadOptions } from './types-ZCfjNZls.js';
6
6
 
7
7
  interface UnionStackProviderProps extends ClientConfig {
8
8
  children: React.ReactNode;
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
- import { UnionStackClient } from './chunk-DV5YSBNS.js';
2
- import './chunk-YNWENXR2.js';
1
+ import { UnionStackClient } from './chunk-SP4HHLZB.js';
2
+ import './chunk-Z5PZQVST.js';
3
3
  import * as React3 from 'react';
4
4
 
5
5
  var UnionStackContext = React3.createContext(null);
@@ -112,6 +112,19 @@ interface PickerConfig {
112
112
  chunkSizeBytes: number;
113
113
  allowedMimeTypes: string[];
114
114
  };
115
+ /**
116
+ * Per-key image rules, enforced client-side by the picker. `cropRatioW/H`
117
+ * lock the crop box to a fixed ratio (both null = free-form). `forceCrop`
118
+ * requires every image to be cropped to that ratio before upload.
119
+ * `minWidth/minHeight` reject images below those pixel dimensions.
120
+ */
121
+ image?: {
122
+ cropRatioW: number | null;
123
+ cropRatioH: number | null;
124
+ forceCrop: boolean;
125
+ minWidth: number | null;
126
+ minHeight: number | null;
127
+ } | null;
115
128
  mode: 'live' | 'test';
116
129
  /**
117
130
  * Server-issued deprecation notice when this SDK version is below the
@@ -112,6 +112,19 @@ interface PickerConfig {
112
112
  chunkSizeBytes: number;
113
113
  allowedMimeTypes: string[];
114
114
  };
115
+ /**
116
+ * Per-key image rules, enforced client-side by the picker. `cropRatioW/H`
117
+ * lock the crop box to a fixed ratio (both null = free-form). `forceCrop`
118
+ * requires every image to be cropped to that ratio before upload.
119
+ * `minWidth/minHeight` reject images below those pixel dimensions.
120
+ */
121
+ image?: {
122
+ cropRatioW: number | null;
123
+ cropRatioH: number | null;
124
+ forceCrop: boolean;
125
+ minWidth: number | null;
126
+ minHeight: number | null;
127
+ } | null;
115
128
  mode: 'live' | 'test';
116
129
  /**
117
130
  * Server-issued deprecation notice when this SDK version is below the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masters-union/union-stack",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "UnionStack — file upload SDK. Direct-to-R2 multipart uploads with a small client surface.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",