@responsive-ui/bottom-modal
Advanced tools
Comparing version 1.0.9-alpha.1 to 1.0.9-alpha.2
@@ -180,30 +180,13 @@ 'use strict'; | ||
} | ||
// flush() calls callbacks in this order: | ||
// 1. All beforeUpdate callbacks, in order: parents before children | ||
// 2. All bind:this callbacks, in reverse order: children before parents. | ||
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT | ||
// for afterUpdates called during the initial onMount, which are called in | ||
// reverse order: children before parents. | ||
// Since callbacks might update component values, which could trigger another | ||
// call to flush(), the following steps guard against this: | ||
// 1. During beforeUpdate, any updated components will be added to the | ||
// dirty_components array and will cause a reentrant call to flush(). Because | ||
// the flush index is kept outside the function, the reentrant call will pick | ||
// up where the earlier call left off and go through all dirty components. The | ||
// current_component value is saved and restored so that the reentrant call will | ||
// not interfere with the "parent" flush() call. | ||
// 2. bind:this callbacks cannot trigger new flush() calls. | ||
// 3. During afterUpdate, any updated components will NOT have their afterUpdate | ||
// callback called a second time; the seen_callbacks set, outside the flush() | ||
// function, guarantees this behavior. | ||
let flushing = false; | ||
const seen_callbacks = new Set(); | ||
let flushidx = 0; // Do *not* move this inside the flush() function | ||
function flush() { | ||
const saved_component = current_component; | ||
if (flushing) | ||
return; | ||
flushing = true; | ||
do { | ||
// first, call beforeUpdate functions | ||
// and update components | ||
while (flushidx < dirty_components.length) { | ||
const component = dirty_components[flushidx]; | ||
flushidx++; | ||
for (let i = 0; i < dirty_components.length; i += 1) { | ||
const component = dirty_components[i]; | ||
set_current_component(component); | ||
@@ -214,3 +197,2 @@ update(component.$$); | ||
dirty_components.length = 0; | ||
flushidx = 0; | ||
while (binding_callbacks.length) | ||
@@ -235,4 +217,4 @@ binding_callbacks.pop()(); | ||
update_scheduled = false; | ||
flushing = false; | ||
seen_callbacks.clear(); | ||
set_current_component(saved_component); | ||
} | ||
@@ -546,3 +528,3 @@ function update($$) { | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.3 */ | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.2 */ | ||
@@ -549,0 +531,0 @@ function create_if_block(ctx) { |
@@ -178,30 +178,13 @@ function noop() { } | ||
} | ||
// flush() calls callbacks in this order: | ||
// 1. All beforeUpdate callbacks, in order: parents before children | ||
// 2. All bind:this callbacks, in reverse order: children before parents. | ||
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT | ||
// for afterUpdates called during the initial onMount, which are called in | ||
// reverse order: children before parents. | ||
// Since callbacks might update component values, which could trigger another | ||
// call to flush(), the following steps guard against this: | ||
// 1. During beforeUpdate, any updated components will be added to the | ||
// dirty_components array and will cause a reentrant call to flush(). Because | ||
// the flush index is kept outside the function, the reentrant call will pick | ||
// up where the earlier call left off and go through all dirty components. The | ||
// current_component value is saved and restored so that the reentrant call will | ||
// not interfere with the "parent" flush() call. | ||
// 2. bind:this callbacks cannot trigger new flush() calls. | ||
// 3. During afterUpdate, any updated components will NOT have their afterUpdate | ||
// callback called a second time; the seen_callbacks set, outside the flush() | ||
// function, guarantees this behavior. | ||
let flushing = false; | ||
const seen_callbacks = new Set(); | ||
let flushidx = 0; // Do *not* move this inside the flush() function | ||
function flush() { | ||
const saved_component = current_component; | ||
if (flushing) | ||
return; | ||
flushing = true; | ||
do { | ||
// first, call beforeUpdate functions | ||
// and update components | ||
while (flushidx < dirty_components.length) { | ||
const component = dirty_components[flushidx]; | ||
flushidx++; | ||
for (let i = 0; i < dirty_components.length; i += 1) { | ||
const component = dirty_components[i]; | ||
set_current_component(component); | ||
@@ -212,3 +195,2 @@ update(component.$$); | ||
dirty_components.length = 0; | ||
flushidx = 0; | ||
while (binding_callbacks.length) | ||
@@ -233,4 +215,4 @@ binding_callbacks.pop()(); | ||
update_scheduled = false; | ||
flushing = false; | ||
seen_callbacks.clear(); | ||
set_current_component(saved_component); | ||
} | ||
@@ -544,3 +526,3 @@ function update($$) { | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.3 */ | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.2 */ | ||
@@ -547,0 +529,0 @@ function create_if_block(ctx) { |
@@ -181,30 +181,13 @@ var BottomModal = (function () { | ||
} | ||
// flush() calls callbacks in this order: | ||
// 1. All beforeUpdate callbacks, in order: parents before children | ||
// 2. All bind:this callbacks, in reverse order: children before parents. | ||
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT | ||
// for afterUpdates called during the initial onMount, which are called in | ||
// reverse order: children before parents. | ||
// Since callbacks might update component values, which could trigger another | ||
// call to flush(), the following steps guard against this: | ||
// 1. During beforeUpdate, any updated components will be added to the | ||
// dirty_components array and will cause a reentrant call to flush(). Because | ||
// the flush index is kept outside the function, the reentrant call will pick | ||
// up where the earlier call left off and go through all dirty components. The | ||
// current_component value is saved and restored so that the reentrant call will | ||
// not interfere with the "parent" flush() call. | ||
// 2. bind:this callbacks cannot trigger new flush() calls. | ||
// 3. During afterUpdate, any updated components will NOT have their afterUpdate | ||
// callback called a second time; the seen_callbacks set, outside the flush() | ||
// function, guarantees this behavior. | ||
let flushing = false; | ||
const seen_callbacks = new Set(); | ||
let flushidx = 0; // Do *not* move this inside the flush() function | ||
function flush() { | ||
const saved_component = current_component; | ||
if (flushing) | ||
return; | ||
flushing = true; | ||
do { | ||
// first, call beforeUpdate functions | ||
// and update components | ||
while (flushidx < dirty_components.length) { | ||
const component = dirty_components[flushidx]; | ||
flushidx++; | ||
for (let i = 0; i < dirty_components.length; i += 1) { | ||
const component = dirty_components[i]; | ||
set_current_component(component); | ||
@@ -215,3 +198,2 @@ update(component.$$); | ||
dirty_components.length = 0; | ||
flushidx = 0; | ||
while (binding_callbacks.length) | ||
@@ -236,4 +218,4 @@ binding_callbacks.pop()(); | ||
update_scheduled = false; | ||
flushing = false; | ||
seen_callbacks.clear(); | ||
set_current_component(saved_component); | ||
} | ||
@@ -547,3 +529,3 @@ function update($$) { | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.3 */ | ||
/* components/bottom-modal/src/BottomModal.svelte generated by Svelte v3.44.2 */ | ||
@@ -550,0 +532,0 @@ function create_if_block(ctx) { |
{ | ||
"name": "@responsive-ui/bottom-modal", | ||
"version": "1.0.9-alpha.1", | ||
"version": "1.0.9-alpha.2", | ||
"description": "A bottom modal component of responsive-ui.", | ||
@@ -51,3 +51,3 @@ "author": "Si3nLoong <sianloong90@gmail.com> (https://github.com/si3nloong)", | ||
}, | ||
"gitHead": "50c6059183e704685646087a37edcd430b875948" | ||
"gitHead": "a97061df56253cfc9882a039332d172ec9596d06" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10
77406
2167