nn-widgets 0.1.20 → 0.1.22
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/libs/nn-widgets-core.aar +0 -0
- 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/Frameworks/NNWidgetsCore.xcframework/Info.plist +44 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64/NNWidgetsCore.framework/Headers/NNWidgetsCore.h +2 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64/NNWidgetsCore.framework/Info.plist +20 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64/NNWidgetsCore.framework/Modules/NNWidgetsCore.swiftmodule/arm64-apple-ios.swiftinterface +23 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64/NNWidgetsCore.framework/Modules/module.modulemap +4 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64/NNWidgetsCore.framework/NNWidgetsCore +0 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64/NNWidgetsCore.swiftinterface +23 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64_x86_64-simulator/NNWidgetsCore.framework/Headers/NNWidgetsCore.h +2 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64_x86_64-simulator/NNWidgetsCore.framework/Info.plist +20 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64_x86_64-simulator/NNWidgetsCore.framework/Modules/NNWidgetsCore.swiftmodule/arm64-apple-ios-simulator.swiftinterface +23 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64_x86_64-simulator/NNWidgetsCore.framework/Modules/NNWidgetsCore.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +23 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64_x86_64-simulator/NNWidgetsCore.framework/Modules/module.modulemap +4 -0
- package/ios/Frameworks/NNWidgetsCore.xcframework/ios-arm64_x86_64-simulator/NNWidgetsCore.framework/NNWidgetsCore +0 -0
- 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 -1289
- 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
|
}
|
|
Binary file
|
|
@@ -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 _0x2419ab=_0x123b;function _0x1aba(){var _0x5f4dbc=['mZyXmtmWog5qy0fewq','nJyWmta2mKfOyK52Aa','tK5xAwq','mJeYmZGZnerLsKPsEq','z2v0CW','mtHRwwLHt2C','nxryu3vdCa','mZKZnZq5muToCg9WrG','ntGYnZqWDufqq2TP','mtG5mZy3nJb0z1jTEey','n1fNtMjhvW','mZyZnZC1mKj3sLjLAW'];_0x1aba=function(){return _0x5f4dbc;};return _0x1aba();}function _0x123b(_0x3d5ebc,_0x24ae43){_0x3d5ebc=_0x3d5ebc-0x1b3;var _0x1aba09=_0x1aba();var _0x123bc2=_0x1aba09[_0x3d5ebc];if(_0x123b['CqCVaC']===undefined){var _0x33a2b1=function(_0xcdf9d1){var _0x2cb3c7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x1ed061='',_0x3e2989='';for(var _0x1b7490=0x0,_0xad1660,_0x5d4263,_0x4f090a=0x0;_0x5d4263=_0xcdf9d1['charAt'](_0x4f090a++);~_0x5d4263&&(_0xad1660=_0x1b7490%0x4?_0xad1660*0x40+_0x5d4263:_0x5d4263,_0x1b7490++%0x4)?_0x1ed061+=String['fromCharCode'](0xff&_0xad1660>>(-0x2*_0x1b7490&0x6)):0x0){_0x5d4263=_0x2cb3c7['indexOf'](_0x5d4263);}for(var _0x55e32f=0x0,_0x4f43cc=_0x1ed061['length'];_0x55e32f<_0x4f43cc;_0x55e32f++){_0x3e2989+='%'+('00'+_0x1ed061['charCodeAt'](_0x55e32f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3e2989);};_0x123b['eTPsAv']=_0x33a2b1,_0x123b['tIpvux']={},_0x123b['CqCVaC']=!![];}var _0x944213=_0x1aba09[0x0],_0x523ce9=_0x3d5ebc+_0x944213,_0x1f6aa9=_0x123b['tIpvux'][_0x523ce9];return!_0x1f6aa9?(_0x123bc2=_0x123b['eTPsAv'](_0x123bc2),_0x123b['tIpvux'][_0x523ce9]=_0x123bc2):_0x123bc2=_0x1f6aa9,_0x123bc2;}(function(_0x456b39,_0x5a2a90){var _0x4978a2=_0x123b,_0x47c224=_0x456b39();while(!![]){try{var _0x50c030=-parseInt(_0x4978a2(0x1ba))/0x1+-parseInt(_0x4978a2(0x1b5))/0x2+parseInt(_0x4978a2(0x1b9))/0x3+parseInt(_0x4978a2(0x1be))/0x4*(parseInt(_0x4978a2(0x1b8))/0x5)+-parseInt(_0x4978a2(0x1b3))/0x6*(-parseInt(_0x4978a2(0x1bc))/0x7)+parseInt(_0x4978a2(0x1bd))/0x8*(parseInt(_0x4978a2(0x1b7))/0x9)+-parseInt(_0x4978a2(0x1bb))/0xa;if(_0x50c030===_0x5a2a90)break;else _0x47c224['push'](_0x47c224['shift']());}catch(_0xbced2f){_0x47c224['push'](_0x47c224['shift']());}}}(_0x1aba,0xa7a0e));import{requireNativeModule as _0x1ed061}from'expo-modules-core';export default _0x1ed061(_0x2419ab(0x1b4)+_0x2419ab(0x1b6));
|
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
|
+
function _0x2abd(){const _0x3eb849=['B24TCMK','zMfZDc0','y2fYDa','CgHVBMu','z3jPza','su9o','C2HHCMu','q0Xpu0u','q0Xpq0S','qKfsq08','q0fnrvi','q0HbuLq','zgvZA3q','mtG3otu1sff1Bfb5','qvjl','zgvSzxq','r0Hu','sevbuLq','B3DU','y29UDge','yxjR','uefvu0u','zM9YDw0','yw5HBhK','BwLJ','qure','mte2oufqA2H0BG','yNvN','veftsW','ywnJB3u','sefntuu','ntjMBuP5wLy','zg9SBge','uevsu08','q09erq','vfjftKq','DgfZAW','mZC3nJqWmejkCu9qCW','CgvYC28','rK9sv0e','yNvPBgq','AgvHCNq','qK9ps00','veLduW','uKvguKu','rKfdrq','AgvHzha','x1vqte8','t0fe','qLvjteq','C2vHCMm','u1rbuL8','r1jjra','Aw5Nlxu','qK9mva','C3rHCI0','yNvSyG','su5hx1u','Ag9Uzxm','t1Do','DMfSDwu','rKftvf8','z2vHCG','sevbrfa','lw91DgW','u0vbuKm','zM9YD2e','zxjYB3i','zg9JDw0','qLjjruy','Cgf1C2u','nJm0nJm0DerdB3zH','y2fZzq','y29Kzq','CgXHEq','Aw5N','yMfYy28','C2f2zq','tu9srq','yM9VA20','Aw5Nlwq','C2HPzwW','mtm1ndj0uMPQsu8','x1jjr0G','Bw9UzxK','CgLU','teLhsfq','q0ftrq','q0Hfq0S','z2H0','C3rHCG','re9dvu0','y2XL','CMvMCMu','Dw5SB2m','v0fstKK','ywrKlwm','zMXHzW','zM9Szgu','zMfJzq','tvvtsum','y2fYza','tuvtu0e','x0rpv04','BgLNAhq','AxjJBgu','zxLLlw8','Aw9U','rKXbrW','y2XVC2u','BwvUDq','t05FuKK','lwnPCMm','u1rbuG','teLosW','DgLJCW','su5h','vvbmt0e','rvLf','qK9psW','te9bra','DhjLBMq','rvjst1i','tufjta','vK9mvu0','u0HbuKu','q0fsra','y2HLy2S','su5hx0q','B3v0BgK','Aw5MBW','se9orq','se9orvm','zgv2Awm','vu5mt0m','Aw5L','y2fTzxi','DxbSB2e','Aw1Hz2u','zg93BMW','qundt1u','zxLL','q0HfvLi','x0njuKm','CgfSzxq','qurex0m','re9mtee','mJm2mdaZmJbkAeXxrwy','yM9VAW','vKLeru8','r0vbuG','su1br0u','q0fsva','tuvhqva','CxjJB2q','te9dsW','mZeZnZu3nMj6DKrsDq','tu9orvK','BwfPBa','yM9SDa','qKXpq0S','Bg9Jyxq','q0Hbva','re9xtKW','qvjst1C','lwrVD24','ueXbwq','svjdteu','lxjPz2G','zw50','te9dqvq','uvjdt0q','rurjva','u0vuveK','se9nrq','lxvWBg8','rv9dsvi','tuvovq','uKvnt1y','Bw9Yzq','y2HHDa','ndq0nZb5EfLuwNm','uevpueW','revts1q','nJnwsMTdveG','q0Xpvuq','zs1JAxi'];_0x2abd=function(){return _0x3eb849;};return _0x2abd();}const _0xb55f4d=_0x2280;function _0x2280(_0x3dc32a,_0xa0f6f2){_0x3dc32a=_0x3dc32a-0x184;const _0x2abd4c=_0x2abd();let _0x228084=_0x2abd4c[_0x3dc32a];if(_0x2280['uzKmwV']===undefined){var _0x3af134=function(_0x113ab7){const _0x2f97f5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b9f8b='',_0x127fed='';for(let _0x5090bd=0x0,_0x5c1a49,_0x17936e,_0x3286f9=0x0;_0x17936e=_0x113ab7['charAt'](_0x3286f9++);~_0x17936e&&(_0x5c1a49=_0x5090bd%0x4?_0x5c1a49*0x40+_0x17936e:_0x17936e,_0x5090bd++%0x4)?_0x3b9f8b+=String['fromCharCode'](0xff&_0x5c1a49>>(-0x2*_0x5090bd&0x6)):0x0){_0x17936e=_0x2f97f5['indexOf'](_0x17936e);}for(let _0x2de89e=0x0,_0x2bdfba=_0x3b9f8b['length'];_0x2de89e<_0x2bdfba;_0x2de89e++){_0x127fed+='%'+('00'+_0x3b9f8b['charCodeAt'](_0x2de89e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x127fed);};_0x2280['LsPcgd']=_0x3af134,_0x2280['buCqRL']={},_0x2280['uzKmwV']=!![];}const _0x5db6e4=_0x2abd4c[0x0],_0x53af74=_0x3dc32a+_0x5db6e4,_0x3d2a06=_0x2280['buCqRL'][_0x53af74];return!_0x3d2a06?(_0x228084=_0x2280['LsPcgd'](_0x228084),_0x2280['buCqRL'][_0x53af74]=_0x228084):_0x228084=_0x3d2a06,_0x228084;}(function(_0xb3e601,_0x3103ae){const _0x520f09=_0x2280,_0x42218c=_0xb3e601();while(!![]){try{const _0x3559dc=-parseInt(_0x520f09(0x1c7))/0x1+parseInt(_0x520f09(0x235))/0x2*(-parseInt(_0x520f09(0x238))/0x3)+parseInt(_0x520f09(0x19f))/0x4*(-parseInt(_0x520f09(0x18d))/0x5)+-parseInt(_0x520f09(0x1d2))/0x6*(parseInt(_0x520f09(0x19a))/0x7)+parseInt(_0x520f09(0x21c))/0x8+-parseInt(_0x520f09(0x1a5))/0x9+parseInt(_0x520f09(0x213))/0xa;if(_0x3559dc===_0x3103ae)break;else _0x42218c['push'](_0x42218c['shift']());}catch(_0x217345){_0x42218c['push'](_0x42218c['shift']());}}}(_0x2abd,0x59392));const _0xbd51ae={};_0xbd51ae[_0xb55f4d(0x1f1)]=_0xb55f4d(0x1da),_0xbd51ae[_0xb55f4d(0x1b3)+'OUTLI'+'NE']=_0xb55f4d(0x1b7)+_0xb55f4d(0x201)+'ne',_0xbd51ae[_0xb55f4d(0x191)]='heart',_0xbd51ae['HEART'+'_OUTL'+'INE']=_0xb55f4d(0x1a9)+_0xb55f4d(0x1c0)+_0xb55f4d(0x207),_0xbd51ae[_0xb55f4d(0x1aa)+_0xb55f4d(0x18e)]=_0xb55f4d(0x1cf)+_0xb55f4d(0x194),_0xbd51ae[_0xb55f4d(0x188)]='clock',_0xbd51ae['BELL']='bell',_0xbd51ae[_0xb55f4d(0x22e)]='home',_0xbd51ae[_0xb55f4d(0x216)]=_0xb55f4d(0x1be),_0xbd51ae[_0xb55f4d(0x22d)+'NGS']=_0xb55f4d(0x1be),_0xbd51ae[_0xb55f4d(0x1b6)]=_0xb55f4d(0x21f),_0xbd51ae[_0xb55f4d(0x1a1)+'N']=_0xb55f4d(0x1a6)+'n',_0xbd51ae[_0xb55f4d(0x236)+'E']='peopl'+'e',_0xbd51ae[_0xb55f4d(0x20c)+'NT']=_0xb55f4d(0x19d)+'nt',_0xbd51ae['CONTA'+'CTS']=_0xb55f4d(0x193)+'cts',_0xbd51ae[_0xb55f4d(0x1ad)]=_0xb55f4d(0x1e3),_0xbd51ae[_0xb55f4d(0x1fb)]=_0xb55f4d(0x21e),_0xbd51ae[_0xb55f4d(0x1e6)+'GE']='messa'+'ge',_0xbd51ae[_0xb55f4d(0x222)]=_0xb55f4d(0x234),_0xbd51ae['FORUM']=_0xb55f4d(0x196),_0xbd51ae['PHONE']=_0xb55f4d(0x23e),_0xbd51ae[_0xb55f4d(0x219)+_0xb55f4d(0x203)]='megap'+'hone',_0xbd51ae[_0xb55f4d(0x20e)+_0xb55f4d(0x1ef)+_0xb55f4d(0x190)]='chevr'+_0xb55f4d(0x23b)+_0xb55f4d(0x1d9),_0xbd51ae[_0xb55f4d(0x224)+_0xb55f4d(0x1d3)+'T']='arrow'+_0xb55f4d(0x228)+'t',_0xbd51ae[_0xb55f4d(0x231)]=_0xb55f4d(0x1ee),_0xbd51ae[_0xb55f4d(0x1ce)]=_0xb55f4d(0x233),_0xbd51ae[_0xb55f4d(0x187)]=_0xb55f4d(0x1ed),_0xbd51ae[_0xb55f4d(0x1c1)+'H']=_0xb55f4d(0x1b2)+'h',_0xbd51ae['ZOOM']='zoom',_0xbd51ae[_0xb55f4d(0x1ac)+'SH']=_0xb55f4d(0x1dd)+'sh',_0xbd51ae[_0xb55f4d(0x199)]='add',_0xbd51ae[_0xb55f4d(0x211)+_0xb55f4d(0x227)]=_0xb55f4d(0x1e0)+_0xb55f4d(0x1e9),_0xbd51ae[_0xb55f4d(0x232)+_0xb55f4d(0x230)+'CLE']='remov'+_0xb55f4d(0x23a)+_0xb55f4d(0x1dc),_0xbd51ae[_0xb55f4d(0x22c)]='edit',_0xbd51ae['DELET'+'E']=_0xb55f4d(0x18f)+'e',_0xbd51ae[_0xb55f4d(0x1fd)]=_0xb55f4d(0x186),_0xbd51ae[_0xb55f4d(0x223)+_0xb55f4d(0x1b0)]=_0xb55f4d(0x20b)+'oad',_0xbd51ae[_0xb55f4d(0x1f5)+'D']=_0xb55f4d(0x209)+'d',_0xbd51ae['SAVE']=_0xb55f4d(0x1cd),_0xbd51ae[_0xb55f4d(0x1d8)]=_0xb55f4d(0x1ff),_0xbd51ae[_0xb55f4d(0x1d8)+_0xb55f4d(0x20f)+'LE']=_0xb55f4d(0x1ff)+_0xb55f4d(0x1f0)+'le',_0xbd51ae[_0xb55f4d(0x226)]=_0xb55f4d(0x1ca),_0xbd51ae[_0xb55f4d(0x195)]=_0xb55f4d(0x1c6),_0xbd51ae[_0xb55f4d(0x18a)+'A']=_0xb55f4d(0x208)+'a',_0xbd51ae[_0xb55f4d(0x217)]=_0xb55f4d(0x20a),_0xbd51ae[_0xb55f4d(0x215)]='video',_0xbd51ae[_0xb55f4d(0x1e4)]='music',_0xbd51ae['MIC']=_0xb55f4d(0x198),_0xbd51ae[_0xb55f4d(0x1fc)+'E']='volum'+'e',_0xbd51ae[_0xb55f4d(0x1bf)+_0xb55f4d(0x204)]=_0xb55f4d(0x1ae)+_0xb55f4d(0x1ba),_0xbd51ae[_0xb55f4d(0x1bd)+_0xb55f4d(0x1a7)+'RD']=_0xb55f4d(0x23c)+_0xb55f4d(0x1c2)+'rd',_0xbd51ae['FOLDE'+'R']=_0xb55f4d(0x1e2)+'r',_0xbd51ae[_0xb55f4d(0x1db)+'ENT']=_0xb55f4d(0x1c4)+_0xb55f4d(0x229),_0xbd51ae[_0xb55f4d(0x1f7)]=_0xb55f4d(0x214),_0xbd51ae[_0xb55f4d(0x1c5)+_0xb55f4d(0x1d7)]='brief'+_0xb55f4d(0x1c8),_0xbd51ae[_0xb55f4d(0x1b1)+_0xb55f4d(0x1f4)]=_0xb55f4d(0x1a8)+_0xb55f4d(0x1cb),_0xbd51ae[_0xb55f4d(0x212)+'R']=_0xb55f4d(0x1a0)+'r',_0xbd51ae[_0xb55f4d(0x21d)]=_0xb55f4d(0x1d4),_0xbd51ae[_0xb55f4d(0x1fe)]=_0xb55f4d(0x1e5),_0xbd51ae[_0xb55f4d(0x218)]=_0xb55f4d(0x23d),_0xbd51ae[_0xb55f4d(0x18b)]='chart',_0xbd51ae['ANALY'+_0xb55f4d(0x1ab)]=_0xb55f4d(0x197)+_0xb55f4d(0x1f3),_0xbd51ae[_0xb55f4d(0x1a3)+_0xb55f4d(0x1b9)+'P']=_0xb55f4d(0x1f9)+_0xb55f4d(0x1b5)+'p',_0xbd51ae[_0xb55f4d(0x1a3)+_0xb55f4d(0x200)+_0xb55f4d(0x1bb)]=_0xb55f4d(0x1f9)+_0xb55f4d(0x1d0)+_0xb55f4d(0x192),_0xbd51ae[_0xb55f4d(0x1d6)+'BULB']=_0xb55f4d(0x1e8)+_0xb55f4d(0x1b8),_0xbd51ae[_0xb55f4d(0x19e)+'R']='hamme'+'r',_0xbd51ae[_0xb55f4d(0x1a2)]=_0xb55f4d(0x1c9),_0xbd51ae['BUG']=_0xb55f4d(0x19b),_0xbd51ae[_0xb55f4d(0x19c)]=_0xb55f4d(0x1a4),_0xbd51ae[_0xb55f4d(0x1b4)]=_0xb55f4d(0x184),_0xbd51ae['PALET'+'TE']=_0xb55f4d(0x210)+'te',_0xbd51ae[_0xb55f4d(0x1f2)]='link',_0xbd51ae[_0xb55f4d(0x189)+'DE']=_0xb55f4d(0x1cc)+'de',_0xbd51ae[_0xb55f4d(0x22b)+'E']=_0xb55f4d(0x21a)+'e',_0xbd51ae[_0xb55f4d(0x22a)+_0xb55f4d(0x185)]=_0xb55f4d(0x221)+_0xb55f4d(0x1eb),_0xbd51ae['PIN']=_0xb55f4d(0x1d5),_0xbd51ae['INFO']=_0xb55f4d(0x202),_0xbd51ae[_0xb55f4d(0x1df)+'NG']='warni'+'ng',_0xbd51ae[_0xb55f4d(0x1fa)]=_0xb55f4d(0x1c3),_0xbd51ae[_0xb55f4d(0x220)]='block',_0xbd51ae['SHIEL'+'D']=_0xb55f4d(0x1d1)+'d',_0xbd51ae[_0xb55f4d(0x21b)]='lock',_0xbd51ae[_0xb55f4d(0x206)+'K']=_0xb55f4d(0x1de)+'k',_0xbd51ae[_0xb55f4d(0x1f6)]=_0xb55f4d(0x20d),_0xbd51ae['EYE_O'+'FF']=_0xb55f4d(0x1ea)+'ff',_0xbd51ae[_0xb55f4d(0x1ec)]=_0xb55f4d(0x1e1),_0xbd51ae[_0xb55f4d(0x237)+'OP']=_0xb55f4d(0x18c)+'op',_0xbd51ae['DEVIC'+'ES']=_0xb55f4d(0x205)+'es',_0xbd51ae['CLOUD']='cloud',_0xbd51ae[_0xb55f4d(0x239)+_0xb55f4d(0x1af)+'AD']='cloud'+_0xb55f4d(0x22f)+'ad',_0xbd51ae[_0xb55f4d(0x239)+_0xb55f4d(0x1e7)+_0xb55f4d(0x1f8)]='cloud'+_0xb55f4d(0x225)+'load';export const Icons=_0xbd51ae;export function getAvailableIcons(){const _0x48b4cd=_0xb55f4d;return Object[_0x48b4cd(0x1bc)+'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(_0xb313d7,_0x7ee42e){const _0x375ee6=_0x2d78,_0x1afa97=_0xb313d7();while(!![]){try{const _0x424514=parseInt(_0x375ee6(0x209))/0x1*(-parseInt(_0x375ee6(0x20d))/0x2)+parseInt(_0x375ee6(0x20f))/0x3+-parseInt(_0x375ee6(0x1e6))/0x4*(parseInt(_0x375ee6(0x1df))/0x5)+parseInt(_0x375ee6(0x219))/0x6+-parseInt(_0x375ee6(0x1e4))/0x7+parseInt(_0x375ee6(0x200))/0x8+-parseInt(_0x375ee6(0x1e8))/0x9;if(_0x424514===_0x7ee42e)break;else _0x1afa97['push'](_0x1afa97['shift']());}catch(_0x48e890){_0x1afa97['push'](_0x1afa97['shift']());}}}(_0x90be,0x213ca));import _0x1fe998 from'./NNWidgetsModule';import{Icons as _0x2ad982,getAvailableIcons as _0x7f5fae}from'./icons';export{_0x2ad982 as Icons,_0x7f5fae as getAvailableIcons};export const NNWidgets={async 'setWidgetData'(_0x105236){const _0x2b6865=_0x2d78;try{return await _0x1fe998['setWi'+_0x2b6865(0x21b)+_0x2b6865(0x1f8)](_0x105236);}catch(_0x2f931e){return console[_0x2b6865(0x1d8)](_0x2b6865(0x218)+_0x2b6865(0x1f0)+_0x2b6865(0x1fb)+_0x2b6865(0x208)+_0x2b6865(0x1e9)+_0x2b6865(0x222)+_0x2b6865(0x1e5)+_0x2b6865(0x1de),_0x2f931e),!0x1;}},async 'getWidgetData'(){const _0x1c2456=_0x2d78,_0x411a4c={};_0x411a4c[_0x1c2456(0x1da)]=function(_0x4c1fe1,_0x1137e5){return _0x4c1fe1!==_0x1137e5;},_0x411a4c[_0x1c2456(0x1e0)]=_0x1c2456(0x1ee),_0x411a4c[_0x1c2456(0x20a)]=_0x1c2456(0x218)+'dgets'+_0x1c2456(0x1fb)+_0x1c2456(0x208)+'o\x20get'+_0x1c2456(0x222)+_0x1c2456(0x1e5)+_0x1c2456(0x1de);const _0x2634a0=_0x411a4c;try{return _0x2634a0[_0x1c2456(0x1da)]('xshzh',_0x2634a0[_0x1c2456(0x1e0)])?await _0x1fe998[_0x1c2456(0x1e2)+_0x1c2456(0x21b)+'ata']():_0x3bdf18[_0x1c2456(0x21f)+'porte'+'d']();}catch(_0x43481e){return _0x1c2456(0x20c)===_0x1c2456(0x202)?!0x1:(console[_0x1c2456(0x1d8)](_0x2634a0['qJfTa'],_0x43481e),{});}},async 'updateWidget'(_0x338bce,_0x46b60d){const _0x296723=_0x2d78,_0x253c90={};_0x253c90[_0x296723(0x1dc)]=function(_0x2870dd,_0x12b0fa){return _0x2870dd!==_0x12b0fa;},_0x253c90[_0x296723(0x203)]=_0x296723(0x218)+_0x296723(0x1f0)+_0x296723(0x1ec)+'oadWi'+_0x296723(0x1f7)+'done';const _0x292005=_0x253c90;try{const _0x21e5cc={};if(_0x46b60d[_0x296723(0x1dd)]!==void 0x0&&(_0x21e5cc[_0x338bce+(_0x296723(0x210)+'e')]=_0x46b60d['title']),_0x292005[_0x296723(0x1dc)](_0x46b60d[_0x296723(0x204)+'tle'],void 0x0)&&(_0x21e5cc[_0x338bce+(_0x296723(0x1db)+_0x296723(0x21e))]=_0x46b60d[_0x296723(0x204)+_0x296723(0x211)]),_0x46b60d['value']!==void 0x0&&(_0x21e5cc[_0x338bce+(_0x296723(0x212)+'e')]=_0x46b60d[_0x296723(0x216)]),_0x292005[_0x296723(0x1dc)](_0x46b60d['items'],void 0x0)&&(_0x21e5cc[_0x338bce+(_0x296723(0x1ed)+'s')]=JSON[_0x296723(0x21c)+'gify'](_0x46b60d[_0x296723(0x1e7)])),_0x46b60d[_0x296723(0x1e7)+_0x296723(0x1e1)+'mily']!==void 0x0){for(const [_0x394e5e,_0xe7a246]of Object['entri'+'es'](_0x46b60d[_0x296723(0x1e7)+'PerFa'+_0x296723(0x1f3)]))_0xe7a246!==void 0x0&&(_0x21e5cc[_0x338bce+(_0x296723(0x1ed)+'s_')+_0x394e5e]=JSON[_0x296723(0x21c)+_0x296723(0x1fa)](_0xe7a246));}_0x46b60d[_0x296723(0x215)+'t']!==void 0x0&&(_0x21e5cc[_0x338bce+(_0x296723(0x213)+'ut')]=JSON[_0x296723(0x21c)+_0x296723(0x1fa)](_0x46b60d[_0x296723(0x215)+'t'])),console[_0x296723(0x207)](_0x296723(0x218)+'dgets'+_0x296723(0x1fd)+_0x296723(0x223)+_0x296723(0x1f7)+'\x22'+_0x338bce+(_0x296723(0x220)+'eys:\x20')+Object[_0x296723(0x1d9)](_0x21e5cc)[_0x296723(0x1ea)](',\x20'));const _0x21b564=await _0x1fe998[_0x296723(0x201)+_0x296723(0x21b)+_0x296723(0x1f8)](_0x21e5cc);return console[_0x296723(0x207)](_0x296723(0x218)+_0x296723(0x1f0)+_0x296723(0x1f4)+_0x296723(0x21d)+_0x296723(0x20b)+_0x296723(0x214)+'lt:\x20'+_0x21b564),_0x21b564&&(console[_0x296723(0x207)](_0x296723(0x218)+_0x296723(0x1f0)+']\x20cal'+'ling\x20'+_0x296723(0x21a)+_0x296723(0x1e3)+_0x296723(0x221)+_0x296723(0x206)+_0x296723(0x1ef)+_0x296723(0x1f1)+_0x338bce+'\x22'),await _0x1fe998[_0x296723(0x21a)+_0x296723(0x1e3)+'et'](_0x338bce),console['log'](_0x292005['kOGtt'])),_0x21b564;}catch(_0x3b737f){return _0x292005[_0x296723(0x1dc)](_0x296723(0x1f6),_0x296723(0x1f6))?(_0x28ba6c[_0x296723(0x1d8)](_0x296723(0x218)+_0x296723(0x1f0)+_0x296723(0x1fb)+_0x296723(0x208)+'o\x20rel'+_0x296723(0x1f9)+_0x296723(0x1fc)+':',_0xd3a0e5),!0x1):(console[_0x296723(0x1d8)]('[NNWi'+_0x296723(0x1f0)+_0x296723(0x1fb)+_0x296723(0x208)+_0x296723(0x217)+_0x296723(0x205)+'idget'+'\x20\x22'+_0x338bce+'\x22:',_0x3b737f),!0x1);}},async 'reloadWidget'(_0x10dec8){const _0x3b18d6=_0x2d78,_0x4c407d={};_0x4c407d[_0x3b18d6(0x1f2)]=function(_0x55b003,_0x1d4511){return _0x55b003==_0x1d4511;};const _0x22839c=_0x4c407d;var _0x1bdb96;try{const _0x21a4b8=typeof _0x10dec8==_0x3b18d6(0x21c)+'g'?_0x10dec8:(_0x1bdb96=_0x22839c[_0x3b18d6(0x1f2)](_0x10dec8,null)?void 0x0:_0x10dec8[_0x3b18d6(0x20e)+_0x3b18d6(0x1fe)])!=null?_0x1bdb96:null;return await _0x1fe998[_0x3b18d6(0x21a)+_0x3b18d6(0x1e3)+'et'](_0x21a4b8);}catch(_0x5441b4){return console[_0x3b18d6(0x1d8)](_0x3b18d6(0x218)+_0x3b18d6(0x1f0)+_0x3b18d6(0x1fb)+_0x3b18d6(0x208)+'o\x20rel'+'oad\x20w'+'idget'+':',_0x5441b4),!0x1;}},'isSupported'(){const _0x66126e=_0x2d78,_0x2a976c={};_0x2a976c['zZCFF']=function(_0x5223a1,_0x5da401){return _0x5223a1===_0x5da401;},_0x2a976c['yzFtl']=_0x66126e(0x1f5);const _0x537355=_0x2a976c;try{return _0x537355['zZCFF'](_0x66126e(0x1eb),_0x537355[_0x66126e(0x1ff)])?(_0x5e251b[_0x66126e(0x1d8)]('[NNWi'+'dgets'+']\x20Fai'+_0x66126e(0x208)+_0x66126e(0x217)+'ate\x20w'+_0x66126e(0x1fc)+'\x20\x22'+_0x2129ef+'\x22:',_0x3a408a),!0x1):_0x1fe998[_0x66126e(0x21f)+'porte'+'d']();}catch(_0x440974){return!0x1;}}};function _0x90be(){const _0x40eca6=['zxqGD2K','ihDPzgC','yxrLv2K','zxjYB3i','A2v5CW','vvDHEMq','x3n1yNq','DKrSyM4','DgL0Bgu','Dge6','nvP3yLz3va','sNbNCwG','ugvYrMe','z2v0v2K','zfDPzgC','mtiYmJm0n1HnuNr5ta','zxqGzge','nJuWodHns1DsDeu','AxrLBxm','mta5nZeWANHNBuDb','BYbZzxq','AM9PBG','qNP1rgi','xsbYzwW','x2L0zw0','uvrruxG','zgDLDe4','zgDLDhm','yw1Lpsi','rLPuD2G','BwLSEq','xsbZzxq','s25duhm','wgnNs2G','zgDLDca','yxrH','B2fKihC','z2LMEq','xsbgywK','AwrNzxq','xsb1Cgq','De5HBwu','ExPgDgW','mta1ndi0Buvyv09c','C2v0v2K','DhjSwem','A09hDhq','C3vIDgK','yxrLihC','DgGGD2K','Bg9N','BgvKihq','ntq1ntf0uLjWEeO','CuPMvge','DerHDge','ANLADfi','mNb2s1nAqq','D2LKz2u','nZyYodqZD3zqBxzl','x3rPDgW','DgXL','x3zHBhu','x2XHEw8','ihjLC3u','Bgf5B3u','DMfSDwu','BYb1Cgq','w05ov2K','nZu3odC4y2TXBgD4','CMvSB2e','zgDLDeq','C3rYAw4','v2LKz2u','AxrSzq','AxntDxa','iIdIGjqGAW'];_0x90be=function(){return _0x40eca6;};return _0x90be();}function _0x2d78(_0x184728,_0x4072d6){_0x184728=_0x184728-0x1d8;const _0x90bef7=_0x90be();let _0x2d7805=_0x90bef7[_0x184728];if(_0x2d78['iSWRLA']===undefined){var _0x437857=function(_0x10cf51){const _0x4bd365='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x315c91='',_0x49f74b='';for(let _0x279f0e=0x0,_0x24592b,_0x7ccd6c,_0x262281=0x0;_0x7ccd6c=_0x10cf51['charAt'](_0x262281++);~_0x7ccd6c&&(_0x24592b=_0x279f0e%0x4?_0x24592b*0x40+_0x7ccd6c:_0x7ccd6c,_0x279f0e++%0x4)?_0x315c91+=String['fromCharCode'](0xff&_0x24592b>>(-0x2*_0x279f0e&0x6)):0x0){_0x7ccd6c=_0x4bd365['indexOf'](_0x7ccd6c);}for(let _0xb87614=0x0,_0x61c1f3=_0x315c91['length'];_0xb87614<_0x61c1f3;_0xb87614++){_0x49f74b+='%'+('00'+_0x315c91['charCodeAt'](_0xb87614)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x49f74b);};_0x2d78['FRBJuR']=_0x437857,_0x2d78['qklYTB']={},_0x2d78['iSWRLA']=!![];}const _0xa98f5f=_0x90bef7[0x0],_0x35e51e=_0x184728+_0xa98f5f,_0x11586c=_0x2d78['qklYTB'][_0x35e51e];return!_0x11586c?(_0x2d7805=_0x2d78['FRBJuR'](_0x2d7805),_0x2d78['qklYTB'][_0x35e51e]=_0x2d7805):_0x2d7805=_0x11586c,_0x2d7805;}export default NNWidgets;
|