@ember-joinery/file-upload 0.0.0-stage → 1.0.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +154 -0
  2. package/LICENSE.md +9 -0
  3. package/NOTICE +532 -0
  4. package/README.md +63 -2
  5. package/addon-main.cjs +4 -0
  6. package/declarations/-private/upload-actor.d.ts +46 -0
  7. package/declarations/-private/upload-actor.d.ts.map +1 -0
  8. package/declarations/components/file-upload/context.d.ts +21 -0
  9. package/declarations/components/file-upload/context.d.ts.map +1 -0
  10. package/declarations/components/file-upload/dropzone.d.ts +48 -0
  11. package/declarations/components/file-upload/dropzone.d.ts.map +1 -0
  12. package/declarations/components/file-upload/index.d.ts +137 -0
  13. package/declarations/components/file-upload/index.d.ts.map +1 -0
  14. package/declarations/components/file-upload/labels.d.ts +25 -0
  15. package/declarations/components/file-upload/labels.d.ts.map +1 -0
  16. package/declarations/components/file-upload/list.d.ts +18 -0
  17. package/declarations/components/file-upload/list.d.ts.map +1 -0
  18. package/declarations/components/file-upload/queue.d.ts +23 -0
  19. package/declarations/components/file-upload/queue.d.ts.map +1 -0
  20. package/declarations/components/file-upload/state.d.ts +156 -0
  21. package/declarations/components/file-upload/state.d.ts.map +1 -0
  22. package/declarations/components/file-upload.d.ts +3 -0
  23. package/declarations/index.d.ts +5 -0
  24. package/declarations/index.d.ts.map +1 -0
  25. package/declarations/messages.d.ts +55 -0
  26. package/declarations/messages.d.ts.map +1 -0
  27. package/declarations/test-support/file-upload.d.ts +112 -0
  28. package/declarations/test-support/file-upload.d.ts.map +1 -0
  29. package/declarations/test-support/index.d.ts +2 -0
  30. package/declarations/test-support/index.d.ts.map +1 -0
  31. package/declarations/test-support.d.ts +2 -0
  32. package/declarations/utils.d.ts +25 -0
  33. package/declarations/utils.d.ts.map +1 -0
  34. package/dist/components/file-upload.js +722 -0
  35. package/dist/components/file-upload.js.map +1 -0
  36. package/dist/index.js +4 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/messages.js +57 -0
  39. package/dist/messages.js.map +1 -0
  40. package/dist/test-support.js +266 -0
  41. package/dist/test-support.js.map +1 -0
  42. package/dist/utils.js +60 -0
  43. package/dist/utils.js.map +1 -0
  44. package/package.json +120 -3
@@ -0,0 +1,21 @@
1
+ import type { FileUploadState } from './state.ts';
2
+ import type { FileUploadLabels } from './labels.ts';
3
+ /**
4
+ * What a `<FileUpload>` hands its parts: its state, its strings, and what its file input takes
5
+ * from the caller. The parts read it live, so they follow the root's arguments.
6
+ */
7
+ export interface FileUploadContext {
8
+ readonly state: FileUploadState<any>;
9
+ readonly labels: FileUploadLabels;
10
+ /** The file input's `id` (`@id`). */
11
+ readonly inputId: string | undefined;
12
+ /** The file input's `aria-label` (`@label`). */
13
+ readonly label: string | undefined;
14
+ /** Whether the value is invalid (`@invalid`): `aria-invalid` on the input. */
15
+ readonly invalid: boolean | undefined;
16
+ /** The input's `aria-describedby` (`@describedBy`). */
17
+ readonly describedBy: string | undefined;
18
+ /** Whether a file is required (`@required`). */
19
+ readonly required: boolean | undefined;
20
+ }
21
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,GAAG,CAAC,CAAA;IACpC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IACrC,uDAAuD;IACvD,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IACxC,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;CACvC"}
@@ -0,0 +1,48 @@
1
+ import Component from '@glimmer/component';
2
+ import type { UploadFile } from 'ember-file-upload';
3
+ import type { FileUploadContext } from './context.ts';
4
+ /** What a drop zone's block gets: whether files are dragged over it, and whether it can tell. */
5
+ export interface FileUploadDropzoneState {
6
+ /** Whether files are dragged over the zone now. */
7
+ isDragging: boolean;
8
+ /** Whether the browser can drag and drop files (every evergreen browser can). */
9
+ isSupported: boolean;
10
+ }
11
+ export interface FileUploadDropzoneSignature {
12
+ Args: {
13
+ /** The `<FileUpload>` it belongs to; `u.Dropzone` comes with it. */
14
+ upload: FileUploadContext;
15
+ };
16
+ Blocks: {
17
+ /**
18
+ * What the zone shows, in place of its icon, prompt and hint. It names the zone's file
19
+ * input, so say what a press on it does.
20
+ */
21
+ default: [zone: FileUploadDropzoneState];
22
+ };
23
+ /** ember-file-upload's `FileDropzone`: a `<div>`. */
24
+ Element: HTMLElement;
25
+ }
26
+ /**
27
+ * The zone to drop files on, or to press to choose them: ember-file-upload's `FileDropzone`
28
+ * around a visually hidden `<input type="file">`, in the look of shadcn's Empty with a dashed
29
+ * border. It turns `--primary` while files are dragged over it, shows the focus ring while its
30
+ * input has focus, and names the files a choice or drop turned away under its prompt, in a
31
+ * status region that is always there (empty until then), so screen readers announce it.
32
+ */
33
+ export default class FileUploadDropzone extends Component<FileUploadDropzoneSignature> {
34
+ isDragging: boolean;
35
+ get state(): import("./state.ts").FileUploadState<any>;
36
+ get labels(): import("./labels.ts").FileUploadLabels;
37
+ get rejected(): string | undefined;
38
+ get leftOut(): string | undefined;
39
+ /** Whether to say files can be dropped: only where they can be, and while it takes them. */
40
+ get showsHint(): boolean;
41
+ get description(): string | undefined;
42
+ enter: () => void;
43
+ leave: () => void;
44
+ drop: (files: UploadFile[], transfer: {
45
+ files: File[];
46
+ }) => void;
47
+ }
48
+ //# sourceMappingURL=dropzone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropzone.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/dropzone.gts"],"names":[],"mappings":"AAkKA,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAI1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAErD,iGAAiG;AACjG,MAAM,WAAW,uBAAuB;IACtC,mDAAmD;IACnD,UAAU,EAAE,OAAO,CAAA;IACnB,iFAAiF;IACjF,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE;QACJ,oEAAoE;QACpE,MAAM,EAAE,iBAAiB,CAAA;KAC1B,CAAA;IACD,MAAM,EAAE;QACN;;;WAGG;QACH,OAAO,EAAE,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA;KACzC,CAAA;IACD,qDAAqD;IACrD,OAAO,EAAE,WAAW,CAAA;CACrB;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,SAAS,CAAC,2BAA2B,CAAC;IAC3E,UAAU,UAAQ;IAE3B,IAAI,KAAK,8CAER;IAED,IAAI,MAAM,2CAET;IAED,IAAI,QAAQ,IAAI,MAAM,GAAG,SAAS,CAGjC;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,SAAS,CAGhC;IAED,4FAA4F;IAC5F,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,KAAK,QAAO,IAAI,CAEf;IAED,KAAK,QAAO,IAAI,CAEf;IAED,IAAI,GAAI,OAAO,UAAU,EAAE,EAAE,UAAU;QAAE,KAAK,EAAE,IAAI,EAAE,CAAA;KAAE,KAAG,IAAI,CAG9D;CAgNF"}
@@ -0,0 +1,137 @@
1
+ import Component from '@glimmer/component';
2
+ import type Owner from '@ember/owner';
3
+ import type { WithBoundArgs } from '@glint/template';
4
+ import type { Queue } from 'ember-file-upload';
5
+ import FileUploadDropzone from './dropzone';
6
+ import FileUploadList from './list';
7
+ import FileUploadQueue from './queue';
8
+ import type { FileUploadLabels } from './labels.ts';
9
+ import { FileUploadState, type FileEntry, type FileState, type Upload, type UploadFn } from './state.ts';
10
+ import type { FileUploadContext } from './context.ts';
11
+ export type { FileEntry, FileState, FileUploadLabels, Upload, UploadFn };
12
+ export type { FileUploadDropzoneSignature, FileUploadDropzoneState } from './dropzone';
13
+ export type { FileUploadListSignature } from './list';
14
+ export type { FileUploadQueueSignature } from './queue';
15
+ /** What `<FileUpload>` yields: its parts, its files and uploads, and what it can do with them. */
16
+ export interface FileUploadYield<T> {
17
+ /** The zone to drop files on, or to press to choose them. */
18
+ Dropzone: WithBoundArgs<typeof FileUploadDropzone, 'upload'>;
19
+ /** The files the value holds, one Item each, with a remove button. */
20
+ List: WithBoundArgs<typeof FileUploadList, 'upload'>;
21
+ /** The files uploading or failed, one Item each, with a Progress bar. */
22
+ Queue: WithBoundArgs<typeof FileUploadQueue, 'upload'>;
23
+ /** The files the value holds, as the list shows them. */
24
+ files: FileEntry<T>[];
25
+ /** The uploads in the queue: each has `name`, `progress`, `state` and `error`. */
26
+ uploads: readonly Upload[];
27
+ /** Whether any upload is running. */
28
+ isUploading: boolean;
29
+ /** Takes a value out of the list. */
30
+ remove: (value: T) => void;
31
+ /** Empties the list. */
32
+ clear: () => void;
33
+ /** Uploads a failed file again. */
34
+ retry: (upload: Upload) => void;
35
+ /** ember-file-upload's queue the chosen files go into. */
36
+ queue: Queue;
37
+ }
38
+ export interface FileUploadSignature<T = File> {
39
+ Args: {
40
+ /** Whether it takes more than one file. Without it, a new choice replaces the file. */
41
+ multiple?: boolean;
42
+ /** Which files to take, as `<input accept>` reads it: `.pdf`, `image/*`, `text/csv`… */
43
+ accept?: string;
44
+ /** Whether it takes no files and removes none. */
45
+ disabled?: boolean;
46
+ /** The files (or, with `@upload`, what each upload resolved to), when the caller controls them. */
47
+ value?: readonly T[];
48
+ /** The files it starts with, uncontrolled. */
49
+ defaultValue?: readonly T[];
50
+ /** Called with the new list whenever a file is added or removed. */
51
+ onValueChange?: (value: T[]) => void;
52
+ /**
53
+ * Uploads each chosen file as it is chosen, and resolves with what the value keeps for it.
54
+ * Until it settles, the file is in the upload queue. Without it, the value keeps each `File`.
55
+ */
56
+ upload?: UploadFn<T>;
57
+ /** An ember-file-upload queue to put the files in, such as one of its `file-queue` service's. */
58
+ queue?: Queue;
59
+ /** A value's name in the list. Default: a file's name, or a record's `name` or `label`. */
60
+ nameOf?: (value: T) => string;
61
+ /** A value's size in bytes. Default: its `size`. */
62
+ sizeOf?: (value: T) => number | undefined;
63
+ /** A URL of an image of a value. Default: an image file's own contents. */
64
+ previewOf?: (value: T) => string | undefined;
65
+ /** The locale sizes are written in (`Intl`). Default: the app's translator's, or the browser's. */
66
+ locale?: string;
67
+ /** The file input's `id`, so a `<label for>` (a FieldLabel) names it. */
68
+ id?: string;
69
+ /** The file input's `aria-label`, in place of the zone's text. */
70
+ label?: string;
71
+ /** Whether a file is required. */
72
+ required?: boolean;
73
+ /** Whether the value is invalid: `aria-invalid` on the input, and a destructive border. */
74
+ invalid?: boolean;
75
+ /** The ids of what describes the input (`aria-describedby`), such as a FieldDescription. */
76
+ describedBy?: string;
77
+ /** The zone's call to action. Default `Choose a file`, or `Choose files` with `@multiple`. */
78
+ prompt?: string;
79
+ /** What follows it. Default `or drag and drop here`. */
80
+ hint?: string;
81
+ /** What the zone says while files are dragged over it. Default `Drop to add`. */
82
+ dropLabel?: string;
83
+ /** A line under the hint, such as `PDF, up to 5 MB`. Default: `@accept`. */
84
+ description?: string;
85
+ /**
86
+ * Names the files a choice or drop turned away, as `@accept` doesn't take them. Default
87
+ * `Not an accepted type: a.exe, b.exe`.
88
+ */
89
+ rejectedLabel?: (names: string[]) => string;
90
+ /**
91
+ * Names the files a drop of several left out, without `@multiple`. Default
92
+ * `One file at a time; left out: b.pdf, c.pdf`.
93
+ */
94
+ leftOutLabel?: (names: string[]) => string;
95
+ /** Names a file's remove button. Default `Remove cv.pdf`. */
96
+ removeLabel?: (name: string) => string;
97
+ /** Names a failed upload's retry button. Default `Retry cv.pdf`. */
98
+ retryLabel?: (name: string) => string;
99
+ /** Names a file's progress bar while it uploads. Default `Uploading cv.pdf`. */
100
+ progressLabel?: (name: string) => string;
101
+ /** The error an upload shows when it fails without a message. Default `Upload failed`. */
102
+ uploadFailedLabel?: string;
103
+ /** The kind shown for a file whose name has no extension (`README`). Default `FILE`. */
104
+ unknownKindLabel?: string;
105
+ /** Its name, for `FileUploadHarness` (`data-test-jn-name`). */
106
+ name?: string;
107
+ };
108
+ Blocks: {
109
+ /** Its parts, laid out as you like. Without a block: the zone, the list, then the queue. */
110
+ default: [FileUploadYield<T>];
111
+ };
112
+ Element: HTMLDivElement;
113
+ }
114
+ /**
115
+ * File uploads in shadcn's look, on ember-file-upload: a drop zone around a native file input, the
116
+ * list of chosen files (an Item each, with a preview, the name and size, and a remove button), and,
117
+ * with `@upload`, a queue of the files uploading, each with a Progress bar.
118
+ *
119
+ * <FileUpload @multiple={{true}} @accept="image/*,.pdf" @onValueChange={{this.setFiles}} />
120
+ *
121
+ * <FileUpload @upload={{this.upload}} as |u|>
122
+ * <u.Dropzone />
123
+ * <u.List />
124
+ * <u.Queue />
125
+ * </FileUpload>
126
+ *
127
+ * The value is always a list: of `File`s, or, with `@upload`, of what each upload resolved to.
128
+ * Without `@multiple` it holds one at most, and a new choice replaces it.
129
+ */
130
+ export default class FileUpload<T = File> extends Component<FileUploadSignature<T>> {
131
+ readonly state: FileUploadState<T>;
132
+ constructor(owner: Owner, args: FileUploadSignature<T>['Args']);
133
+ get labels(): FileUploadLabels;
134
+ /** What the parts read: the state, the strings, and the input's arguments. */
135
+ get context(): FileUploadContext;
136
+ }
137
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/index.gts"],"names":[],"mappings":"AAgRA,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAE1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,kBAAkB,MAAM,gBAAgB,CAAA;AAC/C,OAAO,cAAc,MAAM,YAAY,CAAA;AACvC,OAAO,eAAe,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EACL,eAAe,EACf,KAAK,SAAS,EACd,KAAK,SAAS,EAEd,KAAK,MAAM,EACX,KAAK,QAAQ,EACd,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAIrD,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;AACxE,YAAY,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAC1F,YAAY,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AACzD,YAAY,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAE3D,kGAAkG;AAClG,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,6DAA6D;IAC7D,QAAQ,EAAE,aAAa,CAAC,OAAO,kBAAkB,EAAE,QAAQ,CAAC,CAAA;IAC5D,sEAAsE;IACtE,IAAI,EAAE,aAAa,CAAC,OAAO,cAAc,EAAE,QAAQ,CAAC,CAAA;IACpD,yEAAyE;IACzE,KAAK,EAAE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CAAC,CAAC,CAAA;KAC9B,CAAA;IACD,OAAO,EAAE,cAAc,CAAA;CACxB;AAiCD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU,CAAC,CAAC,GAAG,IAAI,CAAE,SAAQ,SAAS,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACjF,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;gBAEtB,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAqB9D,IAAI,MAAM,IAAI,gBAAgB,CAmB7B;IAED,8EAA8E;IAC9E,IAAI,OAAO,IAAI,iBAAiB,CAW/B;CAgEF"}
@@ -0,0 +1,25 @@
1
+ import type { IconNode } from '@ember-joinery/ember/components/icon';
2
+ /** The strings a `<FileUpload>` shows, each an argument with an English default. */
3
+ export interface FileUploadLabels {
4
+ /** The drop zone's call to action. */
5
+ prompt: string;
6
+ /** What follows it where the browser can drag and drop. */
7
+ hint: string;
8
+ /** What the zone says while files are dragged over it. */
9
+ dropLabel: string;
10
+ /** A line under the hint, such as which files it takes. */
11
+ description: string | undefined;
12
+ /** Names the files a choice or drop turned away, as `@accept` doesn't take them. */
13
+ rejectedLabel: (names: string[]) => string;
14
+ /** Names the files a drop of several left out, without `@multiple`. */
15
+ leftOutLabel: (names: string[]) => string;
16
+ /** Names a file's remove button. */
17
+ removeLabel: (name: string) => string;
18
+ /** Names a failed upload's retry button. */
19
+ retryLabel: (name: string) => string;
20
+ /** Names a file's progress bar while it uploads. */
21
+ progressLabel: (name: string) => string;
22
+ }
23
+ /** The lucide icon for a file, from its MIME type when it has one, else its extension. */
24
+ export declare function fileIcon(name: string, type?: string): IconNode;
25
+ //# sourceMappingURL=labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/labels.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAA;AAEpE,oFAAoF;AACpF,MAAM,WAAW,gBAAgB;IAC/B,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAA;IACjB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,oFAAoF;IACpF,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAA;IAC1C,uEAAuE;IACvE,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAA;IACzC,oCAAoC;IACpC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACrC,4CAA4C;IAC5C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACpC,oDAAoD;IACpD,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CACxC;AASD,0FAA0F;AAC1F,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,QAAQ,CAU1D"}
@@ -0,0 +1,18 @@
1
+ import type { TOC } from '@ember/component/template-only';
2
+ import type { FileUploadContext } from './context.ts';
3
+ export interface FileUploadListSignature {
4
+ Args: {
5
+ /** The `<FileUpload>` it belongs to; `u.List` comes with it. */
6
+ upload: FileUploadContext;
7
+ };
8
+ /** An `ItemGroup` (`role="list"`), rendered only while the value holds a file. */
9
+ Element: HTMLElement;
10
+ }
11
+ /**
12
+ * The files the value holds, one shadcn Item each (`role="listitem"`, outlined and small, in an
13
+ * `ItemGroup`): a preview of an image, or an icon for its kind, its name, its kind and size, and
14
+ * a button that removes it. A disabled `<FileUpload>` shows no remove buttons.
15
+ */
16
+ declare const FileUploadList: TOC<FileUploadListSignature>;
17
+ export default FileUploadList;
18
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/list.gts"],"names":[],"mappings":"AA4EA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAA;AAQzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAErD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE;QACJ,gEAAgE;QAChE,MAAM,EAAE,iBAAiB,CAAA;KAC1B,CAAA;IACD,kFAAkF;IAClF,OAAO,EAAE,WAAW,CAAA;CACrB;AAID;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,GAAG,CAAC,uBAAuB,CAuI/C,CAAA;AAEF,eAAe,cAAc,CAAA"}
@@ -0,0 +1,23 @@
1
+ import type { TOC } from '@ember/component/template-only';
2
+ import type { FileUploadContext } from './context.ts';
3
+ export interface FileUploadQueueSignature {
4
+ Args: {
5
+ /** The `<FileUpload>` it belongs to; `u.Queue` comes with it. */
6
+ upload: FileUploadContext;
7
+ };
8
+ /**
9
+ * An `ItemGroup` (`role="list"`), rendered only while a file is uploading or has failed, and
10
+ * `aria-busy` while one uploads.
11
+ */
12
+ Element: HTMLElement;
13
+ }
14
+ /**
15
+ * The files `@upload` is sending, one shadcn Item each, like the file list's: a preview or an
16
+ * icon, the name, its kind and size, and a Progress bar across the row's foot that follows
17
+ * ember-file-upload's `progress`. A failed upload shows its error, with buttons that retry it and
18
+ * remove it (none while the `<FileUpload>` is disabled). A file leaves the queue for the list once
19
+ * its upload resolves.
20
+ */
21
+ declare const FileUploadQueue: TOC<FileUploadQueueSignature>;
22
+ export default FileUploadQueue;
23
+ //# sourceMappingURL=queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/queue.gts"],"names":[],"mappings":"AAmHA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAA;AASzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAErD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE;QACJ,iEAAiE;QACjE,MAAM,EAAE,iBAAiB,CAAA;KAC1B,CAAA;IACD;;;OAGG;IACH,OAAO,EAAE,WAAW,CAAA;CACrB;AAKD;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,EAAE,GAAG,CAAC,wBAAwB,CA6LjD,CAAA;AAEF,eAAe,eAAe,CAAA"}
@@ -0,0 +1,156 @@
1
+ import { Queue, type UploadFile } from 'ember-file-upload';
2
+ import { ControllableState } from '@ember-joinery/primitives/controllable-state';
3
+ import { type UploadHost } from '../../-private/upload-actor.ts';
4
+ /**
5
+ * Uploads a file the user chose, and resolves with what the value keeps for it: an id, a URL,
6
+ * a record. `file` is ember-file-upload's `UploadFile`: `file.upload(url)` sends it and keeps
7
+ * `file.progress` up to date, which the upload queue shows. `signal` aborts when the file leaves
8
+ * the queue before its upload settles (it is replaced, or the component goes): pass it to
9
+ * `fetch` to cancel the request.
10
+ */
11
+ export type UploadFn<T = unknown> = (file: UploadFile, options?: {
12
+ signal: AbortSignal;
13
+ }) => Promise<T>;
14
+ /** Where a file is: kept in the value, uploading, or failed to upload. As upstream's Attachment. */
15
+ export type FileState = 'done' | 'uploading' | 'error';
16
+ /** A file in the value, as the file list shows it. */
17
+ export interface FileEntry<T> {
18
+ /** What the value holds for it: the `File`, or what `@upload` resolved to. */
19
+ value: T;
20
+ /** Its name. */
21
+ name: string;
22
+ /** Its kind, from its extension: `PDF`, `PNG`, or `@unknownKindLabel` (`FILE`) without one. */
23
+ kind: string;
24
+ /** Its size, formatted (`184.3 kB`), or `undefined` when the value has none. */
25
+ size: string | undefined;
26
+ /** A URL of an image of it, or `undefined` when there is none to show. */
27
+ preview: string | undefined;
28
+ }
29
+ /** A chosen file that is uploading, or whose upload failed: an entry in the upload queue. */
30
+ export declare class Upload {
31
+ #private;
32
+ /** ember-file-upload's file. */
33
+ readonly file: UploadFile;
34
+ constructor(file: UploadFile, host: UploadHost<unknown>, failedLabel: () => string);
35
+ /** `uploading`, or `error` once its upload has failed. */
36
+ get state(): 'uploading' | 'error';
37
+ /** Why its upload failed. */
38
+ get error(): string | undefined;
39
+ /** Whether `retry()` would send it again: it failed, and the component isn't disabled. */
40
+ get canRetry(): boolean;
41
+ retry(): void;
42
+ /** Stops it: a running upload's signal aborts, and what it settles with is dropped. */
43
+ stop(): void;
44
+ /** Its name. */
45
+ get name(): string;
46
+ /** How much of it has uploaded, from 0 to 100: ember-file-upload's `progress`. */
47
+ get progress(): number;
48
+ }
49
+ /** What the state reads from the component's arguments, each read live. */
50
+ export interface FileUploadStateOptions<T> {
51
+ multiple: () => boolean | undefined;
52
+ accept: () => string | undefined;
53
+ disabled: () => boolean | undefined;
54
+ value: () => readonly T[] | undefined;
55
+ defaultValue: () => readonly T[] | undefined;
56
+ onValueChange: () => ((value: T[]) => void) | undefined;
57
+ upload: () => UploadFn<T> | undefined;
58
+ queue: () => Queue | undefined;
59
+ nameOf: () => ((value: T) => string) | undefined;
60
+ sizeOf: () => ((value: T) => number | undefined) | undefined;
61
+ previewOf: () => ((value: T) => string | undefined) | undefined;
62
+ uploadFailedLabel: () => string;
63
+ unknownKindLabel: () => string | undefined;
64
+ locale: () => string | undefined;
65
+ }
66
+ /**
67
+ * Where a row lost the button that had focus (it was removed, or a retry took its buttons away),
68
+ * so focus can move to the nearest button of the same kind once that has rendered.
69
+ */
70
+ export interface FocusRequest {
71
+ /** The list it happened in. */
72
+ list: 'list' | 'queue';
73
+ /** The row's index: the row that took its place, or the row itself. */
74
+ index: number;
75
+ /** The kind of button that had focus. */
76
+ button: 'remove' | 'retry';
77
+ }
78
+ /**
79
+ * The state of a `<FileUpload>`: the files its value holds, the uploads in its queue, and what
80
+ * its last drop turned away. Its parts read it, and act through it.
81
+ */
82
+ export declare class FileUploadState<T> {
83
+ #private;
84
+ /** The value: what the list shows. */
85
+ readonly value: ControllableState<readonly T[]>;
86
+ /** The uploads in flight or failed, in the order the files were chosen. */
87
+ uploads: readonly Upload[];
88
+ /** The names of the files the last choice or drop turned away, as `@accept` doesn't take them. */
89
+ rejected: readonly string[];
90
+ /** The names of the files the last choice or drop left out, without `@multiple`: all but one. */
91
+ leftOut: readonly string[];
92
+ /** Where focus goes once a removal or a retry has rendered. */
93
+ focusRequest: FocusRequest | undefined;
94
+ constructor(owner: object, options: FileUploadStateOptions<T>);
95
+ /** The ember-file-upload queue the chosen files go into: `@queue`, or the component's own. */
96
+ get queue(): Queue;
97
+ /** Whether it takes more than one file. */
98
+ get multiple(): boolean;
99
+ /** Which files it takes (`@accept`). */
100
+ get accept(): string | undefined;
101
+ /** Whether it takes no files and removes none. */
102
+ get disabled(): boolean;
103
+ /** Whether any upload is still running. */
104
+ get isUploading(): boolean;
105
+ /**
106
+ * The value's files, as the list shows them. Cached, so they are the same objects until the
107
+ * value (or how it is named, sized or previewed) changes; the list keys its rows on `value`, so
108
+ * a row, and the focus on its button, stays put when another file comes or goes.
109
+ */
110
+ get files(): FileEntry<T>[];
111
+ /** A file's kind, from its name: `PDF`, or `@unknownKindLabel` (`FILE`) without an extension. */
112
+ kindOf: (name: string) => string;
113
+ /** The values the list holds, as `@value` hands them over. */
114
+ get values(): readonly T[];
115
+ /** A file's size, formatted in the component's locale. */
116
+ sizeOf: (file: UploadFile | File) => string;
117
+ /** A preview of a file being uploaded: an object URL for an image, else `undefined`. */
118
+ previewOf: (file: UploadFile) => string | undefined;
119
+ /**
120
+ * What the picker and the drop zone may take: ember-file-upload's `filter`. It notes what it
121
+ * turns away, which `onSelect` and `onDrop` then name.
122
+ */
123
+ filter: (file: File, _files: File[], index: number) => boolean;
124
+ /**
125
+ * Files dropped on the zone: those that passed `filter`, and the whole drop. Without
126
+ * `@multiple`, ember-file-upload's zone offers `filter` only the first file, so the rest are
127
+ * named as left out here.
128
+ */
129
+ onDrop: (files: UploadFile[], transfer: {
130
+ files: File[];
131
+ }) => void;
132
+ /**
133
+ * Files chosen in the file picker. Its `accept` filters what the dialog shows, but a choice of
134
+ * "All files" there lets anything through, so `filter` checks them again and they are named as
135
+ * a drop's are.
136
+ */
137
+ onSelect: (files: UploadFile[]) => void;
138
+ /**
139
+ * Keeps the files, or, with `@upload`, queues them and uploads each. Without `@multiple`, a new
140
+ * file replaces the one uploading or failed: that one leaves ember-file-upload's queue, and
141
+ * whatever its upload resolves to is dropped.
142
+ */
143
+ take(files: UploadFile[]): void;
144
+ /** Takes a file out of the value. Focus moves to the row that takes its place. */
145
+ remove: (value: T) => void;
146
+ /** Empties the value. */
147
+ clear: () => void;
148
+ /**
149
+ * Uploads a failed file again. Its row loses its buttons while it uploads, so focus moves to
150
+ * the nearest row's Retry (or remove) button, else to the file input.
151
+ */
152
+ retry: (entry: Upload) => void;
153
+ /** Takes a file out of the upload queue, uploading or failed; its result, if any, is dropped. */
154
+ dismiss: (entry: Upload) => void;
155
+ }
156
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/components/file-upload/state.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAEhF,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAE1F;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,GAAG,OAAO,IAAI,CAClC,IAAI,EAAE,UAAU,EAChB,OAAO,CAAC,EAAE;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,KAC9B,OAAO,CAAC,CAAC,CAAC,CAAA;AAEf,oGAAoG;AACpG,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAA;AAEtD,sDAAsD;AACtD,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1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mjs: the types of a folder feature, for its subpath.
2
+ export * from './file-upload/index.js'
3
+ export { default } from './file-upload/index.js'
@@ -0,0 +1,5 @@
1
+ export { default as FileUpload } from './components/file-upload/index';
2
+ export * from './components/file-upload/index';
3
+ export * from './messages.ts';
4
+ export * from './utils.ts';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAC1E,cAAc,oCAAoC,CAAA;AAClD,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Every string `@ember-joinery/file-upload` shows or announces itself, in English, for a
3
+ * translation catalog. An argument (`@prompt`, `@removeLabel`) still beats each one.
4
+ */
5
+ export declare const messages: {
6
+ promptMultiple: {
7
+ id: string;
8
+ message: string;
9
+ };
10
+ prompt: {
11
+ id: string;
12
+ message: string;
13
+ };
14
+ hint: {
15
+ id: string;
16
+ message: string;
17
+ description: string;
18
+ };
19
+ dropLabel: {
20
+ id: string;
21
+ message: string;
22
+ };
23
+ rejected: {
24
+ id: string;
25
+ message: string;
26
+ description: string;
27
+ };
28
+ leftOut: {
29
+ id: string;
30
+ message: string;
31
+ description: string;
32
+ };
33
+ remove: {
34
+ id: string;
35
+ message: string;
36
+ };
37
+ retry: {
38
+ id: string;
39
+ message: string;
40
+ };
41
+ progress: {
42
+ id: string;
43
+ message: string;
44
+ };
45
+ uploadFailed: {
46
+ id: string;
47
+ message: string;
48
+ };
49
+ unknownKind: {
50
+ id: string;
51
+ message: string;
52
+ description: string;
53
+ };
54
+ };
55
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Bc,CAAA"}