@shipfox/client-projects 14.0.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +32 -0
- package/dist/components/model-provider-reminder-banner.js +1 -1
- package/dist/components/model-provider-reminder-banner.js.map +1 -1
- package/dist/components/project-crumb.js +4 -4
- package/dist/components/project-crumb.js.map +1 -1
- package/dist/components/project-switcher.js +2 -2
- package/dist/components/project-switcher.js.map +1 -1
- package/dist/components/source-strip.js +3 -3
- package/dist/components/source-strip.js.map +1 -1
- package/dist/feature.d.ts +18 -18
- package/dist/feature.d.ts.map +1 -1
- package/dist/hooks/api/definitions.d.ts +1 -1
- package/dist/hooks/api/definitions.d.ts.map +1 -1
- package/dist/hooks/api/projects.d.ts +1 -1
- package/dist/hooks/api/projects.d.ts.map +1 -1
- package/dist/pages/create-project-page.js +13 -13
- package/dist/pages/create-project-page.js.map +1 -1
- package/dist/pages/create-project-page.stories.d.ts.map +1 -1
- package/dist/pages/project-settings-page.js +3 -3
- package/dist/pages/project-settings-page.js.map +1 -1
- package/dist/pages/project-settings-page.stories.d.ts.map +1 -1
- package/dist/pages/projects-hub-page.js +13 -13
- package/dist/pages/projects-hub-page.js.map +1 -1
- package/dist/routes/create-project.d.ts.map +1 -1
- package/dist/routes/home.d.ts.map +1 -1
- package/dist/routes/project-index.d.ts.map +1 -1
- package/dist/routes/project-settings-index.d.ts.map +1 -1
- package/dist/routes/project-settings.d.ts.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/components/model-provider-reminder-banner.tsx +1 -1
- package/src/components/project-crumb.tsx +4 -4
- package/src/components/project-switcher.tsx +2 -2
- package/src/components/source-strip.tsx +3 -3
- package/src/pages/create-project-page.tsx +13 -13
- package/src/pages/project-settings-page.tsx +3 -3
- package/src/pages/projects-hub-page.tsx +14 -14
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 27 files with swc (
|
|
2
|
+
Successfully compiled: 27 files with swc (371.01ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @shipfox/client-projects
|
|
2
2
|
|
|
3
|
+
## 15.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [bca115c]
|
|
8
|
+
- @shipfox/client-agent@15.0.0
|
|
9
|
+
- @shipfox/api-common-dto@12.0.0
|
|
10
|
+
- @shipfox/api-definitions-dto@12.0.0
|
|
11
|
+
- @shipfox/api-integration-core-dto@12.0.0
|
|
12
|
+
- @shipfox/api-projects-dto@12.0.0
|
|
13
|
+
- @shipfox/client-api@6.0.1
|
|
14
|
+
- @shipfox/client-auth@14.0.1
|
|
15
|
+
- @shipfox/client-integrations@14.0.1
|
|
16
|
+
- @shipfox/client-shell@14.0.1
|
|
17
|
+
- @shipfox/client-ui@14.0.1
|
|
18
|
+
- @shipfox/react-ui@1.0.0
|
|
19
|
+
|
|
20
|
+
## 14.0.1
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 6aa6c7a: Migrates the integrations, triggers, runners, and projects client surfaces to semantic spacing roles and enables `no-raw-spacing` for them. Adds the `gap-x-*` and `gap-y-*` axis roles and the `-mx-inline` bleed role so grids with differing column and row rhythm, and rows that cancel their own `px-tight`, stay on the density-aware scale.
|
|
25
|
+
- Updated dependencies [88bf8e8]
|
|
26
|
+
- Updated dependencies [6aa6c7a]
|
|
27
|
+
- Updated dependencies [5c56ba6]
|
|
28
|
+
- @shipfox/react-ui@1.0.0
|
|
29
|
+
- @shipfox/client-shell@14.0.1
|
|
30
|
+
- @shipfox/client-auth@14.0.1
|
|
31
|
+
- @shipfox/client-integrations@14.0.1
|
|
32
|
+
- @shipfox/client-agent@14.0.1
|
|
33
|
+
- @shipfox/client-ui@14.0.1
|
|
34
|
+
|
|
3
35
|
## 14.0.0
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -24,7 +24,7 @@ export function ModelProviderReminderBanner({ workspaceId }) {
|
|
|
24
24
|
},
|
|
25
25
|
children: [
|
|
26
26
|
/*#__PURE__*/ _jsxs(AlertContent, {
|
|
27
|
-
className: "pr-
|
|
27
|
+
className: "pr-[28px]",
|
|
28
28
|
children: [
|
|
29
29
|
/*#__PURE__*/ _jsx(AlertTitle, {
|
|
30
30
|
children: "Finish setting up a model provider"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/model-provider-reminder-banner.tsx"],"sourcesContent":["import {useModelProviderConfigsQuery} from '@shipfox/client-agent';\nimport {useActiveWorkspace} from '@shipfox/client-auth';\nimport {createTypedBrowserStorage, sessionStorageOrUndefined} from '@shipfox/client-ui';\nimport {\n Alert,\n AlertActions,\n AlertClose,\n AlertContent,\n AlertDescription,\n AlertTitle,\n} from '@shipfox/react-ui/alert';\nimport {Button} from '@shipfox/react-ui/button';\nimport {Link} from '@tanstack/react-router';\nimport {useState} from 'react';\n\nexport function ModelProviderReminderBanner({workspaceId}: {workspaceId: string}) {\n const workspace = useActiveWorkspace();\n const configsQuery = useModelProviderConfigsQuery(workspaceId);\n const [dismissed, setDismissed] = useState(() => isReminderDismissed(workspaceId));\n const configs = configsQuery.data?.configs;\n const unconfigured =\n Array.isArray(configs) && configs.length === 0 && configsQuery.data?.defaultProviderId === null;\n\n if (!unconfigured || dismissed) return null;\n\n return (\n <Alert\n variant=\"info\"\n animated={false}\n onOpenChange={(open) => {\n if (!open) {\n dismissReminder(workspaceId);\n setDismissed(true);\n }\n }}\n >\n <AlertContent className=\"pr-
|
|
1
|
+
{"version":3,"sources":["../../src/components/model-provider-reminder-banner.tsx"],"sourcesContent":["import {useModelProviderConfigsQuery} from '@shipfox/client-agent';\nimport {useActiveWorkspace} from '@shipfox/client-auth';\nimport {createTypedBrowserStorage, sessionStorageOrUndefined} from '@shipfox/client-ui';\nimport {\n Alert,\n AlertActions,\n AlertClose,\n AlertContent,\n AlertDescription,\n AlertTitle,\n} from '@shipfox/react-ui/alert';\nimport {Button} from '@shipfox/react-ui/button';\nimport {Link} from '@tanstack/react-router';\nimport {useState} from 'react';\n\nexport function ModelProviderReminderBanner({workspaceId}: {workspaceId: string}) {\n const workspace = useActiveWorkspace();\n const configsQuery = useModelProviderConfigsQuery(workspaceId);\n const [dismissed, setDismissed] = useState(() => isReminderDismissed(workspaceId));\n const configs = configsQuery.data?.configs;\n const unconfigured =\n Array.isArray(configs) && configs.length === 0 && configsQuery.data?.defaultProviderId === null;\n\n if (!unconfigured || dismissed) return null;\n\n return (\n <Alert\n variant=\"info\"\n animated={false}\n onOpenChange={(open) => {\n if (!open) {\n dismissReminder(workspaceId);\n setDismissed(true);\n }\n }}\n >\n <AlertContent className=\"pr-[28px]\">\n <AlertTitle>Finish setting up a model provider</AlertTitle>\n <AlertDescription>\n Add workspace credentials, or keep using the instance default.\n </AlertDescription>\n <AlertActions>\n <Button asChild size=\"sm\" variant=\"secondary\">\n <Link to=\"/w/$workspaceSlug/settings/agents\" params={{workspaceSlug: workspace.slug}}>\n Agents\n </Link>\n </Button>\n </AlertActions>\n </AlertContent>\n <AlertClose />\n </Alert>\n );\n}\n\nfunction isReminderDismissed(workspaceId: string): boolean {\n return reminderStorage(workspaceId).read() === true;\n}\n\nfunction dismissReminder(workspaceId: string): void {\n reminderStorage(workspaceId).write(true);\n}\n\nfunction reminderStorage(workspaceId: string) {\n return createTypedBrowserStorage(\n sessionStorageOrUndefined,\n {\n key: 'shipfox.modelProviderReminder.dismissed',\n lifetime: 'session' as const,\n principalScope: 'workspace' as const,\n serialize: (dismissed: boolean) => JSON.stringify(dismissed),\n parse: (raw: string) => raw === 'true',\n },\n {workspaceId},\n );\n}\n"],"names":["useModelProviderConfigsQuery","useActiveWorkspace","createTypedBrowserStorage","sessionStorageOrUndefined","Alert","AlertActions","AlertClose","AlertContent","AlertDescription","AlertTitle","Button","Link","useState","ModelProviderReminderBanner","workspaceId","workspace","configsQuery","dismissed","setDismissed","isReminderDismissed","configs","data","unconfigured","Array","isArray","length","defaultProviderId","variant","animated","onOpenChange","open","dismissReminder","className","asChild","size","to","params","workspaceSlug","slug","reminderStorage","read","write","key","lifetime","principalScope","serialize","JSON","stringify","parse","raw"],"mappings":";AAAA,SAAQA,4BAA4B,QAAO,wBAAwB;AACnE,SAAQC,kBAAkB,QAAO,uBAAuB;AACxD,SAAQC,yBAAyB,EAAEC,yBAAyB,QAAO,qBAAqB;AACxF,SACEC,KAAK,EACLC,YAAY,EACZC,UAAU,EACVC,YAAY,EACZC,gBAAgB,EAChBC,UAAU,QACL,0BAA0B;AACjC,SAAQC,MAAM,QAAO,2BAA2B;AAChD,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,QAAQ,QAAO,QAAQ;AAE/B,OAAO,SAASC,4BAA4B,EAACC,WAAW,EAAwB;IAC9E,MAAMC,YAAYd;IAClB,MAAMe,eAAehB,6BAA6Bc;IAClD,MAAM,CAACG,WAAWC,aAAa,GAAGN,SAAS,IAAMO,oBAAoBL;IACrE,MAAMM,UAAUJ,aAAaK,IAAI,EAAED;IACnC,MAAME,eACJC,MAAMC,OAAO,CAACJ,YAAYA,QAAQK,MAAM,KAAK,KAAKT,aAAaK,IAAI,EAAEK,sBAAsB;IAE7F,IAAI,CAACJ,gBAAgBL,WAAW,OAAO;IAEvC,qBACE,MAACb;QACCuB,SAAQ;QACRC,UAAU;QACVC,cAAc,CAACC;YACb,IAAI,CAACA,MAAM;gBACTC,gBAAgBjB;gBAChBI,aAAa;YACf;QACF;;0BAEA,MAACX;gBAAayB,WAAU;;kCACtB,KAACvB;kCAAW;;kCACZ,KAACD;kCAAiB;;kCAGlB,KAACH;kCACC,cAAA,KAACK;4BAAOuB,OAAO;4BAACC,MAAK;4BAAKP,SAAQ;sCAChC,cAAA,KAAChB;gCAAKwB,IAAG;gCAAoCC,QAAQ;oCAACC,eAAetB,UAAUuB,IAAI;gCAAA;0CAAG;;;;;;0BAM5F,KAAChC;;;AAGP;AAEA,SAASa,oBAAoBL,WAAmB;IAC9C,OAAOyB,gBAAgBzB,aAAa0B,IAAI,OAAO;AACjD;AAEA,SAAST,gBAAgBjB,WAAmB;IAC1CyB,gBAAgBzB,aAAa2B,KAAK,CAAC;AACrC;AAEA,SAASF,gBAAgBzB,WAAmB;IAC1C,OAAOZ,0BACLC,2BACA;QACEuC,KAAK;QACLC,UAAU;QACVC,gBAAgB;QAChBC,WAAW,CAAC5B,YAAuB6B,KAAKC,SAAS,CAAC9B;QAClD+B,OAAO,CAACC,MAAgBA,QAAQ;IAClC,GACA;QAACnC;IAAW;AAEhB"}
|
|
@@ -8,7 +8,7 @@ export function ProjectCrumb({ workspaceId, workspaceSlug, projectId, projectSlu
|
|
|
8
8
|
const [open, setOpen] = useState(false);
|
|
9
9
|
if (projectSlug && projectName) {
|
|
10
10
|
return /*#__PURE__*/ _jsxs("div", {
|
|
11
|
-
className: "flex items-center",
|
|
11
|
+
className: "flex items-center gap-tight",
|
|
12
12
|
children: [
|
|
13
13
|
/*#__PURE__*/ _jsx(Link, {
|
|
14
14
|
to: "/w/$workspaceSlug/p/$projectSlug",
|
|
@@ -17,7 +17,7 @@ export function ProjectCrumb({ workspaceId, workspaceSlug, projectId, projectSlu
|
|
|
17
17
|
projectSlug
|
|
18
18
|
},
|
|
19
19
|
"aria-current": "page",
|
|
20
|
-
className: "text-md font-medium text-foreground-neutral-base
|
|
20
|
+
className: "text-md font-medium text-foreground-neutral-base p-tight rounded-6 hover:bg-background-components-hover transition-colors max-w-[240px] truncate",
|
|
21
21
|
children: projectName
|
|
22
22
|
}),
|
|
23
23
|
/*#__PURE__*/ _jsxs(Popover, {
|
|
@@ -31,7 +31,7 @@ export function ProjectCrumb({ workspaceId, workspaceSlug, projectId, projectSlu
|
|
|
31
31
|
"aria-label": "Switch project",
|
|
32
32
|
"aria-haspopup": "listbox",
|
|
33
33
|
"aria-expanded": open,
|
|
34
|
-
className: "
|
|
34
|
+
className: "grid place-items-center size-24 rounded-4 text-foreground-neutral-muted hover:bg-background-components-hover hover:text-foreground-neutral-base transition-colors",
|
|
35
35
|
children: /*#__PURE__*/ _jsx(Icon, {
|
|
36
36
|
name: "arrowDownSLine",
|
|
37
37
|
className: "size-16"
|
|
@@ -65,7 +65,7 @@ export function ProjectCrumb({ workspaceId, workspaceSlug, projectId, projectSlu
|
|
|
65
65
|
"aria-label": "Switch project",
|
|
66
66
|
"aria-haspopup": "listbox",
|
|
67
67
|
"aria-expanded": open,
|
|
68
|
-
className: "flex items-center gap-
|
|
68
|
+
className: "flex items-center gap-tight text-md font-medium text-foreground-neutral-base p-tight rounded-6 hover:bg-background-components-hover transition-colors",
|
|
69
69
|
children: [
|
|
70
70
|
/*#__PURE__*/ _jsx("span", {
|
|
71
71
|
className: "max-w-[240px] truncate",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/project-crumb.tsx"],"sourcesContent":["import {Icon} from '@shipfox/react-ui/icon';\nimport {Popover, PopoverContent, PopoverTrigger} from '@shipfox/react-ui/popover';\nimport {Link} from '@tanstack/react-router';\nimport {useState} from 'react';\nimport {ProjectSwitcher} from './project-switcher.js';\n\nexport interface ProjectCrumbProps {\n workspaceId: string;\n workspaceSlug: string;\n projectId?: string | undefined;\n projectSlug?: string | undefined;\n projectName?: string | undefined;\n}\n\nexport function ProjectCrumb({\n workspaceId,\n workspaceSlug,\n projectId,\n projectSlug,\n projectName,\n}: ProjectCrumbProps) {\n const [open, setOpen] = useState(false);\n\n if (projectSlug && projectName) {\n return (\n <div className=\"flex items-center\">\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug\"\n params={{workspaceSlug, projectSlug}}\n aria-current=\"page\"\n className=\"text-md font-medium text-foreground-neutral-base
|
|
1
|
+
{"version":3,"sources":["../../src/components/project-crumb.tsx"],"sourcesContent":["import {Icon} from '@shipfox/react-ui/icon';\nimport {Popover, PopoverContent, PopoverTrigger} from '@shipfox/react-ui/popover';\nimport {Link} from '@tanstack/react-router';\nimport {useState} from 'react';\nimport {ProjectSwitcher} from './project-switcher.js';\n\nexport interface ProjectCrumbProps {\n workspaceId: string;\n workspaceSlug: string;\n projectId?: string | undefined;\n projectSlug?: string | undefined;\n projectName?: string | undefined;\n}\n\nexport function ProjectCrumb({\n workspaceId,\n workspaceSlug,\n projectId,\n projectSlug,\n projectName,\n}: ProjectCrumbProps) {\n const [open, setOpen] = useState(false);\n\n if (projectSlug && projectName) {\n return (\n <div className=\"flex items-center gap-tight\">\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug\"\n params={{workspaceSlug, projectSlug}}\n aria-current=\"page\"\n className=\"text-md font-medium text-foreground-neutral-base p-tight rounded-6 hover:bg-background-components-hover transition-colors max-w-[240px] truncate\"\n >\n {projectName}\n </Link>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-label=\"Switch project\"\n aria-haspopup=\"listbox\"\n aria-expanded={open}\n className=\"grid place-items-center size-24 rounded-4 text-foreground-neutral-muted hover:bg-background-components-hover hover:text-foreground-neutral-base transition-colors\"\n >\n <Icon name=\"arrowDownSLine\" className=\"size-16\" />\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[320px] p-0\" align=\"start\" sideOffset={8}>\n <ProjectSwitcher\n workspaceId={workspaceId}\n workspaceSlug={workspaceSlug}\n activeProjectId={projectId}\n onSelect={() => setOpen(false)}\n />\n </PopoverContent>\n </Popover>\n </div>\n );\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-label=\"Switch project\"\n aria-haspopup=\"listbox\"\n aria-expanded={open}\n className=\"flex items-center gap-tight text-md font-medium text-foreground-neutral-base p-tight rounded-6 hover:bg-background-components-hover transition-colors\"\n >\n <span className=\"max-w-[240px] truncate\">All projects</span>\n <Icon name=\"arrowDownSLine\" className=\"size-16 text-foreground-neutral-muted\" />\n </button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[320px] p-0\" align=\"start\" sideOffset={8}>\n <ProjectSwitcher\n workspaceId={workspaceId}\n workspaceSlug={workspaceSlug}\n onSelect={() => setOpen(false)}\n />\n </PopoverContent>\n </Popover>\n );\n}\n"],"names":["Icon","Popover","PopoverContent","PopoverTrigger","Link","useState","ProjectSwitcher","ProjectCrumb","workspaceId","workspaceSlug","projectId","projectSlug","projectName","open","setOpen","div","className","to","params","aria-current","onOpenChange","asChild","button","type","aria-label","aria-haspopup","aria-expanded","name","align","sideOffset","activeProjectId","onSelect","span"],"mappings":";AAAA,SAAQA,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,QAAQ,QAAO,QAAQ;AAC/B,SAAQC,eAAe,QAAO,wBAAwB;AAUtD,OAAO,SAASC,aAAa,EAC3BC,WAAW,EACXC,aAAa,EACbC,SAAS,EACTC,WAAW,EACXC,WAAW,EACO;IAClB,MAAM,CAACC,MAAMC,QAAQ,GAAGT,SAAS;IAEjC,IAAIM,eAAeC,aAAa;QAC9B,qBACE,MAACG;YAAIC,WAAU;;8BACb,KAACZ;oBACCa,IAAG;oBACHC,QAAQ;wBAACT;wBAAeE;oBAAW;oBACnCQ,gBAAa;oBACbH,WAAU;8BAETJ;;8BAEH,MAACX;oBAAQY,MAAMA;oBAAMO,cAAcN;;sCACjC,KAACX;4BAAekB,OAAO;sCACrB,cAAA,KAACC;gCACCC,MAAK;gCACLC,cAAW;gCACXC,iBAAc;gCACdC,iBAAeb;gCACfG,WAAU;0CAEV,cAAA,KAAChB;oCAAK2B,MAAK;oCAAiBX,WAAU;;;;sCAG1C,KAACd;4BAAec,WAAU;4BAAgBY,OAAM;4BAAQC,YAAY;sCAClE,cAAA,KAACvB;gCACCE,aAAaA;gCACbC,eAAeA;gCACfqB,iBAAiBpB;gCACjBqB,UAAU,IAAMjB,QAAQ;;;;;;;IAMpC;IAEA,qBACE,MAACb;QAAQY,MAAMA;QAAMO,cAAcN;;0BACjC,KAACX;gBAAekB,OAAO;0BACrB,cAAA,MAACC;oBACCC,MAAK;oBACLC,cAAW;oBACXC,iBAAc;oBACdC,iBAAeb;oBACfG,WAAU;;sCAEV,KAACgB;4BAAKhB,WAAU;sCAAyB;;sCACzC,KAAChB;4BAAK2B,MAAK;4BAAiBX,WAAU;;;;;0BAG1C,KAACd;gBAAec,WAAU;gBAAgBY,OAAM;gBAAQC,YAAY;0BAClE,cAAA,KAACvB;oBACCE,aAAaA;oBACbC,eAAeA;oBACfsB,UAAU,IAAMjB,QAAQ;;;;;AAKlC"}
|
|
@@ -92,7 +92,7 @@ export function ProjectSwitcher({ workspaceId, workspaceSlug, activeProjectId, o
|
|
|
92
92
|
children: [
|
|
93
93
|
/*#__PURE__*/ _jsx(Icon, {
|
|
94
94
|
name: "check",
|
|
95
|
-
className: `size-16
|
|
95
|
+
className: `size-16 ${activeProjectId ? 'opacity-0' : 'opacity-100'}`
|
|
96
96
|
}),
|
|
97
97
|
"All projects"
|
|
98
98
|
]
|
|
@@ -109,7 +109,7 @@ export function ProjectSwitcher({ workspaceId, workspaceSlug, activeProjectId, o
|
|
|
109
109
|
children: [
|
|
110
110
|
/*#__PURE__*/ _jsx(Icon, {
|
|
111
111
|
name: "check",
|
|
112
|
-
className: `size-16
|
|
112
|
+
className: `size-16 ${activeProjectId === project.id ? 'opacity-100' : 'opacity-0'}`
|
|
113
113
|
}),
|
|
114
114
|
project.name
|
|
115
115
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/project-switcher.tsx"],"sourcesContent":["import {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n} from '@shipfox/react-ui/command';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {useNavigate} from '@tanstack/react-router';\nimport {type KeyboardEvent, useEffect, useState} from 'react';\nimport {useProjectsInfiniteQuery} from '#hooks/api/projects.js';\n\nexport interface ProjectSwitcherProps {\n workspaceId: string;\n workspaceSlug: string;\n activeProjectId?: string | undefined;\n onSelect?: () => void;\n}\n\nexport function ProjectSwitcher({\n workspaceId,\n workspaceSlug,\n activeProjectId,\n onSelect,\n}: ProjectSwitcherProps) {\n const navigate = useNavigate();\n const [searchValue, setSearchValue] = useState('');\n const query = useProjectsInfiniteQuery(workspaceId);\n const projects = query.data?.pages.flatMap((page) => page.projects) ?? [];\n\n // Eagerly fetch additional pages once the popover opens; the switcher should\n // show the full list, not just the first page.\n useEffect(() => {\n if (query.hasNextPage && !query.isFetchingNextPage) {\n query.fetchNextPage();\n }\n }, [query.hasNextPage, query.isFetchingNextPage, query.fetchNextPage]);\n\n const handleSelect = (projectId: string) => {\n const project = projects.find((candidate) => candidate.id === projectId);\n if (!project) return;\n navigate({\n to: '/w/$workspaceSlug/p/$projectSlug',\n params: {\n workspaceSlug,\n projectSlug: project.slug,\n },\n });\n onSelect?.();\n };\n\n const handleSelectAll = () => {\n navigate({to: '/w/$workspaceSlug', params: {workspaceSlug}});\n onSelect?.();\n };\n\n const handleCreate = () => {\n navigate({to: '/w/$workspaceSlug/projects/new', params: {workspaceSlug}});\n onSelect?.();\n };\n\n const normalizedSearch = searchValue.trim().toLowerCase();\n const hasSearchMatch =\n normalizedSearch.length === 0 ||\n 'all projects'.includes(normalizedSearch) ||\n projects.some((project) =>\n [project.id, project.name].some((value) => value.toLowerCase().includes(normalizedSearch)),\n );\n const shouldCreateFromEmptySearch = !query.isLoading && !query.isError && !hasSearchMatch;\n\n const handleCommandKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Enter' || !shouldCreateFromEmptySearch) {\n return;\n }\n\n event.preventDefault();\n handleCreate();\n };\n\n return (\n <Command onKeyDown={handleCommandKeyDown}>\n <CommandInput\n placeholder=\"Search projects...\"\n value={searchValue}\n onValueChange={setSearchValue}\n />\n <CommandList>\n {query.isError ? (\n <CommandEmpty>Couldn't load projects.</CommandEmpty>\n ) : query.isLoading ? (\n <CommandEmpty>Loading projects...</CommandEmpty>\n ) : projects.length === 0 ? (\n <CommandEmpty>No projects yet.</CommandEmpty>\n ) : (\n <CommandEmpty>No projects found.</CommandEmpty>\n )}\n <CommandGroup>\n <CommandItem value=\"__all\" keywords={['all projects']} onSelect={handleSelectAll}>\n <Icon\n name=\"check\"\n className={`size-16
|
|
1
|
+
{"version":3,"sources":["../../src/components/project-switcher.tsx"],"sourcesContent":["import {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n} from '@shipfox/react-ui/command';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {useNavigate} from '@tanstack/react-router';\nimport {type KeyboardEvent, useEffect, useState} from 'react';\nimport {useProjectsInfiniteQuery} from '#hooks/api/projects.js';\n\nexport interface ProjectSwitcherProps {\n workspaceId: string;\n workspaceSlug: string;\n activeProjectId?: string | undefined;\n onSelect?: () => void;\n}\n\nexport function ProjectSwitcher({\n workspaceId,\n workspaceSlug,\n activeProjectId,\n onSelect,\n}: ProjectSwitcherProps) {\n const navigate = useNavigate();\n const [searchValue, setSearchValue] = useState('');\n const query = useProjectsInfiniteQuery(workspaceId);\n const projects = query.data?.pages.flatMap((page) => page.projects) ?? [];\n\n // Eagerly fetch additional pages once the popover opens; the switcher should\n // show the full list, not just the first page.\n useEffect(() => {\n if (query.hasNextPage && !query.isFetchingNextPage) {\n query.fetchNextPage();\n }\n }, [query.hasNextPage, query.isFetchingNextPage, query.fetchNextPage]);\n\n const handleSelect = (projectId: string) => {\n const project = projects.find((candidate) => candidate.id === projectId);\n if (!project) return;\n navigate({\n to: '/w/$workspaceSlug/p/$projectSlug',\n params: {\n workspaceSlug,\n projectSlug: project.slug,\n },\n });\n onSelect?.();\n };\n\n const handleSelectAll = () => {\n navigate({to: '/w/$workspaceSlug', params: {workspaceSlug}});\n onSelect?.();\n };\n\n const handleCreate = () => {\n navigate({to: '/w/$workspaceSlug/projects/new', params: {workspaceSlug}});\n onSelect?.();\n };\n\n const normalizedSearch = searchValue.trim().toLowerCase();\n const hasSearchMatch =\n normalizedSearch.length === 0 ||\n 'all projects'.includes(normalizedSearch) ||\n projects.some((project) =>\n [project.id, project.name].some((value) => value.toLowerCase().includes(normalizedSearch)),\n );\n const shouldCreateFromEmptySearch = !query.isLoading && !query.isError && !hasSearchMatch;\n\n const handleCommandKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Enter' || !shouldCreateFromEmptySearch) {\n return;\n }\n\n event.preventDefault();\n handleCreate();\n };\n\n return (\n <Command onKeyDown={handleCommandKeyDown}>\n <CommandInput\n placeholder=\"Search projects...\"\n value={searchValue}\n onValueChange={setSearchValue}\n />\n <CommandList>\n {query.isError ? (\n <CommandEmpty>Couldn't load projects.</CommandEmpty>\n ) : query.isLoading ? (\n <CommandEmpty>Loading projects...</CommandEmpty>\n ) : projects.length === 0 ? (\n <CommandEmpty>No projects yet.</CommandEmpty>\n ) : (\n <CommandEmpty>No projects found.</CommandEmpty>\n )}\n <CommandGroup>\n <CommandItem value=\"__all\" keywords={['all projects']} onSelect={handleSelectAll}>\n <Icon\n name=\"check\"\n className={`size-16 ${activeProjectId ? 'opacity-0' : 'opacity-100'}`}\n />\n All projects\n </CommandItem>\n </CommandGroup>\n {projects.length > 0 ? (\n <CommandGroup heading=\"Projects\">\n {projects.map((project) => (\n <CommandItem\n key={project.id}\n value={project.id}\n keywords={[project.name]}\n onSelect={() => handleSelect(project.id)}\n >\n <Icon\n name=\"check\"\n className={`size-16 ${\n activeProjectId === project.id ? 'opacity-100' : 'opacity-0'\n }`}\n />\n {project.name}\n </CommandItem>\n ))}\n </CommandGroup>\n ) : null}\n </CommandList>\n <CommandSeparator />\n <CommandGroup forceMount>\n <CommandItem value=\"__create\" onSelect={handleCreate} forceMount>\n <Icon name=\"addLine\" className=\"size-16\" />\n Create project\n </CommandItem>\n </CommandGroup>\n </Command>\n );\n}\n"],"names":["Command","CommandEmpty","CommandGroup","CommandInput","CommandItem","CommandList","CommandSeparator","Icon","useNavigate","useEffect","useState","useProjectsInfiniteQuery","ProjectSwitcher","workspaceId","workspaceSlug","activeProjectId","onSelect","navigate","searchValue","setSearchValue","query","projects","data","pages","flatMap","page","hasNextPage","isFetchingNextPage","fetchNextPage","handleSelect","projectId","project","find","candidate","id","to","params","projectSlug","slug","handleSelectAll","handleCreate","normalizedSearch","trim","toLowerCase","hasSearchMatch","length","includes","some","name","value","shouldCreateFromEmptySearch","isLoading","isError","handleCommandKeyDown","event","key","preventDefault","onKeyDown","placeholder","onValueChange","keywords","className","heading","map","forceMount"],"mappings":";AAAA,SACEA,OAAO,EACPC,YAAY,EACZC,YAAY,EACZC,YAAY,EACZC,WAAW,EACXC,WAAW,EACXC,gBAAgB,QACX,4BAA4B;AACnC,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,WAAW,QAAO,yBAAyB;AACnD,SAA4BC,SAAS,EAAEC,QAAQ,QAAO,QAAQ;AAC9D,SAAQC,wBAAwB,QAAO,yBAAyB;AAShE,OAAO,SAASC,gBAAgB,EAC9BC,WAAW,EACXC,aAAa,EACbC,eAAe,EACfC,QAAQ,EACa;IACrB,MAAMC,WAAWT;IACjB,MAAM,CAACU,aAAaC,eAAe,GAAGT,SAAS;IAC/C,MAAMU,QAAQT,yBAAyBE;IACvC,MAAMQ,WAAWD,MAAME,IAAI,EAAEC,MAAMC,QAAQ,CAACC,OAASA,KAAKJ,QAAQ,KAAK,EAAE;IAEzE,6EAA6E;IAC7E,+CAA+C;IAC/CZ,UAAU;QACR,IAAIW,MAAMM,WAAW,IAAI,CAACN,MAAMO,kBAAkB,EAAE;YAClDP,MAAMQ,aAAa;QACrB;IACF,GAAG;QAACR,MAAMM,WAAW;QAAEN,MAAMO,kBAAkB;Q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AAA,MAACE;4BAAY6C,OAAM;4BAAQW,UAAU;gCAAC;6BAAe;4BAAE5C,UAAUuB;;8CAC/D,KAAChC;oCACCyC,MAAK;oCACLa,WAAW,CAAC,QAAQ,EAAE9C,kBAAkB,cAAc,eAAe;;gCACrE;;;;oBAILM,SAASwB,MAAM,GAAG,kBACjB,KAAC3C;wBAAa4D,SAAQ;kCACnBzC,SAAS0C,GAAG,CAAC,CAAChC,wBACb,MAAC3B;gCAEC6C,OAAOlB,QAAQG,EAAE;gCACjB0B,UAAU;oCAAC7B,QAAQiB,IAAI;iCAAC;gCACxBhC,UAAU,IAAMa,aAAaE,QAAQG,EAAE;;kDAEvC,KAAC3B;wCACCyC,MAAK;wCACLa,WAAW,CAAC,QAAQ,EAClB9C,oBAAoBgB,QAAQG,EAAE,GAAG,gBAAgB,aACjD;;oCAEHH,QAAQiB,IAAI;;+BAXRjB,QAAQG,EAAE;yBAenB;;;0BAEN,KAAC5B;0BACD,KAACJ;gBAAa8D,UAAU;0BACtB,cAAA,MAAC5D;oBAAY6C,OAAM;oBAAWjC,UAAUwB;oBAAcwB,UAAU;;sCAC9D,KAACzD;4BAAKyC,MAAK;4BAAUa,WAAU;;wBAAY;;;;;;AAMrD"}
|
|
@@ -16,18 +16,18 @@ import { Code, Text } from '@shipfox/react-ui/typography';
|
|
|
16
16
|
const connectionsQuery = useSourceConnectionsQuery(workspace.id);
|
|
17
17
|
const connection = connectionsQuery.data?.find((c)=>c.id === connectionId);
|
|
18
18
|
return /*#__PURE__*/ _jsxs("section", {
|
|
19
|
-
className: "flex flex-col gap-
|
|
19
|
+
className: "flex flex-col gap-inline rounded-8 border border-border-neutral-base bg-background-neutral-base px-row py-row sm:flex-row sm:items-center sm:justify-between",
|
|
20
20
|
"aria-label": "Project source",
|
|
21
21
|
children: [
|
|
22
22
|
/*#__PURE__*/ _jsxs("div", {
|
|
23
|
-
className: "flex min-w-0 items-center gap-
|
|
23
|
+
className: "flex min-w-0 items-center gap-inline",
|
|
24
24
|
children: [
|
|
25
25
|
/*#__PURE__*/ _jsx(Icon, {
|
|
26
26
|
name: providerIconName(connection?.provider),
|
|
27
27
|
className: "size-20 shrink-0"
|
|
28
28
|
}),
|
|
29
29
|
/*#__PURE__*/ _jsxs("div", {
|
|
30
|
-
className: "flex min-w-0 flex-col gap-
|
|
30
|
+
className: "flex min-w-0 flex-col gap-tight sm:flex-row sm:items-center sm:gap-inline",
|
|
31
31
|
children: [
|
|
32
32
|
connectionsQuery.isPending ? /*#__PURE__*/ _jsx(Skeleton, {
|
|
33
33
|
className: "h-16 w-160"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/source-strip.tsx"],"sourcesContent":["import {useActiveWorkspace} from '@shipfox/client-auth';\nimport {useSourceConnectionsQuery} from '@shipfox/client-integrations';\nimport {StatusBadge} from '@shipfox/react-ui/badge';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport {Skeleton} from '@shipfox/react-ui/skeleton';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport type {DefinitionSyncSummary} from '#core/definition.js';\n\n/**\n * We cannot cheaply resolve `external_repository_id` → `owner/repo`\n * (no by-id endpoint; `listRepositories` is paginated by connection).\n * The strip surfaces the raw id as a `<Code>` chip with a tooltip carrying the\n * full string.\n */\nexport function SourceStrip({\n connectionId,\n externalRepositoryId,\n sync,\n isPending,\n}: {\n connectionId: string;\n externalRepositoryId: string;\n sync: DefinitionSyncSummary | null | undefined;\n isPending: boolean;\n}) {\n const workspace = useActiveWorkspace();\n const connectionsQuery = useSourceConnectionsQuery(workspace.id);\n const connection = connectionsQuery.data?.find((c) => c.id === connectionId);\n\n return (\n <section\n className=\"flex flex-col gap-
|
|
1
|
+
{"version":3,"sources":["../../src/components/source-strip.tsx"],"sourcesContent":["import {useActiveWorkspace} from '@shipfox/client-auth';\nimport {useSourceConnectionsQuery} from '@shipfox/client-integrations';\nimport {StatusBadge} from '@shipfox/react-ui/badge';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport {Skeleton} from '@shipfox/react-ui/skeleton';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport type {DefinitionSyncSummary} from '#core/definition.js';\n\n/**\n * We cannot cheaply resolve `external_repository_id` → `owner/repo`\n * (no by-id endpoint; `listRepositories` is paginated by connection).\n * The strip surfaces the raw id as a `<Code>` chip with a tooltip carrying the\n * full string.\n */\nexport function SourceStrip({\n connectionId,\n externalRepositoryId,\n sync,\n isPending,\n}: {\n connectionId: string;\n externalRepositoryId: string;\n sync: DefinitionSyncSummary | null | undefined;\n isPending: boolean;\n}) {\n const workspace = useActiveWorkspace();\n const connectionsQuery = useSourceConnectionsQuery(workspace.id);\n const connection = connectionsQuery.data?.find((c) => c.id === connectionId);\n\n return (\n <section\n className=\"flex flex-col gap-inline rounded-8 border border-border-neutral-base bg-background-neutral-base px-row py-row sm:flex-row sm:items-center sm:justify-between\"\n aria-label=\"Project source\"\n >\n <div className=\"flex min-w-0 items-center gap-inline\">\n <Icon name={providerIconName(connection?.provider)} className=\"size-20 shrink-0\" />\n <div className=\"flex min-w-0 flex-col gap-tight sm:flex-row sm:items-center sm:gap-inline\">\n {connectionsQuery.isPending ? (\n <Skeleton className=\"h-16 w-160\" />\n ) : (\n <Text size=\"sm\" bold className=\"truncate\">\n {connection?.displayName ?? 'Connected source'}\n </Text>\n )}\n <Tooltip>\n <TooltipTrigger asChild>\n <Code variant=\"label\" className=\"truncate text-foreground-neutral-muted\">\n {externalRepositoryId}\n </Code>\n </TooltipTrigger>\n <TooltipContent>{externalRepositoryId}</TooltipContent>\n </Tooltip>\n </div>\n </div>\n <div className=\"shrink-0\">\n <SyncBadge sync={sync} isPending={isPending} />\n </div>\n </section>\n );\n}\n\nfunction providerIconName(provider: string | undefined): IconName {\n if (provider === 'github') return 'github' as IconName;\n return 'componentLine' as IconName;\n}\n\nfunction SyncBadge({\n sync,\n isPending,\n}: {\n sync: DefinitionSyncSummary | null | undefined;\n isPending: boolean;\n}) {\n if (isPending) return <StatusBadge variant=\"neutral\">Loading</StatusBadge>;\n if (sync === undefined) return <StatusBadge variant=\"neutral\">Unavailable</StatusBadge>;\n if (sync === null) return <StatusBadge variant=\"neutral\">No sync</StatusBadge>;\n\n const variantByStatus = {\n pending: 'neutral',\n syncing: 'info',\n succeeded: 'success',\n failed: 'error',\n } as const;\n\n return (\n <StatusBadge variant={variantByStatus[sync.status as keyof typeof variantByStatus]}>\n {sync.status}\n </StatusBadge>\n );\n}\n"],"names":["useActiveWorkspace","useSourceConnectionsQuery","StatusBadge","Icon","Skeleton","Tooltip","TooltipContent","TooltipTrigger","Code","Text","SourceStrip","connectionId","externalRepositoryId","sync","isPending","workspace","connectionsQuery","id","connection","data","find","c","section","className","aria-label","div","name","providerIconName","provider","size","bold","displayName","asChild","variant","SyncBadge","undefined","variantByStatus","pending","syncing","succeeded","failed","status"],"mappings":";AAAA,SAAQA,kBAAkB,QAAO,uBAAuB;AACxD,SAAQC,yBAAyB,QAAO,+BAA+B;AACvE,SAAQC,WAAW,QAAO,0BAA0B;AACpD,SAAQC,IAAI,QAAsB,yBAAyB;AAC3D,SAAQC,QAAQ,QAAO,6BAA6B;AACpD,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,EAAEC,IAAI,QAAO,+BAA+B;AAGxD;;;;;CAKC,GACD,OAAO,SAASC,YAAY,EAC1BC,YAAY,EACZC,oBAAoB,EACpBC,IAAI,EACJC,SAAS,EAMV;IACC,MAAMC,YAAYf;IAClB,MAAMgB,mBAAmBf,0BAA0Bc,UAAUE,EAAE;IAC/D,MAAMC,aAAaF,iBAAiBG,IAAI,EAAEC,KAAK,CAACC,IAAMA,EAAEJ,EAAE,KAAKN;IAE/D,qBACE,MAACW;QACCC,WAAU;QACVC,cAAW;;0BAEX,MAACC;gBAAIF,WAAU;;kCACb,KAACpB;wBAAKuB,MAAMC,iBAAiBT,YAAYU;wBAAWL,WAAU;;kCAC9D,MAACE;wBAAIF,WAAU;;4BACZP,iBAAiBF,SAAS,iBACzB,KAACV;gCAASmB,WAAU;+CAEpB,KAACd;gCAAKoB,MAAK;gCAAKC,IAAI;gCAACP,WAAU;0CAC5BL,YAAYa,eAAe;;0CAGhC,MAAC1B;;kDACC,KAACE;wCAAeyB,OAAO;kDACrB,cAAA,KAACxB;4CAAKyB,SAAQ;4CAAQV,WAAU;sDAC7BX;;;kDAGL,KAACN;kDAAgBM;;;;;;;;0BAIvB,KAACa;gBAAIF,WAAU;0BACb,cAAA,KAACW;oBAAUrB,MAAMA;oBAAMC,WAAWA;;;;;AAI1C;AAEA,SAASa,iBAAiBC,QAA4B;IACpD,IAAIA,aAAa,UAAU,OAAO;IAClC,OAAO;AACT;AAEA,SAASM,UAAU,EACjBrB,IAAI,EACJC,SAAS,EAIV;IACC,IAAIA,WAAW,qBAAO,KAACZ;QAAY+B,SAAQ;kBAAU;;IACrD,IAAIpB,SAASsB,WAAW,qBAAO,KAACjC;QAAY+B,SAAQ;kBAAU;;IAC9D,IAAIpB,SAAS,MAAM,qBAAO,KAACX;QAAY+B,SAAQ;kBAAU;;IAEzD,MAAMG,kBAAkB;QACtBC,SAAS;QACTC,SAAS;QACTC,WAAW;QACXC,QAAQ;IACV;IAEA,qBACE,KAACtC;QAAY+B,SAASG,eAAe,CAACvB,KAAK4B,MAAM,CAAiC;kBAC/E5B,KAAK4B,MAAM;;AAGlB"}
|
package/dist/feature.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export declare const projectsNavigation: readonly [{
|
|
2
|
-
readonly id:
|
|
3
|
-
readonly scope:
|
|
4
|
-
readonly label:
|
|
5
|
-
readonly to:
|
|
2
|
+
readonly id: 'nav.projects';
|
|
3
|
+
readonly scope: 'workspace';
|
|
4
|
+
readonly label: 'Projects';
|
|
5
|
+
readonly to: '/w/$workspaceSlug';
|
|
6
6
|
readonly exact: true;
|
|
7
7
|
readonly order: 100;
|
|
8
8
|
}];
|
|
9
9
|
export declare const projectSettingsSections: readonly [{
|
|
10
|
-
readonly id:
|
|
11
|
-
readonly scope:
|
|
12
|
-
readonly pathSegment:
|
|
13
|
-
readonly label:
|
|
14
|
-
readonly icon:
|
|
10
|
+
readonly id: 'settings.project-general';
|
|
11
|
+
readonly scope: 'project';
|
|
12
|
+
readonly pathSegment: 'general';
|
|
13
|
+
readonly label: 'General';
|
|
14
|
+
readonly icon: 'settings3Line';
|
|
15
15
|
readonly order: 50;
|
|
16
16
|
}];
|
|
17
17
|
export declare const projectsFeature: {
|
|
@@ -38,19 +38,19 @@ export declare const projectsFeature: {
|
|
|
38
38
|
readonly impl: "@shipfox/client-projects/routes/project-settings";
|
|
39
39
|
}];
|
|
40
40
|
readonly navigation: readonly [{
|
|
41
|
-
readonly id:
|
|
42
|
-
readonly scope:
|
|
43
|
-
readonly label:
|
|
44
|
-
readonly to:
|
|
41
|
+
readonly id: 'nav.projects';
|
|
42
|
+
readonly scope: 'workspace';
|
|
43
|
+
readonly label: 'Projects';
|
|
44
|
+
readonly to: '/w/$workspaceSlug';
|
|
45
45
|
readonly exact: true;
|
|
46
46
|
readonly order: 100;
|
|
47
47
|
}];
|
|
48
48
|
readonly settingsSections: readonly [{
|
|
49
|
-
readonly id:
|
|
50
|
-
readonly scope:
|
|
51
|
-
readonly pathSegment:
|
|
52
|
-
readonly label:
|
|
53
|
-
readonly icon:
|
|
49
|
+
readonly id: 'settings.project-general';
|
|
50
|
+
readonly scope: 'project';
|
|
51
|
+
readonly pathSegment: 'general';
|
|
52
|
+
readonly label: 'General';
|
|
53
|
+
readonly icon: 'settings3Line';
|
|
54
54
|
readonly order: 50;
|
|
55
55
|
}];
|
|
56
56
|
};
|
package/dist/feature.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../src/feature.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../src/feature.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;iBAEvB,cAAc;oBACX,WAAW;oBACX,UAAU;iBACb,mBAAmB;;oBAEhB,GAAG;EAE6B,CAAC;AAE5C,eAAO,MAAM,uBAAuB;aAEhC,EAAE,EAAE,0BAA0B;aAC9B,KAAK,EAAE,SAAS;aAChB,WAAW,EAAE,SAAS;aACtB,KAAK,EAAE,SAAS;aAChB,IAAI,EAAE,eAAe;aACrB,KAAK,EAAE,EAAE;EAEH,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;qBApBpB,cAAc;wBACX,WAAW;wBACX,UAAU;qBACb,mBAAmB;;wBAEhB,GAAG;;;qBAMN,0BAA0B;wBACvB,SAAS;8BACH,SAAS;wBACf,SAAS;uBACV,eAAe;wBACd,EAAE;;CAmCX,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type InfiniteData, type UseInfiniteQueryOptions, type UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { DefinitionList } from '#core/definition.js';
|
|
3
3
|
export declare const definitionsQueryKeys: {
|
|
4
|
-
all: readonly [
|
|
4
|
+
all: readonly ['definitions'];
|
|
5
5
|
list: (projectId: string) => readonly ["definitions", "list", string];
|
|
6
6
|
};
|
|
7
7
|
type DefinitionListQueryKey = ReturnType<typeof definitionsQueryKeys.list> | readonly ['definitions', 'list'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../src/hooks/api/definitions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,YAAY,EAGjB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EAGrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAA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AACD,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,SAAK,mHAEpF;AACD,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,kFAEhE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type InfiniteData, type QueryClient, type UseInfiniteQueryOptions, type UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { CreateProjectCommand, Project, ProjectList, UpdateProjectCommand } from '#core/project.js';
|
|
3
3
|
export declare const projectsQueryKeys: {
|
|
4
|
-
all: readonly [
|
|
4
|
+
all: readonly ['projects'];
|
|
5
5
|
list: (workspaceId: string, search?: string) => readonly ["projects", "list", string, string];
|
|
6
6
|
slug: (workspaceId: string, projectSlug: string) => readonly ["projects", "slug", string, string];
|
|
7
7
|
exists: (workspaceId: string) => readonly ["projects", "exists", string];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/hooks/api/projects.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,WAAW,EAEhB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EAKrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EACV,oBAAoB,EACpB,OAAO,EACP,WAAW,EACX,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAK1B,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/hooks/api/projects.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,WAAW,EAEhB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EAKrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EACV,oBAAoB,EACpB,OAAO,EACP,WAAW,EACX,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAK1B,eAAO,MAAM,iBAAiB;IAC5B,G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4B,CAC1C,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,4BAA4B,CAS9B;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,yBAAyB,CAQ5F;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,uBAAuB,CAsBzB;AAED,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,SAAK,gHAGX;AACD,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,2EAE5D;AACD,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,WAAW,EAAE,MAAM,GAAG,SAAS,kFAGhC;AACD,wBAAgB,wBAAwB,qGAoBvC;AAED,wBAAgB,wBAAwB,qGAcvC"}
|
|
@@ -183,10 +183,10 @@ export function CreateProjectPage() {
|
|
|
183
183
|
const showRepoPicker = Boolean(selectedConnection);
|
|
184
184
|
const filteredEmptyMessage = trimmedFilter ? `No repositories matching "${repoFilter.trim()}".` : 'No repositories visible to this connection.';
|
|
185
185
|
return /*#__PURE__*/ _jsxs("div", {
|
|
186
|
-
className: "flex w-full flex-col gap-
|
|
186
|
+
className: "flex w-full flex-col gap-section",
|
|
187
187
|
children: [
|
|
188
188
|
/*#__PURE__*/ _jsxs("header", {
|
|
189
|
-
className: "flex flex-col gap-
|
|
189
|
+
className: "flex flex-col gap-inline",
|
|
190
190
|
children: [
|
|
191
191
|
/*#__PURE__*/ _jsx(Header, {
|
|
192
192
|
id: "create-project-title",
|
|
@@ -207,7 +207,7 @@ export function CreateProjectPage() {
|
|
|
207
207
|
role: "alert",
|
|
208
208
|
type: "error",
|
|
209
209
|
children: /*#__PURE__*/ _jsxs("div", {
|
|
210
|
-
className: "flex w-full flex-wrap items-center justify-between gap-
|
|
210
|
+
className: "flex w-full flex-wrap items-center justify-between gap-cluster",
|
|
211
211
|
children: [
|
|
212
212
|
/*#__PURE__*/ _jsx(Text, {
|
|
213
213
|
size: "sm",
|
|
@@ -232,20 +232,20 @@ export function CreateProjectPage() {
|
|
|
232
232
|
},
|
|
233
233
|
noValidate: true,
|
|
234
234
|
"aria-labelledby": "create-project-title",
|
|
235
|
-
className: "grid items-start gap-
|
|
235
|
+
className: "grid items-start gap-region lg:grid-cols-[minmax(0,1fr)_340px]",
|
|
236
236
|
children: [
|
|
237
237
|
/*#__PURE__*/ _jsxs("div", {
|
|
238
|
-
className: "flex min-w-0 flex-col gap-
|
|
238
|
+
className: "flex min-w-0 flex-col gap-region",
|
|
239
239
|
children: [
|
|
240
240
|
/*#__PURE__*/ _jsxs("section", {
|
|
241
|
-
className: "flex flex-col gap-
|
|
241
|
+
className: "flex flex-col gap-group",
|
|
242
242
|
"aria-label": "Source integration",
|
|
243
243
|
children: [
|
|
244
244
|
/*#__PURE__*/ _jsxs("div", {
|
|
245
|
-
className: "flex items-start justify-between gap-
|
|
245
|
+
className: "flex items-start justify-between gap-group",
|
|
246
246
|
children: [
|
|
247
247
|
/*#__PURE__*/ _jsxs("div", {
|
|
248
|
-
className: "flex flex-col gap-
|
|
248
|
+
className: "flex flex-col gap-tight",
|
|
249
249
|
children: [
|
|
250
250
|
/*#__PURE__*/ _jsx(Header, {
|
|
251
251
|
variant: "h3",
|
|
@@ -281,11 +281,11 @@ export function CreateProjectPage() {
|
|
|
281
281
|
]
|
|
282
282
|
}),
|
|
283
283
|
showRepoPicker ? /*#__PURE__*/ _jsxs("section", {
|
|
284
|
-
className: "flex flex-col gap-
|
|
284
|
+
className: "flex flex-col gap-group",
|
|
285
285
|
"aria-label": "Repository",
|
|
286
286
|
children: [
|
|
287
287
|
/*#__PURE__*/ _jsxs("div", {
|
|
288
|
-
className: "flex flex-col gap-
|
|
288
|
+
className: "flex flex-col gap-tight",
|
|
289
289
|
children: [
|
|
290
290
|
/*#__PURE__*/ _jsx(Header, {
|
|
291
291
|
variant: "h3",
|
|
@@ -317,10 +317,10 @@ export function CreateProjectPage() {
|
|
|
317
317
|
/*#__PURE__*/ _jsx("aside", {
|
|
318
318
|
className: "lg:sticky lg:top-32",
|
|
319
319
|
children: /*#__PURE__*/ _jsxs("div", {
|
|
320
|
-
className: "flex flex-col gap-
|
|
320
|
+
className: "flex flex-col gap-group rounded-8 border border-border-neutral-base bg-background-neutral-base p-panel",
|
|
321
321
|
children: [
|
|
322
322
|
/*#__PURE__*/ _jsxs("div", {
|
|
323
|
-
className: "flex flex-col gap-
|
|
323
|
+
className: "flex flex-col gap-tight",
|
|
324
324
|
children: [
|
|
325
325
|
/*#__PURE__*/ _jsx(Header, {
|
|
326
326
|
variant: "h3",
|
|
@@ -426,7 +426,7 @@ export function CreateProjectPage() {
|
|
|
426
426
|
}
|
|
427
427
|
function ProjectSummary({ connection, repositoryName }) {
|
|
428
428
|
return /*#__PURE__*/ _jsxs("div", {
|
|
429
|
-
className: "flex min-w-0 items-center gap-
|
|
429
|
+
className: "flex min-w-0 items-center gap-inline",
|
|
430
430
|
children: [
|
|
431
431
|
repositoryName ? /*#__PURE__*/ _jsx(IntegrationIcon, {
|
|
432
432
|
source: connection?.provider,
|