@semiont/react-ui 0.4.12 → 0.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +12 -5
- package/dist/index.mjs +60 -69
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Toolbar.tsx +13 -13
- package/src/components/navigation/Footer.tsx +34 -37
- package/src/components/navigation/__tests__/Footer.test.tsx +0 -33
- package/src/components/resource/panels/CollaborationPanel.tsx +9 -1
- package/src/features/auth/__tests__/SignInForm.a11y.test.tsx +12 -33
- package/src/features/auth/components/SignInForm.tsx +0 -13
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +7 -0
- package/src/styles/patterns/panels-base.css +12 -0
package/dist/index.d.mts
CHANGED
|
@@ -762,6 +762,7 @@ declare function useHealth(): {
|
|
|
762
762
|
};
|
|
763
763
|
message: string;
|
|
764
764
|
authenticatedAs?: string;
|
|
765
|
+
projectName?: string;
|
|
765
766
|
}, Error>;
|
|
766
767
|
};
|
|
767
768
|
};
|
|
@@ -2293,8 +2294,9 @@ interface Props$3 {
|
|
|
2293
2294
|
isConnected: boolean;
|
|
2294
2295
|
eventCount: number;
|
|
2295
2296
|
lastEventTimestamp?: string;
|
|
2297
|
+
knowledgeBaseName?: string;
|
|
2296
2298
|
}
|
|
2297
|
-
declare function CollaborationPanel({ isConnected, eventCount, lastEventTimestamp }: Props$3): react_jsx_runtime.JSX.Element;
|
|
2299
|
+
declare function CollaborationPanel({ isConnected, eventCount, lastEventTimestamp, knowledgeBaseName }: Props$3): react_jsx_runtime.JSX.Element;
|
|
2298
2300
|
|
|
2299
2301
|
type Annotation$9 = components['schemas']['Annotation'];
|
|
2300
2302
|
interface CommentEntryProps {
|
|
@@ -2608,10 +2610,11 @@ interface FooterProps {
|
|
|
2608
2610
|
onClose: () => void;
|
|
2609
2611
|
}>;
|
|
2610
2612
|
onOpenKeyboardHelp?: () => void;
|
|
2611
|
-
apiDocsUrl?: string;
|
|
2612
2613
|
sourceCodeUrl?: string;
|
|
2614
|
+
/** Show About, Privacy Policy, Terms of Service, Cookie Preferences links. False for desktop apps. */
|
|
2615
|
+
showPolicyLinks?: boolean;
|
|
2613
2616
|
}
|
|
2614
|
-
declare function Footer({ Link, routes, t, CookiePreferences, onOpenKeyboardHelp,
|
|
2617
|
+
declare function Footer({ Link, routes, t, CookiePreferences, onOpenKeyboardHelp, sourceCodeUrl, showPolicyLinks, }: FooterProps): react_jsx_runtime.JSX.Element;
|
|
2615
2618
|
|
|
2616
2619
|
type TranslateFn$2 = (key: string, params?: Record<string, any>) => string;
|
|
2617
2620
|
interface NavigationMenuProps {
|
|
@@ -3677,7 +3680,7 @@ interface SignInFormProps {
|
|
|
3677
3680
|
* When backendUrl is provided (re-auth to known workspace) the URL field is locked.
|
|
3678
3681
|
* When backendUrl is omitted (new connection) the user enters the URL themselves.
|
|
3679
3682
|
*/
|
|
3680
|
-
declare function SignInForm({ onGoogleSignIn, onCredentialsSignIn, backendUrl, error, showCredentialsAuth, isLoading,
|
|
3683
|
+
declare function SignInForm({ onGoogleSignIn, onCredentialsSignIn, backendUrl, error, showCredentialsAuth, isLoading, translations: t, }: SignInFormProps): react_jsx_runtime.JSX.Element;
|
|
3681
3684
|
|
|
3682
3685
|
interface SignUpFormProps {
|
|
3683
3686
|
/**
|
|
@@ -4008,6 +4011,10 @@ interface ResourceViewerPageProps {
|
|
|
4008
4011
|
* SSE attention stream connection status for the active workspace
|
|
4009
4012
|
*/
|
|
4010
4013
|
streamStatus: StreamStatus;
|
|
4014
|
+
/**
|
|
4015
|
+
* Name of the active knowledge base (for display in panels)
|
|
4016
|
+
*/
|
|
4017
|
+
knowledgeBaseName?: string | undefined;
|
|
4011
4018
|
}
|
|
4012
4019
|
/**
|
|
4013
4020
|
* ResourceViewerPage - Main component
|
|
@@ -4036,7 +4043,7 @@ interface ResourceViewerPageProps {
|
|
|
4036
4043
|
* @subscribes browse:reference-navigate - Navigate to a referenced document
|
|
4037
4044
|
* @subscribes browse:entity-type-clicked - Navigate filtered by entity type
|
|
4038
4045
|
*/
|
|
4039
|
-
declare function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanels, refetchDocument, streamStatus, }: ResourceViewerPageProps): react_jsx_runtime.JSX.Element;
|
|
4046
|
+
declare function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanels, refetchDocument, streamStatus, knowledgeBaseName, }: ResourceViewerPageProps): react_jsx_runtime.JSX.Element;
|
|
4040
4047
|
|
|
4041
4048
|
/**
|
|
4042
4049
|
* useBeckonFlow — Annotation attention / pointer coordination hook
|
package/dist/index.mjs
CHANGED
|
@@ -27220,19 +27220,6 @@ function Toolbar({
|
|
|
27220
27220
|
children: /* @__PURE__ */ jsx12("span", { className: "semiont-toolbar-icon", "aria-hidden": "true", children: "\u{1F4D2}" })
|
|
27221
27221
|
}
|
|
27222
27222
|
),
|
|
27223
|
-
/* @__PURE__ */ jsx12(
|
|
27224
|
-
"button",
|
|
27225
|
-
{
|
|
27226
|
-
onClick: () => handlePanelToggle("collaboration"),
|
|
27227
|
-
className: "semiont-toolbar-button",
|
|
27228
|
-
"data-active": activePanel === "collaboration",
|
|
27229
|
-
"data-panel": "collaboration",
|
|
27230
|
-
"aria-label": t12("collaboration"),
|
|
27231
|
-
"aria-pressed": activePanel === "collaboration",
|
|
27232
|
-
title: t12("collaboration"),
|
|
27233
|
-
children: /* @__PURE__ */ jsx12("span", { className: "semiont-toolbar-icon", "aria-hidden": "true", children: "\u{1F465}" })
|
|
27234
|
-
}
|
|
27235
|
-
),
|
|
27236
27223
|
/* @__PURE__ */ jsx12(
|
|
27237
27224
|
"button",
|
|
27238
27225
|
{
|
|
@@ -27245,6 +27232,19 @@ function Toolbar({
|
|
|
27245
27232
|
title: "JSON-LD",
|
|
27246
27233
|
children: /* @__PURE__ */ jsx12("span", { className: "semiont-toolbar-icon", "aria-hidden": "true", children: "\u{1F310}" })
|
|
27247
27234
|
}
|
|
27235
|
+
),
|
|
27236
|
+
/* @__PURE__ */ jsx12(
|
|
27237
|
+
"button",
|
|
27238
|
+
{
|
|
27239
|
+
onClick: () => handlePanelToggle("collaboration"),
|
|
27240
|
+
className: "semiont-toolbar-button",
|
|
27241
|
+
"data-active": activePanel === "collaboration",
|
|
27242
|
+
"data-panel": "collaboration",
|
|
27243
|
+
"aria-label": t12("collaboration"),
|
|
27244
|
+
"aria-pressed": activePanel === "collaboration",
|
|
27245
|
+
title: t12("collaboration"),
|
|
27246
|
+
children: /* @__PURE__ */ jsx12("span", { className: "semiont-toolbar-icon", "aria-hidden": "true", children: "\u{1F465}" })
|
|
27247
|
+
}
|
|
27248
27248
|
)
|
|
27249
27249
|
] }),
|
|
27250
27250
|
/* @__PURE__ */ jsx12(
|
|
@@ -46682,7 +46682,8 @@ import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
|
46682
46682
|
function CollaborationPanel({
|
|
46683
46683
|
isConnected,
|
|
46684
46684
|
eventCount,
|
|
46685
|
-
lastEventTimestamp
|
|
46685
|
+
lastEventTimestamp,
|
|
46686
|
+
knowledgeBaseName
|
|
46686
46687
|
}) {
|
|
46687
46688
|
const t12 = useTranslations("CollaborationPanel");
|
|
46688
46689
|
let lastSyncText;
|
|
@@ -46713,6 +46714,7 @@ function CollaborationPanel({
|
|
|
46713
46714
|
}
|
|
46714
46715
|
return /* @__PURE__ */ jsxs23("div", { className: "semiont-collaboration-panel", children: [
|
|
46715
46716
|
/* @__PURE__ */ jsx32("h3", { className: "semiont-collaboration-panel__title", children: t12("title") }),
|
|
46717
|
+
knowledgeBaseName && /* @__PURE__ */ jsx32("div", { style: { padding: "0 0.75rem 0.5rem", fontSize: "0.8rem", color: "var(--semiont-color-neutral-400)" }, children: knowledgeBaseName }),
|
|
46716
46718
|
/* @__PURE__ */ jsxs23("div", { className: "semiont-collaboration-panel__section", children: [
|
|
46717
46719
|
/* @__PURE__ */ jsx32("h3", { className: "semiont-collaboration-panel__heading", children: t12("connectionStatus") }),
|
|
46718
46720
|
/* @__PURE__ */ jsxs23("div", { className: "semiont-collaboration-panel__status", children: [
|
|
@@ -48598,38 +48600,48 @@ function Footer({
|
|
|
48598
48600
|
t: t12,
|
|
48599
48601
|
CookiePreferences,
|
|
48600
48602
|
onOpenKeyboardHelp,
|
|
48601
|
-
|
|
48602
|
-
|
|
48603
|
+
sourceCodeUrl = "https://github.com/The-AI-Alliance/semiont",
|
|
48604
|
+
showPolicyLinks = true
|
|
48603
48605
|
}) {
|
|
48604
48606
|
const [showCookiePreferences, setShowCookiePreferences] = useState27(false);
|
|
48605
48607
|
return /* @__PURE__ */ jsxs36(Fragment9, { children: [
|
|
48606
48608
|
/* @__PURE__ */ jsx44("footer", { role: "contentinfo", className: "semiont-footer", children: /* @__PURE__ */ jsx44("div", { className: "semiont-footer__container", children: /* @__PURE__ */ jsxs36("div", { className: "semiont-footer__content", children: [
|
|
48607
48609
|
/* @__PURE__ */ jsx44("div", { className: "semiont-footer__copyright", children: t12("copyright", { year: (/* @__PURE__ */ new Date()).getFullYear() }) }),
|
|
48608
48610
|
/* @__PURE__ */ jsxs36("div", { className: "semiont-footer__links", children: [
|
|
48609
|
-
/* @__PURE__ */
|
|
48610
|
-
|
|
48611
|
-
|
|
48612
|
-
|
|
48613
|
-
|
|
48614
|
-
|
|
48615
|
-
|
|
48616
|
-
|
|
48617
|
-
|
|
48618
|
-
|
|
48619
|
-
|
|
48620
|
-
|
|
48621
|
-
|
|
48622
|
-
|
|
48623
|
-
|
|
48624
|
-
|
|
48625
|
-
|
|
48626
|
-
|
|
48627
|
-
|
|
48628
|
-
|
|
48629
|
-
|
|
48630
|
-
|
|
48631
|
-
|
|
48632
|
-
|
|
48611
|
+
showPolicyLinks && /* @__PURE__ */ jsxs36(Fragment9, { children: [
|
|
48612
|
+
/* @__PURE__ */ jsx44(
|
|
48613
|
+
Link,
|
|
48614
|
+
{
|
|
48615
|
+
href: routes.about?.() || "/about",
|
|
48616
|
+
className: "semiont-footer__link",
|
|
48617
|
+
children: t12("about")
|
|
48618
|
+
}
|
|
48619
|
+
),
|
|
48620
|
+
/* @__PURE__ */ jsx44(
|
|
48621
|
+
Link,
|
|
48622
|
+
{
|
|
48623
|
+
href: routes.privacy?.() || "/privacy",
|
|
48624
|
+
className: "semiont-footer__link",
|
|
48625
|
+
children: t12("privacyPolicy")
|
|
48626
|
+
}
|
|
48627
|
+
),
|
|
48628
|
+
CookiePreferences && /* @__PURE__ */ jsx44(
|
|
48629
|
+
"button",
|
|
48630
|
+
{
|
|
48631
|
+
onClick: () => setShowCookiePreferences(true),
|
|
48632
|
+
className: "semiont-footer__link",
|
|
48633
|
+
children: t12("cookiePreferences")
|
|
48634
|
+
}
|
|
48635
|
+
),
|
|
48636
|
+
/* @__PURE__ */ jsx44(
|
|
48637
|
+
Link,
|
|
48638
|
+
{
|
|
48639
|
+
href: routes.terms?.() || "/terms",
|
|
48640
|
+
className: "semiont-footer__link",
|
|
48641
|
+
children: t12("termsOfService")
|
|
48642
|
+
}
|
|
48643
|
+
)
|
|
48644
|
+
] }),
|
|
48633
48645
|
onOpenKeyboardHelp && /* @__PURE__ */ jsxs36(
|
|
48634
48646
|
"button",
|
|
48635
48647
|
{
|
|
@@ -48641,24 +48653,6 @@ function Footer({
|
|
|
48641
48653
|
]
|
|
48642
48654
|
}
|
|
48643
48655
|
),
|
|
48644
|
-
/* @__PURE__ */ jsx44(
|
|
48645
|
-
Link,
|
|
48646
|
-
{
|
|
48647
|
-
href: routes.terms?.() || "/terms",
|
|
48648
|
-
className: "semiont-footer__link",
|
|
48649
|
-
children: t12("termsOfService")
|
|
48650
|
-
}
|
|
48651
|
-
),
|
|
48652
|
-
/* @__PURE__ */ jsx44(
|
|
48653
|
-
"a",
|
|
48654
|
-
{
|
|
48655
|
-
href: apiDocsUrl,
|
|
48656
|
-
target: "_blank",
|
|
48657
|
-
rel: "noopener noreferrer",
|
|
48658
|
-
className: "semiont-footer__link",
|
|
48659
|
-
children: t12("apiDocs")
|
|
48660
|
-
}
|
|
48661
|
-
),
|
|
48662
48656
|
/* @__PURE__ */ jsx44(
|
|
48663
48657
|
"a",
|
|
48664
48658
|
{
|
|
@@ -48671,7 +48665,7 @@ function Footer({
|
|
|
48671
48665
|
)
|
|
48672
48666
|
] })
|
|
48673
48667
|
] }) }) }),
|
|
48674
|
-
CookiePreferences && /* @__PURE__ */ jsx44(
|
|
48668
|
+
showPolicyLinks && CookiePreferences && /* @__PURE__ */ jsx44(
|
|
48675
48669
|
CookiePreferences,
|
|
48676
48670
|
{
|
|
48677
48671
|
isOpen: showCookiePreferences,
|
|
@@ -55735,7 +55729,8 @@ function usePanelBrowse() {
|
|
|
55735
55729
|
const [activePanel, setActivePanel] = useState41(() => {
|
|
55736
55730
|
if (typeof window !== "undefined") {
|
|
55737
55731
|
const saved = localStorage.getItem("activeToolbarPanel");
|
|
55738
|
-
|
|
55732
|
+
if (saved) return saved;
|
|
55733
|
+
return "knowledge-base";
|
|
55739
55734
|
}
|
|
55740
55735
|
return null;
|
|
55741
55736
|
});
|
|
@@ -56741,7 +56736,6 @@ function SignInForm({
|
|
|
56741
56736
|
error,
|
|
56742
56737
|
showCredentialsAuth = false,
|
|
56743
56738
|
isLoading = false,
|
|
56744
|
-
Link,
|
|
56745
56739
|
translations: t12
|
|
56746
56740
|
}) {
|
|
56747
56741
|
const handleGoogleClick = () => {
|
|
@@ -56771,12 +56765,7 @@ function SignInForm({
|
|
|
56771
56765
|
t12.continueWithGoogle
|
|
56772
56766
|
] }),
|
|
56773
56767
|
/* @__PURE__ */ jsx79("div", { className: "semiont-auth__info", children: showCredentialsAuth ? t12.credentialsAuthEnabled : t12.approvedDomainsOnly })
|
|
56774
|
-
] }) : /* @__PURE__ */ jsx79("div", { className: "semiont-auth__loading", "aria-busy": "true", "aria-live": "polite", children: /* @__PURE__ */ jsx79("div", { style: { height: "200px" } }) }) })
|
|
56775
|
-
/* @__PURE__ */ jsxs68("div", { className: "semiont-auth__links", children: [
|
|
56776
|
-
/* @__PURE__ */ jsx79(Link, { href: "/", className: buttonStyles.secondary.base, children: t12.backToHome }),
|
|
56777
|
-
/* @__PURE__ */ jsx79(Link, { href: "/about", className: buttonStyles.secondary.base, children: t12.learnMore }),
|
|
56778
|
-
/* @__PURE__ */ jsx79(Link, { href: "/auth/signup", className: buttonStyles.primary.base, children: t12.signUpInstead })
|
|
56779
|
-
] })
|
|
56768
|
+
] }) : /* @__PURE__ */ jsx79("div", { className: "semiont-auth__loading", "aria-busy": "true", "aria-live": "polite", children: /* @__PURE__ */ jsx79("div", { style: { height: "200px" } }) }) })
|
|
56780
56769
|
] }) }) });
|
|
56781
56770
|
}
|
|
56782
56771
|
|
|
@@ -58211,7 +58200,8 @@ function ResourceViewerPage({
|
|
|
58211
58200
|
routes,
|
|
58212
58201
|
ToolbarPanels,
|
|
58213
58202
|
refetchDocument,
|
|
58214
|
-
streamStatus
|
|
58203
|
+
streamStatus,
|
|
58204
|
+
knowledgeBaseName
|
|
58215
58205
|
}) {
|
|
58216
58206
|
const tw = useTranslations("ReferenceWizard");
|
|
58217
58207
|
const eventBus = useEventBus();
|
|
@@ -58582,7 +58572,8 @@ function ResourceViewerPage({
|
|
|
58582
58572
|
CollaborationPanel,
|
|
58583
58573
|
{
|
|
58584
58574
|
isConnected: streamStatus === "connected",
|
|
58585
|
-
eventCount: 0
|
|
58575
|
+
eventCount: 0,
|
|
58576
|
+
knowledgeBaseName
|
|
58586
58577
|
}
|
|
58587
58578
|
),
|
|
58588
58579
|
activePanel === "jsonld" && /* @__PURE__ */ jsx89(JsonLdPanel, { resource })
|