@servicetitan/json-render-react 0.0.0-anvil2-kits-poc-20260717210733
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 +335 -0
- package/dist/catalog/context/catalog-prompt.md +229 -0
- package/dist/catalog/context/schema.json +56 -0
- package/dist/catalog/core/catalog-prompt.md +306 -0
- package/dist/catalog/core/schema.json +64 -0
- package/dist/catalog/marketing/catalog-prompt.md +307 -0
- package/dist/catalog/marketing/schema.json +65 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2126 -0
- package/dist/index.js.map +1 -0
- package/dist/src/context/catalog/catalog-def.d.ts +50 -0
- package/dist/src/context/catalog/context-card.catalog.d.ts +19 -0
- package/dist/src/context/catalog/context-card.d.ts +8 -0
- package/dist/src/context/catalog/context-data-table.catalog.d.ts +34 -0
- package/dist/src/context/catalog/context-data-table.css.d.ts +2 -0
- package/dist/src/context/catalog/context-data-table.d.ts +6 -0
- package/dist/src/context/catalog/context-file-list.catalog.d.ts +11 -0
- package/dist/src/context/catalog/context-file-list.css.d.ts +16 -0
- package/dist/src/context/catalog/context-file-list.d.ts +6 -0
- package/dist/src/context/catalog/context-list.catalog.d.ts +48 -0
- package/dist/src/context/catalog/context-list.css.d.ts +16 -0
- package/dist/src/context/catalog/context-list.d.ts +6 -0
- package/dist/src/context/catalog/context-metric-grid.catalog.d.ts +22 -0
- package/dist/src/context/catalog/context-metric-grid.css.d.ts +13 -0
- package/dist/src/context/catalog/context-metric-grid.d.ts +6 -0
- package/dist/src/context/catalog/context-note-list.catalog.d.ts +15 -0
- package/dist/src/context/catalog/context-note-list.d.ts +6 -0
- package/dist/src/context/catalog/context-overview.catalog.d.ts +8 -0
- package/dist/src/context/catalog/context-overview.css.d.ts +2 -0
- package/dist/src/context/catalog/context-overview.d.ts +6 -0
- package/dist/src/context/catalog/context-panel.catalog.d.ts +6 -0
- package/dist/src/context/catalog/context-panel.css.d.ts +1 -0
- package/dist/src/context/catalog/context-panel.d.ts +6 -0
- package/dist/src/context/catalog/context-tabular-list.catalog.d.ts +19 -0
- package/dist/src/context/catalog/context-tabular-list.css.d.ts +17 -0
- package/dist/src/context/catalog/context-tabular-list.d.ts +6 -0
- package/dist/src/context/catalog/index.d.ts +10 -0
- package/dist/src/context/catalog/schemas.d.ts +151 -0
- package/dist/src/context/components/collapsible-card.css.d.ts +41 -0
- package/dist/src/context/components/collapsible-card.d.ts +14 -0
- package/dist/src/context/components/context-ai-summary.css.d.ts +7 -0
- package/dist/src/context/components/context-ai-summary.d.ts +4 -0
- package/dist/src/context/components/context-chip-tone.d.ts +10 -0
- package/dist/src/context/components/context-note-list.css.d.ts +10 -0
- package/dist/src/context/components/context-render-error-boundary.d.ts +21 -0
- package/dist/src/context/constants.d.ts +6 -0
- package/dist/src/context/index.d.ts +4 -0
- package/dist/src/context/validate-context-spec-deep.d.ts +9 -0
- package/dist/src/context/validate-context-spec.d.ts +11 -0
- package/dist/src/core/actions.d.ts +28 -0
- package/dist/src/core/catalog/alert.catalog.d.ts +17 -0
- package/dist/src/core/catalog/alert.d.ts +9 -0
- package/dist/src/core/catalog/bar-chart.catalog.d.ts +22 -0
- package/dist/src/core/catalog/bar-chart.d.ts +6 -0
- package/dist/src/core/catalog/button.catalog.d.ts +24 -0
- package/dist/src/core/catalog/button.d.ts +7 -0
- package/dist/src/core/catalog/card.catalog.d.ts +20 -0
- package/dist/src/core/catalog/card.d.ts +8 -0
- package/dist/src/core/catalog/catalog-def.d.ts +484 -0
- package/dist/src/core/catalog/chart-utils.d.ts +2 -0
- package/dist/src/core/catalog/chart.css.d.ts +1 -0
- package/dist/src/core/catalog/checkbox.catalog.d.ts +11 -0
- package/dist/src/core/catalog/checkbox.d.ts +8 -0
- package/dist/src/core/catalog/chip.catalog.d.ts +20 -0
- package/dist/src/core/catalog/chip.d.ts +7 -0
- package/dist/src/core/catalog/divider.catalog.d.ts +25 -0
- package/dist/src/core/catalog/divider.d.ts +6 -0
- package/dist/src/core/catalog/donut-chart.catalog.d.ts +19 -0
- package/dist/src/core/catalog/donut-chart.d.ts +6 -0
- package/dist/src/core/catalog/flex.catalog.d.ts +55 -0
- package/dist/src/core/catalog/flex.d.ts +8 -0
- package/dist/src/core/catalog/grid.catalog.d.ts +21 -0
- package/dist/src/core/catalog/grid.css.d.ts +4 -0
- package/dist/src/core/catalog/grid.d.ts +8 -0
- package/dist/src/core/catalog/guidance-card-column-width.d.ts +12 -0
- package/dist/src/core/catalog/guidance-card.catalog.d.ts +58 -0
- package/dist/src/core/catalog/guidance-card.d.ts +9 -0
- package/dist/src/core/catalog/icon.catalog.d.ts +19 -0
- package/dist/src/core/catalog/icon.d.ts +6 -0
- package/dist/src/core/catalog/index.d.ts +7 -0
- package/dist/src/core/catalog/input.catalog.d.ts +20 -0
- package/dist/src/core/catalog/input.d.ts +8 -0
- package/dist/src/core/catalog/line-chart.catalog.d.ts +18 -0
- package/dist/src/core/catalog/line-chart.d.ts +6 -0
- package/dist/src/core/catalog/link.catalog.d.ts +20 -0
- package/dist/src/core/catalog/link.d.ts +7 -0
- package/dist/src/core/catalog/listbox.catalog.d.ts +15 -0
- package/dist/src/core/catalog/listbox.css.d.ts +9 -0
- package/dist/src/core/catalog/listbox.d.ts +8 -0
- package/dist/src/core/catalog/progress-bar.catalog.d.ts +11 -0
- package/dist/src/core/catalog/progress-bar.d.ts +6 -0
- package/dist/src/core/catalog/radio-group.catalog.d.ts +15 -0
- package/dist/src/core/catalog/radio-group.d.ts +8 -0
- package/dist/src/core/catalog/schemas.d.ts +436 -0
- package/dist/src/core/catalog/switch.catalog.d.ts +11 -0
- package/dist/src/core/catalog/switch.d.ts +8 -0
- package/dist/src/core/catalog/text.catalog.d.ts +20 -0
- package/dist/src/core/catalog/text.d.ts +6 -0
- package/dist/src/core/catalog/textarea.catalog.d.ts +15 -0
- package/dist/src/core/catalog/textarea.d.ts +8 -0
- package/dist/src/generate.d.ts +9 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/marketing/catalog/catalog.d.ts +1 -0
- package/dist/src/marketing/catalog/components/index.d.ts +14 -0
- package/dist/src/marketing/catalog/components/revenue-card.catalog.d.ts +15 -0
- package/dist/src/marketing/catalog/components/revenue-card.css.d.ts +15 -0
- package/dist/src/marketing/catalog/components/revenue-card.d.ts +6 -0
- package/dist/src/marketing/catalog/index.d.ts +6 -0
- package/dist/src/marketing/catalog/scoped-catalogs.d.ts +4 -0
- package/dist/src/registry-utils.d.ts +6 -0
- package/dist/src/registry.d.ts +9 -0
- package/dist/src/renderers/context-spec-renderer.d.ts +6 -0
- package/dist/src/renderers/internal/enrichments/button-actions.d.ts +7 -0
- package/dist/src/renderers/internal/enrichments/useEnrichedSpec.d.ts +3 -0
- package/dist/src/renderers/sectioned-context-renderer.css.d.ts +1 -0
- package/dist/src/renderers/sectioned-context-renderer.d.ts +36 -0
- package/dist/src/renderers/spec-renderer.d.ts +30 -0
- package/dist/src/renderers/types.d.ts +4 -0
- package/dist/src/renderers/wrap-context-registry.d.ts +3 -0
- package/dist/src/scoped-catalog.d.ts +64 -0
- package/dist/src/test/setup-dom.d.ts +1 -0
- package/dist/src/types.d.ts +17 -0
- package/dist/src/utils/cx.d.ts +2 -0
- package/dist/src/utils/defined-props.d.ts +6 -0
- package/dist/styles.css +1 -0
- package/package.json +92 -0
|
@@ -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 };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const actionsCatalog: {
|
|
3
|
+
"atlas.submitUserAction": {
|
|
4
|
+
params: z.ZodObject<{
|
|
5
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6
|
+
actionId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
description: string;
|
|
9
|
+
};
|
|
10
|
+
"atlas.navigate": {
|
|
11
|
+
params: z.ZodObject<{
|
|
12
|
+
url: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
"atlas.artifactToolCall": {
|
|
17
|
+
params: z.ZodObject<{
|
|
18
|
+
tool: z.ZodString;
|
|
19
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const actionsHandlers: {
|
|
25
|
+
"atlas.submitUserAction": (_params: unknown) => Promise<void>;
|
|
26
|
+
"atlas.navigate": (_params: unknown) => Promise<void>;
|
|
27
|
+
"atlas.artifactToolCall": (_params: unknown) => Promise<void>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const alertCatalog: {
|
|
3
|
+
props: z.ZodObject<{
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
success: "success";
|
|
7
|
+
info: "info";
|
|
8
|
+
warning: "warning";
|
|
9
|
+
danger: "danger";
|
|
10
|
+
}>>;
|
|
11
|
+
dismissible: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
aiMark: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
slots: string[];
|
|
15
|
+
events: string[];
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { alertCatalog } from './alert.catalog';
|
|
4
|
+
export { alertCatalog };
|
|
5
|
+
export declare const AlertRenderer: ({ props, emit, children, }: {
|
|
6
|
+
props: z.infer<typeof alertCatalog.props>;
|
|
7
|
+
emit: (event: string) => void;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const barChartCatalog: {
|
|
3
|
+
props: z.ZodObject<{
|
|
4
|
+
data: z.ZodArray<z.ZodObject<{
|
|
5
|
+
category: z.ZodString;
|
|
6
|
+
value: z.ZodNumber;
|
|
7
|
+
}, z.core.$strip>>;
|
|
8
|
+
orientation: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
vertical: "vertical";
|
|
10
|
+
horizontal: "horizontal";
|
|
11
|
+
}>>;
|
|
12
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
monochrome: "monochrome";
|
|
14
|
+
categorical: "categorical";
|
|
15
|
+
semantic: "semantic";
|
|
16
|
+
}>>;
|
|
17
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
slots: never[];
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const buttonCatalog: {
|
|
3
|
+
props: z.ZodObject<{
|
|
4
|
+
label: z.ZodString;
|
|
5
|
+
appearance: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
danger: "danger";
|
|
7
|
+
primary: "primary";
|
|
8
|
+
secondary: "secondary";
|
|
9
|
+
ghost: "ghost";
|
|
10
|
+
}>>;
|
|
11
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
xsmall: "xsmall";
|
|
13
|
+
small: "small";
|
|
14
|
+
medium: "medium";
|
|
15
|
+
large: "large";
|
|
16
|
+
}>>;
|
|
17
|
+
loading: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
slots: never[];
|
|
22
|
+
events: string[];
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { buttonCatalog } from './button.catalog';
|
|
3
|
+
export { buttonCatalog };
|
|
4
|
+
export declare const ButtonRenderer: ({ props, emit, }: {
|
|
5
|
+
props: z.infer<typeof buttonCatalog.props>;
|
|
6
|
+
emit: (event: string) => void;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const cardCatalog: {
|
|
3
|
+
props: z.ZodObject<{
|
|
4
|
+
title: z.ZodOptional<z.ZodString>;
|
|
5
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6
|
+
background: z.ZodOptional<z.ZodEnum<{
|
|
7
|
+
strong: "strong";
|
|
8
|
+
stronger: "stronger";
|
|
9
|
+
}>>;
|
|
10
|
+
padding: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
0: "0";
|
|
12
|
+
xsmall: "xsmall";
|
|
13
|
+
small: "small";
|
|
14
|
+
medium: "medium";
|
|
15
|
+
large: "large";
|
|
16
|
+
}>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
slots: string[];
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { cardCatalog } from './card.catalog';
|
|
4
|
+
export { cardCatalog };
|
|
5
|
+
export declare const CardRenderer: ({ props, children, }: {
|
|
6
|
+
props: z.infer<typeof cardCatalog.props>;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|