8 lines
6.6 KiB
Plaintext
8 lines
6.6 KiB
Plaintext
{
|
|
"version": 3,
|
|
"sources": ["../../.pnpm/solid-js@1.4.7/node_modules/solid-js/h/dist/h.js", "dep:solid-js_h"],
|
|
"sourcesContent": ["import { spread, assign, insert, createComponent, dynamicProperty, SVGElements } from 'solid-js/web';\n\nconst $ELEMENT = Symbol(\"hyper-element\");\nfunction createHyperScript(r) {\n function h() {\n let args = [].slice.call(arguments),\n e,\n multiExpression = false;\n typeof args[0] === \"string\" && detectMultiExpression(args);\n const ret = () => {\n while (args.length) item(args.shift());\n return e;\n };\n ret[$ELEMENT] = true;\n return ret;\n function item(l) {\n const type = typeof l;\n if (l == null) ;else if (\"string\" === type) {\n if (!e) parseClass(l);else e.appendChild(document.createTextNode(l));\n } else if (\"number\" === type || \"boolean\" === type || l instanceof Date || l instanceof RegExp) {\n e.appendChild(document.createTextNode(l.toString()));\n } else if (Array.isArray(l)) {\n for (let i = 0; i < l.length; i++) item(l[i]);\n } else if (l instanceof Element) {\n r.insert(e, l, multiExpression ? null : undefined);\n } else if (\"object\" === type) {\n let dynamic = false;\n const d = Object.getOwnPropertyDescriptors(l);\n for (const k in d) {\n if (k !== \"ref\" && k.slice(0, 2) !== \"on\" && typeof d[k].value === \"function\") {\n r.dynamicProperty(l, k);\n dynamic = true;\n } else if (d[k].get) dynamic = true;\n }\n dynamic ? r.spread(e, l, e instanceof SVGElement, !!args.length) : r.assign(e, l, e instanceof SVGElement, !!args.length);\n } else if (\"function\" === type) {\n if (!e) {\n let props,\n next = args[0];\n if (next == null || typeof next === \"object\" && !Array.isArray(next) && !(next instanceof Element)) props = args.shift();\n props || (props = {});\n if (args.length) {\n props.children = args.length > 1 ? args : args[0];\n }\n const d = Object.getOwnPropertyDescriptors(props);\n for (const k in d) {\n if (Array.isArray(d[k].value)) {\n const list = d[k].value;\n props[k] = () => {\n for (let i = 0; i < list.length; i++) {\n while (list[i][$ELEMENT]) list[i] = list[i]();\n }\n return list;\n };\n r.dynamicProperty(props, k);\n } else if (typeof d[k].value === \"function\" && !d[k].value.length) r.dynamicProperty(props, k);\n }\n e = r.createComponent(l, props);\n args = [];\n } else {\n while (l[$ELEMENT]) l = l();\n r.insert(e, l, multiExpression ? null : undefined);\n }\n }\n }\n function parseClass(string) {\n const m = string.split(/([\\.#]?[^\\s#.]+)/);\n if (/^\\.|#/.test(m[1])) e = document.createElement(\"div\");\n for (let i = 0; i < m.length; i++) {\n const v = m[i],\n s = v.substring(1, v.length);\n if (!v) continue;\n if (!e) e = r.SVGElements.has(v) ? document.createElementNS(\"http://www.w3.org/2000/svg\", v) : document.createElement(v);else if (v[0] === \".\") e.classList.add(s);else if (v[0] === \"#\") e.setAttribute(\"id\", s);\n }\n }\n function detectMultiExpression(list) {\n for (let i = 1; i < list.length; i++) {\n if (typeof list[i] === \"function\") {\n multiExpression = true;\n return;\n } else if (Array.isArray(list[i])) {\n detectMultiExpression(list[i]);\n }\n }\n }\n }\n return h;\n}\n\nvar index = createHyperScript({\n spread,\n assign,\n insert,\n createComponent,\n dynamicProperty,\n SVGElements\n});\n\nexport { index as default };\n", "import d from \"./node_modules/.pnpm/solid-js@1.4.7/node_modules/solid-js/h/dist/h.js\";export default d;"],
|
|
"mappings": ";;;;;;;;;;;;;AAEA,IAAM,WAAW,OAAO,eAAe;AACvC,2BAA2B,GAAG;AAC5B,eAAa;AACX,QAAI,OAAO,CAAC,EAAE,MAAM,KAAK,SAAS,GAC9B,GACA,kBAAkB;AACtB,WAAO,KAAK,OAAO,YAAY,sBAAsB,IAAI;AACzD,UAAM,MAAM,MAAM;AAChB,aAAO,KAAK;AAAQ,aAAK,KAAK,MAAM,CAAC;AACrC,aAAO;AAAA,IACT;AACA,QAAI,YAAY;AAChB,WAAO;AACP,kBAAc,GAAG;AACf,YAAM,OAAO,OAAO;AACpB,UAAI,KAAK;AAAM;AAAA,eAAU,aAAa,MAAM;AAC1C,YAAI,CAAC;AAAG,qBAAW,CAAC;AAAA;AAAO,YAAE,YAAY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