@sanity/client 7.0.0 → 7.0.1-canary.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/dist/index.browser.cjs +2 -14
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +1366 -337
- package/dist/index.browser.d.ts +1366 -337
- 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 +1366 -337
- package/dist/index.d.ts +1366 -337
- package/dist/index.js +3 -15
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +1403 -374
- package/dist/stega.browser.d.ts +1403 -374
- package/dist/stega.d.cts +1403 -374
- package/dist/stega.d.ts +1403 -374
- package/package.json +1 -1
- package/src/SanityClient.ts +1069 -17
- package/umd/sanityClient.js +2 -14
package/dist/index.browser.js
CHANGED
|
@@ -1383,14 +1383,8 @@ class ObservableSanityClient {
|
|
|
1383
1383
|
live;
|
|
1384
1384
|
projects;
|
|
1385
1385
|
users;
|
|
1386
|
-
/**
|
|
1387
|
-
* Private properties
|
|
1388
|
-
*/
|
|
1389
1386
|
#clientConfig;
|
|
1390
1387
|
#httpRequest;
|
|
1391
|
-
/**
|
|
1392
|
-
* Instance properties
|
|
1393
|
-
*/
|
|
1394
1388
|
listen = _listen;
|
|
1395
1389
|
constructor(httpRequest, config = defaultConfig) {
|
|
1396
1390
|
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);
|
|
@@ -1536,14 +1530,8 @@ class SanityClient {
|
|
|
1536
1530
|
* Observable version of the Sanity client, with the same configuration as the promise-based one
|
|
1537
1531
|
*/
|
|
1538
1532
|
observable;
|
|
1539
|
-
/**
|
|
1540
|
-
* Private properties
|
|
1541
|
-
*/
|
|
1542
1533
|
#clientConfig;
|
|
1543
1534
|
#httpRequest;
|
|
1544
|
-
/**
|
|
1545
|
-
* Instance properties
|
|
1546
|
-
*/
|
|
1547
1535
|
listen = _listen;
|
|
1548
1536
|
constructor(httpRequest, config = defaultConfig) {
|
|
1549
1537
|
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);
|
|
@@ -1640,8 +1628,8 @@ class SanityClient {
|
|
|
1640
1628
|
* @param operations - Optional object of patch operations to initialize the patch instance with
|
|
1641
1629
|
* @returns Patch instance - call `.commit()` to perform the operations defined
|
|
1642
1630
|
*/
|
|
1643
|
-
patch(
|
|
1644
|
-
return new Patch(
|
|
1631
|
+
patch(selection, operations) {
|
|
1632
|
+
return new Patch(selection, operations, this);
|
|
1645
1633
|
}
|
|
1646
1634
|
/**
|
|
1647
1635
|
* Create a new transaction of mutations
|