@orangecheck/app-design 1.2.2 → 1.3.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/README.md +6 -0
- package/dist/chrome.d.mts +1 -1
- package/dist/chrome.d.ts +1 -1
- package/dist/chrome.js +27 -4
- package/dist/chrome.js.map +1 -1
- package/dist/chrome.mjs +28 -6
- package/dist/chrome.mjs.map +1 -1
- package/dist/components.d.mts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +11 -9
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +12 -10
- package/dist/components.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +37 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -14
- package/dist/index.mjs.map +1 -1
- package/dist/mdx.js +1 -1
- package/dist/mdx.js.map +1 -1
- package/dist/mdx.mjs +1 -1
- package/dist/mdx.mjs.map +1 -1
- package/dist/primitives.d.mts +9 -3
- package/dist/primitives.d.ts +9 -3
- package/dist/primitives.js +7 -6
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +7 -6
- package/dist/primitives.mjs.map +1 -1
- package/dist/session.d.mts +4 -3
- package/dist/session.d.ts +4 -3
- package/dist/session.js +28 -4
- package/dist/session.js.map +1 -1
- package/dist/session.mjs +28 -4
- package/dist/session.mjs.map +1 -1
- package/dist/{tool-shell-DLSwUxTD.d.ts → tool-shell-Be4Q0cNN.d.ts} +5 -3
- package/dist/{tool-shell-kqGWMTep.d.mts → tool-shell-zncroOEQ.d.mts} +5 -3
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { APP_ATTRIBUTE, APP_ID, appColors, appFonts } from './tokens.mjs';
|
|
2
|
-
export { Accordion, AccordionItem, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardProps, CardTitle, Checkbox, ConfirmOptions, Density, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHost, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Field, FieldProps, Input, InputProps, Kbd, Label, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptOptions, QrCode, RadioGroup, RadioGroupItem, ScrollFade, ScrollFadeProps, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, Skeleton, Spinner, StatusDot, StatusPill, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, confirm, prompt, useDensity, useTimedOut } from './primitives.mjs';
|
|
2
|
+
export { Accordion, AccordionItem, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardProps, CardTitle, Checkbox, ConfirmOptions, Density, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHost, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Field, FieldControlProps, FieldProps, Input, InputProps, Kbd, Label, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptOptions, QrCode, RadioGroup, RadioGroupItem, ScrollFade, ScrollFadeProps, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, Skeleton, Spinner, StatusDot, StatusPill, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, confirm, prompt, useDensity, useTimedOut } from './primitives.mjs';
|
|
3
3
|
export { S as Statement, a as Status, b as StatusBadge, c as StatusBadgeProps, s as statusWord } from './status-badge-BJ9Sdsx8.mjs';
|
|
4
4
|
export { AppIcon, AppIconProps, Crowd, CrowdProps, HalftoneCanvas, HalftoneCanvasProps, HalftoneSphere, HalftoneSphereProps, IsoCheck, IsoCheckProps, Lockup, LockupProps, MARK_FACES, Mark, MarkProps, SPHERE_GRADIENT, Tone, portraitTone } from './brand.mjs';
|
|
5
5
|
export { Accent, ActivityItem, ActivityList, BrowserFrame, CheckState, Closing, Column, Container, CopyButton, CopyButtonProps, DataTable, Display, DisplayProps, EmptyLine, EmptyState, Endpoint, EndpointList, ErrorBoundary, ErrorPage, Eyebrow, FactBlock, FactRow, FactRows, Faq, FloatChip, Footnote, HashChip, KeyValueItem, KeyValueList, Lead, LegalBlock, LegalDocument, LegalSource, LoadingBlock, Monogram, Notice, PackageCard, PackageItem, PageHeader, PhoneFrame, ProgressStep, ProgressSteps, ProofStrip, Prose, Reveal, Sats, SatsFigure, SatsProps, SatsTextOptions, ScrollStory, SearchButton, SearchDialog, SearchGroup, SearchQuery, SearchResult, Section, SectionHeading, SectionIntro, SectionProps, SignMessage, SplitBar, SplitSegment, StatCard, StatCardProps, StatGrid, StatGridProps, StepGrid, StepGridProps, StepItem, StepState, TextLink, Ticker, TruthRow, TruthStatus, TruthTable, UsdApprox, VerifyCheck, VerifyReport, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView } from './components.mjs';
|
|
@@ -7,7 +7,7 @@ export { D as DocHeader, a as DocLayout, P as PageHero, b as PageHeroProps, T as
|
|
|
7
7
|
export { A as ApiRow, a as ApiTable, b as AppCard, c as AppCardProps, d as AppGrid, B as Breadcrumbs, C as Callout, e as CardGrid, f as CodeBlock, g as CodeBlockProps, h as CodeTab, i as CodeTabs, j as ComparisonColumn, k as ComparisonRow, l as ComparisonTable, m as Crumb, D as Diagram, n as DocsHeading, o as DocsPager, I as InstallTabs, L as LinkCard, M as MdxTable, p as MermaidLike, q as MermaidLoader, O as OnThisPage, P as PagerLink, r as ProtocolGrid, s as ProtocolHero, t as ProtocolNav, S as SpecCard, u as Step, v as Steps, V as VerifyBox, w as languageName, x as useHeadings } from './docs-wJBfLS08.mjs';
|
|
8
8
|
export { A as AnchorState, a as AnchorStatus, b as ArtifactView, B as BlockCountdown, c as BlockHeight, C as ChosenFile, D as DropZone, F as FilterChips, d as FilterOption, e as FormSection, M as Meter, S as SectionStatus, f as StateBadge, g as StateDef, h as StateTone, T as ToolGrid, i as ToolItem, j as createStateBadge } from './tools-DFIxIj5p.mjs';
|
|
9
9
|
export { DOCS_HEADER_NAV, DocsNav, DocsNavItem, DocsNavSection, DocsShell, DocsShellProps, FamilyMenu, ShellContext, ShellPlace, SignInFrame, SiteBanner, SiteFooter, SiteFooterProps, SiteHeader, SiteHeaderProps, SkipLink, useShellPlace } from './chrome.mjs';
|
|
10
|
-
export { A as AccountMenu, a as AccountMenuItem, b as AppShell, O as OCHK_APP_ACCOUNT, S as SessionAccountView, c as SessionState, d as ShellNavGroup, e as ShellNavItem, f as ShellSection, T as ThemeToggle, g as ToolShell, h as ToolShellProps } from './tool-shell-
|
|
10
|
+
export { A as AccountMenu, a as AccountMenuItem, b as AppShell, O as OCHK_APP_ACCOUNT, S as SessionAccountView, c as SessionState, d as ShellNavGroup, e as ShellNavItem, f as ShellSection, T as ThemeToggle, g as ToolShell, h as ToolShellProps, u as useSignInHref } from './tool-shell-zncroOEQ.mjs';
|
|
11
11
|
export { D as DOCS_HREF, F as FAMILY, a as FAMILY_GROUPS, b as FamilyGroup, c as FamilySite, d as FamilySlug, e as FooterColumn, L as LEGAL_LINKS, N as NavItem, O as OCHK_IO, f as OCHK_IO_FOOTER, g as OCHK_IO_NAV, P as PROTOCOLS, h as PROTOCOL_ORDER, i as ProtocolSite, j as ProtocolSlug, S as SELF_HOSTED_LEGAL_LINKS, k as SiteStatus, l as familyByGroup, m as familySite, p as protocolSite } from './index-DmfyPYe5.mjs';
|
|
12
12
|
export { CODE_LANGS, CodeLine, CodeMeta, DiffMark, LineMarks, RehypeCodeOptions, TOKEN_CLASS, Token, TokenKind, escapeHtml, grammarOf, highlight, highlightToHtml, linesToHtml, parseCodeMeta, parseLineRanges, readDiff, rehypeCode } from './code.mjs';
|
|
13
13
|
export { ExplorerKind, Network, blocksToDuration, explorerUrl, formatBlockHeight, formatBytes, formatUtc, shortenMiddle } from './format.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { APP_ATTRIBUTE, APP_ID, appColors, appFonts } from './tokens.js';
|
|
2
|
-
export { Accordion, AccordionItem, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardProps, CardTitle, Checkbox, ConfirmOptions, Density, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHost, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Field, FieldProps, Input, InputProps, Kbd, Label, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptOptions, QrCode, RadioGroup, RadioGroupItem, ScrollFade, ScrollFadeProps, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, Skeleton, Spinner, StatusDot, StatusPill, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, confirm, prompt, useDensity, useTimedOut } from './primitives.js';
|
|
2
|
+
export { Accordion, AccordionItem, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardProps, CardTitle, Checkbox, ConfirmOptions, Density, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHost, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Field, FieldControlProps, FieldProps, Input, InputProps, Kbd, Label, Pagination, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptOptions, QrCode, RadioGroup, RadioGroupItem, ScrollFade, ScrollFadeProps, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, Skeleton, Spinner, StatusDot, StatusPill, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, confirm, prompt, useDensity, useTimedOut } from './primitives.js';
|
|
3
3
|
export { S as Statement, a as Status, b as StatusBadge, c as StatusBadgeProps, s as statusWord } from './status-badge-Bt8x3RhO.js';
|
|
4
4
|
export { AppIcon, AppIconProps, Crowd, CrowdProps, HalftoneCanvas, HalftoneCanvasProps, HalftoneSphere, HalftoneSphereProps, IsoCheck, IsoCheckProps, Lockup, LockupProps, MARK_FACES, Mark, MarkProps, SPHERE_GRADIENT, Tone, portraitTone } from './brand.js';
|
|
5
5
|
export { Accent, ActivityItem, ActivityList, BrowserFrame, CheckState, Closing, Column, Container, CopyButton, CopyButtonProps, DataTable, Display, DisplayProps, EmptyLine, EmptyState, Endpoint, EndpointList, ErrorBoundary, ErrorPage, Eyebrow, FactBlock, FactRow, FactRows, Faq, FloatChip, Footnote, HashChip, KeyValueItem, KeyValueList, Lead, LegalBlock, LegalDocument, LegalSource, LoadingBlock, Monogram, Notice, PackageCard, PackageItem, PageHeader, PhoneFrame, ProgressStep, ProgressSteps, ProofStrip, Prose, Reveal, Sats, SatsFigure, SatsProps, SatsTextOptions, ScrollStory, SearchButton, SearchDialog, SearchGroup, SearchQuery, SearchResult, Section, SectionHeading, SectionIntro, SectionProps, SignMessage, SplitBar, SplitSegment, StatCard, StatCardProps, StatGrid, StatGridProps, StepGrid, StepGridProps, StepItem, StepState, TextLink, Ticker, TruthRow, TruthStatus, TruthTable, UsdApprox, VerifyCheck, VerifyReport, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView } from './components.js';
|
|
@@ -7,7 +7,7 @@ export { D as DocHeader, a as DocLayout, P as PageHero, b as PageHeroProps, T as
|
|
|
7
7
|
export { A as ApiRow, a as ApiTable, b as AppCard, c as AppCardProps, d as AppGrid, B as Breadcrumbs, C as Callout, e as CardGrid, f as CodeBlock, g as CodeBlockProps, h as CodeTab, i as CodeTabs, j as ComparisonColumn, k as ComparisonRow, l as ComparisonTable, m as Crumb, D as Diagram, n as DocsHeading, o as DocsPager, I as InstallTabs, L as LinkCard, M as MdxTable, p as MermaidLike, q as MermaidLoader, O as OnThisPage, P as PagerLink, r as ProtocolGrid, s as ProtocolHero, t as ProtocolNav, S as SpecCard, u as Step, v as Steps, V as VerifyBox, w as languageName, x as useHeadings } from './docs-Dxg4Tp_q.js';
|
|
8
8
|
export { A as AnchorState, a as AnchorStatus, b as ArtifactView, B as BlockCountdown, c as BlockHeight, C as ChosenFile, D as DropZone, F as FilterChips, d as FilterOption, e as FormSection, M as Meter, S as SectionStatus, f as StateBadge, g as StateDef, h as StateTone, T as ToolGrid, i as ToolItem, j as createStateBadge } from './tools-BggNN5DV.js';
|
|
9
9
|
export { DOCS_HEADER_NAV, DocsNav, DocsNavItem, DocsNavSection, DocsShell, DocsShellProps, FamilyMenu, ShellContext, ShellPlace, SignInFrame, SiteBanner, SiteFooter, SiteFooterProps, SiteHeader, SiteHeaderProps, SkipLink, useShellPlace } from './chrome.js';
|
|
10
|
-
export { A as AccountMenu, a as AccountMenuItem, b as AppShell, O as OCHK_APP_ACCOUNT, S as SessionAccountView, c as SessionState, d as ShellNavGroup, e as ShellNavItem, f as ShellSection, T as ThemeToggle, g as ToolShell, h as ToolShellProps } from './tool-shell-
|
|
10
|
+
export { A as AccountMenu, a as AccountMenuItem, b as AppShell, O as OCHK_APP_ACCOUNT, S as SessionAccountView, c as SessionState, d as ShellNavGroup, e as ShellNavItem, f as ShellSection, T as ThemeToggle, g as ToolShell, h as ToolShellProps, u as useSignInHref } from './tool-shell-Be4Q0cNN.js';
|
|
11
11
|
export { D as DOCS_HREF, F as FAMILY, a as FAMILY_GROUPS, b as FamilyGroup, c as FamilySite, d as FamilySlug, e as FooterColumn, L as LEGAL_LINKS, N as NavItem, O as OCHK_IO, f as OCHK_IO_FOOTER, g as OCHK_IO_NAV, P as PROTOCOLS, h as PROTOCOL_ORDER, i as ProtocolSite, j as ProtocolSlug, S as SELF_HOSTED_LEGAL_LINKS, k as SiteStatus, l as familyByGroup, m as familySite, p as protocolSite } from './index-DmfyPYe5.js';
|
|
12
12
|
export { CODE_LANGS, CodeLine, CodeMeta, DiffMark, LineMarks, RehypeCodeOptions, TOKEN_CLASS, Token, TokenKind, escapeHtml, grammarOf, highlight, highlightToHtml, linesToHtml, parseCodeMeta, parseLineRanges, readDiff, rehypeCode } from './code.js';
|
|
13
13
|
export { ExplorerKind, Network, blocksToDuration, explorerUrl, formatBlockHeight, formatBytes, formatUtc, shortenMiddle } from './format.js';
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,8 @@ var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
|
20
20
|
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
21
21
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
22
22
|
var QRCode = require('qrcode');
|
|
23
|
-
var Link8 = require('next/link
|
|
23
|
+
var Link8 = require('next/link');
|
|
24
|
+
var router = require('next/compat/router');
|
|
24
25
|
var nextThemes = require('next-themes');
|
|
25
26
|
|
|
26
27
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -460,16 +461,17 @@ var Label = react.forwardRef(function Label2({ className, ...props }, ref) {
|
|
|
460
461
|
}
|
|
461
462
|
);
|
|
462
463
|
});
|
|
463
|
-
function Field({ label, hint, optional, error, children, className, hideLabel, action }) {
|
|
464
|
-
const
|
|
464
|
+
function Field({ label, hint, optional, error, children, id: fixedId, className, hideLabel, action }) {
|
|
465
|
+
const generated = react.useId();
|
|
466
|
+
const id = fixedId ?? generated;
|
|
465
467
|
const hintId = hint ? `${id}-hint` : void 0;
|
|
466
468
|
const errorId = error ? `${id}-error` : void 0;
|
|
467
|
-
const
|
|
468
|
-
const control = react.isValidElement(children) ? react.cloneElement(children, {
|
|
469
|
+
const wiring = {
|
|
469
470
|
id,
|
|
470
|
-
"aria-describedby":
|
|
471
|
+
"aria-describedby": [hintId, errorId].filter(Boolean).join(" ") || void 0,
|
|
471
472
|
"aria-invalid": error ? true : void 0
|
|
472
|
-
}
|
|
473
|
+
};
|
|
474
|
+
const control = typeof children === "function" ? children(wiring) : react.isValidElement(children) ? react.cloneElement(children, { ...wiring }) : children;
|
|
473
475
|
const hintNode = hint ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: hintId, className: "text-[0.8125rem] leading-snug text-muted-foreground", children: hint }) : null;
|
|
474
476
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
475
477
|
/* @__PURE__ */ jsxRuntime.jsxs(Label, { htmlFor: id, className: hideLabel ? "sr-only" : "flex items-baseline gap-2", children: [
|
|
@@ -4335,6 +4337,7 @@ var CHECK = {
|
|
|
4335
4337
|
ok: { word: "Passed", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheck, {}), tone: "text-success" },
|
|
4336
4338
|
fail: { word: "Failed", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, {}), tone: "text-destructive" },
|
|
4337
4339
|
pending: { word: "Pending", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, {}), tone: "text-oca-accent-ink" },
|
|
4340
|
+
none: { word: "None", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleSlash, {}), tone: "text-muted-foreground" },
|
|
4338
4341
|
skipped: { word: "Skipped", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleMinus, {}), tone: "text-muted-foreground" },
|
|
4339
4342
|
unchecked: { word: "Not checked", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleDashed, {}), tone: "text-oca-subtle" }
|
|
4340
4343
|
};
|
|
@@ -4357,8 +4360,8 @@ function VerifyReport({
|
|
|
4357
4360
|
children: [
|
|
4358
4361
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex flex-col items-start gap-3 p-6 md:p-8", children: [
|
|
4359
4362
|
/* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: verdict }),
|
|
4360
|
-
/* @__PURE__ */ jsxRuntime.jsx(Heading, { className: "oca-display-3", children: title }),
|
|
4361
|
-
summary ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oca-body max-w-[40rem]", children: summary }) : null
|
|
4363
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { className: "oca-display-3 [overflow-wrap:anywhere]", children: title }),
|
|
4364
|
+
summary ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oca-body max-w-[40rem] [overflow-wrap:anywhere]", children: summary }) : null
|
|
4362
4365
|
] }),
|
|
4363
4366
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { "aria-label": "Checks", className: "divide-y divide-border border-t border-border", children: checks.map((c, i) => {
|
|
4364
4367
|
const k = CHECK[c.state];
|
|
@@ -6529,17 +6532,38 @@ function ThemeToggle({ className }) {
|
|
|
6529
6532
|
);
|
|
6530
6533
|
}
|
|
6531
6534
|
var OCHK_APP_ACCOUNT = "https://ochk.app/me/account";
|
|
6535
|
+
function onHistory(change) {
|
|
6536
|
+
window.addEventListener("popstate", change);
|
|
6537
|
+
return () => window.removeEventListener("popstate", change);
|
|
6538
|
+
}
|
|
6539
|
+
function herePath() {
|
|
6540
|
+
const { href, origin, pathname, search } = window.location;
|
|
6541
|
+
const path = pathname + search;
|
|
6542
|
+
return new URL(path, href).origin === origin ? path : "/";
|
|
6543
|
+
}
|
|
6544
|
+
function routePath(router) {
|
|
6545
|
+
if (!router || router.pathname.includes("[")) return null;
|
|
6546
|
+
return router.basePath && router.pathname === "/" ? router.basePath : router.basePath + router.pathname;
|
|
6547
|
+
}
|
|
6548
|
+
function useSignInHref(path) {
|
|
6549
|
+
const router$1 = router.useRouter();
|
|
6550
|
+
const here = react.useSyncExternalStore(onHistory, herePath, () => routePath(router$1));
|
|
6551
|
+
if (!path) return void 0;
|
|
6552
|
+
return here ? `${path}?return_to=${encodeURIComponent(here)}` : path;
|
|
6553
|
+
}
|
|
6532
6554
|
function SessionAccountView({
|
|
6533
6555
|
state,
|
|
6534
6556
|
name,
|
|
6535
6557
|
detail,
|
|
6536
6558
|
items = [],
|
|
6537
6559
|
signInHref,
|
|
6560
|
+
signInPath,
|
|
6538
6561
|
signInLabel = "Sign in",
|
|
6539
6562
|
accountHref = OCHK_APP_ACCOUNT,
|
|
6540
6563
|
onSignOut,
|
|
6541
6564
|
nameFrom = "lg"
|
|
6542
6565
|
}) {
|
|
6566
|
+
const inPlace = useSignInHref(signInPath);
|
|
6543
6567
|
if (state === "in") {
|
|
6544
6568
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6545
6569
|
AccountMenu,
|
|
@@ -6562,13 +6586,13 @@ function SessionAccountView({
|
|
|
6562
6586
|
}
|
|
6563
6587
|
return (
|
|
6564
6588
|
// No box of its own: it sits exactly where the signed-in chip will. While checking it is only unseen.
|
|
6565
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: state === "checking" ? "contents invisible" : "contents", "aria-hidden": state === "checking" || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { asChild: true, size: "sm", variant: "secondary", tabIndex: state === "checking" ? -1 : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: signInHref, children: signInLabel }) }) })
|
|
6589
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: state === "checking" ? "contents invisible" : "contents", "aria-hidden": state === "checking" || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { asChild: true, size: "sm", variant: "secondary", tabIndex: state === "checking" ? -1 : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: signInHref ?? inPlace ?? "https://ochk.io/signin", children: signInLabel }) }) })
|
|
6566
6590
|
);
|
|
6567
6591
|
}
|
|
6568
6592
|
function ToolShell({
|
|
6569
6593
|
protocol: protocol2,
|
|
6570
6594
|
tools,
|
|
6571
|
-
home
|
|
6595
|
+
home,
|
|
6572
6596
|
account,
|
|
6573
6597
|
rail = false,
|
|
6574
6598
|
railFooter,
|
|
@@ -6607,7 +6631,7 @@ function ToolShell({
|
|
|
6607
6631
|
SiteHeader,
|
|
6608
6632
|
{
|
|
6609
6633
|
variant: "tool",
|
|
6610
|
-
home,
|
|
6634
|
+
home: home ?? p.pageHref,
|
|
6611
6635
|
product: p.label,
|
|
6612
6636
|
family: protocol2,
|
|
6613
6637
|
nav: tools.map((t) => ({ href: t.href, label: t.label, active: t.active })),
|
|
@@ -7025,6 +7049,7 @@ exports.useDensity = useDensity;
|
|
|
7025
7049
|
exports.useHeadings = useHeadings;
|
|
7026
7050
|
exports.useInView = useInView;
|
|
7027
7051
|
exports.useShellPlace = useShellPlace;
|
|
7052
|
+
exports.useSignInHref = useSignInHref;
|
|
7028
7053
|
exports.useTimedOut = useTimedOut;
|
|
7029
7054
|
//# sourceMappingURL=index.js.map
|
|
7030
7055
|
//# sourceMappingURL=index.js.map
|