@soroush.tech/design-system 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -31
- package/dist/AppBar.cjs +2 -2
- package/dist/AppBar.d.cts +3 -2
- package/dist/AppBar.d.mts +3 -2
- package/dist/AppBar.mjs +2 -2
- package/dist/Avatar.cjs +4 -4
- package/dist/Avatar.d.cts +3 -2
- package/dist/Avatar.d.mts +3 -2
- package/dist/Avatar.mjs +3 -2
- package/dist/Backdrop.cjs +1 -1
- package/dist/Backdrop.d.cts +1 -1
- package/dist/Backdrop.d.mts +1 -1
- package/dist/Backdrop.mjs +1 -1
- package/dist/Button.cjs +5 -6
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +3 -3
- package/dist/ButtonGroup.cjs +2 -2
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/ButtonGroup.mjs +2 -2
- package/dist/Card.cjs +6 -7
- package/dist/Card.d.cts +3 -3
- package/dist/Card.d.mts +3 -3
- package/dist/Card.mjs +4 -4
- package/dist/Checkbox.cjs +2 -2
- package/dist/Checkbox.d.cts +42 -1
- package/dist/Checkbox.d.mts +42 -1
- package/dist/Checkbox.mjs +2 -2
- package/dist/CircularProgress.cjs +2 -2
- package/dist/CircularProgress.d.cts +3 -2
- package/dist/CircularProgress.d.mts +3 -2
- package/dist/CircularProgress.mjs +2 -2
- package/dist/Drawer.cjs +2 -2
- package/dist/Drawer.d.cts +2 -2
- package/dist/Drawer.d.mts +2 -2
- package/dist/Drawer.mjs +2 -2
- package/dist/Flex.cjs +1 -1
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Flex.mjs +1 -1
- package/dist/FocusTrap.cjs +1 -1
- package/dist/FocusTrap.mjs +1 -1
- package/dist/Form.cjs +2 -3
- package/dist/Form.d.cts +1 -1
- package/dist/Form.d.mts +1 -1
- package/dist/Form.mjs +2 -3
- package/dist/{FormContext-CRmRgDgu.cjs → FormContext-BGCsWAFc.cjs} +0 -1
- package/dist/{FormContext-_G3sxJyQ.mjs → FormContext-LrjAGe6U.mjs} +0 -1
- package/dist/FormControl.cjs +6 -6
- package/dist/FormControl.d.cts +2 -2
- package/dist/FormControl.d.mts +2 -2
- package/dist/FormControl.mjs +5 -5
- package/dist/{FormControlContext-aeKTjRKY.cjs → FormControlContext-74gvPGFk.cjs} +0 -1
- package/dist/{FormControlContext-CyxdOxdN.mjs → FormControlContext-CC2kToms.mjs} +0 -1
- package/dist/FormHelperText.cjs +3 -3
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormHelperText.mjs +3 -3
- package/dist/FormLabel.cjs +3 -3
- package/dist/FormLabel.d.cts +17 -1
- package/dist/FormLabel.d.mts +17 -1
- package/dist/FormLabel.mjs +3 -3
- package/dist/Grid.cjs +1 -1
- package/dist/Grid.d.cts +3 -2
- package/dist/Grid.d.mts +3 -2
- package/dist/Grid.mjs +1 -1
- package/dist/{Icon-CAKRmFz3.mjs → Icon-bv8Z38l-.mjs} +44 -3
- package/dist/{Icon-1YtNCUKo.cjs → Icon-zsHe7hWR.cjs} +45 -5
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.d.cts +1 -1
- package/dist/Icon.d.mts +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/Image.cjs +1 -1
- package/dist/Image.d.cts +16 -1
- package/dist/Image.d.mts +16 -1
- package/dist/Image.mjs +1 -1
- package/dist/LinearProgress.cjs +2 -2
- package/dist/LinearProgress.d.cts +3 -2
- package/dist/LinearProgress.d.mts +3 -2
- package/dist/LinearProgress.mjs +2 -2
- package/dist/Link.cjs +4 -4
- package/dist/Link.d.cts +10 -1
- package/dist/Link.d.mts +10 -1
- package/dist/Link.mjs +3 -2
- package/dist/MenuItem.cjs +6 -7
- package/dist/MenuItem.d.cts +2 -1
- package/dist/MenuItem.d.mts +2 -1
- package/dist/MenuItem.mjs +4 -3
- package/dist/{Modal-BDMPTSXv.cjs → Modal-DZH-DzMZ.cjs} +2 -2
- package/dist/{Modal-DR60peRg.mjs → Modal-dy5l7gfH.mjs} +2 -2
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.d.cts +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NativeSelect.cjs +5 -5
- package/dist/NativeSelect.d.cts +3 -2
- package/dist/NativeSelect.d.mts +3 -2
- package/dist/NativeSelect.mjs +4 -3
- package/dist/Pagination/PaginationItem.cjs +3 -3
- package/dist/Pagination/PaginationItem.d.cts +1 -1
- package/dist/Pagination/PaginationItem.d.mts +1 -1
- package/dist/Pagination/PaginationItem.mjs +3 -3
- package/dist/Pagination.cjs +1 -1
- package/dist/Pagination.d.cts +2 -22
- package/dist/Pagination.d.mts +2 -22
- package/dist/Pagination.mjs +1 -1
- package/dist/Paper.cjs +5 -6
- package/dist/Paper.d.cts +1 -1
- package/dist/Paper.d.mts +1 -1
- package/dist/Paper.mjs +3 -2
- package/dist/{Popover-B61J7C79.mjs → Popover-Chgtjn-N.mjs} +3 -2
- package/dist/{Popover-CRDLmywF.cjs → Popover-pEVboMZO.cjs} +4 -4
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.d.cts +4 -3
- package/dist/Popover.d.mts +4 -3
- package/dist/Popover.mjs +1 -1
- package/dist/Quote.cjs +1 -1
- package/dist/Quote.d.cts +13 -1
- package/dist/Quote.d.mts +13 -1
- package/dist/Quote.mjs +1 -1
- package/dist/Radio.cjs +2 -2
- package/dist/Radio.d.cts +2 -2
- package/dist/Radio.d.mts +2 -2
- package/dist/Radio.mjs +2 -2
- package/dist/Select.cjs +10 -32
- package/dist/Select.d.cts +3 -2
- package/dist/Select.d.mts +3 -2
- package/dist/Select.mjs +9 -30
- package/dist/Skeleton.cjs +1 -1
- package/dist/Skeleton.d.cts +2 -1
- package/dist/Skeleton.d.mts +2 -1
- package/dist/Skeleton.mjs +1 -1
- package/dist/Switch.cjs +4 -4
- package/dist/Switch.d.cts +2 -1
- package/dist/Switch.d.mts +2 -1
- package/dist/Switch.mjs +3 -2
- package/dist/Table/Table.cjs +2 -2
- package/dist/Table/Table.d.cts +47 -1
- package/dist/Table/Table.d.mts +47 -1
- package/dist/Table/Table.mjs +2 -2
- package/dist/Table/TableBody.cjs +1 -1
- package/dist/Table/TableBody.d.cts +21 -1
- package/dist/Table/TableBody.d.mts +21 -1
- package/dist/Table/TableBody.mjs +1 -1
- package/dist/Table/TableCell.cjs +3 -3
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableCell.mjs +3 -3
- package/dist/Table/TableContainer.cjs +1 -1
- package/dist/Table/TableContainer.d.cts +17 -1
- package/dist/Table/TableContainer.d.mts +17 -1
- package/dist/Table/TableContainer.mjs +1 -1
- package/dist/Table/TableControl.d.cts +27 -1
- package/dist/Table/TableControl.d.mts +27 -1
- package/dist/Table/TableFooter.cjs +1 -1
- package/dist/Table/TableFooter.d.cts +21 -1
- package/dist/Table/TableFooter.d.mts +21 -1
- package/dist/Table/TableFooter.mjs +1 -1
- package/dist/Table/TableHead.cjs +1 -1
- package/dist/Table/TableHead.d.cts +21 -1
- package/dist/Table/TableHead.d.mts +21 -1
- package/dist/Table/TableHead.mjs +1 -1
- package/dist/Table/TablePagination.cjs +1 -1
- package/dist/Table/TablePagination.d.cts +44 -1
- package/dist/Table/TablePagination.d.mts +44 -1
- package/dist/Table/TablePagination.mjs +1 -1
- package/dist/Table/TablePaginationActions.cjs +4 -4
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TablePaginationActions.mjs +3 -2
- package/dist/Table/TableRow.cjs +3 -3
- package/dist/Table/TableRow.d.cts +29 -1
- package/dist/Table/TableRow.d.mts +29 -1
- package/dist/Table/TableRow.mjs +3 -3
- package/dist/Table/TableSortLabel.cjs +3 -3
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/TableSortLabel.mjs +3 -3
- package/dist/Table/hooks.d.cts +39 -2
- package/dist/Table/hooks.d.mts +39 -2
- package/dist/Table.cjs +1 -1
- package/dist/Table.d.cts +14 -15
- package/dist/Table.d.mts +14 -15
- package/dist/Table.mjs +1 -1
- package/dist/{TableContext-qqp35o8z.cjs → TableContext-Bfg1C3Sr.cjs} +0 -1
- package/dist/{TableContext-2qH7XYJB.d.cts → TableContext-DOhYeOFx.d.cts} +1 -1
- package/dist/{TableContext-BRWPghAI.mjs → TableContext-Dyr89h_k.mjs} +0 -1
- package/dist/{TableContext-2qH7XYJB.d.mts → TableContext-adilRIJZ.d.mts} +1 -1
- package/dist/TextInput.cjs +228 -2
- package/dist/TextInput.d.cts +79 -1
- package/dist/TextInput.d.mts +79 -1
- package/dist/TextInput.mjs +226 -1
- package/dist/ToggleButton/ToggleButton.cjs +4 -4
- package/dist/ToggleButton/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton/ToggleButton.d.mts +1 -1
- package/dist/ToggleButton/ToggleButton.mjs +3 -2
- package/dist/ToggleButton/ToggleButtonGroup.cjs +4 -4
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.mjs +3 -2
- package/dist/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton.d.mts +1 -1
- package/dist/Typography.cjs +3 -3
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/Typography.mjs +2 -1
- package/dist/View.cjs +1 -1
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/View.mjs +1 -1
- package/dist/emotion-BAyqVw0c.mjs +6 -0
- package/dist/emotion-DviPkkGL.cjs +10 -0
- package/dist/engine.cjs +80 -0
- package/dist/engine.d.cts +21 -0
- package/dist/engine.d.mts +21 -0
- package/dist/engine.mjs +69 -0
- package/dist/index-0J6U39Rl.d.mts +53 -0
- package/dist/{index-Dm9HfgV6.d.mts → index-B66h9kbP.d.mts} +17 -7
- package/dist/{index-FwTocqhP.d.cts → index-B8FOqBiS.d.cts} +2 -1
- package/dist/{index-DE5PtzPn.d.mts → index-BF2KXGBM.d.mts} +2 -2
- package/dist/{index-CeYkEXU2.d.cts → index-BGWm4HKR.d.cts} +2 -2
- package/dist/{index-DmJIuQJj.d.mts → index-BGzs2cKy.d.mts} +3 -2
- package/dist/{index-B1rCD6Oo.d.cts → index-BJcHQUga.d.mts} +3 -2
- package/dist/{index-CDVnvjIE.d.cts → index-BLnOsdgc.d.cts} +2 -2
- package/dist/{index-Bihpwn75.d.cts → index-BVX_Jq2G.d.cts} +17 -7
- package/dist/{index-8dzWTpFp.d.cts → index-BahGB82c.d.cts} +3 -2
- package/dist/{index-DASvoACZ.d.cts → index-BnCp6k4s.d.cts} +2 -2
- package/dist/{index-Dy03o__A.d.mts → index-BpLv6Y8m.d.mts} +2 -1
- package/dist/index-C-UBdWKI.d.cts +24 -0
- package/dist/{index-BqVgv2B_.d.mts → index-C1vVYigQ.d.cts} +3 -2
- package/dist/index-CJQXZ4hq.d.cts +53 -0
- package/dist/{index-C0xMvDjL.d.mts → index-CLCtvcKA.d.mts} +2 -2
- package/dist/{index-DSCMXFTn.d.cts → index-CY0Czi9Z.d.cts} +2 -1
- package/dist/{index-pX7tBQdJ.d.mts → index-CYNgNatZ.d.mts} +2 -1
- package/dist/{index-BLfFycfJ.d.mts → index-D0x1ZMVG.d.mts} +6 -2
- package/dist/{index-4rC2j7fR.d.cts → index-D2H_6WLf.d.cts} +3 -2
- package/dist/{index-BnzUumAC2.d.mts → index-DCwLdUQH.d.mts} +2 -1
- package/dist/{index-BH8jQOdF.d.mts → index-DGqakgRN.d.mts} +3 -2
- package/dist/{index-BLRMuO_x.d.mts → index-DLiHZtDi.d.mts} +3 -2
- package/dist/{index-Dp81rWM1.d.cts → index-DN7IvJeV.d.cts} +6 -2
- package/dist/{index-BX5-NfbX.d.cts → index-DdFxl06Q.d.cts} +2 -1
- package/dist/{index-z35LEYG8.d.mts → index-DhcmRr8Q.d.cts} +3 -2
- package/dist/index-DitJ7ss0.d.mts +24 -0
- package/dist/{index-CyZYXDn0.d.cts → index-DwjxjLcD.d.mts} +3 -2
- package/dist/{index-x80UG39F.d.cts → index-HnvGdPCp.d.cts} +3 -2
- package/dist/{index-CxSNNzBT2.d.mts → index-ypEBcdCx.d.mts} +2 -2
- package/dist/index.cjs +2 -32
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{src-DcNT2aIK.mjs → src-BJy4dM4f.mjs} +5 -10
- package/dist/{src-BiocWFSR.cjs → src-C8PIppTy.cjs} +2 -7
- package/dist/{hooks.cjs → style.cjs} +5 -23
- package/dist/style.d.cts +23 -0
- package/dist/style.d.mts +23 -0
- package/dist/{hooks.mjs → style.mjs} +6 -16
- package/dist/theme-Du6xgPsg.cjs +470 -0
- package/dist/{themes.mjs → theme-V6lYzd3j.mjs} +68 -14
- package/dist/theme.cjs +23 -0
- package/dist/theme.d.cts +3 -0
- package/dist/theme.d.mts +3 -0
- package/dist/theme.mjs +3 -0
- package/dist/{themeDefault-B-QjpGEO.cjs → themeDefault-Cebi08Cv.cjs} +1 -1
- package/dist/{themeDefault-CjXaY3ok.mjs → themeDefault-Z3KmyIbm.mjs} +1 -1
- package/dist/themes-BTGww2YK.d.cts +488 -0
- package/dist/themes-BTGww2YK.d.mts +488 -0
- package/dist/{useTableSort--XMWjujs.d.cts → useTablePagination-D6T-fQFc.d.mts} +25 -25
- package/dist/{useTableSort-CpDs4cGq.d.mts → useTablePagination-_94Wrvj9.d.cts} +25 -25
- package/dist/utils.cjs +0 -29
- package/dist/utils.d.cts +1 -19
- package/dist/utils.d.mts +1 -19
- package/dist/utils.mjs +1 -27
- package/package.json +410 -23
- package/dist/CodeBlock.cjs +0 -101
- package/dist/CodeBlock.d.cts +0 -2
- package/dist/CodeBlock.d.mts +0 -2
- package/dist/CodeBlock.mjs +0 -100
- package/dist/Field.cjs +0 -59
- package/dist/Field.d.cts +0 -36
- package/dist/Field.d.mts +0 -36
- package/dist/Field.mjs +0 -58
- package/dist/Markdown/Control.cjs +0 -61
- package/dist/Markdown/Control.d.cts +0 -18
- package/dist/Markdown/Control.d.mts +0 -18
- package/dist/Markdown/Control.mjs +0 -60
- package/dist/Markdown/Editor.cjs +0 -130
- package/dist/Markdown/Editor.d.cts +0 -40
- package/dist/Markdown/Editor.d.mts +0 -40
- package/dist/Markdown/Editor.mjs +0 -128
- package/dist/Markdown/Preview.cjs +0 -241
- package/dist/Markdown/Preview.d.cts +0 -55
- package/dist/Markdown/Preview.d.mts +0 -55
- package/dist/Markdown/Preview.mjs +0 -236
- package/dist/Markdown/Toolbar.cjs +0 -4
- package/dist/Markdown/Toolbar.d.cts +0 -13
- package/dist/Markdown/Toolbar.d.mts +0 -13
- package/dist/Markdown/Toolbar.mjs +0 -2
- package/dist/Markdown.cjs +0 -13
- package/dist/Markdown.d.cts +0 -80
- package/dist/Markdown.d.mts +0 -80
- package/dist/Markdown.mjs +0 -6
- package/dist/MarkdownContext-BN8A3W-J.mjs +0 -11
- package/dist/MarkdownContext-DSwjzpH8.cjs +0 -22
- package/dist/TextInput-6o37Zddp.cjs +0 -231
- package/dist/TextInput-D_lHYJlL.mjs +0 -224
- package/dist/ThemeProvider.cjs +0 -15
- package/dist/ThemeProvider.d.cts +0 -20
- package/dist/ThemeProvider.d.mts +0 -20
- package/dist/ThemeProvider.mjs +0 -14
- package/dist/Toolbar-B-W22Sk4.cjs +0 -459
- package/dist/Toolbar-KbR97iJS.mjs +0 -448
- package/dist/applyAction-B2B-hnP3.mjs +0 -98
- package/dist/applyAction-B2uVHxOE.cjs +0 -103
- package/dist/createTheme-Dts2F4R_.d.cts +0 -21
- package/dist/createTheme-Dts2F4R_.d.mts +0 -21
- package/dist/hooks/useCopyToClipboard.cjs +0 -33
- package/dist/hooks/useCopyToClipboard.d.cts +0 -16
- package/dist/hooks/useCopyToClipboard.d.mts +0 -16
- package/dist/hooks/useCopyToClipboard.mjs +0 -31
- package/dist/hooks.d.cts +0 -40
- package/dist/hooks.d.mts +0 -40
- package/dist/index-BPrjvi7B.d.cts +0 -13
- package/dist/index-BlfIbAMs.d.cts +0 -45
- package/dist/index-BoqlPb3Z.d.mts +0 -13
- package/dist/index-Bwi4kRpf.d.mts +0 -79
- package/dist/index-Bx24ZnOV.d.mts +0 -43
- package/dist/index-C-P_hipv.d.mts +0 -21
- package/dist/index-C5_ciaeo.d.cts +0 -79
- package/dist/index-CDcGTGR4.d.cts +0 -21
- package/dist/index-CEOZI-6L.d.mts +0 -48
- package/dist/index-CLU39rUS2.d.mts +0 -30
- package/dist/index-CM_KCTee.d.cts +0 -48
- package/dist/index-CT9uGKrs.d.cts +0 -30
- package/dist/index-CcYSvIJi.d.cts +0 -21
- package/dist/index-CdF_4ckE.d.mts +0 -11
- package/dist/index-Cl_yBpzW2.d.mts +0 -13
- package/dist/index-Cv_UOfYx.d.mts +0 -18
- package/dist/index-DBGE6yKw.d.mts +0 -16
- package/dist/index-DCQ2fsDu.d.mts +0 -40
- package/dist/index-DD2AVtiR.d.cts +0 -16
- package/dist/index-DOPXpr2J.d.cts +0 -43
- package/dist/index-DTkQSXQD.d.cts +0 -11
- package/dist/index-DeJWkpf9.d.cts +0 -16
- package/dist/index-DeiZHSwA.d.cts +0 -12
- package/dist/index-Des8BisQ.d.mts +0 -12
- package/dist/index-Dg8-CPOO.d.cts +0 -18
- package/dist/index-DgRS5Aqv.d.mts +0 -16
- package/dist/index-Dtzj8X58.d.cts +0 -40
- package/dist/index-DvW2eETV.d.mts +0 -21
- package/dist/index-GVsFY00r.d.cts +0 -21
- package/dist/index-Nqco3fsM.d.cts +0 -13
- package/dist/index-g-9DZ_KQ.d.cts +0 -28
- package/dist/index-g9EThkSg.d.mts +0 -21
- package/dist/index-kpk9e3xM2.d.mts +0 -45
- package/dist/index-u57CbuAU2.d.mts +0 -28
- package/dist/themes-D1SAp3SL.d.mts +0 -500
- package/dist/themes-D81JYbqm.d.cts +0 -500
- package/dist/themes.cjs +0 -318
- package/dist/themes.d.cts +0 -3
- package/dist/themes.d.mts +0 -3
- package/dist/useDefaultProps-Cb-5FNok.cjs +0 -19
- package/dist/useDefaultProps-CoApb4KT.mjs +0 -14
- package/dist/utils/styleCache.cjs +0 -7
- package/dist/utils/styleCache.d.cts +0 -3
- package/dist/utils/styleCache.d.mts +0 -4
- package/dist/utils/styleCache.mjs +0 -5
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { d as styled } from "../src-DcNT2aIK.mjs";
|
|
2
|
-
import { View } from "../View.mjs";
|
|
3
|
-
import { Typography } from "../Typography.mjs";
|
|
4
|
-
import { Checkbox } from "../Checkbox.mjs";
|
|
5
|
-
import { CodeBlock } from "../CodeBlock.mjs";
|
|
6
|
-
import { Image } from "../Image.mjs";
|
|
7
|
-
import { Link } from "../Link.mjs";
|
|
8
|
-
import { Quote } from "../Quote.mjs";
|
|
9
|
-
import { Table } from "../Table/Table.mjs";
|
|
10
|
-
import { TableBody } from "../Table/TableBody.mjs";
|
|
11
|
-
import { TableCell } from "../Table/TableCell.mjs";
|
|
12
|
-
import { TableContainer } from "../Table/TableContainer.mjs";
|
|
13
|
-
import { TableHead } from "../Table/TableHead.mjs";
|
|
14
|
-
import { TableRow } from "../Table/TableRow.mjs";
|
|
15
|
-
import { createContext, useContext } from "react";
|
|
16
|
-
import { jsx } from "react/jsx-runtime";
|
|
17
|
-
import ReactMarkdown from "react-markdown";
|
|
18
|
-
import remarkGfm from "remark-gfm";
|
|
19
|
-
import rehypeHighlight from "rehype-highlight";
|
|
20
|
-
//#region src/Markdown/Preview/Preview.tsx
|
|
21
|
-
const remarkPlugins = [remarkGfm];
|
|
22
|
-
const rehypePlugins = [[rehypeHighlight, { ignoreMissing: true }]];
|
|
23
|
-
const PreviewRoot = styled(View, {
|
|
24
|
-
name: "MarkdownPreview",
|
|
25
|
-
label: "MarkdownPreview"
|
|
26
|
-
})({
|
|
27
|
-
minWidth: 0,
|
|
28
|
-
maxWidth: "100%",
|
|
29
|
-
overflowWrap: "break-word"
|
|
30
|
-
});
|
|
31
|
-
const EMPTY_SLOT_PROPS = {};
|
|
32
|
-
const SlotPropsContext = createContext(EMPTY_SLOT_PROPS);
|
|
33
|
-
function slotted(render) {
|
|
34
|
-
function Slotted(props) {
|
|
35
|
-
return render(useContext(SlotPropsContext), props);
|
|
36
|
-
}
|
|
37
|
-
return Slotted;
|
|
38
|
-
}
|
|
39
|
-
const components = {
|
|
40
|
-
h1: slotted(({ h1 }, { children }) => /* @__PURE__ */ jsx(Typography, {
|
|
41
|
-
mt: 2,
|
|
42
|
-
variant: "h1",
|
|
43
|
-
color: "primary",
|
|
44
|
-
gutterBottom: true,
|
|
45
|
-
...h1,
|
|
46
|
-
children
|
|
47
|
-
})),
|
|
48
|
-
h2: slotted(({ h2 }, { children }) => /* @__PURE__ */ jsx(Typography, {
|
|
49
|
-
mt: 2,
|
|
50
|
-
variant: "h2",
|
|
51
|
-
color: "primary",
|
|
52
|
-
gutterBottom: true,
|
|
53
|
-
...h2,
|
|
54
|
-
children
|
|
55
|
-
})),
|
|
56
|
-
h3: slotted(({ h3 }, { children }) => /* @__PURE__ */ jsx(Typography, {
|
|
57
|
-
mt: 2,
|
|
58
|
-
variant: "h3",
|
|
59
|
-
color: "primary",
|
|
60
|
-
gutterBottom: true,
|
|
61
|
-
...h3,
|
|
62
|
-
children
|
|
63
|
-
})),
|
|
64
|
-
h4: slotted(({ h4 }, { children }) => /* @__PURE__ */ jsx(Typography, {
|
|
65
|
-
mt: 2,
|
|
66
|
-
variant: "h4",
|
|
67
|
-
gutterBottom: true,
|
|
68
|
-
...h4,
|
|
69
|
-
children
|
|
70
|
-
})),
|
|
71
|
-
h5: slotted(({ h5 }, { children }) => /* @__PURE__ */ jsx(Typography, {
|
|
72
|
-
mt: 2,
|
|
73
|
-
variant: "h5",
|
|
74
|
-
gutterBottom: true,
|
|
75
|
-
...h5,
|
|
76
|
-
children
|
|
77
|
-
})),
|
|
78
|
-
h6: slotted(({ h6 }, { children }) => /* @__PURE__ */ jsx(Typography, {
|
|
79
|
-
mt: 2,
|
|
80
|
-
variant: "h6",
|
|
81
|
-
gutterBottom: true,
|
|
82
|
-
...h6,
|
|
83
|
-
children
|
|
84
|
-
})),
|
|
85
|
-
p: slotted(({ p }, { children }) => /* @__PURE__ */ jsx(Typography, {
|
|
86
|
-
variant: "body1",
|
|
87
|
-
color: "secondary",
|
|
88
|
-
mb: 2,
|
|
89
|
-
lineHeight: "relaxed",
|
|
90
|
-
...p,
|
|
91
|
-
children
|
|
92
|
-
})),
|
|
93
|
-
a: slotted(({ a }, { href, children }) => /* @__PURE__ */ jsx(Link, {
|
|
94
|
-
href,
|
|
95
|
-
underline: "hover",
|
|
96
|
-
...a,
|
|
97
|
-
children
|
|
98
|
-
})),
|
|
99
|
-
strong: slotted(({ strong }, { children }) => /* @__PURE__ */ jsx(Typography, {
|
|
100
|
-
as: "strong",
|
|
101
|
-
variant: "inherit",
|
|
102
|
-
fontWeight: "extraBold",
|
|
103
|
-
...strong,
|
|
104
|
-
children
|
|
105
|
-
})),
|
|
106
|
-
em: slotted(({ em }, { children }) => /* @__PURE__ */ jsx(Typography, {
|
|
107
|
-
as: "em",
|
|
108
|
-
variant: "inherit",
|
|
109
|
-
fontStyle: "italic",
|
|
110
|
-
...em,
|
|
111
|
-
children
|
|
112
|
-
})),
|
|
113
|
-
ul: slotted(({ ul }, { children }) => /* @__PURE__ */ jsx(View, {
|
|
114
|
-
as: "ul",
|
|
115
|
-
pl: 3,
|
|
116
|
-
mb: 2,
|
|
117
|
-
...ul,
|
|
118
|
-
children
|
|
119
|
-
})),
|
|
120
|
-
ol: slotted(({ ol }, { children }) => /* @__PURE__ */ jsx(View, {
|
|
121
|
-
as: "ol",
|
|
122
|
-
pl: 3,
|
|
123
|
-
mb: 2,
|
|
124
|
-
...ol,
|
|
125
|
-
children
|
|
126
|
-
})),
|
|
127
|
-
li: slotted(({ li }, { children, className }) => /* @__PURE__ */ jsx(Typography, {
|
|
128
|
-
as: "li",
|
|
129
|
-
color: "secondary",
|
|
130
|
-
lineHeight: "base",
|
|
131
|
-
variant: "body1",
|
|
132
|
-
gutterBottom: true,
|
|
133
|
-
style: className?.includes("task-list-item") ? { listStyleType: "none" } : void 0,
|
|
134
|
-
...li,
|
|
135
|
-
children
|
|
136
|
-
})),
|
|
137
|
-
input: slotted(({ input }, { checked }) => /* @__PURE__ */ jsx(Checkbox, {
|
|
138
|
-
checked: Boolean(checked),
|
|
139
|
-
disabled: true,
|
|
140
|
-
color: "primary",
|
|
141
|
-
size: "sm",
|
|
142
|
-
"aria-label": "Task item",
|
|
143
|
-
mr: 1,
|
|
144
|
-
...input
|
|
145
|
-
})),
|
|
146
|
-
blockquote: slotted(({ blockquote }, { children }) => /* @__PURE__ */ jsx(Quote, {
|
|
147
|
-
as: "blockquote",
|
|
148
|
-
pl: 3,
|
|
149
|
-
py: 1,
|
|
150
|
-
my: 2,
|
|
151
|
-
...blockquote,
|
|
152
|
-
children
|
|
153
|
-
})),
|
|
154
|
-
code: slotted(({ code }, { className, children }) => {
|
|
155
|
-
const isBlock = (className ?? "").includes("language-");
|
|
156
|
-
return /* @__PURE__ */ jsx(Typography, {
|
|
157
|
-
as: "code",
|
|
158
|
-
color: "initial",
|
|
159
|
-
variant: "inherit",
|
|
160
|
-
fontFamily: "mono",
|
|
161
|
-
display: isBlock ? "block" : "inline",
|
|
162
|
-
bg: isBlock ? "transparent" : "paper",
|
|
163
|
-
px: isBlock ? 0 : 1,
|
|
164
|
-
borderRadius: "sm",
|
|
165
|
-
...code,
|
|
166
|
-
children
|
|
167
|
-
});
|
|
168
|
-
}),
|
|
169
|
-
pre: slotted(({ pre }, { children }) => /* @__PURE__ */ jsx(CodeBlock, {
|
|
170
|
-
...pre,
|
|
171
|
-
children
|
|
172
|
-
})),
|
|
173
|
-
table: slotted(({ table }, { children }) => /* @__PURE__ */ jsx(TableContainer, {
|
|
174
|
-
my: 2,
|
|
175
|
-
children: /* @__PURE__ */ jsx(Table, {
|
|
176
|
-
bg: "terminal",
|
|
177
|
-
borderRadius: "md",
|
|
178
|
-
...table,
|
|
179
|
-
children
|
|
180
|
-
})
|
|
181
|
-
})),
|
|
182
|
-
thead: slotted(({ thead }, { children }) => /* @__PURE__ */ jsx(TableHead, {
|
|
183
|
-
bg: "grid",
|
|
184
|
-
color: "primary",
|
|
185
|
-
...thead,
|
|
186
|
-
children
|
|
187
|
-
})),
|
|
188
|
-
tbody: slotted(({ tbody }, { children }) => /* @__PURE__ */ jsx(TableBody, {
|
|
189
|
-
...tbody,
|
|
190
|
-
children
|
|
191
|
-
})),
|
|
192
|
-
tr: slotted(({ tr }, { children }) => /* @__PURE__ */ jsx(TableRow, {
|
|
193
|
-
isHoverable: true,
|
|
194
|
-
...tr,
|
|
195
|
-
children
|
|
196
|
-
})),
|
|
197
|
-
th: slotted(({ th }, { children, style }) => /* @__PURE__ */ jsx(TableCell, {
|
|
198
|
-
style,
|
|
199
|
-
...th,
|
|
200
|
-
children
|
|
201
|
-
})),
|
|
202
|
-
td: slotted(({ td }, { children, style }) => /* @__PURE__ */ jsx(TableCell, {
|
|
203
|
-
style,
|
|
204
|
-
...td,
|
|
205
|
-
children
|
|
206
|
-
})),
|
|
207
|
-
hr: slotted(({ hr }) => /* @__PURE__ */ jsx(View, {
|
|
208
|
-
as: "hr",
|
|
209
|
-
my: 2,
|
|
210
|
-
height: "1px",
|
|
211
|
-
bg: "grid",
|
|
212
|
-
width: "100%",
|
|
213
|
-
border: "none",
|
|
214
|
-
...hr
|
|
215
|
-
})),
|
|
216
|
-
img: slotted(({ img }, { src, alt }) => /* @__PURE__ */ jsx(Image, {
|
|
217
|
-
src,
|
|
218
|
-
alt,
|
|
219
|
-
maxWidth: "100%",
|
|
220
|
-
...img
|
|
221
|
-
}))
|
|
222
|
-
};
|
|
223
|
-
/** Renders a markdown string with every element mapped to a design-system primitive. */
|
|
224
|
-
function Preview({ children, slotProps }) {
|
|
225
|
-
return /* @__PURE__ */ jsx(PreviewRoot, { children: /* @__PURE__ */ jsx(SlotPropsContext.Provider, {
|
|
226
|
-
value: slotProps ?? EMPTY_SLOT_PROPS,
|
|
227
|
-
children: /* @__PURE__ */ jsx(ReactMarkdown, {
|
|
228
|
-
components,
|
|
229
|
-
remarkPlugins,
|
|
230
|
-
rehypePlugins,
|
|
231
|
-
children
|
|
232
|
-
})
|
|
233
|
-
}) });
|
|
234
|
-
}
|
|
235
|
-
//#endregion
|
|
236
|
-
export { Preview };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region src/Markdown/Toolbar/Toolbar.d.ts
|
|
2
|
-
/** Formatting buttons, heading + code-language selects, and the table-size picker. */
|
|
3
|
-
declare function Toolbar(): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
5
|
-
//#region src/Markdown/Toolbar/TablePicker.d.ts
|
|
6
|
-
interface TablePickerProps {
|
|
7
|
-
/** Fired with the chosen (rows, cols) when a grid cell is picked. */
|
|
8
|
-
onSelect: (rows: number, cols: number) => void;
|
|
9
|
-
}
|
|
10
|
-
/** A "Table" trigger that opens a hover grid for choosing table dimensions. */
|
|
11
|
-
declare function TablePicker({ onSelect }: Readonly<TablePickerProps>): import("react").JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { TablePicker, TablePickerProps, Toolbar };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region src/Markdown/Toolbar/Toolbar.d.ts
|
|
2
|
-
/** Formatting buttons, heading + code-language selects, and the table-size picker. */
|
|
3
|
-
declare function Toolbar(): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
5
|
-
//#region src/Markdown/Toolbar/TablePicker.d.ts
|
|
6
|
-
interface TablePickerProps {
|
|
7
|
-
/** Fired with the chosen (rows, cols) when a grid cell is picked. */
|
|
8
|
-
onSelect: (rows: number, cols: number) => void;
|
|
9
|
-
}
|
|
10
|
-
/** A "Table" trigger that opens a hover grid for choosing table dimensions. */
|
|
11
|
-
declare function TablePicker({ onSelect }: Readonly<TablePickerProps>): import("react").JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { TablePicker, TablePickerProps, Toolbar };
|
package/dist/Markdown.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_MarkdownContext = require("./MarkdownContext-DSwjzpH8.cjs");
|
|
3
|
-
const require_Markdown_Control = require("./Markdown/Control.cjs");
|
|
4
|
-
const require_Toolbar = require("./Toolbar-B-W22Sk4.cjs");
|
|
5
|
-
const require_Markdown_Editor = require("./Markdown/Editor.cjs");
|
|
6
|
-
const require_Markdown_Preview = require("./Markdown/Preview.cjs");
|
|
7
|
-
exports.Control = require_Markdown_Control.Control;
|
|
8
|
-
exports.Editor = require_Markdown_Editor.Editor;
|
|
9
|
-
exports.MarkdownContext = require_MarkdownContext.MarkdownContext;
|
|
10
|
-
exports.Preview = require_Markdown_Preview.Preview;
|
|
11
|
-
exports.TablePicker = require_Toolbar.TablePicker;
|
|
12
|
-
exports.Toolbar = require_Toolbar.Toolbar;
|
|
13
|
-
exports.useMarkdownContext = require_MarkdownContext.useMarkdownContext;
|
package/dist/Markdown.d.cts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { r as IconName } from "./index-Dp81rWM1.cjs";
|
|
2
|
-
import { Control, ControlProps } from "./Markdown/Control.cjs";
|
|
3
|
-
import { Editor, EditorProps } from "./Markdown/Editor.cjs";
|
|
4
|
-
import { Preview, PreviewProps, PreviewSlotProps } from "./Markdown/Preview.cjs";
|
|
5
|
-
import { TablePicker, TablePickerProps, Toolbar } from "./Markdown/Toolbar.cjs";
|
|
6
|
-
//#region src/Markdown/const.d.ts
|
|
7
|
-
/** How a text label is rendered — mirrors the mark it inserts. */
|
|
8
|
-
type ToolbarLabelEmphasis = 'bold' | 'italic' | 'strike';
|
|
9
|
-
/** Shared presentation for a toolbar control. */
|
|
10
|
-
interface BaseAction {
|
|
11
|
-
id: string;
|
|
12
|
-
/** Text label shown when no `icon` is set. */
|
|
13
|
-
label: string;
|
|
14
|
-
/** Accessible name — always the control's aria-label. */
|
|
15
|
-
ariaLabel: string;
|
|
16
|
-
/** Registry icon shown instead of the text label. */
|
|
17
|
-
icon?: IconName;
|
|
18
|
-
/** Styles the text label to mirror the mark (e.g. bold `B`). Ignored when `icon` is set. */
|
|
19
|
-
emphasis?: ToolbarLabelEmphasis;
|
|
20
|
-
/** Consecutive actions sharing a group id render as one joined button cluster. */
|
|
21
|
-
group?: string;
|
|
22
|
-
}
|
|
23
|
-
/** Wraps the selection (or a placeholder) in a leading/trailing marker — bold, links, code blocks. */
|
|
24
|
-
interface WrapAction extends BaseAction {
|
|
25
|
-
kind: 'wrap';
|
|
26
|
-
prefix: string;
|
|
27
|
-
suffix: string;
|
|
28
|
-
placeholder: string;
|
|
29
|
-
/** Block-level fence (e.g. code block): separated by newlines and never toggled off. */
|
|
30
|
-
block?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/** Prepends a marker to every line the selection touches — headings, quotes, lists. */
|
|
33
|
-
interface LinePrefixAction extends BaseAction {
|
|
34
|
-
kind: 'linePrefix';
|
|
35
|
-
linePrefix: string;
|
|
36
|
-
/**
|
|
37
|
-
* Line-start pattern for a family of mutually-exclusive markers (e.g. all list types). When
|
|
38
|
-
* set, applying the action strips any matching marker first, then toggles its own off or
|
|
39
|
-
* replaces a sibling's — so the list/ordered/task buttons swap and toggle instead of stacking.
|
|
40
|
-
*/
|
|
41
|
-
family?: RegExp;
|
|
42
|
-
/**
|
|
43
|
-
* Whether re-applying an action that already owns the line's marker removes it. Defaults to
|
|
44
|
-
* toggling off; set `false` for replace-only families (e.g. heading levels from a select,
|
|
45
|
-
* where picking a level should set it, not toggle it away).
|
|
46
|
-
*/
|
|
47
|
-
toggle?: boolean;
|
|
48
|
-
}
|
|
49
|
-
/** Inserts a standalone snippet at the caret, ignoring the selection — tables, rules. */
|
|
50
|
-
interface InsertAction extends BaseAction {
|
|
51
|
-
kind: 'insert';
|
|
52
|
-
snippet: string;
|
|
53
|
-
}
|
|
54
|
-
type ToolbarAction = WrapAction | LinePrefixAction | InsertAction;
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/Markdown/MarkdownContext.d.ts
|
|
57
|
-
/** A textarea selection range shared between the Editor and the Toolbar. */
|
|
58
|
-
interface MarkdownSelection {
|
|
59
|
-
start: number;
|
|
60
|
-
end: number;
|
|
61
|
-
}
|
|
62
|
-
interface MarkdownContextValue {
|
|
63
|
-
/** Current markdown source. */
|
|
64
|
-
value: string;
|
|
65
|
-
/** Called with the next source on edit or a toolbar action. */
|
|
66
|
-
onChange: (value: string) => void;
|
|
67
|
-
/** Applies a toolbar action at the last remembered selection and queues the caret to restore. */
|
|
68
|
-
dispatch: (action: ToolbarAction) => void;
|
|
69
|
-
/** Records the current textarea selection — the Editor calls this on select/blur. */
|
|
70
|
-
rememberSelection: (selection: MarkdownSelection) => void;
|
|
71
|
-
/** Queues a selection to restore after the next value change (e.g. after Tab). */
|
|
72
|
-
queueSelection: (selection: MarkdownSelection) => void;
|
|
73
|
-
/** Returns and clears the queued selection — the Editor's effect calls this to restore focus. */
|
|
74
|
-
takeQueuedSelection: () => MarkdownSelection | null;
|
|
75
|
-
}
|
|
76
|
-
declare const MarkdownContext: import("react").Context<MarkdownContextValue | null>;
|
|
77
|
-
/** Reads the Markdown compound context; throws if used outside `<Markdown.Control>`. */
|
|
78
|
-
declare function useMarkdownContext(): MarkdownContextValue;
|
|
79
|
-
//#endregion
|
|
80
|
-
export { Control, ControlProps, Editor, EditorProps, MarkdownContext, MarkdownContextValue, MarkdownSelection, Preview, PreviewProps, PreviewSlotProps, TablePicker, TablePickerProps, Toolbar, useMarkdownContext };
|
package/dist/Markdown.d.mts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { r as IconName } from "./index-BLfFycfJ.mjs";
|
|
2
|
-
import { Control, ControlProps } from "./Markdown/Control.mjs";
|
|
3
|
-
import { Editor, EditorProps } from "./Markdown/Editor.mjs";
|
|
4
|
-
import { Preview, PreviewProps, PreviewSlotProps } from "./Markdown/Preview.mjs";
|
|
5
|
-
import { TablePicker, TablePickerProps, Toolbar } from "./Markdown/Toolbar.mjs";
|
|
6
|
-
//#region src/Markdown/const.d.ts
|
|
7
|
-
/** How a text label is rendered — mirrors the mark it inserts. */
|
|
8
|
-
type ToolbarLabelEmphasis = 'bold' | 'italic' | 'strike';
|
|
9
|
-
/** Shared presentation for a toolbar control. */
|
|
10
|
-
interface BaseAction {
|
|
11
|
-
id: string;
|
|
12
|
-
/** Text label shown when no `icon` is set. */
|
|
13
|
-
label: string;
|
|
14
|
-
/** Accessible name — always the control's aria-label. */
|
|
15
|
-
ariaLabel: string;
|
|
16
|
-
/** Registry icon shown instead of the text label. */
|
|
17
|
-
icon?: IconName;
|
|
18
|
-
/** Styles the text label to mirror the mark (e.g. bold `B`). Ignored when `icon` is set. */
|
|
19
|
-
emphasis?: ToolbarLabelEmphasis;
|
|
20
|
-
/** Consecutive actions sharing a group id render as one joined button cluster. */
|
|
21
|
-
group?: string;
|
|
22
|
-
}
|
|
23
|
-
/** Wraps the selection (or a placeholder) in a leading/trailing marker — bold, links, code blocks. */
|
|
24
|
-
interface WrapAction extends BaseAction {
|
|
25
|
-
kind: 'wrap';
|
|
26
|
-
prefix: string;
|
|
27
|
-
suffix: string;
|
|
28
|
-
placeholder: string;
|
|
29
|
-
/** Block-level fence (e.g. code block): separated by newlines and never toggled off. */
|
|
30
|
-
block?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/** Prepends a marker to every line the selection touches — headings, quotes, lists. */
|
|
33
|
-
interface LinePrefixAction extends BaseAction {
|
|
34
|
-
kind: 'linePrefix';
|
|
35
|
-
linePrefix: string;
|
|
36
|
-
/**
|
|
37
|
-
* Line-start pattern for a family of mutually-exclusive markers (e.g. all list types). When
|
|
38
|
-
* set, applying the action strips any matching marker first, then toggles its own off or
|
|
39
|
-
* replaces a sibling's — so the list/ordered/task buttons swap and toggle instead of stacking.
|
|
40
|
-
*/
|
|
41
|
-
family?: RegExp;
|
|
42
|
-
/**
|
|
43
|
-
* Whether re-applying an action that already owns the line's marker removes it. Defaults to
|
|
44
|
-
* toggling off; set `false` for replace-only families (e.g. heading levels from a select,
|
|
45
|
-
* where picking a level should set it, not toggle it away).
|
|
46
|
-
*/
|
|
47
|
-
toggle?: boolean;
|
|
48
|
-
}
|
|
49
|
-
/** Inserts a standalone snippet at the caret, ignoring the selection — tables, rules. */
|
|
50
|
-
interface InsertAction extends BaseAction {
|
|
51
|
-
kind: 'insert';
|
|
52
|
-
snippet: string;
|
|
53
|
-
}
|
|
54
|
-
type ToolbarAction = WrapAction | LinePrefixAction | InsertAction;
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/Markdown/MarkdownContext.d.ts
|
|
57
|
-
/** A textarea selection range shared between the Editor and the Toolbar. */
|
|
58
|
-
interface MarkdownSelection {
|
|
59
|
-
start: number;
|
|
60
|
-
end: number;
|
|
61
|
-
}
|
|
62
|
-
interface MarkdownContextValue {
|
|
63
|
-
/** Current markdown source. */
|
|
64
|
-
value: string;
|
|
65
|
-
/** Called with the next source on edit or a toolbar action. */
|
|
66
|
-
onChange: (value: string) => void;
|
|
67
|
-
/** Applies a toolbar action at the last remembered selection and queues the caret to restore. */
|
|
68
|
-
dispatch: (action: ToolbarAction) => void;
|
|
69
|
-
/** Records the current textarea selection — the Editor calls this on select/blur. */
|
|
70
|
-
rememberSelection: (selection: MarkdownSelection) => void;
|
|
71
|
-
/** Queues a selection to restore after the next value change (e.g. after Tab). */
|
|
72
|
-
queueSelection: (selection: MarkdownSelection) => void;
|
|
73
|
-
/** Returns and clears the queued selection — the Editor's effect calls this to restore focus. */
|
|
74
|
-
takeQueuedSelection: () => MarkdownSelection | null;
|
|
75
|
-
}
|
|
76
|
-
declare const MarkdownContext: import("react").Context<MarkdownContextValue | null>;
|
|
77
|
-
/** Reads the Markdown compound context; throws if used outside `<Markdown.Control>`. */
|
|
78
|
-
declare function useMarkdownContext(): MarkdownContextValue;
|
|
79
|
-
//#endregion
|
|
80
|
-
export { Control, ControlProps, Editor, EditorProps, MarkdownContext, MarkdownContextValue, MarkdownSelection, Preview, PreviewProps, PreviewSlotProps, TablePicker, TablePickerProps, Toolbar, useMarkdownContext };
|
package/dist/Markdown.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { n as useMarkdownContext, t as MarkdownContext } from "./MarkdownContext-BN8A3W-J.mjs";
|
|
2
|
-
import { Control } from "./Markdown/Control.mjs";
|
|
3
|
-
import { n as TablePicker, t as Toolbar } from "./Toolbar-KbR97iJS.mjs";
|
|
4
|
-
import { Editor } from "./Markdown/Editor.mjs";
|
|
5
|
-
import { Preview } from "./Markdown/Preview.mjs";
|
|
6
|
-
export { Control, Editor, MarkdownContext, Preview, TablePicker, Toolbar, useMarkdownContext };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from "react";
|
|
2
|
-
//#region src/Markdown/MarkdownContext.ts
|
|
3
|
-
const MarkdownContext = createContext(null);
|
|
4
|
-
/** Reads the Markdown compound context; throws if used outside `<Markdown.Control>`. */
|
|
5
|
-
function useMarkdownContext() {
|
|
6
|
-
const context = useContext(MarkdownContext);
|
|
7
|
-
if (!context) throw new Error("Markdown parts must be rendered inside <Markdown.Control>");
|
|
8
|
-
return context;
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { useMarkdownContext as n, MarkdownContext as t };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
let react = require("react");
|
|
2
|
-
//#region src/Markdown/MarkdownContext.ts
|
|
3
|
-
const MarkdownContext = (0, react.createContext)(null);
|
|
4
|
-
/** Reads the Markdown compound context; throws if used outside `<Markdown.Control>`. */
|
|
5
|
-
function useMarkdownContext() {
|
|
6
|
-
const context = (0, react.useContext)(MarkdownContext);
|
|
7
|
-
if (!context) throw new Error("Markdown parts must be rendered inside <Markdown.Control>");
|
|
8
|
-
return context;
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
Object.defineProperty(exports, "MarkdownContext", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function() {
|
|
14
|
-
return MarkdownContext;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(exports, "useMarkdownContext", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return useMarkdownContext;
|
|
21
|
-
}
|
|
22
|
-
});
|