@fairgarden/design 0.1.0-alpha.1 → 0.1.0-alpha.2
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/LICENSE +21 -0
- package/Readme.md +51 -27
- package/actions/button/Button.d.ts.map +1 -1
- package/actions/button/Button.js +13 -1
- package/actions/button/Button.js.map +1 -1
- package/actions/button/button.module.css +85 -25
- package/actions/chip/Chip.d.ts +2 -2
- package/actions/chip/Chip.js +2 -2
- package/actions/chip/chip.module.css +12 -18
- package/actions/link/Link.d.ts +1 -1
- package/actions/link/link.module.css +22 -19
- package/actions/toggle/Toggle.js +1 -1
- package/actions/toggle/toggle.module.css +27 -23
- package/content/card/card.module.css +27 -27
- package/content/card-grid/CardGrid.js +1 -1
- package/content/card-grid/card-grid.module.css +3 -3
- package/content/carousel/Carousel.d.ts.map +1 -1
- package/content/carousel/Carousel.js +1 -4
- package/content/carousel/Carousel.js.map +1 -1
- package/content/carousel/carousel.module.css +19 -9
- package/content/code-block/CodeActionsMenu.d.ts +34 -0
- package/content/code-block/CodeActionsMenu.d.ts.map +1 -0
- package/content/code-block/CodeActionsMenu.js +102 -0
- package/content/code-block/CodeActionsMenu.js.map +1 -0
- package/content/code-block/CodeBlock.d.ts +37 -0
- package/content/code-block/CodeBlock.d.ts.map +1 -0
- package/content/code-block/CodeBlock.js +30 -0
- package/content/code-block/CodeBlock.js.map +1 -0
- package/content/code-block/CodeBlockFrame.d.ts +54 -0
- package/content/code-block/CodeBlockFrame.d.ts.map +1 -0
- package/content/code-block/CodeBlockFrame.js +80 -0
- package/content/code-block/CodeBlockFrame.js.map +1 -0
- package/content/code-block/CodeBlockHeader.d.ts +26 -0
- package/content/code-block/CodeBlockHeader.d.ts.map +1 -0
- package/content/code-block/CodeBlockHeader.js +16 -0
- package/content/code-block/CodeBlockHeader.js.map +1 -0
- package/content/code-block/CodeBlockLazy.d.ts +11 -0
- package/content/code-block/CodeBlockLazy.d.ts.map +1 -0
- package/content/code-block/CodeBlockLazy.js +14 -0
- package/content/code-block/CodeBlockLazy.js.map +1 -0
- package/content/code-block/CodeBlockLoading.d.ts +31 -0
- package/content/code-block/CodeBlockLoading.d.ts.map +1 -0
- package/content/code-block/CodeBlockLoading.js +90 -0
- package/content/code-block/CodeBlockLoading.js.map +1 -0
- package/content/code-block/CodeBlockSection.d.ts +40 -0
- package/content/code-block/CodeBlockSection.d.ts.map +1 -0
- package/content/code-block/CodeBlockSection.js +105 -0
- package/content/code-block/CodeBlockSection.js.map +1 -0
- package/content/code-block/CodeBlockToasts.d.ts +26 -0
- package/content/code-block/CodeBlockToasts.d.ts.map +1 -0
- package/content/code-block/CodeBlockToasts.js +88 -0
- package/content/code-block/CodeBlockToasts.js.map +1 -0
- package/content/code-block/code-block.module.css +949 -0
- package/content/code-block/index.d.ts +4 -0
- package/content/code-block/index.d.ts.map +1 -0
- package/content/code-block/index.js +4 -0
- package/content/code-block/index.js.map +1 -0
- package/content/demo/DemoContent.d.ts +32 -0
- package/content/demo/DemoContent.d.ts.map +1 -0
- package/content/demo/DemoContent.js +87 -0
- package/content/demo/DemoContent.js.map +1 -0
- package/content/demo/DemoFrame.d.ts +6 -0
- package/content/demo/DemoFrame.d.ts.map +1 -0
- package/content/demo/DemoFrame.js +17 -0
- package/content/demo/DemoFrame.js.map +1 -0
- package/content/demo/DemoLazy.d.ts +11 -0
- package/content/demo/DemoLazy.d.ts.map +1 -0
- package/content/demo/DemoLazy.js +14 -0
- package/content/demo/DemoLazy.js.map +1 -0
- package/content/demo/DemoLoading.d.ts +23 -0
- package/content/demo/DemoLoading.d.ts.map +1 -0
- package/content/demo/DemoLoading.js +26 -0
- package/content/demo/DemoLoading.js.map +1 -0
- package/content/demo/demo.module.css +163 -0
- package/content/demo/index.d.ts +4 -0
- package/content/demo/index.d.ts.map +1 -0
- package/content/demo/index.js +4 -0
- package/content/demo/index.js.map +1 -0
- package/content/empty-state/EmptyState.d.ts +1 -1
- package/content/empty-state/EmptyState.js +1 -1
- package/content/empty-state/empty-state.module.css +11 -11
- package/content/feature-grid/feature-grid.module.css +22 -22
- package/content/index-rows/IndexRows.d.ts +2 -2
- package/content/index-rows/IndexRows.d.ts.map +1 -1
- package/content/index-rows/IndexRows.js +1 -1
- package/content/index-rows/index-rows.module.css +29 -29
- package/content/pricing/Pricing.d.ts +4 -4
- package/content/pricing/Pricing.d.ts.map +1 -1
- package/content/pricing/Pricing.js +4 -4
- package/content/pricing/Pricing.js.map +1 -1
- package/content/pricing/pricing.module.css +22 -22
- package/content/profile/Profile.d.ts +1 -1
- package/content/profile/Profile.js +2 -2
- package/content/profile/profile.module.css +13 -13
- package/content/quote/Quote.d.ts +1 -1
- package/content/quote/quote.module.css +9 -9
- package/content/timeline/Timeline.d.ts +1 -1
- package/content/timeline/Timeline.d.ts.map +1 -1
- package/content/timeline/Timeline.js +5 -5
- package/content/timeline/Timeline.js.map +1 -1
- package/content/timeline/timeline.module.css +12 -12
- package/content/types-table/TypePre.d.ts +11 -0
- package/content/types-table/TypePre.d.ts.map +1 -0
- package/content/types-table/TypePre.js +13 -0
- package/content/types-table/TypePre.js.map +1 -0
- package/content/types-table/TypesTable.d.ts +22 -0
- package/content/types-table/TypesTable.d.ts.map +1 -0
- package/content/types-table/TypesTable.js +124 -0
- package/content/types-table/TypesTable.js.map +1 -0
- package/content/types-table/index.d.ts +3 -0
- package/content/types-table/index.d.ts.map +1 -0
- package/content/types-table/index.js +3 -0
- package/content/types-table/index.js.map +1 -0
- package/content/types-table/types-table.module.css +160 -0
- package/data/chart/Chart.d.ts +8 -1
- package/data/chart/Chart.d.ts.map +1 -1
- package/data/chart/Chart.js +28 -15
- package/data/chart/Chart.js.map +1 -1
- package/data/chart/chart.module.css +20 -6
- package/data/figure/Figure.d.ts +1 -1
- package/data/figure/Figure.js +1 -1
- package/data/figure/figure.module.css +7 -7
- package/data/map/Map.d.ts +3 -3
- package/data/map/Map.d.ts.map +1 -1
- package/data/map/Map.js +10 -8
- package/data/map/Map.js.map +1 -1
- package/data/map/MapCanvas.d.ts.map +1 -1
- package/data/map/MapCanvas.js +5 -9
- package/data/map/MapCanvas.js.map +1 -1
- package/data/map/map.module.css +39 -14
- package/data/map/mapStyle.d.ts +2 -2
- package/data/map/mapStyle.d.ts.map +1 -1
- package/data/map/mapStyle.js +5 -5
- package/data/map/mapStyle.js.map +1 -1
- package/data/scroll-area/ScrollArea.d.ts.map +1 -1
- package/data/scroll-area/ScrollArea.js +8 -4
- package/data/scroll-area/ScrollArea.js.map +1 -1
- package/data/scroll-area/scroll-area.module.css +28 -9
- package/data/spec-grid/spec-grid.module.css +8 -8
- package/data/spec-list/spec-list.module.css +3 -3
- package/data/spec-sheet/SpecSheet.d.ts +2 -2
- package/data/spec-sheet/SpecSheet.js +1 -1
- package/data/spec-sheet/spec-sheet.module.css +9 -9
- package/data/stat/Stat.d.ts +1 -1
- package/data/stat/Stat.d.ts.map +1 -1
- package/data/stat/stat.module.css +4 -4
- package/data/table/Table.d.ts +6 -5
- package/data/table/Table.d.ts.map +1 -1
- package/data/table/Table.js.map +1 -1
- package/data/table/table.module.css +43 -46
- package/disclosure/accordion/Accordion.d.ts +1 -1
- package/disclosure/accordion/Accordion.js +1 -1
- package/disclosure/accordion/accordion.module.css +12 -12
- package/disclosure/collapsible/Collapsible.d.ts +4 -4
- package/disclosure/collapsible/Collapsible.js +4 -4
- package/disclosure/collapsible/collapsible.module.css +10 -10
- package/disclosure/faq/FAQ.d.ts +3 -3
- package/disclosure/faq/FAQ.d.ts.map +1 -1
- package/disclosure/faq/FAQ.js +3 -3
- package/disclosure/faq/FAQ.js.map +1 -1
- package/disclosure/faq/faq.module.css +20 -20
- package/feedback/alert/alert.module.css +4 -4
- package/feedback/avatar/avatar-group.module.css +2 -2
- package/feedback/avatar/avatar.module.css +9 -9
- package/feedback/badge/Badge.d.ts +1 -1
- package/feedback/badge/badge.module.css +7 -7
- package/feedback/meter/Meter.d.ts +2 -2
- package/feedback/meter/meter.module.css +14 -14
- package/feedback/progress/Progress.d.ts +1 -1
- package/feedback/progress/progress.module.css +7 -7
- package/feedback/tag/tag.module.css +7 -7
- package/feedback/toast/Toast.d.ts +3 -3
- package/feedback/toast/Toast.d.ts.map +1 -1
- package/feedback/toast/Toast.js +17 -7
- package/feedback/toast/Toast.js.map +1 -1
- package/feedback/toast/toast.module.css +31 -20
- package/forms/autocomplete/Autocomplete.d.ts +11 -0
- package/forms/autocomplete/Autocomplete.d.ts.map +1 -1
- package/forms/autocomplete/Autocomplete.js +27 -6
- package/forms/autocomplete/Autocomplete.js.map +1 -1
- package/forms/autocomplete/autocomplete.module.css +35 -41
- package/forms/checkbox/Checkbox.js +1 -1
- package/forms/checkbox/checkbox.module.css +29 -25
- package/forms/checkbox-group/checkbox-group.module.css +4 -4
- package/forms/combobox/Combobox.d.ts +10 -0
- package/forms/combobox/Combobox.d.ts.map +1 -1
- package/forms/combobox/Combobox.js +28 -7
- package/forms/combobox/Combobox.js.map +1 -1
- package/forms/combobox/combobox.module.css +34 -41
- package/forms/field/field.module.css +1 -1
- package/forms/fieldset/Fieldset.d.ts +1 -1
- package/forms/fieldset/Fieldset.js +2 -2
- package/forms/fieldset/fieldset.module.css +14 -14
- package/forms/form/form.module.css +2 -2
- package/forms/input/Input.d.ts +10 -3
- package/forms/input/Input.d.ts.map +1 -1
- package/forms/input/Input.js +10 -4
- package/forms/input/Input.js.map +1 -1
- package/forms/input/input.module.css +38 -21
- package/forms/number-field/number-field.module.css +24 -23
- package/forms/radio/Radio.d.ts +1 -1
- package/forms/radio/Radio.d.ts.map +1 -1
- package/forms/radio/Radio.js +5 -3
- package/forms/radio/Radio.js.map +1 -1
- package/forms/radio/radio.module.css +38 -30
- package/forms/radio-group/RadioGroup.d.ts +1 -1
- package/forms/radio-group/radio-group.module.css +3 -3
- package/forms/search/Search.d.ts +10 -0
- package/forms/search/Search.d.ts.map +1 -1
- package/forms/search/Search.js +25 -6
- package/forms/search/Search.js.map +1 -1
- package/forms/search/search.module.css +25 -33
- package/forms/select/Select.d.ts +10 -2
- package/forms/select/Select.d.ts.map +1 -1
- package/forms/select/Select.js +27 -12
- package/forms/select/Select.js.map +1 -1
- package/forms/select/select.module.css +42 -48
- package/forms/slider/Slider.js +2 -2
- package/forms/slider/slider.module.css +23 -23
- package/forms/switch/Switch.js +1 -1
- package/forms/switch/switch.module.css +23 -19
- package/foundations/expanding-box/ExpandingBox.d.ts +86 -0
- package/foundations/expanding-box/ExpandingBox.d.ts.map +1 -0
- package/foundations/expanding-box/ExpandingBox.js +179 -0
- package/foundations/expanding-box/ExpandingBox.js.map +1 -0
- package/foundations/expanding-box/expanding-box.module.css +415 -0
- package/foundations/expanding-box/index.d.ts +3 -0
- package/foundations/expanding-box/index.d.ts.map +1 -0
- package/foundations/expanding-box/index.js +3 -0
- package/foundations/expanding-box/index.js.map +1 -0
- package/foundations/expanding-box/startExpandingTransition.d.ts +33 -0
- package/foundations/expanding-box/startExpandingTransition.d.ts.map +1 -0
- package/foundations/expanding-box/startExpandingTransition.js +82 -0
- package/foundations/expanding-box/startExpandingTransition.js.map +1 -0
- package/foundations/ground/Ground.d.ts +1 -1
- package/foundations/ground/ground.module.css +4 -4
- package/foundations/icon/Icon.d.ts +1 -1
- package/foundations/icon/Icon.js +1 -1
- package/foundations/icon/icon.module.css +1 -1
- package/foundations/outline-morph/OutlineMorph.d.ts +112 -0
- package/foundations/outline-morph/OutlineMorph.d.ts.map +1 -0
- package/foundations/outline-morph/OutlineMorph.js +83 -0
- package/foundations/outline-morph/OutlineMorph.js.map +1 -0
- package/foundations/outline-morph/index.d.ts +3 -0
- package/foundations/outline-morph/index.d.ts.map +1 -0
- package/foundations/outline-morph/index.js +3 -0
- package/foundations/outline-morph/index.js.map +1 -0
- package/foundations/outline-morph/morphEngine.d.ts +219 -0
- package/foundations/outline-morph/morphEngine.d.ts.map +1 -0
- package/foundations/outline-morph/morphEngine.js +1331 -0
- package/foundations/outline-morph/morphEngine.js.map +1 -0
- package/foundations/outline-morph/outline-morph.module.css +113 -0
- package/foundations/outline-morph/useOutlineMorphRoot.d.ts +50 -0
- package/foundations/outline-morph/useOutlineMorphRoot.d.ts.map +1 -0
- package/foundations/outline-morph/useOutlineMorphRoot.js +55 -0
- package/foundations/outline-morph/useOutlineMorphRoot.js.map +1 -0
- package/foundations/separator/separator.module.css +10 -10
- package/foundations/sticker/Sticker.d.ts +4 -4
- package/foundations/sticker/Sticker.d.ts.map +1 -1
- package/foundations/sticker/Sticker.js +3 -3
- package/foundations/sticker/sticker.module.css +10 -10
- package/icons/paths.d.ts +1 -1
- package/icons/paths.d.ts.map +1 -1
- package/icons/paths.js +50 -0
- package/icons/paths.js.map +1 -1
- package/navigation/breadcrumb/Breadcrumb.d.ts +7 -1
- package/navigation/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/navigation/breadcrumb/Breadcrumb.js +8 -8
- package/navigation/breadcrumb/Breadcrumb.js.map +1 -1
- package/navigation/breadcrumb/breadcrumb.module.css +14 -14
- package/navigation/file-tabs/FileTabs.d.ts +169 -0
- package/navigation/file-tabs/FileTabs.d.ts.map +1 -0
- package/navigation/file-tabs/FileTabs.js +253 -0
- package/navigation/file-tabs/FileTabs.js.map +1 -0
- package/navigation/file-tabs/file-tabs.module.css +868 -0
- package/navigation/file-tabs/index.d.ts +2 -0
- package/navigation/file-tabs/index.d.ts.map +1 -0
- package/navigation/file-tabs/index.js +2 -0
- package/navigation/file-tabs/index.js.map +1 -0
- package/navigation/nav-drawer/NavDrawer.d.ts +32 -6
- package/navigation/nav-drawer/NavDrawer.d.ts.map +1 -1
- package/navigation/nav-drawer/NavDrawer.js +94 -28
- package/navigation/nav-drawer/NavDrawer.js.map +1 -1
- package/navigation/nav-drawer/nav-drawer.module.css +78 -55
- package/navigation/navigation-bar/NavigationBar.d.ts +31 -11
- package/navigation/navigation-bar/NavigationBar.d.ts.map +1 -1
- package/navigation/navigation-bar/NavigationBar.js +40 -17
- package/navigation/navigation-bar/NavigationBar.js.map +1 -1
- package/navigation/navigation-bar/navigation-bar.module.css +58 -27
- package/navigation/navigation-menu/NavigationMenu.d.ts +9 -9
- package/navigation/navigation-menu/NavigationMenu.d.ts.map +1 -1
- package/navigation/navigation-menu/NavigationMenu.js +15 -15
- package/navigation/navigation-menu/navigation-menu.module.css +39 -53
- package/navigation/pagination/Pagination.js +1 -1
- package/navigation/pagination/pagination.module.css +24 -24
- package/navigation/sidebar-nav/SidebarNav.d.ts +71 -0
- package/navigation/sidebar-nav/SidebarNav.d.ts.map +1 -0
- package/navigation/sidebar-nav/SidebarNav.js +169 -0
- package/navigation/sidebar-nav/SidebarNav.js.map +1 -0
- package/navigation/sidebar-nav/index.d.ts +2 -0
- package/navigation/sidebar-nav/index.d.ts.map +1 -0
- package/navigation/sidebar-nav/index.js +2 -0
- package/navigation/sidebar-nav/index.js.map +1 -0
- package/navigation/sidebar-nav/sidebar-nav.module.css +270 -0
- package/navigation/table-of-contents/TableOfContents.d.ts +92 -0
- package/navigation/table-of-contents/TableOfContents.d.ts.map +1 -0
- package/navigation/table-of-contents/TableOfContents.js +211 -0
- package/navigation/table-of-contents/TableOfContents.js.map +1 -0
- package/navigation/table-of-contents/index.d.ts +3 -0
- package/navigation/table-of-contents/index.d.ts.map +1 -0
- package/navigation/table-of-contents/index.js +3 -0
- package/navigation/table-of-contents/index.js.map +1 -0
- package/navigation/table-of-contents/table-of-contents.module.css +322 -0
- package/navigation/table-of-contents/useActiveHeading.d.ts +37 -0
- package/navigation/table-of-contents/useActiveHeading.d.ts.map +1 -0
- package/navigation/table-of-contents/useActiveHeading.js +111 -0
- package/navigation/table-of-contents/useActiveHeading.js.map +1 -0
- package/navigation/tabs/Tabs.d.ts +2 -2
- package/navigation/tabs/Tabs.js +3 -3
- package/navigation/tabs/tabs.module.css +22 -19
- package/navigation/toolbar/Toolbar.d.ts +7 -1
- package/navigation/toolbar/Toolbar.d.ts.map +1 -1
- package/navigation/toolbar/Toolbar.js +3 -3
- package/navigation/toolbar/Toolbar.js.map +1 -1
- package/navigation/toolbar/toolbar.module.css +6 -6
- package/overlays/alert-dialog/AlertDialog.d.ts +14 -4
- package/overlays/alert-dialog/AlertDialog.d.ts.map +1 -1
- package/overlays/alert-dialog/AlertDialog.js +15 -5
- package/overlays/alert-dialog/AlertDialog.js.map +1 -1
- package/overlays/alert-dialog/alert-dialog.module.css +4 -4
- package/overlays/context-menu/ContextMenu.d.ts +1 -1
- package/overlays/context-menu/ContextMenu.js +1 -1
- package/overlays/dialog/Dialog.d.ts +26 -11
- package/overlays/dialog/Dialog.d.ts.map +1 -1
- package/overlays/dialog/Dialog.js +36 -17
- package/overlays/dialog/Dialog.js.map +1 -1
- package/overlays/dialog/dialog.module.css +32 -31
- package/overlays/dialog/morph.d.ts +17 -0
- package/overlays/dialog/morph.d.ts.map +1 -0
- package/overlays/dialog/morph.js +44 -0
- package/overlays/dialog/morph.js.map +1 -0
- package/overlays/menu/Menu.d.ts +18 -7
- package/overlays/menu/Menu.d.ts.map +1 -1
- package/overlays/menu/Menu.js +35 -12
- package/overlays/menu/Menu.js.map +1 -1
- package/overlays/menu/menu.module.css +26 -50
- package/overlays/menu/morph.d.ts +16 -0
- package/overlays/menu/morph.d.ts.map +1 -0
- package/overlays/menu/morph.js +36 -0
- package/overlays/menu/morph.js.map +1 -0
- package/overlays/menu/popup.d.ts +2 -0
- package/overlays/menu/popup.d.ts.map +1 -1
- package/overlays/menu/popup.js +11 -3
- package/overlays/menu/popup.js.map +1 -1
- package/overlays/menubar/Menubar.d.ts +10 -1
- package/overlays/menubar/Menubar.d.ts.map +1 -1
- package/overlays/menubar/Menubar.js +22 -12
- package/overlays/menubar/Menubar.js.map +1 -1
- package/overlays/menubar/menubar.module.css +13 -13
- package/overlays/popover/Popover.d.ts +22 -8
- package/overlays/popover/Popover.d.ts.map +1 -1
- package/overlays/popover/Popover.js +51 -16
- package/overlays/popover/Popover.js.map +1 -1
- package/overlays/popover/popover.module.css +73 -47
- package/overlays/preview-card/PreviewCard.d.ts +3 -3
- package/overlays/preview-card/PreviewCard.d.ts.map +1 -1
- package/overlays/preview-card/PreviewCard.js +5 -6
- package/overlays/preview-card/PreviewCard.js.map +1 -1
- package/overlays/preview-card/preview-card.module.css +19 -54
- package/overlays/search-dialog/SearchDialog.d.ts +89 -0
- package/overlays/search-dialog/SearchDialog.d.ts.map +1 -0
- package/overlays/search-dialog/SearchDialog.js +220 -0
- package/overlays/search-dialog/SearchDialog.js.map +1 -0
- package/overlays/search-dialog/SearchDialogPopup.d.ts +39 -0
- package/overlays/search-dialog/SearchDialogPopup.d.ts.map +1 -0
- package/overlays/search-dialog/SearchDialogPopup.js +80 -0
- package/overlays/search-dialog/SearchDialogPopup.js.map +1 -0
- package/overlays/search-dialog/SearchDialogTrigger.d.ts +24 -0
- package/overlays/search-dialog/SearchDialogTrigger.d.ts.map +1 -0
- package/overlays/search-dialog/SearchDialogTrigger.js +32 -0
- package/overlays/search-dialog/SearchDialogTrigger.js.map +1 -0
- package/overlays/search-dialog/index.d.ts +3 -0
- package/overlays/search-dialog/index.d.ts.map +1 -0
- package/overlays/search-dialog/index.js +3 -0
- package/overlays/search-dialog/index.js.map +1 -0
- package/overlays/search-dialog/search-dialog.module.css +492 -0
- package/overlays/search-dialog/useShortcutLabel.d.ts +13 -0
- package/overlays/search-dialog/useShortcutLabel.d.ts.map +1 -0
- package/overlays/search-dialog/useShortcutLabel.js +19 -0
- package/overlays/search-dialog/useShortcutLabel.js.map +1 -0
- package/overlays/search-dialog/variants.d.ts +25 -0
- package/overlays/search-dialog/variants.d.ts.map +1 -0
- package/overlays/search-dialog/variants.js +31 -0
- package/overlays/search-dialog/variants.js.map +1 -0
- package/overlays/tooltip/Tooltip.d.ts +3 -3
- package/overlays/tooltip/Tooltip.d.ts.map +1 -1
- package/overlays/tooltip/Tooltip.js +3 -3
- package/overlays/tooltip/Tooltip.js.map +1 -1
- package/overlays/tooltip/tooltip.module.css +2 -2
- package/package.json +27 -19
- package/page/announcement-bar/AnnouncementBar.d.ts +1 -1
- package/page/announcement-bar/AnnouncementBar.js +4 -4
- package/page/announcement-bar/AnnouncementBar.js.map +1 -1
- package/page/announcement-bar/announcement-bar.module.css +11 -17
- package/page/cta-block/CTABlock.d.ts +5 -5
- package/page/cta-block/CTABlock.d.ts.map +1 -1
- package/page/cta-block/CTABlock.js +2 -2
- package/page/cta-block/cta-block.module.css +26 -26
- package/page/docs-layout/DocsLayout.d.ts +83 -0
- package/page/docs-layout/DocsLayout.d.ts.map +1 -0
- package/page/docs-layout/DocsLayout.js +108 -0
- package/page/docs-layout/DocsLayout.js.map +1 -0
- package/page/docs-layout/docs-layout.module.css +266 -0
- package/page/docs-layout/index.d.ts +2 -0
- package/page/docs-layout/index.d.ts.map +1 -0
- package/page/docs-layout/index.js +2 -0
- package/page/docs-layout/index.js.map +1 -0
- package/page/footer/Footer.d.ts +1 -1
- package/page/footer/Footer.js +1 -1
- package/page/footer/footer.module.css +31 -31
- package/page/hero/Hero.d.ts +3 -3
- package/page/hero/Hero.d.ts.map +1 -1
- package/page/hero/Hero.js +1 -1
- package/page/hero/hero.module.css +36 -36
- package/page/marquee/Marquee.d.ts +2 -2
- package/page/marquee/Marquee.js +1 -1
- package/page/marquee/marquee.module.css +11 -11
- package/page/newsletter/Newsletter.d.ts.map +1 -1
- package/page/newsletter/Newsletter.js +4 -59
- package/page/newsletter/Newsletter.js.map +1 -1
- package/page/newsletter/newsletter.module.css +44 -22
- package/page/section-bar/SectionBar.d.ts +10 -3
- package/page/section-bar/SectionBar.d.ts.map +1 -1
- package/page/section-bar/SectionBar.js +21 -11
- package/page/section-bar/SectionBar.js.map +1 -1
- package/page/section-bar/section-bar.module.css +43 -46
- package/page/section-divider/SectionDivider.d.ts +2 -2
- package/page/section-divider/SectionDivider.js +4 -4
- package/page/section-divider/SectionDivider.js.map +1 -1
- package/page/section-divider/section-divider.module.css +18 -18
- package/page/section-header/SectionHeader.d.ts +7 -7
- package/page/section-header/SectionHeader.d.ts.map +1 -1
- package/page/section-header/SectionHeader.js +3 -3
- package/page/section-header/SectionHeader.js.map +1 -1
- package/page/section-header/section-header.module.css +16 -16
- package/utils/Ornament.d.ts +1 -1
- package/utils/Ornament.js +2 -2
- package/utils/assignRef.d.ts +7 -1
- package/utils/assignRef.d.ts.map +1 -1
- package/utils/assignRef.js +18 -0
- package/utils/assignRef.js.map +1 -1
- package/utils/docs/DemoTitle.d.ts +12 -0
- package/utils/docs/DemoTitle.d.ts.map +1 -0
- package/utils/docs/DemoTitle.js +11 -0
- package/utils/docs/DemoTitle.js.map +1 -0
- package/utils/docs/Pre.d.ts +39 -0
- package/utils/docs/Pre.d.ts.map +1 -0
- package/utils/docs/Pre.js +26 -0
- package/utils/docs/Pre.js.map +1 -0
- package/utils/docs/createDemo.d.ts +89 -0
- package/utils/docs/createDemo.d.ts.map +1 -0
- package/utils/docs/createDemo.js +51 -0
- package/utils/docs/createDemo.js.map +1 -0
- package/utils/docs/createMdxComponents.d.ts +52 -0
- package/utils/docs/createMdxComponents.d.ts.map +1 -0
- package/utils/docs/createMdxComponents.js +59 -0
- package/utils/docs/createMdxComponents.js.map +1 -0
- package/utils/docs/createTypes.d.ts +23 -0
- package/utils/docs/createTypes.d.ts.map +1 -0
- package/utils/docs/createTypes.js +27 -0
- package/utils/docs/createTypes.js.map +1 -0
- package/utils/docs/index.d.ts +8 -0
- package/utils/docs/index.d.ts.map +1 -0
- package/utils/docs/index.js +16 -0
- package/utils/docs/index.js.map +1 -0
- package/utils/docs/mdx.module.css +201 -0
- package/utils/docs/serverSourceEnhancers.d.ts +26 -0
- package/utils/docs/serverSourceEnhancers.d.ts.map +1 -0
- package/utils/docs/serverSourceEnhancers.js +32 -0
- package/utils/docs/serverSourceEnhancers.js.map +1 -0
- package/utils/docs/toSidebarItems.d.ts +23 -0
- package/utils/docs/toSidebarItems.d.ts.map +1 -0
- package/utils/docs/toSidebarItems.js +36 -0
- package/utils/docs/toSidebarItems.js.map +1 -0
- package/utils/font-fallbacks.css +176 -0
- package/utils/fonts.d.ts +1 -0
- package/utils/fonts.d.ts.map +1 -1
- package/utils/fonts.js +12 -0
- package/utils/fonts.js.map +1 -1
- package/utils/frame.d.ts +4 -0
- package/utils/frame.d.ts.map +1 -0
- package/utils/frame.js +11 -0
- package/utils/frame.js.map +1 -0
- package/utils/global.css +480 -266
- package/utils/line.module.css +17 -17
- package/utils/media.css +1 -1
- package/utils/ornament.module.css +19 -19
- package/utils/overlay.d.ts +4 -4
- package/utils/overlay.js +4 -4
- package/utils/pattern.module.css +45 -45
- package/utils/print.css +48 -34
- package/utils/reset.css +9 -2
- package/utils/roles.css +29 -29
- package/utils/seriesPatterns.js +3 -3
- package/utils/syntax.module.css +92 -0
- package/utils/theme.css +6 -6
- package/utils/tokens.css +262 -192
- package/utils/tokens.d.ts +51 -8
- package/utils/tokens.d.ts.map +1 -1
- package/utils/tokens.js +46 -9
- package/utils/tokens.js.map +1 -1
- package/utils/type.module.css +87 -87
- package/utils/useReleaseMark.d.ts +13 -0
- package/utils/useReleaseMark.d.ts.map +1 -0
- package/utils/useReleaseMark.js +44 -0
- package/utils/useReleaseMark.js.map +1 -0
- package/utils/view-transitions.css +122 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Gaps are visual gaps [D74]: text parts trim their half-leading where the
|
|
11
11
|
* browser supports `text-box`, so eyebrow → rule → content measure 14 / 19
|
|
12
|
-
* (--
|
|
12
|
+
* (--fgd-space-eyebrow-rule / --fgd-space-eyebrow-content) [D100].
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
/* Composition sits in top-level rules, outside the layers: Lightning CSS
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
.eyebrowRule {
|
|
67
67
|
grid-area: rule;
|
|
68
68
|
justify-self: stretch;
|
|
69
|
-
margin-block: var(--
|
|
69
|
+
margin-block: var(--fgd-space-eyebrow-rule) var(--fgd-space-eyebrow-content);
|
|
70
70
|
border-width: 0;
|
|
71
71
|
border-block-start-width: var(--border-size-1);
|
|
72
72
|
border-color: var(--role-hairline);
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
|
|
82
82
|
.lede {
|
|
83
83
|
grid-area: lede;
|
|
84
|
-
max-inline-size: var(--
|
|
84
|
+
max-inline-size: var(--fgd-measure-reading);
|
|
85
85
|
margin: var(--size-px-5) 0 0;
|
|
86
86
|
color: var(--primary12);
|
|
87
87
|
text-box: trim-both cap alphabetic;
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
display: flex;
|
|
93
93
|
flex-wrap: wrap;
|
|
94
94
|
align-items: center;
|
|
95
|
-
gap: var(--
|
|
95
|
+
gap: var(--size-px-2-5);
|
|
96
96
|
margin-block-start: var(--size-px-5);
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
display: flex;
|
|
102
102
|
flex-wrap: wrap;
|
|
103
103
|
align-items: baseline;
|
|
104
|
-
gap: var(--
|
|
104
|
+
gap: var(--size-px-2-5);
|
|
105
105
|
margin: 0;
|
|
106
106
|
color: var(--primary12);
|
|
107
107
|
text-box: trim-both cap alphabetic;
|
|
@@ -111,13 +111,13 @@
|
|
|
111
111
|
color: var(--primary12);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
/* Trail kicker: the kicker threaded by the trail, --
|
|
114
|
+
/* Trail kicker: the kicker threaded by the trail, --fgd-space-halo either side. */
|
|
115
115
|
.kickerRow {
|
|
116
116
|
display: flex;
|
|
117
117
|
align-items: center;
|
|
118
|
-
gap: var(--
|
|
118
|
+
gap: var(--fgd-space-halo);
|
|
119
119
|
max-inline-size: 100%;
|
|
120
|
-
margin-block-end: var(--
|
|
120
|
+
margin-block-end: var(--size-px-8-5);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.kicker {
|
|
@@ -138,15 +138,15 @@
|
|
|
138
138
|
|
|
139
139
|
.marker {
|
|
140
140
|
fill: none;
|
|
141
|
-
stroke-width: var(--
|
|
141
|
+
stroke-width: var(--border-size-1-5);
|
|
142
142
|
stroke-dasharray: none;
|
|
143
143
|
stroke-linecap: round;
|
|
144
144
|
stroke-linejoin: round;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
/* Anchored: the sticker at --
|
|
147
|
+
/* Anchored: the sticker at --fgd-size-art-s; its halo touches the cap tops, no gap. */
|
|
148
148
|
.art {
|
|
149
|
-
inline-size: var(--
|
|
149
|
+
inline-size: var(--fgd-size-art-s);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.art > * {
|
|
@@ -159,13 +159,13 @@
|
|
|
159
159
|
margin-block-end: var(--size-px-3);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
/* "See all →": a standalone link, underlined at rest, --
|
|
162
|
+
/* "See all →": a standalone link, underlined at rest, --fgd-size-hit tall. */
|
|
163
163
|
.seeAll {
|
|
164
164
|
grid-area: seeAll;
|
|
165
165
|
display: inline-flex;
|
|
166
166
|
align-items: center;
|
|
167
167
|
gap: var(--size-px-2);
|
|
168
|
-
min-block-size: var(--
|
|
168
|
+
min-block-size: var(--fgd-size-hit);
|
|
169
169
|
margin-block-start: var(--size-px-5);
|
|
170
170
|
border-radius: var(--radius-1);
|
|
171
171
|
color: var(--primary12);
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
.seeAllLabel {
|
|
176
176
|
text-decoration-line: underline;
|
|
177
177
|
text-decoration-color: var(--role-accent);
|
|
178
|
-
text-decoration-thickness: var(--
|
|
178
|
+
text-decoration-thickness: var(--border-size-1-5);
|
|
179
179
|
text-underline-offset: 0.15em;
|
|
180
180
|
text-decoration-skip-ink: none;
|
|
181
181
|
}
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
|
|
191
191
|
@media (prefers-reduced-motion: no-preference) {
|
|
192
192
|
.seeAllLabel {
|
|
193
|
-
transition: color var(--
|
|
193
|
+
transition: color var(--fgd-duration-quick) var(--ease-out-3);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
.seeAll {
|
|
214
214
|
align-self: last baseline;
|
|
215
215
|
margin-block-start: 0;
|
|
216
|
-
margin-inline-start: var(--
|
|
216
|
+
margin-inline-start: var(--size-px-7-5);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}
|
package/utils/Ornament.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export type OrnamentBlobProps = Omit<React.ComponentPropsWithRef<'span'>, 'child
|
|
|
81
81
|
secondary?: RadixScale;
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
84
|
-
* `ornament-blob` (§6.6, §1.5.16): the
|
|
84
|
+
* `ornament-blob` (§6.6, §1.5.16): the blob mount, a flat hand-cut disc
|
|
85
85
|
* in `--secondary9` over a larger, turned under-disc in `--secondary7`,
|
|
86
86
|
* holding a centred mark in `--secondary-contrast`. Once per page, at a
|
|
87
87
|
* fixed 136 × 130 px. On `forest` and the solid fields the mount is omitted
|
package/utils/Ornament.js
CHANGED
|
@@ -84,7 +84,7 @@ export function MarkerRank(props) {
|
|
|
84
84
|
* wanders and turns down into its terminal, pointing at what follows below
|
|
85
85
|
* (the empty state's action). `entry` (176 × 56) loops once near its start
|
|
86
86
|
* (≈ 22 × 40 px), then runs level into a label at its inline end; the label
|
|
87
|
-
* sits --
|
|
87
|
+
* sits --fgd-space-halo past the terminal.
|
|
88
88
|
*/
|
|
89
89
|
const trails = {
|
|
90
90
|
'short-tail': {
|
|
@@ -132,7 +132,7 @@ const BLOB_UNDER = 'translate(68 65) rotate(8) scale(1.04) translate(-68 -65)';
|
|
|
132
132
|
/** The grounds that take the mount (§6.6, §1.5.16): the page grounds and the night band. */
|
|
133
133
|
const MOUNT_TONES = new Set(['light-base', 'tinted', 'dark-base']);
|
|
134
134
|
/**
|
|
135
|
-
* `ornament-blob` (§6.6, §1.5.16): the
|
|
135
|
+
* `ornament-blob` (§6.6, §1.5.16): the blob mount, a flat hand-cut disc
|
|
136
136
|
* in `--secondary9` over a larger, turned under-disc in `--secondary7`,
|
|
137
137
|
* holding a centred mark in `--secondary-contrast`. Once per page, at a
|
|
138
138
|
* fixed 136 × 130 px. On `forest` and the solid fields the mount is omitted
|
package/utils/assignRef.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Writes a node to a consumer's ref (callback or object), for a component
|
|
4
4
|
* that also keeps its own ref to the same node. Not exported from any index.
|
|
5
5
|
*/
|
|
6
6
|
export declare function assignRef<T>(ref: React.Ref<T> | undefined, value: T | null): void;
|
|
7
|
+
/**
|
|
8
|
+
* One ref for two: either alone when the other is missing, else a callback
|
|
9
|
+
* that writes both, whose identity changes only with theirs. Not exported
|
|
10
|
+
* from any index.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useMergedRef<T>(a: React.Ref<T> | undefined, b: React.Ref<T> | undefined): React.Ref<T> | undefined;
|
|
7
13
|
//# sourceMappingURL=assignRef.d.ts.map
|
package/utils/assignRef.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assignRef.d.ts","sourceRoot":"","sources":["../src/utils/assignRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"assignRef.d.ts","sourceRoot":"","sources":["../src/utils/assignRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,QAG1E;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,EAC3B,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,GAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAS1B"}
|
package/utils/assignRef.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* Writes a node to a consumer's ref (callback or object), for a component
|
|
3
4
|
* that also keeps its own ref to the same node. Not exported from any index.
|
|
@@ -8,4 +9,21 @@ export function assignRef(ref, value) {
|
|
|
8
9
|
else if (ref)
|
|
9
10
|
ref.current = value;
|
|
10
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* One ref for two: either alone when the other is missing, else a callback
|
|
14
|
+
* that writes both, whose identity changes only with theirs. Not exported
|
|
15
|
+
* from any index.
|
|
16
|
+
*/
|
|
17
|
+
export function useMergedRef(a, b) {
|
|
18
|
+
return React.useMemo(() => {
|
|
19
|
+
if (!a)
|
|
20
|
+
return b;
|
|
21
|
+
if (!b)
|
|
22
|
+
return a;
|
|
23
|
+
return (node) => {
|
|
24
|
+
assignRef(a, node);
|
|
25
|
+
assignRef(b, node);
|
|
26
|
+
};
|
|
27
|
+
}, [a, b]);
|
|
28
|
+
}
|
|
11
29
|
//# sourceMappingURL=assignRef.js.map
|
package/utils/assignRef.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assignRef.js","sourceRoot":"","sources":["../src/utils/assignRef.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assignRef.js","sourceRoot":"","sources":["../src/utils/assignRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAI,GAA6B,EAAE,KAAe;IACzE,IAAI,OAAO,GAAG,KAAK,UAAU;QAAE,GAAG,CAAC,KAAK,CAAC,CAAA;SACpC,IAAI,GAAG;QAAG,GAAiC,CAAC,OAAO,GAAG,KAAK,CAAA;AAClE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,CAA2B,EAC3B,CAA2B;IAE3B,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxB,IAAI,CAAC,CAAC;YAAE,OAAO,CAAC,CAAA;QAChB,IAAI,CAAC,CAAC;YAAE,OAAO,CAAC,CAAA;QAChB,OAAO,CAAC,IAAc,EAAE,EAAE;YACxB,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;YAClB,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QACpB,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** Props the demo factories hand their `DemoTitle`. */
|
|
3
|
+
export type DemoTitleProps = {
|
|
4
|
+
slug?: string;
|
|
5
|
+
children?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The heading the demo factories render for `<DemoX.Title />`: an H3 in
|
|
9
|
+
* type-subhead that links to itself, so a demo can be linked by its slug.
|
|
10
|
+
*/
|
|
11
|
+
export declare function DemoTitle({ slug, children }: DemoTitleProps): React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=DemoTitle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoTitle.d.ts","sourceRoot":"","sources":["../../src/utils/docs/DemoTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,uDAAuD;AACvD,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEjE;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,cAAc,qBAU3D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import styles from './mdx.module.css';
|
|
3
|
+
/**
|
|
4
|
+
* The heading the demo factories render for `<DemoX.Title />`: an H3 in
|
|
5
|
+
* type-subhead that links to itself, so a demo can be linked by its slug.
|
|
6
|
+
*/
|
|
7
|
+
export function DemoTitle({ slug, children }) {
|
|
8
|
+
return slug ? (React.createElement("h3", { id: slug, className: styles.demoTitle },
|
|
9
|
+
React.createElement("a", { href: `#${slug}`, className: styles.anchor }, children))) : (React.createElement("h3", { className: styles.demoTitle }, children));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=DemoTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoTitle.js","sourceRoot":"","sources":["../../src/utils/docs/DemoTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,MAAM,MAAM,kBAAkB,CAAA;AAKrC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAkB;IAC1D,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,4BAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS;QACvC,2BAAG,IAAI,EAAE,IAAI,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,IAC1C,QAAQ,CACP,CACD,CACN,CAAC,CAAC,CAAC,CACF,4BAAI,SAAS,EAAE,MAAM,CAAC,SAAS,IAAG,QAAQ,CAAM,CACjD,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { CodeHighlighterProps } from '@fairgarden/docs/CodeHighlighter/types';
|
|
3
|
+
/** What the docs pipeline puts on a fenced block's `pre`, plus the slots. */
|
|
4
|
+
export type PreProps = {
|
|
5
|
+
'data-name'?: string;
|
|
6
|
+
'data-slug'?: string;
|
|
7
|
+
'data-precompute'?: string;
|
|
8
|
+
'data-content-props'?: string;
|
|
9
|
+
/** CodeHighlighter's `Content`. Default: `CodeBlockLazy`. */
|
|
10
|
+
Content?: CodeHighlighterProps<object>['Content'];
|
|
11
|
+
/** CodeHighlighter's `ContentLoading`. Default: `CodeBlockLoading`. */
|
|
12
|
+
ContentLoading?: CodeHighlighterProps<object>['ContentLoading'];
|
|
13
|
+
/**
|
|
14
|
+
* When the code highlights. Default: the engine's own (`'idle'`: the server
|
|
15
|
+
* HTML carries the plain code, highlighted once the browser is idle). Pass
|
|
16
|
+
* `'init'` only to show server-side highlighting: the HTML then arrives
|
|
17
|
+
* highlighted, at the cost of server work and page weight.
|
|
18
|
+
*/
|
|
19
|
+
highlightAfter?: CodeHighlighterProps<object>['highlightAfter'];
|
|
20
|
+
/**
|
|
21
|
+
* The source enhancers the server runs on code it parses. Default
|
|
22
|
+
* `serverSourceEnhancers` (the engine's emphasis enhancer, with the
|
|
23
|
+
* options demos get), so the emphasis window is in the server HTML and
|
|
24
|
+
* nothing changes size after hydration [D201]. A fence the build
|
|
25
|
+
* precomputed already carries its window; this covers any code the server
|
|
26
|
+
* still parses. Pass `[]` to run none.
|
|
27
|
+
*/
|
|
28
|
+
sourceEnhancers?: CodeHighlighterProps<object>['sourceEnhancers'];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The MDX `pre` override, as fg-docs' own `Pre`: the docs pipeline
|
|
32
|
+
* (`transformHtmlCodeBlock`) replaces every fenced code block with
|
|
33
|
+
* `<pre data-precompute=…>`, which only CodeHighlighter can render. Each
|
|
34
|
+
* renders as a Code Block, code-split, with its loading state until the
|
|
35
|
+
* chunk loads, and its emphasis window in the server HTML. A fence's flags
|
|
36
|
+
* (` ```tsx collapse `) arrive in `data-content-props`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function Pre(props: PreProps): React.JSX.Element;
|
|
39
|
+
//# sourceMappingURL=Pre.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pre.d.ts","sourceRoot":"","sources":["../../src/utils/docs/Pre.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAMlF,6EAA6E;AAC7E,MAAM,MAAM,QAAQ,GAAG;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;IACjD,uEAAuE;IACvE,cAAc,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,CAAA;IAC/D;;;;;OAKG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,CAAA;IAC/D;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAA;CAClE,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,qBAmClC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CodeHighlighter } from '@fairgarden/docs/CodeHighlighter';
|
|
3
|
+
import { CodeBlockLazy } from '../../content/code-block/CodeBlockLazy';
|
|
4
|
+
import { CodeBlockLoading } from '../../content/code-block/CodeBlockLoading';
|
|
5
|
+
import { serverSourceEnhancers } from './serverSourceEnhancers';
|
|
6
|
+
/**
|
|
7
|
+
* The MDX `pre` override, as fg-docs' own `Pre`: the docs pipeline
|
|
8
|
+
* (`transformHtmlCodeBlock`) replaces every fenced code block with
|
|
9
|
+
* `<pre data-precompute=…>`, which only CodeHighlighter can render. Each
|
|
10
|
+
* renders as a Code Block, code-split, with its loading state until the
|
|
11
|
+
* chunk loads, and its emphasis window in the server HTML. A fence's flags
|
|
12
|
+
* (` ```tsx collapse `) arrive in `data-content-props`.
|
|
13
|
+
*/
|
|
14
|
+
export function Pre(props) {
|
|
15
|
+
const { Content = CodeBlockLazy, ContentLoading = CodeBlockLoading, highlightAfter, sourceEnhancers = serverSourceEnhancers, } = props;
|
|
16
|
+
if (!props['data-precompute']) {
|
|
17
|
+
return (React.createElement("div", null, "Expected precompute data. Ensure the transformHtmlCodeBlock rehype plugin is used."));
|
|
18
|
+
}
|
|
19
|
+
const precompute = JSON.parse(props['data-precompute']);
|
|
20
|
+
const contentProps = props['data-content-props'] ? JSON.parse(props['data-content-props']) : {};
|
|
21
|
+
// A fence with variants hands the loading state every variant, so it draws
|
|
22
|
+
// the variant Select the loaded block shows and the header keeps its size.
|
|
23
|
+
const multipleVariants = Object.keys(precompute ?? {}).length > 1;
|
|
24
|
+
return (React.createElement(CodeHighlighter, { name: props['data-name'], slug: props['data-slug'], precompute: precompute, Content: Content, ContentLoading: ContentLoading, contentProps: contentProps, highlightAfter: highlightAfter, sourceEnhancers: sourceEnhancers, fallbackUsesAllVariants: multipleVariants || undefined }));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=Pre.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pre.js","sourceRoot":"","sources":["../../src/utils/docs/Pre.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAGlE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AA8B/D;;;;;;;GAOG;AACH,MAAM,UAAU,GAAG,CAAC,KAAe;IACjC,MAAM,EACJ,OAAO,GAAG,aAAa,EACvB,cAAc,GAAG,gBAAgB,EACjC,cAAc,EACd,eAAe,GAAG,qBAAqB,GACxC,GAAG,KAAK,CAAA;IAET,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAC9B,OAAO,CACL,sHAEM,CACP,CAAA;IACH,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAA+C,CAAA;IACrG,MAAM,YAAY,GAAG,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC/F,2EAA2E;IAC3E,2EAA2E;IAC3E,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAA;IAEjE,OAAO,CACL,oBAAC,eAAe,IACd,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,EACxB,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,EACxB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,uBAAuB,EAAE,gBAAgB,IAAI,SAAS,GACtD,CACH,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { createDemoFactory as createEngineDemoFactory, createDemoWithVariantsFactory as createEngineDemoWithVariantsFactory } from '@fairgarden/docs/abstractCreateDemo';
|
|
2
|
+
import type { DemoOptions } from '../../content/demo/DemoContent';
|
|
3
|
+
/** The engine's demo factory options (`createDemoFactory` from `@fairgarden/docs/abstractCreateDemo`). */
|
|
4
|
+
export type DemoFactoryOptions<T extends {} = DemoOptions> = Parameters<typeof createEngineDemoFactory<T>>[0];
|
|
5
|
+
/** What `createDemoFactory` returns: `createDemo(url, component, meta?)`. */
|
|
6
|
+
export type CreateDemo<T extends {} = DemoOptions> = ReturnType<typeof createEngineDemoFactory<T>>;
|
|
7
|
+
/** What `createDemoWithVariantsFactory` returns: `createDemoWithVariants(url, variants, meta?)`. */
|
|
8
|
+
export type CreateDemoWithVariants<T extends {} = DemoOptions> = ReturnType<typeof createEngineDemoWithVariantsFactory<T>>;
|
|
9
|
+
/**
|
|
10
|
+
* The engine's `createDemoFactory` with the design system's defaults
|
|
11
|
+
* (`DemoContent: DemoLazy`, `DemoContentLoading: DemoLoading`, `DemoTitle`,
|
|
12
|
+
* `projectDir` / `projectUrl` from `SOURCE_CODE_ROOT_DIR` /
|
|
13
|
+
* `SOURCE_CODE_ROOT_URL`); `options` override any. `highlightAfter` is left
|
|
14
|
+
* to the engine's default (`'idle'`); pass `'init'` only where a demo shows
|
|
15
|
+
* server-side highlighting.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createDemoFactory<T extends {} = DemoOptions>(options?: Partial<DemoFactoryOptions<T>>): CreateDemo<T>;
|
|
18
|
+
/**
|
|
19
|
+
* As `createDemoFactory`, over the engine's `createDemoWithVariantsFactory`,
|
|
20
|
+
* with `fallbackUsesAllVariants: true`: the loading state gets every
|
|
21
|
+
* variant, so it draws the variant Select (nothing shifts at the swap) and
|
|
22
|
+
* every variant's `#slug` targets.
|
|
23
|
+
*/
|
|
24
|
+
export declare function createDemoWithVariantsFactory<T extends {} = DemoOptions>(options?: Partial<DemoFactoryOptions<T>>): CreateDemoWithVariants<T>;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a demo: the component rendered above its highlighted source.
|
|
27
|
+
* @param url `import.meta.url` of the demo's `index.ts`.
|
|
28
|
+
* @param component The component to render.
|
|
29
|
+
* @param meta Optional `name`, `slug` and display options.
|
|
30
|
+
*/
|
|
31
|
+
export declare const createDemo: (url: string, component: React.ComponentType, meta?: {
|
|
32
|
+
name?: string;
|
|
33
|
+
slug?: string;
|
|
34
|
+
displayName?: string;
|
|
35
|
+
variantType?: string;
|
|
36
|
+
skipPrecompute?: boolean;
|
|
37
|
+
highlightAfter?: import("@fairgarden/docs/CodeHighlighter/types").CodeHighlighterProps<{}>["highlightAfter"];
|
|
38
|
+
enhanceAfter?: import("@fairgarden/docs/CodeHighlighter/types").CodeHighlighterProps<{}>["enhanceAfter"];
|
|
39
|
+
editActivation?: import("@fairgarden/docs/CodeHighlighter/types").CodeHighlighterProps<{}>["editActivation"];
|
|
40
|
+
precompute?: import("@fairgarden/docs/CodeHighlighter/types").Code;
|
|
41
|
+
ClientProvider?: React.ComponentType<{
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
}>;
|
|
44
|
+
collapseToEmpty?: boolean;
|
|
45
|
+
showCollapsedFocus?: boolean;
|
|
46
|
+
initialExpanded?: boolean;
|
|
47
|
+
initialCollapsed?: boolean;
|
|
48
|
+
initialDisabled?: boolean;
|
|
49
|
+
}) => import("react").ComponentType<import("../../content/code-block").CodeBlockOptions & {
|
|
50
|
+
collapseToEmpty?: boolean;
|
|
51
|
+
showCollapsedFocus?: boolean;
|
|
52
|
+
initialExpanded?: boolean;
|
|
53
|
+
initialCollapsed?: boolean;
|
|
54
|
+
}> & {
|
|
55
|
+
Title: React.ComponentType;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* As `createDemo`, with switchable variants of the same demo.
|
|
59
|
+
* @param url `import.meta.url` of the demo's `index.ts`.
|
|
60
|
+
* @param variants The variants, keyed by name (`{ CssModules, Tag }`).
|
|
61
|
+
* @param meta Optional `name`, `slug` and display options.
|
|
62
|
+
*/
|
|
63
|
+
export declare const createDemoWithVariants: (url: string, variants: Record<string, React.ComponentType>, meta?: {
|
|
64
|
+
name?: string;
|
|
65
|
+
slug?: string;
|
|
66
|
+
displayName?: string;
|
|
67
|
+
variantType?: string;
|
|
68
|
+
skipPrecompute?: boolean;
|
|
69
|
+
highlightAfter?: import("@fairgarden/docs/CodeHighlighter/types").CodeHighlighterProps<{}>["highlightAfter"];
|
|
70
|
+
enhanceAfter?: import("@fairgarden/docs/CodeHighlighter/types").CodeHighlighterProps<{}>["enhanceAfter"];
|
|
71
|
+
editActivation?: import("@fairgarden/docs/CodeHighlighter/types").CodeHighlighterProps<{}>["editActivation"];
|
|
72
|
+
precompute?: import("@fairgarden/docs/CodeHighlighter/types").Code;
|
|
73
|
+
ClientProvider?: React.ComponentType<{
|
|
74
|
+
children: React.ReactNode;
|
|
75
|
+
}>;
|
|
76
|
+
collapseToEmpty?: boolean;
|
|
77
|
+
showCollapsedFocus?: boolean;
|
|
78
|
+
initialExpanded?: boolean;
|
|
79
|
+
initialCollapsed?: boolean;
|
|
80
|
+
initialDisabled?: boolean;
|
|
81
|
+
}) => import("react").ComponentType<import("../../content/code-block").CodeBlockOptions & {
|
|
82
|
+
collapseToEmpty?: boolean;
|
|
83
|
+
showCollapsedFocus?: boolean;
|
|
84
|
+
initialExpanded?: boolean;
|
|
85
|
+
initialCollapsed?: boolean;
|
|
86
|
+
}> & {
|
|
87
|
+
Title: React.ComponentType;
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=createDemo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDemo.d.ts","sourceRoot":"","sources":["../../src/utils/docs/createDemo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,IAAI,uBAAuB,EAC5C,6BAA6B,IAAI,mCAAmC,EACrE,MAAM,qCAAqC,CAAA;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAajE,0GAA0G;AAC1G,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,EAAE,GAAG,WAAW,IAAI,UAAU,CACrE,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAClC,CAAC,CAAC,CAAC,CAAA;AAEJ,6EAA6E;AAC7E,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,EAAE,GAAG,WAAW,IAAI,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAA;AAElG,oGAAoG;AACpG,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,EAAE,GAAG,WAAW,IAAI,UAAU,CACzE,OAAO,mCAAmC,CAAC,CAAC,CAAC,CAC9C,CAAA;AAkBD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,EAAE,GAAG,WAAW,EAC1D,OAAO,GAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAM,GAC3C,UAAU,CAAC,CAAC,CAAC,CAEf;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,EAAE,GAAG,WAAW,EACtE,OAAO,GAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAM,GAC3C,sBAAsB,CAAC,CAAC,CAAC,CAI3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;CAAsC,CAAA;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;CAAkD,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { createDemoFactory as createEngineDemoFactory, createDemoWithVariantsFactory as createEngineDemoWithVariantsFactory, } from '@fairgarden/docs/abstractCreateDemo';
|
|
2
|
+
import { DemoLazy } from '../../content/demo/DemoLazy';
|
|
3
|
+
import { DemoLoading } from '../../content/demo/DemoLoading';
|
|
4
|
+
import { DemoTitle } from './DemoTitle';
|
|
5
|
+
function demoOptions(options, defaults = {}) {
|
|
6
|
+
return {
|
|
7
|
+
DemoContent: DemoLazy,
|
|
8
|
+
DemoContentLoading: DemoLoading,
|
|
9
|
+
DemoTitle,
|
|
10
|
+
// Set by `withDeploymentConfig`: turns file:// source URLs into hosted links.
|
|
11
|
+
projectDir: process.env.SOURCE_CODE_ROOT_DIR,
|
|
12
|
+
projectUrl: process.env.SOURCE_CODE_ROOT_URL,
|
|
13
|
+
...defaults,
|
|
14
|
+
...options,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The engine's `createDemoFactory` with the design system's defaults
|
|
19
|
+
* (`DemoContent: DemoLazy`, `DemoContentLoading: DemoLoading`, `DemoTitle`,
|
|
20
|
+
* `projectDir` / `projectUrl` from `SOURCE_CODE_ROOT_DIR` /
|
|
21
|
+
* `SOURCE_CODE_ROOT_URL`); `options` override any. `highlightAfter` is left
|
|
22
|
+
* to the engine's default (`'idle'`); pass `'init'` only where a demo shows
|
|
23
|
+
* server-side highlighting.
|
|
24
|
+
*/
|
|
25
|
+
export function createDemoFactory(options = {}) {
|
|
26
|
+
return createEngineDemoFactory(demoOptions(options));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* As `createDemoFactory`, over the engine's `createDemoWithVariantsFactory`,
|
|
30
|
+
* with `fallbackUsesAllVariants: true`: the loading state gets every
|
|
31
|
+
* variant, so it draws the variant Select (nothing shifts at the swap) and
|
|
32
|
+
* every variant's `#slug` targets.
|
|
33
|
+
*/
|
|
34
|
+
export function createDemoWithVariantsFactory(options = {}) {
|
|
35
|
+
return createEngineDemoWithVariantsFactory(demoOptions(options, { fallbackUsesAllVariants: true }));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Creates a demo: the component rendered above its highlighted source.
|
|
39
|
+
* @param url `import.meta.url` of the demo's `index.ts`.
|
|
40
|
+
* @param component The component to render.
|
|
41
|
+
* @param meta Optional `name`, `slug` and display options.
|
|
42
|
+
*/
|
|
43
|
+
export const createDemo = /* @__PURE__ */ createDemoFactory();
|
|
44
|
+
/**
|
|
45
|
+
* As `createDemo`, with switchable variants of the same demo.
|
|
46
|
+
* @param url `import.meta.url` of the demo's `index.ts`.
|
|
47
|
+
* @param variants The variants, keyed by name (`{ CssModules, Tag }`).
|
|
48
|
+
* @param meta Optional `name`, `slug` and display options.
|
|
49
|
+
*/
|
|
50
|
+
export const createDemoWithVariants = /* @__PURE__ */ createDemoWithVariantsFactory();
|
|
51
|
+
//# sourceMappingURL=createDemo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDemo.js","sourceRoot":"","sources":["../../src/utils/docs/createDemo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,IAAI,uBAAuB,EAC5C,6BAA6B,IAAI,mCAAmC,GACrE,MAAM,qCAAqC,CAAA;AAG5C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAuBvC,SAAS,WAAW,CAClB,OAAuC,EACvC,WAA2C,EAAE;IAE7C,OAAO;QACL,WAAW,EAAE,QAAgD;QAC7D,kBAAkB,EAAE,WAA0D;QAC9E,SAAS;QACT,8EAA8E;QAC9E,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB;QAC5C,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB;QAC5C,GAAG,QAAQ;QACX,GAAG,OAAO;KACX,CAAA;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAC/B,UAA0C,EAAE;IAE5C,OAAO,uBAAuB,CAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAA;AACzD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAC3C,UAA0C,EAAE;IAE5C,OAAO,mCAAmC,CACxC,WAAW,CAAC,OAAO,EAAE,EAAE,uBAAuB,EAAE,IAAI,EAAE,CAAC,CACxD,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC,iBAAiB,EAAE,CAAA;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAe,CAAC,6BAA6B,EAAE,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type PreProps } from './Pre';
|
|
3
|
+
type ElementProps<T extends keyof React.JSX.IntrinsicElements> = React.ComponentProps<T>;
|
|
4
|
+
/** A link component for internal hrefs, such as next/link. */
|
|
5
|
+
export type MdxLinkComponent = React.ComponentType<{
|
|
6
|
+
href: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
/** Options for createMdxComponents. Every one is optional. */
|
|
11
|
+
export type CreateMdxComponentsOptions = {
|
|
12
|
+
/**
|
|
13
|
+
* Renders links to internal paths (`/…`), such as next/link, as the
|
|
14
|
+
* design system's Link's element. Default: a plain `a`.
|
|
15
|
+
*/
|
|
16
|
+
Link?: MdxLinkComponent;
|
|
17
|
+
/** Renders `img`, such as next/image. Default: the plain element. */
|
|
18
|
+
Image?: React.ElementType<ElementProps<'img'>>;
|
|
19
|
+
/** Fenced blocks' CodeHighlighter `Content`. Default: `CodeBlockLazy`. */
|
|
20
|
+
Content?: PreProps['Content'];
|
|
21
|
+
/** Fenced blocks' CodeHighlighter `ContentLoading`. Default: `CodeBlockLoading`. */
|
|
22
|
+
ContentLoading?: PreProps['ContentLoading'];
|
|
23
|
+
/**
|
|
24
|
+
* When fenced blocks highlight. Default: the engine's own (`'idle'`). Pass
|
|
25
|
+
* `'init'` only to show server-side highlighting, which costs server work
|
|
26
|
+
* and page weight.
|
|
27
|
+
*/
|
|
28
|
+
highlightAfter?: PreProps['highlightAfter'];
|
|
29
|
+
/**
|
|
30
|
+
* The source enhancers the server runs on fenced blocks' code. Default
|
|
31
|
+
* `serverSourceEnhancers`: the engine's emphasis enhancer with the options
|
|
32
|
+
* demos get, so every block's emphasis window is in the first paint and
|
|
33
|
+
* nothing changes size after hydration [D201]. Pass the enhancers your
|
|
34
|
+
* `demoEmphasisOptions` make, if you set them, or `[]` to run none.
|
|
35
|
+
*/
|
|
36
|
+
sourceEnhancers?: PreProps['sourceEnhancers'];
|
|
37
|
+
/** More components, or replacements for any of the map's, merged last. */
|
|
38
|
+
components?: Record<string, React.ElementType>;
|
|
39
|
+
};
|
|
40
|
+
/** The map createMdxComponents returns. */
|
|
41
|
+
export type MdxComponents = Record<string, React.ElementType>;
|
|
42
|
+
/**
|
|
43
|
+
* The MDX component map: `pre` (the Code Block, through CodeHighlighter),
|
|
44
|
+
* `code` (inline code in the syntax tiers), `h1`–`h4` (h2–h4 link to
|
|
45
|
+
* themselves), `p`, `a` (the design system's Link), `ul`, `ol`, `table`,
|
|
46
|
+
* `blockquote`, `hr`, and `img` when an `Image` is given. Use it as the
|
|
47
|
+
* return of your `useMDXComponents`, and as the types factories'
|
|
48
|
+
* `components`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createMdxComponents(options?: CreateMdxComponentsOptions): MdxComponents;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=createMdxComponents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createMdxComponents.d.ts","sourceRoot":"","sources":["../../src/utils/docs/createMdxComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAA;AAY1C,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC,GAAG,CAAC,iBAAiB,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAA;AAExF,8DAA8D;AAC9D,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAC;IACjD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;AAEF,8DAA8D;AAC9D,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAA;IACvB,qEAAqE;IACrE,KAAK,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAA;IAC9C,0EAA0E;IAC1E,OAAO,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC7B,oFAAoF;IACpF,cAAc,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAA;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAA;IAC3C;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IAC7C,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;CAC/C,CAAA;AAED,2CAA2C;AAC3C,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;AAsB7D;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,0BAA+B,GAAG,aAAa,CAwE3F"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Link as DesignLink } from '../../actions/link';
|
|
3
|
+
import { cx } from '../className';
|
|
4
|
+
import { Pre } from './Pre';
|
|
5
|
+
import styles from './mdx.module.css';
|
|
6
|
+
/** A heading that links to itself when it has an id (rehype-slug gives each one). */
|
|
7
|
+
function heading(Tag, className) {
|
|
8
|
+
function Heading({ className: extra, id, children, ...props }) {
|
|
9
|
+
const Element = Tag;
|
|
10
|
+
return (React.createElement(Element, { ...props, id: id, className: cx(className, extra) }, id ? (React.createElement("a", { href: `#${id}`, className: styles.anchor }, children)) : (children)));
|
|
11
|
+
}
|
|
12
|
+
Heading.displayName = `Mdx${Tag.toUpperCase()}`;
|
|
13
|
+
return Heading;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The MDX component map: `pre` (the Code Block, through CodeHighlighter),
|
|
17
|
+
* `code` (inline code in the syntax tiers), `h1`–`h4` (h2–h4 link to
|
|
18
|
+
* themselves), `p`, `a` (the design system's Link), `ul`, `ol`, `table`,
|
|
19
|
+
* `blockquote`, `hr`, and `img` when an `Image` is given. Use it as the
|
|
20
|
+
* return of your `useMDXComponents`, and as the types factories'
|
|
21
|
+
* `components`.
|
|
22
|
+
*/
|
|
23
|
+
export function createMdxComponents(options = {}) {
|
|
24
|
+
const { Link, Image, Content, ContentLoading, highlightAfter, sourceEnhancers, components } = options;
|
|
25
|
+
function MdxPre(props) {
|
|
26
|
+
return (React.createElement(Pre, { Content: Content, ContentLoading: ContentLoading, highlightAfter: highlightAfter, sourceEnhancers: sourceEnhancers, ...props }));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Links in running text are the design system's inline Link. Internal
|
|
30
|
+
* links render through `Link` when given; absolute URLs get the external
|
|
31
|
+
* mark.
|
|
32
|
+
*/
|
|
33
|
+
function MdxA({ href = '', children, id }) {
|
|
34
|
+
if (href.startsWith('/') && Link) {
|
|
35
|
+
return (React.createElement(DesignLink, { id: id, render: React.createElement(Link, { href: href }) }, children));
|
|
36
|
+
}
|
|
37
|
+
return (React.createElement(DesignLink, { id: id, href: href, external: /^https?:\/\//.test(href) || undefined }, children));
|
|
38
|
+
}
|
|
39
|
+
const map = {
|
|
40
|
+
pre: MdxPre,
|
|
41
|
+
code: ({ className, ...props }) => (React.createElement("code", { ...props, className: cx(styles.code, className) })),
|
|
42
|
+
h1: ({ className, ...props }) => (React.createElement("h1", { ...props, className: cx(styles.h1, className) })),
|
|
43
|
+
h2: heading('h2', styles.h2),
|
|
44
|
+
h3: heading('h3', styles.h3),
|
|
45
|
+
h4: heading('h4', styles.h4),
|
|
46
|
+
p: ({ className, ...props }) => (React.createElement("p", { ...props, className: cx(styles.p, className) })),
|
|
47
|
+
a: MdxA,
|
|
48
|
+
ul: ({ className, ...props }) => (React.createElement("ul", { ...props, className: cx(styles.list, className) })),
|
|
49
|
+
ol: ({ className, ...props }) => (React.createElement("ol", { ...props, className: cx(styles.list, className) })),
|
|
50
|
+
table: ({ className, ...props }) => (React.createElement("div", { className: styles.tableWrap },
|
|
51
|
+
React.createElement("table", { ...props, className: cx(styles.table, className) }))),
|
|
52
|
+
blockquote: ({ className, ...props }) => (React.createElement("blockquote", { ...props, className: cx(styles.blockquote, className) })),
|
|
53
|
+
hr: ({ className, ...props }) => (React.createElement("hr", { ...props, className: cx(styles.hr, className) })),
|
|
54
|
+
};
|
|
55
|
+
if (Image)
|
|
56
|
+
map.img = Image;
|
|
57
|
+
return { ...map, ...components };
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=createMdxComponents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createMdxComponents.js","sourceRoot":"","sources":["../../src/utils/docs/createMdxComponents.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createMultipleTypesFactory as createEngineMultipleTypesFactory, createTypesFactory as createEngineTypesFactory, type AbstractCreateTypesOptions } from '@fairgarden/docs/abstractCreateTypes';
|
|
2
|
+
/** The engine's types factory options (`@fairgarden/docs/abstractCreateTypes`). */
|
|
3
|
+
export type TypesFactoryOptions = AbstractCreateTypesOptions;
|
|
4
|
+
/** What `createTypesFactory` returns: `createTypes(url, component, meta?)`. */
|
|
5
|
+
export type CreateTypes = ReturnType<typeof createEngineTypesFactory>;
|
|
6
|
+
/** What `createMultipleTypesFactory` returns: `createMultipleTypes(url, components, meta?)`. */
|
|
7
|
+
export type CreateMultipleTypes = ReturnType<typeof createEngineMultipleTypesFactory>;
|
|
8
|
+
/** The engine's `createTypesFactory` with `TypesTable` and `TypePre`; `options` override either. */
|
|
9
|
+
export declare function createTypesFactory(options?: Partial<TypesFactoryOptions>): CreateTypes;
|
|
10
|
+
/** As `createTypesFactory`, over the engine's `createMultipleTypesFactory`. */
|
|
11
|
+
export declare function createMultipleTypesFactory(options?: Partial<TypesFactoryOptions>): CreateMultipleTypes;
|
|
12
|
+
/**
|
|
13
|
+
* The API table for one export, extracted from TypeScript at build time.
|
|
14
|
+
* @param url `import.meta.url` of the page's `types.ts`.
|
|
15
|
+
* @param component The export to document.
|
|
16
|
+
*/
|
|
17
|
+
export declare const createTypes: (url: string, typeDef: object, meta?: import("@fairgarden/docs/abstractCreateTypes").TypesTableMeta | undefined) => import("react").ComponentType<{}>;
|
|
18
|
+
/** API tables for several related exports, rendered as `<TypesX.Part />`. */
|
|
19
|
+
export declare const createMultipleTypes: <K extends Record<string, any>>(url: string, typeDef: K, meta?: import("@fairgarden/docs/abstractCreateTypes").TypesTableMeta | undefined) => {
|
|
20
|
+
types: Record<keyof K, import("react").ComponentType<{}>>;
|
|
21
|
+
AdditionalTypes: import("react").ComponentType<{}>;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=createTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTypes.d.ts","sourceRoot":"","sources":["../../src/utils/docs/createTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,IAAI,gCAAgC,EAC9D,kBAAkB,IAAI,wBAAwB,EAC9C,KAAK,0BAA0B,EAChC,MAAM,sCAAsC,CAAA;AAa7C,mFAAmF;AACnF,MAAM,MAAM,mBAAmB,GAAG,0BAA0B,CAAA;AAE5D,+EAA+E;AAC/E,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAErE,gGAAgG;AAChG,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAUrF,oGAAoG;AACpG,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAAG,WAAW,CAE1F;AAED,+EAA+E;AAC/E,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM,GACzC,mBAAmB,CAErB;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,uJAAuC,CAAA;AAE/D,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB;;;CAA+C,CAAA"}
|