@craftguild/expo-oriha 0.0.0-stage → 0.2.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/ExpoOriha.podspec +26 -0
- package/LICENSE +8 -0
- package/LICENSE-APACHE +176 -0
- package/LICENSE-MIT +27 -0
- package/README.md +76 -2
- package/THIRD_PARTY_NOTICES.md +126 -0
- package/android/build.gradle +37 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/co/progressiveworks/oriha/ExpoOrihaModule.kt +62 -0
- package/android/src/main/java/co/progressiveworks/oriha/OrihaRustBridge.kt +73 -0
- package/android/src/main/java/uniffi/oriha_native_bridge/oriha_native_bridge.kt +5862 -0
- package/android/src/main/jniLibs/arm64-v8a/liboriha_native_bridge.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/liboriha_native_bridge.so +0 -0
- package/android/src/main/jniLibs/x86_64/liboriha_native_bridge.so +0 -0
- package/dist/chunk-CfYAbeIz.mjs +13 -0
- package/dist/index.cjs +4517 -0
- package/dist/index.d.cts +1031 -0
- package/dist/index.d.mts +1029 -0
- package/dist/index.mjs +4338 -0
- package/expo-module.config.json +10 -0
- package/ios/ExpoOrihaModule.swift +55 -0
- package/ios/OrihaRustBridge.swift +62 -0
- package/ios/generated/oriha_native_bridge.swift +6526 -0
- package/ios/generated/oriha_native_bridgeFFI.h +766 -0
- package/ios/generated/oriha_native_bridgeFFI.modulemap +7 -0
- package/ios/native/OrihaNativeBridge.xcframework/Info.plist +47 -0
- package/ios/native/OrihaNativeBridge.xcframework/ios-arm64/Headers/oriha_native_bridge.swift +6526 -0
- package/ios/native/OrihaNativeBridge.xcframework/ios-arm64/Headers/oriha_native_bridgeFFI.h +766 -0
- package/ios/native/OrihaNativeBridge.xcframework/ios-arm64/Headers/oriha_native_bridgeFFI.modulemap +7 -0
- package/ios/native/OrihaNativeBridge.xcframework/ios-arm64/liboriha_native_bridge.a +0 -0
- package/ios/native/OrihaNativeBridge.xcframework/ios-arm64-simulator/Headers/oriha_native_bridge.swift +6526 -0
- package/ios/native/OrihaNativeBridge.xcframework/ios-arm64-simulator/Headers/oriha_native_bridgeFFI.h +766 -0
- package/ios/native/OrihaNativeBridge.xcframework/ios-arm64-simulator/Headers/oriha_native_bridgeFFI.modulemap +7 -0
- package/ios/native/OrihaNativeBridge.xcframework/ios-arm64-simulator/liboriha_native_bridge.a +0 -0
- package/licenses/heroicons-LICENSE +21 -0
- package/licenses/rolldown-LICENSE +25 -0
- package/licenses/third-party-licenses.json +415 -0
- package/package.json +82 -4
- package/sbom/aarch64-apple-ios-sim.cdx.json +912 -0
- package/sbom/aarch64-apple-ios.cdx.json +912 -0
- package/sbom/aarch64-linux-android.cdx.json +929 -0
- package/sbom/armv7-linux-androideabi.cdx.json +929 -0
- package/sbom/artifacts.json +241 -0
- package/sbom/bom.cdx.json +6607 -0
- package/sbom/javascript.cdx.json +85 -0
- package/sbom/x86_64-linux-android.cdx.json +929 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'ExpoOriha'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.description = package['description']
|
|
10
|
+
s.license = 'MIT OR Apache-2.0'
|
|
11
|
+
s.author = 'Progressive Works, Inc.'
|
|
12
|
+
s.homepage = 'https://github.com/craftguild/oriha.rs'
|
|
13
|
+
s.platforms = { :ios => '15.1' }
|
|
14
|
+
s.source = { :path => '.' }
|
|
15
|
+
s.static_framework = true
|
|
16
|
+
|
|
17
|
+
s.dependency 'ExpoModulesCore'
|
|
18
|
+
s.source_files = ['ios/*.{h,m,mm,swift}', 'ios/generated/*.{h,swift}']
|
|
19
|
+
s.public_header_files = 'ios/generated/*.h'
|
|
20
|
+
s.vendored_frameworks = 'ios/native/OrihaNativeBridge.xcframework'
|
|
21
|
+
s.pod_target_xcconfig = {
|
|
22
|
+
'DEFINES_MODULE' => 'YES',
|
|
23
|
+
'HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)/ios/generated"',
|
|
24
|
+
'SWIFT_INCLUDE_PATHS' => '"$(PODS_TARGET_SRCROOT)/ios/generated"'
|
|
25
|
+
}
|
|
26
|
+
end
|
package/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Copyright (c) 2026 Progressive Works, Inc.
|
|
2
|
+
|
|
3
|
+
Except where separately identified, this project is available under either the
|
|
4
|
+
MIT License or the Apache License, Version 2.0, at your option.
|
|
5
|
+
See LICENSE-MIT and LICENSE-APACHE for the full terms.
|
|
6
|
+
|
|
7
|
+
Third-party source, data, fonts, icons and other components retain their own
|
|
8
|
+
licenses and notices. See THIRD_PARTY_NOTICES.md and the component license files.
|
package/LICENSE-APACHE
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
package/LICENSE-MIT
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Progressive Works, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any
|
|
6
|
+
person obtaining a copy of this software and associated
|
|
7
|
+
documentation files (the "Software"), to deal in the
|
|
8
|
+
Software without restriction, including without
|
|
9
|
+
limitation the rights to use, copy, modify, merge,
|
|
10
|
+
publish, distribute, sublicense, and/or sell copies of
|
|
11
|
+
the Software, and to permit persons to whom the Software
|
|
12
|
+
is furnished to do so, subject to the following
|
|
13
|
+
conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice
|
|
16
|
+
shall be included in all copies or substantial portions
|
|
17
|
+
of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
20
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
21
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
22
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
23
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
24
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
25
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
26
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
27
|
+
DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# oriha.rs for Expo
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@craftguild/expo-oriha` embeds the Oriha Rust Markdown engine in Expo
|
|
4
|
+
applications. It provides a measured preview WebView, typed renderer settings,
|
|
5
|
+
PDF export and optional local font installation.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
Build this source package with `make build-expo` from the repository root, then
|
|
10
|
+
use it from an Expo development build. The local
|
|
11
|
+
[showcase](https://github.com/craftguild/oriha.rs/tree/main/examples/expo-preview)
|
|
12
|
+
demonstrates the complete integration without an npm publication.
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { OrihaPreview, OrihaProvider } from "@craftguild/expo-oriha";
|
|
16
|
+
|
|
17
|
+
export function Document() {
|
|
18
|
+
return (
|
|
19
|
+
<OrihaProvider>
|
|
20
|
+
<OrihaPreview markdown={"# Hello\n\nRendered by Oriha."} />
|
|
21
|
+
</OrihaProvider>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## System requirements
|
|
27
|
+
|
|
28
|
+
Use an iOS/Android app build containing the native Expo module; Expo Go cannot
|
|
29
|
+
load it. Install the peer dependencies declared in `package.json`, including
|
|
30
|
+
React, React Native, Expo, WebView, SVG and the required Expo file/print/share
|
|
31
|
+
modules. Peer ranges do not constitute a promise that every upstream version is
|
|
32
|
+
compatible. The showcase locks the versions used for development.
|
|
33
|
+
|
|
34
|
+
## Build requirements
|
|
35
|
+
|
|
36
|
+
Source packaging uses Node 24+, Rust/Cargo, Python 3, full Xcode, Android NDK and
|
|
37
|
+
cargo-ndk. Install the committed lockfile with `npm ci --ignore-scripts` first.
|
|
38
|
+
The root [development guide](https://github.com/craftguild/oriha.rs/blob/main/docs/guides/development.md)
|
|
39
|
+
lists platform targets and the complete repository checks.
|
|
40
|
+
|
|
41
|
+
`npm run build` generates bindings, builds JavaScript/declarations and all five
|
|
42
|
+
native slices, composes SBOMs and inspects a local npm tarball. It does not
|
|
43
|
+
increment versions, commit, tag or publish. Optional macOS Swift output uses
|
|
44
|
+
`node scripts/build-rust-macos.mjs` separately.
|
|
45
|
+
|
|
46
|
+
## Public API
|
|
47
|
+
|
|
48
|
+
`prepareMarkdownLayout` and `renderPreparedMarkdown` expose the two-step typed
|
|
49
|
+
pipeline. `resolveRenderSettings` provides localized controls and plan limits.
|
|
50
|
+
`nativeBridgeVersionInfo` reports the embedded bridge version and build identity.
|
|
51
|
+
`useOrihaFonts` installs/removes optional local fonts, and `useOrihaOverlay`
|
|
52
|
+
provides caller overlays and toasts. See the
|
|
53
|
+
[API guide](https://github.com/craftguild/oriha.rs/blob/main/docs/guides/expo.md)
|
|
54
|
+
for measurement, rendering options, font configuration and PDF examples.
|
|
55
|
+
|
|
56
|
+
Downloaded fonts are checked against the registry's SHA-256 values. Preview and
|
|
57
|
+
rendering use installed local files, and never send document content to a font
|
|
58
|
+
provider. The optional registry has its own deployment and asset provenance.
|
|
59
|
+
|
|
60
|
+
## Known limitations
|
|
61
|
+
|
|
62
|
+
The Rust bridge enforces plan limits and reports clamped settings as diagnostics.
|
|
63
|
+
Free-plan PDF output has a default watermark. Math and diagrams implement tested
|
|
64
|
+
subsets. Native device execution must be tested separately from package builds.
|
|
65
|
+
The included `sbom/bom.cdx.json` describes bundled bytes and selected native
|
|
66
|
+
runtime graphs; external app peers and system SDKs are outside that graph.
|
|
67
|
+
|
|
68
|
+
## Community
|
|
69
|
+
|
|
70
|
+
Report ordinary bugs in [Oriha issues](https://github.com/craftguild/oriha.rs/issues).
|
|
71
|
+
The repository documentation explains source contributions and release preparation.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
First-party code is [MIT](LICENSE-MIT) OR [Apache-2.0](LICENSE-APACHE).
|
|
76
|
+
See [third-party notices](THIRD_PARTY_NOTICES.md) and `licenses/` for retained
|
|
77
|
+
font, data, icon, helper and native dependency license text.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Third Party Notices
|
|
2
|
+
|
|
3
|
+
## Rolldown runtime helpers
|
|
4
|
+
|
|
5
|
+
The JavaScript bundle includes the generated runtime helpers from the locked
|
|
6
|
+
Rolldown 1.0.1 compiler. The helpers retain its MIT license; the complete upstream
|
|
7
|
+
copyright and license are included in
|
|
8
|
+
[`licenses/rolldown-LICENSE`](licenses/rolldown-LICENSE).
|
|
9
|
+
The package SBOM records the actual contributing helper snapshots, separately
|
|
10
|
+
from development-only compiler code.
|
|
11
|
+
|
|
12
|
+
## Heroicons
|
|
13
|
+
|
|
14
|
+
The Expo provider embeds the information-circle, pencil, check-circle,
|
|
15
|
+
exclamation-triangle, exclamation-circle and megaphone icons from Heroicons
|
|
16
|
+
2.2.0, `24/solid`. These derived path definitions retain the MIT license.
|
|
17
|
+
The complete upstream copyright notice and license are included in
|
|
18
|
+
[`licenses/heroicons-LICENSE`](licenses/heroicons-LICENSE).
|
|
19
|
+
The exact installed SVG inputs and their hashes are recorded by the
|
|
20
|
+
repository's generated-output ownership manifest.
|
|
21
|
+
|
|
22
|
+
## STIX Two Math
|
|
23
|
+
|
|
24
|
+
- Component: STIX Two Math
|
|
25
|
+
- Source: https://github.com/stipub/stixfonts
|
|
26
|
+
- Release/tag: STIX Two v2.13 b171 (`v2.13b171`)
|
|
27
|
+
- Vendored file/source path: `fonts/static_otf/STIXTwoMath-Regular.otf`
|
|
28
|
+
- SHA-256: `3a5f3f26f40d5698b3c62dd085d48d6663696a3f80825aab8b553d5097518e8c`
|
|
29
|
+
- License: SIL Open Font License, Version 1.1
|
|
30
|
+
|
|
31
|
+
The STIX Two Math font is bundled unmodified as part of the native Markdown
|
|
32
|
+
math renderer.
|
|
33
|
+
|
|
34
|
+
Copyright 2001-2021 The STIX Fonts Project Authors (https://github.com/stipub/stixfonts), with Reserved Font Name "TM Math". STIX Fonts™ is a trademark of The Institute of Electrical and Electronics Engineers, Inc.
|
|
35
|
+
|
|
36
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
37
|
+
The in-repo copy is also available at `crates/latex/assets/fonts/OFL.txt`.
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
-----------------------------------------------------------
|
|
41
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
42
|
+
-----------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
PREAMBLE
|
|
45
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
46
|
+
development of collaborative font projects, to support the font creation
|
|
47
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
48
|
+
open framework in which fonts may be shared and improved in partnership
|
|
49
|
+
with others.
|
|
50
|
+
|
|
51
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
52
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
53
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
54
|
+
redistributed and/or sold with any software provided that any reserved
|
|
55
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
56
|
+
however, cannot be released under any other type of license. The
|
|
57
|
+
requirement for fonts to remain under this license does not apply
|
|
58
|
+
to any document created using the fonts or their derivatives.
|
|
59
|
+
|
|
60
|
+
DEFINITIONS
|
|
61
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
62
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
63
|
+
include source files, build scripts and documentation.
|
|
64
|
+
|
|
65
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
66
|
+
copyright statement(s).
|
|
67
|
+
|
|
68
|
+
"Original Version" refers to the collection of Font Software components as
|
|
69
|
+
distributed by the Copyright Holder(s).
|
|
70
|
+
|
|
71
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
72
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
73
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
74
|
+
new environment.
|
|
75
|
+
|
|
76
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
77
|
+
writer or other person who contributed to the Font Software.
|
|
78
|
+
|
|
79
|
+
PERMISSION & CONDITIONS
|
|
80
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
81
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
82
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
83
|
+
Software, subject to the following conditions:
|
|
84
|
+
|
|
85
|
+
1) Neither the Font Software nor any of its individual components,
|
|
86
|
+
in Original or Modified Versions, may be sold by itself.
|
|
87
|
+
|
|
88
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
89
|
+
redistributed and/or sold with any software, provided that each copy
|
|
90
|
+
contains the above copyright notice and this license. These can be
|
|
91
|
+
included either as stand-alone text files, human-readable headers or
|
|
92
|
+
in the appropriate machine-readable metadata fields within text or
|
|
93
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
94
|
+
|
|
95
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
96
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
97
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
98
|
+
presented to the users.
|
|
99
|
+
|
|
100
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
101
|
+
Software shall not be used to promote, endorse or advertise any
|
|
102
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
103
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
104
|
+
permission.
|
|
105
|
+
|
|
106
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
107
|
+
must be distributed entirely under this license, and must not be
|
|
108
|
+
distributed under any other license. The requirement for fonts to
|
|
109
|
+
remain under this license does not apply to any document created
|
|
110
|
+
using the Font Software.
|
|
111
|
+
|
|
112
|
+
TERMINATION
|
|
113
|
+
This license becomes null and void if any of the above conditions are
|
|
114
|
+
not met.
|
|
115
|
+
|
|
116
|
+
DISCLAIMER
|
|
117
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
118
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
119
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
120
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
121
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
122
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
123
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
124
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
125
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
126
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
apply plugin: 'com.android.library'
|
|
2
|
+
apply plugin: 'org.jetbrains.kotlin.android'
|
|
3
|
+
|
|
4
|
+
group = 'co.progressiveworks.oriha'
|
|
5
|
+
version = '0.1.0'
|
|
6
|
+
|
|
7
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
8
|
+
apply from: expoModulesCorePlugin
|
|
9
|
+
applyKotlinExpoModulesCorePlugin()
|
|
10
|
+
useExpoPublishing()
|
|
11
|
+
useCoreDependencies()
|
|
12
|
+
|
|
13
|
+
def safeExtGet(prop, fallback) {
|
|
14
|
+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
android {
|
|
18
|
+
namespace "co.progressiveworks.oriha"
|
|
19
|
+
|
|
20
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 35)
|
|
21
|
+
|
|
22
|
+
defaultConfig {
|
|
23
|
+
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
24
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 35)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
sourceSets {
|
|
28
|
+
main {
|
|
29
|
+
java.srcDirs += ["src/main/java"]
|
|
30
|
+
jniLibs.srcDirs += ["src/main/jniLibs"]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
dependencies {
|
|
36
|
+
implementation "net.java.dev.jna:jna:5.18.1@aar"
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
package co.progressiveworks.oriha
|
|
2
|
+
|
|
3
|
+
import expo.modules.kotlin.modules.Module
|
|
4
|
+
import expo.modules.kotlin.modules.ModuleDefinition
|
|
5
|
+
|
|
6
|
+
class ExpoOrihaModule : Module() {
|
|
7
|
+
override fun definition() = ModuleDefinition {
|
|
8
|
+
Name("ExpoOriha")
|
|
9
|
+
|
|
10
|
+
OnCreate {
|
|
11
|
+
OrihaRustBridge.configureNativeLibraryLoader()
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
AsyncFunction("nativeBridgeVersionInfo") {
|
|
15
|
+
OrihaRustBridge.versionInfo()
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
AsyncFunction("prepareMarkdownLayout") { inputJson: String ->
|
|
19
|
+
OrihaRustBridge.prepareLayoutJson(inputJson)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
AsyncFunction("prepareMarkdownPatch") { previousSnapshotJson: String?, inputJson: String ->
|
|
23
|
+
OrihaRustBridge.preparePatchJson(previousSnapshotJson, inputJson)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
AsyncFunction("prepareHtmlExport") { inputJson: String, optionsJson: String? ->
|
|
27
|
+
OrihaRustBridge.prepareHtmlExportJson(inputJson, optionsJson)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
AsyncFunction("resolveRenderSettings") { inputJson: String ->
|
|
31
|
+
OrihaRustBridge.resolveSettingsJson(inputJson)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
AsyncFunction("renderPreparedMarkdown") { preparedJson: String, measureResultsJson: String ->
|
|
35
|
+
OrihaRustBridge.renderPreparedJson(preparedJson, measureResultsJson)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
AsyncFunction("renderPreparedMarkdownPatch") { preparedJson: String, measureResultsJson: String ->
|
|
39
|
+
OrihaRustBridge.renderPreparedPatchJson(preparedJson, measureResultsJson)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
AsyncFunction("renderPreparedHtmlExport") { preparedJson: String, measureResultsJson: String ->
|
|
43
|
+
OrihaRustBridge.renderPreparedHtmlExportJson(preparedJson, measureResultsJson)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
AsyncFunction("usageAnalyticsOutboxStartEnqueue") { inputJson: String, nowMs: Double ->
|
|
47
|
+
OrihaRustBridge.usageAnalyticsOutboxStartEnqueueJson(inputJson, nowMs)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
AsyncFunction("usageAnalyticsOutboxStartDrain") { inputJson: String, nowMs: Double ->
|
|
51
|
+
OrihaRustBridge.usageAnalyticsOutboxStartDrainJson(inputJson, nowMs)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
AsyncFunction("usageAnalyticsOutboxStartDeliveryStateChange") { inputJson: String ->
|
|
55
|
+
OrihaRustBridge.usageAnalyticsOutboxStartDeliveryStateChangeJson(inputJson)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
AsyncFunction("usageAnalyticsOutboxResume") { inputJson: String, nowMs: Double ->
|
|
59
|
+
OrihaRustBridge.usageAnalyticsOutboxResumeJson(inputJson, nowMs)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
package co.progressiveworks.oriha
|
|
2
|
+
|
|
3
|
+
import java.util.concurrent.atomic.AtomicBoolean
|
|
4
|
+
import uniffi.oriha_native_bridge.nativeBridgeVersionInfo as bridgeNativeBridgeVersionInfo
|
|
5
|
+
import uniffi.oriha_native_bridge.prepareHtmlExportJson as bridgePrepareHtmlExportJson
|
|
6
|
+
import uniffi.oriha_native_bridge.prepareMarkdownLayoutJson as bridgePrepareMarkdownLayoutJson
|
|
7
|
+
import uniffi.oriha_native_bridge.prepareMarkdownPatchJson as bridgePrepareMarkdownPatchJson
|
|
8
|
+
import uniffi.oriha_native_bridge.renderPreparedHtmlExportJson as bridgeRenderPreparedHtmlExportJson
|
|
9
|
+
import uniffi.oriha_native_bridge.renderPreparedMarkdownJson as bridgeRenderPreparedMarkdownJson
|
|
10
|
+
import uniffi.oriha_native_bridge.renderPreparedMarkdownPatchJson as bridgeRenderPreparedMarkdownPatchJson
|
|
11
|
+
import uniffi.oriha_native_bridge.resolveRenderSettingsJson as bridgeResolveRenderSettingsJson
|
|
12
|
+
import uniffi.oriha_native_bridge.usageAnalyticsOutboxResumeJson as bridgeUsageAnalyticsOutboxResumeJson
|
|
13
|
+
import uniffi.oriha_native_bridge.usageAnalyticsOutboxStartDeliveryStateChangeJson as bridgeUsageAnalyticsOutboxStartDeliveryStateChangeJson
|
|
14
|
+
import uniffi.oriha_native_bridge.usageAnalyticsOutboxStartDrainJson as bridgeUsageAnalyticsOutboxStartDrainJson
|
|
15
|
+
import uniffi.oriha_native_bridge.usageAnalyticsOutboxStartEnqueueJson as bridgeUsageAnalyticsOutboxStartEnqueueJson
|
|
16
|
+
|
|
17
|
+
object OrihaRustBridge {
|
|
18
|
+
private val nativeLoaderConfigured = AtomicBoolean(false)
|
|
19
|
+
|
|
20
|
+
fun configureNativeLibraryLoader() {
|
|
21
|
+
if (!nativeLoaderConfigured.compareAndSet(false, true)) {
|
|
22
|
+
return
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Keep JNA on its normal Android native loader path. The 16 KB page-size
|
|
26
|
+
// fix comes from the JNA AAR version, not from custom library extraction.
|
|
27
|
+
System.setProperty("jna.nosys", "false")
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
fun versionInfo(): Map<String, String> {
|
|
31
|
+
val info = bridgeNativeBridgeVersionInfo()
|
|
32
|
+
return mapOf(
|
|
33
|
+
"version" to info.version,
|
|
34
|
+
"gitShortHash" to info.gitShortHash,
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
fun prepareLayoutJson(inputJson: String): String =
|
|
39
|
+
bridgePrepareMarkdownLayoutJson(inputJson)
|
|
40
|
+
|
|
41
|
+
fun preparePatchJson(previousSnapshotJson: String?, inputJson: String): String =
|
|
42
|
+
bridgePrepareMarkdownPatchJson(previousSnapshotJson, inputJson)
|
|
43
|
+
|
|
44
|
+
fun prepareHtmlExportJson(inputJson: String, optionsJson: String?): String =
|
|
45
|
+
bridgePrepareHtmlExportJson(inputJson, optionsJson)
|
|
46
|
+
|
|
47
|
+
fun resolveSettingsJson(inputJson: String): String =
|
|
48
|
+
bridgeResolveRenderSettingsJson(inputJson)
|
|
49
|
+
|
|
50
|
+
fun renderPreparedJson(preparedJson: String, measureResultsJson: String): String =
|
|
51
|
+
bridgeRenderPreparedMarkdownJson(preparedJson, measureResultsJson)
|
|
52
|
+
|
|
53
|
+
fun renderPreparedPatchJson(preparedJson: String, measureResultsJson: String): String =
|
|
54
|
+
bridgeRenderPreparedMarkdownPatchJson(preparedJson, measureResultsJson)
|
|
55
|
+
|
|
56
|
+
fun renderPreparedHtmlExportJson(preparedJson: String, measureResultsJson: String): String =
|
|
57
|
+
bridgeRenderPreparedHtmlExportJson(preparedJson, measureResultsJson)
|
|
58
|
+
|
|
59
|
+
fun usageAnalyticsOutboxStartEnqueueJson(inputJson: String, nowMs: Double): String =
|
|
60
|
+
bridgeUsageAnalyticsOutboxStartEnqueueJson(inputJson, nowMs.toAnalyticsMillis())
|
|
61
|
+
|
|
62
|
+
fun usageAnalyticsOutboxStartDrainJson(inputJson: String, nowMs: Double): String =
|
|
63
|
+
bridgeUsageAnalyticsOutboxStartDrainJson(inputJson, nowMs.toAnalyticsMillis())
|
|
64
|
+
|
|
65
|
+
fun usageAnalyticsOutboxStartDeliveryStateChangeJson(inputJson: String): String =
|
|
66
|
+
bridgeUsageAnalyticsOutboxStartDeliveryStateChangeJson(inputJson)
|
|
67
|
+
|
|
68
|
+
fun usageAnalyticsOutboxResumeJson(inputJson: String, nowMs: Double): String =
|
|
69
|
+
bridgeUsageAnalyticsOutboxResumeJson(inputJson, nowMs.toAnalyticsMillis())
|
|
70
|
+
|
|
71
|
+
private fun Double.toAnalyticsMillis(): ULong =
|
|
72
|
+
if (isFinite() && this > 0.0) toULong() else 0UL
|
|
73
|
+
}
|