Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bikeshaving/crank

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bikeshaving/crank - npm Package Compare versions

Comparing version 0.2.0-beta.4 to 0.2.0

24

CHANGELOG.md
# Changelog
## [0.2.0] - 2020-07-01
### Added
- UMD build
- crank-ref
- Context.prototype.schedule
- Context.prototype.cleanup
- Context.prototype.props
- Context.prototype.value
- Context dispatchEvent capturing
### Changed
- props are no longer rememebered between renders. For instance, rendering `<input checked />` and then `<input />` will not cause the checked prop to be deleted on the actual element.
- The internal Renderer API has been changed to use inheritance and away from the intrinsic generator API.
- Renderer.prototype.render and Context.prototype.refresh now return rendered values rather than undefined.
- The library is no longer transpiled.
- The esm directory in the package has been deleted. Refer to index, dom and html in the root of the package instead.
- Some types have been simplified
- Tag no longer takes a type parameter.
- The types Props, FunctionComponent, GeneratorComponent, IntrinsicProps, ChildIterator, ChildGenerator and Key have been deleted.
### Fixed
- Performance improvements in terms of execution time, runtime memory costs, and library size.
- Fixed Context.prototype.dispatchEvent not using stopPropagation and stopImmediatePropagation.
- Fixed nested SVG elements not rendering SVGElements in some cases.
- Improved error throwing to work with the call stack.
## [0.1.6] - 2020-05-25

@@ -3,0 +27,0 @@ - Backed out of a performance optimization where async generator components caused siblings to remain in the DOM

9

cjs/index.d.ts

@@ -205,5 +205,6 @@ /**

*
* @typeparam TNode - The type of the node for a specific rendering environment. It is the type of the return value of Renderer.prototype.create and Renderer.prototype.parse.
* @typeparam TRoot - The type of the root for a specific rendering environment. It is the type of the second parameter passed to Renderer.prototype.render, as well as the expected type of the root portal.
* @typeparam TResult - The type of the exposed values. It is the return value of Renderer.prototype.read, and revealed at various points of the renderer/element API.
* @typeparam TNode - The type of the node for a specific rendering environment.
* @typeparam TScope - Data which is passed down the tree.
* @typeparam TRoot - The type of the root for a specific rendering environment.
* @typeparam TResult - The type of the exposed values.
*/

@@ -460,3 +461,3 @@ declare class Renderer<TNode, TScope, TRoot = TNode, TResult = ElementValue<TNode>> {

/**
* A class which is instantiated and passed to every component as its this value. In addition to the element tree, contexts also form a tree. Components can use this context tree to communicate data upwards via events and downwards via provisions.
* A class which is instantiated and passed to every component as its this value. Contexts form a tree just like elements and all components in the element tree are connected via contexts. Components can use this tree to communicate data upwards via events and downwards via provisions.
* @typeparam TProps - The expected shape of the props passed to the component. Used to strongly type the Context iterator methods.

@@ -463,0 +464,0 @@ * @typeparam TResult - The readable element value type. It is used in places such as the return value of refresh and the argument passed to schedule/cleanup callbacks.

@@ -240,5 +240,6 @@ 'use strict';

*
* @typeparam TNode - The type of the node for a specific rendering environment. It is the type of the return value of Renderer.prototype.create and Renderer.prototype.parse.
* @typeparam TRoot - The type of the root for a specific rendering environment. It is the type of the second parameter passed to Renderer.prototype.render, as well as the expected type of the root portal.
* @typeparam TResult - The type of the exposed values. It is the return value of Renderer.prototype.read, and revealed at various points of the renderer/element API.
* @typeparam TNode - The type of the node for a specific rendering environment.
* @typeparam TScope - Data which is passed down the tree.
* @typeparam TRoot - The type of the root for a specific rendering environment.
* @typeparam TResult - The type of the exposed values.
*/

@@ -279,4 +280,3 @@ class Renderer {

}
const scope = undefined;
const value = update(this, root, portal, ctx, scope, portal);
const value = update(this, root, portal, ctx, undefined, portal);
// NOTE: we return the read child values of the portal because portals themselves have no readable value.

@@ -873,3 +873,3 @@ if (isPromiseLike(value)) {

/**
* A class which is instantiated and passed to every component as its this value. In addition to the element tree, contexts also form a tree. Components can use this context tree to communicate data upwards via events and downwards via provisions.
* A class which is instantiated and passed to every component as its this value. Contexts form a tree just like elements and all components in the element tree are connected via contexts. Components can use this tree to communicate data upwards via events and downwards via provisions.
* @typeparam TProps - The expected shape of the props passed to the component. Used to strongly type the Context iterator methods.

@@ -876,0 +876,0 @@ * @typeparam TResult - The readable element value type. It is used in places such as the return value of refresh and the argument passed to schedule/cleanup callbacks.

@@ -205,5 +205,6 @@ /**

*
* @typeparam TNode - The type of the node for a specific rendering environment. It is the type of the return value of Renderer.prototype.create and Renderer.prototype.parse.
* @typeparam TRoot - The type of the root for a specific rendering environment. It is the type of the second parameter passed to Renderer.prototype.render, as well as the expected type of the root portal.
* @typeparam TResult - The type of the exposed values. It is the return value of Renderer.prototype.read, and revealed at various points of the renderer/element API.
* @typeparam TNode - The type of the node for a specific rendering environment.
* @typeparam TScope - Data which is passed down the tree.
* @typeparam TRoot - The type of the root for a specific rendering environment.
* @typeparam TResult - The type of the exposed values.
*/

@@ -460,3 +461,3 @@ declare class Renderer<TNode, TScope, TRoot = TNode, TResult = ElementValue<TNode>> {

/**
* A class which is instantiated and passed to every component as its this value. In addition to the element tree, contexts also form a tree. Components can use this context tree to communicate data upwards via events and downwards via provisions.
* A class which is instantiated and passed to every component as its this value. Contexts form a tree just like elements and all components in the element tree are connected via contexts. Components can use this tree to communicate data upwards via events and downwards via provisions.
* @typeparam TProps - The expected shape of the props passed to the component. Used to strongly type the Context iterator methods.

@@ -463,0 +464,0 @@ * @typeparam TResult - The readable element value type. It is used in places such as the return value of refresh and the argument passed to schedule/cleanup callbacks.

@@ -236,5 +236,6 @@ /*** UTILITIES ***/

*
* @typeparam TNode - The type of the node for a specific rendering environment. It is the type of the return value of Renderer.prototype.create and Renderer.prototype.parse.
* @typeparam TRoot - The type of the root for a specific rendering environment. It is the type of the second parameter passed to Renderer.prototype.render, as well as the expected type of the root portal.
* @typeparam TResult - The type of the exposed values. It is the return value of Renderer.prototype.read, and revealed at various points of the renderer/element API.
* @typeparam TNode - The type of the node for a specific rendering environment.
* @typeparam TScope - Data which is passed down the tree.
* @typeparam TRoot - The type of the root for a specific rendering environment.
* @typeparam TResult - The type of the exposed values.
*/

@@ -275,4 +276,3 @@ class Renderer {

}
const scope = undefined;
const value = update(this, root, portal, ctx, scope, portal);
const value = update(this, root, portal, ctx, undefined, portal);
// NOTE: we return the read child values of the portal because portals themselves have no readable value.

@@ -869,3 +869,3 @@ if (isPromiseLike(value)) {

/**
* A class which is instantiated and passed to every component as its this value. In addition to the element tree, contexts also form a tree. Components can use this context tree to communicate data upwards via events and downwards via provisions.
* A class which is instantiated and passed to every component as its this value. Contexts form a tree just like elements and all components in the element tree are connected via contexts. Components can use this tree to communicate data upwards via events and downwards via provisions.
* @typeparam TProps - The expected shape of the props passed to the component. Used to strongly type the Context iterator methods.

@@ -872,0 +872,0 @@ * @typeparam TResult - The readable element value type. It is used in places such as the return value of refresh and the argument passed to schedule/cleanup callbacks.

{
"name": "@bikeshaving/crank",
"version": "0.2.0-beta.4",
"version": "0.2.0",
"description": "Write JSX-driven components with functions, promises and generators.",

@@ -5,0 +5,0 @@ "homepage": "https://crank.js.org",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc