@symbo.ls/element 3.14.805 → 3.14.807
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 +18 -0
- package/README.md +10 -2
- package/dist/cjs/src/core.js +4 -4
- package/dist/cjs/src/hydration.js +1 -1
- package/dist/cjs/src/index.js +1 -1
- package/dist/cjs/src/inertOutside.js +1 -1
- package/dist/cjs/src/mountRecord.js +1 -1
- package/dist/cjs/src/mountScheduler.js +1 -1
- package/dist/cjs/src/mountYield.js +1 -1
- package/dist/cjs/src/version.js +1 -1
- package/dist/esm/src/core.js +4 -4
- package/dist/esm/src/hydration.js +1 -1
- package/dist/esm/src/index.js +1 -1
- package/dist/esm/src/inertOutside.js +1 -1
- package/dist/esm/src/mountRecord.js +1 -1
- package/dist/esm/src/mountScheduler.js +1 -1
- package/dist/esm/src/mountYield.js +1 -1
- package/dist/esm/src/version.js +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mountRecord as D}from"./mountRecord.js";const _=50;function U(e){return e===!0?_:typeof e=="number"&&e>0?e:0}const
|
|
1
|
+
import{mountRecord as D}from"./mountRecord.js";const _=50;function U(e){return e===!0?_:typeof e=="number"&&e>0?e:0}const r=[];let f=!1,u=0,i=_,a=!1,M=[];const d=typeof performance<"u"&&typeof performance.now=="function"?()=>performance.now():()=>Date.now(),x=[];let h=null;function E(e){if(!h){const t=new MessageChannel;t.port1.onmessage=()=>{const n=x.shift();!x.length&&typeof t.port1.unref=="function"&&t.port1.unref(),n&&n()},h=t}x.push(e),x.length===1&&typeof h.port1.ref=="function"&&h.port1.ref(),h.port2.postMessage(0)}function w(e){const t=typeof globalThis<"u"?globalThis.scheduler:null;if(t&&typeof t.yield=="function"){t.yield().then(e,e);return}if(typeof setImmediate=="function"){setImmediate(e);return}if(typeof MessageChannel=="function"){E(e);return}setTimeout(e,0)}function Y(){return new Promise(e=>w(e))}function A(e=0,t){return!u||(t||d())-u+e<i?!1:(a=!0,!0)}let g=0,y=0,k=0,p=0;function T(){g=0,y=u,k=0,p=0}function G(){if(!u)return!1;if(g++,p>0)return p--,!1;const e=d(),t=e-u,n=t/g,o=(e-y)/(g-k),c=o>n?o:n;y=e,k=g;const P=i-t-c;return P<=0?(a=!0,!0):(p=c>0?Math.floor(P/c/2):0,!1)}let s=0;function L(e=_){s===0&&!u?(u=d(),a=!1,i=e,T()):e<i&&(i=e,p=0),s++}let l=null,I=!1;const Q=typeof queueMicrotask=="function"?queueMicrotask:e=>Promise.resolve().then(e);function m(){u=0,a=!1,i=_,T()}function R(){I||(I=!0,Q(()=>{I=!1,s===0&&m()}))}function N(){s>0&&s--,!(s!==0||l!==null)&&(f?R():m())}function O(e,t=_){const n={fn:e,budget:t};l?l.push(n):r.push(n),f||(f=!0,w(B))}function q(e){const t=l;l=[];try{e.fn()}catch(n){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",n?.message||n)}finally{const n=l;l=t,n.length&&r.unshift(...n)}}function j(){return!f&&!r.length?Promise.resolve():new Promise(e=>M.push(e))}function v(){return!f&&!r.length}function b(){if(!M.length)return;const e=M;M=[];for(let t=0;t<e.length;t++)e[t]()}function B(){for(u=d(),a=!1,i=1/0,T();r.length;){const e=r.shift();if(e.budget<i&&(i=e.budget,p=0),q(e),a||d()-u>=i)break}if(s=0,m(),r.length){w(B);return}f=!1,b()}function z(){let t=0;for(u=0;r.length&&t++<1e5;)q(r.shift());f=!1,s=0,m(),b()}function F(){return r.length}function H(){r.length=0,l=null,f=!1,s=0,m(),b()}function J(e){D(e.__ref).pending++}function C(e){const t=e&&e.__ref,n=t&&t.__mount;if(!n||!(n.pending>0)||--n.pending>0||t.__disposed)return;const o=n.tail;o&&(n.tail=null,o())}function K(e){const t=e&&e.__ref&&e.__ref.__mount;return!!(t&&t.tail)}function V(e){const t=e&&e.__ref&&e.__ref.__mount;return!t||!t.tail?Promise.resolve(e):new Promise(n=>{(t.waiters||(t.waiters=[])).push(n)})}function S(e,t=e&&e.__ref){const n=t&&t.__mount,o=n&&n.waiters;if(o){n.waiters=null;for(let c=0;c<o.length;c++)o[c](e)}}function X(e,t=e&&e.__ref){const n=t&&t.__mount;if(!n||!n.tail)return;n.tail=null,n.pending=0;const o=n.holder;n.holder=null,S(e,t),o&&C(o)}export{_ as MOUNT_YIELD_BUDGET_MS,z as __flushMountQueueSync,F as __pendingMountChunks,H as __resetMountQueue,X as abandonMount,N as closeMountBudget,O as enqueueMountWork,J as holdMount,A as mountBudgetExhausted,v as mountIdle,K as mountPending,G as mountTick,U as mountYieldBudget,L as openMountBudget,C as releaseMount,C as settleMount,S as settleMountWaiters,j as whenMountIdle,V as whenMounted,Y as yieldToMain};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mountTick as
|
|
1
|
+
import{mountTick as R,mountYieldBudget as p,openMountBudget as k,closeMountBudget as x,enqueueMountWork as y,holdMount as h,settleMount as _,settleMountWaiters as B,abandonMount as E}from"./mountScheduler.js";import{reportCreateChildrenError as g,completeCreate as b,syncSelectValue as A,placedRowNode as N,rowAttach as O,attachWhole as W}from"./core.js";import{mountRecord as Y}from"./mountRecord.js";import{FEATURES as C}from"./features.js";function F(n,t){const r=t&&t.mountYield;if(!r&&!n.yieldChildren)return 0;const o=C.hydration!==null&&n.context?n.context.__hydration:null;if(o&&C.hydration.whole(o,n))return 0;const e=r?p(r):0,u=p(n.yieldChildren);return e&&u?e<u?e:u:e||u}function w(n,t,r,o,e){k(o);try{S(n,n.__ref,0,t,r,o,e,!1)}finally{x()}}function S(n,t,r,o,e,u,f,c){try{for(let i=r;i<o;i++){const s=t.__mount,l=s?s.pending:0;if(e(i)===!1)continue;if(t.__disposed)break;const d=R(),a=t.__mount;if(i+1<o&&(d||(a?a.pending:0)>l)){f&&f.onSuspend&&f.onSuspend(),c||h(n);const m=i+1;y(()=>G(n,t,m,o,e,u,f),u);return}}}catch(i){if(!c)throw i;g(n,i)}c&&_(n)}function G(n,t,r,o,e,u,f){if(t.__disposed||f&&f.isStale&&f.isStale()){_(n);return}S(n,t,r,o,e,u,f,!0)}function T(n,t,r){h(n),y(()=>{try{const o=n.__ref;o&&!o.__disposed&&r()}catch(o){g(n,o)}finally{_(n)}},t)}function q(n,t,r,o){const e=n.__ref,u=Y(e),f=++u.chunkGen,c=n.node,i=[];let s=!1;w(n,t,l=>{const d=r(l,s?O(n,D(c,i)):void 0),a=M(d);return a?i.push(a):d&&d.__ref.__mount&&d.__ref.__mount.held&&i.push(d),d},o,{isStale:()=>u.chunkGen!==f,onSuspend:()=>{s=!0}})}function M(n){const t=N(n);if(t)return t;const r=n&&n.__ref;return r&&r.__if!==!1&&n.tag==="fragment"&&r.__fragmentAnchor||null}function D(n,t){for(let r=t.length-1;r>=0;r--){const o=t[r].__ref?M(t[r]):t[r];if(o&&o.parentNode===n)return o}return null}function I(n,t){const r=n.__ref;try{A(n,!0),W(n),b(n,t)}finally{B(n,r);const o=r.__mount,e=o&&o.holder;e&&(o.holder=null,_(e))}}const v={budgetOf:F,run:w,rows:q,defer:T,hold:h,finish:I,abandon:E};export{v as mountYieldFeature};
|
package/dist/esm/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="3.14.
|
|
1
|
+
const o="3.14.807";export{o as VERSION};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/element",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.807",
|
|
4
4
|
"description": "Core element creation, update, and disposal engine for smbls v3.14",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@symbo.ls/css": "^3.14.
|
|
24
|
-
"@symbo.ls/scratch": "^3.14.
|
|
23
|
+
"@symbo.ls/css": "^3.14.781",
|
|
24
|
+
"@symbo.ls/scratch": "^3.14.790",
|
|
25
25
|
"@symbo.ls/signal": "^3.14.789",
|
|
26
26
|
"@symbo.ls/state": "^3.14.681",
|
|
27
|
-
"@symbo.ls/utils": "^3.14.
|
|
27
|
+
"@symbo.ls/utils": "^3.14.789",
|
|
28
28
|
"css-in-props": "^3.14.763",
|
|
29
29
|
"attrs-in-props": "^3.14.696"
|
|
30
30
|
},
|