@uniformdev/assets 20.72.2-alpha.3 → 20.72.3-alpha.2
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.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/package.json +6 -5
package/dist/index.d.mts
CHANGED
|
@@ -1818,14 +1818,20 @@ type ImageFromTransformProps = XOR<{
|
|
|
1818
1818
|
y: number;
|
|
1819
1819
|
};
|
|
1820
1820
|
}>;
|
|
1821
|
+
/**
|
|
1822
|
+
* Fluent API for reading and transforming an asset image URL.
|
|
1823
|
+
*/
|
|
1824
|
+
interface ImageFromApi {
|
|
1825
|
+
/** Returns the image URL with the current transformations applied. */
|
|
1826
|
+
url: () => string;
|
|
1827
|
+
/** Applies image transformations and returns the same fluent API. */
|
|
1828
|
+
transform: (transformProps: ImageFromTransformProps) => ImageFromApi;
|
|
1829
|
+
}
|
|
1821
1830
|
/**
|
|
1822
1831
|
* A helper function for extracting the image URL from an asset and optionally
|
|
1823
1832
|
* applying transformation URL query parameters.
|
|
1824
1833
|
*/
|
|
1825
|
-
declare const imageFrom: (asset: Asset | AssetParamValueItem | string) =>
|
|
1826
|
-
url: () => string;
|
|
1827
|
-
transform: (transformProps: ImageFromTransformProps) => /*elided*/ any;
|
|
1828
|
-
};
|
|
1834
|
+
declare const imageFrom: (asset: Asset | AssetParamValueItem | string) => ImageFromApi;
|
|
1829
1835
|
|
|
1830
1836
|
/**
|
|
1831
1837
|
* Converts a content asset to a put content asset body that has only the properties expected to the PUT API.
|
|
@@ -1836,4 +1842,4 @@ declare function convertAssetToPutAsset(asset: {
|
|
|
1836
1842
|
projectId: string;
|
|
1837
1843
|
}): AssetUpsertRequest;
|
|
1838
1844
|
|
|
1839
|
-
export { type Asset, AssetClient, type AssetDefinitionType, type AssetDeleteRequest, type AssetGetRequest, type AssetGetRequestList, type AssetGetRequestSingle, type AssetGetResponse, type AssetGetResponseList, type AssetGetResponseSingle, type AssetParamValue, type AssetParamValueItem, type AssetUpsertRequest, type ImageDeliveryParams, type ImageFromTransformProps, UncachedAssetClient, assetDefinitions, convertAssetToPutAsset, getAssetDefinitionType, imageFrom };
|
|
1845
|
+
export { type Asset, AssetClient, type AssetDefinitionType, type AssetDeleteRequest, type AssetGetRequest, type AssetGetRequestList, type AssetGetRequestSingle, type AssetGetResponse, type AssetGetResponseList, type AssetGetResponseSingle, type AssetParamValue, type AssetParamValueItem, type AssetUpsertRequest, type ImageDeliveryParams, type ImageFromApi, type ImageFromTransformProps, UncachedAssetClient, assetDefinitions, convertAssetToPutAsset, getAssetDefinitionType, imageFrom };
|
package/dist/index.d.ts
CHANGED
|
@@ -1818,14 +1818,20 @@ type ImageFromTransformProps = XOR<{
|
|
|
1818
1818
|
y: number;
|
|
1819
1819
|
};
|
|
1820
1820
|
}>;
|
|
1821
|
+
/**
|
|
1822
|
+
* Fluent API for reading and transforming an asset image URL.
|
|
1823
|
+
*/
|
|
1824
|
+
interface ImageFromApi {
|
|
1825
|
+
/** Returns the image URL with the current transformations applied. */
|
|
1826
|
+
url: () => string;
|
|
1827
|
+
/** Applies image transformations and returns the same fluent API. */
|
|
1828
|
+
transform: (transformProps: ImageFromTransformProps) => ImageFromApi;
|
|
1829
|
+
}
|
|
1821
1830
|
/**
|
|
1822
1831
|
* A helper function for extracting the image URL from an asset and optionally
|
|
1823
1832
|
* applying transformation URL query parameters.
|
|
1824
1833
|
*/
|
|
1825
|
-
declare const imageFrom: (asset: Asset | AssetParamValueItem | string) =>
|
|
1826
|
-
url: () => string;
|
|
1827
|
-
transform: (transformProps: ImageFromTransformProps) => /*elided*/ any;
|
|
1828
|
-
};
|
|
1834
|
+
declare const imageFrom: (asset: Asset | AssetParamValueItem | string) => ImageFromApi;
|
|
1829
1835
|
|
|
1830
1836
|
/**
|
|
1831
1837
|
* Converts a content asset to a put content asset body that has only the properties expected to the PUT API.
|
|
@@ -1836,4 +1842,4 @@ declare function convertAssetToPutAsset(asset: {
|
|
|
1836
1842
|
projectId: string;
|
|
1837
1843
|
}): AssetUpsertRequest;
|
|
1838
1844
|
|
|
1839
|
-
export { type Asset, AssetClient, type AssetDefinitionType, type AssetDeleteRequest, type AssetGetRequest, type AssetGetRequestList, type AssetGetRequestSingle, type AssetGetResponse, type AssetGetResponseList, type AssetGetResponseSingle, type AssetParamValue, type AssetParamValueItem, type AssetUpsertRequest, type ImageDeliveryParams, type ImageFromTransformProps, UncachedAssetClient, assetDefinitions, convertAssetToPutAsset, getAssetDefinitionType, imageFrom };
|
|
1845
|
+
export { type Asset, AssetClient, type AssetDefinitionType, type AssetDeleteRequest, type AssetGetRequest, type AssetGetRequestList, type AssetGetRequestSingle, type AssetGetResponse, type AssetGetResponseList, type AssetGetResponseSingle, type AssetParamValue, type AssetParamValueItem, type AssetUpsertRequest, type ImageDeliveryParams, type ImageFromApi, type ImageFromTransformProps, UncachedAssetClient, assetDefinitions, convertAssetToPutAsset, getAssetDefinitionType, imageFrom };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/assets",
|
|
3
|
-
"version": "20.72.
|
|
3
|
+
"version": "20.72.3-alpha.2+36e92d30ab",
|
|
4
4
|
"description": "Uniform Assets",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,11 +21,12 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "run-s update-openapi build:ts",
|
|
24
|
-
"build:ts": "tsup",
|
|
24
|
+
"build:ts": "tsup && pnpm test:types",
|
|
25
25
|
"dev": "run-s update-openapi dev:ts",
|
|
26
26
|
"dev:ts": "tsup --watch",
|
|
27
27
|
"clean": "rimraf dist",
|
|
28
28
|
"test": "vitest run",
|
|
29
|
+
"test:types": "tsc --ignoreConfig --noEmit --strict --skipLibCheck --module esnext --moduleResolution bundler --target es2018 type-tests/imageFrom.ts",
|
|
29
30
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
30
31
|
"update-openapi": "tsx ./scripts/update-openapi.cts"
|
|
31
32
|
},
|
|
@@ -36,11 +37,11 @@
|
|
|
36
37
|
"access": "public"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"@uniformdev/context": "20.72.
|
|
40
|
-
"@uniformdev/files": "20.72.
|
|
40
|
+
"@uniformdev/context": "20.72.3-alpha.2+36e92d30ab",
|
|
41
|
+
"@uniformdev/files": "20.72.3-alpha.2+36e92d30ab"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"ts-xor": "^1.3.0"
|
|
44
45
|
},
|
|
45
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "36e92d30ab1b97fc68cf16fc22c6f7865ac8ba97"
|
|
46
47
|
}
|