@proveanything/smartlinks-utils-ui 1.13.1 → 1.13.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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { g as ASSET_MIME_FILTERS, A as AssetItem, h as AssetMimeFilter, a as AssetPicker, b as AssetPickerMode, c as AssetPickerProps, d as AssetPickerSelection, e as AssetScope, f as AssetViewMode, u as useAssets } from './useAssets-tRkW00zx.js';
1
+ export { g as ASSET_MIME_FILTERS, A as AssetItem, h as AssetMimeFilter, a as AssetPicker, b as AssetPickerMode, c as AssetPickerProps, d as AssetPickerSelection, e as AssetScope, f as AssetViewMode, u as useAssets } from './useAssets-Cs0OJs-x.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { ReactNode } from 'react';
4
4
  export { ConditionsEditor } from './components/ConditionsEditor/index.js';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { ASSET_MIME_FILTERS, AssetPicker, useAssets } from './chunk-HKL24TFC.js';
1
+ export { ASSET_MIME_FILTERS, AssetPicker, useAssets } from './chunk-AWWWHHLL.js';
2
2
  export { ConditionsEditor } from './chunk-7UBXTFZQ.js';
3
3
  export { IconPicker } from './chunk-JQPS5XPJ.js';
4
4
  export { CATEGORY_FALLBACKS, CATEGORY_LABELS, FontPicker, GOOGLE_FONTS_CATALOG, getGoogleFontUrl } from './chunk-OTJV62XV.js';
@@ -228,8 +228,11 @@ interface UseAssetsReturn {
228
228
  loading: boolean;
229
229
  error: string | null;
230
230
  refresh: () => Promise<void>;
231
- upload: (file: File, onProgress?: (pct: number) => void) => Promise<AssetItem | null>;
232
- uploadFromUrl: (url: string, name?: string) => Promise<AssetItem | null>;
231
+ /** Optional `scopeOverride` lets callers upload to a wider/narrower scope
232
+ * than the hook's default (e.g. "make global" toggles upload to collection
233
+ * even when the picker is showing the product tab). */
234
+ upload: (file: File, onProgress?: (pct: number) => void, scopeOverride?: AssetScope) => Promise<AssetItem | null>;
235
+ uploadFromUrl: (url: string, name?: string, scopeOverride?: AssetScope) => Promise<AssetItem | null>;
233
236
  /**
234
237
  * Server-side ingest — the SmartLinks backend fetches the URL directly and
235
238
  * stores it in the CDN. Use for AI-generated images, stock photos, or any
@@ -238,6 +241,7 @@ interface UseAssetsReturn {
238
241
  uploadFromRemoteUrl: (url: string, opts?: {
239
242
  name?: string;
240
243
  metadata?: Record<string, any>;
244
+ scopeOverride?: AssetScope;
241
245
  }) => Promise<AssetItem | null>;
242
246
  /**
243
247
  * Soft-delete via `asset.deleteAdmin` (recoverable for `graceDays`, default 30).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks-utils-ui",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "description": "Reusable React components for SmartLinks microapps — Asset Picker, Conditions Editor, Icon Picker, and more.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",