@symbo.ls/element 3.14.105 → 3.14.181
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 +23 -5
- package/dist/cjs/src/create.js +4 -4
- package/dist/cjs/src/registry.js +1 -1
- package/dist/esm/src/create.js +4 -4
- package/dist/esm/src/registry.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
# @symbo.ls/element
|
|
2
2
|
|
|
3
|
+
## 3.14.181
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Auto-generated cross-repo patch release.
|
|
8
|
+
|
|
9
|
+
## 3.14.135
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Auto-generated cross-repo patch release.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @symbo.ls/signal@3.14.135
|
|
16
|
+
|
|
3
17
|
## 3.14.105
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
6
20
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
21
|
+
- Manual patch bump triggered via workflow_dispatch (scope: all).
|
|
22
|
+
No source change behind this bump — released to refresh dist or
|
|
23
|
+
coordinate a cross-package version line.
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @symbo.ls/signal@3.14.105
|
|
26
|
+
- @symbo.ls/state@3.14.105
|
|
27
|
+
- @symbo.ls/utils@3.14.105
|
|
28
|
+
- attrs-in-props@3.14.105
|
|
29
|
+
- css-in-props@3.14.105
|
|
12
30
|
|
|
13
31
|
## 3.14.104
|
|
14
32
|
|
package/dist/cjs/src/create.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Y=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var dt=Object.getOwnPropertyNames;var ut=Object.prototype.hasOwnProperty;var pt=(t,c)=>{for(var n in c)Y(t,n,{get:c[n],enumerable:!0})},yt=(t,c,n,i)=>{if(c&&typeof c=="object"||typeof c=="function")for(let s of dt(c))!ut.call(t,s)&&s!==n&&Y(t,s,{get:()=>c[s],enumerable:!(i=at(c,s))||i.enumerable});return t};var lt=t=>yt(Y({},"__esModule",{value:!0}),t);var Et={};pt(Et,{create:()=>T,default:()=>wt});module.exports=lt(Et);var k=require("@symbo.ls/signal"),j=require("@symbo.ls/signal"),R=require("./cache.js"),P=require("./registry.js"),rt=require("./delegate.js"),it=require("./extends.js"),et=require("./methods.js"),$t=require("./dispose.js"),V=require("@symbo.ls/utils"),W=require("@symbo.ls/utils/function.js"),F=require("@symbo.ls/state"),x=require("css-in-props"),ft=require("@symbo.ls/css"),A=require("@symbo.ls/scratch"),I=require("attrs-in-props");let ht=1;function M(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function gt(t){return t.charAt(2).toLowerCase()+t.slice(3)}function bt(t){return t.toLowerCase()}function U(t,c){const n={...t};for(const i in c){const s=n[i],o=c[i];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[i]=U(s,o):n[i]=o}return n}function T(t,c,n,i={},s){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});const o=Object.create(null);o.key=n||t.key||`_${ht++}`,o.parent=c||null,o.context=t.context||c?.context||i.context||{},o.context.__create||(o.context.__create=T);const r=o.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:c?.__ref?.root||o,path:c?.__ref?.path?[...c.__ref.path,o.key]:[o.key]};if(n&&!t.extends&&!t.extend){const l=n.indexOf("_");if(l>0){const y=n.substring(0,l),b=o.context?.components;b&&(b[y]||b["smbls."+y])&&(t={extends:y,...t})}}(0,it.applyExtends)(o,t,i);const f=new Set(["childProps","attr","style","scope","data"]),e=o.props&&typeof o.props=="object"?o.props:null;for(const l in t){if(l==="parent"||l==="node"||l==="__ref"||l==="extends"||l==="context"||l==="props")continue;const y=t[l],b=o[l],_=b&&y&&typeof b=="object"&&typeof y=="object"&&!Array.isArray(b)&&!Array.isArray(y)&&typeof b!="function"&&typeof y!="function";_&&l.charCodeAt(0)>=65&&l.charCodeAt(0)<=90?o[l]=U(b,y):_&&f.has(l)?o[l]={...b,...y}:o[l]=y}function a(l){for(const y in l){const b=l[y],_=o[y],w=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";w&&y.charCodeAt(0)>=65&&y.charCodeAt(0)<=90?o[y]=U(_,b):w&&f.has(y)?o[y]={..._,...b}:o[y]=b}}e&&a(e),t.props&&typeof t.props=="object"&&a(t.props),t.data!==void 0&&(o.data=t.data),t.classlist!==void 0&&(o.classlist=t.classlist),t.text!==void 0&&(o.text=t.text),t.html!==void 0&&(o.html=t.html);const d=o.scope&&typeof o.scope=="object"?o.scope:null,g=c?.scope,p=o.context&&typeof o.context.globalScope=="object"&&o.context.globalScope||null,u=g||p||null;if(t.scope!==void 0||d){const l={};d&&Object.assign(l,d),t.scope!==void 0&&Object.assign(l,t.scope),o.scope=(0,k.createScopeStore)(l,u)}else u&&(o.scope=u);if(t.if!==void 0&&(o.if=t.if),(0,et.addMethods)(o),_t(o,c,t),o.if!=null){let l;if(typeof o.if=="function")try{l=o.if(o,o.state,o.context)}catch(y){if(l=!1,r.__ifError=y,typeof console<"u"&&console.warn){const b=o.key||o.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,y?.message||y)}}else l=o.if;r.__if=!!l}if(r.__if)typeof t.if=="function"&&(r.__ifInitialized=!0);else return c&&(c[o.key]=o),typeof t.if=="function"&&z(o,{if:t.if}),o;o.tag||(o.tag=(0,R.detectTag)(o)),N("Init",o,i);const h=o.node=(0,R.cacheNode)(o);if(!h)return o;N("AttachNode",o,i),h.setAttribute&&o.key&&h.setAttribute("data-key",o.key),h.setAttribute&&o.context?.scopeSelector&&o.context.scopeSelector!==":root"&&o.context.key&&o.key===o.context.key&&h.setAttribute("data-smbls-app",o.context.key),o.id&&h.setAttribute&&(h.id=o.id),z(o,t),B(o),ot(o),ct(o,i);try{nt(o,i)}catch(l){if(typeof console<"u"&&console.error){const y=o.__ref?.path?.join(".")||o.key||"<root>";console.error(`[smbls] createChildren failed at ${y}:`,l?.message||l,l?.stack?`
|
|
2
2
|
`+l.stack.split(`
|
|
3
3
|
`).slice(0,6).join(`
|
|
4
|
-
`):"")}}if(X(o,c,s),c&&(c[o.key]=o,c.__ref?.__children&&(c.__ref.__children.includes(o.key)||c.__ref.__children.push(o.key))),typeof o.html=="function"&&o.node&&!o.node.innerHTML){const l=o.context?.designSystem;l&&(0,A.pushConfig)(l);try{const p=o.html(o,o.state,o.context);p!=null&&typeof p!="function"&&(o.node.innerHTML=p)}catch{}finally{l&&(0,A.popConfig)()}}if(N("Create",o,r),N("Complete",o,r),N("Render",o,r),N("RenderRouter",o,r),typeof o.onFrame=="function"){const l=o.onFrame,p=o.context?.designSystem,_=()=>{if(o.node){if(o.node.isConnected){p&&(0,A.pushConfig)(p);try{l(o,o.state,o.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{p&&(0,A.popConfig)()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return o}function bt(t,c,n){const r=!c,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,o=r&&s&&t.context?.state,i=n.state!==void 0&&!o?n.state:t.state&&!(0,L.isStore)(t.state)?t.state:void 0;if(i==null){if(c?.state)t.state=c.state,(0,F.applyStateMethods)(t,t.state);else if(t.context?.state){const f=t.context.state,e={...f},a=t.context?.polyglot;if(a?.translations){const u=f.lang||a.defaultLang||"en",x=a.translations[u];if(x&&typeof x=="object")for(const d in x)e[d]===void 0&&(e[d]=x[d]);const y=new Set(a.languages||[]);for(const d in a.translations)!y.has(d)&&e[d]===void 0&&(e[d]=a.translations[d])}t.state=(0,L.isStore)(e)?e:(0,L.createStore)(e),t.state.__element=t,t.state.root=t.state,(0,F.applyStateMethods)(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),(0,F.applyStateMethods)(t,t.state);return}if(typeof i=="string"){if(t.state=tt(i,c),t.state&&typeof t.state=="object"&&!(0,L.isStore)(t.state)){const f=c?.state?.root||c?.state||t.state;Object.defineProperty(t.state,"root",{value:f,enumerable:!1,configurable:!0,writable:!0})}(0,F.applyStateMethods)(t,t.state);return}if(typeof i=="function"){const f=i(t,c?.state);t.state=(0,L.createStore)(f||{})}else t.state=(0,L.createStore)({...i});t.state.__element=t,c?.state?(t.state.parent=c.state,t.state.root=c.state.root||c.state):t.state.root=t.state,(0,F.applyStateMethods)(t,t.state)}function Z(t,c){if(!c)return t;const n=c.split("/");let r=t;for(const s of n){if(r==null)return{};r=r[s]}return r??{}}function tt(t,c){if(!c)return{};if(t===".")return c.state||{};if(t.startsWith("../")){const s=t.slice(3);return s?Z(c.state,s):c.state??{}}if(t.startsWith("~/")){const s=c.state?.root||c.state,o=t.slice(2);return o?Z(s,o):s??{}}if(c.state?.[t]!==void 0)return c.state[t];const n=Z(c.state,t);if(n!=null&&Object.keys(n).length>0)return n;const r=c.context?.polyglot;if(r?.translations){const s=c.state?.root?.lang||r.defaultLang||"en",o=r.translations[s];if(o?.[t]!==void 0)return o[t];if(r.translations[t]!==void 0)return r.translations[t]}return{}}function gt(t){const c=t.__ref,n=t.tag||"div",r=t.context?.designSystem,s=[],o=Object.keys(t);for(let i=0;i<o.length;i++){const f=o[i];if(typeof t[f]!="function"||E.REGISTRY.has(f))continue;const e=f.charCodeAt(0);e>=65&&e<=90||M(f)||g.CSS_PROPS_REGISTRY[f]||g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(f)||(0,I.checkAttributeByTagName)(n,f)||s.push({prop:f,fn:t[f]})}for(let i=0;i<s.length;i++){const{prop:f,fn:e}=s[i];c.__exec[f]=e,Object.defineProperty(t,f,{get(){r&&(0,A.pushConfig)(r);try{return e(t,t.state,t.context)}catch{return}finally{r&&(0,A.popConfig)()}},set(a){delete c.__exec[f],Object.defineProperty(t,f,{value:a,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function B(t,c){const n=t.__ref;if(gt(t),typeof t.text=="function"){const s=t.text,o=(0,j.createEffect)(()=>{if(!n.contentManaged)try{let i=s(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=V.replaceLiteralsWithObjectFields.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){const s=t.text,o=(0,j.createEffect)(()=>{if(n.contentManaged)return;const i=V.replaceLiteralsWithObjectFields.call(t,s,t.state);i!=null&&(t.text=i),t.node&&(t.tag==="string"?t.node.nodeValue=i??"":t.node.textContent=i??"")},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&typeof t[s]=="function"&&!E.REGISTRY.has(s)&&!M(s)&&!n.__exec[s]){if(g.CSS_PROPS_REGISTRY[s]){const o=t[s],i=s,f=(0,j.createEffect)(()=>{const e=t.context?.designSystem;e&&(0,A.pushConfig)(e);try{const a=o(t,t.state,t.context),u=g.CSS_PROPS_REGISTRY[i](a,t,t.state,t.context);u&&t.node?K(t.node,u):t.node&&(i==="show"||i==="hide")&&(t.node.style.display="")}finally{e&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}else if(g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(s)){const o=t[s],i=s,f=(0,j.createEffect)(()=>{const e=t.context?.designSystem;e&&(0,A.pushConfig)(e);try{const a=o(t,t.state,t.context);t.node&&(a!=null?K(t.node,{[i]:a}):t.node.style[i]="")}finally{e&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}}if(typeof c.html=="function"){const s=c.html,o=(0,j.createEffect)(()=>{const i=t.context?.designSystem;i&&(0,A.pushConfig)(i);try{const f=s(t,t.state,t.context);t.node&&f!=null&&typeof f!="function"&&(t.node.innerHTML=f)}finally{i&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(o),n.__exec.html=s}if(typeof c.value=="function"){const s=c.value,o=(0,j.createEffect)(()=>{try{const i=s(t,t.state,t.context);if(!t.node||!("value"in t.node))return;const f=i==null?"":String(i);if(t.node.value===f)return;const e=typeof document<"u"&&document.activeElement===t.node,a=e&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,u=e&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=f,e&&a!=null&&u!=null)try{t.node.setSelectionRange(a,u)}catch{}}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.value=s}if(typeof c.style=="function"){const s=c.style,o=(0,j.createEffect)(()=>{const i=s(t,t.state,t.context);K(t.node,i)},{depth:n.path.length});n.__effects.push(o),n.__exec.style=s}else if(t.style&&typeof t.style=="object")for(const s in t.style){const o=t.style[s];if(typeof o!="function")continue;const i=(0,j.createEffect)(()=>{try{const f=o(t,t.state,t.context);t.node&&K(t.node,{[s]:f})}catch{}},{depth:n.path.length});n.__effects.push(i)}if(t.attr&&typeof t.attr=="object"){for(const s in t.attr)if(typeof t.attr[s]=="function"){const o=t.attr[s],i=s,f=(0,j.createEffect)(()=>{try{const e=o(t,t.state,t.context);t.node?.setAttribute&&(e==null||e===!1?t.node.removeAttribute(i):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(i,e===!0?"":e))}catch{}},{depth:n.path.length});n.__effects.push(f)}}if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o!="function")continue;const i="aria-"+s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),f=(0,j.createEffect)(()=>{try{const e=o(t,t.state,t.context);if(!t.node?.setAttribute)return;e==null||e===!1?t.node.removeAttribute(i):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(i,e===!0?"":e)}catch{}},{depth:n.path.length});n.__effects.push(f)}if(t.data&&typeof t.data=="object")for(const s in t.data){const o=t.data[s];if(typeof o!="function")continue;const f="data-"+s.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),e=(0,j.createEffect)(()=>{try{const a=o(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(f):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(f,a===!0?"":a)}catch{}},{depth:n.path.length});n.__effects.push(e)}const r=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(r)for(const s in r){const o=r[s];if(typeof o!="function")continue;const i=(0,j.createEffect)(()=>{try{const f=o(t,t.state,t.context);if(!t.node?.classList)return;typeof f=="string"?t.node.classList.add(f):f?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:n.path.length});n.__effects.push(i)}if(typeof c.if=="function"){const s=c.if,o=(0,j.createEffect)(()=>{const i=s(t,t.state,t.context),f=n.__if;if(n.__if=!!i,f&&!n.__if&&t.node)t.node.remove();else if(!f&&n.__if)if(n.__ifInitialized){t.node||(t.node=(0,R.cacheNode)(t));const e=t.parent,a=e?.node;if(a&&t.node){let u=null;const x=Object.keys(e),y=x.indexOf(t.key);for(let d=y+1;d<x.length;d++){const h=e[x[d]];if(h?.node?.parentNode===a){u=h.node;break}}u?a.insertBefore(t.node,u):a.appendChild(t.node)}else X(t,t.parent);z(t)}else{if(n.__ifInitialized=!0,t.tag||(t.tag=(0,R.detectTag)(t)),N("Init",t,{}),t.node||(t.node=(0,R.cacheNode)(t)),!t.node)return;N("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id);const e=c.if;delete c.if;try{B(t,c)}finally{c.if=e}z(t),ot(t),ct(t,{}),nt(t,{}),X(t,t.parent)}},{depth:n.path.length});n.__effects.push(o)}for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||E.REGISTRY.has(s)||typeof t[s]!="function")continue;const o=s.charCodeAt(0);if(o>=65&&o<=90||M(s))continue;const i=t[s];n.__exec[s]=i;const f=t.tag||"div";if((0,I.checkAttributeByTagName)(f,s)&&!g.CSS_PROPS_REGISTRY[s]&&!(g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(s))){const e=s,a=(0,j.createEffect)(()=>{try{const u=i(t,t.state,t.context);t.node?.setAttribute&&(u==null||u===!1?t.node.removeAttribute(e):typeof u!="function"&&typeof u!="object"&&(e==="src"&&"src"in t.node?t.node.src=u:t.node.setAttribute(e,u===!0?"":u)))}catch{}},{depth:n.path.length});n.__effects.push(a)}}jt(t)}function z(t){const{node:c}=t;if(c){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?c.nodeValue=t.text:c.textContent=t.text:typeof t.text=="number"&&(c.textContent=t.text),Ct(t),typeof t.html=="string"&&(c.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in c){const n=String(t.value);c.value!==n&&(c.value=n)}if(t.style&&typeof t.style=="object"&&K(c,t.style),t.attr&&typeof t.attr=="object")for(const n in t.attr){const r=t.attr[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||c.setAttribute&&c.setAttribute(n,r===!0?"":r)}if(t.data&&typeof t.data=="object")for(const n in t.data){const r=t.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||c.dataset&&(c.dataset[n]=r===!0?"":r)}if(t.classlist||t.class){const n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&c.classList.add(r));else if(typeof n=="object")for(const r in n){const s=typeof n[r]=="function"?n[r](t,t.state,t.context):n[r];s&&c.classList.add(typeof s=="string"?s:r)}}}}function K(t,c){if(!t||!c||!t.style)return;let n=null;for(const r in c){const s=c[r];if(s!=null){if(r.charAt(0)==="&"&&typeof s=="object"){n||(n={}),n[r]=s;continue}try{const o=String(s),i=r.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),f=o.trim(),e=/\s*!important\s*$/.test(f),a=f.replace(/\s*!important\s*$/,"");t.style.setProperty(i,a,e?"important":"")}catch{}}}n&&vt(t,n)}let At=0;function vt(t,c){const n=`_ds${At++}`;t.classList.add(n);const r=t.ownerDocument;let s=r.querySelector("style[data-smbls-scoped]");s||(s=r.createElement("style"),s.setAttribute("data-smbls-scoped",""),r.head.appendChild(s));let o="";for(const i in c){const f="."+n,e=i.replace(/&/g,f).split(",").map(u=>{const x=u.trim();return x.includes(f)?x:f+x}).join(", "),a=c[i];if(typeof a=="object"){let u="",x="";for(const y in a){const d=a[y];if(typeof d=="object"){const h=y.includes("&")?e.split(", ").map(p=>y.replace(/&/g,p)).join(", "):e.split(", ").map(p=>`${p} ${y}`).join(", ");let l="";for(const p in d)l+=`${p.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${d[p]};`;x+=`${h} { ${l} }
|
|
5
|
-
`}else
|
|
6
|
-
`),x&&(o+=x)}}o&&(s.textContent+=o)}function jt(t){const c=t.__ref;c.__conditionalRunners=[];for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const r=n.charAt(0);if(r!=="."&&r!=="!")continue;const s=n.slice(1);if(!s)continue;const o=t[n];if(!o||typeof o!="object")continue;const i=r==="!",f={lastMatch:!1,appliedKeys:null},e=()=>{if(!t.node)return;let u;const x=t[s];if(x===void 0)if(t.state&&s in t.state)u=t.state[s];else{const h=t.context?.cases?.[s];if(h===void 0)return;u=typeof h=="function"?h.call(t,t):h}else typeof x=="function"?u=x(t,t.state,t.context):u=x;const y=i?!u:!!u;if(y===f.lastMatch)return;f.lastMatch=y;const d=t.context?.designSystem;d&&(0,A.pushConfig)(d);try{if(y){const h={};for(const p in o){if(!Object.prototype.hasOwnProperty.call(o,p))continue;const _=typeof o[p]=="function"?o[p](t,t.state,t.context):o[p];if(_!=null)if(g.CSS_PROPS_REGISTRY[p]){const b=g.CSS_PROPS_REGISTRY[p](_,t,t.state,t.context);if(b){const k=Array.isArray(b)?b:[b];for(const P of k)P&&Object.assign(h,P)}}else g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(p)&&(h[p]=_)}const l=Object.keys(h);l.length?(K(t.node,h),f.appliedKeys=l):f.appliedKeys=null}else if(f.appliedKeys){for(const h of f.appliedKeys)t.node.style[h]="";f.appliedKeys=null}}finally{d&&(0,A.popConfig)()}};c.__conditionalRunners.push(e);const a=(0,j.createEffect)(e,{depth:c.path.length});c.__effects.push(a)}}const G=new WeakSet;function Ct(t){const{node:c}=t;if(!c)return;if(G.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}G.add(t);const n=t.context?.designSystem;n&&(0,A.pushConfig)(n);try{const r={};let s=!1;for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||E.REGISTRY.has(o))continue;const i=o.charCodeAt(0);if(!(i>=65&&i<=90)&&!M(o)){if(g.CSS_PROPS_REGISTRY[o]){const f=t[o],e=g.CSS_PROPS_REGISTRY[o](f,t,t.state,t.context);if(e){if(Array.isArray(e))for(const a of e)a&&Object.assign(r,a);else Object.assign(r,e);s=!0}}else if(g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(o)){const f=t[o];f!=null&&typeof f!="object"&&(r[o]=f,s=!0)}else if(o.charCodeAt(0)===45){const f=t[o];f!=null&&typeof f!="object"&&(r[o]=f,s=!0)}else if(o.charAt(0)==="&"){const f=t[o];f&&typeof f=="object"&&(r[o]=f,s=!0)}else if(o.charAt(0)==="@"||o.charAt(0)===":"){const f=t[o];if(f&&typeof f=="object"){const e={};for(const a in f){let u=f[a];if(typeof u=="function"&&(u=u(t,t.state,t.context)),!(u==null||typeof u=="function"))if(g.CSS_PROPS_REGISTRY[a]){const x=g.CSS_PROPS_REGISTRY[a](u,t,t.state,t.context);if(x)if(Array.isArray(x))for(const y of x)y&&Object.assign(e,y);else Object.assign(e,x)}else e[a]=u}if(Object.keys(e).length){if(o.length>1&&o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")&&!o.startsWith("@supports")&&(o==="@dark"||o==="@light"||!t.context?.designSystem?.media?.[o.slice(1)])){const u={};for(const y in e){const d=e[y];u[y]=typeof d=="string"&&!d.includes("!important")?d+" !important":d}const x=o.slice(1);r[`[data-theme="${x}"] &`]=u}else{let u=o;if(o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")){const y=o.slice(1),d=t.context?.designSystem?.media?.[y]||t.context?.designSystem?.media?.[y];d&&(u=`@media ${d}`)}const x={};for(const y in e){const d=e[y];if(d&&typeof d=="object"&&!Array.isArray(d)){const h={};for(const p in d)if(g.CSS_PROPS_REGISTRY[p]){const _=g.CSS_PROPS_REGISTRY[p](d[p],t,t.state,t.context);if(_)if(Array.isArray(_))for(const b of _)b&&Object.assign(h,b);else Object.assign(h,_)}else h[p]=d[p];const l=y.startsWith(":")?"":" ";if(u.includes(",")){const p=u.split(",").map(_=>`${_.trim()}${l}${y}`).join(", ");r[p]=h}else r[`${u}${l}${y}`]=h}else x[y]=d}Object.keys(x).length&&(r[u]=x)}s=!0}s=!0}}}}if(s){r.display&&String(r.display).includes("!important")&&(c.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);const o=(0,et.css)(r,null,t.context?.cssPrefix);if(o&&c.classList){const f=o.split(" ").filter(Boolean);let e=!1;for(const a of f)c.classList.add(a),e||(a.charCodeAt(0)===95&&a.charCodeAt(1)===99||a.charCodeAt(0)===95&&a.indexOf("_c",1)!==-1)&&(e=!0);e&&typeof c.offsetWidth=="number"&&c.offsetWidth}const i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){const f=r.display;if(f&&f!==i)if(i==="none"){const e=[];for(const a of c.classList)a.startsWith("_d-")&&a!=="_d-none"&&e.push(a);for(const a of e)c.classList.remove(a);c.classList.add("_d-none")}else c.style.display=t.display}}}finally{n&&(0,A.popConfig)(),G.delete(t)}}function ot(t){const{node:c}=t;if(!c||!c.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;const i="aria-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase());c.setAttribute(i,o===!0?"":o)}const n=(0,I.applyAttrTransforms)(t);for(const s in n){const o=n[s];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&c.setAttribute(s,o===!0?"":o)}const r=t.tag||"div";for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||E.REGISTRY.has(s)||s==="on"||n[s]!==void 0)continue;const o=s.charCodeAt(0);if(!(o>=65&&o<=90)&&!M(s)&&!(g.CSS_PROPS_REGISTRY[s]||g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(s))&&(0,I.checkAttributeByTagName)(r,s)){let i=t[s];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=(0,V.replaceLiteralsWithObjectFields)(i,t,t.state,t.context),t[s]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;c.setAttribute(s,i===!0?"":i)}}}const st=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function ct(t,c){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!M(n)||st.has(n))continue;let r=t[n];if(typeof r=="string"&&/^[A-Za-z_$][\w$]*$/.test(r)){const o=r;r=function(f){return t.call(o,f)}}if(typeof r!="function")continue;const s=xt(n);E.LIFECYCLE_EVENTS.has(s)||(0,it.registerEvent)(_t(s),t,r)}St(t)}function St(t){const c=t.node;if(!c||!c.addEventListener)return;const n={};let r=!1;for(const y of st){const d=t[y];typeof d=="function"&&(n[y]=d,r=!0)}if(!r)return;const s=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let i=0,f=0,e=0,a=!1;const u=y=>{const d=y.touches&&y.touches[0]||y.changedTouches&&y.changedTouches[0];d&&(i=d.clientX,f=d.clientY,e=Date.now(),a=!0)},x=y=>{if(!a)return;a=!1;const d=y.changedTouches&&y.changedTouches[0]||y.touches&&y.touches[0];if(!d)return;const h=d.clientX-i,l=d.clientY-f,p=Date.now()-e;if(p>o)return;const _=Math.abs(h),b=Math.abs(l);if(Math.max(_,b)<s)return;let k;if(_>b*1.2)k=h<0?"left":"right";else if(b>_*1.2)k=l<0?"up":"down";else return;const P="onSwipe"+k.charAt(0).toUpperCase()+k.slice(1),C=n[P],S=n.onSwipe;C&&C.call(t,y,t,t.state,t.context),S&&S.call(t,{direction:k,dx:h,dy:l,dt:p,event:y},t,t.state,t.context)};c.addEventListener("touchstart",u,{passive:!0}),c.addEventListener("touchend",x,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{c.removeEventListener("touchstart",u)}catch{}try{c.removeEventListener("touchend",x)}catch{}})}function q(t,c){const n={...t};for(const r in c){const s=n[r],o=c[r];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[r]=q(s,o):n[r]=o}return n}function U(t,c,n){if(!c||!t.node)return;const r=t.childExtends;if(Array.isArray(c)){const o=(t.context?.document||globalThis.document)?.createDocumentFragment();if(!o)return;const i=t.childProps,f=t.childrenAs;for(let e=0;e<c.length;e++){let a=c[e];const u=a;(typeof a=="string"||typeof a=="number")&&(a={text:a});let x=i;if(typeof i=="function")try{x=i(t,a)}catch{x=null}if(f==="state"){let h=u;(typeof u=="string"||typeof u=="number")&&(h={value:u,text:u}),a=x?{...x,state:h}:{state:h}}else x&&(a=q(x,a));if(r&&!a.ignoreChildExtends)if(a.extends){const h=Array.isArray(a.extends)?a.extends:[a.extends],l=Array.isArray(r)?r:[r];a={...a,extends:[...l,...h]}}else a={extends:r,...a};const y=a?.key||`${e}`,d=T(a,t,y,n);d?.node&&o.appendChild(d.node)}t.node.appendChild(o);return}if(typeof c=="string"){const s=tt(c,t);if(Array.isArray(s)){U(t,s,n);return}}if(typeof c=="object")for(const s in c){if(E.REGISTRY.has(s))continue;let o=c[s];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=q(t.childProps,o)),r&&!o.ignoreChildExtends)if(o.extends){const i=Array.isArray(o.extends)?o.extends:[o.extends],f=Array.isArray(r)?r:[r];o={...o,extends:[...f,...i]}}else o={extends:r,...o};T(o,t,s,n)}}}function nt(t,c){let{children:n,content:r}=t;const s=t.childExtends;if(typeof n=="function"){const i=n;n=i(t,t.state,t.context),t.children=n;const f=t.__ref;let e=!1;const a=(0,j.createEffect)(()=>{const u=i(t,t.state,t.context);if(!e){e=!0;return}if(u===t.children)return;if(t.children=u,Array.isArray(u)&&t.childrenAs==="state"){const d=t.childProps,h=[],l=new Map;for(let C=0;C<u.length;C++){const S=u[C];let v=d;if(typeof d=="function")try{v=d(t,S)}catch{v=null}const D=v&&v.key||S&&S.key||`${C}`;h.push(D),l.set(D,{rawChild:S,childProps:v})}const p=new Set(h),_=f.__children.slice();for(const C of _)if(!p.has(C)){const S=t[C];S?.remove&&S.remove(),delete t[C]}const b=t.childExtends,P=(t.context?.document||globalThis.document)?.createDocumentFragment();for(const C of h){const S=l.get(C),v=S.rawChild,D=t[C];if(D&&D.state){if(v&&typeof v=="object"){const $=D.state;if(typeof $.replace=="function")$.replace(v);else if(typeof $.update=="function"){for(const w in $)if(!(w==="__element"||w==="root"||w==="parent"||w==="update")&&!Object.prototype.hasOwnProperty.call(v,w))try{$[w]=void 0}catch{}$.update(v)}else for(const w in v)$[w]=v[w]}continue}let W=v;(typeof v=="string"||typeof v=="number")&&(W={value:v,text:v});const J=S.childProps;let O=J?{...J,state:W}:{state:W};if(b&&!O.ignoreChildExtends)if(O.extends){const $=Array.isArray(O.extends)?O.extends:[O.extends],w=Array.isArray(b)?b:[b];O={...O,extends:[...w,...$]}}else O={extends:b,...O};const m=T(O,t,C,c);m?.node&&P&&P.appendChild(m.node)}P&&P.childNodes.length&&t.node&&t.node.appendChild(P),f.__children=h;return}for(const d of[...f.__children]){const h=t[d];h?.remove&&h.remove(),delete t[d]}f.__children=[],U(t,u,c)},{depth:f.path.length});f.__effects.push(a)}if(U(t,n||r,c),n||r)return;const o=t.context?.components||{};{const i=Object.keys(t);for(let f=0;f<i.length;f++){const e=i[f];if(!e.endsWith("Extends")||typeof t[e]!="string")continue;const a=e.slice(0,-7);if(!a||a.charCodeAt(0)<65||a.charCodeAt(0)>90)continue;const u={extends:t[e]};delete t[e];for(let x=f+1;x<i.length;x++){const y=i[x],d=y.charCodeAt(0);if(d>=65&&d<=90||E.REGISTRY.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;const h=t[y];h!==void 0&&(u[y]=h,delete t[y])}t[a]&&typeof t[a]=="object"?t[a]={...u,...t[a]}:t[a]=u}}for(const i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||E.REGISTRY.has(i)||typeof t[i]!="object"||t[i]===null)continue;const f=i.charCodeAt(0);if(f<65||f>90)continue;let e=t[i];if(!e.__ref){if(!e.extends&&!e.extend){const a=o[i]||o[`smbls.${i}`];a&&(e={extends:a,...e})}if(t.childProps&&(e={...t.childProps,...e}),s&&!e.ignoreChildExtends)if(e.extends){const a=Array.isArray(e.extends)?e.extends:[e.extends],u=Array.isArray(s)?s:[s];e={...e,extends:[...u,...a]}}else e={extends:s,...e};T(e,t,i,c)}}}function X(t,c,n){const{node:r}=t;if(!r)return;const s=c?.node||(c?.nodeType?c:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){const o=n.node.nextSibling;o?s.insertBefore(r,o):s.appendChild(r)}else s.appendChild(r)}function N(t,c,n){const r=t.charAt(0).toLowerCase()+t.slice(1);c.context?.plugins?.length&&(0,Q.runPluginHook)(r,c,n);const s="on"+t,o=c[s];if(typeof o=="function"){const i=c.context?.designSystem;i&&(0,A.pushConfig)(i);try{if(o(c,c.state,c.context,n)===!1)return!1}catch(f){if(c.context?.plugins?.length&&(0,Q.runPluginHook)("error",c,{hook:s,error:f})||console.error(`[DOMQL] Lifecycle "${s}" error:`,f),c.context?.strictMode)throw f}finally{i&&(0,A.popConfig)()}}return!0}var kt=T;
|
|
4
|
+
`):"")}}if(Q(o,c,s),c&&(c[o.key]=o,c.__ref?.__children&&(c.__ref.__children.includes(o.key)||c.__ref.__children.push(o.key))),typeof o.html=="function"&&o.node&&!o.node.innerHTML){const l=o.context?.designSystem;l&&(0,A.pushConfig)(l);try{const y=o.html(o,o.state,o.context);y!=null&&typeof y!="function"&&(o.node.innerHTML=y)}catch{}finally{l&&(0,A.popConfig)()}}if(N("Create",o,i),N("Complete",o,i),N("Render",o,i),N("RenderRouter",o,i),typeof o.onFrame=="function"){const l=o.onFrame,y=o.context?.designSystem,b=()=>{if(o.node){if(o.node.isConnected){y&&(0,A.pushConfig)(y);try{l(o,o.state,o.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{y&&(0,A.popConfig)()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return o}function _t(t,c,n){const i=!c,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,o=i&&s&&t.context?.state,r=n.state!==void 0&&!o?n.state:t.state&&!(0,k.isStore)(t.state)?t.state:void 0;if(r==null){if(c?.state)t.state=c.state,(0,F.applyStateMethods)(t,t.state);else if(t.context?.state){const f=t.context.state,e={...f},a=t.context?.polyglot;if(a?.translations){const d=f.lang||a.defaultLang||"en",g=a.translations[d];if(g&&typeof g=="object")for(const u in g)e[u]===void 0&&(e[u]=g[u]);const p=new Set(a.languages||[]);for(const u in a.translations)!p.has(u)&&e[u]===void 0&&(e[u]=a.translations[u])}t.state=(0,k.isStore)(e)?e:(0,k.createStore)(e),t.state.__element=t,t.state.root=t.state,(0,F.applyStateMethods)(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),(0,F.applyStateMethods)(t,t.state);return}if(typeof r=="string"){if(t.state=tt(r,c),t.state&&typeof t.state=="object"&&!(0,k.isStore)(t.state)){const f=c?.state?.root||c?.state||t.state;Object.defineProperty(t.state,"root",{value:f,enumerable:!1,configurable:!0,writable:!0})}(0,F.applyStateMethods)(t,t.state);return}if(typeof r=="function"){const f=r(t,c?.state);t.state=(0,k.createStore)(f||{})}else t.state=(0,k.createStore)({...r});t.state.__element=t,c?.state?(t.state.parent=c.state,t.state.root=c.state.root||c.state):t.state.root=t.state,(0,F.applyStateMethods)(t,t.state)}function Z(t,c){if(!c)return t;const n=c.split("/");let i=t;for(const s of n){if(i==null)return{};i=i[s]}return i??{}}function tt(t,c){if(!c)return{};if(t===".")return c.state||{};if(t.startsWith("../")){const s=t.slice(3);return s?Z(c.state,s):c.state??{}}if(t.startsWith("~/")){const s=c.state?.root||c.state,o=t.slice(2);return o?Z(s,o):s??{}}if(c.state?.[t]!==void 0)return c.state[t];const n=Z(c.state,t);if(n!=null&&Object.keys(n).length>0)return n;const i=c.context?.polyglot;if(i?.translations){const s=c.state?.root?.lang||i.defaultLang||"en",o=i.translations[s];if(o?.[t]!==void 0)return o[t];if(i.translations[t]!==void 0)return i.translations[t]}return{}}function xt(t){const c=t.__ref,n=t.tag||"div",i=t.context?.designSystem,s=[],o=Object.keys(t);for(let r=0;r<o.length;r++){const f=o[r];if(typeof t[f]!="function"||P.REGISTRY.has(f))continue;const e=f.charCodeAt(0);e>=65&&e<=90||M(f)||x.CSS_PROPS_REGISTRY[f]||x.DEFAULT_CSS_PROPERTIES_LIST&&x.DEFAULT_CSS_PROPERTIES_LIST.has(f)||(0,I.checkAttributeByTagName)(n,f)||s.push({prop:f,fn:t[f]})}for(let r=0;r<s.length;r++){const{prop:f,fn:e}=s[r];c.__exec[f]=e,Object.defineProperty(t,f,{get(){i&&(0,A.pushConfig)(i);try{return e(t,t.state,t.context)}catch{return}finally{i&&(0,A.popConfig)()}},set(a){delete c.__exec[f],Object.defineProperty(t,f,{value:a,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function z(t,c){const n=t.__ref;if(xt(t),typeof t.text=="function"){const s=t.text,o=(0,j.createEffect)(()=>{if(!n.contentManaged)try{let r=s(t,t.state,t.context);t.node&&r!=null&&typeof r!="function"&&typeof r!="object"&&(typeof r=="string"&&r.includes("{{")&&(r=V.replaceLiteralsWithObjectFields.call(t,r,t.state)),t.tag==="string"?t.node.nodeValue=r:t.node.textContent=r)}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){const s=t.text,o=(0,j.createEffect)(()=>{if(n.contentManaged)return;const r=V.replaceLiteralsWithObjectFields.call(t,s,t.state);r!=null&&(t.text=r),t.node&&(t.tag==="string"?t.node.nodeValue=r??"":t.node.textContent=r??"")},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&typeof t[s]=="function"&&!P.REGISTRY.has(s)&&!M(s)&&!n.__exec[s]){if(x.CSS_PROPS_REGISTRY[s]){const o=t[s],r=s,f=(0,j.createEffect)(()=>{const e=t.context?.designSystem;e&&(0,A.pushConfig)(e);try{const a=o(t,t.state,t.context),d=x.CSS_PROPS_REGISTRY[r](a,t,t.state,t.context);d&&t.node?K(t.node,d):t.node&&(r==="show"||r==="hide")&&(t.node.style.display="")}finally{e&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}else if(x.DEFAULT_CSS_PROPERTIES_LIST&&x.DEFAULT_CSS_PROPERTIES_LIST.has(s)){const o=t[s],r=s,f=(0,j.createEffect)(()=>{const e=t.context?.designSystem;e&&(0,A.pushConfig)(e);try{const a=o(t,t.state,t.context);t.node&&(a!=null?K(t.node,{[r]:a}):t.node.style[r]="")}finally{e&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}}if(typeof c.html=="function"){const s=c.html,o=(0,j.createEffect)(()=>{const r=t.context?.designSystem;r&&(0,A.pushConfig)(r);try{const f=s(t,t.state,t.context);t.node&&f!=null&&typeof f!="function"&&(t.node.innerHTML=f)}finally{r&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(o),n.__exec.html=s}if(typeof c.value=="function"){const s=c.value,o=(0,j.createEffect)(()=>{try{const r=s(t,t.state,t.context);if(!t.node||!("value"in t.node))return;const f=r==null?"":String(r);if(t.node.value===f)return;const e=typeof document<"u"&&document.activeElement===t.node,a=e&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=e&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=f,e&&a!=null&&d!=null)try{t.node.setSelectionRange(a,d)}catch{}}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.value=s}if(typeof c.style=="function"){const s=c.style,o=(0,j.createEffect)(()=>{const r=s(t,t.state,t.context);K(t.node,r)},{depth:n.path.length});n.__effects.push(o),n.__exec.style=s}else if(t.style&&typeof t.style=="object")for(const s in t.style){const o=t.style[s];if(typeof o!="function")continue;const r=(0,j.createEffect)(()=>{try{const f=o(t,t.state,t.context);t.node&&K(t.node,{[s]:f})}catch{}},{depth:n.path.length});n.__effects.push(r)}if(t.attr&&typeof t.attr=="object"){for(const s in t.attr)if(typeof t.attr[s]=="function"){const o=t.attr[s],r=s,f=(0,j.createEffect)(()=>{try{const e=o(t,t.state,t.context);t.node?.setAttribute&&(e==null||e===!1?t.node.removeAttribute(r):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(r,e===!0?"":e))}catch{}},{depth:n.path.length});n.__effects.push(f)}}if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o!="function")continue;const r="aria-"+s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),f=(0,j.createEffect)(()=>{try{const e=o(t,t.state,t.context);if(!t.node?.setAttribute)return;e==null||e===!1?t.node.removeAttribute(r):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(r,e===!0?"":e)}catch{}},{depth:n.path.length});n.__effects.push(f)}if(t.data&&typeof t.data=="object")for(const s in t.data){const o=t.data[s];if(typeof o!="function")continue;const f="data-"+s.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),e=(0,j.createEffect)(()=>{try{const a=o(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(f):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(f,a===!0?"":a)}catch{}},{depth:n.path.length});n.__effects.push(e)}const i=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(i)for(const s in i){const o=i[s];if(typeof o!="function")continue;const r=(0,j.createEffect)(()=>{try{const f=o(t,t.state,t.context);if(!t.node?.classList)return;typeof f=="string"?t.node.classList.add(f):f?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:n.path.length});n.__effects.push(r)}if(typeof c.if=="function"){const s=c.if,o=(0,j.createEffect)(()=>{let r;try{r=s(t,t.state,t.context)}catch(e){if(r=!1,n.__ifError=e,typeof console<"u"&&console.warn){const a=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${a} \u2014 treating as false:`,e?.message||e)}return}const f=n.__if;if(n.__if=!!r,f&&!n.__if&&t.node)t.node.remove();else if(!f&&n.__if)if(n.__ifInitialized){t.node||(t.node=(0,R.cacheNode)(t));const e=t.parent,a=e?.node;if(a&&t.node){let d=null;const g=Object.keys(e),p=g.indexOf(t.key);for(let u=p+1;u<g.length;u++){const h=e[g[u]];if(h?.node?.parentNode===a){d=h.node;break}}d?a.insertBefore(t.node,d):a.appendChild(t.node)}else Q(t,t.parent);B(t)}else{if(n.__ifInitialized=!0,t.tag||(t.tag=(0,R.detectTag)(t)),N("Init",t,{}),t.node||(t.node=(0,R.cacheNode)(t)),!t.node)return;N("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id);const e=c.if;delete c.if;try{z(t,c)}finally{c.if=e}B(t),ot(t),ct(t,{}),nt(t,{}),Q(t,t.parent)}},{depth:n.path.length});n.__effects.push(o)}for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||P.REGISTRY.has(s)||typeof t[s]!="function")continue;const o=s.charCodeAt(0);if(o>=65&&o<=90||M(s))continue;const r=t[s];n.__exec[s]=r;const f=t.tag||"div";if((0,I.checkAttributeByTagName)(f,s)&&!x.CSS_PROPS_REGISTRY[s]&&!(x.DEFAULT_CSS_PROPERTIES_LIST&&x.DEFAULT_CSS_PROPERTIES_LIST.has(s))){const e=s,a=(0,j.createEffect)(()=>{try{const d=r(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1?t.node.removeAttribute(e):typeof d!="function"&&typeof d!="object"&&(e==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(e,d===!0?"":d)))}catch{}},{depth:n.path.length});n.__effects.push(a)}}jt(t),St(t)}function B(t){const{node:c}=t;if(c){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?c.nodeValue=t.text:c.textContent=t.text:typeof t.text=="number"&&(c.textContent=t.text),Ct(t),typeof t.html=="string"&&(c.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in c){const n=String(t.value);c.value!==n&&(c.value=n)}if(t.style&&typeof t.style=="object"&&K(c,t.style),t.attr&&typeof t.attr=="object")for(const n in t.attr){const i=t.attr[n];typeof i=="function"||typeof i=="object"||i==null||i===!1||c.setAttribute&&c.setAttribute(n,i===!0?"":i)}if(t.data&&typeof t.data=="object")for(const n in t.data){const i=t.data[n];typeof i=="function"||typeof i=="object"||i==null||i===!1||c.dataset&&(c.dataset[n]=i===!0?"":i)}if(t.classlist||t.class){const n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(i=>i&&c.classList.add(i));else if(typeof n=="object")for(const i in n){const s=typeof n[i]=="function"?n[i](t,t.state,t.context):n[i];s&&c.classList.add(typeof s=="string"?s:i)}}}}function K(t,c){if(!t||!c||!t.style)return;let n=null;for(const i in c){const s=c[i];if(s!=null){if(i.charAt(0)==="&"&&typeof s=="object"){n||(n={}),n[i]=s;continue}try{const o=String(s),r=i.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),f=o.trim(),e=/\s*!important\s*$/.test(f),a=f.replace(/\s*!important\s*$/,"");t.style.setProperty(r,a,e?"important":"")}catch{}}}n&&vt(t,n)}let At=0;function vt(t,c){const n=`_ds${At++}`;t.classList.add(n);const i=t.ownerDocument;let s=i.querySelector("style[data-smbls-scoped]");s||(s=i.createElement("style"),s.setAttribute("data-smbls-scoped",""),i.head.appendChild(s));let o="";for(const r in c){const f="."+n,e=r.replace(/&/g,f).split(",").map(d=>{const g=d.trim();return g.includes(f)?g:f+g}).join(", "),a=c[r];if(typeof a=="object"){let d="",g="";for(const p in a){const u=a[p];if(typeof u=="object"){const h=p.includes("&")?e.split(", ").map(y=>p.replace(/&/g,y)).join(", "):e.split(", ").map(y=>`${y} ${p}`).join(", ");let l="";for(const y in u)l+=`${y.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${u[y]};`;g+=`${h} { ${l} }
|
|
5
|
+
`}else d+=`${p.replace(/[A-Z]/g,h=>"-"+h.toLowerCase())}: ${u};`}d&&(o+=`${e} { ${d} }
|
|
6
|
+
`),g&&(o+=g)}}o&&(s.textContent+=o)}function jt(t){const c=t.subscribeTo;if(!Array.isArray(c)||c.length===0)return;const n=t.__ref;for(let i=0;i<c.length;i++){const s=c[i];if(typeof s!="string"||s.length===0)continue;const o=s.split("."),r=o[0],f=o.slice(1),e={value:!1},a=(0,j.createEffect)(()=>{const d=t.state&&((0,k.isStore)(t.state)?t.state.root:null);if(!d||!(0,k.isStore)(d))return;let g=d;g=g[r];for(let p=0;p<f.length&&!(g==null||typeof g!="object");p++)if((0,k.isStore)(g))g=g[f[p]];else break;if(e.value&&typeof t.onUpdate=="function"){const p=t.context?.designSystem;p&&(0,A.pushConfig)(p);try{t.onUpdate(t,t.state,t.context)}catch(u){t.context?.plugins?.length&&(0,W.runPluginHook)("error",t,{hook:"onUpdate",error:u})||console.error("[DOMQL] subscribeTo onUpdate error:",u)}finally{p&&(0,A.popConfig)()}}},{depth:n.path.length});e.value=!0,n.__effects.push(a)}}function St(t){const c=t.__ref;c.__conditionalRunners=[];for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const i=n.charAt(0);if(i!=="."&&i!=="!")continue;const s=n.slice(1);if(!s)continue;const o=t[n];if(!o||typeof o!="object")continue;const r=i==="!",f={lastMatch:!1,appliedKeys:null},e=()=>{if(!t.node)return;let d;const g=t[s];if(g===void 0)if(t.state&&s in t.state)d=t.state[s];else{const h=t.context?.cases?.[s];if(h===void 0)return;try{d=typeof h=="function"?h.call(t,t):h}catch(l){d=!1,c.__conditionalError=l,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,l?.message||l)}}else if(typeof g=="function")try{d=g(t,t.state,t.context)}catch(h){d=!1,c.__conditionalError=h,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,h?.message||h)}else d=g;const p=r?!d:!!d;if(p===f.lastMatch)return;f.lastMatch=p;const u=t.context?.designSystem;u&&(0,A.pushConfig)(u);try{if(p){const h={};for(const y in o){if(!Object.prototype.hasOwnProperty.call(o,y))continue;const b=typeof o[y]=="function"?o[y](t,t.state,t.context):o[y];if(b!=null)if(x.CSS_PROPS_REGISTRY[y]){const _=x.CSS_PROPS_REGISTRY[y](b,t,t.state,t.context);if(_){const w=Array.isArray(_)?_:[_];for(const O of w)O&&Object.assign(h,O)}}else x.DEFAULT_CSS_PROPERTIES_LIST&&x.DEFAULT_CSS_PROPERTIES_LIST.has(y)&&(h[y]=b)}const l=Object.keys(h);l.length?(K(t.node,h),f.appliedKeys=l):f.appliedKeys=null}else if(f.appliedKeys){for(const h of f.appliedKeys)t.node.style[h]="";f.appliedKeys=null}}finally{u&&(0,A.popConfig)()}};c.__conditionalRunners.push(e);const a=(0,j.createEffect)(e,{depth:c.path.length});c.__effects.push(a)}}const G=new WeakSet;function Ct(t){const{node:c}=t;if(!c)return;if(G.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}G.add(t);const n=t.context?.designSystem;n&&(0,A.pushConfig)(n);try{const i={};let s=!1;for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||P.REGISTRY.has(o))continue;const r=o.charCodeAt(0);if(!(r>=65&&r<=90)&&!M(o)){if(x.CSS_PROPS_REGISTRY[o]){const f=t[o],e=x.CSS_PROPS_REGISTRY[o](f,t,t.state,t.context);if(e){if(Array.isArray(e))for(const a of e)a&&Object.assign(i,a);else Object.assign(i,e);s=!0}}else if(x.DEFAULT_CSS_PROPERTIES_LIST&&x.DEFAULT_CSS_PROPERTIES_LIST.has(o)){const f=t[o];f!=null&&typeof f!="object"&&(i[o]=f,s=!0)}else if(o.charCodeAt(0)===45){const f=t[o];f!=null&&typeof f!="object"&&(i[o]=f,s=!0)}else if(o.charAt(0)==="&"){const f=t[o];f&&typeof f=="object"&&(i[o]=f,s=!0)}else if(o.charAt(0)==="@"||o.charAt(0)===":"){const f=t[o];if(f&&typeof f=="object"){const e={};for(const a in f){let d=f[a];if(typeof d=="function"&&(d=d(t,t.state,t.context)),!(d==null||typeof d=="function"))if(x.CSS_PROPS_REGISTRY[a]){const g=x.CSS_PROPS_REGISTRY[a](d,t,t.state,t.context);if(g)if(Array.isArray(g))for(const p of g)p&&Object.assign(e,p);else Object.assign(e,g)}else e[a]=d}if(Object.keys(e).length){if(o.length>1&&o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")&&!o.startsWith("@supports")&&(o==="@dark"||o==="@light"||!t.context?.designSystem?.media?.[o.slice(1)])){const d={};for(const p in e){const u=e[p];d[p]=typeof u=="string"&&!u.includes("!important")?u+" !important":u}const g=o.slice(1);i[`[data-theme="${g}"] &`]=d}else{let d=o;if(o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")){const p=o.slice(1),u=t.context?.designSystem?.media?.[p]||t.context?.designSystem?.media?.[p];u&&(d=`@media ${u}`)}const g={};for(const p in e){const u=e[p];if(u&&typeof u=="object"&&!Array.isArray(u)){const h={};for(const y in u)if(x.CSS_PROPS_REGISTRY[y]){const b=x.CSS_PROPS_REGISTRY[y](u[y],t,t.state,t.context);if(b)if(Array.isArray(b))for(const _ of b)_&&Object.assign(h,_);else Object.assign(h,b)}else h[y]=u[y];const l=p.startsWith(":")?"":" ";if(d.includes(",")){const y=d.split(",").map(b=>`${b.trim()}${l}${p}`).join(", ");i[y]=h}else i[`${d}${l}${p}`]=h}else g[p]=u}Object.keys(g).length&&(i[d]=g)}s=!0}s=!0}}}}if(s){i.display&&String(i.display).includes("!important")&&(c.style.setProperty("display",String(i.display).replace(/\s*!important\s*$/,""),"important"),delete i.display);const o=(0,ft.css)(i,null,t.context?.cssPrefix);if(o&&c.classList){const f=o.split(" ").filter(Boolean);let e=!1;for(const a of f)c.classList.add(a),e||(a.charCodeAt(0)===95&&a.charCodeAt(1)===99||a.charCodeAt(0)===95&&a.indexOf("_c",1)!==-1)&&(e=!0);e&&typeof c.offsetWidth=="number"&&c.offsetWidth}const r=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(r!=null){const f=i.display;if(f&&f!==r)if(r==="none"){const e=[];for(const a of c.classList)a.startsWith("_d-")&&a!=="_d-none"&&e.push(a);for(const a of e)c.classList.remove(a);c.classList.add("_d-none")}else c.style.display=t.display}}}finally{n&&(0,A.popConfig)(),G.delete(t)}}function ot(t){const{node:c}=t;if(!c||!c.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;const r="aria-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase());c.setAttribute(r,o===!0?"":o)}const n=(0,I.applyAttrTransforms)(t);for(const s in n){const o=n[s];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&c.setAttribute(s,o===!0?"":o)}const i=t.tag||"div";for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||P.REGISTRY.has(s)||s==="on"||n[s]!==void 0)continue;const o=s.charCodeAt(0);if(!(o>=65&&o<=90)&&!M(s)&&!(x.CSS_PROPS_REGISTRY[s]||x.DEFAULT_CSS_PROPERTIES_LIST&&x.DEFAULT_CSS_PROPERTIES_LIST.has(s))&&(0,I.checkAttributeByTagName)(i,s)){let r=t[s];if(r==null||r===!1||(typeof r=="string"&&r.includes("{{")&&(r=(0,V.replaceLiteralsWithObjectFields)(r,t,t.state,t.context),t[s]=r),r==null||r===!1||typeof r=="function"||typeof r=="object"))continue;c.setAttribute(s,r===!0?"":r)}}}const st=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function ct(t,c){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!M(n)||st.has(n))continue;let i=t[n];if(typeof i=="string"&&/^[A-Za-z_$][\w$]*$/.test(i)){const o=i;i=function(f){return t.call(o,f)}}if(typeof i!="function")continue;const s=gt(n);P.LIFECYCLE_EVENTS.has(s)||(0,rt.registerEvent)(bt(s),t,i)}kt(t)}function kt(t){const c=t.node;if(!c||!c.addEventListener)return;const n={};let i=!1;for(const p of st){const u=t[p];typeof u=="function"&&(n[p]=u,i=!0)}if(!i)return;const s=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let r=0,f=0,e=0,a=!1;const d=p=>{const u=p.touches&&p.touches[0]||p.changedTouches&&p.changedTouches[0];u&&(r=u.clientX,f=u.clientY,e=Date.now(),a=!0)},g=p=>{if(!a)return;a=!1;const u=p.changedTouches&&p.changedTouches[0]||p.touches&&p.touches[0];if(!u)return;const h=u.clientX-r,l=u.clientY-f,y=Date.now()-e;if(y>o)return;const b=Math.abs(h),_=Math.abs(l);if(Math.max(b,_)<s)return;let w;if(b>_*1.2)w=h<0?"left":"right";else if(_>b*1.2)w=l<0?"up":"down";else return;const O="onSwipe"+w.charAt(0).toUpperCase()+w.slice(1),S=n[O],C=n.onSwipe;S&&S.call(t,p,t,t.state,t.context),C&&C.call(t,{direction:w,dx:h,dy:l,dt:y,event:p},t,t.state,t.context)};c.addEventListener("touchstart",d,{passive:!0}),c.addEventListener("touchend",g,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{c.removeEventListener("touchstart",d)}catch{}try{c.removeEventListener("touchend",g)}catch{}})}function q(t,c){const n={...t};for(const i in c){const s=n[i],o=c[i];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[i]=q(s,o):n[i]=o}return n}function X(t,c,n){if(!c||!t.node)return;const i=t.childExtends;if(Array.isArray(c)){const o=(t.context?.document||globalThis.document)?.createDocumentFragment();if(!o)return;const r=t.childProps,f=t.childrenAs;for(let e=0;e<c.length;e++){let a=c[e];const d=a;(typeof a=="string"||typeof a=="number")&&(a={text:a});let g=r;if(typeof r=="function")try{g=r(t,a)}catch{g=null}if(f==="state"){let h=d;(typeof d=="string"||typeof d=="number")&&(h={value:d,text:d}),a=g?{...g,state:h}:{state:h}}else g&&(a=q(g,a));if(i&&!a.ignoreChildExtends)if(a.extends){const h=Array.isArray(a.extends)?a.extends:[a.extends],l=Array.isArray(i)?i:[i];a={...a,extends:[...l,...h]}}else a={extends:i,...a};const p=a?.key||`${e}`,u=T(a,t,p,n);u?.node&&o.appendChild(u.node)}t.node.appendChild(o);return}if(typeof c=="string"){const s=tt(c,t);if(Array.isArray(s)){X(t,s,n);return}}if(typeof c=="object")for(const s in c){if(P.REGISTRY.has(s))continue;let o=c[s];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=q(t.childProps,o)),i&&!o.ignoreChildExtends)if(o.extends){const r=Array.isArray(o.extends)?o.extends:[o.extends],f=Array.isArray(i)?i:[i];o={...o,extends:[...f,...r]}}else o={extends:i,...o};T(o,t,s,n)}}}function nt(t,c){let{children:n,content:i}=t;const s=t.childExtends;if(typeof n=="function"){const r=n;n=r(t,t.state,t.context),t.children=n;const f=t.__ref;let e=!1;const a=(0,j.createEffect)(()=>{const d=r(t,t.state,t.context);if(!e){e=!0;return}if(d===t.children)return;if(t.children=d,Array.isArray(d)&&t.childrenAs==="state"){const u=t.childProps,h=[],l=new Map;for(let S=0;S<d.length;S++){const C=d[S];let v=u;if(typeof u=="function")try{v=u(t,C)}catch{v=null}const D=v&&v.key||C&&C.key||`${S}`;h.push(D),l.set(D,{rawChild:C,childProps:v})}const y=new Set(h),b=f.__children.slice();for(const S of b)if(!y.has(S)){const C=t[S];C?.remove&&C.remove(),delete t[S]}const _=t.childExtends,O=(t.context?.document||globalThis.document)?.createDocumentFragment();for(const S of h){const C=l.get(S),v=C.rawChild,D=t[S];if(D&&D.state){if(v&&typeof v=="object"){const $=D.state;if(typeof $.replace=="function")$.replace(v);else if(typeof $.update=="function"){for(const E in $)if(!(E==="__element"||E==="root"||E==="parent"||E==="update")&&!Object.prototype.hasOwnProperty.call(v,E))try{$[E]=void 0}catch{}$.update(v)}else for(const E in v)$[E]=v[E]}continue}let H=v;(typeof v=="string"||typeof v=="number")&&(H={value:v,text:v});const J=C.childProps;let L=J?{...J,state:H}:{state:H};if(_&&!L.ignoreChildExtends)if(L.extends){const $=Array.isArray(L.extends)?L.extends:[L.extends],E=Array.isArray(_)?_:[_];L={...L,extends:[...E,...$]}}else L={extends:_,...L};const m=T(L,t,S,c);m?.node&&O&&O.appendChild(m.node)}O&&O.childNodes.length&&t.node&&t.node.appendChild(O),f.__children=h;return}for(const u of[...f.__children]){const h=t[u];h?.remove&&h.remove(),delete t[u]}f.__children=[],X(t,d,c)},{depth:f.path.length});f.__effects.push(a)}if(X(t,n||i,c),n||i)return;const o=t.context?.components||{};{const r=Object.keys(t);for(let f=0;f<r.length;f++){const e=r[f];if(!e.endsWith("Extends")||typeof t[e]!="string")continue;const a=e.slice(0,-7);if(!a||a.charCodeAt(0)<65||a.charCodeAt(0)>90)continue;const d={extends:t[e]};delete t[e];for(let g=f+1;g<r.length;g++){const p=r[g],u=p.charCodeAt(0);if(u>=65&&u<=90||P.REGISTRY.has(p)||typeof t[p]=="function"&&(p.startsWith("on")||p.startsWith(".")))break;const h=t[p];h!==void 0&&(d[p]=h,delete t[p])}t[a]&&typeof t[a]=="object"?t[a]={...d,...t[a]}:t[a]=d}}for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||P.REGISTRY.has(r)||typeof t[r]!="object"||t[r]===null)continue;const f=r.charCodeAt(0);if(f<65||f>90)continue;let e=t[r];if(!e.__ref){if(!e.extends&&!e.extend){const a=o[r]||o[`smbls.${r}`];a&&(e={extends:a,...e})}if(t.childProps&&(e={...t.childProps,...e}),s&&!e.ignoreChildExtends)if(e.extends){const a=Array.isArray(e.extends)?e.extends:[e.extends],d=Array.isArray(s)?s:[s];e={...e,extends:[...d,...a]}}else e={extends:s,...e};T(e,t,r,c)}}}function Q(t,c,n){const{node:i}=t;if(!i)return;const s=c?.node||(c?.nodeType?c:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(i,n.node);else if(n?.position==="after"&&n.node){const o=n.node.nextSibling;o?s.insertBefore(i,o):s.appendChild(i)}else s.appendChild(i)}function N(t,c,n){const i=t.charAt(0).toLowerCase()+t.slice(1);c.context?.plugins?.length&&(0,W.runPluginHook)(i,c,n);const s="on"+t,o=c[s];if(typeof o=="function"){const r=c.context?.designSystem;r&&(0,A.pushConfig)(r);try{if(o(c,c.state,c.context,n)===!1)return!1}catch(f){if(c.context?.plugins?.length&&(0,W.runPluginHook)("error",c,{hook:s,error:f})||console.error(`[DOMQL] Lifecycle "${s}" error:`,f),c.context?.strictMode)throw f}finally{r&&(0,A.popConfig)()}}return!0}var wt=T;
|
package/dist/cjs/src/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},u=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of c(e))!d.call(t,o)&&o!==r&&s(t,o,{get:()=>e[o],enumerable:!(n=a(e,o))||n.enumerable});return t};var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},u=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of c(e))!d.call(t,o)&&o!==r&&s(t,o,{get:()=>e[o],enumerable:!(n=a(e,o))||n.enumerable});return t};var i=t=>u(s({},"__esModule",{value:!0}),t);var x={};p(x,{DELEGATED_EVENTS:()=>E,LIFECYCLE_EVENTS:()=>m,MIXINS:()=>h,PASSIVE_EVENTS:()=>v,REGISTRY:()=>l});module.exports=i(x);const l=new Set(["extends","children","content","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","__name","__ref","__hash","__text","parent","node"]),h={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},m=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","error","beforeRemove","remove"]),v=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),E=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);
|
package/dist/esm/src/create.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{createStore as
|
|
1
|
+
import{createStore as W,createScopeStore as ft,isStore as D}from"@symbo.ls/signal";import{createEffect as A}from"@symbo.ls/signal";import{cacheNode as H,detectTag as st}from"./cache.js";import{REGISTRY as N,LIFECYCLE_EVENTS as at}from"./registry.js";import{registerEvent as dt}from"./delegate.js";import{applyExtends as ut}from"./extends.js";import{addMethods as pt}from"./methods.js";import"./dispose.js";import{replaceLiteralsWithObjectFields as Y}from"@symbo.ls/utils";import{runPluginHook as U}from"@symbo.ls/utils/function.js";import{applyStateMethods as I}from"@symbo.ls/state";import{CSS_PROPS_REGISTRY as S,DEFAULT_CSS_PROPERTIES_LIST as C}from"css-in-props";import{css as yt}from"@symbo.ls/css";import{pushConfig as O,popConfig as L}from"@symbo.ls/scratch";import{checkAttributeByTagName as Z,applyAttrTransforms as lt}from"attrs-in-props";let ht=1;function M(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function gt(t){return t.charAt(2).toLowerCase()+t.slice(3)}function bt(t){return t.toLowerCase()}function z(t,c){const n={...t};for(const e in c){const s=n[e],o=c[e];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[e]=z(s,o):n[e]=o}return n}function K(t,c,n,e={},s){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});const o=Object.create(null);o.key=n||t.key||`_${ht++}`,o.parent=c||null,o.context=t.context||c?.context||e.context||{},o.context.__create||(o.context.__create=K);const r=o.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:c?.__ref?.root||o,path:c?.__ref?.path?[...c.__ref.path,o.key]:[o.key]};if(n&&!t.extends&&!t.extend){const l=n.indexOf("_");if(l>0){const y=n.substring(0,l),b=o.context?.components;b&&(b[y]||b["smbls."+y])&&(t={extends:y,...t})}}ut(o,t,e);const f=new Set(["childProps","attr","style","scope","data"]),i=o.props&&typeof o.props=="object"?o.props:null;for(const l in t){if(l==="parent"||l==="node"||l==="__ref"||l==="extends"||l==="context"||l==="props")continue;const y=t[l],b=o[l],_=b&&y&&typeof b=="object"&&typeof y=="object"&&!Array.isArray(b)&&!Array.isArray(y)&&typeof b!="function"&&typeof y!="function";_&&l.charCodeAt(0)>=65&&l.charCodeAt(0)<=90?o[l]=z(b,y):_&&f.has(l)?o[l]={...b,...y}:o[l]=y}function a(l){for(const y in l){const b=l[y],_=o[y],k=_&&b&&typeof _=="object"&&typeof b=="object"&&!Array.isArray(_)&&!Array.isArray(b)&&typeof _!="function"&&typeof b!="function";k&&y.charCodeAt(0)>=65&&y.charCodeAt(0)<=90?o[y]=z(_,b):k&&f.has(y)?o[y]={..._,...b}:o[y]=b}}i&&a(i),t.props&&typeof t.props=="object"&&a(t.props),t.data!==void 0&&(o.data=t.data),t.classlist!==void 0&&(o.classlist=t.classlist),t.text!==void 0&&(o.text=t.text),t.html!==void 0&&(o.html=t.html);const d=o.scope&&typeof o.scope=="object"?o.scope:null,g=c?.scope,p=o.context&&typeof o.context.globalScope=="object"&&o.context.globalScope||null,u=g||p||null;if(t.scope!==void 0||d){const l={};d&&Object.assign(l,d),t.scope!==void 0&&Object.assign(l,t.scope),o.scope=ft(l,u)}else u&&(o.scope=u);if(t.if!==void 0&&(o.if=t.if),pt(o),_t(o,c,t),o.if!=null){let l;if(typeof o.if=="function")try{l=o.if(o,o.state,o.context)}catch(y){if(l=!1,r.__ifError=y,typeof console<"u"&&console.warn){const b=o.key||o.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${b} \u2014 treating as false:`,y?.message||y)}}else l=o.if;r.__if=!!l}if(r.__if)typeof t.if=="function"&&(r.__ifInitialized=!0);else return c&&(c[o.key]=o),typeof t.if=="function"&&G(o,{if:t.if}),o;o.tag||(o.tag=st(o)),T("Init",o,e);const h=o.node=H(o);if(!h)return o;T("AttachNode",o,e),h.setAttribute&&o.key&&h.setAttribute("data-key",o.key),h.setAttribute&&o.context?.scopeSelector&&o.context.scopeSelector!==":root"&&o.context.key&&o.key===o.context.key&&h.setAttribute("data-smbls-app",o.context.key),o.id&&h.setAttribute&&(h.id=o.id),G(o,t),q(o),nt(o),it(o,e);try{et(o,e)}catch(l){if(typeof console<"u"&&console.error){const y=o.__ref?.path?.join(".")||o.key||"<root>";console.error(`[smbls] createChildren failed at ${y}:`,l?.message||l,l?.stack?`
|
|
2
2
|
`+l.stack.split(`
|
|
3
3
|
`).slice(0,6).join(`
|
|
4
|
-
`):"")}}if(J(o,c,s),c&&(c[o.key]=o,c.__ref?.__children&&(c.__ref.__children.includes(o.key)||c.__ref.__children.push(o.key))),typeof o.html=="function"&&o.node&&!o.node.innerHTML){const l=o.context?.designSystem;l&&L(l);try{const p=o.html(o,o.state,o.context);p!=null&&typeof p!="function"&&(o.node.innerHTML=p)}catch{}finally{l&&$()}}if(T("Create",o,r),T("Complete",o,r),T("Render",o,r),T("RenderRouter",o,r),typeof o.onFrame=="function"){const l=o.onFrame,p=o.context?.designSystem,_=()=>{if(o.node){if(o.node.isConnected){p&&L(p);try{l(o,o.state,o.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{p&&$()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return o}function bt(t,c,n){const r=!c,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,o=r&&s&&t.context?.state,i=n.state!==void 0&&!o?n.state:t.state&&!W(t.state)?t.state:void 0;if(i==null){if(c?.state)t.state=c.state,F(t,t.state);else if(t.context?.state){const f=t.context.state,e={...f},a=t.context?.polyglot;if(a?.translations){const u=f.lang||a.defaultLang||"en",x=a.translations[u];if(x&&typeof x=="object")for(const d in x)e[d]===void 0&&(e[d]=x[d]);const y=new Set(a.languages||[]);for(const d in a.translations)!y.has(d)&&e[d]===void 0&&(e[d]=a.translations[d])}t.state=W(e)?e:V(e),t.state.__element=t,t.state.root=t.state,F(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),F(t,t.state);return}if(typeof i=="string"){if(t.state=ct(i,c),t.state&&typeof t.state=="object"&&!W(t.state)){const f=c?.state?.root||c?.state||t.state;Object.defineProperty(t.state,"root",{value:f,enumerable:!1,configurable:!0,writable:!0})}F(t,t.state);return}if(typeof i=="function"){const f=i(t,c?.state);t.state=V(f||{})}else t.state=V({...i});t.state.__element=t,c?.state?(t.state.parent=c.state,t.state.root=c.state.root||c.state):t.state.root=t.state,F(t,t.state)}function z(t,c){if(!c)return t;const n=c.split("/");let r=t;for(const s of n){if(r==null)return{};r=r[s]}return r??{}}function ct(t,c){if(!c)return{};if(t===".")return c.state||{};if(t.startsWith("../")){const s=t.slice(3);return s?z(c.state,s):c.state??{}}if(t.startsWith("~/")){const s=c.state?.root||c.state,o=t.slice(2);return o?z(s,o):s??{}}if(c.state?.[t]!==void 0)return c.state[t];const n=z(c.state,t);if(n!=null&&Object.keys(n).length>0)return n;const r=c.context?.polyglot;if(r?.translations){const s=c.state?.root?.lang||r.defaultLang||"en",o=r.translations[s];if(o?.[t]!==void 0)return o[t];if(r.translations[t]!==void 0)return r.translations[t]}return{}}function gt(t){const c=t.__ref,n=t.tag||"div",r=t.context?.designSystem,s=[],o=Object.keys(t);for(let i=0;i<o.length;i++){const f=o[i];if(typeof t[f]!="function"||N.has(f))continue;const e=f.charCodeAt(0);e>=65&&e<=90||D(f)||C[f]||S&&S.has(f)||Z(n,f)||s.push({prop:f,fn:t[f]})}for(let i=0;i<s.length;i++){const{prop:f,fn:e}=s[i];c.__exec[f]=e,Object.defineProperty(t,f,{get(){r&&L(r);try{return e(t,t.state,t.context)}catch{return}finally{r&&$()}},set(a){delete c.__exec[f],Object.defineProperty(t,f,{value:a,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function G(t,c){const n=t.__ref;if(gt(t),typeof t.text=="function"){const s=t.text,o=A(()=>{if(!n.contentManaged)try{let i=s(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=Y.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){const s=t.text,o=A(()=>{if(n.contentManaged)return;const i=Y.call(t,s,t.state);i!=null&&(t.text=i),t.node&&(t.tag==="string"?t.node.nodeValue=i??"":t.node.textContent=i??"")},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&typeof t[s]=="function"&&!N.has(s)&&!D(s)&&!n.__exec[s]){if(C[s]){const o=t[s],i=s,f=A(()=>{const e=t.context?.designSystem;e&&L(e);try{const a=o(t,t.state,t.context),u=C[i](a,t,t.state,t.context);u&&t.node?K(t.node,u):t.node&&(i==="show"||i==="hide")&&(t.node.style.display="")}finally{e&&$()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}else if(S&&S.has(s)){const o=t[s],i=s,f=A(()=>{const e=t.context?.designSystem;e&&L(e);try{const a=o(t,t.state,t.context);t.node&&(a!=null?K(t.node,{[i]:a}):t.node.style[i]="")}finally{e&&$()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}}if(typeof c.html=="function"){const s=c.html,o=A(()=>{const i=t.context?.designSystem;i&&L(i);try{const f=s(t,t.state,t.context);t.node&&f!=null&&typeof f!="function"&&(t.node.innerHTML=f)}finally{i&&$()}},{depth:n.path.length});n.__effects.push(o),n.__exec.html=s}if(typeof c.value=="function"){const s=c.value,o=A(()=>{try{const i=s(t,t.state,t.context);if(!t.node||!("value"in t.node))return;const f=i==null?"":String(i);if(t.node.value===f)return;const e=typeof document<"u"&&document.activeElement===t.node,a=e&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,u=e&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=f,e&&a!=null&&u!=null)try{t.node.setSelectionRange(a,u)}catch{}}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.value=s}if(typeof c.style=="function"){const s=c.style,o=A(()=>{const i=s(t,t.state,t.context);K(t.node,i)},{depth:n.path.length});n.__effects.push(o),n.__exec.style=s}else if(t.style&&typeof t.style=="object")for(const s in t.style){const o=t.style[s];if(typeof o!="function")continue;const i=A(()=>{try{const f=o(t,t.state,t.context);t.node&&K(t.node,{[s]:f})}catch{}},{depth:n.path.length});n.__effects.push(i)}if(t.attr&&typeof t.attr=="object"){for(const s in t.attr)if(typeof t.attr[s]=="function"){const o=t.attr[s],i=s,f=A(()=>{try{const e=o(t,t.state,t.context);t.node?.setAttribute&&(e==null||e===!1?t.node.removeAttribute(i):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(i,e===!0?"":e))}catch{}},{depth:n.path.length});n.__effects.push(f)}}if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o!="function")continue;const i="aria-"+s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),f=A(()=>{try{const e=o(t,t.state,t.context);if(!t.node?.setAttribute)return;e==null||e===!1?t.node.removeAttribute(i):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(i,e===!0?"":e)}catch{}},{depth:n.path.length});n.__effects.push(f)}if(t.data&&typeof t.data=="object")for(const s in t.data){const o=t.data[s];if(typeof o!="function")continue;const f="data-"+s.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),e=A(()=>{try{const a=o(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(f):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(f,a===!0?"":a)}catch{}},{depth:n.path.length});n.__effects.push(e)}const r=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(r)for(const s in r){const o=r[s];if(typeof o!="function")continue;const i=A(()=>{try{const f=o(t,t.state,t.context);if(!t.node?.classList)return;typeof f=="string"?t.node.classList.add(f):f?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:n.path.length});n.__effects.push(i)}if(typeof c.if=="function"){const s=c.if,o=A(()=>{const i=s(t,t.state,t.context),f=n.__if;if(n.__if=!!i,f&&!n.__if&&t.node)t.node.remove();else if(!f&&n.__if)if(n.__ifInitialized){t.node||(t.node=H(t));const e=t.parent,a=e?.node;if(a&&t.node){let u=null;const x=Object.keys(e),y=x.indexOf(t.key);for(let d=y+1;d<x.length;d++){const h=e[x[d]];if(h?.node?.parentNode===a){u=h.node;break}}u?a.insertBefore(t.node,u):a.appendChild(t.node)}else J(t,t.parent);q(t)}else{if(n.__ifInitialized=!0,t.tag||(t.tag=ot(t)),T("Init",t,{}),t.node||(t.node=H(t)),!t.node)return;T("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id);const e=c.if;delete c.if;try{G(t,c)}finally{c.if=e}q(t),nt(t),rt(t,{}),ft(t,{}),J(t,t.parent)}},{depth:n.path.length});n.__effects.push(o)}for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||N.has(s)||typeof t[s]!="function")continue;const o=s.charCodeAt(0);if(o>=65&&o<=90||D(s))continue;const i=t[s];n.__exec[s]=i;const f=t.tag||"div";if(Z(f,s)&&!C[s]&&!(S&&S.has(s))){const e=s,a=A(()=>{try{const u=i(t,t.state,t.context);t.node?.setAttribute&&(u==null||u===!1?t.node.removeAttribute(e):typeof u!="function"&&typeof u!="object"&&(e==="src"&&"src"in t.node?t.node.src=u:t.node.setAttribute(e,u===!0?"":u)))}catch{}},{depth:n.path.length});n.__effects.push(a)}}jt(t)}function q(t){const{node:c}=t;if(c){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?c.nodeValue=t.text:c.textContent=t.text:typeof t.text=="number"&&(c.textContent=t.text),Ct(t),typeof t.html=="string"&&(c.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in c){const n=String(t.value);c.value!==n&&(c.value=n)}if(t.style&&typeof t.style=="object"&&K(c,t.style),t.attr&&typeof t.attr=="object")for(const n in t.attr){const r=t.attr[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||c.setAttribute&&c.setAttribute(n,r===!0?"":r)}if(t.data&&typeof t.data=="object")for(const n in t.data){const r=t.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||c.dataset&&(c.dataset[n]=r===!0?"":r)}if(t.classlist||t.class){const n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&c.classList.add(r));else if(typeof n=="object")for(const r in n){const s=typeof n[r]=="function"?n[r](t,t.state,t.context):n[r];s&&c.classList.add(typeof s=="string"?s:r)}}}}function K(t,c){if(!t||!c||!t.style)return;let n=null;for(const r in c){const s=c[r];if(s!=null){if(r.charAt(0)==="&"&&typeof s=="object"){n||(n={}),n[r]=s;continue}try{const o=String(s),i=r.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),f=o.trim(),e=/\s*!important\s*$/.test(f),a=f.replace(/\s*!important\s*$/,"");t.style.setProperty(i,a,e?"important":"")}catch{}}}n&&vt(t,n)}let At=0;function vt(t,c){const n=`_ds${At++}`;t.classList.add(n);const r=t.ownerDocument;let s=r.querySelector("style[data-smbls-scoped]");s||(s=r.createElement("style"),s.setAttribute("data-smbls-scoped",""),r.head.appendChild(s));let o="";for(const i in c){const f="."+n,e=i.replace(/&/g,f).split(",").map(u=>{const x=u.trim();return x.includes(f)?x:f+x}).join(", "),a=c[i];if(typeof a=="object"){let u="",x="";for(const y in a){const d=a[y];if(typeof d=="object"){const h=y.includes("&")?e.split(", ").map(p=>y.replace(/&/g,p)).join(", "):e.split(", ").map(p=>`${p} ${y}`).join(", ");let l="";for(const p in d)l+=`${p.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${d[p]};`;x+=`${h} { ${l} }
|
|
5
|
-
`}else
|
|
6
|
-
`),x&&(o+=x)}}o&&(s.textContent+=o)}function jt(t){const c=t.__ref;c.__conditionalRunners=[];for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const r=n.charAt(0);if(r!=="."&&r!=="!")continue;const s=n.slice(1);if(!s)continue;const o=t[n];if(!o||typeof o!="object")continue;const i=r==="!",f={lastMatch:!1,appliedKeys:null},e=()=>{if(!t.node)return;let u;const x=t[s];if(x===void 0)if(t.state&&s in t.state)u=t.state[s];else{const h=t.context?.cases?.[s];if(h===void 0)return;u=typeof h=="function"?h.call(t,t):h}else typeof x=="function"?u=x(t,t.state,t.context):u=x;const y=i?!u:!!u;if(y===f.lastMatch)return;f.lastMatch=y;const d=t.context?.designSystem;d&&L(d);try{if(y){const h={};for(const p in o){if(!Object.prototype.hasOwnProperty.call(o,p))continue;const _=typeof o[p]=="function"?o[p](t,t.state,t.context):o[p];if(_!=null)if(C[p]){const b=C[p](_,t,t.state,t.context);if(b){const k=Array.isArray(b)?b:[b];for(const E of k)E&&Object.assign(h,E)}}else S&&S.has(p)&&(h[p]=_)}const l=Object.keys(h);l.length?(K(t.node,h),f.appliedKeys=l):f.appliedKeys=null}else if(f.appliedKeys){for(const h of f.appliedKeys)t.node.style[h]="";f.appliedKeys=null}}finally{d&&$()}};c.__conditionalRunners.push(e);const a=A(e,{depth:c.path.length});c.__effects.push(a)}}const U=new WeakSet;function Ct(t){const{node:c}=t;if(!c)return;if(U.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}U.add(t);const n=t.context?.designSystem;n&&L(n);try{const r={};let s=!1;for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||N.has(o))continue;const i=o.charCodeAt(0);if(!(i>=65&&i<=90)&&!D(o)){if(C[o]){const f=t[o],e=C[o](f,t,t.state,t.context);if(e){if(Array.isArray(e))for(const a of e)a&&Object.assign(r,a);else Object.assign(r,e);s=!0}}else if(S&&S.has(o)){const f=t[o];f!=null&&typeof f!="object"&&(r[o]=f,s=!0)}else if(o.charCodeAt(0)===45){const f=t[o];f!=null&&typeof f!="object"&&(r[o]=f,s=!0)}else if(o.charAt(0)==="&"){const f=t[o];f&&typeof f=="object"&&(r[o]=f,s=!0)}else if(o.charAt(0)==="@"||o.charAt(0)===":"){const f=t[o];if(f&&typeof f=="object"){const e={};for(const a in f){let u=f[a];if(typeof u=="function"&&(u=u(t,t.state,t.context)),!(u==null||typeof u=="function"))if(C[a]){const x=C[a](u,t,t.state,t.context);if(x)if(Array.isArray(x))for(const y of x)y&&Object.assign(e,y);else Object.assign(e,x)}else e[a]=u}if(Object.keys(e).length){if(o.length>1&&o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")&&!o.startsWith("@supports")&&(o==="@dark"||o==="@light"||!t.context?.designSystem?.media?.[o.slice(1)])){const u={};for(const y in e){const d=e[y];u[y]=typeof d=="string"&&!d.includes("!important")?d+" !important":d}const x=o.slice(1);r[`[data-theme="${x}"] &`]=u}else{let u=o;if(o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")){const y=o.slice(1),d=t.context?.designSystem?.media?.[y]||t.context?.designSystem?.media?.[y];d&&(u=`@media ${d}`)}const x={};for(const y in e){const d=e[y];if(d&&typeof d=="object"&&!Array.isArray(d)){const h={};for(const p in d)if(C[p]){const _=C[p](d[p],t,t.state,t.context);if(_)if(Array.isArray(_))for(const b of _)b&&Object.assign(h,b);else Object.assign(h,_)}else h[p]=d[p];const l=y.startsWith(":")?"":" ";if(u.includes(",")){const p=u.split(",").map(_=>`${_.trim()}${l}${y}`).join(", ");r[p]=h}else r[`${u}${l}${y}`]=h}else x[y]=d}Object.keys(x).length&&(r[u]=x)}s=!0}s=!0}}}}if(s){r.display&&String(r.display).includes("!important")&&(c.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);const o=yt(r,null,t.context?.cssPrefix);if(o&&c.classList){const f=o.split(" ").filter(Boolean);let e=!1;for(const a of f)c.classList.add(a),e||(a.charCodeAt(0)===95&&a.charCodeAt(1)===99||a.charCodeAt(0)===95&&a.indexOf("_c",1)!==-1)&&(e=!0);e&&typeof c.offsetWidth=="number"&&c.offsetWidth}const i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){const f=r.display;if(f&&f!==i)if(i==="none"){const e=[];for(const a of c.classList)a.startsWith("_d-")&&a!=="_d-none"&&e.push(a);for(const a of e)c.classList.remove(a);c.classList.add("_d-none")}else c.style.display=t.display}}}finally{n&&$(),U.delete(t)}}function nt(t){const{node:c}=t;if(!c||!c.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;const i="aria-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase());c.setAttribute(i,o===!0?"":o)}const n=lt(t);for(const s in n){const o=n[s];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&c.setAttribute(s,o===!0?"":o)}const r=t.tag||"div";for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||N.has(s)||s==="on"||n[s]!==void 0)continue;const o=s.charCodeAt(0);if(!(o>=65&&o<=90)&&!D(s)&&!(C[s]||S&&S.has(s))&&Z(r,s)){let i=t[s];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=Y(i,t,t.state,t.context),t[s]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;c.setAttribute(s,i===!0?"":i)}}}const it=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function rt(t,c){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!D(n)||it.has(n))continue;let r=t[n];if(typeof r=="string"&&/^[A-Za-z_$][\w$]*$/.test(r)){const o=r;r=function(f){return t.call(o,f)}}if(typeof r!="function")continue;const s=xt(n);at.has(s)||ut(_t(s),t,r)}St(t)}function St(t){const c=t.node;if(!c||!c.addEventListener)return;const n={};let r=!1;for(const y of it){const d=t[y];typeof d=="function"&&(n[y]=d,r=!0)}if(!r)return;const s=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let i=0,f=0,e=0,a=!1;const u=y=>{const d=y.touches&&y.touches[0]||y.changedTouches&&y.changedTouches[0];d&&(i=d.clientX,f=d.clientY,e=Date.now(),a=!0)},x=y=>{if(!a)return;a=!1;const d=y.changedTouches&&y.changedTouches[0]||y.touches&&y.touches[0];if(!d)return;const h=d.clientX-i,l=d.clientY-f,p=Date.now()-e;if(p>o)return;const _=Math.abs(h),b=Math.abs(l);if(Math.max(_,b)<s)return;let k;if(_>b*1.2)k=h<0?"left":"right";else if(b>_*1.2)k=l<0?"up":"down";else return;const E="onSwipe"+k.charAt(0).toUpperCase()+k.slice(1),v=n[E],j=n.onSwipe;v&&v.call(t,y,t,t.state,t.context),j&&j.call(t,{direction:k,dx:h,dy:l,dt:p,event:y},t,t.state,t.context)};c.addEventListener("touchstart",u,{passive:!0}),c.addEventListener("touchend",x,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{c.removeEventListener("touchstart",u)}catch{}try{c.removeEventListener("touchend",x)}catch{}})}function X(t,c){const n={...t};for(const r in c){const s=n[r],o=c[r];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[r]=X(s,o):n[r]=o}return n}function Q(t,c,n){if(!c||!t.node)return;const r=t.childExtends;if(Array.isArray(c)){const o=(t.context?.document||globalThis.document)?.createDocumentFragment();if(!o)return;const i=t.childProps,f=t.childrenAs;for(let e=0;e<c.length;e++){let a=c[e];const u=a;(typeof a=="string"||typeof a=="number")&&(a={text:a});let x=i;if(typeof i=="function")try{x=i(t,a)}catch{x=null}if(f==="state"){let h=u;(typeof u=="string"||typeof u=="number")&&(h={value:u,text:u}),a=x?{...x,state:h}:{state:h}}else x&&(a=X(x,a));if(r&&!a.ignoreChildExtends)if(a.extends){const h=Array.isArray(a.extends)?a.extends:[a.extends],l=Array.isArray(r)?r:[r];a={...a,extends:[...l,...h]}}else a={extends:r,...a};const y=a?.key||`${e}`,d=M(a,t,y,n);d?.node&&o.appendChild(d.node)}t.node.appendChild(o);return}if(typeof c=="string"){const s=ct(c,t);if(Array.isArray(s)){Q(t,s,n);return}}if(typeof c=="object")for(const s in c){if(N.has(s))continue;let o=c[s];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=X(t.childProps,o)),r&&!o.ignoreChildExtends)if(o.extends){const i=Array.isArray(o.extends)?o.extends:[o.extends],f=Array.isArray(r)?r:[r];o={...o,extends:[...f,...i]}}else o={extends:r,...o};M(o,t,s,n)}}}function ft(t,c){let{children:n,content:r}=t;const s=t.childExtends;if(typeof n=="function"){const i=n;n=i(t,t.state,t.context),t.children=n;const f=t.__ref;let e=!1;const a=A(()=>{const u=i(t,t.state,t.context);if(!e){e=!0;return}if(u===t.children)return;if(t.children=u,Array.isArray(u)&&t.childrenAs==="state"){const d=t.childProps,h=[],l=new Map;for(let v=0;v<u.length;v++){const j=u[v];let g=d;if(typeof d=="function")try{g=d(t,j)}catch{g=null}const R=g&&g.key||j&&j.key||`${v}`;h.push(R),l.set(R,{rawChild:j,childProps:g})}const p=new Set(h),_=f.__children.slice();for(const v of _)if(!p.has(v)){const j=t[v];j?.remove&&j.remove(),delete t[v]}const b=t.childExtends,E=(t.context?.document||globalThis.document)?.createDocumentFragment();for(const v of h){const j=l.get(v),g=j.rawChild,R=t[v];if(R&&R.state){if(g&&typeof g=="object"){const O=R.state;if(typeof O.replace=="function")O.replace(g);else if(typeof O.update=="function"){for(const w in O)if(!(w==="__element"||w==="root"||w==="parent"||w==="update")&&!Object.prototype.hasOwnProperty.call(g,w))try{O[w]=void 0}catch{}O.update(g)}else for(const w in g)O[w]=g[w]}continue}let I=g;(typeof g=="string"||typeof g=="number")&&(I={value:g,text:g});const m=j.childProps;let P=m?{...m,state:I}:{state:I};if(b&&!P.ignoreChildExtends)if(P.extends){const O=Array.isArray(P.extends)?P.extends:[P.extends],w=Array.isArray(b)?b:[b];P={...P,extends:[...w,...O]}}else P={extends:b,...P};const tt=M(P,t,v,c);tt?.node&&E&&E.appendChild(tt.node)}E&&E.childNodes.length&&t.node&&t.node.appendChild(E),f.__children=h;return}for(const d of[...f.__children]){const h=t[d];h?.remove&&h.remove(),delete t[d]}f.__children=[],Q(t,u,c)},{depth:f.path.length});f.__effects.push(a)}if(Q(t,n||r,c),n||r)return;const o=t.context?.components||{};{const i=Object.keys(t);for(let f=0;f<i.length;f++){const e=i[f];if(!e.endsWith("Extends")||typeof t[e]!="string")continue;const a=e.slice(0,-7);if(!a||a.charCodeAt(0)<65||a.charCodeAt(0)>90)continue;const u={extends:t[e]};delete t[e];for(let x=f+1;x<i.length;x++){const y=i[x],d=y.charCodeAt(0);if(d>=65&&d<=90||N.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;const h=t[y];h!==void 0&&(u[y]=h,delete t[y])}t[a]&&typeof t[a]=="object"?t[a]={...u,...t[a]}:t[a]=u}}for(const i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||N.has(i)||typeof t[i]!="object"||t[i]===null)continue;const f=i.charCodeAt(0);if(f<65||f>90)continue;let e=t[i];if(!e.__ref){if(!e.extends&&!e.extend){const a=o[i]||o[`smbls.${i}`];a&&(e={extends:a,...e})}if(t.childProps&&(e={...t.childProps,...e}),s&&!e.ignoreChildExtends)if(e.extends){const a=Array.isArray(e.extends)?e.extends:[e.extends],u=Array.isArray(s)?s:[s];e={...e,extends:[...u,...a]}}else e={extends:s,...e};M(e,t,i,c)}}}function J(t,c,n){const{node:r}=t;if(!r)return;const s=c?.node||(c?.nodeType?c:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){const o=n.node.nextSibling;o?s.insertBefore(r,o):s.appendChild(r)}else s.appendChild(r)}function T(t,c,n){const r=t.charAt(0).toLowerCase()+t.slice(1);c.context?.plugins?.length&&st(r,c,n);const s="on"+t,o=c[s];if(typeof o=="function"){const i=c.context?.designSystem;i&&L(i);try{if(o(c,c.state,c.context,n)===!1)return!1}catch(f){if(c.context?.plugins?.length&&st("error",c,{hook:s,error:f})||console.error(`[DOMQL] Lifecycle "${s}" error:`,f),c.context?.strictMode)throw f}finally{i&&$()}}return!0}var Yt=M;export{M as create,Yt as default};
|
|
4
|
+
`):"")}}if(m(o,c,s),c&&(c[o.key]=o,c.__ref?.__children&&(c.__ref.__children.includes(o.key)||c.__ref.__children.push(o.key))),typeof o.html=="function"&&o.node&&!o.node.innerHTML){const l=o.context?.designSystem;l&&O(l);try{const y=o.html(o,o.state,o.context);y!=null&&typeof y!="function"&&(o.node.innerHTML=y)}catch{}finally{l&&L()}}if(T("Create",o,e),T("Complete",o,e),T("Render",o,e),T("RenderRouter",o,e),typeof o.onFrame=="function"){const l=o.onFrame,y=o.context?.designSystem,b=()=>{if(o.node){if(o.node.isConnected){y&&O(y);try{l(o,o.state,o.context)}catch(_){console.error("[DOMQL] onFrame error:",_)}finally{y&&L()}}requestAnimationFrame(b)}};requestAnimationFrame(b)}return o}function _t(t,c,n){const e=!c,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,o=e&&s&&t.context?.state,r=n.state!==void 0&&!o?n.state:t.state&&!D(t.state)?t.state:void 0;if(r==null){if(c?.state)t.state=c.state,I(t,t.state);else if(t.context?.state){const f=t.context.state,i={...f},a=t.context?.polyglot;if(a?.translations){const d=f.lang||a.defaultLang||"en",g=a.translations[d];if(g&&typeof g=="object")for(const u in g)i[u]===void 0&&(i[u]=g[u]);const p=new Set(a.languages||[]);for(const u in a.translations)!p.has(u)&&i[u]===void 0&&(i[u]=a.translations[u])}t.state=D(i)?i:W(i),t.state.__element=t,t.state.root=t.state,I(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),I(t,t.state);return}if(typeof r=="string"){if(t.state=ct(r,c),t.state&&typeof t.state=="object"&&!D(t.state)){const f=c?.state?.root||c?.state||t.state;Object.defineProperty(t.state,"root",{value:f,enumerable:!1,configurable:!0,writable:!0})}I(t,t.state);return}if(typeof r=="function"){const f=r(t,c?.state);t.state=W(f||{})}else t.state=W({...r});t.state.__element=t,c?.state?(t.state.parent=c.state,t.state.root=c.state.root||c.state):t.state.root=t.state,I(t,t.state)}function B(t,c){if(!c)return t;const n=c.split("/");let e=t;for(const s of n){if(e==null)return{};e=e[s]}return e??{}}function ct(t,c){if(!c)return{};if(t===".")return c.state||{};if(t.startsWith("../")){const s=t.slice(3);return s?B(c.state,s):c.state??{}}if(t.startsWith("~/")){const s=c.state?.root||c.state,o=t.slice(2);return o?B(s,o):s??{}}if(c.state?.[t]!==void 0)return c.state[t];const n=B(c.state,t);if(n!=null&&Object.keys(n).length>0)return n;const e=c.context?.polyglot;if(e?.translations){const s=c.state?.root?.lang||e.defaultLang||"en",o=e.translations[s];if(o?.[t]!==void 0)return o[t];if(e.translations[t]!==void 0)return e.translations[t]}return{}}function xt(t){const c=t.__ref,n=t.tag||"div",e=t.context?.designSystem,s=[],o=Object.keys(t);for(let r=0;r<o.length;r++){const f=o[r];if(typeof t[f]!="function"||N.has(f))continue;const i=f.charCodeAt(0);i>=65&&i<=90||M(f)||S[f]||C&&C.has(f)||Z(n,f)||s.push({prop:f,fn:t[f]})}for(let r=0;r<s.length;r++){const{prop:f,fn:i}=s[r];c.__exec[f]=i,Object.defineProperty(t,f,{get(){e&&O(e);try{return i(t,t.state,t.context)}catch{return}finally{e&&L()}},set(a){delete c.__exec[f],Object.defineProperty(t,f,{value:a,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function G(t,c){const n=t.__ref;if(xt(t),typeof t.text=="function"){const s=t.text,o=A(()=>{if(!n.contentManaged)try{let r=s(t,t.state,t.context);t.node&&r!=null&&typeof r!="function"&&typeof r!="object"&&(typeof r=="string"&&r.includes("{{")&&(r=Y.call(t,r,t.state)),t.tag==="string"?t.node.nodeValue=r:t.node.textContent=r)}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){const s=t.text,o=A(()=>{if(n.contentManaged)return;const r=Y.call(t,s,t.state);r!=null&&(t.text=r),t.node&&(t.tag==="string"?t.node.nodeValue=r??"":t.node.textContent=r??"")},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&typeof t[s]=="function"&&!N.has(s)&&!M(s)&&!n.__exec[s]){if(S[s]){const o=t[s],r=s,f=A(()=>{const i=t.context?.designSystem;i&&O(i);try{const a=o(t,t.state,t.context),d=S[r](a,t,t.state,t.context);d&&t.node?F(t.node,d):t.node&&(r==="show"||r==="hide")&&(t.node.style.display="")}finally{i&&L()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}else if(C&&C.has(s)){const o=t[s],r=s,f=A(()=>{const i=t.context?.designSystem;i&&O(i);try{const a=o(t,t.state,t.context);t.node&&(a!=null?F(t.node,{[r]:a}):t.node.style[r]="")}finally{i&&L()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}}if(typeof c.html=="function"){const s=c.html,o=A(()=>{const r=t.context?.designSystem;r&&O(r);try{const f=s(t,t.state,t.context);t.node&&f!=null&&typeof f!="function"&&(t.node.innerHTML=f)}finally{r&&L()}},{depth:n.path.length});n.__effects.push(o),n.__exec.html=s}if(typeof c.value=="function"){const s=c.value,o=A(()=>{try{const r=s(t,t.state,t.context);if(!t.node||!("value"in t.node))return;const f=r==null?"":String(r);if(t.node.value===f)return;const i=typeof document<"u"&&document.activeElement===t.node,a=i&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,d=i&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=f,i&&a!=null&&d!=null)try{t.node.setSelectionRange(a,d)}catch{}}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.value=s}if(typeof c.style=="function"){const s=c.style,o=A(()=>{const r=s(t,t.state,t.context);F(t.node,r)},{depth:n.path.length});n.__effects.push(o),n.__exec.style=s}else if(t.style&&typeof t.style=="object")for(const s in t.style){const o=t.style[s];if(typeof o!="function")continue;const r=A(()=>{try{const f=o(t,t.state,t.context);t.node&&F(t.node,{[s]:f})}catch{}},{depth:n.path.length});n.__effects.push(r)}if(t.attr&&typeof t.attr=="object"){for(const s in t.attr)if(typeof t.attr[s]=="function"){const o=t.attr[s],r=s,f=A(()=>{try{const i=o(t,t.state,t.context);t.node?.setAttribute&&(i==null||i===!1?t.node.removeAttribute(r):typeof i!="function"&&typeof i!="object"&&t.node.setAttribute(r,i===!0?"":i))}catch{}},{depth:n.path.length});n.__effects.push(f)}}if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o!="function")continue;const r="aria-"+s.replace(/[A-Z]/g,i=>"-"+i.toLowerCase()),f=A(()=>{try{const i=o(t,t.state,t.context);if(!t.node?.setAttribute)return;i==null||i===!1?t.node.removeAttribute(r):typeof i!="function"&&typeof i!="object"&&t.node.setAttribute(r,i===!0?"":i)}catch{}},{depth:n.path.length});n.__effects.push(f)}if(t.data&&typeof t.data=="object")for(const s in t.data){const o=t.data[s];if(typeof o!="function")continue;const f="data-"+s.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=A(()=>{try{const a=o(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(f):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(f,a===!0?"":a)}catch{}},{depth:n.path.length});n.__effects.push(i)}const e=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(e)for(const s in e){const o=e[s];if(typeof o!="function")continue;const r=A(()=>{try{const f=o(t,t.state,t.context);if(!t.node?.classList)return;typeof f=="string"?t.node.classList.add(f):f?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:n.path.length});n.__effects.push(r)}if(typeof c.if=="function"){const s=c.if,o=A(()=>{let r;try{r=s(t,t.state,t.context)}catch(i){if(r=!1,n.__ifError=i,typeof console<"u"&&console.warn){const a=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${a} \u2014 treating as false:`,i?.message||i)}return}const f=n.__if;if(n.__if=!!r,f&&!n.__if&&t.node)t.node.remove();else if(!f&&n.__if)if(n.__ifInitialized){t.node||(t.node=H(t));const i=t.parent,a=i?.node;if(a&&t.node){let d=null;const g=Object.keys(i),p=g.indexOf(t.key);for(let u=p+1;u<g.length;u++){const h=i[g[u]];if(h?.node?.parentNode===a){d=h.node;break}}d?a.insertBefore(t.node,d):a.appendChild(t.node)}else m(t,t.parent);q(t)}else{if(n.__ifInitialized=!0,t.tag||(t.tag=st(t)),T("Init",t,{}),t.node||(t.node=H(t)),!t.node)return;T("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id);const i=c.if;delete c.if;try{G(t,c)}finally{c.if=i}q(t),nt(t),it(t,{}),et(t,{}),m(t,t.parent)}},{depth:n.path.length});n.__effects.push(o)}for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||N.has(s)||typeof t[s]!="function")continue;const o=s.charCodeAt(0);if(o>=65&&o<=90||M(s))continue;const r=t[s];n.__exec[s]=r;const f=t.tag||"div";if(Z(f,s)&&!S[s]&&!(C&&C.has(s))){const i=s,a=A(()=>{try{const d=r(t,t.state,t.context);t.node?.setAttribute&&(d==null||d===!1?t.node.removeAttribute(i):typeof d!="function"&&typeof d!="object"&&(i==="src"&&"src"in t.node?t.node.src=d:t.node.setAttribute(i,d===!0?"":d)))}catch{}},{depth:n.path.length});n.__effects.push(a)}}jt(t),St(t)}function q(t){const{node:c}=t;if(c){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?c.nodeValue=t.text:c.textContent=t.text:typeof t.text=="number"&&(c.textContent=t.text),Ct(t),typeof t.html=="string"&&(c.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in c){const n=String(t.value);c.value!==n&&(c.value=n)}if(t.style&&typeof t.style=="object"&&F(c,t.style),t.attr&&typeof t.attr=="object")for(const n in t.attr){const e=t.attr[n];typeof e=="function"||typeof e=="object"||e==null||e===!1||c.setAttribute&&c.setAttribute(n,e===!0?"":e)}if(t.data&&typeof t.data=="object")for(const n in t.data){const e=t.data[n];typeof e=="function"||typeof e=="object"||e==null||e===!1||c.dataset&&(c.dataset[n]=e===!0?"":e)}if(t.classlist||t.class){const n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(e=>e&&c.classList.add(e));else if(typeof n=="object")for(const e in n){const s=typeof n[e]=="function"?n[e](t,t.state,t.context):n[e];s&&c.classList.add(typeof s=="string"?s:e)}}}}function F(t,c){if(!t||!c||!t.style)return;let n=null;for(const e in c){const s=c[e];if(s!=null){if(e.charAt(0)==="&"&&typeof s=="object"){n||(n={}),n[e]=s;continue}try{const o=String(s),r=e.replace(/[A-Z]/g,d=>"-"+d.toLowerCase()),f=o.trim(),i=/\s*!important\s*$/.test(f),a=f.replace(/\s*!important\s*$/,"");t.style.setProperty(r,a,i?"important":"")}catch{}}}n&&vt(t,n)}let At=0;function vt(t,c){const n=`_ds${At++}`;t.classList.add(n);const e=t.ownerDocument;let s=e.querySelector("style[data-smbls-scoped]");s||(s=e.createElement("style"),s.setAttribute("data-smbls-scoped",""),e.head.appendChild(s));let o="";for(const r in c){const f="."+n,i=r.replace(/&/g,f).split(",").map(d=>{const g=d.trim();return g.includes(f)?g:f+g}).join(", "),a=c[r];if(typeof a=="object"){let d="",g="";for(const p in a){const u=a[p];if(typeof u=="object"){const h=p.includes("&")?i.split(", ").map(y=>p.replace(/&/g,y)).join(", "):i.split(", ").map(y=>`${y} ${p}`).join(", ");let l="";for(const y in u)l+=`${y.replace(/[A-Z]/g,b=>"-"+b.toLowerCase())}: ${u[y]};`;g+=`${h} { ${l} }
|
|
5
|
+
`}else d+=`${p.replace(/[A-Z]/g,h=>"-"+h.toLowerCase())}: ${u};`}d&&(o+=`${i} { ${d} }
|
|
6
|
+
`),g&&(o+=g)}}o&&(s.textContent+=o)}function jt(t){const c=t.subscribeTo;if(!Array.isArray(c)||c.length===0)return;const n=t.__ref;for(let e=0;e<c.length;e++){const s=c[e];if(typeof s!="string"||s.length===0)continue;const o=s.split("."),r=o[0],f=o.slice(1),i={value:!1},a=A(()=>{const d=t.state&&(D(t.state)?t.state.root:null);if(!d||!D(d))return;let g=d;g=g[r];for(let p=0;p<f.length&&!(g==null||typeof g!="object");p++)if(D(g))g=g[f[p]];else break;if(i.value&&typeof t.onUpdate=="function"){const p=t.context?.designSystem;p&&O(p);try{t.onUpdate(t,t.state,t.context)}catch(u){t.context?.plugins?.length&&U("error",t,{hook:"onUpdate",error:u})||console.error("[DOMQL] subscribeTo onUpdate error:",u)}finally{p&&L()}}},{depth:n.path.length});i.value=!0,n.__effects.push(a)}}function St(t){const c=t.__ref;c.__conditionalRunners=[];for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const e=n.charAt(0);if(e!=="."&&e!=="!")continue;const s=n.slice(1);if(!s)continue;const o=t[n];if(!o||typeof o!="object")continue;const r=e==="!",f={lastMatch:!1,appliedKeys:null},i=()=>{if(!t.node)return;let d;const g=t[s];if(g===void 0)if(t.state&&s in t.state)d=t.state[s];else{const h=t.context?.cases?.[s];if(h===void 0)return;try{d=typeof h=="function"?h.call(t,t):h}catch(l){d=!1,c.__conditionalError=l,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,l?.message||l)}}else if(typeof g=="function")try{d=g(t,t.state,t.context)}catch(h){d=!1,c.__conditionalError=h,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,h?.message||h)}else d=g;const p=r?!d:!!d;if(p===f.lastMatch)return;f.lastMatch=p;const u=t.context?.designSystem;u&&O(u);try{if(p){const h={};for(const y in o){if(!Object.prototype.hasOwnProperty.call(o,y))continue;const b=typeof o[y]=="function"?o[y](t,t.state,t.context):o[y];if(b!=null)if(S[y]){const _=S[y](b,t,t.state,t.context);if(_){const k=Array.isArray(_)?_:[_];for(const E of k)E&&Object.assign(h,E)}}else C&&C.has(y)&&(h[y]=b)}const l=Object.keys(h);l.length?(F(t.node,h),f.appliedKeys=l):f.appliedKeys=null}else if(f.appliedKeys){for(const h of f.appliedKeys)t.node.style[h]="";f.appliedKeys=null}}finally{u&&L()}};c.__conditionalRunners.push(i);const a=A(i,{depth:c.path.length});c.__effects.push(a)}}const X=new WeakSet;function Ct(t){const{node:c}=t;if(!c)return;if(X.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}X.add(t);const n=t.context?.designSystem;n&&O(n);try{const e={};let s=!1;for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||N.has(o))continue;const r=o.charCodeAt(0);if(!(r>=65&&r<=90)&&!M(o)){if(S[o]){const f=t[o],i=S[o](f,t,t.state,t.context);if(i){if(Array.isArray(i))for(const a of i)a&&Object.assign(e,a);else Object.assign(e,i);s=!0}}else if(C&&C.has(o)){const f=t[o];f!=null&&typeof f!="object"&&(e[o]=f,s=!0)}else if(o.charCodeAt(0)===45){const f=t[o];f!=null&&typeof f!="object"&&(e[o]=f,s=!0)}else if(o.charAt(0)==="&"){const f=t[o];f&&typeof f=="object"&&(e[o]=f,s=!0)}else if(o.charAt(0)==="@"||o.charAt(0)===":"){const f=t[o];if(f&&typeof f=="object"){const i={};for(const a in f){let d=f[a];if(typeof d=="function"&&(d=d(t,t.state,t.context)),!(d==null||typeof d=="function"))if(S[a]){const g=S[a](d,t,t.state,t.context);if(g)if(Array.isArray(g))for(const p of g)p&&Object.assign(i,p);else Object.assign(i,g)}else i[a]=d}if(Object.keys(i).length){if(o.length>1&&o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")&&!o.startsWith("@supports")&&(o==="@dark"||o==="@light"||!t.context?.designSystem?.media?.[o.slice(1)])){const d={};for(const p in i){const u=i[p];d[p]=typeof u=="string"&&!u.includes("!important")?u+" !important":u}const g=o.slice(1);e[`[data-theme="${g}"] &`]=d}else{let d=o;if(o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")){const p=o.slice(1),u=t.context?.designSystem?.media?.[p]||t.context?.designSystem?.media?.[p];u&&(d=`@media ${u}`)}const g={};for(const p in i){const u=i[p];if(u&&typeof u=="object"&&!Array.isArray(u)){const h={};for(const y in u)if(S[y]){const b=S[y](u[y],t,t.state,t.context);if(b)if(Array.isArray(b))for(const _ of b)_&&Object.assign(h,_);else Object.assign(h,b)}else h[y]=u[y];const l=p.startsWith(":")?"":" ";if(d.includes(",")){const y=d.split(",").map(b=>`${b.trim()}${l}${p}`).join(", ");e[y]=h}else e[`${d}${l}${p}`]=h}else g[p]=u}Object.keys(g).length&&(e[d]=g)}s=!0}s=!0}}}}if(s){e.display&&String(e.display).includes("!important")&&(c.style.setProperty("display",String(e.display).replace(/\s*!important\s*$/,""),"important"),delete e.display);const o=yt(e,null,t.context?.cssPrefix);if(o&&c.classList){const f=o.split(" ").filter(Boolean);let i=!1;for(const a of f)c.classList.add(a),i||(a.charCodeAt(0)===95&&a.charCodeAt(1)===99||a.charCodeAt(0)===95&&a.indexOf("_c",1)!==-1)&&(i=!0);i&&typeof c.offsetWidth=="number"&&c.offsetWidth}const r=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(r!=null){const f=e.display;if(f&&f!==r)if(r==="none"){const i=[];for(const a of c.classList)a.startsWith("_d-")&&a!=="_d-none"&&i.push(a);for(const a of i)c.classList.remove(a);c.classList.add("_d-none")}else c.style.display=t.display}}}finally{n&&L(),X.delete(t)}}function nt(t){const{node:c}=t;if(!c||!c.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;const r="aria-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase());c.setAttribute(r,o===!0?"":o)}const n=lt(t);for(const s in n){const o=n[s];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&c.setAttribute(s,o===!0?"":o)}const e=t.tag||"div";for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||N.has(s)||s==="on"||n[s]!==void 0)continue;const o=s.charCodeAt(0);if(!(o>=65&&o<=90)&&!M(s)&&!(S[s]||C&&C.has(s))&&Z(e,s)){let r=t[s];if(r==null||r===!1||(typeof r=="string"&&r.includes("{{")&&(r=Y(r,t,t.state,t.context),t[s]=r),r==null||r===!1||typeof r=="function"||typeof r=="object"))continue;c.setAttribute(s,r===!0?"":r)}}}const rt=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function it(t,c){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!M(n)||rt.has(n))continue;let e=t[n];if(typeof e=="string"&&/^[A-Za-z_$][\w$]*$/.test(e)){const o=e;e=function(f){return t.call(o,f)}}if(typeof e!="function")continue;const s=gt(n);at.has(s)||dt(bt(s),t,e)}kt(t)}function kt(t){const c=t.node;if(!c||!c.addEventListener)return;const n={};let e=!1;for(const p of rt){const u=t[p];typeof u=="function"&&(n[p]=u,e=!0)}if(!e)return;const s=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let r=0,f=0,i=0,a=!1;const d=p=>{const u=p.touches&&p.touches[0]||p.changedTouches&&p.changedTouches[0];u&&(r=u.clientX,f=u.clientY,i=Date.now(),a=!0)},g=p=>{if(!a)return;a=!1;const u=p.changedTouches&&p.changedTouches[0]||p.touches&&p.touches[0];if(!u)return;const h=u.clientX-r,l=u.clientY-f,y=Date.now()-i;if(y>o)return;const b=Math.abs(h),_=Math.abs(l);if(Math.max(b,_)<s)return;let k;if(b>_*1.2)k=h<0?"left":"right";else if(_>b*1.2)k=l<0?"up":"down";else return;const E="onSwipe"+k.charAt(0).toUpperCase()+k.slice(1),v=n[E],j=n.onSwipe;v&&v.call(t,p,t,t.state,t.context),j&&j.call(t,{direction:k,dx:h,dy:l,dt:y,event:p},t,t.state,t.context)};c.addEventListener("touchstart",d,{passive:!0}),c.addEventListener("touchend",g,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{c.removeEventListener("touchstart",d)}catch{}try{c.removeEventListener("touchend",g)}catch{}})}function Q(t,c){const n={...t};for(const e in c){const s=n[e],o=c[e];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[e]=Q(s,o):n[e]=o}return n}function J(t,c,n){if(!c||!t.node)return;const e=t.childExtends;if(Array.isArray(c)){const o=(t.context?.document||globalThis.document)?.createDocumentFragment();if(!o)return;const r=t.childProps,f=t.childrenAs;for(let i=0;i<c.length;i++){let a=c[i];const d=a;(typeof a=="string"||typeof a=="number")&&(a={text:a});let g=r;if(typeof r=="function")try{g=r(t,a)}catch{g=null}if(f==="state"){let h=d;(typeof d=="string"||typeof d=="number")&&(h={value:d,text:d}),a=g?{...g,state:h}:{state:h}}else g&&(a=Q(g,a));if(e&&!a.ignoreChildExtends)if(a.extends){const h=Array.isArray(a.extends)?a.extends:[a.extends],l=Array.isArray(e)?e:[e];a={...a,extends:[...l,...h]}}else a={extends:e,...a};const p=a?.key||`${i}`,u=K(a,t,p,n);u?.node&&o.appendChild(u.node)}t.node.appendChild(o);return}if(typeof c=="string"){const s=ct(c,t);if(Array.isArray(s)){J(t,s,n);return}}if(typeof c=="object")for(const s in c){if(N.has(s))continue;let o=c[s];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=Q(t.childProps,o)),e&&!o.ignoreChildExtends)if(o.extends){const r=Array.isArray(o.extends)?o.extends:[o.extends],f=Array.isArray(e)?e:[e];o={...o,extends:[...f,...r]}}else o={extends:e,...o};K(o,t,s,n)}}}function et(t,c){let{children:n,content:e}=t;const s=t.childExtends;if(typeof n=="function"){const r=n;n=r(t,t.state,t.context),t.children=n;const f=t.__ref;let i=!1;const a=A(()=>{const d=r(t,t.state,t.context);if(!i){i=!0;return}if(d===t.children)return;if(t.children=d,Array.isArray(d)&&t.childrenAs==="state"){const u=t.childProps,h=[],l=new Map;for(let v=0;v<d.length;v++){const j=d[v];let x=u;if(typeof u=="function")try{x=u(t,j)}catch{x=null}const R=x&&x.key||j&&j.key||`${v}`;h.push(R),l.set(R,{rawChild:j,childProps:x})}const y=new Set(h),b=f.__children.slice();for(const v of b)if(!y.has(v)){const j=t[v];j?.remove&&j.remove(),delete t[v]}const _=t.childExtends,E=(t.context?.document||globalThis.document)?.createDocumentFragment();for(const v of h){const j=l.get(v),x=j.rawChild,R=t[v];if(R&&R.state){if(x&&typeof x=="object"){const $=R.state;if(typeof $.replace=="function")$.replace(x);else if(typeof $.update=="function"){for(const w in $)if(!(w==="__element"||w==="root"||w==="parent"||w==="update")&&!Object.prototype.hasOwnProperty.call(x,w))try{$[w]=void 0}catch{}$.update(x)}else for(const w in x)$[w]=x[w]}continue}let V=x;(typeof x=="string"||typeof x=="number")&&(V={value:x,text:x});const tt=j.childProps;let P=tt?{...tt,state:V}:{state:V};if(_&&!P.ignoreChildExtends)if(P.extends){const $=Array.isArray(P.extends)?P.extends:[P.extends],w=Array.isArray(_)?_:[_];P={...P,extends:[...w,...$]}}else P={extends:_,...P};const ot=K(P,t,v,c);ot?.node&&E&&E.appendChild(ot.node)}E&&E.childNodes.length&&t.node&&t.node.appendChild(E),f.__children=h;return}for(const u of[...f.__children]){const h=t[u];h?.remove&&h.remove(),delete t[u]}f.__children=[],J(t,d,c)},{depth:f.path.length});f.__effects.push(a)}if(J(t,n||e,c),n||e)return;const o=t.context?.components||{};{const r=Object.keys(t);for(let f=0;f<r.length;f++){const i=r[f];if(!i.endsWith("Extends")||typeof t[i]!="string")continue;const a=i.slice(0,-7);if(!a||a.charCodeAt(0)<65||a.charCodeAt(0)>90)continue;const d={extends:t[i]};delete t[i];for(let g=f+1;g<r.length;g++){const p=r[g],u=p.charCodeAt(0);if(u>=65&&u<=90||N.has(p)||typeof t[p]=="function"&&(p.startsWith("on")||p.startsWith(".")))break;const h=t[p];h!==void 0&&(d[p]=h,delete t[p])}t[a]&&typeof t[a]=="object"?t[a]={...d,...t[a]}:t[a]=d}}for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||N.has(r)||typeof t[r]!="object"||t[r]===null)continue;const f=r.charCodeAt(0);if(f<65||f>90)continue;let i=t[r];if(!i.__ref){if(!i.extends&&!i.extend){const a=o[r]||o[`smbls.${r}`];a&&(i={extends:a,...i})}if(t.childProps&&(i={...t.childProps,...i}),s&&!i.ignoreChildExtends)if(i.extends){const a=Array.isArray(i.extends)?i.extends:[i.extends],d=Array.isArray(s)?s:[s];i={...i,extends:[...d,...a]}}else i={extends:s,...i};K(i,t,r,c)}}}function m(t,c,n){const{node:e}=t;if(!e)return;const s=c?.node||(c?.nodeType?c:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(e,n.node);else if(n?.position==="after"&&n.node){const o=n.node.nextSibling;o?s.insertBefore(e,o):s.appendChild(e)}else s.appendChild(e)}function T(t,c,n){const e=t.charAt(0).toLowerCase()+t.slice(1);c.context?.plugins?.length&&U(e,c,n);const s="on"+t,o=c[s];if(typeof o=="function"){const r=c.context?.designSystem;r&&O(r);try{if(o(c,c.state,c.context,n)===!1)return!1}catch(f){if(c.context?.plugins?.length&&U("error",c,{hook:s,error:f})||console.error(`[DOMQL] Lifecycle "${s}" error:`,f),c.context?.strictMode)throw f}finally{r&&L()}}return!0}var Zt=K;export{K as create,Zt as default};
|
package/dist/esm/src/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=new Set(["extends","children","content","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","__name","__ref","__hash","__text","parent","node"]),t={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},o=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","error","beforeRemove","remove"]),r=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),s=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);export{s as DELEGATED_EVENTS,o as LIFECYCLE_EVENTS,t as MIXINS,r as PASSIVE_EVENTS,e as REGISTRY};
|
|
1
|
+
const e=new Set(["extends","children","content","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","__name","__ref","__hash","__text","parent","node"]),t={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},o=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","error","beforeRemove","remove"]),r=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),s=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);export{s as DELEGATED_EVENTS,o as LIFECYCLE_EVENTS,t as MIXINS,r as PASSIVE_EVENTS,e as REGISTRY};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/element",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.181",
|
|
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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@symbo.ls/signal": "^3.14.
|
|
24
|
+
"@symbo.ls/signal": "^3.14.135",
|
|
25
25
|
"@symbo.ls/state": "^3.14.105",
|
|
26
26
|
"@symbo.ls/utils": "^3.14.105",
|
|
27
27
|
"css-in-props": "^3.14.105",
|