Ids
The ids the engine provides, such as #db and #fx, their commands, and the ids your own elements must not use.
Generated from the engine's spec (HAM 1.7.0), so it always matches what the engine reads.
An id names an element so actions can reach it: <canvas id="pad"> and then #pad.undo. These ids come with the engine, and the reserved ones are its own: give your elements other names.
#db
The local database. Model verbs are #db.<model>.<verb>[:args] (#db.todo.create:title=Milk, update, delete, toggle, increment …); these act on the whole database.
| Name | What it does |
|---|---|
#db.backup |
Upload the database file to backup_url now (legacy, your own server only). |
#db.sync |
Run a sync round now (push, then pull). |
#db.sync.erase |
Erase the shared database for every install of the app; seeds run again. hypeapps.dev keeps an erased database for 30 days; contact us to restore it. |
#db.wipe |
Erase this device's local database as on a fresh install; seeds run again. With sync on, the next sync downloads the shared database again (#db.sync.erase erases it for everyone). |
#db.<model>.create:field=value,… |
Insert a row. With no pairs inside a <form>, the form's declared fields are inserted. |
#db.<model>.decrement:id,field[,amount] |
Subtract from a number field (default 1). |
#db.<model>.delete:id | where <condition> |
Delete a row, or every row matching a condition. |
#db.<model>.increment:id,field[,amount] |
Add to a number field (default 1). |
#db.<model>.toggle:id,field |
Flip a boolean field. |
#db.<model>.truncate |
Delete every row of the model. |
#db.<model>.update:id,field=value,… |
Change fields of a row. |
#fx
The full-screen ripple layer (native only; off on web and under reduced motion; on a watch it mounts when the app asks: tap_effect="ripple" or its first #fx command). State: $fx.rippling, $fx.ripples, $fx.touch.
| Name | What it does |
|---|---|
#fx.calm |
Stop all ripples. |
#fx.ripple:[x,y[,preset|amp,speed,width…]] |
Spawn a ripple: x,y (px or %), then a preset (swell, splash, pulse, boom) and color, or amp,speed,width[,damping[,color]]. |
#fx.set:preset|physics[,color] |
Redesign the default wave (same tail as ripple; none clears the tint). |
#fx.shake:px[,ms] |
Shake the whole screen (a jolt on a wrong answer): ±10 px over 400 ms by default, mostly across, damped to rest (#fx.shake:16,300). On every platform, web and watch too, ripple layer or not; paint-only; nothing under reduced motion. |
#fx.touch:on|off|toggle |
Arm or disarm every-tap rippling. |
#me
This install's <me> row (declared in a <database>).
| Name | What it does |
|---|---|
#me.decrement:field[,amount] |
Subtract from a number or counter field (default 1). |
#me.delete |
Remove this install's <me> row ($me.exists is false). |
#me.increment:field[,amount] |
Add to a number or counter field (default 1). |
#me.update:field=value,… |
Set fields of this install's <me> row, creating it on first use. With no pairs inside a <form>, the form's <me> fields. |
Reserved ids
| Name | What it does |
|---|---|
ad |
Ads ($ad.*). |
app |
The app ($app.name, $app.version, $app.build). |
auth |
Sign-in ($auth.*). |
darkmode |
Dark mode ($darkmode, $darkmode.effective). |
db |
The database (#db, $db.*). |
device |
The device ($device.*). |
engine |
The engine ($engine.*). |
event |
An event's values in an action (\$event.value …). |
file |
A picked file in an action ($file.name …). |
fx |
The ripple layer (#fx, $fx.*). |
loop |
A loop's position inside <@foreach> ($loop.index …). |
me |
The person using this install ($me.*, #me; <me> in a <database>). |
notify |
Notifications ($notify.*). |
review |
The rate-this-app state ($review.*). |
scroll |
The page scroll ($scroll.y). |
sensor |
Sensors ($sensor.*). |
system |
System values ($system.time …). |