UNPKG

17.9 kBSource Map (JSON)View Raw
1{"version":3,"file":"jsx.mjs","sources":["../src/polyfills.js","../src/util.js","../src/index.js","../src/jsx.js"],"sourcesContent":["if (typeof Symbol!=='function') {\n\tlet c = 0;\n\ttry {\n\t\tSymbol = function(s) {\t\t// eslint-disable-line\n\t\t\treturn `@@${s}${++c}`;\n\t\t};\n\t\tSymbol.for = s => `@@${s}`;\n\t}\n\tcatch (e) {}\n}\n","// DOM properties that should NOT have \"px\" added when numeric\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\nexport let encodeEntities = s => String(s)\n\t.replace(/&/g, '&amp;')\n\t.replace(/</g, '&lt;')\n\t.replace(/>/g, '&gt;')\n\t.replace(/\"/g, '&quot;');\n\nexport let indent = (s, char) => String(s).replace(/(\\n+)/g, '$1' + (char || '\\t'));\n\nexport let isLargeString = (s, length, ignoreLines) => (String(s).length>(length || 40) || (!ignoreLines && String(s).indexOf('\\n')!==-1) || String(s).indexOf('<')!==-1);\n\nconst JS_TO_CSS = {};\n\n// Convert an Object style to a CSSText string\nexport function styleObjToCss(s) {\n\tlet str = '';\n\tfor (let prop in s) {\n\t\tlet val = s[prop];\n\t\tif (val!=null) {\n\t\t\tif (str) str += ' ';\n\t\t\t// str += jsToCss(prop);\n\t\t\tstr += JS_TO_CSS[prop] || (JS_TO_CSS[prop] = prop.replace(/([A-Z])/g,'-$1').toLowerCase());\n\t\t\tstr += ': ';\n\t\t\tstr += val;\n\t\t\tif (typeof val==='number' && IS_NON_DIMENSIONAL.test(prop)===false) {\n\t\t\t\tstr += 'px';\n\t\t\t}\n\t\t\tstr += ';';\n\t\t}\n\t}\n\treturn str || undefined;\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {object} obj Object onto which properties should be copied.\n * @param {object} props Object from which to copy properties.\n * @returns {object}\n * @private\n */\nexport function assign(obj, props) {\n\tfor (let i in props) obj[i] = props[i];\n\treturn obj;\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n * @param {import('preact').VNode} vnode The VNode to get props for\n * @returns {object} The props to use for this VNode\n */\nexport function getNodeProps(vnode) {\n\tlet props = assign({}, vnode.attributes);\n\tprops.children = vnode.children;\n\n\tlet defaultProps = vnode.nodeName.defaultProps;\n\tif (defaultProps!==undefined) {\n\t\tfor (let i in defaultProps) {\n\t\t\tif (props[i]===undefined) {\n\t\t\t\tprops[i] = defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn props;\n}\n","import { encodeEntities, indent, isLargeString, styleObjToCss, assign, getNodeProps } from './util';\nimport { ENABLE_PRETTY } from '../env';\n\nconst SHALLOW = { shallow: true };\n\n// components without names, kept as a hash for later comparison to return consistent UnnamedComponentXX names.\nconst UNNAMED = [];\n\nconst VOID_ELEMENTS = /^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\n\n\n/** Render Preact JSX + Components to an HTML string.\n *\t@name render\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n *\t@param {Object} [options={}]\tRendering options\n *\t@param {Boolean} [options.shallow=false]\tIf `true`, renders nested Components as HTML elements (`<Foo a=\"b\" />`).\n *\t@param {Boolean} [options.xml=false]\t\tIf `true`, uses self-closing tags for elements without children.\n *\t@param {Boolean} [options.pretty=false]\t\tIf `true`, adds whitespace for readability\n */\nrenderToString.render = renderToString;\n\n\n/** Only render elements, leaving Components inline as `<ComponentName ... />`.\n *\tThis method is just a convenience alias for `render(vnode, context, { shallow:true })`\n *\t@name shallow\n *\t@function\n *\t@param {VNode} vnode\tJSX VNode to render.\n *\t@param {Object} [context={}]\tOptionally pass an initial context object through the render path.\n */\nlet shallowRender = (vnode, context) => renderToString(vnode, context, SHALLOW);\n\n\n/** The default export is an alias of `render()`. */\nfunction renderToString(vnode, context, opts, inner, isSvgMode) {\n\tif (vnode==null || typeof vnode==='boolean') {\n\t\treturn '';\n\t}\n\n\tlet nodeName = vnode.nodeName,\n\t\tattributes = vnode.attributes,\n\t\tisComponent = false;\n\tcontext = context || {};\n\topts = opts || {};\n\n\tlet pretty = ENABLE_PRETTY && opts.pretty,\n\t\tindentChar = pretty && typeof pretty==='string' ? pretty : '\\t';\n\n\t// #text nodes\n\tif (typeof vnode!=='object' && !nodeName) {\n\t\treturn encodeEntities(vnode);\n\t}\n\n\t// components\n\tif (typeof nodeName==='function') {\n\t\tisComponent = true;\n\t\tif (opts.shallow && (inner || opts.renderRootComponent===false)) {\n\t\t\tnodeName = getComponentName(nodeName);\n\t\t}\n\t\telse {\n\t\t\tlet props = getNodeProps(vnode),\n\t\t\t\trendered;\n\n\t\t\tif (!nodeName.prototype || typeof nodeName.prototype.render!=='function') {\n\t\t\t\t// stateless functional components\n\t\t\t\trendered = nodeName(props, context);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// class-based components\n\t\t\t\tlet c = new nodeName(props, context);\n\t\t\t\t// turn off stateful re-rendering:\n\t\t\t\tc._disable = c.__x = true;\n\t\t\t\tc.props = props;\n\t\t\t\tc.context = context;\n\t\t\t\tif (c.componentWillMount) c.componentWillMount();\n\t\t\t\trendered = c.render(c.props, c.state, c.context);\n\n\t\t\t\tif (c.getChildContext) {\n\t\t\t\t\tcontext = assign(assign({}, context), c.getChildContext());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn renderToString(rendered, context, opts, opts.shallowHighOrder!==false);\n\t\t}\n\t}\n\n\t// render JSX to HTML\n\tlet s = '', html;\n\n\tif (attributes) {\n\t\tlet attrs = Object.keys(attributes);\n\n\t\t// allow sorting lexicographically for more determinism (useful for tests, such as via preact-jsx-chai)\n\t\tif (opts && opts.sortAttributes===true) attrs.sort();\n\n\t\tfor (let i=0; i<attrs.length; i++) {\n\t\t\tlet name = attrs[i],\n\t\t\t\tv = attributes[name];\n\t\t\tif (name==='children') continue;\n\n\t\t\tif (name.match(/[\\s\\n\\\\/='\"\\0<>]/)) continue;\n\n\t\t\tif (!(opts && opts.allAttributes) && (name==='key' || name==='ref')) continue;\n\n\t\t\tif (name==='className') {\n\t\t\t\tif (attributes.class) continue;\n\t\t\t\tname = 'class';\n\t\t\t}\n\t\t\telse if (isSvgMode && name.match(/^xlink:?./)) {\n\t\t\t\tname = name.toLowerCase().replace(/^xlink:?/, 'xlink:');\n\t\t\t}\n\n\t\t\tif (name==='style' && v && typeof v==='object') {\n\t\t\t\tv = styleObjToCss(v);\n\t\t\t}\n\n\t\t\tlet hooked = opts.attributeHook && opts.attributeHook(name, v, context, opts, isComponent);\n\t\t\tif (hooked || hooked==='') {\n\t\t\t\ts += hooked;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (name==='dangerouslySetInnerHTML') {\n\t\t\t\thtml = v && v.__html;\n\t\t\t}\n\t\t\telse if ((v || v===0 || v==='') && typeof v!=='function') {\n\t\t\t\tif (v===true || v==='') {\n\t\t\t\t\tv = name;\n\t\t\t\t\t// in non-xml mode, allow boolean attributes\n\t\t\t\t\tif (!opts || !opts.xml) {\n\t\t\t\t\t\ts += ' ' + name;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ts += ` ${name}=\"${encodeEntities(v)}\"`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// account for >1 multiline attribute\n\tif (pretty) {\n\t\tlet sub = s.replace(/^\\n\\s*/, ' ');\n\t\tif (sub!==s && !~sub.indexOf('\\n')) s = sub;\n\t\telse if (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t}\n\n\ts = `<${nodeName}${s}>`;\n\tif (String(nodeName).match(/[\\s\\n\\\\/='\"\\0<>]/)) throw s;\n\n\tlet isVoid = String(nodeName).match(VOID_ELEMENTS);\n\tif (isVoid) s = s.replace(/>$/, ' />');\n\n\tlet pieces = [];\n\tif (html) {\n\t\t// if multiline, indent.\n\t\tif (pretty && isLargeString(html)) {\n\t\t\thtml = '\\n' + indentChar + indent(html, indentChar);\n\t\t}\n\t\ts += html;\n\t}\n\telse if (vnode.children) {\n\t\tlet hasLarge = pretty && ~s.indexOf('\\n');\n\t\tfor (let i=0; i<vnode.children.length; i++) {\n\t\t\tlet child = vnode.children[i];\n\t\t\tif (child!=null && child!==false) {\n\t\t\t\tlet childSvgMode = nodeName==='svg' ? true : nodeName==='foreignObject' ? false : isSvgMode,\n\t\t\t\t\tret = renderToString(child, context, opts, true, childSvgMode);\n\t\t\t\tif (pretty && !hasLarge && isLargeString(ret)) hasLarge = true;\n\t\t\t\tif (ret) pieces.push(ret);\n\t\t\t}\n\t\t}\n\t\tif (pretty && hasLarge) {\n\t\t\tfor (let i=pieces.length; i--; ) {\n\t\t\t\tpieces[i] = '\\n' + indentChar + indent(pieces[i], indentChar);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pieces.length) {\n\t\ts += pieces.join('');\n\t}\n\telse if (opts && opts.xml) {\n\t\treturn s.substring(0, s.length-1) + ' />';\n\t}\n\n\tif (!isVoid) {\n\t\tif (pretty && ~s.indexOf('\\n')) s += '\\n';\n\t\ts += `</${nodeName}>`;\n\t}\n\n\treturn s;\n}\n\nfunction getComponentName(component) {\n\treturn component.displayName || component!==Function && component.name || getFallbackComponentName(component);\n}\n\nfunction getFallbackComponentName(component) {\n\tlet str = Function.prototype.toString.call(component),\n\t\tname = (str.match(/^\\s*function\\s+([^( ]+)/) || '')[1];\n\tif (!name) {\n\t\t// search for an existing indexed name for the given component:\n\t\tlet index = -1;\n\t\tfor (let i=UNNAMED.length; i--; ) {\n\t\t\tif (UNNAMED[i]===component) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// not found, create a new indexed name:\n\t\tif (index<0) {\n\t\t\tindex = UNNAMED.push(component) - 1;\n\t\t}\n\t\tname = `UnnamedComponent${index}`;\n\t}\n\treturn name;\n}\nrenderToString.shallowRender = shallowRender;\n\nexport default renderToString;\n\nexport {\n\trenderToString as render,\n\trenderToString,\n\tshallowRender\n};\n","import './polyfills';\nimport renderToString from './index';\nimport { indent, encodeEntities, assign } from './util';\nimport prettyFormat from 'pretty-format';\n\n\n// we have to patch in Array support, Possible issue in npm.im/pretty-format\nlet preactPlugin = {\n\ttest(object) {\n\t\treturn object && typeof object==='object' && 'nodeName' in object && 'attributes' in object && 'children' in object && !('nodeType' in object);\n\t},\n\tprint(val, print, indent) {\n\t\treturn renderToString(val, preactPlugin.context, preactPlugin.opts, true);\n\t}\n};\n\n\nlet prettyFormatOpts = {\n\tplugins: [preactPlugin]\n};\n\n\nfunction attributeHook(name, value, context, opts, isComponent) {\n\tlet type = typeof value;\n\t\n\t// Use render-to-string's built-in handling for these properties\n\tif (name==='dangerouslySetInnerHTML') return false;\n\n\t// always skip null & undefined values, skip false DOM attributes, skip functions if told to\n\tif (value==null || (type==='function' && !opts.functions)) return '';\n\n\tif (opts.skipFalseAttributes && !isComponent && (value===false || ((name==='class' || name==='style') && value===''))) return '';\n\n\tlet indentChar = typeof opts.pretty==='string' ? opts.pretty : '\\t';\n\tif (type!=='string') {\n\t\tif (type==='function' && !opts.functionNames) {\n\t\t\tvalue = 'Function';\n\t\t}\n\t\telse {\n\t\t\tpreactPlugin.context = context;\n\t\t\tpreactPlugin.opts = opts;\n\t\t\tvalue = prettyFormat(value, prettyFormatOpts);\n\t\t\tif (~value.indexOf('\\n')) {\n\t\t\t\tvalue = `${indent('\\n'+value, indentChar)}\\n`;\n\t\t\t}\n\t\t}\n\t\treturn indent(`\\n${name}={${value}}`, indentChar);\n\t}\n\treturn `\\n${indentChar}${name}=\"${encodeEntities(value)}\"`;\n}\n\n\nlet defaultOpts = {\n\tattributeHook,\n\tjsx: true,\n\txml: false,\n\tfunctions: true,\n\tfunctionNames: true,\n\tskipFalseAttributes: true,\n\tpretty: ' '\n};\n\n\nfunction renderToJsxString(vnode, context, opts, inner) {\n\topts = assign(assign({}, defaultOpts), opts || {});\n\treturn renderToString(vnode, context, opts, inner);\n}\n\nexport default renderToJsxString;\nexport { renderToJsxString as render };\n"],"names":["Symbol","let","c","s","for","e","const","IS_NON_DIMENSIONAL","encodeEntities","String","replace","indent","char","isLargeString","length","ignoreLines","indexOf","JS_TO_CSS","styleObjToCss","str","prop","val","toLowerCase","test","undefined","assign","obj","props","i","SHALLOW","shallow","UNNAMED","VOID_ELEMENTS","renderToString","render","vnode","context","opts","inner","isSvgMode","nodeName","attributes","isComponent","component","pretty","indentChar","renderRootComponent","rendered","children","defaultProps","getNodeProps","prototype","_disable","__x","componentWillMount","state","getChildContext","shallowHighOrder","displayName","Function","name","toString","call","match","index","push","getFallbackComponentName","html","attrs","Object","keys","sortAttributes","sort","v","allAttributes","class","hooked","attributeHook","__html","xml","sub","isVoid","pieces","hasLarge","child","ret","join","substring","shallowRender","preactPlugin","object","print","prettyFormatOpts","plugins","defaultOpts","value","type","functions","skipFalseAttributes","functionNames","prettyFormat","jsx","renderToJsxString"],"mappings":"6BAAA,GAAoB,mBAATA,OAAqB,CAC/BC,IAAIC,EAAI,EACR,IACCF,OAAS,SAASG,GACjB,WAAYA,KAAMD,GAEnBF,OAAOI,aAAMD,cAAUA,SAEjBE,KCPDC,IAAMC,EAAqB,yDAEvBC,WAAiBL,UAAKM,OAAON,GACtCO,QAAQ,KAAM,SACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,WAELC,WAAUR,EAAGS,UAASH,OAAON,GAAGO,QAAQ,SAAU,MAAQE,GAAQ,QAElEC,WAAiBV,EAAGW,EAAQC,UAAiBN,OAAON,GAAGW,QAAQA,GAAU,MAASC,IAA0C,IAA3BN,OAAON,GAAGa,QAAQ,QAAyC,IAA1BP,OAAON,GAAGa,QAAQ,MAEzJC,KAGC,SAASC,EAAcf,GAC7BF,IAAIkB,EAAM,GACV,IAAKlB,IAAImB,KAAQjB,EAAG,CACnBF,IAAIoB,EAAMlB,EAAEiB,GACH,MAALC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