@antelopejs/dms-media 0.1.0 → 0.1.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/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  AntelopeJS DMS module providing an asset/media library: upload, folders, delivery derivatives and light image editing, with per-folder permissions that reuse the DMS authorization system. Ships a Finder-style file explorer (frontend) and an `AssetType` field to reference library assets from forms.
11
11
 
12
- See [docs/PRD.md](./docs/PRD.md) for the architecture and product spec, and [AGENTS.md](./AGENTS.md) for code conventions.
12
+ See [AGENTS.md](./AGENTS.md) for code conventions.
13
13
 
14
14
  ## Installation
15
15
 
@@ -113,4 +113,4 @@ The playground uses the `@antelopejs/dms-frontend` CLI. Run `pnpm --dir frontend
113
113
  - Abandoned staged uploads are expired by the storage backend (e.g. S3 lifecycle rule on the `__staging__/` prefix), not by this module — `interface-file-storage` exposes no listing.
114
114
  - Multi-user ACL scenarios are covered by resolver unit tests; HTTP integration tests run as the owner because the DMS invite flow does not expose invite tokens over HTTP (see the DMS module's `TESTING.md` for the matching upstream limitation).
115
115
  - Folder visibility applies to the folder's direct assets (no recursive visibility inheritance); assets inherit or override individually.
116
- - Cover cropping is centred (no focal point) and reference counting ("used in N records") is out of scope — see the PRD's v2 list.
116
+ - Cover cropping is centred (no focal point), and reference counting ("used in N records") is not supported yet.
@@ -1,15 +1,41 @@
1
1
  <script setup lang="ts">
2
+ import { useElementBounding, useResizeObserver } from "@vueuse/core";
3
+
2
4
  const { t } = useI18n();
5
+
6
+ // The files card fills the rest of the viewport, so the page itself does not
7
+ // scroll. The DMS layout drops page components into plain block containers,
8
+ // so there is no flex parent to fill: the height comes from the viewport,
9
+ // minus where the card actually starts (dashboard header, page header and the
10
+ // storage card above it all vary). Before the first measurement (SSR,
11
+ // pre-mount) no height is applied and the min-h floor takes over.
12
+ const filesCard = ref<HTMLElement | null>(null);
13
+ const { top: filesCardTop, update: measureFilesCard } =
14
+ useElementBounding(filesCard);
15
+ // The storage card grows once its stats load and pushes the files card down;
16
+ // the bounding above only reacts to the files card's own size, so re-measure
17
+ // when the library (which grows with the storage card) resizes.
18
+ const libraryRoot = ref<HTMLElement | null>(null);
19
+ useResizeObserver(libraryRoot, () => measureFilesCard());
20
+ // Room left below the card, matching the layout panel's bottom padding.
21
+ const FILES_CARD_BOTTOM_GAP_PX = 24;
22
+ const filesCardHeight = computed(() =>
23
+ filesCardTop.value > 0
24
+ ? `calc(100dvh - ${Math.round(filesCardTop.value)}px - ${FILES_CARD_BOTTOM_GAP_PX}px)`
25
+ : undefined,
26
+ );
3
27
  </script>
4
28
 
5
29
  <template>
6
- <div class="flex min-h-0 flex-1 flex-col gap-4 pb-12">
30
+ <div ref="libraryRoot" class="flex min-h-0 flex-1 flex-col gap-4">
7
31
  <DmsCard>
8
32
  <DmsMediaStorageOverview />
9
33
  </DmsCard>
10
34
  <DmsCard
35
+ ref="filesCard"
11
36
  :padded="false"
12
- class="flex h-[calc(100dvh-14rem)] min-h-[560px] flex-col overflow-hidden"
37
+ class="flex min-h-96 flex-col overflow-hidden"
38
+ :style="{ height: filesCardHeight }"
13
39
  >
14
40
  <DmsMediaPickerExplorer
15
41
  browse
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms-media",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",