Individual commits:
* Add last position cache
* Must be lower than percentage of next level.
* Fully working version with jsonc compression
* Switch to pako.js for both speed and efficiency
* compressed code is now an instance of Uint8Array
* Temporary fix for rebuildLayerPercentageLookup and purgeEmptyLayers
* Fix merge issues
* Fix prettier
* Fix prettier
* Calculate empty layers and percentage of layer in doAnalyse
* Delete all state when doing clear()
* Delete all state when doing clear()
* Add options to control compression. Allow to enable compression from the warning page.
* Do not always turn on compression by default.
* Correctly calculate the rendererEmptyLayers array.
* Only show "force compression" if compression is not already enabled.
* pre-commit fixes
* Use correct index and fix merge issues.
* Add some comments.
* Update src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_settings.jinja2 (Co-authored-by: Gina Häußge <gina@octoprint.org>)
* Move "Skip to this" up and make the threshold dependent on alwaysCompress setting.
* Remove redundant "Skip to this" (Co-authored-by: Gina Häußge <gina@octoprint.org>)
* Replace AVLTree with double binary search
* Remove unused variable
* reader.js
* Best return the correct variables
* Better compare with percentage of next layer.
* Fix several bugs and edge conditions
* Implement iterative binary search
* No point in going through the math if it can be only 1 layer.
* Add last position cache
* Remove AVLTree from repository
* Must be lower than percentage of next level.
* Look up the percentage value in the correct model.
* If we add extra zlifted element, we need to sort the layer.
* Remove caching and add lookup array to simplify code.
* Restore change.
* Also clear layerPercentageLookup on clear()
* Fix pre-commit issues.
* Fix pre-commit issues.
* 🔥 Remove now disabled sortLayers
* 🐛 Fix layer split in gcoded viewer
We now create a layer each per z-height, even if we
encounter the same z-height several times in a print.
This might also solve #2243, though I have not tested it yet.
Co-authored-by: Gina Häußge <gina@octoprint.org>
This allows browsers and other clients to calculate download progress
and detect if the download fails (they get less data than expected).
This is most useful when downloading multiple timelapses due to their
potential size.
This is a backport of PR #4313
If we are on py3 and thus can rely on pathvalidate, we'll now no longer
slugify uploaded files names, but try to keep them as close to the
original name as possible, including unicode and emoji and whatnot. This
requires the underlying file system to support this, so just in case the
old behaviour can be enforced by setting the config flag
feature.enforceReallyUniversalFilenames to true.
Closes#4078
Added an ES6 polyfill, fixed some minor issues in less.js, put less.js
into lib bundle again.
Further steps should be taken to ensure the core JS files stay ES5
compliant with regards to the use of arrow functions, let, const and so
on, at least the versions bundled into the webassets.
Closes#3920
It's no longer installable from source under OctoPi 0.14 due to an
unpinned setup_requires dependency on setuptools_scm, and since we still
have to support that installation scenario that is a problem. Thankfully
it's only used in the plugin manager for parsing the notice date, and
we can just use datetime.strptime for that.