nn-widgets 0.1.18 → 0.1.19
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/.transforms/c5ed6666749162ed9ddcb4d93b73d4f8/results.bin +1 -0
- package/android/build/.transforms/c5ed6666749162ed9ddcb4d93b73d4f8/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/ec68a81b79c89c82d105758048ccde1e/results.bin +1 -0
- 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 +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- 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 +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- 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 +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- 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 +1 -0
- 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 +2 -0
- 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 +16 -0
- 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/android/src/main/java/expo/modules/nnwidgets/NNWidgetsModule.kt +43 -13
- package/assets/android/drawable/nn_icon_account.xml +10 -0
- package/assets/android/drawable/nn_icon_add.xml +10 -0
- package/assets/android/drawable/nn_icon_add_circle.xml +10 -0
- package/assets/android/drawable/nn_icon_analytics.xml +10 -0
- package/assets/android/drawable/nn_icon_arrow_right.xml +10 -0
- package/assets/android/drawable/nn_icon_barcode.xml +10 -0
- package/assets/android/drawable/nn_icon_bell.xml +10 -0
- package/assets/android/drawable/nn_icon_block.xml +10 -0
- package/assets/android/drawable/nn_icon_bolt.xml +10 -0
- package/assets/android/drawable/nn_icon_book.xml +10 -0
- package/assets/android/drawable/nn_icon_bookmark.xml +10 -0
- package/assets/android/drawable/nn_icon_briefcase.xml +10 -0
- package/assets/android/drawable/nn_icon_bug.xml +10 -0
- package/assets/android/drawable/nn_icon_building.xml +10 -0
- package/assets/android/drawable/nn_icon_camera.xml +13 -0
- package/assets/android/drawable/nn_icon_card.xml +10 -0
- package/assets/android/drawable/nn_icon_cart.xml +10 -0
- package/assets/android/drawable/nn_icon_chart.xml +10 -0
- package/assets/android/drawable/nn_icon_chat.xml +10 -0
- package/assets/android/drawable/nn_icon_check.xml +10 -0
- package/assets/android/drawable/nn_icon_check_circle.xml +10 -0
- package/assets/android/drawable/nn_icon_chevron_right.xml +10 -0
- package/assets/android/drawable/nn_icon_clock.xml +10 -0
- package/assets/android/drawable/nn_icon_close.xml +10 -0
- package/assets/android/drawable/nn_icon_cloud.xml +10 -0
- package/assets/android/drawable/nn_icon_cloud_download.xml +10 -0
- package/assets/android/drawable/nn_icon_cloud_upload.xml +10 -0
- package/assets/android/drawable/nn_icon_code.xml +10 -0
- package/assets/android/drawable/nn_icon_contacts.xml +10 -0
- package/assets/android/drawable/nn_icon_delete.xml +10 -0
- package/assets/android/drawable/nn_icon_desktop.xml +10 -0
- package/assets/android/drawable/nn_icon_devices.xml +10 -0
- package/assets/android/drawable/nn_icon_document.xml +10 -0
- package/assets/android/drawable/nn_icon_dollar.xml +10 -0
- package/assets/android/drawable/nn_icon_download.xml +10 -0
- package/assets/android/drawable/nn_icon_edit.xml +10 -0
- package/assets/android/drawable/nn_icon_error.xml +10 -0
- package/assets/android/drawable/nn_icon_eye.xml +10 -0
- package/assets/android/drawable/nn_icon_eye_off.xml +10 -0
- package/assets/android/drawable/nn_icon_face.xml +10 -0
- package/assets/android/drawable/nn_icon_fast_forward.xml +10 -0
- package/assets/android/drawable/nn_icon_flag.xml +10 -0
- package/assets/android/drawable/nn_icon_folder.xml +10 -0
- package/assets/android/drawable/nn_icon_forum.xml +10 -0
- package/assets/android/drawable/nn_icon_gear.xml +10 -0
- package/assets/android/drawable/nn_icon_grid.xml +10 -0
- package/assets/android/drawable/nn_icon_hammer.xml +10 -0
- package/assets/android/drawable/nn_icon_headphones.xml +10 -0
- package/assets/android/drawable/nn_icon_heart.xml +10 -0
- package/assets/android/drawable/nn_icon_heart_outline.xml +10 -0
- package/assets/android/drawable/nn_icon_home.xml +10 -0
- package/assets/android/drawable/nn_icon_image.xml +10 -0
- package/assets/android/drawable/nn_icon_info.xml +10 -0
- package/assets/android/drawable/nn_icon_lightbulb.xml +10 -0
- package/assets/android/drawable/nn_icon_link.xml +10 -0
- package/assets/android/drawable/nn_icon_location.xml +10 -0
- package/assets/android/drawable/nn_icon_lock.xml +10 -0
- package/assets/android/drawable/nn_icon_mail.xml +10 -0
- package/assets/android/drawable/nn_icon_megaphone.xml +10 -0
- package/assets/android/drawable/nn_icon_menu.xml +10 -0
- package/assets/android/drawable/nn_icon_message.xml +10 -0
- package/assets/android/drawable/nn_icon_mic.xml +10 -0
- package/assets/android/drawable/nn_icon_money.xml +10 -0
- package/assets/android/drawable/nn_icon_more.xml +10 -0
- package/assets/android/drawable/nn_icon_music.xml +10 -0
- package/assets/android/drawable/nn_icon_palette.xml +10 -0
- package/assets/android/drawable/nn_icon_pause.xml +10 -0
- package/assets/android/drawable/nn_icon_people.xml +10 -0
- package/assets/android/drawable/nn_icon_person.xml +10 -0
- package/assets/android/drawable/nn_icon_phone.xml +10 -0
- package/assets/android/drawable/nn_icon_pin.xml +10 -0
- package/assets/android/drawable/nn_icon_play.xml +10 -0
- package/assets/android/drawable/nn_icon_qrcode.xml +10 -0
- package/assets/android/drawable/nn_icon_refresh.xml +10 -0
- package/assets/android/drawable/nn_icon_remove_circle.xml +10 -0
- package/assets/android/drawable/nn_icon_save.xml +10 -0
- package/assets/android/drawable/nn_icon_search.xml +10 -0
- package/assets/android/drawable/nn_icon_share.xml +10 -0
- package/assets/android/drawable/nn_icon_shield.xml +10 -0
- package/assets/android/drawable/nn_icon_star.xml +10 -0
- package/assets/android/drawable/nn_icon_star_outline.xml +10 -0
- package/assets/android/drawable/nn_icon_task.xml +10 -0
- package/assets/android/drawable/nn_icon_trending_down.xml +10 -0
- package/assets/android/drawable/nn_icon_trending_up.xml +10 -0
- package/assets/android/drawable/nn_icon_unlock.xml +10 -0
- package/assets/android/drawable/nn_icon_upload.xml +10 -0
- package/assets/android/drawable/nn_icon_video.xml +10 -0
- package/assets/android/drawable/nn_icon_volume.xml +10 -0
- package/assets/android/drawable/nn_icon_warning.xml +10 -0
- package/assets/android/drawable/nn_icon_zoom.xml +10 -0
- package/build/icons.d.ts +125 -0
- package/build/icons.d.ts.map +1 -0
- package/build/icons.js +136 -0
- package/build/icons.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/plugin/build/icons.d.ts +28 -0
- package/plugin/build/icons.d.ts.map +1 -0
- package/plugin/build/icons.js +197 -0
- package/plugin/build/withAndroidWidget.d.ts.map +1 -1
- package/plugin/build/withAndroidWidget.js +106 -15
- package/plugin/tsconfig.tsbuildinfo +1 -1
package/build/icons.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * nn-widgets bundled icons\n *\n * These icons are bundled with nn-widgets and automatically copied\n * to your app during prebuild. Use the simple name in your widget data.\n *\n * Example:\n * ```typescript\n * import { setWidgetData, Icons } from 'nn-widgets';\n *\n * setWidgetData(\"MyWidget\", {\n * items: [\n * { title: \"Tasks\", icon: Icons.TASK },\n * { title: \"Settings\", icon: Icons.GEAR },\n * { title: \"Profile\", icon: Icons.PERSON },\n * ]\n * });\n * ```\n */\n\n/**\n * Available bundled icon names\n * Use these directly in your widget data\n */\nexport const Icons = {\n // Basic\n STAR: \"star\",\n STAR_OUTLINE: \"star-outline\",\n HEART: \"heart\",\n HEART_OUTLINE: \"heart-outline\",\n BOOKMARK: \"bookmark\",\n CLOCK: \"clock\",\n BELL: \"bell\",\n HOME: \"home\",\n GEAR: \"gear\",\n SETTINGS: \"gear\", // alias\n BOLT: \"bolt\",\n\n // People & accounts\n PERSON: \"person\",\n PEOPLE: \"people\",\n ACCOUNT: \"account\",\n CONTACTS: \"contacts\",\n FACE: \"face\",\n\n // Communication\n MAIL: \"mail\",\n MESSAGE: \"message\",\n CHAT: \"chat\",\n FORUM: \"forum\",\n PHONE: \"phone\",\n MEGAPHONE: \"megaphone\",\n\n // Navigation\n CHEVRON_RIGHT: \"chevron-right\",\n ARROW_RIGHT: \"arrow-right\",\n MENU: \"menu\",\n MORE: \"more\",\n CLOSE: \"close\",\n SEARCH: \"search\",\n ZOOM: \"zoom\",\n REFRESH: \"refresh\",\n\n // Actions\n ADD: \"add\",\n ADD_CIRCLE: \"add-circle\",\n REMOVE_CIRCLE: \"remove-circle\",\n EDIT: \"edit\",\n DELETE: \"delete\",\n SHARE: \"share\",\n DOWNLOAD: \"download\",\n UPLOAD: \"upload\",\n SAVE: \"save\",\n CHECK: \"check\",\n CHECK_CIRCLE: \"check-circle\",\n\n // Media\n PLAY: \"play\",\n PAUSE: \"pause\",\n CAMERA: \"camera\",\n IMAGE: \"image\",\n VIDEO: \"video\",\n MUSIC: \"music\",\n MIC: \"mic\",\n VOLUME: \"volume\",\n HEADPHONES: \"headphones\",\n FAST_FORWARD: \"fast-forward\",\n\n // Files & folders\n FOLDER: \"folder\",\n DOCUMENT: \"document\",\n BOOK: \"book\",\n\n // Business\n BRIEFCASE: \"briefcase\",\n BUILDING: \"building\",\n DOLLAR: \"dollar\",\n MONEY: \"money\",\n CARD: \"card\",\n CART: \"cart\",\n CHART: \"chart\",\n ANALYTICS: \"analytics\",\n TRENDING_UP: \"trending-up\",\n TRENDING_DOWN: \"trending-down\",\n\n // Tools & development\n LIGHTBULB: \"lightbulb\",\n HAMMER: \"hammer\",\n CODE: \"code\",\n BUG: \"bug\",\n TASK: \"task\",\n GRID: \"grid\",\n PALETTE: \"palette\",\n LINK: \"link\",\n BARCODE: \"barcode\",\n QRCODE: \"qrcode\",\n\n // Location\n LOCATION: \"location\",\n PIN: \"pin\",\n\n // Status\n INFO: \"info\",\n WARNING: \"warning\",\n ERROR: \"error\",\n BLOCK: \"block\",\n SHIELD: \"shield\",\n LOCK: \"lock\",\n UNLOCK: \"unlock\",\n EYE: \"eye\",\n EYE_OFF: \"eye-off\",\n FLAG: \"flag\",\n\n // Devices\n DESKTOP: \"desktop\",\n DEVICES: \"devices\",\n\n // Cloud\n CLOUD: \"cloud\",\n CLOUD_UPLOAD: \"cloud-upload\",\n CLOUD_DOWNLOAD: \"cloud-download\",\n} as const;\n\n/**\n * Type for icon names\n */\nexport type IconName = (typeof Icons)[keyof typeof Icons];\n\n/**\n * Get all available icon names\n */\nexport function getAvailableIcons(): string[] {\n return Object.values(Icons);\n}\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { WidgetData, WidgetDataPayload, WidgetListItem, WidgetItemIcon, WidgetItemText, WidgetUpdateConfig, NNWidgetsModuleType, FlexLayoutConfig } from "./NNWidgets.types";
|
|
2
|
+
import { Icons, getAvailableIcons, type IconName } from "./icons";
|
|
3
|
+
export { Icons, getAvailableIcons, type IconName };
|
|
2
4
|
export type { WidgetData, WidgetDataPayload, WidgetListItem, WidgetItemIcon, WidgetItemText, WidgetUpdateConfig, NNWidgetsModuleType, FlexLayoutConfig, };
|
|
3
5
|
/**
|
|
4
6
|
* NNWidgets - Native widget integration for React Native / Expo
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,QAAQ,EAAE,CAAC;AAEnD,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,GACjB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,mBAyJvB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAWhD,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAiB,MAAM,SAAS,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAiB,CAAC;AAanD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAwB;IAC5C;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,aAAa,CAAC,IAAgB;QAClC,IAAI,CAAC;YACH,OAAO,MAAM,eAAe,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACnD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,KAAK,CAAC,CAAC;YAC/D,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa;QACjB,IAAI,CAAC;YACH,OAAO,MAAM,eAAe,CAAC,aAAa,EAAE,CAAC;QAC/C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,KAAK,CAAC,CAAC;YAC/D,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,KAAK,CAAC,YAAY,CAChB,UAAkB,EAClB,IAAuB;QAEvB,IAAI,CAAC;YACH,MAAM,QAAQ,GAAe,EAAE,CAAC;YAEhC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC7B,QAAQ,CAAC,GAAG,UAAU,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;YAC/C,CAAC;YACD,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAChC,QAAQ,CAAC,GAAG,UAAU,WAAW,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;YACrD,CAAC;YACD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC7B,QAAQ,CAAC,GAAG,UAAU,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;YAC/C,CAAC;YACD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC7B,0DAA0D;gBAC1D,QAAQ,CAAC,GAAG,UAAU,QAAQ,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC/D,CAAC;YACD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC9B,wDAAwD;gBACxD,QAAQ,CAAC,GAAG,UAAU,SAAS,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACjE,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAC9D,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,eAAe,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;YACjD,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CACX,wCAAwC,UAAU,IAAI,EACtD,KAAK,CACN,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,YAAY,CAAC,MAA2B;QAC5C,IAAI,CAAC;YACH,OAAO,MAAM,eAAe,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC;QACxE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;YAC7D,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,WAAW;QACT,IAAI,CAAC;YACH,OAAO,eAAe,CAAC,WAAW,EAAE,CAAC;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import NNWidgetsModule from \"./NNWidgetsModule\";\nimport type {\n WidgetData,\n WidgetDataPayload,\n WidgetListItem,\n WidgetItemIcon,\n WidgetItemText,\n WidgetUpdateConfig,\n NNWidgetsModuleType,\n FlexLayoutConfig,\n} from \"./NNWidgets.types\";\nimport { Icons, getAvailableIcons, type IconName } from \"./icons\";\n\nexport { Icons, getAvailableIcons, type IconName };\n\nexport type {\n WidgetData,\n WidgetDataPayload,\n WidgetListItem,\n WidgetItemIcon,\n WidgetItemText,\n WidgetUpdateConfig,\n NNWidgetsModuleType,\n FlexLayoutConfig,\n};\n\n/**\n * NNWidgets - Native widget integration for React Native / Expo\n *\n * This module provides APIs to communicate between your React Native app\n * and native widgets (iOS WidgetKit & Android App Widgets).\n */\nexport const NNWidgets: NNWidgetsModuleType = {\n /**\n * Set shared data that widgets can read (legacy flat key-value format).\n * Data is stored in App Groups (iOS) or SharedPreferences (Android).\n *\n * @param data - Key-value pairs to share with widget\n * @returns Promise<boolean> - Success status\n *\n * @example\n * ```ts\n * await NNWidgets.setWidgetData({\n * userName: 'John',\n * points: 100,\n * isLoggedIn: true\n * });\n * ```\n */\n async setWidgetData(data: WidgetData): Promise<boolean> {\n try {\n return await NNWidgetsModule.setWidgetData(data);\n } catch (error) {\n console.error(\"[NNWidgets] Failed to set widget data:\", error);\n return false;\n }\n },\n\n /**\n * Get current shared widget data.\n *\n * @returns Promise<WidgetData> - Current shared data\n */\n async getWidgetData(): Promise<WidgetData> {\n try {\n return await NNWidgetsModule.getWidgetData();\n } catch (error) {\n console.error(\"[NNWidgets] Failed to get widget data:\", error);\n return {};\n }\n },\n\n /**\n * Update a specific widget with structured data.\n * Automatically serializes items to JSON, stores data with proper key prefixes,\n * and reloads the widget timeline.\n *\n * @param widgetName - The widget kind identifier (matches `name` in app.json widgets config)\n * @param data - Structured widget data payload\n * @returns Promise<boolean> - Success status\n *\n * @example\n * ```ts\n * // Update a list-type widget\n * await NNWidgets.updateWidget('SessionsWidget', {\n * items: [\n * {\n * icon: 'brainstorm',\n * title: { text: 'Morning Focus', color: '#1E1E2E', fontWeight: 'bold' },\n * description: '25 min session',\n * deepLink: 'myapp://session/123',\n * },\n * {\n * icon: { url: 'meditation', size: 28, radius: 14 },\n * title: 'Evening Wind Down',\n * description: { text: '15 min', color: '#888888' },\n * },\n * ],\n * });\n *\n * // Update a single-type widget\n * await NNWidgets.updateWidget('StatsWidget', {\n * title: 'Focus Time',\n * subtitle: 'This week',\n * value: 142,\n * });\n * ```\n */\n async updateWidget(\n widgetName: string,\n data: WidgetDataPayload,\n ): Promise<boolean> {\n try {\n const flatData: WidgetData = {};\n\n if (data.title !== undefined) {\n flatData[`${widgetName}_title`] = data.title;\n }\n if (data.subtitle !== undefined) {\n flatData[`${widgetName}_subtitle`] = data.subtitle;\n }\n if (data.value !== undefined) {\n flatData[`${widgetName}_value`] = data.value;\n }\n if (data.items !== undefined) {\n // Serialize items array to JSON string for native storage\n flatData[`${widgetName}_items`] = JSON.stringify(data.items);\n }\n if (data.layout !== undefined) {\n // Serialize layout config to JSON for flex-grid widgets\n flatData[`${widgetName}_layout`] = JSON.stringify(data.layout);\n }\n\n const success = await NNWidgetsModule.setWidgetData(flatData);\n if (success) {\n await NNWidgetsModule.reloadWidget(widgetName);\n }\n return success;\n } catch (error) {\n console.error(\n `[NNWidgets] Failed to update widget \"${widgetName}\":`,\n error,\n );\n return false;\n }\n },\n\n /**\n * Request widget to reload/update.\n * - iOS: Reloads widget timeline\n * - Android: Triggers widget update broadcast\n *\n * @param config - Optional configuration\n * @returns Promise<boolean> - Success status\n *\n * @example\n * ```ts\n * // Update all widgets\n * await NNWidgets.reloadWidget();\n *\n * // Update specific widget\n * await NNWidgets.reloadWidget({ widgetName: 'MyWidget' });\n * ```\n */\n async reloadWidget(config?: WidgetUpdateConfig): Promise<boolean> {\n try {\n return await NNWidgetsModule.reloadWidget(config?.widgetName || null);\n } catch (error) {\n console.error(\"[NNWidgets] Failed to reload widget:\", error);\n return false;\n }\n },\n\n /**\n * Check if widgets are supported on this device.\n *\n * @returns boolean - True if widgets are supported\n */\n isSupported(): boolean {\n try {\n return NNWidgetsModule.isSupported();\n } catch (error) {\n return false;\n }\n },\n};\n\nexport default NNWidgets;\n"]}
|
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon mapping for nn-widgets
|
|
3
|
+
* Maps simple icon names to iOS SF Symbols and Android drawable names
|
|
4
|
+
*
|
|
5
|
+
* Usage in JS: Just use the simple name like "star", "heart", "bookmark"
|
|
6
|
+
* The plugin will automatically map to the correct platform-specific icon
|
|
7
|
+
*/
|
|
8
|
+
export interface IconMapping {
|
|
9
|
+
name: string;
|
|
10
|
+
ios: string;
|
|
11
|
+
android: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ICON_MAPPINGS: IconMapping[];
|
|
14
|
+
export declare const ICON_MAP_BY_NAME: Record<string, IconMapping>;
|
|
15
|
+
export declare const ICON_MAP_IOS_TO_ANDROID: Record<string, string>;
|
|
16
|
+
/**
|
|
17
|
+
* Get the Android drawable name for a given icon name
|
|
18
|
+
*/
|
|
19
|
+
export declare function getAndroidIconName(iconName: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Get the iOS SF Symbol name for a given icon name
|
|
22
|
+
*/
|
|
23
|
+
export declare function getIOSIconName(iconName: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Get all available icon names
|
|
26
|
+
*/
|
|
27
|
+
export declare function getAvailableIcons(): string[];
|
|
28
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,WAAW,EAyItC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAM,CAAC;AAChE,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,CAAC;AAOlE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA2B3D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgBvD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAE5C"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Icon mapping for nn-widgets
|
|
4
|
+
* Maps simple icon names to iOS SF Symbols and Android drawable names
|
|
5
|
+
*
|
|
6
|
+
* Usage in JS: Just use the simple name like "star", "heart", "bookmark"
|
|
7
|
+
* The plugin will automatically map to the correct platform-specific icon
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ICON_MAP_IOS_TO_ANDROID = exports.ICON_MAP_BY_NAME = exports.ICON_MAPPINGS = void 0;
|
|
11
|
+
exports.getAndroidIconName = getAndroidIconName;
|
|
12
|
+
exports.getIOSIconName = getIOSIconName;
|
|
13
|
+
exports.getAvailableIcons = getAvailableIcons;
|
|
14
|
+
exports.ICON_MAPPINGS = [
|
|
15
|
+
// Basic icons
|
|
16
|
+
{ name: "star", ios: "star.fill", android: "star" },
|
|
17
|
+
{ name: "star-outline", ios: "star", android: "star_outline" },
|
|
18
|
+
{ name: "heart", ios: "heart.fill", android: "heart" },
|
|
19
|
+
{ name: "heart-outline", ios: "heart", android: "heart_outline" },
|
|
20
|
+
{ name: "bookmark", ios: "bookmark.fill", android: "bookmark" },
|
|
21
|
+
{ name: "clock", ios: "clock.fill", android: "clock" },
|
|
22
|
+
{ name: "bell", ios: "bell.fill", android: "bell" },
|
|
23
|
+
{ name: "home", ios: "house.fill", android: "home" },
|
|
24
|
+
{ name: "gear", ios: "gearshape.fill", android: "gear" },
|
|
25
|
+
{ name: "settings", ios: "gearshape.fill", android: "gear" },
|
|
26
|
+
{ name: "bolt", ios: "bolt.fill", android: "bolt" },
|
|
27
|
+
// People & accounts
|
|
28
|
+
{ name: "person", ios: "person.fill", android: "person" },
|
|
29
|
+
{ name: "people", ios: "person.2.fill", android: "people" },
|
|
30
|
+
{ name: "account", ios: "person.circle.fill", android: "account" },
|
|
31
|
+
{
|
|
32
|
+
name: "contacts",
|
|
33
|
+
ios: "person.crop.rectangle.stack.fill",
|
|
34
|
+
android: "contacts",
|
|
35
|
+
},
|
|
36
|
+
{ name: "face", ios: "face.smiling.fill", android: "face" },
|
|
37
|
+
// Communication
|
|
38
|
+
{ name: "mail", ios: "envelope.fill", android: "mail" },
|
|
39
|
+
{ name: "message", ios: "message.fill", android: "message" },
|
|
40
|
+
{ name: "chat", ios: "bubble.left.fill", android: "chat" },
|
|
41
|
+
{ name: "forum", ios: "bubble.left.and.bubble.right.fill", android: "forum" },
|
|
42
|
+
{ name: "phone", ios: "phone.fill", android: "phone" },
|
|
43
|
+
{ name: "megaphone", ios: "megaphone.fill", android: "megaphone" },
|
|
44
|
+
// Navigation
|
|
45
|
+
{ name: "chevron-right", ios: "chevron.right", android: "chevron_right" },
|
|
46
|
+
{ name: "arrow-right", ios: "arrow.right", android: "arrow_right" },
|
|
47
|
+
{ name: "menu", ios: "line.horizontal.3", android: "menu" },
|
|
48
|
+
{ name: "more", ios: "ellipsis", android: "more" },
|
|
49
|
+
{ name: "close", ios: "xmark", android: "close" },
|
|
50
|
+
{ name: "search", ios: "magnifyingglass", android: "search" },
|
|
51
|
+
{ name: "zoom", ios: "plus.magnifyingglass", android: "zoom" },
|
|
52
|
+
{ name: "refresh", ios: "arrow.clockwise", android: "refresh" },
|
|
53
|
+
// Actions
|
|
54
|
+
{ name: "add", ios: "plus", android: "add" },
|
|
55
|
+
{ name: "add-circle", ios: "plus.circle.fill", android: "add_circle" },
|
|
56
|
+
{ name: "remove-circle", ios: "minus.circle.fill", android: "remove_circle" },
|
|
57
|
+
{ name: "edit", ios: "pencil", android: "edit" },
|
|
58
|
+
{ name: "delete", ios: "trash.fill", android: "delete" },
|
|
59
|
+
{ name: "share", ios: "square.and.arrow.up", android: "share" },
|
|
60
|
+
{ name: "download", ios: "arrow.down.circle.fill", android: "download" },
|
|
61
|
+
{ name: "upload", ios: "arrow.up.circle.fill", android: "upload" },
|
|
62
|
+
{ name: "save", ios: "square.and.arrow.down.fill", android: "save" },
|
|
63
|
+
{ name: "check", ios: "checkmark", android: "check" },
|
|
64
|
+
{
|
|
65
|
+
name: "check-circle",
|
|
66
|
+
ios: "checkmark.circle.fill",
|
|
67
|
+
android: "check_circle",
|
|
68
|
+
},
|
|
69
|
+
// Media
|
|
70
|
+
{ name: "play", ios: "play.fill", android: "play" },
|
|
71
|
+
{ name: "pause", ios: "pause.fill", android: "pause" },
|
|
72
|
+
{ name: "camera", ios: "camera.fill", android: "camera" },
|
|
73
|
+
{ name: "image", ios: "photo.fill", android: "image" },
|
|
74
|
+
{ name: "video", ios: "video.fill", android: "video" },
|
|
75
|
+
{ name: "music", ios: "music.note", android: "music" },
|
|
76
|
+
{ name: "mic", ios: "mic.fill", android: "mic" },
|
|
77
|
+
{ name: "volume", ios: "speaker.wave.3.fill", android: "volume" },
|
|
78
|
+
{ name: "headphones", ios: "headphones", android: "headphones" },
|
|
79
|
+
{ name: "fast-forward", ios: "forward.fill", android: "fast_forward" },
|
|
80
|
+
// Files & folders
|
|
81
|
+
{ name: "folder", ios: "folder.fill", android: "folder" },
|
|
82
|
+
{ name: "document", ios: "doc.fill", android: "document" },
|
|
83
|
+
{ name: "book", ios: "book.fill", android: "book" },
|
|
84
|
+
// Business
|
|
85
|
+
{ name: "briefcase", ios: "briefcase.fill", android: "briefcase" },
|
|
86
|
+
{ name: "building", ios: "building.2.fill", android: "building" },
|
|
87
|
+
{ name: "dollar", ios: "dollarsign.circle.fill", android: "dollar" },
|
|
88
|
+
{ name: "money", ios: "banknote.fill", android: "money" },
|
|
89
|
+
{ name: "card", ios: "creditcard.fill", android: "card" },
|
|
90
|
+
{ name: "cart", ios: "cart.fill", android: "cart" },
|
|
91
|
+
{ name: "chart", ios: "chart.bar.fill", android: "chart" },
|
|
92
|
+
{ name: "analytics", ios: "chart.xyaxis.line", android: "analytics" },
|
|
93
|
+
{ name: "trending-up", ios: "arrow.up.right", android: "trending_up" },
|
|
94
|
+
{ name: "trending-down", ios: "arrow.down.right", android: "trending_down" },
|
|
95
|
+
// Tools & development
|
|
96
|
+
{ name: "lightbulb", ios: "lightbulb.fill", android: "lightbulb" },
|
|
97
|
+
{ name: "hammer", ios: "hammer.fill", android: "hammer" },
|
|
98
|
+
{
|
|
99
|
+
name: "code",
|
|
100
|
+
ios: "chevron.left.forwardslash.chevron.right",
|
|
101
|
+
android: "code",
|
|
102
|
+
},
|
|
103
|
+
{ name: "bug", ios: "ladybug.fill", android: "bug" },
|
|
104
|
+
{ name: "task", ios: "checklist", android: "task" },
|
|
105
|
+
{ name: "grid", ios: "square.grid.2x2.fill", android: "grid" },
|
|
106
|
+
{ name: "palette", ios: "paintpalette.fill", android: "palette" },
|
|
107
|
+
{ name: "link", ios: "link", android: "link" },
|
|
108
|
+
{ name: "barcode", ios: "barcode", android: "barcode" },
|
|
109
|
+
{ name: "qrcode", ios: "qrcode", android: "qrcode" },
|
|
110
|
+
// Location
|
|
111
|
+
{ name: "location", ios: "location.fill", android: "location" },
|
|
112
|
+
{ name: "pin", ios: "mappin.fill", android: "pin" },
|
|
113
|
+
// Status
|
|
114
|
+
{ name: "info", ios: "info.circle.fill", android: "info" },
|
|
115
|
+
{ name: "warning", ios: "exclamationmark.triangle.fill", android: "warning" },
|
|
116
|
+
{ name: "error", ios: "xmark.circle.fill", android: "error" },
|
|
117
|
+
{ name: "block", ios: "nosign", android: "block" },
|
|
118
|
+
{ name: "shield", ios: "shield.checkered", android: "shield" },
|
|
119
|
+
{ name: "lock", ios: "lock.fill", android: "lock" },
|
|
120
|
+
{ name: "unlock", ios: "lock.open.fill", android: "unlock" },
|
|
121
|
+
{ name: "eye", ios: "eye.fill", android: "eye" },
|
|
122
|
+
{ name: "eye-off", ios: "eye.slash.fill", android: "eye_off" },
|
|
123
|
+
{ name: "flag", ios: "flag.fill", android: "flag" },
|
|
124
|
+
// Devices
|
|
125
|
+
{ name: "desktop", ios: "desktopcomputer", android: "desktop" },
|
|
126
|
+
{ name: "devices", ios: "macbook.and.iphone", android: "devices" },
|
|
127
|
+
// Cloud
|
|
128
|
+
{ name: "cloud", ios: "cloud.fill", android: "cloud" },
|
|
129
|
+
{
|
|
130
|
+
name: "cloud-upload",
|
|
131
|
+
ios: "icloud.and.arrow.up.fill",
|
|
132
|
+
android: "cloud_upload",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "cloud-download",
|
|
136
|
+
ios: "icloud.and.arrow.down.fill",
|
|
137
|
+
android: "cloud_download",
|
|
138
|
+
},
|
|
139
|
+
];
|
|
140
|
+
// Create lookup maps for quick access
|
|
141
|
+
exports.ICON_MAP_BY_NAME = {};
|
|
142
|
+
exports.ICON_MAP_IOS_TO_ANDROID = {};
|
|
143
|
+
exports.ICON_MAPPINGS.forEach((mapping) => {
|
|
144
|
+
exports.ICON_MAP_BY_NAME[mapping.name] = mapping;
|
|
145
|
+
exports.ICON_MAP_IOS_TO_ANDROID[mapping.ios] = `nn_icon_${mapping.android}`;
|
|
146
|
+
});
|
|
147
|
+
/**
|
|
148
|
+
* Get the Android drawable name for a given icon name
|
|
149
|
+
*/
|
|
150
|
+
function getAndroidIconName(iconName) {
|
|
151
|
+
// Check if it's already an Android drawable name
|
|
152
|
+
if (iconName.startsWith("nn_icon_")) {
|
|
153
|
+
return iconName;
|
|
154
|
+
}
|
|
155
|
+
// Check direct mapping by simple name
|
|
156
|
+
const mapping = exports.ICON_MAP_BY_NAME[iconName];
|
|
157
|
+
if (mapping) {
|
|
158
|
+
return `nn_icon_${mapping.android}`;
|
|
159
|
+
}
|
|
160
|
+
// Check if it's an iOS SF Symbol
|
|
161
|
+
const androidName = exports.ICON_MAP_IOS_TO_ANDROID[iconName];
|
|
162
|
+
if (androidName) {
|
|
163
|
+
return androidName;
|
|
164
|
+
}
|
|
165
|
+
// Fallback: try to convert the name to Android format
|
|
166
|
+
// e.g., "star.fill" -> "nn_icon_star"
|
|
167
|
+
const simpleName = iconName
|
|
168
|
+
.replace(/\.fill$/, "")
|
|
169
|
+
.replace(/\./g, "_")
|
|
170
|
+
.replace(/-/g, "_")
|
|
171
|
+
.toLowerCase();
|
|
172
|
+
return `nn_icon_${simpleName}`;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Get the iOS SF Symbol name for a given icon name
|
|
176
|
+
*/
|
|
177
|
+
function getIOSIconName(iconName) {
|
|
178
|
+
// Check if it looks like an SF Symbol (contains dots)
|
|
179
|
+
if (iconName.includes(".")) {
|
|
180
|
+
return iconName;
|
|
181
|
+
}
|
|
182
|
+
// Check if it's an Android drawable name
|
|
183
|
+
if (iconName.startsWith("nn_icon_")) {
|
|
184
|
+
const simpleName = iconName.replace("nn_icon_", "").replace(/_/g, "-");
|
|
185
|
+
const mapping = exports.ICON_MAP_BY_NAME[simpleName];
|
|
186
|
+
return mapping?.ios || iconName;
|
|
187
|
+
}
|
|
188
|
+
// Check direct mapping by simple name
|
|
189
|
+
const mapping = exports.ICON_MAP_BY_NAME[iconName];
|
|
190
|
+
return mapping?.ios || iconName;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Get all available icon names
|
|
194
|
+
*/
|
|
195
|
+
function getAvailableIcons() {
|
|
196
|
+
return exports.ICON_MAPPINGS.map((m) => m.name);
|
|
197
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withAndroidWidget.d.ts","sourceRoot":"","sources":["../src/withAndroidWidget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,sBAAsB,CAAC;AAGzE,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"withAndroidWidget.d.ts","sourceRoot":"","sources":["../src/withAndroidWidget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,sBAAsB,CAAC;AAGzE,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,SAAS,CAAC;AA+mCjB,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,oBAAoB,CAwQhE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -41,6 +41,38 @@ const withIosWidget_1 = require("./withIosWidget");
|
|
|
41
41
|
// ──────────────────────────────────────────────
|
|
42
42
|
// Constants and helpers
|
|
43
43
|
// ──────────────────────────────────────────────
|
|
44
|
+
/**
|
|
45
|
+
* Copy bundled icons from nn-widgets package to app's drawable folder
|
|
46
|
+
*/
|
|
47
|
+
function copyBundledIcons(drawablePath) {
|
|
48
|
+
// Get the path to bundled icons in nn-widgets package
|
|
49
|
+
// The icons are in assets/android/drawable/ relative to the plugin
|
|
50
|
+
const pluginDir = __dirname;
|
|
51
|
+
const packageRoot = path.resolve(pluginDir, "..", "..");
|
|
52
|
+
const bundledIconsPath = path.join(packageRoot, "assets", "android", "drawable");
|
|
53
|
+
if (!fs.existsSync(bundledIconsPath)) {
|
|
54
|
+
console.log(`[nn-widgets] Bundled icons path not found: ${bundledIconsPath}`);
|
|
55
|
+
return 0;
|
|
56
|
+
}
|
|
57
|
+
// Copy all XML icons from bundled assets
|
|
58
|
+
const files = fs.readdirSync(bundledIconsPath);
|
|
59
|
+
let copiedCount = 0;
|
|
60
|
+
for (const file of files) {
|
|
61
|
+
if (file.endsWith(".xml") && file.startsWith("nn_icon_")) {
|
|
62
|
+
const srcPath = path.join(bundledIconsPath, file);
|
|
63
|
+
const destPath = path.join(drawablePath, file);
|
|
64
|
+
// Only copy if doesn't exist or is different
|
|
65
|
+
if (!fs.existsSync(destPath)) {
|
|
66
|
+
fs.copyFileSync(srcPath, destPath);
|
|
67
|
+
copiedCount++;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (copiedCount > 0) {
|
|
72
|
+
console.log(`[nn-widgets] Copied ${copiedCount} bundled icons to drawable`);
|
|
73
|
+
}
|
|
74
|
+
return copiedCount;
|
|
75
|
+
}
|
|
44
76
|
// Material background names that should use blur effect on Android 12+
|
|
45
77
|
const BLUR_BACKGROUNDS = [
|
|
46
78
|
"blur",
|
|
@@ -247,10 +279,22 @@ class ${w.name}Provider : AppWidgetProvider() {
|
|
|
247
279
|
itemView.setViewVisibility(R.id.item_description, View.GONE)
|
|
248
280
|
}
|
|
249
281
|
|
|
250
|
-
// Parse icon
|
|
282
|
+
// Parse icon with bundled nn_icon_ prefix support
|
|
251
283
|
val iconName = parseIconName(item)
|
|
252
284
|
if (iconName.isNotEmpty()) {
|
|
253
|
-
val
|
|
285
|
+
val normalizedName = iconName
|
|
286
|
+
.replace("-", "_")
|
|
287
|
+
.replace(".", "_")
|
|
288
|
+
.replace(" ", "_")
|
|
289
|
+
.lowercase()
|
|
290
|
+
.replace("_fill$".toRegex(), "")
|
|
291
|
+
|
|
292
|
+
// Try bundled icon first, then original name
|
|
293
|
+
var resId = context.resources.getIdentifier("nn_icon_\$normalizedName", "drawable", context.packageName)
|
|
294
|
+
if (resId == 0) {
|
|
295
|
+
resId = context.resources.getIdentifier(iconName, "drawable", context.packageName)
|
|
296
|
+
}
|
|
297
|
+
|
|
254
298
|
if (resId != 0) {
|
|
255
299
|
itemView.setImageViewResource(R.id.item_icon, resId)
|
|
256
300
|
itemView.setViewVisibility(R.id.item_icon, View.VISIBLE)
|
|
@@ -368,15 +412,27 @@ class ${w.name}Provider : AppWidgetProvider() {
|
|
|
368
412
|
}
|
|
369
413
|
}
|
|
370
414
|
|
|
371
|
-
override fun onEnabled(context: Context) {
|
|
372
|
-
|
|
415
|
+
override fun onEnabled(context: Context) {
|
|
416
|
+
android.util.Log.d("${w.name}Provider", "Widget enabled")
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
override fun onDisabled(context: Context) {
|
|
420
|
+
android.util.Log.d("${w.name}Provider", "Widget disabled")
|
|
421
|
+
}
|
|
373
422
|
|
|
374
423
|
override fun onReceive(context: Context, intent: Intent) {
|
|
424
|
+
android.util.Log.d("${w.name}Provider", "onReceive: \${intent.action}")
|
|
375
425
|
super.onReceive(context, intent)
|
|
376
|
-
|
|
426
|
+
|
|
427
|
+
val expectedAction = "\${context.packageName}.WIDGET_UPDATE_${w.name.toUpperCase()}"
|
|
428
|
+
android.util.Log.d("${w.name}Provider", "Expected action: $expectedAction")
|
|
429
|
+
|
|
430
|
+
if (intent.action == expectedAction) {
|
|
431
|
+
android.util.Log.d("${w.name}Provider", "Custom update action received, refreshing widget...")
|
|
377
432
|
val appWidgetManager = AppWidgetManager.getInstance(context)
|
|
378
433
|
val thisWidget = android.content.ComponentName(context, ${w.name}Provider::class.java)
|
|
379
434
|
val appWidgetIds = appWidgetManager.getAppWidgetIds(thisWidget)
|
|
435
|
+
android.util.Log.d("${w.name}Provider", "Found \${appWidgetIds.size} widget instances")
|
|
380
436
|
onUpdate(context, appWidgetManager, appWidgetIds)
|
|
381
437
|
}
|
|
382
438
|
}
|
|
@@ -386,6 +442,8 @@ class ${w.name}Provider : AppWidgetProvider() {
|
|
|
386
442
|
appWidgetManager: AppWidgetManager,
|
|
387
443
|
appWidgetId: Int
|
|
388
444
|
) {
|
|
445
|
+
android.util.Log.d("${w.name}Provider", "updateAppWidget called for id: $appWidgetId")
|
|
446
|
+
|
|
389
447
|
val prefs = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
|
390
448
|
val views = RemoteViews(context.packageName, R.layout.${w.name.toLowerCase()}_layout)
|
|
391
449
|
|
|
@@ -394,6 +452,9 @@ class ${w.name}Provider : AppWidgetProvider() {
|
|
|
394
452
|
val layoutJson = prefs.getString("widget_${w.name}_layout", null)
|
|
395
453
|
val title = prefs.getString("widget_${w.name}_title", "${w.fallbackTitle}") ?: "${w.fallbackTitle}"
|
|
396
454
|
val subtitle = prefs.getString("widget_${w.name}_subtitle", "${w.fallbackSubtitle}") ?: "${w.fallbackSubtitle}"
|
|
455
|
+
|
|
456
|
+
android.util.Log.d("${w.name}Provider", "itemsJson: \${itemsJson?.take(100)}...")
|
|
457
|
+
android.util.Log.d("${w.name}Provider", "layoutJson: $layoutJson")
|
|
397
458
|
|
|
398
459
|
if (itemsJson != null && layoutJson != null) {
|
|
399
460
|
try {
|
|
@@ -402,6 +463,8 @@ class ${w.name}Provider : AppWidgetProvider() {
|
|
|
402
463
|
// Get layout for systemSmall (default) - same as iOS
|
|
403
464
|
val layout = layoutObj.optJSONArray("systemSmall") ?: JSONArray("[[1]]")
|
|
404
465
|
|
|
466
|
+
android.util.Log.d("${w.name}Provider", "Parsed \${items.length()} items, layout rows: \${layout.length()}")
|
|
467
|
+
|
|
405
468
|
// Hide fallback, show grid
|
|
406
469
|
views.setViewVisibility(R.id.widget_fallback, View.GONE)
|
|
407
470
|
views.setViewVisibility(R.id.widget_grid_container, View.VISIBLE)
|
|
@@ -502,19 +565,49 @@ class ${w.name}Provider : AppWidgetProvider() {
|
|
|
502
565
|
|
|
503
566
|
private fun setupIcon(context: Context, views: RemoteViews, item: JSONObject, iconViewId: Int) {
|
|
504
567
|
val iconName = parseIconName(item)
|
|
568
|
+
android.util.Log.d("${w.name}Provider", "Setting up icon: $iconName")
|
|
569
|
+
|
|
505
570
|
if (iconName.isNotEmpty()) {
|
|
506
|
-
//
|
|
507
|
-
val
|
|
571
|
+
// Normalize icon name: remove dashes, dots, make lowercase
|
|
572
|
+
val normalizedName = iconName
|
|
573
|
+
.replace("-", "_")
|
|
574
|
+
.replace(".", "_")
|
|
575
|
+
.replace(" ", "_")
|
|
576
|
+
.lowercase()
|
|
577
|
+
.replace("_fill$".toRegex(), "") // Remove .fill suffix from iOS SF Symbols
|
|
578
|
+
|
|
579
|
+
// Try multiple variations of the icon name, prioritizing bundled nn_icon_ prefix
|
|
580
|
+
val variations = listOf(
|
|
581
|
+
"nn_icon_\$normalizedName", // Bundled icon with prefix (e.g., nn_icon_star)
|
|
582
|
+
normalizedName, // Direct name (e.g., star)
|
|
583
|
+
iconName, // Original name
|
|
508
584
|
iconName.replace("-", "_").lowercase(),
|
|
509
|
-
|
|
510
|
-
context.packageName
|
|
585
|
+
iconName.lowercase()
|
|
511
586
|
)
|
|
587
|
+
|
|
588
|
+
var resId = 0
|
|
589
|
+
for (variation in variations) {
|
|
590
|
+
resId = context.resources.getIdentifier(variation, "drawable", context.packageName)
|
|
591
|
+
if (resId != 0) {
|
|
592
|
+
android.util.Log.d("${w.name}Provider", "Found drawable: $variation ($resId)")
|
|
593
|
+
break
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
512
597
|
if (resId != 0) {
|
|
513
598
|
views.setImageViewResource(iconViewId, resId)
|
|
514
599
|
views.setViewVisibility(iconViewId, View.VISIBLE)
|
|
515
600
|
} else {
|
|
516
|
-
//
|
|
517
|
-
|
|
601
|
+
// Try to use a placeholder icon if available
|
|
602
|
+
val placeholderResId = context.resources.getIdentifier("nn_icon_star", "drawable", context.packageName)
|
|
603
|
+
if (placeholderResId != 0) {
|
|
604
|
+
views.setImageViewResource(iconViewId, placeholderResId)
|
|
605
|
+
views.setViewVisibility(iconViewId, View.VISIBLE)
|
|
606
|
+
android.util.Log.d("${w.name}Provider", "Using placeholder icon")
|
|
607
|
+
} else {
|
|
608
|
+
views.setViewVisibility(iconViewId, View.GONE)
|
|
609
|
+
android.util.Log.w("${w.name}Provider", "Icon not found: $iconName (tried: \${variations.joinToString()})")
|
|
610
|
+
}
|
|
518
611
|
}
|
|
519
612
|
} else {
|
|
520
613
|
views.setViewVisibility(iconViewId, View.GONE)
|
|
@@ -1050,6 +1143,8 @@ const withAndroidWidget = (config, props = {}) => {
|
|
|
1050
1143
|
fs.mkdirSync(dir, { recursive: true });
|
|
1051
1144
|
}
|
|
1052
1145
|
});
|
|
1146
|
+
// Copy bundled icons from nn-widgets package to app's drawable
|
|
1147
|
+
copyBundledIcons(resDrawablePath);
|
|
1053
1148
|
// Check if any widget uses blur background
|
|
1054
1149
|
const hasBlurWidget = resolvedProps.widgets.some((w) => isBlurBackground(w.style?.backgroundColor));
|
|
1055
1150
|
// Generate blur background drawables if needed
|
|
@@ -1162,10 +1257,6 @@ const withAndroidWidget = (config, props = {}) => {
|
|
|
1162
1257
|
"android:name": "android.appwidget.action.APPWIDGET_UPDATE",
|
|
1163
1258
|
},
|
|
1164
1259
|
},
|
|
1165
|
-
],
|
|
1166
|
-
},
|
|
1167
|
-
{
|
|
1168
|
-
action: [
|
|
1169
1260
|
{
|
|
1170
1261
|
$: {
|
|
1171
1262
|
"android:name": `${packageName}.WIDGET_UPDATE_${w.name.toUpperCase()}`,
|