Skip to content

Commit 8c4ca37

Browse files
committed
Update LoadableView spec in documentation
Add newly added "viewDidLoadActionID" info
1 parent 0ff7e5f commit 8c4ca37

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Documentation/ActionUI-JSON-Specifications.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,8 @@
595595
"properties": {
596596
"url": "https://example.com/view.json", // Optional: String URL to remote JSON or binary plist (http://, https://)
597597
"filePath": "/path/to/view.json", // Optional: String absolute path to local JSON or binary plist
598-
"name": "HelloWorld.json" // Optional: String name of JSON or binary plist resource in app bundle
598+
"name": "HelloWorld.json", // Optional: String name of JSON or binary plist resource in app bundle
599+
"viewDidLoadActionID": "view.loaded" // Optional: String action triggered once after a new sub-view is loaded. Not re-triggered on SwiftUI body rebuilds for the same source.
599600
}
600601
// Note: Requires exactly one of "url", "filePath", or "name" to be valid. Loads JSON or binary plist, determined by .json or .plist extension, parses into ActionUIElementBase using ActionUIModel.loadDescription, and renders ActionUIView. Remote "url" loads asynchronously with ProgressView; local "filePath" or bundle "name" loads synchronously in init. Assumes unique IDs in loaded description to avoid conflicts with existing windowModels. Baseline View properties (padding, hidden, foregroundColor, font, background, frame, opacity, cornerRadius, actionID, disabled) and additional View protocol modifiers are inherited and applied via ActionUIRegistry.shared.applyModifiers(to: baseView, properties: element.properties).
601602
// Note: Invalid sources or unsupported extensions will result in error display. The source (url/filePath/name) is the designated value (valueType: String.self), settable via ActionUIModel.setElementValue, with heuristics: http:// or https:// for URL, file:// or / for filePath, else bundle name.

0 commit comments

Comments
 (0)