### NBX DSL Syntax Overview Source: https://github.com/nativeblocks/nbx/blob/main/README.md Provides a comprehensive overview of the Nativeblocks eXchange (NBX) Domain-Specific Language syntax for defining UI elements and logic. ```APIDOC NBX DSL Syntax: Frame Declaration: frame(name = "screenName", route = "/route") { ... } Variable Declaration: var variableName: TYPE = value Supported types include BOOLEAN, STRING, etc. Block Declaration: block(keyType = "TYPE", key = "name", visibility = someVariable, version = 1) Blocks represent UI elements and can be nested. Slot Injection: .slot("slotName") { ... } Used to define areas within a block where other blocks can be placed. Data Assignment: .data(key = value) // or .data( key1 = value1, key2 = value2 ) Assigns data values to block properties. Property Assignment (Single or Multi-Device): .prop( property1 = value1, property2 = value2 ) // or for multi-device properties: .prop( property1 = (mobile = "NONE", tablet = "NONE", desktop = "NONE"), property2 = (mobile = "NONE", tablet = "NONE", desktop = "NONE") ) // or with a single value for all devices: .prop( property1 = (value = "NONE"), property2 = (value = "NONE") ) Assigns visual or behavioral properties, potentially with device-specific overrides. Event Action: .action(event = "eventName") { ... } Defines logic to execute in response to UI events like "onTextChange". Trigger: trigger(keyType = "TYPE", name = "description") .then("NEXT") { ... } Represents an action or effect, potentially with conditional branching using .then() for success, failure, or custom logic. ``` -------------------------------- ### Convert JSON to NBX DSL (Go) Source: https://github.com/nativeblocks/nbx/blob/main/README.md Demonstrates using the nbx Go library to convert a JSON representation of a UI frame into the NBX DSL text format. ```Go import "github.com/nativeblocks/nbx" frameDSL := nbx.ToDSL(frameJson) ``` -------------------------------- ### Convert NBX DSL to JSON (Go) Source: https://github.com/nativeblocks/nbx/blob/main/README.md Shows how to convert NBX DSL text into a JSON frame using the nbx Go library, including error handling for the conversion process. ```Go import "github.com/nativeblocks/nbx" jsonFrame, err := nbx.ToJSON(frameDSL, schemaString, "") if err != nil { // handle error } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.