@wrnrlr/prelude 0.2.27 → 0.2.29

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/deno.jsonc CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrnrlr/prelude",
3
- "version": "0.2.27",
3
+ "version": "0.2.28",
4
4
  "exports": {
5
5
  ".": "./src/mod.ts",
6
6
  "./style.css": "./src/style.css"
@@ -68,7 +68,7 @@ import { h, signal, render, Input } from '../src/mod.ts'
68
68
 
69
69
  function InputExample() {
70
70
  const name = signal('Bob')
71
- return h(Input, {value:()=>name})
71
+ return [h(Input, {value:()=>name}), name]
72
72
  }
73
73
 
74
74
  render(InputExample, document.getElementById('input_autosize'))
@@ -135,4 +135,9 @@ label {
135
135
  }
136
136
  }
137
137
 
138
+ input {
139
+ border: 1px solid gray;
140
+ padding: 0.5rem;
141
+ }
142
+
138
143
  </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wrnrlr/prelude",
3
3
  "type": "module",
4
- "version": "0.2.27",
4
+ "version": "0.2.29",
5
5
  "author": "Werner Laurensse",
6
6
  "description": "A signal based frontend library with fine-grained reactivity",
7
7
  "main": "./src/mod.ts",
package/src/form.js CHANGED
@@ -12,11 +12,16 @@ export function Form(props) {
12
12
  }
13
13
 
14
14
  export function Input(props) {
15
- props.onInput = ((e) => props.value((e?.target)?.value))
16
- props.autocomplete = props.autocomplete || 'off'
15
+ // props.onInput = ((e) => props.value((e?.target)?.value))
16
+ // const autocomplete = props.autocomplete || 'off'
17
17
  // const onInput = ((e) => props.value((e?.target)?.value))
18
18
  if (props.autosize) props.ref = (r) => props.autosize(r, props)
19
- return h('input', props)
19
+ return h('input', {
20
+ // value: props.value,
21
+ onInput: ((e) => props.value((e?.target)?.value)),
22
+ // autocomplete,
23
+ ...props
24
+ })
20
25
  }
21
26
 
22
27
  export function autosize(r, props) {
package/src/mod.ts CHANGED
@@ -7,7 +7,7 @@ export {r, type Runtime} from './runtime.ts'
7
7
  export type * from './hyperscript.ts'
8
8
  export {hyperscript} from './hyperscript.ts'
9
9
  export {h} from './web.ts'
10
- export {Router} from './router.js'
10
+ export {useNavigate, useParams, useSearch, Router} from './router.js'
11
11
  export {Switch, Match} from './switch.ts'
12
12
  export {resource,makeAbortable,abortable} from './resource.js'
13
13
  import {r} from './runtime.ts'