* Use ResizeObserver/IntersectionObserver for per-output resize handling
Replace the old window-resize + Bootstrap event listener approach with
per-output ResizeObserver, IntersectionObserver, and MutationObserver.
Each bound output now gets its own observers that handle resize,
visibility, and theme changes independently, rather than relying on
global window resize events and jQuery Bootstrap hooks.
Also renames sendImageSize -> sendOutputInfo, simplifies bind.ts by
removing sendOutputHiddenState/maybeAddThemeObserver from BindInputsCtx,
and makes ImageOutputBinding.resize() actually set width/height on the
img element.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix observer cleanup, zoom-aware sizing, and edge cases in resize handling
- Disconnect ResizeObserver/IntersectionObserver/MutationObserver on unbind
to prevent callbacks firing on stale elements
- Restore getBoundingClientSizeBeforeZoom for size reporting to fix CSS zoom
regression (see #4135)
- Guard doTriggerResize against missing binding during teardown races
- Fix visibleOutputs set to properly remove hidden outputs
- Hoist observer setup out of doSendOutputInfo loop to avoid re-allocating
closures on every call
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix pending output observer callbacks after unbind
* Flush pending output info before input send
* test and restore theme refresh for output observers
* fix: avoid theme mutation observers for non-theme outputs
* Replace custom isHidden() with native el.checkVisibility()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Simplify observer setup: inline outputInfoObserver, consolidate cleanup, guard null IDs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Revert image resize width/height attr setting
The resize() method only needs to trigger the jQuery resize event for
brush re-projection. Setting width/height attrs on the <img> just
briefly stretched the stale plot before the server re-render replaced
it, with no meaningful effect on behavior.
* Restore image resize() to match main exactly
The previous commit over-scoped the revert by changing the method
signature. This restores the original signature from main.
* Remove review doc
* Skip doTriggerResize() during initial output info send
* Add isVisible() fallback for browsers without checkVisibility()
* `npm run build` (GitHub Actions)
* Update NEWS.md
* Remove unnecessary type cast in debounce cancel test
The debounce() function already returns DebouncedFunction with a
required `cancel` property. The cast to an optional `cancel` weakened
type checking.
* Defer sendOutputInfoFns.regular lookup to execution time
Wrap setTimeout callbacks with arrow functions so regular is resolved
at call time rather than captured when it may still be undefined.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
* Increment version number to 1.13.0.9000
* `npm run build` (GitHub Actions)
* Sync package version (GitHub Actions)
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
* Change license from GPL-3 to MIT
Updated the project license from GPL-3 to MIT in DESCRIPTION, LICENSE, LICENSE.md, README.md, and package.json. Added LICENSE.md with the MIT license text and updated .Rbuildignore to exclude LICENSE.md from builds.
* `npm run build` (GitHub Actions)
* Update LICENSE and add LICENSE.note
Replaced the LICENSE file content with a summary including year and copyright holder. Moved detailed third-party license information to a new LICENSE.note file.
* Remove R check log file
Deleted the ..Rcheck/00check.log file, likely to clean up generated or temporary files from the repository.
* v1.11.1 release candidate
* `yarn build` (GitHub Actions)
* Revert actionButton()/actionLink() implementation to v1.11.0's behavior (re-introducing #4239)
* Minimal fix to address the regression in #4239
Ideally we'd fix this issue, and also get updateActionButton() working with HTML labels, but thanks to today's release of kinesis (which snapshots all of actionButton()s markup), and CRAN dragging their feet to accept our original submission (which was fine, by the way), we can't have nice things
* `yarn build` (GitHub Actions)
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
* fix: Schedule modal removal for transitioning modals
* refactor: Simplify and both call and schedule modal hiding at same time
* Increment version number to 1.10.0.9000
* docs: Add NEWS entry
* First pass at a proper state machine for managing output progress state
* `yarn build` (GitHub Actions)
* Add useBusyIndicators(), spinnerOptions(), and pulseOptions()
* Bring in new spinner defaults
* Use an actual div instead of a pseudo-element since chromium can't be trusted to show them when animated
* Revert "Use an actual div instead of a pseudo-element since chromium can't be trusted to show them when animated"
This reverts commit 6167c1dfd7.
* Embed animation inside svg (to avoid Chromium bug). Consolidate options into a singular busyIndicatorOptions()
* Add to pkgdown reference
* `devtools::document()` (GitHub Actions)
* `yarn build` (GitHub Actions)
* Bump version
* `yarn build` (GitHub Actions)
* Sync package version (GitHub Actions)
* Apply suggestions from code review
Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
* Update snapshots
* `devtools::document()` (GitHub Actions)
* Address feedback
* Bring in more spinner type options
* fix use of fs
* Code review
* `devtools::document()` (GitHub Actions)
* Sync package version (GitHub Actions)
* Update snapshots
* Fix comments
* Make snapshot consistent cross-platform
* Fix namespace issue
* Reduce specificity of position relative
* Skip snapshot on windows; update news
* Whoops
* Scope spinner customizations to parent element by default
* Update snapshots
* Reorder spinner types
* Set a private random seed in tests
* Better id naming
---------
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
* Start release candidate
* Get rid of warnings about qplot() usage in tests
* Clean up news
* `yarn build` (GitHub Actions)
* Sync package version (GitHub Actions)
* Remote remotes (htmltools is now in CRAN)
* Change header syntax in NEWS.md (to match what usethis does)
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>