@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.cjs
CHANGED
|
@@ -1243,14 +1243,8 @@ class ObservableSanityClient {
|
|
|
1243
1243
|
live;
|
|
1244
1244
|
projects;
|
|
1245
1245
|
users;
|
|
1246
|
-
/**
|
|
1247
|
-
* Private properties
|
|
1248
|
-
*/
|
|
1249
1246
|
#clientConfig;
|
|
1250
1247
|
#httpRequest;
|
|
1251
|
-
/**
|
|
1252
|
-
* Instance properties
|
|
1253
|
-
*/
|
|
1254
1248
|
listen = _listen;
|
|
1255
1249
|
constructor(httpRequest, config$1 = config.defaultConfig) {
|
|
1256
1250
|
this.config(config$1), 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);
|
|
@@ -1396,14 +1390,8 @@ class SanityClient {
|
|
|
1396
1390
|
* Observable version of the Sanity client, with the same configuration as the promise-based one
|
|
1397
1391
|
*/
|
|
1398
1392
|
observable;
|
|
1399
|
-
/**
|
|
1400
|
-
* Private properties
|
|
1401
|
-
*/
|
|
1402
1393
|
#clientConfig;
|
|
1403
1394
|
#httpRequest;
|
|
1404
|
-
/**
|
|
1405
|
-
* Instance properties
|
|
1406
|
-
*/
|
|
1407
1395
|
listen = _listen;
|
|
1408
1396
|
constructor(httpRequest, config$1 = config.defaultConfig) {
|
|
1409
1397
|
this.config(config$1), 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$1);
|
|
@@ -1500,8 +1488,8 @@ class SanityClient {
|
|
|
1500
1488
|
* @param operations - Optional object of patch operations to initialize the patch instance with
|
|
1501
1489
|
* @returns Patch instance - call `.commit()` to perform the operations defined
|
|
1502
1490
|
*/
|
|
1503
|
-
patch(
|
|
1504
|
-
return new Patch(
|
|
1491
|
+
patch(selection, operations) {
|
|
1492
|
+
return new Patch(selection, operations, this);
|
|
1505
1493
|
}
|
|
1506
1494
|
/**
|
|
1507
1495
|
* Create a new transaction of mutations
|
|
@@ -1582,7 +1570,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
1582
1570
|
return config.printNoDefaultExport(), createClient2(config$1);
|
|
1583
1571
|
};
|
|
1584
1572
|
}
|
|
1585
|
-
var name = "@sanity/client", version = "7.0.
|
|
1573
|
+
var name = "@sanity/client", version = "7.0.1-canary.1";
|
|
1586
1574
|
const middleware = [
|
|
1587
1575
|
middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
|
|
1588
1576
|
middleware$1.headers({ "User-Agent": `${name} ${version}` }),
|