paparazzi 0.0.0.9000
pz_stage_annotate()gainscaption_side, the page default for the side of newpz_annotate_caption()captions."bottom"remains the default and a per-callsidestill overrides it;pz_annotate_caption()’ssideargument now defaults toNULL, meaning the staged value.pz_serve_static()gainsroot, the directory to serve as the server root for an.htmlfile. Use it when the page references assets outside its own directory, such as../deps/styles.css; the handle URL points at the file relative toroot.rootis only supported for files, must be an existing directory containing the file, and can’t be the filesystem root.pz_open()serves.htmlfiles over HTTP withpz_serve_static()when httpuv is installed, so pages get HTTP-only behavior such as the browser’s back/forward cache;pz_close()stops the one-off server. The file’s directory is the server root, so pages referencing assets outside it need an explicitfile://URL. Without httpuv,.htmlfiles still open asfile://.pz_act_drag()gains named-onlypreview = TRUE: recorded HTML5 drags with a visible cursor carry a static source image and briefly settle to the same surviving source after drop. Unsafe or uncertain paparazzi redactions and optional preview failures warn and preserve the drag.preview = FALSEdisables both the image and settling.Persistent captions remain visible on the last GIF frame when recordings repeat captured frames, such as during
pz_record_hold().Breaking:
pz_annotate_callout()’sarrowargument is renamedleader.TRUE(the default) draws a shaft with an arrow at the target,FALSEleaves a tooltip-style bubble, and a named character vector sets a decoration per end (c(start = "dot", end = "bar");"none","arrow","dot","bar").Callouts are themeable and measurable:
pz_annotate_callout()andpz_stage_annotate()gainfillandtext_colorfor the bubble chrome (defaults keep the dark bubble with white text),stroke_width(one width shared withpz_annotate()marks, replacing the old 2-vs-3 split, with decoration sizes scaled to it) anddistance(the bubble-to-target gap, default 24 CSS px with a leader and 8 without, replacing the hardcoded 8px so leaders read as arrows).pz_annotate()badges follow their mark’s color and gain per-calllabel_fill/label_text_coloroverrides.Cursor overlays now use bundled SVG artwork for the full set of CSS cursor keywords, including
wait,zoom-in, directional resize, andnone. CSS cursor URLs use their fallback keyword; custom URL images are not drawn.First development version. paparazzi drives a headless Chrome browser from R through chromote, with one
|>chain per script: open pages and Shiny apps (pz_open(),pz_serve_shiny()), find elements (pz_loc(),pz_find()), act on them (pz_act_click(),pz_act_type(),pz_set_shiny_input(), …), check the page with retrying expectations (pz_expect_*()), and capture screenshots and recordings (pz_screenshot(),pz_record()).paparazzi requires R 4.1.0 or later, which added the native pipe
|>. The pipe appears throughout the examples and documentation.
