@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.
Files changed (63) hide show
  1. package/README.md +22 -12
  2. package/dist/module.d.mts +9 -0
  3. package/dist/module.json +9 -0
  4. package/dist/module.mjs +27 -0
  5. package/dist/runtime/components/DataTable/ColumnsMenu.d.vue.ts +12 -0
  6. package/{components → dist/runtime/components}/DataTable/ColumnsMenu.vue +10 -17
  7. package/dist/runtime/components/DataTable/ColumnsMenu.vue.d.ts +12 -0
  8. package/dist/runtime/components/DataTable/DataTable.d.vue.ts +59 -0
  9. package/dist/runtime/components/DataTable/DataTable.vue +453 -0
  10. package/dist/runtime/components/DataTable/DataTable.vue.d.ts +59 -0
  11. package/dist/runtime/components/DataTable/FilterMenu.d.vue.ts +12 -0
  12. package/{components → dist/runtime/components}/DataTable/FilterMenu.vue +4 -8
  13. package/dist/runtime/components/DataTable/FilterMenu.vue.d.ts +12 -0
  14. package/dist/runtime/components/DataTable/types.d.ts +70 -0
  15. package/dist/runtime/components/DataTable/types.js +0 -0
  16. package/dist/runtime/components/Shared/BuildLogsFlyout.d.vue.ts +30 -0
  17. package/{components → dist/runtime/components}/Shared/BuildLogsFlyout.vue +27 -45
  18. package/dist/runtime/components/Shared/BuildLogsFlyout.vue.d.ts +30 -0
  19. package/dist/runtime/components/Shared/GitDeploymentSettings.d.vue.ts +17 -0
  20. package/{components → dist/runtime/components}/Shared/GitDeploymentSettings.vue +22 -35
  21. package/dist/runtime/components/Shared/GitDeploymentSettings.vue.d.ts +17 -0
  22. package/dist/runtime/components/Shared/KpiTile.d.vue.ts +13 -0
  23. package/{components → dist/runtime/components}/Shared/KpiTile.vue +11 -19
  24. package/dist/runtime/components/Shared/KpiTile.vue.d.ts +13 -0
  25. package/dist/runtime/components/Shared/PageHeader.d.vue.ts +23 -0
  26. package/{components → dist/runtime/components}/Shared/PageHeader.vue +6 -8
  27. package/dist/runtime/components/Shared/PageHeader.vue.d.ts +23 -0
  28. package/dist/runtime/components/Shared/SidebarNav.d.vue.ts +36 -0
  29. package/{components → dist/runtime/components}/Shared/SidebarNav.vue +15 -47
  30. package/dist/runtime/components/Shared/SidebarNav.vue.d.ts +36 -0
  31. package/dist/runtime/components/Shared/SortHeader.d.vue.ts +23 -0
  32. package/dist/runtime/components/Shared/SortHeader.vue +35 -0
  33. package/dist/runtime/components/Shared/SortHeader.vue.d.ts +23 -0
  34. package/dist/runtime/components/Shared/StateCard.d.vue.ts +32 -0
  35. package/{components → dist/runtime/components}/Shared/StateCard.vue +21 -36
  36. package/dist/runtime/components/Shared/StateCard.vue.d.ts +32 -0
  37. package/dist/runtime/components/Shared/StudioCard.d.vue.ts +15 -0
  38. package/dist/runtime/components/Shared/StudioCard.vue +19 -0
  39. package/dist/runtime/components/Shared/StudioCard.vue.d.ts +15 -0
  40. package/dist/runtime/components/Shared/TabBar.d.vue.ts +23 -0
  41. package/{components → dist/runtime/components}/Shared/TabBar.vue +7 -16
  42. package/dist/runtime/components/Shared/TabBar.vue.d.ts +23 -0
  43. package/dist/runtime/components/Shared/ViewTab.d.vue.ts +7 -0
  44. package/{components → dist/runtime/components}/Shared/ViewTab.vue +7 -9
  45. package/dist/runtime/components/Shared/ViewTab.vue.d.ts +7 -0
  46. package/dist/runtime/components/Shared/Wizard.d.vue.ts +47 -0
  47. package/{components → dist/runtime/components}/Shared/Wizard.vue +24 -41
  48. package/dist/runtime/components/Shared/Wizard.vue.d.ts +47 -0
  49. package/{composables/usePlatformAuth.ts → dist/runtime/composables/usePlatformAuth.d.ts} +3 -21
  50. package/dist/runtime/composables/usePlatformAuth.js +17 -0
  51. package/dist/runtime/composables/usePlatformTenant.d.ts +14 -0
  52. package/dist/runtime/composables/usePlatformTenant.js +18 -0
  53. package/dist/runtime/types/nav.d.ts +23 -0
  54. package/dist/runtime/types/nav.js +0 -0
  55. package/dist/types.d.mts +15 -0
  56. package/package.json +25 -12
  57. package/components/DataTable/DataTable.vue +0 -518
  58. package/components/DataTable/types.ts +0 -82
  59. package/components/Shared/SortHeader.vue +0 -50
  60. package/components/Shared/StudioCard.vue +0 -24
  61. package/composables/usePlatformTenant.ts +0 -35
  62. package/index.ts +0 -12
  63. package/nuxt.config.ts +0 -23
package/README.md CHANGED
@@ -4,10 +4,16 @@ Shared revenexx **Studio shell primitives** (`PageHeader`, `SidebarNav`,
4
4
  `StateCard`, `StudioCard`, `TabBar`, `KpiTile`, `DataTable`, …) plus the
5
5
  **platform provider contract** (`usePlatformAuth` / `usePlatformTenant`).
6
6
 
7
- It's a **Nuxt layer** (ships source): you `extends` it, then add a studio
8
- module (`@revenexx/studio-integrations`, `@revenexx/studio-commerce`). It's a
7
+ It's a **Nuxt module**: add it to `modules`, then add a studio module
8
+ (`@revenexx/studio-integrations`, `@revenexx/studio-commerce`). It's a
9
9
  peer/base of those modules — install it alongside them.
10
10
 
11
+ > Up to 0.1.x this package was a Nuxt *layer* (`extends`). That broke when
12
+ > installed from npm: a layer's nuxt.config is silently dropped when loaded
13
+ > out of node_modules, so components registered with a directory prefix
14
+ > (`SharedPageHeader`) and every bare `<PageHeader>` rendered nothing. As a
15
+ > module its setup always runs. Switch `extends` → `modules` when upgrading.
16
+
11
17
  ## Install
12
18
 
13
19
  Public on npm — no registry config or token needed:
@@ -21,32 +27,36 @@ pnpm add @revenexx/studio-shared @revenexx/studio
21
27
  ```ts
22
28
  // nuxt.config.ts
23
29
  export default defineNuxtConfig({
24
- extends: ['@revenexx/studio-shared'],
25
- modules: ['@solar-icons/nuxt'], // provides the #solar-icons the primitives use
30
+ modules: [
31
+ '@solar-icons/nuxt', // provides the #solar-icons the primitives use
32
+ '@revenexx/studio-shared',
33
+ ],
26
34
  })
27
35
  ```
28
36
 
29
37
  The components auto-import by bare name (`<PageHeader>`, `<DataTable>`, …). Types
30
38
  (`DataTableColumn`, `SidebarNavSection`, `PlatformAuth`, `PlatformTenant`) import
31
- from `@revenexx/studio-shared`.
39
+ from `@revenexx/studio-shared`. Individual SFCs stay importable via
40
+ `@revenexx/studio-shared/components/Shared/SidebarNav.vue`.
32
41
 
33
42
  ## ⚠️ Tailwind: you MUST scan this package
34
43
 
35
- The primitives ship **source**, not precompiled CSS — Tailwind generates their
36
- classes from **your** build. Add this package to your Tailwind sources, or
37
- classes used only here (e.g. the `TabBar` active 2px underline: `inset-x-2.5` +
38
- `bg-primary/40`) **won't be generated** and styling silently breaks:
44
+ The primitives ship uncompiled templates, not precompiled CSS — Tailwind
45
+ generates their classes from **your** build. Add the shipped runtime to your
46
+ Tailwind sources, or classes used only here (e.g. the `TabBar` active 2px
47
+ underline: `inset-x-2.5` + `bg-primary/40`) **won't be generated** and styling
48
+ silently breaks:
39
49
 
40
50
  ```css
41
51
  /* your app's main tailwind entry */
42
52
  @import "tailwindcss";
43
53
  @import "@revenexx/studio/tokens"; /* design-system tokens */
44
54
  @import "@revenexx/studio/fonts";
45
- @source "../node_modules/@revenexx/studio-shared/components";
55
+ @source "../node_modules/@revenexx/studio-shared/dist/runtime";
46
56
  ```
47
57
 
48
58
  Adjust the relative path to reach `node_modules` from your CSS file.
49
59
 
50
60
  ## Peers
51
- `@revenexx/studio` (design system + tokens), `nuxt` ^4, `vue` ^3.5, plus the
52
- consumer must register `@solar-icons/nuxt`.
61
+ `@revenexx/studio` (design system + tokens), `nuxt` ^4, `vue` ^3.5,
62
+ `vue-sonner` ^2, plus the consumer must register `@solar-icons/nuxt`.
@@ -0,0 +1,9 @@
1
+ import * as nuxt_schema from 'nuxt/schema';
2
+ export * from '../dist/runtime/components/DataTable/types.js';
3
+ export { SidebarNavItem, SidebarNavSection } from '../dist/runtime/types/nav.js';
4
+ export { PlatformAuth } from '../dist/runtime/composables/usePlatformAuth.js';
5
+ export { PlatformTenant } from '../dist/runtime/composables/usePlatformTenant.js';
6
+
7
+ declare const _default: nuxt_schema.NuxtModule<nuxt_schema.ModuleOptions, nuxt_schema.ModuleOptions, false>;
8
+
9
+ export { _default as default };
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "studio-shared",
3
+ "configKey": "studioShared",
4
+ "version": "0.2.0",
5
+ "builder": {
6
+ "@nuxt/module-builder": "1.0.2",
7
+ "unbuild": "unknown"
8
+ }
9
+ }
@@ -0,0 +1,27 @@
1
+ import { join } from 'node:path';
2
+ import { defineNuxtModule, createResolver, addComponentsDir, addImports } from '@nuxt/kit';
3
+
4
+ const module$1 = defineNuxtModule({
5
+ meta: {
6
+ name: "studio-shared",
7
+ configKey: "studioShared"
8
+ },
9
+ setup(_options, nuxt) {
10
+ const { resolve } = createResolver(import.meta.url);
11
+ const runtime = resolve("./runtime");
12
+ nuxt.options.imports = nuxt.options.imports || {};
13
+ nuxt.options.imports.transform = nuxt.options.imports.transform || {};
14
+ nuxt.options.imports.transform.include = nuxt.options.imports.transform.include || [];
15
+ nuxt.options.imports.transform.include.push(
16
+ new RegExp(runtime.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
17
+ );
18
+ nuxt.options.build.transpile.push(runtime);
19
+ addComponentsDir({ path: join(runtime, "components"), pathPrefix: false });
20
+ addImports([
21
+ { name: "usePlatformAuth", from: join(runtime, "composables/usePlatformAuth"), priority: -1 },
22
+ { name: "usePlatformTenant", from: join(runtime, "composables/usePlatformTenant"), priority: -1 }
23
+ ]);
24
+ }
25
+ });
26
+
27
+ export { module$1 as default };
@@ -0,0 +1,12 @@
1
+ import type { DataTableColumn } from './types.js';
2
+ type __VLS_Props = {
3
+ columns: DataTableColumn[];
4
+ /** Set of currently visible column keys. */
5
+ visible: Set<string>;
6
+ };
7
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ toggle: (key: string) => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onToggle?: ((key: string) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -1,26 +1,19 @@
1
- <script setup lang="ts">
2
- import { Widget as Columns, CheckCircle as Check } from '#solar-icons'
1
+ <script setup>
2
+ import { Widget as Columns, CheckCircle as Check } from "#solar-icons";
3
3
  import {
4
4
  DropdownMenu,
5
5
  DropdownMenuContent,
6
6
  DropdownMenuItem,
7
7
  DropdownMenuLabel,
8
8
  DropdownMenuSeparator,
9
- DropdownMenuTrigger,
10
- } from '@revenexx/studio'
11
- import type { DataTableColumn } from './types'
12
-
13
- const props = defineProps<{
14
- columns: DataTableColumn[]
15
- /** Set of currently visible column keys. */
16
- visible: Set<string>
17
- }>()
18
-
19
- const emit = defineEmits<{
20
- toggle: [key: string]
21
- }>()
22
-
23
- const toggleable = computed(() => props.columns.filter(c => c.toggleable !== false))
9
+ DropdownMenuTrigger
10
+ } from "@revenexx/studio";
11
+ const props = defineProps({
12
+ columns: { type: Array, required: true },
13
+ visible: { type: Set, required: true }
14
+ });
15
+ const emit = defineEmits(["toggle"]);
16
+ const toggleable = computed(() => props.columns.filter((c) => c.toggleable !== false));
24
17
  </script>
25
18
 
26
19
  <template>
@@ -0,0 +1,12 @@
1
+ import type { DataTableColumn } from './types.js';
2
+ type __VLS_Props = {
3
+ columns: DataTableColumn[];
4
+ /** Set of currently visible column keys. */
5
+ visible: Set<string>;
6
+ };
7
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ toggle: (key: string) => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onToggle?: ((key: string) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -0,0 +1,59 @@
1
+ import type { DataTableColumn, DataTableFilter, DataTableState, RowKey, SortState } from './types.js';
2
+ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly "onUpdate:sort"?: ((value: SortState) => any) | undefined;
5
+ readonly "onUpdate:page"?: ((value: number) => any) | undefined;
6
+ readonly onRowClick?: ((row: T) => any) | undefined;
7
+ readonly onStateChange?: ((state: DataTableState) => any) | undefined;
8
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:sort" | "onUpdate:page" | "onRowClick" | "onStateChange"> & ({
9
+ data: T[];
10
+ columns: DataTableColumn<T>[];
11
+ rowKey: RowKey<T>;
12
+ search?: boolean | {
13
+ placeholder?: string;
14
+ };
15
+ columnsMenu?: boolean;
16
+ filter?: boolean;
17
+ /** Built-in status/dimension filter pills (static mode). One dimension, or
18
+ * several (each renders as its own sub-menu). */
19
+ filterTabs?: DataTableFilter<T> | DataTableFilter<T>[];
20
+ pagination?: boolean | {
21
+ pageSize?: number;
22
+ };
23
+ defaultSort?: {
24
+ column: string;
25
+ direction: "asc" | "desc";
26
+ };
27
+ serverMode?: boolean;
28
+ total?: number;
29
+ loading?: boolean;
30
+ emptyText?: string;
31
+ groupBy?: ((row: T) => string[]) | null;
32
+ groupEmptyLabel?: string;
33
+ } & {
34
+ sort?: SortState;
35
+ page?: number;
36
+ }) & Partial<{}>> & import("vue").PublicProps;
37
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
38
+ attrs: any;
39
+ slots: {
40
+ [x: string]: ((props: {
41
+ row: any;
42
+ }) => any) | undefined;
43
+ } & {
44
+ 'filter-menu'?: (props: {}) => any;
45
+ } & {
46
+ 'toolbar-left'?: (props: {}) => any;
47
+ } & {
48
+ actions?: (props: {}) => any;
49
+ } & {
50
+ empty?: (props: {}) => any;
51
+ };
52
+ emit: (((evt: "rowClick", row: T) => void) & ((evt: "stateChange", state: DataTableState) => void)) & (((evt: "update:sort", value: SortState) => void) & ((evt: "update:page", value: number) => void));
53
+ }>) => import("vue").VNode & {
54
+ __ctx?: Awaited<typeof __VLS_setup>;
55
+ };
56
+ export default _default;
57
+ type __VLS_PrettifyLocal<T> = {
58
+ [K in keyof T]: T[K];
59
+ } & {};