@the-portland-company/shell 0.62.1 → 0.63.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/app-chrome.cjs +58 -6
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.js +1 -1
- package/dist/{chunk-CFSA73PR.js → chunk-2SF25TVU.js} +60 -8
- package/dist/chunk-2SF25TVU.js.map +1 -0
- package/dist/native.cjs +58 -6
- package/dist/native.cjs.map +1 -1
- package/dist/native.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-CFSA73PR.js.map +0 -1
package/dist/app-chrome.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { broadcastLogout, watchLogout } from './chunk-LL6LSJAH.js';
|
|
3
|
-
import { clearBetaBannerDismissal, standardPolitogyNav, isNavItemActive, NavAppShell, NavChromeProvider, FuelAction, NavDisplayAction, TopBarWidgetSlot, SpecOverlayAction, SupportAction, NotificationsAction, useChromeMe, useThemePreference, useNavChromeFetcher, useChromeOrgs } from './chunk-
|
|
3
|
+
import { clearBetaBannerDismissal, standardPolitogyNav, isNavItemActive, NavAppShell, NavChromeProvider, FuelAction, NavDisplayAction, TopBarWidgetSlot, SpecOverlayAction, SupportAction, NotificationsAction, useChromeMe, useThemePreference, useNavChromeFetcher, useChromeOrgs } from './chunk-2SF25TVU.js';
|
|
4
4
|
import './chunk-U4RZPZET.js';
|
|
5
5
|
import { NAV_DISPLAY_DEFAULT, resolveNavDisplay, isNavDisplayPreference, writeNavDisplayCookie, writeNavDisplayLocal, NAV_DISPLAY_STORAGE_KEY, readNavDisplayCookie } from './chunk-6UHJV2FH.js';
|
|
6
6
|
import { resolveActiveOrg, isOrgId, writeActiveOrgCookie, ACTIVE_ORG_QUERY_PARAM, readActiveOrgCookie } from './chunk-W2HITMV5.js';
|
|
@@ -1335,6 +1335,24 @@ async function captureMyView(status, orgId, orgName) {
|
|
|
1335
1335
|
});
|
|
1336
1336
|
if (!res.ok) throw new Error(`capture ${res.status}: ${(await res.text()).slice(0, 160)}`);
|
|
1337
1337
|
}
|
|
1338
|
+
function SpecCaptureLoading() {
|
|
1339
|
+
return /* @__PURE__ */ jsxs("div", { "data-spec-capture-loading": "", role: "status", "aria-live": "polite", className: "flex-1 overflow-hidden px-4 py-4", children: [
|
|
1340
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center gap-3 text-sm text-[color:var(--foreground)]", children: [
|
|
1341
|
+
/* @__PURE__ */ jsx(
|
|
1342
|
+
"span",
|
|
1343
|
+
{
|
|
1344
|
+
"aria-hidden": "true",
|
|
1345
|
+
className: "inline-block h-5 w-5 animate-spin rounded-full border-2 border-[color:var(--line)] border-t-[color:var(--color-accent)] motion-reduce:animate-none"
|
|
1346
|
+
}
|
|
1347
|
+
),
|
|
1348
|
+
"Capturing your view and comparing\u2026"
|
|
1349
|
+
] }),
|
|
1350
|
+
["Live \u2014 your view", "Diff"].map((label) => /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
1351
|
+
/* @__PURE__ */ jsx("p", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--muted)]", children: label }),
|
|
1352
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "h-40 w-full animate-pulse rounded border border-[color:var(--line)] bg-[color:var(--panel)] motion-reduce:animate-none" })
|
|
1353
|
+
] }, label))
|
|
1354
|
+
] });
|
|
1355
|
+
}
|
|
1338
1356
|
function specOverlayStatusPath() {
|
|
1339
1357
|
return `/api/overlay/status?url=${encodeURIComponent(window.location.href)}&theme=${currentChromeTheme()}`;
|
|
1340
1358
|
}
|
|
@@ -1344,6 +1362,7 @@ function SpecOverlayAction({ orgId, orgName } = {}) {
|
|
|
1344
1362
|
const [open, setOpen] = useState(false);
|
|
1345
1363
|
const [capture, setCapture] = useState({ state: "idle" });
|
|
1346
1364
|
const [frameKey, setFrameKey] = useState(0);
|
|
1365
|
+
const [copied, setCopied] = useState("idle");
|
|
1347
1366
|
const href = useLocationHref();
|
|
1348
1367
|
useEffect(() => {
|
|
1349
1368
|
if (access) return;
|
|
@@ -1497,16 +1516,49 @@ function SpecOverlayAction({ orgId, orgName } = {}) {
|
|
|
1497
1516
|
onClick: () => void runCapture(status),
|
|
1498
1517
|
className: "ml-auto rounded-md border border-[color:var(--line)] px-2 py-1 text-[color:var(--foreground)] hover:bg-[color:var(--panel)] disabled:opacity-60",
|
|
1499
1518
|
title: "Your view is captured when the drawer opens. Recapture after changing the page.",
|
|
1500
|
-
children: capture.state === "busy" ? "Capturing
|
|
1519
|
+
children: capture.state === "busy" ? "Capturing\u2026" : "Recapture"
|
|
1520
|
+
}
|
|
1521
|
+
),
|
|
1522
|
+
/* @__PURE__ */ jsx(
|
|
1523
|
+
"button",
|
|
1524
|
+
{
|
|
1525
|
+
type: "button",
|
|
1526
|
+
"data-spec-copy-prompt": "",
|
|
1527
|
+
disabled: capture.state === "busy" || !status.prompt,
|
|
1528
|
+
onClick: () => {
|
|
1529
|
+
const text = status.prompt;
|
|
1530
|
+
if (!text) return;
|
|
1531
|
+
navigator.clipboard.writeText(text).then(() => setCopied("copied")).catch(() => setCopied("failed")).finally(() => window.setTimeout(() => setCopied("idle"), 2e3));
|
|
1532
|
+
},
|
|
1533
|
+
className: "rounded-md border border-[color:var(--line)] px-2 py-1 text-[color:var(--foreground)] hover:bg-[color:var(--panel)] disabled:opacity-60",
|
|
1534
|
+
title: "Copy a repair prompt for an AI agent: spec, score, image links, top mismatched regions and instructions.",
|
|
1535
|
+
children: copied === "copied" ? "Copied \u2713" : copied === "failed" ? "Copy failed" : "Copy prompt"
|
|
1501
1536
|
}
|
|
1502
1537
|
)
|
|
1503
1538
|
] }),
|
|
1504
|
-
capture.state
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1539
|
+
status.live_size && status.design_size && capture.state !== "busy" ? /* @__PURE__ */ jsxs(
|
|
1540
|
+
"p",
|
|
1541
|
+
{
|
|
1542
|
+
"data-spec-sizes": "",
|
|
1543
|
+
className: [
|
|
1544
|
+
"border-b border-[color:var(--line)] px-4 py-1.5 text-xs",
|
|
1545
|
+
status.live_size.width === status.design_size.width && status.live_size.height === status.design_size.height ? "text-[color:var(--muted)]" : "font-semibold text-[color:var(--chrome-danger)]"
|
|
1546
|
+
].join(" "),
|
|
1547
|
+
children: [
|
|
1548
|
+
"Live ",
|
|
1549
|
+
status.live_size.width,
|
|
1550
|
+
"\xD7",
|
|
1551
|
+
status.live_size.height,
|
|
1552
|
+
" \xB7 Design ",
|
|
1553
|
+
status.design_size.width,
|
|
1554
|
+
"\xD7",
|
|
1555
|
+
status.design_size.height,
|
|
1556
|
+
status.live_size.width === status.design_size.width && status.live_size.height === status.design_size.height ? " \xB7 sizes match" : " \xB7 SIZE MISMATCH"
|
|
1557
|
+
]
|
|
1558
|
+
}
|
|
1559
|
+
) : null,
|
|
1508
1560
|
capture.state === "error" ? /* @__PURE__ */ jsx("p", { className: "border-b border-[color:var(--line)] px-4 py-2 text-xs text-[color:var(--chrome-danger)]", children: capture.message }) : null,
|
|
1509
|
-
/* @__PURE__ */ jsx(
|
|
1561
|
+
capture.state === "busy" ? /* @__PURE__ */ jsx(SpecCaptureLoading, {}) : /* @__PURE__ */ jsx(
|
|
1510
1562
|
"iframe",
|
|
1511
1563
|
{
|
|
1512
1564
|
src: status.overlay_url,
|
|
@@ -3335,5 +3387,5 @@ function NavAppShell({
|
|
|
3335
3387
|
}
|
|
3336
3388
|
|
|
3337
3389
|
export { BETA_BANNER_DISMISS_KEY, CAMPAIGN_FEATURE_AVAILABILITY, CORE_APP_ORIGIN, CORE_BILLING_PATH, FuelAction, NavAppShell, NavBetaBanner, NavChromeProvider, NavDisplayAction, NavSidebar, NavTabStrip, NavThemeControl, NavTopBar, NotificationsAction, SPECS_ORIGIN, SpecOverlayAction, SupportAction, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, clearBetaBannerDismissal, envChipClasses, isNavItemActive, resolveOrgLogoUrl, standardPolitogyNav, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeFetcher, useThemePreference };
|
|
3338
|
-
//# sourceMappingURL=chunk-
|
|
3339
|
-
//# sourceMappingURL=chunk-
|
|
3390
|
+
//# sourceMappingURL=chunk-2SF25TVU.js.map
|
|
3391
|
+
//# sourceMappingURL=chunk-2SF25TVU.js.map
|