@flamingo-stack/openframe-frontend-core 0.0.266 → 0.0.267
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/{chunk-G5GQVAPI.cjs → chunk-5QJQAFTP.cjs} +126 -57
- package/dist/chunk-5QJQAFTP.cjs.map +1 -0
- package/dist/chunk-722TTRIJ.cjs +29 -0
- package/dist/chunk-722TTRIJ.cjs.map +1 -0
- package/dist/{chunk-QXRXIHY6.cjs → chunk-AA77CC2Y.cjs} +12 -12
- package/dist/{chunk-QXRXIHY6.cjs.map → chunk-AA77CC2Y.cjs.map} +1 -1
- package/dist/{chunk-WB2JXKEI.cjs → chunk-CI5XE4LB.cjs} +37 -37
- package/dist/{chunk-WB2JXKEI.cjs.map → chunk-CI5XE4LB.cjs.map} +1 -1
- package/dist/{chunk-UUARMJJE.cjs → chunk-CICK3FUU.cjs} +100 -5
- package/dist/chunk-CICK3FUU.cjs.map +1 -0
- package/dist/{chunk-K4K4X62E.js → chunk-CYMMGPPV.js} +125 -56
- package/dist/chunk-CYMMGPPV.js.map +1 -0
- package/dist/{chunk-FRU4LQJ4.js → chunk-GJVSLS2R.js} +5 -7
- package/dist/{chunk-FRU4LQJ4.js.map → chunk-GJVSLS2R.js.map} +1 -1
- package/dist/{chunk-HTR3ARN6.js → chunk-ICOMPUMX.js} +343 -248
- package/dist/chunk-ICOMPUMX.js.map +1 -0
- package/dist/{chunk-DTJ32U7J.js → chunk-J6O57C7S.js} +8 -72
- package/dist/chunk-J6O57C7S.js.map +1 -0
- package/dist/{chunk-QAQ7AROS.cjs → chunk-O6UA475M.cjs} +302 -366
- package/dist/chunk-O6UA475M.cjs.map +1 -0
- package/dist/chunk-OO4ZGDRO.js +29 -0
- package/dist/chunk-OO4ZGDRO.js.map +1 -0
- package/dist/{chunk-TX2VP43R.js → chunk-P7JHUX4X.js} +2 -2
- package/dist/{chunk-NR535XIY.js → chunk-T2URJAX2.js} +66 -1
- package/dist/chunk-T2URJAX2.js.map +1 -0
- package/dist/{chunk-VYGS24RO.cjs → chunk-TPZI7NBN.cjs} +16 -18
- package/dist/chunk-TPZI7NBN.cjs.map +1 -0
- package/dist/{chunk-SRM7HE2A.js → chunk-XSK72QRR.js} +3 -3
- package/dist/{chunk-7VMEOFEA.cjs → chunk-Y2B6WDU6.cjs} +67 -2
- package/dist/chunk-Y2B6WDU6.cjs.map +1 -0
- package/dist/{chunk-Q52JZP3P.cjs → chunk-YV55JZAD.cjs} +27 -27
- package/dist/{chunk-Q52JZP3P.cjs.map → chunk-YV55JZAD.cjs.map} +1 -1
- package/dist/{chunk-KUYYJ2XM.js → chunk-Z6MKG53Z.js} +4 -4
- package/dist/components/chat/index.cjs +5 -5
- package/dist/components/chat/index.js +4 -4
- package/dist/components/contact/index.cjs +6 -6
- package/dist/components/contact/index.js +5 -5
- package/dist/components/faq/faq-section.d.ts +20 -23
- package/dist/components/faq/faq-section.d.ts.map +1 -1
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/faq-accordion.d.ts +0 -5
- package/dist/components/faq-accordion.d.ts.map +1 -1
- package/dist/components/features/index.cjs +7 -8
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +6 -7
- package/dist/components/index.cjs +84 -84
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +13 -13
- package/dist/components/navigation/index.cjs +5 -5
- package/dist/components/navigation/index.js +4 -4
- package/dist/components/onboarding-guides/index.cjs +24 -25
- package/dist/components/onboarding-guides/index.cjs.map +1 -1
- package/dist/components/onboarding-guides/index.js +4 -5
- package/dist/components/onboarding-guides/index.js.map +1 -1
- package/dist/components/related-content/index.cjs +6 -6
- package/dist/components/related-content/index.js +5 -5
- package/dist/components/tickets/index.cjs +69 -69
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +10 -10
- package/dist/components/ui/index.cjs +7 -7
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +7 -7
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -10
- package/package.json +1 -1
- package/src/components/faq/faq-section.tsx +212 -104
- package/src/components/faq-accordion.tsx +1 -15
- package/dist/chunk-7VMEOFEA.cjs.map +0 -1
- package/dist/chunk-DTJ32U7J.js.map +0 -1
- package/dist/chunk-FREG2KXV.js +0 -128
- package/dist/chunk-FREG2KXV.js.map +0 -1
- package/dist/chunk-G5GQVAPI.cjs.map +0 -1
- package/dist/chunk-HTR3ARN6.js.map +0 -1
- package/dist/chunk-JMU4RU5J.cjs +0 -128
- package/dist/chunk-JMU4RU5J.cjs.map +0 -1
- package/dist/chunk-K4K4X62E.js.map +0 -1
- package/dist/chunk-NR535XIY.js.map +0 -1
- package/dist/chunk-QAQ7AROS.cjs.map +0 -1
- package/dist/chunk-UUARMJJE.cjs.map +0 -1
- package/dist/chunk-VYGS24RO.cjs.map +0 -1
- /package/dist/{chunk-TX2VP43R.js.map → chunk-P7JHUX4X.js.map} +0 -0
- /package/dist/{chunk-SRM7HE2A.js.map → chunk-XSK72QRR.js.map} +0 -0
- /package/dist/{chunk-KUYYJ2XM.js.map → chunk-Z6MKG53Z.js.map} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/layout/page-heading.tsx
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
var PAGE_HEADING_CLASS = "text-h1 text-ods-text-primary";
|
|
6
|
+
var SECTION_HEADING_CLASS = "text-h2 text-ods-text-primary";
|
|
7
|
+
var DESCRIPTION_CLASS = "mt-6 max-w-[640px] font-['DM_Sans'] text-[16px] md:text-[18px] leading-[24px] md:leading-[28px] text-ods-text-secondary";
|
|
8
|
+
function PageHeading({
|
|
9
|
+
children,
|
|
10
|
+
as: Tag = "h1",
|
|
11
|
+
description,
|
|
12
|
+
className,
|
|
13
|
+
descriptionClassName
|
|
14
|
+
}) {
|
|
15
|
+
const headingClass = className ? `${PAGE_HEADING_CLASS} ${className}` : PAGE_HEADING_CLASS;
|
|
16
|
+
const descClass = descriptionClassName ? `${DESCRIPTION_CLASS} ${descriptionClassName}` : DESCRIPTION_CLASS;
|
|
17
|
+
const hasDescription = description != null && description !== "" && typeof description !== "boolean";
|
|
18
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx(Tag, { className: headingClass, children }),
|
|
20
|
+
hasDescription && /* @__PURE__ */ jsx("p", { className: descClass, children: description })
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
PAGE_HEADING_CLASS,
|
|
26
|
+
SECTION_HEADING_CLASS,
|
|
27
|
+
PageHeading
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=chunk-OO4ZGDRO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/page-heading.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\n/**\n * THE page-title style — the ODS `text-h1` token (`--font-size-h1-title` =\n * 40 / 48 / 56px, Azeret Mono semibold), which already owns the responsive\n * letter-spacing (-0.02em). Mirrors the global `h1 { @apply text-h1 }` base, so\n * every page heading is the SAME size across the lib and every consuming app.\n *\n * Single source of truth — do NOT hardcode a px size or re-assert the token's\n * tracking; render `<PageHeading>` (or, for the rare non-h1 caller, apply\n * `PAGE_HEADING_CLASS`).\n */\nexport const PAGE_HEADING_CLASS = 'text-h1 text-ods-text-primary'\n\n/**\n * THE section-heading style — the ODS `text-h2` sub-title token\n * (`--font-size-h2-sub-title` = 24 / 32 / 32px), one step below the page\n * title so a section `<h2>`/`<h3>` is always visually distinguishable from\n * the page's `<h1>`. Same single-source rule as PAGE_HEADING_CLASS: never\n * hardcode a px ramp or re-assert the token's tracking on a section heading.\n */\nexport const SECTION_HEADING_CLASS = 'text-h2 text-ods-text-primary'\n\nconst DESCRIPTION_CLASS =\n \"mt-6 max-w-[640px] font-['DM_Sans'] text-[16px] md:text-[18px] leading-[24px] md:leading-[28px] text-ods-text-secondary\"\n\nexport interface PageHeadingProps {\n /** Heading content — plain text or nodes (e.g. an accent <span>). */\n children: ReactNode\n /**\n * Heading level. Defaults to 'h1' (exactly one per page). Pass 'h2' where the\n * page already renders an <h1> above (e.g. a hero/featured item).\n */\n as?: 'h1' | 'h2'\n /** Optional supporting copy rendered as a <p> beneath the heading. */\n description?: ReactNode\n /** Extra classes merged onto the heading (margins, width, truncate, etc.). */\n className?: string\n /** Extra classes merged onto the description <p>. */\n descriptionClassName?: string\n}\n\n/**\n * Unified page heading. Renders the canonical page-title <h1> (or <h2>) plus an\n * optional description, so every page shares one consistent style instead of\n * duplicating the class string. Layout (PageContainer, margins, surrounding\n * sections) stays with the caller — this owns only the heading + description.\n */\nexport function PageHeading({\n children,\n as: Tag = 'h1',\n description,\n className,\n descriptionClassName,\n}: PageHeadingProps) {\n const headingClass = className ? `${PAGE_HEADING_CLASS} ${className}` : PAGE_HEADING_CLASS\n const descClass = descriptionClassName ? `${DESCRIPTION_CLASS} ${descriptionClassName}` : DESCRIPTION_CLASS\n // `description` is a ReactNode, so `description={cond && '...'}` can pass a\n // boolean `false` — exclude it (and empty string) so we never render an empty\n // <p> that adds phantom vertical gap beneath the heading.\n const hasDescription =\n description != null && description !== '' && typeof description !== 'boolean'\n return (\n <>\n <Tag className={headingClass}>{children}</Tag>\n {hasDescription && <p className={descClass}>{description}</p>}\n </>\n )\n}\n"],"mappings":";;;AA+DI,mBACE,KADF;AAnDG,IAAM,qBAAqB;AAS3B,IAAM,wBAAwB;AAErC,IAAM,oBACJ;AAwBK,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA,IAAI,MAAM;AAAA,EACV;AAAA,EACA;AAAA,EACA;AACF,GAAqB;AACnB,QAAM,eAAe,YAAY,GAAG,kBAAkB,IAAI,SAAS,KAAK;AACxE,QAAM,YAAY,uBAAuB,GAAG,iBAAiB,IAAI,oBAAoB,KAAK;AAI1F,QAAM,iBACJ,eAAe,QAAQ,gBAAgB,MAAM,OAAO,gBAAgB;AACtE,SACE,iCACE;AAAA,wBAAC,OAAI,WAAW,cAAe,UAAS;AAAA,IACvC,kBAAkB,oBAAC,OAAE,WAAW,WAAY,uBAAY;AAAA,KAC3D;AAEJ;","names":[]}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveExternalNavigation,
|
|
10
10
|
resolveSourceIcon,
|
|
11
11
|
stripSameOriginToPath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ICOMPUMX.js";
|
|
13
13
|
import {
|
|
14
14
|
useDebounce
|
|
15
15
|
} from "./chunk-ZXZJSTNV.js";
|
|
@@ -483,4 +483,4 @@ export {
|
|
|
483
483
|
DetailPageSkeleton,
|
|
484
484
|
ArticleAuthorByline
|
|
485
485
|
};
|
|
486
|
-
//# sourceMappingURL=chunk-
|
|
486
|
+
//# sourceMappingURL=chunk-P7JHUX4X.js.map
|
|
@@ -40,6 +40,70 @@ function getSlackCommunityJoinUrl() {
|
|
|
40
40
|
return url;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
// src/utils/scroll-into-view.ts
|
|
44
|
+
var activeRaf = 0;
|
|
45
|
+
var teardownActive = null;
|
|
46
|
+
function cancelActiveScroll() {
|
|
47
|
+
if (activeRaf) {
|
|
48
|
+
cancelAnimationFrame(activeRaf);
|
|
49
|
+
activeRaf = 0;
|
|
50
|
+
}
|
|
51
|
+
if (teardownActive) {
|
|
52
|
+
teardownActive();
|
|
53
|
+
teardownActive = null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
var easeOutCubic = (t) => 1 - Math.pow(1 - t, 3);
|
|
57
|
+
function scrollElementIntoView(target, options = {}) {
|
|
58
|
+
if (typeof window === "undefined" || !target) return;
|
|
59
|
+
const { headerOffset = 0, behavior = "smooth", adjustTargetY, durationMs = 320 } = options;
|
|
60
|
+
const computeTarget = () => {
|
|
61
|
+
const raw = target.getBoundingClientRect().top + window.scrollY - headerOffset;
|
|
62
|
+
const adjusted = adjustTargetY ? adjustTargetY(raw) : raw;
|
|
63
|
+
const maxScroll = Math.max(
|
|
64
|
+
0,
|
|
65
|
+
document.documentElement.scrollHeight - window.innerHeight
|
|
66
|
+
);
|
|
67
|
+
return Math.min(Math.max(0, adjusted), maxScroll);
|
|
68
|
+
};
|
|
69
|
+
cancelActiveScroll();
|
|
70
|
+
const prefersReduced = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
71
|
+
if (behavior === "instant" || behavior === "auto" || prefersReduced) {
|
|
72
|
+
window.scrollTo(0, computeTarget());
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
let startY = null;
|
|
76
|
+
let startTime = 0;
|
|
77
|
+
const onUserGesture = () => cancelActiveScroll();
|
|
78
|
+
window.addEventListener("wheel", onUserGesture, { passive: true });
|
|
79
|
+
window.addEventListener("touchmove", onUserGesture, { passive: true });
|
|
80
|
+
teardownActive = () => {
|
|
81
|
+
window.removeEventListener("wheel", onUserGesture);
|
|
82
|
+
window.removeEventListener("touchmove", onUserGesture);
|
|
83
|
+
};
|
|
84
|
+
const step = (now) => {
|
|
85
|
+
if (startY === null) {
|
|
86
|
+
startY = window.scrollY;
|
|
87
|
+
startTime = now;
|
|
88
|
+
}
|
|
89
|
+
const targetY = computeTarget();
|
|
90
|
+
const t = Math.min(1, (now - startTime) / durationMs);
|
|
91
|
+
const y = startY + (targetY - startY) * easeOutCubic(t);
|
|
92
|
+
window.scrollTo(0, y);
|
|
93
|
+
if (t < 1) {
|
|
94
|
+
activeRaf = requestAnimationFrame(step);
|
|
95
|
+
} else {
|
|
96
|
+
window.scrollTo(0, computeTarget());
|
|
97
|
+
activeRaf = 0;
|
|
98
|
+
if (teardownActive) {
|
|
99
|
+
teardownActive();
|
|
100
|
+
teardownActive = null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
activeRaf = requestAnimationFrame(step);
|
|
105
|
+
}
|
|
106
|
+
|
|
43
107
|
// src/utils/suggestion-url.ts
|
|
44
108
|
function buildSuggestionUrl(path, opts = {}) {
|
|
45
109
|
const qs = new URLSearchParams();
|
|
@@ -98,7 +162,8 @@ export {
|
|
|
98
162
|
serializeJsonLd,
|
|
99
163
|
deepClone,
|
|
100
164
|
getSlackCommunityJoinUrl,
|
|
165
|
+
scrollElementIntoView,
|
|
101
166
|
buildSuggestionUrl,
|
|
102
167
|
ChevronButton
|
|
103
168
|
};
|
|
104
|
-
//# sourceMappingURL=chunk-
|
|
169
|
+
//# sourceMappingURL=chunk-T2URJAX2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/common.ts","../src/utils/scroll-into-view.ts","../src/utils/suggestion-url.ts","../src/components/ui/chevron-button.tsx"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\n/**\n * Utility functions for common operations\n */\n\n/**\n * Merge class names with Tailwind CSS\n * @param inputs - Class names to merge\n * @returns Merged class names\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\n/**\n * Delay execution for a specified time\n * @param ms - Milliseconds to delay\n * @returns Promise that resolves after the delay\n */\nexport function delay(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\n/**\n * Generate a random string of specified length\n * @param length - Length of the string\n * @returns Random string\n */\nexport function generateRandomString(length = 8): string {\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\"\n let result = \"\"\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length))\n }\n return result\n}\n\n/**\n * Truncate a string to a specified length\n * @param str - String to truncate\n * @param maxLength - Maximum length\n * @param suffix - Suffix to add to truncated string\n * @returns Truncated string\n */\nexport function truncateString(str: string, maxLength: number, suffix = \"...\"): string {\n if (str.length <= maxLength) return str\n return str.substring(0, maxLength - suffix.length) + suffix\n}\n\n/**\n * Serialize a JSON-LD schema for a `<script type=\"application/ld+json\">`\n * block — THE one home of the escape rule (the hub re-exports this from\n * lib/utils/breadcrumbs). JSON.stringify does NOT HTML-escape: a stored\n * \"</script>\" inside any admin/user-entered field would terminate the tag\n * early (stored XSS). Every \"<\" becomes the JSON escape sequence\n * backslash-u003c — still valid JSON, inert in HTML.\n */\nexport function serializeJsonLd(schema: unknown): string {\n return JSON.stringify(schema).replace(/</g, \"\\\\u003c\")\n}\n\n/**\n * Deep clone an object\n * @param obj - Object to clone\n * @returns Cloned object\n */\nexport function deepClone<T>(obj: T): T {\n return JSON.parse(JSON.stringify(obj))\n}\n\n/**\n * Get the Slack community join URL from environment variables\n * @returns Slack community join URL or fallback URL\n */\nexport function getSlackCommunityJoinUrl(): string {\n const url = process.env.NEXT_PUBLIC_SLACK_COMMUNITY_JOIN_URL\n if (!url) {\n console.warn('NEXT_PUBLIC_SLACK_COMMUNITY_JOIN_URL is not defined in environment variables')\n return 'https://join.slack.com/t/openmsp/shared_invite/zt-36bl7mx0h-3~U2nFH6nqHqoTPXMaHEHA'\n }\n return url\n}\n\n","/**\n * `scrollElementIntoView` — canonical \"scroll an element to the top of the\n * viewport, account for sticky chrome, survive layout shifts\" helper.\n *\n * One shared implementation so every caller (the ticket drawer expand, the\n * hub's `useUnifiedNav` / `use-nav-link` hash scroll, doc-tree, delivery\n * `?focus=`, sticky-section-nav, …) inherits the SAME cancellation-proof\n * motion.\n *\n * WHY A SELF-DRIVEN rAF TWEEN INSTEAD OF `window.scrollTo({behavior:'smooth'})`:\n * the native smooth scroll is CANCELLABLE, and in real pages it gets cancelled\n * constantly:\n *\n * - Browser SCROLL ANCHORING: when content is inserted/removed above or\n * around the target (a collapsible drawer expanding, an async image\n * loading, a list re-rendering) the browser issues a synchronous scrollTop\n * correction to keep the anchored element stable. Per CSSOM-View \"perform a\n * scroll\" step 1 (\"abort any ongoing smooth scroll\"), that correction\n * ABORTS an in-flight native smooth scroll — so it lands as an instant jump.\n * Anchoring is suppressed when the scroll offset is 0, which is exactly why\n * a native smooth scroll appears to work the FIRST time (page at top) and\n * jumps on every repeat (page already scrolled). This was a multi-day\n * \"smooth only works once\" bug on the /tickets drawer.\n * - A second programmatic scroll on the same frame, or a `focus()` without\n * `{preventScroll:true}`, cancels it the same way.\n *\n * A tween that re-asserts the position with INSTANT writes every frame is\n * immune: there is no \"ongoing native smooth scroll\" for anchoring/focus to\n * abort, and any correction that lands between our frames is overwritten on the\n * next frame. We also RECOMPUTE the target each frame, so an element whose\n * final position is still settling (drawer still expanding, images loading)\n * is tracked to its resting place instead of animating to a stale pixel.\n *\n * Honors `prefers-reduced-motion` (jumps instantly) and cancels on genuine user\n * scroll intent (wheel / touch) so we never fight the user.\n */\n\nexport interface ScrollElementIntoViewOptions {\n /** Pixels to subtract from the target element's `top` so it lands BELOW\n * sticky chrome. Defaults to 0. Pass `96` for the standard hub header. */\n headerOffset?: number\n /** `'smooth'` (default) runs the self-driven tween; `'instant'` / `'auto'`\n * jump in one synchronous write (deep-link land, programmatic focus moves). */\n behavior?: ScrollBehavior\n /** Optional adjustment applied to the computed pixel target each frame. The\n * callback receives the \"raw\" Y (`element.top + scrollY - headerOffset`) and\n * returns the FINAL target. Use when the caller knows about a layout shift\n * (e.g. a sibling drawer collapsing) the geometry can't yet reflect. */\n adjustTargetY?: (rawTargetY: number) => number\n /** Tween duration in ms (smooth only). Default 320. */\n durationMs?: number\n}\n\n/** Module-level handle to the in-flight tween so a new call (or a user\n * gesture) cancels the previous one — only ever one page-scroll animation at\n * a time. */\nlet activeRaf = 0\nlet teardownActive: (() => void) | null = null\n\nfunction cancelActiveScroll(): void {\n if (activeRaf) {\n cancelAnimationFrame(activeRaf)\n activeRaf = 0\n }\n if (teardownActive) {\n teardownActive()\n teardownActive = null\n }\n}\n\nconst easeOutCubic = (t: number): number => 1 - Math.pow(1 - t, 3)\n\n/**\n * Scroll the page so `target` lands at the top of the viewport (below sticky\n * chrome via `headerOffset`). SSR-safe; `null`/`undefined` target is a no-op so\n * callers can pass refs without defensive branching.\n */\nexport function scrollElementIntoView(\n target: HTMLElement | null | undefined,\n options: ScrollElementIntoViewOptions = {},\n): void {\n if (typeof window === 'undefined' || !target) return\n const { headerOffset = 0, behavior = 'smooth', adjustTargetY, durationMs = 320 } = options\n\n // Target is recomputed every frame: the row's absolute position can move as\n // the page reflows (a sibling drawer collapsing) and the reachable max grows\n // as the just-opened drawer expands. Clamp to the LIVE max each frame.\n const computeTarget = (): number => {\n const raw = target.getBoundingClientRect().top + window.scrollY - headerOffset\n const adjusted = adjustTargetY ? adjustTargetY(raw) : raw\n const maxScroll = Math.max(\n 0,\n document.documentElement.scrollHeight - window.innerHeight,\n )\n return Math.min(Math.max(0, adjusted), maxScroll)\n }\n\n // Any prior animation loses — one page scroll at a time.\n cancelActiveScroll()\n\n const prefersReduced =\n typeof window.matchMedia === 'function' &&\n window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\n // Instant paths: a single synchronous write. No tween, no anchoring race.\n if (behavior === 'instant' || behavior === 'auto' || prefersReduced) {\n window.scrollTo(0, computeTarget())\n return\n }\n\n // Smooth: self-driven tween with instant per-frame writes (anchoring-proof).\n let startY: number | null = null\n let startTime = 0\n\n // Bail the moment the user takes over with a real scroll gesture — we must\n // never fight them. (Not keydown: the ticket composer auto-focuses on open,\n // and typing there should not abort the scroll.)\n const onUserGesture = () => cancelActiveScroll()\n window.addEventListener('wheel', onUserGesture, { passive: true })\n window.addEventListener('touchmove', onUserGesture, { passive: true })\n teardownActive = () => {\n window.removeEventListener('wheel', onUserGesture)\n window.removeEventListener('touchmove', onUserGesture)\n }\n\n const step = (now: number) => {\n if (startY === null) {\n startY = window.scrollY\n startTime = now\n }\n const targetY = computeTarget()\n const t = Math.min(1, (now - startTime) / durationMs)\n const y = startY + (targetY - startY) * easeOutCubic(t)\n window.scrollTo(0, y)\n if (t < 1) {\n activeRaf = requestAnimationFrame(step)\n } else {\n // Final exact write in case easing left a sub-pixel gap, then teardown.\n window.scrollTo(0, computeTarget())\n activeRaf = 0\n if (teardownActive) {\n teardownActive()\n teardownActive = null\n }\n }\n }\n activeRaf = requestAnimationFrame(step)\n}\n","/**\n * Shared fetch-URL composer for the two suggestion sections (FaqSection +\n * RelatedContentSection) — ONE owner of the entityType/entityId/count query\n * shape so the sections can never drift. Pure + server-safe.\n *\n * Byte-parity contract with the original `buildFaqsUrl`: when only\n * entityType/entityId are set, the param order is `entityType`, `entityId`;\n * with nothing set, the bare `path` is returned (no `?`).\n */\nexport interface SuggestionUrlOptions {\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin relative). */\n apiBaseUrl?: string\n /** Both required together for entity scope; partial → bare path. */\n entityType?: string\n entityId?: number | string\n /** Maps to the server's `count` param. Undefined → param not sent\n * (server default applies). */\n count?: number\n /** Extra query params appended after the shared trio (e.g. the\n * related-content `excludeTypes` deny-list). Empty/undefined values\n * are skipped. */\n extraParams?: Record<string, string | undefined>\n}\n\nexport function buildSuggestionUrl(path: string, opts: SuggestionUrlOptions = {}): string {\n const qs = new URLSearchParams()\n const { entityType, entityId } = opts\n if (entityType && entityId !== undefined && entityId !== null && entityId !== '') {\n qs.set('entityType', entityType)\n qs.set('entityId', String(entityId))\n }\n if (opts.count !== undefined) qs.set('count', String(opts.count))\n for (const [key, value] of Object.entries(opts.extraParams ?? {})) {\n if (value !== undefined && value !== '') qs.set(key, value)\n }\n const query = qs.toString()\n return `${opts.apiBaseUrl ?? ''}${path}${query ? `?${query}` : ''}`\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { ChevronUp, ChevronDown } from \"lucide-react\"\nimport { cn } from \"../../utils/cn\"\n\ninterface ChevronButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n direction?: 'up' | 'down';\n size?: 'sm' | 'md' | 'lg';\n isExpanded?: boolean;\n backgroundColor?: string;\n borderColor?: string;\n}\n\nconst ChevronButton = React.forwardRef<HTMLButtonElement, ChevronButtonProps>(\n ({ className, direction = 'down', size = 'md', isExpanded, backgroundColor, borderColor, ...props }, ref) => {\n const Icon = (isExpanded ? ChevronUp : ChevronDown) || (direction === 'up' ? ChevronUp : ChevronDown);\n const sizeClasses = {\n sm: 'h-4 w-4',\n md: 'h-5 w-5', \n lg: 'h-6 w-6'\n };\n\n return (\n <button\n className={cn(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n \"h-10 px-4 py-2\",\n className\n )}\n style={{\n backgroundColor: backgroundColor,\n borderColor: borderColor\n }}\n ref={ref}\n {...props}\n >\n <Icon className={sizeClasses[size]} />\n </button>\n )\n }\n)\nChevronButton.displayName = \"ChevronButton\"\n\nexport { ChevronButton }"],"mappings":";;;;;;;AAAA,SAAS,YAA6B;AACtC,SAAS,eAAe;AAWjB,SAASA,OAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;AAOO,SAAS,MAAM,IAA2B;AAC/C,SAAO,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,EAAE,CAAC;AACzD;AAOO,SAAS,qBAAqB,SAAS,GAAW;AACvD,QAAM,QAAQ;AACd,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,QAAQ,KAAK;AAC/B,cAAU,MAAM,OAAO,KAAK,MAAM,KAAK,OAAO,IAAI,MAAM,MAAM,CAAC;AAAA,EACjE;AACA,SAAO;AACT;AASO,SAAS,eAAe,KAAa,WAAmB,SAAS,OAAe;AACrF,MAAI,IAAI,UAAU,UAAW,QAAO;AACpC,SAAO,IAAI,UAAU,GAAG,YAAY,OAAO,MAAM,IAAI;AACvD;AAUO,SAAS,gBAAgB,QAAyB;AACvD,SAAO,KAAK,UAAU,MAAM,EAAE,QAAQ,MAAM,SAAS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AAK,KAAK,EAAE;AACnE;;;AClCA;AAFA,YAAY,WAAW;AACvB,SAAS,WAAW,mBAAmB;AAkC/B;AAvBR,IAAM,gBAAsB;AAAA,EAC1B,CAAC,EAAE,WAAW,YAAY,QAAQ,OAAO,MAAM,YAAY,iBAAiB,aAAa,GAAG,MAAM,GAAG,QAAQ;AAC3G,UAAM,QAAQ,aAAa,YAAY,iBAAiB,cAAc,OAAO,YAAY;AACzF,UAAM,cAAc;AAAA,MAClB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAO;AAAA,UACL;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QACC,GAAG;AAAA,QAEJ,8BAAC,QAAK,WAAW,YAAY,IAAI,GAAG;AAAA;AAAA,IACtC;AAAA,EAEJ;AACF;AACA,cAAc,cAAc;","names":["cn"]}
|
|
@@ -8,20 +8,18 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkO6UA475Mcjs = require('./chunk-O6UA475M.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var _chunkUUARMJJEcjs = require('./chunk-UUARMJJE.cjs');
|
|
16
15
|
|
|
16
|
+
var _chunkCICK3FUUcjs = require('./chunk-CICK3FUU.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var _chunkG7UE6RKVcjs = require('./chunk-G7UE6RKV.cjs');
|
|
22
|
-
|
|
23
21
|
|
|
24
|
-
var
|
|
22
|
+
var _chunkG7UE6RKVcjs = require('./chunk-G7UE6RKV.cjs');
|
|
25
23
|
|
|
26
24
|
|
|
27
25
|
|
|
@@ -73,7 +71,7 @@ function UnifiedPagination({
|
|
|
73
71
|
};
|
|
74
72
|
if (totalPages <= 1) return null;
|
|
75
73
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
76
|
-
|
|
74
|
+
_chunkO6UA475Mcjs.Pagination,
|
|
77
75
|
{
|
|
78
76
|
currentPage,
|
|
79
77
|
totalPages,
|
|
@@ -86,7 +84,7 @@ var init_unified_pagination = _chunkVRHGVLSLcjs.__esm.call(void 0, {
|
|
|
86
84
|
"use strict";
|
|
87
85
|
"use client";
|
|
88
86
|
_chunkG7UE6RKVcjs.init_next_navigation.call(void 0, );
|
|
89
|
-
|
|
87
|
+
_chunkO6UA475Mcjs.init_pagination.call(void 0, );
|
|
90
88
|
}
|
|
91
89
|
});
|
|
92
90
|
|
|
@@ -240,7 +238,7 @@ function EmptyState({
|
|
|
240
238
|
var _react = require('react');
|
|
241
239
|
|
|
242
240
|
function DevSectionView({ sectionKey, hero, preControls, children }) {
|
|
243
|
-
const section =
|
|
241
|
+
const section = _chunkO6UA475Mcjs.OPENFRAME_DEV_SECTIONS[sectionKey];
|
|
244
242
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
245
243
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
246
244
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
@@ -280,7 +278,7 @@ function DevSectionView({ sectionKey, hero, preControls, children }) {
|
|
|
280
278
|
preControls,
|
|
281
279
|
(search || filter) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
|
|
282
280
|
search && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
283
|
-
|
|
281
|
+
_chunkCICK3FUUcjs.SearchInput,
|
|
284
282
|
{
|
|
285
283
|
showDropdown: false,
|
|
286
284
|
placeholder: search.placeholder,
|
|
@@ -290,7 +288,7 @@ function DevSectionView({ sectionKey, hero, preControls, children }) {
|
|
|
290
288
|
}
|
|
291
289
|
),
|
|
292
290
|
filter && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
293
|
-
|
|
291
|
+
_chunkO6UA475Mcjs.StatusFilterComponent,
|
|
294
292
|
{
|
|
295
293
|
selectedStatus: currentFilterValue,
|
|
296
294
|
onStatusChange: handleFilterChange,
|
|
@@ -315,13 +313,13 @@ function DevSectionPage({
|
|
|
315
313
|
subtitle
|
|
316
314
|
}) {
|
|
317
315
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
318
|
-
const section =
|
|
316
|
+
const section = _chunkO6UA475Mcjs.OPENFRAME_DEV_SECTIONS[sectionKey];
|
|
319
317
|
const Icon = section.icon;
|
|
320
318
|
const backCfg = backButton === false ? void 0 : {
|
|
321
319
|
label: _nullishCoalesce((backButton ? backButton.label : void 0), () => ( "Back to home")),
|
|
322
320
|
onClick: () => router.push(_nullishCoalesce((backButton ? backButton.href : void 0), () => ( "/")))
|
|
323
321
|
};
|
|
324
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
322
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCICK3FUUcjs.PageShell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO6UA475Mcjs.PageLayout, { backButton: backCfg, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
325
323
|
DevSectionView,
|
|
326
324
|
{
|
|
327
325
|
sectionKey,
|
|
@@ -397,9 +395,9 @@ function DeliveryRow({
|
|
|
397
395
|
className
|
|
398
396
|
}) {
|
|
399
397
|
const taskType = item.taskType;
|
|
400
|
-
const typeBadgeLabel =
|
|
401
|
-
const typeBadgeTextColor =
|
|
402
|
-
const statusBadgeScheme =
|
|
398
|
+
const typeBadgeLabel = _chunkO6UA475Mcjs.TASK_TYPE_LABELS[taskType] || "TASK";
|
|
399
|
+
const typeBadgeTextColor = _chunkO6UA475Mcjs.TASK_TYPE_TEXT_COLORS[taskType] || "";
|
|
400
|
+
const statusBadgeScheme = _chunkO6UA475Mcjs.getStatusColorScheme.call(void 0, item.status);
|
|
403
401
|
const relativeTime = getRelativeTime(item.dateUpdated);
|
|
404
402
|
const subtitle = `ACTIVE ${relativeTime}${item.listNames.length > 0 ? `, ${item.listNames.join(", ")}` : ""}, ${item.id}`;
|
|
405
403
|
const inner = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col md:flex-row items-start justify-between gap-[12px] md:gap-[16px] w-full", children: [
|
|
@@ -411,7 +409,7 @@ function DeliveryRow({
|
|
|
411
409
|
] }),
|
|
412
410
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-shrink-0 self-start flex flex-col gap-2", children: [
|
|
413
411
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
414
|
-
|
|
412
|
+
_chunkCICK3FUUcjs.StatusBadge,
|
|
415
413
|
{
|
|
416
414
|
text: item.status.toUpperCase(),
|
|
417
415
|
colorScheme: statusBadgeScheme,
|
|
@@ -420,7 +418,7 @@ function DeliveryRow({
|
|
|
420
418
|
}
|
|
421
419
|
),
|
|
422
420
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
423
|
-
|
|
421
|
+
_chunkCICK3FUUcjs.StatusBadge,
|
|
424
422
|
{
|
|
425
423
|
text: typeBadgeLabel,
|
|
426
424
|
variant: "card",
|
|
@@ -452,4 +450,4 @@ function DeliveryRow({
|
|
|
452
450
|
|
|
453
451
|
|
|
454
452
|
exports.EmptyState = EmptyState; exports.UnifiedPagination = UnifiedPagination; exports.unified_pagination_exports = unified_pagination_exports; exports.init_unified_pagination = init_unified_pagination; exports.DevSectionView = DevSectionView; exports.DevSectionPage = DevSectionPage; exports.DevCardRowContent = DevCardRowContent; exports.DevCardRowSkeleton = DevCardRowSkeleton; exports.DevCardRowSkeletonList = DevCardRowSkeletonList; exports.DeliveryRow = DeliveryRow;
|
|
455
|
-
//# sourceMappingURL=chunk-
|
|
453
|
+
//# sourceMappingURL=chunk-TPZI7NBN.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-TPZI7NBN.cjs","../src/components/unified-pagination.tsx","../src/components/empty-state.tsx","../src/components/shared/dev-section/dev-section-view.tsx","../src/components/shared/dev-section/dev-section-page.tsx","../src/components/shared/dev-section/dev-card-row.tsx","../src/components/shared/delivery/delivery-row.tsx"],"names":["jsx","jsxs"],"mappings":"AAAA,yLAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACvCA,IAAA,2BAAA,EAAA,CAAA,CAAA;AAAA,wCAAA,0BAAA,EAAA;AAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,GAAA;AAAA,CAAA,CAAA;AAqDM,+CAAA;AAzCC,SAAS,iBAAA,CAAkB;AAAA,EAChC,WAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,UAAA,EAAY;AACd,CAAA,EAA2B;AACzB,EAAA,MAAM,OAAA,EAAS,yCAAA,CAAU;AACzB,EAAA,MAAM,aAAA,EAAe,+CAAA,CAAgB;AACrC,EAAA,MAAM,SAAA,EAAW,2CAAA,CAAY;AAE7B,EAAA,MAAM,iBAAA,EAAmB,CAAC,IAAA,EAAA,GAAiB;AAEzC,IAAA,MAAM,eAAA,EAAiB,MAAA,CAAO,OAAA;AAG9B,IAAA,GAAA,CAAI,YAAA,EAAc;AAChB,MAAA,YAAA,CAAa,IAAI,CAAA;AAAA,IACnB;AAGA,IAAA,MAAM,OAAA,EAAS,IAAI,eAAA,CAAgB,Y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A;AACD,EAAA;AACP,EAAA;AACT;AAgBgB;AACd,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACmB;AACF,EAAA;AACX,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACW,EAAA;AAGf,EAAA;AAEEC,oBAAAA;AAEI,MAAA;AAIF,sBAAA;AAKA,sBAAA;AAKA,sBAAA;AAKF,IAAA;AAGAA,oBAAAA;AACE,sBAAA;AAAC,QAAA;AAAA,QAAA;AACO,UAAA;AACN,UAAA;AACQ,UAAA;AACR,UAAA;AAAU,QAAA;AACZ,MAAA;AACA,sBAAA;AAAC,QAAA;AAAA,QAAA;AACO,UAAA;AACE,UAAA;AACR,UAAA;AAAyD,QAAA;AAC3D,MAAA;AACF,IAAA;AACF,EAAA;AAGgB,EAAA;AAChB,IAAA;AACQ,IAAA;AACR,IAAA;AACF,EAAA;AAEU,EAAA;AAQN,IAAA;AAIJ,EAAA;AAEO,EAAA;AACT;ANySoB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-TPZI7NBN.cjs","sourcesContent":[null,"\"use client\"\n\nimport { useRouter, useSearchParams, usePathname } from \"../embed-shims/next-navigation\"\nimport { Pagination } from \"./pagination\"\n\ninterface UnifiedPaginationProps {\n currentPage: number\n totalPages: number\n onPageChange?: (page: number) => void\n className?: string\n}\n\nexport function UnifiedPagination({ \n currentPage, \n totalPages, \n onPageChange,\n className = \"mt-8 flex justify-center w-full\"\n}: UnifiedPaginationProps) {\n const router = useRouter()\n const searchParams = useSearchParams()\n const pathname = usePathname()\n\n const handlePageChange = (page: number) => {\n // Preserve current scroll position\n const currentScrollY = window.scrollY\n \n // Call the callback to update local state (prevents reload)\n if (onPageChange) {\n onPageChange(page)\n }\n \n // Update URL for bookmarking without navigation\n const params = new URLSearchParams(searchParams.toString())\n params.set(\"page\", page.toString())\n \n // Update URL without navigation (for bookmarking support)\n const newUrl = `${pathname}?${params.toString()}`\n window.history.replaceState(null, '', newUrl)\n \n // Restore scroll position after a brief delay to allow content to render\n setTimeout(() => {\n window.scrollTo({\n top: currentScrollY,\n behavior: 'instant' // Instant to prevent any scroll animation\n })\n }, 0)\n }\n\n // Don't render pagination if there's only one page\n if (totalPages <= 1) return null\n\n return (\n <div className={className}>\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={handlePageChange}\n />\n </div>\n )\n} ","\"use client\";\n\nimport { Search, FileText, Package } from \"lucide-react\"\nimport { Button } from \"./ui/button\"\nimport { useRouter } from \"../embed-shims/next-navigation\"\n\nexport interface EmptyStateProps {\n type: 'vendors' | 'posts' | 'search' | 'generic'\n title?: string\n description?: string\n showBackButton?: boolean\n onGoBack?: () => void\n backButtonText?: string\n // New CTA properties\n showCTA?: boolean\n ctaText?: string\n onCtaClick?: () => void\n ctaVariant?: 'primary' | 'secondary'\n}\n\nexport function EmptyState({\n type,\n title,\n description,\n showBackButton = false,\n onGoBack,\n backButtonText = \"Go Back\",\n showCTA = true,\n ctaText,\n onCtaClick,\n ctaVariant = 'primary'\n}: EmptyStateProps) {\n const router = useRouter()\n\n // Default content based on type\n const getDefaultContent = () => {\n switch (type) {\n case 'vendors':\n return {\n icon: <Package className=\"w-full h-full\" />,\n title: \"No vendors found\",\n description: \"We couldn't find any vendors matching your criteria. Try adjusting your filters or search terms.\"\n }\n case 'posts':\n return {\n icon: <FileText className=\"w-full h-full\" />,\n title: \"No articles found\",\n description: \"We couldn't find any articles matching your criteria. Try different categories, tags, or search terms.\"\n }\n case 'search':\n return {\n icon: <Search className=\"w-full h-full\" />,\n title: \"No results found\",\n description: \"Your search didn't return any results. Try different keywords or browse our categories.\"\n }\n default:\n return {\n icon: <Search className=\"w-full h-full\" />,\n title: \"Nothing found\",\n description: \"We couldn't find what you're looking for. Try adjusting your search or filters.\"\n }\n }\n }\n\n // Smart CTA logic based on context\n const getSmartCTA = () => {\n // If custom CTA is provided, use it\n if (ctaText && onCtaClick) {\n return {\n text: ctaText,\n action: onCtaClick\n }\n }\n\n // Check if we're on the client side\n const isClient = typeof window !== 'undefined'\n const currentPath = isClient ? window.location.pathname : ''\n\n // Smart defaults based on type and context\n switch (type) {\n case 'search':\n return {\n text: \"Reset Filters\",\n action: () => {\n if (isClient) {\n // Try to reset search by clearing URL params and refreshing\n const url = new URL(window.location.href)\n url.search = ''\n router.push(url.pathname)\n }\n }\n }\n case 'posts':\n // If we're on blog/community pages, reset blog filters\n if (currentPath.includes('/blog')) {\n return {\n text: \"Reset Filters\",\n action: () => {\n if (isClient) {\n // Reset blog search and filters by clearing URL params\n const url = new URL(window.location.href)\n url.search = ''\n router.push(url.pathname)\n }\n }\n }\n } else if (currentPath.includes('/profile')) {\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n }\n return {\n text: \"View All Posts\",\n action: () => router.push('/blog')\n }\n case 'vendors':\n // If we're in profile or other pages, direct to main content\n if (currentPath.includes('/profile')) {\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n } else if (currentPath.includes('/vendors') || currentPath.includes('/margin-increase/compare')) {\n return {\n text: \"Reset Filters\",\n action: () => {\n if (isClient) {\n // Reset vendor search and filters by clearing URL params\n const url = new URL(window.location.href)\n url.search = ''\n router.push(url.pathname)\n }\n }\n }\n }\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n default:\n return {\n text: \"Browse Vendors\",\n action: () => router.push('/vendors')\n }\n }\n }\n\n const defaultContent = getDefaultContent()\n const displayTitle = title || defaultContent.title\n const displayDescription = description || defaultContent.description\n const smartCTA = getSmartCTA()\n\n return (\n <div className=\"flex flex-col items-center justify-center py-6 md:py-16 px-6 text-center\">\n {/* Icon */}\n <div className=\"mb-3 md:mb-6 flex items-center justify-center\">\n <div className=\"rounded-full bg-ods-card p-3 md:p-6 border border-ods-border\">\n <div className=\"w-8 h-8 md:w-16 md:h-16 text-ods-text-secondary flex items-center justify-center\">\n {defaultContent.icon}\n </div>\n </div>\n </div>\n\n {/* Title */}\n <h2 className=\"mb-2 md:mb-3 text-lg md:text-xl font-semibold font-['DM_Sans'] text-ods-text-primary tracking-[-0.02em]\">\n {displayTitle}\n </h2>\n\n {/* Description */}\n <p className=\"mb-4 md:mb-8 max-w-md text-sm font-medium font-['DM_Sans'] text-ods-text-secondary leading-[1.43em]\">\n {displayDescription}\n </p>\n\n {/* Smart CTA Button */}\n {showCTA && smartCTA && (\n <div className=\"w-full max-w-xs mb-3\">\n <Button\n onClick={smartCTA.action}\n className={ctaVariant === 'primary'\n ? \"w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-['DM_Sans'] font-medium\"\n : \"w-full bg-transparent border border-ods-border text-ods-text-primary hover:border-ods-accent hover:text-ods-accent transition-all duration-150 font-['DM_Sans'] font-medium\"\n }\n >\n {smartCTA.text}\n </Button>\n </div>\n )}\n\n {/* Optional Back Button */}\n {showBackButton && onGoBack && (\n <div className=\"w-full max-w-xs\">\n <Button\n onClick={onGoBack}\n variant=\"outline\"\n className=\"w-full transition-all duration-150 font-['DM_Sans'] font-medium\"\n >\n {backButtonText}\n </Button>\n </div>\n )}\n </div>\n )\n} ","'use client';\n\n/**\n * DevSectionView — the canonical chrome for ANY dev-center section\n * (Roadmap / Delivery / Releases). One component, used in BOTH:\n *\n * - tabbed `/roadmap-and-releases` (compact title mode, no `hero`)\n * - full-page `/roadmap`, `/bug-fixes-and-enhancements`, `/releases`\n * (hero mode with icon + description + back link)\n *\n * Owns: title rendering, the inline search input, the filter pill row,\n * and the URL-param wiring that connects both. The list `children`\n * receive a clean URL contract — they read `?<paramKey>=...` via\n * `useSearchParams()` and refetch on change. No duplicated controls.\n */\n\nimport type { ReactNode } from 'react';\nimport { useState, useEffect } from 'react';\nimport { useRouter, useSearchParams, usePathname } from '../../../embed-shims';\nimport { SearchInput } from '../../ui';\nimport { StatusFilterComponent } from '../../features';\nimport {\n OPENFRAME_DEV_SECTIONS,\n type OpenframeDevSectionKey,\n} from '../../../utils/dev-sections/openframe-dev-sections';\n\nexport interface DevSectionViewProps {\n /** Which section to render — drives title, search, and filter\n * config via the `OPENFRAME_DEV_SECTIONS` registry. */\n sectionKey: OpenframeDevSectionKey;\n /** When set, renders the rich page-level hero (icon + h1 + description).\n * Omit for the compact tab-context heading. */\n hero?: {\n /** Pre-rendered icon JSX. Server components render the icon themselves\n * and pass the element here — function references can't cross the\n * server→client boundary, but React elements can. */\n icon: ReactNode;\n /** Hero title. Falls back to `OPENFRAME_DEV_SECTIONS[sectionKey].hero.title`\n * when omitted, so embedders can override the (OpenFrame-specific) default\n * copy without forking the registry. */\n title?: string;\n description: string;\n };\n /** Optional slot rendered BETWEEN the hero and the search/filter\n * controls. Use this for an entry-action surface that should sit\n * above the list (e.g. the Help Center's \"Open a new ticket\" form).\n * The slot is wrapped in the same `gap-10` flex column so spacing\n * matches the surrounding chrome — callers should NOT add their\n * own top/bottom margin. Renders `null` (no DOM) when omitted. */\n preControls?: ReactNode;\n /** The page-specific list body. Reads URL params written by this\n * component (search input + filter pills). */\n children: ReactNode;\n}\n\nexport function DevSectionView({ sectionKey, hero, preControls, children }: DevSectionViewProps) {\n const section = OPENFRAME_DEV_SECTIONS[sectionKey];\n const router = useRouter();\n const pathname = usePathname();\n const searchParams = useSearchParams();\n\n const search = section.search;\n const filter = section.filter;\n\n const currentSearch = search ? searchParams.get(search.paramKey) || '' : '';\n const currentFilterValue = filter\n ? searchParams.get(filter.paramKey) || filter.defaultValue\n : '';\n\n // Controlled search-input state — input commits to the URL only on\n // Enter (not on every keystroke), preserving the legacy behavior.\n // Lazy init from URL avoids a brief flash of stale value on first\n // paint after URL-driven re-render (e.g. tab switch).\n const [searchValue, setSearchValue] = useState(() => currentSearch);\n useEffect(() => {\n setSearchValue(currentSearch);\n }, [currentSearch]);\n\n const handleSearchSubmit = (value: string) => {\n if (!search) return;\n const params = new URLSearchParams(searchParams.toString());\n if (value.trim()) params.set(search.paramKey, value.trim());\n else params.delete(search.paramKey);\n router.replace(`${pathname}?${params.toString()}`, { scroll: false });\n };\n\n const handleFilterChange = (value: string) => {\n if (!filter) return;\n const params = new URLSearchParams(searchParams.toString());\n if (value === filter.defaultValue) params.delete(filter.paramKey);\n else params.set(filter.paramKey, value);\n router.replace(`${pathname}?${params.toString()}`, { scroll: false });\n };\n\n return (\n <div className=\"w-full flex flex-col gap-10\">\n {hero ? (\n <div className=\"space-y-4\">\n <h1 className=\"text-h1 tracking-[-1.12px] text-ods-text-primary flex items-center gap-3\">\n {hero.icon}\n {hero.title ?? section.hero.title}\n </h1>\n <p className=\"font-['DM_Sans'] font-medium text-[18px] leading-[28px] text-ods-text-secondary max-w-3xl\">\n {hero.description}\n </p>\n </div>\n ) : (\n <div className=\"flex items-center justify-between w-full\">\n <h2 className=\"font-['Azeret_Mono'] font-semibold text-[32px] md:text-[40px] lg:text-[48px] leading-[40px] md:leading-[48px] lg:leading-[56px] text-ods-text-primary tracking-[-0.64px] md:tracking-[-0.8px] lg:tracking-[-0.96px]\">\n {section.hero.title}\n <span className=\"text-ods-accent\">:</span>\n </h2>\n </div>\n )}\n\n {preControls}\n\n {(search || filter) && (\n <div className=\"space-y-4\">\n {search && (\n <SearchInput\n showDropdown={false}\n placeholder={search.placeholder}\n value={searchValue}\n onChange={setSearchValue}\n onSubmit={handleSearchSubmit}\n />\n )}\n {filter && (\n <StatusFilterComponent\n selectedStatus={currentFilterValue}\n onStatusChange={handleFilterChange}\n statusOptions={[...filter.options]}\n />\n )}\n </div>\n )}\n\n {children}\n </div>\n );\n}\n","'use client';\n\n/**\n * DevSectionPage — full-page wrapper for a dev-center section\n * (`/roadmap`, `/bug-fixes-and-enhancements`, `/releases`).\n *\n * Mounts the lib's canonical `PageLayout` directly (no in-app wrapper)\n * so the back-button affordance stays in lockstep with whatever the\n * design system ships — any future lib change to BackButton / TitleBlock\n * propagates automatically.\n *\n * Composition: `PageShell` → `PageLayout` (back-to-home wired) →\n * `DevSectionView` (icon hero + search + filter pills) → list body.\n *\n * Adding a new section is one entry in `OPENFRAME_DEV_SECTIONS` plus a\n * single-line page file mounting this factory with the new key.\n */\n\nimport type { ReactNode } from 'react';\nimport { useRouter } from '../../../embed-shims/next-navigation';\nimport { PageShell, PageLayout } from '../../ui';\nimport { DevSectionView } from './dev-section-view';\nimport {\n OPENFRAME_DEV_SECTIONS,\n type OpenframeDevSectionKey,\n} from '../../../utils/dev-sections/openframe-dev-sections';\n\nconst SECTION_HERO_ICON_CLASS = 'h-10 w-10 text-ods-accent';\n\nexport interface DevSectionPageProps {\n sectionKey: OpenframeDevSectionKey;\n /** The page-specific list body (e.g. `<RoadmapList />`). */\n children: ReactNode;\n /** Optional slot rendered BETWEEN the hero and search/filter — see\n * `DevSectionView.preControls`. Used by surfaces that want an entry\n * action (e.g. Help Center's \"Open a new ticket\" form) above the\n * controls instead of below them. */\n preControls?: ReactNode;\n /** Back-button config — same shape as `LegalDocumentPage` /\n * `ReleaseDetailPage`. Pass `false` to hide entirely. Default\n * `{ label: 'Back to home', href: '/' }` — embedders whose \"home\" isn't `/`\n * should override `href`, or pass `false` if the embed has no home page. */\n backButton?: { label?: string; href?: string } | false;\n /** Override the hero title. Defaults to the (OpenFrame-specific) copy in\n * `OPENFRAME_DEV_SECTIONS[sectionKey].hero.title`. Set this to brand the\n * section for a non-OpenFrame embed. */\n title?: string;\n /** Override the hero subtitle/description. Defaults to\n * `OPENFRAME_DEV_SECTIONS[sectionKey].hero.description`. */\n subtitle?: string;\n}\n\nexport function DevSectionPage({\n sectionKey,\n children,\n preControls,\n backButton,\n title,\n subtitle,\n}: DevSectionPageProps) {\n const router = useRouter();\n const section = OPENFRAME_DEV_SECTIONS[sectionKey];\n const Icon = section.icon;\n\n // Back-button config — mirrors LegalDocumentPage / ReleaseDetailPage.\n // Default: { label: 'Back to home', href: '/' }. Pass `false` to hide.\n // After `backButton &&` narrowing, inner type is `{ label?, href? } |\n // undefined`; don't re-compare to `false` (TS2367).\n const backCfg =\n backButton === false\n ? undefined\n : {\n label: (backButton ? backButton.label : undefined) ?? 'Back to home',\n onClick: () => router.push((backButton ? backButton.href : undefined) ?? '/'),\n };\n\n return (\n <PageShell>\n <PageLayout backButton={backCfg}>\n <DevSectionView\n sectionKey={sectionKey}\n hero={{\n icon: <Icon className={SECTION_HERO_ICON_CLASS} />,\n title,\n description: subtitle ?? section.hero.description,\n }}\n preControls={preControls}\n >\n {children}\n </DevSectionView>\n </PageLayout>\n </PageShell>\n );\n}\n","'use client';\n\n/**\n * Shared row chrome for any `DevSectionPage` list (delivery, tickets,\n * future sections). One source of truth for the layout that every\n * dev-section card row uses:\n * left column → title (h3) / subtitle (h5 uppercase) / description\n * (h4 line-clamp-3), each in a fixed min-height block\n * so rows align across the grid\n * right column → caller-supplied stacked badges\n *\n * Surface stays small on purpose — `rightBadges` is a `ReactNode` so\n * the caller decides how many badges (delivery: 2, tickets: 1-2,\n * future: anything). No behavior baked in: the caller wraps the row\n * in a `<div>` (static, like delivery) or `<button>` (clickable, like\n * tickets) and renders the row content via this component.\n *\n * Pair with `DevCardRowSkeletonList` for the loading state — the\n * skeleton mirrors the same min-heights so the in-flight UI doesn't\n * shift the layout when real data lands.\n *\n * NOTE: the ticket conversation row is NOT here — it renders the shared\n * `<ChatMessageRow>` (`components/chat/chat-message-row.tsx`), the SAME\n * component the OpenMSP Slack-community feed uses, so the two surfaces stay\n * pixel-identical by construction.\n */\n\nimport type { ReactNode } from 'react';\n\nexport interface DevCardRowContentProps {\n title: string;\n /** Single-line uppercase metadata (e.g. \"UPDATED today, #4271, Code review\"). */\n subtitle: string;\n /** 3-line description block. Empty string renders the fallback. */\n description: string;\n /** Fallback copy when `description` is empty. Defaults to a generic\n * string; ticket / delivery surfaces override. */\n emptyDescription?: string;\n /** Right column — caller renders its own stacked badges. */\n rightBadges: ReactNode;\n}\n\nexport function DevCardRowContent({\n title,\n subtitle,\n description,\n emptyDescription = 'No description provided',\n rightBadges,\n}: DevCardRowContentProps) {\n return (\n <div className=\"flex flex-col md:flex-row items-start justify-between gap-[12px] md:gap-[16px] w-full\">\n <div className=\"flex-1 min-w-0 w-full md:w-auto flex flex-col gap-[12px] md:gap-[16px]\">\n <div className=\"min-h-[24px] flex items-center\">\n <h3 className=\"text-h3 text-ods-text-primary tracking-[-0.36px] flex-1 line-clamp-2 md:truncate break-words\">\n {title}\n </h3>\n </div>\n <div className=\"min-h-[20px] flex items-center\">\n <p className=\"text-h5 text-ods-text-secondary uppercase tracking-[-0.28px] truncate\">\n {subtitle}\n </p>\n </div>\n <div className=\"min-h-[72px] flex items-center\">\n <p className=\"text-h4 text-ods-text-secondary line-clamp-3 break-words\">\n {description || emptyDescription}\n </p>\n </div>\n </div>\n <div className=\"flex-shrink-0 self-start flex flex-col gap-2\">\n {rightBadges}\n </div>\n </div>\n );\n}\n\n/**\n * Skeleton rendering for a single row — the bars mirror the same\n * min-heights as `DevCardRowContent` so the loading→loaded swap\n * doesn't reflow.\n */\nexport function DevCardRowSkeleton() {\n return (\n <div className=\"border-b border-ods-border last:border-b-0 p-[12px] md:p-[16px]\">\n <div className=\"flex flex-col md:flex-row items-start justify-between gap-[12px] md:gap-[16px] w-full\">\n <div className=\"flex-1 min-w-0 w-full md:w-auto flex flex-col gap-[12px] md:gap-[16px]\">\n <div className=\"min-h-[24px] flex items-center\">\n <div className=\"h-[20px] bg-ods-border rounded animate-pulse w-full\" />\n </div>\n <div className=\"min-h-[20px] flex items-center\">\n <div className=\"h-[20px] bg-ods-border rounded animate-pulse w-1/2\" />\n </div>\n <div className=\"min-h-[72px] flex items-center\">\n <div className=\"flex-1 space-y-1\">\n <div className=\"h-[20px] bg-ods-border rounded animate-pulse w-full\" />\n <div className=\"h-[20px] bg-ods-border rounded animate-pulse w-full\" />\n <div className=\"h-[20px] bg-ods-border rounded animate-pulse w-2/3\" />\n </div>\n </div>\n </div>\n <div className=\"flex-shrink-0 self-start flex flex-col gap-2\">\n <div className=\"h-[32px] w-[100px] bg-ods-border rounded animate-pulse\" />\n <div className=\"h-[32px] w-[120px] bg-ods-border rounded animate-pulse\" />\n </div>\n </div>\n </div>\n );\n}\n\n/**\n * The standard \"5 skeleton rows inside a bordered card\" loading state\n * used by every list shell. Both delivery (`delivery-table.tsx`) and\n * tickets (`tickets-list.tsx`) mount this directly.\n */\nexport function DevCardRowSkeletonList({ rows = 5 }: { rows?: number }) {\n return (\n <div className=\"bg-ods-card border border-ods-border rounded-[6px] overflow-hidden w-full\">\n {Array.from({ length: rows }, (_, i) => (\n <DevCardRowSkeleton key={i} />\n ))}\n </div>\n );\n}\n","'use client'\n\n/**\n * `<DeliveryRow />` — canonical single-row presentation for a ClickUp\n * delivery item.\n *\n * Single source of truth: both the `/bug-fixes-and-enhancements` page\n * (via `DeliveryTable`) AND the linked-delivery card on a HubSpot ticket\n * (via `TicketLinkedDeliveryCard`) compose this primitive. Visual parity\n * across those two surfaces is the design goal — the user reads the\n * card on their ticket and recognises it as a row from the public\n * delivery list.\n *\n * Behaviors:\n * - `href` set → outer element is an `<a>`, the whole row becomes\n * clickable (used by the linked-card surface to deep-link into\n * `/bug-fixes-and-enhancements?focus=<id>`).\n * - `id` set → outer element gets that DOM id so the consuming page\n * can `scrollIntoView` to it when the URL carries `?focus=<id>`.\n * - `highlighted` true → brief accent border + background pulse\n * (`animate-flash-focus` keyframe defined in `tailwind.config.ts`).\n * - `caption` set → small uppercase label rendered above the title\n * (\"LINKED DELIVERY\" on the ticket-side variant). Omitted on the\n * standard list rendering.\n */\n\nimport * as React from 'react'\nimport Link from '../../../embed-shims/next-link'\nimport { StatusBadge } from '../../ui/status-badge'\nimport { getStatusColorScheme } from '../../../utils'\nimport {\n type DeliveryItem,\n TASK_TYPE_LABELS,\n TASK_TYPE_TEXT_COLORS,\n} from '../../../types/delivery'\nimport { cn } from '../../../utils/cn'\n\n/** Same heuristic as DeliveryTable's local helper. Inlined so the row\n * primitive owns its complete rendering contract. */\nfunction getRelativeTime(timestamp: number): string {\n const now = Date.now()\n const diff = now - timestamp\n const days = Math.floor(diff / (1000 * 60 * 60 * 24))\n const weeks = Math.floor(days / 7)\n const months = Math.floor(days / 30)\n if (months > 0) return months === 1 ? 'last month' : `${months} months ago`\n if (weeks > 0) return weeks === 1 ? 'last week' : `${weeks} weeks ago`\n if (days > 0) return days === 1 ? 'yesterday' : `${days} days ago`\n return 'today'\n}\n\nexport interface DeliveryRowProps {\n item: DeliveryItem\n /** When set, the row becomes a clickable anchor. The ticket-side\n * linked-card composes this from `buildDevSectionUrl('delivery', id)`\n * which carries `?search=<id>` — the delivery list filters to that\n * exact task on landing (canonical deep-link mechanism, same one\n * the chat-inline delivery card uses). */\n href?: string\n /** Small uppercase caption rendered above the title. Used by the\n * linked-delivery card variant (\"LINKED DELIVERY\"). */\n caption?: string\n className?: string\n}\n\nexport function DeliveryRow({\n item,\n href,\n caption,\n className,\n}: DeliveryRowProps) {\n const taskType = item.taskType as keyof typeof TASK_TYPE_LABELS\n const typeBadgeLabel = TASK_TYPE_LABELS[taskType] || 'TASK'\n const typeBadgeTextColor = TASK_TYPE_TEXT_COLORS[taskType] || ''\n const statusBadgeScheme = getStatusColorScheme(item.status)\n const relativeTime = getRelativeTime(item.dateUpdated)\n const subtitle = `ACTIVE ${relativeTime}${item.listNames.length > 0 ? `, ${item.listNames.join(', ')}` : ''}, ${item.id}`\n\n const inner = (\n <div className=\"flex flex-col md:flex-row items-start justify-between gap-[12px] md:gap-[16px] w-full\">\n {/* Left: caption (optional) + title + subtitle + description */}\n <div className=\"flex-1 min-w-0 w-full md:w-auto flex flex-col gap-[12px] md:gap-[16px]\">\n {caption && (\n <p className=\"text-xs font-medium uppercase tracking-wider text-ods-text-secondary\">\n {caption}\n </p>\n )}\n <div className=\"min-h-[24px] md:min-h-[24px] flex items-center\">\n <h3 className=\"text-h3 text-ods-text-primary tracking-[-0.36px] flex-1 line-clamp-2 md:truncate break-words\">\n {item.title}\n </h3>\n </div>\n <div className=\"min-h-[20px] flex items-center\">\n <p className=\"text-h5 text-ods-text-secondary uppercase tracking-[-0.28px] truncate\">\n {subtitle}\n </p>\n </div>\n <div className=\"min-h-[72px] flex items-center\">\n <p className=\"text-h4 text-ods-text-secondary line-clamp-3 break-words\">\n {item.description || 'No description provided'}\n </p>\n </div>\n </div>\n\n {/* Right: status + task-type badges */}\n <div className=\"flex-shrink-0 self-start flex flex-col gap-2\">\n <StatusBadge\n text={item.status.toUpperCase()}\n colorScheme={statusBadgeScheme}\n variant=\"card\"\n className=\"border border-ods-border\"\n />\n <StatusBadge\n text={typeBadgeLabel}\n variant=\"card\"\n className={`border border-ods-border ${typeBadgeTextColor}`}\n />\n </div>\n </div>\n )\n\n const baseClass = cn(\n 'block p-[12px] md:p-[16px] no-underline text-inherit transition-colors duration-150',\n href && 'hover:bg-ods-bg-hover cursor-pointer',\n className,\n )\n\n if (href) {\n // `Link` is the env-aware embed-shim — delegates to `next/link` on\n // a Next.js host (soft RSC nav, back-button restores the previous\n // page's React state intact), falls back to a plain `<a>` on\n // non-Next embedders. A raw `<a href>` was hard-navigating +\n // losing TanStack-Query state on back, leaving /tickets stuck on\n // its skeleton.\n return (\n <Link href={href} className={baseClass} prefetch={false}>\n {inner}\n </Link>\n )\n }\n\n return <div className={baseClass}>{inner}</div>\n}\n"]}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
SelectValue,
|
|
12
12
|
Textarea,
|
|
13
13
|
useChatAttachments
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-J6O57C7S.js";
|
|
15
15
|
import {
|
|
16
16
|
useContactSubmission,
|
|
17
17
|
useHumanitySignals
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-M2OCXTNT.js";
|
|
22
22
|
import {
|
|
23
23
|
SECTION_HEADING_CLASS
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-OO4ZGDRO.js";
|
|
25
25
|
import {
|
|
26
26
|
Button
|
|
27
27
|
} from "./chunk-LDEXTWMK.js";
|
|
@@ -376,4 +376,4 @@ function ContactForm({
|
|
|
376
376
|
export {
|
|
377
377
|
ContactForm
|
|
378
378
|
};
|
|
379
|
-
//# sourceMappingURL=chunk-
|
|
379
|
+
//# sourceMappingURL=chunk-XSK72QRR.js.map
|
|
@@ -40,6 +40,70 @@ function getSlackCommunityJoinUrl() {
|
|
|
40
40
|
return url;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
// src/utils/scroll-into-view.ts
|
|
44
|
+
var activeRaf = 0;
|
|
45
|
+
var teardownActive = null;
|
|
46
|
+
function cancelActiveScroll() {
|
|
47
|
+
if (activeRaf) {
|
|
48
|
+
cancelAnimationFrame(activeRaf);
|
|
49
|
+
activeRaf = 0;
|
|
50
|
+
}
|
|
51
|
+
if (teardownActive) {
|
|
52
|
+
teardownActive();
|
|
53
|
+
teardownActive = null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
var easeOutCubic = (t) => 1 - Math.pow(1 - t, 3);
|
|
57
|
+
function scrollElementIntoView(target, options = {}) {
|
|
58
|
+
if (typeof window === "undefined" || !target) return;
|
|
59
|
+
const { headerOffset = 0, behavior = "smooth", adjustTargetY, durationMs = 320 } = options;
|
|
60
|
+
const computeTarget = () => {
|
|
61
|
+
const raw = target.getBoundingClientRect().top + window.scrollY - headerOffset;
|
|
62
|
+
const adjusted = adjustTargetY ? adjustTargetY(raw) : raw;
|
|
63
|
+
const maxScroll = Math.max(
|
|
64
|
+
0,
|
|
65
|
+
document.documentElement.scrollHeight - window.innerHeight
|
|
66
|
+
);
|
|
67
|
+
return Math.min(Math.max(0, adjusted), maxScroll);
|
|
68
|
+
};
|
|
69
|
+
cancelActiveScroll();
|
|
70
|
+
const prefersReduced = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
71
|
+
if (behavior === "instant" || behavior === "auto" || prefersReduced) {
|
|
72
|
+
window.scrollTo(0, computeTarget());
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
let startY = null;
|
|
76
|
+
let startTime = 0;
|
|
77
|
+
const onUserGesture = () => cancelActiveScroll();
|
|
78
|
+
window.addEventListener("wheel", onUserGesture, { passive: true });
|
|
79
|
+
window.addEventListener("touchmove", onUserGesture, { passive: true });
|
|
80
|
+
teardownActive = () => {
|
|
81
|
+
window.removeEventListener("wheel", onUserGesture);
|
|
82
|
+
window.removeEventListener("touchmove", onUserGesture);
|
|
83
|
+
};
|
|
84
|
+
const step = (now) => {
|
|
85
|
+
if (startY === null) {
|
|
86
|
+
startY = window.scrollY;
|
|
87
|
+
startTime = now;
|
|
88
|
+
}
|
|
89
|
+
const targetY = computeTarget();
|
|
90
|
+
const t = Math.min(1, (now - startTime) / durationMs);
|
|
91
|
+
const y = startY + (targetY - startY) * easeOutCubic(t);
|
|
92
|
+
window.scrollTo(0, y);
|
|
93
|
+
if (t < 1) {
|
|
94
|
+
activeRaf = requestAnimationFrame(step);
|
|
95
|
+
} else {
|
|
96
|
+
window.scrollTo(0, computeTarget());
|
|
97
|
+
activeRaf = 0;
|
|
98
|
+
if (teardownActive) {
|
|
99
|
+
teardownActive();
|
|
100
|
+
teardownActive = null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
activeRaf = requestAnimationFrame(step);
|
|
105
|
+
}
|
|
106
|
+
|
|
43
107
|
// src/utils/suggestion-url.ts
|
|
44
108
|
function buildSuggestionUrl(path, opts = {}) {
|
|
45
109
|
const qs = new URLSearchParams();
|
|
@@ -100,5 +164,6 @@ ChevronButton.displayName = "ChevronButton";
|
|
|
100
164
|
|
|
101
165
|
|
|
102
166
|
|
|
103
|
-
|
|
104
|
-
|
|
167
|
+
|
|
168
|
+
exports.cn = cn2; exports.delay = delay; exports.generateRandomString = generateRandomString; exports.truncateString = truncateString; exports.serializeJsonLd = serializeJsonLd; exports.deepClone = deepClone; exports.getSlackCommunityJoinUrl = getSlackCommunityJoinUrl; exports.scrollElementIntoView = scrollElementIntoView; exports.buildSuggestionUrl = buildSuggestionUrl; exports.ChevronButton = ChevronButton;
|
|
169
|
+
//# sourceMappingURL=chunk-Y2B6WDU6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-Y2B6WDU6.cjs","../src/utils/common.ts","../src/utils/scroll-into-view.ts","../src/utils/suggestion-url.ts","../src/components/ui/chevron-button.tsx"],"names":["cn"],"mappings":"AAAA,2cAAY;AACZ;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACNA,4BAAsC;AACtC,+CAAwB;AAWjB,SAASA,GAAAA,CAAAA,GAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,oCAAA,wBAAQ,MAAW,CAAC,CAAA;AAC7B;AAOO,SAAS,KAAA,CAAM,EAAA,EAA2B;AAC/C,EAAA,OAAO,IAAI,OAAA,CAAQ,CAAC,OAAA,EAAA,GAAY,UAAA,CAAW,OAAA,EAAS,EAAE,CAAC,CAAA;AACzD;AAOO,SAAS,oBAAA,CAAqB,OAAA,EAAS,CAAA,EAAW;AACvD,EAAA,MAAM,MAAA,EAAQ,gEAAA;AACd,EAAA,IAAI,OAAA,EAAS,EAAA;AACb,EAAA,IAAA,CAAA,IAAS,EAAA,EAAI,CAAA,EAAG,EAAA,EAAI,MAAA,EAAQ,CAAA,EAAA,EAAK;AAC/B,IAAA,OAAA,GAAU,KAAA,CAAM,MAAA,CAAO,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,EAAA,EAAI,KAAA,CAAM,MAAM,CAAC,CAAA;AAAA,EACjE;AACA,EAAA,OAAO,MAAA;AACT;AASO,SAAS,cAAA,CAAe,GAAA,EAAa,SAAA,EAAmB,OAAA,EAAS,KAAA,EAAe;AACrF,EAAA,GAAA,CAAI,GAAA,CAAI,OAAA,GAAU,SAAA,EAAW,OAAO,GAAA;AACpC,EAAA,OAAO,GAAA,CAAI,SAAA,CAAU,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EJ,EAAA;AACF;AACA;AJiHU;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-Y2B6WDU6.cjs","sourcesContent":[null,"import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\n/**\n * Utility functions for common operations\n */\n\n/**\n * Merge class names with Tailwind CSS\n * @param inputs - Class names to merge\n * @returns Merged class names\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\n/**\n * Delay execution for a specified time\n * @param ms - Milliseconds to delay\n * @returns Promise that resolves after the delay\n */\nexport function delay(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\n/**\n * Generate a random string of specified length\n * @param length - Length of the string\n * @returns Random string\n */\nexport function generateRandomString(length = 8): string {\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\"\n let result = \"\"\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length))\n }\n return result\n}\n\n/**\n * Truncate a string to a specified length\n * @param str - String to truncate\n * @param maxLength - Maximum length\n * @param suffix - Suffix to add to truncated string\n * @returns Truncated string\n */\nexport function truncateString(str: string, maxLength: number, suffix = \"...\"): string {\n if (str.length <= maxLength) return str\n return str.substring(0, maxLength - suffix.length) + suffix\n}\n\n/**\n * Serialize a JSON-LD schema for a `<script type=\"application/ld+json\">`\n * block — THE one home of the escape rule (the hub re-exports this from\n * lib/utils/breadcrumbs). JSON.stringify does NOT HTML-escape: a stored\n * \"</script>\" inside any admin/user-entered field would terminate the tag\n * early (stored XSS). Every \"<\" becomes the JSON escape sequence\n * backslash-u003c — still valid JSON, inert in HTML.\n */\nexport function serializeJsonLd(schema: unknown): string {\n return JSON.stringify(schema).replace(/</g, \"\\\\u003c\")\n}\n\n/**\n * Deep clone an object\n * @param obj - Object to clone\n * @returns Cloned object\n */\nexport function deepClone<T>(obj: T): T {\n return JSON.parse(JSON.stringify(obj))\n}\n\n/**\n * Get the Slack community join URL from environment variables\n * @returns Slack community join URL or fallback URL\n */\nexport function getSlackCommunityJoinUrl(): string {\n const url = process.env.NEXT_PUBLIC_SLACK_COMMUNITY_JOIN_URL\n if (!url) {\n console.warn('NEXT_PUBLIC_SLACK_COMMUNITY_JOIN_URL is not defined in environment variables')\n return 'https://join.slack.com/t/openmsp/shared_invite/zt-36bl7mx0h-3~U2nFH6nqHqoTPXMaHEHA'\n }\n return url\n}\n\n","/**\n * `scrollElementIntoView` — canonical \"scroll an element to the top of the\n * viewport, account for sticky chrome, survive layout shifts\" helper.\n *\n * One shared implementation so every caller (the ticket drawer expand, the\n * hub's `useUnifiedNav` / `use-nav-link` hash scroll, doc-tree, delivery\n * `?focus=`, sticky-section-nav, …) inherits the SAME cancellation-proof\n * motion.\n *\n * WHY A SELF-DRIVEN rAF TWEEN INSTEAD OF `window.scrollTo({behavior:'smooth'})`:\n * the native smooth scroll is CANCELLABLE, and in real pages it gets cancelled\n * constantly:\n *\n * - Browser SCROLL ANCHORING: when content is inserted/removed above or\n * around the target (a collapsible drawer expanding, an async image\n * loading, a list re-rendering) the browser issues a synchronous scrollTop\n * correction to keep the anchored element stable. Per CSSOM-View \"perform a\n * scroll\" step 1 (\"abort any ongoing smooth scroll\"), that correction\n * ABORTS an in-flight native smooth scroll — so it lands as an instant jump.\n * Anchoring is suppressed when the scroll offset is 0, which is exactly why\n * a native smooth scroll appears to work the FIRST time (page at top) and\n * jumps on every repeat (page already scrolled). This was a multi-day\n * \"smooth only works once\" bug on the /tickets drawer.\n * - A second programmatic scroll on the same frame, or a `focus()` without\n * `{preventScroll:true}`, cancels it the same way.\n *\n * A tween that re-asserts the position with INSTANT writes every frame is\n * immune: there is no \"ongoing native smooth scroll\" for anchoring/focus to\n * abort, and any correction that lands between our frames is overwritten on the\n * next frame. We also RECOMPUTE the target each frame, so an element whose\n * final position is still settling (drawer still expanding, images loading)\n * is tracked to its resting place instead of animating to a stale pixel.\n *\n * Honors `prefers-reduced-motion` (jumps instantly) and cancels on genuine user\n * scroll intent (wheel / touch) so we never fight the user.\n */\n\nexport interface ScrollElementIntoViewOptions {\n /** Pixels to subtract from the target element's `top` so it lands BELOW\n * sticky chrome. Defaults to 0. Pass `96` for the standard hub header. */\n headerOffset?: number\n /** `'smooth'` (default) runs the self-driven tween; `'instant'` / `'auto'`\n * jump in one synchronous write (deep-link land, programmatic focus moves). */\n behavior?: ScrollBehavior\n /** Optional adjustment applied to the computed pixel target each frame. The\n * callback receives the \"raw\" Y (`element.top + scrollY - headerOffset`) and\n * returns the FINAL target. Use when the caller knows about a layout shift\n * (e.g. a sibling drawer collapsing) the geometry can't yet reflect. */\n adjustTargetY?: (rawTargetY: number) => number\n /** Tween duration in ms (smooth only). Default 320. */\n durationMs?: number\n}\n\n/** Module-level handle to the in-flight tween so a new call (or a user\n * gesture) cancels the previous one — only ever one page-scroll animation at\n * a time. */\nlet activeRaf = 0\nlet teardownActive: (() => void) | null = null\n\nfunction cancelActiveScroll(): void {\n if (activeRaf) {\n cancelAnimationFrame(activeRaf)\n activeRaf = 0\n }\n if (teardownActive) {\n teardownActive()\n teardownActive = null\n }\n}\n\nconst easeOutCubic = (t: number): number => 1 - Math.pow(1 - t, 3)\n\n/**\n * Scroll the page so `target` lands at the top of the viewport (below sticky\n * chrome via `headerOffset`). SSR-safe; `null`/`undefined` target is a no-op so\n * callers can pass refs without defensive branching.\n */\nexport function scrollElementIntoView(\n target: HTMLElement | null | undefined,\n options: ScrollElementIntoViewOptions = {},\n): void {\n if (typeof window === 'undefined' || !target) return\n const { headerOffset = 0, behavior = 'smooth', adjustTargetY, durationMs = 320 } = options\n\n // Target is recomputed every frame: the row's absolute position can move as\n // the page reflows (a sibling drawer collapsing) and the reachable max grows\n // as the just-opened drawer expands. Clamp to the LIVE max each frame.\n const computeTarget = (): number => {\n const raw = target.getBoundingClientRect().top + window.scrollY - headerOffset\n const adjusted = adjustTargetY ? adjustTargetY(raw) : raw\n const maxScroll = Math.max(\n 0,\n document.documentElement.scrollHeight - window.innerHeight,\n )\n return Math.min(Math.max(0, adjusted), maxScroll)\n }\n\n // Any prior animation loses — one page scroll at a time.\n cancelActiveScroll()\n\n const prefersReduced =\n typeof window.matchMedia === 'function' &&\n window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\n // Instant paths: a single synchronous write. No tween, no anchoring race.\n if (behavior === 'instant' || behavior === 'auto' || prefersReduced) {\n window.scrollTo(0, computeTarget())\n return\n }\n\n // Smooth: self-driven tween with instant per-frame writes (anchoring-proof).\n let startY: number | null = null\n let startTime = 0\n\n // Bail the moment the user takes over with a real scroll gesture — we must\n // never fight them. (Not keydown: the ticket composer auto-focuses on open,\n // and typing there should not abort the scroll.)\n const onUserGesture = () => cancelActiveScroll()\n window.addEventListener('wheel', onUserGesture, { passive: true })\n window.addEventListener('touchmove', onUserGesture, { passive: true })\n teardownActive = () => {\n window.removeEventListener('wheel', onUserGesture)\n window.removeEventListener('touchmove', onUserGesture)\n }\n\n const step = (now: number) => {\n if (startY === null) {\n startY = window.scrollY\n startTime = now\n }\n const targetY = computeTarget()\n const t = Math.min(1, (now - startTime) / durationMs)\n const y = startY + (targetY - startY) * easeOutCubic(t)\n window.scrollTo(0, y)\n if (t < 1) {\n activeRaf = requestAnimationFrame(step)\n } else {\n // Final exact write in case easing left a sub-pixel gap, then teardown.\n window.scrollTo(0, computeTarget())\n activeRaf = 0\n if (teardownActive) {\n teardownActive()\n teardownActive = null\n }\n }\n }\n activeRaf = requestAnimationFrame(step)\n}\n","/**\n * Shared fetch-URL composer for the two suggestion sections (FaqSection +\n * RelatedContentSection) — ONE owner of the entityType/entityId/count query\n * shape so the sections can never drift. Pure + server-safe.\n *\n * Byte-parity contract with the original `buildFaqsUrl`: when only\n * entityType/entityId are set, the param order is `entityType`, `entityId`;\n * with nothing set, the bare `path` is returned (no `?`).\n */\nexport interface SuggestionUrlOptions {\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin relative). */\n apiBaseUrl?: string\n /** Both required together for entity scope; partial → bare path. */\n entityType?: string\n entityId?: number | string\n /** Maps to the server's `count` param. Undefined → param not sent\n * (server default applies). */\n count?: number\n /** Extra query params appended after the shared trio (e.g. the\n * related-content `excludeTypes` deny-list). Empty/undefined values\n * are skipped. */\n extraParams?: Record<string, string | undefined>\n}\n\nexport function buildSuggestionUrl(path: string, opts: SuggestionUrlOptions = {}): string {\n const qs = new URLSearchParams()\n const { entityType, entityId } = opts\n if (entityType && entityId !== undefined && entityId !== null && entityId !== '') {\n qs.set('entityType', entityType)\n qs.set('entityId', String(entityId))\n }\n if (opts.count !== undefined) qs.set('count', String(opts.count))\n for (const [key, value] of Object.entries(opts.extraParams ?? {})) {\n if (value !== undefined && value !== '') qs.set(key, value)\n }\n const query = qs.toString()\n return `${opts.apiBaseUrl ?? ''}${path}${query ? `?${query}` : ''}`\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { ChevronUp, ChevronDown } from \"lucide-react\"\nimport { cn } from \"../../utils/cn\"\n\ninterface ChevronButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n direction?: 'up' | 'down';\n size?: 'sm' | 'md' | 'lg';\n isExpanded?: boolean;\n backgroundColor?: string;\n borderColor?: string;\n}\n\nconst ChevronButton = React.forwardRef<HTMLButtonElement, ChevronButtonProps>(\n ({ className, direction = 'down', size = 'md', isExpanded, backgroundColor, borderColor, ...props }, ref) => {\n const Icon = (isExpanded ? ChevronUp : ChevronDown) || (direction === 'up' ? ChevronUp : ChevronDown);\n const sizeClasses = {\n sm: 'h-4 w-4',\n md: 'h-5 w-5', \n lg: 'h-6 w-6'\n };\n\n return (\n <button\n className={cn(\n \"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n \"h-10 px-4 py-2\",\n className\n )}\n style={{\n backgroundColor: backgroundColor,\n borderColor: borderColor\n }}\n ref={ref}\n {...props}\n >\n <Icon className={sizeClasses[size]} />\n </button>\n )\n }\n)\nChevronButton.displayName = \"ChevronButton\"\n\nexport { ChevronButton }"]}
|