@servicetitan/json-render-react 0.2.0 → 0.3.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/dist/catalog/context/catalog-prompt.md +229 -0
- package/dist/catalog/context/schema.json +56 -0
- package/dist/catalog/core/catalog-prompt.md +104 -90
- package/dist/catalog/core/schema.json +0 -1
- package/dist/catalog/marketing/catalog-prompt.md +104 -90
- package/dist/catalog/marketing/schema.json +0 -1
- package/dist/context/catalog/catalog-def.d.ts +50 -0
- package/dist/context/catalog/context-card.catalog.d.ts +19 -0
- package/dist/context/catalog/context-card.d.ts +8 -0
- package/dist/context/catalog/context-data-table.catalog.d.ts +34 -0
- package/dist/context/catalog/context-data-table.css.d.ts +2 -0
- package/dist/context/catalog/context-data-table.d.ts +6 -0
- package/dist/context/catalog/context-file-list.catalog.d.ts +11 -0
- package/dist/context/catalog/context-file-list.css.d.ts +16 -0
- package/dist/context/catalog/context-file-list.d.ts +6 -0
- package/dist/context/catalog/context-list.catalog.d.ts +48 -0
- package/dist/context/catalog/context-list.css.d.ts +16 -0
- package/dist/context/catalog/context-list.d.ts +6 -0
- package/dist/context/catalog/context-metric-grid.catalog.d.ts +22 -0
- package/dist/context/catalog/context-metric-grid.css.d.ts +13 -0
- package/dist/context/catalog/context-metric-grid.d.ts +6 -0
- package/dist/context/catalog/context-note-list.catalog.d.ts +15 -0
- package/dist/context/catalog/context-note-list.d.ts +6 -0
- package/dist/context/catalog/context-overview.catalog.d.ts +8 -0
- package/dist/context/catalog/context-overview.css.d.ts +2 -0
- package/dist/context/catalog/context-overview.d.ts +6 -0
- package/dist/context/catalog/context-panel.catalog.d.ts +6 -0
- package/dist/context/catalog/context-panel.css.d.ts +1 -0
- package/dist/context/catalog/context-panel.d.ts +6 -0
- package/dist/context/catalog/context-tabular-list.catalog.d.ts +19 -0
- package/dist/context/catalog/context-tabular-list.css.d.ts +17 -0
- package/dist/context/catalog/context-tabular-list.d.ts +6 -0
- package/dist/context/catalog/index.d.ts +10 -0
- package/dist/context/catalog/schemas.d.ts +151 -0
- package/dist/context/components/collapsible-card.css.d.ts +41 -0
- package/dist/context/components/collapsible-card.d.ts +14 -0
- package/dist/context/components/context-ai-summary.css.d.ts +5 -0
- package/dist/context/components/context-ai-summary.d.ts +4 -0
- package/dist/context/components/context-chip-tone.d.ts +10 -0
- package/dist/context/components/context-note-list.css.d.ts +10 -0
- package/dist/context/components/context-render-error-boundary.d.ts +21 -0
- package/dist/context/constants.d.ts +6 -0
- package/dist/context/index.d.ts +4 -0
- package/dist/context/validate-context-spec-deep.d.ts +9 -0
- package/dist/context/validate-context-spec.d.ts +11 -0
- package/dist/core/catalog/alert.catalog.d.ts +2 -0
- package/dist/core/catalog/button.catalog.d.ts +3 -0
- package/dist/core/catalog/card.catalog.d.ts +2 -0
- package/dist/core/catalog/catalog-def.d.ts +33 -19
- package/dist/core/catalog/checkbox.catalog.d.ts +1 -0
- package/dist/core/catalog/chip.catalog.d.ts +1 -0
- package/dist/core/catalog/flex.catalog.d.ts +13 -0
- package/dist/core/catalog/grid.catalog.d.ts +4 -0
- package/dist/core/catalog/input.catalog.d.ts +1 -0
- package/dist/core/catalog/link.catalog.d.ts +2 -0
- package/dist/core/catalog/listbox.catalog.d.ts +1 -0
- package/dist/core/catalog/radio-group.catalog.d.ts +1 -0
- package/dist/core/catalog/schemas.d.ts +33 -19
- package/dist/core/catalog/switch.catalog.d.ts +1 -0
- package/dist/core/catalog/text.catalog.d.ts +0 -8
- package/dist/core/catalog/textarea.catalog.d.ts +1 -0
- package/dist/generate.d.ts +4 -4
- package/dist/index.d.ts +6 -3
- package/dist/json-render-react.js +1820 -705
- package/dist/json-render-react.js.map +1 -1
- package/dist/marketing/catalog/catalog.d.ts +1 -1
- package/dist/marketing/catalog/index.d.ts +1 -1
- package/dist/marketing/catalog/scoped-catalogs.d.ts +4 -0
- package/dist/registry-utils.d.ts +1 -1
- package/dist/registry.d.ts +1 -0
- package/dist/renderers/context-spec-renderer.d.ts +6 -0
- package/dist/renderers/sectioned-context-renderer.css.d.ts +1 -0
- package/dist/renderers/sectioned-context-renderer.d.ts +36 -0
- package/dist/renderers/spec-renderer.d.ts +6 -1
- package/dist/renderers/types.d.ts +2 -1
- package/dist/renderers/wrap-context-registry.d.ts +3 -0
- package/dist/scoped-catalog.d.ts +64 -0
- package/dist/styles.css +1 -1
- package/dist/test/setup-dom.d.ts +1 -0
- package/dist/types.d.ts +6 -3
- package/package.json +4 -2
- package/dist/core/catalog/badge.catalog.d.ts +0 -12
- package/dist/core/catalog/badge.css.d.ts +0 -1
- package/dist/core/catalog/badge.d.ts +0 -8
- package/dist/marketing/catalog/teams.d.ts +0 -4
- package/dist/team-catalog.d.ts +0 -26
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const contextNoteListCatalog: {
|
|
3
|
+
props: z.ZodObject<{
|
|
4
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
5
|
+
items: z.ZodArray<z.ZodObject<{
|
|
6
|
+
category: z.ZodOptional<z.ZodString>;
|
|
7
|
+
body: z.ZodString;
|
|
8
|
+
author: z.ZodOptional<z.ZodString>;
|
|
9
|
+
date: z.ZodOptional<z.ZodString>;
|
|
10
|
+
truncate: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
slots: never[];
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { contextNoteListCatalog } from './context-note-list.catalog';
|
|
3
|
+
export { contextNoteListCatalog };
|
|
4
|
+
export declare const ContextNoteListRenderer: ({ props, }: {
|
|
5
|
+
props: z.infer<typeof contextNoteListCatalog.props>;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { contextOverviewCatalog } from './context-overview.catalog';
|
|
3
|
+
export { contextOverviewCatalog };
|
|
4
|
+
export declare const ContextOverviewRenderer: ({ props, }: {
|
|
5
|
+
props: z.infer<typeof contextOverviewCatalog.props>;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const panel: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const contextTabularListCatalog: {
|
|
3
|
+
props: z.ZodObject<{
|
|
4
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
5
|
+
label: z.ZodString;
|
|
6
|
+
items: z.ZodArray<z.ZodObject<{
|
|
7
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
8
|
+
identifier: z.ZodOptional<z.ZodString>;
|
|
9
|
+
identifierHref: z.ZodOptional<z.ZodString>;
|
|
10
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
11
|
+
label: z.ZodString;
|
|
12
|
+
value: z.ZodString;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
slots: never[];
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Outer wrapper — stacks vendor groups. */
|
|
2
|
+
export declare const tabularRoot: string;
|
|
3
|
+
/** Vendor group card. */
|
|
4
|
+
export declare const tabularGroup: string;
|
|
5
|
+
/** Vendor group heading. */
|
|
6
|
+
export declare const tabularGroupLabel: string;
|
|
7
|
+
/** Subdued color for eyebrow labels and field headers. */
|
|
8
|
+
export declare const eyebrowSubdued: string;
|
|
9
|
+
/**
|
|
10
|
+
* Shared-column grid — every cell is a direct child so column tracks align
|
|
11
|
+
* across rows (e.g. PURCHASE ORDER sets the width of column 1 for all rows).
|
|
12
|
+
*/
|
|
13
|
+
export declare const tabularGroupGrid: string;
|
|
14
|
+
/** Full-width divider between rows — equal margin above/below centers the line. */
|
|
15
|
+
export declare const tabularRowDivider: string;
|
|
16
|
+
/** Column cell — eyebrow + value stacked, left-aligned. */
|
|
17
|
+
export declare const tabularCell: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { contextTabularListCatalog } from './context-tabular-list.catalog';
|
|
3
|
+
export { contextTabularListCatalog };
|
|
4
|
+
export declare const ContextTabularListRenderer: ({ props, }: {
|
|
5
|
+
props: z.infer<typeof contextTabularListCatalog.props>;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CatalogEntry } from '../../types';
|
|
2
|
+
export { contextCatalog, contextComponents, contextShellComponents } from './catalog-def';
|
|
3
|
+
export { contextContentComponents } from './schemas';
|
|
4
|
+
export declare const contextCatalogEntries: CatalogEntry[];
|
|
5
|
+
export declare const contextShellRenderers: {
|
|
6
|
+
[k: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
export declare const contextContentRenderers: {
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
export declare const contextShellComponents: {
|
|
2
|
+
ContextPanel: {
|
|
3
|
+
props: import('zod').ZodObject<{}, import('zod/v4/core').$strip>;
|
|
4
|
+
slots: string[];
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
ContextOverview: {
|
|
8
|
+
props: import('zod').ZodObject<{
|
|
9
|
+
summary: import('zod').ZodString;
|
|
10
|
+
}, import('zod/v4/core').$strip>;
|
|
11
|
+
slots: string[];
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
ContextCard: {
|
|
15
|
+
props: import('zod').ZodObject<{
|
|
16
|
+
title: import('zod').ZodString;
|
|
17
|
+
defaultExpanded: import('zod').ZodOptional<import('zod').ZodBoolean>;
|
|
18
|
+
badge: import('zod').ZodOptional<import('zod').ZodUnion<readonly [import('zod').ZodNumber, import('zod').ZodObject<{
|
|
19
|
+
label: import('zod').ZodString;
|
|
20
|
+
tone: import('zod').ZodOptional<import('zod').ZodEnum<{
|
|
21
|
+
success: "success";
|
|
22
|
+
info: "info";
|
|
23
|
+
warning: "warning";
|
|
24
|
+
danger: "danger";
|
|
25
|
+
neutral: "neutral";
|
|
26
|
+
}>>;
|
|
27
|
+
}, import('zod/v4/core').$strip>]>>;
|
|
28
|
+
}, import('zod/v4/core').$strip>;
|
|
29
|
+
slots: string[];
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export declare const contextContentComponents: {
|
|
34
|
+
ContextNoteList: {
|
|
35
|
+
props: import('zod').ZodObject<{
|
|
36
|
+
summary: import('zod').ZodOptional<import('zod').ZodString>;
|
|
37
|
+
items: import('zod').ZodArray<import('zod').ZodObject<{
|
|
38
|
+
category: import('zod').ZodOptional<import('zod').ZodString>;
|
|
39
|
+
body: import('zod').ZodString;
|
|
40
|
+
author: import('zod').ZodOptional<import('zod').ZodString>;
|
|
41
|
+
date: import('zod').ZodOptional<import('zod').ZodString>;
|
|
42
|
+
truncate: import('zod').ZodOptional<import('zod').ZodBoolean>;
|
|
43
|
+
}, import('zod/v4/core').$strip>>;
|
|
44
|
+
}, import('zod/v4/core').$strip>;
|
|
45
|
+
slots: never[];
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
ContextMetricGrid: {
|
|
49
|
+
props: import('zod').ZodObject<{
|
|
50
|
+
items: import('zod').ZodArray<import('zod').ZodObject<{
|
|
51
|
+
label: import('zod').ZodString;
|
|
52
|
+
value: import('zod').ZodString;
|
|
53
|
+
tone: import('zod').ZodOptional<import('zod').ZodEnum<{
|
|
54
|
+
success: "success";
|
|
55
|
+
info: "info";
|
|
56
|
+
warning: "warning";
|
|
57
|
+
danger: "danger";
|
|
58
|
+
neutral: "neutral";
|
|
59
|
+
}>>;
|
|
60
|
+
}, import('zod/v4/core').$strip>>;
|
|
61
|
+
columns: import('zod').ZodOptional<import('zod').ZodEnum<{
|
|
62
|
+
3: "3";
|
|
63
|
+
4: "4";
|
|
64
|
+
}>>;
|
|
65
|
+
}, import('zod/v4/core').$strip>;
|
|
66
|
+
slots: never[];
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
ContextDataTable: {
|
|
70
|
+
props: import('zod').ZodObject<{
|
|
71
|
+
columns: import('zod').ZodArray<import('zod').ZodObject<{
|
|
72
|
+
key: import('zod').ZodString;
|
|
73
|
+
header: import('zod').ZodString;
|
|
74
|
+
type: import('zod').ZodOptional<import('zod').ZodEnum<{
|
|
75
|
+
text: "text";
|
|
76
|
+
currency: "currency";
|
|
77
|
+
chip: "chip";
|
|
78
|
+
delta: "delta";
|
|
79
|
+
}>>;
|
|
80
|
+
sortable: import('zod').ZodOptional<import('zod').ZodBoolean>;
|
|
81
|
+
}, import('zod/v4/core').$strip>>;
|
|
82
|
+
rows: import('zod').ZodArray<import('zod').ZodIntersection<import('zod').ZodRecord<import('zod').ZodString, import('zod').ZodUnion<readonly [import('zod').ZodString, import('zod').ZodNumber, import('zod').ZodNull, import('zod').ZodObject<{
|
|
83
|
+
label: import('zod').ZodString;
|
|
84
|
+
tone: import('zod').ZodOptional<import('zod').ZodEnum<{
|
|
85
|
+
success: "success";
|
|
86
|
+
info: "info";
|
|
87
|
+
warning: "warning";
|
|
88
|
+
danger: "danger";
|
|
89
|
+
neutral: "neutral";
|
|
90
|
+
}>>;
|
|
91
|
+
}, import('zod/v4/core').$strip>]>>, import('zod').ZodObject<{
|
|
92
|
+
id: import('zod').ZodString;
|
|
93
|
+
}, import('zod/v4/core').$strip>>>;
|
|
94
|
+
defaultSortedColumn: import('zod').ZodOptional<import('zod').ZodObject<{
|
|
95
|
+
id: import('zod').ZodString;
|
|
96
|
+
desc: import('zod').ZodOptional<import('zod').ZodBoolean>;
|
|
97
|
+
}, import('zod/v4/core').$strip>>;
|
|
98
|
+
}, import('zod/v4/core').$strip>;
|
|
99
|
+
slots: never[];
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
ContextList: {
|
|
103
|
+
props: import('zod').ZodObject<{
|
|
104
|
+
items: import('zod').ZodArray<import('zod').ZodObject<{
|
|
105
|
+
title: import('zod').ZodString;
|
|
106
|
+
identifier: import('zod').ZodOptional<import('zod').ZodString>;
|
|
107
|
+
identifierHref: import('zod').ZodOptional<import('zod').ZodString>;
|
|
108
|
+
meta: import('zod').ZodOptional<import('zod').ZodString>;
|
|
109
|
+
callout: import('zod').ZodOptional<import('zod').ZodString>;
|
|
110
|
+
calloutTone: import('zod').ZodOptional<import('zod').ZodEnum<{
|
|
111
|
+
success: "success";
|
|
112
|
+
info: "info";
|
|
113
|
+
warning: "warning";
|
|
114
|
+
danger: "danger";
|
|
115
|
+
neutral: "neutral";
|
|
116
|
+
}>>;
|
|
117
|
+
calloutLabel: import('zod').ZodOptional<import('zod').ZodString>;
|
|
118
|
+
}, import('zod/v4/core').$strip>>;
|
|
119
|
+
}, import('zod/v4/core').$strip>;
|
|
120
|
+
slots: never[];
|
|
121
|
+
description: string;
|
|
122
|
+
};
|
|
123
|
+
ContextTabularList: {
|
|
124
|
+
props: import('zod').ZodObject<{
|
|
125
|
+
groups: import('zod').ZodArray<import('zod').ZodObject<{
|
|
126
|
+
label: import('zod').ZodString;
|
|
127
|
+
items: import('zod').ZodArray<import('zod').ZodObject<{
|
|
128
|
+
eyebrow: import('zod').ZodOptional<import('zod').ZodString>;
|
|
129
|
+
identifier: import('zod').ZodOptional<import('zod').ZodString>;
|
|
130
|
+
identifierHref: import('zod').ZodOptional<import('zod').ZodString>;
|
|
131
|
+
fields: import('zod').ZodArray<import('zod').ZodObject<{
|
|
132
|
+
label: import('zod').ZodString;
|
|
133
|
+
value: import('zod').ZodString;
|
|
134
|
+
}, import('zod/v4/core').$strip>>;
|
|
135
|
+
}, import('zod/v4/core').$strip>>;
|
|
136
|
+
}, import('zod/v4/core').$strip>>;
|
|
137
|
+
}, import('zod/v4/core').$strip>;
|
|
138
|
+
slots: never[];
|
|
139
|
+
description: string;
|
|
140
|
+
};
|
|
141
|
+
ContextFileList: {
|
|
142
|
+
props: import('zod').ZodObject<{
|
|
143
|
+
items: import('zod').ZodArray<import('zod').ZodObject<{
|
|
144
|
+
label: import('zod').ZodString;
|
|
145
|
+
url: import('zod').ZodString;
|
|
146
|
+
}, import('zod/v4/core').$strip>>;
|
|
147
|
+
}, import('zod/v4/core').$strip>;
|
|
148
|
+
slots: never[];
|
|
149
|
+
description: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const fullWidth: string;
|
|
2
|
+
export declare const cardBody: string;
|
|
3
|
+
export declare const collapsibleCard: string;
|
|
4
|
+
export declare const collapsiblePanel: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
5
|
+
expanded: {
|
|
6
|
+
true: {
|
|
7
|
+
gridTemplateRows: "1fr";
|
|
8
|
+
marginTop: `var(--${string})`;
|
|
9
|
+
opacity: number;
|
|
10
|
+
};
|
|
11
|
+
false: {
|
|
12
|
+
gridTemplateRows: "0fr";
|
|
13
|
+
marginTop: number;
|
|
14
|
+
opacity: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}>;
|
|
18
|
+
export declare const collapsiblePanelInner: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
19
|
+
expanded: {
|
|
20
|
+
true: {
|
|
21
|
+
padding: `var(--${string})`;
|
|
22
|
+
margin: `calc(-1 * var(--${string}))`;
|
|
23
|
+
};
|
|
24
|
+
false: {
|
|
25
|
+
padding: number;
|
|
26
|
+
margin: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
export declare const collapsibleCardSummary: string;
|
|
31
|
+
/** Title + badge group — sits at the start; grows to fill available space before the chevron. */
|
|
32
|
+
export declare const collapsibleCardLeft: string;
|
|
33
|
+
export declare const collapsibleCardTitle: string;
|
|
34
|
+
export declare const collapsibleChevron: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
35
|
+
expanded: {
|
|
36
|
+
true: {
|
|
37
|
+
transform: "rotate(180deg)";
|
|
38
|
+
};
|
|
39
|
+
false: {};
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ContextChipTone } from './context-chip-tone';
|
|
3
|
+
/** A count-only badge (number, e.g. 3) or a labelled status badge ({ label: "3 Variances", tone: "warning" }). */
|
|
4
|
+
export type CollapsibleCardBadge = number | {
|
|
5
|
+
label: string;
|
|
6
|
+
tone?: ContextChipTone;
|
|
7
|
+
};
|
|
8
|
+
export interface CollapsibleCardProps {
|
|
9
|
+
title: string;
|
|
10
|
+
badge?: CollapsibleCardBadge;
|
|
11
|
+
defaultExpanded?: boolean;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const CollapsibleCard: ({ title, badge, defaultExpanded, children, }: CollapsibleCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Semantic chip tones agents can reference — mapped to Anvil2 background tokens in the renderer. */
|
|
2
|
+
export declare const CONTEXT_CHIP_TONES: readonly ["success", "warning", "danger", "info", "neutral"];
|
|
3
|
+
export type ContextChipTone = (typeof CONTEXT_CHIP_TONES)[number];
|
|
4
|
+
export interface ContextChipCell {
|
|
5
|
+
label: string;
|
|
6
|
+
tone?: ContextChipTone;
|
|
7
|
+
}
|
|
8
|
+
export declare function chipToneBackground(tone?: ContextChipTone): string;
|
|
9
|
+
export declare function toneForegroundColor(tone: ContextChipTone): string | undefined;
|
|
10
|
+
export declare function parseChipCell(value: unknown): ContextChipCell | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Outer list wrapper — the content area within the collapsible card. */
|
|
2
|
+
export declare const noteList: string;
|
|
3
|
+
/** AI summary wrapper — sits above the note items. */
|
|
4
|
+
export declare const noteSummaryWrapper: string;
|
|
5
|
+
/** Single note item row. */
|
|
6
|
+
export declare const noteItem: string;
|
|
7
|
+
/** Top row: category label (left) + author · date (right). */
|
|
8
|
+
export declare const noteItemHeader: string;
|
|
9
|
+
/** Subdued color for eyebrow labels (category, author/date). */
|
|
10
|
+
export declare const eyebrowSubdued: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Component, ErrorInfo, ReactNode } from 'react';
|
|
2
|
+
export interface ContextRenderErrorInfo {
|
|
3
|
+
elementType: string;
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
interface ContextRenderErrorBoundaryProps {
|
|
7
|
+
elementType: string;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
onError?: (info: ContextRenderErrorInfo) => void;
|
|
10
|
+
}
|
|
11
|
+
interface ContextRenderErrorBoundaryState {
|
|
12
|
+
hasError: boolean;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class ContextRenderErrorBoundary extends Component<ContextRenderErrorBoundaryProps, ContextRenderErrorBoundaryState> {
|
|
16
|
+
state: ContextRenderErrorBoundaryState;
|
|
17
|
+
static getDerivedStateFromError(error: Error): ContextRenderErrorBoundaryState;
|
|
18
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
19
|
+
render(): string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const CONTEXT_SHELL_TYPES: readonly ["ContextPanel", "ContextOverview", "ContextCard"];
|
|
2
|
+
export type ContextShellType = (typeof CONTEXT_SHELL_TYPES)[number];
|
|
3
|
+
export declare const CONTEXT_TOP_LEVEL_TYPES: readonly ["ContextOverview", "ContextCard"];
|
|
4
|
+
export type ContextTopLevelType = (typeof CONTEXT_TOP_LEVEL_TYPES)[number];
|
|
5
|
+
export declare function isContextShellType(type: string): type is ContextShellType;
|
|
6
|
+
export declare function isContextTopLevelType(type: string): type is ContextTopLevelType;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { contextCatalogEntries, contextShellRenderers } from './catalog';
|
|
2
|
+
export { contextCatalog, contextComponents, contextShellComponents, } from './catalog/catalog-def';
|
|
3
|
+
export { CONTEXT_SHELL_TYPES, CONTEXT_TOP_LEVEL_TYPES, type ContextSpecIssue, type ContextSpecIssueSeverity, formatContextSpecIssues, validateContextSpec, } from './validate-context-spec';
|
|
4
|
+
export { formatContextRenderReport, hasContextSpecErrors, postProcessContextSpec, validateContextSpecDeep, } from './validate-context-spec-deep';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Spec } from '@json-render/core';
|
|
2
|
+
import { ContextSpecIssue } from './validate-context-spec';
|
|
3
|
+
export declare function validateContextSpecDeep(spec: Spec): ContextSpecIssue[];
|
|
4
|
+
export declare function postProcessContextSpec(spec: Spec): {
|
|
5
|
+
spec: Spec;
|
|
6
|
+
fixes: string[];
|
|
7
|
+
};
|
|
8
|
+
export declare function hasContextSpecErrors(issues: ContextSpecIssue[]): boolean;
|
|
9
|
+
export declare function formatContextRenderReport(spec: Spec): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Spec } from '@json-render/core';
|
|
2
|
+
import { CONTEXT_SHELL_TYPES, CONTEXT_TOP_LEVEL_TYPES } from './constants';
|
|
3
|
+
export interface ContextSpecIssue {
|
|
4
|
+
path: string;
|
|
5
|
+
message: string;
|
|
6
|
+
severity?: ContextSpecIssueSeverity;
|
|
7
|
+
}
|
|
8
|
+
export type ContextSpecIssueSeverity = "error" | "warn";
|
|
9
|
+
export declare function validateContextSpec(spec: Spec): ContextSpecIssue[];
|
|
10
|
+
export declare function formatContextSpecIssues(issues: ContextSpecIssue[]): string;
|
|
11
|
+
export { CONTEXT_SHELL_TYPES, CONTEXT_TOP_LEVEL_TYPES };
|
|
@@ -3,6 +3,7 @@ export declare const buttonCatalog: {
|
|
|
3
3
|
props: z.ZodObject<{
|
|
4
4
|
label: z.ZodString;
|
|
5
5
|
appearance: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
danger: "danger";
|
|
6
7
|
primary: "primary";
|
|
7
8
|
secondary: "secondary";
|
|
8
9
|
ghost: "ghost";
|
|
@@ -15,7 +16,9 @@ export declare const buttonCatalog: {
|
|
|
15
16
|
}>>;
|
|
16
17
|
loading: z.ZodOptional<z.ZodBoolean>;
|
|
17
18
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
18
20
|
}, z.core.$strip>;
|
|
19
21
|
slots: never[];
|
|
22
|
+
events: string[];
|
|
20
23
|
description: string;
|
|
21
24
|
};
|