@anvilkit/plugin-asset-manager 0.1.5 → 0.1.7
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/README.md +27 -19
- package/dist/adapters/data-url.cjs +9 -5
- package/dist/adapters/extract-image-dimensions.cjs +12 -8
- package/dist/adapters/in-memory.cjs +9 -5
- package/dist/adapters/s3-presigned.cjs +9 -5
- package/dist/index.cjs +16 -5
- package/dist/index.d.cts +11 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/plugin.cjs +76 -9
- package/dist/plugin.d.cts +3 -2
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.ts +3 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +67 -4
- package/dist/sources/composite-source.cjs +137 -0
- package/dist/sources/composite-source.d.cts +39 -0
- package/dist/sources/composite-source.d.cts.map +1 -0
- package/dist/sources/composite-source.d.ts +39 -0
- package/dist/sources/composite-source.d.ts.map +1 -0
- package/dist/sources/composite-source.js +99 -0
- package/dist/sources/federated-search.cjs +163 -0
- package/dist/sources/federated-search.d.cts +33 -0
- package/dist/sources/federated-search.d.cts.map +1 -0
- package/dist/sources/federated-search.d.ts +33 -0
- package/dist/sources/federated-search.d.ts.map +1 -0
- package/dist/sources/federated-search.js +113 -0
- package/dist/sources/provider.cjs +18 -0
- package/dist/sources/provider.d.cts +51 -0
- package/dist/sources/provider.d.cts.map +1 -0
- package/dist/sources/provider.d.ts +51 -0
- package/dist/sources/provider.d.ts.map +1 -0
- package/dist/sources/provider.js +1 -0
- package/dist/sources/unsplash/client.cjs +189 -0
- package/dist/sources/unsplash/client.d.cts +87 -0
- package/dist/sources/unsplash/client.d.cts.map +1 -0
- package/dist/sources/unsplash/client.d.ts +87 -0
- package/dist/sources/unsplash/client.d.ts.map +1 -0
- package/dist/sources/unsplash/client.js +151 -0
- package/dist/sources/unsplash/index.cjs +192 -0
- package/dist/sources/unsplash/index.d.cts +16 -0
- package/dist/sources/unsplash/index.d.cts.map +1 -0
- package/dist/sources/unsplash/index.d.ts +16 -0
- package/dist/sources/unsplash/index.d.ts.map +1 -0
- package/dist/sources/unsplash/index.js +148 -0
- package/dist/sources/unsplash/themes.cjs +141 -0
- package/dist/sources/unsplash/themes.d.cts +18 -0
- package/dist/sources/unsplash/themes.d.cts.map +1 -0
- package/dist/sources/unsplash/themes.d.ts +18 -0
- package/dist/sources/unsplash/themes.d.ts.map +1 -0
- package/dist/sources/unsplash/themes.js +93 -0
- package/dist/sources/unsplash/throttle-cache.cjs +86 -0
- package/dist/sources/unsplash/throttle-cache.d.cts +25 -0
- package/dist/sources/unsplash/throttle-cache.d.cts.map +1 -0
- package/dist/sources/unsplash/throttle-cache.d.ts +25 -0
- package/dist/sources/unsplash/throttle-cache.d.ts.map +1 -0
- package/dist/sources/unsplash/throttle-cache.js +45 -0
- package/dist/testing/index.cjs +9 -5
- package/dist/types/categories.cjs +18 -0
- package/dist/types/categories.d.cts +48 -0
- package/dist/types/categories.d.cts.map +1 -0
- package/dist/types/categories.d.ts +48 -0
- package/dist/types/categories.d.ts.map +1 -0
- package/dist/types/categories.js +1 -0
- package/dist/types/data-source.cjs +18 -0
- package/dist/types/data-source.d.cts +59 -0
- package/dist/types/data-source.d.cts.map +1 -0
- package/dist/types/data-source.d.ts +59 -0
- package/dist/types/data-source.d.ts.map +1 -0
- package/dist/types/data-source.js +1 -0
- package/dist/types/filter.cjs +18 -0
- package/dist/types/filter.d.cts +55 -0
- package/dist/types/filter.d.cts.map +1 -0
- package/dist/types/filter.d.ts +55 -0
- package/dist/types/filter.d.ts.map +1 -0
- package/dist/types/filter.js +1 -0
- package/dist/types/folders.cjs +42 -0
- package/dist/types/folders.d.cts +46 -0
- package/dist/types/folders.d.cts.map +1 -0
- package/dist/types/folders.d.ts +46 -0
- package/dist/types/folders.d.ts.map +1 -0
- package/dist/types/folders.js +4 -0
- package/dist/types/options.cjs +18 -0
- package/dist/types/options.d.cts +68 -0
- package/dist/types/options.d.cts.map +1 -0
- package/dist/types/options.d.ts +68 -0
- package/dist/types/options.d.ts.map +1 -0
- package/dist/types/options.js +1 -0
- package/dist/types/types.d.cts +15 -27
- package/dist/types/types.d.cts.map +1 -1
- package/dist/types/types.d.ts +15 -27
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/unsplash.cjs +18 -0
- package/dist/types/unsplash.d.cts +60 -0
- package/dist/types/unsplash.d.cts.map +1 -0
- package/dist/types/unsplash.d.ts +60 -0
- package/dist/types/unsplash.d.ts.map +1 -0
- package/dist/types/unsplash.js +1 -0
- package/dist/ui/AssetBrowser.cjs +69 -104
- package/dist/ui/AssetBrowser.d.cts +17 -7
- package/dist/ui/AssetBrowser.d.cts.map +1 -1
- package/dist/ui/AssetBrowser.d.ts +17 -7
- package/dist/ui/AssetBrowser.d.ts.map +1 -1
- package/dist/ui/AssetBrowser.js +60 -99
- package/dist/ui/AssetCommandPalette.cjs +9 -5
- package/dist/ui/AssetManagerUI.cjs +17 -7
- package/dist/ui/AssetManagerUI.d.cts +19 -3
- package/dist/ui/AssetManagerUI.d.cts.map +1 -1
- package/dist/ui/AssetManagerUI.d.ts +19 -3
- package/dist/ui/AssetManagerUI.d.ts.map +1 -1
- package/dist/ui/AssetManagerUI.js +8 -2
- package/dist/ui/DeleteAssetDialog.cjs +9 -5
- package/dist/ui/DeleteFolderDialog.cjs +78 -0
- package/dist/ui/DeleteFolderDialog.d.cts +11 -0
- package/dist/ui/DeleteFolderDialog.d.cts.map +1 -0
- package/dist/ui/DeleteFolderDialog.d.ts +11 -0
- package/dist/ui/DeleteFolderDialog.d.ts.map +1 -0
- package/dist/ui/DeleteFolderDialog.js +40 -0
- package/dist/ui/EmptyFolderState.cjs +53 -0
- package/dist/ui/EmptyFolderState.d.cts +6 -0
- package/dist/ui/EmptyFolderState.d.cts.map +1 -0
- package/dist/ui/EmptyFolderState.d.ts +6 -0
- package/dist/ui/EmptyFolderState.d.ts.map +1 -0
- package/dist/ui/EmptyFolderState.js +15 -0
- package/dist/ui/FolderBreadcrumb.cjs +73 -0
- package/dist/ui/FolderBreadcrumb.d.cts +9 -0
- package/dist/ui/FolderBreadcrumb.d.cts.map +1 -0
- package/dist/ui/FolderBreadcrumb.d.ts +9 -0
- package/dist/ui/FolderBreadcrumb.d.ts.map +1 -0
- package/dist/ui/FolderBreadcrumb.js +35 -0
- package/dist/ui/FolderNameDialog.cjs +98 -0
- package/dist/ui/FolderNameDialog.d.cts +14 -0
- package/dist/ui/FolderNameDialog.d.cts.map +1 -0
- package/dist/ui/FolderNameDialog.d.ts +14 -0
- package/dist/ui/FolderNameDialog.d.ts.map +1 -0
- package/dist/ui/FolderNameDialog.js +60 -0
- package/dist/ui/FolderTree.cjs +83 -0
- package/dist/ui/FolderTree.d.cts +13 -0
- package/dist/ui/FolderTree.d.cts.map +1 -0
- package/dist/ui/FolderTree.d.ts +13 -0
- package/dist/ui/FolderTree.d.ts.map +1 -0
- package/dist/ui/FolderTree.js +42 -0
- package/dist/ui/MetadataPanel.cjs +16 -9
- package/dist/ui/MetadataPanel.d.cts.map +1 -1
- package/dist/ui/MetadataPanel.d.ts.map +1 -1
- package/dist/ui/MetadataPanel.js +7 -4
- package/dist/ui/MoveTargetPicker.cjs +84 -0
- package/dist/ui/MoveTargetPicker.d.cts +16 -0
- package/dist/ui/MoveTargetPicker.d.cts.map +1 -0
- package/dist/ui/MoveTargetPicker.d.ts +16 -0
- package/dist/ui/MoveTargetPicker.d.ts.map +1 -0
- package/dist/ui/MoveTargetPicker.js +46 -0
- package/dist/ui/ReplaceAssetDialog.cjs +9 -5
- package/dist/ui/ReplaceAssetDialog.d.cts +2 -1
- package/dist/ui/ReplaceAssetDialog.d.cts.map +1 -1
- package/dist/ui/ReplaceAssetDialog.d.ts +2 -1
- package/dist/ui/ReplaceAssetDialog.d.ts.map +1 -1
- package/dist/ui/UnsplashPanel.cjs +134 -0
- package/dist/ui/UnsplashPanel.d.cts +28 -0
- package/dist/ui/UnsplashPanel.d.cts.map +1 -0
- package/dist/ui/UnsplashPanel.d.ts +28 -0
- package/dist/ui/UnsplashPanel.d.ts.map +1 -0
- package/dist/ui/UnsplashPanel.js +96 -0
- package/dist/ui/UploadButton.cjs +10 -10
- package/dist/ui/UploadButton.d.cts +9 -2
- package/dist/ui/UploadButton.d.cts.map +1 -1
- package/dist/ui/UploadButton.d.ts +9 -2
- package/dist/ui/UploadButton.d.ts.map +1 -1
- package/dist/ui/UploadButton.js +1 -5
- package/dist/ui/index.cjs +46 -5
- package/dist/ui/index.d.cts +14 -0
- package/dist/ui/index.d.cts.map +1 -1
- package/dist/ui/index.d.ts +14 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +7 -0
- package/dist/utils/asset-reference.cjs +12 -8
- package/dist/utils/csp.cjs +12 -8
- package/dist/utils/data-source.cjs +177 -0
- package/dist/utils/data-source.d.cts +63 -0
- package/dist/utils/data-source.d.cts.map +1 -0
- package/dist/utils/data-source.d.ts +63 -0
- package/dist/utils/data-source.d.ts.map +1 -0
- package/dist/utils/data-source.js +136 -0
- package/dist/utils/errors.cjs +31 -9
- package/dist/utils/errors.d.cts +27 -0
- package/dist/utils/errors.d.cts.map +1 -1
- package/dist/utils/errors.d.ts +27 -0
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +16 -1
- package/dist/utils/folders.cjs +261 -0
- package/dist/utils/folders.d.cts +49 -0
- package/dist/utils/folders.d.cts.map +1 -0
- package/dist/utils/folders.d.ts +49 -0
- package/dist/utils/folders.d.ts.map +1 -0
- package/dist/utils/folders.js +223 -0
- package/dist/utils/header-action.cjs +12 -8
- package/dist/utils/infer-kind.cjs +12 -8
- package/dist/utils/registry.cjs +36 -17
- package/dist/utils/registry.d.cts +21 -1
- package/dist/utils/registry.d.cts.map +1 -1
- package/dist/utils/registry.d.ts +21 -1
- package/dist/utils/registry.d.ts.map +1 -1
- package/dist/utils/registry.js +20 -11
- package/dist/utils/resolver.cjs +9 -5
- package/dist/utils/retry.cjs +13 -9
- package/dist/utils/studio-asset-source.cjs +14 -7
- package/dist/utils/studio-asset-source.d.cts +6 -1
- package/dist/utils/studio-asset-source.d.cts.map +1 -1
- package/dist/utils/studio-asset-source.d.ts +6 -1
- package/dist/utils/studio-asset-source.d.ts.map +1 -1
- package/dist/utils/studio-asset-source.js +1 -1
- package/dist/utils/validate-upload-result.cjs +9 -5
- package/dist/utils/validate-upload-result.d.cts +2 -1
- package/dist/utils/validate-upload-result.d.cts.map +1 -1
- package/dist/utils/validate-upload-result.d.ts +2 -1
- package/dist/utils/validate-upload-result.d.ts.map +1 -1
- package/dist/version.cjs +12 -8
- package/dist/version.d.cts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/meta/config.json +1 -1
- package/package.json +19 -9
package/dist/utils/registry.cjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -24,7 +28,9 @@ var __webpack_require__ = {};
|
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__webpack_require__.r(__webpack_exports__);
|
|
26
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
31
|
+
assetMatchesSearch: ()=>assetMatchesSearch,
|
|
32
|
+
createAssetRegistry: ()=>createAssetRegistry,
|
|
33
|
+
paginateMatches: ()=>paginateMatches
|
|
28
34
|
});
|
|
29
35
|
const external_infer_kind_cjs_namespaceObject = require("./infer-kind.cjs");
|
|
30
36
|
const DEFAULT_SEARCH_LIMIT = 50;
|
|
@@ -122,6 +128,11 @@ function freezeUploadResult(asset) {
|
|
|
122
128
|
} : {},
|
|
123
129
|
...void 0 !== asset.meta.height ? {
|
|
124
130
|
height: asset.meta.height
|
|
131
|
+
} : {},
|
|
132
|
+
...void 0 !== asset.meta.attribution ? {
|
|
133
|
+
attribution: Object.freeze({
|
|
134
|
+
...asset.meta.attribution
|
|
135
|
+
})
|
|
125
136
|
} : {}
|
|
126
137
|
})
|
|
127
138
|
} : {},
|
|
@@ -145,18 +156,17 @@ function normalizeTags(tags) {
|
|
|
145
156
|
}
|
|
146
157
|
return out;
|
|
147
158
|
}
|
|
148
|
-
function
|
|
159
|
+
function assetMatchesSearch(entry, options) {
|
|
149
160
|
const query = options.query?.trim().toLowerCase() ?? "";
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (
|
|
155
|
-
if (void 0 === kindFilter || kindFilter.includes((0, external_infer_kind_cjs_namespaceObject.inferAssetKind)(entry))) {
|
|
156
|
-
if (void 0 === tagFilter || matchesAllTags(entry, tagFilter)) matches.push(entry);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
161
|
+
if (!matchesQuery(entry, query)) return false;
|
|
162
|
+
if (options.kinds && options.kinds.length > 0 && !options.kinds.includes((0, external_infer_kind_cjs_namespaceObject.inferAssetKind)(entry))) return false;
|
|
163
|
+
if (options.tags && options.tags.length > 0) {
|
|
164
|
+
const tagFilter = options.tags.map((t)=>t.trim().toLowerCase()).filter((t)=>"" !== t);
|
|
165
|
+
if (tagFilter.length > 0 && !matchesAllTags(entry, tagFilter)) return false;
|
|
159
166
|
}
|
|
167
|
+
return true;
|
|
168
|
+
}
|
|
169
|
+
function paginateMatches(matches, options) {
|
|
160
170
|
const total = matches.length;
|
|
161
171
|
const limit = void 0 !== options.limit && options.limit > 0 ? options.limit : DEFAULT_SEARCH_LIMIT;
|
|
162
172
|
const offset = parseCursor(options.cursor);
|
|
@@ -169,6 +179,11 @@ function runSearch(assetsById, options) {
|
|
|
169
179
|
nextCursor
|
|
170
180
|
});
|
|
171
181
|
}
|
|
182
|
+
function runSearch(assetsById, options) {
|
|
183
|
+
const matches = [];
|
|
184
|
+
for (const entry of assetsById.values())if (assetMatchesSearch(entry, options)) matches.push(entry);
|
|
185
|
+
return paginateMatches(matches, options);
|
|
186
|
+
}
|
|
172
187
|
function matchesQuery(entry, query) {
|
|
173
188
|
if ("" === query) return true;
|
|
174
189
|
if (entry.id.toLowerCase().includes(query)) return true;
|
|
@@ -189,9 +204,13 @@ function parseCursor(cursor) {
|
|
|
189
204
|
if (!Number.isFinite(value) || value < 0) return 0;
|
|
190
205
|
return value;
|
|
191
206
|
}
|
|
207
|
+
exports.assetMatchesSearch = __webpack_exports__.assetMatchesSearch;
|
|
192
208
|
exports.createAssetRegistry = __webpack_exports__.createAssetRegistry;
|
|
209
|
+
exports.paginateMatches = __webpack_exports__.paginateMatches;
|
|
193
210
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
194
|
-
"
|
|
211
|
+
"assetMatchesSearch",
|
|
212
|
+
"createAssetRegistry",
|
|
213
|
+
"paginateMatches"
|
|
195
214
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
196
215
|
Object.defineProperty(exports, '__esModule', {
|
|
197
216
|
value: true
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
import type { AssetRegistry } from "../types/types.js";
|
|
1
|
+
import type { AssetKind, AssetRegistry, AssetSearchPage, UploadResult } from "../types/types.js";
|
|
2
2
|
export declare function createAssetRegistry(): AssetRegistry;
|
|
3
|
+
/**
|
|
4
|
+
* Pure predicate: does `entry` satisfy the query / kind / tag filters? Exported
|
|
5
|
+
* so the in-memory data-source compose layer applies the EXACT same matching
|
|
6
|
+
* before adding its folder clause (PRD 0002 §9.2 — single source of truth for
|
|
7
|
+
* search semantics).
|
|
8
|
+
*/
|
|
9
|
+
export declare function assetMatchesSearch(entry: UploadResult, options: {
|
|
10
|
+
readonly query?: string;
|
|
11
|
+
readonly kinds?: readonly AssetKind[];
|
|
12
|
+
readonly tags?: readonly string[];
|
|
13
|
+
}): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Pure offset-cursor pagination over a pre-filtered match list. Shared by
|
|
16
|
+
* `runSearch` and the folder-scoped data-source path so the cursor contract is
|
|
17
|
+
* identical regardless of which clause did the filtering.
|
|
18
|
+
*/
|
|
19
|
+
export declare function paginateMatches(matches: readonly UploadResult[], options: {
|
|
20
|
+
readonly cursor?: string;
|
|
21
|
+
readonly limit?: number;
|
|
22
|
+
}): AssetSearchPage;
|
|
3
23
|
//# sourceMappingURL=registry.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.cts","sourceRoot":"","sources":["../../src/utils/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,
|
|
1
|
+
{"version":3,"file":"registry.d.cts","sourceRoot":"","sources":["../../src/utils/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,SAAS,EACT,aAAa,EAGb,eAAe,EACf,YAAY,EACZ,MAAM,mBAAmB,CAAC;AAK3B,wBAAgB,mBAAmB,IAAI,aAAa,CA6EnD;AAmDD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE;IACR,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC,GACC,OAAO,CAiBT;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC9B,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,OAAO,EAAE;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5D,eAAe,CAejB"}
|
package/dist/utils/registry.d.ts
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
import type { AssetRegistry } from "../types/types.js";
|
|
1
|
+
import type { AssetKind, AssetRegistry, AssetSearchPage, UploadResult } from "../types/types.js";
|
|
2
2
|
export declare function createAssetRegistry(): AssetRegistry;
|
|
3
|
+
/**
|
|
4
|
+
* Pure predicate: does `entry` satisfy the query / kind / tag filters? Exported
|
|
5
|
+
* so the in-memory data-source compose layer applies the EXACT same matching
|
|
6
|
+
* before adding its folder clause (PRD 0002 §9.2 — single source of truth for
|
|
7
|
+
* search semantics).
|
|
8
|
+
*/
|
|
9
|
+
export declare function assetMatchesSearch(entry: UploadResult, options: {
|
|
10
|
+
readonly query?: string;
|
|
11
|
+
readonly kinds?: readonly AssetKind[];
|
|
12
|
+
readonly tags?: readonly string[];
|
|
13
|
+
}): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Pure offset-cursor pagination over a pre-filtered match list. Shared by
|
|
16
|
+
* `runSearch` and the folder-scoped data-source path so the cursor contract is
|
|
17
|
+
* identical regardless of which clause did the filtering.
|
|
18
|
+
*/
|
|
19
|
+
export declare function paginateMatches(matches: readonly UploadResult[], options: {
|
|
20
|
+
readonly cursor?: string;
|
|
21
|
+
readonly limit?: number;
|
|
22
|
+
}): AssetSearchPage;
|
|
3
23
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/utils/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/utils/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,SAAS,EACT,aAAa,EAGb,eAAe,EACf,YAAY,EACZ,MAAM,mBAAmB,CAAC;AAK3B,wBAAgB,mBAAmB,IAAI,aAAa,CA6EnD;AAmDD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE;IACR,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC,GACC,OAAO,CAiBT;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC9B,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,OAAO,EAAE;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5D,eAAe,CAejB"}
|
package/dist/utils/registry.js
CHANGED
|
@@ -94,6 +94,11 @@ function freezeUploadResult(asset) {
|
|
|
94
94
|
} : {},
|
|
95
95
|
...void 0 !== asset.meta.height ? {
|
|
96
96
|
height: asset.meta.height
|
|
97
|
+
} : {},
|
|
98
|
+
...void 0 !== asset.meta.attribution ? {
|
|
99
|
+
attribution: Object.freeze({
|
|
100
|
+
...asset.meta.attribution
|
|
101
|
+
})
|
|
97
102
|
} : {}
|
|
98
103
|
})
|
|
99
104
|
} : {},
|
|
@@ -117,18 +122,17 @@ function normalizeTags(tags) {
|
|
|
117
122
|
}
|
|
118
123
|
return out;
|
|
119
124
|
}
|
|
120
|
-
function
|
|
125
|
+
function assetMatchesSearch(entry, options) {
|
|
121
126
|
const query = options.query?.trim().toLowerCase() ?? "";
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
if (
|
|
127
|
-
if (void 0 === kindFilter || kindFilter.includes(inferAssetKind(entry))) {
|
|
128
|
-
if (void 0 === tagFilter || matchesAllTags(entry, tagFilter)) matches.push(entry);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
127
|
+
if (!matchesQuery(entry, query)) return false;
|
|
128
|
+
if (options.kinds && options.kinds.length > 0 && !options.kinds.includes(inferAssetKind(entry))) return false;
|
|
129
|
+
if (options.tags && options.tags.length > 0) {
|
|
130
|
+
const tagFilter = options.tags.map((t)=>t.trim().toLowerCase()).filter((t)=>"" !== t);
|
|
131
|
+
if (tagFilter.length > 0 && !matchesAllTags(entry, tagFilter)) return false;
|
|
131
132
|
}
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
function paginateMatches(matches, options) {
|
|
132
136
|
const total = matches.length;
|
|
133
137
|
const limit = void 0 !== options.limit && options.limit > 0 ? options.limit : DEFAULT_SEARCH_LIMIT;
|
|
134
138
|
const offset = parseCursor(options.cursor);
|
|
@@ -141,6 +145,11 @@ function runSearch(assetsById, options) {
|
|
|
141
145
|
nextCursor
|
|
142
146
|
});
|
|
143
147
|
}
|
|
148
|
+
function runSearch(assetsById, options) {
|
|
149
|
+
const matches = [];
|
|
150
|
+
for (const entry of assetsById.values())if (assetMatchesSearch(entry, options)) matches.push(entry);
|
|
151
|
+
return paginateMatches(matches, options);
|
|
152
|
+
}
|
|
144
153
|
function matchesQuery(entry, query) {
|
|
145
154
|
if ("" === query) return true;
|
|
146
155
|
if (entry.id.toLowerCase().includes(query)) return true;
|
|
@@ -161,4 +170,4 @@ function parseCursor(cursor) {
|
|
|
161
170
|
if (!Number.isFinite(value) || value < 0) return 0;
|
|
162
171
|
return value;
|
|
163
172
|
}
|
|
164
|
-
export { createAssetRegistry };
|
|
173
|
+
export { assetMatchesSearch, createAssetRegistry, paginateMatches };
|
package/dist/utils/resolver.cjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
package/dist/utils/retry.cjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -23,10 +27,6 @@ var __webpack_require__ = {};
|
|
|
23
27
|
})();
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
RetryableError: ()=>RetryableError,
|
|
28
|
-
withRetry: ()=>withRetry
|
|
29
|
-
});
|
|
30
30
|
class RetryableError extends Error {
|
|
31
31
|
retryAfterMs;
|
|
32
32
|
constructor(message, options){
|
|
@@ -114,6 +114,10 @@ function defaultSleep(ms, signal) {
|
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
118
|
+
RetryableError: ()=>RetryableError,
|
|
119
|
+
withRetry: ()=>withRetry
|
|
120
|
+
});
|
|
117
121
|
exports.RetryableError = __webpack_exports__.RetryableError;
|
|
118
122
|
exports.withRetry = __webpack_exports__.withRetry;
|
|
119
123
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -26,7 +30,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
31
|
MAX_CONCURRENT_UPLOADS: ()=>MAX_CONCURRENT_UPLOADS,
|
|
28
32
|
createStudioAssetSource: ()=>createStudioAssetSource,
|
|
29
|
-
inferStudioAssetKind: ()=>inferStudioAssetKind
|
|
33
|
+
inferStudioAssetKind: ()=>inferStudioAssetKind,
|
|
34
|
+
toStudioAsset: ()=>toStudioAsset
|
|
30
35
|
});
|
|
31
36
|
const external_asset_reference_cjs_namespaceObject = require("./asset-reference.cjs");
|
|
32
37
|
const external_infer_kind_cjs_namespaceObject = require("./infer-kind.cjs");
|
|
@@ -222,10 +227,12 @@ function makeAbortError() {
|
|
|
222
227
|
exports.MAX_CONCURRENT_UPLOADS = __webpack_exports__.MAX_CONCURRENT_UPLOADS;
|
|
223
228
|
exports.createStudioAssetSource = __webpack_exports__.createStudioAssetSource;
|
|
224
229
|
exports.inferStudioAssetKind = __webpack_exports__.inferStudioAssetKind;
|
|
230
|
+
exports.toStudioAsset = __webpack_exports__.toStudioAsset;
|
|
225
231
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
226
232
|
"MAX_CONCURRENT_UPLOADS",
|
|
227
233
|
"createStudioAssetSource",
|
|
228
|
-
"inferStudioAssetKind"
|
|
234
|
+
"inferStudioAssetKind",
|
|
235
|
+
"toStudioAsset"
|
|
229
236
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
230
237
|
Object.defineProperty(exports, '__esModule', {
|
|
231
238
|
value: true
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* shared `AssetRegistry`. Mutation methods route back through the
|
|
12
12
|
* registry so the IR resolver and the sidebar see the same data.
|
|
13
13
|
*/
|
|
14
|
-
import type { StudioAssetKind, StudioAssetSource } from "@anvilkit/core/types";
|
|
14
|
+
import type { StudioAsset, StudioAssetKind, StudioAssetSource } from "@anvilkit/core/types";
|
|
15
15
|
import type { AssetRegistry, UploadAdapterOptions, UploadResult } from "../types/types.js";
|
|
16
16
|
/**
|
|
17
17
|
* Default concurrency cap for batched uploads. Editors typically drag
|
|
@@ -43,6 +43,11 @@ export interface CreateStudioAssetSourceOptions {
|
|
|
43
43
|
readonly maxConcurrentUploads?: number;
|
|
44
44
|
}
|
|
45
45
|
export declare function createStudioAssetSource(options: CreateStudioAssetSourceOptions): StudioAssetSource;
|
|
46
|
+
/**
|
|
47
|
+
* Project a registry `UploadResult` into the sidebar's `StudioAsset` shape.
|
|
48
|
+
* Exported so the composite source reuses the exact same projection.
|
|
49
|
+
*/
|
|
50
|
+
export declare function toStudioAsset(entry: UploadResult, getThumbnail?: (entry: UploadResult) => string | undefined): StudioAsset;
|
|
46
51
|
/**
|
|
47
52
|
* Public alias for {@link inferAssetKind}. Preserved as the documented
|
|
48
53
|
* Studio-side projection so existing imports keep working; library
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studio-asset-source.d.cts","sourceRoot":"","sources":["../../src/utils/studio-asset-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"studio-asset-source.d.cts","sourceRoot":"","sources":["../../src/utils/studio-asset-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACX,WAAW,EACX,eAAe,EAGf,iBAAiB,EAGjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,MAAM,mBAAmB,CAAC;AAI3B;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,MAAM,WAAW,8BAA8B;IAC9C,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,CAChB,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,oBAAoB,KAC1B,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3B;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,GAAG,SAAS,CAAC;IACpE;;;;OAIG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACvC;AAED,wBAAgB,uBAAuB,CACtC,OAAO,EAAE,8BAA8B,GACrC,iBAAiB,CAqLnB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC5B,KAAK,EAAE,YAAY,EACnB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,GAAG,SAAS,GACxD,WAAW,CAqBb;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,eAAe,CAEzE"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* shared `AssetRegistry`. Mutation methods route back through the
|
|
12
12
|
* registry so the IR resolver and the sidebar see the same data.
|
|
13
13
|
*/
|
|
14
|
-
import type { StudioAssetKind, StudioAssetSource } from "@anvilkit/core/types";
|
|
14
|
+
import type { StudioAsset, StudioAssetKind, StudioAssetSource } from "@anvilkit/core/types";
|
|
15
15
|
import type { AssetRegistry, UploadAdapterOptions, UploadResult } from "../types/types.js";
|
|
16
16
|
/**
|
|
17
17
|
* Default concurrency cap for batched uploads. Editors typically drag
|
|
@@ -43,6 +43,11 @@ export interface CreateStudioAssetSourceOptions {
|
|
|
43
43
|
readonly maxConcurrentUploads?: number;
|
|
44
44
|
}
|
|
45
45
|
export declare function createStudioAssetSource(options: CreateStudioAssetSourceOptions): StudioAssetSource;
|
|
46
|
+
/**
|
|
47
|
+
* Project a registry `UploadResult` into the sidebar's `StudioAsset` shape.
|
|
48
|
+
* Exported so the composite source reuses the exact same projection.
|
|
49
|
+
*/
|
|
50
|
+
export declare function toStudioAsset(entry: UploadResult, getThumbnail?: (entry: UploadResult) => string | undefined): StudioAsset;
|
|
46
51
|
/**
|
|
47
52
|
* Public alias for {@link inferAssetKind}. Preserved as the documented
|
|
48
53
|
* Studio-side projection so existing imports keep working; library
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studio-asset-source.d.ts","sourceRoot":"","sources":["../../src/utils/studio-asset-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"studio-asset-source.d.ts","sourceRoot":"","sources":["../../src/utils/studio-asset-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACX,WAAW,EACX,eAAe,EAGf,iBAAiB,EAGjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,MAAM,mBAAmB,CAAC;AAI3B;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,MAAM,WAAW,8BAA8B;IAC9C,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,CAChB,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,oBAAoB,KAC1B,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3B;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,GAAG,SAAS,CAAC;IACpE;;;;OAIG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACvC;AAED,wBAAgB,uBAAuB,CACtC,OAAO,EAAE,8BAA8B,GACrC,iBAAiB,CAqLnB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC5B,KAAK,EAAE,YAAY,EACnB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,GAAG,SAAS,GACxD,WAAW,CAqBb;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,eAAe,CAEzE"}
|
|
@@ -189,4 +189,4 @@ function makeAbortError() {
|
|
|
189
189
|
error.name = "AbortError";
|
|
190
190
|
return error;
|
|
191
191
|
}
|
|
192
|
-
export { MAX_CONCURRENT_UPLOADS, createStudioAssetSource, inferStudioAssetKind };
|
|
192
|
+
export { MAX_CONCURRENT_UPLOADS, createStudioAssetSource, inferStudioAssetKind, toStudioAsset };
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AssetManagerOptions
|
|
1
|
+
import type { AssetManagerOptions } from "../types/options.js";
|
|
2
|
+
import type { UploadResult } from "../types/types.js";
|
|
2
3
|
/**
|
|
3
4
|
* Subset of {@link AssetManagerOptions} consulted by the trust boundary.
|
|
4
5
|
* `urlAllowlist` is intentionally absent — Phase 4 replaced the raw
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-upload-result.d.cts","sourceRoot":"","sources":["../../src/utils/validate-upload-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"validate-upload-result.d.cts","sourceRoot":"","sources":["../../src/utils/validate-upload-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC7C,mBAAmB,EACnB,uBAAuB,GAAG,2BAA2B,CACrD,CAAC;AAEF,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE,2BAAgC,GACvC,YAAY,CAqBd"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AssetManagerOptions
|
|
1
|
+
import type { AssetManagerOptions } from "../types/options.js";
|
|
2
|
+
import type { UploadResult } from "../types/types.js";
|
|
2
3
|
/**
|
|
3
4
|
* Subset of {@link AssetManagerOptions} consulted by the trust boundary.
|
|
4
5
|
* `urlAllowlist` is intentionally absent — Phase 4 replaced the raw
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-upload-result.d.ts","sourceRoot":"","sources":["../../src/utils/validate-upload-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"validate-upload-result.d.ts","sourceRoot":"","sources":["../../src/utils/validate-upload-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC7C,mBAAmB,EACnB,uBAAuB,GAAG,2BAA2B,CACrD,CAAC;AAEF,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE,2BAAgC,GACvC,YAAY,CAqBd"}
|
package/dist/version.cjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -23,10 +27,10 @@ var __webpack_require__ = {};
|
|
|
23
27
|
})();
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
const ASSET_MANAGER_VERSION = "0.1.7";
|
|
31
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
32
|
+
ASSET_MANAGER_VERSION: ASSET_MANAGER_VERSION
|
|
28
33
|
});
|
|
29
|
-
const ASSET_MANAGER_VERSION = "0.1.5";
|
|
30
34
|
exports.ASSET_MANAGER_VERSION = __webpack_exports__.ASSET_MANAGER_VERSION;
|
|
31
35
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
32
36
|
"ASSET_MANAGER_VERSION"
|
package/dist/version.d.cts
CHANGED
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
* constant ships only the version. Mirrors `@anvilkit/core`'s
|
|
17
17
|
* `runtime/version.ts`, which makes the same call.
|
|
18
18
|
*/
|
|
19
|
-
export declare const ASSET_MANAGER_VERSION = "0.1.
|
|
19
|
+
export declare const ASSET_MANAGER_VERSION = "0.1.7";
|
|
20
20
|
//# sourceMappingURL=version.d.cts.map
|
package/dist/version.d.ts
CHANGED
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
* constant ships only the version. Mirrors `@anvilkit/core`'s
|
|
17
17
|
* `runtime/version.ts`, which makes the same call.
|
|
18
18
|
*/
|
|
19
|
-
export declare const ASSET_MANAGER_VERSION = "0.1.
|
|
19
|
+
export declare const ASSET_MANAGER_VERSION = "0.1.7";
|
|
20
20
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const ASSET_MANAGER_VERSION = "0.1.
|
|
1
|
+
const ASSET_MANAGER_VERSION = "0.1.7";
|
|
2
2
|
export { ASSET_MANAGER_VERSION };
|
package/meta/config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "anvilkit-plugin-asset-manager",
|
|
3
3
|
"name": "Asset Manager",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7",
|
|
5
5
|
"coreVersion": "^0.1.0-alpha",
|
|
6
6
|
"description": "Headless asset upload plugin with host-provided persistence and a separate React UI subpath.",
|
|
7
7
|
"capabilities": { "header": true }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anvilkit/plugin-asset-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Headless asset manager plugin for Anvilkit Studio with host-provided uploads and optional React UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -56,6 +56,16 @@
|
|
|
56
56
|
"types": "./dist/adapters/s3-presigned.d.cts",
|
|
57
57
|
"default": "./dist/adapters/s3-presigned.cjs"
|
|
58
58
|
}
|
|
59
|
+
},
|
|
60
|
+
"./providers/unsplash": {
|
|
61
|
+
"import": {
|
|
62
|
+
"types": "./dist/sources/unsplash/index.d.ts",
|
|
63
|
+
"default": "./dist/sources/unsplash/index.js"
|
|
64
|
+
},
|
|
65
|
+
"require": {
|
|
66
|
+
"types": "./dist/sources/unsplash/index.d.cts",
|
|
67
|
+
"default": "./dist/sources/unsplash/index.cjs"
|
|
68
|
+
}
|
|
59
69
|
}
|
|
60
70
|
},
|
|
61
71
|
"files": [
|
|
@@ -70,8 +80,8 @@
|
|
|
70
80
|
},
|
|
71
81
|
"peerDependencies": {
|
|
72
82
|
"@puckeditor/core": "^0.21.2",
|
|
73
|
-
"react": "
|
|
74
|
-
"react-dom": "
|
|
83
|
+
"react": ">=19.0.0",
|
|
84
|
+
"react-dom": ">=19.0.0"
|
|
75
85
|
},
|
|
76
86
|
"peerDependenciesMeta": {
|
|
77
87
|
"react": {
|
|
@@ -86,16 +96,16 @@
|
|
|
86
96
|
},
|
|
87
97
|
"dependencies": {
|
|
88
98
|
"lucide-react": "^1.16.0",
|
|
89
|
-
"@anvilkit/core": "0.1.
|
|
90
|
-
"@anvilkit/ir": "0.1.
|
|
91
|
-
"@anvilkit/ui": "0.1.
|
|
92
|
-
"@anvilkit/utils": "0.1.
|
|
99
|
+
"@anvilkit/core": "0.1.13",
|
|
100
|
+
"@anvilkit/ir": "0.1.11",
|
|
101
|
+
"@anvilkit/ui": "0.1.11",
|
|
102
|
+
"@anvilkit/utils": "0.1.11"
|
|
93
103
|
},
|
|
94
104
|
"devDependencies": {
|
|
95
105
|
"@puckeditor/core": "^0.21.2",
|
|
96
|
-
"@rslib/core": "^0.
|
|
106
|
+
"@rslib/core": "^0.22.0",
|
|
97
107
|
"@types/node": "^25.9.1",
|
|
98
|
-
"@types/react": "19.2.14",
|
|
108
|
+
"@types/react": "^19.2.14",
|
|
99
109
|
"@types/react-dom": "19.2.3",
|
|
100
110
|
"axe-core": "4.11.3",
|
|
101
111
|
"esbuild": "^0.28.0",
|