craft-native 0.0.254 → 0.0.272

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.
Files changed (31) hide show
  1. package/README.md +22 -0
  2. package/dist/android/src/index.d.ts +4 -2
  3. package/dist/android/src/index.js +65 -4
  4. package/dist/android/templates/AndroidManifest.xml.template +1 -0
  5. package/dist/android/templates/CraftHealthServices.kt.template +132 -0
  6. package/dist/android/templates/CraftHealthServicesService.kt.template +217 -0
  7. package/dist/android/templates/CraftHealthServicesStub.kt.template +16 -0
  8. package/dist/android/templates/CraftNativeHealth.kt.template +115 -0
  9. package/dist/android/templates/CraftNativeHealthStub.kt.template +1 -0
  10. package/dist/android/templates/CraftNativeMutation.kt.template +2 -0
  11. package/dist/android/templates/CraftNativeServices.kt.template +31 -8
  12. package/dist/android/templates/CraftNativeShell.kt.template +5 -0
  13. package/dist/android/templates/MainActivityNative.kt.template +343 -33
  14. package/dist/android/templates/build.gradle.kts.app.template +5 -0
  15. package/dist/api/mobile.d.ts +9 -1
  16. package/dist/browser/lifecycle.d.ts +7 -0
  17. package/dist/browser.js +126 -24
  18. package/dist/cli.js +1 -1
  19. package/dist/components/index.d.ts +19 -10
  20. package/dist/index.cjs +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/ios/templates/CraftApp.swift +55 -7
  23. package/dist/ios/templates/CraftHealth.swift +38 -0
  24. package/dist/ios/templates/CraftHybrid.swift +50 -7
  25. package/dist/ios/templates/CraftNativeActions.swift +109 -22
  26. package/dist/ios/templates/CraftNativeFlatList.swift +187 -18
  27. package/dist/ios/templates/CraftNativeMutation.swift +3 -1
  28. package/dist/ios/templates/CraftNativeScreen.swift +466 -24
  29. package/dist/macos/templates/CraftNativeMutation.swift +3 -1
  30. package/dist/mobile.js +1 -1
  31. package/package.json +1 -1
@@ -339,11 +339,13 @@ final class CraftNativeMutationDocument {
339
339
  /// `Svg`). Only View, SafeAreaView and ScrollView used to be here, so a
340
340
  /// drawing revealed after the first paint (an `:if` around an `<svg>`)
341
341
  /// had its shapes refused as INVALID_PARENT, and the whole screen was
342
- /// drawn again; Android's host already took the same list.
342
+ /// drawn again; Android's host already took the same list. A shape holds
343
+ /// its `Animate` (SMIL keyframes: HQ's moving exercise figures).
343
344
  static let containerTypes: Set<String> = [
344
345
  "View", "SafeAreaView", "ScrollView", "KeyboardAvoidingView", "Modal", "Pressable",
345
346
  "TouchableOpacity", "TouchableHighlight", "ImageBackground", "FlatList", "SectionList",
346
347
  "Fragment", "Svg", "G", "Map",
348
+ "Path", "Line", "Rect", "Circle", "Ellipse", "Polyline", "Polygon",
347
349
  ]
348
350
  private static let containerTypeKeys = Set(containerTypes.map { $0.lowercased() })
349
351
 
package/dist/mobile.js CHANGED
@@ -1725,7 +1725,7 @@ var health = {
1725
1725
  return () => {};
1726
1726
  const listener = (event) => {
1727
1727
  const detail = event.detail;
1728
- if (detail && typeof detail.id === "string" && (detail.event === "state" || detail.event === "error"))
1728
+ if (detail && typeof detail.id === "string" && (detail.event === "state" || detail.event === "metrics" || detail.event === "error"))
1729
1729
  callback(detail);
1730
1730
  };
1731
1731
  window.addEventListener("craftHealthWorkout", listener);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "craft-native",
3
- "version": "0.0.254",
3
+ "version": "0.0.272",
4
4
  "type": "module",
5
5
  "description": "Build desktop apps with web languages - TypeScript SDK for Craft",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",