defuss 1.5.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dom-DWSd6i3A.cjs +2 -0
- package/dist/dom-DWSd6i3A.cjs.map +1 -0
- package/dist/dom-DcRUm6dj.mjs +2 -0
- package/dist/dom-DcRUm6dj.mjs.map +1 -0
- package/dist/{index-BJrbqecl.d.ts → index-S3MRf--S.d.ts} +94 -53
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +127 -3
- package/dist/index.d.ts +127 -3
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/render/client.cjs +1 -1
- package/dist/render/client.cjs.map +1 -1
- package/dist/render/client.d.cts +5 -4
- package/dist/render/client.d.ts +5 -4
- package/dist/render/client.mjs +1 -1
- package/dist/render/client.mjs.map +1 -1
- package/dist/render/index.cjs +1 -1
- package/dist/render/index.cjs.map +1 -1
- package/dist/render/index.d.cts +1 -1
- package/dist/render/index.d.ts +1 -1
- package/dist/render/index.mjs +1 -1
- package/dist/render/server.cjs +1 -1
- package/dist/render/server.cjs.map +1 -1
- package/dist/render/server.d.cts +6 -5
- package/dist/render/server.d.ts +6 -5
- package/dist/render/server.mjs +1 -1
- package/dist/render/server.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/index-B8vV328V.cjs +0 -2
- package/dist/index-B8vV328V.cjs.map +0 -1
- package/dist/index-BDxEyjzN.mjs +0 -2
- package/dist/index-BDxEyjzN.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.cjs","sources":["../../src/render/server.ts"],"sourcesContent":["import * as HappyDom from 'happy-dom'\nimport {
|
|
1
|
+
{"version":3,"file":"server.cjs","sources":["../../src/render/server.ts"],"sourcesContent":["import * as HappyDom from 'happy-dom'\nimport { renderIsomorphicSync, renderIsomorphicAsync, globalScopeDomApis, type ParentElementInput, type ParentElementInputAsync } from '@/render/isomorph.js'\nimport type { RenderInput, RenderResult, Globals } from '@/render/types.js'\nimport serializeHtml from 'w3c-xmlserializer'\n\nexport interface RenderOptions {\n /** choose an arbitrary server-side DOM / Document implementation; this library defaults to 'linkedom'; default: undefined */\n browserGlobals?: Globals\n\n /** creates a synthetic <html> root element in case you want to render in isolation; default: false; also happens when parentDomElement isn't present */\n createRoot?: boolean\n}\n\nconst setupDomApis = (options: RenderOptions = {}) => {\n const browserGlobals = options.browserGlobals ? options.browserGlobals : getBrowserGlobals()\n const document = getDocument(options.createRoot, browserGlobals)\n globalScopeDomApis(browserGlobals, document)\n return { browserGlobals, document }\n}\n\nexport const renderSync = <T extends RenderInput>(\n virtualNode: T,\n parentDomElement?: ParentElementInput,\n options: RenderOptions = {},\n): RenderResult<T> => {\n const { browserGlobals, document } = setupDomApis(options)\n if (!parentDomElement) {\n parentDomElement = document.documentElement\n }\n return renderIsomorphicSync(virtualNode, parentDomElement, browserGlobals) as any\n}\n\nexport const render = <T extends RenderInput>(\n virtualNode: T,\n parentDomElement?: ParentElementInputAsync,\n options: RenderOptions = {},\n): Promise<RenderResult<T>> => {\n const { browserGlobals, document } = setupDomApis(options)\n if (!parentDomElement) {\n parentDomElement = document.documentElement\n }\n return renderIsomorphicAsync(virtualNode, parentDomElement, browserGlobals) as any\n}\n\nexport const createRoot = (document: Document): Element => {\n const htmlElement = document.createElement('html')\n document.appendChild(htmlElement)\n return document.documentElement\n}\n\nexport const getBrowserGlobals = (): Globals => {\n return new HappyDom.Window({ url: \"http://localhost/\" }) as unknown as (Window & typeof globalThis)\n}\n\nexport const getDocument = (shouldCreateRoot = false, browserGlobals?: Globals): Document => {\n const document = (browserGlobals || getBrowserGlobals()).document\n if (shouldCreateRoot) {\n createRoot(document)\n return document\n }\n return document\n}\n\nexport const renderToString = (el: Node) => serializeHtml(el).replaceAll(' xmlns=\"http://www.w3.org/1999/xhtml\"', '')\n\nexport * from './index.js'"],"names":["globalScopeDomApis","renderIsomorphicSync","renderI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AO,QAAQ,CAAC,eAAe;AACjC;AACY,MAAC,iBAAiB,GAAG,MAAM;AACvC,EAAE,OAAO,IAAIC,mBAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAE,CAAC;AAC1D;AACY,MAAC,WAAW,GAAG,CAAC,gBAAgB,GAAG,KAAK,EAAE,cAAc,KAAK;AACzE,EAAE,MAAM,QAAQ,GAAG,CAAC,cAAc,IAAI,iBAAiB,EAAE,EAAE,QAAQ;AACnE,EAAE,IAAI,gBAAgB,EAAE;AACxB,IAAI,UAAU,CAAC,QAAQ,CAAC;AACxB,IAAI,OAAO,QAAQ;AACnB;AACA,EAAE,OAAO,QAAQ;AACjB;AACY,MAAC,cAAc,GAAG,CAAC,EAAE,KAAK,aAAa,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,uCAAuC,EAAE,EAAE;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/render/server.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Globals, R as RenderInput,
|
|
2
|
-
export { C as CSSProperties,
|
|
1
|
+
import { G as Globals, R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync } from '../index-S3MRf--S.js';
|
|
2
|
+
export { A as AllHTMLElements, C as CSSProperties, n as Children, D as DomAbstractionImpl, F as FontFaceProperties, E as Fragment, K as KeyFrameProperties, o as Props, d as Ref, c as RefUpdateFn, p as RenderNodeInput, q as RenderResultNode, S as SyncRenderInput, w as SyncRenderResult, V as VAttributes, f as VNode, e as VNodeAttributes, l as VNodeChild, m as VNodeChildren, h as VNodeKey, k as VNodeRef, j as VNodeRefCallback, i as VNodeRefObject, g as VNodeType, r as createInPlaceErrorMessageVNode, L as createRef, v as getRenderer, z as globalScopeDomApis, u as handleLifecycleEventsForOnMount, B as isJSX, J as isRef, s as jsx, I as jsxDEV, H as jsxs, t as observeUnmount, y as renderIsomorphicAsync, x as renderIsomorphicSync } from '../index-S3MRf--S.js';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
4
4
|
export { CSS };
|
|
5
5
|
|
|
@@ -9,10 +9,11 @@ interface RenderOptions {
|
|
|
9
9
|
/** creates a synthetic <html> root element in case you want to render in isolation; default: false; also happens when parentDomElement isn't present */
|
|
10
10
|
createRoot?: boolean;
|
|
11
11
|
}
|
|
12
|
-
declare const
|
|
12
|
+
declare const renderSync: <T extends RenderInput>(virtualNode: T, parentDomElement?: ParentElementInput, options?: RenderOptions) => RenderResult<T>;
|
|
13
|
+
declare const render: <T extends RenderInput>(virtualNode: T, parentDomElement?: ParentElementInputAsync, options?: RenderOptions) => Promise<RenderResult<T>>;
|
|
13
14
|
declare const createRoot: (document: Document) => Element;
|
|
14
|
-
declare const getBrowserGlobals: (
|
|
15
|
+
declare const getBrowserGlobals: () => Globals;
|
|
15
16
|
declare const getDocument: (shouldCreateRoot?: boolean, browserGlobals?: Globals) => Document;
|
|
16
17
|
declare const renderToString: (el: Node) => string;
|
|
17
18
|
|
|
18
|
-
export { Globals, RenderInput, type RenderOptions, RenderResult, createRoot, getBrowserGlobals, getDocument, render, renderToString };
|
|
19
|
+
export { Globals, ParentElementInput, ParentElementInputAsync, RenderInput, type RenderOptions, RenderResult, createRoot, getBrowserGlobals, getDocument, render, renderSync, renderToString };
|
package/dist/render/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Globals, R as RenderInput,
|
|
2
|
-
export { C as CSSProperties,
|
|
1
|
+
import { G as Globals, R as RenderInput, P as ParentElementInput, a as RenderResult, b as ParentElementInputAsync } from '../index-S3MRf--S.js';
|
|
2
|
+
export { A as AllHTMLElements, C as CSSProperties, n as Children, D as DomAbstractionImpl, F as FontFaceProperties, E as Fragment, K as KeyFrameProperties, o as Props, d as Ref, c as RefUpdateFn, p as RenderNodeInput, q as RenderResultNode, S as SyncRenderInput, w as SyncRenderResult, V as VAttributes, f as VNode, e as VNodeAttributes, l as VNodeChild, m as VNodeChildren, h as VNodeKey, k as VNodeRef, j as VNodeRefCallback, i as VNodeRefObject, g as VNodeType, r as createInPlaceErrorMessageVNode, L as createRef, v as getRenderer, z as globalScopeDomApis, u as handleLifecycleEventsForOnMount, B as isJSX, J as isRef, s as jsx, I as jsxDEV, H as jsxs, t as observeUnmount, y as renderIsomorphicAsync, x as renderIsomorphicSync } from '../index-S3MRf--S.js';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
4
4
|
export { CSS };
|
|
5
5
|
|
|
@@ -9,10 +9,11 @@ interface RenderOptions {
|
|
|
9
9
|
/** creates a synthetic <html> root element in case you want to render in isolation; default: false; also happens when parentDomElement isn't present */
|
|
10
10
|
createRoot?: boolean;
|
|
11
11
|
}
|
|
12
|
-
declare const
|
|
12
|
+
declare const renderSync: <T extends RenderInput>(virtualNode: T, parentDomElement?: ParentElementInput, options?: RenderOptions) => RenderResult<T>;
|
|
13
|
+
declare const render: <T extends RenderInput>(virtualNode: T, parentDomElement?: ParentElementInputAsync, options?: RenderOptions) => Promise<RenderResult<T>>;
|
|
13
14
|
declare const createRoot: (document: Document) => Element;
|
|
14
|
-
declare const getBrowserGlobals: (
|
|
15
|
+
declare const getBrowserGlobals: () => Globals;
|
|
15
16
|
declare const getDocument: (shouldCreateRoot?: boolean, browserGlobals?: Globals) => Document;
|
|
16
17
|
declare const renderToString: (el: Node) => string;
|
|
17
18
|
|
|
18
|
-
export { Globals, RenderInput, type RenderOptions, RenderResult, createRoot, getBrowserGlobals, getDocument, render, renderToString };
|
|
19
|
+
export { Globals, ParentElementInput, ParentElementInputAsync, RenderInput, type RenderOptions, RenderResult, createRoot, getBrowserGlobals, getDocument, render, renderSync, renderToString };
|
package/dist/render/server.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var b=Object.defineProperty;var s=(e,r)=>b(e,"name",{value:r,configurable:!0});import*as f from"happy-dom";import{r as a,a as l,g as m}from"../dom-DcRUm6dj.mjs";import{F as j,c as A,k as E,b as F,h as I,i as v,f as H,j as M,e as V,d as k,o as z}from"../dom-DcRUm6dj.mjs";import p from"w3c-xmlserializer";const d=s((e={})=>{const r=e.browserGlobals?e.browserGlobals:c(),o=i(e.createRoot,r);return m(r,o),{browserGlobals:r,document:o}},"setupDomApis"),w=s((e,r,o={})=>{const{browserGlobals:t,document:n}=d(o);return r||(r=n.documentElement),a(e,r,t)},"renderSync"),h=s((e,r,o={})=>{const{browserGlobals:t,document:n}=d(o);return r||(r=n.documentElement),l(e,r,t)},"render"),u=s(e=>{const r=e.createElement("html");return e.appendChild(r),e.documentElement},"createRoot"),c=s(()=>new f.Window({url:"http://localhost/"}),"getBrowserGlobals"),i=s((e=!1,r)=>{const o=(r||c()).document;return e&&u(o),o},"getDocument"),g=s(e=>p(e).replaceAll(' xmlns="http://www.w3.org/1999/xhtml"',""),"renderToString");export{j as Fragment,A as createInPlaceErrorMessageVNode,E as createRef,u as createRoot,c as getBrowserGlobals,i as getDocument,F as getRenderer,m as globalScopeDomApis,I as handleLifecycleEventsForOnMount,v as isJSX,H as isRef,M as jsx,V as jsxDEV,k as jsxs,z as observeUnmount,h as render,l as renderIsomorphicAsync,a as renderIsomorphicSync,w as renderSync,g as renderToString};
|
|
2
2
|
//# sourceMappingURL=server.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.mjs","sources":["../../src/render/server.ts"],"sourcesContent":["import * as HappyDom from 'happy-dom'\nimport {
|
|
1
|
+
{"version":3,"file":"server.mjs","sources":["../../src/render/server.ts"],"sourcesContent":["import * as HappyDom from 'happy-dom'\nimport { renderIsomorphicSync, renderIsomorphicAsync, globalScopeDomApis, type ParentElementInput, type ParentElementInputAsync } from '@/render/isomorph.js'\nimport type { RenderInput, RenderResult, Globals } from '@/render/types.js'\nimport serializeHtml from 'w3c-xmlserializer'\n\nexport interface RenderOptions {\n /** choose an arbitrary server-side DOM / Document implementation; this library defaults to 'linkedom'; default: undefined */\n browserGlobals?: Globals\n\n /** creates a synthetic <html> root element in case you want to render in isolation; default: false; also happens when parentDomElement isn't present */\n createRoot?: boolean\n}\n\nconst setupDomApis = (options: RenderOptions = {}) => {\n const browserGlobals = options.browserGlobals ? options.browserGlobals : getBrowserGlobals()\n const document = getDocument(options.createRoot, browserGlobals)\n globalScopeDomApis(browserGlobals, document)\n return { browserGlobals, document }\n}\n\nexport const renderSync = <T extends RenderInput>(\n virtualNode: T,\n parentDomElement?: ParentElementInput,\n options: RenderOptions = {},\n): RenderResult<T> => {\n const { browserGlobals, document } = setupDomApis(options)\n if (!parentDomElement) {\n parentDomElement = document.documentElement\n }\n return renderIsomorphicSync(virtualNode, parentDomElement, browserGlobals) as any\n}\n\nexport const render = <T extends RenderInput>(\n virtualNode: T,\n parentDomElement?: ParentElementInputAsync,\n options: RenderOptions = {},\n): Promise<RenderResult<T>> => {\n const { browserGlobals, document } = setupDomApis(options)\n if (!parentDomElement) {\n parentDomElement = document.documentElement\n }\n return renderIsomorphicAsync(virtualNode, parentDomElement, browserGlobals) as any\n}\n\nexport const createRoot = (document: Document): Element => {\n const htmlElement = document.createElement('html')\n document.appendChild(htmlElement)\n return document.documentElement\n}\n\nexport const getBrowserGlobals = (): Globals => {\n return new HappyDom.Window({ url: \"http://localhost/\" }) as unknown as (Window & typeof globalThis)\n}\n\nexport const getDocument = (shouldCreateRoot = false, browserGlobals?: Globals): Document => {\n const document = (browserGlobals || getBrowserGlobals()).document\n if (shouldCreateRoot) {\n createRoot(document)\n return document\n }\n return document\n}\n\nexport const renderToString = (el: Node) => serializeHtml(el).replaceAll(' xmlns=\"http://www.w3.org/1999/xhtml\"', '')\n\nexport * from './index.js'"],"names":[],"mappings":";;;;;AAIA,MAAM,YAAY,GAAG,CAAC,OAAO,GAAG,EAAE,KAAK;AACvC,EAAE,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,GAAG,iBAAiB,EAAE;AAC9F,EAAE,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,UA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,IAAI,iBAAiB,EAAE,EAAE,QAAQ;AACnE,EAAE,IAAI,gBAAgB,EAAE;AACxB,IAAI,UAAU,CAAC,QAAQ,CAAC;AACxB,IAAI,OAAO,QAAQ;AACnB;AACA,EAAE,OAAO,QAAQ;AACjB;AACY,MAAC,cAAc,GAAG,CAAC,EAAE,KAAK,aAAa,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,uCAAuC,EAAE,EAAE;;;;"}
|
package/package.json
CHANGED
package/dist/index-B8vV328V.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty;var c=(n,s)=>M(n,"name",{value:s,configurable:!0});const m=/(.*)\[(\d+)\]/,I=/^\d+$/,l=c(n=>n.split(".").flatMap(s=>{const e=s.match(m);return e?[...l(e[1]),Number(e[2])]:s}),"getAllKeysFromPath"),g=c((n,s,e)=>{s in n||(n[s]=I.test(String(e))?[]:{})},"ensureKey"),A=c((n,s)=>l(s).reduce((r,t)=>r?.[t],n),"getByPath"),h=c((n,s,e)=>{const r=l(s),t=r[0],o=Array.isArray(n)?[...n]:{...n};return r.length===1?(e===void 0?Array.isArray(o)?o.splice(Number(t),1):delete o[t]:o[t]=e,o):(g(o,t,r[1]),o[t]=h(o[t],r.slice(1).join("."),e),o)},"setByPath"),E="class",T="xlink",L="xmlns",C="ref",p={[L]:"http://www.w3.org/2000/xmlns/",[T]:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"},N=c(n=>n&&typeof n=="object"&&!n.attributes&&!n.type&&!n.children,"isJSXComment"),b=c(n=>n.filter(s=>!N(s)),"filterComments"),x=c(n=>({type:"p",attributes:{},children:[`FATAL ERROR: ${n?.message||n}`]}),"createInPlaceErrorMessageVNode"),d=c((n,s,e)=>{s={...s},typeof e<"u"&&(s.key=e);let r=(s?.children?[].concat(s.children):[]).filter(Boolean);if(delete s?.children,r=b([].concat.apply([],r)),n==="fragment")return b(r);if(typeof n=="function"&&n.constructor.name!=="AsyncFunction")try{return n({children:r,...s})}catch(t){return typeof t=="string"?t=`[JsxError] in ${n.name}: ${t}`:t instanceof Error&&(t.message=`[JsxError] in ${n.name}: ${t.message}`),x(t)}return{type:n,attributes:s,children:r}},"jsx"),R=c((n,s)=>{if(!n||typeof s!="function")throw new Error("Invalid arguments. Ensure domNode and onUnmount are valid.");const e=n.parentNode;if(!e)throw new Error("The provided domNode does not have a parentNode.");const r=new MutationObserver(t=>{for(const o of t)if(o.removedNodes.length>0){for(const i of o.removedNodes)if(i===n){s(),r.disconnect();return}}});r.observe(e,{childList:!0})},"observeUnmount"),S=c(n=>{typeof n?.$onMount=="function"&&(n.$onMount(),n.$onMount=null),typeof n?.$onUnmount=="function"&&R(n,n.$onUnmount)},"handleLifecycleEventsForOnMount"),y=c(n=>{const s={hasElNamespace:c(e=>e.namespaceURI===p.svg,"hasElNamespace"),hasSvgNamespace:c((e,r)=>s.hasElNamespace(e)&&r!=="STYLE"&&r!=="SCRIPT","hasSvgNamespace"),createElementOrElements:c((e,r)=>Array.isArray(e)?s.createChildElements(e,r):typeof e<"u"?s.createElement(e,r):s.createTextNode("",r),"createElementOrElements"),createElement:c((e,r)=>{let t;try{e.constructor.name==="AsyncFunction"?t=n.createElement("div"):typeof e.type=="function"?(t=n.createElement("div"),t.innerText=`FATAL ERROR: ${e.type._error}`):e.type.toUpperCase()==="SVG"||r&&s.hasSvgNamespace(r,e.type.toUpperCase())?t=n.createElementNS(p.svg,e.type):t=n.createElement(e.type),e.attributes&&(s.setAttributes(e,t),e.attributes.dangerouslySetInnerHTML&&(t.innerHTML=e.attributes.dangerouslySetInnerHTML.__html)),e.children&&s.createChildElements(e.children,t),r&&(r.appendChild(t),S(t))}catch(o){throw console.error("Fatal error! Error happend while rendering the VDOM!",o,e),o}return t},"createElement"),createTextNode:c((e,r)=>{const t=n.createTextNode(e.toString());return r&&r.appendChild(t),t},"createTextNode"),createChildElements:c((e,r)=>{const t=[];for(let o=0;o<e.length;o++){const i=e[o];i===null||typeof i!="object"&&typeof i!="function"?t.push(s.createTextNode((typeof i>"u"||i===null?"":i).toString(),r)):t.push(s.createElement(i,r))}return t},"createChildElements"),setAttribute:c((e,r,t,o)=>{if(typeof r>"u"||e==="dangerouslySetInnerHTML")return;if(e===C&&typeof r!="function"){r.current=t;return}if(e.startsWith("on")&&typeof r=="function"){let f=e.substring(2).toLowerCase();const a=f.indexOf("capture"),u=a>-1;f==="mount"&&(t.$onMount=r),f==="unmount"&&(t.$onUnmount=r),u&&(f=f.substring(0,a)),t.addEventListener(f,r,u);return}e==="className"&&(e=E),e===E&&Array.isArray(r)&&(r=r.join(" "));const i=e.match(/[A-Z]/)?.index;if(s.hasElNamespace(t)&&i){const f=e.substring(0,i).toLowerCase(),a=e.substring(i,e.length).toLowerCase(),u=p[f]||null;t.setAttributeNS(u,f===T||f==="xmlns"?`${f}:${a}`:e,r)}else if(e==="style"&&typeof r!="string"){const f=Object.keys(r);for(let a=0;a<f.length;a++)t.style[f[a]]=r[f[a]]}else typeof r=="boolean"?t[e]=r:t.setAttribute(e,r)},"setAttribute"),setAttributes:c((e,r)=>{const t=Object.keys(e.attributes);for(let o=0;o<t.length;o++)s.setAttribute(t[o],e.attributes[t[o]],r,e)},"setAttributes")};return s},"getRenderer"),$=c((n,s,e)=>{const r=s.el||s;let t;return typeof n=="string"?t=y(e.window.document).createTextNode(n,r):t=y(e.window.document).createElementOrElements(n,r),t},"renderIsomorphic"),_=c(n=>n.children,"Fragment"),U=d,F=c((n,s,e,r,t,o)=>{let i;try{i=d(n,s,e)}catch(f){console.error("JSX error:",f,"in",t,"component",o)}return i},"jsxDEV"),w=c(n=>{let s=n;const e=[],r=c((t,o)=>{e.forEach(i=>i(s,t,o))},"notify");return{get value(){return s},get(t){return t?A(s,t):s},set(t,o){const i=s;if(o===void 0)i!==t&&(s=t,r(i));else{const f=h(s,t,o);i!==f&&(s=f,r(i,t))}},subscribe(t){return e.push(t),()=>{const o=e.indexOf(t);o>=0&&e.splice(o,1)}}}},"createStore"),B=c(n=>n&&typeof n=="object"&&"current"in n,"isRef");function O(n,s){const e=w(s),r={current:null,store:e,get state(){return e.value},set state(t){e.set(t)},update:c(t=>{e.set(t)},"update"),subscribe:c(t=>e.subscribe(t),"subscribe")};return typeof n=="function"&&r.subscribe(n),r}c(O,"createRef"),exports.Fragment=_,exports.createInPlaceErrorMessageVNode=x,exports.createRef=O,exports.createStore=w,exports.ensureKey=g,exports.getAllKeysFromPath=l,exports.getByPath=A,exports.getRenderer=y,exports.handleLifecycleEventsForOnMount=S,exports.isRef=B,exports.jsx=d,exports.jsxDEV=F,exports.jsxs=U,exports.observeUnmount=R,exports.renderIsomorphic=$,exports.setByPath=h;
|
|
2
|
-
//# sourceMappingURL=index-B8vV328V.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-B8vV328V.cjs","sources":["../src/common/path.ts","../src/render/isomorph.ts","../src/store/store.ts","../src/render/ref.ts"],"sourcesContent":["const ARRAY_INDEX = /(.*)\\[(\\d+)\\]/;\nconst IS_NUMBER = /^\\d+$/;\n\nexport const getAllKeysFromPath = (path: string): Array<string | number> =>\n path.split('.').flatMap(key => {\n const match = key.match(ARRAY_INDEX);\n return match ? [...getAllKeysFromPath(match[1]), Number(match[2])] : key;\n });\n\nexport const ensureKey = (\n obj: Record<string, any>,\n key: string | number,\n nextKey?: string | number\n): void => {\n if (!(key in obj)) {\n obj[key] = IS_NUMBER.test(String(nextKey)) ? [] : {};\n }\n};\n\nexport const getByPath = (obj: any, path: string): any => {\n const keys = getAllKeysFromPath(path);\n return keys.reduce((result, key) => (result == null ? undefined : result[key]), obj);\n};\n\nexport const setByPath = (obj: any, path: string, value: any): any => {\n const keys = getAllKeysFromPath(path);\n const key = keys[0];\n const newObj = Array.isArray(obj) ? [...obj] : { ...obj };\n\n if (keys.length === 1) {\n if (value === undefined) {\n Array.isArray(newObj) ? newObj.splice(Number(key), 1) : delete newObj[key];\n } else {\n newObj[key] = value;\n }\n return newObj;\n }\n\n ensureKey(newObj, key, keys[1]);\n newObj[key] = setByPath(newObj[key], keys.slice(1).join('.'), value);\n return newObj;\n};\n","import type { Dequery } from '@/dequery/dequery.js'\nimport type { VNodeChild, VNodeChildren, VNode, VNodeType, VNodeAttributes, DomAbstractionImpl, Globals } from '@/render/types.js'\n\nconst CLASS_ATTRIBUTE_NAME = 'class'\nconst XLINK_ATTRIBUTE_NAME = 'xlink'\nconst XMLNS_ATTRIBUTE_NAME = 'xmlns'\nconst REF_ATTRIBUTE_NAME = 'ref'\n\nconst nsMap = {\n [XMLNS_ATTRIBUTE_NAME]: 'http://www.w3.org/2000/xmlns/',\n [XLINK_ATTRIBUTE_NAME]: 'http://www.w3.org/1999/xlink',\n svg: 'http://www.w3.org/2000/svg',\n}\n\n// If a JSX comment is written, it looks like: { /* this */ }\n// Therefore, it turns into: {}, which is detected here\nconst isJSXComment = (node: VNode): boolean =>\n /* v8 ignore next */\n node && typeof node === 'object' && !node.attributes && !node.type && !node.children\n\n// Filters comments and undefines like: ['a', 'b', false, {}] to: ['a', 'b', false]\nconst filterComments = (children: Array<VNode> | Array<VNodeChild>) =>\n children.filter((child: VNodeChild) => !isJSXComment(child as VNode))\n\nexport const createInPlaceErrorMessageVNode = (error: unknown) => ({\n type: 'p',\n attributes: {},\n children: [`FATAL ERROR: ${(error as Error)?.message || error}`]\n})\n\nexport const jsx = (\n type: VNodeType | Function | any,\n attributes: (JSX.HTMLAttributes & JSX.SVGAttributes & Record<string, any>) | null,\n key?: string\n): Array<VNode> | VNode => {\n\n // clone attributes as well\n attributes = { ...attributes }\n\n if (typeof key !== \"undefined\") {\n /* key passed for instance-based lifecycle event listener registration */\n attributes.key = key;\n }\n\n // extract children from attributes and ensure it's always an array\n let children: Array<VNodeChild> = (attributes?.children ? [].concat(attributes.children) : []).filter(Boolean);\n delete attributes?.children;\n\n children = filterComments(\n // Implementation to flatten virtual node children structures like:\n // [<p>1</p>, [<p>2</p>,<p>3</p>]] to: [<p>1</p>,<p>2</p>,<p>3</p>]\n ([] as Array<VNodeChildren>).concat.apply([], children as any) as Array<VNodeChildren>,\n )\n\n // effectively unwrap by directly returning the children\n if (type === 'fragment') {\n return filterComments(children) as Array<VNode>;\n }\n\n // it's a component, divide and conquer children\n // in case of async functions, we just pass them through\n if (typeof type === 'function' && type.constructor.name !== 'AsyncFunction') {\n\n try {\n return type({\n children,\n ...attributes,\n })\n } catch (error) {\n\n if (typeof error === \"string\") {\n error = `[JsxError] in ${type.name}: ${error}`;\n } else if (error instanceof Error) {\n error.message = `[JsxError] in ${type.name}: ${error.message}`;\n }\n\n // render the error in place\n return createInPlaceErrorMessageVNode(error)\n }\n }\n\n return {\n type,\n attributes,\n children,\n };\n}\n\nexport const observeUnmount = (domNode: Node, onUnmount: () => void): void => {\n if (!domNode || typeof onUnmount !== 'function') {\n throw new Error('Invalid arguments. Ensure domNode and onUnmount are valid.');\n }\n\n const parentNode = domNode.parentNode;\n if (!parentNode) {\n throw new Error('The provided domNode does not have a parentNode.');\n }\n\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.removedNodes.length > 0) {\n for (const removedNode of mutation.removedNodes) {\n if (removedNode === domNode) {\n onUnmount();\n observer.disconnect(); // Stop observing after unmount\n return;\n }\n }\n }\n }\n });\n\n // Observe the parentNode for child removals\n observer.observe(parentNode, { childList: true });\n}\n\n/** lifecycle event attachment has been implemented separately, because it is also required to run when partially updating the DOM */\nexport const handleLifecycleEventsForOnMount = (newEl: HTMLElement) => {\n\n // check for a lifecycle \"onMount\" hook and call it\n if (typeof (newEl as any)?.$onMount === 'function') {\n ; (newEl as any).$onMount!()\n // remove the hook after it's been called\n ; (newEl as any).$onMount = null;\n }\n\n // optionally check for a element lifecycle \"onUnmount\" and hook it up\n if (typeof (newEl as any)?.$onUnmount === 'function') {\n // register the unmount observer (MutationObserver)\n observeUnmount(newEl as HTMLElement, (newEl as any).$onUnmount!);\n }\n}\n\nexport const getRenderer = (document: Document): DomAbstractionImpl => {\n // DOM abstraction layer for manipulation\n const renderer = {\n hasElNamespace: (domElement: Element | Document): boolean => (domElement as Element).namespaceURI === nsMap.svg,\n\n hasSvgNamespace: (parentElement: Element | Document, type: string): boolean =>\n renderer.hasElNamespace(parentElement) && type !== 'STYLE' && type !== 'SCRIPT',\n\n createElementOrElements: (\n virtualNode: VNode | undefined | Array<VNode | undefined | string>,\n parentDomElement?: Element | Document,\n ): Array<Element | Text | undefined> | Element | Text | undefined => {\n if (Array.isArray(virtualNode)) {\n return renderer.createChildElements(virtualNode, parentDomElement)\n }\n if (typeof virtualNode !== 'undefined') {\n return renderer.createElement(virtualNode, parentDomElement)\n }\n // undefined virtualNode -> e.g. when a tsx variable is used in markup which is undefined\n return renderer.createTextNode('', parentDomElement)\n },\n\n createElement: (virtualNode: VNode, parentDomElement?: Element | Document): Element | undefined => {\n let newEl: Element | undefined = undefined;\n\n try {\n // if a synchronous function is still a function, VDOM has obviously not resolved, probably an \n // Error occurred while generating the VDOM (in JSX runtime)\n if (\n virtualNode.constructor.name === 'AsyncFunction'\n ) {\n newEl = document.createElement('div')\n } else if (typeof virtualNode.type === 'function') {\n newEl = document.createElement('div')\n ; (newEl as HTMLElement).innerText = `FATAL ERROR: ${virtualNode.type._error}`\n } else if ( // SVG support\n virtualNode.type.toUpperCase() === 'SVG' ||\n (parentDomElement && renderer.hasSvgNamespace(parentDomElement, virtualNode.type.toUpperCase()))\n ) { // SVG support\n newEl = document.createElementNS(nsMap.svg, virtualNode.type as string)\n } else {\n newEl = document.createElement(virtualNode.type as string)\n }\n\n if (virtualNode.attributes) {\n renderer.setAttributes(virtualNode, newEl as Element)\n\n // Apply dangerouslySetInnerHTML if provided\n if (virtualNode.attributes.dangerouslySetInnerHTML) {\n // TODO: FIX me\n newEl.innerHTML = virtualNode.attributes.dangerouslySetInnerHTML.__html;\n }\n }\n\n if (virtualNode.children) {\n renderer.createChildElements(virtualNode.children, newEl as Element)\n }\n\n if (parentDomElement) {\n parentDomElement.appendChild(newEl)\n handleLifecycleEventsForOnMount(newEl as HTMLElement)\n }\n } catch (e) {\n console.error('Fatal error! Error happend while rendering the VDOM!', e, virtualNode);\n throw e;\n }\n return newEl as Element\n },\n\n createTextNode: (text: string, domElement?: Element | Document): Text => {\n const node = document.createTextNode(text.toString())\n\n if (domElement) {\n domElement.appendChild(node)\n }\n return node\n },\n\n createChildElements: (\n virtualChildren: VNodeChildren,\n domElement?: Element | Document,\n ): Array<Element | Text | undefined> => {\n const children: Array<Element | Text | undefined> = []\n\n for (let i = 0; i < virtualChildren.length; i++) {\n const virtualChild = virtualChildren[i]\n if (virtualChild === null || (typeof virtualChild !== 'object' && typeof virtualChild !== 'function')) {\n children.push(\n renderer.createTextNode(\n (typeof virtualChild === 'undefined' || virtualChild === null ? '' : virtualChild!).toString(),\n domElement,\n ),\n )\n } else {\n children.push(renderer.createElement(virtualChild as VNode, domElement))\n }\n }\n return children\n },\n\n setAttribute: (name: string, value: any, domElement: Element, virtualNode: VNode<VNodeAttributes>) => {\n // attributes not set (undefined) are ignored; use null value to reset an attributes state\n if (typeof value === 'undefined') return // if not set, ignore\n\n // TODO: use DANGROUSLY_SET_INNER_HTML_ATTRIBUTE here\n if (name === 'dangerouslySetInnerHTML') return; // special case, handled elsewhere\n\n // save ref as { current: DOMElement } in ref object\n // allows for ref={someRef}\n if (name === REF_ATTRIBUTE_NAME && typeof value !== 'function') {\n value.current = domElement // update ref\n return; // but do not render the ref as a string [object Object] into the DOM\n }\n\n if (name.startsWith('on') && typeof value === 'function') {\n\n let eventName = name.substring(2).toLowerCase()\n const capturePos = eventName.indexOf('capture')\n const doCapture = capturePos > -1\n\n if (eventName === 'mount') {\n ; (domElement as any).$onMount = value // DOM event lifecycle hook\n }\n\n if (eventName === 'unmount') {\n ; (domElement as any).$onUnmount = value // DOM event lifecycle hook\n }\n\n // onClickCapture={...} support\n if (doCapture) {\n eventName = eventName.substring(0, capturePos)\n }\n domElement.addEventListener(eventName, value, doCapture)\n return\n }\n\n // transforms className=\"...\" -> class=\"...\"\n // allows for React JSX to work seamlessly\n if (name === 'className') {\n name = CLASS_ATTRIBUTE_NAME\n }\n\n // transforms class={['a', 'b']} into class=\"a b\"\n if (name === CLASS_ATTRIBUTE_NAME && Array.isArray(value)) {\n value = value.join(' ')\n }\n\n // SVG support\n const nsEndIndex = name.match(/[A-Z]/)?.index\n if (renderer.hasElNamespace(domElement) && nsEndIndex) {\n const ns = name.substring(0, nsEndIndex).toLowerCase()\n const attrName = name.substring(nsEndIndex, name.length).toLowerCase()\n const namespace = nsMap[ns as keyof typeof nsMap] || null\n domElement.setAttributeNS(\n namespace,\n ns === XLINK_ATTRIBUTE_NAME || ns === 'xmlns' ? `${ns}:${attrName}` : name,\n value,\n )\n } else if (name === 'style' && typeof value !== 'string') {\n const propNames = Object.keys(value)\n\n // allows for style={{ margin: 10 }} etc.\n for (let i = 0; i < propNames.length; i++) {\n ; (domElement as HTMLElement).style[propNames[i] as any] = value[propNames[i]]\n }\n } else if (typeof value === 'boolean') {\n // for cases like <button checked={false} />\n ; (domElement as any)[name] = value\n } else {\n // for any other case\n domElement.setAttribute(name, value)\n }\n },\n\n setAttributes: (virtualNode: VNode<VNodeAttributes>, domElement: Element) => {\n const attrNames = Object.keys(virtualNode.attributes!)\n for (let i = 0; i < attrNames.length; i++) {\n renderer.setAttribute(attrNames[i], virtualNode.attributes![attrNames[i]], domElement, virtualNode)\n }\n },\n }\n return renderer\n}\n\nexport const renderIsomorphic = (\n virtualNode: VNode | undefined | string | Array<VNode | undefined | string>,\n parentDomElement: Element | Document | Dequery | undefined,\n globals: Globals,\n): Array<Element | Text | undefined> | Element | Text | undefined => {\n\n const parentEl = (parentDomElement as Dequery).el as Element || parentDomElement\n let renderResult: Array<Element | Text | undefined> | Element | Text | undefined\n\n if (typeof virtualNode === 'string') {\n renderResult = getRenderer(globals.window.document).createTextNode(virtualNode, parentEl)\n } else {\n renderResult = getRenderer(globals.window.document).createElementOrElements(virtualNode, parentEl)\n }\n return renderResult;\n}\n\n// --- JSX standard (necessary exports for jsx-runtime)\nexport const Fragment = (props: VNode) => props.children\nexport const jsxs = jsx\nexport const jsxDEV = (\n type: VNodeType | Function | any,\n attributes: (JSX.HTMLAttributes & JSX.SVGAttributes & Record<string, any>) | null,\n key?: string,\n allChildrenAreStatic?: boolean,\n sourceInfo?: string,\n selfReference?: any,\n): Array<VNode> | VNode => {\n let renderResult: Array<VNode> | VNode;\n try {\n renderResult = jsx(type, attributes, key);\n } catch (error) {\n console.error(\"JSX error:\", error, 'in', sourceInfo, 'component', selfReference);\n }\n return renderResult!;\n}\n\nexport default {\n jsx,\n Fragment,\n renderIsomorphic,\n getRenderer,\n\n // implementing the full standard\n // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md\n jsxs,\n jsxDEV,\n};","import { getByPath, setByPath } from '../common/index.js';\n\nexport type Listener<T> = (newValue: T, oldValue?: T, changedKey?: string) => void;\n\nexport interface Store<T> {\n value: T;\n get: <D = T>(path?: string) => D;\n set: <D = T>(pathOrValue: string | D, value?: D) => void;\n subscribe: (listener: Listener<T>) => () => void;\n}\n\nexport const createStore = <T>(initialValue: T): Store<T> => {\n let value: T = initialValue; // internal state\n const listeners: Array<Listener<T>> = [];\n\n const notify = (oldValue: T, changedKey?: string) => {\n listeners.forEach(listener => listener(value, oldValue, changedKey));\n };\n\n return {\n // allow reading value but prevent external mutation\n get value() {\n return value;\n },\n\n get(path?: string) {\n return path ? getByPath(value, path) : value;\n },\n\n set(pathOrValue: string | any, newValue?: any) {\n const oldValue = value;\n\n if (newValue === undefined) {\n // replace entire store value\n if (oldValue !== pathOrValue) {\n value = pathOrValue;\n notify(oldValue);\n }\n } else {\n // update a specific path\n const updatedValue = setByPath(value, pathOrValue, newValue);\n if (oldValue !== updatedValue) {\n value = updatedValue;\n notify(oldValue, pathOrValue);\n }\n }\n },\n\n subscribe(listener) {\n listeners.push(listener);\n return () => {\n const index = listeners.indexOf(listener);\n if (index >= 0) listeners.splice(index, 1);\n };\n },\n };\n};\n","import type { Ref, RefUpdateFn } from '../render/types.js';\nimport { createStore } from '../store/store.js';\n\nexport const isRef = (obj: any): obj is Ref<Element> =>\n obj && typeof obj === \"object\" && \"current\" in obj;\n\nexport function createRef<ST = any, NT extends Node | Element | Text | null = HTMLElement>(refUpdateFn?: RefUpdateFn<ST>, defaultState?: ST): Ref<NT, ST> {\n\n const stateStore = createStore<ST>(defaultState as ST);\n\n const ref: Ref<NT, ST> = {\n current: null as NT,\n store: stateStore,\n get state() {\n return stateStore.value;\n },\n set state(value: ST) {\n stateStore.set(value);\n },\n update: (state: ST) => {\n stateStore.set(state);\n },\n subscribe: (refUpdateFn: RefUpdateFn<ST>) => stateStore.subscribe(refUpdateFn),\n }\n\n if (typeof refUpdateFn === 'function') {\n ref.subscribe(refUpdateFn);\n }\n return ref;\n}"],"names":[],"mappings":";;AACA,MAAM,WAAW,GAAG,eAAe;AACnC,MAAM,SAAS,GAAG,OAAO;AACb,MAAC,kBAAkB,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC7E,EAAE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC;AACtC,EAAE,OAAO,KAAK,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG;AAC1E,CAAC;AACW,MAAC,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,KAAK;AAChD,EAAE,IAAI,EAAE,GAAG,IAAI,GAAG,CAAC,EAAE;AACrB,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE;AACxD;AACA;AACY,MAAC,SAAS,GAAG,CAAC,GAAG,E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C;AAC9B;AACA,EAAE,OAAO,GAAG;AACZ;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index-BDxEyjzN.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var M=Object.defineProperty;var c=(n,s)=>M(n,"name",{value:s,configurable:!0});const C=/(.*)\[(\d+)\]/,I=/^\d+$/,l=c(n=>n.split(".").flatMap(s=>{const e=s.match(C);return e?[...l(e[1]),Number(e[2])]:s}),"getAllKeysFromPath"),g=c((n,s,e)=>{s in n||(n[s]=I.test(String(e))?[]:{})},"ensureKey"),A=c((n,s)=>l(s).reduce((r,t)=>r?.[t],n),"getByPath"),p=c((n,s,e)=>{const r=l(s),t=r[0],o=Array.isArray(n)?[...n]:{...n};return r.length===1?(e===void 0?Array.isArray(o)?o.splice(Number(t),1):delete o[t]:o[t]=e,o):(g(o,t,r[1]),o[t]=p(o[t],r.slice(1).join("."),e),o)},"setByPath"),T="class",b="xlink",L="xmlns",$="ref",h={[L]:"http://www.w3.org/2000/xmlns/",[b]:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"},N=c(n=>n&&typeof n=="object"&&!n.attributes&&!n.type&&!n.children,"isJSXComment"),E=c(n=>n.filter(s=>!N(s)),"filterComments"),w=c(n=>({type:"p",attributes:{},children:[`FATAL ERROR: ${n?.message||n}`]}),"createInPlaceErrorMessageVNode"),d=c((n,s,e)=>{s={...s},typeof e<"u"&&(s.key=e);let r=(s?.children?[].concat(s.children):[]).filter(Boolean);if(delete s?.children,r=E([].concat.apply([],r)),n==="fragment")return E(r);if(typeof n=="function"&&n.constructor.name!=="AsyncFunction")try{return n({children:r,...s})}catch(t){return typeof t=="string"?t=`[JsxError] in ${n.name}: ${t}`:t instanceof Error&&(t.message=`[JsxError] in ${n.name}: ${t.message}`),w(t)}return{type:n,attributes:s,children:r}},"jsx"),x=c((n,s)=>{if(!n||typeof s!="function")throw new Error("Invalid arguments. Ensure domNode and onUnmount are valid.");const e=n.parentNode;if(!e)throw new Error("The provided domNode does not have a parentNode.");const r=new MutationObserver(t=>{for(const o of t)if(o.removedNodes.length>0){for(const i of o.removedNodes)if(i===n){s(),r.disconnect();return}}});r.observe(e,{childList:!0})},"observeUnmount"),S=c(n=>{typeof n?.$onMount=="function"&&(n.$onMount(),n.$onMount=null),typeof n?.$onUnmount=="function"&&x(n,n.$onUnmount)},"handleLifecycleEventsForOnMount"),y=c(n=>{const s={hasElNamespace:c(e=>e.namespaceURI===h.svg,"hasElNamespace"),hasSvgNamespace:c((e,r)=>s.hasElNamespace(e)&&r!=="STYLE"&&r!=="SCRIPT","hasSvgNamespace"),createElementOrElements:c((e,r)=>Array.isArray(e)?s.createChildElements(e,r):typeof e<"u"?s.createElement(e,r):s.createTextNode("",r),"createElementOrElements"),createElement:c((e,r)=>{let t;try{e.constructor.name==="AsyncFunction"?t=n.createElement("div"):typeof e.type=="function"?(t=n.createElement("div"),t.innerText=`FATAL ERROR: ${e.type._error}`):e.type.toUpperCase()==="SVG"||r&&s.hasSvgNamespace(r,e.type.toUpperCase())?t=n.createElementNS(h.svg,e.type):t=n.createElement(e.type),e.attributes&&(s.setAttributes(e,t),e.attributes.dangerouslySetInnerHTML&&(t.innerHTML=e.attributes.dangerouslySetInnerHTML.__html)),e.children&&s.createChildElements(e.children,t),r&&(r.appendChild(t),S(t))}catch(o){throw console.error("Fatal error! Error happend while rendering the VDOM!",o,e),o}return t},"createElement"),createTextNode:c((e,r)=>{const t=n.createTextNode(e.toString());return r&&r.appendChild(t),t},"createTextNode"),createChildElements:c((e,r)=>{const t=[];for(let o=0;o<e.length;o++){const i=e[o];i===null||typeof i!="object"&&typeof i!="function"?t.push(s.createTextNode((typeof i>"u"||i===null?"":i).toString(),r)):t.push(s.createElement(i,r))}return t},"createChildElements"),setAttribute:c((e,r,t,o)=>{if(typeof r>"u"||e==="dangerouslySetInnerHTML")return;if(e===$&&typeof r!="function"){r.current=t;return}if(e.startsWith("on")&&typeof r=="function"){let f=e.substring(2).toLowerCase();const a=f.indexOf("capture"),u=a>-1;f==="mount"&&(t.$onMount=r),f==="unmount"&&(t.$onUnmount=r),u&&(f=f.substring(0,a)),t.addEventListener(f,r,u);return}e==="className"&&(e=T),e===T&&Array.isArray(r)&&(r=r.join(" "));const i=e.match(/[A-Z]/)?.index;if(s.hasElNamespace(t)&&i){const f=e.substring(0,i).toLowerCase(),a=e.substring(i,e.length).toLowerCase(),u=h[f]||null;t.setAttributeNS(u,f===b||f==="xmlns"?`${f}:${a}`:e,r)}else if(e==="style"&&typeof r!="string"){const f=Object.keys(r);for(let a=0;a<f.length;a++)t.style[f[a]]=r[f[a]]}else typeof r=="boolean"?t[e]=r:t.setAttribute(e,r)},"setAttribute"),setAttributes:c((e,r)=>{const t=Object.keys(e.attributes);for(let o=0;o<t.length;o++)s.setAttribute(t[o],e.attributes[t[o]],r,e)},"setAttributes")};return s},"getRenderer"),m=c((n,s,e)=>{const r=s.el||s;let t;return typeof n=="string"?t=y(e.window.document).createTextNode(n,r):t=y(e.window.document).createElementOrElements(n,r),t},"renderIsomorphic"),_=c(n=>n.children,"Fragment"),U=d,F=c((n,s,e,r,t,o)=>{let i;try{i=d(n,s,e)}catch(f){console.error("JSX error:",f,"in",t,"component",o)}return i},"jsxDEV"),R=c(n=>{let s=n;const e=[],r=c((t,o)=>{e.forEach(i=>i(s,t,o))},"notify");return{get value(){return s},get(t){return t?A(s,t):s},set(t,o){const i=s;if(o===void 0)i!==t&&(s=t,r(i));else{const f=p(s,t,o);i!==f&&(s=f,r(i,t))}},subscribe(t){return e.push(t),()=>{const o=e.indexOf(t);o>=0&&e.splice(o,1)}}}},"createStore"),O=c(n=>n&&typeof n=="object"&&"current"in n,"isRef");function B(n,s){const e=R(s),r={current:null,store:e,get state(){return e.value},set state(t){e.set(t)},update:c(t=>{e.set(t)},"update"),subscribe:c(t=>e.subscribe(t),"subscribe")};return typeof n=="function"&&r.subscribe(n),r}c(B,"createRef");export{_ as F,U as a,F as b,w as c,B as d,R as e,l as f,y as g,S as h,O as i,d as j,g as k,A as l,x as o,m as r,p as s};
|
|
2
|
-
//# sourceMappingURL=index-BDxEyjzN.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-BDxEyjzN.mjs","sources":["../src/common/path.ts","../src/render/isomorph.ts","../src/store/store.ts","../src/render/ref.ts"],"sourcesContent":["const ARRAY_INDEX = /(.*)\\[(\\d+)\\]/;\nconst IS_NUMBER = /^\\d+$/;\n\nexport const getAllKeysFromPath = (path: string): Array<string | number> =>\n path.split('.').flatMap(key => {\n const match = key.match(ARRAY_INDEX);\n return match ? [...getAllKeysFromPath(match[1]), Number(match[2])] : key;\n });\n\nexport const ensureKey = (\n obj: Record<string, any>,\n key: string | number,\n nextKey?: string | number\n): void => {\n if (!(key in obj)) {\n obj[key] = IS_NUMBER.test(String(nextKey)) ? [] : {};\n }\n};\n\nexport const getByPath = (obj: any, path: string): any => {\n const keys = getAllKeysFromPath(path);\n return keys.reduce((result, key) => (result == null ? undefined : result[key]), obj);\n};\n\nexport const setByPath = (obj: any, path: string, value: any): any => {\n const keys = getAllKeysFromPath(path);\n const key = keys[0];\n const newObj = Array.isArray(obj) ? [...obj] : { ...obj };\n\n if (keys.length === 1) {\n if (value === undefined) {\n Array.isArray(newObj) ? newObj.splice(Number(key), 1) : delete newObj[key];\n } else {\n newObj[key] = value;\n }\n return newObj;\n }\n\n ensureKey(newObj, key, keys[1]);\n newObj[key] = setByPath(newObj[key], keys.slice(1).join('.'), value);\n return newObj;\n};\n","import type { Dequery } from '@/dequery/dequery.js'\nimport type { VNodeChild, VNodeChildren, VNode, VNodeType, VNodeAttributes, DomAbstractionImpl, Globals } from '@/render/types.js'\n\nconst CLASS_ATTRIBUTE_NAME = 'class'\nconst XLINK_ATTRIBUTE_NAME = 'xlink'\nconst XMLNS_ATTRIBUTE_NAME = 'xmlns'\nconst REF_ATTRIBUTE_NAME = 'ref'\n\nconst nsMap = {\n [XMLNS_ATTRIBUTE_NAME]: 'http://www.w3.org/2000/xmlns/',\n [XLINK_ATTRIBUTE_NAME]: 'http://www.w3.org/1999/xlink',\n svg: 'http://www.w3.org/2000/svg',\n}\n\n// If a JSX comment is written, it looks like: { /* this */ }\n// Therefore, it turns into: {}, which is detected here\nconst isJSXComment = (node: VNode): boolean =>\n /* v8 ignore next */\n node && typeof node === 'object' && !node.attributes && !node.type && !node.children\n\n// Filters comments and undefines like: ['a', 'b', false, {}] to: ['a', 'b', false]\nconst filterComments = (children: Array<VNode> | Array<VNodeChild>) =>\n children.filter((child: VNodeChild) => !isJSXComment(child as VNode))\n\nexport const createInPlaceErrorMessageVNode = (error: unknown) => ({\n type: 'p',\n attributes: {},\n children: [`FATAL ERROR: ${(error as Error)?.message || error}`]\n})\n\nexport const jsx = (\n type: VNodeType | Function | any,\n attributes: (JSX.HTMLAttributes & JSX.SVGAttributes & Record<string, any>) | null,\n key?: string\n): Array<VNode> | VNode => {\n\n // clone attributes as well\n attributes = { ...attributes }\n\n if (typeof key !== \"undefined\") {\n /* key passed for instance-based lifecycle event listener registration */\n attributes.key = key;\n }\n\n // extract children from attributes and ensure it's always an array\n let children: Array<VNodeChild> = (attributes?.children ? [].concat(attributes.children) : []).filter(Boolean);\n delete attributes?.children;\n\n children = filterComments(\n // Implementation to flatten virtual node children structures like:\n // [<p>1</p>, [<p>2</p>,<p>3</p>]] to: [<p>1</p>,<p>2</p>,<p>3</p>]\n ([] as Array<VNodeChildren>).concat.apply([], children as any) as Array<VNodeChildren>,\n )\n\n // effectively unwrap by directly returning the children\n if (type === 'fragment') {\n return filterComments(children) as Array<VNode>;\n }\n\n // it's a component, divide and conquer children\n // in case of async functions, we just pass them through\n if (typeof type === 'function' && type.constructor.name !== 'AsyncFunction') {\n\n try {\n return type({\n children,\n ...attributes,\n })\n } catch (error) {\n\n if (typeof error === \"string\") {\n error = `[JsxError] in ${type.name}: ${error}`;\n } else if (error instanceof Error) {\n error.message = `[JsxError] in ${type.name}: ${error.message}`;\n }\n\n // render the error in place\n return createInPlaceErrorMessageVNode(error)\n }\n }\n\n return {\n type,\n attributes,\n children,\n };\n}\n\nexport const observeUnmount = (domNode: Node, onUnmount: () => void): void => {\n if (!domNode || typeof onUnmount !== 'function') {\n throw new Error('Invalid arguments. Ensure domNode and onUnmount are valid.');\n }\n\n const parentNode = domNode.parentNode;\n if (!parentNode) {\n throw new Error('The provided domNode does not have a parentNode.');\n }\n\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.removedNodes.length > 0) {\n for (const removedNode of mutation.removedNodes) {\n if (removedNode === domNode) {\n onUnmount();\n observer.disconnect(); // Stop observing after unmount\n return;\n }\n }\n }\n }\n });\n\n // Observe the parentNode for child removals\n observer.observe(parentNode, { childList: true });\n}\n\n/** lifecycle event attachment has been implemented separately, because it is also required to run when partially updating the DOM */\nexport const handleLifecycleEventsForOnMount = (newEl: HTMLElement) => {\n\n // check for a lifecycle \"onMount\" hook and call it\n if (typeof (newEl as any)?.$onMount === 'function') {\n ; (newEl as any).$onMount!()\n // remove the hook after it's been called\n ; (newEl as any).$onMount = null;\n }\n\n // optionally check for a element lifecycle \"onUnmount\" and hook it up\n if (typeof (newEl as any)?.$onUnmount === 'function') {\n // register the unmount observer (MutationObserver)\n observeUnmount(newEl as HTMLElement, (newEl as any).$onUnmount!);\n }\n}\n\nexport const getRenderer = (document: Document): DomAbstractionImpl => {\n // DOM abstraction layer for manipulation\n const renderer = {\n hasElNamespace: (domElement: Element | Document): boolean => (domElement as Element).namespaceURI === nsMap.svg,\n\n hasSvgNamespace: (parentElement: Element | Document, type: string): boolean =>\n renderer.hasElNamespace(parentElement) && type !== 'STYLE' && type !== 'SCRIPT',\n\n createElementOrElements: (\n virtualNode: VNode | undefined | Array<VNode | undefined | string>,\n parentDomElement?: Element | Document,\n ): Array<Element | Text | undefined> | Element | Text | undefined => {\n if (Array.isArray(virtualNode)) {\n return renderer.createChildElements(virtualNode, parentDomElement)\n }\n if (typeof virtualNode !== 'undefined') {\n return renderer.createElement(virtualNode, parentDomElement)\n }\n // undefined virtualNode -> e.g. when a tsx variable is used in markup which is undefined\n return renderer.createTextNode('', parentDomElement)\n },\n\n createElement: (virtualNode: VNode, parentDomElement?: Element | Document): Element | undefined => {\n let newEl: Element | undefined = undefined;\n\n try {\n // if a synchronous function is still a function, VDOM has obviously not resolved, probably an \n // Error occurred while generating the VDOM (in JSX runtime)\n if (\n virtualNode.constructor.name === 'AsyncFunction'\n ) {\n newEl = document.createElement('div')\n } else if (typeof virtualNode.type === 'function') {\n newEl = document.createElement('div')\n ; (newEl as HTMLElement).innerText = `FATAL ERROR: ${virtualNode.type._error}`\n } else if ( // SVG support\n virtualNode.type.toUpperCase() === 'SVG' ||\n (parentDomElement && renderer.hasSvgNamespace(parentDomElement, virtualNode.type.toUpperCase()))\n ) { // SVG support\n newEl = document.createElementNS(nsMap.svg, virtualNode.type as string)\n } else {\n newEl = document.createElement(virtualNode.type as string)\n }\n\n if (virtualNode.attributes) {\n renderer.setAttributes(virtualNode, newEl as Element)\n\n // Apply dangerouslySetInnerHTML if provided\n if (virtualNode.attributes.dangerouslySetInnerHTML) {\n // TODO: FIX me\n newEl.innerHTML = virtualNode.attributes.dangerouslySetInnerHTML.__html;\n }\n }\n\n if (virtualNode.children) {\n renderer.createChildElements(virtualNode.children, newEl as Element)\n }\n\n if (parentDomElement) {\n parentDomElement.appendChild(newEl)\n handleLifecycleEventsForOnMount(newEl as HTMLElement)\n }\n } catch (e) {\n console.error('Fatal error! Error happend while rendering the VDOM!', e, virtualNode);\n throw e;\n }\n return newEl as Element\n },\n\n createTextNode: (text: string, domElement?: Element | Document): Text => {\n const node = document.createTextNode(text.toString())\n\n if (domElement) {\n domElement.appendChild(node)\n }\n return node\n },\n\n createChildElements: (\n virtualChildren: VNodeChildren,\n domElement?: Element | Document,\n ): Array<Element | Text | undefined> => {\n const children: Array<Element | Text | undefined> = []\n\n for (let i = 0; i < virtualChildren.length; i++) {\n const virtualChild = virtualChildren[i]\n if (virtualChild === null || (typeof virtualChild !== 'object' && typeof virtualChild !== 'function')) {\n children.push(\n renderer.createTextNode(\n (typeof virtualChild === 'undefined' || virtualChild === null ? '' : virtualChild!).toString(),\n domElement,\n ),\n )\n } else {\n children.push(renderer.createElement(virtualChild as VNode, domElement))\n }\n }\n return children\n },\n\n setAttribute: (name: string, value: any, domElement: Element, virtualNode: VNode<VNodeAttributes>) => {\n // attributes not set (undefined) are ignored; use null value to reset an attributes state\n if (typeof value === 'undefined') return // if not set, ignore\n\n // TODO: use DANGROUSLY_SET_INNER_HTML_ATTRIBUTE here\n if (name === 'dangerouslySetInnerHTML') return; // special case, handled elsewhere\n\n // save ref as { current: DOMElement } in ref object\n // allows for ref={someRef}\n if (name === REF_ATTRIBUTE_NAME && typeof value !== 'function') {\n value.current = domElement // update ref\n return; // but do not render the ref as a string [object Object] into the DOM\n }\n\n if (name.startsWith('on') && typeof value === 'function') {\n\n let eventName = name.substring(2).toLowerCase()\n const capturePos = eventName.indexOf('capture')\n const doCapture = capturePos > -1\n\n if (eventName === 'mount') {\n ; (domElement as any).$onMount = value // DOM event lifecycle hook\n }\n\n if (eventName === 'unmount') {\n ; (domElement as any).$onUnmount = value // DOM event lifecycle hook\n }\n\n // onClickCapture={...} support\n if (doCapture) {\n eventName = eventName.substring(0, capturePos)\n }\n domElement.addEventListener(eventName, value, doCapture)\n return\n }\n\n // transforms className=\"...\" -> class=\"...\"\n // allows for React JSX to work seamlessly\n if (name === 'className') {\n name = CLASS_ATTRIBUTE_NAME\n }\n\n // transforms class={['a', 'b']} into class=\"a b\"\n if (name === CLASS_ATTRIBUTE_NAME && Array.isArray(value)) {\n value = value.join(' ')\n }\n\n // SVG support\n const nsEndIndex = name.match(/[A-Z]/)?.index\n if (renderer.hasElNamespace(domElement) && nsEndIndex) {\n const ns = name.substring(0, nsEndIndex).toLowerCase()\n const attrName = name.substring(nsEndIndex, name.length).toLowerCase()\n const namespace = nsMap[ns as keyof typeof nsMap] || null\n domElement.setAttributeNS(\n namespace,\n ns === XLINK_ATTRIBUTE_NAME || ns === 'xmlns' ? `${ns}:${attrName}` : name,\n value,\n )\n } else if (name === 'style' && typeof value !== 'string') {\n const propNames = Object.keys(value)\n\n // allows for style={{ margin: 10 }} etc.\n for (let i = 0; i < propNames.length; i++) {\n ; (domElement as HTMLElement).style[propNames[i] as any] = value[propNames[i]]\n }\n } else if (typeof value === 'boolean') {\n // for cases like <button checked={false} />\n ; (domElement as any)[name] = value\n } else {\n // for any other case\n domElement.setAttribute(name, value)\n }\n },\n\n setAttributes: (virtualNode: VNode<VNodeAttributes>, domElement: Element) => {\n const attrNames = Object.keys(virtualNode.attributes!)\n for (let i = 0; i < attrNames.length; i++) {\n renderer.setAttribute(attrNames[i], virtualNode.attributes![attrNames[i]], domElement, virtualNode)\n }\n },\n }\n return renderer\n}\n\nexport const renderIsomorphic = (\n virtualNode: VNode | undefined | string | Array<VNode | undefined | string>,\n parentDomElement: Element | Document | Dequery | undefined,\n globals: Globals,\n): Array<Element | Text | undefined> | Element | Text | undefined => {\n\n const parentEl = (parentDomElement as Dequery).el as Element || parentDomElement\n let renderResult: Array<Element | Text | undefined> | Element | Text | undefined\n\n if (typeof virtualNode === 'string') {\n renderResult = getRenderer(globals.window.document).createTextNode(virtualNode, parentEl)\n } else {\n renderResult = getRenderer(globals.window.document).createElementOrElements(virtualNode, parentEl)\n }\n return renderResult;\n}\n\n// --- JSX standard (necessary exports for jsx-runtime)\nexport const Fragment = (props: VNode) => props.children\nexport const jsxs = jsx\nexport const jsxDEV = (\n type: VNodeType | Function | any,\n attributes: (JSX.HTMLAttributes & JSX.SVGAttributes & Record<string, any>) | null,\n key?: string,\n allChildrenAreStatic?: boolean,\n sourceInfo?: string,\n selfReference?: any,\n): Array<VNode> | VNode => {\n let renderResult: Array<VNode> | VNode;\n try {\n renderResult = jsx(type, attributes, key);\n } catch (error) {\n console.error(\"JSX error:\", error, 'in', sourceInfo, 'component', selfReference);\n }\n return renderResult!;\n}\n\nexport default {\n jsx,\n Fragment,\n renderIsomorphic,\n getRenderer,\n\n // implementing the full standard\n // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md\n jsxs,\n jsxDEV,\n};","import { getByPath, setByPath } from '../common/index.js';\n\nexport type Listener<T> = (newValue: T, oldValue?: T, changedKey?: string) => void;\n\nexport interface Store<T> {\n value: T;\n get: <D = T>(path?: string) => D;\n set: <D = T>(pathOrValue: string | D, value?: D) => void;\n subscribe: (listener: Listener<T>) => () => void;\n}\n\nexport const createStore = <T>(initialValue: T): Store<T> => {\n let value: T = initialValue; // internal state\n const listeners: Array<Listener<T>> = [];\n\n const notify = (oldValue: T, changedKey?: string) => {\n listeners.forEach(listener => listener(value, oldValue, changedKey));\n };\n\n return {\n // allow reading value but prevent external mutation\n get value() {\n return value;\n },\n\n get(path?: string) {\n return path ? getByPath(value, path) : value;\n },\n\n set(pathOrValue: string | any, newValue?: any) {\n const oldValue = value;\n\n if (newValue === undefined) {\n // replace entire store value\n if (oldValue !== pathOrValue) {\n value = pathOrValue;\n notify(oldValue);\n }\n } else {\n // update a specific path\n const updatedValue = setByPath(value, pathOrValue, newValue);\n if (oldValue !== updatedValue) {\n value = updatedValue;\n notify(oldValue, pathOrValue);\n }\n }\n },\n\n subscribe(listener) {\n listeners.push(listener);\n return () => {\n const index = listeners.indexOf(listener);\n if (index >= 0) listeners.splice(index, 1);\n };\n },\n };\n};\n","import type { Ref, RefUpdateFn } from '../render/types.js';\nimport { createStore } from '../store/store.js';\n\nexport const isRef = (obj: any): obj is Ref<Element> =>\n obj && typeof obj === \"object\" && \"current\" in obj;\n\nexport function createRef<ST = any, NT extends Node | Element | Text | null = HTMLElement>(refUpdateFn?: RefUpdateFn<ST>, defaultState?: ST): Ref<NT, ST> {\n\n const stateStore = createStore<ST>(defaultState as ST);\n\n const ref: Ref<NT, ST> = {\n current: null as NT,\n store: stateStore,\n get state() {\n return stateStore.value;\n },\n set state(value: ST) {\n stateStore.set(value);\n },\n update: (state: ST) => {\n stateStore.set(state);\n },\n subscribe: (refUpdateFn: RefUpdateFn<ST>) => stateStore.subscribe(refUpdateFn),\n }\n\n if (typeof refUpdateFn === 'function') {\n ref.subscribe(refUpdateFn);\n }\n return ref;\n}"],"names":[],"mappings":"AACA,MAAM,WAAW,GAAG,eAAe;AACnC,MAAM,SAAS,GAAG,OAAO;AACb,MAAC,kBAAkB,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC7E,EAAE,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC;AACtC,EAAE,OAAO,KAAK,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG;AAC1E,CAAC;AACW,MAAC,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,KAAK;AAChD,EAAE,IAAI,EAAE,GAAG,IAAI,GAAG,CAAC,EAAE;AACrB,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE;AACxD;AACA;AACY,MAAC,SAAS,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK;AACxC,EAAE,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC;AACvC,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC;AACjF;AACY,MAAC,SAAS,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,KAAK;AAC/C,EAAE,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC;AACvC,EAAE,MAAM,GAAG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