@matthesketh/utopia-server 0.0.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/LICENSE +21 -0
- package/README.md +47 -0
- package/dist/chunk-DV7AV4JO.js +216 -0
- package/dist/chunk-KRXKBFI6.js +216 -0
- package/dist/index.cjs +224 -0
- package/dist/index.d.cts +61 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.js +178 -0
- package/dist/ssr-runtime-DRHVHO7Q.d.cts +60 -0
- package/dist/ssr-runtime-DRHVHO7Q.d.ts +60 -0
- package/dist/ssr-runtime-Tl5z0a1q.d.cts +60 -0
- package/dist/ssr-runtime-Tl5z0a1q.d.ts +60 -0
- package/dist/ssr-runtime.cjs +262 -0
- package/dist/ssr-runtime.d.cts +2 -0
- package/dist/ssr-runtime.d.ts +2 -0
- package/dist/ssr-runtime.js +50 -0
- package/package.json +54 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import '@utopia/core';
|
|
2
|
+
|
|
3
|
+
interface VElement {
|
|
4
|
+
type: 1;
|
|
5
|
+
tag: string;
|
|
6
|
+
attrs: Record<string, string>;
|
|
7
|
+
children: VNode[];
|
|
8
|
+
_parent?: VElement;
|
|
9
|
+
}
|
|
10
|
+
interface VText {
|
|
11
|
+
type: 2;
|
|
12
|
+
text: string;
|
|
13
|
+
_parent?: VElement;
|
|
14
|
+
}
|
|
15
|
+
interface VComment {
|
|
16
|
+
type: 3;
|
|
17
|
+
text: string;
|
|
18
|
+
_parent?: VElement;
|
|
19
|
+
}
|
|
20
|
+
type VNode = VElement | VText | VComment;
|
|
21
|
+
|
|
22
|
+
/** Reset and return all collected styles. */
|
|
23
|
+
declare function flushStyles(): string[];
|
|
24
|
+
declare function createElement(tag: string): VElement;
|
|
25
|
+
declare function createTextNode(text: string): VText;
|
|
26
|
+
declare function createComment(text: string): VComment;
|
|
27
|
+
declare function setText(node: VText, value: any): void;
|
|
28
|
+
declare function setAttr(el: VElement, name: string, value: any): void;
|
|
29
|
+
declare function addEventListener(_el: VElement, _event: string, _handler: any): () => void;
|
|
30
|
+
declare function appendChild(parent: VElement, child: VNode): void;
|
|
31
|
+
declare function insertBefore(parent: VElement, node: VNode, anchor: VNode | null): void;
|
|
32
|
+
declare function removeNode(node: VNode): void;
|
|
33
|
+
declare function effect(fn: () => void | (() => void)): () => void;
|
|
34
|
+
declare function createEffect(fn: () => void | (() => void)): () => void;
|
|
35
|
+
declare function createIf(anchor: VComment, condition: () => any, renderTrue: () => VNode, renderFalse?: () => VNode): () => void;
|
|
36
|
+
declare function createFor<T>(anchor: VComment, list: () => T[], renderItem: (item: T, index: number) => VNode): () => void;
|
|
37
|
+
interface ComponentDefinition {
|
|
38
|
+
setup?: (props: Record<string, any>) => Record<string, any>;
|
|
39
|
+
render: (ctx: Record<string, any>) => VNode;
|
|
40
|
+
styles?: string;
|
|
41
|
+
}
|
|
42
|
+
declare function createComponent(Component: ComponentDefinition, props?: Record<string, any>, children?: Record<string, () => VNode>): VNode;
|
|
43
|
+
declare function createComponentInstance(definition: ComponentDefinition, props?: Record<string, any>): {
|
|
44
|
+
el: VNode | null;
|
|
45
|
+
props: Record<string, any>;
|
|
46
|
+
slots: Record<string, () => VNode>;
|
|
47
|
+
mount(_target: any): void;
|
|
48
|
+
unmount(): void;
|
|
49
|
+
};
|
|
50
|
+
declare function mount(component: ComponentDefinition, _target: any): {
|
|
51
|
+
el: VNode | null;
|
|
52
|
+
props: Record<string, any>;
|
|
53
|
+
slots: Record<string, () => VNode>;
|
|
54
|
+
mount(_target: any): void;
|
|
55
|
+
unmount(): void;
|
|
56
|
+
};
|
|
57
|
+
declare function queueJob(_fn: () => void): void;
|
|
58
|
+
declare function nextTick(): Promise<void>;
|
|
59
|
+
|
|
60
|
+
export { type ComponentDefinition as C, type VComment as V, type VElement as a, type VNode as b, type VText as c, addEventListener as d, appendChild as e, createComment as f, createComponent as g, createComponentInstance as h, createEffect as i, createElement as j, createFor as k, createIf as l, createTextNode as m, effect as n, flushStyles as o, insertBefore as p, mount as q, nextTick as r, queueJob as s, removeNode as t, setAttr as u, setText as v };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import '@utopia/core';
|
|
2
|
+
|
|
3
|
+
interface VElement {
|
|
4
|
+
type: 1;
|
|
5
|
+
tag: string;
|
|
6
|
+
attrs: Record<string, string>;
|
|
7
|
+
children: VNode[];
|
|
8
|
+
_parent?: VElement;
|
|
9
|
+
}
|
|
10
|
+
interface VText {
|
|
11
|
+
type: 2;
|
|
12
|
+
text: string;
|
|
13
|
+
_parent?: VElement;
|
|
14
|
+
}
|
|
15
|
+
interface VComment {
|
|
16
|
+
type: 3;
|
|
17
|
+
text: string;
|
|
18
|
+
_parent?: VElement;
|
|
19
|
+
}
|
|
20
|
+
type VNode = VElement | VText | VComment;
|
|
21
|
+
|
|
22
|
+
/** Reset and return all collected styles. */
|
|
23
|
+
declare function flushStyles(): string[];
|
|
24
|
+
declare function createElement(tag: string): VElement;
|
|
25
|
+
declare function createTextNode(text: string): VText;
|
|
26
|
+
declare function createComment(text: string): VComment;
|
|
27
|
+
declare function setText(node: VText, value: any): void;
|
|
28
|
+
declare function setAttr(el: VElement, name: string, value: any): void;
|
|
29
|
+
declare function addEventListener(_el: VElement, _event: string, _handler: any): () => void;
|
|
30
|
+
declare function appendChild(parent: VElement, child: VNode): void;
|
|
31
|
+
declare function insertBefore(parent: VElement, node: VNode, anchor: VNode | null): void;
|
|
32
|
+
declare function removeNode(node: VNode): void;
|
|
33
|
+
declare function effect(fn: () => void | (() => void)): () => void;
|
|
34
|
+
declare function createEffect(fn: () => void | (() => void)): () => void;
|
|
35
|
+
declare function createIf(anchor: VComment, condition: () => any, renderTrue: () => VNode, renderFalse?: () => VNode): () => void;
|
|
36
|
+
declare function createFor<T>(anchor: VComment, list: () => T[], renderItem: (item: T, index: number) => VNode): () => void;
|
|
37
|
+
interface ComponentDefinition {
|
|
38
|
+
setup?: (props: Record<string, any>) => Record<string, any>;
|
|
39
|
+
render: (ctx: Record<string, any>) => VNode;
|
|
40
|
+
styles?: string;
|
|
41
|
+
}
|
|
42
|
+
declare function createComponent(Component: ComponentDefinition, props?: Record<string, any>, children?: Record<string, () => VNode>): VNode;
|
|
43
|
+
declare function createComponentInstance(definition: ComponentDefinition, props?: Record<string, any>): {
|
|
44
|
+
el: VNode | null;
|
|
45
|
+
props: Record<string, any>;
|
|
46
|
+
slots: Record<string, () => VNode>;
|
|
47
|
+
mount(_target: any): void;
|
|
48
|
+
unmount(): void;
|
|
49
|
+
};
|
|
50
|
+
declare function mount(component: ComponentDefinition, _target: any): {
|
|
51
|
+
el: VNode | null;
|
|
52
|
+
props: Record<string, any>;
|
|
53
|
+
slots: Record<string, () => VNode>;
|
|
54
|
+
mount(_target: any): void;
|
|
55
|
+
unmount(): void;
|
|
56
|
+
};
|
|
57
|
+
declare function queueJob(_fn: () => void): void;
|
|
58
|
+
declare function nextTick(): Promise<void>;
|
|
59
|
+
|
|
60
|
+
export { type ComponentDefinition as C, type VComment as V, type VElement as a, type VNode as b, type VText as c, addEventListener as d, appendChild as e, createComment as f, createComponent as g, createComponentInstance as h, createEffect as i, createElement as j, createFor as k, createIf as l, createTextNode as m, effect as n, flushStyles as o, insertBefore as p, mount as q, nextTick as r, queueJob as s, removeNode as t, setAttr as u, setText as v };
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/ssr-runtime.ts
|
|
21
|
+
var ssr_runtime_exports = {};
|
|
22
|
+
__export(ssr_runtime_exports, {
|
|
23
|
+
addEventListener: () => addEventListener,
|
|
24
|
+
appendChild: () => appendChild,
|
|
25
|
+
batch: () => import_utopia_core.batch,
|
|
26
|
+
computed: () => import_utopia_core.computed,
|
|
27
|
+
createComment: () => createComment,
|
|
28
|
+
createComponent: () => createComponent,
|
|
29
|
+
createComponentInstance: () => createComponentInstance,
|
|
30
|
+
createEffect: () => createEffect,
|
|
31
|
+
createElement: () => createElement,
|
|
32
|
+
createFor: () => createFor,
|
|
33
|
+
createIf: () => createIf,
|
|
34
|
+
createTextNode: () => createTextNode,
|
|
35
|
+
effect: () => effect,
|
|
36
|
+
flushStyles: () => flushStyles,
|
|
37
|
+
insertBefore: () => insertBefore,
|
|
38
|
+
mount: () => mount,
|
|
39
|
+
nextTick: () => nextTick,
|
|
40
|
+
queueJob: () => queueJob,
|
|
41
|
+
removeNode: () => removeNode,
|
|
42
|
+
setAttr: () => setAttr,
|
|
43
|
+
setText: () => setText,
|
|
44
|
+
signal: () => import_utopia_core.signal,
|
|
45
|
+
untrack: () => import_utopia_core.untrack
|
|
46
|
+
});
|
|
47
|
+
module.exports = __toCommonJS(ssr_runtime_exports);
|
|
48
|
+
var import_utopia_core = require("@matthesketh/utopia-core");
|
|
49
|
+
var collectedStyles = [];
|
|
50
|
+
function flushStyles() {
|
|
51
|
+
const styles = collectedStyles;
|
|
52
|
+
collectedStyles = [];
|
|
53
|
+
return styles;
|
|
54
|
+
}
|
|
55
|
+
function createElement(tag) {
|
|
56
|
+
return { type: 1, tag, attrs: {}, children: [] };
|
|
57
|
+
}
|
|
58
|
+
function createTextNode(text) {
|
|
59
|
+
return { type: 2, text: String(text) };
|
|
60
|
+
}
|
|
61
|
+
function createComment(text) {
|
|
62
|
+
return { type: 3, text };
|
|
63
|
+
}
|
|
64
|
+
function setText(node, value) {
|
|
65
|
+
node.text = value == null ? "" : String(value);
|
|
66
|
+
}
|
|
67
|
+
function setAttr(el, name, value) {
|
|
68
|
+
if (name === "class") {
|
|
69
|
+
if (value == null || value === false) {
|
|
70
|
+
delete el.attrs["class"];
|
|
71
|
+
} else if (typeof value === "string") {
|
|
72
|
+
el.attrs["class"] = value;
|
|
73
|
+
} else if (typeof value === "object") {
|
|
74
|
+
const classes = [];
|
|
75
|
+
for (const key of Object.keys(value)) {
|
|
76
|
+
if (value[key]) classes.push(key);
|
|
77
|
+
}
|
|
78
|
+
el.attrs["class"] = classes.join(" ");
|
|
79
|
+
}
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (name === "style") {
|
|
83
|
+
if (value == null || value === false) {
|
|
84
|
+
delete el.attrs["style"];
|
|
85
|
+
} else if (typeof value === "string") {
|
|
86
|
+
el.attrs["style"] = value;
|
|
87
|
+
} else if (typeof value === "object") {
|
|
88
|
+
const parts = [];
|
|
89
|
+
for (const prop of Object.keys(value)) {
|
|
90
|
+
if (value[prop] != null) {
|
|
91
|
+
const cssName = prop.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
92
|
+
parts.push(`${cssName}: ${value[prop]}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
el.attrs["style"] = parts.join("; ");
|
|
96
|
+
}
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const BOOLEAN_ATTRS = /* @__PURE__ */ new Set([
|
|
100
|
+
"disabled",
|
|
101
|
+
"checked",
|
|
102
|
+
"readonly",
|
|
103
|
+
"hidden",
|
|
104
|
+
"selected",
|
|
105
|
+
"required",
|
|
106
|
+
"multiple",
|
|
107
|
+
"autofocus",
|
|
108
|
+
"autoplay",
|
|
109
|
+
"controls",
|
|
110
|
+
"loop",
|
|
111
|
+
"muted",
|
|
112
|
+
"open",
|
|
113
|
+
"novalidate"
|
|
114
|
+
]);
|
|
115
|
+
if (BOOLEAN_ATTRS.has(name)) {
|
|
116
|
+
if (value) {
|
|
117
|
+
el.attrs[name] = "";
|
|
118
|
+
} else {
|
|
119
|
+
delete el.attrs[name];
|
|
120
|
+
}
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (value == null || value === false) {
|
|
124
|
+
delete el.attrs[name];
|
|
125
|
+
} else {
|
|
126
|
+
el.attrs[name] = value === true ? "" : String(value);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function addEventListener(_el, _event, _handler) {
|
|
130
|
+
return () => {
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function appendChild(parent, child) {
|
|
134
|
+
child._parent = parent;
|
|
135
|
+
parent.children.push(child);
|
|
136
|
+
}
|
|
137
|
+
function insertBefore(parent, node, anchor) {
|
|
138
|
+
node._parent = parent;
|
|
139
|
+
if (anchor === null) {
|
|
140
|
+
parent.children.push(node);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const idx = parent.children.indexOf(anchor);
|
|
144
|
+
if (idx === -1) {
|
|
145
|
+
parent.children.push(node);
|
|
146
|
+
} else {
|
|
147
|
+
parent.children.splice(idx, 0, node);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function removeNode(node) {
|
|
151
|
+
if (node._parent) {
|
|
152
|
+
const idx = node._parent.children.indexOf(node);
|
|
153
|
+
if (idx !== -1) {
|
|
154
|
+
node._parent.children.splice(idx, 1);
|
|
155
|
+
}
|
|
156
|
+
node._parent = void 0;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function effect(fn) {
|
|
160
|
+
(0, import_utopia_core.untrack)(() => fn());
|
|
161
|
+
return () => {
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function createEffect(fn) {
|
|
165
|
+
return effect(fn);
|
|
166
|
+
}
|
|
167
|
+
function createIf(anchor, condition, renderTrue, renderFalse) {
|
|
168
|
+
const parent = anchor._parent;
|
|
169
|
+
if (!parent) return () => {
|
|
170
|
+
};
|
|
171
|
+
const truthy = !!(0, import_utopia_core.untrack)(condition);
|
|
172
|
+
if (truthy) {
|
|
173
|
+
const node = (0, import_utopia_core.untrack)(renderTrue);
|
|
174
|
+
insertBefore(parent, node, anchor);
|
|
175
|
+
} else if (renderFalse) {
|
|
176
|
+
const node = (0, import_utopia_core.untrack)(renderFalse);
|
|
177
|
+
insertBefore(parent, node, anchor);
|
|
178
|
+
}
|
|
179
|
+
return () => {
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function createFor(anchor, list, renderItem) {
|
|
183
|
+
const parent = anchor._parent;
|
|
184
|
+
if (!parent) return () => {
|
|
185
|
+
};
|
|
186
|
+
const items = (0, import_utopia_core.untrack)(list);
|
|
187
|
+
for (let i = 0; i < items.length; i++) {
|
|
188
|
+
const node = (0, import_utopia_core.untrack)(() => renderItem(items[i], i));
|
|
189
|
+
insertBefore(parent, node, anchor);
|
|
190
|
+
}
|
|
191
|
+
return () => {
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function createComponent(Component, props, children) {
|
|
195
|
+
const ctx = Component.setup ? (0, import_utopia_core.untrack)(() => Component.setup(props ?? {})) : {};
|
|
196
|
+
const renderCtx = {
|
|
197
|
+
...ctx,
|
|
198
|
+
$slots: children ?? {}
|
|
199
|
+
};
|
|
200
|
+
const el = (0, import_utopia_core.untrack)(() => Component.render(renderCtx));
|
|
201
|
+
if (Component.styles) {
|
|
202
|
+
collectedStyles.push(Component.styles);
|
|
203
|
+
}
|
|
204
|
+
return el;
|
|
205
|
+
}
|
|
206
|
+
function createComponentInstance(definition, props) {
|
|
207
|
+
return {
|
|
208
|
+
el: null,
|
|
209
|
+
props: props ?? {},
|
|
210
|
+
slots: {},
|
|
211
|
+
mount(_target) {
|
|
212
|
+
const ctx = definition.setup ? (0, import_utopia_core.untrack)(() => definition.setup(this.props)) : {};
|
|
213
|
+
const renderCtx = {
|
|
214
|
+
...ctx,
|
|
215
|
+
$slots: this.slots
|
|
216
|
+
};
|
|
217
|
+
this.el = (0, import_utopia_core.untrack)(() => definition.render(renderCtx));
|
|
218
|
+
if (definition.styles) {
|
|
219
|
+
collectedStyles.push(definition.styles);
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
unmount() {
|
|
223
|
+
this.el = null;
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function mount(component, _target) {
|
|
228
|
+
const instance = createComponentInstance(component);
|
|
229
|
+
instance.mount(null);
|
|
230
|
+
return instance;
|
|
231
|
+
}
|
|
232
|
+
function queueJob(_fn) {
|
|
233
|
+
}
|
|
234
|
+
function nextTick() {
|
|
235
|
+
return Promise.resolve();
|
|
236
|
+
}
|
|
237
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
238
|
+
0 && (module.exports = {
|
|
239
|
+
addEventListener,
|
|
240
|
+
appendChild,
|
|
241
|
+
batch,
|
|
242
|
+
computed,
|
|
243
|
+
createComment,
|
|
244
|
+
createComponent,
|
|
245
|
+
createComponentInstance,
|
|
246
|
+
createEffect,
|
|
247
|
+
createElement,
|
|
248
|
+
createFor,
|
|
249
|
+
createIf,
|
|
250
|
+
createTextNode,
|
|
251
|
+
effect,
|
|
252
|
+
flushStyles,
|
|
253
|
+
insertBefore,
|
|
254
|
+
mount,
|
|
255
|
+
nextTick,
|
|
256
|
+
queueJob,
|
|
257
|
+
removeNode,
|
|
258
|
+
setAttr,
|
|
259
|
+
setText,
|
|
260
|
+
signal,
|
|
261
|
+
untrack
|
|
262
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { batch, computed, signal, untrack } from '@matthesketh/utopia-core';
|
|
2
|
+
export { C as ComponentDefinition, d as addEventListener, e as appendChild, f as createComment, g as createComponent, h as createComponentInstance, i as createEffect, j as createElement, k as createFor, l as createIf, m as createTextNode, n as effect, o as flushStyles, p as insertBefore, q as mount, r as nextTick, s as queueJob, t as removeNode, u as setAttr, v as setText } from './ssr-runtime-DRHVHO7Q.cjs';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { batch, computed, signal, untrack } from '@matthesketh/utopia-core';
|
|
2
|
+
export { C as ComponentDefinition, d as addEventListener, e as appendChild, f as createComment, g as createComponent, h as createComponentInstance, i as createEffect, j as createElement, k as createFor, l as createIf, m as createTextNode, n as effect, o as flushStyles, p as insertBefore, q as mount, r as nextTick, s as queueJob, t as removeNode, u as setAttr, v as setText } from './ssr-runtime-DRHVHO7Q.js';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addEventListener,
|
|
3
|
+
appendChild,
|
|
4
|
+
batch,
|
|
5
|
+
computed,
|
|
6
|
+
createComment,
|
|
7
|
+
createComponent,
|
|
8
|
+
createComponentInstance,
|
|
9
|
+
createEffect,
|
|
10
|
+
createElement,
|
|
11
|
+
createFor,
|
|
12
|
+
createIf,
|
|
13
|
+
createTextNode,
|
|
14
|
+
effect,
|
|
15
|
+
flushStyles,
|
|
16
|
+
insertBefore,
|
|
17
|
+
mount,
|
|
18
|
+
nextTick,
|
|
19
|
+
queueJob,
|
|
20
|
+
removeNode,
|
|
21
|
+
setAttr,
|
|
22
|
+
setText,
|
|
23
|
+
signal,
|
|
24
|
+
untrack
|
|
25
|
+
} from "./chunk-DV7AV4JO.js";
|
|
26
|
+
export {
|
|
27
|
+
addEventListener,
|
|
28
|
+
appendChild,
|
|
29
|
+
batch,
|
|
30
|
+
computed,
|
|
31
|
+
createComment,
|
|
32
|
+
createComponent,
|
|
33
|
+
createComponentInstance,
|
|
34
|
+
createEffect,
|
|
35
|
+
createElement,
|
|
36
|
+
createFor,
|
|
37
|
+
createIf,
|
|
38
|
+
createTextNode,
|
|
39
|
+
effect,
|
|
40
|
+
flushStyles,
|
|
41
|
+
insertBefore,
|
|
42
|
+
mount,
|
|
43
|
+
nextTick,
|
|
44
|
+
queueJob,
|
|
45
|
+
removeNode,
|
|
46
|
+
setAttr,
|
|
47
|
+
setText,
|
|
48
|
+
signal,
|
|
49
|
+
untrack
|
|
50
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@matthesketh/utopia-server",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Server-side rendering for UtopiaJS",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Matt <matt@matthesketh.pro>",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/wrxck/utopiajs.git",
|
|
11
|
+
"directory": "packages/server"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/wrxck/utopiajs/tree/main/packages/server",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"ssr",
|
|
16
|
+
"server-side-rendering",
|
|
17
|
+
"streaming",
|
|
18
|
+
"hydration",
|
|
19
|
+
"utopiajs"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=20.0.0"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"main": "./dist/index.cjs",
|
|
29
|
+
"module": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"import": "./dist/index.js",
|
|
35
|
+
"require": "./dist/index.cjs"
|
|
36
|
+
},
|
|
37
|
+
"./ssr-runtime": {
|
|
38
|
+
"types": "./dist/ssr-runtime.d.ts",
|
|
39
|
+
"import": "./dist/ssr-runtime.js",
|
|
40
|
+
"require": "./dist/ssr-runtime.cjs"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist"
|
|
45
|
+
],
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@matthesketh/utopia-core": "0.0.1",
|
|
48
|
+
"@matthesketh/utopia-router": "0.0.1"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup src/index.ts src/ssr-runtime.ts --format esm,cjs --dts",
|
|
52
|
+
"dev": "tsup src/index.ts src/ssr-runtime.ts --format esm,cjs --dts --watch"
|
|
53
|
+
}
|
|
54
|
+
}
|