@igstack/app-catalog-frontend-core 0.3.1-alpha-20260306003829 → 0.3.1-alpha-20260308004653
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/esm/modules/appCatalog/context/AppCatalogContext.js +1 -1
- package/dist/esm/modules/appCatalog/ui/components/ScreenshotGallery.js +8 -4
- package/dist/esm/modules/appCatalog/ui/components/ScreenshotGallery.js.map +1 -1
- package/dist/esm/modules/appCatalog/ui/filters/FilterBar.js +1 -0
- package/dist/esm/modules/appCatalog/ui/filters/FilterBar.js.map +1 -1
- package/dist/esm/ui/components/error/BaseErrorPage.js +3 -1
- package/dist/esm/ui/components/error/BaseErrorPage.js.map +1 -1
- package/dist/esm/ui/components/header/Header.js +7 -6
- package/dist/esm/ui/components/header/Header.js.map +1 -1
- package/dist/esm/ui/layout/TopLevelProviders.d.ts +1 -1
- package/dist/esm/ui/layout/TopLevelProviders.js +8 -2
- package/dist/esm/ui/layout/TopLevelProviders.js.map +1 -1
- package/dist/esm/ui/visually-hidden.d.ts +4 -0
- package/dist/esm/ui/visually-hidden.js +11 -0
- package/dist/esm/ui/visually-hidden.js.map +1 -0
- package/package.json +3 -3
- package/src/modules/appCatalog/ui/components/ScreenshotGallery.tsx +5 -1
- package/src/modules/appCatalog/ui/filters/FilterBar.tsx +1 -0
- package/src/ui/components/error/BaseErrorPage.tsx +3 -1
- package/src/ui/components/header/Header.tsx +8 -8
- package/src/ui/layout/TopLevelProviders.tsx +5 -2
- package/src/ui/visually-hidden.tsx +10 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
|
3
|
-
import {
|
|
3
|
+
import { createContext, useMemo, useEffect, use } from "react";
|
|
4
4
|
import { ApiQueryMagazineAppCatalog } from "../api/ApiQueryMagazineAppCatalog.js";
|
|
5
5
|
import "@tanstack/react-query-devtools";
|
|
6
6
|
import "next-themes";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { Gallery } from "../../../gallery/Gallery.js";
|
|
4
|
-
import { Dialog, DialogContent } from "../../../../ui/dialog.js";
|
|
4
|
+
import { Dialog, DialogContent, DialogTitle } from "../../../../ui/dialog.js";
|
|
5
|
+
import { VisuallyHidden } from "../../../../ui/visually-hidden.js";
|
|
5
6
|
function ScreenshotGallery({
|
|
6
7
|
app,
|
|
7
8
|
screenshotIds,
|
|
@@ -20,12 +21,15 @@ function ScreenshotGallery({
|
|
|
20
21
|
if (screenshotIds.length === 0) {
|
|
21
22
|
return null;
|
|
22
23
|
}
|
|
23
|
-
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(
|
|
24
25
|
DialogContent,
|
|
25
26
|
{
|
|
26
27
|
className: "h-[85vh] w-full max-w-[calc(100vw-2rem)] sm:max-w-[calc(100vw-3rem)] md:max-w-[calc(100vw-4rem)] p-0 overflow-hidden",
|
|
27
28
|
showCloseButton: true,
|
|
28
|
-
children:
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(DialogTitle, { children: title || `${app.displayName} screenshots` }) }),
|
|
31
|
+
/* @__PURE__ */ jsx(Gallery, { images, initialIndex, title })
|
|
32
|
+
]
|
|
29
33
|
}
|
|
30
34
|
) });
|
|
31
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenshotGallery.js","sources":["../../../../../../src/modules/appCatalog/ui/components/ScreenshotGallery.tsx"],"sourcesContent":["import { useMemo } from 'react'\n\nimport type { AppForCatalog } from '@igstack/app-catalog-backend-core'\n\nimport { Gallery } from '~/modules/gallery/Gallery'\nimport type { GalleryImage } from '~/modules/gallery/Gallery'\nimport { Dialog, DialogContent } from '~/ui/dialog'\n\nexport interface ScreenshotGalleryProps {\n app: AppForCatalog\n screenshotIds: Array<string>\n initialIndex?: number\n open: boolean\n onOpenChange: (open: boolean) => void\n title?: string\n}\n\nexport function ScreenshotGallery({\n app,\n screenshotIds,\n initialIndex = 0,\n open,\n onOpenChange,\n title,\n}: ScreenshotGalleryProps) {\n // Transform screenshot IDs to full URLs\n const images: Array<GalleryImage> = useMemo(\n () =>\n screenshotIds.map((id) => ({\n url: `/api/screenshots/${id}`,\n alt: `${app.displayName} screenshot`,\n })),\n [screenshotIds, app.displayName],\n )\n\n // Don't render if no screenshots\n if (screenshotIds.length === 0) {\n return null\n }\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n className=\"h-[85vh] w-full max-w-[calc(100vw-2rem)] sm:max-w-[calc(100vw-3rem)] md:max-w-[calc(100vw-4rem)] p-0 overflow-hidden\"\n showCloseButton={true}\n >\n <Gallery images={images} initialIndex={initialIndex} title={title} />\n </DialogContent>\n </Dialog>\n )\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScreenshotGallery.js","sources":["../../../../../../src/modules/appCatalog/ui/components/ScreenshotGallery.tsx"],"sourcesContent":["import { useMemo } from 'react'\n\nimport type { AppForCatalog } from '@igstack/app-catalog-backend-core'\n\nimport { Gallery } from '~/modules/gallery/Gallery'\nimport type { GalleryImage } from '~/modules/gallery/Gallery'\nimport { Dialog, DialogContent, DialogTitle } from '~/ui/dialog'\nimport { VisuallyHidden } from '~/ui/visually-hidden'\n\nexport interface ScreenshotGalleryProps {\n app: AppForCatalog\n screenshotIds: Array<string>\n initialIndex?: number\n open: boolean\n onOpenChange: (open: boolean) => void\n title?: string\n}\n\nexport function ScreenshotGallery({\n app,\n screenshotIds,\n initialIndex = 0,\n open,\n onOpenChange,\n title,\n}: ScreenshotGalleryProps) {\n // Transform screenshot IDs to full URLs\n const images: Array<GalleryImage> = useMemo(\n () =>\n screenshotIds.map((id) => ({\n url: `/api/screenshots/${id}`,\n alt: `${app.displayName} screenshot`,\n })),\n [screenshotIds, app.displayName],\n )\n\n // Don't render if no screenshots\n if (screenshotIds.length === 0) {\n return null\n }\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent\n className=\"h-[85vh] w-full max-w-[calc(100vw-2rem)] sm:max-w-[calc(100vw-3rem)] md:max-w-[calc(100vw-4rem)] p-0 overflow-hidden\"\n showCloseButton={true}\n >\n <VisuallyHidden>\n <DialogTitle>{title || `${app.displayName} screenshots`}</DialogTitle>\n </VisuallyHidden>\n <Gallery images={images} initialIndex={initialIndex} title={title} />\n </DialogContent>\n </Dialog>\n )\n}\n"],"names":[],"mappings":";;;;;AAkBO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AACF,GAA2B;AAEzB,QAAM,SAA8B;AAAA,IAClC,MACE,cAAc,IAAI,CAAC,QAAQ;AAAA,MACzB,KAAK,oBAAoB,EAAE;AAAA,MAC3B,KAAK,GAAG,IAAI,WAAW;AAAA,IAAA,EACvB;AAAA,IACJ,CAAC,eAAe,IAAI,WAAW;AAAA,EAAA;AAIjC,MAAI,cAAc,WAAW,GAAG;AAC9B,WAAO;AAAA,EACT;AAEA,SACE,oBAAC,QAAA,EAAO,MAAY,cAClB,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,iBAAiB;AAAA,MAEjB,UAAA;AAAA,QAAA,oBAAC,gBAAA,EACC,8BAAC,aAAA,EAAa,UAAA,SAAS,GAAG,IAAI,WAAW,gBAAe,EAAA,CAC1D;AAAA,QACA,oBAAC,SAAA,EAAQ,QAAgB,cAA4B,MAAA,CAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEvE;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterBar.js","sources":["../../../../../../src/modules/appCatalog/ui/filters/FilterBar.tsx"],"sourcesContent":["import type { AppForCatalog } from '@igstack/app-catalog-backend-core'\nimport { X } from 'lucide-react'\nimport { useMemo } from 'react'\nimport { Button } from '~/ui/button'\nimport { Checkbox } from '~/ui/checkbox'\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from '~/ui/input-group'\nimport { Label } from '~/ui/label'\nimport { useAppCatalogFilters } from '../context/AppCatalogFiltersContext'\nimport { FilterCombobox } from './FilterCombobox'\n\ninterface FilterBarProps {\n /** Total number of apps (respecting deprecated filter) */\n totalCount: number\n /** Number of apps in \"My Recent\" */\n recentCount: number\n /** Number of deprecated apps (total) */\n deprecatedCount: number\n /** All apps for counting filter options */\n apps: Array<AppForCatalog>\n}\n\n/**\n * Horizontal filter bar with All/My Recent toggle, dynamic tag filter comboboxes, and search.\n * Filters are mutually exclusive: Recent clears tag filters, tag filters clear Recent.\n * All discovery controls are grouped together.\n */\nexport function FilterBar({\n totalCount,\n recentCount,\n deprecatedCount,\n apps,\n}: FilterBarProps) {\n const { state, data, actions } = useAppCatalogFilters()\n\n // Check if \"Show All\" mode is truly active (no filters at all)\n const isShowAllActive =\n !state.recentMode && Object.keys(state.tagFilters).length === 0\n\n // Calculate counts for each filter option (respecting showDeprecated)\n const filterOptionCounts = useMemo(() => {\n const counts: Record<string, Record<string, number>> = {}\n\n // Filter apps by deprecated setting first\n const baseApps = state.showDeprecated\n ? apps\n : apps.filter((app) => !app.deprecated)\n\n state.filterableTagPrefixes.forEach((prefix) => {\n const prefixCounts: Record<string, number> = {}\n const options = data.availableTagsByPrefix[prefix] || []\n\n options.forEach((option) => {\n const fullTag = `${prefix}:${option.value}`\n const count = baseApps.filter((app) =>\n app.tags?.some((tag) => tag.toLowerCase() === fullTag.toLowerCase()),\n ).length\n prefixCounts[option.value] = count\n })\n\n counts[prefix] = prefixCounts\n })\n\n return counts\n }, [\n apps,\n state.showDeprecated,\n state.filterableTagPrefixes,\n data.availableTagsByPrefix,\n ])\n\n return (\n <div className=\"flex items-center gap-3 mb-4\">\n {/* Search input */}\n <InputGroup className=\"max-w-sm\">\n <InputGroupInput\n value={state.searchValue}\n onChange={(e) => actions.setSearchValue(e.target.value)}\n onFocus={(e) => e.target.select()}\n placeholder=\"Search apps by name, description, or tags…\"\n aria-label=\"Search apps\"\n />\n {state.searchValue && (\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n size=\"icon-xs\"\n onClick={() => actions.setSearchValue('')}\n aria-label=\"Clear search\"\n >\n <X />\n </InputGroupButton>\n </InputGroupAddon>\n )}\n </InputGroup>\n\n {/* Vertical divider */}\n <div className=\"h-8 w-px bg-border\" />\n\n {/* Show All / My Recent toggle group */}\n <div className=\"flex items-center rounded-md border\">\n <Button\n variant={isShowAllActive ? 'default' : 'ghost'}\n size=\"sm\"\n onClick={() => actions.setRecentMode(false)}\n className=\"rounded-r-none border-r\"\n >\n Show All ({totalCount})\n </Button>\n <Button\n variant={state.recentMode ? 'default' : 'ghost'}\n size=\"sm\"\n onClick={() => actions.setRecentMode(true)}\n className=\"rounded-l-none\"\n disabled={recentCount === 0}\n >\n My Recent ({recentCount})\n </Button>\n </div>\n\n {/* Vertical divider */}\n {state.filterableTagPrefixes.length > 0 && (\n <div className=\"h-8 w-px bg-border\" />\n )}\n\n {/* Dynamic tag filter comboboxes */}\n {state.filterableTagPrefixes.map((prefix) => {\n const options = data.availableTagsByPrefix[prefix] || []\n const value = state.tagFilters[prefix]\n const counts = filterOptionCounts[prefix] || {}\n\n // Create \"Filter By <Name>\" label\n const displayName =\n prefix.charAt(0).toUpperCase() + prefix.slice(1).replace(/-/g, ' ')\n const label = `Filter By ${displayName}`\n\n return (\n <FilterCombobox\n key={prefix}\n prefix={prefix}\n label={label}\n options={options}\n value={value}\n counts={counts}\n onValueChange={(newValue) => actions.setTagFilter(prefix, newValue)}\n />\n )\n })}\n\n {/* Vertical divider before deprecated checkbox */}\n <div className=\"h-8 w-px bg-border\" />\n\n {/* Show Deprecated Apps checkbox */}\n <div className=\"flex items-center gap-2\">\n <Checkbox\n id=\"show-deprecated\"\n checked={state.showDeprecated}\n onCheckedChange={(checked) =>\n actions.setShowDeprecated(checked === true)\n }\n />\n <Label\n htmlFor=\"show-deprecated\"\n className=\"text-sm font-normal cursor-pointer\"\n >\n Show Deprecated Apps ({deprecatedCount})\n </Label>\n </div>\n </div>\n )\n}\n"],"names":[],"mappings":";;;;;;;;;AA+BO,SAAS,UAAU;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAmB;AACjB,QAAM,EAAE,OAAO,MAAM,QAAA,IAAY,qBAAA;AAGjC,QAAM,kBACJ,CAAC,MAAM,cAAc,OAAO,KAAK,MAAM,UAAU,EAAE,WAAW;AAGhE,QAAM,qBAAqB,QAAQ,MAAM;AACvC,UAAM,SAAiD,CAAA;AAGvD,UAAM,WAAW,MAAM,iBACnB,OACA,KAAK,OAAO,CAAC,QAAQ,CAAC,IAAI,UAAU;AAExC,UAAM,sBAAsB,QAAQ,CAAC,WAAW;AAC9C,YAAM,eAAuC,CAAA;AAC7C,YAAM,UAAU,KAAK,sBAAsB,MAAM,KAAK,CAAA;AAEtD,cAAQ,QAAQ,CAAC,WAAW;AAC1B,cAAM,UAAU,GAAG,MAAM,IAAI,OAAO,KAAK;AACzC,cAAM,QAAQ,SAAS;AAAA,UAAO,CAAC,QAAA;;AAC7B,6BAAI,SAAJ,mBAAU,KAAK,CAAC,QAAQ,IAAI,YAAA,MAAkB,QAAQ,YAAA;AAAA;AAAA,QAAa,EACnE;AACF,qBAAa,OAAO,KAAK,IAAI;AAAA,MAC/B,CAAC;AAED,aAAO,MAAM,IAAI;AAAA,IACnB,CAAC;AAED,WAAO;AAAA,EACT,GAAG;AAAA,IACD;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,KAAK;AAAA,EAAA,CACN;AAED,SACE,qBAAC,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A,EAAI,WAAU,sBAAqB;AAAA,IAIrC,MAAM,sBAAsB,IAAI,CAAC,WAAW;AAC3C,YAAM,UAAU,KAAK,sBAAsB,MAAM,KAAK,CAAA;AACtD,YAAM,QAAQ,MAAM,WAAW,MAAM;AACrC,YAAM,SAAS,mBAAmB,MAAM,KAAK,CAAA;AAG7C,YAAM,cACJ,OAAO,OAAO,CAAC,EAAE,YAAA,IAAgB,OAAO,MAAM,CAAC,EAAE,QAAQ,MAAM,GAAG;AACpE,YAAM,QAAQ,aAAa,WAAW;AAEtC,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,eAAe,CAAC,aAAa,QAAQ,aAAa,QAAQ,QAAQ;AAAA,QAAA;AAAA,QAN7D;AAAA,MAAA;AAAA,IASX,CAAC;AAAA,IAGD,oBAAC,OAAA,EAAI,WAAU,qBAAA,CAAqB;AAAA,IAGpC,qBAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAG;AAAA,UACH,SAAS,MAAM;AAAA,UACf,iBAAiB,CAAC,YAChB,QAAQ,kBAAkB,YAAY,IAAI;AAAA,QAAA;AAAA,MAAA;AAAA,MAG9C;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAAQ;AAAA,UACR,WAAU;AAAA,UACX,UAAA;AAAA,YAAA;AAAA,YACwB;AAAA,YAAgB;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACzC,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"FilterBar.js","sources":["../../../../../../src/modules/appCatalog/ui/filters/FilterBar.tsx"],"sourcesContent":["import type { AppForCatalog } from '@igstack/app-catalog-backend-core'\nimport { X } from 'lucide-react'\nimport { useMemo } from 'react'\nimport { Button } from '~/ui/button'\nimport { Checkbox } from '~/ui/checkbox'\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from '~/ui/input-group'\nimport { Label } from '~/ui/label'\nimport { useAppCatalogFilters } from '../context/AppCatalogFiltersContext'\nimport { FilterCombobox } from './FilterCombobox'\n\ninterface FilterBarProps {\n /** Total number of apps (respecting deprecated filter) */\n totalCount: number\n /** Number of apps in \"My Recent\" */\n recentCount: number\n /** Number of deprecated apps (total) */\n deprecatedCount: number\n /** All apps for counting filter options */\n apps: Array<AppForCatalog>\n}\n\n/**\n * Horizontal filter bar with All/My Recent toggle, dynamic tag filter comboboxes, and search.\n * Filters are mutually exclusive: Recent clears tag filters, tag filters clear Recent.\n * All discovery controls are grouped together.\n */\nexport function FilterBar({\n totalCount,\n recentCount,\n deprecatedCount,\n apps,\n}: FilterBarProps) {\n const { state, data, actions } = useAppCatalogFilters()\n\n // Check if \"Show All\" mode is truly active (no filters at all)\n const isShowAllActive =\n !state.recentMode && Object.keys(state.tagFilters).length === 0\n\n // Calculate counts for each filter option (respecting showDeprecated)\n const filterOptionCounts = useMemo(() => {\n const counts: Record<string, Record<string, number>> = {}\n\n // Filter apps by deprecated setting first\n const baseApps = state.showDeprecated\n ? apps\n : apps.filter((app) => !app.deprecated)\n\n state.filterableTagPrefixes.forEach((prefix) => {\n const prefixCounts: Record<string, number> = {}\n const options = data.availableTagsByPrefix[prefix] || []\n\n options.forEach((option) => {\n const fullTag = `${prefix}:${option.value}`\n const count = baseApps.filter((app) =>\n app.tags?.some((tag) => tag.toLowerCase() === fullTag.toLowerCase()),\n ).length\n prefixCounts[option.value] = count\n })\n\n counts[prefix] = prefixCounts\n })\n\n return counts\n }, [\n apps,\n state.showDeprecated,\n state.filterableTagPrefixes,\n data.availableTagsByPrefix,\n ])\n\n return (\n <div className=\"flex items-center gap-3 mb-4\">\n {/* Search input */}\n <InputGroup className=\"max-w-sm\">\n <InputGroupInput\n autoFocus\n value={state.searchValue}\n onChange={(e) => actions.setSearchValue(e.target.value)}\n onFocus={(e) => e.target.select()}\n placeholder=\"Search apps by name, description, or tags…\"\n aria-label=\"Search apps\"\n />\n {state.searchValue && (\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton\n size=\"icon-xs\"\n onClick={() => actions.setSearchValue('')}\n aria-label=\"Clear search\"\n >\n <X />\n </InputGroupButton>\n </InputGroupAddon>\n )}\n </InputGroup>\n\n {/* Vertical divider */}\n <div className=\"h-8 w-px bg-border\" />\n\n {/* Show All / My Recent toggle group */}\n <div className=\"flex items-center rounded-md border\">\n <Button\n variant={isShowAllActive ? 'default' : 'ghost'}\n size=\"sm\"\n onClick={() => actions.setRecentMode(false)}\n className=\"rounded-r-none border-r\"\n >\n Show All ({totalCount})\n </Button>\n <Button\n variant={state.recentMode ? 'default' : 'ghost'}\n size=\"sm\"\n onClick={() => actions.setRecentMode(true)}\n className=\"rounded-l-none\"\n disabled={recentCount === 0}\n >\n My Recent ({recentCount})\n </Button>\n </div>\n\n {/* Vertical divider */}\n {state.filterableTagPrefixes.length > 0 && (\n <div className=\"h-8 w-px bg-border\" />\n )}\n\n {/* Dynamic tag filter comboboxes */}\n {state.filterableTagPrefixes.map((prefix) => {\n const options = data.availableTagsByPrefix[prefix] || []\n const value = state.tagFilters[prefix]\n const counts = filterOptionCounts[prefix] || {}\n\n // Create \"Filter By <Name>\" label\n const displayName =\n prefix.charAt(0).toUpperCase() + prefix.slice(1).replace(/-/g, ' ')\n const label = `Filter By ${displayName}`\n\n return (\n <FilterCombobox\n key={prefix}\n prefix={prefix}\n label={label}\n options={options}\n value={value}\n counts={counts}\n onValueChange={(newValue) => actions.setTagFilter(prefix, newValue)}\n />\n )\n })}\n\n {/* Vertical divider before deprecated checkbox */}\n <div className=\"h-8 w-px bg-border\" />\n\n {/* Show Deprecated Apps checkbox */}\n <div className=\"flex items-center gap-2\">\n <Checkbox\n id=\"show-deprecated\"\n checked={state.showDeprecated}\n onCheckedChange={(checked) =>\n actions.setShowDeprecated(checked === true)\n }\n />\n <Label\n htmlFor=\"show-deprecated\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AK,CAAA;AAG7C,YAAM,cACJ,OAAO,OAAO,CAAC,EAAE,YAAA,IAAgB,OAAO,MAAM,CAAC,EAAE,QAAQ,MAAM,GAAG;AACpE,YAAM,QAAQ,aAAa,WAAW;AAEtC,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,eAAe,CAAC,aAAa,QAAQ,aAAa,QAAQ,QAAQ;AAAA,QAAA;AAAA,QAN7D;AAAA,MAAA;AAAA,IASX,CAAC;AAAA,IAGD,oBAAC,OAAA,EAAI,WAAU,qBAAA,CAAqB;AAAA,IAGpC,qBAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAG;AAAA,UACH,SAAS,MAAM;AAAA,UACf,iBAAiB,CAAC,YAChB,QAAQ,kBAAkB,YAAY,IAAI;AAAA,QAAA;AAAA,MAAA;AAAA,MAG9C;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAAQ;AAAA,UACR,WAAU;AAAA,UACX,UAAA;AAAA,YAAA;AAAA,YACwB;AAAA,YAAgB;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACzC,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -3,11 +3,13 @@ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
|
|
3
3
|
import { TanStackRouterDevtools } from "../../../node_modules/.pnpm/@tanstack_react-router-devtools@1.151.6_@tanstack_react-router@1.151.6_react-dom@19.1.2_20b78d099e847743bc64b4d051c71d30/node_modules/@tanstack/react-router-devtools/dist/esm/index.js";
|
|
4
4
|
import { MainLayout } from "../../layout/MainLayout.js";
|
|
5
5
|
import { TopLevelProvidersForErrors } from "../../layout/TopLevelProvidersForErrors.js";
|
|
6
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
6
7
|
function BaseErrorPage({ children }) {
|
|
8
|
+
const queryClient = useQueryClient();
|
|
7
9
|
return /* @__PURE__ */ jsx(TopLevelProvidersForErrors, { children: /* @__PURE__ */ jsxs(MainLayout, { children: [
|
|
8
10
|
children,
|
|
9
11
|
/* @__PURE__ */ jsx(TanStackRouterDevtools, {}),
|
|
10
|
-
/* @__PURE__ */ jsx(ReactQueryDevtools, { initialIsOpen: false })
|
|
12
|
+
/* @__PURE__ */ jsx(ReactQueryDevtools, { initialIsOpen: false, client: queryClient })
|
|
11
13
|
] }) });
|
|
12
14
|
}
|
|
13
15
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseErrorPage.js","sources":["../../../../../src/ui/components/error/BaseErrorPage.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { ReactQueryDevtools } from '@tanstack/react-query-devtools'\nimport { TanStackRouterDevtools } from '@tanstack/react-router-devtools'\nimport { MainLayout } from '~/ui/layout/MainLayout'\nimport { TopLevelProvidersForErrors } from '~/ui/layout/TopLevelProvidersForErrors'\n\nexport interface BaseErrorPageProps {\n children: ReactNode\n}\n\n/**\n * Common base component for all error pages\n * Provides consistent layout with TopLevelProvidersForErrors and MainLayout\n * Error pages should render their content as children of this component\n */\nexport function BaseErrorPage({ children }: BaseErrorPageProps) {\n return (\n <TopLevelProvidersForErrors>\n <MainLayout>\n {children}\n <TanStackRouterDevtools />\n <ReactQueryDevtools initialIsOpen={false} />\n </MainLayout>\n </TopLevelProvidersForErrors>\n )\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseErrorPage.js","sources":["../../../../../src/ui/components/error/BaseErrorPage.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { ReactQueryDevtools } from '@tanstack/react-query-devtools'\nimport { TanStackRouterDevtools } from '@tanstack/react-router-devtools'\nimport { MainLayout } from '~/ui/layout/MainLayout'\nimport { TopLevelProvidersForErrors } from '~/ui/layout/TopLevelProvidersForErrors'\nimport { useQueryClient } from '@tanstack/react-query'\n\nexport interface BaseErrorPageProps {\n children: ReactNode\n}\n\n/**\n * Common base component for all error pages\n * Provides consistent layout with TopLevelProvidersForErrors and MainLayout\n * Error pages should render their content as children of this component\n */\nexport function BaseErrorPage({ children }: BaseErrorPageProps) {\n const queryClient = useQueryClient()\n return (\n <TopLevelProvidersForErrors>\n <MainLayout>\n {children}\n <TanStackRouterDevtools />\n <ReactQueryDevtools initialIsOpen={false} client={queryClient} />\n </MainLayout>\n </TopLevelProvidersForErrors>\n )\n}\n"],"names":[],"mappings":";;;;;;AAgBO,SAAS,cAAc,EAAE,YAAgC;AAC9D,QAAM,cAAc,eAAA;AACpB,SACE,oBAAC,4BAAA,EACC,UAAA,qBAAC,YAAA,EACE,UAAA;AAAA,IAAA;AAAA,wBACA,wBAAA,EAAuB;AAAA,IACxB,oBAAC,oBAAA,EAAmB,eAAe,OAAO,QAAQ,YAAA,CAAa;AAAA,EAAA,EAAA,CACjE,EAAA,CACF;AAEJ;"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Link } from "@tanstack/react-router";
|
|
3
3
|
import { LogOut } from "lucide-react";
|
|
4
|
+
import { use } from "react";
|
|
4
5
|
import SvgAppCatalog from "../../../assets/app-catalog.svg.js";
|
|
5
6
|
import { ThemeSwitcher } from "../../../components/ThemeSwitcher.js";
|
|
6
|
-
import {
|
|
7
|
+
import { AppCatalogContext } from "../../../modules/appCatalog/context/AppCatalogContext.js";
|
|
7
8
|
import { useAuth, useIsAuthenticated, useUser } from "../../../modules/auth/AuthContext.js";
|
|
8
9
|
import { useAuthActions } from "../../../modules/auth/useAuthActions.js";
|
|
9
10
|
import { useAuthModal } from "../../../modules/auth/AuthModalContext.js";
|
|
@@ -17,7 +18,7 @@ function Header({ middle }) {
|
|
|
17
18
|
const user = useUser();
|
|
18
19
|
const { logout } = useAuthActions();
|
|
19
20
|
const { open: openLoginModal } = useAuthModal();
|
|
20
|
-
const
|
|
21
|
+
const appCatalogContextMaybe = use(AppCatalogContext);
|
|
21
22
|
const handleLogout = async () => {
|
|
22
23
|
try {
|
|
23
24
|
await logout();
|
|
@@ -34,17 +35,17 @@ function Header({ middle }) {
|
|
|
34
35
|
/* @__PURE__ */ jsx(SvgAppCatalog, { className: "h-16 w-16" }),
|
|
35
36
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
36
37
|
/* @__PURE__ */ jsx("span", { className: "text-lg font-bold", children: "App Catalog" }),
|
|
37
|
-
appVersion && (appVersion.url ? /* @__PURE__ */ jsx(
|
|
38
|
+
(appCatalogContextMaybe == null ? void 0 : appCatalogContextMaybe.appVersion) && (appCatalogContextMaybe.appVersion.url ? /* @__PURE__ */ jsx(
|
|
38
39
|
"a",
|
|
39
40
|
{
|
|
40
|
-
href: appVersion.url,
|
|
41
|
+
href: appCatalogContextMaybe.appVersion.url,
|
|
41
42
|
target: "_blank",
|
|
42
43
|
rel: "noopener noreferrer",
|
|
43
44
|
className: "text-xs text-primary hover:text-primary/80 transition-colors font-medium py-0.5",
|
|
44
45
|
onClick: (e) => e.stopPropagation(),
|
|
45
|
-
children: appVersion.displayName
|
|
46
|
+
children: appCatalogContextMaybe.appVersion.displayName
|
|
46
47
|
}
|
|
47
|
-
) : /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground py-0.5", children: appVersion.displayName }))
|
|
48
|
+
) : /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground py-0.5", children: appCatalogContextMaybe.appVersion.displayName }))
|
|
48
49
|
] })
|
|
49
50
|
] }) }) }),
|
|
50
51
|
middle && /* @__PURE__ */ jsx("div", { className: "flex-1", children: middle }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../../../../src/ui/components/header/Header.tsx"],"sourcesContent":["import { Link } from '@tanstack/react-router'\nimport { LogOut } from 'lucide-react'\nimport
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../../../../src/ui/components/header/Header.tsx"],"sourcesContent":["import { Link } from '@tanstack/react-router'\nimport { LogOut } from 'lucide-react'\nimport React, { use } from 'react'\nimport AppCatalogLogo from '~/assets/app-catalog.svg?react'\nimport { ThemeSwitcher } from '~/components/ThemeSwitcher'\nimport { AppCatalogContext } from '~/modules/appCatalog/context/AppCatalogContext'\nimport {\n useAuth,\n useAuthActions,\n useIsAuthenticated,\n useUser,\n} from '~/modules/auth'\nimport { useAuthModal } from '~/modules/auth/AuthModalContext'\nimport { Button } from '~/ui/button'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '~/ui/dropdown-menu'\nimport { Skeleton } from '~/ui/skeleton'\n\nexport interface HeaderProps {\n middle?: React.ReactNode\n}\n\nexport function Header({ middle }: HeaderProps) {\n const { isLoading } = useAuth()\n const isAuthenticated = useIsAuthenticated()\n const user = useUser()\n const { logout } = useAuthActions()\n const { open: openLoginModal } = useAuthModal()\n const appCatalogContextMaybe = use(AppCatalogContext)\n\n const handleLogout = async () => {\n try {\n await logout()\n } catch (error) {\n console.error('Logout failed:', error)\n }\n }\n\n const handleLoginClick = () => {\n // Preserve the current URL for redirect after login\n const currentUrl = window.location.pathname + window.location.search\n openLoginModal(currentUrl)\n }\n\n return (\n <div className=\"flex items-center mb-4 pb-4 gap-4 border-b\">\n <div className=\"flex items-center gap-4\">\n <Link to=\"/\">\n <div className=\"flex items-center gap-2\">\n <AppCatalogLogo className=\"h-16 w-16\" />\n <div className=\"flex flex-col\">\n <span className=\"text-lg font-bold\">App Catalog</span>\n {appCatalogContextMaybe?.appVersion &&\n (appCatalogContextMaybe.appVersion.url ? (\n <a\n href={appCatalogContextMaybe.appVersion.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-xs text-primary hover:text-primary/80 transition-colors font-medium py-0.5\"\n onClick={(e) => e.stopPropagation()}\n >\n {appCatalogContextMaybe.appVersion.displayName}\n </a>\n ) : (\n <span className=\"text-xs text-muted-foreground py-0.5\">\n {appCatalogContextMaybe.appVersion.displayName}\n </span>\n ))}\n </div>\n </div>\n </Link>\n </div>\n {middle && <div className=\"flex-1\">{middle}</div>}\n <div className=\"flex items-center gap-3 ml-auto\">\n <ThemeSwitcher />\n {isLoading ? (\n <Skeleton className=\"w-8 h-8 rounded-full\" />\n ) : !isAuthenticated ? (\n <button\n type=\"button\"\n onClick={handleLoginClick}\n className=\"text-sm font-medium text-muted-foreground hover:text-foreground cursor-pointer\"\n >\n Login\n </button>\n ) : user?.name ? (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"w-8 h-8 rounded-full p-0 hover:bg-accent hover:text-accent-foreground cursor-pointer\"\n >\n {user.image ? (\n <img\n src={user.image}\n alt={user.name}\n className=\"w-full h-full rounded-full object-cover\"\n />\n ) : (\n <div className=\"flex items-center justify-center w-full h-full rounded-full bg-primary text-primary-foreground text-xs font-semibold\">\n {user.name.charAt(0).toUpperCase()}\n </div>\n )}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n <div className=\"px-2 py-3 flex items-center gap-3\">\n {user.image ? (\n <img\n src={user.image}\n alt={user.name}\n className=\"w-10 h-10 rounded-full object-cover shrink-0\"\n />\n ) : (\n <div className=\"flex items-center justify-center w-10 h-10 rounded-full bg-primary text-primary-foreground text-sm font-semibold shrink-0\">\n {user.name.charAt(0).toUpperCase()}\n </div>\n )}\n <div className=\"flex flex-col min-w-0\">\n <p className=\"text-xs text-muted-foreground truncate\">\n @{user.email?.split('@')[0] || 'user'}\n </p>\n <p className=\"text-sm font-medium truncate\">{user.name}</p>\n </div>\n </div>\n <DropdownMenuSeparator />\n <DropdownMenuItem onClick={handleLogout}>\n <LogOut className=\"h-4 w-4 mr-2\" />\n <span>Sign out</span>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n ) : null}\n </div>\n </div>\n )\n}\n"],"names":["AppCat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KAAK,OAAM;AAAA,cAAA,GACjC;AAAA,cACA,oBAAC,KAAA,EAAE,WAAU,gCAAgC,eAAK,KAAA,CAAK;AAAA,YAAA,EAAA,CACzD;AAAA,UAAA,GACF;AAAA,8BACC,uBAAA,EAAsB;AAAA,UACvB,qBAAC,kBAAA,EAAiB,SAAS,cACzB,UAAA;AAAA,YAAA,oBAAC,QAAA,EAAO,WAAU,eAAA,CAAe;AAAA,YACjC,oBAAC,UAAK,UAAA,WAAA,CAAQ;AAAA,UAAA,EAAA,CAChB;AAAA,QAAA,EAAA,CACF;AAAA,MAAA,EAAA,CACF,IACE;AAAA,IAAA,EAAA,CACN;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -7,4 +7,4 @@ export interface MainLayoutProps {
|
|
|
7
7
|
queryClient: QueryClient;
|
|
8
8
|
trpcClient: TRPCClient<TRPCRouter>;
|
|
9
9
|
}
|
|
10
|
-
export declare function TopLevelProviders({ children }: MainLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function TopLevelProviders({ children, queryClient }: MainLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,7 +11,7 @@ import { makePluginInterfaceForCore } from "../../modules/pluginCore/makePluginM
|
|
|
11
11
|
import { PluginManagerContextProvider } from "../../modules/pluginCore/PluginManagerContext.js";
|
|
12
12
|
import { TooltipProvider } from "../tooltip.js";
|
|
13
13
|
import { LoadingScreen } from "./LoadingScreen.js";
|
|
14
|
-
function TopLevelProviders({ children }) {
|
|
14
|
+
function TopLevelProviders({ children, queryClient }) {
|
|
15
15
|
const [plugins] = useState(() => [
|
|
16
16
|
// Future plugins can be added here
|
|
17
17
|
]);
|
|
@@ -34,7 +34,13 @@ function TopLevelProviders({ children }) {
|
|
|
34
34
|
children,
|
|
35
35
|
/* @__PURE__ */ jsx(LoginModal, {}),
|
|
36
36
|
/* @__PURE__ */ jsx(TanStackRouterDevtools, {}),
|
|
37
|
-
/* @__PURE__ */ jsx(
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
ReactQueryDevtools,
|
|
39
|
+
{
|
|
40
|
+
initialIsOpen: false,
|
|
41
|
+
client: queryClient
|
|
42
|
+
}
|
|
43
|
+
)
|
|
38
44
|
]
|
|
39
45
|
}
|
|
40
46
|
) }) }) }) }) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopLevelProviders.js","sources":["../../../../src/ui/layout/TopLevelProviders.tsx"],"sourcesContent":["import React, { Suspense, useMemo, useState } from 'react'\n\nimport type { TRPCRouter } from '@igstack/app-catalog-backend-core'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { ReactQueryDevtools } from '@tanstack/react-query-devtools'\nimport { TanStackRouterDevtools } from '@tanstack/react-router-devtools'\nimport type { TRPCClient } from '@trpc/client'\nimport { ThemeProvider } from '~/components/theme-provider'\nimport { AuthProvider } from '~/modules/auth'\nimport { AuthModalProvider } from '~/modules/auth/AuthModalContext'\nimport { LoginModal } from '~/modules/auth/ui/LoginModal'\nimport { GlobalConfigProvider } from '~/modules/config/GlobalConfigContext'\nimport { makePluginInterfaceForCore } from '~/modules/pluginCore/makePluginManagerContext'\nimport { PluginManagerContextProvider } from '~/modules/pluginCore/PluginManagerContext'\nimport { TooltipProvider } from '~/ui/tooltip'\nimport { LoadingScreen } from './LoadingScreen'\n\nexport interface MainLayoutProps {\n children: React.ReactNode\n queryClient: QueryClient\n trpcClient: TRPCClient<TRPCRouter>\n}\n\nexport function TopLevelProviders({ children }: MainLayoutProps) {\n // const { data, failureCount, failureReason } = useQueryBootstrapConfig()\n const [plugins] = useState(() => [\n // Future plugins can be added here\n ])\n\n const pluginInterfaceForCore = useMemo(() => {\n return makePluginInterfaceForCore(plugins)\n }, [plugins])\n\n // if (!data) {\n // return <LoadingScreen label='configuration' failureCount={failureCount} failureReason={failureReason?.message} />\n // }\n\n return (\n <ThemeProvider\n attribute=\"class\"\n defaultTheme=\"system\"\n enableSystem\n disableTransitionOnChange\n >\n <TooltipProvider>\n <AuthModalProvider>\n <AuthProvider>\n <Suspense fallback={<LoadingScreen />}>\n <GlobalConfigProvider>\n <PluginManagerContextProvider\n plugins={plugins}\n pluginInterfaceForCore={pluginInterfaceForCore}\n >\n {children}\n <LoginModal />\n <TanStackRouterDevtools />\n <ReactQueryDevtools
|
|
1
|
+
{"version":3,"file":"TopLevelProviders.js","sources":["../../../../src/ui/layout/TopLevelProviders.tsx"],"sourcesContent":["import React, { Suspense, useMemo, useState } from 'react'\n\nimport type { TRPCRouter } from '@igstack/app-catalog-backend-core'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { ReactQueryDevtools } from '@tanstack/react-query-devtools'\nimport { TanStackRouterDevtools } from '@tanstack/react-router-devtools'\nimport type { TRPCClient } from '@trpc/client'\nimport { ThemeProvider } from '~/components/theme-provider'\nimport { AuthProvider } from '~/modules/auth'\nimport { AuthModalProvider } from '~/modules/auth/AuthModalContext'\nimport { LoginModal } from '~/modules/auth/ui/LoginModal'\nimport { GlobalConfigProvider } from '~/modules/config/GlobalConfigContext'\nimport { makePluginInterfaceForCore } from '~/modules/pluginCore/makePluginManagerContext'\nimport { PluginManagerContextProvider } from '~/modules/pluginCore/PluginManagerContext'\nimport { TooltipProvider } from '~/ui/tooltip'\nimport { LoadingScreen } from './LoadingScreen'\n\nexport interface MainLayoutProps {\n children: React.ReactNode\n queryClient: QueryClient\n trpcClient: TRPCClient<TRPCRouter>\n}\n\nexport function TopLevelProviders({ children, queryClient }: MainLayoutProps) {\n // const { data, failureCount, failureReason } = useQueryBootstrapConfig()\n const [plugins] = useState(() => [\n // Future plugins can be added here\n ])\n\n const pluginInterfaceForCore = useMemo(() => {\n return makePluginInterfaceForCore(plugins)\n }, [plugins])\n\n // if (!data) {\n // return <LoadingScreen label='configuration' failureCount={failureCount} failureReason={failureReason?.message} />\n // }\n\n return (\n <ThemeProvider\n attribute=\"class\"\n defaultTheme=\"system\"\n enableSystem\n disableTransitionOnChange\n >\n <TooltipProvider>\n <AuthModalProvider>\n <AuthProvider>\n <Suspense fallback={<LoadingScreen />}>\n <GlobalConfigProvider>\n <PluginManagerContextProvider\n plugins={plugins}\n pluginInterfaceForCore={pluginInterfaceForCore}\n >\n {children}\n <LoginModal />\n <TanStackRouterDevtools />\n <ReactQueryDevtools\n initialIsOpen={false}\n client={queryClient}\n />\n </PluginManagerContextProvider>\n </GlobalConfigProvider>\n </Suspense>\n </AuthProvider>\n </AuthModalProvider>\n </TooltipProvider>\n </ThemeProvider>\n )\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAuBO,SAAS,kBAAkB,EAAE,UAAU,eAAgC;AAE5E,QAAM,CAAC,OAAO,IAAI,SAAS,MAAM;AAAA;AAAA,EAAA,CAEhC;AAED,QAAM,yBAAyB,QAAQ,MAAM;AAC3C,WAAO,2BAAkC;AAAA,EAC3C,GAAG,CAAC,OAAO,CAAC;AAMZ,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,cAAa;AAAA,MACb,cAAY;AAAA,MACZ,2BAAyB;AAAA,MAEzB,UAAA,oBAAC,iBAAA,EACC,UAAA,oBAAC,mBAAA,EACC,UAAA,oBAAC,cAAA,EACC,UAAA,oBAAC,UAAA,EAAS,UAAU,oBAAC,eAAA,CAAA,CAAc,GACjC,8BAAC,sBAAA,EACC,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UAEC,UAAA;AAAA,YAAA;AAAA,gCACA,YAAA,EAAW;AAAA,gCACX,wBAAA,EAAuB;AAAA,YACxB;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,eAAe;AAAA,gBACf,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACV;AAAA,QAAA;AAAA,MAAA,EACF,CACF,EAAA,CACF,GACF,EAAA,CACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';
|
|
3
|
+
declare function VisuallyHidden({ ...props }: React.ComponentProps<typeof VisuallyHiddenPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { VisuallyHidden };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as VisuallyHiddenPrimitive from "@radix-ui/react-visually-hidden";
|
|
3
|
+
function VisuallyHidden({
|
|
4
|
+
...props
|
|
5
|
+
}) {
|
|
6
|
+
return /* @__PURE__ */ jsx(VisuallyHiddenPrimitive.Root, { ...props });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
VisuallyHidden
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=visually-hidden.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visually-hidden.js","sources":["../../../src/ui/visually-hidden.tsx"],"sourcesContent":["import * as React from 'react'\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden'\n\nfunction VisuallyHidden({\n ...props\n}: React.ComponentProps<typeof VisuallyHiddenPrimitive.Root>) {\n return <VisuallyHiddenPrimitive.Root {...props} />\n}\n\nexport { VisuallyHidden }\n"],"names":[],"mappings":";;AAGA,SAAS,eAAe;AAAA,EACtB,GAAG;AACL,GAA8D;AAC5D,SAAO,oBAAC,wBAAwB,MAAxB,EAA8B,GAAG,MAAA,CAAO;AAClD;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igstack/app-catalog-frontend-core",
|
|
3
|
-
"version": "0.3.1-alpha-
|
|
3
|
+
"version": "0.3.1-alpha-20260308004653",
|
|
4
4
|
"description": "Frontend core library for App Catalog",
|
|
5
5
|
"homepage": "https://github.com/lislon/app-catalog",
|
|
6
6
|
"repository": {
|
|
@@ -133,8 +133,8 @@
|
|
|
133
133
|
"vite-plugin-static-copy": "^3.1.4",
|
|
134
134
|
"vite-plugin-svgr": "^4.2.0",
|
|
135
135
|
"vitest": "3.2.2",
|
|
136
|
-
"@igstack/app-catalog-backend-core": "0.3.1-alpha-
|
|
137
|
-
"@igstack/app-catalog-shared-core": "0.3.1-alpha-
|
|
136
|
+
"@igstack/app-catalog-backend-core": "0.3.1-alpha-20260308004653",
|
|
137
|
+
"@igstack/app-catalog-shared-core": "0.3.1-alpha-20260308004653"
|
|
138
138
|
},
|
|
139
139
|
"peerDependencies": {
|
|
140
140
|
"react": "19.1.2",
|
|
@@ -4,7 +4,8 @@ import type { AppForCatalog } from '@igstack/app-catalog-backend-core'
|
|
|
4
4
|
|
|
5
5
|
import { Gallery } from '~/modules/gallery/Gallery'
|
|
6
6
|
import type { GalleryImage } from '~/modules/gallery/Gallery'
|
|
7
|
-
import { Dialog, DialogContent } from '~/ui/dialog'
|
|
7
|
+
import { Dialog, DialogContent, DialogTitle } from '~/ui/dialog'
|
|
8
|
+
import { VisuallyHidden } from '~/ui/visually-hidden'
|
|
8
9
|
|
|
9
10
|
export interface ScreenshotGalleryProps {
|
|
10
11
|
app: AppForCatalog
|
|
@@ -44,6 +45,9 @@ export function ScreenshotGallery({
|
|
|
44
45
|
className="h-[85vh] w-full max-w-[calc(100vw-2rem)] sm:max-w-[calc(100vw-3rem)] md:max-w-[calc(100vw-4rem)] p-0 overflow-hidden"
|
|
45
46
|
showCloseButton={true}
|
|
46
47
|
>
|
|
48
|
+
<VisuallyHidden>
|
|
49
|
+
<DialogTitle>{title || `${app.displayName} screenshots`}</DialogTitle>
|
|
50
|
+
</VisuallyHidden>
|
|
47
51
|
<Gallery images={images} initialIndex={initialIndex} title={title} />
|
|
48
52
|
</DialogContent>
|
|
49
53
|
</Dialog>
|
|
@@ -3,6 +3,7 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
|
|
|
3
3
|
import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'
|
|
4
4
|
import { MainLayout } from '~/ui/layout/MainLayout'
|
|
5
5
|
import { TopLevelProvidersForErrors } from '~/ui/layout/TopLevelProvidersForErrors'
|
|
6
|
+
import { useQueryClient } from '@tanstack/react-query'
|
|
6
7
|
|
|
7
8
|
export interface BaseErrorPageProps {
|
|
8
9
|
children: ReactNode
|
|
@@ -14,12 +15,13 @@ export interface BaseErrorPageProps {
|
|
|
14
15
|
* Error pages should render their content as children of this component
|
|
15
16
|
*/
|
|
16
17
|
export function BaseErrorPage({ children }: BaseErrorPageProps) {
|
|
18
|
+
const queryClient = useQueryClient()
|
|
17
19
|
return (
|
|
18
20
|
<TopLevelProvidersForErrors>
|
|
19
21
|
<MainLayout>
|
|
20
22
|
{children}
|
|
21
23
|
<TanStackRouterDevtools />
|
|
22
|
-
<ReactQueryDevtools initialIsOpen={false} />
|
|
24
|
+
<ReactQueryDevtools initialIsOpen={false} client={queryClient} />
|
|
23
25
|
</MainLayout>
|
|
24
26
|
</TopLevelProvidersForErrors>
|
|
25
27
|
)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Link } from '@tanstack/react-router'
|
|
2
2
|
import { LogOut } from 'lucide-react'
|
|
3
|
-
import
|
|
3
|
+
import React, { use } from 'react'
|
|
4
4
|
import AppCatalogLogo from '~/assets/app-catalog.svg?react'
|
|
5
5
|
import { ThemeSwitcher } from '~/components/ThemeSwitcher'
|
|
6
|
-
import {
|
|
6
|
+
import { AppCatalogContext } from '~/modules/appCatalog/context/AppCatalogContext'
|
|
7
7
|
import {
|
|
8
8
|
useAuth,
|
|
9
9
|
useAuthActions,
|
|
@@ -31,7 +31,7 @@ export function Header({ middle }: HeaderProps) {
|
|
|
31
31
|
const user = useUser()
|
|
32
32
|
const { logout } = useAuthActions()
|
|
33
33
|
const { open: openLoginModal } = useAuthModal()
|
|
34
|
-
const
|
|
34
|
+
const appCatalogContextMaybe = use(AppCatalogContext)
|
|
35
35
|
|
|
36
36
|
const handleLogout = async () => {
|
|
37
37
|
try {
|
|
@@ -55,20 +55,20 @@ export function Header({ middle }: HeaderProps) {
|
|
|
55
55
|
<AppCatalogLogo className="h-16 w-16" />
|
|
56
56
|
<div className="flex flex-col">
|
|
57
57
|
<span className="text-lg font-bold">App Catalog</span>
|
|
58
|
-
{appVersion &&
|
|
59
|
-
(appVersion.url ? (
|
|
58
|
+
{appCatalogContextMaybe?.appVersion &&
|
|
59
|
+
(appCatalogContextMaybe.appVersion.url ? (
|
|
60
60
|
<a
|
|
61
|
-
href={appVersion.url}
|
|
61
|
+
href={appCatalogContextMaybe.appVersion.url}
|
|
62
62
|
target="_blank"
|
|
63
63
|
rel="noopener noreferrer"
|
|
64
64
|
className="text-xs text-primary hover:text-primary/80 transition-colors font-medium py-0.5"
|
|
65
65
|
onClick={(e) => e.stopPropagation()}
|
|
66
66
|
>
|
|
67
|
-
{appVersion.displayName}
|
|
67
|
+
{appCatalogContextMaybe.appVersion.displayName}
|
|
68
68
|
</a>
|
|
69
69
|
) : (
|
|
70
70
|
<span className="text-xs text-muted-foreground py-0.5">
|
|
71
|
-
{appVersion.displayName}
|
|
71
|
+
{appCatalogContextMaybe.appVersion.displayName}
|
|
72
72
|
</span>
|
|
73
73
|
))}
|
|
74
74
|
</div>
|
|
@@ -21,7 +21,7 @@ export interface MainLayoutProps {
|
|
|
21
21
|
trpcClient: TRPCClient<TRPCRouter>
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export function TopLevelProviders({ children }: MainLayoutProps) {
|
|
24
|
+
export function TopLevelProviders({ children, queryClient }: MainLayoutProps) {
|
|
25
25
|
// const { data, failureCount, failureReason } = useQueryBootstrapConfig()
|
|
26
26
|
const [plugins] = useState(() => [
|
|
27
27
|
// Future plugins can be added here
|
|
@@ -54,7 +54,10 @@ export function TopLevelProviders({ children }: MainLayoutProps) {
|
|
|
54
54
|
{children}
|
|
55
55
|
<LoginModal />
|
|
56
56
|
<TanStackRouterDevtools />
|
|
57
|
-
<ReactQueryDevtools
|
|
57
|
+
<ReactQueryDevtools
|
|
58
|
+
initialIsOpen={false}
|
|
59
|
+
client={queryClient}
|
|
60
|
+
/>
|
|
58
61
|
</PluginManagerContextProvider>
|
|
59
62
|
</GlobalConfigProvider>
|
|
60
63
|
</Suspense>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden'
|
|
3
|
+
|
|
4
|
+
function VisuallyHidden({
|
|
5
|
+
...props
|
|
6
|
+
}: React.ComponentProps<typeof VisuallyHiddenPrimitive.Root>) {
|
|
7
|
+
return <VisuallyHiddenPrimitive.Root {...props} />
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { VisuallyHidden }
|