@highstate/designer 0.7.0 → 0.7.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/.output/nitro.json +3 -3
- package/.output/public/_nuxt/1_b4y8eQ.js +1 -0
- package/.output/public/_nuxt/BjOhMR1f.js +242 -0
- package/.output/public/_nuxt/CPAAHz3G.js +1 -0
- package/.output/public/_nuxt/{TC7QuZux.js → CmGpyJTe.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/d9ef4694-b71b-4675-9064-eba6ec8658b0.json +1 -0
- package/.output/public/_nuxt/{entry.DpeBhKHh.css → entry.Vs8IncyG.css} +1 -1
- package/.output/server/index.mjs +1876 -3051
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@babel/parser/lib/index.js +129 -97
- package/.output/server/node_modules/@babel/parser/package.json +2 -2
- package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/fetchRequestHandler.mjs +74 -0
- package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/index.mjs +1 -0
- package/.output/server/node_modules/@trpc/server/dist/adapters/node-http/incomingMessageToRequest.mjs +119 -0
- package/.output/server/node_modules/@trpc/server/dist/adapters/node-http/index.mjs +2 -0
- package/.output/server/node_modules/@trpc/server/dist/adapters/node-http/nodeHTTPRequestHandler.mjs +92 -0
- package/.output/server/node_modules/@trpc/server/dist/adapters/node-http/writeResponse.mjs +79 -0
- package/.output/server/node_modules/@trpc/server/dist/index.mjs +1 -1
- package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/middleware.mjs +1 -1
- package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/parser.mjs +4 -3
- package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/procedureBuilder.mjs +3 -0
- package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/router.mjs +1 -1
- package/.output/server/node_modules/@trpc/server/package.json +6 -6
- package/.output/server/node_modules/unhead/dist/plugins.mjs +94 -0
- package/.output/server/node_modules/unhead/dist/server.mjs +220 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.C13swrCa.mjs +48 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.Cp0iF6eN.mjs +177 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DZbvapt-.mjs +70 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DeCxexjU.mjs +166 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.Txd0XTIP.mjs +172 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
- package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
- package/.output/server/node_modules/unhead/package.json +66 -11
- package/.output/server/package.json +1 -1
- package/package.json +8 -8
- package/.output/public/_nuxt/B3Ns2-bM.js +0 -1
- package/.output/public/_nuxt/DToExo9V.js +0 -1
- package/.output/public/_nuxt/builds/meta/f64fe243-c5f1-4f5e-a593-05cf555884c2.json +0 -1
- package/.output/public/_nuxt/u3nCRAjk.js +0 -244
- package/.output/server/node_modules/@trpc/server/dist/http.mjs +0 -7
- package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import/http/contentTypeParsers.mjs +0 -12
- package/.output/server/node_modules/@unhead/dom/dist/index.mjs +0 -197
- package/.output/server/node_modules/@unhead/dom/package.json +0 -40
- package/.output/server/node_modules/@unhead/shared/dist/index.mjs +0 -641
- package/.output/server/node_modules/@unhead/shared/package.json +0 -45
- package/.output/server/node_modules/@unhead/ssr/dist/index.mjs +0 -95
- package/.output/server/node_modules/@unhead/ssr/package.json +0 -40
- package/.output/server/node_modules/node-mock-http/dist/_polyfill/buffer/node.mjs +0 -1
- package/.output/server/node_modules/node-mock-http/dist/_polyfill/events/node.mjs +0 -1
- package/.output/server/node_modules/node-mock-http/dist/index.mjs +0 -1
- package/.output/server/node_modules/node-mock-http/package.json +0 -63
- package/.output/server/node_modules/packrup/dist/index.mjs +0 -108
- package/.output/server/node_modules/packrup/package.json +0 -58
- package/.output/server/node_modules/unhead/dist/index.mjs +0 -748
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { getHTTPStatusCode, getHTTPStatusCodeFromError } from './unstable-core-do-not-import/http/getHTTPStatusCode.mjs';
|
|
2
|
-
export { parseConnectionParamsFromString, parseConnectionParamsFromUnknown } from './unstable-core-do-not-import/http/parseConnectionParams.mjs';
|
|
3
|
-
export { octetInputParser } from './unstable-core-do-not-import/http/contentTypeParsers.mjs';
|
|
4
|
-
export { resolveResponse } from './unstable-core-do-not-import/http/resolveResponse.mjs';
|
|
5
|
-
import './unstable-core-do-not-import/rootConfig.mjs';
|
|
6
|
-
import './vendor/unpromise/unpromise.mjs';
|
|
7
|
-
import './unstable-core-do-not-import/stream/utils/disposable.mjs';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const octetInputParser = {
|
|
2
|
-
_input: null,
|
|
3
|
-
_output: null,
|
|
4
|
-
parse (input) {
|
|
5
|
-
if (input instanceof ReadableStream) {
|
|
6
|
-
return input;
|
|
7
|
-
}
|
|
8
|
-
throw new Error(`Parsed input was expected to be a ReadableStream but was: ${typeof input}`);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export { octetInputParser };
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { HasElementTags, hashTag, normaliseProps, tagDedupeKey, defineHeadPlugin } from '@unhead/shared';
|
|
2
|
-
|
|
3
|
-
async function renderDOMHead(head, options = {}) {
|
|
4
|
-
const dom = options.document || head.resolvedOptions.document;
|
|
5
|
-
if (!dom || !head.dirty)
|
|
6
|
-
return;
|
|
7
|
-
const beforeRenderCtx = { shouldRender: true, tags: [] };
|
|
8
|
-
await head.hooks.callHook("dom:beforeRender", beforeRenderCtx);
|
|
9
|
-
if (!beforeRenderCtx.shouldRender)
|
|
10
|
-
return;
|
|
11
|
-
if (head._domUpdatePromise) {
|
|
12
|
-
return head._domUpdatePromise;
|
|
13
|
-
}
|
|
14
|
-
head._domUpdatePromise = new Promise(async (resolve) => {
|
|
15
|
-
const tags = (await head.resolveTags()).map((tag) => ({
|
|
16
|
-
tag,
|
|
17
|
-
id: HasElementTags.has(tag.tag) ? hashTag(tag) : tag.tag,
|
|
18
|
-
shouldRender: true
|
|
19
|
-
}));
|
|
20
|
-
let state = head._dom;
|
|
21
|
-
if (!state) {
|
|
22
|
-
state = {
|
|
23
|
-
elMap: { htmlAttrs: dom.documentElement, bodyAttrs: dom.body }
|
|
24
|
-
};
|
|
25
|
-
const takenDedupeKeys = /* @__PURE__ */ new Set();
|
|
26
|
-
for (const key of ["body", "head"]) {
|
|
27
|
-
const children = dom[key]?.children;
|
|
28
|
-
for (const c of children) {
|
|
29
|
-
const tag = c.tagName.toLowerCase();
|
|
30
|
-
if (!HasElementTags.has(tag)) {
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
const t = {
|
|
34
|
-
tag,
|
|
35
|
-
props: await normaliseProps(
|
|
36
|
-
c.getAttributeNames().reduce((props, name) => ({ ...props, [name]: c.getAttribute(name) }), {})
|
|
37
|
-
),
|
|
38
|
-
innerHTML: c.innerHTML
|
|
39
|
-
};
|
|
40
|
-
const dedupeKey = tagDedupeKey(t);
|
|
41
|
-
let d = dedupeKey;
|
|
42
|
-
let i = 1;
|
|
43
|
-
while (d && takenDedupeKeys.has(d))
|
|
44
|
-
d = `${dedupeKey}:${i++}`;
|
|
45
|
-
if (d) {
|
|
46
|
-
t._d = d;
|
|
47
|
-
takenDedupeKeys.add(d);
|
|
48
|
-
}
|
|
49
|
-
state.elMap[c.getAttribute("data-hid") || hashTag(t)] = c;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
state.pendingSideEffects = { ...state.sideEffects };
|
|
54
|
-
state.sideEffects = {};
|
|
55
|
-
function track(id, scope, fn) {
|
|
56
|
-
const k = `${id}:${scope}`;
|
|
57
|
-
state.sideEffects[k] = fn;
|
|
58
|
-
delete state.pendingSideEffects[k];
|
|
59
|
-
}
|
|
60
|
-
function trackCtx({ id, $el, tag }) {
|
|
61
|
-
const isAttrTag = tag.tag.endsWith("Attrs");
|
|
62
|
-
state.elMap[id] = $el;
|
|
63
|
-
if (!isAttrTag) {
|
|
64
|
-
if (tag.textContent && tag.textContent !== $el.textContent) {
|
|
65
|
-
$el.textContent = tag.textContent;
|
|
66
|
-
}
|
|
67
|
-
if (tag.innerHTML && tag.innerHTML !== $el.innerHTML) {
|
|
68
|
-
$el.innerHTML = tag.innerHTML;
|
|
69
|
-
}
|
|
70
|
-
track(id, "el", () => {
|
|
71
|
-
state.elMap[id]?.remove();
|
|
72
|
-
delete state.elMap[id];
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
if (tag._eventHandlers) {
|
|
76
|
-
for (const k in tag._eventHandlers) {
|
|
77
|
-
if (!Object.prototype.hasOwnProperty.call(tag._eventHandlers, k)) {
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
if ($el.getAttribute(`data-${k}`) !== "") {
|
|
81
|
-
(tag.tag === "bodyAttrs" ? dom.defaultView : $el).addEventListener(
|
|
82
|
-
// onload -> load
|
|
83
|
-
k.substring(2),
|
|
84
|
-
tag._eventHandlers[k].bind($el)
|
|
85
|
-
);
|
|
86
|
-
$el.setAttribute(`data-${k}`, "");
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
for (const k in tag.props) {
|
|
91
|
-
if (!Object.prototype.hasOwnProperty.call(tag.props, k)) {
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
const value = tag.props[k];
|
|
95
|
-
const ck = `attr:${k}`;
|
|
96
|
-
if (k === "class") {
|
|
97
|
-
if (!value) {
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
for (const c of value.split(" ")) {
|
|
101
|
-
isAttrTag && track(id, `${ck}:${c}`, () => $el.classList.remove(c));
|
|
102
|
-
!$el.classList.contains(c) && $el.classList.add(c);
|
|
103
|
-
}
|
|
104
|
-
} else if (k === "style") {
|
|
105
|
-
if (!value) {
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
for (const c of value.split(";")) {
|
|
109
|
-
const propIndex = c.indexOf(":");
|
|
110
|
-
const k2 = c.substring(0, propIndex).trim();
|
|
111
|
-
const v = c.substring(propIndex + 1).trim();
|
|
112
|
-
track(id, `${ck}:${k2}`, () => {
|
|
113
|
-
$el.style.removeProperty(k2);
|
|
114
|
-
});
|
|
115
|
-
$el.style.setProperty(k2, v);
|
|
116
|
-
}
|
|
117
|
-
} else {
|
|
118
|
-
$el.getAttribute(k) !== value && $el.setAttribute(k, value === true ? "" : String(value));
|
|
119
|
-
isAttrTag && track(id, ck, () => $el.removeAttribute(k));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
const pending = [];
|
|
124
|
-
const frag = {
|
|
125
|
-
bodyClose: void 0,
|
|
126
|
-
bodyOpen: void 0,
|
|
127
|
-
head: void 0
|
|
128
|
-
};
|
|
129
|
-
for (const ctx of tags) {
|
|
130
|
-
const { tag, shouldRender, id } = ctx;
|
|
131
|
-
if (!shouldRender)
|
|
132
|
-
continue;
|
|
133
|
-
if (tag.tag === "title") {
|
|
134
|
-
dom.title = tag.textContent;
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
ctx.$el = ctx.$el || state.elMap[id];
|
|
138
|
-
if (ctx.$el) {
|
|
139
|
-
trackCtx(ctx);
|
|
140
|
-
} else if (HasElementTags.has(tag.tag)) {
|
|
141
|
-
pending.push(ctx);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
for (const ctx of pending) {
|
|
145
|
-
const pos = ctx.tag.tagPosition || "head";
|
|
146
|
-
ctx.$el = dom.createElement(ctx.tag.tag);
|
|
147
|
-
trackCtx(ctx);
|
|
148
|
-
frag[pos] = frag[pos] || dom.createDocumentFragment();
|
|
149
|
-
frag[pos].appendChild(ctx.$el);
|
|
150
|
-
}
|
|
151
|
-
for (const ctx of tags)
|
|
152
|
-
await head.hooks.callHook("dom:renderTag", ctx, dom, track);
|
|
153
|
-
frag.head && dom.head.appendChild(frag.head);
|
|
154
|
-
frag.bodyOpen && dom.body.insertBefore(frag.bodyOpen, dom.body.firstChild);
|
|
155
|
-
frag.bodyClose && dom.body.appendChild(frag.bodyClose);
|
|
156
|
-
for (const k in state.pendingSideEffects) {
|
|
157
|
-
state.pendingSideEffects[k]();
|
|
158
|
-
}
|
|
159
|
-
head._dom = state;
|
|
160
|
-
await head.hooks.callHook("dom:rendered", { renders: tags });
|
|
161
|
-
resolve();
|
|
162
|
-
}).finally(() => {
|
|
163
|
-
head._domUpdatePromise = void 0;
|
|
164
|
-
head.dirty = false;
|
|
165
|
-
});
|
|
166
|
-
return head._domUpdatePromise;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function debouncedRenderDOMHead(head, options = {}) {
|
|
170
|
-
const fn = options.delayFn || ((fn2) => setTimeout(fn2, 10));
|
|
171
|
-
return head._domDebouncedUpdatePromise = head._domDebouncedUpdatePromise || new Promise((resolve) => fn(() => {
|
|
172
|
-
return renderDOMHead(head, options).then(() => {
|
|
173
|
-
delete head._domDebouncedUpdatePromise;
|
|
174
|
-
resolve();
|
|
175
|
-
});
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// @__NO_SIDE_EFFECTS__
|
|
180
|
-
function DomPlugin(options) {
|
|
181
|
-
return defineHeadPlugin((head) => {
|
|
182
|
-
const initialPayload = head.resolvedOptions.document?.head.querySelector('script[id="unhead:payload"]')?.innerHTML || false;
|
|
183
|
-
if (initialPayload) {
|
|
184
|
-
head.push(JSON.parse(initialPayload));
|
|
185
|
-
}
|
|
186
|
-
return {
|
|
187
|
-
mode: "client",
|
|
188
|
-
hooks: {
|
|
189
|
-
"entries:updated": (head2) => {
|
|
190
|
-
debouncedRenderDOMHead(head2, options);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export { DomPlugin, debouncedRenderDOMHead, renderDOMHead };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@unhead/dom",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "1.11.19",
|
|
5
|
-
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"funding": "https://github.com/sponsors/harlan-zw",
|
|
8
|
-
"homepage": "https://unhead.unjs.io",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/unjs/unhead.git",
|
|
12
|
-
"directory": "packages/dom"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/unjs/unhead/issues"
|
|
16
|
-
},
|
|
17
|
-
"sideEffects": false,
|
|
18
|
-
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"types": "./dist/index.d.ts",
|
|
21
|
-
"import": "./dist/index.mjs",
|
|
22
|
-
"require": "./dist/index.cjs"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"main": "dist/index.cjs",
|
|
26
|
-
"module": "dist/index.mjs",
|
|
27
|
-
"types": "dist/index.d.ts",
|
|
28
|
-
"files": [
|
|
29
|
-
"dist"
|
|
30
|
-
],
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@unhead/schema": "1.11.19",
|
|
33
|
-
"@unhead/shared": "1.11.19"
|
|
34
|
-
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"build": "unbuild .",
|
|
37
|
-
"stub": "unbuild . --stub",
|
|
38
|
-
"export:sizes": "npx export-size . -r"
|
|
39
|
-
}
|
|
40
|
-
}
|