nn-widgets 0.1.19 → 0.1.21
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/android/build.gradle +10 -1
- package/android/src/main/java/expo/modules/nnwidgets/NNWidgetsModule.kt +16 -136
- package/build/NNWidgets.types.d.ts +68 -0
- package/build/NNWidgets.types.js +1 -2
- package/build/NNWidgetsModule.js +1 -3
- package/build/icons.js +1 -136
- package/build/index.d.ts +2 -2
- package/build/index.js +1 -158
- package/ios/NNWidgets.podspec +5 -1
- package/ios/NNWidgetsModule.swift +15 -83
- package/package.json +5 -4
- package/plugin/build/icons.js +1 -197
- package/plugin/build/index.js +1 -70
- package/plugin/build/types.d.ts +33 -0
- package/plugin/build/types.js +1 -2
- package/plugin/build/withAndroidWidget.js +1 -1286
- package/plugin/build/withIosWidget.js +1 -2103
- package/android/build/.transforms/c5ed6666749162ed9ddcb4d93b73d4f8/results.bin +0 -1
- package/android/build/.transforms/c5ed6666749162ed9ddcb4d93b73d4f8/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/results.bin +0 -1
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/BuildConfig.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/NNWidgetsModule$Companion.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunction$1.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunction$2.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunction$3.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$FunctionWithoutArgs$1.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/expo/modules/nnwidgets/NNWidgetsModule.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/generated/source/buildConfig/debug/expo/modules/nnwidgets/BuildConfig.java +0 -10
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/nn-widgets_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/expo/modules/nnwidgets/BuildConfig.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/nn-widgets_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/NNWidgetsModule$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunction$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunction$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunction$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$FunctionWithoutArgs$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/expo/modules/nnwidgets/NNWidgetsModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -16
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/nn-widgets_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nnwidgets/NNWidgetsModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunction$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunction$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunction$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nnwidgets/NNWidgetsModule$definition$lambda$5$$inlined$FunctionWithoutArgs$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nnwidgets/NNWidgetsModule.class +0 -0
- package/build/NNWidgets.types.d.ts.map +0 -1
- package/build/NNWidgets.types.js.map +0 -1
- package/build/NNWidgetsModule.d.ts.map +0 -1
- package/build/NNWidgetsModule.js.map +0 -1
- package/build/icons.d.ts.map +0 -1
- package/build/icons.js.map +0 -1
- package/build/index.d.ts.map +0 -1
- package/build/index.js.map +0 -1
- package/plugin/build/icons.d.ts.map +0 -1
- package/plugin/build/index.d.ts.map +0 -1
- package/plugin/build/types.d.ts.map +0 -1
- package/plugin/build/withAndroidWidget.d.ts.map +0 -1
- package/plugin/build/withIosWidget.d.ts.map +0 -1
- package/plugin/tsconfig.tsbuildinfo +0 -1
- package/publish.sh +0 -59
package/android/build.gradle
CHANGED
|
@@ -63,7 +63,7 @@ android {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
defaultConfig {
|
|
66
|
-
minSdkVersion safeExtGet("minSdkVersion",
|
|
66
|
+
minSdkVersion safeExtGet("minSdkVersion", 24)
|
|
67
67
|
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
68
68
|
versionCode 1
|
|
69
69
|
versionName "0.1.0"
|
|
@@ -73,6 +73,14 @@ android {
|
|
|
73
73
|
abortOnError false
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
// Only compile the Module wrapper — Core is in the AAR
|
|
77
|
+
sourceSets {
|
|
78
|
+
main {
|
|
79
|
+
java.srcDirs = ['src/main/java']
|
|
80
|
+
java.excludes = ['**/NNWidgetsCore.kt']
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
76
84
|
publishing {
|
|
77
85
|
singleVariant("release") {
|
|
78
86
|
withSourcesJar()
|
|
@@ -87,4 +95,5 @@ repositories {
|
|
|
87
95
|
dependencies {
|
|
88
96
|
implementation project(':expo-modules-core')
|
|
89
97
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
98
|
+
implementation files('libs/nn-widgets-core.aar')
|
|
90
99
|
}
|
|
@@ -1,156 +1,36 @@
|
|
|
1
1
|
package expo.modules.nnwidgets
|
|
2
2
|
|
|
3
|
-
import android.appwidget.AppWidgetManager
|
|
4
|
-
import android.content.ComponentName
|
|
5
|
-
import android.content.Context
|
|
6
|
-
import android.content.Intent
|
|
7
|
-
import android.content.SharedPreferences
|
|
8
|
-
import androidx.core.os.bundleOf
|
|
9
3
|
import expo.modules.kotlin.modules.Module
|
|
10
4
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
11
5
|
import expo.modules.kotlin.Promise
|
|
12
|
-
import org.json.JSONObject
|
|
13
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Thin Expo Module wrapper — delegates all logic to NNWidgetsCore (binary AAR).
|
|
9
|
+
*/
|
|
14
10
|
class NNWidgetsModule : Module() {
|
|
15
|
-
|
|
16
|
-
companion object {
|
|
17
|
-
const val PREFS_NAME = "nn_widgets_data"
|
|
18
|
-
const val WIDGET_DATA_KEYS = "widget_data_keys"
|
|
19
|
-
}
|
|
20
|
-
|
|
11
|
+
|
|
21
12
|
private val context get() = requireNotNull(appContext.reactContext)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Resolve widget name to full provider class name.
|
|
29
|
-
* E.g., "LibraryWidget" -> "com.app.frentt.widget.LibraryWidgetProvider"
|
|
30
|
-
*/
|
|
31
|
-
private fun resolveWidgetClassName(widgetName: String): String {
|
|
32
|
-
// If already a full class name, return as-is
|
|
33
|
-
if (widgetName.contains(".")) {
|
|
34
|
-
return widgetName
|
|
35
|
-
}
|
|
36
|
-
// Otherwise, construct full class name
|
|
37
|
-
return "${context.packageName}.widget.${widgetName}Provider"
|
|
38
|
-
}
|
|
39
|
-
|
|
13
|
+
private val core by lazy { NNWidgetsCore(context) }
|
|
14
|
+
|
|
40
15
|
override fun definition() = ModuleDefinition {
|
|
41
16
|
Name("NNWidgets")
|
|
42
|
-
|
|
43
|
-
// Check if widgets are supported (Android 4.0+, API 14+)
|
|
17
|
+
|
|
44
18
|
Function("isSupported") {
|
|
45
|
-
|
|
19
|
+
core.isSupported()
|
|
46
20
|
}
|
|
47
|
-
|
|
48
|
-
// Set widget data to SharedPreferences
|
|
21
|
+
|
|
49
22
|
AsyncFunction("setWidgetData") { data: Map<String, Any?>, promise: Promise ->
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
val editor = prefs.edit()
|
|
53
|
-
val keys = mutableListOf<String>()
|
|
54
|
-
|
|
55
|
-
for ((key, value) in data) {
|
|
56
|
-
val prefKey = "widget_$key"
|
|
57
|
-
keys.add(prefKey)
|
|
58
|
-
|
|
59
|
-
when (value) {
|
|
60
|
-
is String -> editor.putString(prefKey, value)
|
|
61
|
-
is Int -> editor.putInt(prefKey, value)
|
|
62
|
-
is Long -> editor.putLong(prefKey, value)
|
|
63
|
-
is Float -> editor.putFloat(prefKey, value)
|
|
64
|
-
is Double -> editor.putFloat(prefKey, value.toFloat())
|
|
65
|
-
is Boolean -> editor.putBoolean(prefKey, value)
|
|
66
|
-
null -> editor.remove(prefKey)
|
|
67
|
-
else -> editor.putString(prefKey, value.toString())
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Store keys list
|
|
72
|
-
editor.putStringSet(WIDGET_DATA_KEYS, keys.toSet())
|
|
73
|
-
editor.apply()
|
|
74
|
-
|
|
75
|
-
println("[NNWidgets] Widget data saved: ${keys.joinToString(", ")}")
|
|
76
|
-
promise.resolve(true)
|
|
77
|
-
} catch (e: Exception) {
|
|
78
|
-
println("[NNWidgets] Failed to save widget data: ${e.message}")
|
|
79
|
-
promise.resolve(false)
|
|
80
|
-
}
|
|
23
|
+
android.util.Log.d("NNWidgets", "[Module] setWidgetData called with ${data.size} keys")
|
|
24
|
+
promise.resolve(core.setWidgetData(data))
|
|
81
25
|
}
|
|
82
|
-
|
|
83
|
-
// Get widget data from SharedPreferences
|
|
26
|
+
|
|
84
27
|
AsyncFunction("getWidgetData") { promise: Promise ->
|
|
85
|
-
|
|
86
|
-
val prefs = getPreferences()
|
|
87
|
-
val keys = prefs.getStringSet(WIDGET_DATA_KEYS, emptySet()) ?: emptySet()
|
|
88
|
-
val result = mutableMapOf<String, Any?>()
|
|
89
|
-
|
|
90
|
-
for (key in keys) {
|
|
91
|
-
val cleanKey = key.removePrefix("widget_")
|
|
92
|
-
val value = prefs.all[key]
|
|
93
|
-
if (value != null) {
|
|
94
|
-
result[cleanKey] = value
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
promise.resolve(result)
|
|
99
|
-
} catch (e: Exception) {
|
|
100
|
-
println("[NNWidgets] Failed to get widget data: ${e.message}")
|
|
101
|
-
promise.resolve(emptyMap<String, Any?>())
|
|
102
|
-
}
|
|
28
|
+
promise.resolve(core.getWidgetData())
|
|
103
29
|
}
|
|
104
|
-
|
|
105
|
-
// Request widget update
|
|
30
|
+
|
|
106
31
|
AsyncFunction("reloadWidget") { widgetName: String?, promise: Promise ->
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (widgetName != null) {
|
|
111
|
-
// Resolve widget name to full class name
|
|
112
|
-
val fullClassName = resolveWidgetClassName(widgetName)
|
|
113
|
-
println("[NNWidgets] Resolving widget: $widgetName -> $fullClassName")
|
|
114
|
-
|
|
115
|
-
try {
|
|
116
|
-
val componentName = ComponentName(context.packageName, fullClassName)
|
|
117
|
-
val widgetIds = appWidgetManager.getAppWidgetIds(componentName)
|
|
118
|
-
|
|
119
|
-
if (widgetIds.isNotEmpty()) {
|
|
120
|
-
// Send standard widget update broadcast
|
|
121
|
-
val intent = Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE).apply {
|
|
122
|
-
putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, widgetIds)
|
|
123
|
-
component = componentName
|
|
124
|
-
}
|
|
125
|
-
context.sendBroadcast(intent)
|
|
126
|
-
println("[NNWidgets] Reloaded widget: $fullClassName with ${widgetIds.size} instances")
|
|
127
|
-
} else {
|
|
128
|
-
println("[NNWidgets] No widget instances found for: $fullClassName")
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Also send custom update broadcast for the specific widget
|
|
132
|
-
val customIntent = Intent("${context.packageName}.WIDGET_UPDATE_${widgetName.uppercase()}")
|
|
133
|
-
context.sendBroadcast(customIntent)
|
|
134
|
-
|
|
135
|
-
} catch (e: Exception) {
|
|
136
|
-
println("[NNWidgets] Error updating specific widget: ${e.message}")
|
|
137
|
-
// Fall back to custom broadcast
|
|
138
|
-
val customIntent = Intent("${context.packageName}.WIDGET_UPDATE_${widgetName.uppercase()}")
|
|
139
|
-
context.sendBroadcast(customIntent)
|
|
140
|
-
}
|
|
141
|
-
} else {
|
|
142
|
-
// Broadcast update to all widgets in the app
|
|
143
|
-
val intent = Intent("${context.packageName}.WIDGET_UPDATE")
|
|
144
|
-
context.sendBroadcast(intent)
|
|
145
|
-
println("[NNWidgets] Sent update broadcast to all widgets")
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
promise.resolve(true)
|
|
149
|
-
} catch (e: Exception) {
|
|
150
|
-
println("[NNWidgets] Failed to reload widget: ${e.message}")
|
|
151
|
-
e.printStackTrace()
|
|
152
|
-
promise.resolve(false)
|
|
153
|
-
}
|
|
32
|
+
android.util.Log.d("NNWidgets", "[Module] reloadWidget called: widgetName=$widgetName")
|
|
33
|
+
promise.resolve(core.reloadWidget(widgetName))
|
|
154
34
|
}
|
|
155
35
|
}
|
|
156
36
|
}
|
|
@@ -31,6 +31,8 @@ export type WidgetItemIcon = string | {
|
|
|
31
31
|
url: string;
|
|
32
32
|
/** Icon size in points/dp @default 32 */
|
|
33
33
|
size?: number;
|
|
34
|
+
/** Icon height in points (when > 0, allows non-square icons e.g. banners) @default 0 */
|
|
35
|
+
height?: number;
|
|
34
36
|
/** Border radius (0 = square, size/2 = circle) @default 0 */
|
|
35
37
|
radius?: number;
|
|
36
38
|
/** Background color behind the icon (hex) */
|
|
@@ -78,6 +80,44 @@ export type FlexJustifyContent = "flex-start" | "flex-end" | "center" | "space-b
|
|
|
78
80
|
* Align items options for flex rows (similar to CSS flexbox)
|
|
79
81
|
*/
|
|
80
82
|
export type FlexAlignItems = "flex-start" | "flex-end" | "center" | "stretch";
|
|
83
|
+
/**
|
|
84
|
+
* Per-cell style using React Native style properties.
|
|
85
|
+
* Applied to individual cells within a flex row.
|
|
86
|
+
*/
|
|
87
|
+
export interface FlexCellStyle {
|
|
88
|
+
/** 0 = hug content, 1 = expand to fill cell space @default 0 */
|
|
89
|
+
flex?: number;
|
|
90
|
+
/** Uniform padding on all sides (points) */
|
|
91
|
+
padding?: number;
|
|
92
|
+
/** Horizontal padding override (points) */
|
|
93
|
+
paddingHorizontal?: number;
|
|
94
|
+
/** Vertical padding override (points) */
|
|
95
|
+
paddingVertical?: number;
|
|
96
|
+
/** Left padding override (points) */
|
|
97
|
+
paddingLeft?: number;
|
|
98
|
+
/** Right padding override (points) */
|
|
99
|
+
paddingRight?: number;
|
|
100
|
+
/** Top padding override (points) */
|
|
101
|
+
paddingTop?: number;
|
|
102
|
+
/** Bottom padding override (points) */
|
|
103
|
+
paddingBottom?: number;
|
|
104
|
+
/** Cell background color (hex) */
|
|
105
|
+
backgroundColor?: string;
|
|
106
|
+
/** Cell border radius (points) */
|
|
107
|
+
borderRadius?: number;
|
|
108
|
+
/** Left margin outside cell (points) @default 0 */
|
|
109
|
+
marginLeft?: number;
|
|
110
|
+
/** Right margin outside cell (points) @default 0 */
|
|
111
|
+
marginRight?: number;
|
|
112
|
+
/** Top margin outside cell (points) @default 0 */
|
|
113
|
+
marginTop?: number;
|
|
114
|
+
/** Bottom margin outside cell (points) @default 0 */
|
|
115
|
+
marginBottom?: number;
|
|
116
|
+
/** Horizontal content alignment within cell */
|
|
117
|
+
justifyContent?: "flex-start" | "flex-end" | "center";
|
|
118
|
+
/** Vertical content alignment within cell */
|
|
119
|
+
alignItems?: "flex-start" | "flex-end" | "center";
|
|
120
|
+
}
|
|
81
121
|
/**
|
|
82
122
|
* Row configuration for flex layout.
|
|
83
123
|
* Can be a simple array of ratios or an object with alignment options.
|
|
@@ -89,6 +129,24 @@ export type FlexRowConfig = number[] | {
|
|
|
89
129
|
justifyContent?: FlexJustifyContent;
|
|
90
130
|
/** How to align items vertically @default "center" */
|
|
91
131
|
alignItems?: FlexAlignItems;
|
|
132
|
+
/** Row background color (hex). When combined with borderRadius, creates pill/capsule effects. */
|
|
133
|
+
backgroundColor?: string;
|
|
134
|
+
/** Row border radius in points. Use 999 for capsule/pill shape. @default 0 */
|
|
135
|
+
borderRadius?: number;
|
|
136
|
+
/** Fixed row height in points. Rows without height share remaining space equally. */
|
|
137
|
+
height?: number;
|
|
138
|
+
/** Flex grow factor. When set (> 0), the row expands to fill remaining space. Rows without flex use wrap_content. @default 0 */
|
|
139
|
+
flex?: number;
|
|
140
|
+
/** Top margin in points @default 0 */
|
|
141
|
+
marginTop?: number;
|
|
142
|
+
/** Bottom margin in points @default 0 */
|
|
143
|
+
marginBottom?: number;
|
|
144
|
+
/** Left margin in points @default 0 */
|
|
145
|
+
marginLeft?: number;
|
|
146
|
+
/** Right margin in points @default 0 */
|
|
147
|
+
marginRight?: number;
|
|
148
|
+
/** Per-cell styles (index maps 1:1 with ratios). Null/undefined entries use defaults. */
|
|
149
|
+
cells?: (FlexCellStyle | null)[];
|
|
92
150
|
};
|
|
93
151
|
/**
|
|
94
152
|
* Flex layout configuration per widget family.
|
|
@@ -132,6 +190,16 @@ export interface WidgetDataPayload {
|
|
|
132
190
|
value?: number;
|
|
133
191
|
/** List items (for list/grid/flex-grid widgets) */
|
|
134
192
|
items?: WidgetListItem[];
|
|
193
|
+
/**
|
|
194
|
+
* Per-family items. When provided, each family key stores its own items array.
|
|
195
|
+
* Falls back to `items` for families not specified.
|
|
196
|
+
*/
|
|
197
|
+
itemsPerFamily?: {
|
|
198
|
+
systemSmall?: WidgetListItem[];
|
|
199
|
+
systemMedium?: WidgetListItem[];
|
|
200
|
+
systemLarge?: WidgetListItem[];
|
|
201
|
+
systemExtraLarge?: WidgetListItem[];
|
|
202
|
+
};
|
|
135
203
|
/** Flex grid layout configuration (for flex-grid widgets only) */
|
|
136
204
|
layout?: FlexLayoutConfig;
|
|
137
205
|
}
|
package/build/NNWidgets.types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
//# sourceMappingURL=NNWidgets.types.js.map
|
|
1
|
+
export{};
|
package/build/NNWidgetsModule.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default requireNativeModule("NNWidgets");
|
|
3
|
-
//# sourceMappingURL=NNWidgetsModule.js.map
|
|
1
|
+
var _0x38f2db=_0xf9bf;(function(_0x27517f,_0x5d1b0a){var _0x356f1e=_0xf9bf,_0x5b110a=_0x27517f();while(!![]){try{var _0x22b3f9=parseInt(_0x356f1e(0x1d5))/0x1+parseInt(_0x356f1e(0x1d6))/0x2+-parseInt(_0x356f1e(0x1d3))/0x3+parseInt(_0x356f1e(0x1d2))/0x4+-parseInt(_0x356f1e(0x1ce))/0x5*(-parseInt(_0x356f1e(0x1d4))/0x6)+-parseInt(_0x356f1e(0x1d1))/0x7+-parseInt(_0x356f1e(0x1d0))/0x8;if(_0x22b3f9===_0x5d1b0a)break;else _0x5b110a['push'](_0x5b110a['shift']());}catch(_0x1ae0a5){_0x5b110a['push'](_0x5b110a['shift']());}}}(_0x2fb5,0xf3b8f));function _0xf9bf(_0x396061,_0x16d66b){_0x396061=_0x396061-0x1ce;var _0x2fb5ca=_0x2fb5();var _0xf9bf8c=_0x2fb5ca[_0x396061];if(_0xf9bf['mwadAL']===undefined){var _0x1d1694=function(_0x1ba2e7){var _0x2d108b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x542e8f='',_0x5f2f93='';for(var _0x4a722f=0x0,_0x35a0b4,_0x126fb7,_0x4348a6=0x0;_0x126fb7=_0x1ba2e7['charAt'](_0x4348a6++);~_0x126fb7&&(_0x35a0b4=_0x4a722f%0x4?_0x35a0b4*0x40+_0x126fb7:_0x126fb7,_0x4a722f++%0x4)?_0x542e8f+=String['fromCharCode'](0xff&_0x35a0b4>>(-0x2*_0x4a722f&0x6)):0x0){_0x126fb7=_0x2d108b['indexOf'](_0x126fb7);}for(var _0x4f5bdf=0x0,_0x26c9d4=_0x542e8f['length'];_0x4f5bdf<_0x26c9d4;_0x4f5bdf++){_0x5f2f93+='%'+('00'+_0x542e8f['charCodeAt'](_0x4f5bdf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5f2f93);};_0xf9bf['YTSkDf']=_0x1d1694,_0xf9bf['nPIuHD']={},_0xf9bf['mwadAL']=!![];}var _0x3bd13b=_0x2fb5ca[0x0],_0x3eceb6=_0x396061+_0x3bd13b,_0x4baed9=_0xf9bf['nPIuHD'][_0x3eceb6];return!_0x4baed9?(_0xf9bf8c=_0xf9bf['YTSkDf'](_0xf9bf8c),_0xf9bf['nPIuHD'][_0x3eceb6]=_0xf9bf8c):_0xf9bf8c=_0x4baed9,_0xf9bf8c;}function _0x2fb5(){var _0x1a5ab4=['mZi4mJi0neLRAwfXwG','mZy3ndGYnMXLz0j4uW','mZbVvg1btfm','mteYmdq4m1zvtKvgvW','ndK3nde4AgHABeDi','mtmYnJiXmhfdAuXysG','z2v0CW','nZm2mdmXmNH6uwXRqq','mJyWodG2nxP6sgT0BW'];_0x2fb5=function(){return _0x1a5ab4;};return _0x2fb5();}import{requireNativeModule as _0x542e8f}from'expo-modules-core';export default _0x542e8f('NNWid'+_0x38f2db(0x1cf));
|
package/build/icons.js
CHANGED
|
@@ -1,136 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* nn-widgets bundled icons
|
|
3
|
-
*
|
|
4
|
-
* These icons are bundled with nn-widgets and automatically copied
|
|
5
|
-
* to your app during prebuild. Use the simple name in your widget data.
|
|
6
|
-
*
|
|
7
|
-
* Example:
|
|
8
|
-
* ```typescript
|
|
9
|
-
* import { setWidgetData, Icons } from 'nn-widgets';
|
|
10
|
-
*
|
|
11
|
-
* setWidgetData("MyWidget", {
|
|
12
|
-
* items: [
|
|
13
|
-
* { title: "Tasks", icon: Icons.TASK },
|
|
14
|
-
* { title: "Settings", icon: Icons.GEAR },
|
|
15
|
-
* { title: "Profile", icon: Icons.PERSON },
|
|
16
|
-
* ]
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* Available bundled icon names
|
|
22
|
-
* Use these directly in your widget data
|
|
23
|
-
*/
|
|
24
|
-
export const Icons = {
|
|
25
|
-
// Basic
|
|
26
|
-
STAR: "star",
|
|
27
|
-
STAR_OUTLINE: "star-outline",
|
|
28
|
-
HEART: "heart",
|
|
29
|
-
HEART_OUTLINE: "heart-outline",
|
|
30
|
-
BOOKMARK: "bookmark",
|
|
31
|
-
CLOCK: "clock",
|
|
32
|
-
BELL: "bell",
|
|
33
|
-
HOME: "home",
|
|
34
|
-
GEAR: "gear",
|
|
35
|
-
SETTINGS: "gear", // alias
|
|
36
|
-
BOLT: "bolt",
|
|
37
|
-
// People & accounts
|
|
38
|
-
PERSON: "person",
|
|
39
|
-
PEOPLE: "people",
|
|
40
|
-
ACCOUNT: "account",
|
|
41
|
-
CONTACTS: "contacts",
|
|
42
|
-
FACE: "face",
|
|
43
|
-
// Communication
|
|
44
|
-
MAIL: "mail",
|
|
45
|
-
MESSAGE: "message",
|
|
46
|
-
CHAT: "chat",
|
|
47
|
-
FORUM: "forum",
|
|
48
|
-
PHONE: "phone",
|
|
49
|
-
MEGAPHONE: "megaphone",
|
|
50
|
-
// Navigation
|
|
51
|
-
CHEVRON_RIGHT: "chevron-right",
|
|
52
|
-
ARROW_RIGHT: "arrow-right",
|
|
53
|
-
MENU: "menu",
|
|
54
|
-
MORE: "more",
|
|
55
|
-
CLOSE: "close",
|
|
56
|
-
SEARCH: "search",
|
|
57
|
-
ZOOM: "zoom",
|
|
58
|
-
REFRESH: "refresh",
|
|
59
|
-
// Actions
|
|
60
|
-
ADD: "add",
|
|
61
|
-
ADD_CIRCLE: "add-circle",
|
|
62
|
-
REMOVE_CIRCLE: "remove-circle",
|
|
63
|
-
EDIT: "edit",
|
|
64
|
-
DELETE: "delete",
|
|
65
|
-
SHARE: "share",
|
|
66
|
-
DOWNLOAD: "download",
|
|
67
|
-
UPLOAD: "upload",
|
|
68
|
-
SAVE: "save",
|
|
69
|
-
CHECK: "check",
|
|
70
|
-
CHECK_CIRCLE: "check-circle",
|
|
71
|
-
// Media
|
|
72
|
-
PLAY: "play",
|
|
73
|
-
PAUSE: "pause",
|
|
74
|
-
CAMERA: "camera",
|
|
75
|
-
IMAGE: "image",
|
|
76
|
-
VIDEO: "video",
|
|
77
|
-
MUSIC: "music",
|
|
78
|
-
MIC: "mic",
|
|
79
|
-
VOLUME: "volume",
|
|
80
|
-
HEADPHONES: "headphones",
|
|
81
|
-
FAST_FORWARD: "fast-forward",
|
|
82
|
-
// Files & folders
|
|
83
|
-
FOLDER: "folder",
|
|
84
|
-
DOCUMENT: "document",
|
|
85
|
-
BOOK: "book",
|
|
86
|
-
// Business
|
|
87
|
-
BRIEFCASE: "briefcase",
|
|
88
|
-
BUILDING: "building",
|
|
89
|
-
DOLLAR: "dollar",
|
|
90
|
-
MONEY: "money",
|
|
91
|
-
CARD: "card",
|
|
92
|
-
CART: "cart",
|
|
93
|
-
CHART: "chart",
|
|
94
|
-
ANALYTICS: "analytics",
|
|
95
|
-
TRENDING_UP: "trending-up",
|
|
96
|
-
TRENDING_DOWN: "trending-down",
|
|
97
|
-
// Tools & development
|
|
98
|
-
LIGHTBULB: "lightbulb",
|
|
99
|
-
HAMMER: "hammer",
|
|
100
|
-
CODE: "code",
|
|
101
|
-
BUG: "bug",
|
|
102
|
-
TASK: "task",
|
|
103
|
-
GRID: "grid",
|
|
104
|
-
PALETTE: "palette",
|
|
105
|
-
LINK: "link",
|
|
106
|
-
BARCODE: "barcode",
|
|
107
|
-
QRCODE: "qrcode",
|
|
108
|
-
// Location
|
|
109
|
-
LOCATION: "location",
|
|
110
|
-
PIN: "pin",
|
|
111
|
-
// Status
|
|
112
|
-
INFO: "info",
|
|
113
|
-
WARNING: "warning",
|
|
114
|
-
ERROR: "error",
|
|
115
|
-
BLOCK: "block",
|
|
116
|
-
SHIELD: "shield",
|
|
117
|
-
LOCK: "lock",
|
|
118
|
-
UNLOCK: "unlock",
|
|
119
|
-
EYE: "eye",
|
|
120
|
-
EYE_OFF: "eye-off",
|
|
121
|
-
FLAG: "flag",
|
|
122
|
-
// Devices
|
|
123
|
-
DESKTOP: "desktop",
|
|
124
|
-
DEVICES: "devices",
|
|
125
|
-
// Cloud
|
|
126
|
-
CLOUD: "cloud",
|
|
127
|
-
CLOUD_UPLOAD: "cloud-upload",
|
|
128
|
-
CLOUD_DOWNLOAD: "cloud-download",
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* Get all available icon names
|
|
132
|
-
*/
|
|
133
|
-
export function getAvailableIcons() {
|
|
134
|
-
return Object.values(Icons);
|
|
135
|
-
}
|
|
136
|
-
//# sourceMappingURL=icons.js.map
|
|
1
|
+
const _0x2b2c31=_0x4fea;(function(_0x4cb542,_0x5bb7a){const _0x454653=_0x4fea,_0x2ed05d=_0x4cb542();while(!![]){try{const _0x46f111=parseInt(_0x454653(0xb4))/0x1*(-parseInt(_0x454653(0xfe))/0x2)+-parseInt(_0x454653(0xcd))/0x3*(parseInt(_0x454653(0x85))/0x4)+parseInt(_0x454653(0x7f))/0x5+-parseInt(_0x454653(0x80))/0x6+parseInt(_0x454653(0x98))/0x7+parseInt(_0x454653(0x99))/0x8+parseInt(_0x454653(0xee))/0x9;if(_0x46f111===_0x5bb7a)break;else _0x2ed05d['push'](_0x2ed05d['shift']());}catch(_0x27d737){_0x2ed05d['push'](_0x2ed05d['shift']());}}}(_0x20ad,0x918e1));const _0x3574f4={};_0x3574f4[_0x2b2c31(0x12a)]=_0x2b2c31(0xe5),_0x3574f4[_0x2b2c31(0x7d)+_0x2b2c31(0x94)+'NE']=_0x2b2c31(0xe6)+_0x2b2c31(0xe7)+'ne',_0x3574f4[_0x2b2c31(0xc3)]=_0x2b2c31(0x84),_0x3574f4['HEART'+_0x2b2c31(0x127)+_0x2b2c31(0xd2)]=_0x2b2c31(0x84)+_0x2b2c31(0xc5)+_0x2b2c31(0xb9),_0x3574f4[_0x2b2c31(0x11e)+_0x2b2c31(0x117)]=_0x2b2c31(0xbb)+'ark',_0x3574f4[_0x2b2c31(0x86)]=_0x2b2c31(0x114),_0x3574f4[_0x2b2c31(0x10c)]=_0x2b2c31(0xe4),_0x3574f4[_0x2b2c31(0x10b)]='home',_0x3574f4['GEAR']='gear',_0x3574f4[_0x2b2c31(0x124)+_0x2b2c31(0xc9)]=_0x2b2c31(0xbc),_0x3574f4[_0x2b2c31(0xaf)]=_0x2b2c31(0xdf),_0x3574f4['PERSO'+'N']=_0x2b2c31(0xf2)+'n',_0x3574f4['PEOPL'+'E']=_0x2b2c31(0x128)+'e',_0x3574f4['ACCOU'+'NT']=_0x2b2c31(0xf3)+'nt',_0x3574f4['CONTA'+_0x2b2c31(0xb1)]=_0x2b2c31(0x9d)+_0x2b2c31(0x107),_0x3574f4[_0x2b2c31(0xf0)]=_0x2b2c31(0xc1),_0x3574f4['MAIL']=_0x2b2c31(0xd1),_0x3574f4[_0x2b2c31(0xbd)+'GE']=_0x2b2c31(0xc4)+'ge',_0x3574f4[_0x2b2c31(0x11d)]='chat',_0x3574f4[_0x2b2c31(0xf1)]=_0x2b2c31(0xd0),_0x3574f4[_0x2b2c31(0x113)]=_0x2b2c31(0xe3),_0x3574f4[_0x2b2c31(0x90)+_0x2b2c31(0x12b)]='megap'+_0x2b2c31(0x97),_0x3574f4[_0x2b2c31(0xa9)+_0x2b2c31(0xd8)+_0x2b2c31(0xc8)]=_0x2b2c31(0x9e)+'on-ri'+_0x2b2c31(0xc7),_0x3574f4['ARROW'+_0x2b2c31(0x8a)+'T']='arrow'+_0x2b2c31(0xc0)+'t',_0x3574f4[_0x2b2c31(0xff)]=_0x2b2c31(0xa8),_0x3574f4[_0x2b2c31(0x10d)]='more',_0x3574f4['CLOSE']=_0x2b2c31(0xd5),_0x3574f4[_0x2b2c31(0xc2)+'H']=_0x2b2c31(0x106)+'h',_0x3574f4['ZOOM']=_0x2b2c31(0xfd),_0x3574f4[_0x2b2c31(0x118)+'SH']=_0x2b2c31(0xca)+'sh',_0x3574f4[_0x2b2c31(0xe1)]=_0x2b2c31(0xfc),_0x3574f4['ADD_C'+'IRCLE']=_0x2b2c31(0xd7)+_0x2b2c31(0x7b),_0x3574f4[_0x2b2c31(0x101)+_0x2b2c31(0xb6)+'CLE']=_0x2b2c31(0xce)+_0x2b2c31(0x87)+_0x2b2c31(0xf5),_0x3574f4[_0x2b2c31(0xb3)]='edit',_0x3574f4[_0x2b2c31(0x96)+'E']=_0x2b2c31(0x10e)+'e',_0x3574f4[_0x2b2c31(0x8b)]=_0x2b2c31(0xb0),_0x3574f4[_0x2b2c31(0x126)+_0x2b2c31(0xa6)]=_0x2b2c31(0xa1)+_0x2b2c31(0xdb),_0x3574f4['UPLOA'+'D']=_0x2b2c31(0x115)+'d',_0x3574f4['SAVE']=_0x2b2c31(0xcf),_0x3574f4[_0x2b2c31(0x78)]=_0x2b2c31(0xe2),_0x3574f4[_0x2b2c31(0x78)+_0x2b2c31(0xcc)+'LE']=_0x2b2c31(0xe2)+_0x2b2c31(0x8e)+'le',_0x3574f4['PLAY']='play',_0x3574f4[_0x2b2c31(0xcb)]=_0x2b2c31(0x120),_0x3574f4['CAMER'+'A']=_0x2b2c31(0xb5)+'a',_0x3574f4[_0x2b2c31(0xf9)]=_0x2b2c31(0xf6),_0x3574f4['VIDEO']=_0x2b2c31(0x129),_0x3574f4[_0x2b2c31(0xf8)]=_0x2b2c31(0xef),_0x3574f4[_0x2b2c31(0xda)]=_0x2b2c31(0xad),_0x3574f4['VOLUM'+'E']='volum'+'e',_0x3574f4[_0x2b2c31(0xec)+_0x2b2c31(0xb8)]=_0x2b2c31(0xdc)+_0x2b2c31(0x103),_0x3574f4[_0x2b2c31(0x102)+_0x2b2c31(0x119)+'RD']='fast-'+_0x2b2c31(0x11b)+'rd',_0x3574f4[_0x2b2c31(0xac)+'R']=_0x2b2c31(0x8d)+'r',_0x3574f4['DOCUM'+'ENT']='docum'+_0x2b2c31(0xe9),_0x3574f4[_0x2b2c31(0xed)]='book',_0x3574f4[_0x2b2c31(0xbf)+'CASE']=_0x2b2c31(0xc6)+_0x2b2c31(0x88),_0x3574f4[_0x2b2c31(0x95)+_0x2b2c31(0xa0)]=_0x2b2c31(0x11a)+_0x2b2c31(0xf4),_0x3574f4['DOLLA'+'R']=_0x2b2c31(0x8f)+'r',_0x3574f4['MONEY']=_0x2b2c31(0xd9),_0x3574f4[_0x2b2c31(0xba)]=_0x2b2c31(0xfb),_0x3574f4[_0x2b2c31(0xe8)]=_0x2b2c31(0x10a),_0x3574f4[_0x2b2c31(0x7c)]=_0x2b2c31(0x93),_0x3574f4[_0x2b2c31(0xea)+_0x2b2c31(0x108)]='analy'+_0x2b2c31(0x11c),_0x3574f4['TREND'+_0x2b2c31(0x7e)+'P']='trend'+'ing-u'+'p',_0x3574f4[_0x2b2c31(0x109)+_0x2b2c31(0x121)+'OWN']=_0x2b2c31(0xae)+_0x2b2c31(0xb2)+'own',_0x3574f4[_0x2b2c31(0x82)+_0x2b2c31(0xb7)]=_0x2b2c31(0xfa)+'bulb',_0x3574f4[_0x2b2c31(0x79)+'R']='hamme'+'r',_0x3574f4[_0x2b2c31(0xe0)]=_0x2b2c31(0x9f),_0x3574f4[_0x2b2c31(0xd4)]=_0x2b2c31(0xa3),_0x3574f4[_0x2b2c31(0x92)]='task',_0x3574f4[_0x2b2c31(0x104)]=_0x2b2c31(0xde),_0x3574f4['PALET'+'TE']=_0x2b2c31(0x9a)+'te',_0x3574f4[_0x2b2c31(0x125)]=_0x2b2c31(0x81),_0x3574f4['BARCO'+'DE']=_0x2b2c31(0x100)+'de',_0x3574f4[_0x2b2c31(0x91)+'E']='qrcod'+'e',_0x3574f4[_0x2b2c31(0xa7)+_0x2b2c31(0x10f)]=_0x2b2c31(0xf7)+'ion',_0x3574f4[_0x2b2c31(0x89)]=_0x2b2c31(0x11f),_0x3574f4[_0x2b2c31(0x7a)]='info',_0x3574f4['WARNI'+'NG']='warni'+'ng',_0x3574f4['ERROR']='error',_0x3574f4[_0x2b2c31(0x83)]=_0x2b2c31(0xa2),_0x3574f4['SHIEL'+'D']=_0x2b2c31(0x123)+'d',_0x3574f4[_0x2b2c31(0x9c)]=_0x2b2c31(0xeb),_0x3574f4[_0x2b2c31(0xbe)+'K']='unloc'+'k',_0x3574f4[_0x2b2c31(0xdd)]=_0x2b2c31(0x110),_0x3574f4['EYE_O'+'FF']=_0x2b2c31(0x9b)+'ff',_0x3574f4[_0x2b2c31(0xd3)]=_0x2b2c31(0xa5),_0x3574f4[_0x2b2c31(0xd6)+'OP']=_0x2b2c31(0xab)+'op',_0x3574f4[_0x2b2c31(0x105)+'ES']=_0x2b2c31(0x8c)+'es',_0x3574f4[_0x2b2c31(0x112)]=_0x2b2c31(0x116),_0x3574f4[_0x2b2c31(0x112)+_0x2b2c31(0x122)+'AD']=_0x2b2c31(0x116)+_0x2b2c31(0xa4)+'ad',_0x3574f4['CLOUD'+'_DOWN'+_0x2b2c31(0x111)]=_0x2b2c31(0x116)+_0x2b2c31(0xaa)+'load';function _0x20ad(){const _0x552955=['Bg9JAW','sevbrfa','qK9psW','ndGYnJe1mvvrq3bjAG','BxvZAwm','rKfdrq','rK9svu0','CgvYC28','ywnJB3u','Aw5N','y2XL','Aw1Hz2u','Bg9Jyxq','tvvtsum','su1br0u','BgLNAhq','y2fYza','ywrK','EM9VBq','nM5rzvnMrG','tuvovq','yMfYy28','uKvnt1y','rKftvf8','Ag9Uzxm','r1jjra','revwsum','C2vHCMm','y3rZ','veLduW','vfjftKq','y2fYDa','se9nrq','qKvmta','tu9srq','zgvSzxq','su9o','zxLL','te9bra','q0Xpvuq','ueHptKu','y2XVy2S','DxbSB2e','y2XVDwq','qvjl','uKvguKu','rK9sv0e','yNvPBgq','zM9YD2e','DgLJCW','q0Hbva','qK9ps00','CgLU','Cgf1C2u','su5hx0q','x1vqte8','C2HPzwW','u0vuveK','teLosW','re9xtKW','x09vveW','CgvVCgW','DMLKzw8','u1rbuG','se9orq','q0Hfq0S','sefntuu','su5gtW','AxjJBgu','q0HbuLq','u1rbuL8','su5hx1u','ndGWndaWmfnTtLbcEq','ntaYmdi5mgjJvgndrq','BgLUAW','teLhsfq','qKXpq0S','AgvHCNq','mJq2ofnJEejPtG','q0Xpq0S','zs1JAxi','y2fZzq','ueLo','x1jjr0G','u0HbuKu','zgv2Awm','zM9Szgu','lwnPCMm','zg9SBge','tuvhqva','uvjdt0q','veftsW','y2HHCNq','t1vuteK','qLvjteq','revmrvq','Ag9Uzq','odi4ntq2nLnotxLVtq','nJq2nZa5nMn0ug91Cq','CgfSzxq','zxLLlw8','te9dsW','y29UDge','y2HLDNi','y29Kzq','su5h','zg93BMW','yMXVy2S','yNvN','lxvWBg8','zMXHzW','t0fe','te9dqvq','BwvUDq','q0HfvLi','lwrVD24','zgvZA3q','rK9mreu','BwLJ','DhjLBMq','qK9mva','C2HHCMu','q1rt','Aw5Nlwq','rurjva','mJK0ndeZBffNzMTS','y2fTzxi','rv9dsvi','qLvmqG','se9orvm','Aw5L','q0fsra','yM9VA20','z2vHCG','tuvtu0e','vu5mt0m','qLjjruy','lxjPz2G','zMfJzq','u0vbuKm','sevbuLq','BwvZC2e','lw91DgW','yNjPzwy','z2H0','r0Hu','tKDt','CMvMCMu','uefvu0u','x0njuKm','ntCWm2PWC0jdqG','CMvTB3y','C2f2zq','zM9YDw0','BwfPBa','su5f','rKXbrW','qLvh','y2XVC2u','revts1q','ywrKlwm','t05FuKK','Bw9UzxK','tuLd','B2fK','AgvHzha','rvLf','z3jPza','yM9SDa','q09erq','qure','y2HLy2S','CgHVBMu','yMvSBa','C3rHCG','C3rHCI0','B3v0BgK','q0fsva','zw50','qu5btfK'];_0x20ad=function(){return _0x552955;};return _0x20ad();}export const Icons=_0x3574f4;function _0x4fea(_0x231028,_0x744e15){_0x231028=_0x231028-0x78;const _0x20ad38=_0x20ad();let _0x4fea0f=_0x20ad38[_0x231028];if(_0x4fea['TzcyqT']===undefined){var _0x37a660=function(_0x259ba){const _0x1eb8fe='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x569a91='',_0x1166e8='';for(let _0x4597c4=0x0,_0x29dc2a,_0x53ca32,_0x5e903e=0x0;_0x53ca32=_0x259ba['charAt'](_0x5e903e++);~_0x53ca32&&(_0x29dc2a=_0x4597c4%0x4?_0x29dc2a*0x40+_0x53ca32:_0x53ca32,_0x4597c4++%0x4)?_0x569a91+=String['fromCharCode'](0xff&_0x29dc2a>>(-0x2*_0x4597c4&0x6)):0x0){_0x53ca32=_0x1eb8fe['indexOf'](_0x53ca32);}for(let _0x385246=0x0,_0x10e25c=_0x569a91['length'];_0x385246<_0x10e25c;_0x385246++){_0x1166e8+='%'+('00'+_0x569a91['charCodeAt'](_0x385246)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1166e8);};_0x4fea['stlmfb']=_0x37a660,_0x4fea['uzmMDc']={},_0x4fea['TzcyqT']=!![];}const _0x5addc4=_0x20ad38[0x0],_0x580242=_0x231028+_0x5addc4,_0x50d648=_0x4fea['uzmMDc'][_0x580242];return!_0x50d648?(_0x4fea0f=_0x4fea['stlmfb'](_0x4fea0f),_0x4fea['uzmMDc'][_0x580242]=_0x4fea0f):_0x4fea0f=_0x50d648,_0x4fea0f;}export function getAvailableIcons(){return Object['value'+'s'](Icons);}
|
package/build/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { WidgetData, WidgetDataPayload, WidgetListItem, WidgetItemIcon, WidgetItemText, WidgetUpdateConfig, NNWidgetsModuleType, FlexLayoutConfig } from "./NNWidgets.types";
|
|
1
|
+
import type { WidgetData, WidgetDataPayload, WidgetListItem, WidgetItemIcon, WidgetItemText, WidgetUpdateConfig, NNWidgetsModuleType, FlexLayoutConfig, FlexRowConfig, FlexCellStyle } from "./NNWidgets.types";
|
|
2
2
|
import { Icons, getAvailableIcons, type IconName } from "./icons";
|
|
3
3
|
export { Icons, getAvailableIcons, type IconName };
|
|
4
|
-
export type { WidgetData, WidgetDataPayload, WidgetListItem, WidgetItemIcon, WidgetItemText, WidgetUpdateConfig, NNWidgetsModuleType, FlexLayoutConfig, };
|
|
4
|
+
export type { WidgetData, WidgetDataPayload, WidgetListItem, WidgetItemIcon, WidgetItemText, WidgetUpdateConfig, NNWidgetsModuleType, FlexLayoutConfig, FlexRowConfig, FlexCellStyle, };
|
|
5
5
|
/**
|
|
6
6
|
* NNWidgets - Native widget integration for React Native / Expo
|
|
7
7
|
*
|
package/build/index.js
CHANGED
|
@@ -1,158 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Icons, getAvailableIcons } from "./icons";
|
|
3
|
-
export { Icons, getAvailableIcons };
|
|
4
|
-
/**
|
|
5
|
-
* NNWidgets - Native widget integration for React Native / Expo
|
|
6
|
-
*
|
|
7
|
-
* This module provides APIs to communicate between your React Native app
|
|
8
|
-
* and native widgets (iOS WidgetKit & Android App Widgets).
|
|
9
|
-
*/
|
|
10
|
-
export const NNWidgets = {
|
|
11
|
-
/**
|
|
12
|
-
* Set shared data that widgets can read (legacy flat key-value format).
|
|
13
|
-
* Data is stored in App Groups (iOS) or SharedPreferences (Android).
|
|
14
|
-
*
|
|
15
|
-
* @param data - Key-value pairs to share with widget
|
|
16
|
-
* @returns Promise<boolean> - Success status
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* await NNWidgets.setWidgetData({
|
|
21
|
-
* userName: 'John',
|
|
22
|
-
* points: 100,
|
|
23
|
-
* isLoggedIn: true
|
|
24
|
-
* });
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
async setWidgetData(data) {
|
|
28
|
-
try {
|
|
29
|
-
return await NNWidgetsModule.setWidgetData(data);
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
console.error("[NNWidgets] Failed to set widget data:", error);
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
/**
|
|
37
|
-
* Get current shared widget data.
|
|
38
|
-
*
|
|
39
|
-
* @returns Promise<WidgetData> - Current shared data
|
|
40
|
-
*/
|
|
41
|
-
async getWidgetData() {
|
|
42
|
-
try {
|
|
43
|
-
return await NNWidgetsModule.getWidgetData();
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
console.error("[NNWidgets] Failed to get widget data:", error);
|
|
47
|
-
return {};
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* Update a specific widget with structured data.
|
|
52
|
-
* Automatically serializes items to JSON, stores data with proper key prefixes,
|
|
53
|
-
* and reloads the widget timeline.
|
|
54
|
-
*
|
|
55
|
-
* @param widgetName - The widget kind identifier (matches `name` in app.json widgets config)
|
|
56
|
-
* @param data - Structured widget data payload
|
|
57
|
-
* @returns Promise<boolean> - Success status
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```ts
|
|
61
|
-
* // Update a list-type widget
|
|
62
|
-
* await NNWidgets.updateWidget('SessionsWidget', {
|
|
63
|
-
* items: [
|
|
64
|
-
* {
|
|
65
|
-
* icon: 'brainstorm',
|
|
66
|
-
* title: { text: 'Morning Focus', color: '#1E1E2E', fontWeight: 'bold' },
|
|
67
|
-
* description: '25 min session',
|
|
68
|
-
* deepLink: 'myapp://session/123',
|
|
69
|
-
* },
|
|
70
|
-
* {
|
|
71
|
-
* icon: { url: 'meditation', size: 28, radius: 14 },
|
|
72
|
-
* title: 'Evening Wind Down',
|
|
73
|
-
* description: { text: '15 min', color: '#888888' },
|
|
74
|
-
* },
|
|
75
|
-
* ],
|
|
76
|
-
* });
|
|
77
|
-
*
|
|
78
|
-
* // Update a single-type widget
|
|
79
|
-
* await NNWidgets.updateWidget('StatsWidget', {
|
|
80
|
-
* title: 'Focus Time',
|
|
81
|
-
* subtitle: 'This week',
|
|
82
|
-
* value: 142,
|
|
83
|
-
* });
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
async updateWidget(widgetName, data) {
|
|
87
|
-
try {
|
|
88
|
-
const flatData = {};
|
|
89
|
-
if (data.title !== undefined) {
|
|
90
|
-
flatData[`${widgetName}_title`] = data.title;
|
|
91
|
-
}
|
|
92
|
-
if (data.subtitle !== undefined) {
|
|
93
|
-
flatData[`${widgetName}_subtitle`] = data.subtitle;
|
|
94
|
-
}
|
|
95
|
-
if (data.value !== undefined) {
|
|
96
|
-
flatData[`${widgetName}_value`] = data.value;
|
|
97
|
-
}
|
|
98
|
-
if (data.items !== undefined) {
|
|
99
|
-
// Serialize items array to JSON string for native storage
|
|
100
|
-
flatData[`${widgetName}_items`] = JSON.stringify(data.items);
|
|
101
|
-
}
|
|
102
|
-
if (data.layout !== undefined) {
|
|
103
|
-
// Serialize layout config to JSON for flex-grid widgets
|
|
104
|
-
flatData[`${widgetName}_layout`] = JSON.stringify(data.layout);
|
|
105
|
-
}
|
|
106
|
-
const success = await NNWidgetsModule.setWidgetData(flatData);
|
|
107
|
-
if (success) {
|
|
108
|
-
await NNWidgetsModule.reloadWidget(widgetName);
|
|
109
|
-
}
|
|
110
|
-
return success;
|
|
111
|
-
}
|
|
112
|
-
catch (error) {
|
|
113
|
-
console.error(`[NNWidgets] Failed to update widget "${widgetName}":`, error);
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
/**
|
|
118
|
-
* Request widget to reload/update.
|
|
119
|
-
* - iOS: Reloads widget timeline
|
|
120
|
-
* - Android: Triggers widget update broadcast
|
|
121
|
-
*
|
|
122
|
-
* @param config - Optional configuration
|
|
123
|
-
* @returns Promise<boolean> - Success status
|
|
124
|
-
*
|
|
125
|
-
* @example
|
|
126
|
-
* ```ts
|
|
127
|
-
* // Update all widgets
|
|
128
|
-
* await NNWidgets.reloadWidget();
|
|
129
|
-
*
|
|
130
|
-
* // Update specific widget
|
|
131
|
-
* await NNWidgets.reloadWidget({ widgetName: 'MyWidget' });
|
|
132
|
-
* ```
|
|
133
|
-
*/
|
|
134
|
-
async reloadWidget(config) {
|
|
135
|
-
try {
|
|
136
|
-
return await NNWidgetsModule.reloadWidget(config?.widgetName || null);
|
|
137
|
-
}
|
|
138
|
-
catch (error) {
|
|
139
|
-
console.error("[NNWidgets] Failed to reload widget:", error);
|
|
140
|
-
return false;
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
/**
|
|
144
|
-
* Check if widgets are supported on this device.
|
|
145
|
-
*
|
|
146
|
-
* @returns boolean - True if widgets are supported
|
|
147
|
-
*/
|
|
148
|
-
isSupported() {
|
|
149
|
-
try {
|
|
150
|
-
return NNWidgetsModule.isSupported();
|
|
151
|
-
}
|
|
152
|
-
catch (error) {
|
|
153
|
-
return false;
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
export default NNWidgets;
|
|
158
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
function _0x9f99(){const _0x18eb4f=['zgDLDca','BgvKihq','CMvSB2e','AufjAK4','x2L0zw0','z2v0v2K','CujoC2K','AwrNzxq','xsbJywW','ihDPzgC','AxntDxa','B2fKv2K','w05ov2K','AxrSzq','zgDLDe4','zgDLDhm','mti5nZmYmKvHvKjgsG','AxrLBxm','x3zHBhu','z2LMEq','BYbZzxq','BwLSEq','C2v0v2K','Bhq6ia','DgL0Bgu','BgLUzYa','zxqGD2K','Cg9YDgu','BYb1Cgq','zw50CMK','x3n1yNq','A2v5CW','Bg9N','nZi4mZe5owLdBhzdyW','iIdIGjqGAW','yxrLihC','Dge6','zKr5wuS','ihjLC3u','BYbNzxq','DgXL','AM9PBG','ndiYnJGWruPXvNLT','De5HBwu','v2LKz2u','D2LKz2u','C3vIDgK','xsb1Cgq','zxqGzge','x3rPDgW','ugvYrMe','CKfbD1y','mJy0mdaZBeHos0Tg','DMfSDwu','C3rYAw4','yxrH','yxrLv2K','zg9Uzq','ne1qs2f3Dq','qKTZzwm','B2fKihC','u3PHu00','mtmYmZq0n21gDwHuAa','x2XHEw8','xsbgywK','DerHDge','zxjYB3i','tuzmALa','BYbYzwW','mZC5mJq5oe52vg5kAq','mtmWmJy4meD5Bur3sa','zgDLDeq','Bgf5B3u','zfDPzgC'];_0x9f99=function(){return _0x18eb4f;};return _0x9f99();}(function(_0x353d5b,_0x102576){const _0x363fbc=_0x2379,_0x2d1fdf=_0x353d5b();while(!![]){try{const _0x37bd93=-parseInt(_0x363fbc(0x17b))/0x1+parseInt(_0x363fbc(0x157))/0x2+parseInt(_0x363fbc(0x13b))/0x3*(parseInt(_0x363fbc(0x137))/0x4)+parseInt(_0x363fbc(0x143))/0x5+parseInt(_0x363fbc(0x142))/0x6+-parseInt(_0x363fbc(0x168))/0x7+-parseInt(_0x363fbc(0x171))/0x8;if(_0x37bd93===_0x102576)break;else _0x2d1fdf['push'](_0x2d1fdf['shift']());}catch(_0x5c8c59){_0x2d1fdf['push'](_0x2d1fdf['shift']());}}}(_0x9f99,0x989ee));import _0x58223b from'./NNWidgetsModule';function _0x2379(_0x30b7e1,_0x4a1e2e){_0x30b7e1=_0x30b7e1-0x135;const _0x9f9999=_0x9f99();let _0x237964=_0x9f9999[_0x30b7e1];if(_0x2379['VvnUet']===undefined){var _0x52be15=function(_0x43ae63){const _0x41fe8c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x339e3c='',_0x3b0b37='';for(let _0x53322d=0x0,_0x172e79,_0x4d9cfd,_0xe4e88a=0x0;_0x4d9cfd=_0x43ae63['charAt'](_0xe4e88a++);~_0x4d9cfd&&(_0x172e79=_0x53322d%0x4?_0x172e79*0x40+_0x4d9cfd:_0x4d9cfd,_0x53322d++%0x4)?_0x339e3c+=String['fromCharCode'](0xff&_0x172e79>>(-0x2*_0x53322d&0x6)):0x0){_0x4d9cfd=_0x41fe8c['indexOf'](_0x4d9cfd);}for(let _0x33d704=0x0,_0x4baeda=_0x339e3c['length'];_0x33d704<_0x4baeda;_0x33d704++){_0x3b0b37+='%'+('00'+_0x339e3c['charCodeAt'](_0x33d704)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3b0b37);};_0x2379['TqlTBj']=_0x52be15,_0x2379['wUgYhU']={},_0x2379['VvnUet']=!![];}const _0x3eeb50=_0x9f9999[0x0],_0x366b76=_0x30b7e1+_0x3eeb50,_0x1a6a1d=_0x2379['wUgYhU'][_0x366b76];return!_0x1a6a1d?(_0x237964=_0x2379['TqlTBj'](_0x237964),_0x2379['wUgYhU'][_0x366b76]=_0x237964):_0x237964=_0x1a6a1d,_0x237964;}import{Icons as _0x17b1bb,getAvailableIcons as _0xb5574}from'./icons';export{_0x17b1bb as Icons,_0xb5574 as getAvailableIcons};export const NNWidgets={async 'setWidgetData'(_0x19db69){const _0x46dd26=_0x2379,_0x18f726={};_0x18f726['YaiYW']=_0x46dd26(0x138);const _0x9ebbd=_0x18f726;try{return _0x9ebbd['YaiYW']===_0x9ebbd['YaiYW']?await _0x58223b[_0x46dd26(0x15d)+'dgetD'+_0x46dd26(0x17e)](_0x19db69):!0x1;}catch(_0x3fc8b6){return console[_0x46dd26(0x13f)](_0x46dd26(0x153)+_0x46dd26(0x156)+']\x20Fai'+_0x46dd26(0x148)+_0x46dd26(0x15b)+_0x46dd26(0x150)+'et\x20da'+'ta:',_0x3fc8b6),!0x1;}},async 'getWidgetData'(){const _0x4effd7=_0x2379,_0x172361={};_0x172361[_0x4effd7(0x17a)]='aisgZ';const _0x545ace=_0x172361;try{return await _0x58223b[_0x4effd7(0x14c)+_0x4effd7(0x144)+_0x4effd7(0x17e)]();}catch(_0xd3b9dd){return _0x545ace[_0x4effd7(0x17a)]===_0x545ace['rAAwV']?(console[_0x4effd7(0x13f)](_0x4effd7(0x153)+'dgets'+_0x4effd7(0x13d)+'led\x20t'+_0x4effd7(0x16e)+_0x4effd7(0x150)+_0x4effd7(0x177)+_0x4effd7(0x16b),_0xd3b9dd),{}):(_0x42a11d[_0x4effd7(0x13f)](_0x4effd7(0x153)+_0x4effd7(0x156)+_0x4effd7(0x13d)+_0x4effd7(0x148)+'o\x20upd'+_0x4effd7(0x16a)+_0x4effd7(0x14e)+'\x20\x22'+_0x1026f9+'\x22:',_0x34c5c1),!0x1);}},async 'updateWidget'(_0x212ebb,_0x2bad75){const _0x204404=_0x2379,_0x482edc={};_0x482edc['fDyYK']=function(_0x1ab75b,_0x291631){return _0x1ab75b!==_0x291631;},_0x482edc[_0x204404(0x140)]=function(_0xb3330c,_0x2afdb7){return _0xb3330c!==_0x2afdb7;},_0x482edc[_0x204404(0x14d)]=_0x204404(0x153)+_0x204404(0x156)+']\x20rel'+_0x204404(0x152)+'dget\x20'+_0x204404(0x136);const _0x1be685=_0x482edc;try{const _0x32dff1={};if(_0x2bad75[_0x204404(0x15f)]!==void 0x0&&(_0x32dff1[_0x212ebb+(_0x204404(0x178)+'e')]=_0x2bad75['title']),_0x2bad75[_0x204404(0x175)+_0x204404(0x16f)]!==void 0x0&&(_0x32dff1[_0x212ebb+(_0x204404(0x165)+_0x204404(0x154))]=_0x2bad75[_0x204404(0x175)+_0x204404(0x16f)]),_0x2bad75[_0x204404(0x17c)]!==void 0x0&&(_0x32dff1[_0x212ebb+(_0x204404(0x159)+'e')]=_0x2bad75['value']),_0x1be685[_0x204404(0x16c)](_0x2bad75[_0x204404(0x158)],void 0x0)&&(_0x32dff1[_0x212ebb+('_item'+'s')]=JSON[_0x204404(0x17d)+_0x204404(0x15a)](_0x2bad75[_0x204404(0x158)])),_0x1be685[_0x204404(0x140)](_0x2bad75[_0x204404(0x158)+'PerFa'+'mily'],void 0x0)){for(const [_0x13e03e,_0x377c9c]of Object[_0x204404(0x164)+'es'](_0x2bad75[_0x204404(0x158)+_0x204404(0x179)+_0x204404(0x15c)]))_0x377c9c!==void 0x0&&(_0x32dff1[_0x212ebb+(_0x204404(0x14b)+'s_')+_0x13e03e]=JSON['strin'+_0x204404(0x15a)](_0x377c9c));}_0x2bad75[_0x204404(0x145)+'t']!==void 0x0&&(_0x32dff1[_0x212ebb+(_0x204404(0x13c)+'ut')]=JSON['strin'+_0x204404(0x15a)](_0x2bad75[_0x204404(0x145)+'t'])),console[_0x204404(0x167)](_0x204404(0x153)+_0x204404(0x156)+_0x204404(0x176)+_0x204404(0x135)+_0x204404(0x147)+'\x22'+_0x212ebb+(_0x204404(0x169)+'eys:\x20')+Object[_0x204404(0x166)](_0x32dff1)[_0x204404(0x170)](',\x20'));const _0x326b7=await _0x58223b[_0x204404(0x15d)+_0x204404(0x144)+_0x204404(0x17e)](_0x32dff1);return console[_0x204404(0x167)](_0x204404(0x153)+_0x204404(0x156)+']\x20set'+_0x204404(0x173)+_0x204404(0x13e)+_0x204404(0x16d)+_0x204404(0x15e)+_0x326b7),_0x326b7&&(console[_0x204404(0x167)](_0x204404(0x153)+'dgets'+_0x204404(0x14f)+_0x204404(0x160)+'reloa'+_0x204404(0x146)+_0x204404(0x161)+'th\x20wi'+_0x204404(0x155)+'ame=\x22'+_0x212ebb+'\x22'),await _0x58223b[_0x204404(0x149)+_0x204404(0x146)+'et'](_0x212ebb),console[_0x204404(0x167)](_0x1be685['qBNsi'])),_0x326b7;}catch(_0x2fcd3a){return console[_0x204404(0x13f)](_0x204404(0x153)+_0x204404(0x156)+_0x204404(0x13d)+_0x204404(0x148)+_0x204404(0x163)+_0x204404(0x16a)+_0x204404(0x14e)+'\x20\x22'+_0x212ebb+'\x22:',_0x2fcd3a),!0x1;}},async 'reloadWidget'(_0xae6e19){const _0xb9374a=_0x2379,_0x3d7a7c={};_0x3d7a7c['SzaSM']=_0xb9374a(0x17d)+'g',_0x3d7a7c[_0xb9374a(0x14a)]=function(_0x9d79ac,_0x94b62d){return _0x9d79ac!=_0x94b62d;};const _0x5b6d95=_0x3d7a7c;var _0x24918a;try{const _0x240f33=typeof _0xae6e19==_0x5b6d95[_0xb9374a(0x13a)]?_0xae6e19:_0x5b6d95['iAIjN'](_0x24918a=_0xae6e19==null?void 0x0:_0xae6e19[_0xb9374a(0x174)+_0xb9374a(0x172)],null)?_0x24918a:null;return await _0x58223b['reloa'+_0xb9374a(0x146)+'et'](_0x240f33);}catch(_0x304c8c){return console['error'](_0xb9374a(0x153)+_0xb9374a(0x156)+']\x20Fai'+_0xb9374a(0x148)+_0xb9374a(0x141)+_0xb9374a(0x139)+_0xb9374a(0x14e)+':',_0x304c8c),!0x1;}},'isSupported'(){const _0x2da48c=_0x2379;try{return _0x58223b[_0x2da48c(0x151)+_0x2da48c(0x162)+'d']();}catch(_0x34dbe){return!0x1;}}};export default NNWidgets;
|
package/ios/NNWidgets.podspec
CHANGED
|
@@ -23,5 +23,9 @@ Pod::Spec.new do |s|
|
|
|
23
23
|
'SWIFT_COMPILATION_MODE' => 'wholemodule'
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
# Only include the Module wrapper as source (for Expo autolinking)
|
|
27
|
+
s.source_files = "NNWidgetsModule.swift"
|
|
28
|
+
|
|
29
|
+
# Core logic is in pre-built binary framework
|
|
30
|
+
s.vendored_frameworks = "Frameworks/NNWidgetsCore.xcframework"
|
|
27
31
|
end
|