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

@thi.ng/hdom

Package Overview
Dependencies
Maintainers
1
Versions
278
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/hdom - npm Package Compare versions

Comparing version 5.1.0 to 5.2.0

11

api.d.ts

@@ -91,2 +91,13 @@ import { IObjectOf } from "@thi.ng/api/api";

/**
* Attempts to auto-expand/deref the given keys in the user supplied
* context object (`ctx` option) prior to *each* tree normalization.
* All of these values should implement the thi.ng/api `IDeref`
* interface (e.g. atoms, cursors, views, rstreams etc.). This
* feature can be used to define dynamic contexts linked to the main
* app state, e.g. using derived views provided by thi.ng/atom.
*
* Default: none
*/
autoDerefKeys: PropertyKey[];
/**
* If true (default), each elements will receive an auto-generated

@@ -93,0 +104,0 @@ * `key` attribute (unless one already exists).

@@ -6,2 +6,13 @@ # Change Log

# [5.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom@5.1.0...@thi.ng/hdom@5.2.0) (2018-11-07)
### Features
* **hdom:** update auto-deref ctx behavior ([3016116](https://github.com/thi-ng/umbrella/commit/3016116))
# [5.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom@5.0.7...@thi.ng/hdom@5.1.0) (2018-11-06)

@@ -8,0 +19,0 @@

6

package.json
{
"name": "@thi.ng/hdom",
"version": "5.1.0",
"version": "5.2.0",
"description": "Lightweight vanilla ES6 UI component trees with customizable branch-local behaviors",

@@ -36,3 +36,3 @@ "main": "./index.js",

"@thi.ng/equiv": "^0.1.13",
"@thi.ng/hiccup": "^2.5.0"
"@thi.ng/hiccup": "^2.6.0"
},

@@ -54,3 +54,3 @@ "keywords": [

},
"gitHead": "79a6a36568719ff379a87ea445fb13f49a60690a"
"gitHead": "6eaa5f5f5108fba3d24027ebbde65eccf2271208"
}

@@ -898,2 +898,8 @@ # @thi.ng/hdom

functions embedded in the tree (see below)
- `autoDerefKeys`: Attempts to auto-expand/deref the given keys in the
user supplied context object (`ctx` option) prior to *each* tree
normalization. All of these values should implement the thi.ng/api
`IDeref` interface (e.g. atoms, cursors, views, rstreams etc.). This
feature can be used to define dynamic contexts linked to the main app
state.
- `keys`: If true (default), each elements will receive an

@@ -1058,7 +1064,11 @@ auto-generated `key` attribute (unless one already exists).

Any context keys with values implementing the thi.ng/api `IDeref`
interface, will be automatically deref'd prior to each tree
normalization / redraw. This feature can be used to define dynamic
contexts linked to the main app state, e.g. using derived views provided
by thi.ng/atom.
If the `autoDerefKeys` option is enabled, the given keys in the user
supplied context object will be auto-expand/deref'd prior to *each* tree
normalization. All of these values should implement the thi.ng/api
`IDeref` interface (e.g. atoms, cursors, views, rstreams etc.). This
feature can be used to define dynamic contexts linked to the main app
state, e.g. using derived views provided by
[@thi.ng/atom](https://github.com/thi-ng/umbrella/tree/master/packages/atom),
[@thi.ng/rstream](https://github.com/thi-ng/umbrella/tree/master/packages/rstream)
etc.

@@ -1065,0 +1075,0 @@ ```ts

@@ -18,3 +18,3 @@ "use strict";

opts = Object.assign({ root: "app" }, opts);
opts.ctx = deref_1.derefContext(opts.ctx);
opts.ctx = deref_1.derefContext(opts.ctx, opts.autoDerefKeys);
const root = utils_1.resolveRoot(opts.root);

@@ -21,0 +21,0 @@ tree = impl.normalizeTree(opts, tree);

@@ -11,7 +11,9 @@ import { HDOMImplementation, HDOMOpts } from "./api";

* object (shallow copy) as first argument, as will life cycle methods
* in component objects. Any context keys with values implementing the
* thi.ng/api `IDeref` interface, will be automatically deref'd prior to
* each tree normalization / redraw. This feature can be used to define
* dynamic contexts linked to the main app state, e.g. using derived
* views provided by thi.ng/atom.
* in component objects. If the `autoDerefKeys` option is given, attempts
* to auto-expand/deref the given keys in the user supplied context
* object (`ctx` option) prior to *each* tree normalization. All of
* these values should implement the thi.ng/api `IDeref` interface (e.g.
* atoms, cursors, views, rstreams etc.). This feature can be used to
* define dynamic contexts linked to the main app state, e.g. using
* derived views provided by thi.ng/atom.
*

@@ -18,0 +20,0 @@ * **Selective updates**: No updates will be applied if the given hiccup

@@ -15,7 +15,9 @@ "use strict";

* object (shallow copy) as first argument, as will life cycle methods
* in component objects. Any context keys with values implementing the
* thi.ng/api `IDeref` interface, will be automatically deref'd prior to
* each tree normalization / redraw. This feature can be used to define
* dynamic contexts linked to the main app state, e.g. using derived
* views provided by thi.ng/atom.
* in component objects. If the `autoDerefKeys` option is given, attempts
* to auto-expand/deref the given keys in the user supplied context
* object (`ctx` option) prior to *each* tree normalization. All of
* these values should implement the thi.ng/api `IDeref` interface (e.g.
* atoms, cursors, views, rstreams etc.). This feature can be used to
* define dynamic contexts linked to the main app state, e.g. using
* derived views provided by thi.ng/atom.
*

@@ -56,3 +58,3 @@ * **Selective updates**: No updates will be applied if the given hiccup

if (isActive) {
_opts.ctx = deref_1.derefContext(opts.ctx);
_opts.ctx = deref_1.derefContext(opts.ctx, _opts.autoDerefKeys);
const curr = impl.normalizeTree(_opts, tree);

@@ -59,0 +61,0 @@ if (curr != null) {

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