`runtime.include` no longer handles liveUpdate stuff; this is now handled by `runtime-meteor.js` `runtime-meteor.js` exposes `info` Object when performing file includes via `blade._includeInfo`. The Blade smart package now generates Template functions that read `blade._includeInfo` and pass it into the template. Then, as normal, the Template function will return reactive HTML and modify `info` as an intended side-effect. `runtime-meteor.js` has been modified to determine whether or not the included template contains any block declarations, and if not, reactive HTML is injected into the template's HTML buffer. If block definitions were used, then the template's HTML buffer is left untouched, as it already contained non-reactive HTML. Fixes #139.
Compiler now inserts `__.bd=1` into templates if they contain any block declarations, even if the block is not declared at runtime Cleanup runtime: remove unsafe block action stuff, etc. Includes now check `info.bd` to see if the included template contains any block declarations; if not, the included HTML can be safely captured and wrapped in a branch label (closes #116) "foreach" items are now separately reactive and wrapped in `LiveUpdate.isolate` calls
Added sane branch label for constant block Compiler now always exposes filename via buf.filename runtime: modified info.eventHandlers to match Meteor's event map specification runtime: Updated blade.LiveUpdate object with sane no-op functions Live UI plugin: - major re-work - now depends on Spark standalone package (see https://github.com/meteor/meteor/wiki/Spark) - Removed blade.Runtime.render(...) - Removed Context code (this is a part of Spark) - Landmarks have preservation enabled by default using preserve-inputs package (see https://github.com/meteor/meteor/blob/master/packages/preserve-inputs/preserve-inputs.js) Added some tests Added some documentation
Refactored Meteor smart package Improved Meteor runtime to allow included templates to access their helpers (addresses #103) - Fix not tested liveui: Added on_invalidate_clean function to Context instead of relying on the function's name to be set. Uglify can mangle function names.
liveui: Added Context.destory() method, which only calls "clean" invalidation functions liveui: Model.get's invalidation function is now a "clean" invalidation function liveui: Added the concept of render Context identifiers, which can be used to ensure that certain Context's are automatically cleaned up without being invalidated. This is used by the renderTo() function, which allows cleanup invalidation functions to be called when a template is rendered on the same DOM element.