@uniformdev/next-app-router 20.80.2 → 20.81.1-alpha.4.sha-de16ebeee7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/component.js CHANGED
@@ -5,9 +5,6 @@ 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
- };
11
8
  var __export = (target, all) => {
12
9
  for (var name in all)
13
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -30,127 +27,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
27
  ));
31
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
29
 
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
-
151
30
  // src/component.ts
152
31
  var component_exports = {};
153
32
  __export(component_exports, {
33
+ UniformEdgeState: () => UniformEdgeState,
154
34
  UniformRichText: () => UniformRichText,
155
35
  UniformSlot: () => UniformSlot,
156
36
  UniformText: () => UniformText,
@@ -187,6 +67,21 @@ var getUniformSlot = ({ slot, children }) => {
187
67
  return resolved.length > 0 ? resolved : void 0;
188
68
  };
189
69
 
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
+
190
85
  // src/components/UniformSlot.tsx
191
86
  var UniformSlot = ({ slot, children }) => {
192
87
  const resolved = [];
@@ -213,440 +108,40 @@ var UniformSlot = ({ slot, children }) => {
213
108
  // src/component.ts
214
109
  var import_next_app_router_client2 = require("@uniformdev/next-app-router-client");
215
110
 
216
- // ../context/dist/api/api.mjs
217
- var import_p_limit = __toESM(require_p_limit(), 1);
218
- var __defProp2 = Object.defineProperty;
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");
219
139
  var __typeError = (msg) => {
220
140
  throw TypeError(msg);
221
141
  };
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);
224
142
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
225
143
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
226
144
  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);
650
145
  var SELECT_QUERY_PREFIX = "select.";
651
146
  function appendCsv(out, key, values) {
652
147
  if (values === void 0) {
@@ -697,7 +192,7 @@ var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
697
192
  var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
698
193
  var _contentTypesUrl;
699
194
  var _entriesUrl;
700
- var _ContentClient = class _ContentClient2 extends ApiClient {
195
+ var _ContentClient = class _ContentClient2 extends import_api12.ApiClient {
701
196
  constructor(options) {
702
197
  var _a;
703
198
  super(options);
@@ -705,16 +200,16 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
705
200
  }
706
201
  getContentTypes(options) {
707
202
  const { projectId } = this.options;
708
- const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _contentTypesUrl), { ...options, projectId });
203
+ const fetchUri = this.createUrl(__privateGet(_ContentClient2, _contentTypesUrl), { ...options, projectId });
709
204
  return this.apiClient(fetchUri);
710
205
  }
711
206
  getEntries(options) {
712
207
  const { projectId } = this.options;
713
208
  const { skipDataResolution, filters, select, ...params } = options;
714
- const rewrittenFilters = rewriteFiltersForApi(filters);
209
+ const rewrittenFilters = (0, import_api12.rewriteFiltersForApi)(filters);
715
210
  const rewrittenSelect = projectionToQuery(select);
716
211
  if (skipDataResolution) {
717
- const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), {
212
+ const url = this.createUrl(__privateGet(_ContentClient2, _entriesUrl), {
718
213
  ...params,
719
214
  ...rewrittenFilters,
720
215
  ...rewrittenSelect,
@@ -723,7 +218,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
723
218
  return this.apiClient(url);
724
219
  }
725
220
  const edgeUrl = this.createUrl(
726
- __privateGet2(_ContentClient2, _entriesUrl),
221
+ __privateGet(_ContentClient2, _entriesUrl),
727
222
  { ...this.getEdgeOptions(params), ...rewrittenFilters, ...rewrittenSelect },
728
223
  this.edgeApiHost
729
224
  );
@@ -741,7 +236,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
741
236
  return this.apiClient(historyUrl);
742
237
  }
743
238
  async upsertContentType(body, opts = {}) {
744
- const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _contentTypesUrl));
239
+ const fetchUri = this.createUrl(__privateGet(_ContentClient2, _contentTypesUrl));
745
240
  if (typeof body.contentType.slugSettings === "object" && body.contentType.slugSettings !== null && Object.keys(body.contentType.slugSettings).length === 0) {
746
241
  delete body.contentType.slugSettings;
747
242
  }
@@ -753,7 +248,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
753
248
  });
754
249
  }
755
250
  async upsertEntry(body, options) {
756
- const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl));
251
+ const fetchUri = this.createUrl(__privateGet(_ContentClient2, _entriesUrl));
757
252
  const headers = {};
758
253
  if (options == null ? void 0 : options.ifUnmodifiedSince) {
759
254
  headers["x-if-unmodified-since"] = options.ifUnmodifiedSince;
@@ -767,7 +262,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
767
262
  return { modified: response.headers.get("x-modified-at") };
768
263
  }
769
264
  async deleteContentType(body) {
770
- const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _contentTypesUrl));
265
+ const fetchUri = this.createUrl(__privateGet(_ContentClient2, _contentTypesUrl));
771
266
  await this.apiClient(fetchUri, {
772
267
  method: "DELETE",
773
268
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -775,7 +270,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
775
270
  });
776
271
  }
777
272
  async deleteEntry(body) {
778
- const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl));
273
+ const fetchUri = this.createUrl(__privateGet(_ContentClient2, _entriesUrl));
779
274
  await this.apiClient(fetchUri, {
780
275
  method: "DELETE",
781
276
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -794,17 +289,17 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
794
289
  };
795
290
  _contentTypesUrl = /* @__PURE__ */ new WeakMap();
796
291
  _entriesUrl = /* @__PURE__ */ new WeakMap();
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 {
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 {
801
296
  constructor(options) {
802
297
  super(options);
803
298
  }
804
299
  /** Fetches a list of DataTypes for a project */
805
300
  async list(options) {
806
301
  const { projectId } = this.options;
807
- const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8), { ...options, projectId });
302
+ const fetchUri = this.createUrl(__privateGet(_DataTypeClient2, _url), { ...options, projectId });
808
303
  return await this.apiClient(fetchUri);
809
304
  }
810
305
  /** @deprecated Use {@link list} instead. */
@@ -813,7 +308,7 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
813
308
  }
814
309
  /** Updates or creates (based on id) a DataType */
815
310
  async save(body) {
816
- const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
311
+ const fetchUri = this.createUrl(__privateGet(_DataTypeClient2, _url));
817
312
  await this.apiClient(fetchUri, {
818
313
  method: "PUT",
819
314
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -826,7 +321,7 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
826
321
  }
827
322
  /** Deletes a DataType */
828
323
  async remove(body) {
829
- const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
324
+ const fetchUri = this.createUrl(__privateGet(_DataTypeClient2, _url));
830
325
  await this.apiClient(fetchUri, {
831
326
  method: "DELETE",
832
327
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -834,10 +329,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
834
329
  });
835
330
  }
836
331
  };
837
- _url8 = /* @__PURE__ */ new WeakMap();
838
- __privateAdd2(_DataTypeClient, _url8, "/api/v1/data-types");
332
+ _url = /* @__PURE__ */ new WeakMap();
333
+ __privateAdd(_DataTypeClient, _url, "/api/v1/data-types");
839
334
  var _baseUrl;
840
- var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
335
+ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends import_api16.ApiClient {
841
336
  constructor(options) {
842
337
  super(options);
843
338
  this.teamId = options.teamId;
@@ -846,7 +341,7 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
846
341
  * Gets a list of property type and hook names for the current team, including public integrations' hooks.
847
342
  */
848
343
  get(options) {
849
- const fetchUri = this.createUrl(__privateGet2(_IntegrationPropertyEditorsClient2, _baseUrl), {
344
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient2, _baseUrl), {
850
345
  ...options,
851
346
  teamId: this.teamId
852
347
  });
@@ -856,7 +351,7 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
856
351
  * Creates or updates a custom AI property editor on a Mesh app.
857
352
  */
858
353
  async deploy(body) {
859
- const fetchUri = this.createUrl(__privateGet2(_IntegrationPropertyEditorsClient2, _baseUrl));
354
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient2, _baseUrl));
860
355
  await this.apiClient(fetchUri, {
861
356
  method: "PUT",
862
357
  body: JSON.stringify({ ...body, teamId: this.teamId }),
@@ -867,7 +362,7 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
867
362
  * Removes a custom AI property editor from a Mesh app.
868
363
  */
869
364
  async delete(body) {
870
- const fetchUri = this.createUrl(__privateGet2(_IntegrationPropertyEditorsClient2, _baseUrl));
365
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient2, _baseUrl));
871
366
  await this.apiClient(fetchUri, {
872
367
  method: "DELETE",
873
368
  body: JSON.stringify({ ...body, teamId: this.teamId }),
@@ -876,16 +371,16 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
876
371
  }
877
372
  };
878
373
  _baseUrl = /* @__PURE__ */ new WeakMap();
879
- __privateAdd2(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
880
- var _url22;
374
+ __privateAdd(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
375
+ var _url2;
881
376
  var _projectsUrl;
882
- var _ProjectClient = class _ProjectClient2 extends ApiClient {
377
+ var _ProjectClient = class _ProjectClient2 extends import_api20.ApiClient {
883
378
  constructor(options) {
884
379
  super({ ...options, bypassCache: true });
885
380
  }
886
381
  /** Fetches single Project */
887
382
  async get(options) {
888
- const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22), { ...options });
383
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient2, _url2), { ...options });
889
384
  return await this.apiClient(fetchUri);
890
385
  }
891
386
  /**
@@ -894,7 +389,7 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
894
389
  * When omitted, returns all accessible teams and their projects.
895
390
  */
896
391
  async list(options) {
897
- const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
392
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
898
393
  return await this.apiClient(fetchUri);
899
394
  }
900
395
  /** @deprecated Use {@link list} instead. */
@@ -903,7 +398,7 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
903
398
  }
904
399
  /** Updates or creates (based on id) a Project */
905
400
  async save(body) {
906
- const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
401
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient2, _url2));
907
402
  return await this.apiClient(fetchUri, {
908
403
  method: "PUT",
909
404
  body: JSON.stringify({ ...body })
@@ -915,7 +410,7 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
915
410
  }
916
411
  /** Deletes a Project */
917
412
  async remove(body) {
918
- const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
413
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient2, _url2));
919
414
  await this.apiClient(fetchUri, {
920
415
  method: "DELETE",
921
416
  body: JSON.stringify({ ...body }),
@@ -927,24 +422,24 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
927
422
  return this.remove(body);
928
423
  }
929
424
  };
930
- _url22 = /* @__PURE__ */ new WeakMap();
425
+ _url2 = /* @__PURE__ */ new WeakMap();
931
426
  _projectsUrl = /* @__PURE__ */ new WeakMap();
932
- __privateAdd2(_ProjectClient, _url22, "/api/v1/project");
933
- __privateAdd2(_ProjectClient, _projectsUrl, "/api/v1/projects");
427
+ __privateAdd(_ProjectClient, _url2, "/api/v1/project");
428
+ __privateAdd(_ProjectClient, _projectsUrl, "/api/v1/projects");
934
429
  var ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
935
430
  var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
936
431
  var ATTRIBUTE_PARAMETER_TYPE = "data-uniform-parameter-type";
937
432
 
938
433
  // src/components/UniformRichText.tsx
939
434
  var import_richtext8 = require("@uniformdev/richtext");
940
- var import_react12 = __toESM(require("react"));
435
+ var import_react13 = __toESM(require("react"));
941
436
 
942
437
  // src/components/UniformRichTextNode.tsx
943
438
  var import_richtext7 = require("@uniformdev/richtext");
944
- var import_react11 = __toESM(require("react"));
439
+ var import_react12 = __toESM(require("react"));
945
440
 
946
441
  // src/components/nodes/AssetRichTextNode.tsx
947
- var import_react = __toESM(require("react"));
442
+ var import_react2 = __toESM(require("react"));
948
443
  var AssetRichTextNode = ({ node }) => {
949
444
  var _a, _b;
950
445
  const { __asset } = node;
@@ -952,46 +447,46 @@ var AssetRichTextNode = ({ node }) => {
952
447
  return null;
953
448
  }
954
449
  if (__asset.type === "image") {
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);
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);
956
451
  }
957
452
  if (__asset.type === "video") {
958
- return /* @__PURE__ */ import_react.default.createElement("video", { src: __asset.fields.url.value, controls: true });
453
+ return /* @__PURE__ */ import_react2.default.createElement("video", { src: __asset.fields.url.value, controls: true });
959
454
  }
960
455
  if (__asset.type === "audio") {
961
- return /* @__PURE__ */ import_react.default.createElement("audio", { src: __asset.fields.url.value, controls: true });
456
+ return /* @__PURE__ */ import_react2.default.createElement("audio", { src: __asset.fields.url.value, controls: true });
962
457
  }
963
458
  return null;
964
459
  };
965
460
 
966
461
  // src/components/nodes/HeadingRichTextNode.tsx
967
- var import_react2 = __toESM(require("react"));
462
+ var import_react3 = __toESM(require("react"));
968
463
  var HeadingRichTextNode = ({ children, node }) => {
969
464
  const { tag } = node;
970
465
  const HTag = tag != null ? tag : "h1";
971
- return /* @__PURE__ */ import_react2.default.createElement(HTag, null, children);
466
+ return /* @__PURE__ */ import_react3.default.createElement(HTag, null, children);
972
467
  };
973
468
 
974
469
  // src/components/nodes/LinebreakRichTextNode.tsx
975
- var import_react3 = __toESM(require("react"));
470
+ var import_react4 = __toESM(require("react"));
976
471
  var LinebreakRichTextNode = () => {
977
- return /* @__PURE__ */ import_react3.default.createElement("br", null);
472
+ return /* @__PURE__ */ import_react4.default.createElement("br", null);
978
473
  };
979
474
 
980
475
  // src/components/nodes/LinkRichTextNode.tsx
981
476
  var import_richtext = require("@uniformdev/richtext");
982
- var import_react4 = __toESM(require("react"));
477
+ var import_react5 = __toESM(require("react"));
983
478
  var LinkRichTextNode = ({ children, node }) => {
984
479
  const { link } = node;
985
- return /* @__PURE__ */ import_react4.default.createElement("a", { ...(0, import_richtext.linkParamValueToAnchorProps)(link) }, children);
480
+ return /* @__PURE__ */ import_react5.default.createElement("a", { ...(0, import_richtext.linkParamValueToAnchorProps)(link) }, children);
986
481
  };
987
482
 
988
483
  // src/components/nodes/ListItemRichTextNode.tsx
989
484
  var import_richtext2 = require("@uniformdev/richtext");
990
- var import_react5 = __toESM(require("react"));
485
+ var import_react6 = __toESM(require("react"));
991
486
  var ListItemRichTextNode = ({ children, node }) => {
992
487
  const { value } = node;
993
488
  const normalizedValue = (0, import_richtext2.getRichTextListItemValue)(value);
994
- return /* @__PURE__ */ import_react5.default.createElement(
489
+ return /* @__PURE__ */ import_react6.default.createElement(
995
490
  "li",
996
491
  {
997
492
  value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
@@ -1002,12 +497,12 @@ var ListItemRichTextNode = ({ children, node }) => {
1002
497
 
1003
498
  // src/components/nodes/ListRichTextNode.tsx
1004
499
  var import_richtext3 = require("@uniformdev/richtext");
1005
- var import_react6 = __toESM(require("react"));
500
+ var import_react7 = __toESM(require("react"));
1006
501
  var ListRichTextNode = ({ children, node }) => {
1007
502
  const { tag, start } = node;
1008
503
  const ListTag = tag != null ? tag : "ul";
1009
504
  const normalizedStart = (0, import_richtext3.getRichTextListStart)(start);
1010
- return /* @__PURE__ */ import_react6.default.createElement(
505
+ return /* @__PURE__ */ import_react7.default.createElement(
1011
506
  ListTag,
1012
507
  {
1013
508
  start: typeof normalizedStart === "number" && Number.isFinite(normalizedStart) && normalizedStart > 0 ? normalizedStart : void 0
@@ -1018,10 +513,10 @@ var ListRichTextNode = ({ children, node }) => {
1018
513
 
1019
514
  // src/components/nodes/ParagraphRichTextNode.tsx
1020
515
  var import_richtext4 = require("@uniformdev/richtext");
1021
- var import_react7 = __toESM(require("react"));
516
+ var import_react8 = __toESM(require("react"));
1022
517
  var ParagraphRichTextNode = ({ children, node }) => {
1023
518
  const { format, direction } = node;
1024
- return /* @__PURE__ */ import_react7.default.createElement(
519
+ return /* @__PURE__ */ import_react8.default.createElement(
1025
520
  "p",
1026
521
  {
1027
522
  dir: (0, import_richtext4.isPureDirection)(direction) ? direction : void 0,
@@ -1033,26 +528,26 @@ var ParagraphRichTextNode = ({ children, node }) => {
1033
528
 
1034
529
  // src/components/nodes/TableCellRichTextNode.tsx
1035
530
  var import_richtext5 = require("@uniformdev/richtext");
1036
- var import_react8 = __toESM(require("react"));
531
+ var import_react9 = __toESM(require("react"));
1037
532
  var TableCellRichTextNode = ({ children, node }) => {
1038
533
  const { headerState } = node;
1039
534
  const TableCellTag = (0, import_richtext5.getRichTextTagFromTableCellHeaderState)(headerState);
1040
- return /* @__PURE__ */ import_react8.default.createElement(TableCellTag, null, children);
535
+ return /* @__PURE__ */ import_react9.default.createElement(TableCellTag, null, children);
1041
536
  };
1042
537
 
1043
538
  // src/components/nodes/TabRichTextNode.tsx
1044
- var import_react9 = __toESM(require("react"));
539
+ var import_react10 = __toESM(require("react"));
1045
540
  var TabRichTextNode = () => {
1046
- return /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, " ");
541
+ return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, " ");
1047
542
  };
1048
543
 
1049
544
  // src/components/nodes/TextRichTextNode.tsx
1050
545
  var import_richtext6 = require("@uniformdev/richtext");
1051
- var import_react10 = __toESM(require("react"));
546
+ var import_react11 = __toESM(require("react"));
1052
547
  var TextRichTextNode = ({ node }) => {
1053
548
  const { text, format } = node;
1054
549
  const tags = (0, import_richtext6.getRichTextTagsFromTextFormat)(format);
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);
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);
1056
551
  };
1057
552
 
1058
553
  // src/components/UniformRichTextNode.tsx
@@ -1066,8 +561,8 @@ function UniformRichTextNode({ node, ...props }) {
1066
561
  if (!NodeRenderer) {
1067
562
  return null;
1068
563
  }
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);
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);
1071
566
  }
1072
567
  var rendererMap = /* @__PURE__ */ new Map([
1073
568
  ["heading", HeadingRichTextNode],
@@ -1076,19 +571,19 @@ var rendererMap = /* @__PURE__ */ new Map([
1076
571
  ["list", ListRichTextNode],
1077
572
  ["listitem", ListItemRichTextNode],
1078
573
  ["paragraph", ParagraphRichTextNode],
1079
- ["quote", ({ children }) => /* @__PURE__ */ import_react11.default.createElement("blockquote", null, children)],
574
+ ["quote", ({ children }) => /* @__PURE__ */ import_react12.default.createElement("blockquote", null, children)],
1080
575
  [
1081
576
  "code",
1082
- ({ children }) => /* @__PURE__ */ import_react11.default.createElement("pre", null, /* @__PURE__ */ import_react11.default.createElement("code", null, children))
577
+ ({ children }) => /* @__PURE__ */ import_react12.default.createElement("pre", null, /* @__PURE__ */ import_react12.default.createElement("code", null, children))
1083
578
  ],
1084
- ["root", ({ children }) => /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, children)],
579
+ ["root", ({ children }) => /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, children)],
1085
580
  ["text", TextRichTextNode],
1086
581
  ["tab", TabRichTextNode],
1087
582
  [
1088
583
  "table",
1089
- ({ children }) => /* @__PURE__ */ import_react11.default.createElement("table", null, /* @__PURE__ */ import_react11.default.createElement("tbody", null, children))
584
+ ({ children }) => /* @__PURE__ */ import_react12.default.createElement("table", null, /* @__PURE__ */ import_react12.default.createElement("tbody", null, children))
1090
585
  ],
1091
- ["tablerow", ({ children }) => /* @__PURE__ */ import_react11.default.createElement("tr", null, children)],
586
+ ["tablerow", ({ children }) => /* @__PURE__ */ import_react12.default.createElement("tr", null, children)],
1092
587
  ["tablecell", TableCellRichTextNode],
1093
588
  ["asset", AssetRichTextNode]
1094
589
  ]);
@@ -1097,7 +592,7 @@ var resolveRichTextDefaultRenderer = (node) => {
1097
592
  };
1098
593
 
1099
594
  // src/components/UniformRichText.tsx
1100
- var UniformRichText = import_react12.default.forwardRef(function UniformRichText2({
595
+ var UniformRichText = import_react13.default.forwardRef(function UniformRichText2({
1101
596
  component,
1102
597
  resolveRichTextRenderer,
1103
598
  as: Tag = "div",
@@ -1114,7 +609,7 @@ var UniformRichText = import_react12.default.forwardRef(function UniformRichText
1114
609
  const value = parameter.value;
1115
610
  if (!value || !(0, import_richtext8.isRichTextValue)(value)) return null;
1116
611
  if (!isContextualEditing && (0, import_richtext8.isRichTextValueConsideredEmpty)(value)) return null;
1117
- return Tag === null ? /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react12.default.createElement(
612
+ return Tag === null ? /* @__PURE__ */ import_react13.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react13.default.createElement(
1118
613
  Tag,
1119
614
  {
1120
615
  ref,
@@ -1125,18 +620,19 @@ var UniformRichText = import_react12.default.forwardRef(function UniformRichText
1125
620
  [ATTRIBUTE_PARAMETER_TYPE]: "richText"
1126
621
  } : {}
1127
622
  },
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 })
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 })
1129
624
  );
1130
625
  });
1131
626
 
1132
627
  // src/components/UniformText.tsx
1133
628
  var import_next_app_router_client = require("@uniformdev/next-app-router-client");
1134
- var import_react13 = __toESM(require("react"));
629
+ var import_react14 = __toESM(require("react"));
1135
630
  var UniformText = (props) => {
1136
- return /* @__PURE__ */ import_react13.default.createElement(import_next_app_router_client.ClientUniformText, { ...props });
631
+ return /* @__PURE__ */ import_react14.default.createElement(import_next_app_router_client.ClientUniformText, { ...props });
1137
632
  };
1138
633
  // Annotate the CommonJS export names for ESM import in node:
1139
634
  0 && (module.exports = {
635
+ UniformEdgeState,
1140
636
  UniformRichText,
1141
637
  UniformSlot,
1142
638
  UniformText,