react-native-attachment-kit 1.1.0 → 1.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +4 -2
  3. package/android/src/main/libs/rnattachmentkit-release.aar +0 -0
  4. package/android/src/newarch/java/com/rnattachmentkit/RNAttachmentKitModule.kt +24 -0
  5. package/android/src/oldarch/java/com/rnattachmentkit/RNAttachmentKitModule.kt +24 -0
  6. package/ios/RNAttachmentKit.swift +20 -0
  7. package/ios/RNAttachmentKit.xcframework/Info.plist +5 -5
  8. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Assets.car +0 -0
  9. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.abi.json +265 -2
  10. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.private.swiftinterface +3 -0
  11. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  12. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftinterface +3 -0
  13. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/RNAttachmentKit +0 -0
  14. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeDirectory +0 -0
  15. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeResources +12 -12
  16. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeSignature +0 -0
  17. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.abi.json +265 -2
  18. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +3 -0
  19. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  20. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -0
  21. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +265 -2
  22. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +3 -0
  23. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  24. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +3 -0
  25. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/RNAttachmentKit +0 -0
  26. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/_CodeSignature/CodeDirectory +0 -0
  27. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/_CodeSignature/CodeResources +20 -20
  28. package/package.json +1 -1
  29. package/src/index.ts +4 -3
  30. package/src/types.ts +28 -0
@@ -30,43 +30,43 @@
30
30
  </data>
31
31
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
32
32
  <data>
33
- Wd9Z1q7s0pyKrUFIRm36hxiumxA=
33
+ HgBJ2YsmrBeU0DS85YgVPkDlLTs=
34
34
  </data>
35
35
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
36
36
  <data>
37
- RmzaHDbzfZw30UT/xvDXKezD9aw=
37
+ Ed6Tp4ZdEh1Odi1mGzC5KfR3ub4=
38
38
  </data>
39
39
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
40
40
  <data>
41
- gwOkWoxLQLhZ4dp7hfZ3GKGruzU=
41
+ fkzCLPjLTpoPLvuP7U4zaR7oFNw=
42
42
  </data>
43
43
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
44
44
  <data>
45
- RmzaHDbzfZw30UT/xvDXKezD9aw=
45
+ Ed6Tp4ZdEh1Odi1mGzC5KfR3ub4=
46
46
  </data>
47
47
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
48
48
  <data>
49
- iX7xA5GDC3xEamXDBC6jbjfOnBs=
49
+ CJAZ6C+TQtNC/0MyMl2L2XpFaUk=
50
50
  </data>
51
51
  <key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
52
52
  <data>
53
- Wd9Z1q7s0pyKrUFIRm36hxiumxA=
53
+ HgBJ2YsmrBeU0DS85YgVPkDlLTs=
54
54
  </data>
55
55
  <key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
56
56
  <data>
57
- LhFJOtX6SOU+FfAuYThVqC8SSqs=
57
+ rXiwUUI1CzRSug3fqRG9W7EfYXU=
58
58
  </data>
59
59
  <key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
60
60
  <data>
61
- /LtCn1/VvpPM26soJ2eLsk8Z9x4=
61
+ hA3QQl7XlEdD/dLJvtloBIYPppw=
62
62
  </data>
63
63
  <key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
64
64
  <data>
65
- LhFJOtX6SOU+FfAuYThVqC8SSqs=
65
+ rXiwUUI1CzRSug3fqRG9W7EfYXU=
66
66
  </data>
67
67
  <key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
68
68
  <data>
69
- o4bPOSmdBiPlE67pQ/RzA/KZmZw=
69
+ J5L/JxV9FT2C8tH+lGCtE16c8TY=
70
70
  </data>
71
71
  <key>Modules/module.modulemap</key>
72
72
  <data>
@@ -262,70 +262,70 @@
262
262
  <dict>
263
263
  <key>hash2</key>
264
264
  <data>
265
- JZpbj4lr/kHvMhEpEqktq0X3rYVYWDaZsDI1uumdO1w=
265
+ nfoRXkCuOnu5U1wnp4zqqmGx+leb8bfClaFr07ayxcM=
266
266
  </data>
267
267
  </dict>
268
268
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
269
269
  <dict>
270
270
  <key>hash2</key>
271
271
  <data>
272
- dHX+BN8X57oouOym573PRRvDJNoBAXwNa8Qq4jP4v6A=
272
+ RX253JxJd5m5f5B7GitqxHUHfizHOfq8tSMHXN75o34=
273
273
  </data>
274
274
  </dict>
275
275
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
276
276
  <dict>
277
277
  <key>hash2</key>
278
278
  <data>
279
- UsbWPEMfgbl9bdJJPszSsyO9FdIMYATuWWbKkTOQFB0=
279
+ QkdK6zh16vDLhDaCCkHdYOvIw+XgvQ0vqz/xIAJJN6E=
280
280
  </data>
281
281
  </dict>
282
282
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
283
283
  <dict>
284
284
  <key>hash2</key>
285
285
  <data>
286
- dHX+BN8X57oouOym573PRRvDJNoBAXwNa8Qq4jP4v6A=
286
+ RX253JxJd5m5f5B7GitqxHUHfizHOfq8tSMHXN75o34=
287
287
  </data>
288
288
  </dict>
289
289
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
290
290
  <dict>
291
291
  <key>hash2</key>
292
292
  <data>
293
- 8aY3DBjnZFzdFFPOHwLKk9vARFNG+ybA29aUpwieqvY=
293
+ L2ZN1byGvwKOQa7qpgo/X4J+IbA2ZcksQowMoSI56W8=
294
294
  </data>
295
295
  </dict>
296
296
  <key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
297
297
  <dict>
298
298
  <key>hash2</key>
299
299
  <data>
300
- JZpbj4lr/kHvMhEpEqktq0X3rYVYWDaZsDI1uumdO1w=
300
+ nfoRXkCuOnu5U1wnp4zqqmGx+leb8bfClaFr07ayxcM=
301
301
  </data>
302
302
  </dict>
303
303
  <key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
304
304
  <dict>
305
305
  <key>hash2</key>
306
306
  <data>
307
- 3ecyFo55Pp2aYTZviW80j+IBBNSDiCw4uZhWVPf5EbI=
307
+ nN80xaeGzDuus0TMWI42dZac58SSKKddo1k17wucRI8=
308
308
  </data>
309
309
  </dict>
310
310
  <key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
311
311
  <dict>
312
312
  <key>hash2</key>
313
313
  <data>
314
- V7QUlPHRJPUVIBYuvhXE636clsz5Vu4+wj+s9w3yrV0=
314
+ vW/Wi94uUAPETo9uOKMafYZ0H7dtvllPw4YAciVQQ+4=
315
315
  </data>
316
316
  </dict>
317
317
  <key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
318
318
  <dict>
319
319
  <key>hash2</key>
320
320
  <data>
321
- 3ecyFo55Pp2aYTZviW80j+IBBNSDiCw4uZhWVPf5EbI=
321
+ nN80xaeGzDuus0TMWI42dZac58SSKKddo1k17wucRI8=
322
322
  </data>
323
323
  </dict>
324
324
  <key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
325
325
  <dict>
326
326
  <key>hash2</key>
327
327
  <data>
328
- vwXXki2l45Lv67PAsvQvKelPTtWoKEXU8sagiac80OY=
328
+ xhODjv643cw/fI3FfNPDvnNvOquUgzEOleuZBFaSRuE=
329
329
  </data>
330
330
  </dict>
331
331
  <key>Modules/module.modulemap</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-attachment-kit",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Native attachment kit for React Native — gallery picker, editor, image viewer and media gallery (Turbo Module)",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -89,7 +89,7 @@ let _editorOpen = false
89
89
  let _asyncImgProcessedSub: { remove: () => void } | null = null
90
90
 
91
91
  export type { AIConfig, AIUsageEvent, AIChargeRequiredEvent } from "./types"
92
- export type { VideoOptions, VideoProgressEvent, ViewerVideo, ProcessingStartEvent, ProcessingStartItem, ThumbnailOptions } from "./types"
92
+ export type { VideoOptions, VideoProgressEvent, ViewerVideo, ProcessingStartEvent, ProcessingStartItem, ThumbnailOptions, SourceRect, SourceClipInsets, ViewerSourceUpdate } from "./types"
93
93
  export type { SelectionChangeEvent, Appearance, AttachLocationResult, MapViewerOptions, ReverseGeocodeOptions, ReverseGeocodeResult, ReverseGeocodeErrorCode, AttachFileResult, AttachFileFailure, LocationThumbnailOptions, LocationThumbnailResult } from "./types"
94
94
  export type { MediaGalleryItem, MediaGalleryOptions, MediaGalleryGridSize, MediaGalleryGridSizeChangedEvent, MediaGalleryTheme, MediaGalleryViewerOptions, MediaGalleryDeleteOption, MediaGalleryItemDeletedEvent, MediaGalleryNeedPageEvent, MediaGalleryClosedEvent, MediaGalleryAppendPayload, MediaGalleryRemovePayload } from "./types"
95
95
 
@@ -102,7 +102,8 @@ export interface RNAttachmentKit {
102
102
  openGallery(options?: GalleryOptions): Promise<ImageResult[]>
103
103
  openEditor(options: EditorOptions): Promise<ImageResult>
104
104
  openViewer(options: ViewerOptions): Promise<void>
105
- updateSourceRect(rect: import("./types").SourceRect): Promise<void>
105
+ /** 닫힐 때 돌아갈 자리 (페이지를 넘겼을 때). sourceClipRect·sourceClipInsets 도 함께 바꿀 수 있음 */
106
+ updateSourceRect(rect: import("./types").ViewerSourceUpdate): Promise<void>
106
107
  /** 지도 뷰어. 닫히면 resolve */
107
108
  openMapViewer(options: import("./types").MapViewerOptions): Promise<void>
108
109
  /** 지도 뷰어가 열린 동안 말풍선 위치가 바뀌었을 때 (닫힐 때 돌아갈 자리) */
@@ -426,7 +427,7 @@ const AttachmentKit: RNAttachmentKit = {
426
427
  // 정상적으로 열렸으면 리스너는 onViewerWillClose 콜백 안에서 제거됨
427
428
  },
428
429
 
429
- updateSourceRect: async (rect: import("./types").SourceRect): Promise<void> => {
430
+ updateSourceRect: async (rect: import("./types").ViewerSourceUpdate): Promise<void> => {
430
431
  if (!RNAttachmentKitModule) {
431
432
  throw new Error(LINKING_ERROR)
432
433
  }
package/src/types.ts CHANGED
@@ -143,6 +143,26 @@ export interface SourceRect {
143
143
  height: number
144
144
  }
145
145
 
146
+ /**
147
+ * 열림·닫힘(zoom) 중 움직이는 사진과 원래 자리 가림 판(hideSourceImage)이 보이는 영역의 화면 가장자리 여백.
148
+ * 앱의 위·아래 반투명 바 높이를 주면, 바 밑에 걸친 사진이 바 "뒤로" 들어가는 것처럼 바 밖에서만 보입니다.
149
+ * 빠진 값은 0. 단위·기준은 sourceRect 와 같음 (dp, 화면 기준)
150
+ */
151
+ export interface SourceClipInsets {
152
+ top?: number
153
+ bottom?: number
154
+ left?: number
155
+ right?: number
156
+ }
157
+
158
+ /** updateSourceRect 인자 — 닫힐 때 돌아갈 자리. 잘라내기 키는 넘긴 것만 바뀜 (null = 자르지 않음) */
159
+ export interface ViewerSourceUpdate extends SourceRect {
160
+ sourceBorderRadius?: number
161
+ sourceBorderCorners?: ('topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight')[]
162
+ sourceClipRect?: SourceRect | null
163
+ sourceClipInsets?: SourceClipInsets | null
164
+ }
165
+
146
166
  export interface GalleryOptions {
147
167
  maxSelection?: number
148
168
  maxWidth?: number // 최대 width
@@ -443,6 +463,14 @@ export interface ViewerOptions {
443
463
  sourceBackgroundColor?: string
444
464
  sourceBorderCorners?: ('topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight')[]
445
465
  hideSourceImage?: boolean
466
+ /**
467
+ * 잘라내기 영역 (zoom 전용). 열림·닫힘 중 움직이는 사진과 hideSourceImage 가림 판이 이 사각형 안에서만 그려집니다.
468
+ * sourceRect 와 같은 화면 좌표. 사진이 화면을 다 채우는 쪽으로 갈수록 잘림이 풀려, 뷰어 본체는 잘리지 않습니다.
469
+ * sourceClipInsets 와 같이 주면 둘의 교집합. 생략 = 자르지 않음 (예전과 같음). updateSourceRect 로 바꿀 수 있음.
470
+ */
471
+ sourceClipRect?: SourceRect
472
+ /** 잘라내기를 화면 가장자리 여백으로 (예: { top: 상단 바 높이, bottom: 탭 바 높이 }). 설명은 sourceClipRect 참조 */
473
+ sourceClipInsets?: SourceClipInsets
446
474
  onPageSelected?: (index: number) => void
447
475
  onViewerWillClose?: () => void
448
476
  /**