@e280/sly 0.2.0-22 → 0.2.0-23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e280/sly",
3
- "version": "0.2.0-22",
3
+ "version": "0.2.0-23",
4
4
  "description": "web shadow views",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -2,14 +2,14 @@
2
2
  import {DropFirst, ob} from "@e280/stz"
3
3
  import {ComponentClass, View, ViewProps} from "../types.js"
4
4
 
5
- export function contextualizeView<C, V extends View<any[]>>(
5
+ export function contextualizeView<C, V extends View<any>>(
6
6
  context: C,
7
7
  view: V,
8
8
  ): View<DropFirst<ViewProps<V>>> {
9
9
  return view.transmute((...p: any[]) => [context, ...p]) as any
10
10
  }
11
11
 
12
- export function contextualizeViews<C, Vs extends Record<string, View<any[]>>>(
12
+ export function contextualizeViews<C, Vs extends Record<string, View<any>>>(
13
13
  context: C,
14
14
  views: Vs,
15
15
  ): {[K in keyof Vs]: View<DropFirst<ViewProps<Vs[K]>>>} {
package/x/index.html CHANGED
@@ -131,7 +131,7 @@ body {
131
131
  <img class=icon alt="" src="/assets/favicon.png"/>
132
132
  <h1>sly testing page</h1>
133
133
  <p><a href="https://github.com/e280/sly">github.com/e280/sly</a></p>
134
- <p class=lil>v0.2.0-22</p>
134
+ <p class=lil>v0.2.0-23</p>
135
135
 
136
136
  <fastcount-element></fastcount-element>
137
137
  <counter-component start=280 step=2>component</counter-component>
@@ -1,7 +1,7 @@
1
1
  import { DropFirst } from "@e280/stz";
2
2
  import { ComponentClass, View, ViewProps } from "../types.js";
3
- export declare function contextualizeView<C, V extends View<any[]>>(context: C, view: V): View<DropFirst<ViewProps<V>>>;
4
- export declare function contextualizeViews<C, Vs extends Record<string, View<any[]>>>(context: C, views: Vs): {
3
+ export declare function contextualizeView<C, V extends View<any>>(context: C, view: V): View<DropFirst<ViewProps<V>>>;
4
+ export declare function contextualizeViews<C, Vs extends Record<string, View<any>>>(context: C, views: Vs): {
5
5
  [K in keyof Vs]: View<DropFirst<ViewProps<Vs[K]>>>;
6
6
  };
7
7
  export declare function getViews<Cs extends Record<string, ComponentClass<any, any>>>(components: Cs): { [K in keyof Cs]: View<DropFirst<ViewProps<Cs[K]["view"]>>>; };