sygnal 5.1.2 → 5.1.3
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/dist/index.cjs.js +13 -18
- package/dist/index.d.ts +5 -5
- package/dist/index.esm.js +15 -16
- package/package.json +1 -1
- package/src/cycle/dom/makeDOMDriver.ts +2 -2
- package/src/cycle/state/StateSource.ts +1 -1
- package/src/cycle/state/withState.ts +1 -1
- package/src/index.d.ts +5 -5
- package/src/index.ts +5 -5
- package/src/switchable.ts +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var xs$1 = require('xstream');
|
|
4
|
-
var
|
|
5
|
-
var concat$1 = require('xstream/extra/concat');
|
|
4
|
+
var dropRepeatsModule = require('xstream/extra/dropRepeats.js');
|
|
5
|
+
var concat$1 = require('xstream/extra/concat.js');
|
|
6
6
|
var h = require('snabbdom/build/h');
|
|
7
7
|
var init$1 = require('snabbdom/build/init');
|
|
8
8
|
var tovnode = require('snabbdom/build/tovnode');
|
|
@@ -12,14 +12,10 @@ var _class = require('snabbdom/build/modules/class');
|
|
|
12
12
|
var props = require('snabbdom/build/modules/props');
|
|
13
13
|
var attributes = require('snabbdom/build/modules/attributes');
|
|
14
14
|
var dataset = require('snabbdom/build/modules/dataset');
|
|
15
|
-
var sampleCombine = require('xstream/extra/sampleCombine');
|
|
15
|
+
var sampleCombine = require('xstream/extra/sampleCombine.js');
|
|
16
16
|
var delayModule = require('xstream/extra/delay.js');
|
|
17
|
-
var concatModule = require('xstream/extra/concat.js');
|
|
18
17
|
var debounceModule = require('xstream/extra/debounce.js');
|
|
19
|
-
var
|
|
20
|
-
var debounce$1 = require('xstream/extra/debounce');
|
|
21
|
-
var throttle = require('xstream/extra/throttle');
|
|
22
|
-
var delay$1 = require('xstream/extra/delay');
|
|
18
|
+
var throttle_js = require('xstream/extra/throttle.js');
|
|
23
19
|
|
|
24
20
|
function _interopNamespaceDefault(e) {
|
|
25
21
|
var n = Object.create(null);
|
|
@@ -39,11 +35,10 @@ function _interopNamespaceDefault(e) {
|
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
var xs__namespace = /*#__PURE__*/_interopNamespaceDefault(xs$1);
|
|
42
|
-
var
|
|
38
|
+
var dropRepeatsModule__namespace = /*#__PURE__*/_interopNamespaceDefault(dropRepeatsModule);
|
|
39
|
+
var concat__namespace = /*#__PURE__*/_interopNamespaceDefault(concat$1);
|
|
43
40
|
var delayModule__namespace = /*#__PURE__*/_interopNamespaceDefault(delayModule);
|
|
44
|
-
var concatModule__namespace = /*#__PURE__*/_interopNamespaceDefault(concatModule);
|
|
45
41
|
var debounceModule__namespace = /*#__PURE__*/_interopNamespaceDefault(debounceModule);
|
|
46
|
-
var dropRepeatsModule__namespace = /*#__PURE__*/_interopNamespaceDefault(dropRepeatsModule);
|
|
47
42
|
|
|
48
43
|
function getGlobal() {
|
|
49
44
|
let globalObj;
|
|
@@ -231,7 +226,7 @@ class StateSource {
|
|
|
231
226
|
this.isolateSink = isolateSink;
|
|
232
227
|
this._stream = stream
|
|
233
228
|
.filter(s => typeof s !== 'undefined')
|
|
234
|
-
.compose(
|
|
229
|
+
.compose(dropRepeatsModule())
|
|
235
230
|
.remember();
|
|
236
231
|
this._name = name;
|
|
237
232
|
this.stream = adapt(this._stream);
|
|
@@ -2080,7 +2075,7 @@ const Stream = xs__namespace.Stream ||
|
|
|
2080
2075
|
(xs__namespace.default && xs__namespace.default.Stream) ||
|
|
2081
2076
|
(xs && xs.Stream);
|
|
2082
2077
|
|
|
2083
|
-
const dropRepeats$1 = resolveInteropDefault(
|
|
2078
|
+
const dropRepeats$1 = resolveInteropDefault(dropRepeatsModule__namespace);
|
|
2084
2079
|
function switchable(factories, name$, initial, opts = {}) {
|
|
2085
2080
|
const { switched = ['DOM'], stateSourceName = 'STATE' } = opts;
|
|
2086
2081
|
const nameType = typeof name$;
|
|
@@ -2183,7 +2178,7 @@ function makeCommandSource(cmd) {
|
|
|
2183
2178
|
}
|
|
2184
2179
|
|
|
2185
2180
|
const delay = resolveInteropDefault(delayModule__namespace);
|
|
2186
|
-
const concat = resolveInteropDefault(
|
|
2181
|
+
const concat = resolveInteropDefault(concat__namespace);
|
|
2187
2182
|
const debounce = resolveInteropDefault(debounceModule__namespace);
|
|
2188
2183
|
const dropRepeats = resolveInteropDefault(dropRepeatsModule__namespace);
|
|
2189
2184
|
const ENVIRONMENT = (typeof window != 'undefined' && window) || (typeof process !== 'undefined' && process.env) || {};
|
|
@@ -6474,15 +6469,15 @@ function buildAttributes(data, selectorId, selectorClasses) {
|
|
|
6474
6469
|
return result;
|
|
6475
6470
|
}
|
|
6476
6471
|
|
|
6477
|
-
exports.dropRepeats =
|
|
6472
|
+
exports.dropRepeats = dropRepeatsModule;
|
|
6478
6473
|
Object.defineProperty(exports, 'h', {
|
|
6479
6474
|
enumerable: true,
|
|
6480
6475
|
get: function () { return h.h; }
|
|
6481
6476
|
});
|
|
6482
6477
|
exports.sampleCombine = sampleCombine;
|
|
6483
|
-
exports.
|
|
6484
|
-
exports.
|
|
6485
|
-
exports.
|
|
6478
|
+
exports.delay = delayModule;
|
|
6479
|
+
exports.debounce = debounceModule;
|
|
6480
|
+
exports.throttle = throttle_js;
|
|
6486
6481
|
exports.ABORT = ABORT;
|
|
6487
6482
|
exports.Collection = Collection;
|
|
6488
6483
|
exports.MainDOMSource = MainDOMSource;
|
package/dist/index.d.ts
CHANGED
|
@@ -614,11 +614,11 @@ export function renderToString(componentDef: any, options?: RenderToStringOption
|
|
|
614
614
|
|
|
615
615
|
export const xs: typeof xsDefault
|
|
616
616
|
|
|
617
|
-
export { default as debounce } from 'xstream/extra/debounce'
|
|
618
|
-
export { default as throttle } from 'xstream/extra/throttle'
|
|
619
|
-
export { default as delay } from 'xstream/extra/delay'
|
|
620
|
-
export { default as dropRepeats } from 'xstream/extra/dropRepeats'
|
|
621
|
-
export { default as sampleCombine } from 'xstream/extra/sampleCombine'
|
|
617
|
+
export { default as debounce } from 'xstream/extra/debounce.js'
|
|
618
|
+
export { default as throttle } from 'xstream/extra/throttle.js'
|
|
619
|
+
export { default as delay } from 'xstream/extra/delay.js'
|
|
620
|
+
export { default as dropRepeats } from 'xstream/extra/dropRepeats.js'
|
|
621
|
+
export { default as sampleCombine } from 'xstream/extra/sampleCombine.js'
|
|
622
622
|
|
|
623
623
|
export * from './cycle/dom/index'
|
|
624
624
|
export type { MemoryStream, Stream }
|
package/dist/index.esm.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as xs$1 from 'xstream';
|
|
2
2
|
import xs__default, { Stream as Stream$1, NO } from 'xstream';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
export { default as dropRepeats } from 'xstream/extra/dropRepeats';
|
|
6
|
-
import concat$1 from 'xstream/extra/concat';
|
|
3
|
+
import * as dropRepeatsModule from 'xstream/extra/dropRepeats.js';
|
|
4
|
+
import dropRepeatsModule__default from 'xstream/extra/dropRepeats.js';
|
|
5
|
+
export { default as dropRepeats } from 'xstream/extra/dropRepeats.js';
|
|
6
|
+
import * as concat$1 from 'xstream/extra/concat.js';
|
|
7
|
+
import concat__default from 'xstream/extra/concat.js';
|
|
7
8
|
import { h } from 'snabbdom/build/h';
|
|
8
9
|
export { h } from 'snabbdom/build/h';
|
|
9
10
|
import { init as init$1 } from 'snabbdom/build/init';
|
|
@@ -14,15 +15,13 @@ import { classModule } from 'snabbdom/build/modules/class';
|
|
|
14
15
|
import { propsModule } from 'snabbdom/build/modules/props';
|
|
15
16
|
import { attributesModule } from 'snabbdom/build/modules/attributes';
|
|
16
17
|
import { datasetModule } from 'snabbdom/build/modules/dataset';
|
|
17
|
-
import sampleCombine from 'xstream/extra/sampleCombine';
|
|
18
|
-
export { default as sampleCombine } from 'xstream/extra/sampleCombine';
|
|
18
|
+
import sampleCombine from 'xstream/extra/sampleCombine.js';
|
|
19
|
+
export { default as sampleCombine } from 'xstream/extra/sampleCombine.js';
|
|
19
20
|
import * as delayModule from 'xstream/extra/delay.js';
|
|
20
|
-
|
|
21
|
+
export { default as delay } from 'xstream/extra/delay.js';
|
|
21
22
|
import * as debounceModule from 'xstream/extra/debounce.js';
|
|
22
|
-
|
|
23
|
-
export { default as
|
|
24
|
-
export { default as throttle } from 'xstream/extra/throttle';
|
|
25
|
-
export { default as delay } from 'xstream/extra/delay';
|
|
23
|
+
export { default as debounce } from 'xstream/extra/debounce.js';
|
|
24
|
+
export { default as throttle } from 'xstream/extra/throttle.js';
|
|
26
25
|
|
|
27
26
|
function getGlobal() {
|
|
28
27
|
let globalObj;
|
|
@@ -210,7 +209,7 @@ class StateSource {
|
|
|
210
209
|
this.isolateSink = isolateSink;
|
|
211
210
|
this._stream = stream
|
|
212
211
|
.filter(s => typeof s !== 'undefined')
|
|
213
|
-
.compose(
|
|
212
|
+
.compose(dropRepeatsModule__default())
|
|
214
213
|
.remember();
|
|
215
214
|
this._name = name;
|
|
216
215
|
this.stream = adapt(this._stream);
|
|
@@ -592,7 +591,7 @@ function withState(main, name = 'state') {
|
|
|
592
591
|
innerSources[name] = new StateSource(state$, name);
|
|
593
592
|
const sinks = main(innerSources);
|
|
594
593
|
if (sinks[name]) {
|
|
595
|
-
const stream$ =
|
|
594
|
+
const stream$ = concat__default(xs__default.fromObservable(sinks[name]), xs__default.never());
|
|
596
595
|
stream$.subscribe({
|
|
597
596
|
next: i => queueMicrotask(() => reducerMimic$._n(i)),
|
|
598
597
|
error: err => queueMicrotask(() => reducerMimic$._e(err)),
|
|
@@ -1905,7 +1904,7 @@ function makeDOMDriver(container, options = {}) {
|
|
|
1905
1904
|
})
|
|
1906
1905
|
.compose(dropCompletion))
|
|
1907
1906
|
.flatten();
|
|
1908
|
-
const rootElement$ =
|
|
1907
|
+
const rootElement$ = concat__default(domReady$, mutationConfirmed$)
|
|
1909
1908
|
.endWhen(sanitation$)
|
|
1910
1909
|
.compose(sampleCombine(elementAfterPatch$))
|
|
1911
1910
|
.map(arr => arr[1])
|
|
@@ -2059,7 +2058,7 @@ const Stream = xs$1.Stream ||
|
|
|
2059
2058
|
(xs$1.default && xs$1.default.Stream) ||
|
|
2060
2059
|
(xs && xs.Stream);
|
|
2061
2060
|
|
|
2062
|
-
const dropRepeats$1 = resolveInteropDefault(
|
|
2061
|
+
const dropRepeats$1 = resolveInteropDefault(dropRepeatsModule);
|
|
2063
2062
|
function switchable(factories, name$, initial, opts = {}) {
|
|
2064
2063
|
const { switched = ['DOM'], stateSourceName = 'STATE' } = opts;
|
|
2065
2064
|
const nameType = typeof name$;
|
|
@@ -2162,7 +2161,7 @@ function makeCommandSource(cmd) {
|
|
|
2162
2161
|
}
|
|
2163
2162
|
|
|
2164
2163
|
const delay = resolveInteropDefault(delayModule);
|
|
2165
|
-
const concat = resolveInteropDefault(
|
|
2164
|
+
const concat = resolveInteropDefault(concat$1);
|
|
2166
2165
|
const debounce = resolveInteropDefault(debounceModule);
|
|
2167
2166
|
const dropRepeats = resolveInteropDefault(dropRepeatsModule);
|
|
2168
2167
|
const ENVIRONMENT = (typeof window != 'undefined' && window) || (typeof process !== 'undefined' && process.env) || {};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {Driver} from '../run/types';
|
|
2
2
|
import {init, Module, Options as SnabbdomOptions, VNode, toVNode} from './snabbdom';
|
|
3
3
|
import xs, {Stream, Listener} from 'xstream';
|
|
4
|
-
import concat from 'xstream/extra/concat';
|
|
5
|
-
import sampleCombine from 'xstream/extra/sampleCombine';
|
|
4
|
+
import concat from 'xstream/extra/concat.js';
|
|
5
|
+
import sampleCombine from 'xstream/extra/sampleCombine.js';
|
|
6
6
|
import {MainDOMSource} from './MainDOMSource';
|
|
7
7
|
import {VNodeWrapper} from './VNodeWrapper';
|
|
8
8
|
import {getValidNode, checkValidContainer} from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import xs, {Stream, MemoryStream} from 'xstream';
|
|
2
|
-
import dropRepeats from 'xstream/extra/dropRepeats';
|
|
2
|
+
import dropRepeats from 'xstream/extra/dropRepeats.js';
|
|
3
3
|
import {DevToolEnabledSource} from '../run/types';
|
|
4
4
|
import {adapt} from '../run/adapt';
|
|
5
5
|
import {Getter, Setter, Scope, Reducer} from './types';
|
package/src/index.d.ts
CHANGED
|
@@ -614,11 +614,11 @@ export function renderToString(componentDef: any, options?: RenderToStringOption
|
|
|
614
614
|
|
|
615
615
|
export const xs: typeof xsDefault
|
|
616
616
|
|
|
617
|
-
export { default as debounce } from 'xstream/extra/debounce'
|
|
618
|
-
export { default as throttle } from 'xstream/extra/throttle'
|
|
619
|
-
export { default as delay } from 'xstream/extra/delay'
|
|
620
|
-
export { default as dropRepeats } from 'xstream/extra/dropRepeats'
|
|
621
|
-
export { default as sampleCombine } from 'xstream/extra/sampleCombine'
|
|
617
|
+
export { default as debounce } from 'xstream/extra/debounce.js'
|
|
618
|
+
export { default as throttle } from 'xstream/extra/throttle.js'
|
|
619
|
+
export { default as delay } from 'xstream/extra/delay.js'
|
|
620
|
+
export { default as dropRepeats } from 'xstream/extra/dropRepeats.js'
|
|
621
|
+
export { default as sampleCombine } from 'xstream/extra/sampleCombine.js'
|
|
622
622
|
|
|
623
623
|
export * from './cycle/dom/index'
|
|
624
624
|
export type { MemoryStream, Stream }
|
package/src/index.ts
CHANGED
|
@@ -29,8 +29,8 @@ export { getDevTools } from './extra/devtools'
|
|
|
29
29
|
export * from './cycle/dom/index'
|
|
30
30
|
|
|
31
31
|
// export xstream and most used extra operators
|
|
32
|
-
export { default as debounce } from "xstream/extra/debounce"
|
|
33
|
-
export { default as throttle } from 'xstream/extra/throttle'
|
|
34
|
-
export { default as delay } from "xstream/extra/delay"
|
|
35
|
-
export { default as dropRepeats } from "xstream/extra/dropRepeats"
|
|
36
|
-
export { default as sampleCombine } from 'xstream/extra/sampleCombine'
|
|
32
|
+
export { default as debounce } from "xstream/extra/debounce.js"
|
|
33
|
+
export { default as throttle } from 'xstream/extra/throttle.js'
|
|
34
|
+
export { default as delay } from "xstream/extra/delay.js"
|
|
35
|
+
export { default as dropRepeats } from "xstream/extra/dropRepeats.js"
|
|
36
|
+
export { default as sampleCombine } from 'xstream/extra/sampleCombine.js'
|
package/src/switchable.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import xs, {Stream, resolveInteropDefault} from './extra/xstreamCompat';
|
|
2
|
-
import * as dropRepeatsModule from 'xstream/extra/dropRepeats';
|
|
2
|
+
import * as dropRepeatsModule from 'xstream/extra/dropRepeats.js';
|
|
3
3
|
import {h} from './cycle/dom/index';
|
|
4
4
|
|
|
5
5
|
const dropRepeats = resolveInteropDefault(dropRepeatsModule);
|