gonia 0.2.0 → 0.2.1
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/server/index.d.ts +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/render.js +4 -3
- package/package.json +2 -2
package/dist/server/index.d.ts
CHANGED
package/dist/server/index.js
CHANGED
package/dist/server/render.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { Window } from 'happy-dom';
|
|
7
7
|
import { Mode, DirectivePriority, getDirective } from '../types.js';
|
|
8
8
|
import { createContext } from '../context.js';
|
|
9
9
|
import { processNativeSlot } from '../directives/slot.js';
|
|
@@ -123,10 +123,11 @@ function createServerResolverConfig(el, rootState) {
|
|
|
123
123
|
* ```
|
|
124
124
|
*/
|
|
125
125
|
export async function render(html, state, registry) {
|
|
126
|
-
const
|
|
126
|
+
const window = new Window();
|
|
127
|
+
const document = window.document;
|
|
127
128
|
const index = [];
|
|
128
129
|
const selector = getSelector(registry);
|
|
129
|
-
const observer = new MutationObserver((mutations) => {
|
|
130
|
+
const observer = new window.MutationObserver((mutations) => {
|
|
130
131
|
for (const mutation of mutations) {
|
|
131
132
|
for (const node of mutation.addedNodes) {
|
|
132
133
|
if (node.nodeType !== 1)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gonia",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A lightweight, SSR-first reactive UI library with declarative directives",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"
|
|
49
|
+
"happy-dom": "^17.4.4",
|
|
50
50
|
"tinyglobby": "^0.2.15"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|