Skip to content

Commit 8e3070f

Browse files
committed
update
1 parent f0d7c16 commit 8e3070f

29 files changed

Lines changed: 923 additions & 69 deletions

packages/core-detect/src/pipeline/apply.ts

Lines changed: 384 additions & 63 deletions
Large diffs are not rendered by default.

packages/core-detect/src/types.ts

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,42 @@ export type RedactionStyle =
6868
| 'BOX'
6969
| 'LABEL'
7070
| 'MASK_LAST4'
71+
| 'PATTERN'
72+
| 'GRADIENT'
73+
| 'SOLID_COLOR'
74+
| 'VECTOR_OVERLAY'
7175
| 'REMOVE_METADATA';
7276

77+
export interface RedactionConfig {
78+
/** Primary color for redaction (hex color) */
79+
color?: string;
80+
/** Secondary color for gradients/patterns (hex color) */
81+
secondaryColor?: string;
82+
/** Opacity level (0-1) */
83+
opacity?: number;
84+
/** Pattern type for PATTERN style */
85+
patternType?: 'diagonal' | 'dots' | 'cross-hatch' | 'waves' | 'noise';
86+
/** Border width in pixels */
87+
borderWidth?: number;
88+
/** Border color (hex color) */
89+
borderColor?: string;
90+
/** Corner radius for rounded rectangles */
91+
cornerRadius?: number;
92+
/** Custom text for LABEL style */
93+
labelText?: string;
94+
/** Font size for labels */
95+
fontSize?: number;
96+
/** Font family for labels */
97+
fontFamily?: string;
98+
/** Shadow configuration */
99+
shadow?: {
100+
offsetX: number;
101+
offsetY: number;
102+
blur: number;
103+
color: string;
104+
};
105+
}
106+
73107
export interface CustomPattern {
74108
/** Unique identifier for the pattern */
75109
id: string;
@@ -107,14 +141,39 @@ export interface AnalyzeResult {
107141
export interface RedactionAction {
108142
detectionId: string;
109143
style: RedactionStyle;
110-
/** Only used when style is LABEL */
144+
/** Configuration for the redaction style */
145+
config?: RedactionConfig;
146+
/** Only used when style is LABEL - kept for backward compatibility */
111147
labelText?: string;
112148
}
113149

150+
export interface DocumentSanitizationOptions {
151+
/** Remove EXIF data from images */
152+
removeExif?: boolean;
153+
/** Remove PDF metadata (author, creator, etc.) */
154+
removeMetadata?: boolean;
155+
/** Remove PDF annotations and comments */
156+
removeAnnotations?: boolean;
157+
/** Remove PDF form fields */
158+
removeFormFields?: boolean;
159+
/** Remove PDF JavaScript */
160+
removeJavaScript?: boolean;
161+
/** Remove PDF embedded files */
162+
removeEmbeddedFiles?: boolean;
163+
/** Flatten PDF layers */
164+
flattenLayers?: boolean;
165+
/** Remove color profiles */
166+
removeColorProfiles?: boolean;
167+
}
168+
114169
export interface ApplyOptions {
115-
output: 'image' | 'pdf';
170+
output?: 'image' | 'pdf';
116171
/** JPEG quality (0–1) for image exports */
117172
quality?: number;
173+
/** Document sanitization options */
174+
sanitization?: DocumentSanitizationOptions;
175+
/** Use vector-based redaction for PDFs (instead of raster overlay) */
176+
useVectorRedaction?: boolean;
118177
}
119178

120179
export interface ApplyResult {

packages/ui/.next/server/pages-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"/_app": "pages/_app.js",
33
"/_error": "pages/_error.js",
44
"/_document": "pages/_document.js",
5-
"/": "pages/index.js"
5+
"/": "pages/index.js",
6+
"/404": "pages/404.js"
67
}

packages/ui/.next/server/pages/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ui/.next/static/chunks/pages/index.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

packages/ui/.next/static/chunks/webpack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
/******/
184184
/******/ /* webpack/runtime/getFullHash */
185185
/******/ !function() {
186-
/******/ __webpack_require__.h = function() { return "f8b79bbbb8f4bb0a"; }
186+
/******/ __webpack_require__.h = function() { return "48a8e5d2c603f843"; }
187187
/******/ }();
188188
/******/
189189
/******/ /* webpack/runtime/global */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"c":["pages/index","webpack"],"r":[],"m":[]}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"c":["pages/index","webpack"],"r":[],"m":[]}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"c":["pages/_error","pages/index","webpack"],"r":["pages/404"],"m":["../../node_modules/.pnpm/next@14.1.0_@babel+core@7.28.3_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2Fdata%2Fdata%2Fcom.termux%2Ffiles%2Fhome%2Fprojects%2FCleanShare-Pro%2Fpackages%2Fui%2Fpages%2F_error.tsx&page=%2F_error!","../../node_modules/.pnpm/next@14.1.0_@babel+core@7.28.3_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?absolutePagePath=%2Fdata%2Fdata%2Fcom.termux%2Ffiles%2Fhome%2Fprojects%2FCleanShare-Pro%2Fpackages%2Fui%2Fpages%2F404.tsx&page=%2F404!","./pages/404.tsx"]}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"c":["pages/index","webpack"],"r":[],"m":[]}

0 commit comments

Comments
 (0)