@thi.ng/rdom 1.5.6 → 1.6.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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-07-22T13:15:57Z
3
+ - **Last updated**: 2024-08-10T15:03:07Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ## [1.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@1.6.0) (2024-08-10)
13
+
14
+ #### 🚀 Features
15
+
16
+ - add `$inputToggle()` HOF event handler ([50e0c29](https://github.com/thi-ng/umbrella/commit/50e0c29))
17
+
12
18
  ### [1.5.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@1.5.1) (2024-07-06)
13
19
 
14
20
  #### 🩹 Bug fixes
package/README.md CHANGED
@@ -293,7 +293,7 @@ $compile(
293
293
  - [@thi.ng/hiccup](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup) - HTML/SVG/XML serialization of nested data structures, iterables & closures
294
294
  - [@thi.ng/hiccup-html](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-html) - 100+ type-checked HTML5 element functions for [@thi.ng/hiccup](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup) related infrastructure
295
295
  - [@thi.ng/hiccup-svg](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-svg) - SVG element functions for [@thi.ng/hiccup](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup) & related tooling
296
- - [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/develop/packages/transducers) - Lightweight transducer implementations for ES6 / TypeScript
296
+ - [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/develop/packages/transducers) - Collection of ~170 lightweight, composable transducers, reducers, generators, iterators for functional data transformations
297
297
 
298
298
  ## Installation
299
299
 
@@ -315,7 +315,7 @@ Browser ESM import:
315
315
 
316
316
  [JSDelivr documentation](https://www.jsdelivr.com/)
317
317
 
318
- Package sizes (brotli'd, pre-treeshake): ESM: 4.27 KB
318
+ Package sizes (brotli'd, pre-treeshake): ESM: 4.28 KB
319
319
 
320
320
  ## Dependencies
321
321
 
@@ -332,13 +332,14 @@ Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
332
332
 
333
333
  ## Usage examples
334
334
 
335
- 45 projects in this repo's
335
+ 47 projects in this repo's
336
336
  [/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
337
337
  directory are using this package:
338
338
 
339
339
  | Screenshot | Description | Live demo | Source |
340
340
  |:----------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------|:----------------------------------------------------------|:---------------------------------------------------------------------------------------|
341
341
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/big-font.png" width="240"/> | Large ASCII font text generator using @thi.ng/rdom | [Demo](https://demo.thi.ng/umbrella/big-font/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/big-font) |
342
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/bitmap-font.gif" width="240"/> | Figlet-style bitmap font creation with transducers | [Demo](https://demo.thi.ng/umbrella/bitmap-font/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/bitmap-font) |
342
343
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/blurhash.jpg" width="240"/> | Interactive & reactive image blurhash generator | [Demo](https://demo.thi.ng/umbrella/blurhash/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/blurhash) |
343
344
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/canvas-recorder.png" width="240"/> | Self-modifying, animated typographic grid with emergent complex patterns | [Demo](https://demo.thi.ng/umbrella/canvas-recorder/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/canvas-recorder) |
344
345
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/color-themes.png" width="240"/> | Probabilistic color theme generator | [Demo](https://demo.thi.ng/umbrella/color-themes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/color-themes) |
@@ -378,6 +379,7 @@ directory are using this package:
378
379
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rstream-system-bus.png" width="240"/> | Declarative component-based system with central rstream-based pubsub event bus | [Demo](https://demo.thi.ng/umbrella/rstream-system-bus/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rstream-system-bus) |
379
380
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/stacked-layout.png" width="240"/> | Responsive & reactively computed stacked column layout | [Demo](https://demo.thi.ng/umbrella/stacked-layout/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/stacked-layout) |
380
381
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/svg-resample.png" width="240"/> | SVG path parsing & dynamic resampling | [Demo](https://demo.thi.ng/umbrella/svg-resample/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/svg-resample) |
382
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/thing-browser.avif" width="240"/> | Tree-based UI to find & explore thi.ng projects via their associated keywords | [Demo](https://demo.thi.ng/umbrella/thing-browser/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/thing-browser) |
381
383
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/thing-packages-quiz.avif" width="240"/> | thi.ng/rdom & thi.ng/rstream based quiz to guess thi.ng package names | [Demo](https://demo.thi.ng/umbrella/thing-packages-quiz/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/thing-packages-quiz) |
382
384
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/trace-bitmap.jpg" width="240"/> | Multi-layer vectorization & dithering of bitmap images | [Demo](https://demo.thi.ng/umbrella/trace-bitmap/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/trace-bitmap) |
383
385
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/viz-ridge-lines.avif" width="240"/> | Interactive ridge-line plot | [Demo](https://demo.thi.ng/umbrella/viz-ridge-lines/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/viz-ridge-lines) |
package/event.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ISubscriber } from "@thi.ng/rstream";
1
+ import type { ISubscriber, ISubscription } from "@thi.ng/rstream";
2
2
  /**
3
3
  * HOF DOM event listener to emit element's value on given stream.
4
4
  *
@@ -39,6 +39,13 @@ export declare const $inputCheckbox: (stream: ISubscriber<boolean>) => (e: Event
39
39
  * @param stream -
40
40
  */
41
41
  export declare const $inputTrigger: (stream: ISubscriber<boolean>) => () => void;
42
+ /**
43
+ * HOF DOM event listener to emit the complement value of the given stream's
44
+ * current value when event is triggered (i.e. a switch/toggle behavior).
45
+ *
46
+ * @param stream -
47
+ */
48
+ export declare const $inputToggle: (stream: ISubscription<boolean, boolean>) => () => void;
42
49
  /**
43
50
  * HOF DOM event listener to emit a file input's first selected file on given
44
51
  * stream.
package/event.js CHANGED
@@ -3,6 +3,7 @@ const $input = (stream) => (e) => stream.next(e.target.value);
3
3
  const $inputNum = (stream, fallback = 0) => (e) => stream.next(maybeParseFloat(e.target.value, fallback));
4
4
  const $inputCheckbox = (stream) => (e) => stream.next(e.target.checked);
5
5
  const $inputTrigger = (stream) => () => stream.next(true);
6
+ const $inputToggle = (stream) => () => stream.next(!stream.deref());
6
7
  const $inputFile = (stream) => (e) => stream.next(e.target.files[0]);
7
8
  const $inputFiles = (stream) => (e) => stream.next(e.target.files);
8
9
  export {
@@ -11,5 +12,6 @@ export {
11
12
  $inputFile,
12
13
  $inputFiles,
13
14
  $inputNum,
15
+ $inputToggle,
14
16
  $inputTrigger
15
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rdom",
3
- "version": "1.5.6",
3
+ "version": "1.6.0",
4
4
  "description": "Lightweight, reactive, VDOM-less UI/DOM components with async lifecycle and @thi.ng/hiccup compatible",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,20 +37,20 @@
37
37
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
38
38
  },
39
39
  "dependencies": {
40
- "@thi.ng/api": "^8.11.7",
41
- "@thi.ng/checks": "^3.6.9",
42
- "@thi.ng/errors": "^2.5.13",
43
- "@thi.ng/hiccup": "^5.2.7",
44
- "@thi.ng/paths": "^5.1.87",
45
- "@thi.ng/prefixes": "^2.3.24",
46
- "@thi.ng/rstream": "^8.5.9",
47
- "@thi.ng/strings": "^3.8.1"
40
+ "@thi.ng/api": "^8.11.8",
41
+ "@thi.ng/checks": "^3.6.10",
42
+ "@thi.ng/errors": "^2.5.14",
43
+ "@thi.ng/hiccup": "^5.2.8",
44
+ "@thi.ng/paths": "^5.1.88",
45
+ "@thi.ng/prefixes": "^2.3.25",
46
+ "@thi.ng/rstream": "^8.5.10",
47
+ "@thi.ng/strings": "^3.8.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@microsoft/api-extractor": "^7.47.0",
50
+ "@microsoft/api-extractor": "^7.47.5",
51
51
  "esbuild": "^0.23.0",
52
- "typedoc": "^0.26.3",
53
- "typescript": "^5.5.3"
52
+ "typedoc": "^0.26.5",
53
+ "typescript": "^5.5.4"
54
54
  },
55
55
  "keywords": [
56
56
  "async",
@@ -62,6 +62,7 @@
62
62
  "dom",
63
63
  "hiccup",
64
64
  "html",
65
+ "lifecycle",
65
66
  "reactive",
66
67
  "rstream",
67
68
  "svg",
@@ -145,5 +146,5 @@
145
146
  ],
146
147
  "year": 2020
147
148
  },
148
- "gitHead": "ec052b25dff4db6c4d1748e946c38fb5cf403dbf\n"
149
+ "gitHead": "ec78f98d015e4d214a0b840e72e497407807daf3\n"
149
150
  }