@hubspot/cms-dev-server 1.2.2 → 1.2.6

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.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>CMS React Dev Server Home</title>
7
7
  <!--app-head-->
8
- <script type="module" crossorigin src="/assets/index-tvg7JxpD.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-CEoO7aJ5.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-PcyCbkys.css">
10
10
  </head>
11
11
  <body>
@@ -1611,6 +1611,56 @@ function unstable_usePodcastEpisodes(resolvableIds) {
1611
1611
  }
1612
1612
  return [];
1613
1613
  }
1614
+ function useMenu(options) {
1615
+ var _a;
1616
+ const renderContext = useRenderContext();
1617
+ const uniqueId = `menuId:${options.menuId}`;
1618
+ if (!((_a = renderContext.resolvedDataDependencies) == null ? void 0 : _a.menus)) {
1619
+ return null;
1620
+ }
1621
+ const menuDependencies = renderContext.resolvedDataDependencies.menus;
1622
+ const menuDependency = menuDependencies.dependencies[uniqueId];
1623
+ if (!menuDependency) {
1624
+ return null;
1625
+ }
1626
+ if (menuDependency.status === "success" && menuDependency.id) {
1627
+ const menu = menuDependencies.data[menuDependency.id];
1628
+ return menu || null;
1629
+ }
1630
+ if (menuDependency.status === "error") {
1631
+ logError(menuDependency.error);
1632
+ }
1633
+ return null;
1634
+ }
1635
+ function useEditorVariableChecks() {
1636
+ var _a;
1637
+ const renderContext = useRenderContext();
1638
+ const editorChecksResult = (_a = renderContext.resolvedDataDependencies) == null ? void 0 : _a.editorVariableChecks;
1639
+ if ((editorChecksResult == null ? void 0 : editorChecksResult.status) === "success" && editorChecksResult.data) {
1640
+ return editorChecksResult.data;
1641
+ }
1642
+ if ((editorChecksResult == null ? void 0 : editorChecksResult.status) === "error") {
1643
+ logError(
1644
+ editorChecksResult.error || "Failed to load editor variable checks"
1645
+ );
1646
+ }
1647
+ return {};
1648
+ }
1649
+ function useBrandSettings() {
1650
+ var _a;
1651
+ const renderContext = useRenderContext();
1652
+ const brandSettingsResult = (_a = renderContext.resolvedDataDependencies) == null ? void 0 : _a.brandSettings;
1653
+ if ((brandSettingsResult == null ? void 0 : brandSettingsResult.type) === "success") {
1654
+ return brandSettingsResult.data;
1655
+ }
1656
+ if ((brandSettingsResult == null ? void 0 : brandSettingsResult.type) === "error") {
1657
+ logError(brandSettingsResult.error);
1658
+ }
1659
+ if ((brandSettingsResult == null ? void 0 : brandSettingsResult.type) === "deferred") {
1660
+ return null;
1661
+ }
1662
+ return null;
1663
+ }
1614
1664
  function id(value) {
1615
1665
  return { type: "id", value };
1616
1666
  }
@@ -2317,7 +2367,9 @@ const cmsComponents = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
2317
2367
  useAfterIslandHydration,
2318
2368
  useAvailableTranslations,
2319
2369
  useBasePath,
2370
+ useBrandSettings,
2320
2371
  useClientRenderContext,
2372
+ useEditorVariableChecks,
2321
2373
  useGetPerRequestMap_internal,
2322
2374
  useGetRenderRequestId,
2323
2375
  useHasSharedIslandState,
@@ -2329,6 +2381,7 @@ const cmsComponents = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
2329
2381
  useIsServerOrFirstClientRender,
2330
2382
  useIsServerRender,
2331
2383
  useLanguageVariants,
2384
+ useMenu,
2332
2385
  usePageUrl,
2333
2386
  useRenderContext,
2334
2387
  useServerRenderContext,
package/dist/index.js CHANGED
@@ -1631,7 +1631,7 @@ function trackUsage(action) {
1631
1631
  eventName: EVENT_NAME,
1632
1632
  action,
1633
1633
  nodeVersion: getNodeVersionData(),
1634
- version: "1.2.2",
1634
+ version: "1.2.6",
1635
1635
  os: getPlatform()
1636
1636
  };
1637
1637
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
package/dist/run.js CHANGED
@@ -2197,7 +2197,7 @@ function trackUsage(action) {
2197
2197
  eventName: EVENT_NAME,
2198
2198
  action,
2199
2199
  nodeVersion: getNodeVersionData(),
2200
- version: "1.2.2",
2200
+ version: "1.2.6",
2201
2201
  os: getPlatform()
2202
2202
  };
2203
2203
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "1.2.2",
3
+ "version": "1.2.6",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "engines": {
@@ -29,7 +29,7 @@
29
29
  "@babel/parser": "^7.25.3",
30
30
  "@babel/traverse": "^7.25.3",
31
31
  "@babel/types": "^7.25.2",
32
- "@hubspot/cms-components": "^1.2.2",
32
+ "@hubspot/cms-components": "^1.2.6",
33
33
  "@hubspot/local-dev-lib": "4.0.2",
34
34
  "@inquirer/select": "^2.0.0",
35
35
  "@originjs/vite-plugin-commonjs": "^1.0.3",
@@ -133,5 +133,5 @@
133
133
  "publishConfig": {
134
134
  "access": "public"
135
135
  },
136
- "gitHead": "81f9ada2ebc374156853360c6c514c845b561d00"
136
+ "gitHead": "0d9512b96135b8f53a2b37d156cde8ced5157bbb"
137
137
  }