@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.js
CHANGED
|
@@ -1226,14 +1226,8 @@ class ObservableSanityClient {
|
|
|
1226
1226
|
live;
|
|
1227
1227
|
projects;
|
|
1228
1228
|
users;
|
|
1229
|
-
/**
|
|
1230
|
-
* Private properties
|
|
1231
|
-
*/
|
|
1232
1229
|
#clientConfig;
|
|
1233
1230
|
#httpRequest;
|
|
1234
|
-
/**
|
|
1235
|
-
* Instance properties
|
|
1236
|
-
*/
|
|
1237
1231
|
listen = _listen;
|
|
1238
1232
|
constructor(httpRequest, config = defaultConfig) {
|
|
1239
1233
|
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);
|
|
@@ -1379,14 +1373,8 @@ class SanityClient {
|
|
|
1379
1373
|
* Observable version of the Sanity client, with the same configuration as the promise-based one
|
|
1380
1374
|
*/
|
|
1381
1375
|
observable;
|
|
1382
|
-
/**
|
|
1383
|
-
* Private properties
|
|
1384
|
-
*/
|
|
1385
1376
|
#clientConfig;
|
|
1386
1377
|
#httpRequest;
|
|
1387
|
-
/**
|
|
1388
|
-
* Instance properties
|
|
1389
|
-
*/
|
|
1390
1378
|
listen = _listen;
|
|
1391
1379
|
constructor(httpRequest, config = defaultConfig) {
|
|
1392
1380
|
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);
|
|
@@ -1483,8 +1471,8 @@ class SanityClient {
|
|
|
1483
1471
|
* @param operations - Optional object of patch operations to initialize the patch instance with
|
|
1484
1472
|
* @returns Patch instance - call `.commit()` to perform the operations defined
|
|
1485
1473
|
*/
|
|
1486
|
-
patch(
|
|
1487
|
-
return new Patch(
|
|
1474
|
+
patch(selection, operations) {
|
|
1475
|
+
return new Patch(selection, operations, this);
|
|
1488
1476
|
}
|
|
1489
1477
|
/**
|
|
1490
1478
|
* Create a new transaction of mutations
|
|
@@ -1565,7 +1553,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
1565
1553
|
return printNoDefaultExport(), createClient2(config);
|
|
1566
1554
|
};
|
|
1567
1555
|
}
|
|
1568
|
-
var name = "@sanity/client", version = "7.0.0";
|
|
1556
|
+
var name = "@sanity/client", version = "7.0.1-canary.0";
|
|
1569
1557
|
const middleware = [
|
|
1570
1558
|
debug({ verbose: !0, namespace: "sanity:client" }),
|
|
1571
1559
|
headers({ "User-Agent": `${name} ${version}` }),
|