@useupup/angular 3.3.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.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +71 -0
  3. package/dist/README.md +71 -0
  4. package/dist/assets/logos.d.ts +4 -0
  5. package/dist/components/audio-uploader.component.d.ts +48 -0
  6. package/dist/components/audio-waveform.component.d.ts +24 -0
  7. package/dist/components/box-uploader.component.d.ts +22 -0
  8. package/dist/components/camera-uploader.component.d.ts +44 -0
  9. package/dist/components/client-box-uploader.component.d.ts +23 -0
  10. package/dist/components/client-dropbox-uploader.component.d.ts +23 -0
  11. package/dist/components/client-google-drive-uploader.component.d.ts +28 -0
  12. package/dist/components/client-one-drive-uploader.component.d.ts +23 -0
  13. package/dist/components/default-add-more-icon.component.d.ts +12 -0
  14. package/dist/components/dropbox-uploader.component.d.ts +22 -0
  15. package/dist/components/file-hero.component.d.ts +36 -0
  16. package/dist/components/file-icon.component.d.ts +12 -0
  17. package/dist/components/file-item.component.d.ts +28 -0
  18. package/dist/components/file-list.component.d.ts +71 -0
  19. package/dist/components/file-preview-portal.component.d.ts +52 -0
  20. package/dist/components/file-preview-thumbnail.component.d.ts +40 -0
  21. package/dist/components/file-preview.component.d.ts +55 -0
  22. package/dist/components/file-row.component.d.ts +43 -0
  23. package/dist/components/google-drive-uploader.component.d.ts +22 -0
  24. package/dist/components/icon.component.d.ts +17 -0
  25. package/dist/components/icons/audio-icon.component.d.ts +6 -0
  26. package/dist/components/icons/box-icon.component.d.ts +6 -0
  27. package/dist/components/icons/camera-icon.component.d.ts +6 -0
  28. package/dist/components/icons/chevron-left-icon.component.d.ts +6 -0
  29. package/dist/components/icons/default-loader-icon.component.d.ts +5 -0
  30. package/dist/components/icons/dropbox-icon.component.d.ts +6 -0
  31. package/dist/components/icons/empty-icon.component.d.ts +6 -0
  32. package/dist/components/icons/file-icon-svg.component.d.ts +8 -0
  33. package/dist/components/icons/folder-filled-icon.component.d.ts +6 -0
  34. package/dist/components/icons/google-drive-icon.component.d.ts +6 -0
  35. package/dist/components/icons/index.d.ts +25 -0
  36. package/dist/components/icons/layout-grid-icon.component.d.ts +6 -0
  37. package/dist/components/icons/layout-list-icon.component.d.ts +6 -0
  38. package/dist/components/icons/link-icon.component.d.ts +6 -0
  39. package/dist/components/icons/loader-icon.component.d.ts +6 -0
  40. package/dist/components/icons/my-device-icon.component.d.ts +6 -0
  41. package/dist/components/icons/one-drive-icon.component.d.ts +6 -0
  42. package/dist/components/icons/player-pause-filled-icon.component.d.ts +6 -0
  43. package/dist/components/icons/player-play-filled-icon.component.d.ts +6 -0
  44. package/dist/components/icons/screen-capture-icon.component.d.ts +6 -0
  45. package/dist/components/icons/search-icon.component.d.ts +6 -0
  46. package/dist/components/icons/trash-icon.component.d.ts +14 -0
  47. package/dist/components/icons/upload-icon.component.d.ts +7 -0
  48. package/dist/components/icons/user-icon.component.d.ts +6 -0
  49. package/dist/components/icons/x-icon.component.d.ts +6 -0
  50. package/dist/components/image-editor-stub.component.d.ts +13 -0
  51. package/dist/components/one-drive-uploader.component.d.ts +22 -0
  52. package/dist/components/progress-bar.component.d.ts +30 -0
  53. package/dist/components/screen-capture-uploader.component.d.ts +47 -0
  54. package/dist/components/server-mode-drive-uploader.component.d.ts +49 -0
  55. package/dist/components/shared/drive-auth-fallback.component.d.ts +27 -0
  56. package/dist/components/shared/drive-browser-header.component.d.ts +64 -0
  57. package/dist/components/shared/drive-browser-icon.component.d.ts +16 -0
  58. package/dist/components/shared/drive-browser-item.component.d.ts +21 -0
  59. package/dist/components/shared/drive-browser.component.d.ts +52 -0
  60. package/dist/components/shared/file-success-check.component.d.ts +21 -0
  61. package/dist/components/source-selector.component.d.ts +35 -0
  62. package/dist/components/source-view-container.component.d.ts +29 -0
  63. package/dist/components/source-view.component.d.ts +46 -0
  64. package/dist/components/uploader-header.component.d.ts +36 -0
  65. package/dist/components/uploader-panel.component.d.ts +59 -0
  66. package/dist/components/url-uploader.component.d.ts +30 -0
  67. package/dist/context/source-view-header-extra.service.d.ts +21 -0
  68. package/dist/fesm2022/useupup-angular.mjs +9561 -0
  69. package/dist/fesm2022/useupup-angular.mjs.map +1 -0
  70. package/dist/index.d.ts +5 -0
  71. package/dist/lib/to-signal-store.d.ts +20 -0
  72. package/dist/lib/use-sse-processing.d.ts +19 -0
  73. package/dist/lib/use-tiles-per-row.d.ts +18 -0
  74. package/dist/lib/use-upup-upload.d.ts +40 -0
  75. package/dist/lib/view-mode.d.ts +23 -0
  76. package/dist/public-api.d.ts +9 -0
  77. package/dist/services/box.service.d.ts +40 -0
  78. package/dist/services/camera-uploader.service.d.ts +32 -0
  79. package/dist/services/dropbox.service.d.ts +40 -0
  80. package/dist/services/fetch-file-by-url.service.d.ts +17 -0
  81. package/dist/services/google-drive.service.d.ts +47 -0
  82. package/dist/services/one-drive.service.d.ts +39 -0
  83. package/dist/services/server-mode-drive.service.d.ts +30 -0
  84. package/dist/shared/types.d.ts +14 -0
  85. package/dist/styles.d.ts +4 -0
  86. package/dist/tailwind-prefixed.css +2499 -0
  87. package/dist/upup-store.service.d.ts +131 -0
  88. package/dist/upup-uploader.component.d.ts +36 -0
  89. package/package.json +109 -0
@@ -0,0 +1,48 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { UpupStore } from '../upup-store.service';
3
+ import * as i0 from "@angular/core";
4
+ type RecordingState = 'idle' | 'recording' | 'recorded';
5
+ /**
6
+ * Audio recorder leaf — port of AudioUploader.svelte.
7
+ *
8
+ * Slot name : "audio-uploader"
9
+ * (Both the error-state and normal-state SourceViewContainers use slotName="audio-uploader".)
10
+ *
11
+ * Svelte parity:
12
+ * - All state (recordingState, duration, audioUrl, error) is plain class properties
13
+ * with change-detection via Angular's default CD.
14
+ * - MediaRecorder lifecycle (startRecording / stopRecording / discardRecording / addRecording)
15
+ * mirrors svelte exactly.
16
+ * - Cleanup on ngOnDestroy (svelte: onDestroy).
17
+ * - No shared composable — AudioUploader.svelte contains all logic inline.
18
+ *
19
+ * Auto-start guard for tests:
20
+ * startRecording() only runs on user click, not on mount → no auto-start → no jsdom hang.
21
+ */
22
+ export declare class AudioUploaderComponent implements OnDestroy {
23
+ readonly store: UpupStore;
24
+ recordingState: RecordingState;
25
+ duration: number;
26
+ audioUrl: string | null;
27
+ error: string | null;
28
+ private mediaRecorder;
29
+ private chunks;
30
+ private timerHandle;
31
+ /** Exposed to the template so the live waveform can read the mic stream. */
32
+ protected streamRef: MediaStream | null;
33
+ ngOnDestroy(): void;
34
+ startRecording(): Promise<void>;
35
+ stopRecording(): void;
36
+ discardRecording(): void;
37
+ addRecording(): void;
38
+ formatTime(s: number): string;
39
+ get errorTextClass(): string;
40
+ get outerRingClass(): string;
41
+ get innerRingClass(): string;
42
+ get timerClass(): string;
43
+ get startButtonClass(): string;
44
+ get addButtonClass(): string;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<AudioUploaderComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<AudioUploaderComponent, "upup-audio-uploader", never, {}, {}, never, never, true, never>;
47
+ }
48
+ export {};
@@ -0,0 +1,24 @@
1
+ import { AfterViewInit, ElementRef, OnDestroy, QueryList } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Live recording waveform (port of AudioWaveform): sky bars whose heights track
5
+ * the microphone's live frequency data via a Web Audio AnalyserNode.
6
+ *
7
+ * This is the ONE place JS-driven visuals are sanctioned — the bars render REAL
8
+ * audio data, not fx decoration, so (a) they are NOT classed `upup-fx-*` (the
9
+ * motion gate must not freeze live data) and (b) the rAF read loop is
10
+ * legitimate. Heights are written straight to the DOM (no per-frame render).
11
+ * The AnalyserNode + AudioContext are torn down on destroy.
12
+ */
13
+ export declare class AudioWaveformComponent implements AfterViewInit, OnDestroy {
14
+ stream: MediaStream;
15
+ readonly bars: unknown[];
16
+ barEls: QueryList<ElementRef<HTMLSpanElement>>;
17
+ private raf;
18
+ private audioCtx;
19
+ private sourceNode;
20
+ ngAfterViewInit(): void;
21
+ ngOnDestroy(): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<AudioWaveformComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<AudioWaveformComponent, "upup-audio-waveform", never, { "stream": { "alias": "stream"; "required": true; }; }, {}, never, never, true, never>;
24
+ }
@@ -0,0 +1,22 @@
1
+ import { UpupStore } from '../upup-store.service';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * BoxUploaderComponent — Angular port of BoxUploader.svelte.
5
+ *
6
+ * Routes by store.mode:
7
+ * 'server' → ServerModeDriveUploaderComponent(provider="box")
8
+ * 'client' → ClientBoxUploaderComponent
9
+ *
10
+ * Mirrors svelte:
11
+ * {#if mode === 'server'}
12
+ * <ServerModeDriveUploader provider="box" onBack={...} />
13
+ * {:else}
14
+ * <ClientBoxUploader />
15
+ * {/if}
16
+ */
17
+ export declare class BoxUploaderComponent {
18
+ readonly store: UpupStore;
19
+ readonly handleBack: () => void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<BoxUploaderComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<BoxUploaderComponent, "upup-box-uploader", never, {}, {}, never, never, true, never>;
22
+ }
@@ -0,0 +1,44 @@
1
+ import { OnDestroy, AfterViewInit, ElementRef, Type } from '@angular/core';
2
+ import { UpupStore } from '../upup-store.service';
3
+ import { CameraUploaderService } from '../services/camera-uploader.service';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Camera uploader leaf — port of CameraUploader.svelte.
7
+ *
8
+ * Slot name : "camera-uploader"
9
+ * (SourceViewContainer inner div carries data-upup-slot="camera-uploader";
10
+ * the outer div inside the AVC carries data-testid="upup-camera-uploader".)
11
+ *
12
+ * Svelte parity:
13
+ * - CameraUploaderService ↔ useCameraUploader composable
14
+ * - ngOnInit calls startCamera() (svelte: onMount → startCamera())
15
+ * - facingMode changes watched via effect → restartCamera when no capture is shown
16
+ * - videoEl bound via @ViewChild (svelte: bind:this={videoEl})
17
+ * - ngOnDestroy calls stopCamera() (svelte: onDestroy → stopCamera())
18
+ *
19
+ * Auto-start guard for tests:
20
+ * CameraUploaderService.startCamera() is called in ngAfterViewInit, which runs in
21
+ * jsdom. navigator.mediaDevices.getUserMedia in jsdom throws/returns a rejected
22
+ * promise which the service silently catches (camera unavailable — leave stream null).
23
+ * Tests that want to verify startCamera() must mock navigator.mediaDevices.getUserMedia
24
+ * before rendering the component.
25
+ */
26
+ export declare class CameraUploaderComponent implements AfterViewInit, OnDestroy {
27
+ readonly store: UpupStore;
28
+ readonly cameraSvc: CameraUploaderService;
29
+ videoElRef?: ElementRef<HTMLVideoElement>;
30
+ constructor();
31
+ ngAfterViewInit(): void;
32
+ ngOnDestroy(): void;
33
+ get cameraCaptureIcon(): Type<unknown>;
34
+ get cameraRotateIcon(): Type<unknown>;
35
+ get cameraDeleteIcon(): Type<unknown>;
36
+ get switchLabel(): string;
37
+ get previewContainerClass(): string;
38
+ get deleteButtonClass(): string;
39
+ get captureButtonClass(): string;
40
+ get rotateButtonClass(): string;
41
+ get addButtonClass(): string;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<CameraUploaderComponent, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<CameraUploaderComponent, "upup-camera-uploader", never, {}, {}, never, never, true, never>;
44
+ }
@@ -0,0 +1,23 @@
1
+ import { OnInit, OnDestroy } from '@angular/core';
2
+ import { BoxService } from '../services/box.service';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Angular port of ClientBoxUploader.svelte.
6
+ *
7
+ * Popup auth: shows fallback when !isAuthenticated && !token && !isLoading.
8
+ */
9
+ export declare class ClientBoxUploaderComponent implements OnInit, OnDestroy {
10
+ readonly svc: BoxService;
11
+ ngOnInit(): void;
12
+ ngOnDestroy(): void;
13
+ readonly authenticate: () => void;
14
+ readonly handleSignOut: () => void;
15
+ readonly setPath: (path: Parameters<BoxService["setPath"]>[0]) => void;
16
+ readonly handleClick: (file: Parameters<BoxService["handleClick"]>[0]) => void;
17
+ readonly handleSubmit: () => Promise<void>;
18
+ readonly handleCancelDownload: () => void;
19
+ readonly onSelectCurrentFolder: () => void;
20
+ readonly loadMore: () => Promise<void>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClientBoxUploaderComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClientBoxUploaderComponent, "upup-client-box-uploader", never, {}, {}, never, never, true, never>;
23
+ }
@@ -0,0 +1,23 @@
1
+ import { OnInit, OnDestroy } from '@angular/core';
2
+ import { DropboxService } from '../services/dropbox.service';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Angular port of ClientDropboxUploader.svelte.
6
+ *
7
+ * Popup auth: shows fallback when !isAuthenticated && !token && !isLoading.
8
+ */
9
+ export declare class ClientDropboxUploaderComponent implements OnInit, OnDestroy {
10
+ readonly svc: DropboxService;
11
+ ngOnInit(): void;
12
+ ngOnDestroy(): void;
13
+ readonly authenticate: () => void;
14
+ readonly handleSignOut: () => void;
15
+ readonly setPath: (path: Parameters<DropboxService["setPath"]>[0]) => void;
16
+ readonly handleClick: (file: Parameters<DropboxService["handleClick"]>[0]) => void;
17
+ readonly handleSubmit: () => Promise<void>;
18
+ readonly handleCancelDownload: () => void;
19
+ readonly onSelectCurrentFolder: () => void;
20
+ readonly loadMore: () => Promise<void>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClientDropboxUploaderComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClientDropboxUploaderComponent, "upup-client-dropbox-uploader", never, {}, {}, never, never, true, never>;
23
+ }
@@ -0,0 +1,28 @@
1
+ import { OnInit, OnDestroy } from '@angular/core';
2
+ import { GoogleDriveService } from '../services/google-drive.service';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Angular port of ClientGoogleDriveUploader.svelte.
6
+ *
7
+ * Wires up GoogleDriveService → DriveAuthFallback (when not authed) or
8
+ * DriveBrowser (when authed). All state lives in the service; this component
9
+ * only routes between the two views.
10
+ *
11
+ * GIS auth (Google): shows fallback when !token && (authCancelled || isAuthReady).
12
+ * The fallback button calls retryAuth() — no popup is triggered directly here.
13
+ */
14
+ export declare class ClientGoogleDriveUploaderComponent implements OnInit, OnDestroy {
15
+ readonly svc: GoogleDriveService;
16
+ ngOnInit(): void;
17
+ ngOnDestroy(): void;
18
+ readonly retryAuth: () => void;
19
+ readonly handleSignOut: () => void;
20
+ readonly setPath: (path: Parameters<GoogleDriveService["setPath"]>[0]) => void;
21
+ readonly handleClick: (file: Parameters<GoogleDriveService["handleClick"]>[0]) => void;
22
+ readonly handleSubmit: () => Promise<void>;
23
+ readonly handleCancelDownload: () => void;
24
+ readonly onSelectCurrentFolder: () => void;
25
+ readonly loadMore: () => Promise<void>;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClientGoogleDriveUploaderComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClientGoogleDriveUploaderComponent, "upup-client-google-drive-uploader", never, {}, {}, never, never, true, never>;
28
+ }
@@ -0,0 +1,23 @@
1
+ import { OnInit, OnDestroy } from '@angular/core';
2
+ import { OneDriveService } from '../services/one-drive.service';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Angular port of ClientOneDriveUploader.svelte.
6
+ *
7
+ * Popup auth: shows fallback when !isAuthenticated && !token && !isLoading.
8
+ */
9
+ export declare class ClientOneDriveUploaderComponent implements OnInit, OnDestroy {
10
+ readonly svc: OneDriveService;
11
+ ngOnInit(): void;
12
+ ngOnDestroy(): void;
13
+ readonly authenticate: () => void;
14
+ readonly handleSignOut: () => void;
15
+ readonly setPath: (path: Parameters<OneDriveService["setPath"]>[0]) => void;
16
+ readonly handleClick: (file: Parameters<OneDriveService["handleClick"]>[0]) => void;
17
+ readonly handleSubmit: () => Promise<void>;
18
+ readonly handleCancelDownload: () => void;
19
+ readonly onSelectCurrentFolder: () => void;
20
+ readonly loadMore: () => Promise<void>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClientOneDriveUploaderComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClientOneDriveUploaderComponent, "upup-client-one-drive-uploader", never, {}, {}, never, never, true, never>;
23
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Default 'add more' glyph — renders the shared registry 'plus' icon (parity
4
+ * with React's DefaultPlusIconComponent / svelte's DefaultAddMoreIcon). This is
5
+ * the store's default ContainerAddMoreIcon; healing F-711 (the angular header
6
+ * previously defaulted to the empty icon, so no add-more SVG rendered).
7
+ */
8
+ export declare class DefaultAddMoreIconComponent {
9
+ size?: number;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultAddMoreIconComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<DefaultAddMoreIconComponent, "upup-default-add-more-icon", never, { "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
12
+ }
@@ -0,0 +1,22 @@
1
+ import { UpupStore } from '../upup-store.service';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * DropboxUploaderComponent — Angular port of DropboxUploader.svelte.
5
+ *
6
+ * Routes by store.mode:
7
+ * 'server' → ServerModeDriveUploaderComponent(provider="dropbox")
8
+ * 'client' → ClientDropboxUploaderComponent
9
+ *
10
+ * Mirrors svelte:
11
+ * {#if mode === 'server'}
12
+ * <ServerModeDriveUploader provider="dropbox" onBack={...} />
13
+ * {:else}
14
+ * <ClientDropboxUploader />
15
+ * {/if}
16
+ */
17
+ export declare class DropboxUploaderComponent {
18
+ readonly store: UpupStore;
19
+ readonly handleBack: () => void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropboxUploaderComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropboxUploaderComponent, "upup-dropbox-uploader", never, {}, {}, never, never, true, never>;
22
+ }
@@ -0,0 +1,36 @@
1
+ import { type Type } from '@angular/core';
2
+ import { type UploadFile, type Translations } from '@useupup/core';
3
+ import { UpupStore } from '../upup-store.service';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Single-file HERO preview (port of FileHero). One visual fills the fixed-height
7
+ * content area with a bottom scrim caption. The panel is fixed-height by ruling,
8
+ * so the media MUST stay bounded with `min-h-0 flex-1 object-contain`.
9
+ *
10
+ * The image editor is react/preact-only, so NO edit affordance is rendered here.
11
+ */
12
+ export declare class FileHeroComponent {
13
+ readonly store: UpupStore;
14
+ file: UploadFile;
15
+ readonly deleteIconInputs: {
16
+ class: string;
17
+ };
18
+ get translations(): Translations;
19
+ get isImage(): boolean;
20
+ get isVideo(): boolean;
21
+ get isSuccessful(): boolean;
22
+ get extension(): string;
23
+ get progress(): number;
24
+ get isRemovalLocked(): boolean;
25
+ get fileDeleteIcon(): Type<unknown>;
26
+ get rootClass(): string;
27
+ get removeButtonClass(): string;
28
+ get captionClass(): string;
29
+ get nameClass(): string;
30
+ get sizeClass(): string;
31
+ get heroProgressClass(): string;
32
+ get formattedSize(): string;
33
+ onRemove(e: MouseEvent): void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileHeroComponent, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileHeroComponent, "upup-file-hero", never, { "file": { "alias": "file"; "required": false; }; }, {}, never, never, true, never>;
36
+ }
@@ -0,0 +1,12 @@
1
+ import { type IconName } from '@useupup/core';
2
+ import { UpupStore } from '../upup-store.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class FileIconComponent {
5
+ readonly store: UpupStore;
6
+ extension: string;
7
+ extraClass: string;
8
+ get iconName(): IconName;
9
+ get iconClass(): string;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileIconComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileIconComponent, "upup-file-icon", never, { "extension": { "alias": "extension"; "required": false; }; "extraClass": { "alias": "class"; "required": false; }; }, {}, never, never, true, never>;
12
+ }
@@ -0,0 +1,28 @@
1
+ import type { UploadFile } from '@useupup/core';
2
+ import { UpupStore } from '../upup-store.service';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * FileItem — port of FileItem. Wraps the grid tile (FilePreview + preview portal)
6
+ * or, in list / forced-list mode, the compact FileRow. Entrance/exit fx render
7
+ * unconditionally (the CSS motion gate is the one kill switch); a leaving id
8
+ * swaps in the collapse.
9
+ *
10
+ * data-testid="upup-file-item" / data-upup-slot="file-item" / role="listitem".
11
+ */
12
+ export declare class FileItemComponent {
13
+ readonly store: UpupStore;
14
+ file: UploadFile;
15
+ /** Position in the sorted list — drives the entrance stagger / check stagger. */
16
+ index: number;
17
+ /** True when the panel forces the row list (tiles don't fit one row). */
18
+ forcedList: boolean;
19
+ canPreview: boolean;
20
+ showPreviewPortal: boolean;
21
+ get leaving(): boolean;
22
+ get animationDelay(): string | null;
23
+ get containerClass(): string;
24
+ openPreviewPortal(): void;
25
+ closePreviewPortal(): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileItemComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileItemComponent, "upup-file-item", never, { "file": { "alias": "file"; "required": false; }; "index": { "alias": "index"; "required": false; }; "forcedList": { "alias": "forcedList"; "required": false; }; }, {}, never, never, true, never>;
28
+ }
@@ -0,0 +1,71 @@
1
+ import { OnDestroy, AfterViewInit, ElementRef, type Type } from '@angular/core';
2
+ import { Virtualizer, type VirtualItem } from '@tanstack/virtual-core';
3
+ import { UploadStatus, type UploadFile } from '@useupup/core';
4
+ import { isUploadActive } from '@useupup/core/internal';
5
+ import { UpupStore } from '../upup-store.service';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * FileList — port of FileList. Renders in core insertion order (no sort). Single
9
+ * file → FileHero; multiple → fluid auto-fit grid (inline gridTemplateColumns) or
10
+ * forced list. Adaptive: the tiles-per-row ResizeObserver forces the row list when
11
+ * a grid row would overflow the fixed-height panel (header then hides the toggle).
12
+ */
13
+ export declare class FileListComponent implements AfterViewInit, OnDestroy {
14
+ readonly store: UpupStore;
15
+ private cdr;
16
+ readonly UploadStatus: typeof UploadStatus;
17
+ readonly isUploadActive: typeof isUploadActive;
18
+ scrollContainerRef?: ElementRef<HTMLDivElement>;
19
+ private readonly tiles;
20
+ virtualizer: Virtualizer<HTMLDivElement, HTMLDivElement> | null;
21
+ private virtualizerCleanup;
22
+ virtualItems: VirtualItem[];
23
+ private prevVirtCount;
24
+ private prevShouldVirt;
25
+ get orderedFiles(): UploadFile[];
26
+ get isSingle(): boolean;
27
+ get forcedList(): boolean;
28
+ get effectiveViewMode(): 'grid' | 'list';
29
+ get shouldVirtualize(): boolean;
30
+ get isUploading(): boolean;
31
+ get dimmed(): boolean;
32
+ get quietDone(): boolean;
33
+ get canAddMore(): boolean;
34
+ get containerAddMoreIcon(): Type<unknown>;
35
+ get selectionCountText(): string;
36
+ get showUploadButton(): boolean;
37
+ get showBytesRow(): boolean;
38
+ get virtualContainerStyle(): string;
39
+ virtualRowStyle(vi: VirtualItem): string;
40
+ get gridTemplateColumns(): string | null;
41
+ get fileListClass(): string;
42
+ get scrollContainerClass(): string;
43
+ get heroBranchClass(): string;
44
+ get innerListClass(): string;
45
+ get standardInnerClass(): string;
46
+ get footerAddMoreClass(): string;
47
+ get completeCheckClass(): string;
48
+ get completeTextClass(): string;
49
+ get footerClass(): string;
50
+ get uploadButtonClass(): string;
51
+ get retryButtonClass(): string;
52
+ get doneButtonClass(): string;
53
+ get cancelButtonClass(): string;
54
+ get resumeButtonClass(): string;
55
+ get bytesRowClass(): string;
56
+ get bytesText(): string;
57
+ get etaText(): string;
58
+ get uploadButtonText(): string;
59
+ get retryButtonText(): string;
60
+ get uploadErrorText(): string;
61
+ readonly handleCancelFn: () => void;
62
+ onUploadClick(): void;
63
+ onRetryClick(): void;
64
+ ngAfterViewInit(): void;
65
+ ngOnDestroy(): void;
66
+ private initVirtualizer;
67
+ private destroyVirtualizer;
68
+ ngDoCheck(): void;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileListComponent, never>;
70
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileListComponent, "upup-file-list", never, {}, {}, never, never, true, never>;
71
+ }
@@ -0,0 +1,52 @@
1
+ import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
2
+ import { type SafeResourceUrl, type SafeUrl } from '@angular/platform-browser';
3
+ import { type Translations } from '@useupup/core';
4
+ import { UpupStore } from '../upup-store.service';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * FilePreviewPortal — port of FilePreviewPortal.svelte.
8
+ *
9
+ * Svelte renders this into document.body via a portal action.
10
+ * Here we use a fixed full-viewport overlay div toggled with @if — no CDK needed.
11
+ * The `upup-scope` wrapper + `data-upup-slot="file-preview-portal"` testid are preserved.
12
+ *
13
+ * Backdrop click → onClose; Escape key → onClose; content click stops propagation.
14
+ * Handles text loading/error/truncation (mirrors svelte portal).
15
+ */
16
+ export declare class FilePreviewPortalComponent implements OnInit, OnDestroy {
17
+ readonly store: UpupStore;
18
+ private sanitizer;
19
+ fileType: string;
20
+ fileUrl: string;
21
+ fileName: string;
22
+ fileSize?: number;
23
+ get safeImgUrl(): SafeUrl;
24
+ get safeResourceUrl(): SafeResourceUrl;
25
+ onClose: EventEmitter<void>;
26
+ onStopPropagation: EventEmitter<MouseEvent>;
27
+ textLoading: boolean;
28
+ textError: string;
29
+ textContent: string;
30
+ isTruncated: boolean;
31
+ get translations(): Translations;
32
+ get isImage(): boolean;
33
+ get isPdf(): boolean;
34
+ get isText(): boolean;
35
+ get isDark(): boolean;
36
+ get innerClass(): string;
37
+ /**
38
+ * Bound on `window`, not just the dialog div: the modal is opened by a click
39
+ * outside the portal subtree and never calls .focus(), so a listener scoped
40
+ * to the dialog element would never receive the key (F-605). Mirrors the
41
+ * react/vue/svelte canon (FilePreviewPortal.tsx).
42
+ */
43
+ private readonly handleKeyDown;
44
+ ngOnInit(): void;
45
+ ngOnDestroy(): void;
46
+ onBackdropClick(_e: MouseEvent): void;
47
+ onContentClick(e: MouseEvent): void;
48
+ onKeyDown(e: KeyboardEvent): void;
49
+ private loadTextContent;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilePreviewPortalComponent, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilePreviewPortalComponent, "upup-file-preview-portal", never, { "fileType": { "alias": "fileType"; "required": false; }; "fileUrl": { "alias": "fileUrl"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "fileSize": { "alias": "fileSize"; "required": false; }; }, { "onClose": "onClose"; "onStopPropagation": "onStopPropagation"; }, never, never, true, never>;
52
+ }
@@ -0,0 +1,40 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { type SafeResourceUrl } from '@angular/platform-browser';
3
+ import type { Translations } from '@useupup/core';
4
+ import type { InternalFlatClassNames } from '@useupup/core/internal';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * FilePreviewThumbnail — port of FilePreviewThumbnail.svelte.
8
+ *
9
+ * Decides whether to show a static icon (PDF / 3D / oversized text) or an
10
+ * <object> preview element. Emits (updateCanPreview) when the object loads.
11
+ *
12
+ * Svelte original:
13
+ * {#if isPdf || is3D || isOversizedText()} → static icon
14
+ * {:else}
15
+ * {#if !canPreview} → hidden <object> + icon
16
+ * {#if canPreview} → icon (hidden on md if allowPreview) + visible <object>
17
+ */
18
+ export declare class FilePreviewThumbnailComponent {
19
+ private sanitizer;
20
+ canPreview: boolean;
21
+ fileType: string;
22
+ fileName: string;
23
+ fileUrl: string;
24
+ fileSize?: number;
25
+ slotClasses: InternalFlatClassNames;
26
+ allowPreview: boolean;
27
+ labels: Translations;
28
+ updateCanPreview: EventEmitter<boolean>;
29
+ get safeFileUrl(): SafeResourceUrl;
30
+ get extension(): string;
31
+ get is3D(): boolean;
32
+ get isPdf(): boolean;
33
+ get isText(): boolean;
34
+ get isStaticIcon(): boolean;
35
+ get iconWhenCanPreviewClass(): string;
36
+ get objectWrapperClass(): string;
37
+ onObjectLoad(): void;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilePreviewThumbnailComponent, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilePreviewThumbnailComponent, "upup-file-preview-thumbnail", never, { "canPreview": { "alias": "canPreview"; "required": false; }; "fileType": { "alias": "fileType"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "fileUrl": { "alias": "fileUrl"; "required": false; }; "fileSize": { "alias": "fileSize"; "required": false; }; "slotClasses": { "alias": "slotClasses"; "required": false; }; "allowPreview": { "alias": "allowPreview"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; }, { "updateCanPreview": "updateCanPreview"; }, never, never, true, never>;
40
+ }
@@ -0,0 +1,55 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges, type Type } from '@angular/core';
2
+ import { type SafeStyle } from '@angular/platform-browser';
3
+ import { UploadStatus, type Translations } from '@useupup/core';
4
+ import { UpupStore } from '../upup-store.service';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * FilePreview — port of FilePreview. Grid-mode tile: thumbnail (image bg / video
8
+ * first-frame / non-media doc icon), delete + completion overlays, progress bar,
9
+ * name/size, and a click-to-preview button. No edit affordance (the image editor
10
+ * is react/preact-only).
11
+ *
12
+ * data-testid="upup-file-preview" / data-upup-slot="file-preview" preserved.
13
+ */
14
+ export declare class FilePreviewComponent implements OnChanges {
15
+ readonly store: UpupStore;
16
+ private sanitizer;
17
+ fileName: string;
18
+ fileType: string;
19
+ fileId: string;
20
+ fileUrl: string;
21
+ fileSize?: number;
22
+ canPreview: boolean;
23
+ index: number;
24
+ onRequestPreview: EventEmitter<void>;
25
+ updateCanPreview: EventEmitter<boolean>;
26
+ onclick: EventEmitter<MouseEvent>;
27
+ readonly deleteIconInputs: {
28
+ class: string;
29
+ };
30
+ get translations(): Translations;
31
+ get isImage(): boolean;
32
+ get isVideo(): boolean;
33
+ get isPdf(): boolean;
34
+ get isText(): boolean;
35
+ get canPreviewText(): boolean;
36
+ get fileStatus(): UploadStatus | undefined;
37
+ get isSuccessful(): boolean;
38
+ get isRemovalLocked(): boolean;
39
+ get progress(): number;
40
+ get fileDeleteIcon(): Type<unknown>;
41
+ get rootClass(): string;
42
+ get thumbnailWrapperClass(): string;
43
+ get deleteButtonClass(): string;
44
+ get nameClass(): string;
45
+ get sizeClass(): string;
46
+ get previewButtonClass(): string;
47
+ get formattedSize(): string;
48
+ get thumbnailBgStyle(): SafeStyle | null;
49
+ ngOnChanges(changes: SimpleChanges): void;
50
+ private checkAndSignalCanPreview;
51
+ onUpdateCanPreview(val: boolean): void;
52
+ onHandleFileRemove(e: MouseEvent): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilePreviewComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilePreviewComponent, "upup-file-preview", never, { "fileName": { "alias": "fileName"; "required": false; }; "fileType": { "alias": "fileType"; "required": false; }; "fileId": { "alias": "fileId"; "required": false; }; "fileUrl": { "alias": "fileUrl"; "required": false; }; "fileSize": { "alias": "fileSize"; "required": false; }; "canPreview": { "alias": "canPreview"; "required": false; }; "index": { "alias": "index"; "required": false; }; }, { "onRequestPreview": "onRequestPreview"; "updateCanPreview": "updateCanPreview"; "onclick": "onclick"; }, never, never, true, never>;
55
+ }
@@ -0,0 +1,43 @@
1
+ import { type Type } from '@angular/core';
2
+ import { type SafeStyle } from '@angular/platform-browser';
3
+ import { type IconName, type UploadFile, type Translations } from '@useupup/core';
4
+ import { UpupStore } from '../upup-store.service';
5
+ import * as i0 from "@angular/core";
6
+ interface NonMediaThumb {
7
+ gradient: string;
8
+ icon: IconName | 'audio';
9
+ }
10
+ /**
11
+ * Compact list-mode row (port of FileRow): a horizontal card — thumbnail ·
12
+ * name/size · remove. Real image/video first-frame thumbs; colored non-media
13
+ * type tiles via the core fileTypeIconName registry. No edit affordance (the
14
+ * image editor is react/preact-only).
15
+ */
16
+ export declare class FileRowComponent {
17
+ readonly store: UpupStore;
18
+ private sanitizer;
19
+ file: UploadFile;
20
+ index: number;
21
+ readonly deleteIconInputs: {
22
+ class: string;
23
+ };
24
+ get translations(): Translations;
25
+ get type(): string;
26
+ get isImage(): boolean;
27
+ get isVideo(): boolean;
28
+ get isSuccessful(): boolean;
29
+ get isRemovalLocked(): boolean;
30
+ get thumb(): NonMediaThumb;
31
+ get thumbStyle(): SafeStyle | null;
32
+ get progress(): number;
33
+ get fileDeleteIcon(): Type<unknown>;
34
+ get rowClass(): string;
35
+ get nameClass(): string;
36
+ get sizeClass(): string;
37
+ get removeButtonClass(): string;
38
+ get formattedSize(): string;
39
+ onRemove(e: MouseEvent): void;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileRowComponent, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileRowComponent, "upup-file-row", never, { "file": { "alias": "file"; "required": false; }; "index": { "alias": "index"; "required": false; }; }, {}, never, never, true, never>;
42
+ }
43
+ export {};
@@ -0,0 +1,22 @@
1
+ import { UpupStore } from '../upup-store.service';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * GoogleDriveUploaderComponent — Angular port of GoogleDriveUploader.svelte.
5
+ *
6
+ * Routes by store.mode:
7
+ * 'server' → ServerModeDriveUploaderComponent(provider="google-drive")
8
+ * 'client' → ClientGoogleDriveUploaderComponent
9
+ *
10
+ * Mirrors svelte:
11
+ * {#if mode === 'server'}
12
+ * <ServerModeDriveUploader provider="google-drive" onBack={...} />
13
+ * {:else}
14
+ * <ClientGoogleDriveUploader />
15
+ * {/if}
16
+ */
17
+ export declare class GoogleDriveUploaderComponent {
18
+ readonly store: UpupStore;
19
+ readonly handleBack: () => void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<GoogleDriveUploaderComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<GoogleDriveUploaderComponent, "upup-google-drive-uploader", never, {}, {}, never, never, true, never>;
22
+ }