First release.
withBones() puts a placeholder around a Shiny output. The placeholder
has the shape of the content, and the shape comes from the class of the
output.stale = FALSE
to show the skeleton again instead.bones_skeleton() makes a placeholder on its own, for use where there
is no Shiny output. It takes space in its container, and brings its
stylesheet, its animation and its colours.type = "bar", "line",
"area", "scatter", "histogram", "pie" or "heatmap". A
plotOutput() with no type gets the bar shape, as before.type. New
shapes: "map" (leaflet, tmap, mapview, mapdeck, mapgl, googleway,
threejs globe), "network" (visNetwork, DiagrammeR, networkD3,
collapsibleTree), "timeline" (timevis) and "wordcloud" (wordcloud2).
dygraphs gets "line". ggiraph and other widgets that draw any chart
keep the bar shape.type: for example the search box and the pages
of DT, or the title and the spanner of gt. The space kept for each one
was measured in a browser. gt is found from gt 1.0.0; with an older gt,
give type = "gt".remember = FALSE.delay (300 ms), so a load that ends sooner
shows nothing. Once visible, they stay for at least min_time (500 ms).
Both are arguments of withBones() and bones_defaults().bones_defaults() sets the colours, the corner radius, the animation and
the speed for the session. A colour set there is stronger than the theme.height works as in Shiny, so a number is pixels.stale, the animation
and the dark mode, so you can see each option at work.remember, the kind is stored in the browser, so
the first skeleton of the next visit has the right shape too. A type
that you give always wins.bones_auto() puts each Shiny output in a UI in withBones(), so an
app gets skeletons with one call. It keeps an output that is already
wrapped, and leaves alone an inline output and the ids in exclude.
Other arguments go to each wrapper. A bslib page keeps its class and
its theme."cascade", where each bar, cell or line lights up
a little after the one before, and "sweep", where one band of light
crosses the whole placeholder. Both stop for users who ask to reduce
motion.withBones(skeleton = ) takes a placeholder of your own, for a layout that
no built-in shape fits. Build it from bones_block(), a grey block with the
colours and the animation of bones, and any tags around it. It waits for
delay, keeps the space of the content, and keeps stale content, as a
built-in shape does.