@valbuild/next 0.60.7 → 0.60.8

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.
@@ -8,7 +8,7 @@ export { ValRichText } from '@valbuild/react/internal';
8
8
  import { ValNextProvider } from './ValNextProvider-38fefdf7.esm.js';
9
9
  import NextImage from 'next/image';
10
10
  import { jsx } from 'react/jsx-runtime';
11
- export { ValApp } from './ValApp-61103149.esm.js';
11
+ export { ValApp } from './ValApp-321807b0.esm.js';
12
12
 
13
13
  function _typeof(o) {
14
14
  "@babel/helpers - typeof";
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "next",
9
9
  "react"
10
10
  ],
11
- "version": "0.60.7",
11
+ "version": "0.60.8",
12
12
  "scripts": {
13
13
  "typecheck": "tsc --noEmit",
14
14
  "test": "jest"
@@ -45,10 +45,10 @@
45
45
  "exports": true
46
46
  },
47
47
  "dependencies": {
48
- "@valbuild/core": "~0.60.7",
49
- "@valbuild/react": "~0.60.7",
50
- "@valbuild/server": "~0.60.7",
51
- "@valbuild/ui": "~0.60.7",
48
+ "@valbuild/core": "~0.60.8",
49
+ "@valbuild/react": "~0.60.8",
50
+ "@valbuild/server": "~0.60.8",
51
+ "@valbuild/ui": "~0.60.8",
52
52
  "client-only": "^0.0.1",
53
53
  "server-only": "^0.0.1"
54
54
  },
@@ -4,349 +4,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('server-only');
6
6
  var slicedToArray = require('../../dist/slicedToArray-c03b6356.cjs.dev.js');
7
+ var asyncToGenerator = require('../../dist/asyncToGenerator-ba66657c.cjs.dev.js');
7
8
  var server = require('@valbuild/server');
8
9
  var server$1 = require('next/server');
9
10
  require('../../dist/unsupportedIterableToArray-9e97e24a.cjs.dev.js');
10
11
 
11
- function _regeneratorRuntime() {
12
- _regeneratorRuntime = function () {
13
- return e;
14
- };
15
- var t,
16
- e = {},
17
- r = Object.prototype,
18
- n = r.hasOwnProperty,
19
- o = Object.defineProperty || function (t, e, r) {
20
- t[e] = r.value;
21
- },
22
- i = "function" == typeof Symbol ? Symbol : {},
23
- a = i.iterator || "@@iterator",
24
- c = i.asyncIterator || "@@asyncIterator",
25
- u = i.toStringTag || "@@toStringTag";
26
- function define(t, e, r) {
27
- return Object.defineProperty(t, e, {
28
- value: r,
29
- enumerable: !0,
30
- configurable: !0,
31
- writable: !0
32
- }), t[e];
33
- }
34
- try {
35
- define({}, "");
36
- } catch (t) {
37
- define = function (t, e, r) {
38
- return t[e] = r;
39
- };
40
- }
41
- function wrap(t, e, r, n) {
42
- var i = e && e.prototype instanceof Generator ? e : Generator,
43
- a = Object.create(i.prototype),
44
- c = new Context(n || []);
45
- return o(a, "_invoke", {
46
- value: makeInvokeMethod(t, r, c)
47
- }), a;
48
- }
49
- function tryCatch(t, e, r) {
50
- try {
51
- return {
52
- type: "normal",
53
- arg: t.call(e, r)
54
- };
55
- } catch (t) {
56
- return {
57
- type: "throw",
58
- arg: t
59
- };
60
- }
61
- }
62
- e.wrap = wrap;
63
- var h = "suspendedStart",
64
- l = "suspendedYield",
65
- f = "executing",
66
- s = "completed",
67
- y = {};
68
- function Generator() {}
69
- function GeneratorFunction() {}
70
- function GeneratorFunctionPrototype() {}
71
- var p = {};
72
- define(p, a, function () {
73
- return this;
74
- });
75
- var d = Object.getPrototypeOf,
76
- v = d && d(d(values([])));
77
- v && v !== r && n.call(v, a) && (p = v);
78
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
79
- function defineIteratorMethods(t) {
80
- ["next", "throw", "return"].forEach(function (e) {
81
- define(t, e, function (t) {
82
- return this._invoke(e, t);
83
- });
84
- });
85
- }
86
- function AsyncIterator(t, e) {
87
- function invoke(r, o, i, a) {
88
- var c = tryCatch(t[r], t, o);
89
- if ("throw" !== c.type) {
90
- var u = c.arg,
91
- h = u.value;
92
- return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
93
- invoke("next", t, i, a);
94
- }, function (t) {
95
- invoke("throw", t, i, a);
96
- }) : e.resolve(h).then(function (t) {
97
- u.value = t, i(u);
98
- }, function (t) {
99
- return invoke("throw", t, i, a);
100
- });
101
- }
102
- a(c.arg);
103
- }
104
- var r;
105
- o(this, "_invoke", {
106
- value: function (t, n) {
107
- function callInvokeWithMethodAndArg() {
108
- return new e(function (e, r) {
109
- invoke(t, n, e, r);
110
- });
111
- }
112
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
113
- }
114
- });
115
- }
116
- function makeInvokeMethod(e, r, n) {
117
- var o = h;
118
- return function (i, a) {
119
- if (o === f) throw new Error("Generator is already running");
120
- if (o === s) {
121
- if ("throw" === i) throw a;
122
- return {
123
- value: t,
124
- done: !0
125
- };
126
- }
127
- for (n.method = i, n.arg = a;;) {
128
- var c = n.delegate;
129
- if (c) {
130
- var u = maybeInvokeDelegate(c, n);
131
- if (u) {
132
- if (u === y) continue;
133
- return u;
134
- }
135
- }
136
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
137
- if (o === h) throw o = s, n.arg;
138
- n.dispatchException(n.arg);
139
- } else "return" === n.method && n.abrupt("return", n.arg);
140
- o = f;
141
- var p = tryCatch(e, r, n);
142
- if ("normal" === p.type) {
143
- if (o = n.done ? s : l, p.arg === y) continue;
144
- return {
145
- value: p.arg,
146
- done: n.done
147
- };
148
- }
149
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
150
- }
151
- };
152
- }
153
- function maybeInvokeDelegate(e, r) {
154
- var n = r.method,
155
- o = e.iterator[n];
156
- if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
157
- var i = tryCatch(o, e.iterator, r.arg);
158
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
159
- var a = i.arg;
160
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
161
- }
162
- function pushTryEntry(t) {
163
- var e = {
164
- tryLoc: t[0]
165
- };
166
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
167
- }
168
- function resetTryEntry(t) {
169
- var e = t.completion || {};
170
- e.type = "normal", delete e.arg, t.completion = e;
171
- }
172
- function Context(t) {
173
- this.tryEntries = [{
174
- tryLoc: "root"
175
- }], t.forEach(pushTryEntry, this), this.reset(!0);
176
- }
177
- function values(e) {
178
- if (e || "" === e) {
179
- var r = e[a];
180
- if (r) return r.call(e);
181
- if ("function" == typeof e.next) return e;
182
- if (!isNaN(e.length)) {
183
- var o = -1,
184
- i = function next() {
185
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
186
- return next.value = t, next.done = !0, next;
187
- };
188
- return i.next = i;
189
- }
190
- }
191
- throw new TypeError(typeof e + " is not iterable");
192
- }
193
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
194
- value: GeneratorFunctionPrototype,
195
- configurable: !0
196
- }), o(GeneratorFunctionPrototype, "constructor", {
197
- value: GeneratorFunction,
198
- configurable: !0
199
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
200
- var e = "function" == typeof t && t.constructor;
201
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
202
- }, e.mark = function (t) {
203
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
204
- }, e.awrap = function (t) {
205
- return {
206
- __await: t
207
- };
208
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
209
- return this;
210
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
211
- void 0 === i && (i = Promise);
212
- var a = new AsyncIterator(wrap(t, r, n, o), i);
213
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
214
- return t.done ? t.value : a.next();
215
- });
216
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
217
- return this;
218
- }), define(g, "toString", function () {
219
- return "[object Generator]";
220
- }), e.keys = function (t) {
221
- var e = Object(t),
222
- r = [];
223
- for (var n in e) r.push(n);
224
- return r.reverse(), function next() {
225
- for (; r.length;) {
226
- var t = r.pop();
227
- if (t in e) return next.value = t, next.done = !1, next;
228
- }
229
- return next.done = !0, next;
230
- };
231
- }, e.values = values, Context.prototype = {
232
- constructor: Context,
233
- reset: function (e) {
234
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
235
- },
236
- stop: function () {
237
- this.done = !0;
238
- var t = this.tryEntries[0].completion;
239
- if ("throw" === t.type) throw t.arg;
240
- return this.rval;
241
- },
242
- dispatchException: function (e) {
243
- if (this.done) throw e;
244
- var r = this;
245
- function handle(n, o) {
246
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
247
- }
248
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
249
- var i = this.tryEntries[o],
250
- a = i.completion;
251
- if ("root" === i.tryLoc) return handle("end");
252
- if (i.tryLoc <= this.prev) {
253
- var c = n.call(i, "catchLoc"),
254
- u = n.call(i, "finallyLoc");
255
- if (c && u) {
256
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
257
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
258
- } else if (c) {
259
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
260
- } else {
261
- if (!u) throw new Error("try statement without catch or finally");
262
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
263
- }
264
- }
265
- }
266
- },
267
- abrupt: function (t, e) {
268
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
269
- var o = this.tryEntries[r];
270
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
271
- var i = o;
272
- break;
273
- }
274
- }
275
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
276
- var a = i ? i.completion : {};
277
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
278
- },
279
- complete: function (t, e) {
280
- if ("throw" === t.type) throw t.arg;
281
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
282
- },
283
- finish: function (t) {
284
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
285
- var r = this.tryEntries[e];
286
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
287
- }
288
- },
289
- catch: function (t) {
290
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
291
- var r = this.tryEntries[e];
292
- if (r.tryLoc === t) {
293
- var n = r.completion;
294
- if ("throw" === n.type) {
295
- var o = n.arg;
296
- resetTryEntry(r);
297
- }
298
- return o;
299
- }
300
- }
301
- throw new Error("illegal catch attempt");
302
- },
303
- delegateYield: function (e, r, n) {
304
- return this.delegate = {
305
- iterator: values(e),
306
- resultName: r,
307
- nextLoc: n
308
- }, "next" === this.method && (this.arg = t), y;
309
- }
310
- }, e;
311
- }
312
-
313
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
314
- try {
315
- var info = gen[key](arg);
316
- var value = info.value;
317
- } catch (error) {
318
- reject(error);
319
- return;
320
- }
321
- if (info.done) {
322
- resolve(value);
323
- } else {
324
- Promise.resolve(value).then(_next, _throw);
325
- }
326
- }
327
- function _asyncToGenerator(fn) {
328
- return function () {
329
- var self = this,
330
- args = arguments;
331
- return new Promise(function (resolve, reject) {
332
- var gen = fn.apply(self, args);
333
- function _next(value) {
334
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
335
- }
336
- function _throw(err) {
337
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
338
- }
339
- _next(undefined);
340
- });
341
- };
342
- }
343
-
344
12
  var initValNextAppRouter = function initValNextAppRouter(config, nextConfig) {
345
13
  var route = "/api/val"; // TODO: get from config
346
14
  return server.createValApiRouter(route, server.createValServer(route, config, {
347
15
  isEnabled: function isEnabled() {
348
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
349
- return _regeneratorRuntime().wrap(function _callee$(_context) {
16
+ return asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee() {
17
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee$(_context) {
350
18
  while (1) switch (_context.prev = _context.next) {
351
19
  case 0:
352
20
  return _context.abrupt("return", nextConfig.draftMode().isEnabled);
@@ -358,8 +26,8 @@ var initValNextAppRouter = function initValNextAppRouter(config, nextConfig) {
358
26
  }))();
359
27
  },
360
28
  onEnable: function onEnable() {
361
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
362
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
29
+ return asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee2() {
30
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee2$(_context2) {
363
31
  while (1) switch (_context2.prev = _context2.next) {
364
32
  case 0:
365
33
  nextConfig.draftMode().enable();
@@ -371,8 +39,8 @@ var initValNextAppRouter = function initValNextAppRouter(config, nextConfig) {
371
39
  }))();
372
40
  },
373
41
  onDisable: function onDisable() {
374
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
375
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
42
+ return asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator._regeneratorRuntime().mark(function _callee3() {
43
+ return asyncToGenerator._regeneratorRuntime().wrap(function _callee3$(_context3) {
376
44
  while (1) switch (_context3.prev = _context3.next) {
377
45
  case 0:
378
46
  nextConfig.draftMode().disable();