sanity-plugin-media 6.1.8 → 6.3.0
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/README.md +8 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +566 -436
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ _Individual asset view_
|
|
|
30
30
|
- Manage tags directly within the plugin
|
|
31
31
|
- Get previews for audio and video files
|
|
32
32
|
- Easily select and delete multiple assets in bulk
|
|
33
|
+
- Shift-click to pick a run of assets, Ctrl-click (Cmd-click on macOS) to pick individual assets
|
|
33
34
|
|
|
34
35
|
#### Granular search tools
|
|
35
36
|
|
|
@@ -124,6 +125,12 @@ export default defineConfig({
|
|
|
124
125
|
// any of these tags are omitted from the Media browser grid and asset picker queries,
|
|
125
126
|
// and those tags are hidden in the tag sidebar and tag search facet. The asset edit
|
|
126
127
|
// dialog still lists all tags so you can assign or remove them on an open asset.
|
|
128
|
+
showMediaLibraryAssets: true,
|
|
129
|
+
// boolean (optional, default true) - when false, assets managed by the Sanity Media
|
|
130
|
+
// Library are omitted from the Media browser grid, asset picker queries, folder counts
|
|
131
|
+
// and realtime listeners. Media Library assets are detected by their `media` reference
|
|
132
|
+
// (`media-library:...`) - the reliable signal - with `source.name`
|
|
133
|
+
// (`sanity-media-library`) as an optional confirmation.
|
|
127
134
|
components: {
|
|
128
135
|
details: CustomDetails,
|
|
129
136
|
// Custom component for asset details (see below)
|
|
@@ -357,6 +364,7 @@ Note that tags and folders are namespaced within `opt.media`. Tag names are acce
|
|
|
357
364
|
- Asset folder assignment is stored as a weak reference at `opt.media.folder`
|
|
358
365
|
- The default asset browser view shows all assets. Opening a folder filters the asset list to assets assigned to that folder.
|
|
359
366
|
- You can move selected assets to a folder from the selection bar, remove selected assets from the current folder, or change/remove an individual asset's folder from the asset details dialog
|
|
367
|
+
- You can also drag assets onto a folder in the folder panel. Dragging a picked asset moves every picked asset. Dropping on "All assets" removes them from their folder
|
|
360
368
|
- Deleting a folder deletes only the folder document. Assets assigned to it stay in the library and have their folder assignment removed; nested folders move up one level.
|
|
361
369
|
|
|
362
370
|
</details>
|
package/dist/index.d.ts
CHANGED
|
@@ -139,6 +139,15 @@ type MediaToolOptions = {
|
|
|
139
139
|
* https://www.sanity.io/docs/studio/localization#k4da239411955
|
|
140
140
|
*/
|
|
141
141
|
locales?: Locale[];
|
|
142
|
+
/**
|
|
143
|
+
* When `false`, assets managed by the Sanity Media Library are omitted from
|
|
144
|
+
* the Media browser grid, asset source/picker queries, folder counts and
|
|
145
|
+
* realtime listeners. Media Library assets are detected by their `media`
|
|
146
|
+
* reference (`media-library:...`) — the reliable signal — with `source.name`
|
|
147
|
+
* (`sanity-media-library`) as an optional confirmation. Defaults to `true`
|
|
148
|
+
* (Media Library assets are shown).
|
|
149
|
+
*/
|
|
150
|
+
showMediaLibraryAssets?: boolean;
|
|
142
151
|
};
|
|
143
152
|
type Locale = {
|
|
144
153
|
title: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/FormBuilderTool/index.tsx","../src/components/DialogAssetEdit/Details.tsx","../src/formSchema/index.ts","../src/types/index.ts","../src/plugin.tsx","../src/components/AutoTagInputWrapper/index.tsx","../src/utils/mediaField.ts"],"mappings":";;;;;;;;cAQM,kBAAe,OAAW,8CAAyB,IAAA;KCsB7C;EACV;EACA,kBAAkB;EAClB,SAAS,QAAQ;EACjB,QAAQ,YAAY;EACpB,UAAU,gBAAgB;EAC1B,eAAe;EACf,iBAAiB;EACjB,cAAc;EACd;EACA;EACA;EACA;EACA;IACE;IACA;;EAEF,UAAU;;cCjCC,iBAAe,EAAA;;;;;;;;;;iBAKZ,mBAAmB;EAAW;MAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCJ/C;EACV;;KAGU;EACV;EACA;EACA;IACE,UAAU,cACR;MAAgB,uBAAuB,OAAO,iBAAiB,IAAI;;;EAGvE;IACE;IACA;;EAEF;;;;;;;EAOA;;;;;EAKA,UAAU;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/FormBuilderTool/index.tsx","../src/components/DialogAssetEdit/Details.tsx","../src/formSchema/index.ts","../src/types/index.ts","../src/plugin.tsx","../src/components/AutoTagInputWrapper/index.tsx","../src/utils/mediaField.ts"],"mappings":";;;;;;;;cAQM,kBAAe,OAAW,8CAAyB,IAAA;KCsB7C;EACV;EACA,kBAAkB;EAClB,SAAS,QAAQ;EACjB,QAAQ,YAAY;EACpB,UAAU,gBAAgB;EAC1B,eAAe;EACf,iBAAiB;EACjB,cAAc;EACd;EACA;EACA;EACA;EACA;IACE;IACA;;EAEF,UAAU;;cCjCC,iBAAe,EAAA;;;;;;;;;;iBAKZ,mBAAmB;EAAW;MAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCJ/C;EACV;;KAGU;EACV;EACA;EACA;IACE,UAAU,cACR;MAAgB,uBAAuB,OAAO,iBAAiB,IAAI;;;EAGvE;IACE;IACA;;EAEF;;;;;;;EAOA;;;;;EAKA,UAAU;;;;;;;;;EASV;;KAGU;EACV;EACA;GACC;;KAGE,2BAA2B;KAE3B;EACH,UAAU;EACV,cAAc;EACd;IACE;MACE,SAAS;MACT,OAAO;;;EAGX,QAAQ;;KAYE,QAAQ,YAAY;KAEpB,gBAAgB,EAAE,MAAM,kBAAkB;KAgJ1C,YAAY,sBACtB;EACE;;KAuBQ,aAAa,2BACvB;EACE;EACA,aAAa;;KAqBL;EACV;EACA;EACA;;KA0IU,kBAAkB,EAAE,aAAa;cClZhC;;;;;;cAmBA,wBAAK,cAAA;KCrBN,oBAAoB;EAC9B;;;;;;;;;;;;;;;;;;;;;iBAsBc,aAAa,OAAO,oCAAiB,IAAA;KC7BhD,wBAAwB,KAAK,8BAChC;EACE;EACA;EACA,UAAU;;KAGT,uBAAuB,KAAK,6BAC/B;EACE;EACA;EACA,UAAU;;KAGT,wBAAwB,KAAK,8BAChC;EACE,UAAU;IAA8B;;EACxC;IAAa,cAAc;;IACzB,kBACJ;KAEG,uBAAuB,KAAK,6BAC/B;EACE,UAAU;IAA6B;;EACvC;IAAa,cAAc;;IACzB,kBACJ;;;;;;;;;;;;;;;;;;;;;;iBAuBc,WAAW,QAAQ,wBAAwB;iBAC3C,WAAW,QAAQ,uBAAuB"}
|