@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.
Files changed (126) hide show
  1. package/README.md +335 -0
  2. package/dist/catalog/context/catalog-prompt.md +229 -0
  3. package/dist/catalog/context/schema.json +56 -0
  4. package/dist/catalog/core/catalog-prompt.md +306 -0
  5. package/dist/catalog/core/schema.json +64 -0
  6. package/dist/catalog/marketing/catalog-prompt.md +307 -0
  7. package/dist/catalog/marketing/schema.json +65 -0
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.js +2126 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/src/context/catalog/catalog-def.d.ts +50 -0
  12. package/dist/src/context/catalog/context-card.catalog.d.ts +19 -0
  13. package/dist/src/context/catalog/context-card.d.ts +8 -0
  14. package/dist/src/context/catalog/context-data-table.catalog.d.ts +34 -0
  15. package/dist/src/context/catalog/context-data-table.css.d.ts +2 -0
  16. package/dist/src/context/catalog/context-data-table.d.ts +6 -0
  17. package/dist/src/context/catalog/context-file-list.catalog.d.ts +11 -0
  18. package/dist/src/context/catalog/context-file-list.css.d.ts +16 -0
  19. package/dist/src/context/catalog/context-file-list.d.ts +6 -0
  20. package/dist/src/context/catalog/context-list.catalog.d.ts +48 -0
  21. package/dist/src/context/catalog/context-list.css.d.ts +16 -0
  22. package/dist/src/context/catalog/context-list.d.ts +6 -0
  23. package/dist/src/context/catalog/context-metric-grid.catalog.d.ts +22 -0
  24. package/dist/src/context/catalog/context-metric-grid.css.d.ts +13 -0
  25. package/dist/src/context/catalog/context-metric-grid.d.ts +6 -0
  26. package/dist/src/context/catalog/context-note-list.catalog.d.ts +15 -0
  27. package/dist/src/context/catalog/context-note-list.d.ts +6 -0
  28. package/dist/src/context/catalog/context-overview.catalog.d.ts +8 -0
  29. package/dist/src/context/catalog/context-overview.css.d.ts +2 -0
  30. package/dist/src/context/catalog/context-overview.d.ts +6 -0
  31. package/dist/src/context/catalog/context-panel.catalog.d.ts +6 -0
  32. package/dist/src/context/catalog/context-panel.css.d.ts +1 -0
  33. package/dist/src/context/catalog/context-panel.d.ts +6 -0
  34. package/dist/src/context/catalog/context-tabular-list.catalog.d.ts +19 -0
  35. package/dist/src/context/catalog/context-tabular-list.css.d.ts +17 -0
  36. package/dist/src/context/catalog/context-tabular-list.d.ts +6 -0
  37. package/dist/src/context/catalog/index.d.ts +10 -0
  38. package/dist/src/context/catalog/schemas.d.ts +151 -0
  39. package/dist/src/context/components/collapsible-card.css.d.ts +41 -0
  40. package/dist/src/context/components/collapsible-card.d.ts +14 -0
  41. package/dist/src/context/components/context-ai-summary.css.d.ts +7 -0
  42. package/dist/src/context/components/context-ai-summary.d.ts +4 -0
  43. package/dist/src/context/components/context-chip-tone.d.ts +10 -0
  44. package/dist/src/context/components/context-note-list.css.d.ts +10 -0
  45. package/dist/src/context/components/context-render-error-boundary.d.ts +21 -0
  46. package/dist/src/context/constants.d.ts +6 -0
  47. package/dist/src/context/index.d.ts +4 -0
  48. package/dist/src/context/validate-context-spec-deep.d.ts +9 -0
  49. package/dist/src/context/validate-context-spec.d.ts +11 -0
  50. package/dist/src/core/actions.d.ts +28 -0
  51. package/dist/src/core/catalog/alert.catalog.d.ts +17 -0
  52. package/dist/src/core/catalog/alert.d.ts +9 -0
  53. package/dist/src/core/catalog/bar-chart.catalog.d.ts +22 -0
  54. package/dist/src/core/catalog/bar-chart.d.ts +6 -0
  55. package/dist/src/core/catalog/button.catalog.d.ts +24 -0
  56. package/dist/src/core/catalog/button.d.ts +7 -0
  57. package/dist/src/core/catalog/card.catalog.d.ts +20 -0
  58. package/dist/src/core/catalog/card.d.ts +8 -0
  59. package/dist/src/core/catalog/catalog-def.d.ts +484 -0
  60. package/dist/src/core/catalog/chart-utils.d.ts +2 -0
  61. package/dist/src/core/catalog/chart.css.d.ts +1 -0
  62. package/dist/src/core/catalog/checkbox.catalog.d.ts +11 -0
  63. package/dist/src/core/catalog/checkbox.d.ts +8 -0
  64. package/dist/src/core/catalog/chip.catalog.d.ts +20 -0
  65. package/dist/src/core/catalog/chip.d.ts +7 -0
  66. package/dist/src/core/catalog/divider.catalog.d.ts +25 -0
  67. package/dist/src/core/catalog/divider.d.ts +6 -0
  68. package/dist/src/core/catalog/donut-chart.catalog.d.ts +19 -0
  69. package/dist/src/core/catalog/donut-chart.d.ts +6 -0
  70. package/dist/src/core/catalog/flex.catalog.d.ts +55 -0
  71. package/dist/src/core/catalog/flex.d.ts +8 -0
  72. package/dist/src/core/catalog/grid.catalog.d.ts +21 -0
  73. package/dist/src/core/catalog/grid.css.d.ts +4 -0
  74. package/dist/src/core/catalog/grid.d.ts +8 -0
  75. package/dist/src/core/catalog/guidance-card-column-width.d.ts +12 -0
  76. package/dist/src/core/catalog/guidance-card.catalog.d.ts +58 -0
  77. package/dist/src/core/catalog/guidance-card.d.ts +9 -0
  78. package/dist/src/core/catalog/icon.catalog.d.ts +19 -0
  79. package/dist/src/core/catalog/icon.d.ts +6 -0
  80. package/dist/src/core/catalog/index.d.ts +7 -0
  81. package/dist/src/core/catalog/input.catalog.d.ts +20 -0
  82. package/dist/src/core/catalog/input.d.ts +8 -0
  83. package/dist/src/core/catalog/line-chart.catalog.d.ts +18 -0
  84. package/dist/src/core/catalog/line-chart.d.ts +6 -0
  85. package/dist/src/core/catalog/link.catalog.d.ts +20 -0
  86. package/dist/src/core/catalog/link.d.ts +7 -0
  87. package/dist/src/core/catalog/listbox.catalog.d.ts +15 -0
  88. package/dist/src/core/catalog/listbox.css.d.ts +9 -0
  89. package/dist/src/core/catalog/listbox.d.ts +8 -0
  90. package/dist/src/core/catalog/progress-bar.catalog.d.ts +11 -0
  91. package/dist/src/core/catalog/progress-bar.d.ts +6 -0
  92. package/dist/src/core/catalog/radio-group.catalog.d.ts +15 -0
  93. package/dist/src/core/catalog/radio-group.d.ts +8 -0
  94. package/dist/src/core/catalog/schemas.d.ts +436 -0
  95. package/dist/src/core/catalog/switch.catalog.d.ts +11 -0
  96. package/dist/src/core/catalog/switch.d.ts +8 -0
  97. package/dist/src/core/catalog/text.catalog.d.ts +20 -0
  98. package/dist/src/core/catalog/text.d.ts +6 -0
  99. package/dist/src/core/catalog/textarea.catalog.d.ts +15 -0
  100. package/dist/src/core/catalog/textarea.d.ts +8 -0
  101. package/dist/src/generate.d.ts +9 -0
  102. package/dist/src/index.d.ts +9 -0
  103. package/dist/src/marketing/catalog/catalog.d.ts +1 -0
  104. package/dist/src/marketing/catalog/components/index.d.ts +14 -0
  105. package/dist/src/marketing/catalog/components/revenue-card.catalog.d.ts +15 -0
  106. package/dist/src/marketing/catalog/components/revenue-card.css.d.ts +15 -0
  107. package/dist/src/marketing/catalog/components/revenue-card.d.ts +6 -0
  108. package/dist/src/marketing/catalog/index.d.ts +6 -0
  109. package/dist/src/marketing/catalog/scoped-catalogs.d.ts +4 -0
  110. package/dist/src/registry-utils.d.ts +6 -0
  111. package/dist/src/registry.d.ts +9 -0
  112. package/dist/src/renderers/context-spec-renderer.d.ts +6 -0
  113. package/dist/src/renderers/internal/enrichments/button-actions.d.ts +7 -0
  114. package/dist/src/renderers/internal/enrichments/useEnrichedSpec.d.ts +3 -0
  115. package/dist/src/renderers/sectioned-context-renderer.css.d.ts +1 -0
  116. package/dist/src/renderers/sectioned-context-renderer.d.ts +36 -0
  117. package/dist/src/renderers/spec-renderer.d.ts +30 -0
  118. package/dist/src/renderers/types.d.ts +4 -0
  119. package/dist/src/renderers/wrap-context-registry.d.ts +3 -0
  120. package/dist/src/scoped-catalog.d.ts +64 -0
  121. package/dist/src/test/setup-dom.d.ts +1 -0
  122. package/dist/src/types.d.ts +17 -0
  123. package/dist/src/utils/cx.d.ts +2 -0
  124. package/dist/src/utils/defined-props.d.ts +6 -0
  125. package/dist/styles.css +1 -0
  126. package/package.json +92 -0
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ import { z } from 'zod';
3
+ import { flexCatalog } from './flex.catalog';
4
+ export { flexCatalog };
5
+ export declare const FlexRenderer: ({ props, children, }: {
6
+ props: z.infer<typeof flexCatalog.props>;
7
+ children?: ReactNode;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const gridCatalog: {
3
+ props: z.ZodObject<{
4
+ templateColumns: z.ZodOptional<z.ZodString>;
5
+ gap: z.ZodOptional<z.ZodEnum<{
6
+ 0: "0";
7
+ 1: "1";
8
+ 2: "2";
9
+ 3: "3";
10
+ 4: "4";
11
+ half: "half";
12
+ 5: "5";
13
+ 6: "6";
14
+ 8: "8";
15
+ 12: "12";
16
+ }>>;
17
+ bordered: z.ZodOptional<z.ZodBoolean>;
18
+ }, z.core.$strip>;
19
+ slots: string[];
20
+ description: string;
21
+ };
@@ -0,0 +1,4 @@
1
+ export declare const borderedGrid: string;
2
+ export declare const borderedGridCell: string;
3
+ /** Row separator — omit on the last row so it does not stack on the container bottom edge. */
4
+ export declare const borderedGridRowDivider: string;
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ import { z } from 'zod';
3
+ import { gridCatalog } from './grid.catalog';
4
+ export { gridCatalog };
5
+ export declare const GridRenderer: ({ props, children, }: {
6
+ props: z.infer<typeof gridCatalog.props>;
7
+ children?: ReactNode;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ export declare const GUIDANCE_CARD_COLUMN_WIDTHS: {
2
+ /** Short codes, SKUs, quantities, unit prices, status values. */
3
+ readonly compact: 120;
4
+ /** Names, categories, dates, single-line labels. */
5
+ readonly standard: 180;
6
+ /** Descriptions, notes, scope text, diff/addition cells. */
7
+ readonly wide: 280;
8
+ };
9
+ export type GuidanceCardColumnWidth = keyof typeof GUIDANCE_CARD_COLUMN_WIDTHS;
10
+ /** Map catalog `minWidth` presets to pixel values for the CRK internal Table. */
11
+ export declare function resolveGuidanceCardColumnMinWidth(width: GuidanceCardColumnWidth): number;
12
+ export declare function resolveGuidanceCardColumnMinWidth(width: GuidanceCardColumnWidth | undefined): number | undefined;
@@ -0,0 +1,58 @@
1
+ import { z } from 'zod';
2
+ export declare const guidanceCardCatalog: {
3
+ props: z.ZodObject<{
4
+ state: z.ZodOptional<z.ZodEnum<{
5
+ default: "default";
6
+ accepted: "accepted";
7
+ rejected: "rejected";
8
+ skipped: "skipped";
9
+ }>>;
10
+ referenceLabel: z.ZodString;
11
+ referenceHref: z.ZodOptional<z.ZodString>;
12
+ changeSections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
13
+ type: z.ZodLiteral<"single">;
14
+ changes: z.ZodArray<z.ZodObject<{
15
+ id: z.ZodString;
16
+ label: z.ZodString;
17
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ to: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ reason: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>>;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ type: z.ZodLiteral<"table">;
23
+ label: z.ZodString;
24
+ changeTables: z.ZodArray<z.ZodObject<{
25
+ label: z.ZodString;
26
+ columns: z.ZodArray<z.ZodObject<{
27
+ key: z.ZodString;
28
+ header: z.ZodString;
29
+ minWidth: z.ZodOptional<z.ZodEnum<{
30
+ compact: "compact";
31
+ standard: "standard";
32
+ wide: "wide";
33
+ }>>;
34
+ }, z.core.$strip>>;
35
+ data: z.ZodArray<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
36
+ type: z.ZodLiteral<"text">;
37
+ value: z.ZodString;
38
+ }, z.core.$strip>, z.ZodObject<{
39
+ type: z.ZodLiteral<"diff">;
40
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
+ to: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ }, z.core.$strip>, z.ZodObject<{
43
+ type: z.ZodLiteral<"addition">;
44
+ value: z.ZodString;
45
+ }, z.core.$strip>], "type">]>>, z.ZodObject<{
46
+ id: z.ZodString;
47
+ }, z.core.$strip>>>;
48
+ reason: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>>;
50
+ }, z.core.$strip>], "type">>;
51
+ appliedChangeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
+ defaultExpanded: z.ZodOptional<z.ZodBoolean>;
53
+ }, z.core.$strip>;
54
+ slots: never[];
55
+ events: string[];
56
+ description: string;
57
+ };
58
+ export type GuidanceCardCatalogProps = z.infer<typeof guidanceCardCatalog.props>;
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ import { guidanceCardCatalog } from './guidance-card.catalog';
3
+ export { guidanceCardCatalog };
4
+ /** Maps catalog props to {@link GuidanceCard}, publishing selected ids to bound state on apply/edit. */
5
+ export declare const GuidanceCardRenderer: ({ props, emit, bindings, }: {
6
+ props: z.infer<typeof guidanceCardCatalog.props>;
7
+ emit: (event: string) => void;
8
+ bindings?: Record<string, string>;
9
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ export declare const iconCatalog: {
3
+ props: z.ZodObject<{
4
+ name: z.ZodEnum<{
5
+ "check-circle": "check-circle";
6
+ "in-progress": "in-progress";
7
+ "radio-button-unchecked": "radio-button-unchecked";
8
+ }>;
9
+ size: z.ZodOptional<z.ZodEnum<{
10
+ small: "small";
11
+ medium: "medium";
12
+ large: "large";
13
+ xlarge: "xlarge";
14
+ }>>;
15
+ color: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ slots: never[];
18
+ description: string;
19
+ };
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ import { iconCatalog } from './icon.catalog';
3
+ export { iconCatalog };
4
+ export declare const IconRenderer: ({ props }: {
5
+ props: z.infer<typeof iconCatalog.props>;
6
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import { CatalogEntry } from '../../types';
2
+ import { baseComponents, catalog } from './catalog-def';
3
+ export { baseComponents, catalog };
4
+ export declare const coreCatalogEntries: CatalogEntry[];
5
+ export declare const baseRenderers: {
6
+ [k: string]: unknown;
7
+ };
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ export declare const inputCatalog: {
3
+ props: z.ZodObject<{
4
+ label: z.ZodString;
5
+ placeholder: z.ZodOptional<z.ZodString>;
6
+ type: z.ZodOptional<z.ZodEnum<{
7
+ number: "number";
8
+ url: "url";
9
+ text: "text";
10
+ password: "password";
11
+ email: "email";
12
+ tel: "tel";
13
+ }>>;
14
+ value: z.ZodOptional<z.ZodString>;
15
+ disabled: z.ZodOptional<z.ZodBoolean>;
16
+ }, z.core.$strip>;
17
+ slots: never[];
18
+ events: string[];
19
+ description: string;
20
+ };
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import { inputCatalog } from './input.catalog';
3
+ export { inputCatalog };
4
+ export declare const InputRenderer: ({ props, bindings, emit, }: {
5
+ props: z.infer<typeof inputCatalog.props>;
6
+ bindings?: Record<string, string>;
7
+ emit: (event: string) => void;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ export declare const lineChartCatalog: {
3
+ props: z.ZodObject<{
4
+ data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
5
+ series: z.ZodOptional<z.ZodArray<z.ZodString>>;
6
+ theme: z.ZodOptional<z.ZodEnum<{
7
+ monochrome: "monochrome";
8
+ categorical: "categorical";
9
+ semantic: "semantic";
10
+ }>>;
11
+ showLegend: z.ZodOptional<z.ZodBoolean>;
12
+ showDots: z.ZodOptional<z.ZodBoolean>;
13
+ height: z.ZodOptional<z.ZodNumber>;
14
+ unit: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>;
16
+ slots: never[];
17
+ description: string;
18
+ };
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ import { lineChartCatalog } from './line-chart.catalog';
3
+ export { lineChartCatalog };
4
+ export declare const LineChartRenderer: ({ props }: {
5
+ props: z.infer<typeof lineChartCatalog.props>;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ export declare const linkCatalog: {
3
+ props: z.ZodObject<{
4
+ label: z.ZodString;
5
+ href: z.ZodString;
6
+ appearance: z.ZodOptional<z.ZodEnum<{
7
+ primary: "primary";
8
+ secondary: "secondary";
9
+ }>>;
10
+ target: z.ZodOptional<z.ZodEnum<{
11
+ _blank: "_blank";
12
+ _self: "_self";
13
+ }>>;
14
+ ghost: z.ZodOptional<z.ZodBoolean>;
15
+ badge: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ slots: never[];
18
+ events: string[];
19
+ description: string;
20
+ };
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ import { linkCatalog } from './link.catalog';
3
+ export { linkCatalog };
4
+ export declare const LinkRenderer: ({ props, emit, }: {
5
+ props: z.infer<typeof linkCatalog.props>;
6
+ emit: (event: string) => void;
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ export declare const listboxCatalog: {
3
+ props: z.ZodObject<{
4
+ label: z.ZodString;
5
+ options: z.ZodArray<z.ZodObject<{
6
+ value: z.ZodString;
7
+ label: z.ZodString;
8
+ }, z.core.$strip>>;
9
+ value: z.ZodOptional<z.ZodString>;
10
+ disabled: z.ZodOptional<z.ZodBoolean>;
11
+ }, z.core.$strip>;
12
+ slots: never[];
13
+ events: string[];
14
+ description: string;
15
+ };
@@ -0,0 +1,9 @@
1
+ export declare const listboxWrapper: import('@vanilla-extract/recipes').RuntimeFn<{
2
+ disabled: {
3
+ true: {
4
+ pointerEvents: "none";
5
+ opacity: `var(--${string})`;
6
+ };
7
+ false: {};
8
+ };
9
+ }>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import { listboxCatalog } from './listbox.catalog';
3
+ export { listboxCatalog };
4
+ export declare const ListboxRenderer: ({ props, bindings, emit, }: {
5
+ props: z.infer<typeof listboxCatalog.props>;
6
+ bindings?: Record<string, string>;
7
+ emit: (event: string) => void;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export declare const progressBarCatalog: {
3
+ props: z.ZodObject<{
4
+ label: z.ZodString;
5
+ value: z.ZodOptional<z.ZodNumber>;
6
+ description: z.ZodOptional<z.ZodString>;
7
+ indeterminate: z.ZodOptional<z.ZodBoolean>;
8
+ }, z.core.$strip>;
9
+ slots: never[];
10
+ description: string;
11
+ };
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ import { progressBarCatalog } from './progress-bar.catalog';
3
+ export { progressBarCatalog };
4
+ export declare const ProgressBarRenderer: ({ props, }: {
5
+ props: z.infer<typeof progressBarCatalog.props>;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ export declare const radioGroupCatalog: {
3
+ props: z.ZodObject<{
4
+ label: z.ZodString;
5
+ options: z.ZodArray<z.ZodObject<{
6
+ value: z.ZodString;
7
+ label: z.ZodString;
8
+ }, z.core.$strip>>;
9
+ value: z.ZodOptional<z.ZodString>;
10
+ disabled: z.ZodOptional<z.ZodBoolean>;
11
+ }, z.core.$strip>;
12
+ slots: never[];
13
+ events: string[];
14
+ description: string;
15
+ };
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import { radioGroupCatalog } from './radio-group.catalog';
3
+ export { radioGroupCatalog };
4
+ export declare const RadioGroupRenderer: ({ props, bindings, emit, }: {
5
+ props: z.infer<typeof radioGroupCatalog.props>;
6
+ bindings?: Record<string, string>;
7
+ emit: (event: string) => void;
8
+ }) => import("react/jsx-runtime").JSX.Element;