@valbuild/tanstack 0.153.0 → 0.153.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/CHANGELOG.md +13 -0
- package/client/dist/valbuild-tanstack-client.cjs.dev.js +18 -7
- package/client/dist/valbuild-tanstack-client.cjs.prod.js +18 -7
- package/client/dist/valbuild-tanstack-client.esm.js +18 -7
- package/dist/{ValOverlayContext-1e50a557.cjs.prod.js → ValOverlayContext-81efbc82.cjs.dev.js} +2 -0
- package/dist/{ValOverlayContext-6826b4d9.esm.js → ValOverlayContext-bd2f453c.esm.js} +2 -0
- package/dist/{ValOverlayContext-b18c2f18.cjs.dev.js → ValOverlayContext-dec6d4bd.cjs.prod.js} +2 -0
- package/dist/declarations/src/client/initValClient.d.ts +6 -1
- package/dist/valbuild-tanstack.cjs.dev.js +89 -39
- package/dist/valbuild-tanstack.cjs.prod.js +89 -39
- package/dist/valbuild-tanstack.esm.js +91 -41
- package/dist/{version-4d538d73.cjs.prod.js → version-0e3d1c9d.cjs.prod.js} +1 -1
- package/dist/{version-68f1a577.esm.js → version-65630089.esm.js} +1 -1
- package/dist/{version-4909c2c7.cjs.dev.js → version-ca7e184f.cjs.dev.js} +1 -1
- package/package.json +7 -7
- package/server/dist/valbuild-tanstack-server.cjs.dev.js +3 -2
- package/server/dist/valbuild-tanstack-server.cjs.prod.js +3 -2
- package/server/dist/valbuild-tanstack-server.esm.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @valbuild/tanstack
|
|
2
2
|
|
|
3
|
+
## 0.153.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1031](https://github.com/valbuild/val/pull/1031) [`6ec1a5d`](https://github.com/valbuild/val/commit/6ec1a5d244f0d6e064eca4135f167dfa79744f9a) Thanks [@freekh](https://github.com/freekh)! - A page no longer shows content made for code it does not have yet. When the Studio is ahead of the page (it picked up a code change first, or the browser is still running the previous build), the page keeps showing its own content for the modules whose schema changed, and says "The code changed" with a **Reload** button — in the overlay on your site, and above the page in the Studio. In local development the page usually catches up a moment later by itself, and the notice goes away without a reload.
|
|
8
|
+
- Updated dependencies [[`6ec1a5d`](https://github.com/valbuild/val/commit/6ec1a5d244f0d6e064eca4135f167dfa79744f9a), [`f1048d9`](https://github.com/valbuild/val/commit/f1048d93a76138d031b30d059c444a8f754b484d), [`b14870b`](https://github.com/valbuild/val/commit/b14870bebdc128234bb16e4ea06a0151d18c4771)]:
|
|
9
|
+
- @valbuild/react@0.153.1
|
|
10
|
+
- @valbuild/shared@0.153.1
|
|
11
|
+
- @valbuild/ui@0.153.1
|
|
12
|
+
- @valbuild/server@0.153.1
|
|
13
|
+
- @valbuild/language-server@0.153.1
|
|
14
|
+
- @valbuild/mcp@0.153.1
|
|
15
|
+
|
|
3
16
|
## 0.153.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _typeof = require('../../dist/typeof-bd6ec82c.cjs.dev.js');
|
|
5
6
|
var core = require('@valbuild/core');
|
|
6
7
|
var internal = require('@valbuild/react/internal');
|
|
8
|
+
var internal$1 = require('@valbuild/shared/internal');
|
|
7
9
|
var React = require('react');
|
|
8
|
-
var ValOverlayContext = require('../../dist/ValOverlayContext-
|
|
10
|
+
var ValOverlayContext = require('../../dist/ValOverlayContext-81efbc82.cjs.dev.js');
|
|
9
11
|
var routeFromVal = require('../../dist/routeFromVal-3d4d7c30.cjs.dev.js');
|
|
10
12
|
require('react/jsx-runtime');
|
|
11
|
-
require('../../dist/typeof-bd6ec82c.cjs.dev.js');
|
|
12
13
|
require('@valbuild/shared/client');
|
|
13
14
|
|
|
14
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -80,15 +81,23 @@ function useEncodesEditTags(context) {
|
|
|
80
81
|
*/
|
|
81
82
|
function pageReadEnv(state, encode) {
|
|
82
83
|
var _state$draftSourcesSy;
|
|
83
|
-
return {
|
|
84
|
+
return _typeof._objectSpread2({
|
|
84
85
|
sources: [internal.overlaySource(state.store, {
|
|
85
86
|
draftMode: state.draftMode,
|
|
86
87
|
suspend: state.suspend,
|
|
87
88
|
draftModeReady: state.draftModeReady,
|
|
88
89
|
synced: (_state$draftSourcesSy = state.draftSourcesSynced) !== null && _state$draftSourcesSy !== void 0 ? _state$draftSourcesSy : false
|
|
89
90
|
}), internal.snapshotSource(state.snapshot)],
|
|
90
|
-
encode: encode
|
|
91
|
-
|
|
91
|
+
encode: encode,
|
|
92
|
+
// The rule the server readers apply: a module the Studio relays made with
|
|
93
|
+
// another schema than this page's code has is not read with it. A Studio
|
|
94
|
+
// ahead of this build (hot reload first, or staged code it evaluated)
|
|
95
|
+
// sends content for code this page does not run; the page keeps its
|
|
96
|
+
// bundle's, and says the code changed (`schemaChecked`).
|
|
97
|
+
schemaVersionOf: internal$1.readerSchemaVersion
|
|
98
|
+
}, state.schemaChecked !== undefined ? {
|
|
99
|
+
schemaChecked: state.schemaChecked
|
|
100
|
+
} : {});
|
|
92
101
|
}
|
|
93
102
|
|
|
94
103
|
/**
|
|
@@ -102,7 +111,8 @@ function useReadEnv() {
|
|
|
102
111
|
draftMode = context.draftMode,
|
|
103
112
|
suspend = context.suspend,
|
|
104
113
|
draftModeReady = context.draftModeReady,
|
|
105
|
-
draftSourcesSynced = context.draftSourcesSynced
|
|
114
|
+
draftSourcesSynced = context.draftSourcesSynced,
|
|
115
|
+
schemaChecked = context.schemaChecked;
|
|
106
116
|
var snapshot = context.snapshot;
|
|
107
117
|
return React__default["default"].useMemo(function () {
|
|
108
118
|
return pageReadEnv({
|
|
@@ -111,9 +121,10 @@ function useReadEnv() {
|
|
|
111
121
|
suspend: suspend,
|
|
112
122
|
draftModeReady: draftModeReady,
|
|
113
123
|
draftSourcesSynced: draftSourcesSynced,
|
|
124
|
+
schemaChecked: schemaChecked,
|
|
114
125
|
snapshot: snapshot
|
|
115
126
|
}, encode);
|
|
116
|
-
}, [store, draftMode, suspend, draftModeReady, draftSourcesSynced, snapshot, encode]);
|
|
127
|
+
}, [store, draftMode, suspend, draftModeReady, draftSourcesSynced, schemaChecked, snapshot, encode]);
|
|
117
128
|
}
|
|
118
129
|
|
|
119
130
|
/** What `useVal` gives back — see `ResolvedVal` in `@valbuild/react/stega`. */
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _typeof = require('../../dist/typeof-56656438.cjs.prod.js');
|
|
5
6
|
var core = require('@valbuild/core');
|
|
6
7
|
var internal = require('@valbuild/react/internal');
|
|
8
|
+
var internal$1 = require('@valbuild/shared/internal');
|
|
7
9
|
var React = require('react');
|
|
8
|
-
var ValOverlayContext = require('../../dist/ValOverlayContext-
|
|
10
|
+
var ValOverlayContext = require('../../dist/ValOverlayContext-dec6d4bd.cjs.prod.js');
|
|
9
11
|
var routeFromVal = require('../../dist/routeFromVal-2e834397.cjs.prod.js');
|
|
10
12
|
require('react/jsx-runtime');
|
|
11
|
-
require('../../dist/typeof-56656438.cjs.prod.js');
|
|
12
13
|
require('@valbuild/shared/client');
|
|
13
14
|
|
|
14
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -80,15 +81,23 @@ function useEncodesEditTags(context) {
|
|
|
80
81
|
*/
|
|
81
82
|
function pageReadEnv(state, encode) {
|
|
82
83
|
var _state$draftSourcesSy;
|
|
83
|
-
return {
|
|
84
|
+
return _typeof._objectSpread2({
|
|
84
85
|
sources: [internal.overlaySource(state.store, {
|
|
85
86
|
draftMode: state.draftMode,
|
|
86
87
|
suspend: state.suspend,
|
|
87
88
|
draftModeReady: state.draftModeReady,
|
|
88
89
|
synced: (_state$draftSourcesSy = state.draftSourcesSynced) !== null && _state$draftSourcesSy !== void 0 ? _state$draftSourcesSy : false
|
|
89
90
|
}), internal.snapshotSource(state.snapshot)],
|
|
90
|
-
encode: encode
|
|
91
|
-
|
|
91
|
+
encode: encode,
|
|
92
|
+
// The rule the server readers apply: a module the Studio relays made with
|
|
93
|
+
// another schema than this page's code has is not read with it. A Studio
|
|
94
|
+
// ahead of this build (hot reload first, or staged code it evaluated)
|
|
95
|
+
// sends content for code this page does not run; the page keeps its
|
|
96
|
+
// bundle's, and says the code changed (`schemaChecked`).
|
|
97
|
+
schemaVersionOf: internal$1.readerSchemaVersion
|
|
98
|
+
}, state.schemaChecked !== undefined ? {
|
|
99
|
+
schemaChecked: state.schemaChecked
|
|
100
|
+
} : {});
|
|
92
101
|
}
|
|
93
102
|
|
|
94
103
|
/**
|
|
@@ -102,7 +111,8 @@ function useReadEnv() {
|
|
|
102
111
|
draftMode = context.draftMode,
|
|
103
112
|
suspend = context.suspend,
|
|
104
113
|
draftModeReady = context.draftModeReady,
|
|
105
|
-
draftSourcesSynced = context.draftSourcesSynced
|
|
114
|
+
draftSourcesSynced = context.draftSourcesSynced,
|
|
115
|
+
schemaChecked = context.schemaChecked;
|
|
106
116
|
var snapshot = context.snapshot;
|
|
107
117
|
return React__default["default"].useMemo(function () {
|
|
108
118
|
return pageReadEnv({
|
|
@@ -111,9 +121,10 @@ function useReadEnv() {
|
|
|
111
121
|
suspend: suspend,
|
|
112
122
|
draftModeReady: draftModeReady,
|
|
113
123
|
draftSourcesSynced: draftSourcesSynced,
|
|
124
|
+
schemaChecked: schemaChecked,
|
|
114
125
|
snapshot: snapshot
|
|
115
126
|
}, encode);
|
|
116
|
-
}, [store, draftMode, suspend, draftModeReady, draftSourcesSynced, snapshot, encode]);
|
|
127
|
+
}, [store, draftMode, suspend, draftModeReady, draftSourcesSynced, schemaChecked, snapshot, encode]);
|
|
117
128
|
}
|
|
118
129
|
|
|
119
130
|
/** What `useVal` gives back — see `ResolvedVal` in `@valbuild/react/stega`. */
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { _ as _objectSpread2 } from '../../dist/typeof-3e1a1d11.esm.js';
|
|
1
2
|
import { Internal } from '@valbuild/core';
|
|
2
3
|
import { useResolvedVal, useResolvedEntry, useResolved, isJsonValuesRecordSchema, mapResolution, resolveModuleEntry, resolveVal, overlaySource, snapshotSource } from '@valbuild/react/internal';
|
|
4
|
+
import { readerSchemaVersion } from '@valbuild/shared/internal';
|
|
3
5
|
import React from 'react';
|
|
4
|
-
import { u as useValOverlayContext } from '../../dist/ValOverlayContext-
|
|
6
|
+
import { u as useValOverlayContext } from '../../dist/ValOverlayContext-bd2f453c.esm.js';
|
|
5
7
|
import { g as getValRouteUrlFromVal, i as initValRouteFromVal } from '../../dist/routeFromVal-124235a5.esm.js';
|
|
6
8
|
import 'react/jsx-runtime';
|
|
7
|
-
import '../../dist/typeof-3e1a1d11.esm.js';
|
|
8
9
|
import '@valbuild/shared/client';
|
|
9
10
|
|
|
10
11
|
var subscribeNever = function subscribeNever() {
|
|
@@ -72,15 +73,23 @@ function useEncodesEditTags(context) {
|
|
|
72
73
|
*/
|
|
73
74
|
function pageReadEnv(state, encode) {
|
|
74
75
|
var _state$draftSourcesSy;
|
|
75
|
-
return {
|
|
76
|
+
return _objectSpread2({
|
|
76
77
|
sources: [overlaySource(state.store, {
|
|
77
78
|
draftMode: state.draftMode,
|
|
78
79
|
suspend: state.suspend,
|
|
79
80
|
draftModeReady: state.draftModeReady,
|
|
80
81
|
synced: (_state$draftSourcesSy = state.draftSourcesSynced) !== null && _state$draftSourcesSy !== void 0 ? _state$draftSourcesSy : false
|
|
81
82
|
}), snapshotSource(state.snapshot)],
|
|
82
|
-
encode: encode
|
|
83
|
-
|
|
83
|
+
encode: encode,
|
|
84
|
+
// The rule the server readers apply: a module the Studio relays made with
|
|
85
|
+
// another schema than this page's code has is not read with it. A Studio
|
|
86
|
+
// ahead of this build (hot reload first, or staged code it evaluated)
|
|
87
|
+
// sends content for code this page does not run; the page keeps its
|
|
88
|
+
// bundle's, and says the code changed (`schemaChecked`).
|
|
89
|
+
schemaVersionOf: readerSchemaVersion
|
|
90
|
+
}, state.schemaChecked !== undefined ? {
|
|
91
|
+
schemaChecked: state.schemaChecked
|
|
92
|
+
} : {});
|
|
84
93
|
}
|
|
85
94
|
|
|
86
95
|
/**
|
|
@@ -94,7 +103,8 @@ function useReadEnv() {
|
|
|
94
103
|
draftMode = context.draftMode,
|
|
95
104
|
suspend = context.suspend,
|
|
96
105
|
draftModeReady = context.draftModeReady,
|
|
97
|
-
draftSourcesSynced = context.draftSourcesSynced
|
|
106
|
+
draftSourcesSynced = context.draftSourcesSynced,
|
|
107
|
+
schemaChecked = context.schemaChecked;
|
|
98
108
|
var snapshot = context.snapshot;
|
|
99
109
|
return React.useMemo(function () {
|
|
100
110
|
return pageReadEnv({
|
|
@@ -103,9 +113,10 @@ function useReadEnv() {
|
|
|
103
113
|
suspend: suspend,
|
|
104
114
|
draftModeReady: draftModeReady,
|
|
105
115
|
draftSourcesSynced: draftSourcesSynced,
|
|
116
|
+
schemaChecked: schemaChecked,
|
|
106
117
|
snapshot: snapshot
|
|
107
118
|
}, encode);
|
|
108
|
-
}, [store, draftMode, suspend, draftModeReady, draftSourcesSynced, snapshot, encode]);
|
|
119
|
+
}, [store, draftMode, suspend, draftModeReady, draftSourcesSynced, schemaChecked, snapshot, encode]);
|
|
109
120
|
}
|
|
110
121
|
|
|
111
122
|
/** What `useVal` gives back — see `ResolvedVal` in `@valbuild/react/stega`. */
|
package/dist/{ValOverlayContext-1e50a557.cjs.prod.js → ValOverlayContext-81efbc82.cjs.dev.js}
RENAMED
|
@@ -17,6 +17,7 @@ var ValOverlayContext = /*#__PURE__*/React__default["default"].createContext({
|
|
|
17
17
|
});
|
|
18
18
|
function ValOverlayProvider(_ref) {
|
|
19
19
|
var store = _ref.store,
|
|
20
|
+
schemaChecked = _ref.schemaChecked,
|
|
20
21
|
draftMode = _ref.draftMode,
|
|
21
22
|
suspend = _ref.suspend,
|
|
22
23
|
draftModeReady = _ref.draftModeReady,
|
|
@@ -28,6 +29,7 @@ function ValOverlayProvider(_ref) {
|
|
|
28
29
|
return /*#__PURE__*/jsxRuntime.jsx(ValOverlayContext.Provider, {
|
|
29
30
|
value: {
|
|
30
31
|
store: store,
|
|
32
|
+
schemaChecked: schemaChecked,
|
|
31
33
|
draftMode: draftMode,
|
|
32
34
|
suspend: suspend,
|
|
33
35
|
draftModeReady: draftModeReady,
|
|
@@ -11,6 +11,7 @@ var ValOverlayContext = /*#__PURE__*/React.createContext({
|
|
|
11
11
|
});
|
|
12
12
|
function ValOverlayProvider(_ref) {
|
|
13
13
|
var store = _ref.store,
|
|
14
|
+
schemaChecked = _ref.schemaChecked,
|
|
14
15
|
draftMode = _ref.draftMode,
|
|
15
16
|
suspend = _ref.suspend,
|
|
16
17
|
draftModeReady = _ref.draftModeReady,
|
|
@@ -22,6 +23,7 @@ function ValOverlayProvider(_ref) {
|
|
|
22
23
|
return /*#__PURE__*/jsx(ValOverlayContext.Provider, {
|
|
23
24
|
value: {
|
|
24
25
|
store: store,
|
|
26
|
+
schemaChecked: schemaChecked,
|
|
25
27
|
draftMode: draftMode,
|
|
26
28
|
suspend: suspend,
|
|
27
29
|
draftModeReady: draftModeReady,
|
package/dist/{ValOverlayContext-b18c2f18.cjs.dev.js → ValOverlayContext-dec6d4bd.cjs.prod.js}
RENAMED
|
@@ -17,6 +17,7 @@ var ValOverlayContext = /*#__PURE__*/React__default["default"].createContext({
|
|
|
17
17
|
});
|
|
18
18
|
function ValOverlayProvider(_ref) {
|
|
19
19
|
var store = _ref.store,
|
|
20
|
+
schemaChecked = _ref.schemaChecked,
|
|
20
21
|
draftMode = _ref.draftMode,
|
|
21
22
|
suspend = _ref.suspend,
|
|
22
23
|
draftModeReady = _ref.draftModeReady,
|
|
@@ -28,6 +29,7 @@ function ValOverlayProvider(_ref) {
|
|
|
28
29
|
return /*#__PURE__*/jsxRuntime.jsx(ValOverlayContext.Provider, {
|
|
29
30
|
value: {
|
|
30
31
|
store: store,
|
|
32
|
+
schemaChecked: schemaChecked,
|
|
31
33
|
draftMode: draftMode,
|
|
32
34
|
suspend: suspend,
|
|
33
35
|
draftModeReady: draftModeReady,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Json, type ModuleFilePath, type ResolvableModule, SelectorSource, type ValModule } from "@valbuild/core";
|
|
2
2
|
import { type JsonEntryContentOf, type Resolvable, type ResolvedVal, type RouteValueOf } from "@valbuild/react/stega";
|
|
3
|
-
import { type ReadEnv, type Resolution, type ValExternalStore } from "@valbuild/react/internal";
|
|
3
|
+
import { type ReadEnv, type SchemaRule, type Resolution, type ValExternalStore } from "@valbuild/react/internal";
|
|
4
4
|
import { ValConfig } from "@valbuild/core";
|
|
5
5
|
/** What the provider tells the hooks: `ValOverlayContext`'s value. */
|
|
6
6
|
export type PageReadState = {
|
|
@@ -9,6 +9,11 @@ export type PageReadState = {
|
|
|
9
9
|
suspend: boolean;
|
|
10
10
|
draftModeReady?: Promise<void>;
|
|
11
11
|
draftSourcesSynced?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Told whether each module the Studio relayed was made with this page's
|
|
14
|
+
* schema, so the provider can say when it was not (`codeChangedReporter`).
|
|
15
|
+
*/
|
|
16
|
+
schemaChecked?: SchemaRule["schemaChecked"];
|
|
12
17
|
snapshot?: Record<ModuleFilePath, Json>;
|
|
13
18
|
};
|
|
14
19
|
/**
|
|
@@ -6,12 +6,12 @@ var asyncToGenerator = require('./asyncToGenerator-c3823d62.cjs.dev.js');
|
|
|
6
6
|
var _typeof = require('./typeof-bd6ec82c.cjs.dev.js');
|
|
7
7
|
var core = require('@valbuild/core');
|
|
8
8
|
var stega = require('@valbuild/react/stega');
|
|
9
|
-
var version = require('./version-
|
|
9
|
+
var version = require('./version-ca7e184f.cjs.dev.js');
|
|
10
10
|
var internal = require('@valbuild/react/internal');
|
|
11
11
|
var ui = require('@valbuild/ui');
|
|
12
12
|
var reactRouter = require('@tanstack/react-router');
|
|
13
13
|
var React = require('react');
|
|
14
|
-
var ValOverlayContext = require('./ValOverlayContext-
|
|
14
|
+
var ValOverlayContext = require('./ValOverlayContext-81efbc82.cjs.dev.js');
|
|
15
15
|
var client = require('@valbuild/shared/client');
|
|
16
16
|
var jsxRuntime = require('react/jsx-runtime');
|
|
17
17
|
var demoServiceWorker = require('./demoServiceWorker-382e1b63.cjs.dev.js');
|
|
@@ -279,7 +279,8 @@ function ValCanvasBridge(_ref) {
|
|
|
279
279
|
var draftMode = _ref.draftMode,
|
|
280
280
|
isRefreshing = _ref.isRefreshing,
|
|
281
281
|
holds = _ref.holds,
|
|
282
|
-
holdsVersions = _ref.holdsVersions
|
|
282
|
+
holdsVersions = _ref.holdsVersions,
|
|
283
|
+
codeChanged = _ref.codeChanged;
|
|
283
284
|
var _React$useState = React__default["default"].useState(false),
|
|
284
285
|
_React$useState2 = _typeof._slicedToArray(_React$useState, 2),
|
|
285
286
|
picking = _React$useState2[0],
|
|
@@ -697,6 +698,34 @@ function ValCanvasBridge(_ref) {
|
|
|
697
698
|
};
|
|
698
699
|
}, [scan, post]);
|
|
699
700
|
|
|
701
|
+
// What the hooks could not read for its schema: the Studio says the code
|
|
702
|
+
// changed, with a reload. What was refused before the bridge mounted, then
|
|
703
|
+
// each change the page announces (`val-overlay-spa`, `codeChanged`).
|
|
704
|
+
React__default["default"].useEffect(function () {
|
|
705
|
+
var _codeChanged;
|
|
706
|
+
var already = (_codeChanged = codeChanged === null || codeChanged === void 0 ? void 0 : codeChanged()) !== null && _codeChanged !== void 0 ? _codeChanged : [];
|
|
707
|
+
if (already.length > 0) {
|
|
708
|
+
post({
|
|
709
|
+
val: client.VAL_CANVAS_MESSAGE,
|
|
710
|
+
type: "codeChanged",
|
|
711
|
+
modules: already
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
var listener = function listener(event) {
|
|
715
|
+
if (!(event instanceof CustomEvent)) return;
|
|
716
|
+
if (!client.isCodeChangedDetail(event.detail)) return;
|
|
717
|
+
post({
|
|
718
|
+
val: client.VAL_CANVAS_MESSAGE,
|
|
719
|
+
type: "codeChanged",
|
|
720
|
+
modules: event.detail.modules
|
|
721
|
+
});
|
|
722
|
+
};
|
|
723
|
+
window.addEventListener("val-overlay-spa", listener);
|
|
724
|
+
return function () {
|
|
725
|
+
return window.removeEventListener("val-overlay-spa", listener);
|
|
726
|
+
};
|
|
727
|
+
}, [codeChanged, post]);
|
|
728
|
+
|
|
700
729
|
// Where the page is, as it moves: a new build is opened there.
|
|
701
730
|
React__default["default"].useEffect(function () {
|
|
702
731
|
return client.watchPageLocation(window, function (location) {
|
|
@@ -1396,6 +1425,17 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1396
1425
|
var snapshot = initialDraft === null || initialDraft === void 0 ? void 0 : initialDraft.snapshot;
|
|
1397
1426
|
var liveSitePage = isLiveSitePage(initialDraft);
|
|
1398
1427
|
// TODO: move below into react package
|
|
1428
|
+
/*
|
|
1429
|
+
* Told by the hooks whether each relayed module was made with this page's
|
|
1430
|
+
* schema, and says so to the overlay (`codeChangedReporter`). One for the
|
|
1431
|
+
* life of the provider, so the hooks' env is not made again every render.
|
|
1432
|
+
* None on the server: nothing there is relayed.
|
|
1433
|
+
*/
|
|
1434
|
+
var _React$useState5 = React__default["default"].useState(function () {
|
|
1435
|
+
return typeof window === "undefined" ? undefined : internal.windowCodeChangedReporter();
|
|
1436
|
+
}),
|
|
1437
|
+
_React$useState6 = _typeof._slicedToArray(_React$useState5, 1),
|
|
1438
|
+
codeChanged = _React$useState6[0];
|
|
1399
1439
|
var valStore = React__default["default"].useMemo(function () {
|
|
1400
1440
|
return internal.createDraftStore(initialDraft);
|
|
1401
1441
|
}, [initialDraft]);
|
|
@@ -1424,10 +1464,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1424
1464
|
// transition: React keeps the static content visible while hooks suspend
|
|
1425
1465
|
// and then swaps to draft data as a normal update — no Suspense fallback
|
|
1426
1466
|
// flash and no hydration mismatch.
|
|
1427
|
-
var _React$
|
|
1428
|
-
_React$
|
|
1429
|
-
suspendActive = _React$
|
|
1430
|
-
setSuspendActive = _React$
|
|
1467
|
+
var _React$useState7 = React__default["default"].useState(false),
|
|
1468
|
+
_React$useState8 = _typeof._slicedToArray(_React$useState7, 2),
|
|
1469
|
+
suspendActive = _React$useState8[0],
|
|
1470
|
+
setSuspendActive = _React$useState8[1];
|
|
1431
1471
|
/**
|
|
1432
1472
|
* Whether the studio has said it sent everything it holds.
|
|
1433
1473
|
*
|
|
@@ -1438,14 +1478,14 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1438
1478
|
*/
|
|
1439
1479
|
// A server-read draft is everything there is: a module missing from it has
|
|
1440
1480
|
// no changes, so there is nothing more to wait for.
|
|
1441
|
-
var _React$
|
|
1442
|
-
_React$useState8 = _typeof._slicedToArray(_React$useState7, 2),
|
|
1443
|
-
draftSourcesSynced = _React$useState8[0],
|
|
1444
|
-
setDraftSourcesSynced = _React$useState8[1];
|
|
1445
|
-
var _React$useState9 = React__default["default"].useState(),
|
|
1481
|
+
var _React$useState9 = React__default["default"].useState(hasDraft),
|
|
1446
1482
|
_React$useState0 = _typeof._slicedToArray(_React$useState9, 2),
|
|
1447
|
-
|
|
1448
|
-
|
|
1483
|
+
draftSourcesSynced = _React$useState0[0],
|
|
1484
|
+
setDraftSourcesSynced = _React$useState0[1];
|
|
1485
|
+
var _React$useState1 = React__default["default"].useState(),
|
|
1486
|
+
_React$useState10 = _typeof._slicedToArray(_React$useState1, 2),
|
|
1487
|
+
mountOverlay = _React$useState10[0],
|
|
1488
|
+
setMountOverlay = _React$useState10[1];
|
|
1449
1489
|
/**
|
|
1450
1490
|
* Whether this document is the studio's canvas frame.
|
|
1451
1491
|
*
|
|
@@ -1459,16 +1499,16 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1459
1499
|
* Read once, in the same effect as `mountOverlay`: it is a property of how
|
|
1460
1500
|
* the document was loaded, and it cannot change without a navigation.
|
|
1461
1501
|
*/
|
|
1462
|
-
var _React$
|
|
1463
|
-
_React$
|
|
1464
|
-
isCanvas = _React$
|
|
1465
|
-
setIsCanvas = _React$
|
|
1502
|
+
var _React$useState11 = React__default["default"].useState(false),
|
|
1503
|
+
_React$useState12 = _typeof._slicedToArray(_React$useState11, 2),
|
|
1504
|
+
isCanvas = _React$useState12[0],
|
|
1505
|
+
setIsCanvas = _React$useState12[1];
|
|
1466
1506
|
// Known on the server when it read a draft: `fetchValDraft` only reads one
|
|
1467
1507
|
// in draft mode. Otherwise unknown until `/draft/stat` answers.
|
|
1468
|
-
var _React$
|
|
1469
|
-
_React$
|
|
1470
|
-
draftMode = _React$
|
|
1471
|
-
setDraftModeState = _React$
|
|
1508
|
+
var _React$useState13 = React__default["default"].useState(hasDraft ? true : null),
|
|
1509
|
+
_React$useState14 = _typeof._slicedToArray(_React$useState13, 2),
|
|
1510
|
+
draftMode = _React$useState14[0],
|
|
1511
|
+
setDraftModeState = _React$useState14[1];
|
|
1472
1512
|
/**
|
|
1473
1513
|
* `draftMode` as last set: what an answer from `/draft/stat` is compared
|
|
1474
1514
|
* with, to know whether it MOVED draft mode and so whether to refresh.
|
|
@@ -1521,10 +1561,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1521
1561
|
(_draftModeReady$curre = draftModeReady.current) === null || _draftModeReady$curre === void 0 || _draftModeReady$curre.resolve();
|
|
1522
1562
|
}
|
|
1523
1563
|
}, [draftMode]);
|
|
1524
|
-
var _React$
|
|
1525
|
-
_React$
|
|
1526
|
-
spaReady = _React$
|
|
1527
|
-
setSpaReady = _React$
|
|
1564
|
+
var _React$useState15 = React__default["default"].useState(false),
|
|
1565
|
+
_React$useState16 = _typeof._slicedToArray(_React$useState15, 2),
|
|
1566
|
+
spaReady = _React$useState16[0],
|
|
1567
|
+
setSpaReady = _React$useState16[1]; // TODO: consider removing spaReady - it is not used? If we remove, clean up the custom events that send the message too...
|
|
1528
1568
|
var router = reactRouter.useRouter();
|
|
1529
1569
|
var _React$useTransition = React__default["default"].useTransition(),
|
|
1530
1570
|
_React$useTransition2 = _typeof._slicedToArray(_React$useTransition, 2),
|
|
@@ -1536,10 +1576,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1536
1576
|
* is not rebuilt with it.
|
|
1537
1577
|
*/
|
|
1538
1578
|
var refreshLoopRef = React__default["default"].useRef(null);
|
|
1539
|
-
var _React$
|
|
1540
|
-
_React$
|
|
1541
|
-
iframeSrc = _React$
|
|
1542
|
-
setIframeSrc = _React$
|
|
1579
|
+
var _React$useState17 = React__default["default"].useState(null),
|
|
1580
|
+
_React$useState18 = _typeof._slicedToArray(_React$useState17, 2),
|
|
1581
|
+
iframeSrc = _React$useState18[0],
|
|
1582
|
+
setIframeSrc = _React$useState18[1];
|
|
1543
1583
|
var pathname = reactRouter.useRouterState({
|
|
1544
1584
|
select: function select(state) {
|
|
1545
1585
|
return state.location.pathname;
|
|
@@ -1853,6 +1893,14 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1853
1893
|
}
|
|
1854
1894
|
}));
|
|
1855
1895
|
}, [mountOverlay, draftMode, spaReady, holds, holdsVersions]);
|
|
1896
|
+
|
|
1897
|
+
// What the hooks could not read for its schema, said again once the
|
|
1898
|
+
// overlay listens: an announcement made before it loaded reached no one.
|
|
1899
|
+
React__default["default"].useEffect(function () {
|
|
1900
|
+
if (!mountOverlay || !spaReady || codeChanged === undefined) return;
|
|
1901
|
+
var modules = codeChanged.modules();
|
|
1902
|
+
if (modules.length > 0) internal.dispatchCodeChanged(modules);
|
|
1903
|
+
}, [mountOverlay, spaReady, codeChanged]);
|
|
1856
1904
|
React__default["default"].useEffect(function () {
|
|
1857
1905
|
if (!mountOverlay) {
|
|
1858
1906
|
// A visitor: only analytics tags content, and only after hydration
|
|
@@ -1926,10 +1974,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1926
1974
|
window.dispatchEvent(new CustomEvent("val-append-overlay"));
|
|
1927
1975
|
}
|
|
1928
1976
|
});
|
|
1929
|
-
var _React$
|
|
1930
|
-
_React$
|
|
1931
|
-
dropZone = _React$
|
|
1932
|
-
setDropZone = _React$
|
|
1977
|
+
var _React$useState19 = React__default["default"].useState(null),
|
|
1978
|
+
_React$useState20 = _typeof._slicedToArray(_React$useState19, 2),
|
|
1979
|
+
dropZone = _React$useState20[0],
|
|
1980
|
+
setDropZone = _React$useState20[1];
|
|
1933
1981
|
React__default["default"].useEffect(function () {
|
|
1934
1982
|
var storedDropZone = localStorage.getItem("val-menu-drop-zone-default");
|
|
1935
1983
|
if (storedDropZone) {
|
|
@@ -1942,10 +1990,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1942
1990
|
var initTheme = React__default["default"].useMemo(function () {
|
|
1943
1991
|
return initSessionTheme(props.config);
|
|
1944
1992
|
}, [props.config]);
|
|
1945
|
-
var _React$
|
|
1946
|
-
_React$
|
|
1947
|
-
spaLoaded = _React$
|
|
1948
|
-
setSpaLoaded = _React$
|
|
1993
|
+
var _React$useState21 = React__default["default"].useState(false),
|
|
1994
|
+
_React$useState22 = _typeof._slicedToArray(_React$useState21, 2),
|
|
1995
|
+
spaLoaded = _React$useState22[0],
|
|
1996
|
+
setSpaLoaded = _React$useState22[1];
|
|
1949
1997
|
React__default["default"].useEffect(function () {
|
|
1950
1998
|
var listener = function listener() {
|
|
1951
1999
|
setSpaLoaded(true);
|
|
@@ -1985,6 +2033,7 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1985
2033
|
};
|
|
1986
2034
|
}, [valPrefixedClass]);
|
|
1987
2035
|
return /*#__PURE__*/jsxRuntime.jsxs(ValOverlayContext.ValOverlayProvider, {
|
|
2036
|
+
schemaChecked: codeChanged === null || codeChanged === void 0 ? void 0 : codeChanged.schemaChecked,
|
|
1988
2037
|
draftMode: draftMode,
|
|
1989
2038
|
draftModeReady: (_draftModeReady$curre2 = draftModeReady.current) === null || _draftModeReady$curre2 === void 0 ? void 0 : _draftModeReady$curre2.promise,
|
|
1990
2039
|
draftSourcesSynced: draftSourcesSynced,
|
|
@@ -2051,7 +2100,8 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
2051
2100
|
draftMode: draftMode === true,
|
|
2052
2101
|
isRefreshing: isRefreshing,
|
|
2053
2102
|
holds: holds,
|
|
2054
|
-
holdsVersions: holdsVersions
|
|
2103
|
+
holdsVersions: holdsVersions,
|
|
2104
|
+
codeChanged: codeChanged === null || codeChanged === void 0 ? void 0 : codeChanged.modules
|
|
2055
2105
|
}), mountOverlay && iframeSrc && /*#__PURE__*/jsxRuntime.jsx("iframe", {
|
|
2056
2106
|
loading: "eager",
|
|
2057
2107
|
style: {
|
|
@@ -6,12 +6,12 @@ var asyncToGenerator = require('./asyncToGenerator-8e5c36c8.cjs.prod.js');
|
|
|
6
6
|
var _typeof = require('./typeof-56656438.cjs.prod.js');
|
|
7
7
|
var core = require('@valbuild/core');
|
|
8
8
|
var stega = require('@valbuild/react/stega');
|
|
9
|
-
var version = require('./version-
|
|
9
|
+
var version = require('./version-0e3d1c9d.cjs.prod.js');
|
|
10
10
|
var internal = require('@valbuild/react/internal');
|
|
11
11
|
var ui = require('@valbuild/ui');
|
|
12
12
|
var reactRouter = require('@tanstack/react-router');
|
|
13
13
|
var React = require('react');
|
|
14
|
-
var ValOverlayContext = require('./ValOverlayContext-
|
|
14
|
+
var ValOverlayContext = require('./ValOverlayContext-dec6d4bd.cjs.prod.js');
|
|
15
15
|
var client = require('@valbuild/shared/client');
|
|
16
16
|
var jsxRuntime = require('react/jsx-runtime');
|
|
17
17
|
var demoServiceWorker = require('./demoServiceWorker-994710f7.cjs.prod.js');
|
|
@@ -279,7 +279,8 @@ function ValCanvasBridge(_ref) {
|
|
|
279
279
|
var draftMode = _ref.draftMode,
|
|
280
280
|
isRefreshing = _ref.isRefreshing,
|
|
281
281
|
holds = _ref.holds,
|
|
282
|
-
holdsVersions = _ref.holdsVersions
|
|
282
|
+
holdsVersions = _ref.holdsVersions,
|
|
283
|
+
codeChanged = _ref.codeChanged;
|
|
283
284
|
var _React$useState = React__default["default"].useState(false),
|
|
284
285
|
_React$useState2 = _typeof._slicedToArray(_React$useState, 2),
|
|
285
286
|
picking = _React$useState2[0],
|
|
@@ -697,6 +698,34 @@ function ValCanvasBridge(_ref) {
|
|
|
697
698
|
};
|
|
698
699
|
}, [scan, post]);
|
|
699
700
|
|
|
701
|
+
// What the hooks could not read for its schema: the Studio says the code
|
|
702
|
+
// changed, with a reload. What was refused before the bridge mounted, then
|
|
703
|
+
// each change the page announces (`val-overlay-spa`, `codeChanged`).
|
|
704
|
+
React__default["default"].useEffect(function () {
|
|
705
|
+
var _codeChanged;
|
|
706
|
+
var already = (_codeChanged = codeChanged === null || codeChanged === void 0 ? void 0 : codeChanged()) !== null && _codeChanged !== void 0 ? _codeChanged : [];
|
|
707
|
+
if (already.length > 0) {
|
|
708
|
+
post({
|
|
709
|
+
val: client.VAL_CANVAS_MESSAGE,
|
|
710
|
+
type: "codeChanged",
|
|
711
|
+
modules: already
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
var listener = function listener(event) {
|
|
715
|
+
if (!(event instanceof CustomEvent)) return;
|
|
716
|
+
if (!client.isCodeChangedDetail(event.detail)) return;
|
|
717
|
+
post({
|
|
718
|
+
val: client.VAL_CANVAS_MESSAGE,
|
|
719
|
+
type: "codeChanged",
|
|
720
|
+
modules: event.detail.modules
|
|
721
|
+
});
|
|
722
|
+
};
|
|
723
|
+
window.addEventListener("val-overlay-spa", listener);
|
|
724
|
+
return function () {
|
|
725
|
+
return window.removeEventListener("val-overlay-spa", listener);
|
|
726
|
+
};
|
|
727
|
+
}, [codeChanged, post]);
|
|
728
|
+
|
|
700
729
|
// Where the page is, as it moves: a new build is opened there.
|
|
701
730
|
React__default["default"].useEffect(function () {
|
|
702
731
|
return client.watchPageLocation(window, function (location) {
|
|
@@ -1396,6 +1425,17 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1396
1425
|
var snapshot = initialDraft === null || initialDraft === void 0 ? void 0 : initialDraft.snapshot;
|
|
1397
1426
|
var liveSitePage = isLiveSitePage(initialDraft);
|
|
1398
1427
|
// TODO: move below into react package
|
|
1428
|
+
/*
|
|
1429
|
+
* Told by the hooks whether each relayed module was made with this page's
|
|
1430
|
+
* schema, and says so to the overlay (`codeChangedReporter`). One for the
|
|
1431
|
+
* life of the provider, so the hooks' env is not made again every render.
|
|
1432
|
+
* None on the server: nothing there is relayed.
|
|
1433
|
+
*/
|
|
1434
|
+
var _React$useState5 = React__default["default"].useState(function () {
|
|
1435
|
+
return typeof window === "undefined" ? undefined : internal.windowCodeChangedReporter();
|
|
1436
|
+
}),
|
|
1437
|
+
_React$useState6 = _typeof._slicedToArray(_React$useState5, 1),
|
|
1438
|
+
codeChanged = _React$useState6[0];
|
|
1399
1439
|
var valStore = React__default["default"].useMemo(function () {
|
|
1400
1440
|
return internal.createDraftStore(initialDraft);
|
|
1401
1441
|
}, [initialDraft]);
|
|
@@ -1424,10 +1464,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1424
1464
|
// transition: React keeps the static content visible while hooks suspend
|
|
1425
1465
|
// and then swaps to draft data as a normal update — no Suspense fallback
|
|
1426
1466
|
// flash and no hydration mismatch.
|
|
1427
|
-
var _React$
|
|
1428
|
-
_React$
|
|
1429
|
-
suspendActive = _React$
|
|
1430
|
-
setSuspendActive = _React$
|
|
1467
|
+
var _React$useState7 = React__default["default"].useState(false),
|
|
1468
|
+
_React$useState8 = _typeof._slicedToArray(_React$useState7, 2),
|
|
1469
|
+
suspendActive = _React$useState8[0],
|
|
1470
|
+
setSuspendActive = _React$useState8[1];
|
|
1431
1471
|
/**
|
|
1432
1472
|
* Whether the studio has said it sent everything it holds.
|
|
1433
1473
|
*
|
|
@@ -1438,14 +1478,14 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1438
1478
|
*/
|
|
1439
1479
|
// A server-read draft is everything there is: a module missing from it has
|
|
1440
1480
|
// no changes, so there is nothing more to wait for.
|
|
1441
|
-
var _React$
|
|
1442
|
-
_React$useState8 = _typeof._slicedToArray(_React$useState7, 2),
|
|
1443
|
-
draftSourcesSynced = _React$useState8[0],
|
|
1444
|
-
setDraftSourcesSynced = _React$useState8[1];
|
|
1445
|
-
var _React$useState9 = React__default["default"].useState(),
|
|
1481
|
+
var _React$useState9 = React__default["default"].useState(hasDraft),
|
|
1446
1482
|
_React$useState0 = _typeof._slicedToArray(_React$useState9, 2),
|
|
1447
|
-
|
|
1448
|
-
|
|
1483
|
+
draftSourcesSynced = _React$useState0[0],
|
|
1484
|
+
setDraftSourcesSynced = _React$useState0[1];
|
|
1485
|
+
var _React$useState1 = React__default["default"].useState(),
|
|
1486
|
+
_React$useState10 = _typeof._slicedToArray(_React$useState1, 2),
|
|
1487
|
+
mountOverlay = _React$useState10[0],
|
|
1488
|
+
setMountOverlay = _React$useState10[1];
|
|
1449
1489
|
/**
|
|
1450
1490
|
* Whether this document is the studio's canvas frame.
|
|
1451
1491
|
*
|
|
@@ -1459,16 +1499,16 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1459
1499
|
* Read once, in the same effect as `mountOverlay`: it is a property of how
|
|
1460
1500
|
* the document was loaded, and it cannot change without a navigation.
|
|
1461
1501
|
*/
|
|
1462
|
-
var _React$
|
|
1463
|
-
_React$
|
|
1464
|
-
isCanvas = _React$
|
|
1465
|
-
setIsCanvas = _React$
|
|
1502
|
+
var _React$useState11 = React__default["default"].useState(false),
|
|
1503
|
+
_React$useState12 = _typeof._slicedToArray(_React$useState11, 2),
|
|
1504
|
+
isCanvas = _React$useState12[0],
|
|
1505
|
+
setIsCanvas = _React$useState12[1];
|
|
1466
1506
|
// Known on the server when it read a draft: `fetchValDraft` only reads one
|
|
1467
1507
|
// in draft mode. Otherwise unknown until `/draft/stat` answers.
|
|
1468
|
-
var _React$
|
|
1469
|
-
_React$
|
|
1470
|
-
draftMode = _React$
|
|
1471
|
-
setDraftModeState = _React$
|
|
1508
|
+
var _React$useState13 = React__default["default"].useState(hasDraft ? true : null),
|
|
1509
|
+
_React$useState14 = _typeof._slicedToArray(_React$useState13, 2),
|
|
1510
|
+
draftMode = _React$useState14[0],
|
|
1511
|
+
setDraftModeState = _React$useState14[1];
|
|
1472
1512
|
/**
|
|
1473
1513
|
* `draftMode` as last set: what an answer from `/draft/stat` is compared
|
|
1474
1514
|
* with, to know whether it MOVED draft mode and so whether to refresh.
|
|
@@ -1521,10 +1561,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1521
1561
|
(_draftModeReady$curre = draftModeReady.current) === null || _draftModeReady$curre === void 0 || _draftModeReady$curre.resolve();
|
|
1522
1562
|
}
|
|
1523
1563
|
}, [draftMode]);
|
|
1524
|
-
var _React$
|
|
1525
|
-
_React$
|
|
1526
|
-
spaReady = _React$
|
|
1527
|
-
setSpaReady = _React$
|
|
1564
|
+
var _React$useState15 = React__default["default"].useState(false),
|
|
1565
|
+
_React$useState16 = _typeof._slicedToArray(_React$useState15, 2),
|
|
1566
|
+
spaReady = _React$useState16[0],
|
|
1567
|
+
setSpaReady = _React$useState16[1]; // TODO: consider removing spaReady - it is not used? If we remove, clean up the custom events that send the message too...
|
|
1528
1568
|
var router = reactRouter.useRouter();
|
|
1529
1569
|
var _React$useTransition = React__default["default"].useTransition(),
|
|
1530
1570
|
_React$useTransition2 = _typeof._slicedToArray(_React$useTransition, 2),
|
|
@@ -1536,10 +1576,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1536
1576
|
* is not rebuilt with it.
|
|
1537
1577
|
*/
|
|
1538
1578
|
var refreshLoopRef = React__default["default"].useRef(null);
|
|
1539
|
-
var _React$
|
|
1540
|
-
_React$
|
|
1541
|
-
iframeSrc = _React$
|
|
1542
|
-
setIframeSrc = _React$
|
|
1579
|
+
var _React$useState17 = React__default["default"].useState(null),
|
|
1580
|
+
_React$useState18 = _typeof._slicedToArray(_React$useState17, 2),
|
|
1581
|
+
iframeSrc = _React$useState18[0],
|
|
1582
|
+
setIframeSrc = _React$useState18[1];
|
|
1543
1583
|
var pathname = reactRouter.useRouterState({
|
|
1544
1584
|
select: function select(state) {
|
|
1545
1585
|
return state.location.pathname;
|
|
@@ -1853,6 +1893,14 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1853
1893
|
}
|
|
1854
1894
|
}));
|
|
1855
1895
|
}, [mountOverlay, draftMode, spaReady, holds, holdsVersions]);
|
|
1896
|
+
|
|
1897
|
+
// What the hooks could not read for its schema, said again once the
|
|
1898
|
+
// overlay listens: an announcement made before it loaded reached no one.
|
|
1899
|
+
React__default["default"].useEffect(function () {
|
|
1900
|
+
if (!mountOverlay || !spaReady || codeChanged === undefined) return;
|
|
1901
|
+
var modules = codeChanged.modules();
|
|
1902
|
+
if (modules.length > 0) internal.dispatchCodeChanged(modules);
|
|
1903
|
+
}, [mountOverlay, spaReady, codeChanged]);
|
|
1856
1904
|
React__default["default"].useEffect(function () {
|
|
1857
1905
|
if (!mountOverlay) {
|
|
1858
1906
|
// A visitor: only analytics tags content, and only after hydration
|
|
@@ -1926,10 +1974,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1926
1974
|
window.dispatchEvent(new CustomEvent("val-append-overlay"));
|
|
1927
1975
|
}
|
|
1928
1976
|
});
|
|
1929
|
-
var _React$
|
|
1930
|
-
_React$
|
|
1931
|
-
dropZone = _React$
|
|
1932
|
-
setDropZone = _React$
|
|
1977
|
+
var _React$useState19 = React__default["default"].useState(null),
|
|
1978
|
+
_React$useState20 = _typeof._slicedToArray(_React$useState19, 2),
|
|
1979
|
+
dropZone = _React$useState20[0],
|
|
1980
|
+
setDropZone = _React$useState20[1];
|
|
1933
1981
|
React__default["default"].useEffect(function () {
|
|
1934
1982
|
var storedDropZone = localStorage.getItem("val-menu-drop-zone-default");
|
|
1935
1983
|
if (storedDropZone) {
|
|
@@ -1942,10 +1990,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1942
1990
|
var initTheme = React__default["default"].useMemo(function () {
|
|
1943
1991
|
return initSessionTheme(props.config);
|
|
1944
1992
|
}, [props.config]);
|
|
1945
|
-
var _React$
|
|
1946
|
-
_React$
|
|
1947
|
-
spaLoaded = _React$
|
|
1948
|
-
setSpaLoaded = _React$
|
|
1993
|
+
var _React$useState21 = React__default["default"].useState(false),
|
|
1994
|
+
_React$useState22 = _typeof._slicedToArray(_React$useState21, 2),
|
|
1995
|
+
spaLoaded = _React$useState22[0],
|
|
1996
|
+
setSpaLoaded = _React$useState22[1];
|
|
1949
1997
|
React__default["default"].useEffect(function () {
|
|
1950
1998
|
var listener = function listener() {
|
|
1951
1999
|
setSpaLoaded(true);
|
|
@@ -1985,6 +2033,7 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1985
2033
|
};
|
|
1986
2034
|
}, [valPrefixedClass]);
|
|
1987
2035
|
return /*#__PURE__*/jsxRuntime.jsxs(ValOverlayContext.ValOverlayProvider, {
|
|
2036
|
+
schemaChecked: codeChanged === null || codeChanged === void 0 ? void 0 : codeChanged.schemaChecked,
|
|
1988
2037
|
draftMode: draftMode,
|
|
1989
2038
|
draftModeReady: (_draftModeReady$curre2 = draftModeReady.current) === null || _draftModeReady$curre2 === void 0 ? void 0 : _draftModeReady$curre2.promise,
|
|
1990
2039
|
draftSourcesSynced: draftSourcesSynced,
|
|
@@ -2051,7 +2100,8 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
2051
2100
|
draftMode: draftMode === true,
|
|
2052
2101
|
isRefreshing: isRefreshing,
|
|
2053
2102
|
holds: holds,
|
|
2054
|
-
holdsVersions: holdsVersions
|
|
2103
|
+
holdsVersions: holdsVersions,
|
|
2104
|
+
codeChanged: codeChanged === null || codeChanged === void 0 ? void 0 : codeChanged.modules
|
|
2055
2105
|
}), mountOverlay && iframeSrc && /*#__PURE__*/jsxRuntime.jsx("iframe", {
|
|
2056
2106
|
loading: "eager",
|
|
2057
2107
|
style: {
|
|
@@ -5,14 +5,14 @@ import * as core from '@valbuild/core';
|
|
|
5
5
|
export { core as expr };
|
|
6
6
|
export { GenericSelector, Schema, VAL_EXTENSION, derefPatch, modules } from '@valbuild/core';
|
|
7
7
|
import { stegaEncode, stegaDecodeStrings, attrs, raw, isReactDevelopmentBuild, watchStegaLeaks, stegaLeakMessage, SET_AUTO_TAG_JSX_ENABLED, autoTagJSX } from '@valbuild/react/stega';
|
|
8
|
-
import { r as readValEnableCookie, V as VERSION$1 } from './version-
|
|
9
|
-
import { isDraft, createDraftStore, draftHolds, draftHoldsVersions, startRefreshLoop, applyValEvent } from '@valbuild/react/internal';
|
|
8
|
+
import { r as readValEnableCookie, V as VERSION$1 } from './version-65630089.esm.js';
|
|
9
|
+
import { isDraft, windowCodeChangedReporter, createDraftStore, draftHolds, draftHoldsVersions, startRefreshLoop, dispatchCodeChanged, applyValEvent } from '@valbuild/react/internal';
|
|
10
10
|
export { ValRichText } from '@valbuild/react/internal';
|
|
11
11
|
import { VERSION, VAL_APP_PATH, VAL_OVERLAY_ID, VAL_APP_ID } from '@valbuild/ui';
|
|
12
12
|
import { useRouter, useRouterState } from '@tanstack/react-router';
|
|
13
13
|
import React, { useEffect, useRef, useState } from 'react';
|
|
14
|
-
import { V as ValOverlayProvider } from './ValOverlayContext-
|
|
15
|
-
import { VAL_CONFIG_SESSION_STORAGE_KEY, VAL_THEME_SESSION_STORAGE_KEY, VAL_CANVAS_MESSAGE, watchPageLocation, startElementPicking, DEFAULT_CANVAS_SELECTION, DEFAULT_CANVAS_SELECTION_SOFT, isValCanvasStudioMessage, restoreScroll, storeQuickPreview, QUICK_PREVIEW_SERVICE_WORKER_PATH, screenshotPage, readPageSnapshot, isValCanvasFrame } from '@valbuild/shared/client';
|
|
14
|
+
import { V as ValOverlayProvider } from './ValOverlayContext-bd2f453c.esm.js';
|
|
15
|
+
import { VAL_CONFIG_SESSION_STORAGE_KEY, VAL_THEME_SESSION_STORAGE_KEY, VAL_CANVAS_MESSAGE, watchPageLocation, startElementPicking, DEFAULT_CANVAS_SELECTION, DEFAULT_CANVAS_SELECTION_SOFT, isValCanvasStudioMessage, restoreScroll, storeQuickPreview, QUICK_PREVIEW_SERVICE_WORKER_PATH, isCodeChangedDetail, screenshotPage, readPageSnapshot, isValCanvasFrame } from '@valbuild/shared/client';
|
|
16
16
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
17
17
|
import { D as DEMO_CLAIM_MESSAGE, a as DEMO_SERVICE_WORKER_PATH, b as DEMO_RELAY_MESSAGE } from './demoServiceWorker-56fd96cf.esm.js';
|
|
18
18
|
|
|
@@ -256,7 +256,8 @@ function ValCanvasBridge(_ref) {
|
|
|
256
256
|
var draftMode = _ref.draftMode,
|
|
257
257
|
isRefreshing = _ref.isRefreshing,
|
|
258
258
|
holds = _ref.holds,
|
|
259
|
-
holdsVersions = _ref.holdsVersions
|
|
259
|
+
holdsVersions = _ref.holdsVersions,
|
|
260
|
+
codeChanged = _ref.codeChanged;
|
|
260
261
|
var _React$useState = React.useState(false),
|
|
261
262
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
262
263
|
picking = _React$useState2[0],
|
|
@@ -674,6 +675,34 @@ function ValCanvasBridge(_ref) {
|
|
|
674
675
|
};
|
|
675
676
|
}, [scan, post]);
|
|
676
677
|
|
|
678
|
+
// What the hooks could not read for its schema: the Studio says the code
|
|
679
|
+
// changed, with a reload. What was refused before the bridge mounted, then
|
|
680
|
+
// each change the page announces (`val-overlay-spa`, `codeChanged`).
|
|
681
|
+
React.useEffect(function () {
|
|
682
|
+
var _codeChanged;
|
|
683
|
+
var already = (_codeChanged = codeChanged === null || codeChanged === void 0 ? void 0 : codeChanged()) !== null && _codeChanged !== void 0 ? _codeChanged : [];
|
|
684
|
+
if (already.length > 0) {
|
|
685
|
+
post({
|
|
686
|
+
val: VAL_CANVAS_MESSAGE,
|
|
687
|
+
type: "codeChanged",
|
|
688
|
+
modules: already
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
var listener = function listener(event) {
|
|
692
|
+
if (!(event instanceof CustomEvent)) return;
|
|
693
|
+
if (!isCodeChangedDetail(event.detail)) return;
|
|
694
|
+
post({
|
|
695
|
+
val: VAL_CANVAS_MESSAGE,
|
|
696
|
+
type: "codeChanged",
|
|
697
|
+
modules: event.detail.modules
|
|
698
|
+
});
|
|
699
|
+
};
|
|
700
|
+
window.addEventListener("val-overlay-spa", listener);
|
|
701
|
+
return function () {
|
|
702
|
+
return window.removeEventListener("val-overlay-spa", listener);
|
|
703
|
+
};
|
|
704
|
+
}, [codeChanged, post]);
|
|
705
|
+
|
|
677
706
|
// Where the page is, as it moves: a new build is opened there.
|
|
678
707
|
React.useEffect(function () {
|
|
679
708
|
return watchPageLocation(window, function (location) {
|
|
@@ -1373,6 +1402,17 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1373
1402
|
var snapshot = initialDraft === null || initialDraft === void 0 ? void 0 : initialDraft.snapshot;
|
|
1374
1403
|
var liveSitePage = isLiveSitePage(initialDraft);
|
|
1375
1404
|
// TODO: move below into react package
|
|
1405
|
+
/*
|
|
1406
|
+
* Told by the hooks whether each relayed module was made with this page's
|
|
1407
|
+
* schema, and says so to the overlay (`codeChangedReporter`). One for the
|
|
1408
|
+
* life of the provider, so the hooks' env is not made again every render.
|
|
1409
|
+
* None on the server: nothing there is relayed.
|
|
1410
|
+
*/
|
|
1411
|
+
var _React$useState5 = React.useState(function () {
|
|
1412
|
+
return typeof window === "undefined" ? undefined : windowCodeChangedReporter();
|
|
1413
|
+
}),
|
|
1414
|
+
_React$useState6 = _slicedToArray(_React$useState5, 1),
|
|
1415
|
+
codeChanged = _React$useState6[0];
|
|
1376
1416
|
var valStore = React.useMemo(function () {
|
|
1377
1417
|
return createDraftStore(initialDraft);
|
|
1378
1418
|
}, [initialDraft]);
|
|
@@ -1401,10 +1441,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1401
1441
|
// transition: React keeps the static content visible while hooks suspend
|
|
1402
1442
|
// and then swaps to draft data as a normal update — no Suspense fallback
|
|
1403
1443
|
// flash and no hydration mismatch.
|
|
1404
|
-
var _React$
|
|
1405
|
-
_React$
|
|
1406
|
-
suspendActive = _React$
|
|
1407
|
-
setSuspendActive = _React$
|
|
1444
|
+
var _React$useState7 = React.useState(false),
|
|
1445
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
1446
|
+
suspendActive = _React$useState8[0],
|
|
1447
|
+
setSuspendActive = _React$useState8[1];
|
|
1408
1448
|
/**
|
|
1409
1449
|
* Whether the studio has said it sent everything it holds.
|
|
1410
1450
|
*
|
|
@@ -1415,14 +1455,14 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1415
1455
|
*/
|
|
1416
1456
|
// A server-read draft is everything there is: a module missing from it has
|
|
1417
1457
|
// no changes, so there is nothing more to wait for.
|
|
1418
|
-
var _React$
|
|
1419
|
-
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
1420
|
-
draftSourcesSynced = _React$useState8[0],
|
|
1421
|
-
setDraftSourcesSynced = _React$useState8[1];
|
|
1422
|
-
var _React$useState9 = React.useState(),
|
|
1458
|
+
var _React$useState9 = React.useState(hasDraft),
|
|
1423
1459
|
_React$useState0 = _slicedToArray(_React$useState9, 2),
|
|
1424
|
-
|
|
1425
|
-
|
|
1460
|
+
draftSourcesSynced = _React$useState0[0],
|
|
1461
|
+
setDraftSourcesSynced = _React$useState0[1];
|
|
1462
|
+
var _React$useState1 = React.useState(),
|
|
1463
|
+
_React$useState10 = _slicedToArray(_React$useState1, 2),
|
|
1464
|
+
mountOverlay = _React$useState10[0],
|
|
1465
|
+
setMountOverlay = _React$useState10[1];
|
|
1426
1466
|
/**
|
|
1427
1467
|
* Whether this document is the studio's canvas frame.
|
|
1428
1468
|
*
|
|
@@ -1436,16 +1476,16 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1436
1476
|
* Read once, in the same effect as `mountOverlay`: it is a property of how
|
|
1437
1477
|
* the document was loaded, and it cannot change without a navigation.
|
|
1438
1478
|
*/
|
|
1439
|
-
var _React$
|
|
1440
|
-
_React$
|
|
1441
|
-
isCanvas = _React$
|
|
1442
|
-
setIsCanvas = _React$
|
|
1479
|
+
var _React$useState11 = React.useState(false),
|
|
1480
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
1481
|
+
isCanvas = _React$useState12[0],
|
|
1482
|
+
setIsCanvas = _React$useState12[1];
|
|
1443
1483
|
// Known on the server when it read a draft: `fetchValDraft` only reads one
|
|
1444
1484
|
// in draft mode. Otherwise unknown until `/draft/stat` answers.
|
|
1445
|
-
var _React$
|
|
1446
|
-
_React$
|
|
1447
|
-
draftMode = _React$
|
|
1448
|
-
setDraftModeState = _React$
|
|
1485
|
+
var _React$useState13 = React.useState(hasDraft ? true : null),
|
|
1486
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
1487
|
+
draftMode = _React$useState14[0],
|
|
1488
|
+
setDraftModeState = _React$useState14[1];
|
|
1449
1489
|
/**
|
|
1450
1490
|
* `draftMode` as last set: what an answer from `/draft/stat` is compared
|
|
1451
1491
|
* with, to know whether it MOVED draft mode and so whether to refresh.
|
|
@@ -1498,10 +1538,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1498
1538
|
(_draftModeReady$curre = draftModeReady.current) === null || _draftModeReady$curre === void 0 || _draftModeReady$curre.resolve();
|
|
1499
1539
|
}
|
|
1500
1540
|
}, [draftMode]);
|
|
1501
|
-
var _React$
|
|
1502
|
-
_React$
|
|
1503
|
-
spaReady = _React$
|
|
1504
|
-
setSpaReady = _React$
|
|
1541
|
+
var _React$useState15 = React.useState(false),
|
|
1542
|
+
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
1543
|
+
spaReady = _React$useState16[0],
|
|
1544
|
+
setSpaReady = _React$useState16[1]; // TODO: consider removing spaReady - it is not used? If we remove, clean up the custom events that send the message too...
|
|
1505
1545
|
var router = useRouter();
|
|
1506
1546
|
var _React$useTransition = React.useTransition(),
|
|
1507
1547
|
_React$useTransition2 = _slicedToArray(_React$useTransition, 2),
|
|
@@ -1513,10 +1553,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1513
1553
|
* is not rebuilt with it.
|
|
1514
1554
|
*/
|
|
1515
1555
|
var refreshLoopRef = React.useRef(null);
|
|
1516
|
-
var _React$
|
|
1517
|
-
_React$
|
|
1518
|
-
iframeSrc = _React$
|
|
1519
|
-
setIframeSrc = _React$
|
|
1556
|
+
var _React$useState17 = React.useState(null),
|
|
1557
|
+
_React$useState18 = _slicedToArray(_React$useState17, 2),
|
|
1558
|
+
iframeSrc = _React$useState18[0],
|
|
1559
|
+
setIframeSrc = _React$useState18[1];
|
|
1520
1560
|
var pathname = useRouterState({
|
|
1521
1561
|
select: function select(state) {
|
|
1522
1562
|
return state.location.pathname;
|
|
@@ -1830,6 +1870,14 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1830
1870
|
}
|
|
1831
1871
|
}));
|
|
1832
1872
|
}, [mountOverlay, draftMode, spaReady, holds, holdsVersions]);
|
|
1873
|
+
|
|
1874
|
+
// What the hooks could not read for its schema, said again once the
|
|
1875
|
+
// overlay listens: an announcement made before it loaded reached no one.
|
|
1876
|
+
React.useEffect(function () {
|
|
1877
|
+
if (!mountOverlay || !spaReady || codeChanged === undefined) return;
|
|
1878
|
+
var modules = codeChanged.modules();
|
|
1879
|
+
if (modules.length > 0) dispatchCodeChanged(modules);
|
|
1880
|
+
}, [mountOverlay, spaReady, codeChanged]);
|
|
1833
1881
|
React.useEffect(function () {
|
|
1834
1882
|
if (!mountOverlay) {
|
|
1835
1883
|
// A visitor: only analytics tags content, and only after hydration
|
|
@@ -1903,10 +1951,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1903
1951
|
window.dispatchEvent(new CustomEvent("val-append-overlay"));
|
|
1904
1952
|
}
|
|
1905
1953
|
});
|
|
1906
|
-
var _React$
|
|
1907
|
-
_React$
|
|
1908
|
-
dropZone = _React$
|
|
1909
|
-
setDropZone = _React$
|
|
1954
|
+
var _React$useState19 = React.useState(null),
|
|
1955
|
+
_React$useState20 = _slicedToArray(_React$useState19, 2),
|
|
1956
|
+
dropZone = _React$useState20[0],
|
|
1957
|
+
setDropZone = _React$useState20[1];
|
|
1910
1958
|
React.useEffect(function () {
|
|
1911
1959
|
var storedDropZone = localStorage.getItem("val-menu-drop-zone-default");
|
|
1912
1960
|
if (storedDropZone) {
|
|
@@ -1919,10 +1967,10 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1919
1967
|
var initTheme = React.useMemo(function () {
|
|
1920
1968
|
return initSessionTheme(props.config);
|
|
1921
1969
|
}, [props.config]);
|
|
1922
|
-
var _React$
|
|
1923
|
-
_React$
|
|
1924
|
-
spaLoaded = _React$
|
|
1925
|
-
setSpaLoaded = _React$
|
|
1970
|
+
var _React$useState21 = React.useState(false),
|
|
1971
|
+
_React$useState22 = _slicedToArray(_React$useState21, 2),
|
|
1972
|
+
spaLoaded = _React$useState22[0],
|
|
1973
|
+
setSpaLoaded = _React$useState22[1];
|
|
1926
1974
|
React.useEffect(function () {
|
|
1927
1975
|
var listener = function listener() {
|
|
1928
1976
|
setSpaLoaded(true);
|
|
@@ -1962,6 +2010,7 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
1962
2010
|
};
|
|
1963
2011
|
}, [valPrefixedClass]);
|
|
1964
2012
|
return /*#__PURE__*/jsxs(ValOverlayProvider, {
|
|
2013
|
+
schemaChecked: codeChanged === null || codeChanged === void 0 ? void 0 : codeChanged.schemaChecked,
|
|
1965
2014
|
draftMode: draftMode,
|
|
1966
2015
|
draftModeReady: (_draftModeReady$curre2 = draftModeReady.current) === null || _draftModeReady$curre2 === void 0 ? void 0 : _draftModeReady$curre2.promise,
|
|
1967
2016
|
draftSourcesSynced: draftSourcesSynced,
|
|
@@ -2028,7 +2077,8 @@ var ValTanStackProvider = function ValTanStackProvider(props) {
|
|
|
2028
2077
|
draftMode: draftMode === true,
|
|
2029
2078
|
isRefreshing: isRefreshing,
|
|
2030
2079
|
holds: holds,
|
|
2031
|
-
holdsVersions: holdsVersions
|
|
2080
|
+
holdsVersions: holdsVersions,
|
|
2081
|
+
codeChanged: codeChanged === null || codeChanged === void 0 ? void 0 : codeChanged.modules
|
|
2032
2082
|
}), mountOverlay && iframeSrc && /*#__PURE__*/jsx("iframe", {
|
|
2033
2083
|
loading: "eager",
|
|
2034
2084
|
style: {
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"tanstack-router",
|
|
15
15
|
"react"
|
|
16
16
|
],
|
|
17
|
-
"version": "0.153.
|
|
17
|
+
"version": "0.153.1",
|
|
18
18
|
"main": "dist/valbuild-tanstack.cjs.js",
|
|
19
19
|
"module": "dist/valbuild-tanstack.esm.js",
|
|
20
20
|
"exports": {
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@valbuild/core": "0.153.0",
|
|
56
|
-
"@valbuild/language-server": "0.153.
|
|
57
|
-
"@valbuild/mcp": "0.153.
|
|
58
|
-
"@valbuild/
|
|
59
|
-
"@valbuild/
|
|
60
|
-
"@valbuild/
|
|
61
|
-
"@valbuild/ui": "0.153.
|
|
56
|
+
"@valbuild/language-server": "0.153.1",
|
|
57
|
+
"@valbuild/mcp": "0.153.1",
|
|
58
|
+
"@valbuild/react": "0.153.1",
|
|
59
|
+
"@valbuild/server": "0.153.1",
|
|
60
|
+
"@valbuild/shared": "0.153.1",
|
|
61
|
+
"@valbuild/ui": "0.153.1"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@tanstack/react-router": "^1.170.41",
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = require('../../dist/version-
|
|
5
|
+
var version = require('../../dist/version-ca7e184f.cjs.dev.js');
|
|
6
6
|
var asyncToGenerator = require('../../dist/asyncToGenerator-c3823d62.cjs.dev.js');
|
|
7
7
|
var core = require('@valbuild/core');
|
|
8
8
|
var _typeof = require('../../dist/typeof-bd6ec82c.cjs.dev.js');
|
|
9
9
|
var server = require('@valbuild/server');
|
|
10
10
|
var stega = require('@valbuild/react/stega');
|
|
11
11
|
var internal$1 = require('@valbuild/react/internal');
|
|
12
|
+
var internal$2 = require('@valbuild/shared/internal');
|
|
12
13
|
var internal = require('@valbuild/server/internal');
|
|
13
14
|
var routeFromVal = require('../../dist/routeFromVal-3d4d7c30.cjs.dev.js');
|
|
14
15
|
var mcp = require('@valbuild/mcp');
|
|
@@ -359,7 +360,7 @@ function requestEnv(enabled, draft, snapshot) {
|
|
|
359
360
|
return {
|
|
360
361
|
sources: draft === null ? [internal$1.snapshotSource(snapshot)] : [draft, internal$1.snapshotSource(snapshot)],
|
|
361
362
|
encode: enabled,
|
|
362
|
-
schemaVersionOf: internal.readerSchemaVersion
|
|
363
|
+
schemaVersionOf: internal$2.readerSchemaVersion
|
|
363
364
|
};
|
|
364
365
|
}
|
|
365
366
|
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = require('../../dist/version-
|
|
5
|
+
var version = require('../../dist/version-0e3d1c9d.cjs.prod.js');
|
|
6
6
|
var asyncToGenerator = require('../../dist/asyncToGenerator-8e5c36c8.cjs.prod.js');
|
|
7
7
|
var core = require('@valbuild/core');
|
|
8
8
|
var _typeof = require('../../dist/typeof-56656438.cjs.prod.js');
|
|
9
9
|
var server = require('@valbuild/server');
|
|
10
10
|
var stega = require('@valbuild/react/stega');
|
|
11
11
|
var internal$1 = require('@valbuild/react/internal');
|
|
12
|
+
var internal$2 = require('@valbuild/shared/internal');
|
|
12
13
|
var internal = require('@valbuild/server/internal');
|
|
13
14
|
var routeFromVal = require('../../dist/routeFromVal-2e834397.cjs.prod.js');
|
|
14
15
|
var mcp = require('@valbuild/mcp');
|
|
@@ -359,7 +360,7 @@ function requestEnv(enabled, draft, snapshot) {
|
|
|
359
360
|
return {
|
|
360
361
|
sources: draft === null ? [internal$1.snapshotSource(snapshot)] : [draft, internal$1.snapshotSource(snapshot)],
|
|
361
362
|
encode: enabled,
|
|
362
|
-
schemaVersionOf: internal.readerSchemaVersion
|
|
363
|
+
schemaVersionOf: internal$2.readerSchemaVersion
|
|
363
364
|
};
|
|
364
365
|
}
|
|
365
366
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VERSION, s as setValEnableCookieReader } from '../../dist/version-
|
|
1
|
+
import { V as VERSION, s as setValEnableCookieReader } from '../../dist/version-65630089.esm.js';
|
|
2
2
|
import { _ as _asyncToGenerator, a as _regenerator } from '../../dist/asyncToGenerator-500f022f.esm.js';
|
|
3
3
|
import { Internal } from '@valbuild/core';
|
|
4
4
|
import { _ as _objectSpread2, a as _slicedToArray } from '../../dist/typeof-3e1a1d11.esm.js';
|
|
@@ -6,7 +6,8 @@ import { createValApiRouter, createValServer, layeredSnapshot, proposalSnapshotF
|
|
|
6
6
|
export { InMemoryPatchStore, createPrettierFormatter } from '@valbuild/server';
|
|
7
7
|
import { SET_AUTO_TAG_JSX_ENABLED } from '@valbuild/react/stega';
|
|
8
8
|
import { fetchValFrom, isJsonValuesRecordSchema, awaitResolved, resolveValEntry, snapshotSource, resolveVal } from '@valbuild/react/internal';
|
|
9
|
-
import {
|
|
9
|
+
import { readerSchemaVersion } from '@valbuild/shared/internal';
|
|
10
|
+
import { createValRuntime, proposalAsBuilt, servingBuildOf, draftForRequest, readDraftChanges } from '@valbuild/server/internal';
|
|
10
11
|
import { i as initValRouteFromVal, g as getValRouteUrlFromVal } from '../../dist/routeFromVal-124235a5.esm.js';
|
|
11
12
|
import { initValMcp as initValMcp$1 } from '@valbuild/mcp';
|
|
12
13
|
import '@valbuild/shared/client';
|