@the-portland-company/shell 0.96.1 → 0.97.0

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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PageHeaderProps, B as BreadcrumbBarProps, N as NavItem } from './index-3YFy4JHI.cjs';
2
- export { A as AI_CREDITS_STATE_TITLES, a as AiCreditsState, b as AiCreditsStateKind, C as Card, c as CommsNotification, d as CommsNotificationKind, F as FormColumn, H as HeaderTabBar, e as HeaderTabBarItem, K as KNOWN_TAB_GLYPHS, f as NotificationsAdapter, g as NotificationsFeed, R as RowMenu, h as RowMenuItem, i as RowMenuPlacement, T as TabGlyphComponent, j as aiCreditsWalletUrl, k as createCommsNotificationsAdapter, l as emptyNotificationsFeed, n as normalizeNotificationsFeed, r as resolveTabGlyph, m as rowMenuPosition } from './index-3YFy4JHI.cjs';
1
+ import { P as PageHeaderProps, B as BreadcrumbBarProps, N as NavItem } from './index-BaUIPQpN.cjs';
2
+ export { A as AI_CREDITS_STATE_TITLES, a as AiCreditsState, b as AiCreditsStateKind, C as Card, c as CommsNotification, d as CommsNotificationKind, F as FormColumn, H as HeaderTabBar, e as HeaderTabBarItem, K as KNOWN_TAB_GLYPHS, f as NotificationsAdapter, g as NotificationsFeed, R as RowMenu, h as RowMenuItem, i as RowMenuPlacement, T as TabGlyphComponent, j as aiCreditsWalletUrl, k as createCommsNotificationsAdapter, l as emptyNotificationsFeed, n as normalizeNotificationsFeed, r as resolveTabGlyph, m as rowMenuPosition } from './index-BaUIPQpN.cjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, CSSProperties } from 'react';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PageHeaderProps, B as BreadcrumbBarProps, N as NavItem } from './index-CqHKy3vG.js';
2
- export { A as AI_CREDITS_STATE_TITLES, a as AiCreditsState, b as AiCreditsStateKind, C as Card, c as CommsNotification, d as CommsNotificationKind, F as FormColumn, H as HeaderTabBar, e as HeaderTabBarItem, K as KNOWN_TAB_GLYPHS, f as NotificationsAdapter, g as NotificationsFeed, R as RowMenu, h as RowMenuItem, i as RowMenuPlacement, T as TabGlyphComponent, j as aiCreditsWalletUrl, k as createCommsNotificationsAdapter, l as emptyNotificationsFeed, n as normalizeNotificationsFeed, r as resolveTabGlyph, m as rowMenuPosition } from './index-CqHKy3vG.js';
1
+ import { P as PageHeaderProps, B as BreadcrumbBarProps, N as NavItem } from './index-BEMGfLpI.js';
2
+ export { A as AI_CREDITS_STATE_TITLES, a as AiCreditsState, b as AiCreditsStateKind, C as Card, c as CommsNotification, d as CommsNotificationKind, F as FormColumn, H as HeaderTabBar, e as HeaderTabBarItem, K as KNOWN_TAB_GLYPHS, f as NotificationsAdapter, g as NotificationsFeed, R as RowMenu, h as RowMenuItem, i as RowMenuPlacement, T as TabGlyphComponent, j as aiCreditsWalletUrl, k as createCommsNotificationsAdapter, l as emptyNotificationsFeed, n as normalizeNotificationsFeed, r as resolveTabGlyph, m as rowMenuPosition } from './index-BEMGfLpI.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, CSSProperties } from 'react';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { PageHeaderView, warnDeprecated, BreadcrumbBarView } from './chunk-5OTXPYZU.js';
2
- export { AI_CREDITS_STATE_TITLES, AiCreditsState, Card, FormColumn, HeaderTabBar, KNOWN_TAB_GLYPHS, RowMenu, RowMenuItem, SpeculationRulesScript, aiCreditsWalletUrl, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, createCommsNotificationsAdapter, emptyNotificationsFeed, normalizeNotificationsFeed, resolveTabGlyph, rowMenuPosition } from './chunk-5OTXPYZU.js';
1
+ import { PageHeaderView, warnDeprecated, BreadcrumbBarView } from './chunk-VAQNZD37.js';
2
+ export { AI_CREDITS_STATE_TITLES, AiCreditsState, Card, FormColumn, HeaderTabBar, KNOWN_TAB_GLYPHS, RowMenu, RowMenuItem, SpeculationRulesScript, aiCreditsWalletUrl, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, createCommsNotificationsAdapter, emptyNotificationsFeed, normalizeNotificationsFeed, resolveTabGlyph, rowMenuPosition } from './chunk-VAQNZD37.js';
3
3
  import { readResolvedTheme } from './chunk-BHRVZPZ7.js';
4
4
  export { BRAND_APPLE_ICON_LINK_ID, BRAND_FAVICON_LINK_ID, BrandFavicon, applyBrandFavicon, watchBrandFavicon } from './chunk-BMR5WAWH.js';
5
5
  import { extendTheme, ChakraProvider, useColorMode } from '@chakra-ui/react';
package/dist/native.cjs CHANGED
@@ -2376,6 +2376,34 @@ function useThemePreference() {
2376
2376
  );
2377
2377
  return { value, setValue };
2378
2378
  }
2379
+ function TopBarLinkAction({ label, description, href, icon: Icon }) {
2380
+ return /* @__PURE__ */ jsxRuntime.jsxs("a", { href, "aria-label": label, className: topBarIconButtonClass(), children: [
2381
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: TOPBAR_GLYPH_SIZE, className: "text-current" }),
2382
+ /* @__PURE__ */ jsxRuntime.jsx(TopBarTooltip, { title: label, description })
2383
+ ] });
2384
+ }
2385
+ function OrganizationSettingsAction({ href }) {
2386
+ return /* @__PURE__ */ jsxRuntime.jsx(
2387
+ TopBarLinkAction,
2388
+ {
2389
+ label: "Organization settings",
2390
+ description: "Users, Brand Kit, modes and billing for this organization.",
2391
+ href,
2392
+ icon: lu.LuSettings
2393
+ }
2394
+ );
2395
+ }
2396
+ function MyProfileAction({ href }) {
2397
+ return /* @__PURE__ */ jsxRuntime.jsx(
2398
+ TopBarLinkAction,
2399
+ {
2400
+ label: "My profile",
2401
+ description: "Your photo, organizations, security and notifications.",
2402
+ href,
2403
+ icon: lu.LuCircleUser
2404
+ }
2405
+ );
2406
+ }
2379
2407
  function FormColumn({ children, className }) {
2380
2408
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-shell-form-column": "", className: clsx4__default.default("w-full max-w-[960px]", className), children });
2381
2409
  }
@@ -3153,13 +3181,14 @@ function standardPolitogyNav(opts) {
3153
3181
  });
3154
3182
  };
3155
3183
  const accountRows = () => [
3156
- { kind: "section", label: "Account" },
3184
+ { kind: "section", label: "Account", railHidden: true },
3157
3185
  // My Profile moved to the Politogy ID account app (auth.politogyvrm.com)
3158
3186
  // with the retirement of app.politogyvrm.com.
3159
- { label: "My profile", icon: icon("circleUser"), href: withOrg(`${AUTH_ORIGIN}my-profile`) },
3187
+ { label: "My profile", icon: icon("circleUser"), href: withOrg(`${AUTH_ORIGIN}my-profile`), railHidden: true },
3160
3188
  {
3161
3189
  label: "Organization settings",
3162
3190
  icon: icon("settings"),
3191
+ railHidden: true,
3163
3192
  // Organization settings moved to the standalone Settings app
3164
3193
  // (settings.politogyvrm.com, Specs/Organization-Settings v12).
3165
3194
  href: withOrg(`${SETTINGS_ORIGIN2}organization-settings`),
@@ -3693,6 +3722,8 @@ function NavSidebar({
3693
3722
  ] }) : null,
3694
3723
  filterOrgs(org.organizations, orgFilter).map((o) => {
3695
3724
  const selected = o.id === org.id;
3725
+ const iconSrc = resolveOrgLogoUrl(o.iconUrl);
3726
+ const logoSrc = iconSrc ? void 0 : resolveOrgLogoUrl(o.logoUrl);
3696
3727
  return /* @__PURE__ */ jsxRuntime.jsxs(
3697
3728
  "button",
3698
3729
  {
@@ -3711,12 +3742,13 @@ function NavSidebar({
3711
3742
  /* @__PURE__ */ jsxRuntime.jsx(
3712
3743
  "span",
3713
3744
  {
3714
- style: { backgroundColor: o.brandColor || ORG_PILL_DEFAULT },
3715
- className: "flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full text-[10px] font-bold text-[#FFFFFF]",
3716
- children: resolveOrgLogoUrl(o.logoUrl) ? /* @__PURE__ */ jsxRuntime.jsx(
3745
+ "data-org-option-mark": iconSrc ? "icon" : logoSrc ? "logo" : "initials",
3746
+ style: iconSrc ? void 0 : { backgroundColor: o.brandColor || ORG_PILL_DEFAULT },
3747
+ className: `flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden text-[10px] font-bold text-[#FFFFFF] ${iconSrc ? "rounded-[4px] bg-[#FFFFFF]" : "rounded-full"}`,
3748
+ children: iconSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: iconSrc, alt: "", className: "max-h-full max-w-full object-contain" }) : logoSrc ? /* @__PURE__ */ jsxRuntime.jsx(
3717
3749
  "img",
3718
3750
  {
3719
- src: resolveOrgLogoUrl(o.logoUrl),
3751
+ src: logoSrc,
3720
3752
  alt: "",
3721
3753
  className: "h-full w-full object-cover"
3722
3754
  }
@@ -3813,7 +3845,7 @@ function NavSidebar({
3813
3845
  ] }),
3814
3846
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 flex-col overflow-y-auto px-[10px] py-3", children: /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex flex-col gap-0.5", children: [
3815
3847
  nav.groupLabel ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${NAV_EYEBROW_CLASS} px-2 pb-1.5 pt-1 ${rc("max-md:hidden")}`, children: nav.groupLabel }) : null,
3816
- nav.items.map((item, idx) => {
3848
+ nav.items.filter((item) => !item.railHidden).map((item, idx) => {
3817
3849
  if (item.kind === "section") {
3818
3850
  return /* @__PURE__ */ jsxRuntime.jsx(
3819
3851
  NavSectionRow,
@@ -4954,6 +4986,7 @@ exports.FormColumn = FormColumn;
4954
4986
  exports.FuelAction = FuelAction;
4955
4987
  exports.HeaderTabBar = HeaderTabBar;
4956
4988
  exports.KNOWN_TAB_GLYPHS = KNOWN_TAB_GLYPHS;
4989
+ exports.MyProfileAction = MyProfileAction;
4957
4990
  exports.NavAppShell = NavAppShell;
4958
4991
  exports.NavBetaBanner = NavBetaBanner;
4959
4992
  exports.NavChromeProvider = NavChromeProvider;
@@ -4963,6 +4996,7 @@ exports.NavTabStrip = NavTabStrip;
4963
4996
  exports.NavThemeControl = NavThemeControl;
4964
4997
  exports.NavTopBar = NavTopBar;
4965
4998
  exports.NotificationsAction = NotificationsAction;
4999
+ exports.OrganizationSettingsAction = OrganizationSettingsAction;
4966
5000
  exports.PageHeader = PageHeader;
4967
5001
  exports.RowMenu = RowMenu;
4968
5002
  exports.RowMenuItem = RowMenuItem;
@@ -4970,6 +5004,7 @@ exports.SPECS_ORIGIN = SPECS_ORIGIN;
4970
5004
  exports.SpecOverlayAction = SpecOverlayAction;
4971
5005
  exports.SupportAction = SupportAction;
4972
5006
  exports.TopBarCountBadge = TopBarCountBadge;
5007
+ exports.TopBarLinkAction = TopBarLinkAction;
4973
5008
  exports.TopBarPanelArrow = TopBarPanelArrow;
4974
5009
  exports.TopBarPopover = TopBarPopover;
4975
5010
  exports.TopBarTooltip = TopBarTooltip;