@mano8/astro-media-m8 1.1.0 → 2.0.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/README.md +54 -11
- package/dist/src/integration.d.ts.map +1 -1
- package/dist/src/integration.js +1 -0
- package/dist/src/integration.js.map +1 -1
- package/dist/src/runtime/api/categories.d.ts +14 -8
- package/dist/src/runtime/api/categories.d.ts.map +1 -1
- package/dist/src/runtime/api/categories.js +21 -8
- package/dist/src/runtime/api/categories.js.map +1 -1
- package/dist/src/runtime/api/index.d.ts +8 -0
- package/dist/src/runtime/api/index.d.ts.map +1 -1
- package/dist/src/runtime/api/index.js +8 -0
- package/dist/src/runtime/api/index.js.map +1 -1
- package/dist/src/runtime/api/transfer.d.ts +19 -0
- package/dist/src/runtime/api/transfer.d.ts.map +1 -0
- package/dist/src/runtime/api/transfer.js +48 -0
- package/dist/src/runtime/api/transfer.js.map +1 -0
- package/dist/src/runtime/client.d.ts.map +1 -1
- package/dist/src/runtime/client.js +7 -1
- package/dist/src/runtime/client.js.map +1 -1
- package/dist/src/runtime/compatibility.d.ts +6 -6
- package/dist/src/runtime/compatibility.d.ts.map +1 -1
- package/dist/src/runtime/compatibility.js +59 -7
- package/dist/src/runtime/compatibility.js.map +1 -1
- package/dist/src/runtime/errors.d.ts +20 -2
- package/dist/src/runtime/errors.d.ts.map +1 -1
- package/dist/src/runtime/errors.js +53 -2
- package/dist/src/runtime/errors.js.map +1 -1
- package/dist/src/runtime/hooks/index.d.ts +2 -0
- package/dist/src/runtime/hooks/index.d.ts.map +1 -1
- package/dist/src/runtime/hooks/index.js +2 -0
- package/dist/src/runtime/hooks/index.js.map +1 -1
- package/dist/src/runtime/hooks/useMediaCategories.d.ts +30 -0
- package/dist/src/runtime/hooks/useMediaCategories.d.ts.map +1 -0
- package/dist/src/runtime/hooks/useMediaCategories.js +56 -0
- package/dist/src/runtime/hooks/useMediaCategories.js.map +1 -0
- package/dist/src/runtime/hooks/useMediaObjects.d.ts.map +1 -1
- package/dist/src/runtime/hooks/useMediaObjects.js +14 -2
- package/dist/src/runtime/hooks/useMediaObjects.js.map +1 -1
- package/dist/src/runtime/hooks/useMediaTransfer.d.ts +42 -0
- package/dist/src/runtime/hooks/useMediaTransfer.d.ts.map +1 -0
- package/dist/src/runtime/hooks/useMediaTransfer.js +106 -0
- package/dist/src/runtime/hooks/useMediaTransfer.js.map +1 -0
- package/dist/src/runtime/queryKeys.d.ts +2 -0
- package/dist/src/runtime/queryKeys.d.ts.map +1 -1
- package/dist/src/runtime/queryKeys.js +2 -0
- package/dist/src/runtime/queryKeys.js.map +1 -1
- package/dist/src/runtime/react/CategoryManager.d.ts +10 -0
- package/dist/src/runtime/react/CategoryManager.d.ts.map +1 -0
- package/dist/src/runtime/react/CategoryManager.js +194 -0
- package/dist/src/runtime/react/CategoryManager.js.map +1 -0
- package/dist/src/runtime/react/CategoryMultiSelect.d.ts +73 -0
- package/dist/src/runtime/react/CategoryMultiSelect.d.ts.map +1 -0
- package/dist/src/runtime/react/CategoryMultiSelect.js +179 -0
- package/dist/src/runtime/react/CategoryMultiSelect.js.map +1 -0
- package/dist/src/runtime/react/MediaCategoryTreePane.d.ts +22 -0
- package/dist/src/runtime/react/MediaCategoryTreePane.d.ts.map +1 -0
- package/dist/src/runtime/react/MediaCategoryTreePane.js +244 -0
- package/dist/src/runtime/react/MediaCategoryTreePane.js.map +1 -0
- package/dist/src/runtime/react/MediaErrorBoundary.d.ts +53 -0
- package/dist/src/runtime/react/MediaErrorBoundary.d.ts.map +1 -0
- package/dist/src/runtime/react/MediaErrorBoundary.js +58 -0
- package/dist/src/runtime/react/MediaErrorBoundary.js.map +1 -0
- package/dist/src/runtime/react/MediaLibrary.d.ts +16 -1
- package/dist/src/runtime/react/MediaLibrary.d.ts.map +1 -1
- package/dist/src/runtime/react/MediaLibrary.js +75 -110
- package/dist/src/runtime/react/MediaLibrary.js.map +1 -1
- package/dist/src/runtime/react/MediaObjectViews.d.ts +47 -0
- package/dist/src/runtime/react/MediaObjectViews.d.ts.map +1 -0
- package/dist/src/runtime/react/MediaObjectViews.js +131 -0
- package/dist/src/runtime/react/MediaObjectViews.js.map +1 -0
- package/dist/src/runtime/react/MediaTransferPanel.d.ts +17 -0
- package/dist/src/runtime/react/MediaTransferPanel.d.ts.map +1 -0
- package/dist/src/runtime/react/MediaTransferPanel.js +93 -0
- package/dist/src/runtime/react/MediaTransferPanel.js.map +1 -0
- package/dist/src/runtime/react/MediaUploadDropzone.d.ts +36 -1
- package/dist/src/runtime/react/MediaUploadDropzone.d.ts.map +1 -1
- package/dist/src/runtime/react/MediaUploadDropzone.js +63 -3
- package/dist/src/runtime/react/MediaUploadDropzone.js.map +1 -1
- package/dist/src/runtime/react/ObjectDetail.d.ts.map +1 -1
- package/dist/src/runtime/react/ObjectDetail.js +51 -1
- package/dist/src/runtime/react/ObjectDetail.js.map +1 -1
- package/dist/src/runtime/react/categoryBranch.d.ts +38 -0
- package/dist/src/runtime/react/categoryBranch.d.ts.map +1 -0
- package/dist/src/runtime/react/categoryBranch.js +37 -0
- package/dist/src/runtime/react/categoryBranch.js.map +1 -0
- package/dist/src/runtime/react/default-ui/index.d.ts +6 -2
- package/dist/src/runtime/react/default-ui/index.d.ts.map +1 -1
- package/dist/src/runtime/react/default-ui/index.js +14 -9
- package/dist/src/runtime/react/default-ui/index.js.map +1 -1
- package/dist/src/runtime/react/index.d.ts +5 -2
- package/dist/src/runtime/react/index.d.ts.map +1 -1
- package/dist/src/runtime/react/index.js +3 -0
- package/dist/src/runtime/react/index.js.map +1 -1
- package/dist/src/runtime/react/mediaLibraryLabels.d.ts +93 -0
- package/dist/src/runtime/react/mediaLibraryLabels.d.ts.map +1 -0
- package/dist/src/runtime/react/mediaLibraryLabels.js +100 -0
- package/dist/src/runtime/react/mediaLibraryLabels.js.map +1 -0
- package/dist/src/runtime/react/mediaLibraryStyles.d.ts +44 -0
- package/dist/src/runtime/react/mediaLibraryStyles.d.ts.map +1 -0
- package/dist/src/runtime/react/mediaLibraryStyles.js +82 -0
- package/dist/src/runtime/react/mediaLibraryStyles.js.map +1 -0
- package/dist/src/runtime/routes.d.ts +2 -0
- package/dist/src/runtime/routes.d.ts.map +1 -1
- package/dist/src/runtime/routes.js +2 -0
- package/dist/src/runtime/routes.js.map +1 -1
- package/dist/src/runtime/schemas.d.ts +265 -0
- package/dist/src/runtime/schemas.d.ts.map +1 -1
- package/dist/src/runtime/schemas.js +173 -6
- package/dist/src/runtime/schemas.js.map +1 -1
- package/dist/src/runtime/upload/uploadController.d.ts +7 -0
- package/dist/src/runtime/upload/uploadController.d.ts.map +1 -1
- package/dist/src/runtime/upload/uploadController.js +10 -5
- package/dist/src/runtime/upload/uploadController.js.map +1 -1
- package/package.json +37 -30
- package/registry/r/media-category-tree.json +21 -0
- package/registry/r/media-dashboard-overview.json +1 -1
- package/registry/r/media-library-tree.json +25 -0
- package/registry/r/media-maintenance-panel.json +3 -2
- package/registry/r/media-transfer-dialog.json +26 -0
- package/registry/r/registry.json +18 -0
- package/registry.json +61 -1
- package/src/routes/categories.astro +12 -0
- package/src/scaffold/styles/media.css +395 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/runtime/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAgC,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,eAAe,EAA0B,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/runtime/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAgC,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,eAAe,EAA0B,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EACL,kBAAkB,EAInB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAkC,MAAM,0BAA0B,CAAC;AAC/F,OAAO,EAAE,YAAY,EAA2B,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EAKxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `MediaLibrary` copy contract and its English defaults.
|
|
3
|
+
*
|
|
4
|
+
* Every string the library renders is overridable, so a consumer localizes the
|
|
5
|
+
* views without forking them (`I18N`). Kept in its own module because the
|
|
6
|
+
* library, its tree pane and its transfer panel all read the same shape — and
|
|
7
|
+
* because the defaults alone are a hundred lines of copy that say nothing about
|
|
8
|
+
* how the library behaves.
|
|
9
|
+
*/
|
|
10
|
+
import type { MediaUploadDropzoneLabels } from "./MediaUploadDropzone.js";
|
|
11
|
+
import type { ImportObjectResult, MediaCategory, MediaObjectStatus } from "../schemas.js";
|
|
12
|
+
export type MediaLibraryView = "list" | "grid" | "masonry" | "tree";
|
|
13
|
+
export interface MediaLibraryLabels {
|
|
14
|
+
title: string;
|
|
15
|
+
viewLabel: string;
|
|
16
|
+
views: Record<MediaLibraryView, string>;
|
|
17
|
+
importExport: string;
|
|
18
|
+
uploadMedia: string;
|
|
19
|
+
searchPlaceholder: string;
|
|
20
|
+
searchLabel: string;
|
|
21
|
+
preview: string;
|
|
22
|
+
filename: string;
|
|
23
|
+
actions: string;
|
|
24
|
+
category: string;
|
|
25
|
+
status: string;
|
|
26
|
+
size: string;
|
|
27
|
+
view: string;
|
|
28
|
+
delete: string;
|
|
29
|
+
deleteError: string;
|
|
30
|
+
allCategories: string;
|
|
31
|
+
categories: Record<MediaCategory, string>;
|
|
32
|
+
allStatuses: string;
|
|
33
|
+
statuses: Record<MediaObjectStatus, string>;
|
|
34
|
+
loadError: string;
|
|
35
|
+
loading: string;
|
|
36
|
+
loadMore: string;
|
|
37
|
+
previewLoading: string;
|
|
38
|
+
previewPlaceholder: string;
|
|
39
|
+
failedScan: string;
|
|
40
|
+
failedScanTitle: (status: string) => string;
|
|
41
|
+
tree: {
|
|
42
|
+
regionLabel: string;
|
|
43
|
+
title: string;
|
|
44
|
+
loadError: string;
|
|
45
|
+
loading: string;
|
|
46
|
+
empty: string;
|
|
47
|
+
allMedia: string;
|
|
48
|
+
uncategorized: string;
|
|
49
|
+
allMediaScope: string;
|
|
50
|
+
uncategorizedScope: string;
|
|
51
|
+
selectedScope: (id: number) => string;
|
|
52
|
+
expand: (name: string) => string;
|
|
53
|
+
collapse: (name: string) => string;
|
|
54
|
+
countTitle: (direct: number, total: number, name: string) => string;
|
|
55
|
+
};
|
|
56
|
+
transfer: {
|
|
57
|
+
regionLabel: string;
|
|
58
|
+
exportTitle: string;
|
|
59
|
+
importTitle: string;
|
|
60
|
+
scope: string;
|
|
61
|
+
format: string;
|
|
62
|
+
manifest: string;
|
|
63
|
+
archive: string;
|
|
64
|
+
manifestHint: string;
|
|
65
|
+
archiveHint: string;
|
|
66
|
+
startExport: string;
|
|
67
|
+
exporting: string;
|
|
68
|
+
exportError: string;
|
|
69
|
+
downloadManifest: (count: number) => string;
|
|
70
|
+
downloadArchive: (count: number) => string;
|
|
71
|
+
exportFailed: (error?: string | null) => string;
|
|
72
|
+
exportStatus: (status: string) => string;
|
|
73
|
+
chooseFile: string;
|
|
74
|
+
dropFile: string;
|
|
75
|
+
startImport: string;
|
|
76
|
+
importing: string;
|
|
77
|
+
importError: string;
|
|
78
|
+
report: (created: number, linked: number, skipped: number, failed: number) => string;
|
|
79
|
+
categoriesCreated: (count: number) => string;
|
|
80
|
+
file: string;
|
|
81
|
+
status: string;
|
|
82
|
+
reason: string;
|
|
83
|
+
importStatuses: Record<ImportObjectResult["status"], string>;
|
|
84
|
+
};
|
|
85
|
+
upload: {
|
|
86
|
+
title: string;
|
|
87
|
+
close: string;
|
|
88
|
+
closeLabel: string;
|
|
89
|
+
form: Partial<MediaUploadDropzoneLabels>;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export declare const DEFAULT_LABELS: MediaLibraryLabels;
|
|
93
|
+
//# sourceMappingURL=mediaLibraryLabels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaLibraryLabels.d.ts","sourceRoot":"","sources":["../../../../src/runtime/react/mediaLibraryLabels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAG1F,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAEpE,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACj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,CAAC,yBAAyB,CAAC,CAAC;KAC1C,CAAC;CACH;AAED,eAAO,MAAM,cAAc,EAAE,kBAkG5B,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export const DEFAULT_LABELS = {
|
|
2
|
+
title: "Media library",
|
|
3
|
+
viewLabel: "Media library view",
|
|
4
|
+
views: { list: "List", grid: "Grid", masonry: "Masonry", tree: "Tree" },
|
|
5
|
+
importExport: "Import / Export",
|
|
6
|
+
uploadMedia: "Upload media",
|
|
7
|
+
searchPlaceholder: "Search filename",
|
|
8
|
+
searchLabel: "Search media",
|
|
9
|
+
preview: "Preview",
|
|
10
|
+
filename: "Filename",
|
|
11
|
+
actions: "Actions",
|
|
12
|
+
category: "Category",
|
|
13
|
+
status: "Status",
|
|
14
|
+
size: "Size",
|
|
15
|
+
view: "View",
|
|
16
|
+
delete: "Delete",
|
|
17
|
+
deleteError: "Failed to delete media",
|
|
18
|
+
allCategories: "All categories",
|
|
19
|
+
categories: {
|
|
20
|
+
avatar: "Avatar",
|
|
21
|
+
document: "Document",
|
|
22
|
+
asset: "Asset",
|
|
23
|
+
chat_attachment: "Chat attachment",
|
|
24
|
+
export: "Export",
|
|
25
|
+
receipt: "Receipt"
|
|
26
|
+
},
|
|
27
|
+
allStatuses: "All statuses",
|
|
28
|
+
statuses: {
|
|
29
|
+
pending_upload: "Pending",
|
|
30
|
+
uploaded: "Uploaded",
|
|
31
|
+
processing: "Processing",
|
|
32
|
+
ready: "Ready",
|
|
33
|
+
failed: "Failed",
|
|
34
|
+
deleted: "Deleted",
|
|
35
|
+
rejected: "Rejected"
|
|
36
|
+
},
|
|
37
|
+
loadError: "Failed to load media",
|
|
38
|
+
loading: "Loading...",
|
|
39
|
+
loadMore: "Load more",
|
|
40
|
+
previewLoading: "Loading",
|
|
41
|
+
previewPlaceholder: "Preview",
|
|
42
|
+
failedScan: "Failed virus scan",
|
|
43
|
+
failedScanTitle: (status) => `Failed virus scan (${status})`,
|
|
44
|
+
tree: {
|
|
45
|
+
regionLabel: "Media categories",
|
|
46
|
+
title: "Categories",
|
|
47
|
+
loadError: "Failed to load categories",
|
|
48
|
+
loading: "Loading categories…",
|
|
49
|
+
empty: "No user categories yet. Create one from the Categories panel to browse media by branch.",
|
|
50
|
+
allMedia: "All media",
|
|
51
|
+
uncategorized: "Uncategorized",
|
|
52
|
+
allMediaScope: "All media",
|
|
53
|
+
uncategorizedScope: "Uncategorized media",
|
|
54
|
+
selectedScope: (id) => `Selected branch (category ${id})`,
|
|
55
|
+
expand: (name) => `Expand ${name}`,
|
|
56
|
+
collapse: (name) => `Collapse ${name}`,
|
|
57
|
+
countTitle: (direct, total, name) => `${direct} directly in ${name}, ${total} including sub-categories`
|
|
58
|
+
},
|
|
59
|
+
transfer: {
|
|
60
|
+
regionLabel: "Import and export media",
|
|
61
|
+
exportTitle: "Export",
|
|
62
|
+
importTitle: "Import",
|
|
63
|
+
scope: "Export scope",
|
|
64
|
+
format: "Format",
|
|
65
|
+
manifest: "Manifest",
|
|
66
|
+
archive: "Archive",
|
|
67
|
+
manifestHint: "Metadata only — filenames, categories, no bytes.",
|
|
68
|
+
archiveHint: "Full zip with bytes; assembled asynchronously.",
|
|
69
|
+
startExport: "Start export",
|
|
70
|
+
exporting: "Exporting…",
|
|
71
|
+
exportError: "Export failed",
|
|
72
|
+
downloadManifest: (count) => `Download manifest (${count} objects)`,
|
|
73
|
+
downloadArchive: (count) => `Download archive (${count} objects)`,
|
|
74
|
+
exportFailed: (error) => `Export failed${error ? `: ${error}` : "."}`,
|
|
75
|
+
exportStatus: (status) => `Export ${status}…`,
|
|
76
|
+
chooseFile: "Choose file",
|
|
77
|
+
dropFile: "Drop a file here, or choose one above.",
|
|
78
|
+
startImport: "Start import",
|
|
79
|
+
importing: "Importing…",
|
|
80
|
+
importError: "Import failed",
|
|
81
|
+
report: (created, linked, skipped, failed) => `${created} created, ${linked} linked, ${skipped} skipped, ${failed} failed`,
|
|
82
|
+
categoriesCreated: (count) => `${count} categories created`,
|
|
83
|
+
file: "File",
|
|
84
|
+
status: "Status",
|
|
85
|
+
reason: "Reason",
|
|
86
|
+
importStatuses: {
|
|
87
|
+
created: "Created",
|
|
88
|
+
linked: "Linked",
|
|
89
|
+
skipped: "Skipped",
|
|
90
|
+
failed: "Failed"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
upload: {
|
|
94
|
+
title: "Upload media",
|
|
95
|
+
close: "Close",
|
|
96
|
+
closeLabel: "Close upload dialog",
|
|
97
|
+
form: {}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=mediaLibraryLabels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaLibraryLabels.js","sourceRoot":"","sources":["../../../../src/runtime/react/mediaLibraryLabels.ts"],"names":[],"mappings":"AA+FA,MAAM,CAAC,MAAM,cAAc,GAAuB;IAChD,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,oBAAoB;IAC/B,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IACvE,YAAY,EAAE,iBAAiB;IAC/B,WAAW,EAAE,cAAc;IAC3B,iBAAiB,EAAE,iBAAiB;IACpC,WAAW,EAAE,cAAc;IAC3B,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,wBAAwB;IACrC,aAAa,EAAE,gBAAgB;IAC/B,UAAU,EAAE;QACV,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,iBAAiB;QAClC,MAAM,EAAE,QAAQ;QACh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
3
|
+
* built from.
|
|
4
|
+
*
|
|
5
|
+
* This package hand-rolls its own classes rather than importing `astro-ui-m8`
|
|
6
|
+
* components into `src/runtime` (`D11`), and every class here has a
|
|
7
|
+
* framework-neutral twin in `src/scaffold/styles/media.css` for consumers that
|
|
8
|
+
* map their own theme instead of loading Tailwind.
|
|
9
|
+
*/
|
|
10
|
+
import type { CSSProperties } from "react";
|
|
11
|
+
export declare const inputClassName = "fa-media-control h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40";
|
|
12
|
+
export declare const titleRowClassName = "fa-media-title-row flex w-full flex-wrap items-center justify-between gap-3";
|
|
13
|
+
export declare const filterRowClassName = "fa-media-filter-row flex w-full flex-col gap-3 md:flex-row md:items-center";
|
|
14
|
+
export declare const viewSwitcherClassName = "fa-media-view-switcher inline-flex shrink-0 rounded-lg border border-input bg-transparent p-0.5";
|
|
15
|
+
export declare const viewButtonClassName = "fa-media-view-button min-h-7 rounded-md border-0 bg-transparent px-2.5 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground aria-pressed:bg-foreground aria-pressed:text-background";
|
|
16
|
+
export declare const previewClassName = "fa-media-preview block aspect-square h-14 w-14 rounded-md border border-border bg-muted object-cover text-xs font-medium text-muted-foreground";
|
|
17
|
+
export declare const previewPlaceholderClassName = "fa-media-preview block aspect-square h-14 w-14 rounded-md border border-border bg-muted object-cover text-xs font-medium text-muted-foreground grid place-items-center px-1 text-center";
|
|
18
|
+
export declare const gridClassName = "fa-media-cards fa-media-cards--grid grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";
|
|
19
|
+
export declare const masonryClassName = "fa-media-cards fa-media-cards--masonry columns-1 gap-4 sm:columns-2 lg:columns-3 xl:columns-4";
|
|
20
|
+
export declare const cardClassName = "fa-media-card mb-4 break-inside-avoid overflow-hidden rounded-lg border border-border bg-card text-card-foreground";
|
|
21
|
+
export declare const cardPreviewClassName = "h-auto w-full rounded-none border-0";
|
|
22
|
+
export declare const cardBodyClassName = "fa-media-card-body grid gap-2 p-3";
|
|
23
|
+
export declare const cardTitleClassName = "m-0 truncate text-sm font-medium leading-5";
|
|
24
|
+
export declare const cardMetaClassName = "fa-media-card-meta flex flex-wrap items-center gap-2 text-xs text-muted-foreground";
|
|
25
|
+
export declare const itemActionsClassName = "fa-media-item-actions flex flex-wrap items-center gap-2";
|
|
26
|
+
export declare const actionLinkClassName = "fa-media-action-link inline-flex min-h-8 items-center rounded-lg border px-3 py-1 text-sm font-medium";
|
|
27
|
+
export declare const listPreviewStyle: CSSProperties;
|
|
28
|
+
export declare const treeLayoutClassName = "fa-media-tree-layout flex w-full flex-col items-stretch gap-4 lg:flex-row lg:items-stretch";
|
|
29
|
+
export declare const treePaneClassName = "fa-media-tree-pane max-h-[45vh] min-h-0 w-full shrink-0 overflow-auto rounded-lg border border-border bg-card p-3 text-card-foreground lg:max-h-[calc(100vh-13rem)] lg:w-[clamp(16rem,24vw,26rem)]";
|
|
30
|
+
export declare const treeResultsClassName = "fa-media-tree-results min-h-0 min-w-0 flex-1";
|
|
31
|
+
export declare const transferDropzoneClassName = "fa-media-transfer-dropzone w-full rounded-lg border border-border bg-card p-3 text-card-foreground";
|
|
32
|
+
export declare const treeNodeRowClassName = "fa-media-tree-select flex min-h-8 w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-left text-sm font-normal text-foreground transition-colors hover:bg-muted [li:focus-visible>&]:ring-3 [li:focus-visible>&]:ring-ring/50";
|
|
33
|
+
export declare const treeToggleClassName = "fa-media-tree-toggle inline-flex w-5 shrink-0 cursor-pointer items-center justify-center text-xs leading-none text-muted-foreground";
|
|
34
|
+
export declare const treeToggleSpacerClassName = "fa-media-tree-toggle-spacer inline-block w-5 shrink-0";
|
|
35
|
+
export declare const activeViewButtonStyle: CSSProperties;
|
|
36
|
+
export declare const selectedTreeNodeStyle: CSSProperties;
|
|
37
|
+
export declare const buttonClassName = "fa-media-button inline-flex min-h-8 items-center rounded-lg border border-input px-3 py-1 text-sm font-medium transition-colors hover:bg-muted disabled:pointer-events-none disabled:opacity-50";
|
|
38
|
+
export declare const toolbarActionsClassName = "fa-media-toolbar-actions flex flex-wrap items-center justify-end gap-2";
|
|
39
|
+
export declare const labelInlineClassName = "fa-media-label-inline flex items-center gap-2 text-sm";
|
|
40
|
+
export declare const transferPanelClassName = "fa-media-transfer-panel grid gap-4 rounded-lg border border-border bg-card p-4 text-card-foreground md:grid-cols-2";
|
|
41
|
+
export declare const transferSectionClassName = "fa-media-transfer-section grid gap-2 content-start";
|
|
42
|
+
export declare const transferTableWrapClassName = "fa-media-transfer-table-wrap max-h-64 overflow-y-auto rounded-md border border-border";
|
|
43
|
+
export declare const transferTableClassName = "fa-media-transfer-table w-full border-collapse text-xs";
|
|
44
|
+
//# sourceMappingURL=mediaLibraryStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaLibraryStyles.d.ts","sourceRoot":"","sources":["../../../../src/runtime/react/mediaLibraryStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,cAAc,iqBACqoB,CAAC;AACjqB,eAAO,MAAM,iBAAiB,gFAAgF,CAAC;AAC/G,eAAO,MAAM,kBAAkB,+EAA+E,CAAC;AAC/G,eAAO,MAAM,qBAAqB,oGACiE,CAAC;AACpG,eAAO,MAAM,mBAAmB,yO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-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40";
|
|
2
|
+
export const titleRowClassName = "fa-media-title-row flex w-full flex-wrap items-center justify-between gap-3";
|
|
3
|
+
export const filterRowClassName = "fa-media-filter-row flex w-full flex-col gap-3 md:flex-row md:items-center";
|
|
4
|
+
export const viewSwitcherClassName = "fa-media-view-switcher inline-flex shrink-0 rounded-lg border border-input bg-transparent p-0.5";
|
|
5
|
+
export const viewButtonClassName = "fa-media-view-button min-h-7 rounded-md border-0 bg-transparent px-2.5 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground aria-pressed:bg-foreground aria-pressed:text-background";
|
|
6
|
+
export const previewClassName = "fa-media-preview block aspect-square h-14 w-14 rounded-md border border-border bg-muted object-cover text-xs font-medium text-muted-foreground";
|
|
7
|
+
export const previewPlaceholderClassName = `${previewClassName} grid place-items-center px-1 text-center`;
|
|
8
|
+
export const gridClassName = "fa-media-cards fa-media-cards--grid grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";
|
|
9
|
+
export const masonryClassName = "fa-media-cards fa-media-cards--masonry columns-1 gap-4 sm:columns-2 lg:columns-3 xl:columns-4";
|
|
10
|
+
export const cardClassName = "fa-media-card mb-4 break-inside-avoid overflow-hidden rounded-lg border border-border bg-card text-card-foreground";
|
|
11
|
+
export const cardPreviewClassName = "h-auto w-full rounded-none border-0";
|
|
12
|
+
export const cardBodyClassName = "fa-media-card-body grid gap-2 p-3";
|
|
13
|
+
export const cardTitleClassName = "m-0 truncate text-sm font-medium leading-5";
|
|
14
|
+
export const cardMetaClassName = "fa-media-card-meta flex flex-wrap items-center gap-2 text-xs text-muted-foreground";
|
|
15
|
+
export const itemActionsClassName = "fa-media-item-actions flex flex-wrap items-center gap-2";
|
|
16
|
+
export const actionLinkClassName = "fa-media-action-link inline-flex min-h-8 items-center rounded-lg border px-3 py-1 text-sm font-medium";
|
|
17
|
+
export const listPreviewStyle = {
|
|
18
|
+
aspectRatio: "1 / 1",
|
|
19
|
+
borderRadius: "0.375rem",
|
|
20
|
+
height: "clamp(4rem, 12vw, 8rem)",
|
|
21
|
+
maxHeight: "8rem",
|
|
22
|
+
maxWidth: "8rem",
|
|
23
|
+
objectFit: "cover",
|
|
24
|
+
width: "clamp(4rem, 12vw, 8rem)"
|
|
25
|
+
};
|
|
26
|
+
// One column on narrow viewports, two panes from `lg` up — not `md`. At `md`
|
|
27
|
+
// (48rem) a category pane and a six-column table shared 768px and both were
|
|
28
|
+
// cramped; the split now waits for 64rem, so the stacked layout carries the
|
|
29
|
+
// tablet range where it reads better.
|
|
30
|
+
//
|
|
31
|
+
// `items-stretch` at both widths, where the row used to be `md:items-start`.
|
|
32
|
+
// That is what makes the pane share the results column's height instead of
|
|
33
|
+
// hugging its own content and leaving a short box beside a long table.
|
|
34
|
+
export const treeLayoutClassName = "fa-media-tree-layout flex w-full flex-col items-stretch gap-4 lg:flex-row lg:items-stretch";
|
|
35
|
+
// Width is `clamp(16rem, 24vw, 26rem)` rather than a flat `w-64`: 16rem was the
|
|
36
|
+
// same pane on a 13" laptop and a 27" monitor, and it was too narrow for a
|
|
37
|
+
// nested tree on both. It now scales with the viewport between a readable floor
|
|
38
|
+
// and a cap that keeps the results column dominant.
|
|
39
|
+
//
|
|
40
|
+
// Height is bounded but no longer tight. Stretched by the row, it takes the
|
|
41
|
+
// results column's height; the `max-h` only bites when the tree itself is the
|
|
42
|
+
// taller of the two, and then the pane scrolls at the cap instead of growing
|
|
43
|
+
// the page. `min-h-0` is required for that scroll to work at all — without it
|
|
44
|
+
// a stretched flex item refuses to shrink below its content.
|
|
45
|
+
//
|
|
46
|
+
// `overflow-auto`, not `overflow-y-auto`: a nested branch is wider than the
|
|
47
|
+
// pane, so a deep tree used to be clipped with no way to reach the rest of it.
|
|
48
|
+
// The horizontal bar is `auto`, so it appears only when the widest row actually
|
|
49
|
+
// exceeds the pane. It only has anything to scroll because the list sizes to
|
|
50
|
+
// `min-w-max` and the row labels no longer truncate.
|
|
51
|
+
export const treePaneClassName = "fa-media-tree-pane max-h-[45vh] min-h-0 w-full shrink-0 overflow-auto rounded-lg border border-border bg-card p-3 text-card-foreground lg:max-h-[calc(100vh-13rem)] lg:w-[clamp(16rem,24vw,26rem)]";
|
|
52
|
+
export const treeResultsClassName = "fa-media-tree-results min-h-0 min-w-0 flex-1";
|
|
53
|
+
// The import dropzone used to borrow `treePaneClassName` outright for its card
|
|
54
|
+
// look, which quietly handed it the tree pane's width and scroll behaviour too
|
|
55
|
+
// — so sizing the pane for a category tree would have sized a file dropzone
|
|
56
|
+
// with it. It carries the shared card styling on its own class instead.
|
|
57
|
+
export const transferDropzoneClassName = "fa-media-transfer-dropzone w-full rounded-lg border border-border bg-card p-3 text-card-foreground";
|
|
58
|
+
// The row is not focusable any more — its `<li role="treeitem">` parent holds
|
|
59
|
+
// the tab stop — so the focus ring is drawn here off the parent's
|
|
60
|
+
// `:focus-visible`, keeping it around the row instead of around the whole
|
|
61
|
+
// subtree the `<li>` wraps.
|
|
62
|
+
export const treeNodeRowClassName = "fa-media-tree-select flex min-h-8 w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-left text-sm font-normal text-foreground transition-colors hover:bg-muted [li:focus-visible>&]:ring-3 [li:focus-visible>&]:ring-ring/50";
|
|
63
|
+
export const treeToggleClassName = "fa-media-tree-toggle inline-flex w-5 shrink-0 cursor-pointer items-center justify-center text-xs leading-none text-muted-foreground";
|
|
64
|
+
export const treeToggleSpacerClassName = "fa-media-tree-toggle-spacer inline-block w-5 shrink-0";
|
|
65
|
+
export const activeViewButtonStyle = {
|
|
66
|
+
background: "var(--fa-media-active-bg, var(--foreground, CanvasText))",
|
|
67
|
+
borderColor: "var(--fa-media-active-bg, var(--foreground, CanvasText))",
|
|
68
|
+
color: "var(--fa-media-active-fg, var(--background, Canvas))"
|
|
69
|
+
};
|
|
70
|
+
export const selectedTreeNodeStyle = {
|
|
71
|
+
background: "var(--fa-media-tree-selected-bg, var(--muted, Highlight))",
|
|
72
|
+
color: "var(--fa-media-tree-selected-fg, var(--foreground, HighlightText))",
|
|
73
|
+
fontWeight: 600
|
|
74
|
+
};
|
|
75
|
+
export const buttonClassName = "fa-media-button inline-flex min-h-8 items-center rounded-lg border border-input px-3 py-1 text-sm font-medium transition-colors hover:bg-muted disabled:pointer-events-none disabled:opacity-50";
|
|
76
|
+
export const toolbarActionsClassName = "fa-media-toolbar-actions flex flex-wrap items-center justify-end gap-2";
|
|
77
|
+
export const labelInlineClassName = "fa-media-label-inline flex items-center gap-2 text-sm";
|
|
78
|
+
export const transferPanelClassName = "fa-media-transfer-panel grid gap-4 rounded-lg border border-border bg-card p-4 text-card-foreground md:grid-cols-2";
|
|
79
|
+
export const transferSectionClassName = "fa-media-transfer-section grid gap-2 content-start";
|
|
80
|
+
export const transferTableWrapClassName = "fa-media-transfer-table-wrap max-h-64 overflow-y-auto rounded-md border border-border";
|
|
81
|
+
export const transferTableClassName = "fa-media-transfer-table w-full border-collapse text-xs";
|
|
82
|
+
//# sourceMappingURL=mediaLibraryStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaLibraryStyles.js","sourceRoot":"","sources":["../../../../src/runtime/react/mediaLibraryStyles.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,cAAc,GACzB,8pBAA8pB,CAAC;AACjqB,MAAM,CAAC,MAAM,iBAAiB,GAAG,6EAA6E,CAAC;AAC/G,MAAM,CAAC,MAAM,kBAAkB,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@@ export type MediaRouteFragments = {
|
|
|
2
2
|
base?: string;
|
|
3
3
|
upload?: string | false;
|
|
4
4
|
library?: string | false;
|
|
5
|
+
categories?: string | false;
|
|
5
6
|
object?: string | false;
|
|
6
7
|
presets?: string | false;
|
|
7
8
|
admin?: string | false;
|
|
@@ -9,6 +10,7 @@ export type MediaRouteFragments = {
|
|
|
9
10
|
export type BuiltMediaRoutes = {
|
|
10
11
|
upload?: string;
|
|
11
12
|
library?: string;
|
|
13
|
+
categories?: string;
|
|
12
14
|
object?: string;
|
|
13
15
|
presets?: string;
|
|
14
16
|
admin?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/runtime/routes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/runtime/routes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAiBF,wBAAgB,gBAAgB,CAAC,MAAM,GAAE,mBAAwB,GAAG,gBAAgB,CAWnF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAIvE;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,MAAM,gBAAgB,EAC5B,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAIR"}
|
|
@@ -2,6 +2,7 @@ const DEFAULT_FRAGMENTS = {
|
|
|
2
2
|
base: "",
|
|
3
3
|
upload: "/media/upload",
|
|
4
4
|
library: "/media",
|
|
5
|
+
categories: "/media/categories",
|
|
5
6
|
object: "/media/object/[id]",
|
|
6
7
|
presets: "/media/presets",
|
|
7
8
|
admin: "/admin/media"
|
|
@@ -16,6 +17,7 @@ export function buildMediaRoutes(routes = {}) {
|
|
|
16
17
|
return {
|
|
17
18
|
upload: merged.upload === false ? undefined : joinRoute(base, merged.upload),
|
|
18
19
|
library: merged.library === false ? undefined : joinRoute(base, merged.library),
|
|
20
|
+
categories: merged.categories === false ? undefined : joinRoute(base, merged.categories),
|
|
19
21
|
object: merged.object === false ? undefined : joinRoute(base, merged.object),
|
|
20
22
|
presets: merged.presets === false ? undefined : joinRoute(base, merged.presets),
|
|
21
23
|
admin: merged.admin === false ? undefined : joinRoute(base, merged.admin)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/runtime/routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/runtime/routes.ts"],"names":[],"mappings":"AAmBA,MAAM,iBAAiB,GAAmE;IACxF,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,eAAe;IACvB,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,mBAAmB;IAC/B,MAAM,EAAE,oBAAoB;IAC5B,OAAO,EAAE,gBAAgB;IACzB,KAAK,EAAE,cAAc;CACtB,CAAC;AAEF,SAAS,SAAS,CAAC,IAAY,EAAE,QAAgB;IAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpE,OAAO,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,SAA8B,EAAE;IAC/D,MAAM,MAAM,GAAG,EAAE,GAAG,iBAAiB,EAAE,GAAG,MAAM,EAAE,CAAC;IACnD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;IAC/B,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC;QAC5E,OAAO,EAAE,MAAM,CAAC,OAAO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