@sanity/client 7.0.0 → 7.0.1-canary.1
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.browser.cjs +2 -14
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +1520 -379
- package/dist/index.browser.d.ts +1520 -379
- package/dist/index.browser.js +2 -14
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +3 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1520 -379
- package/dist/index.d.ts +1520 -379
- package/dist/index.js +3 -15
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +1527 -386
- package/dist/stega.browser.d.ts +1527 -386
- package/dist/stega.d.cts +1527 -386
- package/dist/stega.d.ts +1527 -386
- package/package.json +1 -1
- package/src/SanityClient.ts +1078 -17
- package/src/assets/AssetsClient.ts +98 -2
- package/umd/sanityClient.js +2 -14
package/dist/index.browser.cjs
CHANGED
|
@@ -1401,14 +1401,8 @@ class ObservableSanityClient {
|
|
|
1401
1401
|
live;
|
|
1402
1402
|
projects;
|
|
1403
1403
|
users;
|
|
1404
|
-
/**
|
|
1405
|
-
* Private properties
|
|
1406
|
-
*/
|
|
1407
1404
|
#clientConfig;
|
|
1408
1405
|
#httpRequest;
|
|
1409
|
-
/**
|
|
1410
|
-
* Instance properties
|
|
1411
|
-
*/
|
|
1412
1406
|
listen = _listen;
|
|
1413
1407
|
constructor(httpRequest, config = defaultConfig) {
|
|
1414
1408
|
this.config(config), this.#httpRequest = httpRequest, this.assets = new ObservableAssetsClient(this, this.#httpRequest), this.datasets = new ObservableDatasetsClient(this, this.#httpRequest), this.live = new LiveClient(this), this.projects = new ObservableProjectsClient(this, this.#httpRequest), this.users = new ObservableUsersClient(this, this.#httpRequest);
|
|
@@ -1554,14 +1548,8 @@ class SanityClient {
|
|
|
1554
1548
|
* Observable version of the Sanity client, with the same configuration as the promise-based one
|
|
1555
1549
|
*/
|
|
1556
1550
|
observable;
|
|
1557
|
-
/**
|
|
1558
|
-
* Private properties
|
|
1559
|
-
*/
|
|
1560
1551
|
#clientConfig;
|
|
1561
1552
|
#httpRequest;
|
|
1562
|
-
/**
|
|
1563
|
-
* Instance properties
|
|
1564
|
-
*/
|
|
1565
1553
|
listen = _listen;
|
|
1566
1554
|
constructor(httpRequest, config = defaultConfig) {
|
|
1567
1555
|
this.config(config), this.#httpRequest = httpRequest, this.assets = new AssetsClient(this, this.#httpRequest), this.datasets = new DatasetsClient(this, this.#httpRequest), this.live = new LiveClient(this), this.projects = new ProjectsClient(this, this.#httpRequest), this.users = new UsersClient(this, this.#httpRequest), this.observable = new ObservableSanityClient(httpRequest, config);
|
|
@@ -1658,8 +1646,8 @@ class SanityClient {
|
|
|
1658
1646
|
* @param operations - Optional object of patch operations to initialize the patch instance with
|
|
1659
1647
|
* @returns Patch instance - call `.commit()` to perform the operations defined
|
|
1660
1648
|
*/
|
|
1661
|
-
patch(
|
|
1662
|
-
return new Patch(
|
|
1649
|
+
patch(selection, operations) {
|
|
1650
|
+
return new Patch(selection, operations, this);
|
|
1663
1651
|
}
|
|
1664
1652
|
/**
|
|
1665
1653
|
* Create a new transaction of mutations
|