@valbuild/shared 0.150.18 → 0.150.20
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/CHANGELOG.md +10 -0
- package/client/dist/valbuild-shared-client.cjs.dev.js +2 -1
- package/client/dist/valbuild-shared-client.cjs.prod.js +2 -1
- package/client/dist/valbuild-shared-client.esm.js +1 -1
- package/dist/declarations/src/internal/quickPreview.d.ts +17 -1
- package/dist/{getSitemapTree-98642b57.cjs.dev.js → getSitemapTree-6dfa2f4e.cjs.dev.js} +19 -1
- package/dist/{getSitemapTree-97713490.cjs.prod.js → getSitemapTree-8a04f3cf.cjs.prod.js} +19 -1
- package/dist/{getSitemapTree-7c848c94.esm.js → getSitemapTree-fef55872.esm.js} +19 -2
- package/internal/dist/valbuild-shared-internal.cjs.dev.js +2 -1
- package/internal/dist/valbuild-shared-internal.cjs.prod.js +2 -1
- package/internal/dist/valbuild-shared-internal.esm.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @valbuild/shared
|
|
2
2
|
|
|
3
|
+
## 0.150.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#998](https://github.com/valbuild/val/pull/998) [`c597b3b`](https://github.com/valbuild/val/commit/c597b3bcb9f3bbda285ab6f4977d65ed7f5f161d) Thanks [@freekh](https://github.com/freekh)! - **A quick preview now shows layout changes, not only text.** A quick preview loads the proposal's new code into a page the last build rendered on the server. React kept that page's markup wherever only attributes differed, so a change to classes (a layout made horizontal, a gap, a colour already in the site's styles) showed nothing, while a change to text did. The page is now rendered from the new code instead.
|
|
8
|
+
|
|
9
|
+
The design tab's assistant no longer offers `screenshot_page`, whose picture never came back from the page. `read_page` gives it the computed styles, sizes and positions it was for.
|
|
10
|
+
|
|
11
|
+
The assistant builds a proposal far less often. A quick preview shows components, layout, styles, text and content. It builds only for what a quick preview can't show, such as an added or renamed route, code that runs on the server, a schema or dependencies, and otherwise once, when a request is finished.
|
|
12
|
+
|
|
3
13
|
## 0.150.18
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var getSitemapTree = require('../../dist/getSitemapTree-
|
|
5
|
+
var getSitemapTree = require('../../dist/getSitemapTree-6dfa2f4e.cjs.dev.js');
|
|
6
6
|
require('../../dist/createForOfIteratorHelper-f2d7ac6d.cjs.dev.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
8
|
|
|
@@ -11,6 +11,7 @@ require('@valbuild/core');
|
|
|
11
11
|
exports.DEFAULT_CANVAS_SELECTION = getSitemapTree.DEFAULT_CANVAS_SELECTION;
|
|
12
12
|
exports.DEFAULT_CANVAS_SELECTION_SOFT = getSitemapTree.DEFAULT_CANVAS_SELECTION_SOFT;
|
|
13
13
|
exports.QUICK_PREVIEW_PARAM = getSitemapTree.QUICK_PREVIEW_PARAM;
|
|
14
|
+
exports.QUICK_PREVIEW_RENDER_SCRIPT = getSitemapTree.QUICK_PREVIEW_RENDER_SCRIPT;
|
|
14
15
|
exports.QUICK_PREVIEW_SERVICE_WORKER_PATH = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_PATH;
|
|
15
16
|
exports.QUICK_PREVIEW_SERVICE_WORKER_SOURCE = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_SOURCE;
|
|
16
17
|
exports.QUICK_PREVIEW_STORE_MESSAGE = getSitemapTree.QUICK_PREVIEW_STORE_MESSAGE;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var getSitemapTree = require('../../dist/getSitemapTree-
|
|
5
|
+
var getSitemapTree = require('../../dist/getSitemapTree-8a04f3cf.cjs.prod.js');
|
|
6
6
|
require('../../dist/createForOfIteratorHelper-9ca2078d.cjs.prod.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
8
|
|
|
@@ -11,6 +11,7 @@ require('@valbuild/core');
|
|
|
11
11
|
exports.DEFAULT_CANVAS_SELECTION = getSitemapTree.DEFAULT_CANVAS_SELECTION;
|
|
12
12
|
exports.DEFAULT_CANVAS_SELECTION_SOFT = getSitemapTree.DEFAULT_CANVAS_SELECTION_SOFT;
|
|
13
13
|
exports.QUICK_PREVIEW_PARAM = getSitemapTree.QUICK_PREVIEW_PARAM;
|
|
14
|
+
exports.QUICK_PREVIEW_RENDER_SCRIPT = getSitemapTree.QUICK_PREVIEW_RENDER_SCRIPT;
|
|
14
15
|
exports.QUICK_PREVIEW_SERVICE_WORKER_PATH = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_PATH;
|
|
15
16
|
exports.QUICK_PREVIEW_SERVICE_WORKER_SOURCE = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_SOURCE;
|
|
16
17
|
exports.QUICK_PREVIEW_STORE_MESSAGE = getSitemapTree.QUICK_PREVIEW_STORE_MESSAGE;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DEFAULT_CANVAS_SELECTION, e as DEFAULT_CANVAS_SELECTION_SOFT, Q as QUICK_PREVIEW_PARAM, u as QUICK_PREVIEW_SERVICE_WORKER_PATH,
|
|
1
|
+
export { D as DEFAULT_CANVAS_SELECTION, e as DEFAULT_CANVAS_SELECTION_SOFT, Q as QUICK_PREVIEW_PARAM, v as QUICK_PREVIEW_RENDER_SCRIPT, u as QUICK_PREVIEW_SERVICE_WORKER_PATH, z as QUICK_PREVIEW_SERVICE_WORKER_SOURCE, x as QUICK_PREVIEW_STORE_MESSAGE, b as VAL_AI_SESSION_STORAGE_KEY, d as VAL_CANVAS_MESSAGE, c as VAL_CANVAS_PARAM, V as VAL_CONFIG_SESSION_STORAGE_KEY, a as VAL_THEME_SESSION_STORAGE_KEY, j as attachElementPicker, k as createPickerOverlay, h as describeElement, l as elementLabel, q as findBySelector, G as formatRoutePattern, H as getNextAppRouterSourceFolder, L as getPageRouterSitemapTree, J as getPageRouterSourceFolder, M as getPatternFromModuleFilePath, I as getTanStackRouterSourceFolder, E as isDesignTabOrigin, y as isQuickPreviewFiles, K as isTanStackRoutesFolder, g as isValCanvasFrame, i as isValCanvasPageMessage, f as isValCanvasStudioMessage, m as modifierLabel, p as pageLocationOf, F as parseRoutePattern, C as quickPreviewSiteOrigin, o as readPageSnapshot, r as restoreScroll, t as screenshotPage, s as startElementPicking, A as storeQuickPreview, n as watchPageLocation, B as withQuickPreviewParam, w as withValCanvasParam } from '../../dist/getSitemapTree-fef55872.esm.js';
|
|
2
2
|
import '../../dist/createForOfIteratorHelper-9b80f1a2.esm.js';
|
|
3
3
|
import '@valbuild/core';
|
|
@@ -20,6 +20,14 @@
|
|
|
20
20
|
* document's `/_app/` requests from the files, and everything else from
|
|
21
21
|
* the network: the HTML is the last build's, rendered by its server, and
|
|
22
22
|
* the new code takes it over in the browser.
|
|
23
|
+
* 4. It takes it over by RENDERING it, not by hydrating it. Hydration keeps
|
|
24
|
+
* the markup the server sent wherever only an attribute differs -- React
|
|
25
|
+
* mends text, never a `className` -- so a change to classes and props,
|
|
26
|
+
* which is most of what the design tab changes, hydrated into the old
|
|
27
|
+
* page and showed nothing. The worker adds a script to the end of that
|
|
28
|
+
* document's `<body>` ({@link QUICK_PREVIEW_RENDER_SCRIPT}) that takes the
|
|
29
|
+
* server's markup out before the app's scripts run, so hydration finds
|
|
30
|
+
* nothing to keep and React renders the page with the new code.
|
|
23
31
|
*
|
|
24
32
|
* What it cannot show, and the tab says so: anything on the server. Server
|
|
25
33
|
* functions, API routes and loaders that run there are the last build's, as
|
|
@@ -34,6 +42,14 @@
|
|
|
34
42
|
export declare const QUICK_PREVIEW_PARAM = "val_quick";
|
|
35
43
|
/** Where Val's API serves the worker: under `/api/val`. */
|
|
36
44
|
export declare const QUICK_PREVIEW_SERVICE_WORKER_PATH = "/quick-preview-sw.js";
|
|
45
|
+
/**
|
|
46
|
+
* What a quick preview's document runs before the app's scripts: the
|
|
47
|
+
* server's markup out of `<body>`, every script left where it is -- the
|
|
48
|
+
* router's dehydrated state and the app's entry are among them. Hydration
|
|
49
|
+
* then finds the body empty and React renders the page, with the new code's
|
|
50
|
+
* attributes and classes, where it would have kept the old ones.
|
|
51
|
+
*/
|
|
52
|
+
export declare const QUICK_PREVIEW_RENDER_SCRIPT: string;
|
|
37
53
|
/** What the page sends the worker to store a preview's files. */
|
|
38
54
|
export declare const QUICK_PREVIEW_STORE_MESSAGE = "val-quick-preview-store";
|
|
39
55
|
/**
|
|
@@ -54,7 +70,7 @@ export declare function isQuickPreviewFiles(value: unknown): value is QuickPrevi
|
|
|
54
70
|
* The worker, as the source it is served as: plain, and small, because it is
|
|
55
71
|
* served as a file of its own (`demoServiceWorker.ts` is the same).
|
|
56
72
|
*/
|
|
57
|
-
export declare const QUICK_PREVIEW_SERVICE_WORKER_SOURCE
|
|
73
|
+
export declare const QUICK_PREVIEW_SERVICE_WORKER_SOURCE: string;
|
|
58
74
|
/**
|
|
59
75
|
* Store a preview's files in the worker, registering it first: what the
|
|
60
76
|
* bridge does when the tab sends `quickPreview`. `swUrl` is the worker's
|
|
@@ -47,6 +47,14 @@ var VAL_AI_SESSION_STORAGE_KEY = "val-ai-session";
|
|
|
47
47
|
* document's `/_app/` requests from the files, and everything else from
|
|
48
48
|
* the network: the HTML is the last build's, rendered by its server, and
|
|
49
49
|
* the new code takes it over in the browser.
|
|
50
|
+
* 4. It takes it over by RENDERING it, not by hydrating it. Hydration keeps
|
|
51
|
+
* the markup the server sent wherever only an attribute differs -- React
|
|
52
|
+
* mends text, never a `className` -- so a change to classes and props,
|
|
53
|
+
* which is most of what the design tab changes, hydrated into the old
|
|
54
|
+
* page and showed nothing. The worker adds a script to the end of that
|
|
55
|
+
* document's `<body>` ({@link QUICK_PREVIEW_RENDER_SCRIPT}) that takes the
|
|
56
|
+
* server's markup out before the app's scripts run, so hydration finds
|
|
57
|
+
* nothing to keep and React renders the page with the new code.
|
|
50
58
|
*
|
|
51
59
|
* What it cannot show, and the tab says so: anything on the server. Server
|
|
52
60
|
* functions, API routes and loaders that run there are the last build's, as
|
|
@@ -64,6 +72,15 @@ var QUICK_PREVIEW_PARAM = "val_quick";
|
|
|
64
72
|
/** Where Val's API serves the worker: under `/api/val`. */
|
|
65
73
|
var QUICK_PREVIEW_SERVICE_WORKER_PATH = "/quick-preview-sw.js";
|
|
66
74
|
|
|
75
|
+
/**
|
|
76
|
+
* What a quick preview's document runs before the app's scripts: the
|
|
77
|
+
* server's markup out of `<body>`, every script left where it is -- the
|
|
78
|
+
* router's dehydrated state and the app's entry are among them. Hydration
|
|
79
|
+
* then finds the body empty and React renders the page, with the new code's
|
|
80
|
+
* attributes and classes, where it would have kept the old ones.
|
|
81
|
+
*/
|
|
82
|
+
var QUICK_PREVIEW_RENDER_SCRIPT = "<script>(function(){var b=document.body;if(!b)return;" + "Array.prototype.slice.call(b.childNodes).forEach(function(n){" + 'if(n.nodeName!=="SCRIPT")b.removeChild(n)})})()</script>';
|
|
83
|
+
|
|
67
84
|
/** What the page sends the worker to store a preview's files. */
|
|
68
85
|
var QUICK_PREVIEW_STORE_MESSAGE = "val-quick-preview-store";
|
|
69
86
|
|
|
@@ -90,7 +107,7 @@ function isQuickPreviewFiles(value) {
|
|
|
90
107
|
* The worker, as the source it is served as: plain, and small, because it is
|
|
91
108
|
* served as a file of its own (`demoServiceWorker.ts` is the same).
|
|
92
109
|
*/
|
|
93
|
-
var QUICK_PREVIEW_SERVICE_WORKER_SOURCE = "\n\"use strict\";\nconst PARAM = \"".concat(QUICK_PREVIEW_PARAM, "\";\nconst CACHE = \"val-quick-preview\";\nconst PREFIX = \"/__val_quick/\";\nconst INDEX = PREFIX + \"index\";\nconst KEEP = 4;\n\nself.addEventListener(\"install\", () => self.skipWaiting());\nself.addEventListener(\"activate\", (event) => {\n event.waitUntil(self.clients.claim());\n});\n\nself.addEventListener(\"message\", (event) => {\n const data = event.data;\n if (!data || data.type !== \"").concat(QUICK_PREVIEW_STORE_MESSAGE, "\") return;\n const port = event.ports && event.ports[0];\n event.waitUntil(\n store(data.id, data.files).then(\n () => port && port.postMessage({ ok: true }),\n (error) =>\n port &&\n port.postMessage({\n ok: false,\n message: String((error && error.message) || error),\n }),\n ),\n );\n});\n\nfunction keyOf(id, path) {\n return PREFIX + id + \"/\" + path;\n}\n\nasync function store(id, files) {\n const cache = await caches.open(CACHE);\n for (const path of Object.keys(files)) {\n const file = files[path];\n const body = file.base64\n ? Uint8Array.from(atob(file.body), (c) => c.charCodeAt(0))\n : file.body;\n await cache.put(\n keyOf(id, path),\n new Response(body, {\n headers: { \"Content-Type\": file.contentType, \"Cache-Control\": \"no-store\" },\n }),\n );\n }\n // The newest few previews are kept; older ones are deleted.\n const index = await cache.match(INDEX);\n const ids = [id].concat(\n (index ? await index.json() : []).filter((other) => other !== id),\n );\n const dropped = ids.slice(KEEP);\n if (dropped.length > 0) {\n for (const request of await cache.keys()) {\n const path = new URL(request.url).pathname;\n if (dropped.some((old) => path.startsWith(PREFIX + old + \"/\"))) {\n await cache.delete(request);\n }\n }\n }\n await cache.put(INDEX, new Response(JSON.stringify(ids.slice(0, KEEP))));\n}\n\n/** Which preview a document is: by its id, or by the address it was opened at. */\nconst byClient = new Map();\nasync function previewOf(clientId) {\n if (!clientId) return null;\n if (byClient.has(clientId)) return byClient.get(clientId);\n const client = await self.clients.get(clientId);\n const id = client ? new URL(client.url).searchParams.get(PARAM) : null;\n byClient.set(clientId, id);\n return id;\n}\n\nself.addEventListener(\"fetch\", (event) => {\n const url = new URL(event.request.url);\n if (url.origin !== self.location.origin) return;\n if (event.request.mode === \"navigate\") {\n if (event.resultingClientId)
|
|
110
|
+
var QUICK_PREVIEW_SERVICE_WORKER_SOURCE = "\n\"use strict\";\nconst PARAM = \"".concat(QUICK_PREVIEW_PARAM, "\";\nconst RENDER = ").concat(JSON.stringify(QUICK_PREVIEW_RENDER_SCRIPT), ";\nconst CACHE = \"val-quick-preview\";\nconst PREFIX = \"/__val_quick/\";\nconst INDEX = PREFIX + \"index\";\nconst KEEP = 4;\n\nself.addEventListener(\"install\", () => self.skipWaiting());\nself.addEventListener(\"activate\", (event) => {\n event.waitUntil(self.clients.claim());\n});\n\nself.addEventListener(\"message\", (event) => {\n const data = event.data;\n if (!data || data.type !== \"").concat(QUICK_PREVIEW_STORE_MESSAGE, "\") return;\n const port = event.ports && event.ports[0];\n event.waitUntil(\n store(data.id, data.files).then(\n () => port && port.postMessage({ ok: true }),\n (error) =>\n port &&\n port.postMessage({\n ok: false,\n message: String((error && error.message) || error),\n }),\n ),\n );\n});\n\nfunction keyOf(id, path) {\n return PREFIX + id + \"/\" + path;\n}\n\nasync function store(id, files) {\n const cache = await caches.open(CACHE);\n for (const path of Object.keys(files)) {\n const file = files[path];\n const body = file.base64\n ? Uint8Array.from(atob(file.body), (c) => c.charCodeAt(0))\n : file.body;\n await cache.put(\n keyOf(id, path),\n new Response(body, {\n headers: { \"Content-Type\": file.contentType, \"Cache-Control\": \"no-store\" },\n }),\n );\n }\n // The newest few previews are kept; older ones are deleted.\n const index = await cache.match(INDEX);\n const ids = [id].concat(\n (index ? await index.json() : []).filter((other) => other !== id),\n );\n const dropped = ids.slice(KEEP);\n if (dropped.length > 0) {\n for (const request of await cache.keys()) {\n const path = new URL(request.url).pathname;\n if (dropped.some((old) => path.startsWith(PREFIX + old + \"/\"))) {\n await cache.delete(request);\n }\n }\n }\n await cache.put(INDEX, new Response(JSON.stringify(ids.slice(0, KEEP))));\n}\n\n/** Which preview a document is: by its id, or by the address it was opened at. */\nconst byClient = new Map();\nasync function previewOf(clientId) {\n if (!clientId) return null;\n if (byClient.has(clientId)) return byClient.get(clientId);\n const client = await self.clients.get(clientId);\n const id = client ? new URL(client.url).searchParams.get(PARAM) : null;\n byClient.set(clientId, id);\n return id;\n}\n\nself.addEventListener(\"fetch\", (event) => {\n const url = new URL(event.request.url);\n if (url.origin !== self.location.origin) return;\n if (event.request.mode === \"navigate\") {\n const id = url.searchParams.get(PARAM);\n if (event.resultingClientId) byClient.set(event.resultingClientId, id);\n if (id) event.respondWith(rendered(event.request));\n return;\n }\n if (!url.pathname.startsWith(\"/_app/\")) return;\n event.respondWith(serve(event, url));\n});\n\n/** A quick preview's document, with the script that has it rendered, not hydrated. */\nasync function rendered(request) {\n const response = await fetch(request);\n const type = response.headers.get(\"Content-Type\") || \"\";\n if (!response.ok || !type.includes(\"text/html\")) return response;\n const html = await response.text();\n const at = html.lastIndexOf(\"</body>\");\n if (at === -1) return new Response(html, response);\n const headers = new Headers(response.headers);\n headers.delete(\"Content-Length\");\n headers.delete(\"Content-Encoding\");\n return new Response(html.slice(0, at) + RENDER + html.slice(at), {\n status: response.status,\n statusText: response.statusText,\n headers,\n });\n}\n\nasync function serve(event, url) {\n const id = await previewOf(event.clientId);\n if (id) {\n const hit = await caches.match(keyOf(id, url.pathname.slice(6)), {\n cacheName: CACHE,\n });\n if (hit) return hit;\n }\n return fetch(event.request);\n}\n");
|
|
94
111
|
|
|
95
112
|
/** How long the worker is given to install and store a preview. */
|
|
96
113
|
var STORE_TIMEOUT_MS = 30000;
|
|
@@ -1536,6 +1553,7 @@ function getPatternFromModuleFilePath(moduleFilePath, srcFolder) {
|
|
|
1536
1553
|
exports.DEFAULT_CANVAS_SELECTION = DEFAULT_CANVAS_SELECTION;
|
|
1537
1554
|
exports.DEFAULT_CANVAS_SELECTION_SOFT = DEFAULT_CANVAS_SELECTION_SOFT;
|
|
1538
1555
|
exports.QUICK_PREVIEW_PARAM = QUICK_PREVIEW_PARAM;
|
|
1556
|
+
exports.QUICK_PREVIEW_RENDER_SCRIPT = QUICK_PREVIEW_RENDER_SCRIPT;
|
|
1539
1557
|
exports.QUICK_PREVIEW_SERVICE_WORKER_PATH = QUICK_PREVIEW_SERVICE_WORKER_PATH;
|
|
1540
1558
|
exports.QUICK_PREVIEW_SERVICE_WORKER_SOURCE = QUICK_PREVIEW_SERVICE_WORKER_SOURCE;
|
|
1541
1559
|
exports.QUICK_PREVIEW_STORE_MESSAGE = QUICK_PREVIEW_STORE_MESSAGE;
|
|
@@ -47,6 +47,14 @@ var VAL_AI_SESSION_STORAGE_KEY = "val-ai-session";
|
|
|
47
47
|
* document's `/_app/` requests from the files, and everything else from
|
|
48
48
|
* the network: the HTML is the last build's, rendered by its server, and
|
|
49
49
|
* the new code takes it over in the browser.
|
|
50
|
+
* 4. It takes it over by RENDERING it, not by hydrating it. Hydration keeps
|
|
51
|
+
* the markup the server sent wherever only an attribute differs -- React
|
|
52
|
+
* mends text, never a `className` -- so a change to classes and props,
|
|
53
|
+
* which is most of what the design tab changes, hydrated into the old
|
|
54
|
+
* page and showed nothing. The worker adds a script to the end of that
|
|
55
|
+
* document's `<body>` ({@link QUICK_PREVIEW_RENDER_SCRIPT}) that takes the
|
|
56
|
+
* server's markup out before the app's scripts run, so hydration finds
|
|
57
|
+
* nothing to keep and React renders the page with the new code.
|
|
50
58
|
*
|
|
51
59
|
* What it cannot show, and the tab says so: anything on the server. Server
|
|
52
60
|
* functions, API routes and loaders that run there are the last build's, as
|
|
@@ -64,6 +72,15 @@ var QUICK_PREVIEW_PARAM = "val_quick";
|
|
|
64
72
|
/** Where Val's API serves the worker: under `/api/val`. */
|
|
65
73
|
var QUICK_PREVIEW_SERVICE_WORKER_PATH = "/quick-preview-sw.js";
|
|
66
74
|
|
|
75
|
+
/**
|
|
76
|
+
* What a quick preview's document runs before the app's scripts: the
|
|
77
|
+
* server's markup out of `<body>`, every script left where it is -- the
|
|
78
|
+
* router's dehydrated state and the app's entry are among them. Hydration
|
|
79
|
+
* then finds the body empty and React renders the page, with the new code's
|
|
80
|
+
* attributes and classes, where it would have kept the old ones.
|
|
81
|
+
*/
|
|
82
|
+
var QUICK_PREVIEW_RENDER_SCRIPT = "<script>(function(){var b=document.body;if(!b)return;" + "Array.prototype.slice.call(b.childNodes).forEach(function(n){" + 'if(n.nodeName!=="SCRIPT")b.removeChild(n)})})()</script>';
|
|
83
|
+
|
|
67
84
|
/** What the page sends the worker to store a preview's files. */
|
|
68
85
|
var QUICK_PREVIEW_STORE_MESSAGE = "val-quick-preview-store";
|
|
69
86
|
|
|
@@ -90,7 +107,7 @@ function isQuickPreviewFiles(value) {
|
|
|
90
107
|
* The worker, as the source it is served as: plain, and small, because it is
|
|
91
108
|
* served as a file of its own (`demoServiceWorker.ts` is the same).
|
|
92
109
|
*/
|
|
93
|
-
var QUICK_PREVIEW_SERVICE_WORKER_SOURCE = "\n\"use strict\";\nconst PARAM = \"".concat(QUICK_PREVIEW_PARAM, "\";\nconst CACHE = \"val-quick-preview\";\nconst PREFIX = \"/__val_quick/\";\nconst INDEX = PREFIX + \"index\";\nconst KEEP = 4;\n\nself.addEventListener(\"install\", () => self.skipWaiting());\nself.addEventListener(\"activate\", (event) => {\n event.waitUntil(self.clients.claim());\n});\n\nself.addEventListener(\"message\", (event) => {\n const data = event.data;\n if (!data || data.type !== \"").concat(QUICK_PREVIEW_STORE_MESSAGE, "\") return;\n const port = event.ports && event.ports[0];\n event.waitUntil(\n store(data.id, data.files).then(\n () => port && port.postMessage({ ok: true }),\n (error) =>\n port &&\n port.postMessage({\n ok: false,\n message: String((error && error.message) || error),\n }),\n ),\n );\n});\n\nfunction keyOf(id, path) {\n return PREFIX + id + \"/\" + path;\n}\n\nasync function store(id, files) {\n const cache = await caches.open(CACHE);\n for (const path of Object.keys(files)) {\n const file = files[path];\n const body = file.base64\n ? Uint8Array.from(atob(file.body), (c) => c.charCodeAt(0))\n : file.body;\n await cache.put(\n keyOf(id, path),\n new Response(body, {\n headers: { \"Content-Type\": file.contentType, \"Cache-Control\": \"no-store\" },\n }),\n );\n }\n // The newest few previews are kept; older ones are deleted.\n const index = await cache.match(INDEX);\n const ids = [id].concat(\n (index ? await index.json() : []).filter((other) => other !== id),\n );\n const dropped = ids.slice(KEEP);\n if (dropped.length > 0) {\n for (const request of await cache.keys()) {\n const path = new URL(request.url).pathname;\n if (dropped.some((old) => path.startsWith(PREFIX + old + \"/\"))) {\n await cache.delete(request);\n }\n }\n }\n await cache.put(INDEX, new Response(JSON.stringify(ids.slice(0, KEEP))));\n}\n\n/** Which preview a document is: by its id, or by the address it was opened at. */\nconst byClient = new Map();\nasync function previewOf(clientId) {\n if (!clientId) return null;\n if (byClient.has(clientId)) return byClient.get(clientId);\n const client = await self.clients.get(clientId);\n const id = client ? new URL(client.url).searchParams.get(PARAM) : null;\n byClient.set(clientId, id);\n return id;\n}\n\nself.addEventListener(\"fetch\", (event) => {\n const url = new URL(event.request.url);\n if (url.origin !== self.location.origin) return;\n if (event.request.mode === \"navigate\") {\n if (event.resultingClientId)
|
|
110
|
+
var QUICK_PREVIEW_SERVICE_WORKER_SOURCE = "\n\"use strict\";\nconst PARAM = \"".concat(QUICK_PREVIEW_PARAM, "\";\nconst RENDER = ").concat(JSON.stringify(QUICK_PREVIEW_RENDER_SCRIPT), ";\nconst CACHE = \"val-quick-preview\";\nconst PREFIX = \"/__val_quick/\";\nconst INDEX = PREFIX + \"index\";\nconst KEEP = 4;\n\nself.addEventListener(\"install\", () => self.skipWaiting());\nself.addEventListener(\"activate\", (event) => {\n event.waitUntil(self.clients.claim());\n});\n\nself.addEventListener(\"message\", (event) => {\n const data = event.data;\n if (!data || data.type !== \"").concat(QUICK_PREVIEW_STORE_MESSAGE, "\") return;\n const port = event.ports && event.ports[0];\n event.waitUntil(\n store(data.id, data.files).then(\n () => port && port.postMessage({ ok: true }),\n (error) =>\n port &&\n port.postMessage({\n ok: false,\n message: String((error && error.message) || error),\n }),\n ),\n );\n});\n\nfunction keyOf(id, path) {\n return PREFIX + id + \"/\" + path;\n}\n\nasync function store(id, files) {\n const cache = await caches.open(CACHE);\n for (const path of Object.keys(files)) {\n const file = files[path];\n const body = file.base64\n ? Uint8Array.from(atob(file.body), (c) => c.charCodeAt(0))\n : file.body;\n await cache.put(\n keyOf(id, path),\n new Response(body, {\n headers: { \"Content-Type\": file.contentType, \"Cache-Control\": \"no-store\" },\n }),\n );\n }\n // The newest few previews are kept; older ones are deleted.\n const index = await cache.match(INDEX);\n const ids = [id].concat(\n (index ? await index.json() : []).filter((other) => other !== id),\n );\n const dropped = ids.slice(KEEP);\n if (dropped.length > 0) {\n for (const request of await cache.keys()) {\n const path = new URL(request.url).pathname;\n if (dropped.some((old) => path.startsWith(PREFIX + old + \"/\"))) {\n await cache.delete(request);\n }\n }\n }\n await cache.put(INDEX, new Response(JSON.stringify(ids.slice(0, KEEP))));\n}\n\n/** Which preview a document is: by its id, or by the address it was opened at. */\nconst byClient = new Map();\nasync function previewOf(clientId) {\n if (!clientId) return null;\n if (byClient.has(clientId)) return byClient.get(clientId);\n const client = await self.clients.get(clientId);\n const id = client ? new URL(client.url).searchParams.get(PARAM) : null;\n byClient.set(clientId, id);\n return id;\n}\n\nself.addEventListener(\"fetch\", (event) => {\n const url = new URL(event.request.url);\n if (url.origin !== self.location.origin) return;\n if (event.request.mode === \"navigate\") {\n const id = url.searchParams.get(PARAM);\n if (event.resultingClientId) byClient.set(event.resultingClientId, id);\n if (id) event.respondWith(rendered(event.request));\n return;\n }\n if (!url.pathname.startsWith(\"/_app/\")) return;\n event.respondWith(serve(event, url));\n});\n\n/** A quick preview's document, with the script that has it rendered, not hydrated. */\nasync function rendered(request) {\n const response = await fetch(request);\n const type = response.headers.get(\"Content-Type\") || \"\";\n if (!response.ok || !type.includes(\"text/html\")) return response;\n const html = await response.text();\n const at = html.lastIndexOf(\"</body>\");\n if (at === -1) return new Response(html, response);\n const headers = new Headers(response.headers);\n headers.delete(\"Content-Length\");\n headers.delete(\"Content-Encoding\");\n return new Response(html.slice(0, at) + RENDER + html.slice(at), {\n status: response.status,\n statusText: response.statusText,\n headers,\n });\n}\n\nasync function serve(event, url) {\n const id = await previewOf(event.clientId);\n if (id) {\n const hit = await caches.match(keyOf(id, url.pathname.slice(6)), {\n cacheName: CACHE,\n });\n if (hit) return hit;\n }\n return fetch(event.request);\n}\n");
|
|
94
111
|
|
|
95
112
|
/** How long the worker is given to install and store a preview. */
|
|
96
113
|
var STORE_TIMEOUT_MS = 30000;
|
|
@@ -1536,6 +1553,7 @@ function getPatternFromModuleFilePath(moduleFilePath, srcFolder) {
|
|
|
1536
1553
|
exports.DEFAULT_CANVAS_SELECTION = DEFAULT_CANVAS_SELECTION;
|
|
1537
1554
|
exports.DEFAULT_CANVAS_SELECTION_SOFT = DEFAULT_CANVAS_SELECTION_SOFT;
|
|
1538
1555
|
exports.QUICK_PREVIEW_PARAM = QUICK_PREVIEW_PARAM;
|
|
1556
|
+
exports.QUICK_PREVIEW_RENDER_SCRIPT = QUICK_PREVIEW_RENDER_SCRIPT;
|
|
1539
1557
|
exports.QUICK_PREVIEW_SERVICE_WORKER_PATH = QUICK_PREVIEW_SERVICE_WORKER_PATH;
|
|
1540
1558
|
exports.QUICK_PREVIEW_SERVICE_WORKER_SOURCE = QUICK_PREVIEW_SERVICE_WORKER_SOURCE;
|
|
1541
1559
|
exports.QUICK_PREVIEW_STORE_MESSAGE = QUICK_PREVIEW_STORE_MESSAGE;
|
|
@@ -27,6 +27,14 @@ var VAL_AI_SESSION_STORAGE_KEY = "val-ai-session";
|
|
|
27
27
|
* document's `/_app/` requests from the files, and everything else from
|
|
28
28
|
* the network: the HTML is the last build's, rendered by its server, and
|
|
29
29
|
* the new code takes it over in the browser.
|
|
30
|
+
* 4. It takes it over by RENDERING it, not by hydrating it. Hydration keeps
|
|
31
|
+
* the markup the server sent wherever only an attribute differs -- React
|
|
32
|
+
* mends text, never a `className` -- so a change to classes and props,
|
|
33
|
+
* which is most of what the design tab changes, hydrated into the old
|
|
34
|
+
* page and showed nothing. The worker adds a script to the end of that
|
|
35
|
+
* document's `<body>` ({@link QUICK_PREVIEW_RENDER_SCRIPT}) that takes the
|
|
36
|
+
* server's markup out before the app's scripts run, so hydration finds
|
|
37
|
+
* nothing to keep and React renders the page with the new code.
|
|
30
38
|
*
|
|
31
39
|
* What it cannot show, and the tab says so: anything on the server. Server
|
|
32
40
|
* functions, API routes and loaders that run there are the last build's, as
|
|
@@ -44,6 +52,15 @@ var QUICK_PREVIEW_PARAM = "val_quick";
|
|
|
44
52
|
/** Where Val's API serves the worker: under `/api/val`. */
|
|
45
53
|
var QUICK_PREVIEW_SERVICE_WORKER_PATH = "/quick-preview-sw.js";
|
|
46
54
|
|
|
55
|
+
/**
|
|
56
|
+
* What a quick preview's document runs before the app's scripts: the
|
|
57
|
+
* server's markup out of `<body>`, every script left where it is -- the
|
|
58
|
+
* router's dehydrated state and the app's entry are among them. Hydration
|
|
59
|
+
* then finds the body empty and React renders the page, with the new code's
|
|
60
|
+
* attributes and classes, where it would have kept the old ones.
|
|
61
|
+
*/
|
|
62
|
+
var QUICK_PREVIEW_RENDER_SCRIPT = "<script>(function(){var b=document.body;if(!b)return;" + "Array.prototype.slice.call(b.childNodes).forEach(function(n){" + 'if(n.nodeName!=="SCRIPT")b.removeChild(n)})})()</script>';
|
|
63
|
+
|
|
47
64
|
/** What the page sends the worker to store a preview's files. */
|
|
48
65
|
var QUICK_PREVIEW_STORE_MESSAGE = "val-quick-preview-store";
|
|
49
66
|
|
|
@@ -70,7 +87,7 @@ function isQuickPreviewFiles(value) {
|
|
|
70
87
|
* The worker, as the source it is served as: plain, and small, because it is
|
|
71
88
|
* served as a file of its own (`demoServiceWorker.ts` is the same).
|
|
72
89
|
*/
|
|
73
|
-
var QUICK_PREVIEW_SERVICE_WORKER_SOURCE = "\n\"use strict\";\nconst PARAM = \"".concat(QUICK_PREVIEW_PARAM, "\";\nconst CACHE = \"val-quick-preview\";\nconst PREFIX = \"/__val_quick/\";\nconst INDEX = PREFIX + \"index\";\nconst KEEP = 4;\n\nself.addEventListener(\"install\", () => self.skipWaiting());\nself.addEventListener(\"activate\", (event) => {\n event.waitUntil(self.clients.claim());\n});\n\nself.addEventListener(\"message\", (event) => {\n const data = event.data;\n if (!data || data.type !== \"").concat(QUICK_PREVIEW_STORE_MESSAGE, "\") return;\n const port = event.ports && event.ports[0];\n event.waitUntil(\n store(data.id, data.files).then(\n () => port && port.postMessage({ ok: true }),\n (error) =>\n port &&\n port.postMessage({\n ok: false,\n message: String((error && error.message) || error),\n }),\n ),\n );\n});\n\nfunction keyOf(id, path) {\n return PREFIX + id + \"/\" + path;\n}\n\nasync function store(id, files) {\n const cache = await caches.open(CACHE);\n for (const path of Object.keys(files)) {\n const file = files[path];\n const body = file.base64\n ? Uint8Array.from(atob(file.body), (c) => c.charCodeAt(0))\n : file.body;\n await cache.put(\n keyOf(id, path),\n new Response(body, {\n headers: { \"Content-Type\": file.contentType, \"Cache-Control\": \"no-store\" },\n }),\n );\n }\n // The newest few previews are kept; older ones are deleted.\n const index = await cache.match(INDEX);\n const ids = [id].concat(\n (index ? await index.json() : []).filter((other) => other !== id),\n );\n const dropped = ids.slice(KEEP);\n if (dropped.length > 0) {\n for (const request of await cache.keys()) {\n const path = new URL(request.url).pathname;\n if (dropped.some((old) => path.startsWith(PREFIX + old + \"/\"))) {\n await cache.delete(request);\n }\n }\n }\n await cache.put(INDEX, new Response(JSON.stringify(ids.slice(0, KEEP))));\n}\n\n/** Which preview a document is: by its id, or by the address it was opened at. */\nconst byClient = new Map();\nasync function previewOf(clientId) {\n if (!clientId) return null;\n if (byClient.has(clientId)) return byClient.get(clientId);\n const client = await self.clients.get(clientId);\n const id = client ? new URL(client.url).searchParams.get(PARAM) : null;\n byClient.set(clientId, id);\n return id;\n}\n\nself.addEventListener(\"fetch\", (event) => {\n const url = new URL(event.request.url);\n if (url.origin !== self.location.origin) return;\n if (event.request.mode === \"navigate\") {\n if (event.resultingClientId)
|
|
90
|
+
var QUICK_PREVIEW_SERVICE_WORKER_SOURCE = "\n\"use strict\";\nconst PARAM = \"".concat(QUICK_PREVIEW_PARAM, "\";\nconst RENDER = ").concat(JSON.stringify(QUICK_PREVIEW_RENDER_SCRIPT), ";\nconst CACHE = \"val-quick-preview\";\nconst PREFIX = \"/__val_quick/\";\nconst INDEX = PREFIX + \"index\";\nconst KEEP = 4;\n\nself.addEventListener(\"install\", () => self.skipWaiting());\nself.addEventListener(\"activate\", (event) => {\n event.waitUntil(self.clients.claim());\n});\n\nself.addEventListener(\"message\", (event) => {\n const data = event.data;\n if (!data || data.type !== \"").concat(QUICK_PREVIEW_STORE_MESSAGE, "\") return;\n const port = event.ports && event.ports[0];\n event.waitUntil(\n store(data.id, data.files).then(\n () => port && port.postMessage({ ok: true }),\n (error) =>\n port &&\n port.postMessage({\n ok: false,\n message: String((error && error.message) || error),\n }),\n ),\n );\n});\n\nfunction keyOf(id, path) {\n return PREFIX + id + \"/\" + path;\n}\n\nasync function store(id, files) {\n const cache = await caches.open(CACHE);\n for (const path of Object.keys(files)) {\n const file = files[path];\n const body = file.base64\n ? Uint8Array.from(atob(file.body), (c) => c.charCodeAt(0))\n : file.body;\n await cache.put(\n keyOf(id, path),\n new Response(body, {\n headers: { \"Content-Type\": file.contentType, \"Cache-Control\": \"no-store\" },\n }),\n );\n }\n // The newest few previews are kept; older ones are deleted.\n const index = await cache.match(INDEX);\n const ids = [id].concat(\n (index ? await index.json() : []).filter((other) => other !== id),\n );\n const dropped = ids.slice(KEEP);\n if (dropped.length > 0) {\n for (const request of await cache.keys()) {\n const path = new URL(request.url).pathname;\n if (dropped.some((old) => path.startsWith(PREFIX + old + \"/\"))) {\n await cache.delete(request);\n }\n }\n }\n await cache.put(INDEX, new Response(JSON.stringify(ids.slice(0, KEEP))));\n}\n\n/** Which preview a document is: by its id, or by the address it was opened at. */\nconst byClient = new Map();\nasync function previewOf(clientId) {\n if (!clientId) return null;\n if (byClient.has(clientId)) return byClient.get(clientId);\n const client = await self.clients.get(clientId);\n const id = client ? new URL(client.url).searchParams.get(PARAM) : null;\n byClient.set(clientId, id);\n return id;\n}\n\nself.addEventListener(\"fetch\", (event) => {\n const url = new URL(event.request.url);\n if (url.origin !== self.location.origin) return;\n if (event.request.mode === \"navigate\") {\n const id = url.searchParams.get(PARAM);\n if (event.resultingClientId) byClient.set(event.resultingClientId, id);\n if (id) event.respondWith(rendered(event.request));\n return;\n }\n if (!url.pathname.startsWith(\"/_app/\")) return;\n event.respondWith(serve(event, url));\n});\n\n/** A quick preview's document, with the script that has it rendered, not hydrated. */\nasync function rendered(request) {\n const response = await fetch(request);\n const type = response.headers.get(\"Content-Type\") || \"\";\n if (!response.ok || !type.includes(\"text/html\")) return response;\n const html = await response.text();\n const at = html.lastIndexOf(\"</body>\");\n if (at === -1) return new Response(html, response);\n const headers = new Headers(response.headers);\n headers.delete(\"Content-Length\");\n headers.delete(\"Content-Encoding\");\n return new Response(html.slice(0, at) + RENDER + html.slice(at), {\n status: response.status,\n statusText: response.statusText,\n headers,\n });\n}\n\nasync function serve(event, url) {\n const id = await previewOf(event.clientId);\n if (id) {\n const hit = await caches.match(keyOf(id, url.pathname.slice(6)), {\n cacheName: CACHE,\n });\n if (hit) return hit;\n }\n return fetch(event.request);\n}\n");
|
|
74
91
|
|
|
75
92
|
/** How long the worker is given to install and store a preview. */
|
|
76
93
|
var STORE_TIMEOUT_MS = 30000;
|
|
@@ -1513,4 +1530,4 @@ function getPatternFromModuleFilePath(moduleFilePath, srcFolder) {
|
|
|
1513
1530
|
.replace("/page.val.ts", "").replace("/page.val.js", "");
|
|
1514
1531
|
}
|
|
1515
1532
|
|
|
1516
|
-
export {
|
|
1533
|
+
export { storeQuickPreview as A, withQuickPreviewParam as B, quickPreviewSiteOrigin as C, DEFAULT_CANVAS_SELECTION as D, isDesignTabOrigin as E, parseRoutePattern as F, formatRoutePattern as G, getNextAppRouterSourceFolder as H, getTanStackRouterSourceFolder as I, getPageRouterSourceFolder as J, isTanStackRoutesFolder as K, getPageRouterSitemapTree as L, getPatternFromModuleFilePath as M, QUICK_PREVIEW_PARAM as Q, VAL_CONFIG_SESSION_STORAGE_KEY as V, VAL_THEME_SESSION_STORAGE_KEY as a, VAL_AI_SESSION_STORAGE_KEY as b, VAL_CANVAS_PARAM as c, VAL_CANVAS_MESSAGE as d, DEFAULT_CANVAS_SELECTION_SOFT as e, isValCanvasStudioMessage as f, isValCanvasFrame as g, describeElement as h, isValCanvasPageMessage as i, attachElementPicker as j, createPickerOverlay as k, elementLabel as l, modifierLabel as m, watchPageLocation as n, readPageSnapshot as o, pageLocationOf as p, findBySelector as q, restoreScroll as r, startElementPicking as s, screenshotPage as t, QUICK_PREVIEW_SERVICE_WORKER_PATH as u, QUICK_PREVIEW_RENDER_SCRIPT as v, withValCanvasParam as w, QUICK_PREVIEW_STORE_MESSAGE as x, isQuickPreviewFiles as y, QUICK_PREVIEW_SERVICE_WORKER_SOURCE as z };
|
|
@@ -7,7 +7,7 @@ var core = require('@valbuild/core');
|
|
|
7
7
|
var zod = require('zod');
|
|
8
8
|
var protocol = require('../../dist/protocol-d0efb8cd.cjs.dev.js');
|
|
9
9
|
var zodValidationError = require('zod-validation-error');
|
|
10
|
-
var getSitemapTree = require('../../dist/getSitemapTree-
|
|
10
|
+
var getSitemapTree = require('../../dist/getSitemapTree-6dfa2f4e.cjs.dev.js');
|
|
11
11
|
var FlexSearch = require('flexsearch');
|
|
12
12
|
var wrapNativeSuper = require('../../dist/wrapNativeSuper-933f991e.cjs.dev.js');
|
|
13
13
|
var utils = require('../../dist/utils-d3d8b4b5.cjs.dev.js');
|
|
@@ -9575,6 +9575,7 @@ exports.parseVerify = protocol.parseVerify;
|
|
|
9575
9575
|
exports.DEFAULT_CANVAS_SELECTION = getSitemapTree.DEFAULT_CANVAS_SELECTION;
|
|
9576
9576
|
exports.DEFAULT_CANVAS_SELECTION_SOFT = getSitemapTree.DEFAULT_CANVAS_SELECTION_SOFT;
|
|
9577
9577
|
exports.QUICK_PREVIEW_PARAM = getSitemapTree.QUICK_PREVIEW_PARAM;
|
|
9578
|
+
exports.QUICK_PREVIEW_RENDER_SCRIPT = getSitemapTree.QUICK_PREVIEW_RENDER_SCRIPT;
|
|
9578
9579
|
exports.QUICK_PREVIEW_SERVICE_WORKER_PATH = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_PATH;
|
|
9579
9580
|
exports.QUICK_PREVIEW_SERVICE_WORKER_SOURCE = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_SOURCE;
|
|
9580
9581
|
exports.QUICK_PREVIEW_STORE_MESSAGE = getSitemapTree.QUICK_PREVIEW_STORE_MESSAGE;
|
|
@@ -7,7 +7,7 @@ var core = require('@valbuild/core');
|
|
|
7
7
|
var zod = require('zod');
|
|
8
8
|
var protocol = require('../../dist/protocol-b1055ef0.cjs.prod.js');
|
|
9
9
|
var zodValidationError = require('zod-validation-error');
|
|
10
|
-
var getSitemapTree = require('../../dist/getSitemapTree-
|
|
10
|
+
var getSitemapTree = require('../../dist/getSitemapTree-8a04f3cf.cjs.prod.js');
|
|
11
11
|
var FlexSearch = require('flexsearch');
|
|
12
12
|
var wrapNativeSuper = require('../../dist/wrapNativeSuper-8673414f.cjs.prod.js');
|
|
13
13
|
var utils = require('../../dist/utils-32bcaca2.cjs.prod.js');
|
|
@@ -9575,6 +9575,7 @@ exports.parseVerify = protocol.parseVerify;
|
|
|
9575
9575
|
exports.DEFAULT_CANVAS_SELECTION = getSitemapTree.DEFAULT_CANVAS_SELECTION;
|
|
9576
9576
|
exports.DEFAULT_CANVAS_SELECTION_SOFT = getSitemapTree.DEFAULT_CANVAS_SELECTION_SOFT;
|
|
9577
9577
|
exports.QUICK_PREVIEW_PARAM = getSitemapTree.QUICK_PREVIEW_PARAM;
|
|
9578
|
+
exports.QUICK_PREVIEW_RENDER_SCRIPT = getSitemapTree.QUICK_PREVIEW_RENDER_SCRIPT;
|
|
9578
9579
|
exports.QUICK_PREVIEW_SERVICE_WORKER_PATH = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_PATH;
|
|
9579
9580
|
exports.QUICK_PREVIEW_SERVICE_WORKER_SOURCE = getSitemapTree.QUICK_PREVIEW_SERVICE_WORKER_SOURCE;
|
|
9580
9581
|
exports.QUICK_PREVIEW_STORE_MESSAGE = getSitemapTree.QUICK_PREVIEW_STORE_MESSAGE;
|
|
@@ -4,7 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
import { _ as _objectWithoutProperties } from '../../dist/protocol-55cfa3cf.esm.js';
|
|
5
5
|
export { P as PublishProtocolError, b as parseArtifacts, p as parseBuildTarget, l as parseCancel, a as parseDeclare, m as parseDiscard, j as parseJob, n as parseNewestCiRun, h as parsePress, g as parseProblems, f as parseProjectSource, d as parsePromote, o as parsePublishToken, k as parseRenew, i as parseRequestStatus, e as parseStatus, q as parseUpdateTarget, c as parseVerify } from '../../dist/protocol-55cfa3cf.esm.js';
|
|
6
6
|
import { fromError } from 'zod-validation-error';
|
|
7
|
-
export { D as DEFAULT_CANVAS_SELECTION, e as DEFAULT_CANVAS_SELECTION_SOFT, Q as QUICK_PREVIEW_PARAM, u as QUICK_PREVIEW_SERVICE_WORKER_PATH,
|
|
7
|
+
export { D as DEFAULT_CANVAS_SELECTION, e as DEFAULT_CANVAS_SELECTION_SOFT, Q as QUICK_PREVIEW_PARAM, v as QUICK_PREVIEW_RENDER_SCRIPT, u as QUICK_PREVIEW_SERVICE_WORKER_PATH, z as QUICK_PREVIEW_SERVICE_WORKER_SOURCE, x as QUICK_PREVIEW_STORE_MESSAGE, b as VAL_AI_SESSION_STORAGE_KEY, d as VAL_CANVAS_MESSAGE, c as VAL_CANVAS_PARAM, V as VAL_CONFIG_SESSION_STORAGE_KEY, a as VAL_THEME_SESSION_STORAGE_KEY, j as attachElementPicker, k as createPickerOverlay, h as describeElement, l as elementLabel, q as findBySelector, G as formatRoutePattern, H as getNextAppRouterSourceFolder, L as getPageRouterSitemapTree, J as getPageRouterSourceFolder, M as getPatternFromModuleFilePath, I as getTanStackRouterSourceFolder, E as isDesignTabOrigin, y as isQuickPreviewFiles, K as isTanStackRoutesFolder, g as isValCanvasFrame, i as isValCanvasPageMessage, f as isValCanvasStudioMessage, m as modifierLabel, p as pageLocationOf, F as parseRoutePattern, C as quickPreviewSiteOrigin, o as readPageSnapshot, r as restoreScroll, t as screenshotPage, s as startElementPicking, A as storeQuickPreview, n as watchPageLocation, B as withQuickPreviewParam, w as withValCanvasParam } from '../../dist/getSitemapTree-fef55872.esm.js';
|
|
8
8
|
import FlexSearch from 'flexsearch';
|
|
9
9
|
import { a as _createClass, c as _classCallCheck } from '../../dist/wrapNativeSuper-639b12b7.esm.js';
|
|
10
10
|
import { b as base64DataUrlToUint8Array } from '../../dist/utils-00f3e1df.esm.js';
|