@valbuild/shared 0.152.0 → 0.153.0
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 +50 -0
- package/client/dist/valbuild-shared-client.cjs.dev.js +2 -3
- package/client/dist/valbuild-shared-client.cjs.prod.js +2 -3
- package/client/dist/valbuild-shared-client.esm.js +1 -1
- package/dist/declarations/src/internal/ApiRoutes.d.ts +123 -100
- package/dist/declarations/src/internal/elementPicker.d.ts +12 -5
- package/dist/declarations/src/internal/pageInspection.d.ts +1 -1
- package/dist/declarations/src/internal/pageScreenshot.d.ts +2 -3
- package/dist/declarations/src/internal/quickPreview.d.ts +3 -27
- package/dist/declarations/src/internal/valCanvasProtocol.d.ts +27 -16
- package/dist/declarations/src/publish/builder.d.ts +7 -2
- package/dist/{getSitemapTree-59c5ed5d.cjs.dev.js → getSitemapTree-32643b50.cjs.dev.js} +25 -128
- package/dist/{getSitemapTree-6b9024d1.cjs.prod.js → getSitemapTree-a4738117.cjs.prod.js} +25 -128
- package/dist/{getSitemapTree-3c1b9e57.esm.js → getSitemapTree-a887fed4.esm.js} +25 -127
- package/internal/dist/valbuild-shared-internal.cjs.dev.js +118 -158
- package/internal/dist/valbuild-shared-internal.cjs.prod.js +118 -158
- package/internal/dist/valbuild-shared-internal.esm.js +116 -157
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# @valbuild/shared
|
|
2
2
|
|
|
3
|
+
## 0.153.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1016](https://github.com/valbuild/val/pull/1016) [`2e70d13`](https://github.com/valbuild/val/commit/2e70d13cf7ca25874900c9ea25227df2876727b9) Thanks [@freekh](https://github.com/freekh)! - Editing content in a proposal whose code changed, before the proposal is built again:
|
|
8
|
+
|
|
9
|
+
- **A module the proposal adds** can be edited and saved right away. Its content is read from the new file and saved. Before, those edits were dropped. If the module's content is made by code (not written out in the file), the save waits and says to build the proposal first.
|
|
10
|
+
- **A module whose schema moved because a file it imports changed** (for example a shared `src/schemas/*.ts`) is no longer read with the old schema. Pages keep showing the content as built until the proposal is built again.
|
|
11
|
+
- **Edits that no longer fit the schema** can be handed to the assistant. The banner that lists them has a **Have the assistant move it** button for each one. You still discard the held edit yourself afterwards.
|
|
12
|
+
|
|
13
|
+
For this, `@valbuild/tanstack-build` records which files each Val module imports, and the `val.server.ts` it generates passes that to Val as the new optional `moduleDependencies` option of `initValServer` and `initValContent`. You do not need to set it yourself. A site built before this has no `moduleDependencies` and works as before.
|
|
14
|
+
|
|
15
|
+
- [#1016](https://github.com/valbuild/val/pull/1016) [`2e70d13`](https://github.com/valbuild/val/commit/2e70d13cf7ca25874900c9ea25227df2876727b9) Thanks [@freekh](https://github.com/freekh)! - Removed what 0.151.0 kept only so that a Studio, a page and a server from the release before could still talk to each other during a deploy:
|
|
16
|
+
|
|
17
|
+
- **`PUT /api/val/sources/~`** is gone. Nothing in 0.151.0 asked it: the Studio reads modules through `GET /api/val/manifest` and `GET /api/val/modules/~<path>`, and `fetchVal`, `useVal` and the MCP tools read the server's content in-process. If a script or test of yours read content through it, read one module with `GET /api/val/modules/~<path>` instead. Its answer has the module's `source` and `version`, and an `entries` map holding the `.jsonValues()` entries pending changes touched.
|
|
18
|
+
- **`ValDraft.base`** is gone from the type. It has not been sent or read since 0.151.0, so a `draft` you pass to `ValProvider` is not affected.
|
|
19
|
+
- **A page no longer accepts edits relayed by a Studio from before 0.151.0.** Such a Studio sent each module as a bare `source`. After the upgrade, the Studio and your pages come from the same deploy, so this only matters while an older Studio is still open in a tab during a rollout. Reloading that tab fixes it.
|
|
20
|
+
- **`/api/val/stat`** no longer needs `sourcesSha` and `schemaSha`. The Studio now tells your local server which version it last saw, and the server still sends both fields for a Studio of 0.151.0. They stop being sent in the next release.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [#1028](https://github.com/valbuild/val/pull/1028) [`27e51ba`](https://github.com/valbuild/val/commit/27e51baadce61b2cbee2d5ef227aae045ccb2e21) Thanks [@freekh](https://github.com/freekh)! - Another editor's keystroke costs the Studio less. Locally (`pnpm dev`, and
|
|
25
|
+
anywhere `/stat` long-polls), the Studio no longer asks for the manifest or
|
|
26
|
+
the changed module after someone else types: `/stat` now carries what
|
|
27
|
+
`GET /manifest` would have answered, and the module's new version is computed
|
|
28
|
+
from the patch the Studio already fetched. Where neither can be used (an
|
|
29
|
+
older server, a version that does not match), the Studio asks for them as
|
|
30
|
+
before.
|
|
31
|
+
|
|
32
|
+
- [#1030](https://github.com/valbuild/val/pull/1030) [`efa1f7d`](https://github.com/valbuild/val/commit/efa1f7d810f3c4e4e21502c9cc81ce86da93650c) Thanks [@freekh](https://github.com/freekh)! - **Point the assistant at something on the page.** With the preview open, the assistant has a **Select** in its header: press it, click a field on the page, and what you picked shows above the message box and goes with your next message, so "make this shorter" means that field. In code mode it can pick any element, outlined in the proposal's colour. Press the × on it to take it off.
|
|
33
|
+
|
|
34
|
+
- Selecting a field to edit has moved from the preview's toolbar to the top of the editor column, beside **Structure | On page**. Esc turns it off, from the Studio or from the page.
|
|
35
|
+
- On a desktop the assistant now sits beside the preview instead of over it, so it never covers what you point it at.
|
|
36
|
+
- The assistant can read the page in the preview, and take a picture of it, to see what you see.
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [[`67145fd`](https://github.com/valbuild/val/commit/67145fd16e35f2e3e0988ca5690fe5a4f84c1a41)]:
|
|
39
|
+
- @valbuild/core@0.153.0
|
|
40
|
+
|
|
41
|
+
## 0.152.1
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- [#1019](https://github.com/valbuild/val/pull/1019) [`b9089c8`](https://github.com/valbuild/val/commit/b9089c8787da8075722cc4ef3672beb61b288af4) Thanks [@freekh](https://github.com/freekh)! - **What the design tab needed is removed with it.** The page's canvas bridge
|
|
46
|
+
now answers `read_page`, `screenshot_page` and a quick preview only to the
|
|
47
|
+
Studio at the page's own origin, and no longer asks the server whether another
|
|
48
|
+
origin is the site's design tab. The site's server no longer writes a
|
|
49
|
+
proposal's files or offers the `patch-file` route: code and content are
|
|
50
|
+
changed in the proposal's own Studio. The assistant's `build_proposal` no
|
|
51
|
+
longer takes a `reason`.
|
|
52
|
+
|
|
3
53
|
## 0.152.0
|
|
4
54
|
|
|
5
55
|
### Minor 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-32643b50.cjs.dev.js');
|
|
6
6
|
require('../../dist/createForOfIteratorHelper-f2d7ac6d.cjs.dev.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ exports.getPageRouterSitemapTree = getSitemapTree.getPageRouterSitemapTree;
|
|
|
31
31
|
exports.getPageRouterSourceFolder = getSitemapTree.getPageRouterSourceFolder;
|
|
32
32
|
exports.getPatternFromModuleFilePath = getSitemapTree.getPatternFromModuleFilePath;
|
|
33
33
|
exports.getTanStackRouterSourceFolder = getSitemapTree.getTanStackRouterSourceFolder;
|
|
34
|
-
exports.
|
|
34
|
+
exports.isCanvasSelectionColor = getSitemapTree.isCanvasSelectionColor;
|
|
35
35
|
exports.isQuickPreviewFiles = getSitemapTree.isQuickPreviewFiles;
|
|
36
36
|
exports.isTanStackRoutesFolder = getSitemapTree.isTanStackRoutesFolder;
|
|
37
37
|
exports.isValCanvasFrame = getSitemapTree.isValCanvasFrame;
|
|
@@ -40,7 +40,6 @@ exports.isValCanvasStudioMessage = getSitemapTree.isValCanvasStudioMessage;
|
|
|
40
40
|
exports.modifierLabel = getSitemapTree.modifierLabel;
|
|
41
41
|
exports.pageLocationOf = getSitemapTree.pageLocationOf;
|
|
42
42
|
exports.parseRoutePattern = getSitemapTree.parseRoutePattern;
|
|
43
|
-
exports.quickPreviewSiteOrigin = getSitemapTree.quickPreviewSiteOrigin;
|
|
44
43
|
exports.readPageSnapshot = getSitemapTree.readPageSnapshot;
|
|
45
44
|
exports.restoreScroll = getSitemapTree.restoreScroll;
|
|
46
45
|
exports.screenshotPage = getSitemapTree.screenshotPage;
|
|
@@ -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-a4738117.cjs.prod.js');
|
|
6
6
|
require('../../dist/createForOfIteratorHelper-9ca2078d.cjs.prod.js');
|
|
7
7
|
require('@valbuild/core');
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ exports.getPageRouterSitemapTree = getSitemapTree.getPageRouterSitemapTree;
|
|
|
31
31
|
exports.getPageRouterSourceFolder = getSitemapTree.getPageRouterSourceFolder;
|
|
32
32
|
exports.getPatternFromModuleFilePath = getSitemapTree.getPatternFromModuleFilePath;
|
|
33
33
|
exports.getTanStackRouterSourceFolder = getSitemapTree.getTanStackRouterSourceFolder;
|
|
34
|
-
exports.
|
|
34
|
+
exports.isCanvasSelectionColor = getSitemapTree.isCanvasSelectionColor;
|
|
35
35
|
exports.isQuickPreviewFiles = getSitemapTree.isQuickPreviewFiles;
|
|
36
36
|
exports.isTanStackRoutesFolder = getSitemapTree.isTanStackRoutesFolder;
|
|
37
37
|
exports.isValCanvasFrame = getSitemapTree.isValCanvasFrame;
|
|
@@ -40,7 +40,6 @@ exports.isValCanvasStudioMessage = getSitemapTree.isValCanvasStudioMessage;
|
|
|
40
40
|
exports.modifierLabel = getSitemapTree.modifierLabel;
|
|
41
41
|
exports.pageLocationOf = getSitemapTree.pageLocationOf;
|
|
42
42
|
exports.parseRoutePattern = getSitemapTree.parseRoutePattern;
|
|
43
|
-
exports.quickPreviewSiteOrigin = getSitemapTree.quickPreviewSiteOrigin;
|
|
44
43
|
exports.readPageSnapshot = getSitemapTree.readPageSnapshot;
|
|
45
44
|
exports.restoreScroll = getSitemapTree.restoreScroll;
|
|
46
45
|
exports.screenshotPage = getSitemapTree.screenshotPage;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DEFAULT_CANVAS_SELECTION, e as DEFAULT_CANVAS_SELECTION_SOFT, Q as QUICK_PREVIEW_PARAM,
|
|
1
|
+
export { D as DEFAULT_CANVAS_SELECTION, e as DEFAULT_CANVAS_SELECTION_SOFT, Q as QUICK_PREVIEW_PARAM, x as QUICK_PREVIEW_RENDER_SCRIPT, v as QUICK_PREVIEW_SERVICE_WORKER_PATH, A as QUICK_PREVIEW_SERVICE_WORKER_SOURCE, y 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, k as attachElementPicker, l as createPickerOverlay, j as describeElement, n as elementLabel, t as findBySelector, F as formatRoutePattern, G as getNextAppRouterSourceFolder, K as getPageRouterSitemapTree, I as getPageRouterSourceFolder, L as getPatternFromModuleFilePath, H as getTanStackRouterSourceFolder, f as isCanvasSelectionColor, z as isQuickPreviewFiles, J as isTanStackRoutesFolder, h as isValCanvasFrame, i as isValCanvasPageMessage, g as isValCanvasStudioMessage, m as modifierLabel, p as pageLocationOf, E as parseRoutePattern, q as readPageSnapshot, r as restoreScroll, u as screenshotPage, s as startElementPicking, B as storeQuickPreview, o as watchPageLocation, C as withQuickPreviewParam, w as withValCanvasParam } from '../../dist/getSitemapTree-a887fed4.esm.js';
|
|
2
2
|
import '../../dist/createForOfIteratorHelper-9b80f1a2.esm.js';
|
|
3
3
|
import '@valbuild/core';
|
|
@@ -119,6 +119,69 @@ export declare const SketchpadSummary: z.ZodObject<{
|
|
|
119
119
|
export type SketchpadSummaryT = z.infer<typeof SketchpadSummary>;
|
|
120
120
|
/** The most text a sketchpad holds, in UTF-8 bytes: a page, not a site. */
|
|
121
121
|
export declare const SKETCHPAD_MAX_TEXT_LENGTH: number;
|
|
122
|
+
/**
|
|
123
|
+
* A manifest as the server answers it: what each module IS on the server
|
|
124
|
+
* (`GET /manifest`, and the same answer on `/stat` when the Studio asks for it
|
|
125
|
+
* there -- one function on the server answers both, `manifestAnswer`).
|
|
126
|
+
*/
|
|
127
|
+
export declare const ManifestJson: z.ZodObject<{
|
|
128
|
+
project: z.ZodObject<{
|
|
129
|
+
build: z.ZodString;
|
|
130
|
+
seq: z.ZodNumber;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
modules: z.ZodRecord<z.ZodString & z.ZodType<ModuleFilePath, string, z.core.$ZodTypeInternals<ModuleFilePath, string>>, z.ZodObject<{
|
|
133
|
+
schema: z.ZodString;
|
|
134
|
+
base: z.ZodString;
|
|
135
|
+
chain: z.ZodString;
|
|
136
|
+
}, z.core.$strip>>;
|
|
137
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
138
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
140
|
+
registry: z.ZodOptional<z.ZodObject<{
|
|
141
|
+
entry: z.ZodString;
|
|
142
|
+
core: z.ZodString;
|
|
143
|
+
}, z.core.$strip>>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type ManifestJsonT = z.infer<typeof ManifestJson>;
|
|
146
|
+
/**
|
|
147
|
+
* The manifest a `/stat` answer carries, when the request said which one the
|
|
148
|
+
* Studio holds (`manifest` on the request): what `GET /manifest` would have
|
|
149
|
+
* answered for it, so another editor's keystroke costs no manifest request.
|
|
150
|
+
*
|
|
151
|
+
* - A manifest, whole or a delta. A delta names the ETag it is relative to
|
|
152
|
+
* (`sinceTag`): a Studio uses it only while it holds exactly that one.
|
|
153
|
+
* - `unchanged`: the manifest the request named, at `seq`, is still the
|
|
154
|
+
* one for this answer's `seq`. Decided by `seq` alone, and not read: a
|
|
155
|
+
* Studio reads a manifest only for a stat whose `seq` moved. It keeps the
|
|
156
|
+
* next request naming the same manifest.
|
|
157
|
+
*
|
|
158
|
+
* Optional: absent from a server of the release before, and from an answer
|
|
159
|
+
* to a request that did not ask, and then the Studio reads `GET /manifest`.
|
|
160
|
+
*/
|
|
161
|
+
export declare const StatManifest: z.ZodUnion<readonly [z.ZodObject<{
|
|
162
|
+
project: z.ZodObject<{
|
|
163
|
+
build: z.ZodString;
|
|
164
|
+
seq: z.ZodNumber;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
modules: z.ZodRecord<z.ZodString & z.ZodType<ModuleFilePath, string, z.core.$ZodTypeInternals<ModuleFilePath, string>>, z.ZodObject<{
|
|
167
|
+
schema: z.ZodString;
|
|
168
|
+
base: z.ZodString;
|
|
169
|
+
chain: z.ZodString;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
172
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
registry: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
entry: z.ZodString;
|
|
176
|
+
core: z.ZodString;
|
|
177
|
+
}, z.core.$strip>>;
|
|
178
|
+
sinceTag: z.ZodOptional<z.ZodString>;
|
|
179
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
180
|
+
unchanged: z.ZodLiteral<true>;
|
|
181
|
+
tag: z.ZodString;
|
|
182
|
+
seq: z.ZodNumber;
|
|
183
|
+
}, z.core.$strip>]>;
|
|
184
|
+
export type StatManifestT = z.infer<typeof StatManifest>;
|
|
122
185
|
export declare const Api: {
|
|
123
186
|
"/draft/enable": {
|
|
124
187
|
GET: {
|
|
@@ -585,11 +648,19 @@ export declare const Api: {
|
|
|
585
648
|
POST: {
|
|
586
649
|
req: {
|
|
587
650
|
body: z.ZodNullable<z.ZodObject<{
|
|
588
|
-
sourcesSha: z.ZodString
|
|
589
|
-
schemaSha: z.ZodString
|
|
651
|
+
sourcesSha: z.ZodOptional<z.ZodString>;
|
|
652
|
+
schemaSha: z.ZodOptional<z.ZodString>;
|
|
653
|
+
version: z.ZodOptional<z.ZodObject<{
|
|
654
|
+
build: z.ZodString;
|
|
655
|
+
seq: z.ZodNumber;
|
|
656
|
+
}, z.core.$strip>>;
|
|
590
657
|
baseSha: z.ZodString;
|
|
591
658
|
patches: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
592
659
|
jsonEntriesSha: z.ZodOptional<z.ZodString>;
|
|
660
|
+
manifest: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
661
|
+
tag: z.ZodString;
|
|
662
|
+
seq: z.ZodNumber;
|
|
663
|
+
}, z.core.$strip>>>;
|
|
593
664
|
}, z.core.$strip>>;
|
|
594
665
|
cookies: {
|
|
595
666
|
val_session: z.ZodOptional<z.ZodString>;
|
|
@@ -615,8 +686,8 @@ export declare const Api: {
|
|
|
615
686
|
json: z.ZodUnion<readonly [z.ZodObject<{
|
|
616
687
|
type: z.ZodUnion<readonly [z.ZodLiteral<"request-again">, z.ZodLiteral<"no-change">, z.ZodLiteral<"did-change">]>;
|
|
617
688
|
baseSha: z.ZodString;
|
|
618
|
-
schemaSha: z.ZodString
|
|
619
|
-
sourcesSha: z.ZodString
|
|
689
|
+
schemaSha: z.ZodOptional<z.ZodString>;
|
|
690
|
+
sourcesSha: z.ZodOptional<z.ZodString>;
|
|
620
691
|
patches: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
621
692
|
appliedPatches: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
|
|
622
693
|
publishingPatches: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
|
|
@@ -653,13 +724,36 @@ export declare const Api: {
|
|
|
653
724
|
build: z.ZodString;
|
|
654
725
|
seq: z.ZodNumber;
|
|
655
726
|
}, z.core.$strip>>;
|
|
727
|
+
manifest: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
728
|
+
project: z.ZodObject<{
|
|
729
|
+
build: z.ZodString;
|
|
730
|
+
seq: z.ZodNumber;
|
|
731
|
+
}, z.core.$strip>;
|
|
732
|
+
modules: z.ZodRecord<z.ZodString & z.ZodType<ModuleFilePath, string, z.core.$ZodTypeInternals<ModuleFilePath, string>>, z.ZodObject<{
|
|
733
|
+
schema: z.ZodString;
|
|
734
|
+
base: z.ZodString;
|
|
735
|
+
chain: z.ZodString;
|
|
736
|
+
}, z.core.$strip>>;
|
|
737
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
738
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
739
|
+
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
740
|
+
registry: z.ZodOptional<z.ZodObject<{
|
|
741
|
+
entry: z.ZodString;
|
|
742
|
+
core: z.ZodString;
|
|
743
|
+
}, z.core.$strip>>;
|
|
744
|
+
sinceTag: z.ZodOptional<z.ZodString>;
|
|
745
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
746
|
+
unchanged: z.ZodLiteral<true>;
|
|
747
|
+
tag: z.ZodString;
|
|
748
|
+
seq: z.ZodNumber;
|
|
749
|
+
}, z.core.$strip>]>>;
|
|
656
750
|
}, z.core.$strip>, z.ZodObject<{
|
|
657
751
|
type: z.ZodLiteral<"use-websocket">;
|
|
658
752
|
url: z.ZodString;
|
|
659
753
|
nonce: z.ZodString;
|
|
660
754
|
baseSha: z.ZodString;
|
|
661
|
-
schemaSha: z.ZodString
|
|
662
|
-
sourcesSha: z.ZodString
|
|
755
|
+
schemaSha: z.ZodOptional<z.ZodString>;
|
|
756
|
+
sourcesSha: z.ZodOptional<z.ZodString>;
|
|
663
757
|
commitSha: z.ZodOptional<z.ZodString>;
|
|
664
758
|
patches: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
665
759
|
appliedPatches: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
|
|
@@ -711,6 +805,29 @@ export declare const Api: {
|
|
|
711
805
|
build: z.ZodString;
|
|
712
806
|
seq: z.ZodNumber;
|
|
713
807
|
}, z.core.$strip>>;
|
|
808
|
+
manifest: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
809
|
+
project: z.ZodObject<{
|
|
810
|
+
build: z.ZodString;
|
|
811
|
+
seq: z.ZodNumber;
|
|
812
|
+
}, z.core.$strip>;
|
|
813
|
+
modules: z.ZodRecord<z.ZodString & z.ZodType<ModuleFilePath, string, z.core.$ZodTypeInternals<ModuleFilePath, string>>, z.ZodObject<{
|
|
814
|
+
schema: z.ZodString;
|
|
815
|
+
base: z.ZodString;
|
|
816
|
+
chain: z.ZodString;
|
|
817
|
+
}, z.core.$strip>>;
|
|
818
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
819
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
820
|
+
superseded: z.ZodOptional<z.ZodBoolean>;
|
|
821
|
+
registry: z.ZodOptional<z.ZodObject<{
|
|
822
|
+
entry: z.ZodString;
|
|
823
|
+
core: z.ZodString;
|
|
824
|
+
}, z.core.$strip>>;
|
|
825
|
+
sinceTag: z.ZodOptional<z.ZodString>;
|
|
826
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
827
|
+
unchanged: z.ZodLiteral<true>;
|
|
828
|
+
tag: z.ZodString;
|
|
829
|
+
seq: z.ZodNumber;
|
|
830
|
+
}, z.core.$strip>]>>;
|
|
714
831
|
}, z.core.$strip>]>;
|
|
715
832
|
}, z.core.$strip>]>;
|
|
716
833
|
};
|
|
@@ -1430,100 +1547,6 @@ export declare const Api: {
|
|
|
1430
1547
|
}, z.core.$strip>]>;
|
|
1431
1548
|
};
|
|
1432
1549
|
};
|
|
1433
|
-
/**
|
|
1434
|
-
* @deprecated The whole tree. Nothing of this release asks it: the Studio
|
|
1435
|
-
* reads modules by version (`GET /manifest`, `GET /modules/~`), the draft
|
|
1436
|
-
* readers and MCP read the head in-process. Kept, with `exclude_patches`
|
|
1437
|
-
* (`BaseAlignment`'s fetch) and the ignored `validate_sources` and
|
|
1438
|
-
* `validate_binary_files`, for a Studio of the release before; goes in the
|
|
1439
|
-
* release after the one that ships this (see "Release-delayed deletions"
|
|
1440
|
-
* in `docs/plans/one-content-model.md`).
|
|
1441
|
-
*/
|
|
1442
|
-
"/sources/~": {
|
|
1443
|
-
PUT: {
|
|
1444
|
-
req: {
|
|
1445
|
-
path: z.ZodOptional<z.ZodString>;
|
|
1446
|
-
query: {
|
|
1447
|
-
validate_sources: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string, string[]>> & z.ZodType<"true" | "false", string[], z.core.$ZodTypeInternals<"true" | "false", string[]>>, z.ZodTransform<boolean, "true" | "false">>>;
|
|
1448
|
-
validate_binary_files: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string, string[]>> & z.ZodType<"true" | "false", string[], z.core.$ZodTypeInternals<"true" | "false", string[]>>, z.ZodTransform<boolean, "true" | "false">>>;
|
|
1449
|
-
exclude_patches: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string, string[]>> & z.ZodType<"true" | "false", string[], z.core.$ZodTypeInternals<"true" | "false", string[]>>, z.ZodTransform<boolean, "true" | "false">>>;
|
|
1450
|
-
apply_patches: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string, string[]>> & z.ZodType<"true" | "false", string[], z.core.$ZodTypeInternals<"true" | "false", string[]>>, z.ZodTransform<boolean, "true" | "false">>>;
|
|
1451
|
-
};
|
|
1452
|
-
cookies: {
|
|
1453
|
-
val_session: z.ZodOptional<z.ZodString>;
|
|
1454
|
-
};
|
|
1455
|
-
};
|
|
1456
|
-
res: z.ZodUnion<readonly [z.ZodObject<{
|
|
1457
|
-
status: z.ZodLiteral<401>;
|
|
1458
|
-
json: z.ZodObject<{
|
|
1459
|
-
message: z.ZodString;
|
|
1460
|
-
}, z.core.$strip>;
|
|
1461
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1462
|
-
status: z.ZodLiteral<401>;
|
|
1463
|
-
json: z.ZodObject<{
|
|
1464
|
-
message: z.ZodString;
|
|
1465
|
-
}, z.core.$strip>;
|
|
1466
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1467
|
-
status: z.ZodLiteral<500>;
|
|
1468
|
-
json: z.ZodObject<{
|
|
1469
|
-
message: z.ZodString;
|
|
1470
|
-
details: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
1471
|
-
message: z.ZodString;
|
|
1472
|
-
path: z.ZodOptional<z.ZodString & z.ZodType<ModuleFilePath, string, z.core.$ZodTypeInternals<ModuleFilePath, string>>>;
|
|
1473
|
-
}, z.core.$strip>>, z.ZodObject<{
|
|
1474
|
-
message: z.ZodString;
|
|
1475
|
-
}, z.core.$strip>]>;
|
|
1476
|
-
}, z.core.$strip>;
|
|
1477
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1478
|
-
status: z.ZodLiteral<409>;
|
|
1479
|
-
json: z.ZodObject<{
|
|
1480
|
-
message: z.ZodString;
|
|
1481
|
-
}, z.core.$strip>;
|
|
1482
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1483
|
-
status: z.ZodLiteral<400>;
|
|
1484
|
-
json: z.ZodObject<{
|
|
1485
|
-
message: z.ZodString;
|
|
1486
|
-
details: z.ZodArray<z.ZodObject<{
|
|
1487
|
-
message: z.ZodString;
|
|
1488
|
-
path: z.ZodOptional<z.ZodString & z.ZodType<ModuleFilePath, string, z.core.$ZodTypeInternals<ModuleFilePath, string>>>;
|
|
1489
|
-
}, z.core.$strip>>;
|
|
1490
|
-
}, z.core.$strip>;
|
|
1491
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1492
|
-
status: z.ZodLiteral<200>;
|
|
1493
|
-
json: z.ZodObject<{
|
|
1494
|
-
schemaSha: z.ZodString;
|
|
1495
|
-
sourcesSha: z.ZodString;
|
|
1496
|
-
modules: z.ZodRecord<z.ZodString & z.ZodType<ModuleFilePath, string, z.core.$ZodTypeInternals<ModuleFilePath, string>>, z.ZodObject<{
|
|
1497
|
-
preview: z.ZodOptional<z.ZodAny>;
|
|
1498
|
-
source: z.ZodOptional<z.ZodAny>;
|
|
1499
|
-
baseSource: z.ZodOptional<z.ZodAny>;
|
|
1500
|
-
patches: z.ZodOptional<z.ZodObject<{
|
|
1501
|
-
applied: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
1502
|
-
skipped: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>>;
|
|
1503
|
-
errors: z.ZodOptional<z.ZodRecord<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>, z.ZodObject<{
|
|
1504
|
-
message: z.ZodString;
|
|
1505
|
-
}, z.core.$strip>>>;
|
|
1506
|
-
}, z.core.$strip>>;
|
|
1507
|
-
validationErrors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
1508
|
-
message: z.ZodString;
|
|
1509
|
-
value: z.ZodOptional<z.ZodUnknown>;
|
|
1510
|
-
fatal: z.ZodOptional<z.ZodBoolean>;
|
|
1511
|
-
fixes: z.ZodOptional<z.ZodArray<z.ZodType<"image:add-metadata" | "image:check-metadata" | "image:upload-remote" | "image:download-remote" | "image:check-remote" | "images:check-remote" | "images:upload-remote" | "file:add-metadata" | "file:check-metadata" | "file:upload-remote" | "file:download-remote" | "file:check-remote" | "files:check-remote" | "files:upload-remote" | "video:add-metadata" | "video:upload-remote" | "video:download-remote" | "videos:add-metadata" | "videos:check-remote" | "videos:upload-remote" | "keyof:check-keys" | "image:check-gallery" | "file:check-gallery" | "video:check-gallery" | "router:check-route" | "locale:check-locale" | "router:check-locale-param" | "images:check-unique-folder" | "files:check-unique-folder" | "images:check-all-files" | "files:check-all-files" | "videos:check-unique-folder" | "videos:check-all-files" | "jsonValues:extract-entry" | "record:fill-keys" | "external:upload" | "view:check-module" | "remote:rewrite-host", unknown, z.core.$ZodTypeInternals<"image:add-metadata" | "image:check-metadata" | "image:upload-remote" | "image:download-remote" | "image:check-remote" | "images:check-remote" | "images:upload-remote" | "file:add-metadata" | "file:check-metadata" | "file:upload-remote" | "file:download-remote" | "file:check-remote" | "files:check-remote" | "files:upload-remote" | "video:add-metadata" | "video:upload-remote" | "video:download-remote" | "videos:add-metadata" | "videos:check-remote" | "videos:upload-remote" | "keyof:check-keys" | "image:check-gallery" | "file:check-gallery" | "video:check-gallery" | "router:check-route" | "locale:check-locale" | "router:check-locale-param" | "images:check-unique-folder" | "files:check-unique-folder" | "images:check-all-files" | "files:check-all-files" | "videos:check-unique-folder" | "videos:check-all-files" | "jsonValues:extract-entry" | "record:fill-keys" | "external:upload" | "view:check-module" | "remote:rewrite-host", unknown>>>>;
|
|
1512
|
-
}, z.core.$strip>>>>;
|
|
1513
|
-
version: z.ZodOptional<z.ZodObject<{
|
|
1514
|
-
schema: z.ZodString;
|
|
1515
|
-
base: z.ZodString;
|
|
1516
|
-
chain: z.ZodString;
|
|
1517
|
-
}, z.core.$strip>>;
|
|
1518
|
-
}, z.core.$strip>>;
|
|
1519
|
-
project: z.ZodOptional<z.ZodObject<{
|
|
1520
|
-
build: z.ZodString;
|
|
1521
|
-
seq: z.ZodNumber;
|
|
1522
|
-
}, z.core.$strip>>;
|
|
1523
|
-
}, z.core.$strip>;
|
|
1524
|
-
}, z.core.$strip>]>;
|
|
1525
|
-
};
|
|
1526
|
-
};
|
|
1527
1550
|
/**
|
|
1528
1551
|
* One module by version: phase 6 of `docs/plans/one-content-model.md`
|
|
1529
1552
|
* ("The Studio loads everything from one place"). `GET /modules/~<path>`,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pointing at anything on a page, as Lovable's picker does: hover outlines
|
|
3
3
|
* the element under the pointer, a click picks it, and the assistant is told
|
|
4
|
-
* which
|
|
4
|
+
* which.
|
|
5
5
|
*
|
|
6
|
-
* ANY element, not only what Val marks. The
|
|
6
|
+
* ANY element, not only what Val marks. The assistant changes code, and the
|
|
7
7
|
* thing a person wants changed is as often a wrapper, a gap or a button as a
|
|
8
8
|
* field -- so a field's path is extra information when there is one
|
|
9
9
|
* (`valPath`), never the condition for picking.
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Plain DOM, nothing of React's or the Studio's, and in `shared` because
|
|
16
16
|
* both halves need it: the canvas bridge (`@valbuild/next`,
|
|
17
|
-
* `@valbuild/tanstack`) runs it inside the
|
|
18
|
-
*
|
|
19
|
-
* reached; the Studio's stories run it on a page of their own. Only the
|
|
17
|
+
* `@valbuild/tanstack`) runs it inside the page, the only place the page's
|
|
18
|
+
* elements can be reached; the Studio's stories run it on a page of their own. Only the
|
|
20
19
|
* `PickedElement` crosses the frame (`valCanvasProtocol.ts`).
|
|
21
20
|
*/
|
|
22
21
|
export type PickedElement = {
|
|
@@ -43,6 +42,12 @@ export type ElementPickerOptions = {
|
|
|
43
42
|
modifier: PickModifier;
|
|
44
43
|
/** On without the modifier: a Select button, or a touch screen. */
|
|
45
44
|
active: () => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Only what shows a Val field can be picked: the field's element is taken
|
|
47
|
+
* for anything inside it, and nothing outside one is. The Studio's
|
|
48
|
+
* assistant outside code mode, where what can be changed is content.
|
|
49
|
+
*/
|
|
50
|
+
fieldsOnly?: () => boolean;
|
|
46
51
|
/** The element under the pointer while picking; `null` when not picking. */
|
|
47
52
|
onHover: (element: Element | null) => void;
|
|
48
53
|
onPick: (element: Element) => void;
|
|
@@ -89,6 +94,8 @@ export type ElementPicking = {
|
|
|
89
94
|
export declare function startElementPicking(root: HTMLElement, options: {
|
|
90
95
|
modifier: PickModifier;
|
|
91
96
|
active: () => boolean;
|
|
97
|
+
/** See `ElementPickerOptions.fieldsOnly`. */
|
|
98
|
+
fieldsOnly?: () => boolean;
|
|
92
99
|
color: string;
|
|
93
100
|
onPick: (picked: PickedElement) => void;
|
|
94
101
|
/** Esc while `active`: the Studio turns Select off. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Looking at a page from the
|
|
2
|
+
* Looking at a page from the Studio:
|
|
3
3
|
* where it is -- its path and scroll, so a new build opens at the same place
|
|
4
4
|
* -- and what is on it, so the assistant can check its own change
|
|
5
5
|
* (`read_page`).
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* `screenshot_page`, so it can see a change it made rather than only read it
|
|
4
4
|
* (`read_page` gives the words and the boxes).
|
|
5
5
|
*
|
|
6
|
-
* Taken HERE
|
|
7
|
-
* the
|
|
8
|
-
* frame of another origin. So the bridge renders its own document --
|
|
6
|
+
* Taken HERE, in the page: a browser lets no page photograph a frame, so
|
|
7
|
+
* the bridge renders its own document --
|
|
9
8
|
* `modern-screenshot` draws the DOM, with its computed styles, fonts and
|
|
10
9
|
* same-origin images, into a canvas -- and hands back a JPEG.
|
|
11
10
|
*
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A quick preview: a proposal's page, running the proposal's CLIENT code
|
|
3
|
-
* built in the
|
|
4
|
-
* (valbuild/home `docs/design-tab.md`).
|
|
3
|
+
* built in the Studio, without a build being uploaded or served.
|
|
5
4
|
*
|
|
6
5
|
* A full build of a proposal bundles the app for the server and the browser,
|
|
7
6
|
* uploads it, and has the platform render every page before it is served --
|
|
8
|
-
* minutes. Most of what the
|
|
7
|
+
* minutes. Most of what the assistant changes is components and styles,
|
|
9
8
|
* which the browser half alone shows. So the tab bundles the app in its
|
|
10
9
|
* builder worker, and a service worker on the proposal's address hands the
|
|
11
10
|
* page that bundle instead of the served one:
|
|
@@ -23,7 +22,7 @@
|
|
|
23
22
|
* 4. It takes it over by RENDERING it, not by hydrating it. Hydration keeps
|
|
24
23
|
* the markup the server sent wherever only an attribute differs -- React
|
|
25
24
|
* mends text, never a `className` -- so a change to classes and props,
|
|
26
|
-
* which is most of what the
|
|
25
|
+
* which is most of what the assistant changes, hydrated into the old
|
|
27
26
|
* page and showed nothing. The worker adds a script to the end of that
|
|
28
27
|
* document's `<body>` ({@link QUICK_PREVIEW_RENDER_SCRIPT}) that takes the
|
|
29
28
|
* server's markup out before the app's scripts run, so hydration finds
|
|
@@ -82,26 +81,3 @@ export declare function storeQuickPreview(id: string, files: QuickPreviewFiles,
|
|
|
82
81
|
}): Promise<void>;
|
|
83
82
|
/** The address of a page as a quick preview `id`. */
|
|
84
83
|
export declare function withQuickPreviewParam(url: string, id: string): string;
|
|
85
|
-
/**
|
|
86
|
-
* The one origin allowed to send this page a quick preview: the site's, where
|
|
87
|
-
* the design tab is, as this page's own Val server says it (the proposals
|
|
88
|
-
* list's `siteUrl`). `null` when it does not say.
|
|
89
|
-
*
|
|
90
|
-
* A quick preview is code that runs on this address, so the bridge takes one
|
|
91
|
-
* only from its parent, and only when that parent is the site: a page that
|
|
92
|
-
* framed this one could otherwise post a script into the worker and open
|
|
93
|
-
* the frame on it.
|
|
94
|
-
*/
|
|
95
|
-
export declare function quickPreviewSiteOrigin(api: string, fetchImpl?: typeof fetch): Promise<string | null>;
|
|
96
|
-
/**
|
|
97
|
-
* Whether `origin` may ask this page for what only the design tab should
|
|
98
|
-
* have -- what is on it (`readPage`), or code to run (`quickPreview`): this
|
|
99
|
-
* page's own origin (the Studio's canvas), or the site's, where the design
|
|
100
|
-
* tab is ({@link quickPreviewSiteOrigin}). Asked of the server once, and
|
|
101
|
-
* again only while it has not said.
|
|
102
|
-
*/
|
|
103
|
-
export declare function isDesignTabOrigin(origin: string, options: {
|
|
104
|
-
api: string;
|
|
105
|
-
own: string;
|
|
106
|
-
fetchImpl?: typeof fetch;
|
|
107
|
-
}): Promise<boolean>;
|
|
@@ -211,10 +211,17 @@ export type ValCanvasPageMessage = {
|
|
|
211
211
|
*/
|
|
212
212
|
val: typeof VAL_CANVAS_MESSAGE;
|
|
213
213
|
type: "elementPickingStopped";
|
|
214
|
+
} | {
|
|
215
|
+
/**
|
|
216
|
+
* Esc on the page while picking FIELDS (`setPicking`): Content's Select
|
|
217
|
+
* turns off. Its twin for any element is `elementPickingStopped`.
|
|
218
|
+
*/
|
|
219
|
+
val: typeof VAL_CANVAS_MESSAGE;
|
|
220
|
+
type: "pickingStopped";
|
|
214
221
|
} | ({
|
|
215
222
|
/**
|
|
216
|
-
* Where the page is: its path and scroll, as it moves.
|
|
217
|
-
*
|
|
223
|
+
* Where the page is: its path and scroll, as it moves. A new build
|
|
224
|
+
* is opened there (`scrollTo`), so a new version replaces the
|
|
218
225
|
* page in place rather than starting over at the top of the front page.
|
|
219
226
|
*/
|
|
220
227
|
val: typeof VAL_CANVAS_MESSAGE;
|
|
@@ -275,20 +282,12 @@ export type ValCanvasStudioMessage = {
|
|
|
275
282
|
type: "sourceUpdate";
|
|
276
283
|
moduleFilePath: ModuleFilePath;
|
|
277
284
|
/**
|
|
278
|
-
* The
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
* of the release before. Goes in the release after the one that ships
|
|
283
|
-
* `read`, with the bridges' fallback that reads it: see
|
|
284
|
-
* "Release-delayed deletions" in `docs/plans/one-content-model.md`.
|
|
285
|
+
* The module as a read (`ModuleRead`: its source and version), which
|
|
286
|
+
* the page keeps as it is. `unknown` because the page's own types are
|
|
287
|
+
* the ones that give it meaning; nothing in between should be
|
|
288
|
+
* interpreting it.
|
|
285
289
|
*/
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* The same module as a read (`ModuleRead`), which the page keeps as it
|
|
289
|
-
* is. Optional: a Studio from the release before sends `source` alone.
|
|
290
|
-
*/
|
|
291
|
-
read?: unknown;
|
|
290
|
+
read: unknown;
|
|
292
291
|
} | {
|
|
293
292
|
/**
|
|
294
293
|
* Everything the studio holds has been sent.
|
|
@@ -358,7 +357,7 @@ export type ValCanvasStudioMessage = {
|
|
|
358
357
|
picking: boolean;
|
|
359
358
|
} | {
|
|
360
359
|
/**
|
|
361
|
-
* Picking ANY element
|
|
360
|
+
* Picking ANY element (`elementPicker.ts`),
|
|
362
361
|
* rather than the fields Val tagged, as `setPicking` does.
|
|
363
362
|
*
|
|
364
363
|
* While `enabled`, holding `modifier` outlines what is under the
|
|
@@ -374,6 +373,17 @@ export type ValCanvasStudioMessage = {
|
|
|
374
373
|
modifier: PickModifier;
|
|
375
374
|
/** Whether the studio still holds the last pick: false takes its outline down. */
|
|
376
375
|
keepPicked: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* Only Val's fields can be picked (`fieldsOnly` in `elementPicker.ts`):
|
|
378
|
+
* the Studio's assistant outside code mode. Absent is any element, so
|
|
379
|
+
* a studio that predates it is answered as before.
|
|
380
|
+
*/
|
|
381
|
+
fieldsOnly?: boolean;
|
|
382
|
+
/**
|
|
383
|
+
* What to outline in, instead of the `theme`'s selection colour: code
|
|
384
|
+
* mode's proposal colour. A bridge that predates it uses the theme's.
|
|
385
|
+
*/
|
|
386
|
+
color?: string;
|
|
377
387
|
} | {
|
|
378
388
|
/** Scroll to where the page before this one was (`location`). */
|
|
379
389
|
val: typeof VAL_CANVAS_MESSAGE;
|
|
@@ -414,6 +424,7 @@ export type ValCanvasStudioMessage = {
|
|
|
414
424
|
};
|
|
415
425
|
/** Narrow an unknown `event.data` to a message from the page. */
|
|
416
426
|
export declare function isValCanvasPageMessage(data: unknown): data is ValCanvasPageMessage;
|
|
427
|
+
export declare function isCanvasSelectionColor(value: unknown): value is string;
|
|
417
428
|
/** Narrow an unknown `event.data` to a message from the studio. */
|
|
418
429
|
export declare function isValCanvasStudioMessage(data: unknown): data is ValCanvasStudioMessage;
|
|
419
430
|
/**
|
|
@@ -16,7 +16,12 @@ export type StudioBuilder = {
|
|
|
16
16
|
publishArtifacts: Builder["publishArtifacts"];
|
|
17
17
|
/** A build's name, before building it: see `buildInputId`. */
|
|
18
18
|
buildInputId: Builder["buildInputId"];
|
|
19
|
-
/**
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* A tree's Val modules, as one module to evaluate: see `bundleValModules`.
|
|
21
|
+
* The Studio evaluates the code and nothing else; what each module depends
|
|
22
|
+
* on is for the server build (`moduleDependencies`), so it is not asked of
|
|
23
|
+
* the builder here.
|
|
24
|
+
*/
|
|
25
|
+
bundleValModules: (...args: Parameters<Builder["bundleValModules"]>) => Promise<Pick<Awaited<ReturnType<Builder["bundleValModules"]>>, "code">>;
|
|
21
26
|
};
|
|
22
27
|
export {};
|