@uniformdev/next-app-router 20.81.1-alpha.7.sha-91a5b13e0c → 20.81.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.
Files changed (46) hide show
  1. package/dist/{UniformComposition-C00_YDOg.d.ts → UniformComposition-DBO-oo7J.d.ts} +31 -11
  2. package/dist/{UniformComposition-DiArCpVQ.d.mts → UniformComposition-le6UEB_r.d.mts} +31 -11
  3. package/dist/cache.d.mts +6 -24
  4. package/dist/cache.d.ts +6 -24
  5. package/dist/cache.js +831 -410
  6. package/dist/cache.mjs +829 -405
  7. package/dist/client-BElN_CWD.d.mts +786 -0
  8. package/dist/client-BElN_CWD.d.ts +786 -0
  9. package/dist/compat.d.mts +4 -2
  10. package/dist/compat.d.ts +4 -2
  11. package/dist/component.d.mts +1 -10
  12. package/dist/component.d.ts +1 -10
  13. package/dist/component.js +617 -113
  14. package/dist/component.mjs +640 -112
  15. package/dist/config/default.js +1 -0
  16. package/dist/config/default.mjs +1 -0
  17. package/dist/handler.d.mts +2 -15
  18. package/dist/handler.d.ts +2 -15
  19. package/dist/handler.js +628 -134
  20. package/dist/handler.mjs +626 -132
  21. package/dist/index.d.mts +42 -73
  22. package/dist/index.d.ts +42 -73
  23. package/dist/index.esm.js +5802 -2205
  24. package/dist/index.js +5615 -2022
  25. package/dist/index.mjs +5802 -2205
  26. package/dist/middleware.d.mts +13 -52
  27. package/dist/middleware.d.ts +13 -52
  28. package/dist/middleware.js +5741 -405
  29. package/dist/middleware.mjs +5774 -415
  30. package/dist/resolveRouteFromCode-BOvjIvM2.d.ts +18 -0
  31. package/dist/resolveRouteFromCode-CuJ4JHeb.d.mts +18 -0
  32. package/package.json +9 -37
  33. package/dist/composition-BvOM-LIW.d.mts +0 -28
  34. package/dist/composition-BvOM-LIW.d.ts +0 -28
  35. package/dist/createCachedManifestProvider-C7faGJJ8.d.mts +0 -69
  36. package/dist/createCachedManifestProvider-C7faGJJ8.d.ts +0 -69
  37. package/dist/edge.d.mts +0 -57
  38. package/dist/edge.d.ts +0 -57
  39. package/dist/edge.js +0 -1105
  40. package/dist/edge.mjs +0 -1073
  41. package/dist/resolveRouteFromPath-BHJGOpBN.d.ts +0 -82
  42. package/dist/resolveRouteFromPath-BsZUVkRX.d.mts +0 -82
  43. package/dist/vercel.d.mts +0 -24
  44. package/dist/vercel.d.ts +0 -24
  45. package/dist/vercel.js +0 -703
  46. package/dist/vercel.mjs +0 -675
package/dist/component.js CHANGED
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
8
11
  var __export = (target, all) => {
9
12
  for (var name in all)
10
13
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -27,10 +30,127 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
30
  ));
28
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
32
 
33
+ // ../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js
34
+ var require_yocto_queue = __commonJS({
35
+ "../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js"(exports2, module2) {
36
+ "use strict";
37
+ var Node = class {
38
+ /// value;
39
+ /// next;
40
+ constructor(value) {
41
+ this.value = value;
42
+ this.next = void 0;
43
+ }
44
+ };
45
+ var Queue = class {
46
+ // TODO: Use private class fields when targeting Node.js 12.
47
+ // #_head;
48
+ // #_tail;
49
+ // #_size;
50
+ constructor() {
51
+ this.clear();
52
+ }
53
+ enqueue(value) {
54
+ const node = new Node(value);
55
+ if (this._head) {
56
+ this._tail.next = node;
57
+ this._tail = node;
58
+ } else {
59
+ this._head = node;
60
+ this._tail = node;
61
+ }
62
+ this._size++;
63
+ }
64
+ dequeue() {
65
+ const current = this._head;
66
+ if (!current) {
67
+ return;
68
+ }
69
+ this._head = this._head.next;
70
+ this._size--;
71
+ return current.value;
72
+ }
73
+ clear() {
74
+ this._head = void 0;
75
+ this._tail = void 0;
76
+ this._size = 0;
77
+ }
78
+ get size() {
79
+ return this._size;
80
+ }
81
+ *[Symbol.iterator]() {
82
+ let current = this._head;
83
+ while (current) {
84
+ yield current.value;
85
+ current = current.next;
86
+ }
87
+ }
88
+ };
89
+ module2.exports = Queue;
90
+ }
91
+ });
92
+
93
+ // ../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js
94
+ var require_p_limit = __commonJS({
95
+ "../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js"(exports2, module2) {
96
+ "use strict";
97
+ var Queue = require_yocto_queue();
98
+ var pLimit2 = (concurrency) => {
99
+ if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
100
+ throw new TypeError("Expected `concurrency` to be a number from 1 and up");
101
+ }
102
+ const queue = new Queue();
103
+ let activeCount = 0;
104
+ const next = () => {
105
+ activeCount--;
106
+ if (queue.size > 0) {
107
+ queue.dequeue()();
108
+ }
109
+ };
110
+ const run = async (fn, resolve, ...args) => {
111
+ activeCount++;
112
+ const result = (async () => fn(...args))();
113
+ resolve(result);
114
+ try {
115
+ await result;
116
+ } catch (e) {
117
+ }
118
+ next();
119
+ };
120
+ const enqueue = (fn, resolve, ...args) => {
121
+ queue.enqueue(run.bind(null, fn, resolve, ...args));
122
+ (async () => {
123
+ await Promise.resolve();
124
+ if (activeCount < concurrency && queue.size > 0) {
125
+ queue.dequeue()();
126
+ }
127
+ })();
128
+ };
129
+ const generator = (fn, ...args) => new Promise((resolve) => {
130
+ enqueue(fn, resolve, ...args);
131
+ });
132
+ Object.defineProperties(generator, {
133
+ activeCount: {
134
+ get: () => activeCount
135
+ },
136
+ pendingCount: {
137
+ get: () => queue.size
138
+ },
139
+ clearQueue: {
140
+ value: () => {
141
+ queue.clear();
142
+ }
143
+ }
144
+ });
145
+ return generator;
146
+ };
147
+ module2.exports = pLimit2;
148
+ }
149
+ });
150
+
30
151
  // src/component.ts
31
152
  var component_exports = {};
32
153
  __export(component_exports, {
33
- UniformEdgeState: () => UniformEdgeState,
34
154
  UniformRichText: () => UniformRichText,
35
155
  UniformSlot: () => UniformSlot,
36
156
  UniformText: () => UniformText,
@@ -67,21 +187,6 @@ var getUniformSlot = ({ slot, children }) => {
67
187
  return resolved.length > 0 ? resolved : void 0;
68
188
  };
69
189
 
70
- // src/components/UniformEdgeState.tsx
71
- var import_context = require("@uniformdev/context");
72
- var import_react = __toESM(require("react"));
73
- function UniformEdgeState() {
74
- return /* @__PURE__ */ import_react.default.createElement(
75
- "script",
76
- {
77
- id: import_context.SERVER_STATE_ID,
78
- type: "application/json",
79
- dangerouslySetInnerHTML: { __html: "" },
80
- suppressHydrationWarning: true
81
- }
82
- );
83
- }
84
-
85
190
  // src/components/UniformSlot.tsx
86
191
  var UniformSlot = ({ slot, children }) => {
87
192
  const resolved = [];
@@ -108,40 +213,440 @@ var UniformSlot = ({ slot, children }) => {
108
213
  // src/component.ts
109
214
  var import_next_app_router_client2 = require("@uniformdev/next-app-router-client");
110
215
 
111
- // ../canvas/dist/index.mjs
112
- var import_api = require("@uniformdev/context/api");
113
- var import_api2 = require("@uniformdev/context/api");
114
- var import_api3 = require("@uniformdev/context/api");
115
- var import_api4 = require("@uniformdev/context/api");
116
- var import_api5 = require("@uniformdev/context/api");
117
- var import_api6 = require("@uniformdev/context/api");
118
- var import_api7 = require("@uniformdev/context/api");
119
- var import_api8 = require("@uniformdev/context/api");
120
- var import_api9 = require("@uniformdev/context/api");
121
- var import_api10 = require("@uniformdev/context/api");
122
- var import_api11 = require("@uniformdev/context/api");
123
- var import_api12 = require("@uniformdev/context/api");
124
- var import_api13 = require("@uniformdev/context/api");
125
- var import_api14 = require("@uniformdev/context/api");
126
- var import_api15 = require("@uniformdev/context/api");
127
- var import_api16 = require("@uniformdev/context/api");
128
- var import_api17 = require("@uniformdev/context/api");
129
- var import_api18 = require("@uniformdev/context/api");
130
- var import_api19 = require("@uniformdev/context/api");
131
- var import_api20 = require("@uniformdev/context/api");
132
- var import_api21 = require("@uniformdev/context/api");
133
- var import_api22 = require("@uniformdev/context/api");
134
- var import_api23 = require("@uniformdev/context/api");
135
- var import_api24 = require("@uniformdev/context/api");
136
- var import_api25 = require("@uniformdev/context/api");
137
- var import_api26 = require("@uniformdev/context/api");
138
- var import_api27 = require("@uniformdev/context/api");
216
+ // ../context/dist/api/api.mjs
217
+ var import_p_limit = __toESM(require_p_limit(), 1);
218
+ var __defProp2 = Object.defineProperty;
139
219
  var __typeError = (msg) => {
140
220
  throw TypeError(msg);
141
221
  };
222
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
223
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
142
224
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
143
225
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
144
226
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
227
+ var defaultLimitPolicy = (0, import_p_limit.default)(6);
228
+ var UNIFORM_BEARER_TOKEN_NOT_VALID_OR_EXPIRED_MESSAGE = "Bearer token not valid or expired";
229
+ var ApiClientError = class _ApiClientError extends Error {
230
+ constructor(errorMessage, fetchMethod, fetchUri, statusCode, statusText, requestId) {
231
+ super(
232
+ `${errorMessage}
233
+ ${statusCode}${statusText ? " " + statusText : ""} (${fetchMethod} ${fetchUri}${requestId ? ` Request ID: ${requestId}` : ""})`
234
+ );
235
+ __publicField(this, "errorMessage", errorMessage);
236
+ __publicField(this, "fetchMethod", fetchMethod);
237
+ __publicField(this, "fetchUri", fetchUri);
238
+ __publicField(this, "statusCode", statusCode);
239
+ __publicField(this, "statusText", statusText);
240
+ __publicField(this, "requestId", requestId);
241
+ Object.setPrototypeOf(this, _ApiClientError.prototype);
242
+ }
243
+ };
244
+ var BearerTokenNotValidOrExpiredError = class _BearerTokenNotValidOrExpiredError extends ApiClientError {
245
+ constructor(errorMessage, fetchMethod, fetchUri, statusCode, statusText, requestId) {
246
+ super(errorMessage, fetchMethod, fetchUri, statusCode, statusText, requestId);
247
+ Object.setPrototypeOf(this, _BearerTokenNotValidOrExpiredError.prototype);
248
+ }
249
+ };
250
+ var ApiClient = class _ApiClient {
251
+ constructor(options) {
252
+ __publicField(this, "options");
253
+ var _a, _b, _c, _d, _e;
254
+ if (!options.apiKey && !options.bearerToken) {
255
+ throw new Error("You must provide an API key or a bearer token");
256
+ }
257
+ let leFetch = options.fetch;
258
+ if (!leFetch) {
259
+ if (typeof window !== "undefined") {
260
+ leFetch = window.fetch.bind(window);
261
+ } else if (typeof fetch !== "undefined") {
262
+ leFetch = fetch;
263
+ } else {
264
+ throw new Error("You must provide or polyfill a fetch implementation when not in a browser");
265
+ }
266
+ }
267
+ this.options = {
268
+ ...options,
269
+ fetch: leFetch,
270
+ apiHost: this.ensureApiHost(options.apiHost),
271
+ apiKey: (_a = options.apiKey) != null ? _a : null,
272
+ projectId: (_b = options.projectId) != null ? _b : null,
273
+ bearerToken: (_c = options.bearerToken) != null ? _c : null,
274
+ limitPolicy: (_d = options.limitPolicy) != null ? _d : defaultLimitPolicy,
275
+ bypassCache: (_e = options.bypassCache) != null ? _e : false
276
+ };
277
+ }
278
+ async apiClient(fetchUri, options) {
279
+ return (await this.apiClientWithResponse(fetchUri, options)).body;
280
+ }
281
+ async apiClientWithResponse(fetchUri, options) {
282
+ return this.options.limitPolicy(async () => {
283
+ var _a, _b;
284
+ const coreHeaders = this.options.apiKey ? {
285
+ "x-api-key": this.options.apiKey
286
+ } : {
287
+ Authorization: `Bearer ${this.options.bearerToken}`
288
+ };
289
+ if (this.options.bypassCache) {
290
+ coreHeaders["x-bypass-cache"] = "true";
291
+ }
292
+ const { fetch: fetch2, signal } = this.options;
293
+ const callApi = () => fetch2(fetchUri.toString(), {
294
+ ...options,
295
+ signal,
296
+ headers: {
297
+ ...options == null ? void 0 : options.headers,
298
+ ...coreHeaders
299
+ }
300
+ });
301
+ const apiResponse = await handleRateLimits(callApi);
302
+ if (!apiResponse.ok) {
303
+ let message = "";
304
+ try {
305
+ const responseText = await apiResponse.text();
306
+ try {
307
+ const parsed = JSON.parse(responseText);
308
+ if (parsed.errorMessage) {
309
+ message = Array.isArray(parsed.errorMessage) ? parsed.errorMessage.join(", ") : parsed.errorMessage;
310
+ } else {
311
+ message = responseText;
312
+ }
313
+ } catch (e) {
314
+ message = responseText;
315
+ }
316
+ } catch (e) {
317
+ message = `General error`;
318
+ }
319
+ if (apiResponse.status === 401 && message === UNIFORM_BEARER_TOKEN_NOT_VALID_OR_EXPIRED_MESSAGE) {
320
+ throw new BearerTokenNotValidOrExpiredError(
321
+ message,
322
+ (_a = options == null ? void 0 : options.method) != null ? _a : "GET",
323
+ fetchUri.toString(),
324
+ apiResponse.status,
325
+ apiResponse.statusText,
326
+ _ApiClient.getRequestId(apiResponse)
327
+ );
328
+ }
329
+ throw new ApiClientError(
330
+ message,
331
+ (_b = options == null ? void 0 : options.method) != null ? _b : "GET",
332
+ fetchUri.toString(),
333
+ apiResponse.status,
334
+ apiResponse.statusText,
335
+ _ApiClient.getRequestId(apiResponse)
336
+ );
337
+ }
338
+ if (options == null ? void 0 : options.expectNoContent) {
339
+ return { response: apiResponse, body: null };
340
+ }
341
+ return {
342
+ response: apiResponse,
343
+ body: await apiResponse.json()
344
+ };
345
+ });
346
+ }
347
+ createUrl(path, queryParams, hostOverride) {
348
+ const url = new URL(`${hostOverride != null ? hostOverride : this.options.apiHost}${path}`);
349
+ Object.entries(queryParams != null ? queryParams : {}).forEach(([key, value]) => {
350
+ var _a;
351
+ if (typeof value !== "undefined" && value !== null) {
352
+ url.searchParams.append(key, Array.isArray(value) ? value.join(",") : (_a = value == null ? void 0 : value.toString()) != null ? _a : "");
353
+ }
354
+ });
355
+ return url;
356
+ }
357
+ ensureApiHost(apiHost) {
358
+ if (!apiHost) return "https://uniform.app";
359
+ if (!(apiHost == null ? void 0 : apiHost.startsWith("http"))) {
360
+ throw new Error('Your apiHost must start with "http"');
361
+ }
362
+ if (apiHost.indexOf("/", 8) > -1) {
363
+ throw new Error("Your apiHost must not contain a path element after the domain");
364
+ }
365
+ if (apiHost.indexOf("?") > -1) {
366
+ throw new Error("Your apiHost must not contain a query string");
367
+ }
368
+ if (apiHost == null ? void 0 : apiHost.endsWith("/")) {
369
+ apiHost = apiHost.substring(0, apiHost.length - 1);
370
+ }
371
+ return apiHost;
372
+ }
373
+ static getRequestId(response) {
374
+ const apigRequestId = response.headers.get("apigw-requestid");
375
+ if (apigRequestId) {
376
+ return apigRequestId;
377
+ }
378
+ return void 0;
379
+ }
380
+ };
381
+ async function handleRateLimits(callApi) {
382
+ var _a;
383
+ const backoffRetries = 5;
384
+ let backoffRetriesLeft = backoffRetries;
385
+ let response;
386
+ while (backoffRetriesLeft > 0) {
387
+ response = await callApi();
388
+ if (response.status !== 429) {
389
+ break;
390
+ }
391
+ let resetWait = 0;
392
+ try {
393
+ const responseClone = response.clone();
394
+ const dateHeader = responseClone.headers.get("date");
395
+ const serverTime = dateHeader ? new Date(dateHeader).getTime() : void 0;
396
+ const body = await responseClone.json();
397
+ const resetTime = (_a = body == null ? void 0 : body.info) == null ? void 0 : _a.reset;
398
+ if (typeof serverTime === "number" && typeof resetTime === "number") {
399
+ resetWait = Math.max(0, Math.min(Math.round(1.1 * (resetTime - serverTime)), 1e4));
400
+ }
401
+ } catch (e) {
402
+ }
403
+ const base = Math.pow(2, backoffRetries - backoffRetriesLeft) * 333;
404
+ const backoffWait = base + Math.round(Math.random() * (base / 2)) * (Math.random() > 0.5 ? 1 : -1);
405
+ await new Promise((resolve) => setTimeout(resolve, Math.max(0, resetWait + backoffWait)));
406
+ backoffRetriesLeft -= 1;
407
+ }
408
+ return response;
409
+ }
410
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
411
+ function rewriteFiltersForApi(filters) {
412
+ return Object.entries(filters != null ? filters : {}).reduce(
413
+ (acc, [key, value]) => {
414
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
415
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
416
+ return {
417
+ ...acc,
418
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
419
+ };
420
+ },
421
+ {}
422
+ );
423
+ }
424
+ var _url;
425
+ var _AggregateClient = class _AggregateClient2 extends ApiClient {
426
+ constructor(options) {
427
+ super(options);
428
+ }
429
+ /** Fetches all aggregates for a project */
430
+ async get(options) {
431
+ const { projectId } = this.options;
432
+ const fetchUri = this.createUrl(__privateGet(_AggregateClient2, _url), { ...options, projectId });
433
+ return await this.apiClient(fetchUri);
434
+ }
435
+ /** Updates or creates (based on id) an Aggregate */
436
+ async upsert(body) {
437
+ const fetchUri = this.createUrl(__privateGet(_AggregateClient2, _url));
438
+ await this.apiClient(fetchUri, {
439
+ method: "PUT",
440
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
441
+ expectNoContent: true
442
+ });
443
+ }
444
+ /** Deletes an Aggregate */
445
+ async remove(body) {
446
+ const fetchUri = this.createUrl(__privateGet(_AggregateClient2, _url));
447
+ await this.apiClient(fetchUri, {
448
+ method: "DELETE",
449
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
450
+ expectNoContent: true
451
+ });
452
+ }
453
+ };
454
+ _url = /* @__PURE__ */ new WeakMap();
455
+ __privateAdd(_AggregateClient, _url, "/api/v2/aggregate");
456
+ var _url2;
457
+ var _DimensionClient = class _DimensionClient2 extends ApiClient {
458
+ constructor(options) {
459
+ super(options);
460
+ }
461
+ /** Fetches the known score dimensions for a project */
462
+ async get(options) {
463
+ const { projectId } = this.options;
464
+ const fetchUri = this.createUrl(__privateGet(_DimensionClient2, _url2), { ...options, projectId });
465
+ return await this.apiClient(fetchUri);
466
+ }
467
+ };
468
+ _url2 = /* @__PURE__ */ new WeakMap();
469
+ __privateAdd(_DimensionClient, _url2, "/api/v2/dimension");
470
+ var _url3;
471
+ var _valueUrl;
472
+ var _EnrichmentClient = class _EnrichmentClient2 extends ApiClient {
473
+ constructor(options) {
474
+ super(options);
475
+ }
476
+ /** Fetches all enrichments and values for a project, grouped by category */
477
+ async get(options) {
478
+ const { projectId } = this.options;
479
+ const fetchUri = this.createUrl(__privateGet(_EnrichmentClient2, _url3), { ...options, projectId });
480
+ return await this.apiClient(fetchUri);
481
+ }
482
+ /** Updates or creates (based on id) an enrichment category */
483
+ async upsertCategory(body) {
484
+ const fetchUri = this.createUrl(__privateGet(_EnrichmentClient2, _url3));
485
+ await this.apiClient(fetchUri, {
486
+ method: "PUT",
487
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
488
+ expectNoContent: true
489
+ });
490
+ }
491
+ /** Deletes an enrichment category */
492
+ async removeCategory(body) {
493
+ const fetchUri = this.createUrl(__privateGet(_EnrichmentClient2, _url3));
494
+ await this.apiClient(fetchUri, {
495
+ method: "DELETE",
496
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
497
+ expectNoContent: true
498
+ });
499
+ }
500
+ /** Updates or creates (based on id) an enrichment value within an enrichment category */
501
+ async upsertValue(body) {
502
+ const fetchUri = this.createUrl(__privateGet(_EnrichmentClient2, _valueUrl));
503
+ await this.apiClient(fetchUri, {
504
+ method: "PUT",
505
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
506
+ expectNoContent: true
507
+ });
508
+ }
509
+ /** Deletes an enrichment value within an enrichment category. The category is left alone. */
510
+ async removeValue(body) {
511
+ const fetchUri = this.createUrl(__privateGet(_EnrichmentClient2, _valueUrl));
512
+ await this.apiClient(fetchUri, {
513
+ method: "DELETE",
514
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
515
+ expectNoContent: true
516
+ });
517
+ }
518
+ };
519
+ _url3 = /* @__PURE__ */ new WeakMap();
520
+ _valueUrl = /* @__PURE__ */ new WeakMap();
521
+ __privateAdd(_EnrichmentClient, _url3, "/api/v1/enrichments");
522
+ __privateAdd(_EnrichmentClient, _valueUrl, "/api/v1/enrichment-values");
523
+ var _url4;
524
+ var _ManifestClient = class _ManifestClient2 extends ApiClient {
525
+ constructor(options) {
526
+ super(options);
527
+ }
528
+ /** Fetches the Context manifest for a project */
529
+ async get(options) {
530
+ const { projectId } = this.options;
531
+ const fetchUri = this.createUrl(__privateGet(_ManifestClient2, _url4), { ...options, projectId });
532
+ return await this.apiClient(fetchUri);
533
+ }
534
+ /** Publishes the Context manifest for a project */
535
+ async publish() {
536
+ const { projectId } = this.options;
537
+ const fetchUri = this.createUrl("/api/v1/publish", { siteId: projectId });
538
+ await this.apiClient(fetchUri, {
539
+ method: "POST",
540
+ expectNoContent: true
541
+ });
542
+ }
543
+ };
544
+ _url4 = /* @__PURE__ */ new WeakMap();
545
+ __privateAdd(_ManifestClient, _url4, "/api/v2/manifest");
546
+ var _url5;
547
+ var _QuirkClient = class _QuirkClient2 extends ApiClient {
548
+ constructor(options) {
549
+ super(options);
550
+ }
551
+ /** Fetches all Quirks for a project */
552
+ async get(options) {
553
+ const { projectId } = this.options;
554
+ const fetchUri = this.createUrl(__privateGet(_QuirkClient2, _url5), { ...options, projectId });
555
+ return await this.apiClient(fetchUri);
556
+ }
557
+ /** Updates or creates (based on id) a Quirk */
558
+ async upsert(body) {
559
+ const fetchUri = this.createUrl(__privateGet(_QuirkClient2, _url5));
560
+ await this.apiClient(fetchUri, {
561
+ method: "PUT",
562
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
563
+ expectNoContent: true
564
+ });
565
+ }
566
+ /** Deletes a Quirk */
567
+ async remove(body) {
568
+ const fetchUri = this.createUrl(__privateGet(_QuirkClient2, _url5));
569
+ await this.apiClient(fetchUri, {
570
+ method: "DELETE",
571
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
572
+ expectNoContent: true
573
+ });
574
+ }
575
+ };
576
+ _url5 = /* @__PURE__ */ new WeakMap();
577
+ __privateAdd(_QuirkClient, _url5, "/api/v2/quirk");
578
+ var _url6;
579
+ var _SignalClient = class _SignalClient2 extends ApiClient {
580
+ constructor(options) {
581
+ super(options);
582
+ }
583
+ /** Fetches all Signals for a project */
584
+ async get(options) {
585
+ const { projectId } = this.options;
586
+ const fetchUri = this.createUrl(__privateGet(_SignalClient2, _url6), { ...options, projectId });
587
+ return await this.apiClient(fetchUri);
588
+ }
589
+ /** Updates or creates (based on id) a Signal */
590
+ async upsert(body) {
591
+ const fetchUri = this.createUrl(__privateGet(_SignalClient2, _url6));
592
+ await this.apiClient(fetchUri, {
593
+ method: "PUT",
594
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
595
+ expectNoContent: true
596
+ });
597
+ }
598
+ /** Deletes a Signal */
599
+ async remove(body) {
600
+ const fetchUri = this.createUrl(__privateGet(_SignalClient2, _url6));
601
+ await this.apiClient(fetchUri, {
602
+ method: "DELETE",
603
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
604
+ expectNoContent: true
605
+ });
606
+ }
607
+ };
608
+ _url6 = /* @__PURE__ */ new WeakMap();
609
+ __privateAdd(_SignalClient, _url6, "/api/v2/signal");
610
+ var _url7;
611
+ var _TestClient = class _TestClient2 extends ApiClient {
612
+ constructor(options) {
613
+ super(options);
614
+ }
615
+ /** Fetches all Tests for a project */
616
+ async get(options) {
617
+ const { projectId } = this.options;
618
+ const fetchUri = this.createUrl(__privateGet(_TestClient2, _url7), { ...options, projectId });
619
+ return await this.apiClient(fetchUri);
620
+ }
621
+ /** Updates or creates (based on id) a Test */
622
+ async upsert(body) {
623
+ const fetchUri = this.createUrl(__privateGet(_TestClient2, _url7));
624
+ await this.apiClient(fetchUri, {
625
+ method: "PUT",
626
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
627
+ expectNoContent: true
628
+ });
629
+ }
630
+ /** Deletes a Test */
631
+ async remove(body) {
632
+ const fetchUri = this.createUrl(__privateGet(_TestClient2, _url7));
633
+ await this.apiClient(fetchUri, {
634
+ method: "DELETE",
635
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
636
+ expectNoContent: true
637
+ });
638
+ }
639
+ };
640
+ _url7 = /* @__PURE__ */ new WeakMap();
641
+ __privateAdd(_TestClient, _url7, "/api/v2/test");
642
+
643
+ // ../canvas/dist/index.mjs
644
+ var __typeError2 = (msg) => {
645
+ throw TypeError(msg);
646
+ };
647
+ var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg);
648
+ var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
649
+ var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
145
650
  var SELECT_QUERY_PREFIX = "select.";
146
651
  function appendCsv(out, key, values) {
147
652
  if (values === void 0) {
@@ -192,7 +697,7 @@ var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
192
697
  var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
193
698
  var _contentTypesUrl;
194
699
  var _entriesUrl;
195
- var _ContentClient = class _ContentClient2 extends import_api12.ApiClient {
700
+ var _ContentClient = class _ContentClient2 extends ApiClient {
196
701
  constructor(options) {
197
702
  var _a;
198
703
  super(options);
@@ -200,16 +705,16 @@ var _ContentClient = class _ContentClient2 extends import_api12.ApiClient {
200
705
  }
201
706
  getContentTypes(options) {
202
707
  const { projectId } = this.options;
203
- const fetchUri = this.createUrl(__privateGet(_ContentClient2, _contentTypesUrl), { ...options, projectId });
708
+ const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _contentTypesUrl), { ...options, projectId });
204
709
  return this.apiClient(fetchUri);
205
710
  }
206
711
  getEntries(options) {
207
712
  const { projectId } = this.options;
208
713
  const { skipDataResolution, filters, select, ...params } = options;
209
- const rewrittenFilters = (0, import_api12.rewriteFiltersForApi)(filters);
714
+ const rewrittenFilters = rewriteFiltersForApi(filters);
210
715
  const rewrittenSelect = projectionToQuery(select);
211
716
  if (skipDataResolution) {
212
- const url = this.createUrl(__privateGet(_ContentClient2, _entriesUrl), {
717
+ const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), {
213
718
  ...params,
214
719
  ...rewrittenFilters,
215
720
  ...rewrittenSelect,
@@ -218,7 +723,7 @@ var _ContentClient = class _ContentClient2 extends import_api12.ApiClient {
218
723
  return this.apiClient(url);
219
724
  }
220
725
  const edgeUrl = this.createUrl(
221
- __privateGet(_ContentClient2, _entriesUrl),
726
+ __privateGet2(_ContentClient2, _entriesUrl),
222
727
  { ...this.getEdgeOptions(params), ...rewrittenFilters, ...rewrittenSelect },
223
728
  this.edgeApiHost
224
729
  );
@@ -236,7 +741,7 @@ var _ContentClient = class _ContentClient2 extends import_api12.ApiClient {
236
741
  return this.apiClient(historyUrl);
237
742
  }
238
743
  async upsertContentType(body, opts = {}) {
239
- const fetchUri = this.createUrl(__privateGet(_ContentClient2, _contentTypesUrl));
744
+ const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _contentTypesUrl));
240
745
  if (typeof body.contentType.slugSettings === "object" && body.contentType.slugSettings !== null && Object.keys(body.contentType.slugSettings).length === 0) {
241
746
  delete body.contentType.slugSettings;
242
747
  }
@@ -248,7 +753,7 @@ var _ContentClient = class _ContentClient2 extends import_api12.ApiClient {
248
753
  });
249
754
  }
250
755
  async upsertEntry(body, options) {
251
- const fetchUri = this.createUrl(__privateGet(_ContentClient2, _entriesUrl));
756
+ const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl));
252
757
  const headers = {};
253
758
  if (options == null ? void 0 : options.ifUnmodifiedSince) {
254
759
  headers["x-if-unmodified-since"] = options.ifUnmodifiedSince;
@@ -262,7 +767,7 @@ var _ContentClient = class _ContentClient2 extends import_api12.ApiClient {
262
767
  return { modified: response.headers.get("x-modified-at") };
263
768
  }
264
769
  async deleteContentType(body) {
265
- const fetchUri = this.createUrl(__privateGet(_ContentClient2, _contentTypesUrl));
770
+ const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _contentTypesUrl));
266
771
  await this.apiClient(fetchUri, {
267
772
  method: "DELETE",
268
773
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -270,7 +775,7 @@ var _ContentClient = class _ContentClient2 extends import_api12.ApiClient {
270
775
  });
271
776
  }
272
777
  async deleteEntry(body) {
273
- const fetchUri = this.createUrl(__privateGet(_ContentClient2, _entriesUrl));
778
+ const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl));
274
779
  await this.apiClient(fetchUri, {
275
780
  method: "DELETE",
276
781
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -289,17 +794,17 @@ var _ContentClient = class _ContentClient2 extends import_api12.ApiClient {
289
794
  };
290
795
  _contentTypesUrl = /* @__PURE__ */ new WeakMap();
291
796
  _entriesUrl = /* @__PURE__ */ new WeakMap();
292
- __privateAdd(_ContentClient, _contentTypesUrl, "/api/v1/content-types");
293
- __privateAdd(_ContentClient, _entriesUrl, "/api/v1/entries");
294
- var _url;
295
- var _DataTypeClient = class _DataTypeClient2 extends import_api14.ApiClient {
797
+ __privateAdd2(_ContentClient, _contentTypesUrl, "/api/v1/content-types");
798
+ __privateAdd2(_ContentClient, _entriesUrl, "/api/v1/entries");
799
+ var _url8;
800
+ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
296
801
  constructor(options) {
297
802
  super(options);
298
803
  }
299
804
  /** Fetches a list of DataTypes for a project */
300
805
  async list(options) {
301
806
  const { projectId } = this.options;
302
- const fetchUri = this.createUrl(__privateGet(_DataTypeClient2, _url), { ...options, projectId });
807
+ const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8), { ...options, projectId });
303
808
  return await this.apiClient(fetchUri);
304
809
  }
305
810
  /** @deprecated Use {@link list} instead. */
@@ -308,7 +813,7 @@ var _DataTypeClient = class _DataTypeClient2 extends import_api14.ApiClient {
308
813
  }
309
814
  /** Updates or creates (based on id) a DataType */
310
815
  async save(body) {
311
- const fetchUri = this.createUrl(__privateGet(_DataTypeClient2, _url));
816
+ const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
312
817
  await this.apiClient(fetchUri, {
313
818
  method: "PUT",
314
819
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -321,7 +826,7 @@ var _DataTypeClient = class _DataTypeClient2 extends import_api14.ApiClient {
321
826
  }
322
827
  /** Deletes a DataType */
323
828
  async remove(body) {
324
- const fetchUri = this.createUrl(__privateGet(_DataTypeClient2, _url));
829
+ const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
325
830
  await this.apiClient(fetchUri, {
326
831
  method: "DELETE",
327
832
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -329,10 +834,10 @@ var _DataTypeClient = class _DataTypeClient2 extends import_api14.ApiClient {
329
834
  });
330
835
  }
331
836
  };
332
- _url = /* @__PURE__ */ new WeakMap();
333
- __privateAdd(_DataTypeClient, _url, "/api/v1/data-types");
837
+ _url8 = /* @__PURE__ */ new WeakMap();
838
+ __privateAdd2(_DataTypeClient, _url8, "/api/v1/data-types");
334
839
  var _baseUrl;
335
- var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends import_api16.ApiClient {
840
+ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
336
841
  constructor(options) {
337
842
  super(options);
338
843
  this.teamId = options.teamId;
@@ -341,7 +846,7 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
341
846
  * Gets a list of property type and hook names for the current team, including public integrations' hooks.
342
847
  */
343
848
  get(options) {
344
- const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient2, _baseUrl), {
849
+ const fetchUri = this.createUrl(__privateGet2(_IntegrationPropertyEditorsClient2, _baseUrl), {
345
850
  ...options,
346
851
  teamId: this.teamId
347
852
  });
@@ -351,7 +856,7 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
351
856
  * Creates or updates a custom AI property editor on a Mesh app.
352
857
  */
353
858
  async deploy(body) {
354
- const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient2, _baseUrl));
859
+ const fetchUri = this.createUrl(__privateGet2(_IntegrationPropertyEditorsClient2, _baseUrl));
355
860
  await this.apiClient(fetchUri, {
356
861
  method: "PUT",
357
862
  body: JSON.stringify({ ...body, teamId: this.teamId }),
@@ -362,7 +867,7 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
362
867
  * Removes a custom AI property editor from a Mesh app.
363
868
  */
364
869
  async delete(body) {
365
- const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient2, _baseUrl));
870
+ const fetchUri = this.createUrl(__privateGet2(_IntegrationPropertyEditorsClient2, _baseUrl));
366
871
  await this.apiClient(fetchUri, {
367
872
  method: "DELETE",
368
873
  body: JSON.stringify({ ...body, teamId: this.teamId }),
@@ -371,16 +876,16 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
371
876
  }
372
877
  };
373
878
  _baseUrl = /* @__PURE__ */ new WeakMap();
374
- __privateAdd(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
375
- var _url2;
879
+ __privateAdd2(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
880
+ var _url22;
376
881
  var _projectsUrl;
377
- var _ProjectClient = class _ProjectClient2 extends import_api20.ApiClient {
882
+ var _ProjectClient = class _ProjectClient2 extends ApiClient {
378
883
  constructor(options) {
379
884
  super({ ...options, bypassCache: true });
380
885
  }
381
886
  /** Fetches single Project */
382
887
  async get(options) {
383
- const fetchUri = this.createUrl(__privateGet(_ProjectClient2, _url2), { ...options });
888
+ const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22), { ...options });
384
889
  return await this.apiClient(fetchUri);
385
890
  }
386
891
  /**
@@ -389,7 +894,7 @@ var _ProjectClient = class _ProjectClient2 extends import_api20.ApiClient {
389
894
  * When omitted, returns all accessible teams and their projects.
390
895
  */
391
896
  async list(options) {
392
- const fetchUri = this.createUrl(__privateGet(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
897
+ const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
393
898
  return await this.apiClient(fetchUri);
394
899
  }
395
900
  /** @deprecated Use {@link list} instead. */
@@ -398,7 +903,7 @@ var _ProjectClient = class _ProjectClient2 extends import_api20.ApiClient {
398
903
  }
399
904
  /** Updates or creates (based on id) a Project */
400
905
  async save(body) {
401
- const fetchUri = this.createUrl(__privateGet(_ProjectClient2, _url2));
906
+ const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
402
907
  return await this.apiClient(fetchUri, {
403
908
  method: "PUT",
404
909
  body: JSON.stringify({ ...body })
@@ -410,7 +915,7 @@ var _ProjectClient = class _ProjectClient2 extends import_api20.ApiClient {
410
915
  }
411
916
  /** Deletes a Project */
412
917
  async remove(body) {
413
- const fetchUri = this.createUrl(__privateGet(_ProjectClient2, _url2));
918
+ const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
414
919
  await this.apiClient(fetchUri, {
415
920
  method: "DELETE",
416
921
  body: JSON.stringify({ ...body }),
@@ -422,24 +927,24 @@ var _ProjectClient = class _ProjectClient2 extends import_api20.ApiClient {
422
927
  return this.remove(body);
423
928
  }
424
929
  };
425
- _url2 = /* @__PURE__ */ new WeakMap();
930
+ _url22 = /* @__PURE__ */ new WeakMap();
426
931
  _projectsUrl = /* @__PURE__ */ new WeakMap();
427
- __privateAdd(_ProjectClient, _url2, "/api/v1/project");
428
- __privateAdd(_ProjectClient, _projectsUrl, "/api/v1/projects");
932
+ __privateAdd2(_ProjectClient, _url22, "/api/v1/project");
933
+ __privateAdd2(_ProjectClient, _projectsUrl, "/api/v1/projects");
429
934
  var ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
430
935
  var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
431
936
  var ATTRIBUTE_PARAMETER_TYPE = "data-uniform-parameter-type";
432
937
 
433
938
  // src/components/UniformRichText.tsx
434
939
  var import_richtext8 = require("@uniformdev/richtext");
435
- var import_react13 = __toESM(require("react"));
940
+ var import_react12 = __toESM(require("react"));
436
941
 
437
942
  // src/components/UniformRichTextNode.tsx
438
943
  var import_richtext7 = require("@uniformdev/richtext");
439
- var import_react12 = __toESM(require("react"));
944
+ var import_react11 = __toESM(require("react"));
440
945
 
441
946
  // src/components/nodes/AssetRichTextNode.tsx
442
- var import_react2 = __toESM(require("react"));
947
+ var import_react = __toESM(require("react"));
443
948
  var AssetRichTextNode = ({ node }) => {
444
949
  var _a, _b;
445
950
  const { __asset } = node;
@@ -447,46 +952,46 @@ var AssetRichTextNode = ({ node }) => {
447
952
  return null;
448
953
  }
449
954
  if (__asset.type === "image") {
450
- return /* @__PURE__ */ import_react2.default.createElement("figure", null, /* @__PURE__ */ import_react2.default.createElement("img", { src: __asset.fields.url.value, alt: (_a = __asset.fields.title) == null ? void 0 : _a.value }), ((_b = __asset.fields.description) == null ? void 0 : _b.value) ? /* @__PURE__ */ import_react2.default.createElement("figcaption", null, __asset.fields.description.value) : null);
955
+ return /* @__PURE__ */ import_react.default.createElement("figure", null, /* @__PURE__ */ import_react.default.createElement("img", { src: __asset.fields.url.value, alt: (_a = __asset.fields.title) == null ? void 0 : _a.value }), ((_b = __asset.fields.description) == null ? void 0 : _b.value) ? /* @__PURE__ */ import_react.default.createElement("figcaption", null, __asset.fields.description.value) : null);
451
956
  }
452
957
  if (__asset.type === "video") {
453
- return /* @__PURE__ */ import_react2.default.createElement("video", { src: __asset.fields.url.value, controls: true });
958
+ return /* @__PURE__ */ import_react.default.createElement("video", { src: __asset.fields.url.value, controls: true });
454
959
  }
455
960
  if (__asset.type === "audio") {
456
- return /* @__PURE__ */ import_react2.default.createElement("audio", { src: __asset.fields.url.value, controls: true });
961
+ return /* @__PURE__ */ import_react.default.createElement("audio", { src: __asset.fields.url.value, controls: true });
457
962
  }
458
963
  return null;
459
964
  };
460
965
 
461
966
  // src/components/nodes/HeadingRichTextNode.tsx
462
- var import_react3 = __toESM(require("react"));
967
+ var import_react2 = __toESM(require("react"));
463
968
  var HeadingRichTextNode = ({ children, node }) => {
464
969
  const { tag } = node;
465
970
  const HTag = tag != null ? tag : "h1";
466
- return /* @__PURE__ */ import_react3.default.createElement(HTag, null, children);
971
+ return /* @__PURE__ */ import_react2.default.createElement(HTag, null, children);
467
972
  };
468
973
 
469
974
  // src/components/nodes/LinebreakRichTextNode.tsx
470
- var import_react4 = __toESM(require("react"));
975
+ var import_react3 = __toESM(require("react"));
471
976
  var LinebreakRichTextNode = () => {
472
- return /* @__PURE__ */ import_react4.default.createElement("br", null);
977
+ return /* @__PURE__ */ import_react3.default.createElement("br", null);
473
978
  };
474
979
 
475
980
  // src/components/nodes/LinkRichTextNode.tsx
476
981
  var import_richtext = require("@uniformdev/richtext");
477
- var import_react5 = __toESM(require("react"));
982
+ var import_react4 = __toESM(require("react"));
478
983
  var LinkRichTextNode = ({ children, node }) => {
479
984
  const { link } = node;
480
- return /* @__PURE__ */ import_react5.default.createElement("a", { ...(0, import_richtext.linkParamValueToAnchorProps)(link) }, children);
985
+ return /* @__PURE__ */ import_react4.default.createElement("a", { ...(0, import_richtext.linkParamValueToAnchorProps)(link) }, children);
481
986
  };
482
987
 
483
988
  // src/components/nodes/ListItemRichTextNode.tsx
484
989
  var import_richtext2 = require("@uniformdev/richtext");
485
- var import_react6 = __toESM(require("react"));
990
+ var import_react5 = __toESM(require("react"));
486
991
  var ListItemRichTextNode = ({ children, node }) => {
487
992
  const { value } = node;
488
993
  const normalizedValue = (0, import_richtext2.getRichTextListItemValue)(value);
489
- return /* @__PURE__ */ import_react6.default.createElement(
994
+ return /* @__PURE__ */ import_react5.default.createElement(
490
995
  "li",
491
996
  {
492
997
  value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
@@ -497,12 +1002,12 @@ var ListItemRichTextNode = ({ children, node }) => {
497
1002
 
498
1003
  // src/components/nodes/ListRichTextNode.tsx
499
1004
  var import_richtext3 = require("@uniformdev/richtext");
500
- var import_react7 = __toESM(require("react"));
1005
+ var import_react6 = __toESM(require("react"));
501
1006
  var ListRichTextNode = ({ children, node }) => {
502
1007
  const { tag, start } = node;
503
1008
  const ListTag = tag != null ? tag : "ul";
504
1009
  const normalizedStart = (0, import_richtext3.getRichTextListStart)(start);
505
- return /* @__PURE__ */ import_react7.default.createElement(
1010
+ return /* @__PURE__ */ import_react6.default.createElement(
506
1011
  ListTag,
507
1012
  {
508
1013
  start: typeof normalizedStart === "number" && Number.isFinite(normalizedStart) && normalizedStart > 0 ? normalizedStart : void 0
@@ -513,10 +1018,10 @@ var ListRichTextNode = ({ children, node }) => {
513
1018
 
514
1019
  // src/components/nodes/ParagraphRichTextNode.tsx
515
1020
  var import_richtext4 = require("@uniformdev/richtext");
516
- var import_react8 = __toESM(require("react"));
1021
+ var import_react7 = __toESM(require("react"));
517
1022
  var ParagraphRichTextNode = ({ children, node }) => {
518
1023
  const { format, direction } = node;
519
- return /* @__PURE__ */ import_react8.default.createElement(
1024
+ return /* @__PURE__ */ import_react7.default.createElement(
520
1025
  "p",
521
1026
  {
522
1027
  dir: (0, import_richtext4.isPureDirection)(direction) ? direction : void 0,
@@ -528,26 +1033,26 @@ var ParagraphRichTextNode = ({ children, node }) => {
528
1033
 
529
1034
  // src/components/nodes/TableCellRichTextNode.tsx
530
1035
  var import_richtext5 = require("@uniformdev/richtext");
531
- var import_react9 = __toESM(require("react"));
1036
+ var import_react8 = __toESM(require("react"));
532
1037
  var TableCellRichTextNode = ({ children, node }) => {
533
1038
  const { headerState } = node;
534
1039
  const TableCellTag = (0, import_richtext5.getRichTextTagFromTableCellHeaderState)(headerState);
535
- return /* @__PURE__ */ import_react9.default.createElement(TableCellTag, null, children);
1040
+ return /* @__PURE__ */ import_react8.default.createElement(TableCellTag, null, children);
536
1041
  };
537
1042
 
538
1043
  // src/components/nodes/TabRichTextNode.tsx
539
- var import_react10 = __toESM(require("react"));
1044
+ var import_react9 = __toESM(require("react"));
540
1045
  var TabRichTextNode = () => {
541
- return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, " ");
1046
+ return /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, " ");
542
1047
  };
543
1048
 
544
1049
  // src/components/nodes/TextRichTextNode.tsx
545
1050
  var import_richtext6 = require("@uniformdev/richtext");
546
- var import_react11 = __toESM(require("react"));
1051
+ var import_react10 = __toESM(require("react"));
547
1052
  var TextRichTextNode = ({ node }) => {
548
1053
  const { text, format } = node;
549
1054
  const tags = (0, import_richtext6.getRichTextTagsFromTextFormat)(format);
550
- return /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ import_react11.default.createElement(Tag, null, children), text) : text);
1055
+ return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ import_react10.default.createElement(Tag, null, children), text) : text);
551
1056
  };
552
1057
 
553
1058
  // src/components/UniformRichTextNode.tsx
@@ -561,8 +1066,8 @@ function UniformRichTextNode({ node, ...props }) {
561
1066
  if (!NodeRenderer) {
562
1067
  return null;
563
1068
  }
564
- const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
565
- return /* @__PURE__ */ import_react12.default.createElement(NodeRenderer, { node }, children);
1069
+ const children = node.children ? node.children.map((childNode, i) => /* @__PURE__ */ import_react11.default.createElement(UniformRichTextNode, { ...props, key: i, node: childNode })) : null;
1070
+ return /* @__PURE__ */ import_react11.default.createElement(NodeRenderer, { node }, children);
566
1071
  }
567
1072
  var rendererMap = /* @__PURE__ */ new Map([
568
1073
  ["heading", HeadingRichTextNode],
@@ -571,19 +1076,19 @@ var rendererMap = /* @__PURE__ */ new Map([
571
1076
  ["list", ListRichTextNode],
572
1077
  ["listitem", ListItemRichTextNode],
573
1078
  ["paragraph", ParagraphRichTextNode],
574
- ["quote", ({ children }) => /* @__PURE__ */ import_react12.default.createElement("blockquote", null, children)],
1079
+ ["quote", ({ children }) => /* @__PURE__ */ import_react11.default.createElement("blockquote", null, children)],
575
1080
  [
576
1081
  "code",
577
- ({ children }) => /* @__PURE__ */ import_react12.default.createElement("pre", null, /* @__PURE__ */ import_react12.default.createElement("code", null, children))
1082
+ ({ children }) => /* @__PURE__ */ import_react11.default.createElement("pre", null, /* @__PURE__ */ import_react11.default.createElement("code", null, children))
578
1083
  ],
579
- ["root", ({ children }) => /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, children)],
1084
+ ["root", ({ children }) => /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, children)],
580
1085
  ["text", TextRichTextNode],
581
1086
  ["tab", TabRichTextNode],
582
1087
  [
583
1088
  "table",
584
- ({ children }) => /* @__PURE__ */ import_react12.default.createElement("table", null, /* @__PURE__ */ import_react12.default.createElement("tbody", null, children))
1089
+ ({ children }) => /* @__PURE__ */ import_react11.default.createElement("table", null, /* @__PURE__ */ import_react11.default.createElement("tbody", null, children))
585
1090
  ],
586
- ["tablerow", ({ children }) => /* @__PURE__ */ import_react12.default.createElement("tr", null, children)],
1091
+ ["tablerow", ({ children }) => /* @__PURE__ */ import_react11.default.createElement("tr", null, children)],
587
1092
  ["tablecell", TableCellRichTextNode],
588
1093
  ["asset", AssetRichTextNode]
589
1094
  ]);
@@ -592,7 +1097,7 @@ var resolveRichTextDefaultRenderer = (node) => {
592
1097
  };
593
1098
 
594
1099
  // src/components/UniformRichText.tsx
595
- var UniformRichText = import_react13.default.forwardRef(function UniformRichText2({
1100
+ var UniformRichText = import_react12.default.forwardRef(function UniformRichText2({
596
1101
  component,
597
1102
  resolveRichTextRenderer,
598
1103
  as: Tag = "div",
@@ -609,7 +1114,7 @@ var UniformRichText = import_react13.default.forwardRef(function UniformRichText
609
1114
  const value = parameter.value;
610
1115
  if (!value || !(0, import_richtext8.isRichTextValue)(value)) return null;
611
1116
  if (!isContextualEditing && (0, import_richtext8.isRichTextValueConsideredEmpty)(value)) return null;
612
- return Tag === null ? /* @__PURE__ */ import_react13.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react13.default.createElement(
1117
+ return Tag === null ? /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react12.default.createElement(
613
1118
  Tag,
614
1119
  {
615
1120
  ref,
@@ -620,19 +1125,18 @@ var UniformRichText = import_react13.default.forwardRef(function UniformRichText
620
1125
  [ATTRIBUTE_PARAMETER_TYPE]: "richText"
621
1126
  } : {}
622
1127
  },
623
- (0, import_richtext8.isRichTextValueConsideredEmpty)(value) ? /* @__PURE__ */ import_react13.default.createElement("p", null, /* @__PURE__ */ import_react13.default.createElement("i", null, computedPlaceholder)) : /* @__PURE__ */ import_react13.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
1128
+ (0, import_richtext8.isRichTextValueConsideredEmpty)(value) ? /* @__PURE__ */ import_react12.default.createElement("p", null, /* @__PURE__ */ import_react12.default.createElement("i", null, computedPlaceholder)) : /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
624
1129
  );
625
1130
  });
626
1131
 
627
1132
  // src/components/UniformText.tsx
628
1133
  var import_next_app_router_client = require("@uniformdev/next-app-router-client");
629
- var import_react14 = __toESM(require("react"));
1134
+ var import_react13 = __toESM(require("react"));
630
1135
  var UniformText = (props) => {
631
- return /* @__PURE__ */ import_react14.default.createElement(import_next_app_router_client.ClientUniformText, { ...props });
1136
+ return /* @__PURE__ */ import_react13.default.createElement(import_next_app_router_client.ClientUniformText, { ...props });
632
1137
  };
633
1138
  // Annotate the CommonJS export names for ESM import in node:
634
1139
  0 && (module.exports = {
635
- UniformEdgeState,
636
1140
  UniformRichText,
637
1141
  UniformSlot,
638
1142
  UniformText,