UNPKG

@popeindustries/lit-html

Version:

Seamlessly and efficiently use @popeindustries/lit-html-server rendered HTML to hydrate lit-html templates in the browser

6 lines (5 loc) 1.54 kB
/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var C,x;import{_$LH as a}from"./lit-html.js";const{_ChildPart:u}=a,o=e=>e,g=e=>e===null||typeof e!="object"&&typeof e!="function",v={HTML:1,SVG:2},N=(e,t)=>t===void 0?e?._$litType$!==void 0:e?._$litType$===t,b=e=>e?._$litDirective$!==void 0,p=e=>e?._$litDirective$,S=e=>e.strings===void 0,$=()=>document.createComment(""),T=(e,t,n)=>{var d;const s=o(e._$startNode).parentNode,l=t===void 0?e._$endNode:t._$startNode;if(n===void 0){const c=o(s).insertBefore($(),l),r=o(s).insertBefore($(),l);n=new u(c,r,e,e.options)}else{const c=o(n._$endNode).nextSibling,r=n._$parent,_=r!==e;if(_){(d=n._$reparentDisconnectables)===null||d===void 0||d.call(n,e),n._$parent=e;let i;n._$notifyConnectionChanged!==void 0&&(i=e._$isConnected)!==r._$isConnected&&n._$notifyConnectionChanged(i)}if(c!==l||_){let i=n._$startNode;for(;i!==c;){const f=o(i).nextSibling;o(s).insertBefore(i,l),i=f}}}return n},y=(e,t,n=e)=>(e._$setValue(t,n),e),m={},D=(e,t=m)=>e._$committedValue=t,V=e=>e._$committedValue,w=e=>{var t;(t=e._$notifyConnectionChanged)===null||t===void 0||t.call(e,!1,!0);let n=e._$startNode;const d=o(e._$endNode).nextSibling;for(;n!==d;){const s=o(n).nextSibling;o(n).remove(),n=s}},E=e=>{e._$clear()};export{v as TemplateResultType,E as clearPart,V as getCommittedValue,p as getDirectiveClass,T as insertPart,b as isDirectiveResult,g as isPrimitive,S as isSingleExpression,N as isTemplateResult,w as removePart,y as setChildPartValue,D as setCommittedValue};