@classic-homes/theme-mcp 0.3.8 → 0.4.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/README.md +3 -0
- package/dist/{chunk-D3HFF6PQ.js → chunk-27MBCE7P.js} +1734 -96
- package/dist/chunk-27MBCE7P.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-D3HFF6PQ.js.map +0 -1
|
@@ -6,7 +6,7 @@ import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
6
6
|
|
|
7
7
|
// src/data/component-catalog.json
|
|
8
8
|
var component_catalog_default = {
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.4.0",
|
|
10
10
|
components: [
|
|
11
11
|
{
|
|
12
12
|
name: "ActionHeader",
|
|
@@ -43,13 +43,13 @@ var component_catalog_default = {
|
|
|
43
43
|
name: "backHref",
|
|
44
44
|
type: "string",
|
|
45
45
|
required: false,
|
|
46
|
-
description: "Shows a
|
|
46
|
+
description: "Shows a labelled `BackButton` above the title, linking here"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
name: "backLabel",
|
|
50
50
|
type: "string",
|
|
51
51
|
required: false,
|
|
52
|
-
description: 'Back target name
|
|
52
|
+
description: 'Back target name, shown as "Back to {backLabel}"'
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
name: "actions",
|
|
@@ -76,7 +76,7 @@ var component_catalog_default = {
|
|
|
76
76
|
name: "media",
|
|
77
77
|
type: "Snippet",
|
|
78
78
|
required: false,
|
|
79
|
-
description: "Leading visual
|
|
79
|
+
description: "Leading visual beside the title, e.g. a thumbnail"
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
name: "titleSuffix",
|
|
@@ -583,6 +583,126 @@ var component_catalog_default = {
|
|
|
583
583
|
"AlertDescription"
|
|
584
584
|
]
|
|
585
585
|
},
|
|
586
|
+
{
|
|
587
|
+
name: "AppLauncher",
|
|
588
|
+
description: 'Header "apps" grid - a button opening a panel of tiles that link to other systems',
|
|
589
|
+
category: "core",
|
|
590
|
+
importPath: "@classic-homes/theme-svelte",
|
|
591
|
+
props: [
|
|
592
|
+
{
|
|
593
|
+
name: "apps",
|
|
594
|
+
type: "AppLauncherItem[]",
|
|
595
|
+
required: true,
|
|
596
|
+
description: "Tiles: `{ id, label, href, icon?, external?, description? }`"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: "title",
|
|
600
|
+
type: "string",
|
|
601
|
+
required: false,
|
|
602
|
+
description: "Heading at the top of the panel"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
name: "triggerLabel",
|
|
606
|
+
type: "string",
|
|
607
|
+
default: '"Apps"',
|
|
608
|
+
required: false,
|
|
609
|
+
description: "Accessible name of the button and panel"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
name: "columns",
|
|
613
|
+
type: "number",
|
|
614
|
+
default: "3",
|
|
615
|
+
required: false,
|
|
616
|
+
description: "Tiles per row"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
name: "align",
|
|
620
|
+
type: "'start' | 'center' | 'end'",
|
|
621
|
+
default: "'end'",
|
|
622
|
+
required: false,
|
|
623
|
+
description: "Panel alignment against the button"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
name: "open",
|
|
627
|
+
type: "boolean",
|
|
628
|
+
default: "false",
|
|
629
|
+
required: false,
|
|
630
|
+
description: "Panel open (bindable)"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
name: "onOpenChange",
|
|
634
|
+
type: "(open: boolean) => void",
|
|
635
|
+
required: false,
|
|
636
|
+
description: "Called when the panel opens or closes"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
name: "icon",
|
|
640
|
+
type: "Snippet<[AppLauncherItem]>",
|
|
641
|
+
required: false,
|
|
642
|
+
description: "Draws a tile's icon"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
name: "class",
|
|
646
|
+
type: "string",
|
|
647
|
+
required: false,
|
|
648
|
+
description: "Classes for the panel"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
name: "triggerClass",
|
|
652
|
+
type: "string",
|
|
653
|
+
required: false,
|
|
654
|
+
description: "Classes for the button"
|
|
655
|
+
}
|
|
656
|
+
],
|
|
657
|
+
variants: [
|
|
658
|
+
{
|
|
659
|
+
name: "align",
|
|
660
|
+
values: [
|
|
661
|
+
"start",
|
|
662
|
+
"center",
|
|
663
|
+
"end"
|
|
664
|
+
],
|
|
665
|
+
default: "end"
|
|
666
|
+
}
|
|
667
|
+
],
|
|
668
|
+
slots: [
|
|
669
|
+
{
|
|
670
|
+
name: "children",
|
|
671
|
+
description: "Main content",
|
|
672
|
+
required: false
|
|
673
|
+
}
|
|
674
|
+
],
|
|
675
|
+
events: [],
|
|
676
|
+
examples: [
|
|
677
|
+
{
|
|
678
|
+
title: "Basic Usage",
|
|
679
|
+
code: `<script>
|
|
680
|
+
import { AppLauncher } from '@classic-homes/theme-svelte';
|
|
681
|
+
|
|
682
|
+
const apps = [
|
|
683
|
+
{ id: 'reports', label: 'Reports', href: '/reports', icon: 'bar-chart-2' },
|
|
684
|
+
{
|
|
685
|
+
id: 'docs',
|
|
686
|
+
label: 'Documentation',
|
|
687
|
+
href: 'https://docs.example.com',
|
|
688
|
+
icon: 'book-open',
|
|
689
|
+
external: true,
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
id: 'vault',
|
|
693
|
+
label: 'Passwords',
|
|
694
|
+
href: 'https://vault.example.com',
|
|
695
|
+
icon: 'key',
|
|
696
|
+
external: true,
|
|
697
|
+
},
|
|
698
|
+
];
|
|
699
|
+
</script>
|
|
700
|
+
|
|
701
|
+
<AppLauncher {apps} title="Classic Homes apps" />`
|
|
702
|
+
}
|
|
703
|
+
],
|
|
704
|
+
relatedComponents: []
|
|
705
|
+
},
|
|
586
706
|
{
|
|
587
707
|
name: "AppShell",
|
|
588
708
|
description: "Base wrapper component for applications with accessibility features",
|
|
@@ -1548,6 +1668,57 @@ var component_catalog_default = {
|
|
|
1548
1668
|
"AvatarFallback"
|
|
1549
1669
|
]
|
|
1550
1670
|
},
|
|
1671
|
+
{
|
|
1672
|
+
name: "BackButton",
|
|
1673
|
+
description: 'Labelled "\u2190 Back to \u2026" link or button for returning to the previous list or view',
|
|
1674
|
+
category: "core",
|
|
1675
|
+
importPath: "@classic-homes/theme-svelte",
|
|
1676
|
+
props: [
|
|
1677
|
+
{
|
|
1678
|
+
name: "href",
|
|
1679
|
+
type: "string",
|
|
1680
|
+
required: false,
|
|
1681
|
+
description: "Destination; renders an `<a>`"
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
name: "onclick",
|
|
1685
|
+
type: "(event: MouseEvent) => void",
|
|
1686
|
+
required: false,
|
|
1687
|
+
description: "Click handler; renders a `<button>` when there's no `href`"
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
name: "label",
|
|
1691
|
+
type: "string",
|
|
1692
|
+
required: false,
|
|
1693
|
+
description: 'What Back returns to: `"signs"` \u2192 "Back to signs"'
|
|
1694
|
+
},
|
|
1695
|
+
{
|
|
1696
|
+
name: "class",
|
|
1697
|
+
type: "string",
|
|
1698
|
+
required: false,
|
|
1699
|
+
description: "Additional classes"
|
|
1700
|
+
}
|
|
1701
|
+
],
|
|
1702
|
+
variants: [],
|
|
1703
|
+
slots: [
|
|
1704
|
+
{
|
|
1705
|
+
name: "children",
|
|
1706
|
+
description: "Main content",
|
|
1707
|
+
required: false
|
|
1708
|
+
}
|
|
1709
|
+
],
|
|
1710
|
+
events: [],
|
|
1711
|
+
examples: [
|
|
1712
|
+
{
|
|
1713
|
+
title: "Basic Usage",
|
|
1714
|
+
code: '<!-- Link -->\n<BackButton href="/marketing/signs" label="signs" />\n\n<!-- Button (no href) -->\n<BackButton onclick={showList} label="all links" />\n\n<!-- Plain "Back" -->\n<BackButton href="/" />'
|
|
1715
|
+
}
|
|
1716
|
+
],
|
|
1717
|
+
relatedComponents: [
|
|
1718
|
+
"ActionHeader",
|
|
1719
|
+
"Header"
|
|
1720
|
+
]
|
|
1721
|
+
},
|
|
1551
1722
|
{
|
|
1552
1723
|
name: "Badge",
|
|
1553
1724
|
description: "Small label component for status indicators and categorization",
|
|
@@ -1739,6 +1910,13 @@ var component_catalog_default = {
|
|
|
1739
1910
|
required: false,
|
|
1740
1911
|
description: "Show value labels on bars"
|
|
1741
1912
|
},
|
|
1913
|
+
{
|
|
1914
|
+
name: "showTotal",
|
|
1915
|
+
type: "boolean",
|
|
1916
|
+
default: "false",
|
|
1917
|
+
required: false,
|
|
1918
|
+
description: "Label each stack's total at the end of the bar, formatted with `valueFormat`; percent stacks show the raw total"
|
|
1919
|
+
},
|
|
1742
1920
|
{
|
|
1743
1921
|
name: "rowHeight",
|
|
1744
1922
|
type: "number",
|
|
@@ -3944,7 +4122,10 @@ var component_catalog_default = {
|
|
|
3944
4122
|
<LineChart title="Revenue" {data} renderLegend={legend} legend={{ position: 'right' }} />`
|
|
3945
4123
|
}
|
|
3946
4124
|
],
|
|
3947
|
-
relatedComponents: [
|
|
4125
|
+
relatedComponents: [
|
|
4126
|
+
"ChartContainer",
|
|
4127
|
+
"LineChart"
|
|
4128
|
+
]
|
|
3948
4129
|
},
|
|
3949
4130
|
{
|
|
3950
4131
|
name: "ChartSkeleton",
|
|
@@ -4311,9 +4492,9 @@ var component_catalog_default = {
|
|
|
4311
4492
|
},
|
|
4312
4493
|
{
|
|
4313
4494
|
name: "options",
|
|
4314
|
-
type: "ComboboxOption[]",
|
|
4495
|
+
type: "(ComboboxOption | SelectGroup)[]",
|
|
4315
4496
|
required: true,
|
|
4316
|
-
description: "Array of options"
|
|
4497
|
+
description: "Array of options or grouped options"
|
|
4317
4498
|
},
|
|
4318
4499
|
{
|
|
4319
4500
|
name: "placeholder",
|
|
@@ -7113,6 +7294,12 @@ var component_catalog_default = {
|
|
|
7113
7294
|
type: "(event: Event) => void",
|
|
7114
7295
|
required: false,
|
|
7115
7296
|
description: "Called before focus returns to the trigger on close; `preventDefault()` keeps focus where the caller put it (e.g. a field it just revealed)."
|
|
7297
|
+
},
|
|
7298
|
+
{
|
|
7299
|
+
name: "dirty",
|
|
7300
|
+
type: "boolean",
|
|
7301
|
+
required: false,
|
|
7302
|
+
description: "Unsaved work inside; overlay click, Escape and the close button ask before discarding it. Unset = auto-detected from edits; `false` turns the prompt off"
|
|
7116
7303
|
}
|
|
7117
7304
|
],
|
|
7118
7305
|
variants: [
|
|
@@ -9428,6 +9615,270 @@ var component_catalog_default = {
|
|
|
9428
9615
|
"SankeyChart"
|
|
9429
9616
|
]
|
|
9430
9617
|
},
|
|
9618
|
+
{
|
|
9619
|
+
name: "Gantt",
|
|
9620
|
+
description: "Project schedules with a task tree, timeline, dependencies, working calendars and the critical path",
|
|
9621
|
+
category: "chart",
|
|
9622
|
+
importPath: "@classic-homes/gantt-svelte",
|
|
9623
|
+
props: [
|
|
9624
|
+
{
|
|
9625
|
+
name: "tasks",
|
|
9626
|
+
type: "GanttTask[]",
|
|
9627
|
+
required: true,
|
|
9628
|
+
description: "Tasks in display order"
|
|
9629
|
+
},
|
|
9630
|
+
{
|
|
9631
|
+
name: "dependencies",
|
|
9632
|
+
type: "GanttDependency[]",
|
|
9633
|
+
required: false,
|
|
9634
|
+
description: "Links between tasks"
|
|
9635
|
+
},
|
|
9636
|
+
{
|
|
9637
|
+
name: "calendars",
|
|
9638
|
+
type: "GanttCalendar[]",
|
|
9639
|
+
required: false,
|
|
9640
|
+
description: "Working calendars; the first is the project calendar"
|
|
9641
|
+
},
|
|
9642
|
+
{
|
|
9643
|
+
name: "scheduleOptions",
|
|
9644
|
+
type: "ScheduleOptions",
|
|
9645
|
+
required: false,
|
|
9646
|
+
description: "`projectStart`, `projectFinish`, `calendarId`, `mode`, `minutesPerDay`, `respectTaskStart`"
|
|
9647
|
+
},
|
|
9648
|
+
{
|
|
9649
|
+
name: "title",
|
|
9650
|
+
type: "string",
|
|
9651
|
+
default: "'Project schedule'",
|
|
9652
|
+
required: false,
|
|
9653
|
+
description: "Accessible name of the task list"
|
|
9654
|
+
},
|
|
9655
|
+
{
|
|
9656
|
+
name: "zoom",
|
|
9657
|
+
type: "'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'",
|
|
9658
|
+
default: "'week'",
|
|
9659
|
+
required: false,
|
|
9660
|
+
description: "Timeline zoom (bindable)"
|
|
9661
|
+
},
|
|
9662
|
+
{
|
|
9663
|
+
name: "zoomLevels",
|
|
9664
|
+
type: "ZoomLevel[]",
|
|
9665
|
+
default: "['day', 'week', 'month', 'quarter']",
|
|
9666
|
+
required: false,
|
|
9667
|
+
description: "Zoom levels offered in the toolbar"
|
|
9668
|
+
},
|
|
9669
|
+
{
|
|
9670
|
+
name: "columns",
|
|
9671
|
+
type: "Array<GanttColumnId | GanttColumn>",
|
|
9672
|
+
default: "['name', 'start', 'finish', 'duration']",
|
|
9673
|
+
required: false,
|
|
9674
|
+
description: "Built-in ids (`wbs`, `name`, `start`, `finish`, `duration`, `progress`, `predecessors`, `slack`, `assignees`) or custom columns"
|
|
9675
|
+
},
|
|
9676
|
+
{
|
|
9677
|
+
name: "gridWidth",
|
|
9678
|
+
type: "number",
|
|
9679
|
+
default: "420",
|
|
9680
|
+
required: false,
|
|
9681
|
+
description: "Task list width in px (bindable; users can drag the divider)"
|
|
9682
|
+
},
|
|
9683
|
+
{
|
|
9684
|
+
name: "rowHeight",
|
|
9685
|
+
type: "number",
|
|
9686
|
+
default: "36",
|
|
9687
|
+
required: false,
|
|
9688
|
+
description: "Row height in px"
|
|
9689
|
+
},
|
|
9690
|
+
{
|
|
9691
|
+
name: "height",
|
|
9692
|
+
type: "number | string",
|
|
9693
|
+
default: "520",
|
|
9694
|
+
required: false,
|
|
9695
|
+
description: "Overall height"
|
|
9696
|
+
},
|
|
9697
|
+
{
|
|
9698
|
+
name: "collapsed",
|
|
9699
|
+
type: "string[]",
|
|
9700
|
+
required: false,
|
|
9701
|
+
description: "Summaries collapsed on first render"
|
|
9702
|
+
},
|
|
9703
|
+
{
|
|
9704
|
+
name: "showToolbar",
|
|
9705
|
+
type: "boolean",
|
|
9706
|
+
default: "true",
|
|
9707
|
+
required: false,
|
|
9708
|
+
description: "Zoom, today, expand/collapse, critical path, baseline and CSV controls"
|
|
9709
|
+
},
|
|
9710
|
+
{
|
|
9711
|
+
name: "showCritical",
|
|
9712
|
+
type: "boolean",
|
|
9713
|
+
default: "false",
|
|
9714
|
+
required: false,
|
|
9715
|
+
description: "Highlight the critical path (bindable)"
|
|
9716
|
+
},
|
|
9717
|
+
{
|
|
9718
|
+
name: "showBaseline",
|
|
9719
|
+
type: "boolean",
|
|
9720
|
+
default: "false",
|
|
9721
|
+
required: false,
|
|
9722
|
+
description: "Show baseline bars (bindable)"
|
|
9723
|
+
},
|
|
9724
|
+
{
|
|
9725
|
+
name: "showDependencies",
|
|
9726
|
+
type: "boolean",
|
|
9727
|
+
default: "true",
|
|
9728
|
+
required: false,
|
|
9729
|
+
description: "Draw dependency arrows"
|
|
9730
|
+
},
|
|
9731
|
+
{
|
|
9732
|
+
name: "showToday",
|
|
9733
|
+
type: "boolean",
|
|
9734
|
+
default: "true",
|
|
9735
|
+
required: false,
|
|
9736
|
+
description: "Draw a line at the current date"
|
|
9737
|
+
},
|
|
9738
|
+
{
|
|
9739
|
+
name: "showLabels",
|
|
9740
|
+
type: "boolean",
|
|
9741
|
+
default: "true",
|
|
9742
|
+
required: false,
|
|
9743
|
+
description: "Task names next to bars"
|
|
9744
|
+
},
|
|
9745
|
+
{
|
|
9746
|
+
name: "showProgress",
|
|
9747
|
+
type: "boolean",
|
|
9748
|
+
default: "true",
|
|
9749
|
+
required: false,
|
|
9750
|
+
description: "Fill bars by progress"
|
|
9751
|
+
},
|
|
9752
|
+
{
|
|
9753
|
+
name: "exportable",
|
|
9754
|
+
type: "boolean",
|
|
9755
|
+
default: "true",
|
|
9756
|
+
required: false,
|
|
9757
|
+
description: "CSV export button"
|
|
9758
|
+
},
|
|
9759
|
+
{
|
|
9760
|
+
name: "loading",
|
|
9761
|
+
type: "boolean",
|
|
9762
|
+
default: "false",
|
|
9763
|
+
required: false,
|
|
9764
|
+
description: "Skeleton without tasks, dimmed chart with tasks"
|
|
9765
|
+
},
|
|
9766
|
+
{
|
|
9767
|
+
name: "error",
|
|
9768
|
+
type: "string | Error | null",
|
|
9769
|
+
default: "null",
|
|
9770
|
+
required: false,
|
|
9771
|
+
description: "Error state"
|
|
9772
|
+
},
|
|
9773
|
+
{
|
|
9774
|
+
name: "onRetry",
|
|
9775
|
+
type: "() => void",
|
|
9776
|
+
required: false,
|
|
9777
|
+
description: "Retry button in the error state"
|
|
9778
|
+
},
|
|
9779
|
+
{
|
|
9780
|
+
name: "emptyMessage",
|
|
9781
|
+
type: "string",
|
|
9782
|
+
required: false,
|
|
9783
|
+
description: "Text when there are no tasks"
|
|
9784
|
+
},
|
|
9785
|
+
{
|
|
9786
|
+
name: "locale",
|
|
9787
|
+
type: "string",
|
|
9788
|
+
required: false,
|
|
9789
|
+
description: "Locale for dates and headers"
|
|
9790
|
+
},
|
|
9791
|
+
{
|
|
9792
|
+
name: "weekStartsOn",
|
|
9793
|
+
type: "number",
|
|
9794
|
+
default: "1",
|
|
9795
|
+
required: false,
|
|
9796
|
+
description: "0 = Sunday, 1 = Monday"
|
|
9797
|
+
},
|
|
9798
|
+
{
|
|
9799
|
+
name: "ontaskclick",
|
|
9800
|
+
type: "(task: GanttTask, scheduled: ScheduledTask, event) => void",
|
|
9801
|
+
required: false,
|
|
9802
|
+
description: "Row or bar click, or Enter on a row"
|
|
9803
|
+
},
|
|
9804
|
+
{
|
|
9805
|
+
name: "ontaskdblclick",
|
|
9806
|
+
type: "(task: GanttTask, scheduled: ScheduledTask, event: MouseEvent) => void",
|
|
9807
|
+
required: false,
|
|
9808
|
+
description: "Bar double-click"
|
|
9809
|
+
},
|
|
9810
|
+
{
|
|
9811
|
+
name: "onselectionchange",
|
|
9812
|
+
type: "(ids: string[]) => void",
|
|
9813
|
+
required: false,
|
|
9814
|
+
description: "Selection changed"
|
|
9815
|
+
},
|
|
9816
|
+
{
|
|
9817
|
+
name: "editable",
|
|
9818
|
+
type: "boolean",
|
|
9819
|
+
default: "false",
|
|
9820
|
+
required: false,
|
|
9821
|
+
description: "Drag to move, resize, set progress and link; Alt+Arrow keys; undo/redo"
|
|
9822
|
+
},
|
|
9823
|
+
{
|
|
9824
|
+
name: "onchange",
|
|
9825
|
+
type: "(change: GanttChange) => void",
|
|
9826
|
+
required: false,
|
|
9827
|
+
description: "Every edit, undo and redo, with the new data and all moved dates"
|
|
9828
|
+
},
|
|
9829
|
+
{
|
|
9830
|
+
name: "toolbarActions",
|
|
9831
|
+
type: "Snippet",
|
|
9832
|
+
required: false,
|
|
9833
|
+
description: "Extra toolbar content"
|
|
9834
|
+
},
|
|
9835
|
+
{
|
|
9836
|
+
name: "class",
|
|
9837
|
+
type: "string",
|
|
9838
|
+
required: false,
|
|
9839
|
+
description: "Classes for the outer container"
|
|
9840
|
+
}
|
|
9841
|
+
],
|
|
9842
|
+
variants: [
|
|
9843
|
+
{
|
|
9844
|
+
name: "zoom",
|
|
9845
|
+
values: [
|
|
9846
|
+
"hour",
|
|
9847
|
+
"day",
|
|
9848
|
+
"week",
|
|
9849
|
+
"month",
|
|
9850
|
+
"quarter",
|
|
9851
|
+
"year"
|
|
9852
|
+
],
|
|
9853
|
+
default: "week"
|
|
9854
|
+
}
|
|
9855
|
+
],
|
|
9856
|
+
slots: [],
|
|
9857
|
+
events: [],
|
|
9858
|
+
examples: [
|
|
9859
|
+
{
|
|
9860
|
+
title: "Basic Usage",
|
|
9861
|
+
code: `<script>
|
|
9862
|
+
import { Gantt } from '@classic-homes/gantt-svelte';
|
|
9863
|
+
|
|
9864
|
+
const tasks = [
|
|
9865
|
+
{ id: 'design', name: 'Design', start: '2026-03-02', duration: 3, progress: 100 },
|
|
9866
|
+
{ id: 'build', name: 'Build', duration: 5, progress: 20 },
|
|
9867
|
+
{ id: 'launch', name: 'Launch', duration: 0 },
|
|
9868
|
+
];
|
|
9869
|
+
const dependencies = [
|
|
9870
|
+
{ id: 'd1', from: 'design', to: 'build' },
|
|
9871
|
+
{ id: 'd2', from: 'build', to: 'launch' },
|
|
9872
|
+
];
|
|
9873
|
+
</script>
|
|
9874
|
+
|
|
9875
|
+
<Gantt {tasks} {dependencies} title="Launch plan" showCritical />`
|
|
9876
|
+
}
|
|
9877
|
+
],
|
|
9878
|
+
relatedComponents: [
|
|
9879
|
+
"BarChart"
|
|
9880
|
+
]
|
|
9881
|
+
},
|
|
9431
9882
|
{
|
|
9432
9883
|
name: "GaugeChart",
|
|
9433
9884
|
description: "Display single value metrics with progress indicator",
|
|
@@ -11104,6 +11555,213 @@ var component_catalog_default = {
|
|
|
11104
11555
|
"Textarea"
|
|
11105
11556
|
]
|
|
11106
11557
|
},
|
|
11558
|
+
{
|
|
11559
|
+
name: "KanbanBoard",
|
|
11560
|
+
description: "Cards in columns, moved between columns by drag handle or keyboard, with announcements",
|
|
11561
|
+
category: "core",
|
|
11562
|
+
importPath: "@classic-homes/theme-svelte",
|
|
11563
|
+
props: [
|
|
11564
|
+
{
|
|
11565
|
+
name: "columns",
|
|
11566
|
+
type: "KanbanColumn[]",
|
|
11567
|
+
required: true,
|
|
11568
|
+
description: "Columns in order: `{ id, title, description? }` (required)"
|
|
11569
|
+
},
|
|
11570
|
+
{
|
|
11571
|
+
name: "items",
|
|
11572
|
+
type: "T[]",
|
|
11573
|
+
required: true,
|
|
11574
|
+
description: "Cards; each shows in the column `getColumn` names (required)"
|
|
11575
|
+
},
|
|
11576
|
+
{
|
|
11577
|
+
name: "getKey",
|
|
11578
|
+
type: "(item) => string | number",
|
|
11579
|
+
required: true,
|
|
11580
|
+
description: "Stable key (required)"
|
|
11581
|
+
},
|
|
11582
|
+
{
|
|
11583
|
+
name: "getColumn",
|
|
11584
|
+
type: "(item) => string",
|
|
11585
|
+
required: true,
|
|
11586
|
+
description: "Id of the card's column (required)"
|
|
11587
|
+
},
|
|
11588
|
+
{
|
|
11589
|
+
name: "onMove",
|
|
11590
|
+
type: "(move: { item, from, to, index }) => void",
|
|
11591
|
+
required: true,
|
|
11592
|
+
description: "A card was dropped somewhere new - once per drop (required)"
|
|
11593
|
+
},
|
|
11594
|
+
{
|
|
11595
|
+
name: "card",
|
|
11596
|
+
type: "Snippet<[{ item, column, handle, dragging }]>",
|
|
11597
|
+
required: true,
|
|
11598
|
+
description: "Renders one card; spread `handle` on its drag button (required)"
|
|
11599
|
+
},
|
|
11600
|
+
{
|
|
11601
|
+
name: "label",
|
|
11602
|
+
type: "string",
|
|
11603
|
+
required: true,
|
|
11604
|
+
description: "Accessible name of the board (required)"
|
|
11605
|
+
},
|
|
11606
|
+
{
|
|
11607
|
+
name: "columnHeader",
|
|
11608
|
+
type: "Snippet<[{ column, items }]>",
|
|
11609
|
+
required: false,
|
|
11610
|
+
description: "Replaces the default header (title, count, description)"
|
|
11611
|
+
},
|
|
11612
|
+
{
|
|
11613
|
+
name: "columnEmpty",
|
|
11614
|
+
type: "Snippet<[{ column }]>",
|
|
11615
|
+
required: false,
|
|
11616
|
+
description: "Shown in a column with no cards"
|
|
11617
|
+
},
|
|
11618
|
+
{
|
|
11619
|
+
name: "canDrop",
|
|
11620
|
+
type: "(item, to) => boolean",
|
|
11621
|
+
required: false,
|
|
11622
|
+
description: "Whether a card may go to a column; refused columns dim and are skipped"
|
|
11623
|
+
},
|
|
11624
|
+
{
|
|
11625
|
+
name: "sortable",
|
|
11626
|
+
type: "boolean",
|
|
11627
|
+
default: "false",
|
|
11628
|
+
required: false,
|
|
11629
|
+
description: "Cards can be reordered within a column; otherwise a move lands at the end"
|
|
11630
|
+
},
|
|
11631
|
+
{
|
|
11632
|
+
name: "getItemLabel",
|
|
11633
|
+
type: "(item) => string",
|
|
11634
|
+
default: '"Card"',
|
|
11635
|
+
required: false,
|
|
11636
|
+
description: "Name used in announcements and handle labels"
|
|
11637
|
+
},
|
|
11638
|
+
{
|
|
11639
|
+
name: "disabled",
|
|
11640
|
+
type: "boolean",
|
|
11641
|
+
default: "false",
|
|
11642
|
+
required: false,
|
|
11643
|
+
description: "Turns moving off"
|
|
11644
|
+
},
|
|
11645
|
+
{
|
|
11646
|
+
name: "class",
|
|
11647
|
+
type: "string",
|
|
11648
|
+
required: false,
|
|
11649
|
+
description: "Classes for the board"
|
|
11650
|
+
},
|
|
11651
|
+
{
|
|
11652
|
+
name: "columnClass",
|
|
11653
|
+
type: "string",
|
|
11654
|
+
required: false,
|
|
11655
|
+
description: "Classes for each column (e.g. a width other than `w-72`)"
|
|
11656
|
+
},
|
|
11657
|
+
{
|
|
11658
|
+
name: "cardClass",
|
|
11659
|
+
type: "string",
|
|
11660
|
+
required: false,
|
|
11661
|
+
description: "Classes for each card's `li`"
|
|
11662
|
+
}
|
|
11663
|
+
],
|
|
11664
|
+
variants: [],
|
|
11665
|
+
slots: [
|
|
11666
|
+
{
|
|
11667
|
+
name: "children",
|
|
11668
|
+
description: "Main content",
|
|
11669
|
+
required: false
|
|
11670
|
+
}
|
|
11671
|
+
],
|
|
11672
|
+
events: [],
|
|
11673
|
+
examples: [
|
|
11674
|
+
{
|
|
11675
|
+
title: "Basic Usage",
|
|
11676
|
+
code: `<script>
|
|
11677
|
+
import { KanbanBoard, Icon } from '@classic-homes/theme-svelte';
|
|
11678
|
+
|
|
11679
|
+
const columns = [
|
|
11680
|
+
{ id: 'todo', title: 'To do' },
|
|
11681
|
+
{ id: 'doing', title: 'In progress' },
|
|
11682
|
+
{ id: 'done', title: 'Done' },
|
|
11683
|
+
];
|
|
11684
|
+
let tasks = $state([
|
|
11685
|
+
{ id: 'a', title: 'Frame inspection', status: 'todo' },
|
|
11686
|
+
{ id: 'b', title: 'Drywall walk', status: 'doing' },
|
|
11687
|
+
]);
|
|
11688
|
+
|
|
11689
|
+
function move({ item, to }) {
|
|
11690
|
+
tasks = tasks.map((t) => (t.id === item.id ? { ...t, status: to } : t));
|
|
11691
|
+
}
|
|
11692
|
+
</script>
|
|
11693
|
+
|
|
11694
|
+
<KanbanBoard
|
|
11695
|
+
{columns}
|
|
11696
|
+
items={tasks}
|
|
11697
|
+
getKey={(t) => t.id}
|
|
11698
|
+
getColumn={(t) => t.status}
|
|
11699
|
+
getItemLabel={(t) => t.title}
|
|
11700
|
+
onMove={move}
|
|
11701
|
+
label="Punch list"
|
|
11702
|
+
>
|
|
11703
|
+
{#snippet card({ item, handle, dragging })}
|
|
11704
|
+
<div
|
|
11705
|
+
class="flex items-center gap-2 rounded-md border bg-background p-2 text-sm"
|
|
11706
|
+
class:shadow-lg={dragging}
|
|
11707
|
+
>
|
|
11708
|
+
<button {...handle} class="cursor-grab touch-none"><Icon name="grip" size={14} /></button>
|
|
11709
|
+
{item.title}
|
|
11710
|
+
</div>
|
|
11711
|
+
{/snippet}
|
|
11712
|
+
</KanbanBoard>`
|
|
11713
|
+
},
|
|
11714
|
+
{
|
|
11715
|
+
title: "Saving a move",
|
|
11716
|
+
description: "onMove is the one place a move happens. Update your data (optimistically, then save) and the card stays where it was dropped; leave the data alone and it goes back.",
|
|
11717
|
+
code: `<KanbanBoard
|
|
11718
|
+
{columns}
|
|
11719
|
+
items={homes}
|
|
11720
|
+
getKey={(h) => h.id}
|
|
11721
|
+
getColumn={(h) => h.designerId ?? 'unassigned'}
|
|
11722
|
+
onMove={async ({ item, to }) => {
|
|
11723
|
+
const previous = item.designerId;
|
|
11724
|
+
item.designerId = to === 'unassigned' ? null : to;
|
|
11725
|
+
try {
|
|
11726
|
+
await save(item.id, { designerId: item.designerId });
|
|
11727
|
+
} catch {
|
|
11728
|
+
item.designerId = previous;
|
|
11729
|
+
toastStore.error('Could not assign the designer');
|
|
11730
|
+
}
|
|
11731
|
+
}}
|
|
11732
|
+
label="Designer assignments"
|
|
11733
|
+
{card}
|
|
11734
|
+
/>`
|
|
11735
|
+
},
|
|
11736
|
+
{
|
|
11737
|
+
title: "Refusing columns",
|
|
11738
|
+
description: "canDrop keeps a card out of columns it may not go to. Refused columns dim while a card is dragged, the pointer can't drop there, and the arrow keys skip them.",
|
|
11739
|
+
code: `<KanbanBoard
|
|
11740
|
+
{columns}
|
|
11741
|
+
items={tasks}
|
|
11742
|
+
getKey={(t) => t.id}
|
|
11743
|
+
getColumn={(t) => t.status}
|
|
11744
|
+
canDrop={(task, to) => to !== 'done' || task.checked}
|
|
11745
|
+
onMove={move}
|
|
11746
|
+
label="Punch list"
|
|
11747
|
+
{card}
|
|
11748
|
+
/>`
|
|
11749
|
+
},
|
|
11750
|
+
{
|
|
11751
|
+
title: "Ordering within a column",
|
|
11752
|
+
description: "With sortable on, a card can also change its place in a column: drag it between cards, or use the up and down arrows while it is picked up. onMove reports the new position as index, counted among the other cards in that column.",
|
|
11753
|
+
code: '<KanbanBoard\n sortable\n {columns}\n items={tasks}\n getKey={(t) => t.id}\n getColumn={(t) => t.status}\n onMove={({ item, to, index }) => moveTo(item, to, index)}\n label="Sprint"\n {card}\n/>'
|
|
11754
|
+
},
|
|
11755
|
+
{
|
|
11756
|
+
title: "Custom column headers",
|
|
11757
|
+
description: "Replace the title and count, and say what an empty column is for.",
|
|
11758
|
+
code: '<KanbanBoard\n {columns}\n items={homes}\n getKey={(h) => h.id}\n getColumn={(h) => h.designer}\n onMove={assign}\n label="Designers"\n {card}\n>\n {#snippet columnHeader({ column, items })}\n <header class="flex items-baseline gap-2 border-b px-3 py-2">\n <h3 class="flex-1 truncate text-sm font-semibold">{column.title}</h3>\n <span class="text-sm tabular-nums text-muted-foreground">{items.length}</span>\n </header>\n {/snippet}\n {#snippet columnEmpty()}\n <p class="p-2 text-xs text-muted-foreground">Drop a home here.</p>\n {/snippet}\n</KanbanBoard>'
|
|
11759
|
+
}
|
|
11760
|
+
],
|
|
11761
|
+
relatedComponents: [
|
|
11762
|
+
"SortableList"
|
|
11763
|
+
]
|
|
11764
|
+
},
|
|
11107
11765
|
{
|
|
11108
11766
|
name: "Label",
|
|
11109
11767
|
description: "Accessible label component for form inputs",
|
|
@@ -16228,6 +16886,13 @@ var component_catalog_default = {
|
|
|
16228
16886
|
type: "(value: string) => void",
|
|
16229
16887
|
required: false,
|
|
16230
16888
|
description: "Callback when value changes"
|
|
16889
|
+
},
|
|
16890
|
+
{
|
|
16891
|
+
name: "searchable",
|
|
16892
|
+
type: "boolean | number",
|
|
16893
|
+
default: "false",
|
|
16894
|
+
required: false,
|
|
16895
|
+
description: "Type to narrow: `true` always, a number once there are that many options"
|
|
16231
16896
|
}
|
|
16232
16897
|
],
|
|
16233
16898
|
variants: [],
|
|
@@ -16479,6 +17144,12 @@ var component_catalog_default = {
|
|
|
16479
17144
|
type: "string",
|
|
16480
17145
|
required: false,
|
|
16481
17146
|
description: "Additional classes for the panel"
|
|
17147
|
+
},
|
|
17148
|
+
{
|
|
17149
|
+
name: "dirty",
|
|
17150
|
+
type: "boolean",
|
|
17151
|
+
required: false,
|
|
17152
|
+
description: "Unsaved work inside; scrim click, `Escape` and the close button ask before discarding it. Unset = auto-detected from edits; `false` turns the prompt off ([details](/docs/components/dialog#unsaved-changes))"
|
|
16482
17153
|
}
|
|
16483
17154
|
],
|
|
16484
17155
|
variants: [
|
|
@@ -20446,7 +21117,7 @@ function registerComponentResources(server) {
|
|
|
20446
21117
|
|
|
20447
21118
|
// src/data/token-definitions.json
|
|
20448
21119
|
var token_definitions_default = {
|
|
20449
|
-
version: "0.
|
|
21120
|
+
version: "0.4.0",
|
|
20450
21121
|
colors: {
|
|
20451
21122
|
brand: [
|
|
20452
21123
|
{
|
|
@@ -21429,7 +22100,7 @@ function registerTokenResources(server) {
|
|
|
21429
22100
|
|
|
21430
22101
|
// src/data/styles-catalog.json
|
|
21431
22102
|
var styles_catalog_default = {
|
|
21432
|
-
version: "0.
|
|
22103
|
+
version: "0.4.0",
|
|
21433
22104
|
package: "@classic-homes/theme-styles",
|
|
21434
22105
|
description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
|
|
21435
22106
|
integration: {
|
|
@@ -21812,7 +22483,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
|
|
|
21812
22483
|
|
|
21813
22484
|
// src/data/pattern-library.json
|
|
21814
22485
|
var pattern_library_default = {
|
|
21815
|
-
version: "0.
|
|
22486
|
+
version: "0.4.0",
|
|
21816
22487
|
layouts: [
|
|
21817
22488
|
{
|
|
21818
22489
|
id: "dashboard-page",
|
|
@@ -22906,7 +23577,7 @@ function registerLayoutResources(server) {
|
|
|
22906
23577
|
|
|
22907
23578
|
// src/data/schema-catalog.json
|
|
22908
23579
|
var schema_catalog_default = {
|
|
22909
|
-
version: "0.
|
|
23580
|
+
version: "0.4.0",
|
|
22910
23581
|
packageName: "@classic-homes/theme-svelte",
|
|
22911
23582
|
importPath: "@classic-homes/theme-svelte",
|
|
22912
23583
|
generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
|
|
@@ -23714,7 +24385,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
|
|
|
23714
24385
|
|
|
23715
24386
|
// src/data/auth-catalog.json
|
|
23716
24387
|
var auth_catalog_default = {
|
|
23717
|
-
version: "0.
|
|
24388
|
+
version: "0.4.0",
|
|
23718
24389
|
packageName: "@classic-homes/auth",
|
|
23719
24390
|
description: "Authentication services and Svelte bindings for Classic Theme apps",
|
|
23720
24391
|
subpackages: {
|
|
@@ -26751,7 +27422,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
|
|
|
26751
27422
|
|
|
26752
27423
|
// src/data/notifications-catalog.json
|
|
26753
27424
|
var notifications_catalog_default = {
|
|
26754
|
-
version: "0.
|
|
27425
|
+
version: "0.4.0",
|
|
26755
27426
|
packageName: "@classic-homes/notifications",
|
|
26756
27427
|
description: "Notification services and Svelte bindings for Classic Theme apps",
|
|
26757
27428
|
subpackages: {
|
|
@@ -27663,7 +28334,7 @@ function registerNotificationsResources(server) {
|
|
|
27663
28334
|
|
|
27664
28335
|
// src/data/docs-catalog.json
|
|
27665
28336
|
var docs_catalog_default = {
|
|
27666
|
-
version: "0.
|
|
28337
|
+
version: "0.4.0",
|
|
27667
28338
|
packageName: "@classic-homes/theme-docs",
|
|
27668
28339
|
description: "Markdown documentation components for the Classic theme system",
|
|
27669
28340
|
exports: {
|
|
@@ -29335,7 +30006,7 @@ function registerDocsResources(server) {
|
|
|
29335
30006
|
|
|
29336
30007
|
// src/data/charts-catalog.json
|
|
29337
30008
|
var charts_catalog_default = {
|
|
29338
|
-
version: "0.
|
|
30009
|
+
version: "0.4.0",
|
|
29339
30010
|
packageName: "@classic-homes/charts-core",
|
|
29340
30011
|
description: "Core utilities, types, and themes for Classic Theme chart components",
|
|
29341
30012
|
subpackages: {
|
|
@@ -30059,6 +30730,12 @@ var charts_catalog_default = {
|
|
|
30059
30730
|
required: false,
|
|
30060
30731
|
description: "Show value labels on bars"
|
|
30061
30732
|
},
|
|
30733
|
+
{
|
|
30734
|
+
name: "showTotal",
|
|
30735
|
+
type: "boolean",
|
|
30736
|
+
required: false,
|
|
30737
|
+
description: "Label each stack's total at the end of the bar, formatted with valueFormat; percent stacks show the raw total"
|
|
30738
|
+
},
|
|
30062
30739
|
{
|
|
30063
30740
|
name: "legend",
|
|
30064
30741
|
type: "ChartLegendConfig",
|
|
@@ -33465,9 +34142,969 @@ interface SankeyData {
|
|
|
33465
34142
|
}));
|
|
33466
34143
|
}
|
|
33467
34144
|
|
|
34145
|
+
// src/data/gantt-catalog.json
|
|
34146
|
+
var gantt_catalog_default = {
|
|
34147
|
+
version: "0.4.0",
|
|
34148
|
+
packageName: "@classic-homes/gantt-core",
|
|
34149
|
+
description: "Framework-agnostic Gantt engine: working calendars, a critical-path scheduler, an editable project model with undo/redo, timeline geometry, drag math, accessible descriptions and import/export. No DOM, no framework, no runtime dependencies. @classic-homes/gantt-svelte renders it; a React package (@classic-homes/gantt-react) is planned.",
|
|
34150
|
+
packages: {
|
|
34151
|
+
core: {
|
|
34152
|
+
name: "@classic-homes/gantt-core",
|
|
34153
|
+
description: "Pure TypeScript engine",
|
|
34154
|
+
subpaths: {
|
|
34155
|
+
"@classic-homes/gantt-core": "Everything below plus model, interaction, a11y and io",
|
|
34156
|
+
"@classic-homes/gantt-core/types": "Data model types",
|
|
34157
|
+
"@classic-homes/gantt-core/calendar": "Calendars and wall-clock time helpers",
|
|
34158
|
+
"@classic-homes/gantt-core/scheduling": "scheduleProject and task-tree/graph helpers",
|
|
34159
|
+
"@classic-homes/gantt-core/layout": "Time scale, ticks, virtualisation, bar geometry, dependency routing"
|
|
34160
|
+
}
|
|
34161
|
+
},
|
|
34162
|
+
svelte: {
|
|
34163
|
+
name: "@classic-homes/gantt-svelte",
|
|
34164
|
+
description: "Svelte 5 Gantt component (task tree grid + timeline). Re-exports the core functions and types most consumers need.",
|
|
34165
|
+
peerDependencies: {
|
|
34166
|
+
svelte: "^5.20.0"
|
|
34167
|
+
},
|
|
34168
|
+
exports: {
|
|
34169
|
+
components: [
|
|
34170
|
+
"Gantt",
|
|
34171
|
+
"GanttBar",
|
|
34172
|
+
"GanttDependencies",
|
|
34173
|
+
"GanttToolbar",
|
|
34174
|
+
"GanttSplitter",
|
|
34175
|
+
"GanttState"
|
|
34176
|
+
],
|
|
34177
|
+
composables: [
|
|
34178
|
+
"useGanttModel"
|
|
34179
|
+
],
|
|
34180
|
+
columns: [
|
|
34181
|
+
"BUILTIN_COLUMNS",
|
|
34182
|
+
"DEFAULT_COLUMNS",
|
|
34183
|
+
"resolveColumns",
|
|
34184
|
+
"predecessorCodes",
|
|
34185
|
+
"shortDuration"
|
|
34186
|
+
],
|
|
34187
|
+
coreReexports: [
|
|
34188
|
+
"createGanttModel",
|
|
34189
|
+
"scheduleProject",
|
|
34190
|
+
"parseTime",
|
|
34191
|
+
"formatTime",
|
|
34192
|
+
"toLocalDate",
|
|
34193
|
+
"ZOOM_LEVELS",
|
|
34194
|
+
"ZOOM_PRESETS"
|
|
34195
|
+
],
|
|
34196
|
+
typeReexports: [
|
|
34197
|
+
"GanttTask",
|
|
34198
|
+
"GanttDependency",
|
|
34199
|
+
"GanttCalendar",
|
|
34200
|
+
"GanttChange",
|
|
34201
|
+
"GanttModel",
|
|
34202
|
+
"GanttOperation",
|
|
34203
|
+
"ScheduleOptions",
|
|
34204
|
+
"ScheduleResult",
|
|
34205
|
+
"ScheduledTask",
|
|
34206
|
+
"ZoomLevel",
|
|
34207
|
+
"GanttColumn",
|
|
34208
|
+
"GanttColumnId",
|
|
34209
|
+
"GanttCellContext",
|
|
34210
|
+
"UseGanttModelOptions"
|
|
34211
|
+
]
|
|
34212
|
+
}
|
|
34213
|
+
}
|
|
34214
|
+
},
|
|
34215
|
+
time: {
|
|
34216
|
+
description: "Times cross the API as zone-less ISO strings ('2026-03-02' or '2026-03-02T08:00'), Date objects (their local wall-clock fields are used) or wall-clock milliseconds. Internally every instant is a WallTime: epoch ms whose UTC fields are the wall-clock fields, so daylight-saving shifts never move a bar.",
|
|
34217
|
+
types: {
|
|
34218
|
+
WallTime: "number",
|
|
34219
|
+
TimeInput: "string | Date | number"
|
|
34220
|
+
},
|
|
34221
|
+
dateOnlyEnd: "A date-only end ('2026-03-06') means the end of that day's work, so start '2026-03-02' + end '2026-03-06' is a five-day task.",
|
|
34222
|
+
units: "Task duration and dependency lag are working days (fractional allowed). ScheduledTask.duration, totalSlack and freeSlack are working minutes. A day is minutesPerDay minutes (default: the project calendar's working day, 480 for the standard calendar)."
|
|
34223
|
+
},
|
|
34224
|
+
types: {
|
|
34225
|
+
GanttTask: {
|
|
34226
|
+
description: "One task, summary or milestone. Tasks with children are summaries; zero duration (or type 'milestone') is a milestone.",
|
|
34227
|
+
properties: [
|
|
34228
|
+
{
|
|
34229
|
+
name: "id",
|
|
34230
|
+
type: "string",
|
|
34231
|
+
required: true,
|
|
34232
|
+
description: "Unique id"
|
|
34233
|
+
},
|
|
34234
|
+
{
|
|
34235
|
+
name: "name",
|
|
34236
|
+
type: "string",
|
|
34237
|
+
required: true,
|
|
34238
|
+
description: "Label"
|
|
34239
|
+
},
|
|
34240
|
+
{
|
|
34241
|
+
name: "parentId",
|
|
34242
|
+
type: "string | null",
|
|
34243
|
+
required: false,
|
|
34244
|
+
description: "Parent summary task"
|
|
34245
|
+
},
|
|
34246
|
+
{
|
|
34247
|
+
name: "type",
|
|
34248
|
+
type: "'task' | 'summary' | 'milestone'",
|
|
34249
|
+
required: false,
|
|
34250
|
+
description: "Inferred when omitted: summary with children, milestone with zero duration, else task"
|
|
34251
|
+
},
|
|
34252
|
+
{
|
|
34253
|
+
name: "start",
|
|
34254
|
+
type: "TimeInput",
|
|
34255
|
+
required: false,
|
|
34256
|
+
description: "Start. For auto tasks a floor (see respectTaskStart)"
|
|
34257
|
+
},
|
|
34258
|
+
{
|
|
34259
|
+
name: "end",
|
|
34260
|
+
type: "TimeInput",
|
|
34261
|
+
required: false,
|
|
34262
|
+
description: "Finish; a date-only value is the end of that day's work"
|
|
34263
|
+
},
|
|
34264
|
+
{
|
|
34265
|
+
name: "duration",
|
|
34266
|
+
type: "number",
|
|
34267
|
+
required: false,
|
|
34268
|
+
description: "Working days (fractional allowed). Takes precedence over end. Without duration or start+end a task gets one day"
|
|
34269
|
+
},
|
|
34270
|
+
{
|
|
34271
|
+
name: "progress",
|
|
34272
|
+
type: "number",
|
|
34273
|
+
required: false,
|
|
34274
|
+
description: "0-100"
|
|
34275
|
+
},
|
|
34276
|
+
{
|
|
34277
|
+
name: "constraint",
|
|
34278
|
+
type: "GanttConstraint",
|
|
34279
|
+
required: false,
|
|
34280
|
+
description: "{ type: ConstraintType; date?: TimeInput }. date is required for every type except ASAP and ALAP"
|
|
34281
|
+
},
|
|
34282
|
+
{
|
|
34283
|
+
name: "deadline",
|
|
34284
|
+
type: "TimeInput",
|
|
34285
|
+
required: false,
|
|
34286
|
+
description: "Reported as a 'deadline' conflict when the task finishes later"
|
|
34287
|
+
},
|
|
34288
|
+
{
|
|
34289
|
+
name: "calendarId",
|
|
34290
|
+
type: "string",
|
|
34291
|
+
required: false,
|
|
34292
|
+
description: "Calendar id; falls back to the project calendar"
|
|
34293
|
+
},
|
|
34294
|
+
{
|
|
34295
|
+
name: "manual",
|
|
34296
|
+
type: "boolean",
|
|
34297
|
+
required: false,
|
|
34298
|
+
description: "Keeps its own dates; dependencies only report conflicts"
|
|
34299
|
+
},
|
|
34300
|
+
{
|
|
34301
|
+
name: "assignees",
|
|
34302
|
+
type: "string[]",
|
|
34303
|
+
required: false,
|
|
34304
|
+
description: "Assignees"
|
|
34305
|
+
},
|
|
34306
|
+
{
|
|
34307
|
+
name: "baseline",
|
|
34308
|
+
type: "{ start: TimeInput; end: TimeInput }",
|
|
34309
|
+
required: false,
|
|
34310
|
+
description: "Original plan, drawn under the bar when baselines are shown"
|
|
34311
|
+
},
|
|
34312
|
+
{
|
|
34313
|
+
name: "color",
|
|
34314
|
+
type: "string",
|
|
34315
|
+
required: false,
|
|
34316
|
+
description: "Any CSS colour for the bar"
|
|
34317
|
+
},
|
|
34318
|
+
{
|
|
34319
|
+
name: "readonly",
|
|
34320
|
+
type: "boolean",
|
|
34321
|
+
required: false,
|
|
34322
|
+
description: "Blocks every edit of this task in the UI"
|
|
34323
|
+
},
|
|
34324
|
+
{
|
|
34325
|
+
name: "meta",
|
|
34326
|
+
type: "Record<string, unknown>",
|
|
34327
|
+
required: false,
|
|
34328
|
+
description: "Free-form data (e.g. for custom columns)"
|
|
34329
|
+
}
|
|
34330
|
+
]
|
|
34331
|
+
},
|
|
34332
|
+
GanttDependency: {
|
|
34333
|
+
description: "A link from a predecessor to a successor",
|
|
34334
|
+
properties: [
|
|
34335
|
+
{
|
|
34336
|
+
name: "id",
|
|
34337
|
+
type: "string",
|
|
34338
|
+
required: true,
|
|
34339
|
+
description: "Unique id"
|
|
34340
|
+
},
|
|
34341
|
+
{
|
|
34342
|
+
name: "from",
|
|
34343
|
+
type: "string",
|
|
34344
|
+
required: true,
|
|
34345
|
+
description: "Predecessor task id"
|
|
34346
|
+
},
|
|
34347
|
+
{
|
|
34348
|
+
name: "to",
|
|
34349
|
+
type: "string",
|
|
34350
|
+
required: true,
|
|
34351
|
+
description: "Successor task id"
|
|
34352
|
+
},
|
|
34353
|
+
{
|
|
34354
|
+
name: "type",
|
|
34355
|
+
type: "'FS' | 'SS' | 'FF' | 'SF'",
|
|
34356
|
+
required: false,
|
|
34357
|
+
description: "Defaults to FS"
|
|
34358
|
+
},
|
|
34359
|
+
{
|
|
34360
|
+
name: "lag",
|
|
34361
|
+
type: "number",
|
|
34362
|
+
required: false,
|
|
34363
|
+
description: "Working days on the successor's calendar; negative values are leads"
|
|
34364
|
+
}
|
|
34365
|
+
]
|
|
34366
|
+
},
|
|
34367
|
+
GanttCalendar: {
|
|
34368
|
+
description: "A working calendar. Without calendars the built-in 'standard' calendar applies: Monday-Friday, 08:00-12:00 and 13:00-17:00 (480 minutes a day).",
|
|
34369
|
+
properties: [
|
|
34370
|
+
{
|
|
34371
|
+
name: "id",
|
|
34372
|
+
type: "string",
|
|
34373
|
+
required: true,
|
|
34374
|
+
description: "Calendar id"
|
|
34375
|
+
},
|
|
34376
|
+
{
|
|
34377
|
+
name: "name",
|
|
34378
|
+
type: "string",
|
|
34379
|
+
required: false,
|
|
34380
|
+
description: "Display name"
|
|
34381
|
+
},
|
|
34382
|
+
{
|
|
34383
|
+
name: "workingDays",
|
|
34384
|
+
type: "number[]",
|
|
34385
|
+
required: false,
|
|
34386
|
+
description: "Working weekdays, 0 = Sunday ... 6 = Saturday. Default Monday-Friday"
|
|
34387
|
+
},
|
|
34388
|
+
{
|
|
34389
|
+
name: "workingHours",
|
|
34390
|
+
type: "[start: string, end: string][]",
|
|
34391
|
+
required: false,
|
|
34392
|
+
description: "Working intervals per day as HH:mm. Default [['08:00','12:00'], ['13:00','17:00']]. Overlapping or empty intervals throw"
|
|
34393
|
+
},
|
|
34394
|
+
{
|
|
34395
|
+
name: "exceptions",
|
|
34396
|
+
type: "CalendarException[]",
|
|
34397
|
+
required: false,
|
|
34398
|
+
description: "{ date: 'YYYY-MM-DD'; end?: inclusive last day; name?; working?: boolean (default false = holiday); hours?: WorkingHours[] for a working override }"
|
|
34399
|
+
}
|
|
34400
|
+
]
|
|
34401
|
+
},
|
|
34402
|
+
ScheduleOptions: {
|
|
34403
|
+
description: "Options for scheduleProject, createGanttModel({ schedule }) and the Gantt scheduleOptions prop",
|
|
34404
|
+
properties: [
|
|
34405
|
+
{
|
|
34406
|
+
name: "projectStart",
|
|
34407
|
+
type: "TimeInput",
|
|
34408
|
+
required: false,
|
|
34409
|
+
description: "Earliest start for tasks without a start or predecessors. Defaults to the earliest task start (today when no task has one)"
|
|
34410
|
+
},
|
|
34411
|
+
{
|
|
34412
|
+
name: "projectFinish",
|
|
34413
|
+
type: "TimeInput",
|
|
34414
|
+
required: false,
|
|
34415
|
+
description: "Fixed project finish for the backward pass. Defaults to the latest early finish"
|
|
34416
|
+
},
|
|
34417
|
+
{
|
|
34418
|
+
name: "calendarId",
|
|
34419
|
+
type: "string",
|
|
34420
|
+
required: false,
|
|
34421
|
+
description: "Project calendar, defaulting to the first calendar (or the built-in standard one)"
|
|
34422
|
+
},
|
|
34423
|
+
{
|
|
34424
|
+
name: "mode",
|
|
34425
|
+
type: "'auto' | 'manual'",
|
|
34426
|
+
required: false,
|
|
34427
|
+
description: "'manual' treats every task as manually scheduled"
|
|
34428
|
+
},
|
|
34429
|
+
{
|
|
34430
|
+
name: "minutesPerDay",
|
|
34431
|
+
type: "number",
|
|
34432
|
+
required: false,
|
|
34433
|
+
description: "Minutes in a day of duration and lag. Default: the project calendar's working day (480 for the standard calendar)"
|
|
34434
|
+
},
|
|
34435
|
+
{
|
|
34436
|
+
name: "respectTaskStart",
|
|
34437
|
+
type: "boolean",
|
|
34438
|
+
required: false,
|
|
34439
|
+
description: "Default true: an auto task's own start is a floor, so dependencies push it later but never pull it earlier. false gives pure CPM"
|
|
34440
|
+
},
|
|
34441
|
+
{
|
|
34442
|
+
name: "criticalSlack",
|
|
34443
|
+
type: "number",
|
|
34444
|
+
required: false,
|
|
34445
|
+
description: "Total slack (working minutes) at or below which a task is critical. Default 0"
|
|
34446
|
+
}
|
|
34447
|
+
]
|
|
34448
|
+
},
|
|
34449
|
+
ScheduledTask: {
|
|
34450
|
+
description: "Resolved dates for one task (all times are WallTime)",
|
|
34451
|
+
properties: [
|
|
34452
|
+
{
|
|
34453
|
+
name: "id",
|
|
34454
|
+
type: "string",
|
|
34455
|
+
required: true,
|
|
34456
|
+
description: "Task id"
|
|
34457
|
+
},
|
|
34458
|
+
{
|
|
34459
|
+
name: "type",
|
|
34460
|
+
type: "'task' | 'summary' | 'milestone'",
|
|
34461
|
+
required: true,
|
|
34462
|
+
description: "Resolved type"
|
|
34463
|
+
},
|
|
34464
|
+
{
|
|
34465
|
+
name: "start",
|
|
34466
|
+
type: "WallTime",
|
|
34467
|
+
required: true,
|
|
34468
|
+
description: "Scheduled start"
|
|
34469
|
+
},
|
|
34470
|
+
{
|
|
34471
|
+
name: "finish",
|
|
34472
|
+
type: "WallTime",
|
|
34473
|
+
required: true,
|
|
34474
|
+
description: "Scheduled finish"
|
|
34475
|
+
},
|
|
34476
|
+
{
|
|
34477
|
+
name: "duration",
|
|
34478
|
+
type: "number",
|
|
34479
|
+
required: true,
|
|
34480
|
+
description: "Working minutes"
|
|
34481
|
+
},
|
|
34482
|
+
{
|
|
34483
|
+
name: "progress",
|
|
34484
|
+
type: "number",
|
|
34485
|
+
required: true,
|
|
34486
|
+
description: "0-100; duration-weighted for summaries"
|
|
34487
|
+
},
|
|
34488
|
+
{
|
|
34489
|
+
name: "earlyStart",
|
|
34490
|
+
type: "WallTime",
|
|
34491
|
+
required: true,
|
|
34492
|
+
description: "CPM early start"
|
|
34493
|
+
},
|
|
34494
|
+
{
|
|
34495
|
+
name: "earlyFinish",
|
|
34496
|
+
type: "WallTime",
|
|
34497
|
+
required: true,
|
|
34498
|
+
description: "CPM early finish"
|
|
34499
|
+
},
|
|
34500
|
+
{
|
|
34501
|
+
name: "lateStart",
|
|
34502
|
+
type: "WallTime",
|
|
34503
|
+
required: true,
|
|
34504
|
+
description: "CPM late start"
|
|
34505
|
+
},
|
|
34506
|
+
{
|
|
34507
|
+
name: "lateFinish",
|
|
34508
|
+
type: "WallTime",
|
|
34509
|
+
required: true,
|
|
34510
|
+
description: "CPM late finish"
|
|
34511
|
+
},
|
|
34512
|
+
{
|
|
34513
|
+
name: "totalSlack",
|
|
34514
|
+
type: "number",
|
|
34515
|
+
required: true,
|
|
34516
|
+
description: "Working minutes the task can slip without moving the project finish"
|
|
34517
|
+
},
|
|
34518
|
+
{
|
|
34519
|
+
name: "freeSlack",
|
|
34520
|
+
type: "number",
|
|
34521
|
+
required: true,
|
|
34522
|
+
description: "Working minutes the task can slip without moving any successor"
|
|
34523
|
+
},
|
|
34524
|
+
{
|
|
34525
|
+
name: "critical",
|
|
34526
|
+
type: "boolean",
|
|
34527
|
+
required: true,
|
|
34528
|
+
description: "Auto-scheduled and totalSlack <= criticalSlack (manual tasks are never critical)"
|
|
34529
|
+
},
|
|
34530
|
+
{
|
|
34531
|
+
name: "manual",
|
|
34532
|
+
type: "boolean",
|
|
34533
|
+
required: true,
|
|
34534
|
+
description: "Manually scheduled"
|
|
34535
|
+
},
|
|
34536
|
+
{
|
|
34537
|
+
name: "calendarId",
|
|
34538
|
+
type: "string",
|
|
34539
|
+
required: true,
|
|
34540
|
+
description: "Calendar actually used"
|
|
34541
|
+
},
|
|
34542
|
+
{
|
|
34543
|
+
name: "deadline",
|
|
34544
|
+
type: "WallTime",
|
|
34545
|
+
required: false,
|
|
34546
|
+
description: "Parsed deadline"
|
|
34547
|
+
},
|
|
34548
|
+
{
|
|
34549
|
+
name: "baseline",
|
|
34550
|
+
type: "{ start: WallTime; finish: WallTime }",
|
|
34551
|
+
required: false,
|
|
34552
|
+
description: "Parsed baseline"
|
|
34553
|
+
}
|
|
34554
|
+
]
|
|
34555
|
+
},
|
|
34556
|
+
ScheduleResult: {
|
|
34557
|
+
description: "Output of scheduleProject",
|
|
34558
|
+
properties: [
|
|
34559
|
+
{
|
|
34560
|
+
name: "tasks",
|
|
34561
|
+
type: "Map<string, ScheduledTask>",
|
|
34562
|
+
required: true,
|
|
34563
|
+
description: "Scheduled task by id"
|
|
34564
|
+
},
|
|
34565
|
+
{
|
|
34566
|
+
name: "critical",
|
|
34567
|
+
type: "string[]",
|
|
34568
|
+
required: true,
|
|
34569
|
+
description: "Ids of critical tasks, in topological order"
|
|
34570
|
+
},
|
|
34571
|
+
{
|
|
34572
|
+
name: "conflicts",
|
|
34573
|
+
type: "ScheduleConflict[]",
|
|
34574
|
+
required: true,
|
|
34575
|
+
description: "Problems found while scheduling"
|
|
34576
|
+
},
|
|
34577
|
+
{
|
|
34578
|
+
name: "start",
|
|
34579
|
+
type: "WallTime",
|
|
34580
|
+
required: true,
|
|
34581
|
+
description: "Project start"
|
|
34582
|
+
},
|
|
34583
|
+
{
|
|
34584
|
+
name: "finish",
|
|
34585
|
+
type: "WallTime",
|
|
34586
|
+
required: true,
|
|
34587
|
+
description: "Project finish"
|
|
34588
|
+
}
|
|
34589
|
+
]
|
|
34590
|
+
},
|
|
34591
|
+
ScheduleConflict: {
|
|
34592
|
+
description: "{ kind; taskId?; dependencyId?; cycle?: string[] (task ids on the cycle, in order); message }",
|
|
34593
|
+
kinds: {
|
|
34594
|
+
cycle: "Dependency cycle (one dependency on it is ignored so the rest still schedules) or a task that is its own ancestor (treated as top level)",
|
|
34595
|
+
dependency: "A task is scheduled before a predecessor allows (typically a manual task, or one pinned by MSO/MFO)",
|
|
34596
|
+
constraint: "A constraint cannot be met, or has no date and is ignored",
|
|
34597
|
+
deadline: "The task finishes after its deadline",
|
|
34598
|
+
"invalid-dependency": "Duplicate dependency id, unknown task, a link from a task to itself or its own summary (ignored), or a task with an unknown parent (treated as top level)",
|
|
34599
|
+
"missing-calendar": "Unknown task or project calendar id (the project calendar is used)",
|
|
34600
|
+
unsupported: "Constraints on summary tasks and FF/SF dependencies into a summary, both ignored. Not counted by describeSchedule"
|
|
34601
|
+
}
|
|
34602
|
+
},
|
|
34603
|
+
GanttOperation: {
|
|
34604
|
+
description: "One edit the model can apply and invert",
|
|
34605
|
+
union: [
|
|
34606
|
+
"{ type: 'update-task'; id: string; patch: Partial<Omit<GanttTask, 'id'>> }",
|
|
34607
|
+
"{ type: 'add-task'; task: GanttTask; index?: number }",
|
|
34608
|
+
"{ type: 'remove-task'; id: string }",
|
|
34609
|
+
"{ type: 'add-dependency'; dependency: GanttDependency }",
|
|
34610
|
+
"{ type: 'update-dependency'; id: string; patch: Partial<Omit<GanttDependency, 'id'>> }",
|
|
34611
|
+
"{ type: 'remove-dependency'; id: string }"
|
|
34612
|
+
]
|
|
34613
|
+
},
|
|
34614
|
+
GanttChange: {
|
|
34615
|
+
description: "Emitted after every edit, undo or redo, for the consumer to persist",
|
|
34616
|
+
properties: [
|
|
34617
|
+
{
|
|
34618
|
+
name: "source",
|
|
34619
|
+
type: "'edit' | 'undo' | 'redo'",
|
|
34620
|
+
required: true,
|
|
34621
|
+
description: "What produced the change"
|
|
34622
|
+
},
|
|
34623
|
+
{
|
|
34624
|
+
name: "label",
|
|
34625
|
+
type: "string",
|
|
34626
|
+
required: false,
|
|
34627
|
+
description: "Label passed to apply"
|
|
34628
|
+
},
|
|
34629
|
+
{
|
|
34630
|
+
name: "operations",
|
|
34631
|
+
type: "GanttOperation[]",
|
|
34632
|
+
required: true,
|
|
34633
|
+
description: "Operations applied to the input data, in order"
|
|
34634
|
+
},
|
|
34635
|
+
{
|
|
34636
|
+
name: "dates",
|
|
34637
|
+
type: "ScheduledDateChange[]",
|
|
34638
|
+
required: true,
|
|
34639
|
+
description: "{ id, start, finish, previousStart?, previousFinish? } for every task whose scheduled dates moved, including cascaded successors"
|
|
34640
|
+
},
|
|
34641
|
+
{
|
|
34642
|
+
name: "tasks",
|
|
34643
|
+
type: "GanttTask[]",
|
|
34644
|
+
required: true,
|
|
34645
|
+
description: "Data after the change"
|
|
34646
|
+
},
|
|
34647
|
+
{
|
|
34648
|
+
name: "dependencies",
|
|
34649
|
+
type: "GanttDependency[]",
|
|
34650
|
+
required: true,
|
|
34651
|
+
description: "Data after the change"
|
|
34652
|
+
}
|
|
34653
|
+
]
|
|
34654
|
+
},
|
|
34655
|
+
GanttRow: {
|
|
34656
|
+
description: "A visible row of the flattened task tree",
|
|
34657
|
+
properties: [
|
|
34658
|
+
{
|
|
34659
|
+
name: "id",
|
|
34660
|
+
type: "string",
|
|
34661
|
+
required: true,
|
|
34662
|
+
description: "Task id"
|
|
34663
|
+
},
|
|
34664
|
+
{
|
|
34665
|
+
name: "task",
|
|
34666
|
+
type: "GanttTask",
|
|
34667
|
+
required: true,
|
|
34668
|
+
description: "Source task"
|
|
34669
|
+
},
|
|
34670
|
+
{
|
|
34671
|
+
name: "index",
|
|
34672
|
+
type: "number",
|
|
34673
|
+
required: true,
|
|
34674
|
+
description: "0-based index among visible rows"
|
|
34675
|
+
},
|
|
34676
|
+
{
|
|
34677
|
+
name: "level",
|
|
34678
|
+
type: "number",
|
|
34679
|
+
required: true,
|
|
34680
|
+
description: "1 for top level"
|
|
34681
|
+
},
|
|
34682
|
+
{
|
|
34683
|
+
name: "wbs",
|
|
34684
|
+
type: "string",
|
|
34685
|
+
required: true,
|
|
34686
|
+
description: "Outline number, e.g. 1.2.3"
|
|
34687
|
+
},
|
|
34688
|
+
{
|
|
34689
|
+
name: "hasChildren",
|
|
34690
|
+
type: "boolean",
|
|
34691
|
+
required: true,
|
|
34692
|
+
description: "Is a summary"
|
|
34693
|
+
},
|
|
34694
|
+
{
|
|
34695
|
+
name: "expanded",
|
|
34696
|
+
type: "boolean",
|
|
34697
|
+
required: true,
|
|
34698
|
+
description: "Expand state"
|
|
34699
|
+
},
|
|
34700
|
+
{
|
|
34701
|
+
name: "parentId",
|
|
34702
|
+
type: "string | null",
|
|
34703
|
+
required: true,
|
|
34704
|
+
description: "Parent id"
|
|
34705
|
+
}
|
|
34706
|
+
]
|
|
34707
|
+
}
|
|
34708
|
+
},
|
|
34709
|
+
scheduling: {
|
|
34710
|
+
function: {
|
|
34711
|
+
name: "scheduleProject",
|
|
34712
|
+
signature: "(tasks: GanttTask[], dependencies?: GanttDependency[], calendars?: GanttCalendar[], options?: ScheduleOptions) => ScheduleResult",
|
|
34713
|
+
description: "Critical path method: a forward pass for early dates, a backward pass for late dates, slack and the critical path. Pure and deterministic. Throws on a duplicate task id; every other problem is reported in conflicts."
|
|
34714
|
+
},
|
|
34715
|
+
semantics: [
|
|
34716
|
+
"Durations and lags are working time on a calendar: a task's own calendar, otherwise the project calendar. Lag uses the successor's calendar.",
|
|
34717
|
+
"Starts snap forward to working time and finishes snap backward, so bars never begin or end in non-working time. A milestone's given start is not snapped.",
|
|
34718
|
+
"duration takes precedence over end. With start + end and no duration, the duration is the working time between them. With neither, a task is one day.",
|
|
34719
|
+
"Dependency types: FS (successor starts after predecessor finishes, the default), SS, FF and SF, each with an optional lag in working days (negative = lead).",
|
|
34720
|
+
"respectTaskStart (default true): an auto task's own start is a floor; dependencies push it later but never earlier. Set it to false for pure CPM.",
|
|
34721
|
+
"Constraints: ASAP (default), ALAP (as late as total slack allows), SNET, SNLT, FNET, FNLT, MSO, MFO. Every type except ASAP and ALAP needs a date; a constraint that cannot be met is reported as a 'constraint' conflict.",
|
|
34722
|
+
"deadline does not move the task; finishing later is a 'deadline' conflict.",
|
|
34723
|
+
"Summaries are tasks with children. Their dates and duration-weighted progress roll up from the subtree. A dependency into a summary bounds every leaf in its subtree (FS and SS only; FF/SF into a summary are reported and ignored). A dependency out of a summary uses its rolled-up dates. Constraints on summaries are not supported.",
|
|
34724
|
+
"Manual tasks (manual: true, or options.mode 'manual') keep their given dates; dependencies only report 'dependency' conflicts.",
|
|
34725
|
+
"Cycles are reported with the path; one dependency on the cycle is ignored so the rest still schedules.",
|
|
34726
|
+
"A task is critical when it is auto-scheduled and totalSlack <= criticalSlack (default 0); manual tasks never are. ScheduleResult.critical lists critical ids in topological order."
|
|
34727
|
+
],
|
|
34728
|
+
example: "import { scheduleProject, formatTime } from '@classic-homes/gantt-core';\n\nconst result = scheduleProject(\n [\n { id: 'design', name: 'Design', start: '2026-03-02', duration: 3 },\n { id: 'build', name: 'Build', duration: 5 },\n { id: 'launch', name: 'Launch', duration: 0 }, // milestone\n ],\n [\n { id: 'd1', from: 'design', to: 'build' }, // FS by default\n { id: 'd2', from: 'build', to: 'launch', type: 'FF', lag: 1 },\n ]\n);\n\nformatTime(result.tasks.get('build')!.start); // '2026-03-05T08:00'\nresult.critical; // ['design', 'build', 'launch']\nresult.conflicts; // []",
|
|
34729
|
+
helpers: [
|
|
34730
|
+
{
|
|
34731
|
+
name: "taskDaySpan",
|
|
34732
|
+
signature: "(task: Pick<ScheduledTask, 'start' | 'finish'>) => { first: number; last: number }",
|
|
34733
|
+
description: "Whole wall-clock day indexes a task touches"
|
|
34734
|
+
},
|
|
34735
|
+
{
|
|
34736
|
+
name: "buildTaskTree / ancestorsOf / descendantsOf / leavesOf / isAncestor",
|
|
34737
|
+
signature: "buildTaskTree(tasks: GanttTask[]) => TaskTree",
|
|
34738
|
+
description: "Task-tree helpers (parent/children maps)"
|
|
34739
|
+
},
|
|
34740
|
+
{
|
|
34741
|
+
name: "wouldCreateCycle",
|
|
34742
|
+
signature: "(tasks, dependencies, from: string, to: string) => boolean",
|
|
34743
|
+
description: "Whether a new link would close a cycle (used by the model's validation)"
|
|
34744
|
+
}
|
|
34745
|
+
]
|
|
34746
|
+
},
|
|
34747
|
+
model: {
|
|
34748
|
+
function: {
|
|
34749
|
+
name: "createGanttModel",
|
|
34750
|
+
signature: "(options: GanttModelOptions) => GanttModel",
|
|
34751
|
+
description: "Framework-agnostic controller owning the data, the derived schedule, the visible row tree, selection and undo/redo history. Adapters wrap it via subscribe; every edit, undo and redo emits a GanttChange."
|
|
34752
|
+
},
|
|
34753
|
+
options: [
|
|
34754
|
+
{
|
|
34755
|
+
name: "tasks",
|
|
34756
|
+
type: "GanttTask[]",
|
|
34757
|
+
required: true
|
|
34758
|
+
},
|
|
34759
|
+
{
|
|
34760
|
+
name: "dependencies",
|
|
34761
|
+
type: "GanttDependency[]",
|
|
34762
|
+
required: false
|
|
34763
|
+
},
|
|
34764
|
+
{
|
|
34765
|
+
name: "calendars",
|
|
34766
|
+
type: "GanttCalendar[]",
|
|
34767
|
+
required: false
|
|
34768
|
+
},
|
|
34769
|
+
{
|
|
34770
|
+
name: "schedule",
|
|
34771
|
+
type: "ScheduleOptions",
|
|
34772
|
+
required: false
|
|
34773
|
+
},
|
|
34774
|
+
{
|
|
34775
|
+
name: "collapsed",
|
|
34776
|
+
type: "Iterable<string>",
|
|
34777
|
+
required: false,
|
|
34778
|
+
description: "Collapsed summaries. Everything is expanded by default"
|
|
34779
|
+
},
|
|
34780
|
+
{
|
|
34781
|
+
name: "historyLimit",
|
|
34782
|
+
type: "number",
|
|
34783
|
+
required: false,
|
|
34784
|
+
description: "Maximum undo steps (default 100)"
|
|
34785
|
+
}
|
|
34786
|
+
],
|
|
34787
|
+
state: "GanttModelState: { tasks, dependencies, calendars, schedule: ScheduleResult, rows: GanttRow[], wbs: Map<string, string> (every task, visible or not), selection: ReadonlySet<string>, focusedId: string | null, canUndo, canRedo, version (bumps on every state change) }",
|
|
34788
|
+
methods: [
|
|
34789
|
+
{
|
|
34790
|
+
name: "getState",
|
|
34791
|
+
signature: "() => GanttModelState"
|
|
34792
|
+
},
|
|
34793
|
+
{
|
|
34794
|
+
name: "subscribe",
|
|
34795
|
+
signature: "(listener: (state: GanttModelState) => void) => () => void",
|
|
34796
|
+
description: "Every state change (data, selection, expand state)"
|
|
34797
|
+
},
|
|
34798
|
+
{
|
|
34799
|
+
name: "onChange",
|
|
34800
|
+
signature: "(listener: (change: GanttChange) => void) => () => void",
|
|
34801
|
+
description: "Edits, undo and redo, to persist them"
|
|
34802
|
+
},
|
|
34803
|
+
{
|
|
34804
|
+
name: "apply",
|
|
34805
|
+
signature: "(operations: GanttOperation | GanttOperation[], label?: string) => GanttChange",
|
|
34806
|
+
description: "Apply operations as one undoable step. Throws GanttEditError and changes nothing on invalid input. Clears the redo stack"
|
|
34807
|
+
},
|
|
34808
|
+
{
|
|
34809
|
+
name: "validate",
|
|
34810
|
+
signature: "(operations: GanttOperation | GanttOperation[]) => string | null",
|
|
34811
|
+
description: "Check operations without applying them; returns the first error message"
|
|
34812
|
+
},
|
|
34813
|
+
{
|
|
34814
|
+
name: "preview",
|
|
34815
|
+
signature: "(operations: GanttOperation | GanttOperation[]) => ScheduleResult",
|
|
34816
|
+
description: "Schedule the data as it would be after the operations, without committing (drag previews)"
|
|
34817
|
+
},
|
|
34818
|
+
{
|
|
34819
|
+
name: "undo",
|
|
34820
|
+
signature: "() => GanttChange | null"
|
|
34821
|
+
},
|
|
34822
|
+
{
|
|
34823
|
+
name: "redo",
|
|
34824
|
+
signature: "() => GanttChange | null"
|
|
34825
|
+
},
|
|
34826
|
+
{
|
|
34827
|
+
name: "setData",
|
|
34828
|
+
signature: "(data: { tasks?; dependencies?; calendars? }) => void",
|
|
34829
|
+
description: "Replace the data from outside (e.g. after a server refresh). Clears history"
|
|
34830
|
+
},
|
|
34831
|
+
{
|
|
34832
|
+
name: "setScheduleOptions",
|
|
34833
|
+
signature: "(options: ScheduleOptions) => void"
|
|
34834
|
+
},
|
|
34835
|
+
{
|
|
34836
|
+
name: "toggle / setExpanded / expandAll / collapseAll",
|
|
34837
|
+
signature: "(id) / (id, expanded) / () / ()"
|
|
34838
|
+
},
|
|
34839
|
+
{
|
|
34840
|
+
name: "select",
|
|
34841
|
+
signature: "(id: string | null, mode?: 'replace' | 'toggle' | 'range') => void",
|
|
34842
|
+
description: "range extends from the focused row"
|
|
34843
|
+
},
|
|
34844
|
+
{
|
|
34845
|
+
name: "selectAll / clearSelection",
|
|
34846
|
+
signature: "() => void"
|
|
34847
|
+
},
|
|
34848
|
+
{
|
|
34849
|
+
name: "setFocused",
|
|
34850
|
+
signature: "(id: string | null) => void"
|
|
34851
|
+
}
|
|
34852
|
+
],
|
|
34853
|
+
validationRules: [
|
|
34854
|
+
"update-task: unknown task; moving a task under itself or a descendant; unknown parent",
|
|
34855
|
+
"add-task: missing id; duplicate id",
|
|
34856
|
+
"remove-task: unknown task. Removes the whole subtree and every dependency touching it (undo restores them)",
|
|
34857
|
+
"add-dependency: missing id; duplicate id; unknown task; tasks already linked; would create a cycle",
|
|
34858
|
+
"update-dependency: unknown dependency; new endpoints would create a cycle",
|
|
34859
|
+
"remove-dependency: unknown dependency"
|
|
34860
|
+
],
|
|
34861
|
+
errors: "GanttEditError extends Error with the failing `operation`",
|
|
34862
|
+
example: "import { createGanttModel } from '@classic-homes/gantt-core';\n\nconst model = createGanttModel({ tasks, dependencies, calendars });\nmodel.subscribe((state) => render(state.rows, state.schedule));\nmodel.onChange((change) => persist(change)); // edits, undo and redo\n\nmodel.apply({ type: 'update-task', id: 'design', patch: { duration: 4 } }, 'Extend design');\nmodel.undo();\nmodel.validate({ type: 'add-dependency', dependency: { id: 'x', from: 'launch', to: 'design' } });\n// 'This link would create a circular dependency'"
|
|
34863
|
+
},
|
|
34864
|
+
modules: {
|
|
34865
|
+
calendar: [
|
|
34866
|
+
{
|
|
34867
|
+
name: "STANDARD_CALENDAR / STANDARD_CALENDAR_ID",
|
|
34868
|
+
signature: "GanttCalendar / 'standard'",
|
|
34869
|
+
description: "Mon-Fri, 08:00-12:00 + 13:00-17:00"
|
|
34870
|
+
},
|
|
34871
|
+
{
|
|
34872
|
+
name: "CONTINUOUS_CALENDAR",
|
|
34873
|
+
signature: "GanttCalendar",
|
|
34874
|
+
description: "Every day, all day"
|
|
34875
|
+
},
|
|
34876
|
+
{
|
|
34877
|
+
name: "compileCalendar / compileCalendars",
|
|
34878
|
+
signature: "(def: GanttCalendar) => WorkCalendar / (defs?: GanttCalendar[]) => Map<string, WorkCalendar>",
|
|
34879
|
+
description: "Working-time arithmetic: isWorking, nextWorking, prevWorking, add(t, minutes), between(a, b), minutesPerDay. compileCalendars always includes the standard calendar"
|
|
34880
|
+
},
|
|
34881
|
+
{
|
|
34882
|
+
name: "nonWorkingSpans",
|
|
34883
|
+
signature: "(calendar: WorkCalendar, from: WallTime, to: WallTime) => Array<[WallTime, WallTime]>",
|
|
34884
|
+
description: "Non-working spans for shading"
|
|
34885
|
+
},
|
|
34886
|
+
{
|
|
34887
|
+
name: "parseTime / tryParseTime / formatTime / isDateOnly",
|
|
34888
|
+
signature: "parseTime(input: TimeInput) => WallTime; formatTime(t: WallTime, { dateOnly? }) => string",
|
|
34889
|
+
description: "Wall-clock parsing and ISO formatting"
|
|
34890
|
+
},
|
|
34891
|
+
{
|
|
34892
|
+
name: "toLocalDate / startOfDay / dayIndex / weekday",
|
|
34893
|
+
signature: "(t: WallTime) => Date | WallTime | number",
|
|
34894
|
+
description: "Wall-time helpers"
|
|
34895
|
+
},
|
|
34896
|
+
{
|
|
34897
|
+
name: "createTimeFormatter",
|
|
34898
|
+
signature: "(locale: string | undefined, options: Intl.DateTimeFormatOptions) => (t: WallTime) => string",
|
|
34899
|
+
description: "Intl formatter for wall times"
|
|
34900
|
+
}
|
|
34901
|
+
],
|
|
34902
|
+
layout: [
|
|
34903
|
+
{
|
|
34904
|
+
name: "ZOOM_LEVELS / ZOOM_PRESETS",
|
|
34905
|
+
signature: "ZoomLevel[] / Record<ZoomLevel, ZoomPreset>",
|
|
34906
|
+
description: "'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'; presets give pxPerDay, header tiers, snap unit and non-working shading"
|
|
34907
|
+
},
|
|
34908
|
+
{
|
|
34909
|
+
name: "createTimeScale",
|
|
34910
|
+
signature: "(start: WallTime, end: WallTime, pxPerDay: number) => TimeScale",
|
|
34911
|
+
description: "Time <-> x mapping"
|
|
34912
|
+
},
|
|
34913
|
+
{
|
|
34914
|
+
name: "timelineRange",
|
|
34915
|
+
signature: "(start, finish, zoom, { padding?, weekStartsOn?, minWidth? }) => { start; end }",
|
|
34916
|
+
description: "Padded, unit-aligned timeline range"
|
|
34917
|
+
},
|
|
34918
|
+
{
|
|
34919
|
+
name: "scaleTicks",
|
|
34920
|
+
signature: "(scale: TimeScale, unit: TimeUnit, options?: TickOptions) => Tick[]",
|
|
34921
|
+
description: "Header ticks with Intl labels"
|
|
34922
|
+
},
|
|
34923
|
+
{
|
|
34924
|
+
name: "floorUnit / addUnits / snapToUnit",
|
|
34925
|
+
signature: "(t: WallTime, unit: TimeUnit, ...) => WallTime",
|
|
34926
|
+
description: "Calendar-unit arithmetic"
|
|
34927
|
+
},
|
|
34928
|
+
{
|
|
34929
|
+
name: "virtualWindow",
|
|
34930
|
+
signature: "(options) => VirtualWindow",
|
|
34931
|
+
description: "Row virtualisation window"
|
|
34932
|
+
},
|
|
34933
|
+
{
|
|
34934
|
+
name: "barGeometry / hitTestBar",
|
|
34935
|
+
signature: "barGeometry(task: ScheduledTask, rowIndex, scale, options: BarOptions) => BarGeometry; hitTestBar(bar, x, handleWidth?) => 'resize-start' | 'resize-end' | 'move' | null",
|
|
34936
|
+
description: "Task, summary, milestone and baseline rectangles"
|
|
34937
|
+
},
|
|
34938
|
+
{
|
|
34939
|
+
name: "routeDependency / pathFromPoints",
|
|
34940
|
+
signature: "routeDependency(from, to, type: DependencyType, options) => Point[]; pathFromPoints(points, radius?) => string",
|
|
34941
|
+
description: "Orthogonal dependency arrows with rounded corners (SVG path)"
|
|
34942
|
+
}
|
|
34943
|
+
],
|
|
34944
|
+
interaction: [
|
|
34945
|
+
{
|
|
34946
|
+
name: "createDragSession",
|
|
34947
|
+
signature: "(ctx: EditContext, mode: 'move' | 'resize-start' | 'resize-end', scale: TimeScale, originX: number)",
|
|
34948
|
+
description: "Turns pointer travel into snapped previews"
|
|
34949
|
+
},
|
|
34950
|
+
{
|
|
34951
|
+
name: "shiftTask / editOperation",
|
|
34952
|
+
signature: "shiftTask(ctx, mode, units) => EditPreview; editOperation(ctx, mode, preview) => GanttOperation | null",
|
|
34953
|
+
description: "Keyboard nudges and the resulting update-task operation, keeping the data's shape (start+end stays start+end, date-only stays date-only)"
|
|
34954
|
+
},
|
|
34955
|
+
{
|
|
34956
|
+
name: "unitsForDelta / progressAt",
|
|
34957
|
+
signature: "unitsForDelta(scale, dx, unit) => number; progressAt(bar, x, step?) => number",
|
|
34958
|
+
description: "Pixel deltas to snap units; progress drag"
|
|
34959
|
+
},
|
|
34960
|
+
{
|
|
34961
|
+
name: "linkOperation / dependencyTypeFor / createId",
|
|
34962
|
+
signature: "linkOperation(from, to, type?, extra?) => GanttOperation; dependencyTypeFor(fromSide, toSide) => DependencyType",
|
|
34963
|
+
description: "Building add-dependency operations from bar-end drags"
|
|
34964
|
+
}
|
|
34965
|
+
],
|
|
34966
|
+
a11y: [
|
|
34967
|
+
{
|
|
34968
|
+
name: "describeTask",
|
|
34969
|
+
signature: "(name: string, task: ScheduledTask, context) => string",
|
|
34970
|
+
description: "One sentence for aria-labels and announcements"
|
|
34971
|
+
},
|
|
34972
|
+
{
|
|
34973
|
+
name: "describeSchedule",
|
|
34974
|
+
signature: "(result: ScheduleResult, options?: DescribeOptions) => string",
|
|
34975
|
+
description: "Summary of the whole schedule, including conflict count"
|
|
34976
|
+
},
|
|
34977
|
+
{
|
|
34978
|
+
name: "ganttTable",
|
|
34979
|
+
signature: "(rows, schedule, dependencies?, options?) => GanttTable",
|
|
34980
|
+
description: "Plain table for the sr-only fallback and CSV export"
|
|
34981
|
+
},
|
|
34982
|
+
{
|
|
34983
|
+
name: "formatDuration",
|
|
34984
|
+
signature: "(minutes: number, minutesPerDay?: number) => string",
|
|
34985
|
+
description: "'3 days', '4 hours'"
|
|
34986
|
+
}
|
|
34987
|
+
],
|
|
34988
|
+
io: [
|
|
34989
|
+
{
|
|
34990
|
+
name: "exportProject",
|
|
34991
|
+
signature: "(tasks, dependencies, calendars?, schedule?) => GanttProjectData",
|
|
34992
|
+
description: "Serialisable { version: 1, tasks, dependencies, calendars? }, with resolved dates written back when a schedule is given"
|
|
34993
|
+
},
|
|
34994
|
+
{
|
|
34995
|
+
name: "importProject",
|
|
34996
|
+
signature: "(input: string | unknown) => GanttProjectData",
|
|
34997
|
+
description: "Parse and validate project JSON; throws a readable TypeError on bad input"
|
|
34998
|
+
},
|
|
34999
|
+
{
|
|
35000
|
+
name: "tableToCsv",
|
|
35001
|
+
signature: "(table: GanttTable) => string",
|
|
35002
|
+
description: "CSV text"
|
|
35003
|
+
}
|
|
35004
|
+
]
|
|
35005
|
+
},
|
|
35006
|
+
component: {
|
|
35007
|
+
name: "Gantt",
|
|
35008
|
+
importPath: "@classic-homes/gantt-svelte",
|
|
35009
|
+
framework: "svelte",
|
|
35010
|
+
description: "Accessible task tree grid on the left, timeline on the right (bars, milestones, summary brackets, dependency arrows, today line, baselines, critical path). Props are listed by get_component_props('Gantt').",
|
|
35011
|
+
keyProps: {
|
|
35012
|
+
data: "tasks (required), dependencies, calendars, scheduleOptions",
|
|
35013
|
+
view: "zoom (bindable), zoomLevels, columns, gridWidth (bindable), rowHeight, height, collapsed",
|
|
35014
|
+
toggles: "showToolbar, showCritical (bindable), showBaseline (bindable), showDependencies, showToday, showLabels, showProgress, exportable",
|
|
35015
|
+
states: "loading, error, onRetry, emptyMessage",
|
|
35016
|
+
locale: "locale, weekStartsOn",
|
|
35017
|
+
events: "ontaskclick(task, scheduled, event), ontaskdblclick(task, scheduled, event), onselectionchange(ids)",
|
|
35018
|
+
other: "toolbarActions (Snippet), class",
|
|
35019
|
+
editing: "editable (default false), onchange(change: GanttChange) \u2014 every edit, undo and redo with operations, moved dates and the full data afterwards. Feed change.tasks back as tasks to keep undo history; any other array replaces the data and clears it."
|
|
35020
|
+
},
|
|
35021
|
+
columns: "Built-in ids: wbs, name, start, finish, duration, progress, predecessors, slack, assignees (default ['name', 'start', 'finish', 'duration']). Custom: { id, header, width, align?, value?: ({ row, scheduled, formatDate, formatDuration, predecessors }) => string }",
|
|
35022
|
+
methods: {
|
|
35023
|
+
scrollToTask: "(id: string) => Promise<void>: expands ancestors, selects and focuses the row, scrolls its bar into view",
|
|
35024
|
+
scrollToDate: "(date, align?: 'start' | 'center') => Promise<void>",
|
|
35025
|
+
getModel: "() => GanttModel (undo/redo, previews, direct edits)",
|
|
35026
|
+
getSchedule: "() => ScheduleResult"
|
|
35027
|
+
},
|
|
35028
|
+
accessibility: "The task list is a treegrid with one tab stop: arrows, Home/End, Page Up/Down, Right/Left expand/collapse/parent, Enter activates (ontaskclick), Space selects, Shift extends, Ctrl/Cmd+A selects all, Escape clears. Rows are virtualised with aria-rowcount/aria-rowindex. The timeline is aria-hidden; a visually hidden summary describes the schedule.",
|
|
35029
|
+
example: `<script>
|
|
35030
|
+
import { Gantt } from '@classic-homes/gantt-svelte';
|
|
35031
|
+
|
|
35032
|
+
const tasks = [
|
|
35033
|
+
{ id: 'design', name: 'Design', start: '2026-03-02', duration: 3, progress: 100 },
|
|
35034
|
+
{ id: 'build', name: 'Build', duration: 5, progress: 20 },
|
|
35035
|
+
{ id: 'launch', name: 'Launch', duration: 0 },
|
|
35036
|
+
];
|
|
35037
|
+
const dependencies = [
|
|
35038
|
+
{ id: 'd1', from: 'design', to: 'build' },
|
|
35039
|
+
{ id: 'd2', from: 'build', to: 'launch' },
|
|
35040
|
+
];
|
|
35041
|
+
</script>
|
|
35042
|
+
|
|
35043
|
+
<Gantt {tasks} {dependencies} title="Launch plan" showCritical />`,
|
|
35044
|
+
status: "Svelte only. Editing covers drag move/resize/progress, drag-to-link, keyboard nudges and undo/redo; a task edit dialog and inline grid editing are planned, as is @classic-homes/gantt-react.",
|
|
35045
|
+
editing: {
|
|
35046
|
+
pointer: "Drag a bar to move it, its left/right edge to resize, the marker under it to set progress (5% steps); successors reschedule live while dragging (model.preview) and one undoable operation commits on release; Escape cancels. Drag from the dot at either end of a bar onto another bar to link them: the start/finish ends chosen give FS/SS/FF/SF; circular links are refused with a message.",
|
|
35047
|
+
keyboard: "On a focused row: Alt+Left/Right moves the task one snap unit, Alt+Shift+Left/Right changes its finish, Ctrl/Cmd+Z undoes, Ctrl/Cmd+Shift+Z or Ctrl+Y redoes. Every edit is announced in a polite live region.",
|
|
35048
|
+
rules: "Edits snap to the zoom preset's unit and skip non-working time. Summaries (derived from children) and tasks with readonly: true are not editable. Operations keep the data's shape (start+end stays start+end, date-only stays date-only); start constraints (SNET/MSO) move with the task.",
|
|
35049
|
+
toolbar: "Undo and Redo buttons appear when editable."
|
|
35050
|
+
}
|
|
35051
|
+
}
|
|
35052
|
+
};
|
|
35053
|
+
|
|
35054
|
+
// src/resources/gantt.ts
|
|
35055
|
+
var catalog5 = gantt_catalog_default;
|
|
35056
|
+
function registerGanttResources(server) {
|
|
35057
|
+
server.resource("Gantt Packages", "gantt://all", async (uri) => ({
|
|
35058
|
+
contents: [
|
|
35059
|
+
{
|
|
35060
|
+
uri: uri.href,
|
|
35061
|
+
mimeType: "application/json",
|
|
35062
|
+
text: JSON.stringify(catalog5, null, 2)
|
|
35063
|
+
}
|
|
35064
|
+
]
|
|
35065
|
+
}));
|
|
35066
|
+
server.resource("Gantt Types", "gantt://types", async (uri) => ({
|
|
35067
|
+
contents: [
|
|
35068
|
+
{
|
|
35069
|
+
uri: uri.href,
|
|
35070
|
+
mimeType: "application/json",
|
|
35071
|
+
text: JSON.stringify(
|
|
35072
|
+
{
|
|
35073
|
+
importPath: "@classic-homes/gantt-core/types",
|
|
35074
|
+
description: "Gantt data model types exported from @classic-homes/gantt-core",
|
|
35075
|
+
time: catalog5.time,
|
|
35076
|
+
types: catalog5.types
|
|
35077
|
+
},
|
|
35078
|
+
null,
|
|
35079
|
+
2
|
|
35080
|
+
)
|
|
35081
|
+
}
|
|
35082
|
+
]
|
|
35083
|
+
}));
|
|
35084
|
+
server.resource("Gantt Scheduling", "gantt://scheduling", async (uri) => ({
|
|
35085
|
+
contents: [
|
|
35086
|
+
{
|
|
35087
|
+
uri: uri.href,
|
|
35088
|
+
mimeType: "application/json",
|
|
35089
|
+
text: JSON.stringify(
|
|
35090
|
+
{
|
|
35091
|
+
description: "How scheduleProject resolves dates, the createGanttModel edit API and the Gantt component props",
|
|
35092
|
+
time: catalog5.time,
|
|
35093
|
+
scheduling: catalog5.scheduling,
|
|
35094
|
+
model: catalog5.model,
|
|
35095
|
+
component: catalog5.component
|
|
35096
|
+
},
|
|
35097
|
+
null,
|
|
35098
|
+
2
|
|
35099
|
+
)
|
|
35100
|
+
}
|
|
35101
|
+
]
|
|
35102
|
+
}));
|
|
35103
|
+
}
|
|
35104
|
+
|
|
33468
35105
|
// src/data/maps-catalog.json
|
|
33469
35106
|
var maps_catalog_default = {
|
|
33470
|
-
version: "0.
|
|
35107
|
+
version: "0.4.0",
|
|
33471
35108
|
packageName: "@classic-homes/maps-core",
|
|
33472
35109
|
description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
|
|
33473
35110
|
subpackages: {
|
|
@@ -38747,14 +40384,14 @@ import { Map, Source, CircleLayer } from '@classic-homes/maps-react';
|
|
|
38747
40384
|
};
|
|
38748
40385
|
|
|
38749
40386
|
// src/resources/maps.ts
|
|
38750
|
-
var
|
|
40387
|
+
var catalog6 = maps_catalog_default;
|
|
38751
40388
|
function registerMapsResources(server) {
|
|
38752
40389
|
server.resource("Maps Core Package", "maps://all", async (uri) => ({
|
|
38753
40390
|
contents: [
|
|
38754
40391
|
{
|
|
38755
40392
|
uri: uri.href,
|
|
38756
40393
|
mimeType: "application/json",
|
|
38757
|
-
text: JSON.stringify(
|
|
40394
|
+
text: JSON.stringify(catalog6, null, 2)
|
|
38758
40395
|
}
|
|
38759
40396
|
]
|
|
38760
40397
|
}));
|
|
@@ -38765,9 +40402,9 @@ function registerMapsResources(server) {
|
|
|
38765
40402
|
mimeType: "application/json",
|
|
38766
40403
|
text: JSON.stringify(
|
|
38767
40404
|
{
|
|
38768
|
-
importPath:
|
|
38769
|
-
description:
|
|
38770
|
-
functions:
|
|
40405
|
+
importPath: catalog6.subpackages.theme.importPath,
|
|
40406
|
+
description: catalog6.subpackages.theme.description,
|
|
40407
|
+
functions: catalog6.subpackages.main.modules?.theme.functions
|
|
38771
40408
|
},
|
|
38772
40409
|
null,
|
|
38773
40410
|
2
|
|
@@ -38782,11 +40419,11 @@ function registerMapsResources(server) {
|
|
|
38782
40419
|
mimeType: "application/json",
|
|
38783
40420
|
text: JSON.stringify(
|
|
38784
40421
|
{
|
|
38785
|
-
importPath:
|
|
40422
|
+
importPath: catalog6.subpackages.types.importPath,
|
|
38786
40423
|
description: "TypeScript types exported from @classic-homes/maps-core",
|
|
38787
|
-
props:
|
|
38788
|
-
data:
|
|
38789
|
-
events:
|
|
40424
|
+
props: catalog6.types.props,
|
|
40425
|
+
data: catalog6.types.data,
|
|
40426
|
+
events: catalog6.types.events
|
|
38790
40427
|
},
|
|
38791
40428
|
null,
|
|
38792
40429
|
2
|
|
@@ -38801,11 +40438,11 @@ function registerMapsResources(server) {
|
|
|
38801
40438
|
mimeType: "application/json",
|
|
38802
40439
|
text: JSON.stringify(
|
|
38803
40440
|
{
|
|
38804
|
-
importPath:
|
|
40441
|
+
importPath: catalog6.subpackages.main.importPath,
|
|
38805
40442
|
description: "Utility functions for formatting, accessibility, and styling",
|
|
38806
|
-
format:
|
|
38807
|
-
accessibility:
|
|
38808
|
-
styles:
|
|
40443
|
+
format: catalog6.subpackages.main.modules?.format,
|
|
40444
|
+
accessibility: catalog6.subpackages.main.modules?.accessibility,
|
|
40445
|
+
styles: catalog6.subpackages.main.modules?.styles
|
|
38809
40446
|
},
|
|
38810
40447
|
null,
|
|
38811
40448
|
2
|
|
@@ -38818,7 +40455,7 @@ function registerMapsResources(server) {
|
|
|
38818
40455
|
{
|
|
38819
40456
|
uri: uri.href,
|
|
38820
40457
|
mimeType: "application/json",
|
|
38821
|
-
text: JSON.stringify(
|
|
40458
|
+
text: JSON.stringify(catalog6.subpackages.route, null, 2)
|
|
38822
40459
|
}
|
|
38823
40460
|
]
|
|
38824
40461
|
}));
|
|
@@ -38827,7 +40464,7 @@ function registerMapsResources(server) {
|
|
|
38827
40464
|
{
|
|
38828
40465
|
uri: uri.href,
|
|
38829
40466
|
mimeType: "application/json",
|
|
38830
|
-
text: JSON.stringify(
|
|
40467
|
+
text: JSON.stringify(catalog6.subpackages.geocoding, null, 2)
|
|
38831
40468
|
}
|
|
38832
40469
|
]
|
|
38833
40470
|
}));
|
|
@@ -38836,7 +40473,7 @@ function registerMapsResources(server) {
|
|
|
38836
40473
|
{
|
|
38837
40474
|
uri: uri.href,
|
|
38838
40475
|
mimeType: "application/json",
|
|
38839
|
-
text: JSON.stringify(
|
|
40476
|
+
text: JSON.stringify(catalog6.components, null, 2)
|
|
38840
40477
|
}
|
|
38841
40478
|
]
|
|
38842
40479
|
}));
|
|
@@ -38850,30 +40487,30 @@ function registerMapsResources(server) {
|
|
|
38850
40487
|
## Installation
|
|
38851
40488
|
|
|
38852
40489
|
\`\`\`bash
|
|
38853
|
-
${
|
|
40490
|
+
${catalog6.quickReference.installation}
|
|
38854
40491
|
\`\`\`
|
|
38855
40492
|
|
|
38856
40493
|
## Basic Usage
|
|
38857
40494
|
|
|
38858
40495
|
\`\`\`typescript
|
|
38859
|
-
${
|
|
40496
|
+
${catalog6.quickReference.basicUsage}
|
|
38860
40497
|
\`\`\`
|
|
38861
40498
|
|
|
38862
40499
|
## Peer Dependency
|
|
38863
40500
|
|
|
38864
|
-
\`${
|
|
40501
|
+
\`${catalog6.quickReference.peerDependency}\`
|
|
38865
40502
|
|
|
38866
40503
|
## Optional Peer Dependencies (for Deck.gl)
|
|
38867
40504
|
|
|
38868
|
-
\`${
|
|
40505
|
+
\`${catalog6.quickReference.optionalPeerDependencies}\`
|
|
38869
40506
|
|
|
38870
40507
|
## Available Components
|
|
38871
40508
|
|
|
38872
40509
|
**React:** \`@classic-homes/maps-react\`
|
|
38873
|
-
- ${
|
|
40510
|
+
- ${catalog6.components.react.components.join(", ")}
|
|
38874
40511
|
|
|
38875
40512
|
**Svelte:** \`@classic-homes/maps-svelte\`
|
|
38876
|
-
- ${
|
|
40513
|
+
- ${catalog6.components.svelte.components.join(", ")}
|
|
38877
40514
|
|
|
38878
40515
|
## Theme Exports
|
|
38879
40516
|
|
|
@@ -38948,7 +40585,7 @@ ${catalog5.quickReference.basicUsage}
|
|
|
38948
40585
|
{
|
|
38949
40586
|
uri: uri.href,
|
|
38950
40587
|
mimeType: "application/json",
|
|
38951
|
-
text: JSON.stringify(
|
|
40588
|
+
text: JSON.stringify(catalog6.types.props, null, 2)
|
|
38952
40589
|
}
|
|
38953
40590
|
]
|
|
38954
40591
|
}));
|
|
@@ -38957,7 +40594,7 @@ ${catalog5.quickReference.basicUsage}
|
|
|
38957
40594
|
{
|
|
38958
40595
|
uri: uri.href,
|
|
38959
40596
|
mimeType: "application/json",
|
|
38960
|
-
text: JSON.stringify(
|
|
40597
|
+
text: JSON.stringify(catalog6.types.data, null, 2)
|
|
38961
40598
|
}
|
|
38962
40599
|
]
|
|
38963
40600
|
}));
|
|
@@ -38966,7 +40603,7 @@ ${catalog5.quickReference.basicUsage}
|
|
|
38966
40603
|
{
|
|
38967
40604
|
uri: uri.href,
|
|
38968
40605
|
mimeType: "application/json",
|
|
38969
|
-
text: JSON.stringify(
|
|
40606
|
+
text: JSON.stringify(catalog6.types.events, null, 2)
|
|
38970
40607
|
}
|
|
38971
40608
|
]
|
|
38972
40609
|
}));
|
|
@@ -38977,9 +40614,9 @@ ${catalog5.quickReference.basicUsage}
|
|
|
38977
40614
|
mimeType: "application/json",
|
|
38978
40615
|
text: JSON.stringify(
|
|
38979
40616
|
{
|
|
38980
|
-
package:
|
|
38981
|
-
hooks:
|
|
38982
|
-
context:
|
|
40617
|
+
package: catalog6.components.react.package,
|
|
40618
|
+
hooks: catalog6.components.react.hooks,
|
|
40619
|
+
context: catalog6.components.react.context
|
|
38983
40620
|
},
|
|
38984
40621
|
null,
|
|
38985
40622
|
2
|
|
@@ -38992,7 +40629,7 @@ ${catalog5.quickReference.basicUsage}
|
|
|
38992
40629
|
{
|
|
38993
40630
|
uri: uri.href,
|
|
38994
40631
|
mimeType: "application/json",
|
|
38995
|
-
text: JSON.stringify(
|
|
40632
|
+
text: JSON.stringify(catalog6.bestPractices, null, 2)
|
|
38996
40633
|
}
|
|
38997
40634
|
]
|
|
38998
40635
|
}));
|
|
@@ -39001,7 +40638,7 @@ ${catalog5.quickReference.basicUsage}
|
|
|
39001
40638
|
{
|
|
39002
40639
|
uri: uri.href,
|
|
39003
40640
|
mimeType: "application/json",
|
|
39004
|
-
text: JSON.stringify(
|
|
40641
|
+
text: JSON.stringify(catalog6.themeTypes, null, 2)
|
|
39005
40642
|
}
|
|
39006
40643
|
]
|
|
39007
40644
|
}));
|
|
@@ -39012,11 +40649,11 @@ ${catalog5.quickReference.basicUsage}
|
|
|
39012
40649
|
mimeType: "application/json",
|
|
39013
40650
|
text: JSON.stringify(
|
|
39014
40651
|
{
|
|
39015
|
-
description:
|
|
39016
|
-
types:
|
|
39017
|
-
utilities:
|
|
39018
|
-
cssImport:
|
|
39019
|
-
example:
|
|
40652
|
+
description: catalog6.types.overlayLayers?.description ?? "Overlay layer system for LayerManager",
|
|
40653
|
+
types: catalog6.types.overlayLayers?.types ?? [],
|
|
40654
|
+
utilities: catalog6.types.overlayLayers?.utilities ?? {},
|
|
40655
|
+
cssImport: catalog6.types.overlayLayers?.cssImport ?? "@import '@classic-homes/maps-core/styles/layer-manager.css';",
|
|
40656
|
+
example: catalog6.types.overlayLayers?.example ?? ""
|
|
39020
40657
|
},
|
|
39021
40658
|
null,
|
|
39022
40659
|
2
|
|
@@ -39033,24 +40670,24 @@ ${catalog5.quickReference.basicUsage}
|
|
|
39033
40670
|
|
|
39034
40671
|
## Key Differences
|
|
39035
40672
|
|
|
39036
|
-
${
|
|
40673
|
+
${catalog6.bestPractices?.mapboxMigration.differences?.map((d) => `- ${d}`).join("\n")}
|
|
39037
40674
|
|
|
39038
40675
|
## Example Migration
|
|
39039
40676
|
|
|
39040
40677
|
\`\`\`typescript
|
|
39041
|
-
${
|
|
40678
|
+
${catalog6.bestPractices?.mapboxMigration.exampleMigration}
|
|
39042
40679
|
\`\`\`
|
|
39043
40680
|
|
|
39044
40681
|
## CSS Setup
|
|
39045
40682
|
|
|
39046
40683
|
\`\`\`css
|
|
39047
|
-
${
|
|
40684
|
+
${catalog6.quickReference.cssImportOrder}
|
|
39048
40685
|
\`\`\`
|
|
39049
40686
|
|
|
39050
40687
|
## Tailwind Configuration
|
|
39051
40688
|
|
|
39052
40689
|
\`\`\`javascript
|
|
39053
|
-
${
|
|
40690
|
+
${catalog6.quickReference.tailwindConfig}
|
|
39054
40691
|
\`\`\`
|
|
39055
40692
|
`
|
|
39056
40693
|
}
|
|
@@ -39066,8 +40703,8 @@ ${catalog5.quickReference.tailwindConfig}
|
|
|
39066
40703
|
description: "Centralized positioning coordinator for map controls with collision detection, priority-based resolution, and automatic z-index management",
|
|
39067
40704
|
class: "PositioningCoordinator",
|
|
39068
40705
|
factory: "createPositioningCoordinator",
|
|
39069
|
-
module:
|
|
39070
|
-
types:
|
|
40706
|
+
module: catalog6.subpackages.main.modules?.positioning,
|
|
40707
|
+
types: catalog6.types.positioning,
|
|
39071
40708
|
hooks: {
|
|
39072
40709
|
react: {
|
|
39073
40710
|
name: "useControlPosition",
|
|
@@ -39093,7 +40730,7 @@ ${catalog5.quickReference.tailwindConfig}
|
|
|
39093
40730
|
|
|
39094
40731
|
// src/data/native-catalog.json
|
|
39095
40732
|
var native_catalog_default = {
|
|
39096
|
-
version: "0.
|
|
40733
|
+
version: "0.4.0",
|
|
39097
40734
|
packageName: "@classic-homes/native",
|
|
39098
40735
|
description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
|
|
39099
40736
|
subpackages: {
|
|
@@ -40590,14 +42227,14 @@ var native_catalog_default = {
|
|
|
40590
42227
|
};
|
|
40591
42228
|
|
|
40592
42229
|
// src/resources/native.ts
|
|
40593
|
-
var
|
|
42230
|
+
var catalog7 = native_catalog_default;
|
|
40594
42231
|
function registerNativeResources(server) {
|
|
40595
42232
|
server.resource("Native Package", "native://all", async (uri) => ({
|
|
40596
42233
|
contents: [
|
|
40597
42234
|
{
|
|
40598
42235
|
uri: uri.href,
|
|
40599
42236
|
mimeType: "application/json",
|
|
40600
|
-
text: JSON.stringify(
|
|
42237
|
+
text: JSON.stringify(catalog7, null, 2)
|
|
40601
42238
|
}
|
|
40602
42239
|
]
|
|
40603
42240
|
}));
|
|
@@ -40608,9 +42245,9 @@ function registerNativeResources(server) {
|
|
|
40608
42245
|
mimeType: "application/json",
|
|
40609
42246
|
text: JSON.stringify(
|
|
40610
42247
|
{
|
|
40611
|
-
importPath:
|
|
40612
|
-
description:
|
|
40613
|
-
hooks:
|
|
42248
|
+
importPath: catalog7.subpackages.react.importPath,
|
|
42249
|
+
description: catalog7.subpackages.react.description,
|
|
42250
|
+
hooks: catalog7.subpackages.react.hooks
|
|
40614
42251
|
},
|
|
40615
42252
|
null,
|
|
40616
42253
|
2
|
|
@@ -40625,10 +42262,10 @@ function registerNativeResources(server) {
|
|
|
40625
42262
|
mimeType: "application/json",
|
|
40626
42263
|
text: JSON.stringify(
|
|
40627
42264
|
{
|
|
40628
|
-
importPath:
|
|
40629
|
-
description:
|
|
40630
|
-
composables:
|
|
40631
|
-
functions:
|
|
42265
|
+
importPath: catalog7.subpackages.svelte.importPath,
|
|
42266
|
+
description: catalog7.subpackages.svelte.description,
|
|
42267
|
+
composables: catalog7.subpackages.svelte.composables,
|
|
42268
|
+
functions: catalog7.subpackages.svelte.functions
|
|
40632
42269
|
},
|
|
40633
42270
|
null,
|
|
40634
42271
|
2
|
|
@@ -40643,10 +42280,10 @@ function registerNativeResources(server) {
|
|
|
40643
42280
|
mimeType: "application/json",
|
|
40644
42281
|
text: JSON.stringify(
|
|
40645
42282
|
{
|
|
40646
|
-
importPath:
|
|
40647
|
-
description:
|
|
40648
|
-
functions:
|
|
40649
|
-
types:
|
|
42283
|
+
importPath: catalog7.subpackages.core.importPath,
|
|
42284
|
+
description: catalog7.subpackages.core.description,
|
|
42285
|
+
functions: catalog7.subpackages.core.functions,
|
|
42286
|
+
types: catalog7.subpackages.core.types
|
|
40650
42287
|
},
|
|
40651
42288
|
null,
|
|
40652
42289
|
2
|
|
@@ -40662,7 +42299,7 @@ function registerNativeResources(server) {
|
|
|
40662
42299
|
text: JSON.stringify(
|
|
40663
42300
|
{
|
|
40664
42301
|
description: "Native features with platform support and fallbacks",
|
|
40665
|
-
features:
|
|
42302
|
+
features: catalog7.features
|
|
40666
42303
|
},
|
|
40667
42304
|
null,
|
|
40668
42305
|
2
|
|
@@ -40675,7 +42312,7 @@ function registerNativeResources(server) {
|
|
|
40675
42312
|
{
|
|
40676
42313
|
uri: uri.href,
|
|
40677
42314
|
mimeType: "application/json",
|
|
40678
|
-
text: JSON.stringify(
|
|
42315
|
+
text: JSON.stringify(catalog7.types, null, 2)
|
|
40679
42316
|
}
|
|
40680
42317
|
]
|
|
40681
42318
|
}));
|
|
@@ -40689,40 +42326,40 @@ function registerNativeResources(server) {
|
|
|
40689
42326
|
## Installation
|
|
40690
42327
|
|
|
40691
42328
|
\`\`\`bash
|
|
40692
|
-
${
|
|
42329
|
+
${catalog7.quickReference.installation}
|
|
40693
42330
|
\`\`\`
|
|
40694
42331
|
|
|
40695
42332
|
## Peer Dependency
|
|
40696
42333
|
|
|
40697
|
-
\`${
|
|
42334
|
+
\`${catalog7.quickReference.peerDependency}\`
|
|
40698
42335
|
|
|
40699
42336
|
## Optional Plugins
|
|
40700
42337
|
|
|
40701
42338
|
Install only the Capacitor plugins you need:
|
|
40702
42339
|
|
|
40703
42340
|
\`\`\`bash
|
|
40704
|
-
${
|
|
42341
|
+
${catalog7.quickReference.optionalPlugins.map((p) => `npm install ${p}`).join("\n")}
|
|
40705
42342
|
\`\`\`
|
|
40706
42343
|
|
|
40707
42344
|
## Basic Usage
|
|
40708
42345
|
|
|
40709
42346
|
\`\`\`typescript
|
|
40710
|
-
${
|
|
42347
|
+
${catalog7.quickReference.basicUsage}
|
|
40711
42348
|
\`\`\`
|
|
40712
42349
|
|
|
40713
42350
|
## Features Matrix
|
|
40714
42351
|
|
|
40715
42352
|
| Feature | Hook | iOS | Android | Web Fallback |
|
|
40716
42353
|
|---------|------|-----|---------|--------------|
|
|
40717
|
-
${
|
|
42354
|
+
${catalog7.features.map((f) => `| ${f.name} | \`${f.hook}\` | ${f.ios} | ${f.android} | ${f.webFallback} |`).join("\n")}
|
|
40718
42355
|
|
|
40719
42356
|
## React Hooks
|
|
40720
42357
|
|
|
40721
|
-
${
|
|
42358
|
+
${catalog7.subpackages.react.hooks?.map((h) => `- \`${h.name}\` - ${h.description}`).join("\n")}
|
|
40722
42359
|
|
|
40723
42360
|
## Svelte Composables
|
|
40724
42361
|
|
|
40725
|
-
${
|
|
42362
|
+
${catalog7.subpackages.svelte.composables?.map((c) => `- \`${c.name}\` - ${c.description}`).join("\n")}
|
|
40726
42363
|
|
|
40727
42364
|
## Platform Detection
|
|
40728
42365
|
|
|
@@ -40806,14 +42443,15 @@ function registerResources(server) {
|
|
|
40806
42443
|
registerNotificationsResources(server);
|
|
40807
42444
|
registerDocsResources(server);
|
|
40808
42445
|
registerChartsResources(server);
|
|
42446
|
+
registerGanttResources(server);
|
|
40809
42447
|
registerMapsResources(server);
|
|
40810
42448
|
registerNativeResources(server);
|
|
40811
42449
|
}
|
|
40812
42450
|
|
|
40813
42451
|
// src/tools/searchComponents.ts
|
|
40814
42452
|
import { z } from "zod";
|
|
40815
|
-
var
|
|
40816
|
-
var categories = [...new Set(
|
|
42453
|
+
var catalog8 = component_catalog_default;
|
|
42454
|
+
var categories = [...new Set(catalog8.components.map((c) => c.category))].sort();
|
|
40817
42455
|
var SearchComponentsSchema = z.object({
|
|
40818
42456
|
query: z.string().describe("Search query (component name, description, or functionality)"),
|
|
40819
42457
|
category: z.enum(categories).optional().describe("Filter by component category"),
|
|
@@ -40829,7 +42467,7 @@ function registerSearchComponentsTool(server) {
|
|
|
40829
42467
|
const queryLower = query.toLowerCase().trim();
|
|
40830
42468
|
const isListAll = queryLower === "*" || queryLower === "all" || queryLower === "" || queryLower === "list" || queryLower === "list all";
|
|
40831
42469
|
const queryWords = queryLower.split(/\s+/).filter((word) => word.length > 0);
|
|
40832
|
-
const results =
|
|
42470
|
+
const results = catalog8.components.filter((component) => {
|
|
40833
42471
|
if (category && component.category !== category) {
|
|
40834
42472
|
return false;
|
|
40835
42473
|
}
|
|
@@ -40903,7 +42541,7 @@ var mapsComponents = new Set(
|
|
|
40903
42541
|
(name) => name.toLowerCase()
|
|
40904
42542
|
)
|
|
40905
42543
|
);
|
|
40906
|
-
function componentNotFound(
|
|
42544
|
+
function componentNotFound(catalog12, componentName) {
|
|
40907
42545
|
const query = componentName.trim().toLowerCase();
|
|
40908
42546
|
if (mapsComponents.has(query)) {
|
|
40909
42547
|
return {
|
|
@@ -40913,7 +42551,7 @@ function componentNotFound(catalog11, componentName) {
|
|
|
40913
42551
|
};
|
|
40914
42552
|
}
|
|
40915
42553
|
const prefix = query.slice(0, 3);
|
|
40916
|
-
const suggestions = prefix ?
|
|
42554
|
+
const suggestions = prefix ? catalog12.components.filter((c) => c.name.toLowerCase().includes(prefix)).slice(0, 5).map((c) => c.name) : [];
|
|
40917
42555
|
return {
|
|
40918
42556
|
maps: false,
|
|
40919
42557
|
message: `Component "${componentName}" not found`,
|
|
@@ -40923,7 +42561,7 @@ function componentNotFound(catalog11, componentName) {
|
|
|
40923
42561
|
}
|
|
40924
42562
|
|
|
40925
42563
|
// src/tools/getComponentProps.ts
|
|
40926
|
-
var
|
|
42564
|
+
var catalog9 = component_catalog_default;
|
|
40927
42565
|
var GetComponentPropsSchema = z2.object({
|
|
40928
42566
|
componentName: z2.string().trim().min(1).describe('Name of the component (e.g., "Button", "DashboardLayout")'),
|
|
40929
42567
|
includeExamples: z2.boolean().default(true).describe("Whether to include usage examples")
|
|
@@ -40935,11 +42573,11 @@ function registerGetComponentPropsTool(server) {
|
|
|
40935
42573
|
GetComponentPropsSchema.shape,
|
|
40936
42574
|
async (params) => {
|
|
40937
42575
|
const { componentName, includeExamples } = GetComponentPropsSchema.parse(params);
|
|
40938
|
-
const component =
|
|
42576
|
+
const component = catalog9.components.find(
|
|
40939
42577
|
(c) => c.name.toLowerCase() === componentName.toLowerCase()
|
|
40940
42578
|
);
|
|
40941
42579
|
if (!component) {
|
|
40942
|
-
const { message, suggestions, hint } = componentNotFound(
|
|
42580
|
+
const { message, suggestions, hint } = componentNotFound(catalog9, componentName);
|
|
40943
42581
|
return {
|
|
40944
42582
|
content: [
|
|
40945
42583
|
{
|
|
@@ -41060,7 +42698,7 @@ function registerSuggestPatternTool(server) {
|
|
|
41060
42698
|
|
|
41061
42699
|
// src/tools/validateUsage.ts
|
|
41062
42700
|
import { z as z4 } from "zod";
|
|
41063
|
-
var
|
|
42701
|
+
var catalog10 = component_catalog_default;
|
|
41064
42702
|
var ValidateUsageSchema = z4.object({
|
|
41065
42703
|
componentName: z4.string().trim().min(1).describe("Name of the component being used"),
|
|
41066
42704
|
props: z4.record(z4.unknown()).describe("Props being passed to the component"),
|
|
@@ -41085,11 +42723,11 @@ function registerValidateUsageTool(server) {
|
|
|
41085
42723
|
ValidateUsageSchema.shape,
|
|
41086
42724
|
async (params) => {
|
|
41087
42725
|
const { componentName, props, context } = ValidateUsageSchema.parse(params);
|
|
41088
|
-
const component =
|
|
42726
|
+
const component = catalog10.components.find(
|
|
41089
42727
|
(c) => c.name.toLowerCase() === componentName.toLowerCase()
|
|
41090
42728
|
);
|
|
41091
42729
|
if (!component) {
|
|
41092
|
-
const { maps, message, suggestions: suggestions2, hint } = componentNotFound(
|
|
42730
|
+
const { maps, message, suggestions: suggestions2, hint } = componentNotFound(catalog10, componentName);
|
|
41093
42731
|
return {
|
|
41094
42732
|
content: [
|
|
41095
42733
|
{
|
|
@@ -41407,7 +43045,7 @@ Example for ${pageType}Layout:
|
|
|
41407
43045
|
|
|
41408
43046
|
// src/prompts/componentUsage.ts
|
|
41409
43047
|
import { z as z7 } from "zod";
|
|
41410
|
-
var
|
|
43048
|
+
var catalog11 = component_catalog_default;
|
|
41411
43049
|
var ComponentUsageSchema = z7.object({
|
|
41412
43050
|
componentName: z7.string().describe("Name of the component (e.g., Button, Card, Select)"),
|
|
41413
43051
|
variant: z7.string().optional().describe("Desired variant (optional)"),
|
|
@@ -41423,7 +43061,7 @@ function registerComponentUsagePrompt(server) {
|
|
|
41423
43061
|
const componentName = parsed.componentName || "Button";
|
|
41424
43062
|
const variant = parsed.variant || "";
|
|
41425
43063
|
const useCase = parsed.useCase || "";
|
|
41426
|
-
const component =
|
|
43064
|
+
const component = catalog11.components.find(
|
|
41427
43065
|
(c) => c.name.toLowerCase() === componentName.toLowerCase()
|
|
41428
43066
|
);
|
|
41429
43067
|
let componentInfo = "";
|
|
@@ -41445,7 +43083,7 @@ ${component.examples.map((e) => `### ${e.title}
|
|
|
41445
43083
|
${e.code}
|
|
41446
43084
|
\`\`\``).join("\n\n")}`;
|
|
41447
43085
|
} else {
|
|
41448
|
-
componentInfo = `Component "${componentName}" not found in catalog. Available components: ${
|
|
43086
|
+
componentInfo = `Component "${componentName}" not found in catalog. Available components: ${catalog11.components.map((c) => c.name).join(", ")}`;
|
|
41449
43087
|
}
|
|
41450
43088
|
return {
|
|
41451
43089
|
messages: [
|
|
@@ -41483,7 +43121,7 @@ function registerPrompts(server) {
|
|
|
41483
43121
|
// package.json
|
|
41484
43122
|
var package_default = {
|
|
41485
43123
|
name: "@classic-homes/theme-mcp",
|
|
41486
|
-
version: "0.
|
|
43124
|
+
version: "0.4.0",
|
|
41487
43125
|
description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
|
|
41488
43126
|
type: "module",
|
|
41489
43127
|
main: "dist/index.js",
|
|
@@ -41582,4 +43220,4 @@ function createServer() {
|
|
|
41582
43220
|
export {
|
|
41583
43221
|
createServer
|
|
41584
43222
|
};
|
|
41585
|
-
//# sourceMappingURL=chunk-
|
|
43223
|
+
//# sourceMappingURL=chunk-27MBCE7P.js.map
|