frosty 0.0.52 → 0.0.54

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.
@@ -1,7 +1,7 @@
1
1
  import _ from 'lodash';
2
2
  import { myersSync } from 'myers.js';
3
3
  import { N as NativeElementType } from './component-BzurKp_J.mjs';
4
- import { _ as _Renderer } from './renderer-CqpFsNTw.mjs';
4
+ import { _ as _Renderer } from './renderer-Cm_Etiqz.mjs';
5
5
  import postcss from 'postcss';
6
6
  import { parse } from 'postcss-js';
7
7
  import nested from 'postcss-nested';
@@ -4126,7 +4126,7 @@ class _DOMRenderer extends _Renderer {
4126
4126
  this._tracked_elements.delete(element);
4127
4127
  }
4128
4128
  __replaceChildren(element, children, force) {
4129
- const diff = myersSync(_.map(element.childNodes, x => x.nodeType === this.document.TEXT_NODE ? x.textContent ?? '' : x), _.map(children, x => x instanceof DOMNativeNode ? x.target : x), { compare: (a, b) => a === b });
4129
+ const diff = myersSync(_.map(element.childNodes, x => x.nodeType === this.document.TEXT_NODE ? x.textContent ?? '' : x), _.flatMap(children, x => x instanceof DOMNativeNode ? x.target : x), { compare: (a, b) => a === b });
4130
4130
  let i = 0;
4131
4131
  for (const { remove, insert, equivalent } of diff) {
4132
4132
  if (equivalent) {
@@ -4154,7 +4154,8 @@ class _DOMRenderer extends _Renderer {
4154
4154
  const root = this.createRoot();
4155
4155
  try {
4156
4156
  await root.mount(component, { skipMount: true });
4157
- const str = _.map(_.castArray(root.root ?? []), x => (x instanceof DOMNativeNode ? x.target : x).outerHTML).join('');
4157
+ const elements = _.flatMap(_.castArray(root.root ?? []), x => x instanceof DOMNativeNode ? x.target : x);
4158
+ const str = _.map(elements, x => x.outerHTML).join('');
4158
4159
  return str.startsWith('<html>') ? `<!DOCTYPE html>${str}` : str;
4159
4160
  }
4160
4161
  finally {
@@ -4164,4 +4165,4 @@ class _DOMRenderer extends _Renderer {
4164
4165
  }
4165
4166
 
4166
4167
  export { DOMNativeNode as D, _DOMRenderer as _ };
4167
- //# sourceMappingURL=common--MzzIA4l.mjs.map
4168
+ //# sourceMappingURL=common-DuAkMSrW.mjs.map