@classic-homes/theme-mcp 0.5.8 → 0.5.9
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.5.
|
|
9
|
+
version: "0.5.9",
|
|
10
10
|
components: [
|
|
11
11
|
{
|
|
12
12
|
name: "AccessInspector",
|
|
@@ -5585,6 +5585,33 @@ var component_catalog_default = {
|
|
|
5585
5585
|
required: false,
|
|
5586
5586
|
description: "Collapsed sidebar width (px)"
|
|
5587
5587
|
},
|
|
5588
|
+
{
|
|
5589
|
+
name: "sidebarResizable",
|
|
5590
|
+
type: "boolean",
|
|
5591
|
+
default: "true",
|
|
5592
|
+
required: false,
|
|
5593
|
+
description: "Drag the sidebar edge to resize it (desktop)"
|
|
5594
|
+
},
|
|
5595
|
+
{
|
|
5596
|
+
name: "sidebarMinWidth",
|
|
5597
|
+
type: "number",
|
|
5598
|
+
default: "200",
|
|
5599
|
+
required: false,
|
|
5600
|
+
description: "Narrowest dragged sidebar width (px); dragging well past it collapses"
|
|
5601
|
+
},
|
|
5602
|
+
{
|
|
5603
|
+
name: "sidebarMaxWidth",
|
|
5604
|
+
type: "number",
|
|
5605
|
+
default: "480",
|
|
5606
|
+
required: false,
|
|
5607
|
+
description: "Widest dragged sidebar width (px)"
|
|
5608
|
+
},
|
|
5609
|
+
{
|
|
5610
|
+
name: "onSidebarResize",
|
|
5611
|
+
type: "(width: number) => void",
|
|
5612
|
+
required: false,
|
|
5613
|
+
description: "Called with the sidebar width when a resize finishes"
|
|
5614
|
+
},
|
|
5588
5615
|
{
|
|
5589
5616
|
name: "searchable",
|
|
5590
5617
|
type: "boolean",
|
|
@@ -9422,6 +9449,831 @@ var component_catalog_default = {
|
|
|
9422
9449
|
"FileUpload"
|
|
9423
9450
|
]
|
|
9424
9451
|
},
|
|
9452
|
+
{
|
|
9453
|
+
name: "FileBreadcrumbs",
|
|
9454
|
+
description: "Path bar from the drive root to the current folder; each crumb navigates",
|
|
9455
|
+
category: "data",
|
|
9456
|
+
importPath: "@classic-homes/files-svelte",
|
|
9457
|
+
props: [
|
|
9458
|
+
{
|
|
9459
|
+
name: "rootLabel",
|
|
9460
|
+
type: "string",
|
|
9461
|
+
required: true,
|
|
9462
|
+
description: "Label of the root crumb"
|
|
9463
|
+
},
|
|
9464
|
+
{
|
|
9465
|
+
name: "path",
|
|
9466
|
+
type: "string",
|
|
9467
|
+
required: true,
|
|
9468
|
+
description: "Current folder, root-relative"
|
|
9469
|
+
},
|
|
9470
|
+
{
|
|
9471
|
+
name: "onnavigate",
|
|
9472
|
+
type: "(path: string) => void",
|
|
9473
|
+
required: false,
|
|
9474
|
+
description: "Called with the crumb's path (`''` for the root)"
|
|
9475
|
+
},
|
|
9476
|
+
{
|
|
9477
|
+
name: "maxItems",
|
|
9478
|
+
type: "number",
|
|
9479
|
+
default: "4",
|
|
9480
|
+
required: false,
|
|
9481
|
+
description: 'Crumbs to show before the middle collapses into "\u2026"'
|
|
9482
|
+
},
|
|
9483
|
+
{
|
|
9484
|
+
name: "label",
|
|
9485
|
+
type: "string",
|
|
9486
|
+
default: "'Folder path'",
|
|
9487
|
+
required: false,
|
|
9488
|
+
description: "Accessible name of the nav landmark"
|
|
9489
|
+
},
|
|
9490
|
+
{
|
|
9491
|
+
name: "class",
|
|
9492
|
+
type: "string",
|
|
9493
|
+
required: false,
|
|
9494
|
+
description: "Classes for the nav element"
|
|
9495
|
+
}
|
|
9496
|
+
],
|
|
9497
|
+
variants: [],
|
|
9498
|
+
slots: [],
|
|
9499
|
+
events: [],
|
|
9500
|
+
examples: [
|
|
9501
|
+
{
|
|
9502
|
+
title: "Basic Usage",
|
|
9503
|
+
code: `<script lang="ts">
|
|
9504
|
+
import { FileBreadcrumbs } from '@classic-homes/files-svelte';
|
|
9505
|
+
|
|
9506
|
+
let path = $state('105 BREWERY/Plans');
|
|
9507
|
+
</script>
|
|
9508
|
+
|
|
9509
|
+
<FileBreadcrumbs rootLabel="Land Development" {path} onnavigate={(p) => (path = p)} />`
|
|
9510
|
+
}
|
|
9511
|
+
],
|
|
9512
|
+
relatedComponents: [
|
|
9513
|
+
"FileBrowser"
|
|
9514
|
+
]
|
|
9515
|
+
},
|
|
9516
|
+
{
|
|
9517
|
+
name: "FileBrowser",
|
|
9518
|
+
description: "Browse, preview and download files on the company network drives, from CHAPI or any FilesSource",
|
|
9519
|
+
category: "data",
|
|
9520
|
+
importPath: "@classic-homes/files-svelte",
|
|
9521
|
+
props: [
|
|
9522
|
+
{
|
|
9523
|
+
name: "source",
|
|
9524
|
+
type: "FilesSource",
|
|
9525
|
+
required: true,
|
|
9526
|
+
description: "Where the data comes from (CHAPI adapter, in-memory source, or your own)"
|
|
9527
|
+
},
|
|
9528
|
+
{
|
|
9529
|
+
name: "rootId",
|
|
9530
|
+
type: "string",
|
|
9531
|
+
required: false,
|
|
9532
|
+
description: "Current root (bindable). Defaults to the first root the caller can read"
|
|
9533
|
+
},
|
|
9534
|
+
{
|
|
9535
|
+
name: "path",
|
|
9536
|
+
type: "string",
|
|
9537
|
+
default: "''",
|
|
9538
|
+
required: false,
|
|
9539
|
+
description: "Current folder, root-relative (bindable). `''` is the root"
|
|
9540
|
+
},
|
|
9541
|
+
{
|
|
9542
|
+
name: "onrootchange",
|
|
9543
|
+
type: "(rootId: string) => void",
|
|
9544
|
+
required: false,
|
|
9545
|
+
description: "The user picked another root"
|
|
9546
|
+
},
|
|
9547
|
+
{
|
|
9548
|
+
name: "onpathchange",
|
|
9549
|
+
type: "(path: string) => void",
|
|
9550
|
+
required: false,
|
|
9551
|
+
description: "The user opened another folder"
|
|
9552
|
+
},
|
|
9553
|
+
{
|
|
9554
|
+
name: "onnavigate",
|
|
9555
|
+
type: "(location: { rootId: string; path: string }) => void",
|
|
9556
|
+
required: false,
|
|
9557
|
+
description: "The drive and/or folder changed, in one call. Use it for URL sync"
|
|
9558
|
+
},
|
|
9559
|
+
{
|
|
9560
|
+
name: "viewers",
|
|
9561
|
+
type: "ViewerRegistry",
|
|
9562
|
+
default: "{}",
|
|
9563
|
+
required: false,
|
|
9564
|
+
description: "Document viewers for previews, as lazy imports keyed by format"
|
|
9565
|
+
},
|
|
9566
|
+
{
|
|
9567
|
+
name: "pageSize",
|
|
9568
|
+
type: "number",
|
|
9569
|
+
default: "200",
|
|
9570
|
+
required: false,
|
|
9571
|
+
description: "Entries per page"
|
|
9572
|
+
},
|
|
9573
|
+
{
|
|
9574
|
+
name: "autoLoad",
|
|
9575
|
+
type: "boolean",
|
|
9576
|
+
default: "false",
|
|
9577
|
+
required: false,
|
|
9578
|
+
description: "Load the next page when the end of the list scrolls into view"
|
|
9579
|
+
},
|
|
9580
|
+
{
|
|
9581
|
+
name: "showHidden",
|
|
9582
|
+
type: "boolean",
|
|
9583
|
+
default: "false",
|
|
9584
|
+
required: false,
|
|
9585
|
+
description: '"Show hidden files" (bindable); sent as `includeHidden`'
|
|
9586
|
+
},
|
|
9587
|
+
{
|
|
9588
|
+
name: "filter",
|
|
9589
|
+
type: "string",
|
|
9590
|
+
default: "''",
|
|
9591
|
+
required: false,
|
|
9592
|
+
description: "Filter text (bindable). Narrows the loaded entries, or searches when the source has `search()`"
|
|
9593
|
+
},
|
|
9594
|
+
{
|
|
9595
|
+
name: "maxPreviewBytes",
|
|
9596
|
+
type: "number",
|
|
9597
|
+
default: "104857600",
|
|
9598
|
+
required: false,
|
|
9599
|
+
description: "Larger files are not fetched for preview (100 MB, the viewers' cap)"
|
|
9600
|
+
},
|
|
9601
|
+
{
|
|
9602
|
+
name: "onunauthorized",
|
|
9603
|
+
type: "(error: unknown) => void",
|
|
9604
|
+
required: false,
|
|
9605
|
+
description: "A request got a 401: hand it to the app's auth"
|
|
9606
|
+
},
|
|
9607
|
+
{
|
|
9608
|
+
name: "onerror",
|
|
9609
|
+
type: "(error: unknown) => void",
|
|
9610
|
+
required: false,
|
|
9611
|
+
description: "Listing, folder-pane, preview, search and download errors, for logging"
|
|
9612
|
+
},
|
|
9613
|
+
{
|
|
9614
|
+
name: "onpreview",
|
|
9615
|
+
type: "(entry: FileEntry) => void",
|
|
9616
|
+
required: false,
|
|
9617
|
+
description: "A file was opened for preview"
|
|
9618
|
+
},
|
|
9619
|
+
{
|
|
9620
|
+
name: "toolbar",
|
|
9621
|
+
type: "Snippet<[FileBrowserContext]>",
|
|
9622
|
+
required: false,
|
|
9623
|
+
description: "Write toolbar; rendered only when the source can write and `root.canWrite` is true"
|
|
9624
|
+
},
|
|
9625
|
+
{
|
|
9626
|
+
name: "rowActions",
|
|
9627
|
+
type: "Snippet<[FileEntry, FileBrowserContext]>",
|
|
9628
|
+
required: false,
|
|
9629
|
+
description: "Per-row write actions, under the same rule"
|
|
9630
|
+
},
|
|
9631
|
+
{
|
|
9632
|
+
name: "navigationPane",
|
|
9633
|
+
type: "boolean",
|
|
9634
|
+
default: "true",
|
|
9635
|
+
required: false,
|
|
9636
|
+
description: 'Explorer-style folder tree beside the list; on phones it opens from a "Folders" button'
|
|
9637
|
+
},
|
|
9638
|
+
{
|
|
9639
|
+
name: "paneSize",
|
|
9640
|
+
type: "number",
|
|
9641
|
+
default: "25",
|
|
9642
|
+
required: false,
|
|
9643
|
+
description: "Starting width of the folder pane, in percent (bindable); drag the splitter to resize"
|
|
9644
|
+
},
|
|
9645
|
+
{
|
|
9646
|
+
name: "paneKey",
|
|
9647
|
+
type: "string",
|
|
9648
|
+
required: false,
|
|
9649
|
+
description: "Remember the pane width in localStorage under this key"
|
|
9650
|
+
},
|
|
9651
|
+
{
|
|
9652
|
+
name: "label",
|
|
9653
|
+
type: "string",
|
|
9654
|
+
default: "'File browser'",
|
|
9655
|
+
required: false,
|
|
9656
|
+
description: "Accessible name of the browser region"
|
|
9657
|
+
},
|
|
9658
|
+
{
|
|
9659
|
+
name: "locale",
|
|
9660
|
+
type: "string | string[]",
|
|
9661
|
+
required: false,
|
|
9662
|
+
description: "Locale for sizes and dates (defaults to the browser's)"
|
|
9663
|
+
},
|
|
9664
|
+
{
|
|
9665
|
+
name: "class",
|
|
9666
|
+
type: "string",
|
|
9667
|
+
required: false,
|
|
9668
|
+
description: "Classes for the outer element; give it a height"
|
|
9669
|
+
}
|
|
9670
|
+
],
|
|
9671
|
+
variants: [],
|
|
9672
|
+
slots: [],
|
|
9673
|
+
events: [],
|
|
9674
|
+
examples: [
|
|
9675
|
+
{
|
|
9676
|
+
title: "Basic Usage",
|
|
9677
|
+
code: `<script lang="ts">
|
|
9678
|
+
import { FileBrowser, createChapiFilesSource } from '@classic-homes/files-svelte';
|
|
9679
|
+
import type { ViewerRegistry } from '@classic-homes/viewer-svelte';
|
|
9680
|
+
import { getAccessToken, getSessionToken, refreshSession } from '@classic-homes/auth/core';
|
|
9681
|
+
|
|
9682
|
+
const source = createChapiFilesSource({
|
|
9683
|
+
baseUrl: 'https://api.classichomes.com',
|
|
9684
|
+
getAccessToken,
|
|
9685
|
+
getHeaders: () => {
|
|
9686
|
+
const session = getSessionToken();
|
|
9687
|
+
return session ? { 'X-Session-Token': session } : undefined;
|
|
9688
|
+
},
|
|
9689
|
+
onUnauthorized: async () => (await refreshSession()) === 'refreshed',
|
|
9690
|
+
});
|
|
9691
|
+
|
|
9692
|
+
// Lazy imports: only formats listed here are bundled. Add \`dwg\` only if the app opts into viewer-dwg.
|
|
9693
|
+
const viewers: ViewerRegistry = {
|
|
9694
|
+
pdf: () => import('@classic-homes/viewer-svelte/pdf'),
|
|
9695
|
+
docx: () => import('@classic-homes/viewer-svelte/docx'),
|
|
9696
|
+
xlsx: () => import('@classic-homes/viewer-svelte/xlsx'),
|
|
9697
|
+
csv: () => import('@classic-homes/viewer-svelte/xlsx'),
|
|
9698
|
+
dxf: () => import('@classic-homes/viewer-svelte/cad'),
|
|
9699
|
+
};
|
|
9700
|
+
</script>
|
|
9701
|
+
|
|
9702
|
+
<FileBrowser {source} {viewers} class="h-[80vh]" />`
|
|
9703
|
+
}
|
|
9704
|
+
],
|
|
9705
|
+
relatedComponents: [
|
|
9706
|
+
"FileTree",
|
|
9707
|
+
"FileList",
|
|
9708
|
+
"FilePreview",
|
|
9709
|
+
"FileBreadcrumbs",
|
|
9710
|
+
"FileIcon",
|
|
9711
|
+
"FileDetails",
|
|
9712
|
+
"FileErrorState",
|
|
9713
|
+
"DocumentViewer"
|
|
9714
|
+
]
|
|
9715
|
+
},
|
|
9716
|
+
{
|
|
9717
|
+
name: "FileDetails",
|
|
9718
|
+
description: "Facts about a file or folder - name, location, type, size, modified - with a Copy path button",
|
|
9719
|
+
category: "data",
|
|
9720
|
+
importPath: "@classic-homes/files-svelte",
|
|
9721
|
+
props: [
|
|
9722
|
+
{
|
|
9723
|
+
name: "entry",
|
|
9724
|
+
type: "FileEntry",
|
|
9725
|
+
required: true,
|
|
9726
|
+
description: "The file or folder"
|
|
9727
|
+
},
|
|
9728
|
+
{
|
|
9729
|
+
name: "rootLabel",
|
|
9730
|
+
type: "string",
|
|
9731
|
+
required: true,
|
|
9732
|
+
description: 'Root label, for the location and "Copy path"'
|
|
9733
|
+
},
|
|
9734
|
+
{
|
|
9735
|
+
name: "locale",
|
|
9736
|
+
type: "string | string[]",
|
|
9737
|
+
required: false,
|
|
9738
|
+
description: "Locale for sizes and dates"
|
|
9739
|
+
},
|
|
9740
|
+
{
|
|
9741
|
+
name: "class",
|
|
9742
|
+
type: "string",
|
|
9743
|
+
required: false,
|
|
9744
|
+
description: "Classes for the outer element"
|
|
9745
|
+
}
|
|
9746
|
+
],
|
|
9747
|
+
variants: [],
|
|
9748
|
+
slots: [],
|
|
9749
|
+
events: [],
|
|
9750
|
+
examples: [
|
|
9751
|
+
{
|
|
9752
|
+
title: "Basic Usage",
|
|
9753
|
+
code: '<FileDetails {entry} rootLabel="Land Development" />'
|
|
9754
|
+
}
|
|
9755
|
+
],
|
|
9756
|
+
relatedComponents: [
|
|
9757
|
+
"FilePreview"
|
|
9758
|
+
]
|
|
9759
|
+
},
|
|
9760
|
+
{
|
|
9761
|
+
name: "FileErrorState",
|
|
9762
|
+
description: "The right message and action for a FilesError - retry (honouring Retry-After), back to the root, or neither",
|
|
9763
|
+
category: "data",
|
|
9764
|
+
importPath: "@classic-homes/files-svelte",
|
|
9765
|
+
props: [
|
|
9766
|
+
{
|
|
9767
|
+
name: "error",
|
|
9768
|
+
type: "unknown",
|
|
9769
|
+
required: true,
|
|
9770
|
+
description: "The error, usually a `FilesError`"
|
|
9771
|
+
},
|
|
9772
|
+
{
|
|
9773
|
+
name: "onretry",
|
|
9774
|
+
type: "() => void",
|
|
9775
|
+
required: false,
|
|
9776
|
+
description: 'Offer "Try again" for retryable errors'
|
|
9777
|
+
},
|
|
9778
|
+
{
|
|
9779
|
+
name: "onroot",
|
|
9780
|
+
type: "() => void",
|
|
9781
|
+
required: false,
|
|
9782
|
+
description: 'Offer "Back to \u2026" for bad or missing paths'
|
|
9783
|
+
},
|
|
9784
|
+
{
|
|
9785
|
+
name: "rootLabel",
|
|
9786
|
+
type: "string",
|
|
9787
|
+
required: false,
|
|
9788
|
+
description: "Label of the root, for the back button"
|
|
9789
|
+
},
|
|
9790
|
+
{
|
|
9791
|
+
name: "size",
|
|
9792
|
+
type: "'sm' | 'md'",
|
|
9793
|
+
default: "'md'",
|
|
9794
|
+
required: false,
|
|
9795
|
+
description: "Size of the empty state"
|
|
9796
|
+
},
|
|
9797
|
+
{
|
|
9798
|
+
name: "class",
|
|
9799
|
+
type: "string",
|
|
9800
|
+
required: false,
|
|
9801
|
+
description: "Classes for the outer element"
|
|
9802
|
+
}
|
|
9803
|
+
],
|
|
9804
|
+
variants: [
|
|
9805
|
+
{
|
|
9806
|
+
name: "size",
|
|
9807
|
+
values: [
|
|
9808
|
+
"sm",
|
|
9809
|
+
"md"
|
|
9810
|
+
],
|
|
9811
|
+
default: "md"
|
|
9812
|
+
}
|
|
9813
|
+
],
|
|
9814
|
+
slots: [],
|
|
9815
|
+
events: [],
|
|
9816
|
+
examples: [
|
|
9817
|
+
{
|
|
9818
|
+
title: "Basic Usage",
|
|
9819
|
+
code: `<FileErrorState {error} onretry={reload} onroot={() => (path = '')} rootLabel="Land Development" />`
|
|
9820
|
+
}
|
|
9821
|
+
],
|
|
9822
|
+
relatedComponents: [
|
|
9823
|
+
"FileBrowser"
|
|
9824
|
+
]
|
|
9825
|
+
},
|
|
9826
|
+
{
|
|
9827
|
+
name: "FileIcon",
|
|
9828
|
+
description: "Icon for a file by type - folder, PDF, Word, Excel, CSV, CAD, image, archive, text, generic, and a distinct one for shortcuts",
|
|
9829
|
+
category: "data",
|
|
9830
|
+
importPath: "@classic-homes/files-svelte",
|
|
9831
|
+
props: [
|
|
9832
|
+
{
|
|
9833
|
+
name: "kind",
|
|
9834
|
+
type: "FileKind",
|
|
9835
|
+
required: false,
|
|
9836
|
+
description: "Kind to show; derived from `name` and `type` if unset"
|
|
9837
|
+
},
|
|
9838
|
+
{
|
|
9839
|
+
name: "name",
|
|
9840
|
+
type: "string",
|
|
9841
|
+
default: "''",
|
|
9842
|
+
required: false,
|
|
9843
|
+
description: "File name, for the extension"
|
|
9844
|
+
},
|
|
9845
|
+
{
|
|
9846
|
+
name: "type",
|
|
9847
|
+
type: "FileEntryType",
|
|
9848
|
+
default: "'file'",
|
|
9849
|
+
required: false,
|
|
9850
|
+
description: "Entry type: `'file'`, `'dir'` or `'link'`"
|
|
9851
|
+
},
|
|
9852
|
+
{
|
|
9853
|
+
name: "size",
|
|
9854
|
+
type: "number",
|
|
9855
|
+
default: "20",
|
|
9856
|
+
required: false,
|
|
9857
|
+
description: "Pixel size"
|
|
9858
|
+
},
|
|
9859
|
+
{
|
|
9860
|
+
name: "label",
|
|
9861
|
+
type: "string",
|
|
9862
|
+
required: false,
|
|
9863
|
+
description: "Accessible label; omit for a decorative icon"
|
|
9864
|
+
},
|
|
9865
|
+
{
|
|
9866
|
+
name: "class",
|
|
9867
|
+
type: "string",
|
|
9868
|
+
required: false,
|
|
9869
|
+
description: "Classes for the wrapper"
|
|
9870
|
+
}
|
|
9871
|
+
],
|
|
9872
|
+
variants: [],
|
|
9873
|
+
slots: [],
|
|
9874
|
+
events: [],
|
|
9875
|
+
examples: [
|
|
9876
|
+
{
|
|
9877
|
+
title: "Basic Usage",
|
|
9878
|
+
code: '<FileIcon name="Lot 14 site plan.dwg" />\n<FileIcon name="Plans" type="dir" />\n<FileIcon kind="pdf" size={32} label="PDF document" />'
|
|
9879
|
+
}
|
|
9880
|
+
],
|
|
9881
|
+
relatedComponents: [
|
|
9882
|
+
"FileList"
|
|
9883
|
+
]
|
|
9884
|
+
},
|
|
9885
|
+
{
|
|
9886
|
+
name: "FileList",
|
|
9887
|
+
description: "Accessible folder listing with type icons, relative dates, sizes, client sort, paging and keyboard navigation",
|
|
9888
|
+
category: "data",
|
|
9889
|
+
importPath: "@classic-homes/files-svelte",
|
|
9890
|
+
props: [
|
|
9891
|
+
{
|
|
9892
|
+
name: "entries",
|
|
9893
|
+
type: "FileEntry[]",
|
|
9894
|
+
required: true,
|
|
9895
|
+
description: "Entries in display order (the server's order unless `sort` is set)"
|
|
9896
|
+
},
|
|
9897
|
+
{
|
|
9898
|
+
name: "selected",
|
|
9899
|
+
type: "string",
|
|
9900
|
+
required: false,
|
|
9901
|
+
description: "Path of the selected (focused) row (bindable)"
|
|
9902
|
+
},
|
|
9903
|
+
{
|
|
9904
|
+
name: "onopen",
|
|
9905
|
+
type: "(entry: FileEntry) => void",
|
|
9906
|
+
required: false,
|
|
9907
|
+
description: "A folder or file was opened (click, tap or Enter). Never called for links"
|
|
9908
|
+
},
|
|
9909
|
+
{
|
|
9910
|
+
name: "onselect",
|
|
9911
|
+
type: "(entry: FileEntry | undefined) => void",
|
|
9912
|
+
required: false,
|
|
9913
|
+
description: "The selected row changed"
|
|
9914
|
+
},
|
|
9915
|
+
{
|
|
9916
|
+
name: "onup",
|
|
9917
|
+
type: "() => void",
|
|
9918
|
+
required: false,
|
|
9919
|
+
description: "Backspace or Alt+Up inside the list"
|
|
9920
|
+
},
|
|
9921
|
+
{
|
|
9922
|
+
name: "sort",
|
|
9923
|
+
type: "FileSort | null",
|
|
9924
|
+
default: "null",
|
|
9925
|
+
required: false,
|
|
9926
|
+
description: "Client sort over the loaded entries (bindable); `null` keeps the order"
|
|
9927
|
+
},
|
|
9928
|
+
{
|
|
9929
|
+
name: "sortable",
|
|
9930
|
+
type: "boolean",
|
|
9931
|
+
default: "true",
|
|
9932
|
+
required: false,
|
|
9933
|
+
description: "Offer sortable column headers"
|
|
9934
|
+
},
|
|
9935
|
+
{
|
|
9936
|
+
name: "loading",
|
|
9937
|
+
type: "boolean",
|
|
9938
|
+
default: "false",
|
|
9939
|
+
required: false,
|
|
9940
|
+
description: "First page loading: skeleton rows"
|
|
9941
|
+
},
|
|
9942
|
+
{
|
|
9943
|
+
name: "loadingMore",
|
|
9944
|
+
type: "boolean",
|
|
9945
|
+
default: "false",
|
|
9946
|
+
required: false,
|
|
9947
|
+
description: "A further page is loading"
|
|
9948
|
+
},
|
|
9949
|
+
{
|
|
9950
|
+
name: "hasMore",
|
|
9951
|
+
type: "boolean",
|
|
9952
|
+
default: "false",
|
|
9953
|
+
required: false,
|
|
9954
|
+
description: "More pages exist on the server"
|
|
9955
|
+
},
|
|
9956
|
+
{
|
|
9957
|
+
name: "onloadmore",
|
|
9958
|
+
type: "() => void",
|
|
9959
|
+
required: false,
|
|
9960
|
+
description: "Load the next page"
|
|
9961
|
+
},
|
|
9962
|
+
{
|
|
9963
|
+
name: "autoLoad",
|
|
9964
|
+
type: "boolean",
|
|
9965
|
+
default: "false",
|
|
9966
|
+
required: false,
|
|
9967
|
+
description: "Call `onloadmore` when the end of the list scrolls into view"
|
|
9968
|
+
},
|
|
9969
|
+
{
|
|
9970
|
+
name: "total",
|
|
9971
|
+
type: "number",
|
|
9972
|
+
required: false,
|
|
9973
|
+
description: 'Entries in the whole folder, for "Showing N of total"'
|
|
9974
|
+
},
|
|
9975
|
+
{
|
|
9976
|
+
name: "showCount",
|
|
9977
|
+
type: "boolean",
|
|
9978
|
+
default: "true",
|
|
9979
|
+
required: false,
|
|
9980
|
+
description: 'Show "Showing N of total" under the list'
|
|
9981
|
+
},
|
|
9982
|
+
{
|
|
9983
|
+
name: "label",
|
|
9984
|
+
type: "string",
|
|
9985
|
+
default: "'Files'",
|
|
9986
|
+
required: false,
|
|
9987
|
+
description: "Accessible name of the grid"
|
|
9988
|
+
},
|
|
9989
|
+
{
|
|
9990
|
+
name: "locale",
|
|
9991
|
+
type: "string | string[]",
|
|
9992
|
+
required: false,
|
|
9993
|
+
description: "Locale for sizes and dates"
|
|
9994
|
+
},
|
|
9995
|
+
{
|
|
9996
|
+
name: "now",
|
|
9997
|
+
type: "number",
|
|
9998
|
+
required: false,
|
|
9999
|
+
description: "Reference time for relative dates (tests)"
|
|
10000
|
+
},
|
|
10001
|
+
{
|
|
10002
|
+
name: "emptyTitle",
|
|
10003
|
+
type: "string",
|
|
10004
|
+
default: "'This folder is empty'",
|
|
10005
|
+
required: false,
|
|
10006
|
+
description: "Title of the empty state"
|
|
10007
|
+
},
|
|
10008
|
+
{
|
|
10009
|
+
name: "empty",
|
|
10010
|
+
type: "Snippet",
|
|
10011
|
+
required: false,
|
|
10012
|
+
description: "Replaces the empty state"
|
|
10013
|
+
},
|
|
10014
|
+
{
|
|
10015
|
+
name: "rowActions",
|
|
10016
|
+
type: "Snippet<[FileEntry]>",
|
|
10017
|
+
required: false,
|
|
10018
|
+
description: "Per-row actions, rendered at the end of each row; clicks and keys inside them don't open the row"
|
|
10019
|
+
},
|
|
10020
|
+
{
|
|
10021
|
+
name: "linkMessage",
|
|
10022
|
+
type: "string",
|
|
10023
|
+
required: false,
|
|
10024
|
+
description: "Explanation read out for links (default: the shortcut message)"
|
|
10025
|
+
},
|
|
10026
|
+
{
|
|
10027
|
+
name: "class",
|
|
10028
|
+
type: "string",
|
|
10029
|
+
required: false,
|
|
10030
|
+
description: "Classes for the outer element"
|
|
10031
|
+
}
|
|
10032
|
+
],
|
|
10033
|
+
variants: [],
|
|
10034
|
+
slots: [],
|
|
10035
|
+
events: [],
|
|
10036
|
+
examples: [
|
|
10037
|
+
{
|
|
10038
|
+
title: "Basic Usage",
|
|
10039
|
+
code: `<script lang="ts">
|
|
10040
|
+
import { FileList, FilePreview, type FileEntry } from '@classic-homes/files-svelte';
|
|
10041
|
+
|
|
10042
|
+
let { source } = $props();
|
|
10043
|
+
let entries = $state<FileEntry[]>([]);
|
|
10044
|
+
let total = $state<number>();
|
|
10045
|
+
let loading = $state(true);
|
|
10046
|
+
let open = $state<FileEntry>();
|
|
10047
|
+
|
|
10048
|
+
$effect(() => {
|
|
10049
|
+
source.list('land-dev', '105 BREWERY/Plans').then((page) => {
|
|
10050
|
+
entries = page.entries;
|
|
10051
|
+
total = page.total;
|
|
10052
|
+
loading = false;
|
|
10053
|
+
});
|
|
10054
|
+
});
|
|
10055
|
+
</script>
|
|
10056
|
+
|
|
10057
|
+
<FileList {entries} {total} {loading} label="Lot 14 documents" onopen={(e) => (open = e)} />`
|
|
10058
|
+
}
|
|
10059
|
+
],
|
|
10060
|
+
relatedComponents: [
|
|
10061
|
+
"FileBrowser",
|
|
10062
|
+
"FileIcon"
|
|
10063
|
+
]
|
|
10064
|
+
},
|
|
10065
|
+
{
|
|
10066
|
+
name: "FilePreview",
|
|
10067
|
+
description: "Preview one network-drive file with the document viewers, or show its details with a Download button",
|
|
10068
|
+
category: "data",
|
|
10069
|
+
importPath: "@classic-homes/files-svelte",
|
|
10070
|
+
props: [
|
|
10071
|
+
{
|
|
10072
|
+
name: "source",
|
|
10073
|
+
type: "FilesSource",
|
|
10074
|
+
required: true,
|
|
10075
|
+
description: "Where the bytes come from"
|
|
10076
|
+
},
|
|
10077
|
+
{
|
|
10078
|
+
name: "rootId",
|
|
10079
|
+
type: "string",
|
|
10080
|
+
required: true,
|
|
10081
|
+
description: "Root of the entry"
|
|
10082
|
+
},
|
|
10083
|
+
{
|
|
10084
|
+
name: "rootLabel",
|
|
10085
|
+
type: "string",
|
|
10086
|
+
required: true,
|
|
10087
|
+
description: 'Root label, for details and "Copy path"'
|
|
10088
|
+
},
|
|
10089
|
+
{
|
|
10090
|
+
name: "entry",
|
|
10091
|
+
type: "FileEntry",
|
|
10092
|
+
required: true,
|
|
10093
|
+
description: "The file to preview"
|
|
10094
|
+
},
|
|
10095
|
+
{
|
|
10096
|
+
name: "viewers",
|
|
10097
|
+
type: "ViewerRegistry",
|
|
10098
|
+
default: "{}",
|
|
10099
|
+
required: false,
|
|
10100
|
+
description: "Document viewers, as lazy imports keyed by format. `dwg` only with viewer-dwg"
|
|
10101
|
+
},
|
|
10102
|
+
{
|
|
10103
|
+
name: "maxBytes",
|
|
10104
|
+
type: "number",
|
|
10105
|
+
default: "104857600",
|
|
10106
|
+
required: false,
|
|
10107
|
+
description: "Larger files are not fetched for preview (100 MB)"
|
|
10108
|
+
},
|
|
10109
|
+
{
|
|
10110
|
+
name: "showTitle",
|
|
10111
|
+
type: "boolean",
|
|
10112
|
+
default: "true",
|
|
10113
|
+
required: false,
|
|
10114
|
+
description: "Show the file name in the toolbar; turn off inside a titled dialog"
|
|
10115
|
+
},
|
|
10116
|
+
{
|
|
10117
|
+
name: "locale",
|
|
10118
|
+
type: "string | string[]",
|
|
10119
|
+
required: false,
|
|
10120
|
+
description: "Locale for sizes and dates"
|
|
10121
|
+
},
|
|
10122
|
+
{
|
|
10123
|
+
name: "ondownload",
|
|
10124
|
+
type: "(entry: FileEntry, error?: unknown) => void",
|
|
10125
|
+
required: false,
|
|
10126
|
+
description: "A download finished, or failed with `error`"
|
|
10127
|
+
},
|
|
10128
|
+
{
|
|
10129
|
+
name: "onerror",
|
|
10130
|
+
type: "(error: unknown) => void",
|
|
10131
|
+
required: false,
|
|
10132
|
+
description: "The file couldn't be loaded for preview (a 401 included)"
|
|
10133
|
+
},
|
|
10134
|
+
{
|
|
10135
|
+
name: "class",
|
|
10136
|
+
type: "string",
|
|
10137
|
+
required: false,
|
|
10138
|
+
description: "Classes for the outer element; give it a height"
|
|
10139
|
+
}
|
|
10140
|
+
],
|
|
10141
|
+
variants: [],
|
|
10142
|
+
slots: [],
|
|
10143
|
+
events: [],
|
|
10144
|
+
examples: [
|
|
10145
|
+
{
|
|
10146
|
+
title: "Basic Usage",
|
|
10147
|
+
code: `<script lang="ts">
|
|
10148
|
+
import { FilePreview, type FileEntry } from '@classic-homes/files-svelte';
|
|
10149
|
+
|
|
10150
|
+
let {
|
|
10151
|
+
source,
|
|
10152
|
+
entry,
|
|
10153
|
+
}: { source: import('@classic-homes/files-svelte').FilesSource; entry: FileEntry } = $props();
|
|
10154
|
+
|
|
10155
|
+
const viewers = {
|
|
10156
|
+
pdf: () => import('@classic-homes/viewer-svelte/pdf'),
|
|
10157
|
+
};
|
|
10158
|
+
</script>
|
|
10159
|
+
|
|
10160
|
+
<FilePreview
|
|
10161
|
+
{source}
|
|
10162
|
+
rootId="land-dev"
|
|
10163
|
+
rootLabel="Land Development"
|
|
10164
|
+
{entry}
|
|
10165
|
+
{viewers}
|
|
10166
|
+
class="h-[70vh]"
|
|
10167
|
+
/>`
|
|
10168
|
+
}
|
|
10169
|
+
],
|
|
10170
|
+
relatedComponents: [
|
|
10171
|
+
"FileBrowser",
|
|
10172
|
+
"FileDetails",
|
|
10173
|
+
"DocumentViewer"
|
|
10174
|
+
]
|
|
10175
|
+
},
|
|
10176
|
+
{
|
|
10177
|
+
name: "FileTree",
|
|
10178
|
+
description: "Explorer-style folder pane - drives at the top, folders loaded as they expand, the open folder highlighted with its parents expanded",
|
|
10179
|
+
category: "data",
|
|
10180
|
+
importPath: "@classic-homes/files-svelte",
|
|
10181
|
+
props: [
|
|
10182
|
+
{
|
|
10183
|
+
name: "source",
|
|
10184
|
+
type: "FilesSource",
|
|
10185
|
+
required: true,
|
|
10186
|
+
description: "Where folders are listed from"
|
|
10187
|
+
},
|
|
10188
|
+
{
|
|
10189
|
+
name: "roots",
|
|
10190
|
+
type: "FileRoot[]",
|
|
10191
|
+
required: true,
|
|
10192
|
+
description: "Drives shown at the top level"
|
|
10193
|
+
},
|
|
10194
|
+
{
|
|
10195
|
+
name: "rootId",
|
|
10196
|
+
type: "string",
|
|
10197
|
+
required: false,
|
|
10198
|
+
description: "Drive of the open folder"
|
|
10199
|
+
},
|
|
10200
|
+
{
|
|
10201
|
+
name: "path",
|
|
10202
|
+
type: "string",
|
|
10203
|
+
default: "''",
|
|
10204
|
+
required: false,
|
|
10205
|
+
description: "Open folder, root-relative (`''` = the drive)"
|
|
10206
|
+
},
|
|
10207
|
+
{
|
|
10208
|
+
name: "showHidden",
|
|
10209
|
+
type: "boolean",
|
|
10210
|
+
default: "false",
|
|
10211
|
+
required: false,
|
|
10212
|
+
description: "Include hidden folders"
|
|
10213
|
+
},
|
|
10214
|
+
{
|
|
10215
|
+
name: "onnavigate",
|
|
10216
|
+
type: "(rootId: string, path: string) => void",
|
|
10217
|
+
required: false,
|
|
10218
|
+
description: "A folder (or a drive, with path `''`) was chosen"
|
|
10219
|
+
},
|
|
10220
|
+
{
|
|
10221
|
+
name: "refreshKey",
|
|
10222
|
+
type: "unknown",
|
|
10223
|
+
required: false,
|
|
10224
|
+
description: "Change it to reload the expanded folders in place (FileBrowser passes its refresh counter)"
|
|
10225
|
+
},
|
|
10226
|
+
{
|
|
10227
|
+
name: "onerror",
|
|
10228
|
+
type: "(error: unknown) => void",
|
|
10229
|
+
required: false,
|
|
10230
|
+
description: "A folder failed to load (a 401 included)"
|
|
10231
|
+
},
|
|
10232
|
+
{
|
|
10233
|
+
name: "label",
|
|
10234
|
+
type: "string",
|
|
10235
|
+
default: "'Folders'",
|
|
10236
|
+
required: false,
|
|
10237
|
+
description: "Accessible name of the tree"
|
|
10238
|
+
},
|
|
10239
|
+
{
|
|
10240
|
+
name: "class",
|
|
10241
|
+
type: "string",
|
|
10242
|
+
required: false,
|
|
10243
|
+
description: "Classes for the tree element"
|
|
10244
|
+
}
|
|
10245
|
+
],
|
|
10246
|
+
variants: [],
|
|
10247
|
+
slots: [],
|
|
10248
|
+
events: [],
|
|
10249
|
+
examples: [
|
|
10250
|
+
{
|
|
10251
|
+
title: "Basic Usage",
|
|
10252
|
+
code: `<script lang="ts">
|
|
10253
|
+
import { FileTree, type FileRoot, type FilesSource } from '@classic-homes/files-svelte';
|
|
10254
|
+
|
|
10255
|
+
let { source, roots }: { source: FilesSource; roots: FileRoot[] } = $props();
|
|
10256
|
+
let rootId = $state('land-dev');
|
|
10257
|
+
let path = $state('');
|
|
10258
|
+
</script>
|
|
10259
|
+
|
|
10260
|
+
<FileTree
|
|
10261
|
+
{source}
|
|
10262
|
+
{roots}
|
|
10263
|
+
{rootId}
|
|
10264
|
+
{path}
|
|
10265
|
+
onnavigate={(r, p) => {
|
|
10266
|
+
rootId = r;
|
|
10267
|
+
path = p;
|
|
10268
|
+
}}
|
|
10269
|
+
/>`
|
|
10270
|
+
}
|
|
10271
|
+
],
|
|
10272
|
+
relatedComponents: [
|
|
10273
|
+
"FileBrowser",
|
|
10274
|
+
"FileBreadcrumbs"
|
|
10275
|
+
]
|
|
10276
|
+
},
|
|
9425
10277
|
{
|
|
9426
10278
|
name: "FileUpload",
|
|
9427
10279
|
description: "File upload component with drag-and-drop support",
|
|
@@ -9721,6 +10573,307 @@ var component_catalog_default = {
|
|
|
9721
10573
|
"ActionHeader"
|
|
9722
10574
|
]
|
|
9723
10575
|
},
|
|
10576
|
+
{
|
|
10577
|
+
name: "Flipbook",
|
|
10578
|
+
description: "A magazine or catalog read one spread at a time, turned by a Flipboard-style fold or an ebook page hinge",
|
|
10579
|
+
category: "media",
|
|
10580
|
+
importPath: "@classic-homes/flipbook-svelte",
|
|
10581
|
+
props: [
|
|
10582
|
+
{
|
|
10583
|
+
name: "items",
|
|
10584
|
+
type: "T[]",
|
|
10585
|
+
required: true,
|
|
10586
|
+
description: "One entry per page"
|
|
10587
|
+
},
|
|
10588
|
+
{
|
|
10589
|
+
name: "page",
|
|
10590
|
+
type: "Snippet<[T, FlipPageContext]>",
|
|
10591
|
+
required: true,
|
|
10592
|
+
description: "Renders a page. See [Page context](#page-context)"
|
|
10593
|
+
},
|
|
10594
|
+
{
|
|
10595
|
+
name: "label",
|
|
10596
|
+
type: "string",
|
|
10597
|
+
required: true,
|
|
10598
|
+
description: "Accessible name of the book"
|
|
10599
|
+
},
|
|
10600
|
+
{
|
|
10601
|
+
name: "index",
|
|
10602
|
+
type: "number",
|
|
10603
|
+
default: "0",
|
|
10604
|
+
required: false,
|
|
10605
|
+
description: "Current page (bindable). Setting it jumps without a turn"
|
|
10606
|
+
},
|
|
10607
|
+
{
|
|
10608
|
+
name: "turning",
|
|
10609
|
+
type: "boolean",
|
|
10610
|
+
default: "false",
|
|
10611
|
+
required: false,
|
|
10612
|
+
description: "Read-only (bindable): true while a page is dragged or turning, the hint's lift and `intro` included. Hold `items` changes until it is false: a new page count lands a turn in flight back on its page"
|
|
10613
|
+
},
|
|
10614
|
+
{
|
|
10615
|
+
name: "axis",
|
|
10616
|
+
type: "'horizontal' | 'vertical' | 'auto'",
|
|
10617
|
+
default: "'auto'",
|
|
10618
|
+
required: false,
|
|
10619
|
+
description: "Fold axis. `auto` picks from the book's own size (`axisFor`)"
|
|
10620
|
+
},
|
|
10621
|
+
{
|
|
10622
|
+
name: "narrow",
|
|
10623
|
+
type: "'fold' | 'pages'",
|
|
10624
|
+
default: "'fold'",
|
|
10625
|
+
required: false,
|
|
10626
|
+
description: "How a narrow book turns: the Flipboard fold, or ebook pages hinged at their left edge"
|
|
10627
|
+
},
|
|
10628
|
+
{
|
|
10629
|
+
name: "controls",
|
|
10630
|
+
type: "boolean",
|
|
10631
|
+
default: "true",
|
|
10632
|
+
required: false,
|
|
10633
|
+
description: "The prev / indicator / next bar"
|
|
10634
|
+
},
|
|
10635
|
+
{
|
|
10636
|
+
name: "controlsStart",
|
|
10637
|
+
type: "Snippet",
|
|
10638
|
+
required: false,
|
|
10639
|
+
description: "Extra controls at the start (left end) of the controls bar, opposite the full-screen button: a host's Close when the book is its own screen"
|
|
10640
|
+
},
|
|
10641
|
+
{
|
|
10642
|
+
name: "wheel",
|
|
10643
|
+
type: "boolean",
|
|
10644
|
+
default: "true",
|
|
10645
|
+
required: false,
|
|
10646
|
+
description: "Wheel and trackpad scrolling turn pages. Turn it off for a book embedded in a page that scrolls past it"
|
|
10647
|
+
},
|
|
10648
|
+
{
|
|
10649
|
+
name: "intro",
|
|
10650
|
+
type: "boolean",
|
|
10651
|
+
default: "false",
|
|
10652
|
+
required: false,
|
|
10653
|
+
description: "Open the book when it first appears: the front cover turns over right to left"
|
|
10654
|
+
},
|
|
10655
|
+
{
|
|
10656
|
+
name: "hint",
|
|
10657
|
+
type: "boolean",
|
|
10658
|
+
default: "false",
|
|
10659
|
+
required: false,
|
|
10660
|
+
description: "First-visit hint: the next page lifts and falls back, with a pill saying how to turn"
|
|
10661
|
+
},
|
|
10662
|
+
{
|
|
10663
|
+
name: "hintLabel",
|
|
10664
|
+
type: "(turn: FlipAxis, pages: boolean) => string",
|
|
10665
|
+
default: "built in",
|
|
10666
|
+
required: false,
|
|
10667
|
+
description: 'The pill\'s text. Default: "Swipe left to turn the page" (`pages`), "Swipe up to turn the page" (vertical), "Drag the page or press \u2192 to turn it"'
|
|
10668
|
+
},
|
|
10669
|
+
{
|
|
10670
|
+
name: "onHintDone",
|
|
10671
|
+
type: "() => void",
|
|
10672
|
+
required: false,
|
|
10673
|
+
description: "The visitor acted while the hint showed. Remember it so the hint shows once"
|
|
10674
|
+
},
|
|
10675
|
+
{
|
|
10676
|
+
name: "liftTurns",
|
|
10677
|
+
type: "boolean",
|
|
10678
|
+
default: "false",
|
|
10679
|
+
required: false,
|
|
10680
|
+
description: "Draw turning pages in an overlay on `<body>`, so they swing past the book's bounds instead of being clipped"
|
|
10681
|
+
},
|
|
10682
|
+
{
|
|
10683
|
+
name: "fullscreen",
|
|
10684
|
+
type: "boolean",
|
|
10685
|
+
default: "false",
|
|
10686
|
+
required: false,
|
|
10687
|
+
description: "A full-screen button in the controls bar. Uses the Fullscreen API, or fixes the book over the viewport where the browser has none (iPhone Safari)"
|
|
10688
|
+
},
|
|
10689
|
+
{
|
|
10690
|
+
name: "expanded",
|
|
10691
|
+
type: "boolean",
|
|
10692
|
+
default: "false",
|
|
10693
|
+
required: false,
|
|
10694
|
+
description: "Read-only (bindable): true while the book fills the screen"
|
|
10695
|
+
},
|
|
10696
|
+
{
|
|
10697
|
+
name: "pageAlign",
|
|
10698
|
+
type: "(item: T) => 'left' | 'right' | undefined",
|
|
10699
|
+
required: false,
|
|
10700
|
+
description: "A bookend's side of the spine (`BookPage.align`), so the closed book is centred"
|
|
10701
|
+
},
|
|
10702
|
+
{
|
|
10703
|
+
name: "pageLabel",
|
|
10704
|
+
type: "(item: T, index: number) => string | undefined",
|
|
10705
|
+
required: false,
|
|
10706
|
+
description: 'Accessible name of a page, after "Page n of N"'
|
|
10707
|
+
},
|
|
10708
|
+
{
|
|
10709
|
+
name: "onPageChange",
|
|
10710
|
+
type: "(index: number, item: T) => void",
|
|
10711
|
+
required: false,
|
|
10712
|
+
description: "After a turn lands on a new page"
|
|
10713
|
+
},
|
|
10714
|
+
{
|
|
10715
|
+
name: "onAxisChange",
|
|
10716
|
+
type: "(axis: FlipAxis) => void",
|
|
10717
|
+
required: false,
|
|
10718
|
+
description: "Once the book is measured, then each time the fold axis changes (resize, rotation). Rebuild `paginate` pages from it"
|
|
10719
|
+
},
|
|
10720
|
+
{
|
|
10721
|
+
name: "onStageResize",
|
|
10722
|
+
type: "(size: { width: number; height: number }) => void",
|
|
10723
|
+
required: false,
|
|
10724
|
+
description: "The page area's size changed. Use it to measure and flow content to fit (`flowPages`)"
|
|
10725
|
+
},
|
|
10726
|
+
{
|
|
10727
|
+
name: "class",
|
|
10728
|
+
type: "string",
|
|
10729
|
+
required: false,
|
|
10730
|
+
description: "Extra classes on the book"
|
|
10731
|
+
}
|
|
10732
|
+
],
|
|
10733
|
+
variants: [
|
|
10734
|
+
{
|
|
10735
|
+
name: "axis",
|
|
10736
|
+
values: [
|
|
10737
|
+
"horizontal",
|
|
10738
|
+
"vertical",
|
|
10739
|
+
"auto"
|
|
10740
|
+
],
|
|
10741
|
+
default: "auto"
|
|
10742
|
+
},
|
|
10743
|
+
{
|
|
10744
|
+
name: "narrow",
|
|
10745
|
+
values: [
|
|
10746
|
+
"fold",
|
|
10747
|
+
"pages"
|
|
10748
|
+
],
|
|
10749
|
+
default: "fold"
|
|
10750
|
+
}
|
|
10751
|
+
],
|
|
10752
|
+
slots: [],
|
|
10753
|
+
events: [],
|
|
10754
|
+
examples: [
|
|
10755
|
+
{
|
|
10756
|
+
title: "Basic Usage",
|
|
10757
|
+
code: `<script>
|
|
10758
|
+
import { Flipbook } from '@classic-homes/flipbook-svelte';
|
|
10759
|
+
|
|
10760
|
+
const pages = ['Cover', 'Contents', 'Chapter one', 'Back cover'];
|
|
10761
|
+
let index = $state(0);
|
|
10762
|
+
</script>
|
|
10763
|
+
|
|
10764
|
+
<div style="height: 32rem">
|
|
10765
|
+
<Flipbook items={pages} bind:index label="Spring catalog">
|
|
10766
|
+
{#snippet page(title, { index, count })}
|
|
10767
|
+
<section class="h-full p-8">
|
|
10768
|
+
<h2>{title}</h2>
|
|
10769
|
+
<p>Page {index + 1} of {count}</p>
|
|
10770
|
+
</section>
|
|
10771
|
+
{/snippet}
|
|
10772
|
+
</Flipbook>
|
|
10773
|
+
</div>`
|
|
10774
|
+
},
|
|
10775
|
+
{
|
|
10776
|
+
title: "Magazine spreads",
|
|
10777
|
+
code: `<script lang="ts">
|
|
10778
|
+
import {
|
|
10779
|
+
Flipbook,
|
|
10780
|
+
FlipSpread,
|
|
10781
|
+
paginate,
|
|
10782
|
+
pageOfPanel,
|
|
10783
|
+
type BookPanel,
|
|
10784
|
+
type FlipAxis,
|
|
10785
|
+
} from '@classic-homes/flipbook-svelte';
|
|
10786
|
+
|
|
10787
|
+
const panels: BookPanel[] = [
|
|
10788
|
+
{ key: 'cover', span: 'full' },
|
|
10789
|
+
{ key: 'welcome' },
|
|
10790
|
+
{ key: 'contents' },
|
|
10791
|
+
{ key: 'home-1-hero', group: 'home-1' },
|
|
10792
|
+
{ key: 'home-1-photos', group: 'home-1' },
|
|
10793
|
+
{ key: 'back', span: 'full' },
|
|
10794
|
+
];
|
|
10795
|
+
|
|
10796
|
+
let axis = $state<FlipAxis>('horizontal');
|
|
10797
|
+
let index = $state(0);
|
|
10798
|
+
const pages = $derived(paginate(panels, axis, { bookends: true }));
|
|
10799
|
+
</script>
|
|
10800
|
+
|
|
10801
|
+
<Flipbook
|
|
10802
|
+
items={pages}
|
|
10803
|
+
bind:index
|
|
10804
|
+
label="Catalog"
|
|
10805
|
+
intro
|
|
10806
|
+
narrow="pages"
|
|
10807
|
+
pageAlign={(p) => p.align}
|
|
10808
|
+
onAxisChange={(next) => {
|
|
10809
|
+
const key = pages[index]?.panels[0]?.key;
|
|
10810
|
+
axis = next;
|
|
10811
|
+
// Keep the reader on the same content after a re-flow
|
|
10812
|
+
if (key) index = Math.max(0, pageOfPanel(paginate(panels, next, { bookends: true }), key));
|
|
10813
|
+
}}
|
|
10814
|
+
>
|
|
10815
|
+
{#snippet page(p)}
|
|
10816
|
+
<FlipSpread panels={p.panels} align={p.align}>
|
|
10817
|
+
{#snippet panel(item, side)}
|
|
10818
|
+
<div class="h-full p-6" data-side={side}>{item.key}</div>
|
|
10819
|
+
{/snippet}
|
|
10820
|
+
</FlipSpread>
|
|
10821
|
+
{/snippet}
|
|
10822
|
+
</Flipbook>`
|
|
10823
|
+
}
|
|
10824
|
+
],
|
|
10825
|
+
relatedComponents: [
|
|
10826
|
+
"FlipSpread",
|
|
10827
|
+
"Lightbox",
|
|
10828
|
+
"MediaCarousel"
|
|
10829
|
+
]
|
|
10830
|
+
},
|
|
10831
|
+
{
|
|
10832
|
+
name: "FlipSpread",
|
|
10833
|
+
description: "Lays a Flipbook page out as a spread, one panel filling it or two either side of the spine",
|
|
10834
|
+
category: "media",
|
|
10835
|
+
importPath: "@classic-homes/flipbook-svelte",
|
|
10836
|
+
props: [
|
|
10837
|
+
{
|
|
10838
|
+
name: "panels",
|
|
10839
|
+
type: "P[]",
|
|
10840
|
+
required: true,
|
|
10841
|
+
description: "One panel (fills the page) or two (left, right of the spine)"
|
|
10842
|
+
},
|
|
10843
|
+
{
|
|
10844
|
+
name: "panel",
|
|
10845
|
+
type: "Snippet<[P, 'left' | 'right' | 'full']>",
|
|
10846
|
+
required: true,
|
|
10847
|
+
description: "Renders a panel with its side"
|
|
10848
|
+
},
|
|
10849
|
+
{
|
|
10850
|
+
name: "align",
|
|
10851
|
+
type: "'left' | 'right'",
|
|
10852
|
+
required: false,
|
|
10853
|
+
description: "A bookend: its one panel on that side, the other half left empty"
|
|
10854
|
+
}
|
|
10855
|
+
],
|
|
10856
|
+
variants: [
|
|
10857
|
+
{
|
|
10858
|
+
name: "align",
|
|
10859
|
+
values: [
|
|
10860
|
+
"left",
|
|
10861
|
+
"right"
|
|
10862
|
+
]
|
|
10863
|
+
}
|
|
10864
|
+
],
|
|
10865
|
+
slots: [],
|
|
10866
|
+
events: [],
|
|
10867
|
+
examples: [
|
|
10868
|
+
{
|
|
10869
|
+
title: "Basic Usage",
|
|
10870
|
+
code: '<Flipbook items={pages} label="Catalog" pageAlign={(p) => p.align}>\n {#snippet page(p)}\n <FlipSpread panels={p.panels} align={p.align}>\n {#snippet panel(item, side)}\n <div class="h-full p-6" data-side={side}>{item.key}</div>\n {/snippet}\n </FlipSpread>\n {/snippet}\n</Flipbook>'
|
|
10871
|
+
}
|
|
10872
|
+
],
|
|
10873
|
+
relatedComponents: [
|
|
10874
|
+
"Flipbook"
|
|
10875
|
+
]
|
|
10876
|
+
},
|
|
9724
10877
|
{
|
|
9725
10878
|
name: "Footer",
|
|
9726
10879
|
description: "Site footer with link sections and branding",
|
|
@@ -18705,6 +19858,46 @@ var component_catalog_default = {
|
|
|
18705
19858
|
required: false,
|
|
18706
19859
|
description: "Collapsed width (px)"
|
|
18707
19860
|
},
|
|
19861
|
+
{
|
|
19862
|
+
name: "resizable",
|
|
19863
|
+
type: "boolean",
|
|
19864
|
+
default: "true",
|
|
19865
|
+
required: false,
|
|
19866
|
+
description: "Drag the right edge to resize (desktop)"
|
|
19867
|
+
},
|
|
19868
|
+
{
|
|
19869
|
+
name: "minWidth",
|
|
19870
|
+
type: "number",
|
|
19871
|
+
default: "200",
|
|
19872
|
+
required: false,
|
|
19873
|
+
description: "Narrowest dragged width (px)"
|
|
19874
|
+
},
|
|
19875
|
+
{
|
|
19876
|
+
name: "maxWidth",
|
|
19877
|
+
type: "number",
|
|
19878
|
+
default: "480",
|
|
19879
|
+
required: false,
|
|
19880
|
+
description: "Widest dragged width (px)"
|
|
19881
|
+
},
|
|
19882
|
+
{
|
|
19883
|
+
name: "resizeStep",
|
|
19884
|
+
type: "number",
|
|
19885
|
+
default: "16",
|
|
19886
|
+
required: false,
|
|
19887
|
+
description: "Arrow-key resize step (px)"
|
|
19888
|
+
},
|
|
19889
|
+
{
|
|
19890
|
+
name: "onCollapsedChange",
|
|
19891
|
+
type: "(collapsed: boolean) => void",
|
|
19892
|
+
required: false,
|
|
19893
|
+
description: "Resize collapsed/expanded it; enables snap-to-rail"
|
|
19894
|
+
},
|
|
19895
|
+
{
|
|
19896
|
+
name: "onResize",
|
|
19897
|
+
type: "(width: number) => void",
|
|
19898
|
+
required: false,
|
|
19899
|
+
description: "Called with the width when a resize finishes"
|
|
19900
|
+
},
|
|
18708
19901
|
{
|
|
18709
19902
|
name: "searchable",
|
|
18710
19903
|
type: "boolean",
|
|
@@ -22728,7 +23921,7 @@ function registerComponentResources(server) {
|
|
|
22728
23921
|
|
|
22729
23922
|
// src/data/token-definitions.json
|
|
22730
23923
|
var token_definitions_default = {
|
|
22731
|
-
version: "0.5.
|
|
23924
|
+
version: "0.5.9",
|
|
22732
23925
|
colors: {
|
|
22733
23926
|
brand: [
|
|
22734
23927
|
{
|
|
@@ -23711,7 +24904,7 @@ function registerTokenResources(server) {
|
|
|
23711
24904
|
|
|
23712
24905
|
// src/data/styles-catalog.json
|
|
23713
24906
|
var styles_catalog_default = {
|
|
23714
|
-
version: "0.5.
|
|
24907
|
+
version: "0.5.9",
|
|
23715
24908
|
package: "@classic-homes/theme-styles",
|
|
23716
24909
|
description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
|
|
23717
24910
|
integration: {
|
|
@@ -24094,7 +25287,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
|
|
|
24094
25287
|
|
|
24095
25288
|
// src/data/pattern-library.json
|
|
24096
25289
|
var pattern_library_default = {
|
|
24097
|
-
version: "0.5.
|
|
25290
|
+
version: "0.5.9",
|
|
24098
25291
|
layouts: [
|
|
24099
25292
|
{
|
|
24100
25293
|
id: "dashboard-page",
|
|
@@ -25188,7 +26381,7 @@ function registerLayoutResources(server) {
|
|
|
25188
26381
|
|
|
25189
26382
|
// src/data/schema-catalog.json
|
|
25190
26383
|
var schema_catalog_default = {
|
|
25191
|
-
version: "0.5.
|
|
26384
|
+
version: "0.5.9",
|
|
25192
26385
|
packageName: "@classic-homes/theme-svelte",
|
|
25193
26386
|
importPath: "@classic-homes/theme-svelte",
|
|
25194
26387
|
generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
|
|
@@ -25996,7 +27189,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
|
|
|
25996
27189
|
|
|
25997
27190
|
// src/data/auth-catalog.json
|
|
25998
27191
|
var auth_catalog_default = {
|
|
25999
|
-
version: "0.5.
|
|
27192
|
+
version: "0.5.9",
|
|
26000
27193
|
packageName: "@classic-homes/auth",
|
|
26001
27194
|
description: "Authentication services and Svelte bindings for Classic Theme apps",
|
|
26002
27195
|
subpackages: {
|
|
@@ -26211,7 +27404,7 @@ var auth_catalog_default = {
|
|
|
26211
27404
|
{
|
|
26212
27405
|
name: "authApi.initiateSSOLogin",
|
|
26213
27406
|
signature: "(options?: { callbackUrl?: string; redirectUrl?: string }) => void",
|
|
26214
|
-
description: "Initiate SSO login by redirecting to the SSO provider"
|
|
27407
|
+
description: "Initiate SSO login by redirecting to the SSO provider. Sends a fresh client_state (kept in this tab's sessionStorage) that the callback page checks with verifySsoClientState / acceptMfaChallengeHash"
|
|
26215
27408
|
},
|
|
26216
27409
|
{
|
|
26217
27410
|
name: "authApi.getProfile",
|
|
@@ -26356,7 +27549,13 @@ var auth_catalog_default = {
|
|
|
26356
27549
|
{
|
|
26357
27550
|
name: "authApi.linkSSOAccount",
|
|
26358
27551
|
signature: "(provider?: string) => Promise<void>",
|
|
26359
|
-
description: "
|
|
27552
|
+
description: "Start linking an SSO account (redirects to the IdP). CHAPI links nothing until the /account page it returns to calls completeSSOLink(code)"
|
|
27553
|
+
},
|
|
27554
|
+
{
|
|
27555
|
+
name: "authApi.completeSSOLink",
|
|
27556
|
+
signature: "(code: string) => Promise<SSOLinkCompleteResponse>",
|
|
27557
|
+
description: "Finish an SSO account link with the one-time sso_link_code (POST /auth/sso/link/complete). Throws ApiError: 400 unknown/used code or SSO account linked to another user, 403 different user or IdP email unverified / not the account email. Also on authService.completeSSOLink",
|
|
27558
|
+
example: "import { authService, readSsoLinkResult } from '@classic-homes/auth/core';\n\nconst link = readSsoLinkResult(); // on /account; strips the code from the URL\nif (link?.status === 'pending') await authService.completeSSOLink(link.code);\nelse if (link?.status === 'error') showError(link.message ?? 'Linking failed');"
|
|
26360
27559
|
},
|
|
26361
27560
|
{
|
|
26362
27561
|
name: "authApi.getSecurityEvents",
|
|
@@ -26462,6 +27661,48 @@ var auth_catalog_default = {
|
|
|
26462
27661
|
}
|
|
26463
27662
|
]
|
|
26464
27663
|
},
|
|
27664
|
+
sso: {
|
|
27665
|
+
description: "SSO login CSRF binding (client_state echoed in the callback hash), MFA challenge hash binding, and the SSO account-link return trip",
|
|
27666
|
+
functions: [
|
|
27667
|
+
{
|
|
27668
|
+
name: "verifySsoClientState",
|
|
27669
|
+
signature: "(input: string | URLSearchParams | null | undefined) => { result: 'ok' | 'mismatch' | 'missing'; accepted: boolean }",
|
|
27670
|
+
description: "On the SSO callback page: compare the hash's client_state with the one this tab stored (single-use, constant-time, 10-minute TTL). accepted is false for anything but 'ok' when sso.requireClientState is on",
|
|
27671
|
+
example: "import { verifySsoClientState } from '@classic-homes/auth/core';\n\nconst params = new URLSearchParams(window.location.hash.slice(1));\nconst { accepted, result } = verifySsoClientState(params);\nif (!accepted) throw new Error(`SSO sign-in could not be verified (${result})`);"
|
|
27672
|
+
},
|
|
27673
|
+
{
|
|
27674
|
+
name: "consumeSsoClientState",
|
|
27675
|
+
signature: "(received: string | null | undefined) => 'ok' | 'mismatch' | 'missing'",
|
|
27676
|
+
description: "Raw client_state check without the requireClientState policy; consumes the stored value"
|
|
27677
|
+
},
|
|
27678
|
+
{
|
|
27679
|
+
name: "createSsoClientState",
|
|
27680
|
+
signature: "() => string | null",
|
|
27681
|
+
description: "Generate and store a 32-byte base64url client_state for this tab (initiateSSOLogin calls it); null without sessionStorage"
|
|
27682
|
+
},
|
|
27683
|
+
{
|
|
27684
|
+
name: "acceptMfaChallengeHash",
|
|
27685
|
+
signature: "(input: URLSearchParams | string) => { result; accepted: boolean; token: string | null; via: 'sso' | 'password' | null }",
|
|
27686
|
+
description: "On the MFA challenge page: accept mfaChallengeToken from the hash only if it echoes this tab's client_state (SSO, consumed) or equals the token login() remembered (password). Same requireClientState policy; a hash without a token is never accepted",
|
|
27687
|
+
example: "import { acceptMfaChallengeHash } from '@classic-homes/auth/core';\n\nconst { accepted, token } = acceptMfaChallengeHash(window.location.hash);\nif (!accepted || !token) goto('/login');"
|
|
27688
|
+
},
|
|
27689
|
+
{
|
|
27690
|
+
name: "rememberMfaChallengeToken",
|
|
27691
|
+
signature: "(token: string) => boolean",
|
|
27692
|
+
description: "Remember a password-flow MFA challenge token for this tab (authService.login does this automatically on a challenge)"
|
|
27693
|
+
},
|
|
27694
|
+
{
|
|
27695
|
+
name: "clearMfaChallengeToken",
|
|
27696
|
+
signature: "() => void",
|
|
27697
|
+
description: "Forget the remembered MFA challenge token (authService.verifyMFAChallenge does this on success)"
|
|
27698
|
+
},
|
|
27699
|
+
{
|
|
27700
|
+
name: "readSsoLinkResult",
|
|
27701
|
+
signature: "(options?: { url?: string | URL; clear?: boolean }) => SSOLinkResult | null",
|
|
27702
|
+
description: "On /account after linkSSOAccount: read ?link=error&message or #sso_link_code and, by default, strip them from the address bar; null when the URL is not a link return"
|
|
27703
|
+
}
|
|
27704
|
+
]
|
|
27705
|
+
},
|
|
26465
27706
|
jwt: {
|
|
26466
27707
|
description: "JWT token utilities",
|
|
26467
27708
|
functions: [
|
|
@@ -26575,12 +27816,12 @@ var auth_catalog_default = {
|
|
|
26575
27816
|
{
|
|
26576
27817
|
name: "ROLE_NAMES",
|
|
26577
27818
|
type: "readonly RoleName[]",
|
|
26578
|
-
description: "Every role name, ordered most to least privileged: admin, manager, agent, builder, customer_service, demo, stormwater, accounting_staff, architecture_staff, construction_staff, crl_staff, design_staff, hr_staff, it_staff, landdev_staff, marketing_staff, purchasing_staff, sales_staff, stormwater_staff, warranty_staff, hotsheet_editor, office_admin, employee, user, vendor, customer, subcontractor, guest. Order is load-bearing - computePrimaryRole takes the first match."
|
|
27819
|
+
description: "Every role name, ordered most to least privileged: admin, manager, agent, builder, customer_service, demo, stormwater, accounting_staff, architecture_staff, construction_staff, crl_staff, design_staff, hr_staff, it_staff, landdev_staff, marketing_staff, purchasing_staff, sales_staff, stormwater_staff, warranty_staff, hotsheet_editor, office_admin, area_manager, project_manager, employee, user, vendor, customer, subcontractor, guest. Order is load-bearing - computePrimaryRole takes the first match."
|
|
26579
27820
|
},
|
|
26580
27821
|
{
|
|
26581
27822
|
name: "ROLE_HIERARCHY",
|
|
26582
27823
|
type: "Record<string, number>",
|
|
26583
|
-
description: "Privilege level per role: guest 0; user/vendor/customer/subcontractor 1; employee/agent/builder/customer_service/demo/stormwater, every <department>_staff, hotsheet_editor and
|
|
27824
|
+
description: "Privilege level per role: guest 0; user/vendor/customer/subcontractor 1; employee/agent/builder/customer_service/demo/stormwater, every <department>_staff, hotsheet_editor, office_admin, area_manager and project_manager 2; manager 3; admin 4."
|
|
26584
27825
|
}
|
|
26585
27826
|
],
|
|
26586
27827
|
types: [
|
|
@@ -26750,7 +27991,7 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
26750
27991
|
{
|
|
26751
27992
|
name: "setAccessProbe",
|
|
26752
27993
|
signature: "(probe: ((event: AccessCheckEvent) => void) | null) => AccessProbe | null",
|
|
26753
|
-
description: "Install the function that receives every decision: core hasRole*, store has*, checkAuth ('route'), filterByAccess/canAccess ('nav'), API 403s ('http', path only). One probe at a time; no-op on the server."
|
|
27994
|
+
description: "Install the function that receives every decision: core hasRole*, store has*, checkAuth ('route'), filterByAccess/canAccess ('nav'), API 403s ('http', path only), fields the API redacted ('redacted': informational, allowed true, fields: { name, permission }[]; permission '*' = unconfigured, default-deny). While installed, requests to the API origin only send X-Access-Debug: 1 and read X-Access-Redacted (admin sessions; absent on older CHAPI). One probe at a time; no-op on the server."
|
|
26754
27995
|
},
|
|
26755
27996
|
{
|
|
26756
27997
|
name: "setAccessSubject",
|
|
@@ -26773,6 +28014,11 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
26773
28014
|
description: "Shared any/all decision used by checkAuth and the inspector. Roles and permissions must both pass; empty lists are no restriction; exact membership.",
|
|
26774
28015
|
example: "import { evaluateAccess, effectiveSubject } from '@classic-homes/auth/core';\n\nevaluateAccess(effectiveSubject(user), { permissions: ['homes:update'] });"
|
|
26775
28016
|
},
|
|
28017
|
+
{
|
|
28018
|
+
name: "parseRedactedHeader",
|
|
28019
|
+
signature: "(value: string | null | undefined) => { fields: RedactedField[]; omitted: number }",
|
|
28020
|
+
description: "Parse X-Access-Redacted ('taxId=vendors:read:sensitive, notes=*'): skips malformed entries, keeps a repeated name's first permission, keeps at most 100 fields (omitted counts the rest)"
|
|
28021
|
+
},
|
|
26776
28022
|
{
|
|
26777
28023
|
name: "requirementFromDenial",
|
|
26778
28024
|
signature: "(code: string | undefined, details: unknown) => AccessRequirement | null",
|
|
@@ -26816,7 +28062,7 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
26816
28062
|
properties: [
|
|
26817
28063
|
{
|
|
26818
28064
|
name: "source",
|
|
26819
|
-
type: "'check' | 'route' | 'nav' | 'http' | 'element'",
|
|
28065
|
+
type: "'check' | 'route' | 'nav' | 'http' | 'element' | 'redacted'",
|
|
26820
28066
|
required: true,
|
|
26821
28067
|
description: "Where the decision came from"
|
|
26822
28068
|
},
|
|
@@ -26855,6 +28101,18 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
26855
28101
|
type: "string",
|
|
26856
28102
|
required: false,
|
|
26857
28103
|
description: "Nav item id/href, route path or 'METHOD /path'"
|
|
28104
|
+
},
|
|
28105
|
+
{
|
|
28106
|
+
name: "fields",
|
|
28107
|
+
type: "{ name: string; permission: string }[]",
|
|
28108
|
+
required: false,
|
|
28109
|
+
description: "'redacted' events: top-level response fields the API withheld and the permission each needs ('*' = not configured, default-deny). Reflects the real token, never 'view as'"
|
|
28110
|
+
},
|
|
28111
|
+
{
|
|
28112
|
+
name: "fieldsOmitted",
|
|
28113
|
+
type: "number",
|
|
28114
|
+
required: false,
|
|
28115
|
+
description: "'redacted' events: entries left out (X-Access-Redacted-Truncated plus the parser's 100-field cap)"
|
|
26858
28116
|
}
|
|
26859
28117
|
]
|
|
26860
28118
|
}
|
|
@@ -27546,6 +28804,48 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
27546
28804
|
}
|
|
27547
28805
|
]
|
|
27548
28806
|
},
|
|
28807
|
+
{
|
|
28808
|
+
name: "SSOLinkCompleteResponse",
|
|
28809
|
+
description: "Result of completeSSOLink",
|
|
28810
|
+
properties: [
|
|
28811
|
+
{
|
|
28812
|
+
name: "linked",
|
|
28813
|
+
type: "true",
|
|
28814
|
+
required: true,
|
|
28815
|
+
description: "The link is written"
|
|
28816
|
+
},
|
|
28817
|
+
{
|
|
28818
|
+
name: "provider",
|
|
28819
|
+
type: "string",
|
|
28820
|
+
required: true,
|
|
28821
|
+
description: "SSO provider name"
|
|
28822
|
+
}
|
|
28823
|
+
]
|
|
28824
|
+
},
|
|
28825
|
+
{
|
|
28826
|
+
name: "SSOLinkResult",
|
|
28827
|
+
description: "readSsoLinkResult() outcome: { status: 'pending'; code } (call completeSSOLink) or { status: 'error'; message: string | null }",
|
|
28828
|
+
properties: [
|
|
28829
|
+
{
|
|
28830
|
+
name: "status",
|
|
28831
|
+
type: "'pending' | 'error'",
|
|
28832
|
+
required: true,
|
|
28833
|
+
description: "Where the link round trip left the /account page"
|
|
28834
|
+
},
|
|
28835
|
+
{
|
|
28836
|
+
name: "code",
|
|
28837
|
+
type: "string",
|
|
28838
|
+
required: false,
|
|
28839
|
+
description: "One-time link code (pending only)"
|
|
28840
|
+
},
|
|
28841
|
+
{
|
|
28842
|
+
name: "message",
|
|
28843
|
+
type: "string | null",
|
|
28844
|
+
required: false,
|
|
28845
|
+
description: "Server's reason (error only)"
|
|
28846
|
+
}
|
|
28847
|
+
]
|
|
28848
|
+
},
|
|
27549
28849
|
{
|
|
27550
28850
|
name: "SecurityEvent",
|
|
27551
28851
|
description: "Security event log entry",
|
|
@@ -29163,6 +30463,21 @@ function registerAuthResources(server) {
|
|
|
29163
30463
|
<button use:requires={{ permissions: ['homes:update'] }}>Edit</button>`,
|
|
29164
30464
|
description: "Admin permission troubleshooting: outlines gated UI, lists denials incl. API 403s with the roles that grant each permission (CHAPI /auth/access-catalog), and previews as another role. Import @classic-homes/access-inspector-core/styles.css once."
|
|
29165
30465
|
},
|
|
30466
|
+
accessInspectorReact: {
|
|
30467
|
+
code: `// App root (once). Admins: Ctrl+Shift+A or ?access-inspector=1
|
|
30468
|
+
import { AccessInspector, RequireAccess, useRequires } from '@classic-homes/access-inspector-react';
|
|
30469
|
+
|
|
30470
|
+
<AccessInspector />
|
|
30471
|
+
|
|
30472
|
+
<RequireAccess permissions={['reports:read']} label="Reports" fallback={<p>No access</p>}>
|
|
30473
|
+
<ReportsCard />
|
|
30474
|
+
</RequireAccess>
|
|
30475
|
+
|
|
30476
|
+
const ref = useRef<HTMLButtonElement>(null);
|
|
30477
|
+
useRequires(ref, { permissions: ['homes:update'] });
|
|
30478
|
+
<button ref={ref}>Edit</button>`,
|
|
30479
|
+
description: "React binding of the Access Inspector (same markup and .chai- styles). Reads the session from authStore in @classic-homes/auth; useAccessInspector() gives state and open/close/setViewAs."
|
|
30480
|
+
},
|
|
29166
30481
|
testing: {
|
|
29167
30482
|
code: "import { setupTestAuth, mockUser, assertAuthenticated } from '@classic-homes/auth/testing';\n\nconst ctx = setupTestAuth();\n// Run tests\nctx.cleanup();",
|
|
29168
30483
|
description: "Set up mocks for testing auth flows"
|
|
@@ -29181,7 +30496,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
|
|
|
29181
30496
|
|
|
29182
30497
|
// src/data/notifications-catalog.json
|
|
29183
30498
|
var notifications_catalog_default = {
|
|
29184
|
-
version: "0.5.
|
|
30499
|
+
version: "0.5.9",
|
|
29185
30500
|
packageName: "@classic-homes/notifications",
|
|
29186
30501
|
description: "Notification services and Svelte bindings for Classic Theme apps",
|
|
29187
30502
|
subpackages: {
|
|
@@ -30093,7 +31408,7 @@ function registerNotificationsResources(server) {
|
|
|
30093
31408
|
|
|
30094
31409
|
// src/data/docs-catalog.json
|
|
30095
31410
|
var docs_catalog_default = {
|
|
30096
|
-
version: "0.5.
|
|
31411
|
+
version: "0.5.9",
|
|
30097
31412
|
packageName: "@classic-homes/theme-docs",
|
|
30098
31413
|
description: "Markdown documentation components for the Classic theme system",
|
|
30099
31414
|
exports: {
|
|
@@ -31771,7 +33086,7 @@ function registerDocsResources(server) {
|
|
|
31771
33086
|
|
|
31772
33087
|
// src/data/charts-catalog.json
|
|
31773
33088
|
var charts_catalog_default = {
|
|
31774
|
-
version: "0.5.
|
|
33089
|
+
version: "0.5.9",
|
|
31775
33090
|
packageName: "@classic-homes/charts-core",
|
|
31776
33091
|
description: "Core utilities, types, and themes for Classic Theme chart components",
|
|
31777
33092
|
subpackages: {
|
|
@@ -36009,7 +37324,7 @@ interface SankeyData {
|
|
|
36009
37324
|
|
|
36010
37325
|
// src/data/gantt-catalog.json
|
|
36011
37326
|
var gantt_catalog_default = {
|
|
36012
|
-
version: "0.5.
|
|
37327
|
+
version: "0.5.9",
|
|
36013
37328
|
packageName: "@classic-homes/gantt-core",
|
|
36014
37329
|
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.",
|
|
36015
37330
|
packages: {
|
|
@@ -36992,7 +38307,7 @@ function registerGanttResources(server) {
|
|
|
36992
38307
|
|
|
36993
38308
|
// src/data/maps-catalog.json
|
|
36994
38309
|
var maps_catalog_default = {
|
|
36995
|
-
version: "0.5.
|
|
38310
|
+
version: "0.5.9",
|
|
36996
38311
|
packageName: "@classic-homes/maps-core",
|
|
36997
38312
|
description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
|
|
36998
38313
|
subpackages: {
|
|
@@ -42624,7 +43939,7 @@ ${catalog6.quickReference.tailwindConfig}
|
|
|
42624
43939
|
|
|
42625
43940
|
// src/data/native-catalog.json
|
|
42626
43941
|
var native_catalog_default = {
|
|
42627
|
-
version: "0.5.
|
|
43942
|
+
version: "0.5.9",
|
|
42628
43943
|
packageName: "@classic-homes/native",
|
|
42629
43944
|
description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
|
|
42630
43945
|
subpackages: {
|
|
@@ -44334,7 +45649,7 @@ import { NativeGuard, usePlatformCheck } from '@classic-homes/native/react';
|
|
|
44334
45649
|
|
|
44335
45650
|
// src/data/viewer-catalog.json
|
|
44336
45651
|
var viewer_catalog_default = {
|
|
44337
|
-
version: "0.5.
|
|
45652
|
+
version: "0.5.9",
|
|
44338
45653
|
packageName: "@classic-homes/viewer-svelte",
|
|
44339
45654
|
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.",
|
|
44340
45655
|
packages: {
|
|
@@ -45393,7 +46708,7 @@ function registerPrompts(server) {
|
|
|
45393
46708
|
// package.json
|
|
45394
46709
|
var package_default = {
|
|
45395
46710
|
name: "@classic-homes/theme-mcp",
|
|
45396
|
-
version: "0.5.
|
|
46711
|
+
version: "0.5.9",
|
|
45397
46712
|
description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
|
|
45398
46713
|
type: "module",
|
|
45399
46714
|
main: "dist/index.js",
|
|
@@ -45492,4 +46807,4 @@ function createServer() {
|
|
|
45492
46807
|
export {
|
|
45493
46808
|
createServer
|
|
45494
46809
|
};
|
|
45495
|
-
//# sourceMappingURL=chunk-
|
|
46810
|
+
//# sourceMappingURL=chunk-QMLYHNH4.js.map
|