@semiont/cli 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/cli.mjs +518 -67
- package/dist/dashboard/dashboard.css +1 -1
- package/dist/dashboard/dashboard.css.map +2 -2
- package/dist/frontend/dist/assets/CookiePreferences-Cbur0STI.js +2 -0
- package/dist/frontend/dist/assets/CookiePreferences-Cbur0STI.js.map +1 -0
- package/dist/frontend/dist/assets/{PdfAnnotationCanvas.client-CW6SKH2U-CjRY6TID.js → PdfAnnotationCanvas.client-CW6SKH2U-DIkAGn7X.js} +2 -2
- package/dist/frontend/dist/assets/{PdfAnnotationCanvas.client-CW6SKH2U-CjRY6TID.js.map → PdfAnnotationCanvas.client-CW6SKH2U-DIkAGn7X.js.map} +1 -1
- package/dist/frontend/dist/assets/ToolbarPanels-rN1MIRTV.js +2 -0
- package/dist/frontend/dist/assets/ToolbarPanels-rN1MIRTV.js.map +1 -0
- package/dist/frontend/dist/assets/XMarkIcon-6m9KVFaj.js +2 -0
- package/dist/frontend/dist/assets/XMarkIcon-6m9KVFaj.js.map +1 -0
- package/dist/frontend/dist/assets/client-BPbsU2tc.js +2 -0
- package/dist/frontend/dist/assets/{client-DZ-DNAU-.js.map → client-BPbsU2tc.js.map} +1 -1
- package/dist/frontend/dist/assets/client-BiL3eI7d.js +2 -0
- package/dist/frontend/dist/assets/{client-BbPyO59A.js.map → client-BiL3eI7d.js.map} +1 -1
- package/dist/frontend/dist/assets/client-BnL1es01.js +2 -0
- package/dist/frontend/dist/assets/{client-BsHptwGn.js.map → client-BnL1es01.js.map} +1 -1
- package/dist/frontend/dist/assets/client-DrQUcCJy.js +2 -0
- package/dist/frontend/dist/assets/{client-COY1ucYF.js.map → client-DrQUcCJy.js.map} +1 -1
- package/dist/frontend/dist/assets/en-IUV4ZXKH-BY1RKeLS.js +135 -0
- package/dist/frontend/dist/assets/en-IUV4ZXKH-BY1RKeLS.js.map +1 -0
- package/dist/frontend/dist/assets/{index-CwQxZp6g.css → index-CNb3PHS7.css} +1 -1
- package/dist/frontend/dist/assets/{index-DKq_l4UW.js → index-DA31r_0s.js} +3 -3
- package/dist/frontend/dist/assets/{index-DKq_l4UW.js.map → index-DA31r_0s.js.map} +1 -1
- package/dist/frontend/dist/assets/layout-B8IinUdt.js +2 -0
- package/dist/frontend/dist/assets/layout-B8IinUdt.js.map +1 -0
- package/dist/frontend/dist/assets/layout-BjpW078f.js +2 -0
- package/dist/frontend/dist/assets/layout-BjpW078f.js.map +1 -0
- package/dist/frontend/dist/assets/{layout-6uvM-QPR.js → layout-CDIjxs5a.js} +4 -4
- package/dist/frontend/dist/assets/layout-CDIjxs5a.js.map +1 -0
- package/dist/frontend/dist/assets/layout-DKm9XdRr.js +2 -0
- package/dist/frontend/dist/assets/{layout-D5Pjl6Q-.js.map → layout-DKm9XdRr.js.map} +1 -1
- package/dist/frontend/dist/assets/{not-found-CudKZDad.js → not-found-CwWw1pZc.js} +2 -2
- package/dist/frontend/dist/assets/{not-found-CudKZDad.js.map → not-found-CwWw1pZc.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-Bz2r7ufy.js → page-1BwlyTUj.js} +2 -2
- package/dist/frontend/dist/assets/{page-Bz2r7ufy.js.map → page-1BwlyTUj.js.map} +1 -1
- package/dist/frontend/dist/assets/page-BQ00VxR5.js +2 -0
- package/dist/frontend/dist/assets/page-BQ00VxR5.js.map +1 -0
- package/dist/frontend/dist/assets/page-BmHLf-7O.js +2 -0
- package/dist/frontend/dist/assets/{page-ESjXBvXd.js.map → page-BmHLf-7O.js.map} +1 -1
- package/dist/frontend/dist/assets/page-C5bIvv1V.js +2 -0
- package/dist/frontend/dist/assets/{page-CJFp0ZpS.js.map → page-C5bIvv1V.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-4gaXuuoi.js → page-CelRTchO.js} +3 -3
- package/dist/frontend/dist/assets/{page-4gaXuuoi.js.map → page-CelRTchO.js.map} +1 -1
- package/dist/frontend/dist/assets/page-Cf9cnqhC.js +2 -0
- package/dist/frontend/dist/assets/{page-uukho-t7.js.map → page-Cf9cnqhC.js.map} +1 -1
- package/dist/frontend/dist/assets/page-CslYhbgz.js +2 -0
- package/dist/frontend/dist/assets/{page-DK5bpgp9.js.map → page-CslYhbgz.js.map} +1 -1
- package/dist/frontend/dist/assets/page-DEjlNEY0.js +2 -0
- package/dist/frontend/dist/assets/{page-DIv5j5nE.js.map → page-DEjlNEY0.js.map} +1 -1
- package/dist/frontend/dist/assets/page-DLtwpo78.js +2 -0
- package/dist/frontend/dist/assets/{page-CGEmB0mm.js.map → page-DLtwpo78.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-CE8hOJlL.js → page-D_nHe9FT.js} +2 -2
- package/dist/frontend/dist/assets/{page-CE8hOJlL.js.map → page-D_nHe9FT.js.map} +1 -1
- package/dist/frontend/dist/assets/page-Deep7E5d.js +2 -0
- package/dist/frontend/dist/assets/{page-DVRMfAkS.js.map → page-Deep7E5d.js.map} +1 -1
- package/dist/frontend/dist/assets/{page-C44nBk5U.js → page-Dv386AZD.js} +3 -3
- package/dist/frontend/dist/assets/{page-C44nBk5U.js.map → page-Dv386AZD.js.map} +1 -1
- package/dist/frontend/dist/assets/page-E99MPOn5.js +8 -0
- package/dist/frontend/dist/assets/{page-tb55k9Ji.js.map → page-E99MPOn5.js.map} +1 -1
- package/dist/frontend/dist/assets/page-KtkB4tEv.js +2 -0
- package/dist/frontend/dist/assets/{page-vzoIwpsS.js.map → page-KtkB4tEv.js.map} +1 -1
- package/dist/frontend/dist/assets/page-ZBwMTeR-.js +2 -0
- package/dist/frontend/dist/assets/page-ZBwMTeR-.js.map +1 -0
- package/dist/frontend/dist/assets/page-Zq6ARIvg.js +2 -0
- package/dist/frontend/dist/assets/{page-DjkPUxlb.js.map → page-Zq6ARIvg.js.map} +1 -1
- package/dist/frontend/dist/assets/page-iSL5E639.js +2 -0
- package/dist/frontend/dist/assets/page-iSL5E639.js.map +1 -0
- package/dist/frontend/dist/assets/page-xdXYx3nl.js +2 -0
- package/dist/frontend/dist/assets/{page-B9hPrBrN.js.map → page-xdXYx3nl.js.map} +1 -1
- package/dist/frontend/dist/assets/{privacy-W9SxWfL5.js → privacy-DO1oxJpM.js} +2 -2
- package/dist/frontend/dist/assets/{privacy-W9SxWfL5.js.map → privacy-DO1oxJpM.js.map} +1 -1
- package/dist/frontend/dist/assets/routing-DMdXWYXo.js +2 -0
- package/dist/frontend/dist/assets/{routing-BLuuVVPN.js.map → routing-DMdXWYXo.js.map} +1 -1
- package/dist/frontend/dist/assets/{routing-6lnx-g5H.js → routing-tJ_HbFRP.js} +2 -2
- package/dist/frontend/dist/assets/{routing-6lnx-g5H.js.map → routing-tJ_HbFRP.js.map} +1 -1
- package/dist/frontend/dist/assets/useAuth-yUx5lBP5.js +2 -0
- package/dist/frontend/dist/assets/useAuth-yUx5lBP5.js.map +1 -0
- package/dist/frontend/dist/index.html +2 -2
- package/dist/frontend/dist/messages/ar.json +29 -7
- package/dist/frontend/dist/messages/bn.json +29 -7
- package/dist/frontend/dist/messages/cs.json +29 -7
- package/dist/frontend/dist/messages/da.json +29 -7
- package/dist/frontend/dist/messages/de.json +29 -7
- package/dist/frontend/dist/messages/el.json +29 -7
- package/dist/frontend/dist/messages/en.json +29 -7
- package/dist/frontend/dist/messages/es.json +29 -7
- package/dist/frontend/dist/messages/fa.json +29 -7
- package/dist/frontend/dist/messages/fi.json +29 -7
- package/dist/frontend/dist/messages/fr.json +29 -7
- package/dist/frontend/dist/messages/he.json +29 -7
- package/dist/frontend/dist/messages/hi.json +29 -7
- package/dist/frontend/dist/messages/id.json +29 -7
- package/dist/frontend/dist/messages/it.json +29 -7
- package/dist/frontend/dist/messages/ja.json +29 -7
- package/dist/frontend/dist/messages/ko.json +29 -7
- package/dist/frontend/dist/messages/ms.json +29 -7
- package/dist/frontend/dist/messages/nl.json +29 -7
- package/dist/frontend/dist/messages/no.json +29 -7
- package/dist/frontend/dist/messages/pl.json +29 -7
- package/dist/frontend/dist/messages/pt.json +29 -7
- package/dist/frontend/dist/messages/ro.json +29 -7
- package/dist/frontend/dist/messages/sv.json +29 -7
- package/dist/frontend/dist/messages/th.json +29 -7
- package/dist/frontend/dist/messages/tr.json +29 -7
- package/dist/frontend/dist/messages/uk.json +29 -7
- package/dist/frontend/dist/messages/vi.json +29 -7
- package/dist/frontend/dist/messages/zh.json +29 -7
- package/dist/frontend/package.json +1 -1
- package/package.json +8 -8
- package/dist/frontend/dist/assets/AuthContext-CUx-cP7W.js +0 -2
- package/dist/frontend/dist/assets/AuthContext-CUx-cP7W.js.map +0 -1
- package/dist/frontend/dist/assets/CookiePreferences-BuRvkBwM.js +0 -2
- package/dist/frontend/dist/assets/CookiePreferences-BuRvkBwM.js.map +0 -1
- package/dist/frontend/dist/assets/KnowledgeBaseContext-CgnF8K-_.js +0 -2
- package/dist/frontend/dist/assets/KnowledgeBaseContext-CgnF8K-_.js.map +0 -1
- package/dist/frontend/dist/assets/PlusIcon-qGFPUzg0.js +0 -2
- package/dist/frontend/dist/assets/PlusIcon-qGFPUzg0.js.map +0 -1
- package/dist/frontend/dist/assets/ToolbarPanels-Drd8QG61.js +0 -2
- package/dist/frontend/dist/assets/ToolbarPanels-Drd8QG61.js.map +0 -1
- package/dist/frontend/dist/assets/client-BbPyO59A.js +0 -2
- package/dist/frontend/dist/assets/client-BsHptwGn.js +0 -2
- package/dist/frontend/dist/assets/client-COY1ucYF.js +0 -2
- package/dist/frontend/dist/assets/client-DZ-DNAU-.js +0 -2
- package/dist/frontend/dist/assets/en-IUV4ZXKH-eHunUM2g.js +0 -135
- package/dist/frontend/dist/assets/en-IUV4ZXKH-eHunUM2g.js.map +0 -1
- package/dist/frontend/dist/assets/layout-6uvM-QPR.js.map +0 -1
- package/dist/frontend/dist/assets/layout-CvaTeY53.js +0 -2
- package/dist/frontend/dist/assets/layout-CvaTeY53.js.map +0 -1
- package/dist/frontend/dist/assets/layout-D5Pjl6Q-.js +0 -2
- package/dist/frontend/dist/assets/layout-QZ56PNLk.js +0 -2
- package/dist/frontend/dist/assets/layout-QZ56PNLk.js.map +0 -1
- package/dist/frontend/dist/assets/page-B9hPrBrN.js +0 -2
- package/dist/frontend/dist/assets/page-BH5HMa4o.js +0 -2
- package/dist/frontend/dist/assets/page-BH5HMa4o.js.map +0 -1
- package/dist/frontend/dist/assets/page-CGEmB0mm.js +0 -2
- package/dist/frontend/dist/assets/page-CJFp0ZpS.js +0 -2
- package/dist/frontend/dist/assets/page-D1Di1cx-.js +0 -2
- package/dist/frontend/dist/assets/page-D1Di1cx-.js.map +0 -1
- package/dist/frontend/dist/assets/page-DIv5j5nE.js +0 -2
- package/dist/frontend/dist/assets/page-DK5bpgp9.js +0 -2
- package/dist/frontend/dist/assets/page-DVRMfAkS.js +0 -2
- package/dist/frontend/dist/assets/page-DjkPUxlb.js +0 -2
- package/dist/frontend/dist/assets/page-ESjXBvXd.js +0 -2
- package/dist/frontend/dist/assets/page-lbZaKDJf.js +0 -2
- package/dist/frontend/dist/assets/page-lbZaKDJf.js.map +0 -1
- package/dist/frontend/dist/assets/page-tb55k9Ji.js +0 -8
- package/dist/frontend/dist/assets/page-uukho-t7.js +0 -2
- package/dist/frontend/dist/assets/page-vzoIwpsS.js +0 -2
- package/dist/frontend/dist/assets/routing-BLuuVVPN.js +0 -2
- package/dist/frontend/dist/assets/useAuth-CAJolYxw.js +0 -2
- package/dist/frontend/dist/assets/useAuth-CAJolYxw.js.map +0 -1
- package/dist/templates/docker-compose.yml +0 -53
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout-QZ56PNLk.js","sources":["../../../../node_modules/@heroicons/react/24/outline/esm/UsersIcon.js","../../src/components/admin/AdminNavigation.tsx","../../src/app/[locale]/admin/layout.tsx"],"sourcesContent":["import * as React from \"react\";\nfunction UsersIcon({\n title,\n titleId,\n ...props\n}, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", Object.assign({\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n strokeWidth: 1.5,\n stroke: \"currentColor\",\n \"aria-hidden\": \"true\",\n \"data-slot\": \"icon\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n d: \"M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z\"\n }));\n}\nconst ForwardRef = /*#__PURE__*/ React.forwardRef(UsersIcon);\nexport default ForwardRef;","import React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Link } from '@/i18n/routing';\nimport { usePathname } from '@/i18n/routing';\nimport { SimpleNavigation, useEventSubscriptions } from '@semiont/react-ui';\nimport type { SimpleNavigationItem } from '@semiont/react-ui';\nimport {\n UsersIcon,\n ShieldCheckIcon,\n CommandLineIcon,\n ArrowsRightLeftIcon,\n ChevronLeftIcon,\n Bars3Icon\n} from '@heroicons/react/24/outline';\n\ninterface AdminNavigationProps {\n isCollapsed: boolean;\n toggleCollapsed: () => void;\n navigationMenu?: (onClose: () => void) => React.ReactNode;\n}\n\n// Adapter: SimpleNavigation passes href, but our Link uses `to`\nfunction HrefLink({ href, to: _to, ...props }: React.ComponentProps<typeof Link> & { href?: string }) {\n return <Link to={(href ?? '') as string} {...props} />;\n}\n\nexport function AdminNavigation({ isCollapsed, toggleCollapsed, navigationMenu }: AdminNavigationProps) {\n const { t: _t } = useTranslation();\n const t = (k: string, p?: Record<string, unknown>) => _t(`Administration.${k}`, p as any) as string;\n const { t: _tSidebar } = useTranslation();\n const tSidebar = (k: string, p?: Record<string, unknown>) => _tSidebar(`Sidebar.${k}`, p as any) as string;\n const pathname = usePathname();\n\n // Handle sidebar toggle events\n const handleSidebarToggle = useCallback(() => {\n toggleCollapsed();\n }, [toggleCollapsed]);\n\n // Subscribe to sidebar toggle events\n useEventSubscriptions({\n 'browse:sidebar-toggle': handleSidebarToggle,\n });\n\n const navigation: SimpleNavigationItem[] = [\n {\n name: t('users'),\n href: '/admin/users',\n icon: UsersIcon,\n description: t('usersDescription')\n },\n {\n name: t('oauthSettings'),\n href: '/admin/security',\n icon: ShieldCheckIcon,\n description: t('oauthSettingsDescription')\n },\n {\n name: t('exchange'),\n href: '/admin/exchange',\n icon: ArrowsRightLeftIcon,\n description: t('exchangeDescription')\n },\n {\n name: t('devops'),\n href: '/admin/devops',\n icon: CommandLineIcon,\n description: t('devopsDescription')\n },\n ];\n\n return (\n <SimpleNavigation\n title={t('title')}\n items={navigation}\n currentPath={pathname}\n LinkComponent={HrefLink as any}\n {...(navigationMenu && { dropdownContent: navigationMenu })}\n isCollapsed={isCollapsed}\n icons={{\n chevronLeft: ChevronLeftIcon as React.ComponentType<{ className?: string }>,\n bars: Bars3Icon as React.ComponentType<{ className?: string }>\n }}\n collapseSidebarLabel={tSidebar('collapseSidebar')}\n expandSidebarLabel={tSidebar('expandSidebar')}\n />\n );\n}","import { useContext } from 'react';\nimport { Outlet } from 'react-router-dom';\nimport { useTranslation } from 'react-i18next';\nimport { AdminNavigation } from '@/components/admin/AdminNavigation';\nimport { LeftSidebar, Footer, ApiClientProvider, AuthTokenProvider } from '@semiont/react-ui';\nimport { CookiePreferences } from '@/components/CookiePreferences';\nimport { KeyboardShortcutsContext } from '@/contexts/KeyboardShortcutsContext';\nimport { Link, routes } from '@/lib/routing';\nimport { useAuth } from '@/hooks/useAuth';\nimport { useRouter } from '@/i18n/routing';\nimport { useKnowledgeBaseContext } from '@/contexts/KnowledgeBaseContext';\n\nexport default function AdminLayout() {\n const { t } = useTranslation();\n const keyboardContext = useContext(KeyboardShortcutsContext);\n const { isAuthenticated, isAdmin, isModerator, token: authToken } = useAuth();\n const { activeKnowledgeBase } = useKnowledgeBaseContext();\n const router = useRouter();\n\n if (!activeKnowledgeBase) {\n router.push('/know');\n return null;\n }\n\n return (\n <AuthTokenProvider token={authToken}>\n <ApiClientProvider baseUrl={activeKnowledgeBase.backendUrl}>\n <div className=\"min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col\">\n <div className=\"flex flex-1\">\n <LeftSidebar\n Link={Link}\n routes={routes}\n t={(key: string) => t(`Navigation.${key}`)}\n tHome={(key: string) => t(`Home.${key}`)}\n brandingLink=\"/\"\n collapsible={true}\n storageKey=\"admin-sidebar-collapsed\"\n isAuthenticated={isAuthenticated}\n isAdmin={isAdmin}\n isModerator={isModerator}\n >\n {(isCollapsed, toggleCollapsed, navigationMenu) => (\n <AdminNavigation\n isCollapsed={isCollapsed}\n toggleCollapsed={toggleCollapsed}\n navigationMenu={navigationMenu}\n />\n )}\n </LeftSidebar>\n <main className=\"flex-1 p-6 flex flex-col\">\n <div className=\"max-w-7xl mx-auto flex-1 flex flex-col w-full\">\n <Outlet />\n </div>\n </main>\n </div>\n <Footer\n Link={Link}\n routes={routes}\n t={(key: string, params?: Record<string, unknown>) => t(`Footer.${key}`, params as any) as string}\n CookiePreferences={CookiePreferences}\n {...(keyboardContext?.openKeyboardHelp && { onOpenKeyboardHelp: keyboardContext.openKeyboardHelp })}\n />\n </div>\n </ApiClientProvider>\n </AuthTokenProvider>\n );\n}\n"],"names":["UsersIcon","title","titleId","props","svgRef","React.createElement","ForwardRef","React.forwardRef","HrefLink","href","_to","Link","AdminNavigation","isCollapsed","toggleCollapsed","navigationMenu","_t","useTranslation","t","k","p","_tSidebar","tSidebar","pathname","usePathname","handleSidebarToggle","useCallback","useEventSubscriptions","navigation","ShieldCheckIcon","ArrowsRightLeftIcon","CommandLineIcon","jsx","SimpleNavigation","ChevronLeftIcon","Bars3Icon","AdminLayout","keyboardContext","useContext","KeyboardShortcutsContext","isAuthenticated","isAdmin","isModerator","authToken","useAuth","activeKnowledgeBase","useKnowledgeBaseContext","router","useRouter","AuthTokenProvider","ApiClientProvider","jsxs","LeftSidebar","routes","key","Outlet","Footer","params","CookiePreferences"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./query-ATBhtd3K.js";import{r as n}from"./vendor-EnoIVk-c.js";import{d as g,e as T,f as d,g as h,B as b,T as f}from"./en-IUV4ZXKH-eHunUM2g.js";import{T as D}from"./ToolbarPanels-Drd8QG61.js";import{u as x}from"./i18n-BYxb14hm.js";import"./index-DKq_l4UW.js";import"./useAuth-CAJolYxw.js";import"./AuthContext-CUx-cP7W.js";import"./routing-BLuuVVPN.js";import"./KnowledgeBaseContext-CgnF8K-_.js";import"./PlusIcon-qGFPUzg0.js";function y(){const{t:i}=x(),e=(t,p)=>i(`ModerateRecent.${t}`,p),{activePanel:a}=g(),{theme:r,setTheme:s}=T(),{showLineNumbers:m,toggleLineNumbers:o}=d(),c=n.useCallback(({theme:t})=>{s(t)},[s]),l=n.useCallback(()=>{o()},[o]);return h({"settings:theme-changed":c,"settings:line-numbers-toggled":l}),u.jsx(b,{hasDocuments:!1,isLoading:!1,theme:r,showLineNumbers:m,activePanel:a,translations:{pageTitle:e("pageTitle"),pageDescription:e("pageDescription"),sectionTitle:e("sectionTitle"),sectionDescription:e("sectionDescription"),noDocuments:e("noDocuments"),activityWillAppear:e("activityWillAppear"),loading:e("loading")},ToolbarPanels:D,Toolbar:f})}export{y as default};
|
|
2
|
-
//# sourceMappingURL=page-B9hPrBrN.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./query-ATBhtd3K.js";import{u as x,r as d}from"./vendor-EnoIVk-c.js";import{a as O,L as T}from"./routing-BLuuVVPN.js";import{M as H,F as q,G as C,H as E,I as S,N as A,O as D}from"./en-IUV4ZXKH-eHunUM2g.js";import{C as K}from"./CookiePreferences-BuRvkBwM.js";import{K as N}from"./privacy-W9SxWfL5.js";import{r as j,L as F}from"./routing-6lnx-g5H.js";import{u as M}from"./AuthContext-CUx-cP7W.js";import{u as z}from"./KnowledgeBaseContext-CgnF8K-_.js";import{u as W}from"./i18n-BYxb14hm.js";import"./index-DKq_l4UW.js";var $={};const u=$.SEMIONT_GOOGLE_CLIENT_ID;function P(a){const e=a.trim();return/^https?:\/\//i.test(e)?e:`https://${e}`}function te(){const{t:a}=W(),e=r=>a(`AuthSignIn.${r}`),v=(r,o)=>a(`Footer.${r}`,o),[g]=x(),h=O(),l=d.useContext(N),{setSession:k}=M(),{knowledgeBases:B,addKnowledgeBase:U}=z(),b=g.get("callbackUrl")??"/know",f=g.get("workspaceId"),t=f?B.find(r=>r.id===f):void 0,I=t==null?void 0:t.backendUrl,[y,s]=d.useState(null),w=d.useRef(!1);d.useEffect(()=>{if(!u||w.current)return;const r=document.createElement("script");r.src="https://accounts.google.com/gsi/client",r.async=!0,r.defer=!0,document.head.appendChild(r),w.current=!0},[]);const G=async r=>{var n,i;if(!u){s(e("errorGoogleSignIn"));return}s(null);const o=P(r),m=new C({baseUrl:S(o),eventBus:new E});(n=window.google)==null||n.accounts.id.initialize({client_id:u,callback:async({credential:c})=>{try{const L=await m.authenticateGoogle(A(c));t||U({id:crypto.randomUUID(),label:new URL(o).hostname,backendUrl:o}),k({token:L.token,user:L.user}),h.push(b)}catch{s(e("errorGoogleSignIn"))}}}),(i=window.google)==null||i.accounts.id.prompt()},R=async(r,o,m)=>{s(null);const n=P(r),i=new C({baseUrl:S(n),eventBus:new E});try{const c=await i.authenticatePassword(D(o),m);t||U({id:crypto.randomUUID(),label:new URL(n).hostname,backendUrl:n}),k({token:c.token,user:c.user}),h.push(b)}catch{s(e("errorInvalidCredentials"))}},_={pageTitle:e("pageTitle"),welcomeBack:e("welcomeBack"),signInPrompt:e("signInPrompt"),continueWithGoogle:e("continueWithGoogle"),backendUrlLabel:e("backendUrlLabel"),backendUrlPlaceholder:e("backendUrlPlaceholder"),emailLabel:e("emailLabel"),emailPlaceholder:e("emailPlaceholder"),passwordLabel:e("passwordLabel"),passwordPlaceholder:e("passwordPlaceholder"),signInWithCredentials:e("signInWithCredentials"),or:e("or"),credentialsAuthEnabled:e("credentialsAuthEnabled"),approvedDomainsOnly:e("approvedDomainsOnly"),backToHome:e("backToHome"),learnMore:e("learnMore"),signUpInstead:e("signUpInstead"),errorBackendUrlRequired:e("errorBackendUrlRequired"),errorBackendUrlInvalid:e("errorBackendUrlInvalid"),errorBackendUrlUnreachable:e("errorBackendUrlUnreachable"),errorEmailRequired:e("errorEmailRequired"),errorPasswordRequired:e("errorPasswordRequired"),tagline:a("Home.tagline")};return p.jsxs("div",{className:"semiont-page-wrapper",children:[p.jsx(H,{...I!==void 0&&{backendUrl:I},onGoogleSignIn:u?G:void 0,onCredentialsSignIn:R,error:y,showCredentialsAuth:!0,isLoading:!1,Link:T,translations:_}),p.jsx(q,{Link:F,routes:j,t:v,CookiePreferences:K,...(l==null?void 0:l.openKeyboardHelp)&&{onOpenKeyboardHelp:l.openKeyboardHelp}})]})}export{te as default};
|
|
2
|
-
//# sourceMappingURL=page-BH5HMa4o.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-BH5HMa4o.js","sources":["../../src/lib/env.ts","../../src/app/[locale]/auth/connect/page.tsx"],"sourcesContent":["// Environment configuration for Semiont Frontend\n// No validation at module load time - values are validated when actually used\n\n// Site Configuration\nexport const SEMIONT_SITE_NAME = process.env.SEMIONT_SITE_NAME || 'Semiont';\nexport const SEMIONT_BASE_URL = process.env.SEMIONT_BASE_URL || 'http://localhost:3000';\n\n// OAuth Configuration\nexport const SEMIONT_GOOGLE_CLIENT_ID = process.env.SEMIONT_GOOGLE_CLIENT_ID;\n\n// OAuth allowed domains (comma-separated list)\nexport const SEMIONT_OAUTH_ALLOWED_DOMAINS = process.env.SEMIONT_OAUTH_ALLOWED_DOMAINS || '';\n\n// Environment helpers\nexport const isDevelopment = process.env.NODE_ENV === 'development';\nexport const isProduction = process.env.NODE_ENV === 'production';\n\n// Helper to parse allowed domains from comma-separated string\nexport function getAllowedDomains(): string[] {\n return SEMIONT_OAUTH_ALLOWED_DOMAINS\n .split(',')\n .map(d => d.trim())\n .filter(d => d.length > 0);\n}\n","import { useEffect, useState, useContext, useRef } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport { useRouter } from '@/i18n/routing';\nimport { useTranslation } from 'react-i18next';\nimport { Footer, SignInForm } from '@semiont/react-ui';\nimport { CookiePreferences } from '@/components/CookiePreferences';\nimport { KeyboardShortcutsContext } from '@/contexts/KeyboardShortcutsContext';\nimport { Link as RoutingLink, routes } from '@/lib/routing';\nimport { Link } from '@/i18n/routing';\nimport { useAuthContext } from '@/contexts/AuthContext';\nimport { useKnowledgeBaseContext } from '@/contexts/KnowledgeBaseContext';\nimport { SemiontApiClient } from '@semiont/api-client';\nimport { googleCredential, email as makeEmail, baseUrl as makeBaseUrl, EventBus } from '@semiont/core';\nimport { SEMIONT_GOOGLE_CLIENT_ID } from '@/lib/env';\nimport type { KnowledgeBase } from '@/contexts/KnowledgeBaseContext';\n\ndeclare global {\n interface Window {\n google?: {\n accounts: {\n id: {\n initialize: (config: { client_id: string; callback: (response: { credential: string }) => void }) => void;\n prompt: () => void;\n };\n };\n };\n }\n}\n\n/**\n * Normalise a user-entered URL: add https:// if no scheme is present.\n */\nfunction normalizeUrl(raw: string): string {\n const trimmed = raw.trim();\n if (/^https?:\\/\\//i.test(trimmed)) return trimmed;\n return `https://${trimmed}`;\n}\n\nexport default function ConnectPage() {\n const { t: _t } = useTranslation();\n const t = (k: string) => _t(`AuthSignIn.${k}`) as string;\n const tFooter = (k: string, p?: Record<string, unknown>) => _t(`Footer.${k}`, p as any) as string;\n const [searchParams] = useSearchParams();\n const router = useRouter();\n const keyboardContext = useContext(KeyboardShortcutsContext);\n const { setSession } = useAuthContext();\n const { knowledgeBases, addKnowledgeBase } = useKnowledgeBaseContext();\n\n const callbackUrl = searchParams.get('callbackUrl') ?? '/know';\n\n // If workspaceId is in the query string, we're re-authenticating to a known workspace.\n const workspaceId = searchParams.get('workspaceId');\n const knownKnowledgeBase: KnowledgeBase | undefined = workspaceId\n ? knowledgeBases.find(w => w.id === workspaceId)\n : undefined;\n\n // The locked URL shown in the form (undefined = user must enter it)\n const lockedBackendUrl = knownKnowledgeBase?.backendUrl;\n\n const [error, setError] = useState<string | null>(null);\n const googleScriptLoaded = useRef(false);\n\n useEffect(() => {\n if (!SEMIONT_GOOGLE_CLIENT_ID || googleScriptLoaded.current) return;\n const script = document.createElement('script');\n script.src = 'https://accounts.google.com/gsi/client';\n script.async = true;\n script.defer = true;\n document.head.appendChild(script);\n googleScriptLoaded.current = true;\n }, []);\n\n const handleGoogleSignIn = async (backendUrl: string) => {\n if (!SEMIONT_GOOGLE_CLIENT_ID) {\n setError(t('errorGoogleSignIn'));\n return;\n }\n setError(null);\n const normalizedUrl = normalizeUrl(backendUrl);\n const client = new SemiontApiClient({ baseUrl: makeBaseUrl(normalizedUrl), eventBus: new EventBus() });\n\n window.google?.accounts.id.initialize({\n client_id: SEMIONT_GOOGLE_CLIENT_ID,\n callback: async ({ credential }) => {\n try {\n const response = await client.authenticateGoogle(googleCredential(credential));\n if (!knownKnowledgeBase) {\n addKnowledgeBase({\n id: crypto.randomUUID(),\n label: new URL(normalizedUrl).hostname,\n backendUrl: normalizedUrl,\n });\n }\n setSession({ token: response.token, user: response.user as any });\n router.push(callbackUrl);\n } catch {\n setError(t('errorGoogleSignIn'));\n }\n },\n });\n window.google?.accounts.id.prompt();\n };\n\n const handleCredentialsSignIn = async (backendUrl: string, email: string, password: string) => {\n setError(null);\n const normalizedUrl = normalizeUrl(backendUrl);\n const client = new SemiontApiClient({ baseUrl: makeBaseUrl(normalizedUrl), eventBus: new EventBus() });\n try {\n const response = await client.authenticatePassword(makeEmail(email), password);\n if (!knownKnowledgeBase) {\n addKnowledgeBase({\n id: crypto.randomUUID(),\n label: new URL(normalizedUrl).hostname,\n backendUrl: normalizedUrl,\n });\n }\n setSession({ token: response.token, user: response.user as any });\n router.push(callbackUrl);\n } catch {\n setError(t('errorInvalidCredentials'));\n }\n };\n\n const translations = {\n pageTitle: t('pageTitle'),\n welcomeBack: t('welcomeBack'),\n signInPrompt: t('signInPrompt'),\n continueWithGoogle: t('continueWithGoogle'),\n backendUrlLabel: t('backendUrlLabel'),\n backendUrlPlaceholder: t('backendUrlPlaceholder'),\n emailLabel: t('emailLabel'),\n emailPlaceholder: t('emailPlaceholder'),\n passwordLabel: t('passwordLabel'),\n passwordPlaceholder: t('passwordPlaceholder'),\n signInWithCredentials: t('signInWithCredentials'),\n or: t('or'),\n credentialsAuthEnabled: t('credentialsAuthEnabled'),\n approvedDomainsOnly: t('approvedDomainsOnly'),\n backToHome: t('backToHome'),\n learnMore: t('learnMore'),\n signUpInstead: t('signUpInstead'),\n errorBackendUrlRequired: t('errorBackendUrlRequired'),\n errorBackendUrlInvalid: t('errorBackendUrlInvalid'),\n errorBackendUrlUnreachable: t('errorBackendUrlUnreachable'),\n errorEmailRequired: t('errorEmailRequired'),\n errorPasswordRequired: t('errorPasswordRequired'),\n tagline: _t('Home.tagline') as string,\n };\n\n return (\n <div className=\"semiont-page-wrapper\">\n <SignInForm\n {...(lockedBackendUrl !== undefined && { backendUrl: lockedBackendUrl })}\n onGoogleSignIn={SEMIONT_GOOGLE_CLIENT_ID ? handleGoogleSignIn : undefined as any}\n onCredentialsSignIn={handleCredentialsSignIn}\n error={error}\n showCredentialsAuth={true}\n isLoading={false}\n Link={Link}\n translations={translations}\n />\n <Footer\n Link={RoutingLink}\n routes={routes}\n t={tFooter}\n CookiePreferences={CookiePreferences}\n {...(keyboardContext?.openKeyboardHelp && { onOpenKeyboardHelp: keyboardContext.openKeyboardHelp })}\n />\n </div>\n );\n}\n"],"names":["SEMIONT_GOOGLE_CLIENT_ID","define_process_env_default","normalizeUrl","raw","trimmed","ConnectPage","_t","useTranslation","t","k","tFooter","p","searchParams","useSearchParams","router","useRouter","keyboardContext","useContext","KeyboardShortcutsContext","setSession","useAuthContext","knowledgeBases","addKnowledgeBase","useKnowledgeBaseContext","callbackUrl","workspaceId","knownKnowledgeBase","w","lockedBackendUrl","error","setError","useState","googleScriptLoaded","useRef","useEffect","script","handleGoogleSignIn","backendUrl","normalizedUrl","client","SemiontApiClient","makeBaseUrl","EventBus","_a","credential","response","googleCredential","_b","handleCredentialsSignIn","email","password","makeEmail","translations","jsxs","jsx","SignInForm","Link","Footer","RoutingLink","routes","CookiePreferences"],"mappings":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as y}from"./query-ATBhtd3K.js";import{r as d}from"./vendor-EnoIVk-c.js";import{u as S}from"./useAuth-CAJolYxw.js";import{u as P}from"./AuthContext-CUx-cP7W.js";import{a as C,L as v}from"./routing-BLuuVVPN.js";import{u as w,c as U,W as R,P as I}from"./en-IUV4ZXKH-eHunUM2g.js";import{u as x}from"./i18n-BYxb14hm.js";import"./index-DKq_l4UW.js";function N(){var u;const{t:b}=x(),e=(c,n)=>b(`AuthWelcome.${c}`,n),{isAuthenticated:o,isLoading:r,user:s}=S(),{clearSession:h}=P(),i=C(),[A,T]=d.useState(!1),f=w(),p=U(),{data:t}=p.me.useQuery(),a=p.acceptTerms.useMutation();d.useEffect(()=>{if(!r){if(!o){i.push("/auth/connect");return}if(t!=null&&t.termsAcceptedAt){i.push("/");return}if(o&&t!==void 0&&(t!=null&&t.termsAcceptedAt)){i.push("/");return}}},[r,o,i,t]);const l=async c=>{if(!c){h(),i.push("/");return}try{await a.mutateAsync(),T(!0),setTimeout(()=>{i.push("/")},1e3)}catch(n){console.error("Terms acceptance error:",n),f.showError(e("errorAcceptingTerms"))}},g=r?"loading":A?"accepted":"form",m=((u=s==null?void 0:s.name)==null?void 0:u.split(" ")[0])??"";return y.jsx(R,{userName:m,termsAcceptedAt:(t==null?void 0:t.termsAcceptedAt)??null,isNewUser:!(t!=null&&t.termsAcceptedAt),status:g,isProcessing:a.isPending,onAccept:()=>l(!0),onDecline:()=>l(!1),translations:{loading:e("loading"),welcomeTitle:e("welcomeTitle"),thanksForAccepting:e("thanksForAccepting"),welcomeUser:e("welcomeUser",{firstName:m}),reviewTermsPrompt:e("reviewTermsPrompt"),termsSummaryTitle:e("termsSummaryTitle"),termsSummaryIntro:e("termsSummaryIntro"),acceptableUseTitle:e("acceptableUseTitle"),acceptableUseResponsible:e("acceptableUseResponsible"),acceptableUseRespect:e("acceptableUseRespect"),acceptableUseConduct:e("acceptableUseConduct"),prohibitedContentTitle:e("prohibitedContentTitle"),prohibitedContentIntro:e("prohibitedContentIntro"),prohibitedIllegal:e("prohibitedIllegal"),prohibitedAdult:e("prohibitedAdult"),prohibitedHate:e("prohibitedHate"),prohibitedViolence:e("prohibitedViolence"),prohibitedMisinformation:e("prohibitedMisinformation"),prohibitedPrivacy:e("prohibitedPrivacy"),prohibitedCopyright:e("prohibitedCopyright"),prohibitedMalware:e("prohibitedMalware"),prohibitedSpam:e("prohibitedSpam"),conductTitle:e("conductTitle"),conductDescription:e("conductDescription"),conductLink:e("conductLink"),conductPromotion:e("conductPromotion"),responsibilitiesTitle:e("responsibilitiesTitle"),responsibilitiesSecure:e("responsibilitiesSecure"),responsibilitiesReport:e("responsibilitiesReport"),responsibilitiesAccurate:e("responsibilitiesAccurate"),responsibilitiesComply:e("responsibilitiesComply"),violationsWarning:e("violationsWarning"),readFullTerms:e("readFullTerms"),termsOfService:e("termsOfService"),and:e("and"),privacyPolicy:e("privacyPolicy"),declineAndSignOut:e("declineAndSignOut"),acceptAndContinue:e("acceptAndContinue"),processing:e("processing"),legallyBound:e("legallyBound")},PageLayout:I,Link:v})}export{N as default};
|
|
2
|
-
//# sourceMappingURL=page-CGEmB0mm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./query-ATBhtd3K.js";import{u as t}from"./routing-BLuuVVPN.js";import{N as e}from"./vendor-EnoIVk-c.js";import"./index-DKq_l4UW.js";import"./i18n-BYxb14hm.js";function u(){const o=t();return r.jsx(e,{to:`/${o}/admin/users`,replace:!0})}export{u as default};
|
|
2
|
-
//# sourceMappingURL=page-CJFp0ZpS.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./query-ATBhtd3K.js";import{r as x}from"./vendor-EnoIVk-c.js";import{u as p}from"./useAuth-CAJolYxw.js";import{L as a}from"./routing-BLuuVVPN.js";import{S as h,b as t,F as u}from"./en-IUV4ZXKH-eHunUM2g.js";import{C as j}from"./CookiePreferences-BuRvkBwM.js";import{K as f}from"./privacy-W9SxWfL5.js";import{r as y,L as g}from"./routing-6lnx-g5H.js";import{u as b}from"./i18n-BYxb14hm.js";import"./AuthContext-CUx-cP7W.js";import"./index-DKq_l4UW.js";function P(){const{isAuthenticated:i,isLoading:c}=p(),m=c?"loading":i?"authenticated":"unauthenticated",{t:l}=b(),s=(o,n)=>l(`Home.${o}`,n),d=(o,n)=>l(`Footer.${o}`,n),r=x.useContext(f);return e.jsxs("div",{className:"flex flex-col min-h-screen",children:[e.jsx("main",{className:"flex-1 flex flex-col items-center justify-center p-24",role:"main",children:e.jsx("div",{className:"z-10 max-w-5xl text-sm",children:m==="loading"?e.jsx("div",{className:"text-center",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:s("loading")})}):e.jsxs("div",{className:"text-center space-y-8",children:[e.jsxs("section",{"aria-labelledby":"hero-heading",className:"py-8",children:[e.jsx("h1",{id:"hero-heading",className:"sr-only",children:"Semiont - AI-Powered Research Platform"}),e.jsx(h,{t:s,size:"xl",animated:!0,className:"mb-8"}),e.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-2xl mx-auto",children:s("description")})]}),e.jsx("div",{className:"flex gap-4 justify-center items-center flex-wrap",children:i?e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/know",className:t.primary.base,children:s("continueToKnowledgeBase")}),e.jsx(a,{to:"/about",className:t.secondary.base,children:s("learnMore")})]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/about",className:t.secondary.base,children:s("learnMore")}),e.jsx(a,{to:"/auth/signup",className:t.primary.base,children:s("signUp")}),e.jsx(a,{to:"/auth/connect?callbackUrl=/know",className:t.primary.base,children:s("signIn")})]})})]})})}),e.jsx(u,{Link:g,routes:y,t:d,CookiePreferences:j,...(r==null?void 0:r.openKeyboardHelp)&&{onOpenKeyboardHelp:r.openKeyboardHelp}})]})}export{P as default};
|
|
2
|
-
//# sourceMappingURL=page-D1Di1cx-.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-D1Di1cx-.js","sources":["../../src/app/[locale]/page.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useAuth } from '@/hooks/useAuth';\nimport { Link } from '@/i18n/routing';\nimport { Footer, SemiontBranding, buttonStyles } from '@semiont/react-ui';\nimport { CookiePreferences } from '@/components/CookiePreferences';\nimport { KeyboardShortcutsContext } from '@/contexts/KeyboardShortcutsContext';\nimport { Link as RoutingLink, routes } from '@/lib/routing';\n\nexport default function Home() {\n const { isAuthenticated, isLoading } = useAuth();\n const status = isLoading ? 'loading' : isAuthenticated ? 'authenticated' : 'unauthenticated';\n const { t: _t } = useTranslation();\n const t = (k: string, p?: Record<string, unknown>) => _t(`Home.${k}`, p as any) as string;\n const tFooter = (k: string, p?: Record<string, unknown>) => _t(`Footer.${k}`, p as any) as string;\n const keyboardContext = useContext(KeyboardShortcutsContext);\n\n return (\n <div className=\"flex flex-col min-h-screen\">\n <main className=\"flex-1 flex flex-col items-center justify-center p-24\" role=\"main\">\n <div className=\"z-10 max-w-5xl text-sm\">\n {status === 'loading' ? (\n <div className=\"text-center\">\n <p className=\"text-gray-600 dark:text-gray-300\">{t('loading')}</p>\n </div>\n ) : (\n <div className=\"text-center space-y-8\">\n <section aria-labelledby=\"hero-heading\" className=\"py-8\">\n <h1 id=\"hero-heading\" className=\"sr-only\">Semiont - AI-Powered Research Platform</h1>\n <SemiontBranding\n t={t}\n size=\"xl\"\n animated={true}\n className=\"mb-8\"\n />\n <p className=\"text-xl text-gray-600 dark:text-gray-300 max-w-2xl mx-auto\">\n {t('description')}\n </p>\n </section>\n\n <div className=\"flex gap-4 justify-center items-center flex-wrap\">\n {isAuthenticated ? (\n <>\n <Link to=\"/know\" className={buttonStyles.primary.base}>\n {t('continueToKnowledgeBase')}\n </Link>\n <Link to=\"/about\" className={buttonStyles.secondary.base}>\n {t('learnMore')}\n </Link>\n </>\n ) : (\n <>\n <Link to=\"/about\" className={buttonStyles.secondary.base}>\n {t('learnMore')}\n </Link>\n <Link to=\"/auth/signup\" className={buttonStyles.primary.base}>\n {t('signUp')}\n </Link>\n <Link to=\"/auth/connect?callbackUrl=/know\" className={buttonStyles.primary.base}>\n {t('signIn')}\n </Link>\n </>\n )}\n </div>\n </div>\n )}\n </div>\n </main>\n\n <Footer\n Link={RoutingLink}\n routes={routes}\n t={tFooter}\n CookiePreferences={CookiePreferences}\n {...(keyboardContext?.openKeyboardHelp && { onOpenKeyboardHelp: keyboardContext.openKeyboardHelp })}\n />\n </div>\n );\n}\n"],"names":["Home","isAuthenticated","isLoading","useAuth","status","_t","useTranslation","t","k","p","tFooter","keyboardContext","useContext","KeyboardShortcutsContext","jsxs","jsx","SemiontBranding","Fragment","Link","buttonStyles","Footer","RoutingLink","routes","CookiePreferences"],"mappings":"qdASA,SAAwBA,GAAO,CAC7B,KAAM,CAAE,gBAAAC,EAAiB,UAAAC,CAAA,EAAcC,EAAA,EACjCC,EAASF,EAAY,UAAYD,EAAkB,gBAAkB,kBACrE,CAAE,EAAGI,CAAA,EAAOC,EAAA,EACZC,EAAI,CAACC,EAAWC,IAAgCJ,EAAG,QAAQG,CAAC,GAAIC,CAAQ,EACxEC,EAAU,CAACF,EAAWC,IAAgCJ,EAAG,UAAUG,CAAC,GAAIC,CAAQ,EAChFE,EAAkBC,EAAAA,WAAWC,CAAwB,EAE3D,OACEC,EAAAA,KAAC,MAAA,CAAI,UAAU,6BACb,SAAA,CAAAC,EAAAA,IAAC,OAAA,CAAK,UAAU,wDAAwD,KAAK,OAC3E,SAAAA,EAAAA,IAAC,MAAA,CAAI,UAAU,yBACZ,SAAAX,IAAW,UACVW,EAAAA,IAAC,MAAA,CAAI,UAAU,cACb,SAAAA,MAAC,IAAA,CAAE,UAAU,mCAAoC,SAAAR,EAAE,SAAS,CAAA,CAAE,CAAA,CAChE,EAEAO,EAAAA,KAAC,MAAA,CAAI,UAAU,wBACb,SAAA,CAAAA,EAAAA,KAAC,UAAA,CAAQ,kBAAgB,eAAe,UAAU,OAChD,SAAA,CAAAC,MAAC,KAAA,CAAG,GAAG,eAAe,UAAU,UAAU,SAAA,yCAAsC,EAChFA,EAAAA,IAACC,EAAA,CACC,EAAAT,EACA,KAAK,KACL,SAAU,GACV,UAAU,MAAA,CAAA,QAEX,IAAA,CAAE,UAAU,6DACV,SAAAA,EAAE,aAAa,CAAA,CAClB,CAAA,EACF,EAEAQ,MAAC,MAAA,CAAI,UAAU,mDACZ,WACCD,EAAAA,KAAAG,WAAA,CACE,SAAA,CAAAF,EAAAA,IAACG,EAAA,CAAK,GAAG,QAAQ,UAAWC,EAAa,QAAQ,KAC9C,SAAAZ,EAAE,yBAAyB,CAAA,CAC9B,EACAQ,EAAAA,IAACG,EAAA,CAAK,GAAG,SAAS,UAAWC,EAAa,UAAU,KACjD,SAAAZ,EAAE,WAAW,CAAA,CAChB,CAAA,CAAA,CACF,EAEAO,EAAAA,KAAAG,EAAAA,SAAA,CACE,SAAA,CAAAF,EAAAA,IAACG,EAAA,CAAK,GAAG,SAAS,UAAWC,EAAa,UAAU,KACjD,SAAAZ,EAAE,WAAW,CAAA,CAChB,EACAQ,EAAAA,IAACG,EAAA,CAAK,GAAG,eAAe,UAAWC,EAAa,QAAQ,KACrD,SAAAZ,EAAE,QAAQ,CAAA,CACb,EACAQ,EAAAA,IAACG,EAAA,CAAK,GAAG,kCAAkC,UAAWC,EAAa,QAAQ,KACxE,SAAAZ,EAAE,QAAQ,CAAA,CACb,CAAA,CAAA,CACF,CAAA,CAEJ,CAAA,CAAA,CACF,EAEJ,EACF,EAEAQ,EAAAA,IAACK,EAAA,CACC,KAAMC,EACN,OAAAC,EACA,EAAGZ,EACH,kBAAAa,EACC,IAAIZ,GAAA,YAAAA,EAAiB,mBAAoB,CAAE,mBAAoBA,EAAgB,gBAAA,CAAiB,CAAA,CACnG,EACF,CAEJ"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./query-ATBhtd3K.js";import{r as t}from"./vendor-EnoIVk-c.js";import{d as h,e as g,f as v,g as f,Z as b,T as w,_ as C}from"./en-IUV4ZXKH-eHunUM2g.js";import{T as y}from"./ToolbarPanels-Drd8QG61.js";import{u as D}from"./useAuth-CAJolYxw.js";import{u as k}from"./i18n-BYxb14hm.js";import{F as T}from"./CommandLineIcon-BBerq9Nd.js";import"./index-DKq_l4UW.js";import"./AuthContext-CUx-cP7W.js";import"./routing-BLuuVVPN.js";import"./KnowledgeBaseContext-CgnF8K-_.js";import"./PlusIcon-qGFPUzg0.js";function L({title:s,titleId:e,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},n),s?t.createElement("title",{id:e},s):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const x=t.forwardRef(L);function M({title:s,titleId:e,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":e},n),s?t.createElement("title",{id:e},s):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 17.25v-.228a4.5 4.5 0 0 0-.12-1.03l-2.268-9.64a3.375 3.375 0 0 0-3.285-2.602H7.923a3.375 3.375 0 0 0-3.285 2.602l-2.268 9.64a4.5 4.5 0 0 0-.12 1.03v.228m19.5 0a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3m19.5 0a3 3 0 0 0-3-3H5.25a3 3 0 0 0-3 3m16.5 0h.008v.008h-.008v-.008Zm-3 0h.008v.008h-.008v-.008Z"}))}const E=t.forwardRef(M);function O(){const{isFullyAuthenticated:s,isAuthenticated:e,hasValidBackendToken:n}=D();return l.jsx(C,{isFullyAuthenticated:s,isAuthenticated:e,hasValidBackendToken:n})}function W(){const{t:s}=k(),e=(o,d)=>s(`AdminDevOps.${o}`,d),{activePanel:n}=h(),{theme:i,setTheme:r}=g(),{showLineNumbers:c,toggleLineNumbers:a}=v(),m=t.useCallback(({theme:o})=>{r(o)},[r]),u=t.useCallback(()=>{a()},[a]);f({"settings:theme-changed":m,"settings:line-numbers-toggled":u});const p=[{title:e("systemMonitoring"),description:e("systemMonitoringDescription"),icon:x,available:e("systemMonitoringCLI")},{title:e("serviceManagement"),description:e("serviceManagementDescription"),icon:E,available:e("serviceManagementCLI")},{title:e("deploymentControl"),description:e("deploymentControlDescription"),icon:T,available:e("deploymentControlCLI")}];return l.jsx(b,{suggestedFeatures:p,theme:i,showLineNumbers:c,activePanel:n,translations:{title:e("title"),subtitle:e("subtitle"),systemStatus:e("systemStatus"),cliOperations:e("cliOperations"),cliOperationsDescription:e("cliOperationsDescription"),cliTitle:e("cliTitle"),cliDescription:e("cliDescription")},StatusDisplay:O,ToolbarPanels:y,Toolbar:w})}export{W as default};
|
|
2
|
-
//# sourceMappingURL=page-DIv5j5nE.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./query-ATBhtd3K.js";import{r as i}from"./vendor-EnoIVk-c.js";import{d as u,e as g,f as W,g as f,Q as w,T as b}from"./en-IUV4ZXKH-eHunUM2g.js";import{T as x}from"./ToolbarPanels-Drd8QG61.js";import{u as T}from"./i18n-BYxb14hm.js";import"./index-DKq_l4UW.js";import"./useAuth-CAJolYxw.js";import"./AuthContext-CUx-cP7W.js";import"./routing-BLuuVVPN.js";import"./KnowledgeBaseContext-CgnF8K-_.js";import"./PlusIcon-qGFPUzg0.js";var v={"legal-irac":{id:"legal-irac",name:"Legal Analysis (IRAC)",description:"Issue, Rule, Application, Conclusion framework for legal reasoning",domain:"legal",tags:[{name:"Issue",description:"The legal question or problem to be resolved",examples:["What is the central legal question?","What must the court decide?","What is the dispute about?"]},{name:"Rule",description:"The relevant law, statute, or legal principle",examples:["What law applies?","What is the legal standard?","What statute governs this case?"]},{name:"Application",description:"How the rule applies to the specific facts",examples:["How does the law apply to these facts?","Analysis of the case","How do the facts satisfy the legal standard?"]},{name:"Conclusion",description:"The resolution or outcome based on the analysis",examples:["What is the court's decision?","What is the final judgment?","What is the holding?"]}]},"scientific-imrad":{id:"scientific-imrad",name:"Scientific Paper (IMRAD)",description:"Introduction, Methods, Results, Discussion structure for research papers",domain:"scientific",tags:[{name:"Introduction",description:"Background, context, and research question",examples:["What is the research question?","Why is this important?","What is the hypothesis?"]},{name:"Methods",description:"Experimental design and procedures",examples:["How was the study conducted?","What methods were used?","What was the experimental design?"]},{name:"Results",description:"Findings and observations",examples:["What did the study find?","What are the data?","What were the observations?"]},{name:"Discussion",description:"Interpretation and implications of results",examples:["What do the results mean?","What are the implications?","How do these findings relate to prior work?"]}]},"argument-toulmin":{id:"argument-toulmin",name:"Argument Structure (Toulmin)",description:"Claim, Evidence, Warrant, Counterargument, Rebuttal framework for argumentation",domain:"general",tags:[{name:"Claim",description:"The main assertion or thesis",examples:["What is being argued?","What is the main point?","What position is being taken?"]},{name:"Evidence",description:"Data or facts supporting the claim",examples:["What supports this claim?","What are the facts?","What data is provided?"]},{name:"Warrant",description:"Reasoning connecting evidence to claim",examples:["Why does this evidence support the claim?","What is the logic?","How does this reasoning work?"]},{name:"Counterargument",description:"Opposing viewpoints or objections",examples:["What are the objections?","What do critics say?","What are alternative views?"]},{name:"Rebuttal",description:"Response to counterarguments",examples:["How is the objection addressed?","Why is the counterargument wrong?","How is the criticism answered?"]}]}};function y(){return Object.values(v)}function P(){const{t:n}=T(),e=(t,p)=>n(`ModerateTagSchemas.${t}`,p),{activePanel:o}=u(),{theme:r,setTheme:a}=g(),{showLineNumbers:c,toggleLineNumbers:s}=W(),l=i.useCallback(({theme:t})=>{a(t)},[a]),h=i.useCallback(()=>{s()},[s]);f({"settings:theme-changed":l,"settings:line-numbers-toggled":h});const m=y();return d.jsx(w,{schemas:m,isLoading:!1,theme:r,showLineNumbers:c,activePanel:o,translations:{pageTitle:e("pageTitle"),pageDescription:e("pageDescription"),categories:e("categories"),loading:e("loading")},ToolbarPanels:x,Toolbar:b})}export{P as default};
|
|
2
|
-
//# sourceMappingURL=page-DK5bpgp9.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./query-ATBhtd3K.js";import{u as f,r as g}from"./vendor-EnoIVk-c.js";import{P as l,A as y}from"./en-IUV4ZXKH-eHunUM2g.js";import{C as d}from"./CookiePreferences-BuRvkBwM.js";import{K as A}from"./privacy-W9SxWfL5.js";import{r as h,L as x}from"./routing-6lnx-g5H.js";import{L}from"./routing-BLuuVVPN.js";import{u as b}from"./i18n-BYxb14hm.js";import"./index-DKq_l4UW.js";function D(){const{t}=b(),e=(r,o)=>t(`AuthError.${r}`,o),n=(r,o)=>t(`Footer.${r}`,o),i=(r,o)=>t(`Navigation.${r}`,o),c=(r,o)=>t(`Home.${r}`,o),[m]=f(),a=g.useContext(A),p=m.get("error")??null,u={pageTitle:e("pageTitle"),tryAgain:e("tryAgain"),errorConfiguration:e("errorConfiguration"),errorAccessDenied:e("errorAccessDenied"),errorVerification:e("errorVerification"),errorGeneric:e("errorGeneric")};return s.jsx(l,{Link:x,routes:h,t:n,tNav:i,tHome:c,CookiePreferences:d,...(a==null?void 0:a.openKeyboardHelp)&&{onOpenKeyboardHelp:a.openKeyboardHelp},className:"bg-gray-50 dark:bg-gray-900",children:s.jsx(y,{errorType:p,Link:L,translations:u})})}export{D as default};
|
|
2
|
-
//# sourceMappingURL=page-DVRMfAkS.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./query-ATBhtd3K.js";import{u as f,r as h}from"./vendor-EnoIVk-c.js";import{a as U,L as d}from"./routing-BLuuVVPN.js";import{P as k,a as H}from"./en-IUV4ZXKH-eHunUM2g.js";import{C as b}from"./CookiePreferences-BuRvkBwM.js";import{K as x}from"./privacy-W9SxWfL5.js";import{r as y,L as A}from"./routing-6lnx-g5H.js";import{u as L}from"./i18n-BYxb14hm.js";import"./index-DKq_l4UW.js";function S(){const{t:n}=L(),o=(t,e)=>n(`AuthSignUp.${t}`,e),i=(t,e)=>n(`Footer.${t}`,e),c=(t,e)=>n(`Navigation.${t}`,e),s=(t,e)=>n(`Home.${t}`,e),[p]=f(),m=U(),a=h.useContext(x),l=p.get("callbackUrl")??"/auth/welcome",u=async()=>{m.push(`/auth/connect?callbackUrl=${encodeURIComponent(l)}`)},g={pageTitle:o("pageTitle"),signUpPrompt:o("signUpPrompt"),signUpWithGoogle:o("signUpWithGoogle"),creatingAccount:o("creatingAccount"),approvedDomainsInfo:o("approvedDomainsInfo"),termsAgreement:o("termsAgreement"),alreadyHaveAccount:o("alreadyHaveAccount"),tagline:s("tagline"),backToHome:o("backToHome")};return r.jsx(k,{Link:A,routes:y,t:i,tNav:c,tHome:s,CookiePreferences:b,...(a==null?void 0:a.openKeyboardHelp)&&{onOpenKeyboardHelp:a.openKeyboardHelp},className:"semiont-page-layout--auth",showAuthLinks:!1,children:r.jsx(H,{onSignUp:u,Link:d,translations:g})})}function N(){return r.jsx(S,{})}export{N as default};
|
|
2
|
-
//# sourceMappingURL=page-DjkPUxlb.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as B}from"./query-ATBhtd3K.js";import{r as u}from"./vendor-EnoIVk-c.js";import{a as w}from"./routing-BLuuVVPN.js";import{d as E,e as L,f as N,g as x,h as C,i as F,R as k}from"./en-IUV4ZXKH-eHunUM2g.js";import{T as j}from"./ToolbarPanels-Drd8QG61.js";import{u as A}from"./i18n-BYxb14hm.js";import"./index-DKq_l4UW.js";import"./useAuth-CAJolYxw.js";import"./AuthContext-CUx-cP7W.js";import"./KnowledgeBaseContext-CgnF8K-_.js";import"./PlusIcon-qGFPUzg0.js";function H(){const{t:l}=A(),e=(s,P)=>l(`Discover.${s}`,P),n=w(),{activePanel:m}=E(),{theme:Q,setTheme:a,resolvedTheme:h}=L(),{showLineNumbers:d,toggleLineNumbers:c}=N(),g=u.useCallback(({theme:s})=>{a(s)},[a]),p=u.useCallback(()=>{c()},[c]);x({"settings:theme-changed":g,"settings:line-numbers-toggled":p});const i=C(),R=F(),{data:t,isLoading:T}=i.list.useQuery({limit:10,archived:!1}),{data:o}=R.list.useQuery(),{data:r,isFetching:y}=i.search.useQuery("",20),b=(t==null?void 0:t.resources)||[],v=(r==null?void 0:r.resources)||[],f=(o==null?void 0:o.entityTypes)||[];return B.jsx(k,{recentDocuments:b,searchDocuments:v,entityTypes:f,isLoadingRecent:T,isSearching:y,theme:h,showLineNumbers:d,activePanel:m,onNavigateToResource:s=>{n.push(`/know/resource/${encodeURIComponent(s)}`)},onNavigateToCompose:()=>{n.push("/know/compose")},translations:{title:e("title"),subtitle:e("subtitle"),searchPlaceholder:e("searchPlaceholder"),searchButton:e("searchButton"),searching:e("searching"),filterByEntityType:e("filterByEntityType"),all:e("all"),recentResources:e("recentResources"),searchResults:s=>e("searchResults",{count:s}),documentsTaggedWith:s=>e("documentsTaggedWith",{entityType:s}),noResultsFound:s=>e("noResultsFound",{query:s}),noResourcesAvailable:e("noResourcesAvailable"),composeFirstResource:e("composeFirstResource"),archived:e("archived"),created:e("created"),loadingKnowledgeBase:e("loadingKnowledgeBase")},ToolbarPanels:j})}export{H as default};
|
|
2
|
-
//# sourceMappingURL=page-ESjXBvXd.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./query-ATBhtd3K.js";import{a as R,r as x}from"./vendor-EnoIVk-c.js";import{u as g}from"./routing-BLuuVVPN.js";import{r as n,h as j,s as E,t as m,v as L}from"./en-IUV4ZXKH-eHunUM2g.js";import{r as S,L as P}from"./routing-6lnx-g5H.js";import{u as h}from"./StreamStatusContext-BuPATpTz.js";import{T as w}from"./ToolbarPanels-Drd8QG61.js";import"./index-DKq_l4UW.js";import"./i18n-BYxb14hm.js";import"./useAuth-CAJolYxw.js";import"./AuthContext-CUx-cP7W.js";import"./KnowledgeBaseContext-CgnF8K-_.js";import"./PlusIcon-qGFPUzg0.js";function q(){const o=R(),f=g(),e=n(o==null?void 0:o.id),p=h(),d=j(),{data:s,isLoading:t,isError:a,error:u,refetch:c}=d.get.useQuery(e);if(x.useEffect(()=>{a&&!t&&console.error(`[Document] Failed to load resource ${e}:`,u)},[a,t,e,u]),t||!s)return r.jsx(E,{});if(a)return r.jsx(m,{error:u,onRetry:()=>c()});if(!s.resource)return r.jsx(m,{error:new Error("Resource not found"),onRetry:()=>c()});const i=s.resource,l=n(i["@id"]);return r.jsx(L,{resource:i,rUri:l,locale:f,Link:P,routes:S,ToolbarPanels:w,refetchDocument:c,streamStatus:p})}export{q as default};
|
|
2
|
-
//# sourceMappingURL=page-lbZaKDJf.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-lbZaKDJf.js","sources":["../../src/app/[locale]/know/resource/[id]/page.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * Resource Viewer Page - Minimal Next.js routing wrapper\n *\n * Handles only Next.js routing and initial resource loading.\n * All other concerns (data loading, events, UI state) are handled by ResourceViewerPage.\n */\n\nimport { useEffect } from 'react';\nimport { useParams } from 'react-router-dom';\nimport { useLocale } from '@/i18n/routing';\nimport { useResources } from '@semiont/react-ui';\nimport { resourceId } from '@semiont/core';\nimport { Link, routes } from '@/lib/routing';\nimport { useStreamStatus } from '@/contexts/StreamStatusContext';\n\n// Feature components\nimport { ResourceLoadingState, ResourceErrorState, ResourceViewerPage } from '@semiont/react-ui';\nimport { ToolbarPanels } from '@/components/toolbar/ToolbarPanels';\nimport type { SemiontResource } from '@semiont/react-ui';\n\n/**\n * Main page component - handles only routing and initial resource load\n */\nexport default function KnowledgeResourcePage() {\n const params = useParams();\n const locale = useLocale();\n\n // The URL param is the bare resource ID\n const rId = resourceId(params?.id as string);\n\n const streamStatus = useStreamStatus();\n\n // Load only the resource descriptor - everything else is loaded by ResourceViewerPage\n const resources = useResources();\n const {\n data: docData,\n isLoading,\n isError,\n error,\n refetch: refetchDocument\n } = resources.get.useQuery(rId) as {\n data: { resource: SemiontResource } | undefined;\n isLoading: boolean;\n isError: boolean;\n error: unknown;\n refetch: () => Promise<unknown>;\n };\n\n // Log error for debugging\n useEffect(() => {\n if (isError && !isLoading) {\n console.error(`[Document] Failed to load resource ${rId}:`, error);\n }\n }, [isError, isLoading, rId, error]);\n\n // Early return: Loading state\n if (isLoading || !docData) {\n return <ResourceLoadingState />;\n }\n\n // Early return: Error state\n if (isError) {\n return <ResourceErrorState error={error} onRetry={() => refetchDocument()} />;\n }\n\n // Early return: ResourceDescriptor not found\n if (!docData.resource) {\n return <ResourceErrorState error={new Error('Resource not found')} onRetry={() => refetchDocument()} />;\n }\n\n const resource = docData.resource;\n // resource['@id'] is now a bare ID\n const canonicalId = resourceId(resource['@id']);\n\n // Render with minimal props - all data loading/events handled inside ResourceViewerPage\n return (\n <ResourceViewerPage\n resource={resource}\n rUri={canonicalId}\n locale={locale}\n Link={Link}\n routes={routes}\n ToolbarPanels={ToolbarPanels}\n refetchDocument={refetchDocument}\n streamStatus={streamStatus}\n />\n );\n}\n"],"names":["KnowledgeResourcePage","params","useParams","locale","useLocale","rId","resourceId","streamStatus","useStreamStatus","resources","useResources","docData","isLoading","isError","error","refetchDocument","useEffect","ResourceLoadingState","ResourceErrorState","jsx","resource","canonicalId","ResourceViewerPage","Link","routes","ToolbarPanels"],"mappings":"oiBAyBA,SAAwBA,GAAwB,CAC9C,MAAMC,EAASC,EAAA,EACTC,EAASC,EAAA,EAGTC,EAAMC,EAAWL,GAAA,YAAAA,EAAQ,EAAY,EAErCM,EAAeC,EAAA,EAGfC,EAAYC,EAAA,EACZ,CACJ,KAAMC,EACN,UAAAC,EACA,QAAAC,EACA,MAAAC,EACA,QAASC,CAAA,EACPN,EAAU,IAAI,SAASJ,CAAG,EAgB9B,GAPAW,EAAAA,UAAU,IAAM,CACVH,GAAW,CAACD,GACd,QAAQ,MAAM,sCAAsCP,CAAG,IAAKS,CAAK,CAErE,EAAG,CAACD,EAASD,EAAWP,EAAKS,CAAK,CAAC,EAG/BF,GAAa,CAACD,EAChB,aAAQM,EAAA,EAAqB,EAI/B,GAAIJ,EACF,aAAQK,EAAA,CAAmB,MAAAJ,EAAc,QAAS,IAAMC,IAAmB,EAI7E,GAAI,CAACJ,EAAQ,SACX,OAAOQ,MAACD,EAAA,CAAmB,MAAO,IAAI,MAAM,oBAAoB,EAAG,QAAS,IAAMH,EAAA,EAAmB,EAGvG,MAAMK,EAAWT,EAAQ,SAEnBU,EAAcf,EAAWc,EAAS,KAAK,CAAC,EAG9C,OACED,EAAAA,IAACG,EAAA,CACC,SAAAF,EACA,KAAMC,EACN,OAAAlB,EACA,KAAAoB,EACA,OAAAC,EACA,cAAAC,EACA,gBAAAV,EACA,aAAAR,CAAA,CAAA,CAGN"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./query-ATBhtd3K.js";import{r as u}from"./vendor-EnoIVk-c.js";import{P as j,b as c}from"./en-IUV4ZXKH-eHunUM2g.js";import{C as b}from"./CookiePreferences-BuRvkBwM.js";import{K as N}from"./privacy-W9SxWfL5.js";import{r as f,L as g}from"./routing-6lnx-g5H.js";import{L as o}from"./routing-BLuuVVPN.js";import{u as n}from"./i18n-BYxb14hm.js";import"./index-DKq_l4UW.js";function K(){const{t:r}=n(),e=(t,i)=>r(`About.${t}`,i),{t:l}=n(),m=(t,i)=>l(`Footer.${t}`,i),{t:d}=n(),h=(t,i)=>d(`Navigation.${t}`,i),{t:p}=n(),x=(t,i)=>p(`Home.${t}`,i),a=u.useContext(N);return s.jsx(j,{Link:g,routes:f,t:m,tNav:h,tHome:x,showAuthLinks:!1,CookiePreferences:b,...(a==null?void 0:a.openKeyboardHelp)&&{onOpenKeyboardHelp:a.openKeyboardHelp},className:"semiont-static-page",children:s.jsx("div",{className:"semiont-static-container",children:s.jsxs("div",{className:"semiont-static-content",children:[s.jsxs("header",{className:"semiont-static-header",children:[s.jsx("h1",{className:"semiont-static-title",children:e("pageTitle")}),s.jsx("p",{className:"semiont-static-subtitle",children:e("tagline")})]}),s.jsxs("div",{className:"semiont-static-action-buttons",children:[s.jsx(o,{to:"/auth/signup",className:c.primary.base,children:e("signUp")}),s.jsx(o,{to:"/auth/connect?callbackUrl=/know",className:c.primary.base,children:e("signIn")})]}),s.jsxs("article",{className:"semiont-static-article",children:[s.jsxs("section",{children:[s.jsx("h2",{children:e("missionTitle")}),s.jsx("p",{children:e("mission")})]}),s.jsxs("section",{children:[s.jsx("h2",{children:e("coreFeaturesTitle")}),s.jsxs("div",{className:"semiont-static-feature-grid",children:[s.jsxs("div",{className:"semiont-static-feature-card",children:[s.jsx("span",{className:"semiont-static-feature-icon",children:"📊"}),s.jsx("h3",{children:e("semanticContentTitle")}),s.jsx("p",{className:"semiont-static-feature-subtitle",children:e("semanticContentSubtitle")}),e("semanticContent").split(`
|
|
2
|
-
|
|
3
|
-
`).map((t,i)=>s.jsx("p",{children:t},i)),s.jsx("span",{className:"semiont-static-badge semiont-static-badge-planned",children:e("planned")})]}),s.jsxs("div",{className:"semiont-static-feature-card",children:[s.jsx("span",{className:"semiont-static-feature-icon",children:"🤝"}),s.jsx("h3",{children:e("collaborationTitle")}),s.jsx("p",{className:"semiont-static-feature-subtitle",children:e("collaborationSubtitle")}),e("collaboration").split(`
|
|
4
|
-
|
|
5
|
-
`).map((t,i)=>s.jsx("p",{children:t},i)),s.jsx("span",{className:"semiont-static-badge semiont-static-badge-planned",children:e("planned")})]}),s.jsxs("div",{className:"semiont-static-feature-card",children:[s.jsx("span",{className:"semiont-static-feature-icon",children:"🔐"}),s.jsx("h3",{children:e("rbacTitle")}),s.jsx("p",{className:"semiont-static-feature-subtitle",children:e("rbacSubtitle")}),e("rbac").split(`
|
|
6
|
-
|
|
7
|
-
`).map((t,i)=>s.jsx("p",{children:t},i)),s.jsx("span",{className:"semiont-static-badge semiont-static-badge-planned",children:e("planned")})]})]})]}),s.jsxs("section",{className:"semiont-static-highlight",children:[s.jsx("h2",{children:e("openSourceTitle")}),s.jsx("p",{children:e("openSource")}),s.jsx("div",{className:"semiont-static-action-buttons",children:s.jsx("a",{href:"https://github.com/The-AI-Alliance/semiont",target:"_blank",rel:"noopener noreferrer",className:c.secondary.base,children:e("viewOnGitHub")})})]}),s.jsxs("section",{children:[s.jsx("h2",{children:e("futureVisionTitle")}),s.jsx("p",{children:e("futureVision")})]})]})]})})})}export{K as default};
|
|
8
|
-
//# sourceMappingURL=page-tb55k9Ji.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./query-ATBhtd3K.js";import{r as i,u as ne}from"./vendor-EnoIVk-c.js";import{u as se,a as re}from"./routing-BLuuVVPN.js";import{u as ce}from"./useAuth-CAJolYxw.js";import{C as A,u as ie,d as ae,e as ue,f as le,j as de,g as pe,h as me,k as fe,i as ge,l as ye,m as he,n as Ce,T as Re,r as L,o as ke,p as Te,q as ve}from"./en-IUV4ZXKH-eHunUM2g.js";import{T as we}from"./ToolbarPanels-Drd8QG61.js";import{u as M}from"./i18n-BYxb14hm.js";import"./index-DKq_l4UW.js";import"./AuthContext-CUx-cP7W.js";import"./KnowledgeBaseContext-CgnF8K-_.js";import"./PlusIcon-qGFPUzg0.js";function Ie(){const{t:f}=M(),e=(t,n)=>f(`Compose.${t}`,n),g=se(),c=re(),[o]=ne(),{isAuthenticated:y,isLoading:p,token:U}=ce(),{showError:u,showSuccess:E}=ie(),D=o==null?void 0:o.get("mode"),l=o==null?void 0:o.get("token");i.useEffect(()=>{p||y||c.push("/")},[p,y,c]);const m=o==null?void 0:o.get("annotationUri"),h=o==null?void 0:o.get("sourceDocumentId"),C=o==null?void 0:o.get("name"),R=o==null?void 0:o.get("entityTypes"),[N,k]=i.useState(!0),[j,B]=i.useState(null),[O,$]=i.useState(null),[P,Q]=i.useState(null),{activePanel:_}=ae(),{theme:xe,setTheme:q,resolvedTheme:G}=ue(),{showLineNumbers:H,toggleLineNumbers:J}=le(),{hoverDelayMs:K}=de();pe({"settings:theme-changed":({theme:t})=>q(t),"settings:line-numbers-toggled":()=>J()});const T=me(),W=fe(),Y=ge(),F=ye(),b=he(),{data:v}=Y.list.useQuery(),z=(v==null?void 0:v.entityTypes)||[],V=T.create.useMutation(),X=W.updateBody.useMutation(),{data:a}=T.getByToken.useQuery(l||""),Z=T.createFromToken.useMutation(),S=!!(m&&h&&C),w=D==="clone"&&!!l,ee=w?"clone":S?"reference":"new";i.useEffect(()=>{(async()=>{if(S){const n=R?R.split(","):[];$({annotationUri:m,sourceDocumentId:h,name:C,entityTypes:n});const s=`gather-context:${m}`,r=sessionStorage.getItem(s);if(r){try{Q(JSON.parse(r))}catch{}sessionStorage.removeItem(s)}k(!1);return}if(w&&a){if(a.sourceResource&&F&&b)try{const n=L(a.sourceResource["@id"]),s=ke(a.sourceResource)||"text/plain",{data:r}=await F.getResourceRepresentation(n,{accept:s,auth:b}),I=Te(r,s);B({sourceResource:a.sourceResource,sourceContent:I})}catch(n){console.error("Failed to fetch representation:",n),u("Failed to load resource representation")}else u("Invalid or expired clone token"),c.push("/know/discover");k(!1)}else w&&!l?(u("Clone token not found. Please try cloning again."),c.push("/know/discover")):k(!1)})()},[D,l,a,m,h,C,R,U]);const te=async t=>{try{let n;if(t.mode==="clone")n=(await Z.mutateAsync({token:l,name:t.name,content:t.content,archiveOriginal:t.archiveOriginal??!0})).resourceId;else{let s,r;if(t.file)s=t.file,r=t.format??"application/octet-stream";else{const x=new Blob([t.content||""],{type:t.format??"application/octet-stream"}),oe=t.format==="text/plain"?".txt":t.format==="text/html"?".html":".md";s=new File([x],t.name+oe,{type:t.format??"application/octet-stream"}),r=t.format??"application/octet-stream"}const I=t.charset&&!t.file?`${r}; charset=${t.charset}`:r;if(n=(await V.mutateAsync({name:t.name,file:s,format:I,entityTypes:t.entityTypes||[],language:t.language,creationMethod:"ui",storageUri:t.storageUri})).resourceId,t.mode==="reference"&&t.annotationUri&&t.sourceDocumentId)try{await X.mutateAsync({resourceId:L(t.sourceDocumentId),annotationId:ve(t.annotationUri),data:{resourceId:t.sourceDocumentId,operations:[{op:"add",item:{type:"SpecificResource",source:n,purpose:"linking"}}]}}),E("Reference successfully linked to the new resource")}catch(x){console.error("Failed to update reference:",x),u("Resource created but failed to update reference. You may need to manually link it.")}}c.push(`/know/resource/${encodeURIComponent(n)}`)}catch(n){console.error("Failed to save resource:",n);const s=n instanceof Error?n.message:"Failed to save resource. Please try again.";throw u(s),n}};return p||N?d.jsx(A,{message:p?"Checking authentication...":"Loading cloned resource..."}):y?d.jsx(Ce,{mode:ee,cloneData:j,referenceData:O,gatheredContext:P,availableEntityTypes:z,initialLocale:g,theme:G,showLineNumbers:H,hoverDelayMs:K,activePanel:_,onSaveResource:te,onCancel:()=>c.push("/know/discover"),translations:{title:e("title"),titleEditClone:e("titleEditClone"),titleCompleteReference:e("titleCompleteReference"),subtitleClone:e("subtitleClone"),subtitleReference:e("subtitleReference"),linkedNoticePrefix:e("linkedNoticePrefix"),resourceName:e("resourceName"),resourceNamePlaceholder:e("resourceNamePlaceholder"),entityTypes:e("entityTypes"),language:e("language"),contentSource:e("contentSource"),uploadFile:e("uploadFile"),uploadFileDescription:e("uploadFileDescription"),writeContent:e("writeContent"),writeContentDescription:e("writeContentDescription"),dropFileOrClick:e("dropFileOrClick"),supportedFormats:e("supportedFormats"),mediaType:e("mediaType"),autoDetected:e("autoDetected"),format:e("format"),content:e("content"),resourceContent:e("resourceContent"),encoding:e("encoding"),archiveOriginal:e("archiveOriginal"),cancel:e("cancel"),saving:e("saving"),creating:e("creating"),creatingAndLinking:e("creatingAndLinking"),saveClonedResource:e("saveClonedResource"),createAndLinkResource:e("createAndLinkResource"),createResource:e("createResource")},ToolbarPanels:we,Toolbar:Re}):null}function Oe(){const{t:f}=M(),e=(g,c)=>f(`Compose.${g}`,c);return d.jsx(i.Suspense,{fallback:d.jsx(A,{message:e("loading")}),children:d.jsx(Ie,{})})}export{Oe as default};
|
|
2
|
-
//# sourceMappingURL=page-uukho-t7.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u as j,j as r}from"./query-ATBhtd3K.js";import{r as s}from"./vendor-EnoIVk-c.js";import{d as v,e as w,f as A,g as C,i as L,E as k,T as I}from"./en-IUV4ZXKH-eHunUM2g.js";import{T as D}from"./ToolbarPanels-Drd8QG61.js";import{u as M}from"./i18n-BYxb14hm.js";import"./index-DKq_l4UW.js";import"./useAuth-CAJolYxw.js";import"./AuthContext-CUx-cP7W.js";import"./routing-BLuuVVPN.js";import"./KnowledgeBaseContext-CgnF8K-_.js";import"./PlusIcon-qGFPUzg0.js";function G(){const{t:m}=M(),e=(t,N)=>m(`ModerateEntityTags.${t}`,N),[a,i]=s.useState(""),[p,o]=s.useState(""),T=j(),{activePanel:y}=v(),{theme:h,setTheme:c}=w(),{showLineNumbers:f,toggleLineNumbers:d}=A(),E=s.useCallback(({theme:t})=>{c(t)},[c]),b=s.useCallback(()=>{d()},[d]);C({"settings:theme-changed":E,"settings:line-numbers-toggled":b});const l=L(),{data:n,isLoading:u}=l.list.useQuery({refetchInterval:3e4,refetchIntervalInBackground:!0}),x=(n==null?void 0:n.entityTypes)||[],g=l.add.useMutation(),P=async()=>{if(a.trim()){o("");try{await g.mutateAsync(a.trim()),T.invalidateQueries({queryKey:["/api/entity-types"]}),i("")}catch(t){o(t instanceof Error?t.message:e("errorFailedToAdd"))}}};return u?r.jsx("div",{className:"flex items-center justify-center py-20",children:r.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:e("loading")})}):r.jsx(k,{entityTypes:x,isLoading:u,error:p,newTag:a,onNewTagChange:i,onAddTag:P,isAddingTag:g.isPending,theme:h,showLineNumbers:f,activePanel:y,translations:{pageTitle:e("pageTitle"),pageDescription:e("pageDescription"),sectionTitle:e("sectionTitle"),sectionDescription:e("sectionDescription"),inputPlaceholder:e("inputPlaceholder"),addTag:e("addTag"),adding:e("adding")},ToolbarPanels:D,Toolbar:I})}export{G as default};
|
|
2
|
-
//# sourceMappingURL=page-vzoIwpsS.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./query-ATBhtd3K.js";import{R as f,a as c,L as g,b as L,c as p}from"./vendor-EnoIVk-c.js";import{D as o,i as h}from"./index-DKq_l4UW.js";import{u}from"./i18n-BYxb14hm.js";const k=f.forwardRef(function({to:a,...n},s){const{i18n:t}=u(),e=c(),l=t.language||e.locale||o,i=typeof a=="string"?`/${l}${a.startsWith("/")?a:`/${a}`}`:a;return m.jsx(g,{ref:s,to:i,...n})});function w(){const r=L(),{i18n:a}=u(),n=c();function s(t,e){return`/${e||a.language||n.locale||o}${t.startsWith("/")?t:`/${t}`}`}return{push(t,e){r(s(t,e==null?void 0:e.locale))},replace(t,e){r(s(t,e==null?void 0:e.locale),{replace:!0})},back(){r(-1)},forward(){r(1)},refresh(){window.location.reload()},prefetch(t){}}}function b(){const{pathname:r}=p(),a=r.match(/^\/[a-z]{2}(\/.*)?$/);return a?a[1]??"/":r}function j(){const r=c(),{i18n:a}=u(),n=r.locale;return n&&h(n)?n:a.language||o}export{k as L,w as a,b,j as u};
|
|
2
|
-
//# sourceMappingURL=routing-BLuuVVPN.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./vendor-EnoIVk-c.js";import{u as m}from"./AuthContext-CUx-cP7W.js";function r(){const{session:a,isLoading:n}=m();return e.useMemo(()=>{var o,l;const i=!!a,t=(a==null?void 0:a.user)??null;return{session:a,user:t,backendUser:t,token:(a==null?void 0:a.token)??null,isLoading:n,isAuthenticated:i,hasValidBackendToken:!!(a!=null&&a.token),isFullyAuthenticated:i,userDomain:(t==null?void 0:t.domain)||((o=t==null?void 0:t.email)==null?void 0:o.split("@")[1]),displayName:(t==null?void 0:t.name)??((l=t==null?void 0:t.email)==null?void 0:l.split("@")[0])??"User",avatarUrl:(t==null?void 0:t.image)??null,isAdmin:(t==null?void 0:t.isAdmin)??!1,isModerator:(t==null?void 0:t.isModerator)??!1}},[a,n])}export{r as u};
|
|
2
|
-
//# sourceMappingURL=useAuth-CAJolYxw.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth-CAJolYxw.js","sources":["../../src/hooks/useAuth.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useAuthContext } from '@/contexts/AuthContext';\n\n/**\n * Enhanced authentication hook\n */\nexport function useAuth() {\n const { session, isLoading } = useAuthContext();\n\n return useMemo(() => {\n const isAuthenticated = !!session;\n const user = session?.user ?? null;\n\n return {\n session,\n user,\n backendUser: user,\n token: session?.token ?? null,\n\n isLoading,\n isAuthenticated,\n hasValidBackendToken: !!session?.token,\n isFullyAuthenticated: isAuthenticated,\n\n userDomain: user?.domain || user?.email?.split('@')[1],\n displayName: user?.name ?? user?.email?.split('@')[0] ?? 'User',\n avatarUrl: user?.image ?? null,\n isAdmin: user?.isAdmin ?? false,\n isModerator: user?.isModerator ?? false,\n };\n }, [session, isLoading]);\n}\n\n/**\n * Hook for getting user preferences and settings\n */\nexport function useUserPreferences() {\n return useMemo(() => ({\n theme: 'system' as 'light' | 'dark' | 'system',\n language: 'en',\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n emailNotifications: true,\n }), []);\n}\n\n/**\n * Hook for checking user permissions\n */\nexport function usePermissions() {\n const { isFullyAuthenticated, backendUser } = useAuth();\n\n return useMemo(() => {\n if (!isFullyAuthenticated || !backendUser) {\n return { canRead: false, canWrite: false, canAdmin: false, canManageUsers: false };\n }\n return { canRead: true, canWrite: true, canAdmin: false, canManageUsers: false };\n }, [backendUser, isFullyAuthenticated]);\n}\n"],"names":["useAuth","session","isLoading","useAuthContext","useMemo","isAuthenticated","user","_a","_b"],"mappings":"uFAMO,SAASA,GAAU,CACxB,KAAM,CAAE,QAAAC,EAAS,UAAAC,CAAA,EAAcC,EAAA,EAE/B,OAAOC,EAAAA,QAAQ,IAAM,SACnB,MAAMC,EAAkB,CAAC,CAACJ,EACpBK,GAAOL,GAAA,YAAAA,EAAS,OAAQ,KAE9B,MAAO,CACL,QAAAA,EACA,KAAAK,EACA,YAAaA,EACb,OAAOL,GAAA,YAAAA,EAAS,QAAS,KAEzB,UAAAC,EACA,gBAAAG,EACA,qBAAsB,CAAC,EAACJ,GAAA,MAAAA,EAAS,OACjC,qBAAsBI,EAEtB,YAAYC,GAAA,YAAAA,EAAM,WAAUC,EAAAD,GAAA,YAAAA,EAAM,QAAN,YAAAC,EAAa,MAAM,KAAK,IACpD,aAAaD,GAAA,YAAAA,EAAM,SAAQE,EAAAF,GAAA,YAAAA,EAAM,QAAN,YAAAE,EAAa,MAAM,KAAK,KAAM,OACzD,WAAWF,GAAA,YAAAA,EAAM,QAAS,KAC1B,SAASA,GAAA,YAAAA,EAAM,UAAW,GAC1B,aAAaA,GAAA,YAAAA,EAAM,cAAe,EAAA,CAEtC,EAAG,CAACL,EAASC,CAAS,CAAC,CACzB"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Docker Compose configuration with Envoy proxy for local development
|
|
2
|
-
version: '3.8'
|
|
3
|
-
|
|
4
|
-
services:
|
|
5
|
-
envoy:
|
|
6
|
-
image: envoyproxy/envoy:v1.28-latest
|
|
7
|
-
ports:
|
|
8
|
-
- "80:80"
|
|
9
|
-
- "9901:9901" # Admin interface
|
|
10
|
-
volumes:
|
|
11
|
-
- ./apps/cli/templates/envoy.yaml:/etc/envoy/envoy.yaml:ro
|
|
12
|
-
depends_on:
|
|
13
|
-
- frontend
|
|
14
|
-
- backend
|
|
15
|
-
networks:
|
|
16
|
-
- semiont
|
|
17
|
-
|
|
18
|
-
frontend:
|
|
19
|
-
image: ghcr.io/the-ai-alliance/semiont-frontend:dev
|
|
20
|
-
environment:
|
|
21
|
-
- SERVER_API_URL=http://backend:4000
|
|
22
|
-
- NEXTAUTH_URL=http://localhost
|
|
23
|
-
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
|
24
|
-
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
|
|
25
|
-
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
|
|
26
|
-
networks:
|
|
27
|
-
- semiont
|
|
28
|
-
|
|
29
|
-
backend:
|
|
30
|
-
image: ghcr.io/the-ai-alliance/semiont-backend:dev
|
|
31
|
-
environment:
|
|
32
|
-
- DATABASE_URL=${DATABASE_URL}
|
|
33
|
-
- JWT_SECRET=${JWT_SECRET}
|
|
34
|
-
networks:
|
|
35
|
-
- semiont
|
|
36
|
-
|
|
37
|
-
postgres:
|
|
38
|
-
image: postgres:16-alpine
|
|
39
|
-
environment:
|
|
40
|
-
- POSTGRES_DB=semiont
|
|
41
|
-
- POSTGRES_USER=semiont
|
|
42
|
-
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
43
|
-
volumes:
|
|
44
|
-
- postgres_data:/var/lib/postgresql/data
|
|
45
|
-
networks:
|
|
46
|
-
- semiont
|
|
47
|
-
|
|
48
|
-
networks:
|
|
49
|
-
semiont:
|
|
50
|
-
driver: bridge
|
|
51
|
-
|
|
52
|
-
volumes:
|
|
53
|
-
postgres_data:
|