@fluid-app/rep-core 0.1.3 → 0.1.5
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/registries/index.d.cts +1 -0
- package/dist/registries/index.d.ts +1 -0
- package/dist/types/index.d.cts +27 -10
- package/dist/types/index.d.ts +27 -10
- package/package.json +3 -2
|
@@ -3,6 +3,7 @@ import { StrictOmit, AlignOptions, ColorOptions, SectionLayoutType, FontSizeOpti
|
|
|
3
3
|
import { b as WidgetType, W as WidgetSchema } from '../widget-schema-36uGUTWL.cjs';
|
|
4
4
|
import '../types-R1kV_DKF.cjs';
|
|
5
5
|
import 'colorjs.io';
|
|
6
|
+
import '@fluid-app/fluidos-api-client';
|
|
6
7
|
import '../shareable-item-DkgWpwoU.cjs';
|
|
7
8
|
import 'react';
|
|
8
9
|
import '../data-sources/types.cjs';
|
|
@@ -3,6 +3,7 @@ import { StrictOmit, AlignOptions, ColorOptions, SectionLayoutType, FontSizeOpti
|
|
|
3
3
|
import { b as WidgetType, W as WidgetSchema } from '../widget-schema-DxdlJD8E.js';
|
|
4
4
|
import '../types-R1kV_DKF.js';
|
|
5
5
|
import 'colorjs.io';
|
|
6
|
+
import '@fluid-app/fluidos-api-client';
|
|
6
7
|
import '../shareable-item-DkgWpwoU.js';
|
|
7
8
|
import 'react';
|
|
8
9
|
import '../data-sources/types.js';
|
package/dist/types/index.d.cts
CHANGED
|
@@ -2,31 +2,48 @@ import { W as WidgetSchema } from '../widget-schema-36uGUTWL.cjs';
|
|
|
2
2
|
export { T as TypedWidgetSchema, e as WIDGET_TYPE_NAMES, a as WidgetPath, d as WidgetRegistry, b as WidgetType, c as WidgetTypeName, h as assertDefined, g as assertNever, f as isWidgetType, i as isWidgetTypeName } from '../widget-schema-36uGUTWL.cjs';
|
|
3
3
|
import { T as ThemeDefinition } from '../types-R1kV_DKF.cjs';
|
|
4
4
|
export { R as ResolvedTheme, a as ThemeColorInput, b as ThemePayload } from '../types-R1kV_DKF.cjs';
|
|
5
|
+
import { components } from '@fluid-app/fluidos-api-client';
|
|
5
6
|
import { S as ShareableItem } from '../shareable-item-DkgWpwoU.cjs';
|
|
6
7
|
import 'react';
|
|
7
8
|
import '../data-sources/types.cjs';
|
|
8
9
|
import 'colorjs.io';
|
|
9
10
|
|
|
11
|
+
/** The API schema type — single source of truth for navigation item fields. */
|
|
12
|
+
type ApiNavigationItem = components["schemas"]["FluidOSNavigationItem"];
|
|
10
13
|
/**
|
|
11
|
-
*
|
|
14
|
+
* Strip `null` from a union type, converting `T | null` → `T`.
|
|
15
|
+
* Used to convert API's null convention to rep-core's undefined convention.
|
|
16
|
+
*/
|
|
17
|
+
type StripNull<T> = Exclude<T, null>;
|
|
18
|
+
/**
|
|
19
|
+
* Navigation item in the sidebar/menu structure.
|
|
20
|
+
*
|
|
21
|
+
* Derived from `FluidOSNavigationItem` (the API schema) so field types
|
|
22
|
+
* track upstream changes. Differences from the API type:
|
|
23
|
+
* - `id` is optional (system/default items may not have one)
|
|
24
|
+
* - `label` is required (transforms default null to "Untitled")
|
|
25
|
+
* - `section` is a frontend-only extension (not in API)
|
|
26
|
+
* - Nullable fields use `undefined` instead of `null` (except `parent_id`)
|
|
12
27
|
*/
|
|
13
28
|
interface NavigationItem {
|
|
14
|
-
/** Database-generated identifier */
|
|
15
|
-
readonly id?:
|
|
29
|
+
/** Database-generated identifier — optional because system/default items may not have one */
|
|
30
|
+
readonly id?: ApiNavigationItem["id"];
|
|
16
31
|
/** URL slug for routing */
|
|
17
|
-
slug?:
|
|
18
|
-
/** Display label */
|
|
32
|
+
slug?: StripNull<ApiNavigationItem["slug"]>;
|
|
33
|
+
/** Display label — required; transforms default null API values to "Untitled" */
|
|
19
34
|
label: string;
|
|
20
35
|
/** Icon identifier (e.g., FontAwesome name) */
|
|
21
|
-
icon?:
|
|
22
|
-
/** Section grouping for quick links (
|
|
36
|
+
icon?: StripNull<ApiNavigationItem["icon"]>;
|
|
37
|
+
/** Section grouping for quick links (frontend-only, not in API) */
|
|
23
38
|
section?: string;
|
|
24
39
|
/** Associated screen ID */
|
|
25
|
-
screen_id?:
|
|
40
|
+
screen_id?: StripNull<ApiNavigationItem["screen_id"]>;
|
|
26
41
|
/** Sort order */
|
|
27
|
-
position?:
|
|
42
|
+
position?: StripNull<ApiNavigationItem["position"]>;
|
|
28
43
|
/** Parent navigation item ID (null for root items) */
|
|
29
|
-
parent_id?:
|
|
44
|
+
parent_id?: ApiNavigationItem["parent_id"];
|
|
45
|
+
/** Origin of this navigation item */
|
|
46
|
+
source?: ApiNavigationItem["source"];
|
|
30
47
|
/** Nested navigation items */
|
|
31
48
|
children: NavigationItem[];
|
|
32
49
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,31 +2,48 @@ import { W as WidgetSchema } from '../widget-schema-DxdlJD8E.js';
|
|
|
2
2
|
export { T as TypedWidgetSchema, e as WIDGET_TYPE_NAMES, a as WidgetPath, d as WidgetRegistry, b as WidgetType, c as WidgetTypeName, h as assertDefined, g as assertNever, f as isWidgetType, i as isWidgetTypeName } from '../widget-schema-DxdlJD8E.js';
|
|
3
3
|
import { T as ThemeDefinition } from '../types-R1kV_DKF.js';
|
|
4
4
|
export { R as ResolvedTheme, a as ThemeColorInput, b as ThemePayload } from '../types-R1kV_DKF.js';
|
|
5
|
+
import { components } from '@fluid-app/fluidos-api-client';
|
|
5
6
|
import { S as ShareableItem } from '../shareable-item-DkgWpwoU.js';
|
|
6
7
|
import 'react';
|
|
7
8
|
import '../data-sources/types.js';
|
|
8
9
|
import 'colorjs.io';
|
|
9
10
|
|
|
11
|
+
/** The API schema type — single source of truth for navigation item fields. */
|
|
12
|
+
type ApiNavigationItem = components["schemas"]["FluidOSNavigationItem"];
|
|
10
13
|
/**
|
|
11
|
-
*
|
|
14
|
+
* Strip `null` from a union type, converting `T | null` → `T`.
|
|
15
|
+
* Used to convert API's null convention to rep-core's undefined convention.
|
|
16
|
+
*/
|
|
17
|
+
type StripNull<T> = Exclude<T, null>;
|
|
18
|
+
/**
|
|
19
|
+
* Navigation item in the sidebar/menu structure.
|
|
20
|
+
*
|
|
21
|
+
* Derived from `FluidOSNavigationItem` (the API schema) so field types
|
|
22
|
+
* track upstream changes. Differences from the API type:
|
|
23
|
+
* - `id` is optional (system/default items may not have one)
|
|
24
|
+
* - `label` is required (transforms default null to "Untitled")
|
|
25
|
+
* - `section` is a frontend-only extension (not in API)
|
|
26
|
+
* - Nullable fields use `undefined` instead of `null` (except `parent_id`)
|
|
12
27
|
*/
|
|
13
28
|
interface NavigationItem {
|
|
14
|
-
/** Database-generated identifier */
|
|
15
|
-
readonly id?:
|
|
29
|
+
/** Database-generated identifier — optional because system/default items may not have one */
|
|
30
|
+
readonly id?: ApiNavigationItem["id"];
|
|
16
31
|
/** URL slug for routing */
|
|
17
|
-
slug?:
|
|
18
|
-
/** Display label */
|
|
32
|
+
slug?: StripNull<ApiNavigationItem["slug"]>;
|
|
33
|
+
/** Display label — required; transforms default null API values to "Untitled" */
|
|
19
34
|
label: string;
|
|
20
35
|
/** Icon identifier (e.g., FontAwesome name) */
|
|
21
|
-
icon?:
|
|
22
|
-
/** Section grouping for quick links (
|
|
36
|
+
icon?: StripNull<ApiNavigationItem["icon"]>;
|
|
37
|
+
/** Section grouping for quick links (frontend-only, not in API) */
|
|
23
38
|
section?: string;
|
|
24
39
|
/** Associated screen ID */
|
|
25
|
-
screen_id?:
|
|
40
|
+
screen_id?: StripNull<ApiNavigationItem["screen_id"]>;
|
|
26
41
|
/** Sort order */
|
|
27
|
-
position?:
|
|
42
|
+
position?: StripNull<ApiNavigationItem["position"]>;
|
|
28
43
|
/** Parent navigation item ID (null for root items) */
|
|
29
|
-
parent_id?:
|
|
44
|
+
parent_id?: ApiNavigationItem["parent_id"];
|
|
45
|
+
/** Origin of this navigation item */
|
|
46
|
+
source?: ApiNavigationItem["source"];
|
|
30
47
|
/** Nested navigation items */
|
|
31
48
|
children: NavigationItem[];
|
|
32
49
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-app/rep-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Core types, theme engine, and widget utilities for the Fluid rep platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -155,7 +155,8 @@
|
|
|
155
155
|
"class-variance-authority": "^0.7.1",
|
|
156
156
|
"clsx": "^2.1.1",
|
|
157
157
|
"colorjs.io": "^0.5.2",
|
|
158
|
-
"tailwind-merge": "^3.0.2"
|
|
158
|
+
"tailwind-merge": "^3.0.2",
|
|
159
|
+
"@fluid-app/fluidos-api-client": "0.1.0"
|
|
159
160
|
},
|
|
160
161
|
"scripts": {
|
|
161
162
|
"build": "tsup",
|