@valbuild/shared 0.150.10 → 0.150.11

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/client/dist/valbuild-shared-client.cjs.dev.js +16 -2
  3. package/client/dist/valbuild-shared-client.cjs.prod.js +16 -2
  4. package/client/dist/valbuild-shared-client.esm.js +2 -2
  5. package/dist/{acquireTypes-dd976839.cjs.prod.js → acquireTypes-6250a305.cjs.prod.js} +46 -46
  6. package/dist/{acquireTypes-6e2f7961.esm.js → acquireTypes-c2227b23.esm.js} +2 -2
  7. package/dist/{acquireTypes-84a4077a.cjs.dev.js → acquireTypes-c9e757a1.cjs.dev.js} +46 -46
  8. package/dist/{slicedToArray-22567815.esm.js → createForOfIteratorHelper-9b80f1a2.esm.js} +136 -106
  9. package/dist/{slicedToArray-d99b4e2e.cjs.prod.js → createForOfIteratorHelper-9ca2078d.cjs.prod.js} +142 -111
  10. package/dist/{slicedToArray-c8a29f6b.cjs.dev.js → createForOfIteratorHelper-f2d7ac6d.cjs.dev.js} +142 -111
  11. package/dist/declarations/src/client/index.d.ts +2 -0
  12. package/dist/declarations/src/internal/ApiRoutes.d.ts +1 -0
  13. package/dist/declarations/src/internal/index.d.ts +2 -0
  14. package/dist/declarations/src/internal/pageInspection.d.ts +117 -0
  15. package/dist/declarations/src/internal/quickPreview.d.ts +91 -0
  16. package/dist/declarations/src/internal/valCanvasProtocol.d.ts +53 -0
  17. package/dist/declarations/src/publish/buildProposal.d.ts +16 -1
  18. package/dist/declarations/src/publish/buildQuickPreview.d.ts +46 -0
  19. package/dist/declarations/src/publish/index.d.ts +3 -2
  20. package/dist/declarations/src/publish/runStudioDeploy.d.ts +10 -0
  21. package/dist/getSitemapTree-5354ce90.cjs.prod.js +1421 -0
  22. package/dist/getSitemapTree-97b3166f.esm.js +1381 -0
  23. package/dist/getSitemapTree-d934ff9c.cjs.dev.js +1421 -0
  24. package/dist/{proposalProject-689c24cc.esm.js → proposalProject-5da177d5.esm.js} +1 -2
  25. package/dist/{proposalProject-926f2c68.cjs.dev.js → proposalProject-76caa377.cjs.prod.js} +2 -3
  26. package/dist/{proposalProject-fab0c026.cjs.prod.js → proposalProject-81fee08f.cjs.dev.js} +2 -3
  27. package/dist/{protocol-7ddc1a71.esm.js → protocol-55cfa3cf.esm.js} +1 -1
  28. package/dist/{protocol-4e2a455b.cjs.prod.js → protocol-b1055ef0.cjs.prod.js} +6 -6
  29. package/dist/{protocol-ac1c3ec7.cjs.dev.js → protocol-d0efb8cd.cjs.dev.js} +6 -6
  30. package/dist/wrapNativeSuper-639b12b7.esm.js +107 -0
  31. package/dist/wrapNativeSuper-8673414f.cjs.prod.js +113 -0
  32. package/dist/wrapNativeSuper-933f991e.cjs.dev.js +113 -0
  33. package/internal/dist/valbuild-shared-internal.cjs.dev.js +53 -34
  34. package/internal/dist/valbuild-shared-internal.cjs.prod.js +53 -34
  35. package/internal/dist/valbuild-shared-internal.esm.js +11 -6
  36. package/package.json +1 -1
  37. package/publish/dist/valbuild-shared-publish.cjs.dev.js +589 -237
  38. package/publish/dist/valbuild-shared-publish.cjs.prod.js +589 -237
  39. package/publish/dist/valbuild-shared-publish.esm.js +504 -155
  40. package/typecheck/dist/valbuild-shared-typecheck.cjs.dev.js +34 -34
  41. package/typecheck/dist/valbuild-shared-typecheck.cjs.prod.js +34 -34
  42. package/typecheck/dist/valbuild-shared-typecheck.esm.js +5 -5
  43. package/typecheck/testing/dist/valbuild-shared-typecheck-testing.cjs.dev.js +7 -7
  44. package/typecheck/testing/dist/valbuild-shared-typecheck-testing.cjs.prod.js +7 -7
  45. package/typecheck/testing/dist/valbuild-shared-typecheck-testing.esm.js +3 -3
  46. package/dist/createForOfIteratorHelper-666a6d17.esm.js +0 -137
  47. package/dist/createForOfIteratorHelper-87a33eff.cjs.dev.js +0 -145
  48. package/dist/createForOfIteratorHelper-fef4fa7d.cjs.prod.js +0 -145
  49. package/dist/getSitemapTree-873f7266.cjs.prod.js +0 -743
  50. package/dist/getSitemapTree-b6161fd8.esm.js +0 -717
  51. package/dist/getSitemapTree-be70d9fc.cjs.dev.js +0 -743
@@ -1,6 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var createForOfIteratorHelper = require('./createForOfIteratorHelper-fef4fa7d.cjs.prod.js');
3
+ function _typeof(o) {
4
+ "@babel/helpers - typeof";
5
+
6
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
+ return typeof o;
8
+ } : function (o) {
9
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
+ }, _typeof(o);
11
+ }
4
12
 
5
13
  function _regeneratorDefine(e, r, n, t) {
6
14
  var i = Object.defineProperty;
@@ -138,110 +146,6 @@ function _asyncToGenerator(n) {
138
146
  };
139
147
  }
140
148
 
141
- function _defineProperties(e, r) {
142
- for (var t = 0; t < r.length; t++) {
143
- var o = r[t];
144
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, createForOfIteratorHelper._toPropertyKey(o.key), o);
145
- }
146
- }
147
- function _createClass(e, r, t) {
148
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
149
- writable: !1
150
- }), e;
151
- }
152
-
153
- function _classCallCheck(a, n) {
154
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
155
- }
156
-
157
- function _getPrototypeOf(t) {
158
- return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
159
- return t.__proto__ || Object.getPrototypeOf(t);
160
- }, _getPrototypeOf(t);
161
- }
162
-
163
- function _isNativeReflectConstruct() {
164
- try {
165
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
166
- } catch (t) {}
167
- return (_isNativeReflectConstruct = function () {
168
- return !!t;
169
- })();
170
- }
171
-
172
- function _assertThisInitialized(e) {
173
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
174
- return e;
175
- }
176
-
177
- function _possibleConstructorReturn(t, e) {
178
- if (e && ("object" == typeof e || "function" == typeof e)) return e;
179
- if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
180
- return _assertThisInitialized(t);
181
- }
182
-
183
- function _callSuper(t, o, e) {
184
- return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
185
- }
186
-
187
- function _setPrototypeOf(t, e) {
188
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
189
- return t.__proto__ = e, t;
190
- }, _setPrototypeOf(t, e);
191
- }
192
-
193
- function _inherits(t, e) {
194
- if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
195
- t.prototype = Object.create(e && e.prototype, {
196
- constructor: {
197
- value: t,
198
- writable: !0,
199
- configurable: !0
200
- }
201
- }), Object.defineProperty(t, "prototype", {
202
- writable: !1
203
- }), e && _setPrototypeOf(t, e);
204
- }
205
-
206
- function _isNativeFunction(t) {
207
- try {
208
- return -1 !== Function.toString.call(t).indexOf("[native code]");
209
- } catch (n) {
210
- return "function" == typeof t;
211
- }
212
- }
213
-
214
- function _construct(t, e, r) {
215
- if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
216
- var o = [null];
217
- o.push.apply(o, e);
218
- var p = new (t.bind.apply(t, o))();
219
- return r && _setPrototypeOf(p, r.prototype), p;
220
- }
221
-
222
- function _wrapNativeSuper(t) {
223
- var r = "function" == typeof Map ? new Map() : void 0;
224
- return _wrapNativeSuper = function (t) {
225
- if (null === t || !_isNativeFunction(t)) return t;
226
- if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
227
- if (void 0 !== r) {
228
- if (r.has(t)) return r.get(t);
229
- r.set(t, Wrapper);
230
- }
231
- function Wrapper() {
232
- return _construct(t, arguments, _getPrototypeOf(this).constructor);
233
- }
234
- return Wrapper.prototype = Object.create(t.prototype, {
235
- constructor: {
236
- value: Wrapper,
237
- enumerable: !1,
238
- writable: !0,
239
- configurable: !0
240
- }
241
- }), _setPrototypeOf(Wrapper, t);
242
- }, _wrapNativeSuper(t);
243
- }
244
-
245
149
  function _arrayWithHoles(r) {
246
150
  if (Array.isArray(r)) return r;
247
151
  }
@@ -274,19 +178,146 @@ function _iterableToArrayLimit(r, l) {
274
178
  }
275
179
  }
276
180
 
181
+ function _arrayLikeToArray(r, a) {
182
+ (null == a || a > r.length) && (a = r.length);
183
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
184
+ return n;
185
+ }
186
+
187
+ function _unsupportedIterableToArray(r, a) {
188
+ if (r) {
189
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
190
+ var t = {}.toString.call(r).slice(8, -1);
191
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
192
+ }
193
+ }
194
+
277
195
  function _nonIterableRest() {
278
196
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
279
197
  }
280
198
 
281
199
  function _slicedToArray(r, e) {
282
- return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || createForOfIteratorHelper._unsupportedIterableToArray(r, e) || _nonIterableRest();
200
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
201
+ }
202
+
203
+ function _arrayWithoutHoles(r) {
204
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
205
+ }
206
+
207
+ function _iterableToArray(r) {
208
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
209
+ }
210
+
211
+ function _nonIterableSpread() {
212
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
213
+ }
214
+
215
+ function _toConsumableArray(r) {
216
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
217
+ }
218
+
219
+ function _toPrimitive(t, r) {
220
+ if ("object" != typeof t || !t) return t;
221
+ var e = t[Symbol.toPrimitive];
222
+ if (void 0 !== e) {
223
+ var i = e.call(t, r || "default");
224
+ if ("object" != typeof i) return i;
225
+ throw new TypeError("@@toPrimitive must return a primitive value.");
226
+ }
227
+ return ("string" === r ? String : Number)(t);
228
+ }
229
+
230
+ function _toPropertyKey(t) {
231
+ var i = _toPrimitive(t, "string");
232
+ return "symbol" == typeof i ? i : i + "";
233
+ }
234
+
235
+ function _defineProperty(e, r, t) {
236
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
237
+ value: t,
238
+ enumerable: !0,
239
+ configurable: !0,
240
+ writable: !0
241
+ }) : e[r] = t, e;
242
+ }
243
+
244
+ function ownKeys(e, r) {
245
+ var t = Object.keys(e);
246
+ if (Object.getOwnPropertySymbols) {
247
+ var o = Object.getOwnPropertySymbols(e);
248
+ r && (o = o.filter(function (r) {
249
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
250
+ })), t.push.apply(t, o);
251
+ }
252
+ return t;
253
+ }
254
+ function _objectSpread2(e) {
255
+ for (var r = 1; r < arguments.length; r++) {
256
+ var t = null != arguments[r] ? arguments[r] : {};
257
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
258
+ _defineProperty(e, r, t[r]);
259
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
260
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
261
+ });
262
+ }
263
+ return e;
264
+ }
265
+
266
+ function _createForOfIteratorHelper(r, e) {
267
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
268
+ if (!t) {
269
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
270
+ t && (r = t);
271
+ var n = 0,
272
+ F = function () {};
273
+ return {
274
+ s: F,
275
+ n: function () {
276
+ return n >= r.length ? {
277
+ done: !0
278
+ } : {
279
+ done: !1,
280
+ value: r[n++]
281
+ };
282
+ },
283
+ e: function (r) {
284
+ throw r;
285
+ },
286
+ f: F
287
+ };
288
+ }
289
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
290
+ }
291
+ var o,
292
+ a = !0,
293
+ u = !1;
294
+ return {
295
+ s: function () {
296
+ t = t.call(r);
297
+ },
298
+ n: function () {
299
+ var r = t.next();
300
+ return a = r.done, r;
301
+ },
302
+ e: function (r) {
303
+ u = !0, o = r;
304
+ },
305
+ f: function () {
306
+ try {
307
+ a || null == t.return || t.return();
308
+ } finally {
309
+ if (u) throw o;
310
+ }
311
+ }
312
+ };
283
313
  }
284
314
 
285
315
  exports._asyncToGenerator = _asyncToGenerator;
286
- exports._callSuper = _callSuper;
287
- exports._classCallCheck = _classCallCheck;
288
- exports._createClass = _createClass;
289
- exports._inherits = _inherits;
316
+ exports._createForOfIteratorHelper = _createForOfIteratorHelper;
317
+ exports._defineProperty = _defineProperty;
318
+ exports._objectSpread2 = _objectSpread2;
290
319
  exports._regenerator = _regenerator;
291
320
  exports._slicedToArray = _slicedToArray;
292
- exports._wrapNativeSuper = _wrapNativeSuper;
321
+ exports._toConsumableArray = _toConsumableArray;
322
+ exports._toPropertyKey = _toPropertyKey;
323
+ exports._typeof = _typeof;
@@ -1,6 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var createForOfIteratorHelper = require('./createForOfIteratorHelper-87a33eff.cjs.dev.js');
3
+ function _typeof(o) {
4
+ "@babel/helpers - typeof";
5
+
6
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
+ return typeof o;
8
+ } : function (o) {
9
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
+ }, _typeof(o);
11
+ }
4
12
 
5
13
  function _regeneratorDefine(e, r, n, t) {
6
14
  var i = Object.defineProperty;
@@ -138,110 +146,6 @@ function _asyncToGenerator(n) {
138
146
  };
139
147
  }
140
148
 
141
- function _defineProperties(e, r) {
142
- for (var t = 0; t < r.length; t++) {
143
- var o = r[t];
144
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, createForOfIteratorHelper._toPropertyKey(o.key), o);
145
- }
146
- }
147
- function _createClass(e, r, t) {
148
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
149
- writable: !1
150
- }), e;
151
- }
152
-
153
- function _classCallCheck(a, n) {
154
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
155
- }
156
-
157
- function _getPrototypeOf(t) {
158
- return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
159
- return t.__proto__ || Object.getPrototypeOf(t);
160
- }, _getPrototypeOf(t);
161
- }
162
-
163
- function _isNativeReflectConstruct() {
164
- try {
165
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
166
- } catch (t) {}
167
- return (_isNativeReflectConstruct = function () {
168
- return !!t;
169
- })();
170
- }
171
-
172
- function _assertThisInitialized(e) {
173
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
174
- return e;
175
- }
176
-
177
- function _possibleConstructorReturn(t, e) {
178
- if (e && ("object" == typeof e || "function" == typeof e)) return e;
179
- if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
180
- return _assertThisInitialized(t);
181
- }
182
-
183
- function _callSuper(t, o, e) {
184
- return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
185
- }
186
-
187
- function _setPrototypeOf(t, e) {
188
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
189
- return t.__proto__ = e, t;
190
- }, _setPrototypeOf(t, e);
191
- }
192
-
193
- function _inherits(t, e) {
194
- if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
195
- t.prototype = Object.create(e && e.prototype, {
196
- constructor: {
197
- value: t,
198
- writable: !0,
199
- configurable: !0
200
- }
201
- }), Object.defineProperty(t, "prototype", {
202
- writable: !1
203
- }), e && _setPrototypeOf(t, e);
204
- }
205
-
206
- function _isNativeFunction(t) {
207
- try {
208
- return -1 !== Function.toString.call(t).indexOf("[native code]");
209
- } catch (n) {
210
- return "function" == typeof t;
211
- }
212
- }
213
-
214
- function _construct(t, e, r) {
215
- if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
216
- var o = [null];
217
- o.push.apply(o, e);
218
- var p = new (t.bind.apply(t, o))();
219
- return r && _setPrototypeOf(p, r.prototype), p;
220
- }
221
-
222
- function _wrapNativeSuper(t) {
223
- var r = "function" == typeof Map ? new Map() : void 0;
224
- return _wrapNativeSuper = function (t) {
225
- if (null === t || !_isNativeFunction(t)) return t;
226
- if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
227
- if (void 0 !== r) {
228
- if (r.has(t)) return r.get(t);
229
- r.set(t, Wrapper);
230
- }
231
- function Wrapper() {
232
- return _construct(t, arguments, _getPrototypeOf(this).constructor);
233
- }
234
- return Wrapper.prototype = Object.create(t.prototype, {
235
- constructor: {
236
- value: Wrapper,
237
- enumerable: !1,
238
- writable: !0,
239
- configurable: !0
240
- }
241
- }), _setPrototypeOf(Wrapper, t);
242
- }, _wrapNativeSuper(t);
243
- }
244
-
245
149
  function _arrayWithHoles(r) {
246
150
  if (Array.isArray(r)) return r;
247
151
  }
@@ -274,19 +178,146 @@ function _iterableToArrayLimit(r, l) {
274
178
  }
275
179
  }
276
180
 
181
+ function _arrayLikeToArray(r, a) {
182
+ (null == a || a > r.length) && (a = r.length);
183
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
184
+ return n;
185
+ }
186
+
187
+ function _unsupportedIterableToArray(r, a) {
188
+ if (r) {
189
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
190
+ var t = {}.toString.call(r).slice(8, -1);
191
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
192
+ }
193
+ }
194
+
277
195
  function _nonIterableRest() {
278
196
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
279
197
  }
280
198
 
281
199
  function _slicedToArray(r, e) {
282
- return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || createForOfIteratorHelper._unsupportedIterableToArray(r, e) || _nonIterableRest();
200
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
201
+ }
202
+
203
+ function _arrayWithoutHoles(r) {
204
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
205
+ }
206
+
207
+ function _iterableToArray(r) {
208
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
209
+ }
210
+
211
+ function _nonIterableSpread() {
212
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
213
+ }
214
+
215
+ function _toConsumableArray(r) {
216
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
217
+ }
218
+
219
+ function _toPrimitive(t, r) {
220
+ if ("object" != typeof t || !t) return t;
221
+ var e = t[Symbol.toPrimitive];
222
+ if (void 0 !== e) {
223
+ var i = e.call(t, r || "default");
224
+ if ("object" != typeof i) return i;
225
+ throw new TypeError("@@toPrimitive must return a primitive value.");
226
+ }
227
+ return ("string" === r ? String : Number)(t);
228
+ }
229
+
230
+ function _toPropertyKey(t) {
231
+ var i = _toPrimitive(t, "string");
232
+ return "symbol" == typeof i ? i : i + "";
233
+ }
234
+
235
+ function _defineProperty(e, r, t) {
236
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
237
+ value: t,
238
+ enumerable: !0,
239
+ configurable: !0,
240
+ writable: !0
241
+ }) : e[r] = t, e;
242
+ }
243
+
244
+ function ownKeys(e, r) {
245
+ var t = Object.keys(e);
246
+ if (Object.getOwnPropertySymbols) {
247
+ var o = Object.getOwnPropertySymbols(e);
248
+ r && (o = o.filter(function (r) {
249
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
250
+ })), t.push.apply(t, o);
251
+ }
252
+ return t;
253
+ }
254
+ function _objectSpread2(e) {
255
+ for (var r = 1; r < arguments.length; r++) {
256
+ var t = null != arguments[r] ? arguments[r] : {};
257
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
258
+ _defineProperty(e, r, t[r]);
259
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
260
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
261
+ });
262
+ }
263
+ return e;
264
+ }
265
+
266
+ function _createForOfIteratorHelper(r, e) {
267
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
268
+ if (!t) {
269
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
270
+ t && (r = t);
271
+ var n = 0,
272
+ F = function () {};
273
+ return {
274
+ s: F,
275
+ n: function () {
276
+ return n >= r.length ? {
277
+ done: !0
278
+ } : {
279
+ done: !1,
280
+ value: r[n++]
281
+ };
282
+ },
283
+ e: function (r) {
284
+ throw r;
285
+ },
286
+ f: F
287
+ };
288
+ }
289
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
290
+ }
291
+ var o,
292
+ a = !0,
293
+ u = !1;
294
+ return {
295
+ s: function () {
296
+ t = t.call(r);
297
+ },
298
+ n: function () {
299
+ var r = t.next();
300
+ return a = r.done, r;
301
+ },
302
+ e: function (r) {
303
+ u = !0, o = r;
304
+ },
305
+ f: function () {
306
+ try {
307
+ a || null == t.return || t.return();
308
+ } finally {
309
+ if (u) throw o;
310
+ }
311
+ }
312
+ };
283
313
  }
284
314
 
285
315
  exports._asyncToGenerator = _asyncToGenerator;
286
- exports._callSuper = _callSuper;
287
- exports._classCallCheck = _classCallCheck;
288
- exports._createClass = _createClass;
289
- exports._inherits = _inherits;
316
+ exports._createForOfIteratorHelper = _createForOfIteratorHelper;
317
+ exports._defineProperty = _defineProperty;
318
+ exports._objectSpread2 = _objectSpread2;
290
319
  exports._regenerator = _regenerator;
291
320
  exports._slicedToArray = _slicedToArray;
292
- exports._wrapNativeSuper = _wrapNativeSuper;
321
+ exports._toConsumableArray = _toConsumableArray;
322
+ exports._toPropertyKey = _toPropertyKey;
323
+ exports._typeof = _typeof;
@@ -17,6 +17,8 @@
17
17
  export * from "../internal/sessionStorage.js";
18
18
  export * from "../internal/valCanvasProtocol.js";
19
19
  export * from "../internal/elementPicker.js";
20
+ export * from "../internal/pageInspection.js";
21
+ export * from "../internal/quickPreview.js";
20
22
  export * from "../internal/parseRoutePattern.js";
21
23
  export * from "../internal/getNextAppRouterSourceFolder.js";
22
24
  export * from "../internal/getSitemapTree.js";
@@ -2157,6 +2157,7 @@ export declare const Api: {
2157
2157
  height: z.ZodNumber;
2158
2158
  mimeType: z.ZodString;
2159
2159
  }, z.core.$strip>;
2160
+ sha256: z.ZodOptional<z.ZodString>;
2160
2161
  }, z.core.$strip>>;
2161
2162
  }, z.core.$strip>;
2162
2163
  }, z.core.$strip>, z.ZodObject<{
@@ -25,6 +25,8 @@ export * from "./getErrorMessageFromUnknownJson.js";
25
25
  export * from "./zod/SerializedSchema.js";
26
26
  export * from "./valCanvasProtocol.js";
27
27
  export * from "./elementPicker.js";
28
+ export * from "./pageInspection.js";
29
+ export * from "./quickPreview.js";
28
30
  export * from "./emptyOf.js";
29
31
  export * from "./aiTools/toolNames.js";
30
32
  export * from "./aiTools/aiImageToolPatches.js";
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Looking at a page from the design tab (valbuild/home `docs/design-tab.md`):
3
+ * where it is -- its path and scroll, so a new build opens at the same place
4
+ * -- and what is on it, so the assistant can check its own change
5
+ * (`read_page`).
6
+ *
7
+ * Plain DOM and in `shared` for the reason `elementPicker.ts` is: the canvas
8
+ * bridge (`@valbuild/next`, `@valbuild/tanstack`) runs it inside the
9
+ * proposal's page, which is another origin than the tab and the only place
10
+ * the page can be read. Only what is returned here crosses the frame
11
+ * (`valCanvasProtocol.ts`).
12
+ */
13
+ /** Where the page is: what a new build is opened at. */
14
+ export type PageLocation = {
15
+ /** Its path and query, without the canvas's own parameter. */
16
+ path: string;
17
+ scrollX: number;
18
+ scrollY: number;
19
+ };
20
+ /** A box on the page, in CSS pixels from the top of the document. */
21
+ export type PageBox = {
22
+ x: number;
23
+ y: number;
24
+ width: number;
25
+ height: number;
26
+ };
27
+ /** One thing a reader would notice on the page, in document order. */
28
+ export type PageOutlineItem = {
29
+ kind: "heading" | "text" | "link" | "button" | "image" | "input" | "section";
30
+ tag: string;
31
+ /** How to find it again: `read_page` with this `selector`. */
32
+ selector: string;
33
+ /** The words in it, shortened. Absent for an image or an empty element. */
34
+ text?: string;
35
+ /** `h1` is 1. */
36
+ level?: number;
37
+ href?: string;
38
+ alt?: string;
39
+ src?: string;
40
+ box: PageBox;
41
+ };
42
+ /** One element in detail: what `read_page` answers for a `selector`. */
43
+ export type PageElementDetail = {
44
+ selector: string;
45
+ tag: string;
46
+ text: string;
47
+ box: PageBox;
48
+ /** How many lines its text wraps to, when it can be told. */
49
+ lines?: number;
50
+ /** The computed styles a change to a design is usually about. */
51
+ styles: Record<string, string>;
52
+ /** Its children, one level down. */
53
+ children: Array<{
54
+ tag: string;
55
+ selector: string;
56
+ text?: string;
57
+ box: PageBox;
58
+ }>;
59
+ };
60
+ export type PageSnapshot = {
61
+ /** The page's own address. */
62
+ url: string;
63
+ title: string;
64
+ viewport: {
65
+ width: number;
66
+ height: number;
67
+ scrollY: number;
68
+ /** How tall the whole page is. */
69
+ pageHeight: number;
70
+ };
71
+ outline: PageOutlineItem[];
72
+ /** Cut short at `maxItems`: narrow with a `selector`. */
73
+ truncated?: true;
74
+ /** The element asked for by `selector`. */
75
+ element?: PageElementDetail;
76
+ /** The `selector` matched nothing. */
77
+ notFound?: string;
78
+ };
79
+ /** Where `win` is now. */
80
+ export declare function pageLocationOf(win: Window): PageLocation;
81
+ /**
82
+ * Report where the page is as it moves: on scroll, a little after it settles,
83
+ * and when it navigates -- which a client-side router does without an event,
84
+ * so the address is also looked at now and then. Returns the way to stop.
85
+ */
86
+ export declare function watchPageLocation(win: Window, onChange: (location: PageLocation) => void, options?: {
87
+ settleMs?: number;
88
+ pollMs?: number;
89
+ }): () => void;
90
+ /**
91
+ * Scroll to where the last build was, once the page is tall enough to: a page
92
+ * that is still loading its content is shorter than it will be, so this tries
93
+ * again each frame for a while rather than stopping at the bottom of half a
94
+ * page. Returns the way to stop trying.
95
+ */
96
+ export declare function restoreScroll(win: Window, x: number, y: number, options?: {
97
+ withinMs?: number;
98
+ }): () => void;
99
+ /**
100
+ * What is on the page, as a reader would take it in: headings, text, links,
101
+ * buttons, images and inputs, in order, each with where it is. With a
102
+ * `selector`, that element in detail -- its computed styles, how many lines
103
+ * its text wraps to, and its children.
104
+ *
105
+ * `root` is what selectors are written from: the body, as `describeElement`
106
+ * writes them for a picked element.
107
+ */
108
+ export declare function readPageSnapshot(doc: Document, options?: {
109
+ selector?: string;
110
+ maxItems?: number;
111
+ }): PageSnapshot;
112
+ /**
113
+ * The element a selector names, written as `describeElement` writes them --
114
+ * from the body down, or from an element with an id -- or any selector a
115
+ * person would write.
116
+ */
117
+ export declare function findBySelector(root: Element, selector: string): Element | null;