API reference
Utilities
The small helper surface exported by v1.6.0 for IDs, option parsing, data API triggers, refs, directives, and devtools.
import {
generateUID,
resetUID,
toCamel,
parseVal,
readOptions,
getDataTarget,
getDataAction,
invokeAction,
collectDirectives,
collectRefs,
getDevtoolsBridge,
getDevtoolsSnapshot
} from "tiny-engine-core";
generateUID(scope?) // create a scoped runtime id
resetUID() // reset UID counters
toCamel("active-index") // "activeIndex"
parseVal(value) // true/false/number/JSON/string
readOptions(el, name, prefix?) // reads ui-name and ui-name-* options
getDataTarget(trigger, prefix) // resolves data-target/data-ui-target/hash
getDataAction(trigger, prefix) // data-ui-action or "toggle"
invokeAction(instance, action) // calls a public method safely
collectDirectives(el, prefix) // @click-style attributes
collectRefs(root) // ref="name" map
getDevtoolsSnapshot() // immutable runtime snapshot
getDevtoolsBridge() // live window.__TINY_ENGINE__ bridgeOption parsing
readOptions() reads marker attributes like ui-tabs and option attributes like ui-tabs-active-index, parses booleans, numbers, and JSON, then returns camelCased keys.
Devtools helpers
getDevtoolsSnapshot() returns a copy of the runtime state.getDevtoolsBridge() syncs and returns the live bridge that also appears on window.__TINY_ENGINE__.