@the-portland-company/shell 0.92.0 → 0.94.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.
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { S as StandardNavIconKey, h as NavIcon, N as NavItem, i as NavBreadcrumb, j as StandardNavMode, k as NavLinkComponent, l as NavChromeFetcher, m as NavMode, o as NavUserMenu, p as NavOrgOption, d as NotificationsAdapter, q as NavFooterLink, r as NavFooter, s as NavDisplayMode } from './index-Cg5aEImm.cjs';
3
+ import { S as StandardNavIconKey, k as NavIcon, N as NavItem, l as NavBreadcrumb, m as StandardNavMode, o as NavLinkComponent, p as NavChromeFetcher, q as NavMode, s as NavUserMenu, t as NavOrgOption, f as NotificationsAdapter, u as NavFooterLink, v as NavFooter, w as NavDisplayMode } from './index-ByUbBbta.cjs';
4
4
  import './theme-preference.cjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { S as StandardNavIconKey, h as NavIcon, N as NavItem, i as NavBreadcrumb, j as StandardNavMode, k as NavLinkComponent, l as NavChromeFetcher, m as NavMode, o as NavUserMenu, p as NavOrgOption, d as NotificationsAdapter, q as NavFooterLink, r as NavFooter, s as NavDisplayMode } from './index-DG32i0jC.js';
3
+ import { S as StandardNavIconKey, k as NavIcon, N as NavItem, l as NavBreadcrumb, m as StandardNavMode, o as NavLinkComponent, p as NavChromeFetcher, q as NavMode, s as NavUserMenu, t as NavOrgOption, f as NotificationsAdapter, u as NavFooterLink, v as NavFooter, w as NavDisplayMode } from './index-PRu56mmW.js';
4
4
  import './theme-preference.js';
5
5
 
6
6
  /**
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { broadcastLogout, watchLogout } from './chunk-LL6LSJAH.js';
3
3
  import { writeUrlState } from './chunk-GVQKZI5X.js';
4
- import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell } from './chunk-WDVQBUWF.js';
5
- export { standardNavIcons } from './chunk-WDVQBUWF.js';
6
- import { warnDeprecated, NavChromeProvider, TopBarWidgetSlot, FuelAction, SpecOverlayAction, NotificationsAction, SupportAction, useChromeMe, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-ZS7MQXDQ.js';
4
+ import { clearBetaBannerDismissal, standardPolitogyNav, standardNavIcons, isNavItemActive, NavAppShell } from './chunk-MCMD4WR6.js';
5
+ export { standardNavIcons } from './chunk-MCMD4WR6.js';
6
+ import { warnDeprecated, NavChromeProvider, TopBarWidgetSlot, FuelAction, SpecOverlayAction, NotificationsAction, SupportAction, useChromeMe, useNavChromeDedupedFetch, useChromeOrgs, useNavChromeFetcher } from './chunk-JQ53VZO5.js';
7
7
  import './chunk-BHRVZPZ7.js';
8
8
  import { NAV_DISPLAY_DEFAULT, resolveNavDisplay, writeNavDisplayLocal, writeNavDisplayCookie, isNavDisplayPreference, NAV_DISPLAY_STORAGE_KEY, readNavDisplayCookie } from './chunk-7YVJ7HQG.js';
9
9
  import { authBaseUrl, orgIdTail, settingsBaseUrl, ORG_ID_QUERY_PARAM, readOrgSelectorFromUrl, matchOrgSelector, syncOrgIdInUrl, isOrgId, switchActiveOrg, ACTIVE_ORG_QUERY_PARAM, writeActiveOrgCookie, resolveActiveOrg, readActiveOrgCookie } from './chunk-5LO5W7W5.js';
@@ -4,6 +4,7 @@ import clsx2 from 'clsx';
4
4
  import { createContext, useState, useEffect, useRef, useContext, useMemo, useCallback, useSyncExternalStore } from 'react';
5
5
  import { FiUser, FiSettings, FiMessageSquare, FiMail, FiInfo, FiSun, FiMoon, FiHelpCircle, FiLifeBuoy, FiAlertCircle, FiAlertTriangle, FiBell, FiGrid, FiZap, FiBatteryCharging, FiBattery } from 'react-icons/fi';
6
6
  import { createPortal } from 'react-dom';
7
+ import { LuGitBranch, LuWorkflow, LuNetwork, LuHandshake, LuBriefcase, LuAward, LuBadgeCheck, LuSignpost, LuDoorOpen, LuTriangleAlert, LuInfo, LuCircleHelp, LuTrash2, LuArchive, LuRocket, LuZap, LuWrench, LuKanban, LuNewspaper, LuLandmark, LuVote, LuKey, LuLock, LuEye, LuPrinter, LuMic, LuVideo, LuImage, LuLink, LuGlobe, LuSearch, LuFilter, LuTag, LuHandHeart, LuHeart, LuStar, LuHouse, LuBell, LuMailOpen, LuMail, LuDollarSign, LuReceipt, LuWallet, LuCreditCard, LuPalette, LuBuilding2, LuShare2, LuInbox, LuSlidersHorizontal, LuSettings, LuFlaskConical, LuTarget, LuSparkles, LuPencil, LuSmartphone, LuHistory, LuRefreshCw, LuRotateCcw, LuCircleCheck, LuSquareCheck, LuVoicemail, LuRadio, LuNotebookPen, LuBookOpen, LuPhoneCall, LuPhone, LuShieldCheck, LuShield, LuMegaphone, LuTrendingUp, LuListTodo, LuListOrdered, LuListChecks, LuList, LuFolderLock, LuFolder, LuFiles, LuFile, LuFileText, LuSplit, LuGauge, LuSend, LuMessageCircle, LuMessageSquare, LuMessagesSquare, LuBot, LuRoute, LuScale, LuLayers, LuCalendar, LuClock, LuTimer, LuClipboardCheck, LuClipboardList, LuBrain, LuFootprints, LuMapPin, LuMap, LuCrosshair, LuLightbulb, LuChartNoAxesCombined, LuChartArea, LuChartBar, LuChartLine, LuChartColumn, LuChartPie, LuTable2, LuActivity, LuFlagTriangleRight, LuFlag, LuLibrary, LuCopy, LuDownload, LuUpload, LuSquareUser, LuUserCheck, LuUserPlus, LuUser, LuUsersRound, LuUsers, LuLayoutTemplate, LuLayoutGrid, LuLayoutList, LuLayoutDashboard } from 'react-icons/lu';
7
8
 
8
9
  function Card({
9
10
  title,
@@ -26,6 +27,71 @@ function Card({
26
27
  }
27
28
  );
28
29
  }
30
+ var SETTINGS_ORIGIN = "https://settings.politogyvrm.com";
31
+ var WALLET_PATH = "/organization-settings/subscription-billing/wallet";
32
+ function aiCreditsWalletUrl(orgId) {
33
+ const url = new URL(WALLET_PATH, SETTINGS_ORIGIN);
34
+ if (orgId) url.searchParams.set("org", orgId);
35
+ return url.toString();
36
+ }
37
+ var AI_CREDITS_STATE_TITLES = {
38
+ out: "Out of AI Credits",
39
+ paused: "Paused \u2014 out of AI Credits",
40
+ waiting: "Waiting for AI Credits"
41
+ };
42
+ var MUTED = { color: "var(--color-text-muted, #6b7280)" };
43
+ var BUTTON = {
44
+ display: "inline-block",
45
+ borderRadius: 6,
46
+ padding: "6px 12px",
47
+ fontSize: 12,
48
+ fontWeight: 600,
49
+ textDecoration: "none"
50
+ };
51
+ var PRIMARY = { ...BUTTON, background: "var(--color-text, #2F3136)", color: "#fff" };
52
+ var SECONDARY = {
53
+ ...BUTTON,
54
+ border: "1px solid var(--color-border, #e5e7eb)",
55
+ color: "var(--color-text, #2F3136)"
56
+ };
57
+ var defaultFormat = (at) => at.toLocaleString(void 0, { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" });
58
+ function detail(kind, lastOutputAt, format) {
59
+ if (kind === "paused") return lastOutputAt ? `Last updated ${format(lastOutputAt)}.` : "Nothing has been generated yet.";
60
+ if (kind === "waiting") return "This step is kept and starts on its own once AI Credits are added.";
61
+ return null;
62
+ }
63
+ function AiCreditsState({
64
+ kind,
65
+ orgId,
66
+ isAccountAdmin,
67
+ lastOutputAt,
68
+ onCheckAgain,
69
+ formatTime = defaultFormat,
70
+ className,
71
+ style
72
+ }) {
73
+ const at = lastOutputAt == null ? null : lastOutputAt instanceof Date ? lastOutputAt : new Date(lastOutputAt);
74
+ const last = at && !Number.isNaN(at.getTime()) ? at : null;
75
+ const text = detail(kind, last, formatTime);
76
+ const wallet = aiCreditsWalletUrl(orgId);
77
+ return /* @__PURE__ */ jsxs("div", { role: "status", "data-ai-credits-state": kind, className, style: { fontSize: 14, ...style }, children: [
78
+ /* @__PURE__ */ jsx("p", { style: { margin: 0, fontWeight: 600 }, children: AI_CREDITS_STATE_TITLES[kind] }),
79
+ text && /* @__PURE__ */ jsx("p", { style: { margin: "4px 0 0", ...MUTED }, children: text }),
80
+ isAccountAdmin ? /* @__PURE__ */ jsxs("div", { style: { marginTop: 8, display: "flex", flexWrap: "wrap", gap: 8 }, children: [
81
+ /* @__PURE__ */ jsx("a", { href: wallet, style: PRIMARY, children: "Buy AI Credits" }),
82
+ /* @__PURE__ */ jsx("a", { href: wallet, style: SECONDARY, children: "Turn on auto top-off" })
83
+ ] }) : /* @__PURE__ */ jsx("p", { style: { margin: "4px 0 0", ...MUTED }, children: "Ask an Account Admin to add AI Credits." }),
84
+ onCheckAgain && /* @__PURE__ */ jsx(
85
+ "button",
86
+ {
87
+ type: "button",
88
+ onClick: onCheckAgain,
89
+ style: { marginTop: 8, padding: 0, border: 0, background: "none", fontSize: 12, textDecoration: "underline", cursor: "pointer", ...MUTED },
90
+ children: "Check again"
91
+ }
92
+ )
93
+ ] });
94
+ }
29
95
  function FormColumn({ children, className }) {
30
96
  return /* @__PURE__ */ jsx("div", { "data-shell-form-column": "", className: clsx2("w-full max-w-[960px]", className), children });
31
97
  }
@@ -2039,6 +2105,139 @@ function HeaderTabBar({
2039
2105
  }
2040
2106
  );
2041
2107
  }
2108
+ var TAB_GLYPHS = {
2109
+ "layout-dashboard": LuLayoutDashboard,
2110
+ "layout-list": LuLayoutList,
2111
+ "layout-grid": LuLayoutGrid,
2112
+ "layout-template": LuLayoutTemplate,
2113
+ "users": LuUsers,
2114
+ "users-round": LuUsersRound,
2115
+ "user": LuUser,
2116
+ "user-plus": LuUserPlus,
2117
+ "user-check": LuUserCheck,
2118
+ "square-user": LuSquareUser,
2119
+ "upload": LuUpload,
2120
+ "download": LuDownload,
2121
+ "copy": LuCopy,
2122
+ "library": LuLibrary,
2123
+ "flag": LuFlag,
2124
+ "flag-triangle-right": LuFlagTriangleRight,
2125
+ "activity": LuActivity,
2126
+ "table-2": LuTable2,
2127
+ "chart-pie": LuChartPie,
2128
+ "chart-column": LuChartColumn,
2129
+ "chart-line": LuChartLine,
2130
+ "chart-bar": LuChartBar,
2131
+ "chart-area": LuChartArea,
2132
+ "chart-no-axes-combined": LuChartNoAxesCombined,
2133
+ "lightbulb": LuLightbulb,
2134
+ "crosshair": LuCrosshair,
2135
+ "map": LuMap,
2136
+ "map-pin": LuMapPin,
2137
+ "footprints": LuFootprints,
2138
+ "brain": LuBrain,
2139
+ "clipboard-list": LuClipboardList,
2140
+ "clipboard-check": LuClipboardCheck,
2141
+ "timer": LuTimer,
2142
+ "clock": LuClock,
2143
+ "calendar": LuCalendar,
2144
+ "layers": LuLayers,
2145
+ "scale": LuScale,
2146
+ "route": LuRoute,
2147
+ "bot": LuBot,
2148
+ "messages-square": LuMessagesSquare,
2149
+ "message-square": LuMessageSquare,
2150
+ "message-circle": LuMessageCircle,
2151
+ "send": LuSend,
2152
+ "gauge": LuGauge,
2153
+ "split": LuSplit,
2154
+ "file-text": LuFileText,
2155
+ "file": LuFile,
2156
+ "files": LuFiles,
2157
+ "folder": LuFolder,
2158
+ "folder-lock": LuFolderLock,
2159
+ "list": LuList,
2160
+ "list-checks": LuListChecks,
2161
+ "list-ordered": LuListOrdered,
2162
+ "list-todo": LuListTodo,
2163
+ "trending-up": LuTrendingUp,
2164
+ "megaphone": LuMegaphone,
2165
+ "shield": LuShield,
2166
+ "shield-check": LuShieldCheck,
2167
+ "phone": LuPhone,
2168
+ "phone-call": LuPhoneCall,
2169
+ "book-open": LuBookOpen,
2170
+ "notebook-pen": LuNotebookPen,
2171
+ "radio": LuRadio,
2172
+ "voicemail": LuVoicemail,
2173
+ "square-check": LuSquareCheck,
2174
+ "circle-check": LuCircleCheck,
2175
+ "rotate-ccw": LuRotateCcw,
2176
+ "refresh-cw": LuRefreshCw,
2177
+ "history": LuHistory,
2178
+ "smartphone": LuSmartphone,
2179
+ "pencil": LuPencil,
2180
+ "sparkles": LuSparkles,
2181
+ "target": LuTarget,
2182
+ "flask-conical": LuFlaskConical,
2183
+ "settings": LuSettings,
2184
+ "sliders-horizontal": LuSlidersHorizontal,
2185
+ "inbox": LuInbox,
2186
+ "share-2": LuShare2,
2187
+ "building-2": LuBuilding2,
2188
+ "palette": LuPalette,
2189
+ "credit-card": LuCreditCard,
2190
+ "wallet": LuWallet,
2191
+ "receipt": LuReceipt,
2192
+ "dollar-sign": LuDollarSign,
2193
+ "mail": LuMail,
2194
+ "mail-open": LuMailOpen,
2195
+ "bell": LuBell,
2196
+ "house": LuHouse,
2197
+ "star": LuStar,
2198
+ "heart": LuHeart,
2199
+ "hand-heart": LuHandHeart,
2200
+ "tag": LuTag,
2201
+ "filter": LuFilter,
2202
+ "search": LuSearch,
2203
+ "globe": LuGlobe,
2204
+ "link": LuLink,
2205
+ "image": LuImage,
2206
+ "video": LuVideo,
2207
+ "mic": LuMic,
2208
+ "printer": LuPrinter,
2209
+ "eye": LuEye,
2210
+ "lock": LuLock,
2211
+ "key": LuKey,
2212
+ "vote": LuVote,
2213
+ "landmark": LuLandmark,
2214
+ "newspaper": LuNewspaper,
2215
+ "kanban": LuKanban,
2216
+ "wrench": LuWrench,
2217
+ "zap": LuZap,
2218
+ "rocket": LuRocket,
2219
+ "archive": LuArchive,
2220
+ "trash-2": LuTrash2,
2221
+ "circle-help": LuCircleHelp,
2222
+ "info": LuInfo,
2223
+ "triangle-alert": LuTriangleAlert,
2224
+ "door-open": LuDoorOpen,
2225
+ "signpost": LuSignpost,
2226
+ "badge-check": LuBadgeCheck,
2227
+ "award": LuAward,
2228
+ "briefcase": LuBriefcase,
2229
+ "handshake": LuHandshake,
2230
+ "network": LuNetwork,
2231
+ "workflow": LuWorkflow,
2232
+ "git-branch": LuGitBranch
2233
+ };
2234
+ function resolveTabGlyph(name) {
2235
+ if (!name) return null;
2236
+ const key = name.trim().replace(/^['"]|['"]$/g, "").trim().toLowerCase();
2237
+ if (!key) return null;
2238
+ return Object.prototype.hasOwnProperty.call(TAB_GLYPHS, key) ? TAB_GLYPHS[key] : null;
2239
+ }
2240
+ var KNOWN_TAB_GLYPHS = Object.freeze(Object.keys(TAB_GLYPHS));
2042
2241
 
2043
2242
  // src/speculation/emitRules.ts
2044
2243
  function buildSpeculationRules(currentApp, registry) {
@@ -2247,6 +2446,6 @@ function BreadcrumbBarView({
2247
2446
  );
2248
2447
  }
2249
2448
 
2250
- export { BreadcrumbBarView, CORE_APP_ORIGIN, CORE_BILLING_PATH, CREDIT_TYPE_LABELS, CREDIT_TYPE_ORDER, Card, CreditsAction, FormColumn, FuelAction, HeaderTabBar, NAV_DISPLAY_OPTIONS, NavChromeProvider, NavDisplayAction, NavThemeControl, NotificationsAction, PageHeaderView, SPECS_ORIGIN, SpecOverlayAction, SpeculationRulesScript, SupportAction, TOPBAR_GLYPH_SIZE, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, createCommsNotificationsAdapter, creditGaugeRatio, creditStateWord, creditTooltipLine, creditsAriaLabel, creditsIconState, emptyNotificationsFeed, normalizeNotificationsFeed, resolveBrandGlyph, resolveOrgLogoUrl, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeDedupedFetch, useNavChromeFetcher, useThemePreference, useTopBarIconSlotGlyph, warnDeprecated };
2251
- //# sourceMappingURL=chunk-ZS7MQXDQ.js.map
2252
- //# sourceMappingURL=chunk-ZS7MQXDQ.js.map
2449
+ export { AI_CREDITS_STATE_TITLES, AiCreditsState, BreadcrumbBarView, CORE_APP_ORIGIN, CORE_BILLING_PATH, CREDIT_TYPE_LABELS, CREDIT_TYPE_ORDER, Card, CreditsAction, FormColumn, FuelAction, HeaderTabBar, KNOWN_TAB_GLYPHS, NAV_DISPLAY_OPTIONS, NavChromeProvider, NavDisplayAction, NavThemeControl, NotificationsAction, PageHeaderView, SPECS_ORIGIN, SpecOverlayAction, SpeculationRulesScript, SupportAction, TOPBAR_GLYPH_SIZE, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, aiCreditsWalletUrl, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, createCommsNotificationsAdapter, creditGaugeRatio, creditStateWord, creditTooltipLine, creditsAriaLabel, creditsIconState, emptyNotificationsFeed, normalizeNotificationsFeed, resolveBrandGlyph, resolveOrgLogoUrl, resolveTabGlyph, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeDedupedFetch, useNavChromeFetcher, useThemePreference, useTopBarIconSlotGlyph, warnDeprecated };
2450
+ //# sourceMappingURL=chunk-JQ53VZO5.js.map
2451
+ //# sourceMappingURL=chunk-JQ53VZO5.js.map