@ixfx/ui 0.39.1 → 0.40.1
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/LICENSE +6 -18
- package/dist/src/rx/dom-source.js +3 -3
- package/dist/src/rx/dom.d.ts +3 -3
- package/dist/src/rx/dom.d.ts.map +1 -1
- package/dist/src/rx/dom.js +4 -3
- package/package.json +6 -6
package/LICENSE
CHANGED
@@ -77,26 +77,14 @@ SOFTWARE.
|
|
77
77
|
|
78
78
|
----
|
79
79
|
|
80
|
-
Package:
|
80
|
+
Package: colorizr
|
81
81
|
|
82
|
-
|
82
|
+
https://github.com/gilbarbara/colorizr
|
83
83
|
|
84
|
-
Copyright (c)
|
84
|
+
Copyright (c) 2015 Gil Barbara
|
85
85
|
|
86
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
87
|
-
of this software and associated documentation files (the "Software"), to deal
|
88
|
-
in the Software without restriction, including without limitation the rights
|
89
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
90
|
-
copies of the Software, and to permit persons to whom the Software is
|
91
|
-
furnished to do so, subject to the following conditions:
|
86
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
92
87
|
|
93
|
-
The above copyright notice and this permission notice shall be included in all
|
94
|
-
copies or substantial portions of the Software.
|
88
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
95
89
|
|
96
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
97
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
98
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
99
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
100
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
101
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
102
|
-
SOFTWARE.
|
90
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -57,12 +57,12 @@ export function domHslInputValue(targetOrQuery, options = {}) {
|
|
57
57
|
},
|
58
58
|
});
|
59
59
|
const rx = transform(input, v => {
|
60
|
-
return Colour.HslSpace.
|
60
|
+
return Colour.HslSpace.fromCss(v, { scalar: true, ensureSafe: true });
|
61
61
|
});
|
62
62
|
return {
|
63
63
|
...rx,
|
64
64
|
last() {
|
65
|
-
return Colour.HslSpace.
|
65
|
+
return Colour.HslSpace.fromCss(input.last(), { scalar: true, ensureSafe: true });
|
66
66
|
},
|
67
67
|
set(value) {
|
68
68
|
input.set(Colour.HslSpace.toCssString(value));
|
@@ -257,7 +257,7 @@ export function domForm(formElOrQuery, options = {}) {
|
|
257
257
|
}
|
258
258
|
else if (typeHint === `colour`) {
|
259
259
|
const vRgb = Colour.toCssColour(vString);
|
260
|
-
entries.push([k, Colour.SrgbSpace.
|
260
|
+
entries.push([k, Colour.SrgbSpace.fromCss(vRgb, { scalar: false })]);
|
261
261
|
}
|
262
262
|
else {
|
263
263
|
entries.push([k, v.toString()]);
|
package/dist/src/rx/dom.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { Pathed } from "@ixfx/core/records";
|
2
2
|
import * as Rx from "@ixfx/rx";
|
3
3
|
import type { ElementsOptions, PipeDomBinding, BindUpdateOpts, DomBindSourceValue, DomBindValueTarget, DomBindUnresolvedSource } from './dom-types.js';
|
4
4
|
/**
|
@@ -10,7 +10,7 @@ export declare function fromDomQuery(query: string): Rx.Reactive<HTMLElement[]>
|
|
10
10
|
set(value: HTMLElement[]): void;
|
11
11
|
} & {
|
12
12
|
onField(fieldName: string, handler: (result: Rx.ObjectFieldHandler) => void): () => void;
|
13
|
-
onDiff(changes: (changes: PathDataChange<any>[]) => void): () => void;
|
13
|
+
onDiff(changes: (changes: Pathed.PathDataChange<any>[]) => void): () => void;
|
14
14
|
update(changedPart: (import("@ixfx/core").RecursivePartial<HTMLElement> | undefined)[]): HTMLElement[];
|
15
15
|
updateField(field: string, value: any): void;
|
16
16
|
} & {
|
@@ -216,7 +216,7 @@ export declare const bindUpdate: <V>(source: Rx.Reactive<V>, elOrQuery: string |
|
|
216
216
|
* @param opts
|
217
217
|
* @returns
|
218
218
|
*/
|
219
|
-
export declare const bindDiffUpdate: <V>(source: Rx.ReactiveDiff<V>, elOrQuery: string | HTMLElement | null, updater: (diffs: PathDataChange<any>[], el: HTMLElement) => void, opts?: Partial<BindUpdateOpts<V>>) => PipeDomBinding & {
|
219
|
+
export declare const bindDiffUpdate: <V>(source: Rx.ReactiveDiff<V>, elOrQuery: string | HTMLElement | null, updater: (diffs: Pathed.PathDataChange<any>[], el: HTMLElement) => void, opts?: Partial<BindUpdateOpts<V>>) => PipeDomBinding & {
|
220
220
|
refresh: () => void;
|
221
221
|
};
|
222
222
|
/**
|
package/dist/src/rx/dom.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/rx/dom.ts"],"names":[],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AY,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,OAAO,CAAC,eAAe,CAAC,SAyJvI,CAAC;AAYF,wBAAgB,GAAG;;;;;;;;;;;;;;;;;;;0BASG,KAAK,GAAG,SAAS;;;;;;;8BAAjB,KAAK,GAAG,SAAS;;;;;;EAWtC"}
|
package/dist/src/rx/dom.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
//import * as Immutable from "@ixfx/core/records";
|
2
2
|
import { resolveEl } from "@ixfx/dom";
|
3
|
-
import {
|
3
|
+
import { Pathed } from "@ixfx/core/records";
|
4
4
|
import * as Rx from "@ixfx/rx";
|
5
5
|
import * as RxFrom from "@ixfx/rx/from";
|
6
6
|
import { findBySomeKey as mapFindBySomeKey } from "@ixfx/core/maps";
|
@@ -644,7 +644,7 @@ export const elements = (source, options) => {
|
|
644
644
|
// Create
|
645
645
|
console.log(`Rx.Dom.elements.changes no previous. path: ${path}`);
|
646
646
|
create(path, d.value);
|
647
|
-
const subdata = [...getPathsAndData(d.value, false, Number.MAX_SAFE_INTEGER, path)];
|
647
|
+
const subdata = [...Pathed.getPathsAndData(d.value, false, Number.MAX_SAFE_INTEGER, path)];
|
648
648
|
console.log(subdata);
|
649
649
|
for (const dd of subdata) {
|
650
650
|
if (!seenPaths.has(dd.path)) {
|
@@ -684,6 +684,7 @@ export const elements = (source, options) => {
|
|
684
684
|
*/
|
685
685
|
source.onDiff(value => {
|
686
686
|
//console.log(`Rx.Dom.elements diff ${ JSON.stringify(value) } `);
|
687
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
687
688
|
changes(value);
|
688
689
|
});
|
689
690
|
// Source has an initial value, use that
|
@@ -692,7 +693,7 @@ export const elements = (source, options) => {
|
|
692
693
|
// Get data of value as a set of paths and data
|
693
694
|
// but only at first level of depth, because changes() will probe
|
694
695
|
// deeper itself
|
695
|
-
changes([...getPathsAndData(last, false, 1)]);
|
696
|
+
changes([...Pathed.getPathsAndData(last, false, 1)]);
|
696
697
|
}
|
697
698
|
};
|
698
699
|
/**
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ixfx/ui",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.40.1",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"sideEffects": false,
|
@@ -8,11 +8,11 @@
|
|
8
8
|
"dist/"
|
9
9
|
],
|
10
10
|
"dependencies": {
|
11
|
-
"@ixfx/
|
12
|
-
"@ixfx/
|
13
|
-
"@ixfx/visual": "^0.
|
14
|
-
"@ixfx/
|
15
|
-
"@ixfx/rx": "^0.
|
11
|
+
"@ixfx/collections": "^0.42.1",
|
12
|
+
"@ixfx/core": "^0.42.0",
|
13
|
+
"@ixfx/visual": "^0.41.0",
|
14
|
+
"@ixfx/dom": "^0.41.0",
|
15
|
+
"@ixfx/rx": "^0.40.1"
|
16
16
|
},
|
17
17
|
"exports": {
|
18
18
|
".": {
|