@inglorious/web 4.0.11 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -527,7 +527,7 @@ test("full user interaction flow", () => {
527
527
  #### Testing Computed State
528
528
 
529
529
  ```javascript
530
- import { createSelector } from "@inglorious/store"
530
+ import { compute } from "@inglorious/store"
531
531
 
532
532
  test("filtered todos excludes completed", () => {
533
533
  const todos = [
@@ -536,8 +536,9 @@ test("filtered todos excludes completed", () => {
536
536
  { id: 3, text: "Write tests", completed: false },
537
537
  ]
538
538
 
539
- const getActiveTodos = createSelector([() => todos], (todos) =>
540
- todos.filter((t) => !t.completed),
539
+ const getActiveTodos = compute(
540
+ (todos) => todos.filter((t) => !t.completed),
541
+ [() => todos],
541
542
  )
542
543
 
543
544
  const result = getActiveTodos()
@@ -1506,7 +1507,8 @@ import {
1506
1507
  // from @inglorious/store
1507
1508
  createStore,
1508
1509
  createDevtools,
1509
- createSelector,
1510
+ compute,
1511
+ createSelector, // for Redux compatibility
1510
1512
  // from @inglorious/store/test
1511
1513
  trigger,
1512
1514
  // from lit-html
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/web",
3
- "version": "4.0.11",
3
+ "version": "4.1.0",
4
4
  "description": "A new web framework that leverages the power of the Inglorious Store combined with the performance and simplicity of lit-html.",
5
5
  "author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",
@@ -68,7 +68,7 @@
68
68
  "dependencies": {
69
69
  "@lit-labs/ssr-client": "^1.1.8",
70
70
  "lit-html": "^3.3.1",
71
- "@inglorious/store": "9.0.1",
71
+ "@inglorious/store": "9.1.0",
72
72
  "@inglorious/utils": "3.7.2"
73
73
  },
74
74
  "devDependencies": {
package/src/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export { mount } from "./mount.js"
2
2
  export { createStore } from "@inglorious/store"
3
3
  export { createDevtools } from "@inglorious/store/client/devtools.js"
4
+ export { compute } from "@inglorious/store/select.js"
4
5
  export { createSelector } from "@inglorious/store/select.js"
5
6
  export { trigger } from "@inglorious/store/test.js"
6
7
  export { html, svg } from "lit-html"
package/types/store.d.ts CHANGED
@@ -7,6 +7,7 @@ export {
7
7
  TypesConfig,
8
8
  } from "@inglorious/store"
9
9
 
10
+ export { compute } from "@inglorious/store/select"
10
11
  export { createSelector } from "@inglorious/store/select"
11
12
  export { trigger } from "@inglorious/store/test"
12
13