@g9tm/lynxcontrols-native 2.6.19 → 2.7.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/README.md +40 -1
- package/android/build.gradle.kts +7 -0
- package/android/src/main/java/com/g9lynx/g9native/G9NativeImages.kt +16 -0
- package/android/src/main/java/com/g9lynx/g9native/canvas/G9CanvasModel.kt +2 -2
- package/android/src/main/java/com/g9lynx/g9native/canvas/G9CanvasPaths.kt +7 -26
- package/android/src/main/java/com/g9lynx/g9native/canvas/G9CanvasView.kt +9 -4
- package/android/src/main/java/com/g9lynx/g9native/generated/G9ImageModuleSpec.java +27 -0
- package/android/src/main/java/com/g9lynx/g9native/image/G9HostTypeface.kt +49 -0
- package/android/src/main/java/com/g9lynx/g9native/image/G9ImageDraw.kt +222 -0
- package/android/src/main/java/com/g9lynx/g9native/image/G9ImageModule.kt +54 -0
- package/android/src/main/java/com/g9lynx/g9native/image/G9ImageProcessor.kt +464 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9HostFont.kt +28 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageBudget.kt +54 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageColor.kt +48 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageError.kt +19 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageExifTags.kt +61 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageFiles.kt +99 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageGeometry.kt +150 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageJson.kt +200 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageQuality.kt +65 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageRedaction.kt +77 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageService.kt +102 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageSniff.kt +63 -0
- package/android/src/main/java/com/g9lynx/g9native/image/core/G9ImageSpec.kt +237 -0
- package/catalog/catalog.json +161 -1
- package/catalog/index.md +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/image.d.ts +219 -0
- package/dist/image.d.ts.map +1 -0
- package/dist/image.js +116 -0
- package/dist/image.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/protocol.d.ts +12 -0
- package/dist/protocol.d.ts.map +1 -1
- package/generated/G9ImageModule.ts +64 -0
- package/ios/Tests/G9NativeTestSuite.h +8 -0
- package/ios/Tests/G9NativeTestSuite.m +350 -0
- package/ios/Tests/G9NativeTests.m +16 -0
- package/ios/g9lynx-native-swift.podspec +1 -1
- package/ios/g9lynx-native.podspec +5 -4
- package/ios/src/G9ImageModule.h +30 -0
- package/ios/src/G9ImageModule.m +986 -0
- package/ios/src/core/G9ImageCore.h +201 -0
- package/ios/src/core/G9ImageCore.m +1039 -0
- package/ios/src/generated/G9ImageModuleSpec.h +16 -0
- package/ios/src/generated/G9ImageModuleSpec.m +2 -0
- package/ios/swift/canvas/G9LCCanvasCore.swift +3 -2
- package/ios/swift/canvas/G9LCCanvasView.swift +15 -4
- package/ios/swift/shared/G9LCFonts.swift +18 -2
- package/package.json +4 -4
- package/types/platform-native-module.d.ts +18 -0
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
# package version — the family's own LYNX_VERSION (scripts/lynx-version.mjs; npm run check:versions).
|
|
5
5
|
Pod::Spec.new do |s|
|
|
6
6
|
s.name = 'g9lynx-native'
|
|
7
|
-
s.version = '2.
|
|
8
|
-
s.summary = 'G9 SQLite, host and
|
|
7
|
+
s.version = '2.7.0'
|
|
8
|
+
s.summary = 'G9 SQLite, host, speech and image native modules, the <g9-video>, <g9-richtext>, <g9-canvas> and <g9-blurhash> elements and the digit-drawing <input>/<textarea> for Lynx (sqlite3, NSUserDefaults, UIKit, AVFoundation, Speech, Core Text, ImageIO, Core Image).'
|
|
9
9
|
s.homepage = 'https://github.com/imankari/g9lynxcontrols'
|
|
10
10
|
s.license = { :type => 'MIT' }
|
|
11
11
|
s.author = 'G9LynxControls'
|
|
@@ -22,7 +22,8 @@ Pod::Spec.new do |s|
|
|
|
22
22
|
s.libraries = 'sqlite3'
|
|
23
23
|
# Speech: G9SpeechModule (dictation; the host's Info.plist carries NSSpeechRecognitionUsageDescription).
|
|
24
24
|
# Core Text: G9InputUI registers the digit fonts.
|
|
25
|
-
|
|
25
|
+
# ImageIO, Core Graphics, Core Image: G9ImageModule (decode, draw, redact, encode; G9PhotoEditor, 2.7.0).
|
|
26
|
+
s.frameworks = 'UIKit', 'AVFoundation', 'Speech', 'CoreText', 'ImageIO', 'CoreGraphics', 'CoreImage'
|
|
26
27
|
# The digit fonts of `g9-digits` (G9InputUI.m; ios/fonts/build-digit-fonts.py, from Vazirmatn, SIL OFL 1.1 — the
|
|
27
28
|
# license travels with them).
|
|
28
29
|
s.resource_bundles = { 'G9LynxNativeFonts' => ['fonts/*.ttf', 'fonts/OFL.txt'] }
|
|
@@ -37,7 +38,7 @@ Pod::Spec.new do |s|
|
|
|
37
38
|
# golden, interrupt, core edges, preferences and the digits plan (Tests/G9NativeTestSuite.m, also run on Linux by
|
|
38
39
|
# test:ios-core), plus the UIKit checks: the hit-test patch and the digit fonts.
|
|
39
40
|
s.test_spec 'Tests' do |t|
|
|
40
|
-
t.source_files = 'Tests/G9NativeTestSuite.{h,m}', 'Tests/G9NativeTests.m'
|
|
41
|
+
t.source_files = 'Tests/G9NativeTestSuite.{h,m}', 'Tests/G9NativeTests.m', 'Tests/G9ImageModuleTests.m'
|
|
41
42
|
t.frameworks = 'XCTest'
|
|
42
43
|
end
|
|
43
44
|
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <UIKit/UIKit.h>
|
|
3
|
+
#import <Lynx/LynxModule.h>
|
|
4
|
+
#import "generated/G9ImageModuleSpec.h"
|
|
5
|
+
|
|
6
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
7
|
+
|
|
8
|
+
// Hosts register the module on their LynxConfig (the pod does not self-register it)
|
|
9
|
+
// (`[config registerModule:G9ImageModule.class]`, apps/ios-host/Sources/GalleryViewController.m).
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* `NativeModules.G9ImageModule` on iOS (2.7.0): probe, preview, process and cancel for G9PhotoEditor and the headless
|
|
13
|
+
* "fit this photo" API (the native contract). Every method takes one JSON string and answers one JSON string
|
|
14
|
+
* (`{"ok":true,"value":…}` / `{"ok":false,"error":{"code","message"}}`) from a serial background queue. ImageIO
|
|
15
|
+
* decodes (subsampled, the orientation applied once), Core Graphics draws in sRGB, Core Image redacts, Core Text sets
|
|
16
|
+
* the text overlays (Persian shaping and RTL), ImageIO encodes (no WebP encoder on iOS: JPEG, and the result says
|
|
17
|
+
* `format: "jpeg"`). The platform-free rules are G9ImageCore. TWIN: G9ImageModule.kt.
|
|
18
|
+
*/
|
|
19
|
+
@interface G9ImageModule : NSObject <G9ImageModuleSpec>
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The font of a text overlay whose `font` is empty: the host's text font at a size and a CSS weight (100–900). It is
|
|
23
|
+
* also handed to the Swift elements' `G9LCFonts.textFont` (through `G9LCFontsBridge`), so one call sets the text font
|
|
24
|
+
* of every native element. nil restores the default, the system font.
|
|
25
|
+
*/
|
|
26
|
+
+ (void)setTextFontProvider:(nullable UIFont * (^)(CGFloat size, CGFloat weight))provider;
|
|
27
|
+
|
|
28
|
+
@end
|
|
29
|
+
|
|
30
|
+
NS_ASSUME_NONNULL_END
|