@classic-homes/theme-mcp 0.3.9 → 0.5.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.
@@ -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.3.9",
9
+ version: "0.5.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 back arrow linking here"
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; the aria-label becomes "Back to {backLabel}"'
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 after the back button, e.g. a thumbnail"
79
+ description: "Leading visual beside the title, e.g. a thumbnail"
80
80
  },
81
81
  {
82
82
  name: "titleSuffix",
@@ -467,6 +467,12 @@ var component_catalog_default = {
467
467
  required: false,
468
468
  description: "Cancel callback"
469
469
  },
470
+ {
471
+ name: "onCloseAutoFocus",
472
+ type: "(event: Event) => void",
473
+ required: false,
474
+ description: "Before focus returns on close; `preventDefault()` keeps focus where you put it (e.g. when the confirmed action removed the focused element)"
475
+ },
470
476
  {
471
477
  name: "class",
472
478
  type: "string",
@@ -583,6 +589,126 @@ var component_catalog_default = {
583
589
  "AlertDescription"
584
590
  ]
585
591
  },
592
+ {
593
+ name: "AppLauncher",
594
+ description: 'Header "apps" grid - a button opening a panel of tiles that link to other systems',
595
+ category: "core",
596
+ importPath: "@classic-homes/theme-svelte",
597
+ props: [
598
+ {
599
+ name: "apps",
600
+ type: "AppLauncherItem[]",
601
+ required: true,
602
+ description: "Tiles: `{ id, label, href, icon?, external?, description? }`"
603
+ },
604
+ {
605
+ name: "title",
606
+ type: "string",
607
+ required: false,
608
+ description: "Heading at the top of the panel"
609
+ },
610
+ {
611
+ name: "triggerLabel",
612
+ type: "string",
613
+ default: '"Apps"',
614
+ required: false,
615
+ description: "Accessible name of the button and panel"
616
+ },
617
+ {
618
+ name: "columns",
619
+ type: "number",
620
+ default: "3",
621
+ required: false,
622
+ description: "Tiles per row"
623
+ },
624
+ {
625
+ name: "align",
626
+ type: "'start' | 'center' | 'end'",
627
+ default: "'end'",
628
+ required: false,
629
+ description: "Panel alignment against the button"
630
+ },
631
+ {
632
+ name: "open",
633
+ type: "boolean",
634
+ default: "false",
635
+ required: false,
636
+ description: "Panel open (bindable)"
637
+ },
638
+ {
639
+ name: "onOpenChange",
640
+ type: "(open: boolean) => void",
641
+ required: false,
642
+ description: "Called when the panel opens or closes"
643
+ },
644
+ {
645
+ name: "icon",
646
+ type: "Snippet<[AppLauncherItem]>",
647
+ required: false,
648
+ description: "Draws a tile's icon"
649
+ },
650
+ {
651
+ name: "class",
652
+ type: "string",
653
+ required: false,
654
+ description: "Classes for the panel"
655
+ },
656
+ {
657
+ name: "triggerClass",
658
+ type: "string",
659
+ required: false,
660
+ description: "Classes for the button"
661
+ }
662
+ ],
663
+ variants: [
664
+ {
665
+ name: "align",
666
+ values: [
667
+ "start",
668
+ "center",
669
+ "end"
670
+ ],
671
+ default: "end"
672
+ }
673
+ ],
674
+ slots: [
675
+ {
676
+ name: "children",
677
+ description: "Main content",
678
+ required: false
679
+ }
680
+ ],
681
+ events: [],
682
+ examples: [
683
+ {
684
+ title: "Basic Usage",
685
+ code: `<script>
686
+ import { AppLauncher } from '@classic-homes/theme-svelte';
687
+
688
+ const apps = [
689
+ { id: 'reports', label: 'Reports', href: '/reports', icon: 'bar-chart-2' },
690
+ {
691
+ id: 'docs',
692
+ label: 'Documentation',
693
+ href: 'https://docs.example.com',
694
+ icon: 'book-open',
695
+ external: true,
696
+ },
697
+ {
698
+ id: 'vault',
699
+ label: 'Passwords',
700
+ href: 'https://vault.example.com',
701
+ icon: 'key',
702
+ external: true,
703
+ },
704
+ ];
705
+ </script>
706
+
707
+ <AppLauncher {apps} title="Classic Homes apps" />`
708
+ }
709
+ ],
710
+ relatedComponents: []
711
+ },
586
712
  {
587
713
  name: "AppShell",
588
714
  description: "Base wrapper component for applications with accessibility features",
@@ -1548,6 +1674,57 @@ var component_catalog_default = {
1548
1674
  "AvatarFallback"
1549
1675
  ]
1550
1676
  },
1677
+ {
1678
+ name: "BackButton",
1679
+ description: 'Labelled "\u2190 Back to \u2026" link or button for returning to the previous list or view',
1680
+ category: "core",
1681
+ importPath: "@classic-homes/theme-svelte",
1682
+ props: [
1683
+ {
1684
+ name: "href",
1685
+ type: "string",
1686
+ required: false,
1687
+ description: "Destination; renders an `<a>`"
1688
+ },
1689
+ {
1690
+ name: "onclick",
1691
+ type: "(event: MouseEvent) => void",
1692
+ required: false,
1693
+ description: "Click handler; renders a `<button>` when there's no `href`"
1694
+ },
1695
+ {
1696
+ name: "label",
1697
+ type: "string",
1698
+ required: false,
1699
+ description: 'What Back returns to: `"signs"` \u2192 "Back to signs"'
1700
+ },
1701
+ {
1702
+ name: "class",
1703
+ type: "string",
1704
+ required: false,
1705
+ description: "Additional classes"
1706
+ }
1707
+ ],
1708
+ variants: [],
1709
+ slots: [
1710
+ {
1711
+ name: "children",
1712
+ description: "Main content",
1713
+ required: false
1714
+ }
1715
+ ],
1716
+ events: [],
1717
+ examples: [
1718
+ {
1719
+ title: "Basic Usage",
1720
+ 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="/" />'
1721
+ }
1722
+ ],
1723
+ relatedComponents: [
1724
+ "ActionHeader",
1725
+ "Header"
1726
+ ]
1727
+ },
1551
1728
  {
1552
1729
  name: "Badge",
1553
1730
  description: "Small label component for status indicators and categorization",
@@ -1739,6 +1916,13 @@ var component_catalog_default = {
1739
1916
  required: false,
1740
1917
  description: "Show value labels on bars"
1741
1918
  },
1919
+ {
1920
+ name: "showTotal",
1921
+ type: "boolean",
1922
+ default: "false",
1923
+ required: false,
1924
+ description: "Label each stack's total at the end of the bar, formatted with `valueFormat`; percent stacks show the raw total"
1925
+ },
1742
1926
  {
1743
1927
  name: "rowHeight",
1744
1928
  type: "number",
@@ -2743,6 +2927,113 @@ var component_catalog_default = {
2743
2927
  "Dialog"
2744
2928
  ]
2745
2929
  },
2930
+ {
2931
+ name: "CadViewer",
2932
+ description: "DXF drawings rendered with WebGL, with layers, pan and zoom, cursor coordinates and light or dark backgrounds",
2933
+ category: "viewer",
2934
+ importPath: "@classic-homes/viewer-svelte/cad",
2935
+ props: [
2936
+ {
2937
+ name: "source",
2938
+ type: "LoadedSource",
2939
+ required: true,
2940
+ description: "Loaded bytes plus name and MIME hints"
2941
+ },
2942
+ {
2943
+ name: "kind",
2944
+ type: "RenderableKind",
2945
+ required: true,
2946
+ description: "`'dxf'`"
2947
+ },
2948
+ {
2949
+ name: "background",
2950
+ type: "'theme' | 'dark' | 'light'",
2951
+ default: "'theme'",
2952
+ required: false,
2953
+ description: "Canvas background; `theme` follows the app's background and dark mode"
2954
+ },
2955
+ {
2956
+ name: "showLayers",
2957
+ type: "boolean",
2958
+ default: "false",
2959
+ required: false,
2960
+ description: "Open the layer panel on load"
2961
+ },
2962
+ {
2963
+ name: "fonts",
2964
+ type: "string[]",
2965
+ required: false,
2966
+ description: "Font URLs for this viewer, instead of the ones from `configureCad`"
2967
+ },
2968
+ {
2969
+ name: "downloadSource",
2970
+ type: "{ bytes: Uint8Array; name?: string; mime?: string }",
2971
+ required: false,
2972
+ description: "What Download saves, when `source` was derived from another file"
2973
+ },
2974
+ {
2975
+ name: "notice",
2976
+ type: "string",
2977
+ required: false,
2978
+ description: "Note under the toolbar, e.g. what a conversion could not show"
2979
+ },
2980
+ {
2981
+ name: "hideToolbar",
2982
+ type: "boolean",
2983
+ default: "false",
2984
+ required: false,
2985
+ description: "Hide the toolbar"
2986
+ },
2987
+ {
2988
+ name: "onready",
2989
+ type: "() => void",
2990
+ required: false,
2991
+ description: "The drawing is on screen"
2992
+ },
2993
+ {
2994
+ name: "onerror",
2995
+ type: "(error: ViewerError) => void",
2996
+ required: false,
2997
+ description: "The drawing could not be read, or WebGL is unavailable"
2998
+ },
2999
+ {
3000
+ name: "class",
3001
+ type: "string",
3002
+ required: false,
3003
+ description: "Classes for the outer element"
3004
+ }
3005
+ ],
3006
+ variants: [
3007
+ {
3008
+ name: "background",
3009
+ values: [
3010
+ "theme",
3011
+ "dark",
3012
+ "light"
3013
+ ],
3014
+ default: "theme"
3015
+ }
3016
+ ],
3017
+ slots: [],
3018
+ events: [],
3019
+ examples: [
3020
+ {
3021
+ title: "Basic Usage",
3022
+ code: `<script lang="ts">
3023
+ import { loadSource } from '@classic-homes/viewer-svelte';
3024
+ import { CadViewer } from '@classic-homes/viewer-svelte/cad';
3025
+ </script>
3026
+
3027
+ {#await loadSource('/plans/lot-14-site-plan.dxf') then source}
3028
+ <CadViewer {source} kind="dxf" background="dark" showLayers class="h-[80vh]" />
3029
+ {/await}`
3030
+ }
3031
+ ],
3032
+ relatedComponents: [
3033
+ "DwgViewer",
3034
+ "DocumentViewer"
3035
+ ]
3036
+ },
2746
3037
  {
2747
3038
  name: "CandlestickChart",
2748
3039
  description: "Financial OHLC data with volume bars",
@@ -3944,7 +4235,10 @@ var component_catalog_default = {
3944
4235
  <LineChart title="Revenue" {data} renderLegend={legend} legend={{ position: 'right' }} />`
3945
4236
  }
3946
4237
  ],
3947
- relatedComponents: []
4238
+ relatedComponents: [
4239
+ "ChartContainer",
4240
+ "LineChart"
4241
+ ]
3948
4242
  },
3949
4243
  {
3950
4244
  name: "ChartSkeleton",
@@ -4329,6 +4623,12 @@ var component_catalog_default = {
4329
4623
  required: false,
4330
4624
  description: "Message when no options match"
4331
4625
  },
4626
+ {
4627
+ name: "maxResults",
4628
+ type: "number",
4629
+ required: false,
4630
+ description: "Render at most this many matches, with a note to type to narrow the rest. Filtering still searches every option"
4631
+ },
4332
4632
  {
4333
4633
  name: "disabled",
4334
4634
  type: "boolean",
@@ -4811,6 +5111,91 @@ var component_catalog_default = {
4811
5111
  "AreaChart"
4812
5112
  ]
4813
5113
  },
5114
+ {
5115
+ name: "ContextMenu",
5116
+ description: "Right-click (or long-press) menu for an area, with the same items as DropdownMenu",
5117
+ category: "core",
5118
+ importPath: "@classic-homes/theme-svelte",
5119
+ props: [
5120
+ {
5121
+ name: "items",
5122
+ type: "(DropdownMenuItem | DropdownMenuGroup)[]",
5123
+ required: true,
5124
+ description: "Menu items, the same shape as DropdownMenu's"
5125
+ },
5126
+ {
5127
+ name: "children",
5128
+ type: "Snippet",
5129
+ required: true,
5130
+ description: "The area that opens the menu on right-click (or long-press)"
5131
+ },
5132
+ {
5133
+ name: "open",
5134
+ type: "boolean",
5135
+ default: "false",
5136
+ required: false,
5137
+ description: "Whether the menu is open (bindable)"
5138
+ },
5139
+ {
5140
+ name: "onOpenChange",
5141
+ type: "(open: boolean) => void",
5142
+ required: false,
5143
+ description: "Called when the menu opens or closes"
5144
+ },
5145
+ {
5146
+ name: "disabled",
5147
+ type: "boolean",
5148
+ default: "false",
5149
+ required: false,
5150
+ description: "Leave the browser's own menu in place"
5151
+ },
5152
+ {
5153
+ name: "triggerClass",
5154
+ type: "string",
5155
+ required: false,
5156
+ description: "Classes for the trigger area"
5157
+ },
5158
+ {
5159
+ name: "class",
5160
+ type: "string",
5161
+ required: false,
5162
+ description: "Classes for the menu"
5163
+ },
5164
+ {
5165
+ name: "onCloseAutoFocus",
5166
+ type: "(event: Event) => void",
5167
+ required: false,
5168
+ description: "As the menu closes; `preventDefault()` keeps focus where a chosen item put it (e.g. in a dialog it opened)"
5169
+ }
5170
+ ],
5171
+ variants: [],
5172
+ slots: [
5173
+ {
5174
+ name: "children",
5175
+ description: "Main content",
5176
+ required: false
5177
+ }
5178
+ ],
5179
+ events: [],
5180
+ examples: [
5181
+ {
5182
+ title: "Basic Usage",
5183
+ code: `<script>
5184
+ const items = [
5185
+ { label: 'Rename', icon: 'edit', shortcut: 'F2', onSelect: rename },
5186
+ { label: 'Duplicate', onSelect: duplicate },
5187
+ { type: 'separator' },
5188
+ { label: 'Delete', icon: 'trash', destructive: true, onSelect: remove },
5189
+ ];
5190
+ </script>
5191
+
5192
+ <ContextMenu {items} triggerClass="block rounded-md border border-dashed p-8">
5193
+ Right-click here
5194
+ </ContextMenu>`
5195
+ }
5196
+ ],
5197
+ relatedComponents: []
5198
+ },
4814
5199
  {
4815
5200
  name: "DashboardLayout",
4816
5201
  description: "Complete dashboard layout with responsive sidebar and header",
@@ -7113,6 +7498,18 @@ var component_catalog_default = {
7113
7498
  type: "(event: Event) => void",
7114
7499
  required: false,
7115
7500
  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)."
7501
+ },
7502
+ {
7503
+ name: "onOpenAutoFocus",
7504
+ type: "(event: Event) => void",
7505
+ required: false,
7506
+ description: "Called as the dialog opens, before focus moves to its first focusable element (often the close button); `preventDefault()` and focus a field yourself to start there."
7507
+ },
7508
+ {
7509
+ name: "dirty",
7510
+ type: "boolean",
7511
+ required: false,
7512
+ 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
7513
  }
7117
7514
  ],
7118
7515
  variants: [
@@ -7165,6 +7562,187 @@ var component_catalog_default = {
7165
7562
  "DropdownMenu"
7166
7563
  ]
7167
7564
  },
7565
+ {
7566
+ name: "DocumentViewer",
7567
+ description: "Show PDF, Word, Excel, CSV and CAD files in the browser, with format detection and lazy-loaded viewers",
7568
+ category: "viewer",
7569
+ importPath: "@classic-homes/viewer-svelte",
7570
+ props: [
7571
+ {
7572
+ name: "source",
7573
+ type: "ViewerSource",
7574
+ required: false,
7575
+ description: "File, Blob, URL, bytes or offline-core stored file. Changing it loads the new one"
7576
+ },
7577
+ {
7578
+ name: "viewers",
7579
+ type: "ViewerRegistry",
7580
+ required: true,
7581
+ description: "Viewers to use, as lazy imports keyed by format"
7582
+ },
7583
+ {
7584
+ name: "name",
7585
+ type: "string",
7586
+ required: false,
7587
+ description: "File name hint (extension fallback, download name) when the source has none"
7588
+ },
7589
+ {
7590
+ name: "mime",
7591
+ type: "string",
7592
+ required: false,
7593
+ description: "MIME type hint when the source has none"
7594
+ },
7595
+ {
7596
+ name: "maxBytes",
7597
+ type: "number",
7598
+ default: "104857600",
7599
+ required: false,
7600
+ description: 'Size cap in bytes (100 MB); larger files get a "too large" state'
7601
+ },
7602
+ {
7603
+ name: "fetchInit",
7604
+ type: "RequestInit",
7605
+ required: false,
7606
+ description: "`fetch` options for URL sources (credentials, auth headers)"
7607
+ },
7608
+ {
7609
+ name: "allowDownload",
7610
+ type: "boolean",
7611
+ default: "true",
7612
+ required: false,
7613
+ description: 'Offer "Download file" when a file cannot be shown'
7614
+ },
7615
+ {
7616
+ name: "hideToolbar",
7617
+ type: "boolean",
7618
+ default: "false",
7619
+ required: false,
7620
+ description: "Hide the viewer toolbar"
7621
+ },
7622
+ {
7623
+ name: "onload",
7624
+ type: "(info: DocumentLoadInfo) => void",
7625
+ required: false,
7626
+ description: "The document is on screen: `{ kind, name, size }`"
7627
+ },
7628
+ {
7629
+ name: "onerror",
7630
+ type: "(error: ViewerError) => void",
7631
+ required: false,
7632
+ description: "Loading or rendering failed"
7633
+ },
7634
+ {
7635
+ name: "class",
7636
+ type: "string",
7637
+ required: false,
7638
+ description: "Classes for the outer element; give it a height"
7639
+ }
7640
+ ],
7641
+ variants: [],
7642
+ slots: [],
7643
+ events: [],
7644
+ examples: [
7645
+ {
7646
+ title: "Basic Usage",
7647
+ code: `<script lang="ts">
7648
+ import { DocumentViewer, acceptFor, type ViewerRegistry } from '@classic-homes/viewer-svelte';
7649
+
7650
+ // Each entry is a lazy import: formats you leave out are never bundled
7651
+ const viewers: ViewerRegistry = {
7652
+ pdf: () => import('@classic-homes/viewer-svelte/pdf'),
7653
+ docx: () => import('@classic-homes/viewer-svelte/docx'),
7654
+ xlsx: () => import('@classic-homes/viewer-svelte/xlsx'),
7655
+ csv: () => import('@classic-homes/viewer-svelte/xlsx'),
7656
+ dxf: () => import('@classic-homes/viewer-svelte/cad'),
7657
+ };
7658
+
7659
+ let file = $state<File>();
7660
+ </script>
7661
+
7662
+ <input type="file" accept={acceptFor()} onchange={(e) => (file = e.currentTarget.files?.[0])} />
7663
+ <DocumentViewer source={file} {viewers} class="h-[80vh]" />`
7664
+ }
7665
+ ],
7666
+ relatedComponents: [
7667
+ "PdfViewer",
7668
+ "SpreadsheetViewer",
7669
+ "DocxViewer",
7670
+ "CadViewer",
7671
+ "DwgViewer"
7672
+ ]
7673
+ },
7674
+ {
7675
+ name: "DocxViewer",
7676
+ description: "Word documents laid out as pages with docx-preview, isolated in a shadow root and sanitised",
7677
+ category: "viewer",
7678
+ importPath: "@classic-homes/viewer-svelte/docx",
7679
+ props: [
7680
+ {
7681
+ name: "source",
7682
+ type: "LoadedSource",
7683
+ required: true,
7684
+ description: "Loaded bytes plus name and MIME hints"
7685
+ },
7686
+ {
7687
+ name: "kind",
7688
+ type: "RenderableKind",
7689
+ required: true,
7690
+ description: "`'docx'`"
7691
+ },
7692
+ {
7693
+ name: "initialZoom",
7694
+ type: "ZoomMode",
7695
+ default: "'fit-width'",
7696
+ required: false,
7697
+ description: "`'fit-width'` (never above 100%), `'fit-page'` or a scale"
7698
+ },
7699
+ {
7700
+ name: "hideToolbar",
7701
+ type: "boolean",
7702
+ default: "false",
7703
+ required: false,
7704
+ description: "Hide the toolbar"
7705
+ },
7706
+ {
7707
+ name: "onready",
7708
+ type: "() => void",
7709
+ required: false,
7710
+ description: "The document is on screen"
7711
+ },
7712
+ {
7713
+ name: "onerror",
7714
+ type: "(error: ViewerError) => void",
7715
+ required: false,
7716
+ description: "The document could not be read"
7717
+ },
7718
+ {
7719
+ name: "class",
7720
+ type: "string",
7721
+ required: false,
7722
+ description: "Classes for the outer element"
7723
+ }
7724
+ ],
7725
+ variants: [],
7726
+ slots: [],
7727
+ events: [],
7728
+ examples: [
7729
+ {
7730
+ title: "Basic Usage",
7731
+ code: `<script lang="ts">
7732
+ import { loadSource } from '@classic-homes/viewer-svelte';
7733
+ import { DocxViewer } from '@classic-homes/viewer-svelte/docx';
7734
+ </script>
7735
+
7736
+ {#await loadSource('/specs/lot-12.docx') then source}
7737
+ <DocxViewer {source} kind="docx" class="h-[80vh]" />
7738
+ {/await}`
7739
+ }
7740
+ ],
7741
+ relatedComponents: [
7742
+ "DocumentViewer",
7743
+ "PdfViewer"
7744
+ ]
7745
+ },
7168
7746
  {
7169
7747
  name: "DonutChart",
7170
7748
  description: "Pie chart variant with center labels for key metrics",
@@ -8006,6 +8584,89 @@ var component_catalog_default = {
8006
8584
  "Tooltip"
8007
8585
  ]
8008
8586
  },
8587
+ {
8588
+ name: "DwgViewer",
8589
+ description: "AutoCAD DWG drawings converted to DXF in the browser with LibreDWG (WebAssembly), then shown in the CAD viewer",
8590
+ category: "viewer",
8591
+ importPath: "@classic-homes/viewer-dwg/svelte",
8592
+ props: [
8593
+ {
8594
+ name: "source",
8595
+ type: "LoadedSource",
8596
+ required: true,
8597
+ description: "Loaded DWG bytes plus name and MIME hints"
8598
+ },
8599
+ {
8600
+ name: "kind",
8601
+ type: "RenderableKind",
8602
+ required: true,
8603
+ description: "`'dwg'`"
8604
+ },
8605
+ {
8606
+ name: "background",
8607
+ type: "'theme' | 'dark' | 'light'",
8608
+ default: "'theme'",
8609
+ required: false,
8610
+ description: "Canvas background"
8611
+ },
8612
+ {
8613
+ name: "showLayers",
8614
+ type: "boolean",
8615
+ default: "false",
8616
+ required: false,
8617
+ description: "Open the layer panel on load"
8618
+ },
8619
+ {
8620
+ name: "fonts",
8621
+ type: "string[]",
8622
+ required: false,
8623
+ description: "Font URLs, instead of the ones from `configureCad`"
8624
+ },
8625
+ {
8626
+ name: "hideToolbar",
8627
+ type: "boolean",
8628
+ default: "false",
8629
+ required: false,
8630
+ description: "Hide the toolbar"
8631
+ },
8632
+ {
8633
+ name: "onready",
8634
+ type: "() => void",
8635
+ required: false,
8636
+ description: "The converted drawing is on screen"
8637
+ },
8638
+ {
8639
+ name: "onerror",
8640
+ type: "(error: ViewerError) => void",
8641
+ required: false,
8642
+ description: "Conversion or rendering failed"
8643
+ },
8644
+ {
8645
+ name: "class",
8646
+ type: "string",
8647
+ required: false,
8648
+ description: "Classes for the outer element"
8649
+ }
8650
+ ],
8651
+ variants: [
8652
+ {
8653
+ name: "background",
8654
+ values: [
8655
+ "theme",
8656
+ "dark",
8657
+ "light"
8658
+ ],
8659
+ default: "theme"
8660
+ }
8661
+ ],
8662
+ slots: [],
8663
+ events: [],
8664
+ examples: [],
8665
+ relatedComponents: [
8666
+ "CadViewer",
8667
+ "DocumentViewer"
8668
+ ]
8669
+ },
8009
8670
  {
8010
8671
  name: "ErrorLayout",
8011
8672
  description: "Layout for error pages with status codes and messaging",
@@ -9428,6 +10089,284 @@ var component_catalog_default = {
9428
10089
  "SankeyChart"
9429
10090
  ]
9430
10091
  },
10092
+ {
10093
+ name: "Gantt",
10094
+ description: "Project schedules with a task tree, timeline, dependencies, working calendars and the critical path",
10095
+ category: "chart",
10096
+ importPath: "@classic-homes/gantt-svelte",
10097
+ props: [
10098
+ {
10099
+ name: "tasks",
10100
+ type: "GanttTask[]",
10101
+ required: true,
10102
+ description: "Tasks in display order"
10103
+ },
10104
+ {
10105
+ name: "dependencies",
10106
+ type: "GanttDependency[]",
10107
+ required: false,
10108
+ description: "Links between tasks"
10109
+ },
10110
+ {
10111
+ name: "calendars",
10112
+ type: "GanttCalendar[]",
10113
+ required: false,
10114
+ description: "Working calendars; the first is the project calendar"
10115
+ },
10116
+ {
10117
+ name: "scheduleOptions",
10118
+ type: "ScheduleOptions",
10119
+ required: false,
10120
+ description: "`projectStart`, `projectFinish`, `calendarId`, `mode`, `minutesPerDay`, `respectTaskStart`"
10121
+ },
10122
+ {
10123
+ name: "title",
10124
+ type: "string",
10125
+ default: "'Project schedule'",
10126
+ required: false,
10127
+ description: "Accessible name of the task list"
10128
+ },
10129
+ {
10130
+ name: "zoom",
10131
+ type: "'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'",
10132
+ default: "'week'",
10133
+ required: false,
10134
+ description: "Timeline zoom (bindable)"
10135
+ },
10136
+ {
10137
+ name: "zoomLevels",
10138
+ type: "ZoomLevel[]",
10139
+ default: "['day', 'week', 'month', 'quarter']",
10140
+ required: false,
10141
+ description: "Zoom levels offered in the toolbar"
10142
+ },
10143
+ {
10144
+ name: "columns",
10145
+ type: "Array<GanttColumnId | GanttColumn>",
10146
+ default: "['name', 'start', 'finish', 'duration']",
10147
+ required: false,
10148
+ description: "Built-in ids (`wbs`, `name`, `start`, `finish`, `duration`, `progress`, `predecessors`, `slack`, `assignees`) or custom columns"
10149
+ },
10150
+ {
10151
+ name: "gridWidth",
10152
+ type: "number",
10153
+ default: "420",
10154
+ required: false,
10155
+ description: "Task list width in px (bindable; users can drag the divider)"
10156
+ },
10157
+ {
10158
+ name: "columnWidths",
10159
+ type: "Record<string, number>",
10160
+ default: "{}",
10161
+ required: false,
10162
+ description: "Column width overrides by column id (bindable). Dragging a column edge records it here"
10163
+ },
10164
+ {
10165
+ name: "resizableColumns",
10166
+ type: "boolean",
10167
+ default: "true",
10168
+ required: false,
10169
+ description: "Drag handles on column headers; each is also a focusable separator (Left/Right, Shift for bigger steps)"
10170
+ },
10171
+ {
10172
+ name: "rowHeight",
10173
+ type: "number",
10174
+ default: "36",
10175
+ required: false,
10176
+ description: "Row height in px"
10177
+ },
10178
+ {
10179
+ name: "height",
10180
+ type: "number | string",
10181
+ default: "520",
10182
+ required: false,
10183
+ description: "Overall height"
10184
+ },
10185
+ {
10186
+ name: "collapsed",
10187
+ type: "string[]",
10188
+ required: false,
10189
+ description: "Summaries collapsed on first render"
10190
+ },
10191
+ {
10192
+ name: "showToolbar",
10193
+ type: "boolean",
10194
+ default: "true",
10195
+ required: false,
10196
+ description: "Zoom, today, expand/collapse, critical path, baseline and export controls"
10197
+ },
10198
+ {
10199
+ name: "showCritical",
10200
+ type: "boolean",
10201
+ default: "false",
10202
+ required: false,
10203
+ description: "Highlight the critical path (bindable)"
10204
+ },
10205
+ {
10206
+ name: "showBaseline",
10207
+ type: "boolean",
10208
+ default: "false",
10209
+ required: false,
10210
+ description: "Show baseline bars (bindable)"
10211
+ },
10212
+ {
10213
+ name: "showDependencies",
10214
+ type: "boolean",
10215
+ default: "true",
10216
+ required: false,
10217
+ description: "Draw dependency arrows"
10218
+ },
10219
+ {
10220
+ name: "showToday",
10221
+ type: "boolean",
10222
+ default: "true",
10223
+ required: false,
10224
+ description: "Draw a line at the current date"
10225
+ },
10226
+ {
10227
+ name: "showLabels",
10228
+ type: "boolean",
10229
+ default: "true",
10230
+ required: false,
10231
+ description: "Task names next to bars"
10232
+ },
10233
+ {
10234
+ name: "showProgress",
10235
+ type: "boolean",
10236
+ default: "true",
10237
+ required: false,
10238
+ description: "Fill bars by progress"
10239
+ },
10240
+ {
10241
+ name: "exportable",
10242
+ type: "boolean",
10243
+ default: "true",
10244
+ required: false,
10245
+ description: "Export menu: CSV table, JSON project, PNG image of the current view"
10246
+ },
10247
+ {
10248
+ name: "loading",
10249
+ type: "boolean",
10250
+ default: "false",
10251
+ required: false,
10252
+ description: "Skeleton without tasks, dimmed chart with tasks"
10253
+ },
10254
+ {
10255
+ name: "error",
10256
+ type: "string | Error | null",
10257
+ default: "null",
10258
+ required: false,
10259
+ description: "Error state"
10260
+ },
10261
+ {
10262
+ name: "onRetry",
10263
+ type: "() => void",
10264
+ required: false,
10265
+ description: "Retry button in the error state"
10266
+ },
10267
+ {
10268
+ name: "emptyMessage",
10269
+ type: "string",
10270
+ required: false,
10271
+ description: "Text when there are no tasks"
10272
+ },
10273
+ {
10274
+ name: "locale",
10275
+ type: "string",
10276
+ required: false,
10277
+ description: "Locale for dates and headers"
10278
+ },
10279
+ {
10280
+ name: "weekStartsOn",
10281
+ type: "number",
10282
+ default: "1",
10283
+ required: false,
10284
+ description: "0 = Sunday, 1 = Monday"
10285
+ },
10286
+ {
10287
+ name: "ontaskclick",
10288
+ type: "(task: GanttTask, scheduled: ScheduledTask, event) => void",
10289
+ required: false,
10290
+ description: "Row or bar click, or Enter on a row"
10291
+ },
10292
+ {
10293
+ name: "ontaskdblclick",
10294
+ type: "(task: GanttTask, scheduled: ScheduledTask, event: MouseEvent) => void",
10295
+ required: false,
10296
+ description: "Bar or row double-click. When `editable` the task dialog opens too, unless you call `event.preventDefault()`"
10297
+ },
10298
+ {
10299
+ name: "onselectionchange",
10300
+ type: "(ids: string[]) => void",
10301
+ required: false,
10302
+ description: "Selection changed"
10303
+ },
10304
+ {
10305
+ name: "editable",
10306
+ type: "boolean",
10307
+ default: "false",
10308
+ required: false,
10309
+ description: "Drag, link and nudge bars; task dialog; in-place cell edits; add, indent and outdent tasks; undo/redo"
10310
+ },
10311
+ {
10312
+ name: "onchange",
10313
+ type: "(change: GanttChange) => void",
10314
+ required: false,
10315
+ description: "Every edit, undo and redo, with the new data and all moved dates"
10316
+ },
10317
+ {
10318
+ name: "toolbarActions",
10319
+ type: "Snippet",
10320
+ required: false,
10321
+ description: "Extra toolbar content"
10322
+ },
10323
+ {
10324
+ name: "class",
10325
+ type: "string",
10326
+ required: false,
10327
+ description: "Classes for the outer container"
10328
+ }
10329
+ ],
10330
+ variants: [
10331
+ {
10332
+ name: "zoom",
10333
+ values: [
10334
+ "hour",
10335
+ "day",
10336
+ "week",
10337
+ "month",
10338
+ "quarter",
10339
+ "year"
10340
+ ],
10341
+ default: "week"
10342
+ }
10343
+ ],
10344
+ slots: [],
10345
+ events: [],
10346
+ examples: [
10347
+ {
10348
+ title: "Basic Usage",
10349
+ code: `<script>
10350
+ import { Gantt } from '@classic-homes/gantt-svelte';
10351
+
10352
+ const tasks = [
10353
+ { id: 'design', name: 'Design', start: '2026-03-02', duration: 3, progress: 100 },
10354
+ { id: 'build', name: 'Build', duration: 5, progress: 20 },
10355
+ { id: 'launch', name: 'Launch', duration: 0 },
10356
+ ];
10357
+ const dependencies = [
10358
+ { id: 'd1', from: 'design', to: 'build' },
10359
+ { id: 'd2', from: 'build', to: 'launch' },
10360
+ ];
10361
+ </script>
10362
+
10363
+ <Gantt {tasks} {dependencies} title="Launch plan" showCritical />`
10364
+ }
10365
+ ],
10366
+ relatedComponents: [
10367
+ "BarChart"
10368
+ ]
10369
+ },
9431
10370
  {
9432
10371
  name: "GaugeChart",
9433
10372
  description: "Display single value metrics with progress indicator",
@@ -11104,6 +12043,213 @@ var component_catalog_default = {
11104
12043
  "Textarea"
11105
12044
  ]
11106
12045
  },
12046
+ {
12047
+ name: "KanbanBoard",
12048
+ description: "Cards in columns, moved between columns by drag handle or keyboard, with announcements",
12049
+ category: "core",
12050
+ importPath: "@classic-homes/theme-svelte",
12051
+ props: [
12052
+ {
12053
+ name: "columns",
12054
+ type: "KanbanColumn[]",
12055
+ required: true,
12056
+ description: "Columns in order: `{ id, title, description? }` (required)"
12057
+ },
12058
+ {
12059
+ name: "items",
12060
+ type: "T[]",
12061
+ required: true,
12062
+ description: "Cards; each shows in the column `getColumn` names (required)"
12063
+ },
12064
+ {
12065
+ name: "getKey",
12066
+ type: "(item) => string | number",
12067
+ required: true,
12068
+ description: "Stable key (required)"
12069
+ },
12070
+ {
12071
+ name: "getColumn",
12072
+ type: "(item) => string",
12073
+ required: true,
12074
+ description: "Id of the card's column (required)"
12075
+ },
12076
+ {
12077
+ name: "onMove",
12078
+ type: "(move: { item, from, to, index }) => void",
12079
+ required: true,
12080
+ description: "A card was dropped somewhere new - once per drop (required)"
12081
+ },
12082
+ {
12083
+ name: "card",
12084
+ type: "Snippet<[{ item, column, handle, dragging }]>",
12085
+ required: true,
12086
+ description: "Renders one card; spread `handle` on its drag button (required)"
12087
+ },
12088
+ {
12089
+ name: "label",
12090
+ type: "string",
12091
+ required: true,
12092
+ description: "Accessible name of the board (required)"
12093
+ },
12094
+ {
12095
+ name: "columnHeader",
12096
+ type: "Snippet<[{ column, items }]>",
12097
+ required: false,
12098
+ description: "Replaces the default header (title, count, description)"
12099
+ },
12100
+ {
12101
+ name: "columnEmpty",
12102
+ type: "Snippet<[{ column }]>",
12103
+ required: false,
12104
+ description: "Shown in a column with no cards"
12105
+ },
12106
+ {
12107
+ name: "canDrop",
12108
+ type: "(item, to) => boolean",
12109
+ required: false,
12110
+ description: "Whether a card may go to a column; refused columns dim and are skipped"
12111
+ },
12112
+ {
12113
+ name: "sortable",
12114
+ type: "boolean",
12115
+ default: "false",
12116
+ required: false,
12117
+ description: "Cards can be reordered within a column; otherwise a move lands at the end"
12118
+ },
12119
+ {
12120
+ name: "getItemLabel",
12121
+ type: "(item) => string",
12122
+ default: '"Card"',
12123
+ required: false,
12124
+ description: "Name used in announcements and handle labels"
12125
+ },
12126
+ {
12127
+ name: "disabled",
12128
+ type: "boolean",
12129
+ default: "false",
12130
+ required: false,
12131
+ description: "Turns moving off"
12132
+ },
12133
+ {
12134
+ name: "class",
12135
+ type: "string",
12136
+ required: false,
12137
+ description: "Classes for the board"
12138
+ },
12139
+ {
12140
+ name: "columnClass",
12141
+ type: "string",
12142
+ required: false,
12143
+ description: "Classes for each column (e.g. a width other than `w-72`)"
12144
+ },
12145
+ {
12146
+ name: "cardClass",
12147
+ type: "string",
12148
+ required: false,
12149
+ description: "Classes for each card's `li`"
12150
+ }
12151
+ ],
12152
+ variants: [],
12153
+ slots: [
12154
+ {
12155
+ name: "children",
12156
+ description: "Main content",
12157
+ required: false
12158
+ }
12159
+ ],
12160
+ events: [],
12161
+ examples: [
12162
+ {
12163
+ title: "Basic Usage",
12164
+ code: `<script>
12165
+ import { KanbanBoard, Icon } from '@classic-homes/theme-svelte';
12166
+
12167
+ const columns = [
12168
+ { id: 'todo', title: 'To do' },
12169
+ { id: 'doing', title: 'In progress' },
12170
+ { id: 'done', title: 'Done' },
12171
+ ];
12172
+ let tasks = $state([
12173
+ { id: 'a', title: 'Frame inspection', status: 'todo' },
12174
+ { id: 'b', title: 'Drywall walk', status: 'doing' },
12175
+ ]);
12176
+
12177
+ function move({ item, to }) {
12178
+ tasks = tasks.map((t) => (t.id === item.id ? { ...t, status: to } : t));
12179
+ }
12180
+ </script>
12181
+
12182
+ <KanbanBoard
12183
+ {columns}
12184
+ items={tasks}
12185
+ getKey={(t) => t.id}
12186
+ getColumn={(t) => t.status}
12187
+ getItemLabel={(t) => t.title}
12188
+ onMove={move}
12189
+ label="Punch list"
12190
+ >
12191
+ {#snippet card({ item, handle, dragging })}
12192
+ <div
12193
+ class="flex items-center gap-2 rounded-md border bg-background p-2 text-sm"
12194
+ class:shadow-lg={dragging}
12195
+ >
12196
+ <button {...handle} class="cursor-grab touch-none"><Icon name="grip" size={14} /></button>
12197
+ {item.title}
12198
+ </div>
12199
+ {/snippet}
12200
+ </KanbanBoard>`
12201
+ },
12202
+ {
12203
+ title: "Saving a move",
12204
+ 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.",
12205
+ code: `<KanbanBoard
12206
+ {columns}
12207
+ items={homes}
12208
+ getKey={(h) => h.id}
12209
+ getColumn={(h) => h.designerId ?? 'unassigned'}
12210
+ onMove={async ({ item, to }) => {
12211
+ const previous = item.designerId;
12212
+ item.designerId = to === 'unassigned' ? null : to;
12213
+ try {
12214
+ await save(item.id, { designerId: item.designerId });
12215
+ } catch {
12216
+ item.designerId = previous;
12217
+ toastStore.error('Could not assign the designer');
12218
+ }
12219
+ }}
12220
+ label="Designer assignments"
12221
+ {card}
12222
+ />`
12223
+ },
12224
+ {
12225
+ title: "Refusing columns",
12226
+ 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.",
12227
+ code: `<KanbanBoard
12228
+ {columns}
12229
+ items={tasks}
12230
+ getKey={(t) => t.id}
12231
+ getColumn={(t) => t.status}
12232
+ canDrop={(task, to) => to !== 'done' || task.checked}
12233
+ onMove={move}
12234
+ label="Punch list"
12235
+ {card}
12236
+ />`
12237
+ },
12238
+ {
12239
+ title: "Ordering within a column",
12240
+ 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.",
12241
+ 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/>'
12242
+ },
12243
+ {
12244
+ title: "Custom column headers",
12245
+ description: "Replace the title and count, and say what an empty column is for.",
12246
+ 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>'
12247
+ }
12248
+ ],
12249
+ relatedComponents: [
12250
+ "SortableList"
12251
+ ]
12252
+ },
11107
12253
  {
11108
12254
  name: "Label",
11109
12255
  description: "Accessible label component for form inputs",
@@ -14154,6 +15300,85 @@ var component_catalog_default = {
14154
15300
  "Separator"
14155
15301
  ]
14156
15302
  },
15303
+ {
15304
+ name: "PdfViewer",
15305
+ description: "PDF pages rendered with pdf.js, with selectable text, find, links, zoom and page navigation",
15306
+ category: "viewer",
15307
+ importPath: "@classic-homes/viewer-svelte/pdf",
15308
+ props: [
15309
+ {
15310
+ name: "source",
15311
+ type: "LoadedSource",
15312
+ required: true,
15313
+ description: "Loaded bytes plus name and MIME hints (`loadSource`)"
15314
+ },
15315
+ {
15316
+ name: "kind",
15317
+ type: "RenderableKind",
15318
+ required: true,
15319
+ description: "`'pdf'`"
15320
+ },
15321
+ {
15322
+ name: "initialZoom",
15323
+ type: "ZoomMode",
15324
+ default: "'fit-width'",
15325
+ required: false,
15326
+ description: "`'fit-width'`, `'fit-page'` or a scale such as `1.5`"
15327
+ },
15328
+ {
15329
+ name: "initialPage",
15330
+ type: "number",
15331
+ default: "1",
15332
+ required: false,
15333
+ description: "1-based page to open at"
15334
+ },
15335
+ {
15336
+ name: "hideToolbar",
15337
+ type: "boolean",
15338
+ default: "false",
15339
+ required: false,
15340
+ description: "Hide the toolbar"
15341
+ },
15342
+ {
15343
+ name: "onready",
15344
+ type: "() => void",
15345
+ required: false,
15346
+ description: "The first page is on screen"
15347
+ },
15348
+ {
15349
+ name: "onerror",
15350
+ type: "(error: ViewerError) => void",
15351
+ required: false,
15352
+ description: "Parsing or rendering failed"
15353
+ },
15354
+ {
15355
+ name: "class",
15356
+ type: "string",
15357
+ required: false,
15358
+ description: "Classes for the outer element"
15359
+ }
15360
+ ],
15361
+ variants: [],
15362
+ slots: [],
15363
+ events: [],
15364
+ examples: [
15365
+ {
15366
+ title: "Basic Usage",
15367
+ code: `<script lang="ts">
15368
+ import { loadSource } from '@classic-homes/viewer-svelte';
15369
+ import { PdfViewer } from '@classic-homes/viewer-svelte/pdf';
15370
+ </script>
15371
+
15372
+ {#await loadSource('/plans/lot-12.pdf') then source}
15373
+ <PdfViewer {source} kind="pdf" initialZoom="fit-page" class="h-[80vh]" />
15374
+ {/await}`
15375
+ }
15376
+ ],
15377
+ relatedComponents: [
15378
+ "DocumentViewer",
15379
+ "DocxViewer"
15380
+ ]
15381
+ },
14157
15382
  {
14158
15383
  name: "PieChart",
14159
15384
  description: "Show proportional data with interactive labels",
@@ -16235,6 +17460,12 @@ var component_catalog_default = {
16235
17460
  default: "false",
16236
17461
  required: false,
16237
17462
  description: "Type to narrow: `true` always, a number once there are that many options"
17463
+ },
17464
+ {
17465
+ name: "maxResults",
17466
+ type: "number",
17467
+ required: false,
17468
+ description: "With `searchable`: render at most this many matches (see Combobox)"
16238
17469
  }
16239
17470
  ],
16240
17471
  variants: [],
@@ -16486,6 +17717,12 @@ var component_catalog_default = {
16486
17717
  type: "string",
16487
17718
  required: false,
16488
17719
  description: "Additional classes for the panel"
17720
+ },
17721
+ {
17722
+ name: "dirty",
17723
+ type: "boolean",
17724
+ required: false,
17725
+ 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))"
16489
17726
  }
16490
17727
  ],
16491
17728
  variants: [
@@ -18226,6 +19463,76 @@ var component_catalog_default = {
18226
19463
  "Button"
18227
19464
  ]
18228
19465
  },
19466
+ {
19467
+ name: "SpreadsheetViewer",
19468
+ description: "Excel and CSV files as a read-only grid with number formats, styles, merged cells, frozen panes and sheet tabs",
19469
+ category: "viewer",
19470
+ importPath: "@classic-homes/viewer-svelte/xlsx",
19471
+ props: [
19472
+ {
19473
+ name: "source",
19474
+ type: "LoadedSource",
19475
+ required: true,
19476
+ description: "Loaded bytes plus name and MIME hints"
19477
+ },
19478
+ {
19479
+ name: "kind",
19480
+ type: "RenderableKind",
19481
+ required: true,
19482
+ description: "`'xlsx'` or `'csv'`"
19483
+ },
19484
+ {
19485
+ name: "initialSheet",
19486
+ type: "string | number",
19487
+ required: false,
19488
+ description: "Name or 0-based index of the sheet to open; default first visible"
19489
+ },
19490
+ {
19491
+ name: "hideToolbar",
19492
+ type: "boolean",
19493
+ default: "false",
19494
+ required: false,
19495
+ description: "Hide the toolbar"
19496
+ },
19497
+ {
19498
+ name: "onready",
19499
+ type: "() => void",
19500
+ required: false,
19501
+ description: "The first sheet is on screen"
19502
+ },
19503
+ {
19504
+ name: "onerror",
19505
+ type: "(error: ViewerError) => void",
19506
+ required: false,
19507
+ description: "Parsing failed"
19508
+ },
19509
+ {
19510
+ name: "class",
19511
+ type: "string",
19512
+ required: false,
19513
+ description: "Classes for the outer element"
19514
+ }
19515
+ ],
19516
+ variants: [],
19517
+ slots: [],
19518
+ events: [],
19519
+ examples: [
19520
+ {
19521
+ title: "Basic Usage",
19522
+ code: `<script lang="ts">
19523
+ import { loadSource } from '@classic-homes/viewer-svelte';
19524
+ import { SpreadsheetViewer } from '@classic-homes/viewer-svelte/xlsx';
19525
+ </script>
19526
+
19527
+ {#await loadSource('/budgets/lot-12.xlsx') then source}
19528
+ <SpreadsheetViewer {source} kind="xlsx" initialSheet="Summary" class="h-[70vh]" />
19529
+ {/await}`
19530
+ }
19531
+ ],
19532
+ relatedComponents: [
19533
+ "DocumentViewer"
19534
+ ]
19535
+ },
18229
19536
  {
18230
19537
  name: "StatCard",
18231
19538
  description: "A headline metric with its change against a previous value and an optional trend",
@@ -20453,7 +21760,7 @@ function registerComponentResources(server) {
20453
21760
 
20454
21761
  // src/data/token-definitions.json
20455
21762
  var token_definitions_default = {
20456
- version: "0.3.9",
21763
+ version: "0.5.0",
20457
21764
  colors: {
20458
21765
  brand: [
20459
21766
  {
@@ -21436,7 +22743,7 @@ function registerTokenResources(server) {
21436
22743
 
21437
22744
  // src/data/styles-catalog.json
21438
22745
  var styles_catalog_default = {
21439
- version: "0.3.9",
22746
+ version: "0.5.0",
21440
22747
  package: "@classic-homes/theme-styles",
21441
22748
  description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
21442
22749
  integration: {
@@ -21819,7 +23126,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
21819
23126
 
21820
23127
  // src/data/pattern-library.json
21821
23128
  var pattern_library_default = {
21822
- version: "0.3.9",
23129
+ version: "0.5.0",
21823
23130
  layouts: [
21824
23131
  {
21825
23132
  id: "dashboard-page",
@@ -22913,7 +24220,7 @@ function registerLayoutResources(server) {
22913
24220
 
22914
24221
  // src/data/schema-catalog.json
22915
24222
  var schema_catalog_default = {
22916
- version: "0.3.9",
24223
+ version: "0.5.0",
22917
24224
  packageName: "@classic-homes/theme-svelte",
22918
24225
  importPath: "@classic-homes/theme-svelte",
22919
24226
  generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
@@ -23721,7 +25028,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
23721
25028
 
23722
25029
  // src/data/auth-catalog.json
23723
25030
  var auth_catalog_default = {
23724
- version: "0.3.9",
25031
+ version: "0.5.0",
23725
25032
  packageName: "@classic-homes/auth",
23726
25033
  description: "Authentication services and Svelte bindings for Classic Theme apps",
23727
25034
  subpackages: {
@@ -26758,7 +28065,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
26758
28065
 
26759
28066
  // src/data/notifications-catalog.json
26760
28067
  var notifications_catalog_default = {
26761
- version: "0.3.9",
28068
+ version: "0.5.0",
26762
28069
  packageName: "@classic-homes/notifications",
26763
28070
  description: "Notification services and Svelte bindings for Classic Theme apps",
26764
28071
  subpackages: {
@@ -27670,7 +28977,7 @@ function registerNotificationsResources(server) {
27670
28977
 
27671
28978
  // src/data/docs-catalog.json
27672
28979
  var docs_catalog_default = {
27673
- version: "0.3.9",
28980
+ version: "0.5.0",
27674
28981
  packageName: "@classic-homes/theme-docs",
27675
28982
  description: "Markdown documentation components for the Classic theme system",
27676
28983
  exports: {
@@ -29342,7 +30649,7 @@ function registerDocsResources(server) {
29342
30649
 
29343
30650
  // src/data/charts-catalog.json
29344
30651
  var charts_catalog_default = {
29345
- version: "0.3.9",
30652
+ version: "0.5.0",
29346
30653
  packageName: "@classic-homes/charts-core",
29347
30654
  description: "Core utilities, types, and themes for Classic Theme chart components",
29348
30655
  subpackages: {
@@ -30067,106 +31374,112 @@ var charts_catalog_default = {
30067
31374
  description: "Show value labels on bars"
30068
31375
  },
30069
31376
  {
30070
- name: "legend",
30071
- type: "ChartLegendConfig",
30072
- required: false,
30073
- description: "Built-in legend placement and formatting (position, align, orient, icon, formatter, scroll)"
30074
- },
30075
- {
30076
- name: "onLegendChange",
30077
- type: "(visible: Record<string, boolean>) => void",
30078
- required: false,
30079
- description: "Called when legend items are shown or hidden"
30080
- },
30081
- {
30082
- name: "renderLegend",
30083
- type: "React: (legend: LegendRenderProps) => ReactNode; Svelte: Snippet<[LegendRenderProps]>",
30084
- required: false,
30085
- description: "Render a custom HTML legend (e.g. ChartLegend) beside the chart instead of the built-in one"
30086
- },
30087
- {
30088
- name: "labelFormatter",
30089
- type: "string | ((params: LabelFormatterParams) => string)",
30090
- required: false,
30091
- description: "Data label text: an ECharts template or a function (params include per-point `label`)"
30092
- },
30093
- {
30094
- name: "xAxisConfig",
30095
- type: "AxisConfig",
30096
- required: false,
30097
- description: "Horizontal axis customisation (name, formatter, rotate, min, max, interval, show)"
30098
- },
30099
- {
30100
- name: "yAxisConfig",
30101
- type: "AxisConfig",
30102
- required: false,
30103
- description: "Vertical axis customisation (name, formatter, rotate, min, max, interval, show)"
30104
- },
30105
- {
30106
- name: "onClick",
30107
- type: "(params: DataPointEventParams) => void",
30108
- required: false,
30109
- description: "Click event handler"
30110
- },
30111
- {
30112
- name: "rowHeight",
30113
- type: "number",
30114
- required: false,
30115
- description: 'Height per category row for height="auto" on horizontal bars (default 28) (Svelte only; React pending)'
30116
- },
30117
- {
30118
- name: "onHover",
30119
- type: "(params: DataPointEventParams) => void",
30120
- required: false,
30121
- description: "Hover event handler"
30122
- },
30123
- {
30124
- name: "referenceLines",
30125
- type: "ReferenceLine[]",
30126
- required: false,
30127
- description: "Lines marking targets, thresholds or statistics (Svelte only; React pending)"
30128
- },
30129
- {
30130
- name: "referenceBands",
30131
- type: "ReferenceBand[]",
30132
- required: false,
30133
- description: "Shaded value ranges (Svelte only; React pending)"
30134
- },
30135
- {
30136
- name: "dataZoom",
30137
- type: "boolean | 'inside' | 'slider'",
30138
- required: false,
30139
- description: "Zoom/pan the category axis: 'inside' (wheel and drag), 'slider', or true for both (Svelte only; React pending)"
30140
- }
30141
- ]
30142
- },
30143
- {
30144
- name: "PieChartProps",
30145
- description: "Pie chart props (extends BaseChartProps)",
30146
- properties: [
30147
- {
30148
- name: "data",
30149
- type: "PieSliceData[]",
30150
- required: true,
30151
- description: "Slice data array"
30152
- },
30153
- {
30154
- name: "showLabels",
31377
+ name: "showTotal",
30155
31378
  type: "boolean",
30156
31379
  required: false,
30157
- description: "Show slice labels"
30158
- },
30159
- {
30160
- name: "labelPosition",
30161
- type: "'inside' | 'outside'",
30162
- required: false,
30163
- description: "Label position"
30164
- },
30165
- {
30166
- name: "innerRadius",
30167
- type: "number | string",
30168
- required: false,
30169
- description: "Inner radius (0 for pie, percentage for donut)"
31380
+ description: "Label each stack's total at the end of the bar, formatted with valueFormat; percent stacks show the raw total"
31381
+ },
31382
+ {
31383
+ name: "legend",
31384
+ type: "ChartLegendConfig",
31385
+ required: false,
31386
+ description: "Built-in legend placement and formatting (position, align, orient, icon, formatter, scroll)"
31387
+ },
31388
+ {
31389
+ name: "onLegendChange",
31390
+ type: "(visible: Record<string, boolean>) => void",
31391
+ required: false,
31392
+ description: "Called when legend items are shown or hidden"
31393
+ },
31394
+ {
31395
+ name: "renderLegend",
31396
+ type: "React: (legend: LegendRenderProps) => ReactNode; Svelte: Snippet<[LegendRenderProps]>",
31397
+ required: false,
31398
+ description: "Render a custom HTML legend (e.g. ChartLegend) beside the chart instead of the built-in one"
31399
+ },
31400
+ {
31401
+ name: "labelFormatter",
31402
+ type: "string | ((params: LabelFormatterParams) => string)",
31403
+ required: false,
31404
+ description: "Data label text: an ECharts template or a function (params include per-point `label`)"
31405
+ },
31406
+ {
31407
+ name: "xAxisConfig",
31408
+ type: "AxisConfig",
31409
+ required: false,
31410
+ description: "Horizontal axis customisation (name, formatter, rotate, min, max, interval, show)"
31411
+ },
31412
+ {
31413
+ name: "yAxisConfig",
31414
+ type: "AxisConfig",
31415
+ required: false,
31416
+ description: "Vertical axis customisation (name, formatter, rotate, min, max, interval, show)"
31417
+ },
31418
+ {
31419
+ name: "onClick",
31420
+ type: "(params: DataPointEventParams) => void",
31421
+ required: false,
31422
+ description: "Click event handler"
31423
+ },
31424
+ {
31425
+ name: "rowHeight",
31426
+ type: "number",
31427
+ required: false,
31428
+ description: 'Height per category row for height="auto" on horizontal bars (default 28) (Svelte only; React pending)'
31429
+ },
31430
+ {
31431
+ name: "onHover",
31432
+ type: "(params: DataPointEventParams) => void",
31433
+ required: false,
31434
+ description: "Hover event handler"
31435
+ },
31436
+ {
31437
+ name: "referenceLines",
31438
+ type: "ReferenceLine[]",
31439
+ required: false,
31440
+ description: "Lines marking targets, thresholds or statistics (Svelte only; React pending)"
31441
+ },
31442
+ {
31443
+ name: "referenceBands",
31444
+ type: "ReferenceBand[]",
31445
+ required: false,
31446
+ description: "Shaded value ranges (Svelte only; React pending)"
31447
+ },
31448
+ {
31449
+ name: "dataZoom",
31450
+ type: "boolean | 'inside' | 'slider'",
31451
+ required: false,
31452
+ description: "Zoom/pan the category axis: 'inside' (wheel and drag), 'slider', or true for both (Svelte only; React pending)"
31453
+ }
31454
+ ]
31455
+ },
31456
+ {
31457
+ name: "PieChartProps",
31458
+ description: "Pie chart props (extends BaseChartProps)",
31459
+ properties: [
31460
+ {
31461
+ name: "data",
31462
+ type: "PieSliceData[]",
31463
+ required: true,
31464
+ description: "Slice data array"
31465
+ },
31466
+ {
31467
+ name: "showLabels",
31468
+ type: "boolean",
31469
+ required: false,
31470
+ description: "Show slice labels"
31471
+ },
31472
+ {
31473
+ name: "labelPosition",
31474
+ type: "'inside' | 'outside'",
31475
+ required: false,
31476
+ description: "Label position"
31477
+ },
31478
+ {
31479
+ name: "innerRadius",
31480
+ type: "number | string",
31481
+ required: false,
31482
+ description: "Inner radius (0 for pie, percentage for donut)"
30170
31483
  },
30171
31484
  {
30172
31485
  name: "legend",
@@ -33472,9 +34785,992 @@ interface SankeyData {
33472
34785
  }));
33473
34786
  }
33474
34787
 
34788
+ // src/data/gantt-catalog.json
34789
+ var gantt_catalog_default = {
34790
+ version: "0.5.0",
34791
+ packageName: "@classic-homes/gantt-core",
34792
+ 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.",
34793
+ packages: {
34794
+ core: {
34795
+ name: "@classic-homes/gantt-core",
34796
+ description: "Pure TypeScript engine",
34797
+ subpaths: {
34798
+ "@classic-homes/gantt-core": "Everything below plus model, interaction, a11y and io",
34799
+ "@classic-homes/gantt-core/types": "Data model types",
34800
+ "@classic-homes/gantt-core/calendar": "Calendars and wall-clock time helpers",
34801
+ "@classic-homes/gantt-core/scheduling": "scheduleProject and task-tree/graph helpers",
34802
+ "@classic-homes/gantt-core/layout": "Time scale, ticks, virtualisation, bar geometry, dependency routing"
34803
+ }
34804
+ },
34805
+ svelte: {
34806
+ name: "@classic-homes/gantt-svelte",
34807
+ description: "Svelte 5 Gantt component (task tree grid + timeline). Re-exports the core functions and types most consumers need.",
34808
+ peerDependencies: {
34809
+ svelte: "^5.20.0"
34810
+ },
34811
+ exports: {
34812
+ components: [
34813
+ "Gantt",
34814
+ "GanttBar",
34815
+ "GanttDependencies",
34816
+ "GanttToolbar",
34817
+ "GanttSplitter",
34818
+ "GanttState"
34819
+ ],
34820
+ composables: [
34821
+ "useGanttModel"
34822
+ ],
34823
+ columns: [
34824
+ "BUILTIN_COLUMNS",
34825
+ "DEFAULT_COLUMNS",
34826
+ "resolveColumns",
34827
+ "predecessorCodes",
34828
+ "shortDuration"
34829
+ ],
34830
+ coreReexports: [
34831
+ "createGanttModel",
34832
+ "scheduleProject",
34833
+ "parseTime",
34834
+ "formatTime",
34835
+ "toLocalDate",
34836
+ "ZOOM_LEVELS",
34837
+ "ZOOM_PRESETS"
34838
+ ],
34839
+ typeReexports: [
34840
+ "GanttTask",
34841
+ "GanttDependency",
34842
+ "GanttCalendar",
34843
+ "GanttChange",
34844
+ "GanttModel",
34845
+ "GanttOperation",
34846
+ "ScheduleOptions",
34847
+ "ScheduleResult",
34848
+ "ScheduledTask",
34849
+ "ZoomLevel",
34850
+ "GanttColumn",
34851
+ "GanttColumnId",
34852
+ "GanttCellContext",
34853
+ "UseGanttModelOptions"
34854
+ ]
34855
+ }
34856
+ }
34857
+ },
34858
+ time: {
34859
+ 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.",
34860
+ types: {
34861
+ WallTime: "number",
34862
+ TimeInput: "string | Date | number"
34863
+ },
34864
+ 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.",
34865
+ 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)."
34866
+ },
34867
+ types: {
34868
+ GanttTask: {
34869
+ description: "One task, summary or milestone. Tasks with children are summaries; zero duration (or type 'milestone') is a milestone.",
34870
+ properties: [
34871
+ {
34872
+ name: "id",
34873
+ type: "string",
34874
+ required: true,
34875
+ description: "Unique id"
34876
+ },
34877
+ {
34878
+ name: "name",
34879
+ type: "string",
34880
+ required: true,
34881
+ description: "Label"
34882
+ },
34883
+ {
34884
+ name: "parentId",
34885
+ type: "string | null",
34886
+ required: false,
34887
+ description: "Parent summary task"
34888
+ },
34889
+ {
34890
+ name: "type",
34891
+ type: "'task' | 'summary' | 'milestone'",
34892
+ required: false,
34893
+ description: "Inferred when omitted: summary with children, milestone with zero duration, else task"
34894
+ },
34895
+ {
34896
+ name: "start",
34897
+ type: "TimeInput",
34898
+ required: false,
34899
+ description: "Start. For auto tasks a floor (see respectTaskStart)"
34900
+ },
34901
+ {
34902
+ name: "end",
34903
+ type: "TimeInput",
34904
+ required: false,
34905
+ description: "Finish; a date-only value is the end of that day's work"
34906
+ },
34907
+ {
34908
+ name: "duration",
34909
+ type: "number",
34910
+ required: false,
34911
+ description: "Working days (fractional allowed). Takes precedence over end. Without duration or start+end a task gets one day"
34912
+ },
34913
+ {
34914
+ name: "progress",
34915
+ type: "number",
34916
+ required: false,
34917
+ description: "0-100"
34918
+ },
34919
+ {
34920
+ name: "constraint",
34921
+ type: "GanttConstraint",
34922
+ required: false,
34923
+ description: "{ type: ConstraintType; date?: TimeInput }. date is required for every type except ASAP and ALAP"
34924
+ },
34925
+ {
34926
+ name: "deadline",
34927
+ type: "TimeInput",
34928
+ required: false,
34929
+ description: "Reported as a 'deadline' conflict when the task finishes later"
34930
+ },
34931
+ {
34932
+ name: "calendarId",
34933
+ type: "string",
34934
+ required: false,
34935
+ description: "Calendar id; falls back to the project calendar"
34936
+ },
34937
+ {
34938
+ name: "manual",
34939
+ type: "boolean",
34940
+ required: false,
34941
+ description: "Keeps its own dates; dependencies only report conflicts"
34942
+ },
34943
+ {
34944
+ name: "assignees",
34945
+ type: "string[]",
34946
+ required: false,
34947
+ description: "Assignees"
34948
+ },
34949
+ {
34950
+ name: "baseline",
34951
+ type: "{ start: TimeInput; end: TimeInput }",
34952
+ required: false,
34953
+ description: "Original plan, drawn under the bar when baselines are shown"
34954
+ },
34955
+ {
34956
+ name: "color",
34957
+ type: "string",
34958
+ required: false,
34959
+ description: "Any CSS colour for the bar"
34960
+ },
34961
+ {
34962
+ name: "readonly",
34963
+ type: "boolean",
34964
+ required: false,
34965
+ description: "Blocks edits to this task and its descendants, including touching dependencies"
34966
+ },
34967
+ {
34968
+ name: "meta",
34969
+ type: "Record<string, unknown>",
34970
+ required: false,
34971
+ description: "Free-form data (e.g. for custom columns)"
34972
+ }
34973
+ ]
34974
+ },
34975
+ GanttDependency: {
34976
+ description: "A link from a predecessor to a successor",
34977
+ properties: [
34978
+ {
34979
+ name: "id",
34980
+ type: "string",
34981
+ required: true,
34982
+ description: "Unique id"
34983
+ },
34984
+ {
34985
+ name: "from",
34986
+ type: "string",
34987
+ required: true,
34988
+ description: "Predecessor task id"
34989
+ },
34990
+ {
34991
+ name: "to",
34992
+ type: "string",
34993
+ required: true,
34994
+ description: "Successor task id"
34995
+ },
34996
+ {
34997
+ name: "type",
34998
+ type: "'FS' | 'SS' | 'FF' | 'SF'",
34999
+ required: false,
35000
+ description: "Defaults to FS"
35001
+ },
35002
+ {
35003
+ name: "lag",
35004
+ type: "number",
35005
+ required: false,
35006
+ description: "Working days on the successor's calendar; negative values are leads"
35007
+ }
35008
+ ]
35009
+ },
35010
+ GanttCalendar: {
35011
+ 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).",
35012
+ properties: [
35013
+ {
35014
+ name: "id",
35015
+ type: "string",
35016
+ required: true,
35017
+ description: "Calendar id"
35018
+ },
35019
+ {
35020
+ name: "name",
35021
+ type: "string",
35022
+ required: false,
35023
+ description: "Display name"
35024
+ },
35025
+ {
35026
+ name: "workingDays",
35027
+ type: "number[]",
35028
+ required: false,
35029
+ description: "Working weekdays, 0 = Sunday ... 6 = Saturday. Default Monday-Friday"
35030
+ },
35031
+ {
35032
+ name: "workingHours",
35033
+ type: "[start: string, end: string][]",
35034
+ required: false,
35035
+ description: "Working intervals per day as HH:mm. Default [['08:00','12:00'], ['13:00','17:00']]. Overlapping or empty intervals throw"
35036
+ },
35037
+ {
35038
+ name: "exceptions",
35039
+ type: "CalendarException[]",
35040
+ required: false,
35041
+ description: "{ date: 'YYYY-MM-DD'; end?: inclusive last day; name?; working?: boolean (default false = holiday); hours?: WorkingHours[] for a working override }"
35042
+ }
35043
+ ]
35044
+ },
35045
+ ScheduleOptions: {
35046
+ description: "Options for scheduleProject, createGanttModel({ schedule }) and the Gantt scheduleOptions prop",
35047
+ properties: [
35048
+ {
35049
+ name: "projectStart",
35050
+ type: "TimeInput",
35051
+ required: false,
35052
+ description: "Earliest start for tasks without a start or predecessors. Defaults to the earliest task start (today when no task has one)"
35053
+ },
35054
+ {
35055
+ name: "projectFinish",
35056
+ type: "TimeInput",
35057
+ required: false,
35058
+ description: "Fixed project finish for the backward pass. Defaults to the latest early finish"
35059
+ },
35060
+ {
35061
+ name: "calendarId",
35062
+ type: "string",
35063
+ required: false,
35064
+ description: "Project calendar, defaulting to the first calendar (or the built-in standard one)"
35065
+ },
35066
+ {
35067
+ name: "mode",
35068
+ type: "'auto' | 'manual'",
35069
+ required: false,
35070
+ description: "'manual' treats every task as manually scheduled"
35071
+ },
35072
+ {
35073
+ name: "minutesPerDay",
35074
+ type: "number",
35075
+ required: false,
35076
+ description: "Minutes in a day of duration and lag. Default: the project calendar's working day (480 for the standard calendar)"
35077
+ },
35078
+ {
35079
+ name: "respectTaskStart",
35080
+ type: "boolean",
35081
+ required: false,
35082
+ 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"
35083
+ },
35084
+ {
35085
+ name: "criticalSlack",
35086
+ type: "number",
35087
+ required: false,
35088
+ description: "Total slack (working minutes) at or below which a task is critical. Default 0"
35089
+ }
35090
+ ]
35091
+ },
35092
+ ScheduledTask: {
35093
+ description: "Resolved dates for one task (all times are WallTime)",
35094
+ properties: [
35095
+ {
35096
+ name: "id",
35097
+ type: "string",
35098
+ required: true,
35099
+ description: "Task id"
35100
+ },
35101
+ {
35102
+ name: "type",
35103
+ type: "'task' | 'summary' | 'milestone'",
35104
+ required: true,
35105
+ description: "Resolved type"
35106
+ },
35107
+ {
35108
+ name: "start",
35109
+ type: "WallTime",
35110
+ required: true,
35111
+ description: "Scheduled start"
35112
+ },
35113
+ {
35114
+ name: "finish",
35115
+ type: "WallTime",
35116
+ required: true,
35117
+ description: "Scheduled finish"
35118
+ },
35119
+ {
35120
+ name: "duration",
35121
+ type: "number",
35122
+ required: true,
35123
+ description: "Working minutes"
35124
+ },
35125
+ {
35126
+ name: "progress",
35127
+ type: "number",
35128
+ required: true,
35129
+ description: "0-100; duration-weighted for summaries"
35130
+ },
35131
+ {
35132
+ name: "earlyStart",
35133
+ type: "WallTime",
35134
+ required: true,
35135
+ description: "CPM early start"
35136
+ },
35137
+ {
35138
+ name: "earlyFinish",
35139
+ type: "WallTime",
35140
+ required: true,
35141
+ description: "CPM early finish"
35142
+ },
35143
+ {
35144
+ name: "lateStart",
35145
+ type: "WallTime",
35146
+ required: true,
35147
+ description: "CPM late start"
35148
+ },
35149
+ {
35150
+ name: "lateFinish",
35151
+ type: "WallTime",
35152
+ required: true,
35153
+ description: "CPM late finish"
35154
+ },
35155
+ {
35156
+ name: "totalSlack",
35157
+ type: "number",
35158
+ required: true,
35159
+ description: "Working minutes the task can slip without moving the project finish"
35160
+ },
35161
+ {
35162
+ name: "freeSlack",
35163
+ type: "number",
35164
+ required: true,
35165
+ description: "Working minutes the task can slip without moving any successor"
35166
+ },
35167
+ {
35168
+ name: "critical",
35169
+ type: "boolean",
35170
+ required: true,
35171
+ description: "Auto-scheduled and totalSlack <= criticalSlack (manual tasks are never critical)"
35172
+ },
35173
+ {
35174
+ name: "manual",
35175
+ type: "boolean",
35176
+ required: true,
35177
+ description: "Manually scheduled"
35178
+ },
35179
+ {
35180
+ name: "calendarId",
35181
+ type: "string",
35182
+ required: true,
35183
+ description: "Calendar actually used"
35184
+ },
35185
+ {
35186
+ name: "deadline",
35187
+ type: "WallTime",
35188
+ required: false,
35189
+ description: "Parsed deadline"
35190
+ },
35191
+ {
35192
+ name: "baseline",
35193
+ type: "{ start: WallTime; finish: WallTime }",
35194
+ required: false,
35195
+ description: "Parsed baseline"
35196
+ }
35197
+ ]
35198
+ },
35199
+ ScheduleResult: {
35200
+ description: "Output of scheduleProject",
35201
+ properties: [
35202
+ {
35203
+ name: "tasks",
35204
+ type: "Map<string, ScheduledTask>",
35205
+ required: true,
35206
+ description: "Scheduled task by id"
35207
+ },
35208
+ {
35209
+ name: "critical",
35210
+ type: "string[]",
35211
+ required: true,
35212
+ description: "Ids of critical tasks, in topological order"
35213
+ },
35214
+ {
35215
+ name: "conflicts",
35216
+ type: "ScheduleConflict[]",
35217
+ required: true,
35218
+ description: "Problems found while scheduling"
35219
+ },
35220
+ {
35221
+ name: "start",
35222
+ type: "WallTime",
35223
+ required: true,
35224
+ description: "Project start"
35225
+ },
35226
+ {
35227
+ name: "finish",
35228
+ type: "WallTime",
35229
+ required: true,
35230
+ description: "Project finish"
35231
+ }
35232
+ ]
35233
+ },
35234
+ ScheduleConflict: {
35235
+ description: "{ kind; taskId?; dependencyId?; cycle?: string[] (task ids on the cycle, in order); message }",
35236
+ kinds: {
35237
+ 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)",
35238
+ dependency: "A task is scheduled before a predecessor allows (typically a manual task, or one pinned by MSO/MFO)",
35239
+ constraint: "A constraint cannot be met, or has no date and is ignored",
35240
+ deadline: "The task finishes after its deadline",
35241
+ "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)",
35242
+ "missing-calendar": "Unknown task or project calendar id (the project calendar is used)",
35243
+ unsupported: "Constraints on summary tasks and FF/SF dependencies into a summary, both ignored. Not counted by describeSchedule"
35244
+ }
35245
+ },
35246
+ GanttOperation: {
35247
+ description: "One edit the model can apply and invert",
35248
+ union: [
35249
+ "{ type: 'update-task'; id: string; patch: Partial<Omit<GanttTask, 'id'>> }",
35250
+ "{ type: 'add-task'; task: GanttTask; index?: number }",
35251
+ "{ type: 'remove-task'; id: string }",
35252
+ "{ type: 'add-dependency'; dependency: GanttDependency; index?: number }",
35253
+ "{ type: 'update-dependency'; id: string; patch: Partial<Omit<GanttDependency, 'id'>> }",
35254
+ "{ type: 'remove-dependency'; id: string }"
35255
+ ]
35256
+ },
35257
+ GanttChange: {
35258
+ description: "Emitted after every edit, undo or redo, for the consumer to persist",
35259
+ properties: [
35260
+ {
35261
+ name: "source",
35262
+ type: "'edit' | 'undo' | 'redo'",
35263
+ required: true,
35264
+ description: "What produced the change"
35265
+ },
35266
+ {
35267
+ name: "label",
35268
+ type: "string",
35269
+ required: false,
35270
+ description: "Label passed to apply"
35271
+ },
35272
+ {
35273
+ name: "operations",
35274
+ type: "GanttOperation[]",
35275
+ required: true,
35276
+ description: "Edit descriptions in order; persist task/dependency snapshots for exact undo restoration"
35277
+ },
35278
+ {
35279
+ name: "dates",
35280
+ type: "ScheduledDateChange[]",
35281
+ required: true,
35282
+ description: "{ id, start, finish, previousStart?, previousFinish? } for every task whose scheduled dates moved, including cascaded successors"
35283
+ },
35284
+ {
35285
+ name: "tasks",
35286
+ type: "GanttTask[]",
35287
+ required: true,
35288
+ description: "Data after the change"
35289
+ },
35290
+ {
35291
+ name: "dependencies",
35292
+ type: "GanttDependency[]",
35293
+ required: true,
35294
+ description: "Data after the change"
35295
+ }
35296
+ ]
35297
+ },
35298
+ GanttRow: {
35299
+ description: "A visible row of the flattened task tree",
35300
+ properties: [
35301
+ {
35302
+ name: "id",
35303
+ type: "string",
35304
+ required: true,
35305
+ description: "Task id"
35306
+ },
35307
+ {
35308
+ name: "task",
35309
+ type: "GanttTask",
35310
+ required: true,
35311
+ description: "Source task"
35312
+ },
35313
+ {
35314
+ name: "index",
35315
+ type: "number",
35316
+ required: true,
35317
+ description: "0-based index among visible rows"
35318
+ },
35319
+ {
35320
+ name: "level",
35321
+ type: "number",
35322
+ required: true,
35323
+ description: "1 for top level"
35324
+ },
35325
+ {
35326
+ name: "wbs",
35327
+ type: "string",
35328
+ required: true,
35329
+ description: "Outline number, e.g. 1.2.3"
35330
+ },
35331
+ {
35332
+ name: "hasChildren",
35333
+ type: "boolean",
35334
+ required: true,
35335
+ description: "Is a summary"
35336
+ },
35337
+ {
35338
+ name: "expanded",
35339
+ type: "boolean",
35340
+ required: true,
35341
+ description: "Expand state"
35342
+ },
35343
+ {
35344
+ name: "parentId",
35345
+ type: "string | null",
35346
+ required: true,
35347
+ description: "Parent id"
35348
+ }
35349
+ ]
35350
+ }
35351
+ },
35352
+ scheduling: {
35353
+ function: {
35354
+ name: "scheduleProject",
35355
+ signature: "(tasks: GanttTask[], dependencies?: GanttDependency[], calendars?: GanttCalendar[], options?: ScheduleOptions) => ScheduleResult",
35356
+ 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."
35357
+ },
35358
+ semantics: [
35359
+ "Durations and lags are working time on a calendar: a task's own calendar, otherwise the project calendar. Lag uses the successor's calendar.",
35360
+ "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.",
35361
+ "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.",
35362
+ "Dependency types: FS (successor starts after predecessor finishes, the default), SS, FF and SF, each with an optional lag in working days (negative = lead).",
35363
+ "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.",
35364
+ "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.",
35365
+ "deadline does not move the task; finishing later is a 'deadline' conflict.",
35366
+ "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.",
35367
+ "Manual tasks (manual: true, or options.mode 'manual') keep their given dates; dependencies only report 'dependency' conflicts.",
35368
+ "Cycles are reported with the path; one dependency on the cycle is ignored so the rest still schedules.",
35369
+ "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."
35370
+ ],
35371
+ 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; // []",
35372
+ helpers: [
35373
+ {
35374
+ name: "taskDaySpan",
35375
+ signature: "(task: Pick<ScheduledTask, 'start' | 'finish'>) => { first: number; last: number }",
35376
+ description: "Whole wall-clock day indexes a task touches"
35377
+ },
35378
+ {
35379
+ name: "buildTaskTree / ancestorsOf / descendantsOf / leavesOf / isAncestor",
35380
+ signature: "buildTaskTree(tasks: GanttTask[]) => TaskTree",
35381
+ description: "Task-tree helpers (parent/children maps)"
35382
+ },
35383
+ {
35384
+ name: "wouldCreateCycle",
35385
+ signature: "(tasks, dependencies, from: string, to: string) => boolean",
35386
+ description: "Whether a new link would close a cycle (used by the model's validation)"
35387
+ }
35388
+ ]
35389
+ },
35390
+ model: {
35391
+ function: {
35392
+ name: "createGanttModel",
35393
+ signature: "(options: GanttModelOptions) => GanttModel",
35394
+ 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."
35395
+ },
35396
+ options: [
35397
+ {
35398
+ name: "tasks",
35399
+ type: "GanttTask[]",
35400
+ required: true
35401
+ },
35402
+ {
35403
+ name: "dependencies",
35404
+ type: "GanttDependency[]",
35405
+ required: false
35406
+ },
35407
+ {
35408
+ name: "calendars",
35409
+ type: "GanttCalendar[]",
35410
+ required: false
35411
+ },
35412
+ {
35413
+ name: "schedule",
35414
+ type: "ScheduleOptions",
35415
+ required: false
35416
+ },
35417
+ {
35418
+ name: "collapsed",
35419
+ type: "Iterable<string>",
35420
+ required: false,
35421
+ description: "Collapsed summaries. Everything is expanded by default"
35422
+ },
35423
+ {
35424
+ name: "historyLimit",
35425
+ type: "number",
35426
+ required: false,
35427
+ description: "Maximum undo steps (default 100); 0 disables history"
35428
+ }
35429
+ ],
35430
+ 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) }",
35431
+ methods: [
35432
+ {
35433
+ name: "getState",
35434
+ signature: "() => GanttModelState"
35435
+ },
35436
+ {
35437
+ name: "subscribe",
35438
+ signature: "(listener: (state: GanttModelState) => void) => () => void",
35439
+ description: "Every state change (data, selection, expand state)"
35440
+ },
35441
+ {
35442
+ name: "onChange",
35443
+ signature: "(listener: (change: GanttChange) => void) => () => void",
35444
+ description: "Edits, undo and redo, to persist them"
35445
+ },
35446
+ {
35447
+ name: "apply",
35448
+ signature: "(operations: GanttOperation | GanttOperation[], label?: string) => GanttChange",
35449
+ description: "Apply operations as one undoable step. Throws GanttEditError and changes nothing on invalid input. Clears the redo stack"
35450
+ },
35451
+ {
35452
+ name: "validate",
35453
+ signature: "(operations: GanttOperation | GanttOperation[]) => string | null",
35454
+ description: "Check operations without applying them; returns the first error message"
35455
+ },
35456
+ {
35457
+ name: "preview",
35458
+ signature: "(operations: GanttOperation | GanttOperation[]) => ScheduleResult",
35459
+ description: "Schedule the data as it would be after the operations, without committing (drag previews)"
35460
+ },
35461
+ {
35462
+ name: "undo",
35463
+ signature: "() => GanttChange | null"
35464
+ },
35465
+ {
35466
+ name: "redo",
35467
+ signature: "() => GanttChange | null"
35468
+ },
35469
+ {
35470
+ name: "setData",
35471
+ signature: "(data: { tasks?; dependencies?; calendars? }) => void",
35472
+ description: "Replace the data from outside (e.g. after a server refresh). Clears history"
35473
+ },
35474
+ {
35475
+ name: "setScheduleOptions",
35476
+ signature: "(options: ScheduleOptions) => void"
35477
+ },
35478
+ {
35479
+ name: "toggle / setExpanded / expandAll / collapseAll",
35480
+ signature: "(id) / (id, expanded) / () / ()"
35481
+ },
35482
+ {
35483
+ name: "select",
35484
+ signature: "(id: string | null, mode?: 'replace' | 'toggle' | 'range') => void",
35485
+ description: "range extends from the focused row"
35486
+ },
35487
+ {
35488
+ name: "selectAll / clearSelection",
35489
+ signature: "() => void"
35490
+ },
35491
+ {
35492
+ name: "setFocused",
35493
+ signature: "(id: string | null) => void"
35494
+ }
35495
+ ],
35496
+ validationRules: [
35497
+ "update-task: unknown task; moving a task under itself or a descendant; unknown parent",
35498
+ "add-task: missing id; duplicate id",
35499
+ "remove-task: unknown task. Removes the whole subtree and every dependency touching it (undo restores them)",
35500
+ "add-dependency: missing id; duplicate id; unknown task; tasks already linked; would create a cycle",
35501
+ "update-dependency: unknown dependency; new endpoints would create a cycle",
35502
+ "remove-dependency: unknown dependency"
35503
+ ],
35504
+ errors: "GanttEditError extends Error with the failing `operation`",
35505
+ 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'"
35506
+ },
35507
+ modules: {
35508
+ calendar: [
35509
+ {
35510
+ name: "STANDARD_CALENDAR / STANDARD_CALENDAR_ID",
35511
+ signature: "GanttCalendar / 'standard'",
35512
+ description: "Mon-Fri, 08:00-12:00 + 13:00-17:00"
35513
+ },
35514
+ {
35515
+ name: "CONTINUOUS_CALENDAR",
35516
+ signature: "GanttCalendar",
35517
+ description: "Every day, all day"
35518
+ },
35519
+ {
35520
+ name: "compileCalendar / compileCalendars",
35521
+ signature: "(def: GanttCalendar) => WorkCalendar / (defs?: GanttCalendar[]) => Map<string, WorkCalendar>",
35522
+ description: "Working-time arithmetic: isWorking, nextWorking, prevWorking, add(t, minutes), between(a, b), minutesPerDay. compileCalendars always includes the standard calendar"
35523
+ },
35524
+ {
35525
+ name: "nonWorkingSpans",
35526
+ signature: "(calendar: WorkCalendar, from: WallTime, to: WallTime) => Array<[WallTime, WallTime]>",
35527
+ description: "Non-working spans for shading"
35528
+ },
35529
+ {
35530
+ name: "parseTime / tryParseTime / formatTime / isDateOnly",
35531
+ signature: "parseTime(input: TimeInput) => WallTime; formatTime(t: WallTime, { dateOnly? }) => string",
35532
+ description: "Wall-clock parsing and ISO formatting"
35533
+ },
35534
+ {
35535
+ name: "toLocalDate / startOfDay / dayIndex / weekday",
35536
+ signature: "(t: WallTime) => Date | WallTime | number",
35537
+ description: "Wall-time helpers"
35538
+ },
35539
+ {
35540
+ name: "createTimeFormatter",
35541
+ signature: "(locale: string | undefined, options: Intl.DateTimeFormatOptions) => (t: WallTime) => string",
35542
+ description: "Intl formatter for wall times"
35543
+ }
35544
+ ],
35545
+ layout: [
35546
+ {
35547
+ name: "ZOOM_LEVELS / ZOOM_PRESETS",
35548
+ signature: "ZoomLevel[] / Record<ZoomLevel, ZoomPreset>",
35549
+ description: "'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'; presets give pxPerDay, header tiers, snap unit and non-working shading"
35550
+ },
35551
+ {
35552
+ name: "createTimeScale",
35553
+ signature: "(start: WallTime, end: WallTime, pxPerDay: number) => TimeScale",
35554
+ description: "Time <-> x mapping"
35555
+ },
35556
+ {
35557
+ name: "timelineRange",
35558
+ signature: "(start, finish, zoom, { padding?, weekStartsOn?, minWidth? }) => { start; end }",
35559
+ description: "Padded, unit-aligned timeline range"
35560
+ },
35561
+ {
35562
+ name: "scaleTicks",
35563
+ signature: "(scale: TimeScale, unit: TimeUnit, options?: TickOptions) => Tick[]",
35564
+ description: "Header ticks with Intl labels"
35565
+ },
35566
+ {
35567
+ name: "floorUnit / addUnits / snapToUnit",
35568
+ signature: "(t: WallTime, unit: TimeUnit, ...) => WallTime",
35569
+ description: "Calendar-unit arithmetic"
35570
+ },
35571
+ {
35572
+ name: "virtualWindow",
35573
+ signature: "(options) => VirtualWindow",
35574
+ description: "Row virtualisation window"
35575
+ },
35576
+ {
35577
+ name: "barGeometry / hitTestBar",
35578
+ signature: "barGeometry(task: ScheduledTask, rowIndex, scale, options: BarOptions) => BarGeometry; hitTestBar(bar, x, handleWidth?) => 'resize-start' | 'resize-end' | 'move' | null",
35579
+ description: "Task, summary, milestone and baseline rectangles"
35580
+ },
35581
+ {
35582
+ name: "routeDependency / pathFromPoints",
35583
+ signature: "routeDependency(from, to, type: DependencyType, options) => Point[]; pathFromPoints(points, radius?) => string",
35584
+ description: "Orthogonal dependency arrows with rounded corners (SVG path)"
35585
+ }
35586
+ ],
35587
+ interaction: [
35588
+ {
35589
+ name: "createDragSession",
35590
+ signature: "(ctx: EditContext, mode: 'move' | 'resize-start' | 'resize-end', scale: TimeScale, originX: number)",
35591
+ description: "Turns pointer travel into snapped previews"
35592
+ },
35593
+ {
35594
+ name: "shiftTask / editOperation",
35595
+ signature: "shiftTask(ctx, mode, units) => EditPreview; editOperation(ctx, mode, preview) => GanttOperation | null",
35596
+ description: "Keyboard nudges and the resulting update-task operation, keeping the data's shape (start+end stays start+end, date-only stays date-only with day or coarser snapping; hourly edits use datetime strings)"
35597
+ },
35598
+ {
35599
+ name: "unitsForDelta / progressAt",
35600
+ signature: "unitsForDelta(scale, dx, unit) => number; progressAt(bar, x, step?) => number",
35601
+ description: "Pixel deltas to snap units; progress drag"
35602
+ },
35603
+ {
35604
+ name: "linkOperation / dependencyTypeFor / createId",
35605
+ signature: "linkOperation(from, to, type?, extra?) => GanttOperation; dependencyTypeFor(fromSide, toSide) => DependencyType",
35606
+ description: "Building add-dependency operations from bar-end drags"
35607
+ },
35608
+ {
35609
+ name: "rescheduleDates / rescheduleOperation",
35610
+ signature: "(ctx: EditContext, edit: { start?, finish?, duration? }) => EditPreview / UpdateTaskOperation | null",
35611
+ description: "Typed dates or durations (days at day snap, times at hour snap) to snapped dates and a shape-preserving update-task op; moving the start keeps the length"
35612
+ },
35613
+ {
35614
+ name: "predecessorOperations / parseDuration",
35615
+ signature: "predecessorOperations(taskId, dependencies, drafts: PredecessorDraft[]) => GanttOperation[]; parseDuration(text, minutesPerDay?) => number | undefined",
35616
+ description: "Diff a task's incoming links into remove/update/add ops; read '3', '3d', '4h', '2w' as working days"
35617
+ },
35618
+ {
35619
+ name: "indentOperation / outdentOperations / insertTaskOperation",
35620
+ signature: "indentOperation(tasks, id) => UpdateTaskOperation | null; outdentOperations(tasks, id) => UpdateTaskOperation[]; insertTaskOperation(tasks, afterId, task) => GanttOperation",
35621
+ description: "Outline edits: indent under the sibling above; outdent after the old parent, adopting later siblings; insert after a task's subtree"
35622
+ }
35623
+ ],
35624
+ a11y: [
35625
+ {
35626
+ name: "describeTask",
35627
+ signature: "(name: string, task: ScheduledTask, context) => string",
35628
+ description: "One sentence for aria-labels and announcements"
35629
+ },
35630
+ {
35631
+ name: "describeSchedule",
35632
+ signature: "(result: ScheduleResult, options?: DescribeOptions) => string",
35633
+ description: "Summary of the whole schedule, including conflict count"
35634
+ },
35635
+ {
35636
+ name: "ganttTable",
35637
+ signature: "(rows, schedule, dependencies?, options?) => GanttTable",
35638
+ description: "Plain table for the sr-only fallback and CSV export"
35639
+ },
35640
+ {
35641
+ name: "formatDuration",
35642
+ signature: "(minutes: number, minutesPerDay?: number) => string",
35643
+ description: "'3 days', '4 hours'"
35644
+ }
35645
+ ],
35646
+ io: [
35647
+ {
35648
+ name: "exportProject",
35649
+ signature: "(tasks, dependencies, calendars?, schedule?) => GanttProjectData",
35650
+ description: "Serialisable { version: 1, tasks, dependencies, calendars? }; Date values, including nested constraint/baseline fields, become wall-clock strings. Resolved dates are written back when a schedule is given"
35651
+ },
35652
+ {
35653
+ name: "importProject",
35654
+ signature: "(input: string | unknown) => GanttProjectData",
35655
+ description: "Parse and validate project JSON; throws a readable TypeError on bad input"
35656
+ },
35657
+ {
35658
+ name: "tableToCsv",
35659
+ signature: "(table: GanttTable) => string",
35660
+ description: "CSV text"
35661
+ }
35662
+ ]
35663
+ },
35664
+ component: {
35665
+ name: "Gantt",
35666
+ importPath: "@classic-homes/gantt-svelte",
35667
+ framework: "svelte",
35668
+ 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').",
35669
+ keyProps: {
35670
+ data: "tasks (required), dependencies, calendars, scheduleOptions",
35671
+ view: "zoom (bindable), zoomLevels, columns, gridWidth (bindable), columnWidths (bindable Record<id, px>), resizableColumns (default true), rowHeight, height, collapsed",
35672
+ toggles: "showToolbar, showCritical (bindable), showBaseline (bindable), showDependencies, showToday, showLabels, showProgress, exportable (Export menu: CSV, JSON, PNG of the current view)",
35673
+ states: "loading, error, onRetry, emptyMessage",
35674
+ locale: "locale, weekStartsOn",
35675
+ events: "ontaskclick(task, scheduled, event), ontaskdblclick(task, scheduled, event) (bar or row; opens the task dialog when editable unless event.preventDefault()), onselectionchange(ids)",
35676
+ other: "toolbarActions (Snippet), class",
35677
+ 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."
35678
+ },
35679
+ 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 }",
35680
+ methods: {
35681
+ scrollToTask: "(id: string) => Promise<void>: expands ancestors, selects and focuses the row, scrolls its bar into view",
35682
+ scrollToDate: "(date, align?: 'start' | 'center') => Promise<void>",
35683
+ getModel: "() => GanttModel (undo/redo, previews, direct edits)",
35684
+ getSchedule: "() => ScheduleResult",
35685
+ editTask: "(id: string) => boolean: opens the task dialog when editable; false for read-only tasks",
35686
+ addTask: "(afterId?: string | null) => Promise<string | null>: adds a task below afterId (default the focused row; an expanded summary gets it as first subtask) and starts editing its name",
35687
+ "indentTask / outdentTask": "(id: string) => boolean: Tab / Shift+Tab; outdent adopts the siblings below as subtasks",
35688
+ download: "(format: 'csv' | 'json' | 'png') => Promise<void>: same as the Export menu; JSON is exportProject of your own data (re-importable), PNG is the current view at 2x",
35689
+ deleteTask: "(id: string) => boolean: confirmation (AlertDialog), then removes the subtree and its links as one undo step; false for read-only tasks"
35690
+ },
35691
+ 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. When editable, Right Arrow from a row enters its cells (Left/Right between cells, Up/Down keep the column, Escape or Left from the first cell returns), Enter/F2 on a cell edits it, F2 on a row opens the task dialog.",
35692
+ example: `<script>
35693
+ import { Gantt } from '@classic-homes/gantt-svelte';
35694
+
35695
+ const tasks = [
35696
+ { id: 'design', name: 'Design', start: '2026-03-02', duration: 3, progress: 100 },
35697
+ { id: 'build', name: 'Build', duration: 5, progress: 20 },
35698
+ { id: 'launch', name: 'Launch', duration: 0 },
35699
+ ];
35700
+ const dependencies = [
35701
+ { id: 'd1', from: 'design', to: 'build' },
35702
+ { id: 'd2', from: 'build', to: 'launch' },
35703
+ ];
35704
+ </script>
35705
+
35706
+ <Gantt {tasks} {dependencies} title="Launch plan" showCritical />`,
35707
+ status: "Svelte only. Editing covers drag move/resize/progress, drag-to-link, keyboard nudges, the task dialog (GanttTaskDialog), in-place grid cell edits, add/indent/outdent and undo/redo. Next: PM polish (phase 4) and @classic-homes/gantt-react.",
35708
+ editing: {
35709
+ 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.",
35710
+ 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, F2 opens the task dialog, Insert adds a task below, Delete removes one (after confirmation), Tab/Shift+Tab indent/outdent (only when possible, so Tab can still leave the grid). Every edit is announced in a polite live region.",
35711
+ rules: "Edits snap to the zoom preset's unit and skip non-working time. Summary dates are derived from children. Readonly tasks protect their descendants and touching links. Operations keep the data's shape (start+end stays start+end, date-only stays date-only with day or coarser snapping; hourly edits use datetime strings); start constraints (SNET/MSO) move with the task. Form and cell edits use gantt-core rescheduleOperation, so they keep the same shape rules.",
35712
+ toolbar: "Add task, Outdent, Indent, Undo and Redo appear when editable.",
35713
+ dialog: "GanttTaskDialog (double-click a bar or row, F2, or editTask(id)) edits name, start, finish or duration (linked), progress, manual, constraint + date, deadline, calendar, assignees and predecessors (task, FS/SS/FF/SF, lag). Save validates with model.validate and applies ONE model.apply([...ops]) so one undo reverts it; errors (empty name, bad duration, cycles) show inline. Summaries show derived dates read-only. Delete confirms (AlertDialog) and removes the subtree and its links. Focus returns to the row (nearest row after delete).",
35714
+ cells: "Right Arrow from a row enters its cells; Enter/F2 edits name, start, finish, duration or progress in place (Enter saves, Escape cancels, Tab saves and moves to the next editable cell). Durations accept 3, 3d, 4h, 2w; dates 2026-03-02 (with time at hour zoom). Invalid input keeps the editor open with an error.",
35715
+ contextMenu: "Right-click a row or bar (editable only): Edit task (F2), Add task below (Insert), Indent (Tab), Outdent (Shift+Tab), Delete task (Delete); disabled for read-only tasks. Built on theme-svelte ContextMenu."
35716
+ }
35717
+ }
35718
+ };
35719
+
35720
+ // src/resources/gantt.ts
35721
+ var catalog5 = gantt_catalog_default;
35722
+ function registerGanttResources(server) {
35723
+ server.resource("Gantt Packages", "gantt://all", async (uri) => ({
35724
+ contents: [
35725
+ {
35726
+ uri: uri.href,
35727
+ mimeType: "application/json",
35728
+ text: JSON.stringify(catalog5, null, 2)
35729
+ }
35730
+ ]
35731
+ }));
35732
+ server.resource("Gantt Types", "gantt://types", async (uri) => ({
35733
+ contents: [
35734
+ {
35735
+ uri: uri.href,
35736
+ mimeType: "application/json",
35737
+ text: JSON.stringify(
35738
+ {
35739
+ importPath: "@classic-homes/gantt-core/types",
35740
+ description: "Gantt data model types exported from @classic-homes/gantt-core",
35741
+ time: catalog5.time,
35742
+ types: catalog5.types
35743
+ },
35744
+ null,
35745
+ 2
35746
+ )
35747
+ }
35748
+ ]
35749
+ }));
35750
+ server.resource("Gantt Scheduling", "gantt://scheduling", async (uri) => ({
35751
+ contents: [
35752
+ {
35753
+ uri: uri.href,
35754
+ mimeType: "application/json",
35755
+ text: JSON.stringify(
35756
+ {
35757
+ description: "How scheduleProject resolves dates, the createGanttModel edit API and the Gantt component props",
35758
+ time: catalog5.time,
35759
+ scheduling: catalog5.scheduling,
35760
+ model: catalog5.model,
35761
+ component: catalog5.component
35762
+ },
35763
+ null,
35764
+ 2
35765
+ )
35766
+ }
35767
+ ]
35768
+ }));
35769
+ }
35770
+
33475
35771
  // src/data/maps-catalog.json
33476
35772
  var maps_catalog_default = {
33477
- version: "0.3.9",
35773
+ version: "0.5.0",
33478
35774
  packageName: "@classic-homes/maps-core",
33479
35775
  description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
33480
35776
  subpackages: {
@@ -38754,14 +41050,14 @@ import { Map, Source, CircleLayer } from '@classic-homes/maps-react';
38754
41050
  };
38755
41051
 
38756
41052
  // src/resources/maps.ts
38757
- var catalog5 = maps_catalog_default;
41053
+ var catalog6 = maps_catalog_default;
38758
41054
  function registerMapsResources(server) {
38759
41055
  server.resource("Maps Core Package", "maps://all", async (uri) => ({
38760
41056
  contents: [
38761
41057
  {
38762
41058
  uri: uri.href,
38763
41059
  mimeType: "application/json",
38764
- text: JSON.stringify(catalog5, null, 2)
41060
+ text: JSON.stringify(catalog6, null, 2)
38765
41061
  }
38766
41062
  ]
38767
41063
  }));
@@ -38772,9 +41068,9 @@ function registerMapsResources(server) {
38772
41068
  mimeType: "application/json",
38773
41069
  text: JSON.stringify(
38774
41070
  {
38775
- importPath: catalog5.subpackages.theme.importPath,
38776
- description: catalog5.subpackages.theme.description,
38777
- functions: catalog5.subpackages.main.modules?.theme.functions
41071
+ importPath: catalog6.subpackages.theme.importPath,
41072
+ description: catalog6.subpackages.theme.description,
41073
+ functions: catalog6.subpackages.main.modules?.theme.functions
38778
41074
  },
38779
41075
  null,
38780
41076
  2
@@ -38789,11 +41085,11 @@ function registerMapsResources(server) {
38789
41085
  mimeType: "application/json",
38790
41086
  text: JSON.stringify(
38791
41087
  {
38792
- importPath: catalog5.subpackages.types.importPath,
41088
+ importPath: catalog6.subpackages.types.importPath,
38793
41089
  description: "TypeScript types exported from @classic-homes/maps-core",
38794
- props: catalog5.types.props,
38795
- data: catalog5.types.data,
38796
- events: catalog5.types.events
41090
+ props: catalog6.types.props,
41091
+ data: catalog6.types.data,
41092
+ events: catalog6.types.events
38797
41093
  },
38798
41094
  null,
38799
41095
  2
@@ -38808,11 +41104,11 @@ function registerMapsResources(server) {
38808
41104
  mimeType: "application/json",
38809
41105
  text: JSON.stringify(
38810
41106
  {
38811
- importPath: catalog5.subpackages.main.importPath,
41107
+ importPath: catalog6.subpackages.main.importPath,
38812
41108
  description: "Utility functions for formatting, accessibility, and styling",
38813
- format: catalog5.subpackages.main.modules?.format,
38814
- accessibility: catalog5.subpackages.main.modules?.accessibility,
38815
- styles: catalog5.subpackages.main.modules?.styles
41109
+ format: catalog6.subpackages.main.modules?.format,
41110
+ accessibility: catalog6.subpackages.main.modules?.accessibility,
41111
+ styles: catalog6.subpackages.main.modules?.styles
38816
41112
  },
38817
41113
  null,
38818
41114
  2
@@ -38825,7 +41121,7 @@ function registerMapsResources(server) {
38825
41121
  {
38826
41122
  uri: uri.href,
38827
41123
  mimeType: "application/json",
38828
- text: JSON.stringify(catalog5.subpackages.route, null, 2)
41124
+ text: JSON.stringify(catalog6.subpackages.route, null, 2)
38829
41125
  }
38830
41126
  ]
38831
41127
  }));
@@ -38834,7 +41130,7 @@ function registerMapsResources(server) {
38834
41130
  {
38835
41131
  uri: uri.href,
38836
41132
  mimeType: "application/json",
38837
- text: JSON.stringify(catalog5.subpackages.geocoding, null, 2)
41133
+ text: JSON.stringify(catalog6.subpackages.geocoding, null, 2)
38838
41134
  }
38839
41135
  ]
38840
41136
  }));
@@ -38843,7 +41139,7 @@ function registerMapsResources(server) {
38843
41139
  {
38844
41140
  uri: uri.href,
38845
41141
  mimeType: "application/json",
38846
- text: JSON.stringify(catalog5.components, null, 2)
41142
+ text: JSON.stringify(catalog6.components, null, 2)
38847
41143
  }
38848
41144
  ]
38849
41145
  }));
@@ -38857,30 +41153,30 @@ function registerMapsResources(server) {
38857
41153
  ## Installation
38858
41154
 
38859
41155
  \`\`\`bash
38860
- ${catalog5.quickReference.installation}
41156
+ ${catalog6.quickReference.installation}
38861
41157
  \`\`\`
38862
41158
 
38863
41159
  ## Basic Usage
38864
41160
 
38865
41161
  \`\`\`typescript
38866
- ${catalog5.quickReference.basicUsage}
41162
+ ${catalog6.quickReference.basicUsage}
38867
41163
  \`\`\`
38868
41164
 
38869
41165
  ## Peer Dependency
38870
41166
 
38871
- \`${catalog5.quickReference.peerDependency}\`
41167
+ \`${catalog6.quickReference.peerDependency}\`
38872
41168
 
38873
41169
  ## Optional Peer Dependencies (for Deck.gl)
38874
41170
 
38875
- \`${catalog5.quickReference.optionalPeerDependencies}\`
41171
+ \`${catalog6.quickReference.optionalPeerDependencies}\`
38876
41172
 
38877
41173
  ## Available Components
38878
41174
 
38879
41175
  **React:** \`@classic-homes/maps-react\`
38880
- - ${catalog5.components.react.components.join(", ")}
41176
+ - ${catalog6.components.react.components.join(", ")}
38881
41177
 
38882
41178
  **Svelte:** \`@classic-homes/maps-svelte\`
38883
- - ${catalog5.components.svelte.components.join(", ")}
41179
+ - ${catalog6.components.svelte.components.join(", ")}
38884
41180
 
38885
41181
  ## Theme Exports
38886
41182
 
@@ -38955,7 +41251,7 @@ ${catalog5.quickReference.basicUsage}
38955
41251
  {
38956
41252
  uri: uri.href,
38957
41253
  mimeType: "application/json",
38958
- text: JSON.stringify(catalog5.types.props, null, 2)
41254
+ text: JSON.stringify(catalog6.types.props, null, 2)
38959
41255
  }
38960
41256
  ]
38961
41257
  }));
@@ -38964,7 +41260,7 @@ ${catalog5.quickReference.basicUsage}
38964
41260
  {
38965
41261
  uri: uri.href,
38966
41262
  mimeType: "application/json",
38967
- text: JSON.stringify(catalog5.types.data, null, 2)
41263
+ text: JSON.stringify(catalog6.types.data, null, 2)
38968
41264
  }
38969
41265
  ]
38970
41266
  }));
@@ -38973,7 +41269,7 @@ ${catalog5.quickReference.basicUsage}
38973
41269
  {
38974
41270
  uri: uri.href,
38975
41271
  mimeType: "application/json",
38976
- text: JSON.stringify(catalog5.types.events, null, 2)
41272
+ text: JSON.stringify(catalog6.types.events, null, 2)
38977
41273
  }
38978
41274
  ]
38979
41275
  }));
@@ -38984,9 +41280,9 @@ ${catalog5.quickReference.basicUsage}
38984
41280
  mimeType: "application/json",
38985
41281
  text: JSON.stringify(
38986
41282
  {
38987
- package: catalog5.components.react.package,
38988
- hooks: catalog5.components.react.hooks,
38989
- context: catalog5.components.react.context
41283
+ package: catalog6.components.react.package,
41284
+ hooks: catalog6.components.react.hooks,
41285
+ context: catalog6.components.react.context
38990
41286
  },
38991
41287
  null,
38992
41288
  2
@@ -38999,7 +41295,7 @@ ${catalog5.quickReference.basicUsage}
38999
41295
  {
39000
41296
  uri: uri.href,
39001
41297
  mimeType: "application/json",
39002
- text: JSON.stringify(catalog5.bestPractices, null, 2)
41298
+ text: JSON.stringify(catalog6.bestPractices, null, 2)
39003
41299
  }
39004
41300
  ]
39005
41301
  }));
@@ -39008,7 +41304,7 @@ ${catalog5.quickReference.basicUsage}
39008
41304
  {
39009
41305
  uri: uri.href,
39010
41306
  mimeType: "application/json",
39011
- text: JSON.stringify(catalog5.themeTypes, null, 2)
41307
+ text: JSON.stringify(catalog6.themeTypes, null, 2)
39012
41308
  }
39013
41309
  ]
39014
41310
  }));
@@ -39019,11 +41315,11 @@ ${catalog5.quickReference.basicUsage}
39019
41315
  mimeType: "application/json",
39020
41316
  text: JSON.stringify(
39021
41317
  {
39022
- description: catalog5.types.overlayLayers?.description ?? "Overlay layer system for LayerManager",
39023
- types: catalog5.types.overlayLayers?.types ?? [],
39024
- utilities: catalog5.types.overlayLayers?.utilities ?? {},
39025
- cssImport: catalog5.types.overlayLayers?.cssImport ?? "@import '@classic-homes/maps-core/styles/layer-manager.css';",
39026
- example: catalog5.types.overlayLayers?.example ?? ""
41318
+ description: catalog6.types.overlayLayers?.description ?? "Overlay layer system for LayerManager",
41319
+ types: catalog6.types.overlayLayers?.types ?? [],
41320
+ utilities: catalog6.types.overlayLayers?.utilities ?? {},
41321
+ cssImport: catalog6.types.overlayLayers?.cssImport ?? "@import '@classic-homes/maps-core/styles/layer-manager.css';",
41322
+ example: catalog6.types.overlayLayers?.example ?? ""
39027
41323
  },
39028
41324
  null,
39029
41325
  2
@@ -39040,24 +41336,24 @@ ${catalog5.quickReference.basicUsage}
39040
41336
 
39041
41337
  ## Key Differences
39042
41338
 
39043
- ${catalog5.bestPractices?.mapboxMigration.differences?.map((d) => `- ${d}`).join("\n")}
41339
+ ${catalog6.bestPractices?.mapboxMigration.differences?.map((d) => `- ${d}`).join("\n")}
39044
41340
 
39045
41341
  ## Example Migration
39046
41342
 
39047
41343
  \`\`\`typescript
39048
- ${catalog5.bestPractices?.mapboxMigration.exampleMigration}
41344
+ ${catalog6.bestPractices?.mapboxMigration.exampleMigration}
39049
41345
  \`\`\`
39050
41346
 
39051
41347
  ## CSS Setup
39052
41348
 
39053
41349
  \`\`\`css
39054
- ${catalog5.quickReference.cssImportOrder}
41350
+ ${catalog6.quickReference.cssImportOrder}
39055
41351
  \`\`\`
39056
41352
 
39057
41353
  ## Tailwind Configuration
39058
41354
 
39059
41355
  \`\`\`javascript
39060
- ${catalog5.quickReference.tailwindConfig}
41356
+ ${catalog6.quickReference.tailwindConfig}
39061
41357
  \`\`\`
39062
41358
  `
39063
41359
  }
@@ -39073,8 +41369,8 @@ ${catalog5.quickReference.tailwindConfig}
39073
41369
  description: "Centralized positioning coordinator for map controls with collision detection, priority-based resolution, and automatic z-index management",
39074
41370
  class: "PositioningCoordinator",
39075
41371
  factory: "createPositioningCoordinator",
39076
- module: catalog5.subpackages.main.modules?.positioning,
39077
- types: catalog5.types.positioning,
41372
+ module: catalog6.subpackages.main.modules?.positioning,
41373
+ types: catalog6.types.positioning,
39078
41374
  hooks: {
39079
41375
  react: {
39080
41376
  name: "useControlPosition",
@@ -39100,7 +41396,7 @@ ${catalog5.quickReference.tailwindConfig}
39100
41396
 
39101
41397
  // src/data/native-catalog.json
39102
41398
  var native_catalog_default = {
39103
- version: "0.3.9",
41399
+ version: "0.5.0",
39104
41400
  packageName: "@classic-homes/native",
39105
41401
  description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
39106
41402
  subpackages: {
@@ -40597,14 +42893,14 @@ var native_catalog_default = {
40597
42893
  };
40598
42894
 
40599
42895
  // src/resources/native.ts
40600
- var catalog6 = native_catalog_default;
42896
+ var catalog7 = native_catalog_default;
40601
42897
  function registerNativeResources(server) {
40602
42898
  server.resource("Native Package", "native://all", async (uri) => ({
40603
42899
  contents: [
40604
42900
  {
40605
42901
  uri: uri.href,
40606
42902
  mimeType: "application/json",
40607
- text: JSON.stringify(catalog6, null, 2)
42903
+ text: JSON.stringify(catalog7, null, 2)
40608
42904
  }
40609
42905
  ]
40610
42906
  }));
@@ -40615,9 +42911,9 @@ function registerNativeResources(server) {
40615
42911
  mimeType: "application/json",
40616
42912
  text: JSON.stringify(
40617
42913
  {
40618
- importPath: catalog6.subpackages.react.importPath,
40619
- description: catalog6.subpackages.react.description,
40620
- hooks: catalog6.subpackages.react.hooks
42914
+ importPath: catalog7.subpackages.react.importPath,
42915
+ description: catalog7.subpackages.react.description,
42916
+ hooks: catalog7.subpackages.react.hooks
40621
42917
  },
40622
42918
  null,
40623
42919
  2
@@ -40632,10 +42928,10 @@ function registerNativeResources(server) {
40632
42928
  mimeType: "application/json",
40633
42929
  text: JSON.stringify(
40634
42930
  {
40635
- importPath: catalog6.subpackages.svelte.importPath,
40636
- description: catalog6.subpackages.svelte.description,
40637
- composables: catalog6.subpackages.svelte.composables,
40638
- functions: catalog6.subpackages.svelte.functions
42931
+ importPath: catalog7.subpackages.svelte.importPath,
42932
+ description: catalog7.subpackages.svelte.description,
42933
+ composables: catalog7.subpackages.svelte.composables,
42934
+ functions: catalog7.subpackages.svelte.functions
40639
42935
  },
40640
42936
  null,
40641
42937
  2
@@ -40650,10 +42946,10 @@ function registerNativeResources(server) {
40650
42946
  mimeType: "application/json",
40651
42947
  text: JSON.stringify(
40652
42948
  {
40653
- importPath: catalog6.subpackages.core.importPath,
40654
- description: catalog6.subpackages.core.description,
40655
- functions: catalog6.subpackages.core.functions,
40656
- types: catalog6.subpackages.core.types
42949
+ importPath: catalog7.subpackages.core.importPath,
42950
+ description: catalog7.subpackages.core.description,
42951
+ functions: catalog7.subpackages.core.functions,
42952
+ types: catalog7.subpackages.core.types
40657
42953
  },
40658
42954
  null,
40659
42955
  2
@@ -40669,7 +42965,7 @@ function registerNativeResources(server) {
40669
42965
  text: JSON.stringify(
40670
42966
  {
40671
42967
  description: "Native features with platform support and fallbacks",
40672
- features: catalog6.features
42968
+ features: catalog7.features
40673
42969
  },
40674
42970
  null,
40675
42971
  2
@@ -40682,7 +42978,7 @@ function registerNativeResources(server) {
40682
42978
  {
40683
42979
  uri: uri.href,
40684
42980
  mimeType: "application/json",
40685
- text: JSON.stringify(catalog6.types, null, 2)
42981
+ text: JSON.stringify(catalog7.types, null, 2)
40686
42982
  }
40687
42983
  ]
40688
42984
  }));
@@ -40696,40 +42992,40 @@ function registerNativeResources(server) {
40696
42992
  ## Installation
40697
42993
 
40698
42994
  \`\`\`bash
40699
- ${catalog6.quickReference.installation}
42995
+ ${catalog7.quickReference.installation}
40700
42996
  \`\`\`
40701
42997
 
40702
42998
  ## Peer Dependency
40703
42999
 
40704
- \`${catalog6.quickReference.peerDependency}\`
43000
+ \`${catalog7.quickReference.peerDependency}\`
40705
43001
 
40706
43002
  ## Optional Plugins
40707
43003
 
40708
43004
  Install only the Capacitor plugins you need:
40709
43005
 
40710
43006
  \`\`\`bash
40711
- ${catalog6.quickReference.optionalPlugins.map((p) => `npm install ${p}`).join("\n")}
43007
+ ${catalog7.quickReference.optionalPlugins.map((p) => `npm install ${p}`).join("\n")}
40712
43008
  \`\`\`
40713
43009
 
40714
43010
  ## Basic Usage
40715
43011
 
40716
43012
  \`\`\`typescript
40717
- ${catalog6.quickReference.basicUsage}
43013
+ ${catalog7.quickReference.basicUsage}
40718
43014
  \`\`\`
40719
43015
 
40720
43016
  ## Features Matrix
40721
43017
 
40722
43018
  | Feature | Hook | iOS | Android | Web Fallback |
40723
43019
  |---------|------|-----|---------|--------------|
40724
- ${catalog6.features.map((f) => `| ${f.name} | \`${f.hook}\` | ${f.ios} | ${f.android} | ${f.webFallback} |`).join("\n")}
43020
+ ${catalog7.features.map((f) => `| ${f.name} | \`${f.hook}\` | ${f.ios} | ${f.android} | ${f.webFallback} |`).join("\n")}
40725
43021
 
40726
43022
  ## React Hooks
40727
43023
 
40728
- ${catalog6.subpackages.react.hooks?.map((h) => `- \`${h.name}\` - ${h.description}`).join("\n")}
43024
+ ${catalog7.subpackages.react.hooks?.map((h) => `- \`${h.name}\` - ${h.description}`).join("\n")}
40729
43025
 
40730
43026
  ## Svelte Composables
40731
43027
 
40732
- ${catalog6.subpackages.svelte.composables?.map((c) => `- \`${c.name}\` - ${c.description}`).join("\n")}
43028
+ ${catalog7.subpackages.svelte.composables?.map((c) => `- \`${c.name}\` - ${c.description}`).join("\n")}
40733
43029
 
40734
43030
  ## Platform Detection
40735
43031
 
@@ -40802,6 +43098,372 @@ import { NativeGuard, usePlatformCheck } from '@classic-homes/native/react';
40802
43098
  }));
40803
43099
  }
40804
43100
 
43101
+ // src/data/viewer-catalog.json
43102
+ var viewer_catalog_default = {
43103
+ version: "0.5.0",
43104
+ packageName: "@classic-homes/viewer-svelte",
43105
+ description: "Client-side, view-only document viewers: PDF, Word (.docx), Excel (.xlsx), CSV/TSV and CAD (DXF; DWG through the separate GPL package). Files are parsed and rendered in the browser; nothing is uploaded or converted on a server. Each format is a lazy-loaded subpath with an optional peer dependency, so apps only bundle what they register. Svelte 5 only; a React package (viewer-react) is planned.",
43106
+ packages: {
43107
+ core: {
43108
+ name: "@classic-homes/viewer-core",
43109
+ license: "MIT",
43110
+ description: "Framework-agnostic utilities. Runtime deps: fflate, numfmt (used by /sheet).",
43111
+ subpaths: {
43112
+ "@classic-homes/viewer-core": "types, detect, source, zoom, search, sanitize and layout together",
43113
+ "@classic-homes/viewer-core/types": "DocumentKind, RenderableKind, ViewerSource, LoadedSource, ViewerError, ZoomMode, KIND_INFO, acceptFor",
43114
+ "@classic-homes/viewer-core/detect": "detectKind(bytes, name?, mime?): magic bytes first, then extension, then MIME; flags encrypted PDF/OOXML",
43115
+ "@classic-homes/viewer-core/source": "loadSource(source, { maxBytes, signal, fetchInit, name, mime }) \u2192 LoadedSource; streaming size cap (default 100 MB)",
43116
+ "@classic-homes/viewer-core/zoom": "zoom ladder, clamp, fitWidth/fitPage, resolveZoom, formatZoom, anchoredScroll",
43117
+ "@classic-homes/viewer-core/search": "findInText, findAll, nextMatch, prevMatch",
43118
+ "@classic-homes/viewer-core/sanitize": "safeHref (http(s)/mailto allow-list) and EXTERNAL_LINK_ATTRS",
43119
+ "@classic-homes/viewer-core/layout": "paged-stack layout and visible-page virtualisation",
43120
+ "@classic-homes/viewer-core/sheet": "read-only XLSX/CSV reader \u2192 plain cloneable Sheet model (openSheetReader, XlsxWorkbook, parseCsv)",
43121
+ "@classic-homes/viewer-core/sheet/worker": "Web Worker entry for the sheet reader",
43122
+ "@classic-homes/viewer-core/zip": "SafeZip: size-checked ZIP reading, repack() for libraries without inflate limits",
43123
+ "@classic-homes/viewer-core/cad": "readDxfHeader (version, code page \u2192 encoding, units, binary flag), dwgVersion, cadRelease, 2-D view math"
43124
+ }
43125
+ },
43126
+ svelte: {
43127
+ name: "@classic-homes/viewer-svelte",
43128
+ license: "MIT",
43129
+ peerDependencies: {
43130
+ svelte: "^5.20.0",
43131
+ "pdfjs-dist": "^6.0.0 (optional, for /pdf)",
43132
+ "docx-preview": ">=0.4.0 <1 (optional, for /docx)",
43133
+ "dxf-viewer": "^1.0.50 (optional, for /cad; brings three.js)"
43134
+ },
43135
+ subpaths: {
43136
+ "@classic-homes/viewer-svelte": "DocumentViewer, ViewerFrame, ViewerToolbar, ViewerState, useFullscreen, createViewerShortcuts, downloadBytes, plus core re-exports (loadSource, detectKind, acceptFor, ViewerError, types)",
43137
+ "@classic-homes/viewer-svelte/pdf": "PdfViewer (default export), configurePdf",
43138
+ "@classic-homes/viewer-svelte/xlsx": "SpreadsheetViewer (default export, xlsx + csv), SheetGrid, configureSpreadsheet",
43139
+ "@classic-homes/viewer-svelte/docx": "DocxViewer (default export)",
43140
+ "@classic-homes/viewer-svelte/cad": "CadViewer (default export), configureCad",
43141
+ "@classic-homes/viewer-svelte/cad/worker": "Web Worker entry for DXF parsing"
43142
+ }
43143
+ },
43144
+ dwg: {
43145
+ name: "@classic-homes/viewer-dwg",
43146
+ license: "GPL-3.0-or-later",
43147
+ licenseNote: "Bundles LibreDWG (GPL). Separate and opt-in: the MIT viewer packages never depend on it. An app that bundles it ships GPL code to users' browsers and must comply with the GPL; get licensing sign-off per app before suggesting it.",
43148
+ dependencies: {
43149
+ "@mlightcad/libredwg-web": "0.8.3 (exact: JS glue and .wasm must match)"
43150
+ },
43151
+ subpaths: {
43152
+ "@classic-homes/viewer-dwg": "configureDwg, dwgToDxf(bytes, { signal }), writeDxf, describeSkipped",
43153
+ "@classic-homes/viewer-dwg/svelte": "DwgViewer (default export)",
43154
+ "@classic-homes/viewer-dwg/worker": "Web Worker entry for conversion",
43155
+ "@classic-homes/viewer-dwg/libredwg-web.wasm": "LibreDWG WebAssembly binary (~11 MB, 2.5 MB gzipped), import with ?url"
43156
+ }
43157
+ }
43158
+ },
43159
+ formats: [
43160
+ {
43161
+ kind: "pdf",
43162
+ label: "PDF",
43163
+ component: "PdfViewer",
43164
+ import: "@classic-homes/viewer-svelte/pdf",
43165
+ peer: "pdfjs-dist@^6",
43166
+ configure: "configurePdf({ workerSrc }) (required); optional cMapUrl, standardFontDataUrl, wasmUrl",
43167
+ features: [
43168
+ "canvas pages with selectable text layer",
43169
+ "find",
43170
+ "internal and web links",
43171
+ "page navigation",
43172
+ "virtualised pages",
43173
+ "Ctrl+wheel/pinch zoom around the pointer",
43174
+ "print",
43175
+ "download"
43176
+ ],
43177
+ limits: [
43178
+ "password-protected PDFs get an 'encrypted' state (owner-password-only PDFs open)",
43179
+ "non-embedded CJK/standard fonts need cMapUrl/standardFontDataUrl"
43180
+ ]
43181
+ },
43182
+ {
43183
+ kind: "xlsx",
43184
+ label: "Excel workbook",
43185
+ component: "SpreadsheetViewer",
43186
+ import: "@classic-homes/viewer-svelte/xlsx",
43187
+ peer: null,
43188
+ configure: "configureSpreadsheet({ worker?, maxCells? }) (optional)",
43189
+ features: [
43190
+ "number formats",
43191
+ "fonts, fills, borders, alignment, wrapping",
43192
+ "merged cells",
43193
+ "column widths and row heights",
43194
+ "hidden rows/columns",
43195
+ "frozen panes",
43196
+ "hyperlinks incl. to other sheets",
43197
+ "cached formula results; formula in status bar",
43198
+ "sheet tabs",
43199
+ "find",
43200
+ "keyboard cell navigation and copy"
43201
+ ],
43202
+ limits: [
43203
+ "no charts, images, conditional formatting, table styles or pivot tables (a note says when present)",
43204
+ "hidden sheets not listed",
43205
+ "sheets cut at maxCells (default 2,000,000)",
43206
+ "no recalculation"
43207
+ ]
43208
+ },
43209
+ {
43210
+ kind: "csv",
43211
+ label: "CSV / TSV",
43212
+ component: "SpreadsheetViewer",
43213
+ import: "@classic-homes/viewer-svelte/xlsx",
43214
+ peer: null,
43215
+ configure: "same as xlsx",
43216
+ features: [
43217
+ "delimiter detected from the first lines"
43218
+ ],
43219
+ limits: []
43220
+ },
43221
+ {
43222
+ kind: "docx",
43223
+ label: "Word document",
43224
+ component: "DocxViewer",
43225
+ import: "@classic-homes/viewer-svelte/docx",
43226
+ peer: "docx-preview",
43227
+ configure: null,
43228
+ features: [
43229
+ "paged layout",
43230
+ "headers, footers, footnotes, endnotes",
43231
+ "tables, images, lists, embedded fonts",
43232
+ "find",
43233
+ "zoom",
43234
+ "page navigation",
43235
+ "bookmark links scroll in the viewer",
43236
+ "print",
43237
+ "rendered in a shadow root (style isolation)"
43238
+ ],
43239
+ limits: [
43240
+ "no tracked changes, comments or embedded HTML (altChunk)",
43241
+ "pages break only at explicit and saved breaks",
43242
+ "fields show last-saved values"
43243
+ ]
43244
+ },
43245
+ {
43246
+ kind: "dxf",
43247
+ label: "DXF drawing",
43248
+ component: "CadViewer",
43249
+ import: "@classic-homes/viewer-svelte/cad",
43250
+ peer: "dxf-viewer (brings three.js; needs WebGL)",
43251
+ configure: "configureCad({ worker?, fonts }) (fonts needed for any text: TTF/OTF/WOFF)",
43252
+ features: [
43253
+ "lines, polylines, arcs, circles, ellipses, splines, hatches, solids, text, mtext, dimensions, blocks",
43254
+ "layer panel with filter",
43255
+ "theme/dark/light background with colour correction",
43256
+ "cursor readout in drawing units",
43257
+ "keyboard pan/zoom/fit",
43258
+ "print current view",
43259
+ "pre-2007 code pages"
43260
+ ],
43261
+ limits: [
43262
+ "ASCII DXF only (binary DXF unsupported)",
43263
+ "needs WebGL",
43264
+ "model space only"
43265
+ ]
43266
+ },
43267
+ {
43268
+ kind: "dwg",
43269
+ label: "DWG drawing",
43270
+ component: "DwgViewer",
43271
+ import: "@classic-homes/viewer-dwg/svelte",
43272
+ peer: "@classic-homes/viewer-dwg (GPL-3.0-or-later) + dxf-viewer",
43273
+ configure: "configureDwg({ worker, wasmUrl }) plus configureCad",
43274
+ features: [
43275
+ "AutoCAD R14 to 2018 converted to DXF in a worker",
43276
+ "everything CadViewer draws",
43277
+ "note naming the release and what is not shown",
43278
+ "download saves the original DWG"
43279
+ ],
43280
+ limits: [
43281
+ "no tables, multileaders, multilines, 3D solids/faces, wipeouts, construction lines, images, OLE or proxy objects",
43282
+ "paper space not shown",
43283
+ "very large drawings can exhaust WASM memory ('too-large')",
43284
+ "~2.5 MB gzipped wasm on first use"
43285
+ ]
43286
+ }
43287
+ ],
43288
+ legacyFormats: {
43289
+ doc: "Detected, not rendered: message suggests saving as .docx",
43290
+ xls: "Detected, not rendered: message suggests saving as .xlsx",
43291
+ dwg: "Without @classic-homes/viewer-dwg registered: message names the AutoCAD release and suggests saving as DXF"
43292
+ },
43293
+ setup: {
43294
+ install: "npm install @classic-homes/viewer-svelte pdfjs-dist docx-preview dxf-viewer (only the peers for formats you show)",
43295
+ hooksClient: "// src/hooks.client.ts\nimport { configurePdf } from '@classic-homes/viewer-svelte/pdf';\nimport pdfWorkerSrc from 'pdfjs-dist/build/pdf.worker.min.mjs?url';\nimport { configureSpreadsheet } from '@classic-homes/viewer-svelte/xlsx';\nimport SheetWorker from '@classic-homes/viewer-core/sheet/worker?worker';\nimport { configureCad } from '@classic-homes/viewer-svelte/cad';\nimport CadWorker from '@classic-homes/viewer-svelte/cad/worker?worker';\n\nconfigurePdf({ workerSrc: pdfWorkerSrc });\nconfigureSpreadsheet({ worker: () => new SheetWorker() });\nconfigureCad({ worker: () => new CadWorker(), fonts: ['/fonts/NotoSans-Regular.ttf'] });",
43296
+ dwgOptIn: "// GPL: only with licensing sign-off\nimport { configureDwg } from '@classic-homes/viewer-dwg';\nimport DwgWorker from '@classic-homes/viewer-dwg/worker?worker';\nimport wasmUrl from '@classic-homes/viewer-dwg/libredwg-web.wasm?url';\nconfigureDwg({ worker: () => new DwgWorker(), wasmUrl });",
43297
+ tailwindContent: "'./node_modules/@classic-homes/viewer-svelte/dist/**/*.{js,svelte}'",
43298
+ example: `<script lang="ts">
43299
+ import { DocumentViewer, acceptFor, type ViewerRegistry } from '@classic-homes/viewer-svelte';
43300
+
43301
+ const viewers: ViewerRegistry = {
43302
+ pdf: () => import('@classic-homes/viewer-svelte/pdf'),
43303
+ docx: () => import('@classic-homes/viewer-svelte/docx'),
43304
+ xlsx: () => import('@classic-homes/viewer-svelte/xlsx'),
43305
+ csv: () => import('@classic-homes/viewer-svelte/xlsx'),
43306
+ dxf: () => import('@classic-homes/viewer-svelte/cad'),
43307
+ };
43308
+ let file = $state<File>();
43309
+ </script>
43310
+
43311
+ <input type="file" accept={acceptFor()} onchange={(e) => (file = e.currentTarget.files?.[0])} />
43312
+ <DocumentViewer source={file} {viewers} class="h-[80vh]" />`,
43313
+ rules: [
43314
+ "Register formats as lazy imports in the viewers registry; never import a format subpath statically into shared code, or every app bundles every peer.",
43315
+ 'Give the viewer a height (class="h-[80vh]" or a sized parent).',
43316
+ "Set configure* once at app start on the client (hooks.client.ts), not per component.",
43317
+ "Use acceptFor(Object.keys(viewers)) so the file picker offers exactly what you can show; acceptFor() without arguments leaves out DWG."
43318
+ ]
43319
+ },
43320
+ components: {
43321
+ DocumentViewer: {
43322
+ import: "@classic-homes/viewer-svelte",
43323
+ description: "Loads any source, detects the format, lazy-loads the registered viewer, and shows loading/error/unsupported states with a download fallback.",
43324
+ props: {
43325
+ source: "ViewerSource: File | Blob | URL | string (fetched) | ArrayBuffer | ArrayBufferView | { blob, filename?, contentType? } (offline-core file)",
43326
+ viewers: "ViewerRegistry (required): Partial<Record<RenderableKind, () => Promise<{ default: Component }>>>",
43327
+ name: "string: file-name hint",
43328
+ mime: "string: MIME hint",
43329
+ maxBytes: "number, default 104857600 (100 MB)",
43330
+ fetchInit: "RequestInit for URL sources",
43331
+ allowDownload: "boolean, default true",
43332
+ hideToolbar: "boolean, default false",
43333
+ onload: "(info: { kind, name?, size }) => void",
43334
+ onerror: "(error: ViewerError) => void",
43335
+ class: "string"
43336
+ }
43337
+ },
43338
+ PdfViewer: {
43339
+ import: "@classic-homes/viewer-svelte/pdf",
43340
+ props: {
43341
+ source: "LoadedSource (required): { bytes: Uint8Array; name?: string; mime?: string } from loadSource()",
43342
+ kind: "RenderableKind (required)",
43343
+ onready: "() => void: first view on screen",
43344
+ onerror: "(error: ViewerError) => void",
43345
+ hideToolbar: "boolean, default false",
43346
+ class: "string",
43347
+ initialZoom: "ZoomMode = number | 'fit-width' | 'fit-page', default 'fit-width'",
43348
+ initialPage: "number, 1-based, default 1"
43349
+ }
43350
+ },
43351
+ SpreadsheetViewer: {
43352
+ import: "@classic-homes/viewer-svelte/xlsx",
43353
+ props: {
43354
+ source: "LoadedSource (required): { bytes: Uint8Array; name?: string; mime?: string } from loadSource()",
43355
+ kind: "RenderableKind (required)",
43356
+ onready: "() => void: first view on screen",
43357
+ onerror: "(error: ViewerError) => void",
43358
+ hideToolbar: "boolean, default false",
43359
+ class: "string",
43360
+ initialSheet: "string | number: sheet name or 0-based index"
43361
+ }
43362
+ },
43363
+ DocxViewer: {
43364
+ import: "@classic-homes/viewer-svelte/docx",
43365
+ props: {
43366
+ source: "LoadedSource (required): { bytes: Uint8Array; name?: string; mime?: string } from loadSource()",
43367
+ kind: "RenderableKind (required)",
43368
+ onready: "() => void: first view on screen",
43369
+ onerror: "(error: ViewerError) => void",
43370
+ hideToolbar: "boolean, default false",
43371
+ class: "string",
43372
+ initialZoom: "ZoomMode, default 'fit-width' (never above 100%)"
43373
+ }
43374
+ },
43375
+ CadViewer: {
43376
+ import: "@classic-homes/viewer-svelte/cad",
43377
+ props: {
43378
+ source: "LoadedSource (required): { bytes: Uint8Array; name?: string; mime?: string } from loadSource()",
43379
+ kind: "RenderableKind (required)",
43380
+ onready: "() => void: first view on screen",
43381
+ onerror: "(error: ViewerError) => void",
43382
+ hideToolbar: "boolean, default false",
43383
+ class: "string",
43384
+ background: "'theme' | 'dark' | 'light', default 'theme'",
43385
+ showLayers: "boolean, default false",
43386
+ fonts: "string[]: overrides configureCad fonts",
43387
+ downloadSource: "{ bytes, name?, mime? }: what Download saves when source was derived (e.g. converted DWG)",
43388
+ notice: "string: note under the toolbar"
43389
+ }
43390
+ },
43391
+ DwgViewer: {
43392
+ import: "@classic-homes/viewer-dwg/svelte",
43393
+ license: "GPL-3.0-or-later",
43394
+ props: {
43395
+ source: "LoadedSource (required): { bytes: Uint8Array; name?: string; mime?: string } from loadSource()",
43396
+ kind: "RenderableKind (required)",
43397
+ onready: "() => void: first view on screen",
43398
+ onerror: "(error: ViewerError) => void",
43399
+ hideToolbar: "boolean, default false",
43400
+ class: "string",
43401
+ background: "'theme' | 'dark' | 'light', default 'theme'",
43402
+ showLayers: "boolean, default false",
43403
+ fonts: "string[]"
43404
+ }
43405
+ }
43406
+ },
43407
+ errors: {
43408
+ class: "ViewerError (code, message, kind?) from @classic-homes/viewer-core; isViewerError(e) to narrow",
43409
+ codes: {
43410
+ unsupported: "no viewer registered, legacy .doc/.xls, binary DXF, no WebGL, DWG without viewer-dwg",
43411
+ "too-large": "over maxBytes, or a DWG too big for WASM memory",
43412
+ encrypted: "password-protected PDF or Office file",
43413
+ corrupt: "the parser rejected the file",
43414
+ "load-failed": "network/read failure, or a worker or WASM that failed to start",
43415
+ "missing-dependency": "the format's optional peer is not installed",
43416
+ aborted: "loading was cancelled"
43417
+ }
43418
+ },
43419
+ keyboard: {
43420
+ "Ctrl/Cmd + = / -": "zoom in / out",
43421
+ "Ctrl/Cmd + 0": "reset zoom (PDF/Word toggle fit width/page; Excel 100%; CAD fit)",
43422
+ "Ctrl/Cmd + F": "find (PDF, Word, Excel)",
43423
+ "Enter / Shift+Enter": "next / previous match",
43424
+ "PageDown / PageUp, Home / End": "pages (PDF, Word)",
43425
+ "Arrows, + / -, 0": "CAD: pan, zoom, fit while the drawing has focus"
43426
+ },
43427
+ security: [
43428
+ "Office ZIP entries are size-checked before inflation (SafeZip), so small files cannot expand into gigabytes.",
43429
+ "Links from documents pass safeHref: only http(s) and mailto, opened in a new tab with rel=noopener noreferrer nofollow.",
43430
+ "pdf.js runs with isEvalSupported: false.",
43431
+ "docx-preview: altChunk (embedded HTML) disabled, archive repacked through SafeZip, output sanitised in a shadow root.",
43432
+ "DWG conversion runs in a worker inside the WASM heap; a crashed instance is discarded."
43433
+ ]
43434
+ };
43435
+
43436
+ // src/resources/viewers.ts
43437
+ var catalog8 = viewer_catalog_default;
43438
+ var json = (uri, value) => ({
43439
+ contents: [{ uri: uri.href, mimeType: "application/json", text: JSON.stringify(value, null, 2) }]
43440
+ });
43441
+ function registerViewerResources(server) {
43442
+ server.resource("Document Viewers", "viewers://all", async (uri) => json(uri, catalog8));
43443
+ server.resource(
43444
+ "Viewer Formats",
43445
+ "viewers://formats",
43446
+ async (uri) => json(uri, {
43447
+ description: "Formats the document viewers show, with the component, import, peer dependency, configuration, features and limits of each",
43448
+ formats: catalog8.formats,
43449
+ legacyFormats: catalog8.legacyFormats
43450
+ })
43451
+ );
43452
+ server.resource(
43453
+ "Viewer Setup",
43454
+ "viewers://setup",
43455
+ async (uri) => json(uri, {
43456
+ description: "How to install and configure the viewers, the DocumentViewer registry, component props, error codes and security notes",
43457
+ packages: catalog8.packages,
43458
+ setup: catalog8.setup,
43459
+ components: catalog8.components,
43460
+ errors: catalog8.errors,
43461
+ keyboard: catalog8.keyboard,
43462
+ security: catalog8.security
43463
+ })
43464
+ );
43465
+ }
43466
+
40805
43467
  // src/resources/index.ts
40806
43468
  function registerResources(server) {
40807
43469
  registerComponentResources(server);
@@ -40813,14 +43475,16 @@ function registerResources(server) {
40813
43475
  registerNotificationsResources(server);
40814
43476
  registerDocsResources(server);
40815
43477
  registerChartsResources(server);
43478
+ registerGanttResources(server);
40816
43479
  registerMapsResources(server);
40817
43480
  registerNativeResources(server);
43481
+ registerViewerResources(server);
40818
43482
  }
40819
43483
 
40820
43484
  // src/tools/searchComponents.ts
40821
43485
  import { z } from "zod";
40822
- var catalog7 = component_catalog_default;
40823
- var categories = [...new Set(catalog7.components.map((c) => c.category))].sort();
43486
+ var catalog9 = component_catalog_default;
43487
+ var categories = [...new Set(catalog9.components.map((c) => c.category))].sort();
40824
43488
  var SearchComponentsSchema = z.object({
40825
43489
  query: z.string().describe("Search query (component name, description, or functionality)"),
40826
43490
  category: z.enum(categories).optional().describe("Filter by component category"),
@@ -40836,7 +43500,7 @@ function registerSearchComponentsTool(server) {
40836
43500
  const queryLower = query.toLowerCase().trim();
40837
43501
  const isListAll = queryLower === "*" || queryLower === "all" || queryLower === "" || queryLower === "list" || queryLower === "list all";
40838
43502
  const queryWords = queryLower.split(/\s+/).filter((word) => word.length > 0);
40839
- const results = catalog7.components.filter((component) => {
43503
+ const results = catalog9.components.filter((component) => {
40840
43504
  if (category && component.category !== category) {
40841
43505
  return false;
40842
43506
  }
@@ -40910,7 +43574,7 @@ var mapsComponents = new Set(
40910
43574
  (name) => name.toLowerCase()
40911
43575
  )
40912
43576
  );
40913
- function componentNotFound(catalog11, componentName) {
43577
+ function componentNotFound(catalog13, componentName) {
40914
43578
  const query = componentName.trim().toLowerCase();
40915
43579
  if (mapsComponents.has(query)) {
40916
43580
  return {
@@ -40920,7 +43584,7 @@ function componentNotFound(catalog11, componentName) {
40920
43584
  };
40921
43585
  }
40922
43586
  const prefix = query.slice(0, 3);
40923
- const suggestions = prefix ? catalog11.components.filter((c) => c.name.toLowerCase().includes(prefix)).slice(0, 5).map((c) => c.name) : [];
43587
+ const suggestions = prefix ? catalog13.components.filter((c) => c.name.toLowerCase().includes(prefix)).slice(0, 5).map((c) => c.name) : [];
40924
43588
  return {
40925
43589
  maps: false,
40926
43590
  message: `Component "${componentName}" not found`,
@@ -40930,7 +43594,7 @@ function componentNotFound(catalog11, componentName) {
40930
43594
  }
40931
43595
 
40932
43596
  // src/tools/getComponentProps.ts
40933
- var catalog8 = component_catalog_default;
43597
+ var catalog10 = component_catalog_default;
40934
43598
  var GetComponentPropsSchema = z2.object({
40935
43599
  componentName: z2.string().trim().min(1).describe('Name of the component (e.g., "Button", "DashboardLayout")'),
40936
43600
  includeExamples: z2.boolean().default(true).describe("Whether to include usage examples")
@@ -40942,11 +43606,11 @@ function registerGetComponentPropsTool(server) {
40942
43606
  GetComponentPropsSchema.shape,
40943
43607
  async (params) => {
40944
43608
  const { componentName, includeExamples } = GetComponentPropsSchema.parse(params);
40945
- const component = catalog8.components.find(
43609
+ const component = catalog10.components.find(
40946
43610
  (c) => c.name.toLowerCase() === componentName.toLowerCase()
40947
43611
  );
40948
43612
  if (!component) {
40949
- const { message, suggestions, hint } = componentNotFound(catalog8, componentName);
43613
+ const { message, suggestions, hint } = componentNotFound(catalog10, componentName);
40950
43614
  return {
40951
43615
  content: [
40952
43616
  {
@@ -41067,7 +43731,7 @@ function registerSuggestPatternTool(server) {
41067
43731
 
41068
43732
  // src/tools/validateUsage.ts
41069
43733
  import { z as z4 } from "zod";
41070
- var catalog9 = component_catalog_default;
43734
+ var catalog11 = component_catalog_default;
41071
43735
  var ValidateUsageSchema = z4.object({
41072
43736
  componentName: z4.string().trim().min(1).describe("Name of the component being used"),
41073
43737
  props: z4.record(z4.unknown()).describe("Props being passed to the component"),
@@ -41092,11 +43756,11 @@ function registerValidateUsageTool(server) {
41092
43756
  ValidateUsageSchema.shape,
41093
43757
  async (params) => {
41094
43758
  const { componentName, props, context } = ValidateUsageSchema.parse(params);
41095
- const component = catalog9.components.find(
43759
+ const component = catalog11.components.find(
41096
43760
  (c) => c.name.toLowerCase() === componentName.toLowerCase()
41097
43761
  );
41098
43762
  if (!component) {
41099
- const { maps, message, suggestions: suggestions2, hint } = componentNotFound(catalog9, componentName);
43763
+ const { maps, message, suggestions: suggestions2, hint } = componentNotFound(catalog11, componentName);
41100
43764
  return {
41101
43765
  content: [
41102
43766
  {
@@ -41414,7 +44078,7 @@ Example for ${pageType}Layout:
41414
44078
 
41415
44079
  // src/prompts/componentUsage.ts
41416
44080
  import { z as z7 } from "zod";
41417
- var catalog10 = component_catalog_default;
44081
+ var catalog12 = component_catalog_default;
41418
44082
  var ComponentUsageSchema = z7.object({
41419
44083
  componentName: z7.string().describe("Name of the component (e.g., Button, Card, Select)"),
41420
44084
  variant: z7.string().optional().describe("Desired variant (optional)"),
@@ -41430,7 +44094,7 @@ function registerComponentUsagePrompt(server) {
41430
44094
  const componentName = parsed.componentName || "Button";
41431
44095
  const variant = parsed.variant || "";
41432
44096
  const useCase = parsed.useCase || "";
41433
- const component = catalog10.components.find(
44097
+ const component = catalog12.components.find(
41434
44098
  (c) => c.name.toLowerCase() === componentName.toLowerCase()
41435
44099
  );
41436
44100
  let componentInfo = "";
@@ -41452,7 +44116,7 @@ ${component.examples.map((e) => `### ${e.title}
41452
44116
  ${e.code}
41453
44117
  \`\`\``).join("\n\n")}`;
41454
44118
  } else {
41455
- componentInfo = `Component "${componentName}" not found in catalog. Available components: ${catalog10.components.map((c) => c.name).join(", ")}`;
44119
+ componentInfo = `Component "${componentName}" not found in catalog. Available components: ${catalog12.components.map((c) => c.name).join(", ")}`;
41456
44120
  }
41457
44121
  return {
41458
44122
  messages: [
@@ -41490,7 +44154,7 @@ function registerPrompts(server) {
41490
44154
  // package.json
41491
44155
  var package_default = {
41492
44156
  name: "@classic-homes/theme-mcp",
41493
- version: "0.3.9",
44157
+ version: "0.5.0",
41494
44158
  description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
41495
44159
  type: "module",
41496
44160
  main: "dist/index.js",
@@ -41589,4 +44253,4 @@ function createServer() {
41589
44253
  export {
41590
44254
  createServer
41591
44255
  };
41592
- //# sourceMappingURL=chunk-FC3PEWJG.js.map
44256
+ //# sourceMappingURL=chunk-754LGBEJ.js.map