@usethrottle/builder-react 0.5.1 → 0.5.2

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.
@@ -3177,6 +3177,7 @@ var MODES = ["horizontal", "vertical", "drawer", "mega"];
3177
3177
  var MAX_LEVEL = 3;
3178
3178
  var CLASS_RE = /^[A-Za-z_][A-Za-z0-9_-]{0,63}$/;
3179
3179
  var SUBMENU_DEFAULT = "Show submenu for {label}";
3180
+ var frameSubmenu = (text2) => text2 === "" ? SUBMENU_DEFAULT : text2.replaceAll("{name}", "{label}");
3180
3181
  function localized(value, locale) {
3181
3182
  if (!isRecord(value)) return str(value);
3182
3183
  for (const key of [locale, "en"]) {
@@ -3414,7 +3415,7 @@ function MenuV2(props) {
3414
3415
  /* @__PURE__ */ jsx33(Placeholder, { editMode, children: `Menu "${name}" is empty: add links in Site settings` })
3415
3416
  ] });
3416
3417
  }
3417
- const ctx = { builder, props, mode, variant: oneOf(settings.variant, ["default", "storefront"], "default"), submenu: word("nav.submenu", SUBMENU_DEFAULT) };
3418
+ const ctx = { builder, props, mode, variant: oneOf(settings.variant, ["default", "storefront"], "default"), submenu: word("nav.submenu", frameSubmenu(word("frame.nav.submenu", ""))) };
3418
3419
  const nameOf = (menu) => menu === "header" ? label : `${label} (${menu})`;
3419
3420
  return /* @__PURE__ */ jsxs24(Fragment20, { children: [
3420
3421
  /* @__PURE__ */ jsx33(BasicStyles, {}),
@@ -3618,7 +3619,7 @@ function Bar({ raw, props, builder }) {
3618
3619
  }
3619
3620
  return fallback;
3620
3621
  };
3621
- const dismissLabel = word("announcement.dismiss", SITE_STRING_DEFAULTS6["announcement.dismiss"]);
3622
+ const dismissLabel = word("frame.announcement.dismiss", word("announcement.dismiss", SITE_STRING_DEFAULTS6["announcement.dismiss"]));
3622
3623
  const dismissible = interactive && style.dismissible === true && settings.dismissible !== false;
3623
3624
  const dismiss = (id) => {
3624
3625
  writeDismissed(id);
@@ -4498,17 +4499,17 @@ function createRendererRegistry(packs, options = {}) {
4498
4499
  // src/server/load-page.ts
4499
4500
  import { BuilderNotFoundError } from "@usethrottle/builder";
4500
4501
  var isOwnPath = (path) => typeof path === "string" && path !== "/" && path.startsWith("/") && !path.startsWith("/pages/");
4502
+ async function ownPageAt(options, slug2) {
4503
+ const loaded = await loadBuilderPage({ ...options, slug: slug2 });
4504
+ if (loaded.kind !== "redirect" && !(isOwnPath(loaded.path) && loaded.path === options.path))
4505
+ throw new BuilderNotFoundError(options.path);
4506
+ return loaded;
4507
+ }
4501
4508
  async function loadBuilderPageByPath(options) {
4502
- const { path, locale } = options;
4503
- const client = clientOf(options);
4504
- if (client.pages.getByPath !== void 0) {
4505
- const found = await client.pages.getByPath(path, { locale });
4506
- if (isRedirect(found)) return { kind: "redirect", redirectTo: found.redirectTo };
4507
- return loadBuilderPage({ ...options, slug: found.slug });
4508
- }
4509
- const summaries = await client.pages.list();
4509
+ const { path } = options;
4510
+ const summaries = await clientOf(options).pages.list();
4510
4511
  const summary = summaries.find((entry) => entry.path === path && isOwnPath(entry.path));
4511
- if (summary !== void 0) return loadBuilderPage({ ...options, slug: summary.slug });
4512
+ if (summary !== void 0) return ownPageAt(options, summary.slug);
4512
4513
  const bySlug = summaries.find((entry) => `/${entry.slug}` === path);
4513
4514
  if (bySlug !== void 0 && isOwnPath(bySlug.path) && bySlug.path !== path)
4514
4515
  return { kind: "redirect", redirectTo: bySlug.path };
@@ -3177,6 +3177,7 @@ var MODES = ["horizontal", "vertical", "drawer", "mega"];
3177
3177
  var MAX_LEVEL = 3;
3178
3178
  var CLASS_RE = /^[A-Za-z_][A-Za-z0-9_-]{0,63}$/;
3179
3179
  var SUBMENU_DEFAULT = "Show submenu for {label}";
3180
+ var frameSubmenu = (text2) => text2 === "" ? SUBMENU_DEFAULT : text2.replaceAll("{name}", "{label}");
3180
3181
  function localized(value, locale) {
3181
3182
  if (!isRecord(value)) return str(value);
3182
3183
  for (const key of [locale, "en"]) {
@@ -3414,7 +3415,7 @@ function MenuV2(props) {
3414
3415
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Placeholder, { editMode, children: `Menu "${name}" is empty: add links in Site settings` })
3415
3416
  ] });
3416
3417
  }
3417
- const ctx = { builder, props, mode, variant: oneOf(settings.variant, ["default", "storefront"], "default"), submenu: word("nav.submenu", SUBMENU_DEFAULT) };
3418
+ const ctx = { builder, props, mode, variant: oneOf(settings.variant, ["default", "storefront"], "default"), submenu: word("nav.submenu", frameSubmenu(word("frame.nav.submenu", ""))) };
3418
3419
  const nameOf = (menu) => menu === "header" ? label : `${label} (${menu})`;
3419
3420
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3420
3421
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BasicStyles, {}),
@@ -3618,7 +3619,7 @@ function Bar({ raw, props, builder }) {
3618
3619
  }
3619
3620
  return fallback;
3620
3621
  };
3621
- const dismissLabel = word("announcement.dismiss", _builderschema.SITE_STRING_DEFAULTS["announcement.dismiss"]);
3622
+ const dismissLabel = word("frame.announcement.dismiss", word("announcement.dismiss", _builderschema.SITE_STRING_DEFAULTS["announcement.dismiss"]));
3622
3623
  const dismissible = interactive && style.dismissible === true && settings.dismissible !== false;
3623
3624
  const dismiss = (id) => {
3624
3625
  writeDismissed(id);
@@ -4498,17 +4499,17 @@ function createRendererRegistry(packs, options = {}) {
4498
4499
  // src/server/load-page.ts
4499
4500
 
4500
4501
  var isOwnPath = (path) => typeof path === "string" && path !== "/" && path.startsWith("/") && !path.startsWith("/pages/");
4502
+ async function ownPageAt(options, slug2) {
4503
+ const loaded = await loadBuilderPage({ ...options, slug: slug2 });
4504
+ if (loaded.kind !== "redirect" && !(isOwnPath(loaded.path) && loaded.path === options.path))
4505
+ throw new (0, _builder.BuilderNotFoundError)(options.path);
4506
+ return loaded;
4507
+ }
4501
4508
  async function loadBuilderPageByPath(options) {
4502
- const { path, locale } = options;
4503
- const client = clientOf(options);
4504
- if (client.pages.getByPath !== void 0) {
4505
- const found = await client.pages.getByPath(path, { locale });
4506
- if (isRedirect(found)) return { kind: "redirect", redirectTo: found.redirectTo };
4507
- return loadBuilderPage({ ...options, slug: found.slug });
4508
- }
4509
- const summaries = await client.pages.list();
4509
+ const { path } = options;
4510
+ const summaries = await clientOf(options).pages.list();
4510
4511
  const summary = summaries.find((entry) => entry.path === path && isOwnPath(entry.path));
4511
- if (summary !== void 0) return loadBuilderPage({ ...options, slug: summary.slug });
4512
+ if (summary !== void 0) return ownPageAt(options, summary.slug);
4512
4513
  const bySlug = summaries.find((entry) => `/${entry.slug}` === path);
4513
4514
  if (bySlug !== void 0 && isOwnPath(bySlug.path) && bySlug.path !== path)
4514
4515
  return { kind: "redirect", redirectTo: bySlug.path };
package/dist/index.cjs CHANGED
@@ -3497,6 +3497,7 @@ var MODES = ["horizontal", "vertical", "drawer", "mega"];
3497
3497
  var MAX_LEVEL = 3;
3498
3498
  var CLASS_RE = /^[A-Za-z_][A-Za-z0-9_-]{0,63}$/;
3499
3499
  var SUBMENU_DEFAULT = "Show submenu for {label}";
3500
+ var frameSubmenu = (text) => text === "" ? SUBMENU_DEFAULT : text.replaceAll("{name}", "{label}");
3500
3501
  function localized(value, locale) {
3501
3502
  if (!isRecord4(value)) return str(value);
3502
3503
  for (const key of [locale, "en"]) {
@@ -3734,7 +3735,7 @@ function MenuV2(props) {
3734
3735
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Placeholder, { editMode, children: `Menu "${name}" is empty: add links in Site settings` })
3735
3736
  ] });
3736
3737
  }
3737
- const ctx = { builder, props, mode, variant: oneOf(settings.variant, ["default", "storefront"], "default"), submenu: word("nav.submenu", SUBMENU_DEFAULT) };
3738
+ const ctx = { builder, props, mode, variant: oneOf(settings.variant, ["default", "storefront"], "default"), submenu: word("nav.submenu", frameSubmenu(word("frame.nav.submenu", ""))) };
3738
3739
  const nameOf = (menu) => menu === "header" ? label : `${label} (${menu})`;
3739
3740
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
3740
3741
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(BasicStyles, {}),
@@ -3938,7 +3939,7 @@ function Bar({ raw, props, builder }) {
3938
3939
  }
3939
3940
  return fallback;
3940
3941
  };
3941
- const dismissLabel = word("announcement.dismiss", import_builder_schema25.SITE_STRING_DEFAULTS["announcement.dismiss"]);
3942
+ const dismissLabel = word("frame.announcement.dismiss", word("announcement.dismiss", import_builder_schema25.SITE_STRING_DEFAULTS["announcement.dismiss"]));
3942
3943
  const dismissible = interactive && style.dismissible === true && settings.dismissible !== false;
3943
3944
  const dismiss = (id) => {
3944
3945
  writeDismissed(id);
package/dist/index.js CHANGED
@@ -3455,6 +3455,7 @@ var MODES = ["horizontal", "vertical", "drawer", "mega"];
3455
3455
  var MAX_LEVEL = 3;
3456
3456
  var CLASS_RE = /^[A-Za-z_][A-Za-z0-9_-]{0,63}$/;
3457
3457
  var SUBMENU_DEFAULT = "Show submenu for {label}";
3458
+ var frameSubmenu = (text) => text === "" ? SUBMENU_DEFAULT : text.replaceAll("{name}", "{label}");
3458
3459
  function localized(value, locale) {
3459
3460
  if (!isRecord4(value)) return str(value);
3460
3461
  for (const key of [locale, "en"]) {
@@ -3692,7 +3693,7 @@ function MenuV2(props) {
3692
3693
  /* @__PURE__ */ jsx34(Placeholder, { editMode, children: `Menu "${name}" is empty: add links in Site settings` })
3693
3694
  ] });
3694
3695
  }
3695
- const ctx = { builder, props, mode, variant: oneOf(settings.variant, ["default", "storefront"], "default"), submenu: word("nav.submenu", SUBMENU_DEFAULT) };
3696
+ const ctx = { builder, props, mode, variant: oneOf(settings.variant, ["default", "storefront"], "default"), submenu: word("nav.submenu", frameSubmenu(word("frame.nav.submenu", ""))) };
3696
3697
  const nameOf = (menu) => menu === "header" ? label : `${label} (${menu})`;
3697
3698
  return /* @__PURE__ */ jsxs24(Fragment20, { children: [
3698
3699
  /* @__PURE__ */ jsx34(BasicStyles, {}),
@@ -3896,7 +3897,7 @@ function Bar({ raw, props, builder }) {
3896
3897
  }
3897
3898
  return fallback;
3898
3899
  };
3899
- const dismissLabel = word("announcement.dismiss", SITE_STRING_DEFAULTS6["announcement.dismiss"]);
3900
+ const dismissLabel = word("frame.announcement.dismiss", word("announcement.dismiss", SITE_STRING_DEFAULTS6["announcement.dismiss"]));
3900
3901
  const dismissible = interactive && style.dismissible === true && settings.dismissible !== false;
3901
3902
  const dismiss = (id) => {
3902
3903
  writeDismissed(id);
package/dist/next.cjs CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
 
14
14
 
15
- var _chunkUNL4JWZScjs = require('./chunk-UNL4JWZS.cjs');
15
+ var _chunkWGBNEYOFcjs = require('./chunk-WGBNEYOF.cjs');
16
16
 
17
17
  // src/next/index.ts
18
18
  var _react = require('react'); var React = _interopRequireWildcard(_react);
@@ -70,7 +70,7 @@ var BuilderUnavailablePageError = class extends Error {
70
70
  constructor(template) {
71
71
  super(`The ${template} template cannot be served: its data source is unavailable`);
72
72
  this.template = template;
73
- _chunkUNL4JWZScjs.__publicField.call(void 0, this, "name", "BuilderUnavailablePageError");
73
+ _chunkWGBNEYOFcjs.__publicField.call(void 0, this, "name", "BuilderUnavailablePageError");
74
74
  }
75
75
  };
76
76
  var isRec = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -148,8 +148,8 @@ function createBuilderRoute(options) {
148
148
  return typeof params.locale === "string" ? params.locale : "en";
149
149
  }
150
150
  async function resolve(path, locale, currency) {
151
- const client = _chunkUNL4JWZScjs.clientOf.call(void 0, options);
152
- const bundle = await _chunkUNL4JWZScjs.getBundle.call(void 0, { client, locale, slots: options.slots });
151
+ const client = _chunkWGBNEYOFcjs.clientOf.call(void 0, options);
152
+ const bundle = await _chunkWGBNEYOFcjs.getBundle.call(void 0, { client, locale, slots: options.slots });
153
153
  const settings = bundle.site.settings;
154
154
  const read = {
155
155
  client: options.client,
@@ -172,11 +172,11 @@ function createBuilderRoute(options) {
172
172
  const params = matchTemplate(template, path);
173
173
  return params === null ? [] : [{ name, params }];
174
174
  })[0];
175
- const routeTable = _chunkUNL4JWZScjs.buildRouteTable.call(void 0, store, catalog);
175
+ const routeTable = _chunkWGBNEYOFcjs.buildRouteTable.call(void 0, store, catalog);
176
176
  if (path === "/") {
177
177
  try {
178
- const home = await _chunkUNL4JWZScjs.loadBuilderPage.call(void 0, { ...read, slug: "home" });
179
- if (home.kind === "redirect") return redirectTo(home.redirectTo);
178
+ const home = await _chunkWGBNEYOFcjs.loadBuilderPage.call(void 0, { ...read, slug: "home" });
179
+ if (home.kind === "redirect") return pageRedirectTo(home.redirectTo);
180
180
  return { kind: "page", slug: "home", page: home, path, own: false };
181
181
  } catch (error) {
182
182
  if (!isNotFound(error)) throw error;
@@ -186,18 +186,18 @@ function createBuilderRoute(options) {
186
186
  const handle = _optionalChain([matchTemplate, 'call', _6 => _6(pageRoute, path), 'optionalAccess', _7 => _7.handle]);
187
187
  if (matched === void 0 && handle === void 0 && path !== "/" && _builderschema.PAGE_PATH_RE.test(path)) {
188
188
  try {
189
- const found = await _chunkUNL4JWZScjs.loadBuilderPageByPath.call(void 0, { ...read, path });
190
- if (found.kind === "redirect") return redirectTo(found.redirectTo);
189
+ const found = await _chunkWGBNEYOFcjs.loadBuilderPageByPath.call(void 0, { ...read, path });
190
+ if (found.kind === "redirect") return pageRedirectTo(found.redirectTo);
191
191
  return { kind: "page", slug: found.slug, page: found, path, own: true };
192
192
  } catch (error) {
193
- if (!isNotFound(error)) throw error;
193
+ if (!isNotFound(error) && !isNamed(error, "BuilderValidationError")) throw error;
194
194
  }
195
195
  }
196
196
  if (handle !== void 0) {
197
197
  try {
198
- const found = await _chunkUNL4JWZScjs.loadBuilderPage.call(void 0, { ...read, slug: handle });
199
- if (found.kind === "redirect") return redirectTo(found.redirectTo);
200
- if (_chunkUNL4JWZScjs.isOwnPath.call(void 0, found.path)) return { kind: "redirect", to: found.path, permanent: true };
198
+ const found = await _chunkWGBNEYOFcjs.loadBuilderPage.call(void 0, { ...read, slug: handle });
199
+ if (found.kind === "redirect") return pageRedirectTo(found.redirectTo);
200
+ if (_chunkWGBNEYOFcjs.isOwnPath.call(void 0, found.path)) return { kind: "redirect", to: found.path, permanent: true };
201
201
  return { kind: "page", slug: handle, page: found, path, own: false };
202
202
  } catch (error) {
203
203
  if (!isNotFound(error)) throw error;
@@ -209,7 +209,7 @@ function createBuilderRoute(options) {
209
209
  async function finish(matched, queryJson, locale, currency) {
210
210
  const { name, path, routeTable } = matched;
211
211
  const query = JSON.parse(queryJson);
212
- const bundle = await _chunkUNL4JWZScjs.getBundle.call(void 0, { client: _chunkUNL4JWZScjs.clientOf.call(void 0, options), locale, slots: options.slots });
212
+ const bundle = await _chunkWGBNEYOFcjs.getBundle.call(void 0, { client: _chunkWGBNEYOFcjs.clientOf.call(void 0, options), locale, slots: options.slots });
213
213
  const read = {
214
214
  client: options.client,
215
215
  builderKey: options.builderKey,
@@ -232,7 +232,7 @@ function createBuilderRoute(options) {
232
232
  ...bundle.code === void 0 ? {} : { code: bundle.code }
233
233
  };
234
234
  try {
235
- const { part, meta } = await _chunkUNL4JWZScjs.loadBuilderTemplate.call(void 0, { ...read, name, shared });
235
+ const { part, meta } = await _chunkWGBNEYOFcjs.loadBuilderTemplate.call(void 0, { ...read, name, shared });
236
236
  return { kind: "template", name, part, context, meta, routeTable, path, unavailable };
237
237
  } catch (error) {
238
238
  const contribution = packs.flatMap((pack) => _nullishCoalesce(pack.templates, () => ( []))).find((entry) => entry.name === name);
@@ -255,6 +255,10 @@ function createBuilderRoute(options) {
255
255
  };
256
256
  }
257
257
  }
258
+ function pageRedirectTo(to) {
259
+ const path = sitePath(to);
260
+ return path === null ? { kind: "notFound" } : { kind: "redirect", to: path, permanent: true };
261
+ }
258
262
  function redirectTo(to) {
259
263
  const path = _nullishCoalesce(sitePath(to), () => ( (/^https?:\/\/[^\s\\]+$/iu.test(to) ? to : null)));
260
264
  return path === null ? { kind: "notFound" } : { kind: "redirect", to: path, permanent: true };
@@ -294,7 +298,7 @@ function createBuilderRoute(options) {
294
298
  }
295
299
  function templateBody(resolved) {
296
300
  const view = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _builderreact.BuilderTemplateView, { name: resolved.name, part: resolved.part, context: resolved.context });
297
- const Root = _chunkUNL4JWZScjs.templateRootOf.call(void 0, packs, resolved.name);
301
+ const Root = _chunkWGBNEYOFcjs.templateRootOf.call(void 0, packs, resolved.name);
298
302
  if (Root === void 0) return view;
299
303
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { context: resolved.context, document: resolved.part.document, children: view });
300
304
  }
@@ -323,14 +327,14 @@ function createBuilderRoute(options) {
323
327
  }
324
328
  }
325
329
  async function generateMetadata(props) {
326
- const client = _chunkUNL4JWZScjs.clientOf.call(void 0, options);
330
+ const client = _chunkWGBNEYOFcjs.clientOf.call(void 0, options);
327
331
  try {
328
332
  const { resolved, params, locale, search } = await request(props);
329
333
  if (resolved.kind === "redirect" || resolved.kind === "notFound") return {};
330
- const bundle = await _chunkUNL4JWZScjs.getBundle.call(void 0, { client, locale, slots: options.slots });
334
+ const bundle = await _chunkWGBNEYOFcjs.getBundle.call(void 0, { client, locale, slots: options.slots });
331
335
  const settings = bundle.site.settings;
332
336
  if (resolved.kind === "page") {
333
- const shared = await _chunkUNL4JWZScjs.getBundle.call(void 0, {
337
+ const shared = await _chunkWGBNEYOFcjs.getBundle.call(void 0, {
334
338
  client,
335
339
  locale,
336
340
  page: resolved.slug,
@@ -338,7 +342,7 @@ function createBuilderRoute(options) {
338
342
  });
339
343
  const page = shared.page;
340
344
  if (page === void 0 || "redirectTo" in page) return {};
341
- return _chunkUNL4JWZScjs.metadataOf.call(void 0, page, {
345
+ return _chunkWGBNEYOFcjs.metadataOf.call(void 0, page, {
342
346
  settings: shared.site.settings,
343
347
  mediaOrigin: _nullishCoalesce(options.mediaOrigin, () => ( "")),
344
348
  storeUrl: options.storeUrl,
@@ -346,7 +350,7 @@ function createBuilderRoute(options) {
346
350
  routeLocale: options.locale === void 0 && typeof params.locale === "string" ? params.locale : void 0
347
351
  });
348
352
  }
349
- return _chunkUNL4JWZScjs.templateMetadataOf.call(void 0, resolved.name, {
353
+ return _chunkWGBNEYOFcjs.templateMetadataOf.call(void 0, resolved.name, {
350
354
  settings,
351
355
  storeUrl: options.storeUrl,
352
356
  mediaOrigin: _nullishCoalesce(options.mediaOrigin, () => ( "")),
@@ -378,7 +382,7 @@ async function BuilderTemplate({
378
382
  ...client
379
383
  }) {
380
384
  try {
381
- const { part } = await _chunkUNL4JWZScjs.loadBuilderTemplate.call(void 0, {
385
+ const { part } = await _chunkWGBNEYOFcjs.loadBuilderTemplate.call(void 0, {
382
386
  ...client,
383
387
  name,
384
388
  locale,
@@ -386,7 +390,7 @@ async function BuilderTemplate({
386
390
  });
387
391
  const templateContext = _nullishCoalesce(context, () => ( { route: { path: "", params: {}, query: {} } }));
388
392
  const view = _react.createElement.call(void 0, _builderreact.BuilderTemplateView, { name, part, context: templateContext });
389
- const Root = _chunkUNL4JWZScjs.templateRootOf.call(void 0, packs, name);
393
+ const Root = _chunkWGBNEYOFcjs.templateRootOf.call(void 0, packs, name);
390
394
  return Root === void 0 ? view : _react.createElement.call(void 0, Root, { context: templateContext, document: part.document, children: view });
391
395
  } catch (error) {
392
396
  if (error instanceof _builder.BuilderUnavailableError || _optionalChain([error, 'optionalAccess', _10 => _10.name]) === "BuilderUnavailableError")
@@ -419,7 +423,7 @@ function createBuilderPage(options) {
419
423
  const slug = slugOf(options, params);
420
424
  const currency = await currencyOf(options, params);
421
425
  const { currency: _currency, ...rest } = options;
422
- const loaded = await _chunkUNL4JWZScjs.loadBuilderPage.call(void 0, {
426
+ const loaded = await _chunkWGBNEYOFcjs.loadBuilderPage.call(void 0, {
423
427
  ...rest,
424
428
  slug,
425
429
  locale: await localeOf(options, params),
@@ -439,12 +443,12 @@ function createBuilderPage(options) {
439
443
  const params = await props.params;
440
444
  const slug = slugOf(options, params);
441
445
  const locale = await localeOf(options, params);
442
- const client = _chunkUNL4JWZScjs.clientOf.call(void 0, options);
446
+ const client = _chunkWGBNEYOFcjs.clientOf.call(void 0, options);
443
447
  try {
444
- const bundle = await _chunkUNL4JWZScjs.getBundle.call(void 0, { client, locale, page: slug, slots: options.slots });
448
+ const bundle = await _chunkWGBNEYOFcjs.getBundle.call(void 0, { client, locale, page: slug, slots: options.slots });
445
449
  const page = bundle.page;
446
- if (page === void 0 || _chunkUNL4JWZScjs.isRedirect.call(void 0, page)) return {};
447
- return _chunkUNL4JWZScjs.metadataOf.call(void 0, page, {
450
+ if (page === void 0 || _chunkWGBNEYOFcjs.isRedirect.call(void 0, page)) return {};
451
+ return _chunkWGBNEYOFcjs.metadataOf.call(void 0, page, {
448
452
  settings: bundle.site.settings,
449
453
  mediaOrigin: _nullishCoalesce(options.mediaOrigin, () => ( "")),
450
454
  storeUrl: options.storeUrl,
@@ -467,4 +471,4 @@ function createBuilderPage(options) {
467
471
 
468
472
 
469
473
 
470
- exports.BuilderTemplate = BuilderTemplate; exports.BuilderUnavailablePageError = BuilderUnavailablePageError; exports.DEFAULT_CATALOG_TEMPLATE_PATHS = DEFAULT_CATALOG_TEMPLATE_PATHS; exports.DEFAULT_STORE_TEMPLATE_PATHS = DEFAULT_STORE_TEMPLATE_PATHS; exports.canonicalFor = _chunkUNL4JWZScjs.canonicalFor; exports.createBuilderPage = createBuilderPage; exports.createBuilderRoute = createBuilderRoute;
474
+ exports.BuilderTemplate = BuilderTemplate; exports.BuilderUnavailablePageError = BuilderUnavailablePageError; exports.DEFAULT_CATALOG_TEMPLATE_PATHS = DEFAULT_CATALOG_TEMPLATE_PATHS; exports.DEFAULT_STORE_TEMPLATE_PATHS = DEFAULT_STORE_TEMPLATE_PATHS; exports.canonicalFor = _chunkWGBNEYOFcjs.canonicalFor; exports.createBuilderPage = createBuilderPage; exports.createBuilderRoute = createBuilderRoute;
package/dist/next.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  metadataOf,
13
13
  templateMetadataOf,
14
14
  templateRootOf
15
- } from "./chunk-G6I4RIXU.js";
15
+ } from "./chunk-ULAFEYQV.js";
16
16
 
17
17
  // src/next/index.ts
18
18
  import { createElement as createElement2 } from "react";
@@ -176,7 +176,7 @@ function createBuilderRoute(options) {
176
176
  if (path === "/") {
177
177
  try {
178
178
  const home = await loadBuilderPage({ ...read, slug: "home" });
179
- if (home.kind === "redirect") return redirectTo(home.redirectTo);
179
+ if (home.kind === "redirect") return pageRedirectTo(home.redirectTo);
180
180
  return { kind: "page", slug: "home", page: home, path, own: false };
181
181
  } catch (error) {
182
182
  if (!isNotFound(error)) throw error;
@@ -187,16 +187,16 @@ function createBuilderRoute(options) {
187
187
  if (matched === void 0 && handle === void 0 && path !== "/" && PAGE_PATH_RE.test(path)) {
188
188
  try {
189
189
  const found = await loadBuilderPageByPath({ ...read, path });
190
- if (found.kind === "redirect") return redirectTo(found.redirectTo);
190
+ if (found.kind === "redirect") return pageRedirectTo(found.redirectTo);
191
191
  return { kind: "page", slug: found.slug, page: found, path, own: true };
192
192
  } catch (error) {
193
- if (!isNotFound(error)) throw error;
193
+ if (!isNotFound(error) && !isNamed(error, "BuilderValidationError")) throw error;
194
194
  }
195
195
  }
196
196
  if (handle !== void 0) {
197
197
  try {
198
198
  const found = await loadBuilderPage({ ...read, slug: handle });
199
- if (found.kind === "redirect") return redirectTo(found.redirectTo);
199
+ if (found.kind === "redirect") return pageRedirectTo(found.redirectTo);
200
200
  if (isOwnPath(found.path)) return { kind: "redirect", to: found.path, permanent: true };
201
201
  return { kind: "page", slug: handle, page: found, path, own: false };
202
202
  } catch (error) {
@@ -255,6 +255,10 @@ function createBuilderRoute(options) {
255
255
  };
256
256
  }
257
257
  }
258
+ function pageRedirectTo(to) {
259
+ const path = sitePath(to);
260
+ return path === null ? { kind: "notFound" } : { kind: "redirect", to: path, permanent: true };
261
+ }
258
262
  function redirectTo(to) {
259
263
  const path = sitePath(to) ?? (/^https?:\/\/[^\s\\]+$/iu.test(to) ? to : null);
260
264
  return path === null ? { kind: "notFound" } : { kind: "redirect", to: path, permanent: true };
package/dist/server.cjs CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
 
24
24
 
25
- var _chunkUNL4JWZScjs = require('./chunk-UNL4JWZS.cjs');
25
+ var _chunkWGBNEYOFcjs = require('./chunk-WGBNEYOF.cjs');
26
26
 
27
27
  // src/server/load-site.ts
28
28
  var _builder = require('@usethrottle/builder');
@@ -32,23 +32,23 @@ function siteThemeOf(site) {
32
32
  }
33
33
  async function loadSite(options) {
34
34
  const { locale, slots = [], packs = [], page, mediaOrigin = "", currency } = options;
35
- const client = _chunkUNL4JWZScjs.clientOf.call(void 0, options);
35
+ const client = _chunkWGBNEYOFcjs.clientOf.call(void 0, options);
36
36
  let bundle;
37
37
  try {
38
- bundle = await _chunkUNL4JWZScjs.getBundle.call(void 0, { client, locale, slots, page });
38
+ bundle = await _chunkWGBNEYOFcjs.getBundle.call(void 0, { client, locale, slots, page });
39
39
  } catch (error) {
40
40
  if (!(error instanceof _builder.BuilderUnavailableError) || client.mode === "build") throw error;
41
- _chunkUNL4JWZScjs.warnOnce.call(void 0, "site-unavailable", `The Builder could not be read (${error.reason}); the store renders without its Builder header, footer and slots`);
41
+ _chunkWGBNEYOFcjs.warnOnce.call(void 0, "site-unavailable", `The Builder could not be read (${error.reason}); the store renders without its Builder header, footer and slots`);
42
42
  return { status: "unavailable", locale };
43
43
  }
44
- const registry = _chunkUNL4JWZScjs.createRendererRegistry.call(void 0, packs);
44
+ const registry = _chunkWGBNEYOFcjs.createRendererRegistry.call(void 0, packs);
45
45
  const names = Object.keys(bundle.slots);
46
46
  const withShared = (loaded) => ({
47
47
  ...loaded,
48
48
  ...(_nullishCoalesce(loaded.savedSections, () => ( bundle.savedSections))) === void 0 ? {} : { savedSections: _nullishCoalesce(loaded.savedSections, () => ( bundle.savedSections)) }
49
49
  });
50
50
  const documents = [bundle.header, bundle.footer, ...names.map((n) => bundle.slots[n])].map(withShared);
51
- const data = await _chunkUNL4JWZScjs.staticDataFor.call(void 0, documents, registry, locale, currency);
51
+ const data = await _chunkWGBNEYOFcjs.staticDataFor.call(void 0, documents, registry, locale, currency);
52
52
  return {
53
53
  status: "ok",
54
54
  locale,
@@ -58,9 +58,9 @@ async function loadSite(options) {
58
58
  mediaOrigin,
59
59
  settings: bundle.site.settings,
60
60
  ...siteThemeOf(bundle.site),
61
- header: _chunkUNL4JWZScjs.partOf.call(void 0, bundle.header, data, bundle),
62
- footer: _chunkUNL4JWZScjs.partOf.call(void 0, bundle.footer, data, bundle),
63
- slots: Object.fromEntries(names.map((name) => [name, _chunkUNL4JWZScjs.partOf.call(void 0, bundle.slots[name], data, bundle)]))
61
+ header: _chunkWGBNEYOFcjs.partOf.call(void 0, bundle.header, data, bundle),
62
+ footer: _chunkWGBNEYOFcjs.partOf.call(void 0, bundle.footer, data, bundle),
63
+ slots: Object.fromEntries(names.map((name) => [name, _chunkWGBNEYOFcjs.partOf.call(void 0, bundle.slots[name], data, bundle)]))
64
64
  };
65
65
  }
66
66
 
@@ -98,7 +98,7 @@ var pathnameOf = (url) => {
98
98
  }
99
99
  };
100
100
  async function builderSitemapParts(options, extras = {}) {
101
- const origin = _chunkUNL4JWZScjs.originOf.call(void 0, options.storeUrl);
101
+ const origin = _chunkWGBNEYOFcjs.originOf.call(void 0, options.storeUrl);
102
102
  const entries = await pageEntries(options, origin);
103
103
  if (origin === void 0) return { parts: [] };
104
104
  const rules = sitemapRulesOf(await settingsOf(options));
@@ -114,7 +114,7 @@ async function builderSitemapParts(options, extras = {}) {
114
114
  entries.push({ url: loc, ...when === void 0 || Number.isNaN(when.getTime()) ? {} : { lastModified: when } });
115
115
  }
116
116
  } catch (error) {
117
- _chunkUNL4JWZScjs.warnOnce.call(void 0, "sitemap-contributor", `A sitemap contributor failed (${error instanceof Error ? error.message : "unknown error"}); the sitemap leaves out its URLs`);
117
+ _chunkWGBNEYOFcjs.warnOnce.call(void 0, "sitemap-contributor", `A sitemap contributor failed (${error instanceof Error ? error.message : "unknown error"}); the sitemap leaves out its URLs`);
118
118
  }
119
119
  }
120
120
  const parts = [];
@@ -128,19 +128,19 @@ async function builderSitemap(options, extras = {}) {
128
128
  }
129
129
  async function settingsOf(options) {
130
130
  try {
131
- return (await _chunkUNL4JWZScjs.clientOf.call(void 0, options).site({ locale: _nullishCoalesce(options.locale, () => ( "en")) })).settings;
131
+ return (await _chunkWGBNEYOFcjs.clientOf.call(void 0, options).site({ locale: _nullishCoalesce(options.locale, () => ( "en")) })).settings;
132
132
  } catch (e3) {
133
133
  return {};
134
134
  }
135
135
  }
136
136
  async function pageEntries(options, origin) {
137
137
  if (options.client === void 0 && (options.builderKey === void 0 || options.builderKey === "")) {
138
- _chunkUNL4JWZScjs.warnOnce.call(void 0, "sitemap-no-key", "builderSitemap has no builderKey (is THROTTLE_BUILDER_KEY set?); the sitemap leaves out the Builder pages");
138
+ _chunkWGBNEYOFcjs.warnOnce.call(void 0, "sitemap-no-key", "builderSitemap has no builderKey (is THROTTLE_BUILDER_KEY set?); the sitemap leaves out the Builder pages");
139
139
  return [];
140
140
  }
141
- const client = _chunkUNL4JWZScjs.clientOf.call(void 0, options);
141
+ const client = _chunkWGBNEYOFcjs.clientOf.call(void 0, options);
142
142
  if (origin === void 0) {
143
- _chunkUNL4JWZScjs.warnOnce.call(void 0, "sitemap-origin", "builderSitemap needs a storeUrl (https://shop.example.com) that is an http(s) origin. The Builder does not publish the store URL.");
143
+ _chunkWGBNEYOFcjs.warnOnce.call(void 0, "sitemap-origin", "builderSitemap needs a storeUrl (https://shop.example.com) that is an http(s) origin. The Builder does not publish the store URL.");
144
144
  return [];
145
145
  }
146
146
  const locale = _nullishCoalesce(options.locale, () => ( "en"));
@@ -150,19 +150,19 @@ async function pageEntries(options, origin) {
150
150
  const rules = sitemapRulesOf(settings);
151
151
  if (!rules.pages) return [];
152
152
  const indexable = await withoutNoindex(client, pages, locale);
153
- const { list } = _chunkUNL4JWZScjs.siteLocales.call(void 0, settings);
153
+ const { list } = _chunkWGBNEYOFcjs.siteLocales.call(void 0, settings);
154
154
  const prefixes = options.localeRoute !== true ? [void 0] : list.length > 0 ? list : [locale];
155
155
  return indexable.flatMap((page) => {
156
- const path = _chunkUNL4JWZScjs.pagePathOf.call(void 0, settings, page, options.pagePath);
156
+ const path = _chunkWGBNEYOFcjs.pagePathOf.call(void 0, settings, page, options.pagePath);
157
157
  if (path === null || excluded(rules.exclude, path, page.slug)) return [];
158
158
  return prefixes.flatMap((prefix) => {
159
- const url = safeLoc(`${origin}${_chunkUNL4JWZScjs.localized.call(void 0, path, prefix)}`, origin);
159
+ const url = safeLoc(`${origin}${_chunkWGBNEYOFcjs.localized.call(void 0, path, prefix)}`, origin);
160
160
  return url === null ? [] : [{ url, lastModified: new Date(page.updatedAt) }];
161
161
  });
162
162
  });
163
163
  } catch (error) {
164
164
  if (!(error instanceof _builder.BuilderUnavailableError) || client.mode === "build") throw error;
165
- _chunkUNL4JWZScjs.warnOnce.call(void 0, "sitemap-unavailable", `The Builder could not be read (${error.reason}); the sitemap leaves out its pages`);
165
+ _chunkWGBNEYOFcjs.warnOnce.call(void 0, "sitemap-unavailable", `The Builder could not be read (${error.reason}); the sitemap leaves out its pages`);
166
166
  return [];
167
167
  }
168
168
  }
@@ -176,14 +176,14 @@ async function withoutNoindex(client, pages, locale) {
176
176
  slice.map(
177
177
  (page) => client.pages.get(page.slug, { locale }).catch((error) => {
178
178
  if (error instanceof _builder.BuilderNotFoundError) return "gone";
179
- _chunkUNL4JWZScjs.warnOnce.call(void 0, "sitemap-page-read", `A page could not be read for the sitemap (${error instanceof Error ? error.message : "unknown error"}); it stays listed`);
179
+ _chunkWGBNEYOFcjs.warnOnce.call(void 0, "sitemap-page-read", `A page could not be read for the sitemap (${error instanceof Error ? error.message : "unknown error"}); it stays listed`);
180
180
  return void 0;
181
181
  })
182
182
  )
183
183
  );
184
184
  slice.forEach((page, index) => {
185
185
  const answer = answers[index];
186
- if (answer === "gone" || answer !== void 0 && (_chunkUNL4JWZScjs.isRedirect.call(void 0, answer) || _chunkUNL4JWZScjs.pageSeoOf.call(void 0, answer).noindex)) skip.add(page.slug);
186
+ if (answer === "gone" || answer !== void 0 && (_chunkWGBNEYOFcjs.isRedirect.call(void 0, answer) || _chunkWGBNEYOFcjs.pageSeoOf.call(void 0, answer).noindex)) skip.add(page.slug);
187
187
  });
188
188
  }
189
189
  return pages.filter((page) => !skip.has(page.slug));
@@ -232,7 +232,7 @@ var validDisallow = (value) => validLine(value) && value.trim() !== "/";
232
232
  function siteOriginOf(site, options = {}) {
233
233
  const settings = _nullishCoalesce(site.settings, () => ( {}));
234
234
  const seo = isRec2(settings.seo) ? settings.seo : {};
235
- return _nullishCoalesce(_nullishCoalesce(_chunkUNL4JWZScjs.originOf.call(void 0, typeof seo.canonicalBase === "string" ? seo.canonicalBase : void 0), () => ( _chunkUNL4JWZScjs.originOf.call(void 0, options.storeUrl))), () => ( _chunkUNL4JWZScjs.originOf.call(void 0, typeof settings.storeUrl === "string" ? settings.storeUrl : void 0)));
235
+ return _nullishCoalesce(_nullishCoalesce(_chunkWGBNEYOFcjs.originOf.call(void 0, typeof seo.canonicalBase === "string" ? seo.canonicalBase : void 0), () => ( _chunkWGBNEYOFcjs.originOf.call(void 0, options.storeUrl))), () => ( _chunkWGBNEYOFcjs.originOf.call(void 0, typeof settings.storeUrl === "string" ? settings.storeUrl : void 0)));
236
236
  }
237
237
  function builderRobots(site, options = {}) {
238
238
  const settings = _nullishCoalesce(site.settings, () => ( {}));
@@ -257,7 +257,7 @@ function builderRobotsResponse(site, options = {}) {
257
257
 
258
258
  // src/server/static-params.ts
259
259
  async function builderStaticParams(options) {
260
- const client = _chunkUNL4JWZScjs.clientOf.call(void 0, options);
260
+ const client = _chunkWGBNEYOFcjs.clientOf.call(void 0, options);
261
261
  if (client.mode !== "build")
262
262
  throw new TypeError(
263
263
  'builderStaticParams generates every page of a frozen release: give it a client made with createBuilderClient({ mode: "build" }). A live store keeps its pages dynamic.'
@@ -292,4 +292,4 @@ async function builderStaticParams(options) {
292
292
 
293
293
 
294
294
 
295
- exports.BuilderNotFoundError = _builder.BuilderNotFoundError; exports.BuilderUnavailableError = _builder.BuilderUnavailableError; exports.DEFAULT_ROBOTS_DISALLOW = DEFAULT_ROBOTS_DISALLOW; exports.SITEMAP_MAX_URLS = SITEMAP_MAX_URLS; exports.breadcrumbJsonLd = _chunkUNL4JWZScjs.breadcrumbJsonLd; exports.builderRobots = builderRobots; exports.builderRobotsResponse = builderRobotsResponse; exports.builderSitemap = builderSitemap; exports.builderSitemapParts = builderSitemapParts; exports.builderStaticParams = builderStaticParams; exports.faqJsonLd = _chunkUNL4JWZScjs.faqJsonLd; exports.getBundle = _chunkUNL4JWZScjs.getBundle; exports.isOwnPath = _chunkUNL4JWZScjs.isOwnPath; exports.jsonLdString = _chunkUNL4JWZScjs.jsonLdString; exports.loadBuilderPage = _chunkUNL4JWZScjs.loadBuilderPage; exports.loadBuilderPageByPath = _chunkUNL4JWZScjs.loadBuilderPageByPath; exports.loadBuilderTemplate = _chunkUNL4JWZScjs.loadBuilderTemplate; exports.loadOwnPagePaths = _chunkUNL4JWZScjs.loadOwnPagePaths; exports.loadSite = loadSite; exports.localBusinessJsonLd = _chunkUNL4JWZScjs.localBusinessJsonLd; exports.organizationJsonLd = _chunkUNL4JWZScjs.organizationJsonLd; exports.siteOriginOf = siteOriginOf; exports.webSiteJsonLd = _chunkUNL4JWZScjs.webSiteJsonLd;
295
+ exports.BuilderNotFoundError = _builder.BuilderNotFoundError; exports.BuilderUnavailableError = _builder.BuilderUnavailableError; exports.DEFAULT_ROBOTS_DISALLOW = DEFAULT_ROBOTS_DISALLOW; exports.SITEMAP_MAX_URLS = SITEMAP_MAX_URLS; exports.breadcrumbJsonLd = _chunkWGBNEYOFcjs.breadcrumbJsonLd; exports.builderRobots = builderRobots; exports.builderRobotsResponse = builderRobotsResponse; exports.builderSitemap = builderSitemap; exports.builderSitemapParts = builderSitemapParts; exports.builderStaticParams = builderStaticParams; exports.faqJsonLd = _chunkWGBNEYOFcjs.faqJsonLd; exports.getBundle = _chunkWGBNEYOFcjs.getBundle; exports.isOwnPath = _chunkWGBNEYOFcjs.isOwnPath; exports.jsonLdString = _chunkWGBNEYOFcjs.jsonLdString; exports.loadBuilderPage = _chunkWGBNEYOFcjs.loadBuilderPage; exports.loadBuilderPageByPath = _chunkWGBNEYOFcjs.loadBuilderPageByPath; exports.loadBuilderTemplate = _chunkWGBNEYOFcjs.loadBuilderTemplate; exports.loadOwnPagePaths = _chunkWGBNEYOFcjs.loadOwnPagePaths; exports.loadSite = loadSite; exports.localBusinessJsonLd = _chunkWGBNEYOFcjs.localBusinessJsonLd; exports.organizationJsonLd = _chunkWGBNEYOFcjs.organizationJsonLd; exports.siteOriginOf = siteOriginOf; exports.webSiteJsonLd = _chunkWGBNEYOFcjs.webSiteJsonLd;
package/dist/server.d.cts CHANGED
@@ -48,9 +48,16 @@ type LoadBuilderPageOptions = ClientOptions & {
48
48
  declare const isOwnPath: (path: unknown) => path is string;
49
49
  /**
50
50
  * Reads the page that answers at its own path, or the redirect of an older path of a page (`slug_redirects`).
51
- * Uses the client's `pages.getByPath` when it has one; otherwise the page list (its summaries carry `path`), which
52
- * also answers a 308 for a listed slug whose own path has moved. An older path that is no longer any page's slug
53
- * is only found by `getByPath` (no Worker call is made per unknown path). Rejects with `BuilderNotFoundError` when nothing is at the path.
51
+ * Stateless: nothing is remembered between requests or shared between clients and locales. The page list (cached,
52
+ * `pages`-tagged, read with this request's client and locale; its summaries carry `path`) answers an own path, and
53
+ * a 308 for a listed slug whose own path has moved. A path outside the list never reaches the Builder: an unknown
54
+ * path costs one cached list read, so crawlers cannot amplify into upstream requests. A page answer is used only
55
+ * when it lives at exactly this own path (`isOwnPath` and equal), so no other path becomes a code route.
56
+ * Rejects with `BuilderNotFoundError` when nothing is at the path.
57
+ *
58
+ * TODO(B-BACKEND): old paths (`slug_redirects`, E25e, including multi-segment ones) cannot be answered here, because
59
+ * neither the pages list nor the site answer exposes them. When the list summaries carry `redirectFrom` paths, look
60
+ * the request path up in that set and only then call `pages.getByPath` (which already exists on the clients).
54
61
  */
55
62
  declare function loadBuilderPageByPath(options: Omit<LoadBuilderPageOptions, 'slug'> & {
56
63
  path: string;
package/dist/server.d.ts CHANGED
@@ -48,9 +48,16 @@ type LoadBuilderPageOptions = ClientOptions & {
48
48
  declare const isOwnPath: (path: unknown) => path is string;
49
49
  /**
50
50
  * Reads the page that answers at its own path, or the redirect of an older path of a page (`slug_redirects`).
51
- * Uses the client's `pages.getByPath` when it has one; otherwise the page list (its summaries carry `path`), which
52
- * also answers a 308 for a listed slug whose own path has moved. An older path that is no longer any page's slug
53
- * is only found by `getByPath` (no Worker call is made per unknown path). Rejects with `BuilderNotFoundError` when nothing is at the path.
51
+ * Stateless: nothing is remembered between requests or shared between clients and locales. The page list (cached,
52
+ * `pages`-tagged, read with this request's client and locale; its summaries carry `path`) answers an own path, and
53
+ * a 308 for a listed slug whose own path has moved. A path outside the list never reaches the Builder: an unknown
54
+ * path costs one cached list read, so crawlers cannot amplify into upstream requests. A page answer is used only
55
+ * when it lives at exactly this own path (`isOwnPath` and equal), so no other path becomes a code route.
56
+ * Rejects with `BuilderNotFoundError` when nothing is at the path.
57
+ *
58
+ * TODO(B-BACKEND): old paths (`slug_redirects`, E25e, including multi-segment ones) cannot be answered here, because
59
+ * neither the pages list nor the site answer exposes them. When the list summaries carry `redirectFrom` paths, look
60
+ * the request path up in that set and only then call `pages.getByPath` (which already exists on the clients).
54
61
  */
55
62
  declare function loadBuilderPageByPath(options: Omit<LoadBuilderPageOptions, 'slug'> & {
56
63
  path: string;
package/dist/server.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  staticDataFor,
23
23
  warnOnce,
24
24
  webSiteJsonLd
25
- } from "./chunk-G6I4RIXU.js";
25
+ } from "./chunk-ULAFEYQV.js";
26
26
 
27
27
  // src/server/load-site.ts
28
28
  import { BuilderUnavailableError } from "@usethrottle/builder";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usethrottle/builder-react",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Renders a published Throttle Builder page document as React in a merchant's store: responsive CSS, header, footer, slots and the site design provider.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -57,9 +57,9 @@
57
57
  "nextjs"
58
58
  ],
59
59
  "dependencies": {
60
- "@usethrottle/builder": "^0.6.0",
61
- "@usethrottle/builder-schema": "^0.4.0",
62
- "@usethrottle/ui": "^0.1.3"
60
+ "@usethrottle/ui": "^0.1.3",
61
+ "@usethrottle/builder": "^0.7.0",
62
+ "@usethrottle/builder-schema": "^0.4.1"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "next": ">=15",