@revenexx/studio-shared 0.1.1 → 0.2.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/README.md +22 -12
- package/dist/module.d.mts +9 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +27 -0
- package/dist/runtime/components/DataTable/ColumnsMenu.d.vue.ts +12 -0
- package/{components → dist/runtime/components}/DataTable/ColumnsMenu.vue +10 -17
- package/dist/runtime/components/DataTable/ColumnsMenu.vue.d.ts +12 -0
- package/dist/runtime/components/DataTable/DataTable.d.vue.ts +59 -0
- package/dist/runtime/components/DataTable/DataTable.vue +453 -0
- package/dist/runtime/components/DataTable/DataTable.vue.d.ts +59 -0
- package/dist/runtime/components/DataTable/FilterMenu.d.vue.ts +12 -0
- package/{components → dist/runtime/components}/DataTable/FilterMenu.vue +4 -8
- package/dist/runtime/components/DataTable/FilterMenu.vue.d.ts +12 -0
- package/dist/runtime/components/DataTable/types.d.ts +70 -0
- package/dist/runtime/components/DataTable/types.js +0 -0
- package/dist/runtime/components/Shared/BuildLogsFlyout.d.vue.ts +30 -0
- package/{components → dist/runtime/components}/Shared/BuildLogsFlyout.vue +27 -45
- package/dist/runtime/components/Shared/BuildLogsFlyout.vue.d.ts +30 -0
- package/dist/runtime/components/Shared/GitDeploymentSettings.d.vue.ts +17 -0
- package/{components → dist/runtime/components}/Shared/GitDeploymentSettings.vue +22 -35
- package/dist/runtime/components/Shared/GitDeploymentSettings.vue.d.ts +17 -0
- package/dist/runtime/components/Shared/KpiTile.d.vue.ts +13 -0
- package/{components → dist/runtime/components}/Shared/KpiTile.vue +11 -19
- package/dist/runtime/components/Shared/KpiTile.vue.d.ts +13 -0
- package/dist/runtime/components/Shared/PageHeader.d.vue.ts +23 -0
- package/{components → dist/runtime/components}/Shared/PageHeader.vue +6 -8
- package/dist/runtime/components/Shared/PageHeader.vue.d.ts +23 -0
- package/dist/runtime/components/Shared/SidebarNav.d.vue.ts +36 -0
- package/{components → dist/runtime/components}/Shared/SidebarNav.vue +15 -47
- package/dist/runtime/components/Shared/SidebarNav.vue.d.ts +36 -0
- package/dist/runtime/components/Shared/SortHeader.d.vue.ts +23 -0
- package/dist/runtime/components/Shared/SortHeader.vue +35 -0
- package/dist/runtime/components/Shared/SortHeader.vue.d.ts +23 -0
- package/dist/runtime/components/Shared/StateCard.d.vue.ts +32 -0
- package/{components → dist/runtime/components}/Shared/StateCard.vue +21 -36
- package/dist/runtime/components/Shared/StateCard.vue.d.ts +32 -0
- package/dist/runtime/components/Shared/StudioCard.d.vue.ts +15 -0
- package/dist/runtime/components/Shared/StudioCard.vue +19 -0
- package/dist/runtime/components/Shared/StudioCard.vue.d.ts +15 -0
- package/dist/runtime/components/Shared/TabBar.d.vue.ts +23 -0
- package/{components → dist/runtime/components}/Shared/TabBar.vue +7 -16
- package/dist/runtime/components/Shared/TabBar.vue.d.ts +23 -0
- package/dist/runtime/components/Shared/ViewTab.d.vue.ts +7 -0
- package/{components → dist/runtime/components}/Shared/ViewTab.vue +7 -9
- package/dist/runtime/components/Shared/ViewTab.vue.d.ts +7 -0
- package/dist/runtime/components/Shared/Wizard.d.vue.ts +47 -0
- package/{components → dist/runtime/components}/Shared/Wizard.vue +24 -41
- package/dist/runtime/components/Shared/Wizard.vue.d.ts +47 -0
- package/{composables/usePlatformAuth.ts → dist/runtime/composables/usePlatformAuth.d.ts} +3 -21
- package/dist/runtime/composables/usePlatformAuth.js +17 -0
- package/dist/runtime/composables/usePlatformTenant.d.ts +14 -0
- package/dist/runtime/composables/usePlatformTenant.js +18 -0
- package/dist/runtime/types/nav.d.ts +23 -0
- package/dist/runtime/types/nav.js +0 -0
- package/dist/types.d.mts +15 -0
- package/package.json +25 -12
- package/components/DataTable/DataTable.vue +0 -518
- package/components/DataTable/types.ts +0 -82
- package/components/Shared/SortHeader.vue +0 -50
- package/components/Shared/StudioCard.vue +0 -24
- package/composables/usePlatformTenant.ts +0 -35
- package/index.ts +0 -12
- package/nuxt.config.ts +0 -23
|
@@ -1,61 +1,43 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { RefreshCircle as Loader2, Copy as CopyIcon } from
|
|
1
|
+
<script setup>
|
|
2
|
+
import { RefreshCircle as Loader2, Copy as CopyIcon } from "#solar-icons";
|
|
3
3
|
import {
|
|
4
4
|
Badge,
|
|
5
5
|
Button,
|
|
6
|
-
Sheet,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
defineProps<{
|
|
26
|
-
open: boolean
|
|
27
|
-
deployment: BuildDeployment | null
|
|
28
|
-
loading: boolean
|
|
29
|
-
isBuilding?: boolean
|
|
30
|
-
userPinned?: boolean
|
|
31
|
-
error?: string | null
|
|
32
|
-
}>()
|
|
33
|
-
|
|
34
|
-
const emit = defineEmits<{
|
|
35
|
-
'update:open': [boolean]
|
|
36
|
-
'refresh': []
|
|
37
|
-
}>()
|
|
38
|
-
|
|
39
|
-
async function copyId(id: string | undefined) {
|
|
40
|
-
if (!id) return
|
|
6
|
+
Sheet,
|
|
7
|
+
SheetContent,
|
|
8
|
+
SheetDescription,
|
|
9
|
+
SheetHeader,
|
|
10
|
+
SheetTitle
|
|
11
|
+
} from "@revenexx/studio";
|
|
12
|
+
import { toast } from "vue-sonner";
|
|
13
|
+
defineProps({
|
|
14
|
+
open: { type: Boolean, required: true },
|
|
15
|
+
deployment: { type: [Object, null], required: true },
|
|
16
|
+
loading: { type: Boolean, required: true },
|
|
17
|
+
isBuilding: { type: Boolean, required: false },
|
|
18
|
+
userPinned: { type: Boolean, required: false },
|
|
19
|
+
error: { type: [String, null], required: false }
|
|
20
|
+
});
|
|
21
|
+
const emit = defineEmits(["update:open", "refresh"]);
|
|
22
|
+
async function copyId(id) {
|
|
23
|
+
if (!id) return;
|
|
41
24
|
try {
|
|
42
|
-
await navigator.clipboard.writeText(id)
|
|
43
|
-
toast.success(
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
toast.error('Could not copy')
|
|
25
|
+
await navigator.clipboard.writeText(id);
|
|
26
|
+
toast.success("ID copied");
|
|
27
|
+
} catch {
|
|
28
|
+
toast.error("Could not copy");
|
|
47
29
|
}
|
|
48
30
|
}
|
|
49
31
|
</script>
|
|
50
32
|
|
|
51
33
|
<template>
|
|
52
|
-
<Sheet :open="open" @update:open="(v
|
|
34
|
+
<Sheet :open="open" @update:open="(v) => emit('update:open', v)">
|
|
53
35
|
<SheetContent side="right" class="flex w-full flex-col gap-0 p-0 sm:max-w-[max(50vw,640px)]">
|
|
54
36
|
<SheetHeader class="border-b px-4 py-3">
|
|
55
37
|
<div class="flex items-center gap-2">
|
|
56
38
|
<Badge variant="outline" class="shrink-0">Build</Badge>
|
|
57
39
|
<SheetTitle class="truncate font-mono text-sm">
|
|
58
|
-
{{ deployment?.$id ||
|
|
40
|
+
{{ deployment?.$id || "Build logs" }}
|
|
59
41
|
</SheetTitle>
|
|
60
42
|
<button v-if="deployment?.$id" title="Copy ID" class="ml-auto" @click="copyId(deployment.$id)">
|
|
61
43
|
<CopyIcon :size="12" class="text-muted-foreground hover:text-foreground" />
|
|
@@ -90,7 +72,7 @@ async function copyId(id: string | undefined) {
|
|
|
90
72
|
<template v-else-if="deployment">
|
|
91
73
|
<div class="flex items-center justify-between gap-2 px-4 py-2 border-b bg-muted/30">
|
|
92
74
|
<span class="text-xs text-muted-foreground">
|
|
93
|
-
Status: <span class="font-medium text-foreground">{{ deployment.status ||
|
|
75
|
+
Status: <span class="font-medium text-foreground">{{ deployment.status || "\u2014" }}</span>
|
|
94
76
|
<template v-if="deployment.buildDuration">
|
|
95
77
|
· {{ deployment.buildDuration }}s
|
|
96
78
|
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal shape of a site deployment — just the fields this flyout renders.
|
|
3
|
+
* Kept local so studio-shared has no dependency on the private SDK; a full
|
|
4
|
+
* SDK `Models.Deployment` is structurally assignable to it.
|
|
5
|
+
*/
|
|
6
|
+
interface BuildDeployment {
|
|
7
|
+
$id?: string;
|
|
8
|
+
status?: string;
|
|
9
|
+
buildLogs?: string;
|
|
10
|
+
buildDuration?: number;
|
|
11
|
+
providerBranch?: string;
|
|
12
|
+
providerCommitHash?: string;
|
|
13
|
+
providerCommitUrl?: string;
|
|
14
|
+
}
|
|
15
|
+
type __VLS_Props = {
|
|
16
|
+
open: boolean;
|
|
17
|
+
deployment: BuildDeployment | null;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
isBuilding?: boolean;
|
|
20
|
+
userPinned?: boolean;
|
|
21
|
+
error?: string | null;
|
|
22
|
+
};
|
|
23
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
"update:open": (args_0: boolean) => any;
|
|
25
|
+
refresh: () => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
+
"onUpdate:open"?: ((args_0: boolean) => any) | undefined;
|
|
28
|
+
onRefresh?: (() => any) | undefined;
|
|
29
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
triggerMode: string;
|
|
3
|
+
previewsEnabled: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
showPreviews?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:triggerMode": (value: string) => any;
|
|
9
|
+
"update:previewsEnabled": (value: boolean) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:triggerMode"?: ((value: string) => any) | undefined;
|
|
12
|
+
"onUpdate:previewsEnabled"?: ((value: boolean) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
showPreviews: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -1,38 +1,25 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
/**
|
|
3
|
-
* Deployment-trigger settings for a git-connected resource (app / site /
|
|
4
|
-
* integration). Two orthogonal controls, mapped to the platform attributes
|
|
5
|
-
* added in V33 (26.1.9):
|
|
6
|
-
*
|
|
7
|
-
* - vcsTriggerMode ('push' | 'tag'): when a deployment is triggered — on every
|
|
8
|
-
* branch push, or only when a tag is pushed / a GitHub release is published.
|
|
9
|
-
* - vcsPreviewsEnabled: whether pull requests get a preview deployment + a
|
|
10
|
-
* status comment. Hidden via `showPreviews=false` for resources where it
|
|
11
|
-
* makes no sense.
|
|
12
|
-
*
|
|
13
|
-
* Presentational only — two v-models, parent owns persistence.
|
|
14
|
-
*/
|
|
1
|
+
<script setup>
|
|
15
2
|
import {
|
|
16
|
-
Card,
|
|
3
|
+
Card,
|
|
4
|
+
CardContent,
|
|
5
|
+
CardDescription,
|
|
6
|
+
CardHeader,
|
|
7
|
+
CardTitle,
|
|
17
8
|
Label,
|
|
18
|
-
Select,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
disabled: false,
|
|
29
|
-
showPreviews: true
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
defineEmits<{
|
|
33
|
-
'update:triggerMode': [value: string]
|
|
34
|
-
'update:previewsEnabled': [value: boolean]
|
|
35
|
-
}>()
|
|
9
|
+
Select,
|
|
10
|
+
SelectContent,
|
|
11
|
+
SelectItem,
|
|
12
|
+
SelectTrigger,
|
|
13
|
+
SelectValue,
|
|
14
|
+
Switch
|
|
15
|
+
} from "@revenexx/studio";
|
|
16
|
+
defineProps({
|
|
17
|
+
triggerMode: { type: String, required: true },
|
|
18
|
+
previewsEnabled: { type: Boolean, required: true },
|
|
19
|
+
disabled: { type: Boolean, required: false, default: false },
|
|
20
|
+
showPreviews: { type: Boolean, required: false, default: true }
|
|
21
|
+
});
|
|
22
|
+
defineEmits(["update:triggerMode", "update:previewsEnabled"]);
|
|
36
23
|
</script>
|
|
37
24
|
|
|
38
25
|
<template>
|
|
@@ -49,7 +36,7 @@ defineEmits<{
|
|
|
49
36
|
<Select
|
|
50
37
|
:model-value="triggerMode"
|
|
51
38
|
:disabled="disabled"
|
|
52
|
-
@update:model-value="(v) => $emit('update:triggerMode', v
|
|
39
|
+
@update:model-value="(v) => $emit('update:triggerMode', v)"
|
|
53
40
|
>
|
|
54
41
|
<SelectTrigger id="vcs-trigger-mode">
|
|
55
42
|
<SelectValue placeholder="On every push" />
|
|
@@ -73,7 +60,7 @@ defineEmits<{
|
|
|
73
60
|
<Switch
|
|
74
61
|
:model-value="previewsEnabled"
|
|
75
62
|
:disabled="disabled"
|
|
76
|
-
@update:model-value="(v) => $emit('update:previewsEnabled', v
|
|
63
|
+
@update:model-value="(v) => $emit('update:previewsEnabled', v)"
|
|
77
64
|
/>
|
|
78
65
|
<div class="text-sm">
|
|
79
66
|
<div class="font-medium">Preview deployments</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
triggerMode: string;
|
|
3
|
+
previewsEnabled: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
showPreviews?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:triggerMode": (value: string) => any;
|
|
9
|
+
"update:previewsEnabled": (value: boolean) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:triggerMode"?: ((value: string) => any) | undefined;
|
|
12
|
+
"onUpdate:previewsEnabled"?: ((value: boolean) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
showPreviews: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string | number;
|
|
4
|
+
icon?: unknown;
|
|
5
|
+
/** Colored change indicator, e.g. "+12.5%". */
|
|
6
|
+
delta?: string;
|
|
7
|
+
up?: boolean;
|
|
8
|
+
/** Muted line under the value (e.g. "vs last month"). */
|
|
9
|
+
sub?: string;
|
|
10
|
+
to?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
icon?: unknown
|
|
13
|
-
/** Colored change indicator, e.g. "+12.5%". */
|
|
14
|
-
delta?: string
|
|
15
|
-
up?: boolean
|
|
16
|
-
/** Muted line under the value (e.g. "vs last month"). */
|
|
17
|
-
sub?: string
|
|
18
|
-
to?: string
|
|
19
|
-
}>()
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NuxtLink } from "#components";
|
|
3
|
+
defineProps({
|
|
4
|
+
label: { type: String, required: true },
|
|
5
|
+
value: { type: [String, Number], required: true },
|
|
6
|
+
icon: { type: null, required: false },
|
|
7
|
+
delta: { type: String, required: false },
|
|
8
|
+
up: { type: Boolean, required: false },
|
|
9
|
+
sub: { type: String, required: false },
|
|
10
|
+
to: { type: String, required: false }
|
|
11
|
+
});
|
|
20
12
|
</script>
|
|
21
13
|
|
|
22
14
|
<template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string | number;
|
|
4
|
+
icon?: unknown;
|
|
5
|
+
/** Colored change indicator, e.g. "+12.5%". */
|
|
6
|
+
delta?: string;
|
|
7
|
+
up?: boolean;
|
|
8
|
+
/** Muted line under the value (e.g. "vs last month"). */
|
|
9
|
+
sub?: string;
|
|
10
|
+
to?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Lucide icon component shown left of the title. Rendered as a plain
|
|
3
|
+
* outline icon (no tile background) to keep the header calm. */
|
|
4
|
+
icon?: unknown;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_5: {}, __VLS_7: {}, __VLS_9: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
title?: (props: typeof __VLS_5) => any;
|
|
11
|
+
} & {
|
|
12
|
+
actions?: (props: typeof __VLS_7) => any;
|
|
13
|
+
} & {
|
|
14
|
+
tabs?: (props: typeof __VLS_9) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
defineProps
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
description?: string
|
|
8
|
-
}>()
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
icon: { type: null, required: false },
|
|
4
|
+
title: { type: String, required: true },
|
|
5
|
+
description: { type: String, required: false }
|
|
6
|
+
});
|
|
9
7
|
</script>
|
|
10
8
|
|
|
11
9
|
<template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Lucide icon component shown left of the title. Rendered as a plain
|
|
3
|
+
* outline icon (no tile background) to keep the header calm. */
|
|
4
|
+
icon?: unknown;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_5: {}, __VLS_7: {}, __VLS_9: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
title?: (props: typeof __VLS_5) => any;
|
|
11
|
+
} & {
|
|
12
|
+
actions?: (props: typeof __VLS_7) => any;
|
|
13
|
+
} & {
|
|
14
|
+
tabs?: (props: typeof __VLS_9) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared studio sidebar.
|
|
3
|
+
*
|
|
4
|
+
* Header (icon + title) + a sectioned, link list driven by data. Every
|
|
5
|
+
* studio sidebar (Settings, Integrations, Commerce, Apps, …) renders
|
|
6
|
+
* through this so spacing, active state, badges and "soon" tags stay
|
|
7
|
+
* identical. Pass `sections`; use `#notice` for loading/empty hints.
|
|
8
|
+
*/
|
|
9
|
+
import type { Component } from 'vue';
|
|
10
|
+
import type { SidebarNavSection } from '../../types/nav.js';
|
|
11
|
+
export type { SidebarNavItem, SidebarNavSection } from '../../types/nav.js';
|
|
12
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
13
|
+
title: string;
|
|
14
|
+
icon?: Component;
|
|
15
|
+
sections: SidebarNavSection[];
|
|
16
|
+
/** Hide the header icon and use a lighter header title weight. */
|
|
17
|
+
minimal?: boolean;
|
|
18
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
19
|
+
title: string;
|
|
20
|
+
icon?: Component;
|
|
21
|
+
sections: SidebarNavSection[];
|
|
22
|
+
/** Hide the header icon and use a lighter header title weight. */
|
|
23
|
+
minimal?: boolean;
|
|
24
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
25
|
+
icon?: (props: {}) => any;
|
|
26
|
+
} & {
|
|
27
|
+
top?: (props: {}) => any;
|
|
28
|
+
} & {
|
|
29
|
+
notice?: (props: {}) => any;
|
|
30
|
+
}>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -1,48 +1,18 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import type { Component } from 'vue'
|
|
1
|
+
<script>
|
|
3
2
|
|
|
4
|
-
export type SidebarNavItem = {
|
|
5
|
-
label: string
|
|
6
|
-
to: string
|
|
7
|
-
icon?: Component
|
|
8
|
-
badge?: number | string | null
|
|
9
|
-
/** Dim + show a "soon" tag (not-yet-shipped surfaces). */
|
|
10
|
-
preview?: boolean
|
|
11
|
-
/** Match the route exactly (for studio roots like `/settings`). */
|
|
12
|
-
exact?: boolean
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type SidebarNavSection = {
|
|
16
|
-
key: string
|
|
17
|
-
/** Empty/omitted → no group label (pinned items at the top). */
|
|
18
|
-
label?: string
|
|
19
|
-
items: SidebarNavItem[]
|
|
20
|
-
}
|
|
21
3
|
</script>
|
|
22
4
|
|
|
23
|
-
<script setup
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
defineProps<{
|
|
35
|
-
title: string
|
|
36
|
-
icon?: Component
|
|
37
|
-
sections: SidebarNavSection[]
|
|
38
|
-
/** Hide the header icon and use a lighter header title weight. */
|
|
39
|
-
minimal?: boolean
|
|
40
|
-
}>()
|
|
41
|
-
|
|
42
|
-
const route = useRoute()
|
|
43
|
-
function isActive(item: SidebarNavItem): boolean {
|
|
44
|
-
if (item.exact) return route.path === item.to
|
|
45
|
-
return route.path === item.to || route.path.startsWith(`${item.to}/`)
|
|
5
|
+
<script setup>
|
|
6
|
+
defineProps({
|
|
7
|
+
title: { type: String, required: true },
|
|
8
|
+
icon: { type: null, required: false },
|
|
9
|
+
sections: { type: Array, required: true },
|
|
10
|
+
minimal: { type: Boolean, required: false }
|
|
11
|
+
});
|
|
12
|
+
const route = useRoute();
|
|
13
|
+
function isActive(item) {
|
|
14
|
+
if (item.exact) return route.path === item.to;
|
|
15
|
+
return route.path === item.to || route.path.startsWith(`${item.to}/`);
|
|
46
16
|
}
|
|
47
17
|
</script>
|
|
48
18
|
|
|
@@ -73,11 +43,9 @@ function isActive(item: SidebarNavItem): boolean {
|
|
|
73
43
|
:to="item.to"
|
|
74
44
|
class="group flex items-center gap-2.5 rounded-md px-2 py-1.5 text-sm transition-colors hover:text-primary"
|
|
75
45
|
:class="[
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
item.preview ? 'opacity-70' : '',
|
|
80
|
-
]"
|
|
46
|
+
isActive(item) ? 'bg-primary/10 text-[#0B0522] font-medium' : 'text-foreground/80 hover:bg-primary/5',
|
|
47
|
+
item.preview ? 'opacity-70' : ''
|
|
48
|
+
]"
|
|
81
49
|
>
|
|
82
50
|
<component :is="item.icon" v-if="item.icon" :size="14" :stroke-width="2" class="shrink-0 text-foreground/60 group-hover:text-primary" />
|
|
83
51
|
<span class="flex-1 truncate flex items-center gap-1.5">
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared studio sidebar.
|
|
3
|
+
*
|
|
4
|
+
* Header (icon + title) + a sectioned, link list driven by data. Every
|
|
5
|
+
* studio sidebar (Settings, Integrations, Commerce, Apps, …) renders
|
|
6
|
+
* through this so spacing, active state, badges and "soon" tags stay
|
|
7
|
+
* identical. Pass `sections`; use `#notice` for loading/empty hints.
|
|
8
|
+
*/
|
|
9
|
+
import type { Component } from 'vue';
|
|
10
|
+
import type { SidebarNavSection } from '../../types/nav.js';
|
|
11
|
+
export type { SidebarNavItem, SidebarNavSection } from '../../types/nav.js';
|
|
12
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
13
|
+
title: string;
|
|
14
|
+
icon?: Component;
|
|
15
|
+
sections: SidebarNavSection[];
|
|
16
|
+
/** Hide the header icon and use a lighter header title weight. */
|
|
17
|
+
minimal?: boolean;
|
|
18
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
19
|
+
title: string;
|
|
20
|
+
icon?: Component;
|
|
21
|
+
sections: SidebarNavSection[];
|
|
22
|
+
/** Hide the header icon and use a lighter header title weight. */
|
|
23
|
+
minimal?: boolean;
|
|
24
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
25
|
+
icon?: (props: {}) => any;
|
|
26
|
+
} & {
|
|
27
|
+
top?: (props: {}) => any;
|
|
28
|
+
} & {
|
|
29
|
+
notice?: (props: {}) => any;
|
|
30
|
+
}>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
column: string;
|
|
3
|
+
active: string | null;
|
|
4
|
+
direction: 'asc' | 'desc' | null;
|
|
5
|
+
/** Right-align the indicator for numeric columns. */
|
|
6
|
+
alignRight?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_1: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_1) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
toggle: (column: string) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onToggle?: ((column: string) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { RoundSortVertical, SortFromBottomToTop, SortFromTopToBottom } from "#solar-icons";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
column: { type: String, required: true },
|
|
5
|
+
active: { type: [String, null], required: true },
|
|
6
|
+
direction: { type: [String, null], required: true },
|
|
7
|
+
alignRight: { type: Boolean, required: false }
|
|
8
|
+
});
|
|
9
|
+
const emit = defineEmits(["toggle"]);
|
|
10
|
+
const isActive = computed(() => props.active === props.column && !!props.direction);
|
|
11
|
+
const sortIcon = computed(() => {
|
|
12
|
+
if (isActive.value && props.direction === "asc") return SortFromBottomToTop;
|
|
13
|
+
if (isActive.value && props.direction === "desc") return SortFromTopToBottom;
|
|
14
|
+
return RoundSortVertical;
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<button
|
|
20
|
+
type="button"
|
|
21
|
+
class="group inline-flex cursor-pointer items-center gap-1.5 -m-1 p-1 rounded-md text-left transition-colors hover:text-primary"
|
|
22
|
+
:class="alignRight ? 'flex-row-reverse w-full justify-end' : ''"
|
|
23
|
+
@click="emit('toggle', column)"
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
<component
|
|
27
|
+
:is="sortIcon"
|
|
28
|
+
weight="Linear"
|
|
29
|
+
:size="14"
|
|
30
|
+
class="shrink-0 transition-colors"
|
|
31
|
+
:class="isActive ? 'text-primary' : 'text-foreground/30 group-hover:text-primary'"
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
/>
|
|
34
|
+
</button>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
column: string;
|
|
3
|
+
active: string | null;
|
|
4
|
+
direction: 'asc' | 'desc' | null;
|
|
5
|
+
/** Right-align the indicator for numeric columns. */
|
|
6
|
+
alignRight?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_1: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_1) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
toggle: (column: string) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onToggle?: ((column: string) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared empty / loading / error / not-found state.
|
|
3
|
+
*
|
|
4
|
+
* One calm centered card used across the studios so every "nothing here
|
|
5
|
+
* yet", "still loading" and "something broke" surface looks the same.
|
|
6
|
+
* Pass copy via props; put a CTA in the `#actions` slot.
|
|
7
|
+
*/
|
|
8
|
+
import type { Component } from 'vue';
|
|
9
|
+
type Variant = 'empty' | 'loading' | 'error' | 'notfound';
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
variant?: Variant;
|
|
12
|
+
/** Override the default icon for the variant. */
|
|
13
|
+
icon?: Component;
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
17
|
+
declare var __VLS_22: {}, __VLS_28: {};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
description?: (props: typeof __VLS_22) => any;
|
|
20
|
+
} & {
|
|
21
|
+
actions?: (props: typeof __VLS_28) => any;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
|
+
variant: Variant;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|