@classic-homes/theme-mcp 0.5.8 → 0.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-T45XY5RI.js → chunk-GAZUK5GM.js} +1410 -22
- package/dist/chunk-GAZUK5GM.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-T45XY5RI.js.map +0 -1
|
@@ -6,7 +6,7 @@ import { ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
6
6
|
|
|
7
7
|
// src/data/component-catalog.json
|
|
8
8
|
var component_catalog_default = {
|
|
9
|
-
version: "0.5.
|
|
9
|
+
version: "0.5.10",
|
|
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",
|
|
@@ -15699,6 +16852,79 @@ var component_catalog_default = {
|
|
|
15699
16852
|
"FormField"
|
|
15700
16853
|
]
|
|
15701
16854
|
},
|
|
16855
|
+
{
|
|
16856
|
+
name: "PageAgentLayer",
|
|
16857
|
+
description: "Lets the in-app AI agent point at things on the page with an outline, a spotlight or a ghost cursor, scroll them into view, switch a tab or go to another page, through one schema-validated executor",
|
|
16858
|
+
category: "overlay",
|
|
16859
|
+
importPath: "@classic-homes/page-agent-svelte",
|
|
16860
|
+
props: [
|
|
16861
|
+
{
|
|
16862
|
+
name: "navigate",
|
|
16863
|
+
type: "NavigateHandler",
|
|
16864
|
+
required: false,
|
|
16865
|
+
description: "Router hook for the `navigate` tool, e.g. `(path) => goto(path)`. Without it, `navigate` is refused"
|
|
16866
|
+
},
|
|
16867
|
+
{
|
|
16868
|
+
name: "aliasAttributes",
|
|
16869
|
+
type: "string[]",
|
|
16870
|
+
required: false,
|
|
16871
|
+
description: "Extra id attributes scanned as targets, e.g. `['data-tour']`. Each must match `data-[a-z0-9-]+`"
|
|
16872
|
+
},
|
|
16873
|
+
{
|
|
16874
|
+
name: "ignoreSelector",
|
|
16875
|
+
type: "string",
|
|
16876
|
+
required: false,
|
|
16877
|
+
description: "CSS selector (yours, never the model's) for regions the agent must never see, beside `[data-agent-ignore]`"
|
|
16878
|
+
},
|
|
16879
|
+
{
|
|
16880
|
+
name: "chipLabel",
|
|
16881
|
+
type: "string",
|
|
16882
|
+
default: "'Agent is pointing'",
|
|
16883
|
+
required: false,
|
|
16884
|
+
description: "Text of the chip shown while effects are on screen"
|
|
16885
|
+
},
|
|
16886
|
+
{
|
|
16887
|
+
name: "dismissLabel",
|
|
16888
|
+
type: "string",
|
|
16889
|
+
default: "'Dismiss'",
|
|
16890
|
+
required: false,
|
|
16891
|
+
description: "Text of the chip's button"
|
|
16892
|
+
},
|
|
16893
|
+
{
|
|
16894
|
+
name: "regionLabel",
|
|
16895
|
+
type: "string",
|
|
16896
|
+
default: "'Agent'",
|
|
16897
|
+
required: false,
|
|
16898
|
+
description: "Accessible name of the chip's landmark"
|
|
16899
|
+
},
|
|
16900
|
+
{
|
|
16901
|
+
name: "origin",
|
|
16902
|
+
type: "CursorOrigin",
|
|
16903
|
+
default: "bottom-right corner",
|
|
16904
|
+
required: false,
|
|
16905
|
+
description: "Where the ghost cursor first glides in from: `{ top, left }` in viewport px, or a function returning one"
|
|
16906
|
+
}
|
|
16907
|
+
],
|
|
16908
|
+
variants: [],
|
|
16909
|
+
slots: [
|
|
16910
|
+
{
|
|
16911
|
+
name: "children",
|
|
16912
|
+
description: "Main content",
|
|
16913
|
+
required: false
|
|
16914
|
+
}
|
|
16915
|
+
],
|
|
16916
|
+
events: [],
|
|
16917
|
+
examples: [
|
|
16918
|
+
{
|
|
16919
|
+
title: "use:agentTarget",
|
|
16920
|
+
code: "<script>\n import { agentTarget } from '@classic-homes/page-agent-svelte';\n</script>\n\n<section use:agentTarget={{ id: 'closing-date', label: 'Closing date', kind: 'field' }}>\u2026</section>"
|
|
16921
|
+
}
|
|
16922
|
+
],
|
|
16923
|
+
relatedComponents: [
|
|
16924
|
+
"AccessInspector",
|
|
16925
|
+
"Tabs"
|
|
16926
|
+
]
|
|
16927
|
+
},
|
|
15702
16928
|
{
|
|
15703
16929
|
name: "PageHeader",
|
|
15704
16930
|
description: "Hero and page title component with multiple variants",
|
|
@@ -18705,6 +19931,46 @@ var component_catalog_default = {
|
|
|
18705
19931
|
required: false,
|
|
18706
19932
|
description: "Collapsed width (px)"
|
|
18707
19933
|
},
|
|
19934
|
+
{
|
|
19935
|
+
name: "resizable",
|
|
19936
|
+
type: "boolean",
|
|
19937
|
+
default: "true",
|
|
19938
|
+
required: false,
|
|
19939
|
+
description: "Drag the right edge to resize (desktop)"
|
|
19940
|
+
},
|
|
19941
|
+
{
|
|
19942
|
+
name: "minWidth",
|
|
19943
|
+
type: "number",
|
|
19944
|
+
default: "200",
|
|
19945
|
+
required: false,
|
|
19946
|
+
description: "Narrowest dragged width (px)"
|
|
19947
|
+
},
|
|
19948
|
+
{
|
|
19949
|
+
name: "maxWidth",
|
|
19950
|
+
type: "number",
|
|
19951
|
+
default: "480",
|
|
19952
|
+
required: false,
|
|
19953
|
+
description: "Widest dragged width (px)"
|
|
19954
|
+
},
|
|
19955
|
+
{
|
|
19956
|
+
name: "resizeStep",
|
|
19957
|
+
type: "number",
|
|
19958
|
+
default: "16",
|
|
19959
|
+
required: false,
|
|
19960
|
+
description: "Arrow-key resize step (px)"
|
|
19961
|
+
},
|
|
19962
|
+
{
|
|
19963
|
+
name: "onCollapsedChange",
|
|
19964
|
+
type: "(collapsed: boolean) => void",
|
|
19965
|
+
required: false,
|
|
19966
|
+
description: "Resize collapsed/expanded it; enables snap-to-rail"
|
|
19967
|
+
},
|
|
19968
|
+
{
|
|
19969
|
+
name: "onResize",
|
|
19970
|
+
type: "(width: number) => void",
|
|
19971
|
+
required: false,
|
|
19972
|
+
description: "Called with the width when a resize finishes"
|
|
19973
|
+
},
|
|
18708
19974
|
{
|
|
18709
19975
|
name: "searchable",
|
|
18710
19976
|
type: "boolean",
|
|
@@ -22728,7 +23994,7 @@ function registerComponentResources(server) {
|
|
|
22728
23994
|
|
|
22729
23995
|
// src/data/token-definitions.json
|
|
22730
23996
|
var token_definitions_default = {
|
|
22731
|
-
version: "0.5.
|
|
23997
|
+
version: "0.5.10",
|
|
22732
23998
|
colors: {
|
|
22733
23999
|
brand: [
|
|
22734
24000
|
{
|
|
@@ -23711,7 +24977,7 @@ function registerTokenResources(server) {
|
|
|
23711
24977
|
|
|
23712
24978
|
// src/data/styles-catalog.json
|
|
23713
24979
|
var styles_catalog_default = {
|
|
23714
|
-
version: "0.5.
|
|
24980
|
+
version: "0.5.10",
|
|
23715
24981
|
package: "@classic-homes/theme-styles",
|
|
23716
24982
|
description: "Base CSS styles, accessibility features, and utility classes for the Classic Theme design system",
|
|
23717
24983
|
integration: {
|
|
@@ -24094,7 +25360,7 @@ import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/sdk
|
|
|
24094
25360
|
|
|
24095
25361
|
// src/data/pattern-library.json
|
|
24096
25362
|
var pattern_library_default = {
|
|
24097
|
-
version: "0.5.
|
|
25363
|
+
version: "0.5.10",
|
|
24098
25364
|
layouts: [
|
|
24099
25365
|
{
|
|
24100
25366
|
id: "dashboard-page",
|
|
@@ -25188,7 +26454,7 @@ function registerLayoutResources(server) {
|
|
|
25188
26454
|
|
|
25189
26455
|
// src/data/schema-catalog.json
|
|
25190
26456
|
var schema_catalog_default = {
|
|
25191
|
-
version: "0.5.
|
|
26457
|
+
version: "0.5.10",
|
|
25192
26458
|
packageName: "@classic-homes/theme-svelte",
|
|
25193
26459
|
importPath: "@classic-homes/theme-svelte",
|
|
25194
26460
|
generatedFrom: "packages/svelte/src/lib/schemas/index.ts",
|
|
@@ -25996,7 +27262,7 @@ import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/sdk
|
|
|
25996
27262
|
|
|
25997
27263
|
// src/data/auth-catalog.json
|
|
25998
27264
|
var auth_catalog_default = {
|
|
25999
|
-
version: "0.5.
|
|
27265
|
+
version: "0.5.10",
|
|
26000
27266
|
packageName: "@classic-homes/auth",
|
|
26001
27267
|
description: "Authentication services and Svelte bindings for Classic Theme apps",
|
|
26002
27268
|
subpackages: {
|
|
@@ -26211,7 +27477,7 @@ var auth_catalog_default = {
|
|
|
26211
27477
|
{
|
|
26212
27478
|
name: "authApi.initiateSSOLogin",
|
|
26213
27479
|
signature: "(options?: { callbackUrl?: string; redirectUrl?: string }) => void",
|
|
26214
|
-
description: "Initiate SSO login by redirecting to the SSO provider"
|
|
27480
|
+
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
27481
|
},
|
|
26216
27482
|
{
|
|
26217
27483
|
name: "authApi.getProfile",
|
|
@@ -26355,8 +27621,14 @@ var auth_catalog_default = {
|
|
|
26355
27621
|
},
|
|
26356
27622
|
{
|
|
26357
27623
|
name: "authApi.linkSSOAccount",
|
|
26358
|
-
signature: "(provider?: string) => Promise<void>",
|
|
26359
|
-
description: "
|
|
27624
|
+
signature: "(provider?: string, options?: { callback?: string | null }) => Promise<void>",
|
|
27625
|
+
description: "Start linking an SSO account (redirects to the IdP). CHAPI returns the user to options.callback (default: the current page, origin + path; origin must be on CHAPI's SSO allowlist; null sends none, so CHAPI web's /account) with ?link=pending#sso_link_code, and links nothing until that page calls completeSSOLink(code). Also authService.linkAccount(provider, options). The returned IdP authorization URL is never checked against allowedRedirectOrigins: it must be https, or on sso.idpOrigins (plus logoutOrigins, authorizeUrl and API origins) when that is set. A callback with its own query (?tab=\u2026) is fine"
|
|
27626
|
+
},
|
|
27627
|
+
{
|
|
27628
|
+
name: "authApi.completeSSOLink",
|
|
27629
|
+
signature: "(code: string) => Promise<SSOLinkCompleteResponse>",
|
|
27630
|
+
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",
|
|
27631
|
+
example: "import { authService, readSsoLinkResult } from '@classic-homes/auth/core';\n\nconst link = readSsoLinkResult(); // on the link callback page (any path); 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
27632
|
},
|
|
26361
27633
|
{
|
|
26362
27634
|
name: "authApi.getSecurityEvents",
|
|
@@ -26462,6 +27734,48 @@ var auth_catalog_default = {
|
|
|
26462
27734
|
}
|
|
26463
27735
|
]
|
|
26464
27736
|
},
|
|
27737
|
+
sso: {
|
|
27738
|
+
description: "SSO login CSRF binding (client_state echoed in the callback hash), MFA challenge hash binding, and the SSO account-link return trip",
|
|
27739
|
+
functions: [
|
|
27740
|
+
{
|
|
27741
|
+
name: "verifySsoClientState",
|
|
27742
|
+
signature: "(input: string | URLSearchParams | null | undefined) => { result: 'ok' | 'mismatch' | 'missing'; accepted: boolean }",
|
|
27743
|
+
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",
|
|
27744
|
+
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})`);"
|
|
27745
|
+
},
|
|
27746
|
+
{
|
|
27747
|
+
name: "consumeSsoClientState",
|
|
27748
|
+
signature: "(received: string | null | undefined) => 'ok' | 'mismatch' | 'missing'",
|
|
27749
|
+
description: "Raw client_state check without the requireClientState policy; consumes the stored value"
|
|
27750
|
+
},
|
|
27751
|
+
{
|
|
27752
|
+
name: "createSsoClientState",
|
|
27753
|
+
signature: "() => string | null",
|
|
27754
|
+
description: "Generate and store a 32-byte base64url client_state for this tab (initiateSSOLogin calls it); null without sessionStorage"
|
|
27755
|
+
},
|
|
27756
|
+
{
|
|
27757
|
+
name: "acceptMfaChallengeHash",
|
|
27758
|
+
signature: "(input: URLSearchParams | string) => { result; accepted: boolean; token: string | null; via: 'sso' | 'password' | null }",
|
|
27759
|
+
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",
|
|
27760
|
+
example: "import { acceptMfaChallengeHash } from '@classic-homes/auth/core';\n\nconst { accepted, token } = acceptMfaChallengeHash(window.location.hash);\nif (!accepted || !token) goto('/login');"
|
|
27761
|
+
},
|
|
27762
|
+
{
|
|
27763
|
+
name: "rememberMfaChallengeToken",
|
|
27764
|
+
signature: "(token: string) => boolean",
|
|
27765
|
+
description: "Remember a password-flow MFA challenge token for this tab (authService.login does this automatically on a challenge)"
|
|
27766
|
+
},
|
|
27767
|
+
{
|
|
27768
|
+
name: "clearMfaChallengeToken",
|
|
27769
|
+
signature: "() => void",
|
|
27770
|
+
description: "Forget the remembered MFA challenge token (authService.verifyMFAChallenge does this on success)"
|
|
27771
|
+
},
|
|
27772
|
+
{
|
|
27773
|
+
name: "readSsoLinkResult",
|
|
27774
|
+
signature: "(options?: { url?: string | URL; clear?: boolean }) => SSOLinkResult | null",
|
|
27775
|
+
description: "On the link callback page (any path) 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"
|
|
27776
|
+
}
|
|
27777
|
+
]
|
|
27778
|
+
},
|
|
26465
27779
|
jwt: {
|
|
26466
27780
|
description: "JWT token utilities",
|
|
26467
27781
|
functions: [
|
|
@@ -26575,12 +27889,12 @@ var auth_catalog_default = {
|
|
|
26575
27889
|
{
|
|
26576
27890
|
name: "ROLE_NAMES",
|
|
26577
27891
|
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."
|
|
27892
|
+
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
27893
|
},
|
|
26580
27894
|
{
|
|
26581
27895
|
name: "ROLE_HIERARCHY",
|
|
26582
27896
|
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
|
|
27897
|
+
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
27898
|
}
|
|
26585
27899
|
],
|
|
26586
27900
|
types: [
|
|
@@ -26750,7 +28064,7 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
26750
28064
|
{
|
|
26751
28065
|
name: "setAccessProbe",
|
|
26752
28066
|
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."
|
|
28067
|
+
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
28068
|
},
|
|
26755
28069
|
{
|
|
26756
28070
|
name: "setAccessSubject",
|
|
@@ -26773,6 +28087,11 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
26773
28087
|
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
28088
|
example: "import { evaluateAccess, effectiveSubject } from '@classic-homes/auth/core';\n\nevaluateAccess(effectiveSubject(user), { permissions: ['homes:update'] });"
|
|
26775
28089
|
},
|
|
28090
|
+
{
|
|
28091
|
+
name: "parseRedactedHeader",
|
|
28092
|
+
signature: "(value: string | null | undefined) => { fields: RedactedField[]; omitted: number }",
|
|
28093
|
+
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)"
|
|
28094
|
+
},
|
|
26776
28095
|
{
|
|
26777
28096
|
name: "requirementFromDenial",
|
|
26778
28097
|
signature: "(code: string | undefined, details: unknown) => AccessRequirement | null",
|
|
@@ -26816,7 +28135,7 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
26816
28135
|
properties: [
|
|
26817
28136
|
{
|
|
26818
28137
|
name: "source",
|
|
26819
|
-
type: "'check' | 'route' | 'nav' | 'http' | 'element'",
|
|
28138
|
+
type: "'check' | 'route' | 'nav' | 'http' | 'element' | 'redacted'",
|
|
26820
28139
|
required: true,
|
|
26821
28140
|
description: "Where the decision came from"
|
|
26822
28141
|
},
|
|
@@ -26855,6 +28174,18 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
26855
28174
|
type: "string",
|
|
26856
28175
|
required: false,
|
|
26857
28176
|
description: "Nav item id/href, route path or 'METHOD /path'"
|
|
28177
|
+
},
|
|
28178
|
+
{
|
|
28179
|
+
name: "fields",
|
|
28180
|
+
type: "{ name: string; permission: string }[]",
|
|
28181
|
+
required: false,
|
|
28182
|
+
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'"
|
|
28183
|
+
},
|
|
28184
|
+
{
|
|
28185
|
+
name: "fieldsOmitted",
|
|
28186
|
+
type: "number",
|
|
28187
|
+
required: false,
|
|
28188
|
+
description: "'redacted' events: entries left out (X-Access-Redacted-Truncated plus the parser's 100-field cap)"
|
|
26858
28189
|
}
|
|
26859
28190
|
]
|
|
26860
28191
|
}
|
|
@@ -27546,6 +28877,48 @@ formatUserRoles(user, { lowercase: true }); // "admin, manager"`
|
|
|
27546
28877
|
}
|
|
27547
28878
|
]
|
|
27548
28879
|
},
|
|
28880
|
+
{
|
|
28881
|
+
name: "SSOLinkCompleteResponse",
|
|
28882
|
+
description: "Result of completeSSOLink",
|
|
28883
|
+
properties: [
|
|
28884
|
+
{
|
|
28885
|
+
name: "linked",
|
|
28886
|
+
type: "true",
|
|
28887
|
+
required: true,
|
|
28888
|
+
description: "The link is written"
|
|
28889
|
+
},
|
|
28890
|
+
{
|
|
28891
|
+
name: "provider",
|
|
28892
|
+
type: "string",
|
|
28893
|
+
required: true,
|
|
28894
|
+
description: "SSO provider name"
|
|
28895
|
+
}
|
|
28896
|
+
]
|
|
28897
|
+
},
|
|
28898
|
+
{
|
|
28899
|
+
name: "SSOLinkResult",
|
|
28900
|
+
description: "readSsoLinkResult() outcome: { status: 'pending'; code } (call completeSSOLink) or { status: 'error'; message: string | null }",
|
|
28901
|
+
properties: [
|
|
28902
|
+
{
|
|
28903
|
+
name: "status",
|
|
28904
|
+
type: "'pending' | 'error'",
|
|
28905
|
+
required: true,
|
|
28906
|
+
description: "Where the link round trip left the /account page"
|
|
28907
|
+
},
|
|
28908
|
+
{
|
|
28909
|
+
name: "code",
|
|
28910
|
+
type: "string",
|
|
28911
|
+
required: false,
|
|
28912
|
+
description: "One-time link code (pending only)"
|
|
28913
|
+
},
|
|
28914
|
+
{
|
|
28915
|
+
name: "message",
|
|
28916
|
+
type: "string | null",
|
|
28917
|
+
required: false,
|
|
28918
|
+
description: "Server's reason (error only)"
|
|
28919
|
+
}
|
|
28920
|
+
]
|
|
28921
|
+
},
|
|
27549
28922
|
{
|
|
27550
28923
|
name: "SecurityEvent",
|
|
27551
28924
|
description: "Security event log entry",
|
|
@@ -29163,6 +30536,21 @@ function registerAuthResources(server) {
|
|
|
29163
30536
|
<button use:requires={{ permissions: ['homes:update'] }}>Edit</button>`,
|
|
29164
30537
|
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
30538
|
},
|
|
30539
|
+
accessInspectorReact: {
|
|
30540
|
+
code: `// App root (once). Admins: Ctrl+Shift+A or ?access-inspector=1
|
|
30541
|
+
import { AccessInspector, RequireAccess, useRequires } from '@classic-homes/access-inspector-react';
|
|
30542
|
+
|
|
30543
|
+
<AccessInspector />
|
|
30544
|
+
|
|
30545
|
+
<RequireAccess permissions={['reports:read']} label="Reports" fallback={<p>No access</p>}>
|
|
30546
|
+
<ReportsCard />
|
|
30547
|
+
</RequireAccess>
|
|
30548
|
+
|
|
30549
|
+
const ref = useRef<HTMLButtonElement>(null);
|
|
30550
|
+
useRequires(ref, { permissions: ['homes:update'] });
|
|
30551
|
+
<button ref={ref}>Edit</button>`,
|
|
30552
|
+
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."
|
|
30553
|
+
},
|
|
29166
30554
|
testing: {
|
|
29167
30555
|
code: "import { setupTestAuth, mockUser, assertAuthenticated } from '@classic-homes/auth/testing';\n\nconst ctx = setupTestAuth();\n// Run tests\nctx.cleanup();",
|
|
29168
30556
|
description: "Set up mocks for testing auth flows"
|
|
@@ -29181,7 +30569,7 @@ import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/sdk
|
|
|
29181
30569
|
|
|
29182
30570
|
// src/data/notifications-catalog.json
|
|
29183
30571
|
var notifications_catalog_default = {
|
|
29184
|
-
version: "0.5.
|
|
30572
|
+
version: "0.5.10",
|
|
29185
30573
|
packageName: "@classic-homes/notifications",
|
|
29186
30574
|
description: "Notification services and Svelte bindings for Classic Theme apps",
|
|
29187
30575
|
subpackages: {
|
|
@@ -30093,7 +31481,7 @@ function registerNotificationsResources(server) {
|
|
|
30093
31481
|
|
|
30094
31482
|
// src/data/docs-catalog.json
|
|
30095
31483
|
var docs_catalog_default = {
|
|
30096
|
-
version: "0.5.
|
|
31484
|
+
version: "0.5.10",
|
|
30097
31485
|
packageName: "@classic-homes/theme-docs",
|
|
30098
31486
|
description: "Markdown documentation components for the Classic theme system",
|
|
30099
31487
|
exports: {
|
|
@@ -31771,7 +33159,7 @@ function registerDocsResources(server) {
|
|
|
31771
33159
|
|
|
31772
33160
|
// src/data/charts-catalog.json
|
|
31773
33161
|
var charts_catalog_default = {
|
|
31774
|
-
version: "0.5.
|
|
33162
|
+
version: "0.5.10",
|
|
31775
33163
|
packageName: "@classic-homes/charts-core",
|
|
31776
33164
|
description: "Core utilities, types, and themes for Classic Theme chart components",
|
|
31777
33165
|
subpackages: {
|
|
@@ -36009,7 +37397,7 @@ interface SankeyData {
|
|
|
36009
37397
|
|
|
36010
37398
|
// src/data/gantt-catalog.json
|
|
36011
37399
|
var gantt_catalog_default = {
|
|
36012
|
-
version: "0.5.
|
|
37400
|
+
version: "0.5.10",
|
|
36013
37401
|
packageName: "@classic-homes/gantt-core",
|
|
36014
37402
|
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
37403
|
packages: {
|
|
@@ -36992,7 +38380,7 @@ function registerGanttResources(server) {
|
|
|
36992
38380
|
|
|
36993
38381
|
// src/data/maps-catalog.json
|
|
36994
38382
|
var maps_catalog_default = {
|
|
36995
|
-
version: "0.5.
|
|
38383
|
+
version: "0.5.10",
|
|
36996
38384
|
packageName: "@classic-homes/maps-core",
|
|
36997
38385
|
description: "Core utilities, types, and themes for Classic Theme MapLibre GL components",
|
|
36998
38386
|
subpackages: {
|
|
@@ -42624,7 +44012,7 @@ ${catalog6.quickReference.tailwindConfig}
|
|
|
42624
44012
|
|
|
42625
44013
|
// src/data/native-catalog.json
|
|
42626
44014
|
var native_catalog_default = {
|
|
42627
|
-
version: "0.5.
|
|
44015
|
+
version: "0.5.10",
|
|
42628
44016
|
packageName: "@classic-homes/native",
|
|
42629
44017
|
description: "Native device APIs for iOS and Android mobile apps. Uses Capacitor for native functionality with web fallbacks.",
|
|
42630
44018
|
subpackages: {
|
|
@@ -44334,7 +45722,7 @@ import { NativeGuard, usePlatformCheck } from '@classic-homes/native/react';
|
|
|
44334
45722
|
|
|
44335
45723
|
// src/data/viewer-catalog.json
|
|
44336
45724
|
var viewer_catalog_default = {
|
|
44337
|
-
version: "0.5.
|
|
45725
|
+
version: "0.5.10",
|
|
44338
45726
|
packageName: "@classic-homes/viewer-svelte",
|
|
44339
45727
|
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
45728
|
packages: {
|
|
@@ -45393,7 +46781,7 @@ function registerPrompts(server) {
|
|
|
45393
46781
|
// package.json
|
|
45394
46782
|
var package_default = {
|
|
45395
46783
|
name: "@classic-homes/theme-mcp",
|
|
45396
|
-
version: "0.5.
|
|
46784
|
+
version: "0.5.10",
|
|
45397
46785
|
description: "MCP server for Classic Theme design system - enables AI assistants to understand and correctly use components, tokens, and patterns",
|
|
45398
46786
|
type: "module",
|
|
45399
46787
|
main: "dist/index.js",
|
|
@@ -45492,4 +46880,4 @@ function createServer() {
|
|
|
45492
46880
|
export {
|
|
45493
46881
|
createServer
|
|
45494
46882
|
};
|
|
45495
|
-
//# sourceMappingURL=chunk-
|
|
46883
|
+
//# sourceMappingURL=chunk-GAZUK5GM.js.map
|