@12-apps/storage 2.2.0 → 2.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@12-apps/storage",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Image uploads that land at YOUR OWN ORIGIN, never at the bucket (12-20). Isomorphic core (format allowlist, upload ceiling, object-key grammar, rendition set, refusal taxonomy, wire schemas), host-mounted backend surface (./server: createApiStorage, the local-disk driver, the image-pipeline port, the orphan reclaim), Hono adapter (./hono), the S3-compatible driver behind its own subpath (./s3) and the bound picker + upload hook (./react). Standardized adoption contract in ADOPTING.md.",
|
|
6
6
|
"exports": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@12-apps/ui": "^6.
|
|
46
|
+
"@12-apps/ui": "^6.4.0",
|
|
47
47
|
"zod": "^4.3.5"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
package/src/react/failures.ts
CHANGED
|
@@ -100,13 +100,15 @@ export interface WebStorageMessages {
|
|
|
100
100
|
/**
|
|
101
101
|
* The standalone upload page's own chrome — heading, the one-line
|
|
102
102
|
* instruction (which carries the ceiling, same rule as the refusals), the
|
|
103
|
-
* field label
|
|
104
|
-
* `createWebStorage` until copy became
|
|
103
|
+
* field label, its helper, and the button that clears a chosen image.
|
|
104
|
+
* These rendered as literals inside `createWebStorage` until copy became
|
|
105
|
+
* required config.
|
|
105
106
|
*/
|
|
106
107
|
pageTitle: string;
|
|
107
108
|
pageIntro: string;
|
|
108
109
|
fieldLabel: string;
|
|
109
110
|
fieldHelper: string;
|
|
111
|
+
fieldRemove: string;
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
/** Copy that only makes sense with the configured ceiling in it. */
|
|
@@ -34,7 +34,10 @@ export interface ImageFieldProps {
|
|
|
34
34
|
previewUrl?: string | null;
|
|
35
35
|
/** Called with the new key, or `null` when the image is removed. */
|
|
36
36
|
onChange: (imageKey: string | null) => void;
|
|
37
|
-
label
|
|
37
|
+
/** The dropzone's own label. REQUIRED — this package ships no default copy. */
|
|
38
|
+
label: string;
|
|
39
|
+
/** The button that clears a chosen image. REQUIRED, for the same reason. */
|
|
40
|
+
removeLabel: string;
|
|
38
41
|
helperText?: string;
|
|
39
42
|
/** Passed through per upload — `{ optimize: false }` for a rendered canvas. */
|
|
40
43
|
uploadOptions?: UploadOptions;
|
|
@@ -89,7 +92,7 @@ export function ImageField(props: BoundImageFieldProps): JSX.Element {
|
|
|
89
92
|
) : null}
|
|
90
93
|
<UploadButton
|
|
91
94
|
variant="dropzone"
|
|
92
|
-
label={props.label
|
|
95
|
+
label={props.label}
|
|
93
96
|
accept={ACCEPT}
|
|
94
97
|
disabled={props.disabled || uploader.uploading}
|
|
95
98
|
uploading={uploader.uploading}
|
|
@@ -100,7 +103,7 @@ export function ImageField(props: BoundImageFieldProps): JSX.Element {
|
|
|
100
103
|
{preview ? (
|
|
101
104
|
<Box>
|
|
102
105
|
<Button variant="text" onClick={handleRemove} dataTestId={`${testId}-remove`}>
|
|
103
|
-
|
|
106
|
+
{props.removeLabel}
|
|
104
107
|
</Button>
|
|
105
108
|
</Box>
|
|
106
109
|
) : null}
|
package/src/react/pt-BR.ts
CHANGED