@aussieljk/forkbook 0.0.0-stage → 0.0.1-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 +22 -0
- package/README.md +77 -2
- package/assets/addon-vitest/templates/vitest.config.4.template.ts +36 -0
- package/assets/browser/favicon-wrapper.svg +46 -0
- package/assets/browser/favicon.svg +1 -0
- package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-bold.woff2 +0 -0
- package/assets/browser/nunito-sans-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-regular.woff2 +0 -0
- package/assets/builder-vite/iframe.html +99 -0
- package/assets/create/rendererAssets/.eslintrc.json +16 -0
- package/assets/create/rendererAssets/common/Configure.mdx +388 -0
- package/assets/create/rendererAssets/common/assets/accessibility.png +0 -0
- package/assets/create/rendererAssets/common/assets/accessibility.svg +1 -0
- package/assets/create/rendererAssets/common/assets/addon-library.png +0 -0
- package/assets/create/rendererAssets/common/assets/assets.png +0 -0
- package/assets/create/rendererAssets/common/assets/avif-test-image.avif +0 -0
- package/assets/create/rendererAssets/common/assets/context.png +0 -0
- package/assets/create/rendererAssets/common/assets/discord.svg +1 -0
- package/assets/create/rendererAssets/common/assets/docs.png +0 -0
- package/assets/create/rendererAssets/common/assets/figma-plugin.png +0 -0
- package/assets/create/rendererAssets/common/assets/github.svg +1 -0
- package/assets/create/rendererAssets/common/assets/share.png +0 -0
- package/assets/create/rendererAssets/common/assets/styling.png +0 -0
- package/assets/create/rendererAssets/common/assets/testing.png +0 -0
- package/assets/create/rendererAssets/common/assets/theming.png +0 -0
- package/assets/create/rendererAssets/common/assets/tutorials.svg +1 -0
- package/assets/create/rendererAssets/common/assets/youtube.svg +1 -0
- package/assets/create/rendererAssets/common/button.css +30 -0
- package/assets/create/rendererAssets/common/header.css +32 -0
- package/assets/create/rendererAssets/common/page.css +68 -0
- package/assets/create/templates/react-native/index.expo.js +20 -0
- package/assets/create/templates/react-native/index.js +25 -0
- package/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/addon-controls-args-annotated.png +0 -0
- package/assets/docs/addon-controls-args-background-color.png +0 -0
- package/assets/docs/addon-controls-args-background-string.png +0 -0
- package/assets/docs/addon-controls-args-docs.png +0 -0
- package/assets/docs/addon-controls-args-logging.png +0 -0
- package/assets/docs/addon-controls-args-no-annotation.png +0 -0
- package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
- package/assets/docs/addon-controls-args-reflow.png +0 -0
- package/assets/docs/addon-controls-args-template.png +0 -0
- package/assets/docs/addon-controls-expanded.png +0 -0
- package/assets/docs/addon-controls-hero.gif +0 -0
- package/assets/docs/addon-controls-install.png +0 -0
- package/assets/docs/hero.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/assets/docs/message-reference.png +0 -0
- package/assets/docs/viewport.png +0 -0
- package/assets/react-native/metro-env.d.ts +69 -0
- package/assets/server/addon.tsconfig.json +6 -0
- package/assets/server/base-preview-body.html +116 -0
- package/assets/server/base-preview-head.html +494 -0
- package/assets/server/openBrowser.applescript +94 -0
- package/assets/server/template.ejs +87 -0
- package/dist/.build-stamp +0 -0
- package/dist/_browser-chunks/Color-PCLE2J36.js +1025 -0
- package/dist/_browser-chunks/DocsRenderer-JXND3PVQ.js +10 -0
- package/dist/_browser-chunks/WithTooltip-XSQFTBMB.js +1619 -0
- package/dist/_browser-chunks/chunk-2JDQ35OA.js +247 -0
- package/dist/_browser-chunks/chunk-2JT76G3E.js +104 -0
- package/dist/_browser-chunks/chunk-2MEPHP35.js +17 -0
- package/dist/_browser-chunks/chunk-2SCZVUKW.js +24 -0
- package/dist/_browser-chunks/chunk-46Z7NGAS.js +41 -0
- package/dist/_browser-chunks/chunk-4ATQOMJB.js +30 -0
- package/dist/_browser-chunks/chunk-52CW7FF7.js +49 -0
- package/dist/_browser-chunks/chunk-5I7E4GMO.js +62 -0
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +20 -0
- package/dist/_browser-chunks/chunk-5WMXI5GW.js +816 -0
- package/dist/_browser-chunks/chunk-66OCZ54D.js +2604 -0
- package/dist/_browser-chunks/chunk-6SXYJQST.js +253 -0
- package/dist/_browser-chunks/chunk-AYRF6EJB.js +36 -0
- package/dist/_browser-chunks/chunk-B4AUNNU4.js +156 -0
- package/dist/_browser-chunks/chunk-BCP2FFXF.js +369 -0
- package/dist/_browser-chunks/chunk-C3D4HEFY.js +3396 -0
- package/dist/_browser-chunks/chunk-CFAOWGL7.js +43 -0
- package/dist/_browser-chunks/chunk-CFWWCCZV.js +223 -0
- package/dist/_browser-chunks/chunk-CNED6RYH.js +18 -0
- package/dist/_browser-chunks/chunk-DRQKCCAG.js +136 -0
- package/dist/_browser-chunks/chunk-ECQ75MKQ.js +0 -0
- package/dist/_browser-chunks/chunk-EIYAKDGP.js +302 -0
- package/dist/_browser-chunks/chunk-ENKK74N4.js +12 -0
- package/dist/_browser-chunks/chunk-FENFYI4X.js +698 -0
- package/dist/_browser-chunks/chunk-FJGWSWL5.js +155 -0
- package/dist/_browser-chunks/chunk-FVSEPWWX.js +2810 -0
- package/dist/_browser-chunks/chunk-GNZY6LOW.js +10116 -0
- package/dist/_browser-chunks/chunk-IE4ULIOQ.js +14 -0
- package/dist/_browser-chunks/chunk-IMSF75WX.js +42 -0
- package/dist/_browser-chunks/chunk-IWQGIXJS.js +14 -0
- package/dist/_browser-chunks/chunk-JMC7AIKT.js +108 -0
- package/dist/_browser-chunks/chunk-JPUOQJUI.js +8 -0
- package/dist/_browser-chunks/chunk-JSBKXXXF.js +218 -0
- package/dist/_browser-chunks/chunk-JWSKPMPC.js +73 -0
- package/dist/_browser-chunks/chunk-JYVGARBG.js +2943 -0
- package/dist/_browser-chunks/chunk-KBK7GKBN.js +35 -0
- package/dist/_browser-chunks/chunk-KQ7CRO2B.js +108 -0
- package/dist/_browser-chunks/chunk-LAWXTSXK.js +18 -0
- package/dist/_browser-chunks/chunk-LE2LTDW3.js +14 -0
- package/dist/_browser-chunks/chunk-LEVSOOLQ.js +48 -0
- package/dist/_browser-chunks/chunk-LV5PIKV4.js +93 -0
- package/dist/_browser-chunks/chunk-MDOL7KML.js +56 -0
- package/dist/_browser-chunks/chunk-MFMDGWP6.js +34 -0
- package/dist/_browser-chunks/chunk-MLBOOZL4.js +67 -0
- package/dist/_browser-chunks/chunk-NQUD4B7H.js +91 -0
- package/dist/_browser-chunks/chunk-NULBREPZ.js +43 -0
- package/dist/_browser-chunks/chunk-NZMVUW5T.js +7 -0
- package/dist/_browser-chunks/chunk-OD6IBQCC.js +117 -0
- package/dist/_browser-chunks/chunk-ODVJ3XZJ.js +157 -0
- package/dist/_browser-chunks/chunk-OQWFVDIN.js +386 -0
- package/dist/_browser-chunks/chunk-OVH3USFB.js +20 -0
- package/dist/_browser-chunks/chunk-OZZPSYQR.js +14 -0
- package/dist/_browser-chunks/chunk-P6PK47TQ.js +1970 -0
- package/dist/_browser-chunks/chunk-PFRNG3UC.js +22 -0
- package/dist/_browser-chunks/chunk-PJSMZ27A.js +13 -0
- package/dist/_browser-chunks/chunk-QC4HFS6K.js +41 -0
- package/dist/_browser-chunks/chunk-QDXFODK4.js +274 -0
- package/dist/_browser-chunks/chunk-RBCHTR7C.js +28 -0
- package/dist/_browser-chunks/chunk-RMYQ3QN3.js +294 -0
- package/dist/_browser-chunks/chunk-RNTIV5CE.js +411 -0
- package/dist/_browser-chunks/chunk-RSPAQWVJ.js +80 -0
- package/dist/_browser-chunks/chunk-S6TK43XQ.js +836 -0
- package/dist/_browser-chunks/chunk-SC67XZST.js +18 -0
- package/dist/_browser-chunks/chunk-SFVA4SBT.js +683 -0
- package/dist/_browser-chunks/chunk-SZYFOQMT.js +25 -0
- package/dist/_browser-chunks/chunk-TBJCJXK4.js +18 -0
- package/dist/_browser-chunks/chunk-UMDO3KB7.js +205 -0
- package/dist/_browser-chunks/chunk-V2G23FV7.js +11 -0
- package/dist/_browser-chunks/chunk-V5M7Q4HT.js +88 -0
- package/dist/_browser-chunks/chunk-W5M6NPS3.js +198 -0
- package/dist/_browser-chunks/chunk-W7NE2JXW.js +84 -0
- package/dist/_browser-chunks/chunk-WGVAAM43.js +1110 -0
- package/dist/_browser-chunks/chunk-WHQRNHXD.js +8 -0
- package/dist/_browser-chunks/chunk-WOSOWBCA.js +12 -0
- package/dist/_browser-chunks/chunk-WZ7KR7SH.js +85 -0
- package/dist/_browser-chunks/chunk-YEKO6BHJ.js +20 -0
- package/dist/_browser-chunks/chunk-YI2IBIQS.js +7 -0
- package/dist/_browser-chunks/chunk-YTIT5NA5.js +1966 -0
- package/dist/_browser-chunks/chunk-ZEHRUHTA.js +6 -0
- package/dist/_browser-chunks/chunk-ZTQ5MEJ5.js +203 -0
- package/dist/_browser-chunks/matchers-YLBYSYAF.js +1263 -0
- package/dist/_browser-chunks/react-dom-client-4OHE3QDV.js +9 -0
- package/dist/_node-chunks/attached-runtime-I2G4WLJI.js +282 -0
- package/dist/_node-chunks/builder-manager-VVHYQXCH.js +1661 -0
- package/dist/_node-chunks/chunk-2BUPBPFB.js +82 -0
- package/dist/_node-chunks/chunk-2DSIDINN.js +884 -0
- package/dist/_node-chunks/chunk-2RU7BKEW.js +23 -0
- package/dist/_node-chunks/chunk-34EO2PUT.js +26 -0
- package/dist/_node-chunks/chunk-3BKIBF5S.js +3008 -0
- package/dist/_node-chunks/chunk-3SDUYDXH.js +98 -0
- package/dist/_node-chunks/chunk-3T4ZSNPH.js +662 -0
- package/dist/_node-chunks/chunk-3W7F2B7P.js +79 -0
- package/dist/_node-chunks/chunk-3Y6AAY5H.js +80 -0
- package/dist/_node-chunks/chunk-42UWAGPW.js +1193 -0
- package/dist/_node-chunks/chunk-4FEANXWU.js +1986 -0
- package/dist/_node-chunks/chunk-5DQFEZEA.js +40 -0
- package/dist/_node-chunks/chunk-6KEHV53S.js +1218 -0
- package/dist/_node-chunks/chunk-6LMWA44H.js +3837 -0
- package/dist/_node-chunks/chunk-6YKBRP72.js +20 -0
- package/dist/_node-chunks/chunk-7GUDZVRQ.js +110 -0
- package/dist/_node-chunks/chunk-B5J7Q7J4.js +21 -0
- package/dist/_node-chunks/chunk-BS2WMZMR.js +90 -0
- package/dist/_node-chunks/chunk-BSKFCWQD.js +47 -0
- package/dist/_node-chunks/chunk-BXVYT7SB.js +36 -0
- package/dist/_node-chunks/chunk-CCOTJ4FC.js +688 -0
- package/dist/_node-chunks/chunk-CQKMLL5J.js +33 -0
- package/dist/_node-chunks/chunk-CXRU72ET.js +63 -0
- package/dist/_node-chunks/chunk-DC7DKR5K.js +20 -0
- package/dist/_node-chunks/chunk-DHJFTB4K.js +25 -0
- package/dist/_node-chunks/chunk-DUR55DJJ.js +1094 -0
- package/dist/_node-chunks/chunk-E6YESGLX.js +7032 -0
- package/dist/_node-chunks/chunk-EHUNOMDD.js +52345 -0
- package/dist/_node-chunks/chunk-ET7PWEO7.js +298 -0
- package/dist/_node-chunks/chunk-EWOX7HPJ.js +20 -0
- package/dist/_node-chunks/chunk-F3ZFKBHY.js +844 -0
- package/dist/_node-chunks/chunk-FK7KGTV7.js +26 -0
- package/dist/_node-chunks/chunk-FPZB5OI7.js +35 -0
- package/dist/_node-chunks/chunk-FW2HQUBQ.js +25 -0
- package/dist/_node-chunks/chunk-FY6UXW6G.js +11 -0
- package/dist/_node-chunks/chunk-GEFQN7K3.js +499 -0
- package/dist/_node-chunks/chunk-GRBLDJCR.js +989 -0
- package/dist/_node-chunks/chunk-H32DYT6P.js +87 -0
- package/dist/_node-chunks/chunk-H4PPVMP5.js +23 -0
- package/dist/_node-chunks/chunk-HMP2G23X.js +25 -0
- package/dist/_node-chunks/chunk-ICPBH3E7.js +59 -0
- package/dist/_node-chunks/chunk-IDEL2J23.js +23 -0
- package/dist/_node-chunks/chunk-IK4FGZLR.js +223 -0
- package/dist/_node-chunks/chunk-JDXXX6LB.js +68 -0
- package/dist/_node-chunks/chunk-JGGFYIG5.js +5468 -0
- package/dist/_node-chunks/chunk-JPAZLYJ3.js +29 -0
- package/dist/_node-chunks/chunk-JZOO7GGC.js +48 -0
- package/dist/_node-chunks/chunk-KISMCCP5.js +4744 -0
- package/dist/_node-chunks/chunk-LCK4ZQKG.js +115 -0
- package/dist/_node-chunks/chunk-LO56I6E2.js +132 -0
- package/dist/_node-chunks/chunk-LXBD4UL4.js +104 -0
- package/dist/_node-chunks/chunk-MA24JW6C.js +7162 -0
- package/dist/_node-chunks/chunk-MK2KYAI6.js +5414 -0
- package/dist/_node-chunks/chunk-NDWKJ4CL.js +2102 -0
- package/dist/_node-chunks/chunk-NIBT7XDZ.js +168 -0
- package/dist/_node-chunks/chunk-NPO45IMH.js +33 -0
- package/dist/_node-chunks/chunk-OISX4AGQ.js +414 -0
- package/dist/_node-chunks/chunk-OUW6R7C3.js +26 -0
- package/dist/_node-chunks/chunk-OWNFOGTA.js +194 -0
- package/dist/_node-chunks/chunk-Q7QNUM5H.js +49 -0
- package/dist/_node-chunks/chunk-QEQLR22M.js +1877 -0
- package/dist/_node-chunks/chunk-RRN2V55B.js +45 -0
- package/dist/_node-chunks/chunk-RWFIFGO5.js +144 -0
- package/dist/_node-chunks/chunk-RXNJDRGO.js +209 -0
- package/dist/_node-chunks/chunk-RZMQ7S3L.js +92 -0
- package/dist/_node-chunks/chunk-SIEXZVCR.js +51 -0
- package/dist/_node-chunks/chunk-SLWQNBGO.js +2034 -0
- package/dist/_node-chunks/chunk-SVTBJ7Q3.js +35 -0
- package/dist/_node-chunks/chunk-SWO5CDYU.js +32 -0
- package/dist/_node-chunks/chunk-TD5PLLQG.js +121 -0
- package/dist/_node-chunks/chunk-TEQGGSP7.js +33 -0
- package/dist/_node-chunks/chunk-TFCEV2XX.js +155 -0
- package/dist/_node-chunks/chunk-TFEWM4E3.js +1073 -0
- package/dist/_node-chunks/chunk-TINO74G5.js +21 -0
- package/dist/_node-chunks/chunk-TNJIXE37.js +40 -0
- package/dist/_node-chunks/chunk-TWI4GVH7.js +19 -0
- package/dist/_node-chunks/chunk-U5W53R2J.js +1011 -0
- package/dist/_node-chunks/chunk-UBOGWBEA.js +148 -0
- package/dist/_node-chunks/chunk-UMUBKI6E.js +3787 -0
- package/dist/_node-chunks/chunk-UVINFLGY.js +56 -0
- package/dist/_node-chunks/chunk-V2DY426G.js +1133 -0
- package/dist/_node-chunks/chunk-VLOXOXXE.js +45 -0
- package/dist/_node-chunks/chunk-W4OMYLSP.js +1297 -0
- package/dist/_node-chunks/chunk-WAXVSN3O.js +18 -0
- package/dist/_node-chunks/chunk-WCULS5TP.js +3767 -0
- package/dist/_node-chunks/chunk-WNZ2UMFM.js +153 -0
- package/dist/_node-chunks/chunk-WZJF2OUH.js +74 -0
- package/dist/_node-chunks/chunk-XGIUVY52.js +611 -0
- package/dist/_node-chunks/chunk-XHL2LVBM.js +415 -0
- package/dist/_node-chunks/chunk-XI6B6P47.js +59 -0
- package/dist/_node-chunks/chunk-XLP2ZKXV.js +60 -0
- package/dist/_node-chunks/chunk-YCMRA6RX.js +95 -0
- package/dist/_node-chunks/chunk-YZFWBA5L.js +2700 -0
- package/dist/_node-chunks/chunk-ZMAMXQKP.js +4731 -0
- package/dist/_node-chunks/chunk-ZWBCQ4MJ.js +110 -0
- package/dist/_node-chunks/dist-VTSTZKUB.js +16 -0
- package/dist/_node-chunks/globby-OEMHPBFY.js +2884 -0
- package/dist/_node-chunks/jiti-NFX6UU74.js +3848 -0
- package/dist/_node-chunks/lib-MDVARD7W.js +366 -0
- package/dist/_node-chunks/local-runtime-NTKIN2QT.js +78 -0
- package/dist/_node-chunks/mdx-plugin-MWISDWDQ.js +5680 -0
- package/dist/_node-chunks/monorepo-LIRFMQXE.js +121 -0
- package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-CPDW4XTW.js +121 -0
- package/dist/_node-chunks/optimized-tests-HDOLR3EY.js +22 -0
- package/dist/_node-chunks/pattern-copy-play-EKHIUAU2.js +807 -0
- package/dist/_node-chunks/postinstallAddon-GYGMWDL6.js +20 -0
- package/dist/_node-chunks/rehype-external-links-BUN3HUCO.js +121 -0
- package/dist/_node-chunks/rehype-slug-PLADX223.js +52 -0
- package/dist/_node-chunks/relaxed-limits-GBHW6KIQ.js +117 -0
- package/dist/_node-chunks/run-KDTIZNSY.js +103 -0
- package/dist/_node-chunks/run-NL66VTNR.js +4532 -0
- package/dist/_node-chunks/session-id-KIIVOQLR.js +23 -0
- package/dist/_node-chunks/setup-MGC7BQO6.js +278 -0
- package/dist/_node-chunks/vitest.config.4.template-JH2THZFG.js +54 -0
- package/dist/actions/decorator.d.ts +7 -0
- package/dist/actions/decorator.js +43 -0
- package/dist/actions/index.d.ts +67 -0
- package/dist/actions/index.js +28 -0
- package/dist/addon-a11y/index.d.ts +52 -0
- package/dist/addon-a11y/index.js +16 -0
- package/dist/addon-a11y/manager.js +1429 -0
- package/dist/addon-a11y/preset.js +18 -0
- package/dist/addon-a11y/preview.d.ts +17 -0
- package/dist/addon-a11y/preview.js +15 -0
- package/dist/addon-docs/blocks.d.ts +1061 -0
- package/dist/addon-docs/blocks.js +2461 -0
- package/dist/addon-docs/index.d.ts +236 -0
- package/dist/addon-docs/index.js +16 -0
- package/dist/addon-docs/manager.js +90 -0
- package/dist/addon-docs/mdx-react-shim.d.ts +1 -0
- package/dist/addon-docs/mdx-react-shim.js +2 -0
- package/dist/addon-docs/preset.js +378 -0
- package/dist/addon-docs/preview.d.ts +4 -0
- package/dist/addon-docs/preview.js +7 -0
- package/dist/addon-links/index.d.ts +22 -0
- package/dist/addon-links/index.js +20 -0
- package/dist/addon-links/manager.js +14 -0
- package/dist/addon-links/preview.d.ts +6 -0
- package/dist/addon-links/preview.js +9 -0
- package/dist/addon-links/react/index.d.ts +25 -0
- package/dist/addon-links/react/index.js +52 -0
- package/dist/addon-mcp/preset.js +1345 -0
- package/dist/addon-mcp/preview.js +29 -0
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +1153 -0
- package/dist/addon-ondevice-actions/index.d.ts +4 -0
- package/dist/addon-ondevice-actions/index.js +7 -0
- package/dist/addon-ondevice-actions/register.js +7 -0
- package/dist/addon-ondevice-controls/index.d.ts +6 -0
- package/dist/addon-ondevice-controls/index.js +14 -0
- package/dist/addon-ondevice-controls/register.js +10 -0
- package/dist/addon-pseudo-states/index.d.ts +35 -0
- package/dist/addon-pseudo-states/index.js +15 -0
- package/dist/addon-pseudo-states/manager.js +53 -0
- package/dist/addon-pseudo-states/preview.d.ts +9 -0
- package/dist/addon-pseudo-states/preview.js +10 -0
- package/dist/addon-themes/index.d.ts +80 -0
- package/dist/addon-themes/index.js +104 -0
- package/dist/addon-themes/manager.js +97 -0
- package/dist/addon-themes/postinstall.js +33 -0
- package/dist/addon-themes/preview.d.ts +6 -0
- package/dist/addon-themes/preview.js +8 -0
- package/dist/addon-vitest/constants.d.ts +132 -0
- package/dist/addon-vitest/constants.js +66 -0
- package/dist/addon-vitest/index.d.ts +4 -0
- package/dist/addon-vitest/index.js +8 -0
- package/dist/addon-vitest/manager.js +665 -0
- package/dist/addon-vitest/node/coverage-reporter.js +1284 -0
- package/dist/addon-vitest/node/vitest.js +674 -0
- package/dist/addon-vitest/postinstall.js +24 -0
- package/dist/addon-vitest/preset.js +943 -0
- package/dist/addon-vitest/vitest-plugin/global-setup.js +162 -0
- package/dist/addon-vitest/vitest-plugin/index.d.ts +56 -0
- package/dist/addon-vitest/vitest-plugin/index.js +463 -0
- package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +9 -0
- package/dist/addon-vitest/vitest-plugin/setup-file.browser.4.js +20 -0
- package/dist/addon-vitest/vitest-plugin/setup-file.js +50 -0
- package/dist/addon-vitest/vitest-plugin/test-utils.js +128 -0
- package/dist/babel/index.d.ts +2301 -0
- package/dist/babel/index.js +61 -0
- package/dist/backgrounds/index.d.ts +6 -0
- package/dist/backgrounds/index.js +15 -0
- package/dist/bin/core.js +1705 -0
- package/dist/bin/dispatcher.js +43 -0
- package/dist/bin/loader.js +115 -0
- package/dist/builder-vite/index.d.ts +50 -0
- package/dist/builder-vite/index.js +245 -0
- package/dist/builder-vite/preset.js +27 -0
- package/dist/channels/index.d.ts +2 -0
- package/dist/channels/index.js +352 -0
- package/dist/chunk-B2t1tGRh.d.ts +284 -0
- package/dist/chunk-BCoJQE-f.d.ts +602 -0
- package/dist/chunk-BGkgZp-H.d.ts +214 -0
- package/dist/chunk-BTVrWliM.d.ts +115 -0
- package/dist/chunk-BXLImeLy.d.ts +197 -0
- package/dist/chunk-BfBzpgct.d.ts +916 -0
- package/dist/chunk-Bpi2tz-6.d.ts +511 -0
- package/dist/chunk-BxWufQms.d.ts +142 -0
- package/dist/chunk-C-bavsOH.d.ts +34 -0
- package/dist/chunk-C2p5r3Vt.d.ts +13001 -0
- package/dist/chunk-C6PAgHLT.d.ts +12 -0
- package/dist/chunk-CMeX4WRe.d.ts +179 -0
- package/dist/chunk-Ct9xd6IM.d.ts +65 -0
- package/dist/chunk-CwQKNaYL.d.ts +15 -0
- package/dist/chunk-D7DwV41f.d.ts +3622 -0
- package/dist/chunk-DEVFdzxR.d.ts +253 -0
- package/dist/chunk-DaVb55-_.d.ts +124 -0
- package/dist/chunk-DgRNfmj_.d.ts +40 -0
- package/dist/chunk-DoIGKY33.d.ts +666 -0
- package/dist/chunk-Dr3R0DXk.d.ts +40 -0
- package/dist/chunk-DtHByo32.d.ts +55 -0
- package/dist/chunk-Dw1z1Pki.d.ts +933 -0
- package/dist/chunk-DzuY9DXg.d.ts +79 -0
- package/dist/chunk-FjDVzZTj.d.ts +62 -0
- package/dist/chunk-Kt1tW-D1.d.ts +59 -0
- package/dist/chunk-XP8oHzpE.d.ts +6 -0
- package/dist/chunk-gCX81nOr.d.ts +61 -0
- package/dist/chunk-pcFXCimE.d.ts +741 -0
- package/dist/cli/index.d.ts +1174 -0
- package/dist/cli/index.js +5613 -0
- package/dist/cli/skills/content/index.d.ts +72 -0
- package/dist/cli/skills/content/index.js +335 -0
- package/dist/cli/tools/sdk/child-host.d.ts +61 -0
- package/dist/cli/tools/sdk/child-host.js +131 -0
- package/dist/cli/tools/sdk/index.d.ts +137 -0
- package/dist/cli/tools/sdk/index.js +44 -0
- package/dist/cli-commands/bin/index.js +25 -0
- package/dist/client-logger/index.d.ts +31 -0
- package/dist/client-logger/index.js +63 -0
- package/dist/common/index.d.ts +1103 -0
- package/dist/common/index.js +364 -0
- package/dist/components/index.d.ts +1924 -0
- package/dist/components/index.js +13759 -0
- package/dist/core-events/index.d.ts +155 -0
- package/dist/core-events/index.js +136 -0
- package/dist/core-server/index.d.ts +2200 -0
- package/dist/core-server/index.js +4165 -0
- package/dist/core-server/presets/common-manager.css +170 -0
- package/dist/core-server/presets/common-manager.js +4168 -0
- package/dist/core-server/presets/common-override-preset.js +81 -0
- package/dist/core-server/presets/common-preset.js +2187 -0
- package/dist/create/bin/index.js +23 -0
- package/dist/create/index.js +25 -0
- package/dist/csf/csf-utils.d.ts +2 -0
- package/dist/csf/csf-utils.js +19 -0
- package/dist/csf/index.d.ts +7 -0
- package/dist/csf/index.js +2142 -0
- package/dist/csf-tools/index.d.ts +1157 -0
- package/dist/csf-tools/index.js +736 -0
- package/dist/docs-tools/index.d.ts +197 -0
- package/dist/docs-tools/index.js +61 -0
- package/dist/highlight/index.d.ts +10 -0
- package/dist/highlight/index.js +15 -0
- package/dist/instrumenter/index.d.ts +113 -0
- package/dist/instrumenter/index.js +2595 -0
- package/dist/manager/_manager-chunks/globals-runtime-8HkdnU2F.js +6144 -0
- package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +3389 -0
- package/dist/manager/_manager-chunks/globals-runtime-BdGkqNEt.js +45 -0
- package/dist/manager/_manager-chunks/globals-runtime-BmphMP6z.js +1190 -0
- package/dist/manager/_manager-chunks/globals-runtime-BvM-NY2g.js +13307 -0
- package/dist/manager/_manager-chunks/globals-runtime-C02fvgcd.js +9243 -0
- package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +9766 -0
- package/dist/manager/_manager-chunks/globals-runtime-DpNYC-qi.js +5564 -0
- package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +5357 -0
- package/dist/manager/_manager-chunks/globals-runtime-DwFqpqya.js +722 -0
- package/dist/manager/_manager-chunks/globals-runtime-FC201B7s.js +6837 -0
- package/dist/manager/_manager-chunks/globals-runtime-Rp_zjGnh.js +121 -0
- package/dist/manager/_manager-chunks/globals-runtime-ZHrQFa3-.js +10463 -0
- package/dist/manager/_manager-chunks/globals-runtime-eLPTIfX-.js +7759 -0
- package/dist/manager/_manager-chunks/globals-runtime-qKvCZHFY.js +4468 -0
- package/dist/manager/_manager-chunks/globals-runtime-sGpNlIJ1.js +5102 -0
- package/dist/manager/_manager-chunks/runtime-B1L9TH89.js +452 -0
- package/dist/manager/_manager-chunks/runtime-BK0zF7FN.js +22 -0
- package/dist/manager/_manager-chunks/runtime-BhkT2CXl.js +1408 -0
- package/dist/manager/_manager-chunks/runtime-Bly6WJLN.js +998 -0
- package/dist/manager/_manager-chunks/runtime-D0UOWx0U.js +979 -0
- package/dist/manager/_manager-chunks/runtime-D94Vq3oR.js +4014 -0
- package/dist/manager/_manager-chunks/runtime-DMig8mT7.js +77 -0
- package/dist/manager/_manager-chunks/runtime-EITvVbkG.js +46 -0
- package/dist/manager/_manager-chunks/runtime-cp5pazY2.js +8936 -0
- package/dist/manager/_manager-chunks/runtime-eDVAYF7N.js +6860 -0
- package/dist/manager/_manager-chunks/runtime-i-PDAHLR.js +2493 -0
- package/dist/manager/globals-runtime.js +2 -0
- package/dist/manager/globals.d.ts +23 -0
- package/dist/manager/globals.js +26 -0
- package/dist/manager/manager-stores.d.ts +2 -0
- package/dist/manager/manager-stores.js +19 -0
- package/dist/manager/runtime.js +2 -0
- package/dist/manager-api/index.d.ts +2 -0
- package/dist/manager-api/index.js +3257 -0
- package/dist/manager-errors.d.ts +89 -0
- package/dist/manager-errors.js +20 -0
- package/dist/mcp/index.d.ts +270 -0
- package/dist/mcp/index.js +305 -0
- package/dist/mocking-utils/index.d.ts +689 -0
- package/dist/mocking-utils/index.js +521 -0
- package/dist/mocking-utils/mocker-runtime.js +1254 -0
- package/dist/nextjs-vite/config/preview.js +3 -0
- package/dist/nextjs-vite/export-mocks/cache/index.d.ts +25 -0
- package/dist/nextjs-vite/export-mocks/cache/index.js +29 -0
- package/dist/nextjs-vite/export-mocks/headers/index.d.ts +37 -0
- package/dist/nextjs-vite/export-mocks/headers/index.js +54 -0
- package/dist/nextjs-vite/export-mocks/link/index.d.ts +9 -0
- package/dist/nextjs-vite/export-mocks/link/index.js +59 -0
- package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +28 -0
- package/dist/nextjs-vite/export-mocks/navigation/index.js +58 -0
- package/dist/nextjs-vite/export-mocks/router/index.d.ts +34 -0
- package/dist/nextjs-vite/export-mocks/router/index.js +63 -0
- package/dist/nextjs-vite/index.d.ts +92 -0
- package/dist/nextjs-vite/index.js +58 -0
- package/dist/nextjs-vite/node/index.d.ts +6 -0
- package/dist/nextjs-vite/node/index.js +20 -0
- package/dist/nextjs-vite/preset.js +648 -0
- package/dist/nextjs-vite/preview.d.ts +20 -0
- package/dist/nextjs-vite/preview.js +11 -0
- package/dist/nextjs-vite/vite-plugin/index.d.ts +6 -0
- package/dist/nextjs-vite/vite-plugin/index.js +19 -0
- package/dist/nextjs-vite-plugin/index.d.ts +28 -0
- package/dist/nextjs-vite-plugin/index.js +923 -0
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +29 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-context.js +8 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-default-loader.js +23 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +28 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +17 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/cache/index.js +29 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/dynamic/index.js +40 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/headers/index.js +55 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/link/index.js +63 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/navigation/index.js +71 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +74 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/rsc/server-only.js +7 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/safe-stable-stringify/index.js +13 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/compatibility/draft-mode.compat.js +7 -0
- package/dist/node-logger/index.d.ts +495 -0
- package/dist/node-logger/index.js +42 -0
- package/dist/oxc-parser/index.d.ts +99 -0
- package/dist/oxc-parser/index.js +275 -0
- package/dist/oxc-parser/worker.js +37 -0
- package/dist/preview/_chunks/runtime-BIzIdDbb.js +10263 -0
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +1102 -0
- package/dist/preview/_chunks/runtime-BZSnICCg.js +8484 -0
- package/dist/preview/_chunks/runtime-BdGkqNEt.js +45 -0
- package/dist/preview/_chunks/runtime-BwSxqk3t.js +63 -0
- package/dist/preview/_chunks/runtime-CqHxptiK.js +6143 -0
- package/dist/preview/_chunks/runtime-CsV4HZPV.js +5064 -0
- package/dist/preview/_chunks/runtime-CxZK_Ln3.js +284 -0
- package/dist/preview/_chunks/runtime-DZToXfvO.js +9767 -0
- package/dist/preview/_chunks/runtime-DrTjJkPY.js +3872 -0
- package/dist/preview/_chunks/runtime-DuHdxMFA.js +387 -0
- package/dist/preview/_chunks/runtime-iXdo8CR8.js +3635 -0
- package/dist/preview/_chunks/runtime-q3wt0e_N.js +6838 -0
- package/dist/preview/globals.d.ts +16 -0
- package/dist/preview/globals.js +20 -0
- package/dist/preview/runtime.js +6 -0
- package/dist/preview-api/index.d.ts +4 -0
- package/dist/preview-api/index.js +147 -0
- package/dist/preview-errors.d.ts +186 -0
- package/dist/preview-errors.js +56 -0
- package/dist/react/docgen/docgen-worker.js +38 -0
- package/dist/react/entry-preview-argtypes.js +9 -0
- package/dist/react/entry-preview-docs.js +12 -0
- package/dist/react/entry-preview-rsc.js +11 -0
- package/dist/react/entry-preview.js +21 -0
- package/dist/react/index.d.ts +119 -0
- package/dist/react/index.js +26 -0
- package/dist/react/preset.js +301 -0
- package/dist/react/preview.d.ts +2 -0
- package/dist/react/preview.js +11 -0
- package/dist/react-native/bin/get-stories.js +34 -0
- package/dist/react-native/index.d.ts +160 -0
- package/dist/react-native/index.js +1547 -0
- package/dist/react-native/metro/node.d.ts +83 -0
- package/dist/react-native/metro/node.js +21 -0
- package/dist/react-native/metro/withStorybook.d.ts +2269 -0
- package/dist/react-native/metro/withStorybook.js +138 -0
- package/dist/react-native/preview.d.ts +6 -0
- package/dist/react-native/preview.js +20 -0
- package/dist/react-native/scripts/generate.d.ts +22 -0
- package/dist/react-native/scripts/generate.js +18 -0
- package/dist/react-native/stub.js +20 -0
- package/dist/react-native-theming/index.d.ts +175 -0
- package/dist/react-native-theming/index.js +2591 -0
- package/dist/react-native-ui/index.d.ts +130 -0
- package/dist/react-native-ui/index.js +1448 -0
- package/dist/react-native-ui-common/index.d.ts +230 -0
- package/dist/react-native-ui-common/index.js +514 -0
- package/dist/react-vite/index.d.ts +4 -0
- package/dist/react-vite/index.js +8 -0
- package/dist/react-vite/node/index.d.ts +6 -0
- package/dist/react-vite/node/index.js +20 -0
- package/dist/react-vite/preset.d.ts +6 -0
- package/dist/react-vite/preset.js +21 -0
- package/dist/router/index.d.ts +141 -0
- package/dist/router/index.js +1217 -0
- package/dist/server-errors.d.ts +2 -0
- package/dist/server-errors.js +149 -0
- package/dist/shared/open-service/index.d.ts +3 -0
- package/dist/shared/open-service/index.js +115 -0
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +75 -0
- package/dist/shared/open-service/toolsets/docs/public.d.ts +1296 -0
- package/dist/shared/open-service/toolsets/docs/public.js +991 -0
- package/dist/telemetry/index.d.ts +314 -0
- package/dist/telemetry/index.js +103 -0
- package/dist/test/index.d.ts +158 -0
- package/dist/test/index.js +19421 -0
- package/dist/theming/create.d.ts +15 -0
- package/dist/theming/create.js +11 -0
- package/dist/theming/index.d.ts +54 -0
- package/dist/theming/index.js +511 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +48 -0
- package/dist/viewport/index.d.ts +275 -0
- package/dist/viewport/index.js +21 -0
- package/package.json +1054 -4
- package/template/nextjs-vite/cli/.eslintrc.json +6 -0
- package/template/nextjs-vite/cli/js/Button.jsx +42 -0
- package/template/nextjs-vite/cli/js/Button.stories.js +49 -0
- package/template/nextjs-vite/cli/js/Configure.mdx +470 -0
- package/template/nextjs-vite/cli/js/Header.jsx +58 -0
- package/template/nextjs-vite/cli/js/Header.stories.js +30 -0
- package/template/nextjs-vite/cli/js/Page.jsx +68 -0
- package/template/nextjs-vite/cli/js/Page.stories.js +28 -0
- package/template/nextjs-vite/cli/ts/Button.stories.ts +54 -0
- package/template/nextjs-vite/cli/ts/Button.tsx +39 -0
- package/template/nextjs-vite/cli/ts/Configure.mdx +446 -0
- package/template/nextjs-vite/cli/ts/Header.stories.ts +34 -0
- package/template/nextjs-vite/cli/ts/Header.tsx +54 -0
- package/template/nextjs-vite/cli/ts/Page.stories.ts +33 -0
- package/template/nextjs-vite/cli/ts/Page.tsx +73 -0
- package/template/react/cli/.eslintrc.json +5 -0
- package/template/react/cli/js/Button.jsx +39 -0
- package/template/react/cli/js/Button.stories.js +49 -0
- package/template/react/cli/js/Header.jsx +56 -0
- package/template/react/cli/js/Header.stories.js +29 -0
- package/template/react/cli/js/Page.jsx +69 -0
- package/template/react/cli/js/Page.stories.js +28 -0
- package/template/react/cli/ts/Button.stories.ts +54 -0
- package/template/react/cli/ts/Button.tsx +37 -0
- package/template/react/cli/ts/Header.stories.ts +34 -0
- package/template/react/cli/ts/Header.tsx +56 -0
- package/template/react/cli/ts/Page.stories.ts +33 -0
- package/template/react/cli/ts/Page.tsx +73 -0
- package/template/react-vite/cli/.eslintrc.json +5 -0
- package/template/react-vite/cli/js/Button.jsx +39 -0
- package/template/react-vite/cli/js/Button.stories.js +49 -0
- package/template/react-vite/cli/js/Header.jsx +56 -0
- package/template/react-vite/cli/js/Header.stories.js +29 -0
- package/template/react-vite/cli/js/Page.jsx +69 -0
- package/template/react-vite/cli/js/Page.stories.js +28 -0
- package/template/react-vite/cli/ts/Button.stories.ts +54 -0
- package/template/react-vite/cli/ts/Button.tsx +37 -0
- package/template/react-vite/cli/ts/Header.stories.ts +34 -0
- package/template/react-vite/cli/ts/Header.tsx +56 -0
- package/template/react-vite/cli/ts/Page.stories.ts +33 -0
- package/template/react-vite/cli/ts/Page.tsx +73 -0
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyDecorators
|
|
3
|
+
} from "./chunk-WHQRNHXD.js";
|
|
4
|
+
import {
|
|
5
|
+
__commonJS,
|
|
6
|
+
__export,
|
|
7
|
+
__toESM
|
|
8
|
+
} from "./chunk-IMSF75WX.js";
|
|
9
|
+
|
|
10
|
+
// ../../node_modules/@base2/pretty-print-object/dist/index.js
|
|
11
|
+
var require_dist = __commonJS({
|
|
12
|
+
"../../node_modules/@base2/pretty-print-object/dist/index.js"(exports) {
|
|
13
|
+
"use strict";
|
|
14
|
+
var __assign = exports && exports.__assign || function() {
|
|
15
|
+
return __assign = Object.assign || function(t) {
|
|
16
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17
|
+
s = arguments[i];
|
|
18
|
+
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
}, __assign.apply(this, arguments);
|
|
22
|
+
}, __spreadArrays = exports && exports.__spreadArrays || function() {
|
|
23
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
24
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
25
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
26
|
+
r[k] = a[j];
|
|
27
|
+
return r;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
30
|
+
var seen = [];
|
|
31
|
+
function isObj(value) {
|
|
32
|
+
var type = typeof value;
|
|
33
|
+
return value !== null && (type === "object" || type === "function");
|
|
34
|
+
}
|
|
35
|
+
function isRegexp(value) {
|
|
36
|
+
return Object.prototype.toString.call(value) === "[object RegExp]";
|
|
37
|
+
}
|
|
38
|
+
function getOwnEnumPropSymbols(object) {
|
|
39
|
+
return Object.getOwnPropertySymbols(object).filter(function(keySymbol) {
|
|
40
|
+
return Object.prototype.propertyIsEnumerable.call(object, keySymbol);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function prettyPrint2(input, options, pad) {
|
|
44
|
+
pad === void 0 && (pad = "");
|
|
45
|
+
var defaultOptions = {
|
|
46
|
+
indent: " ",
|
|
47
|
+
singleQuotes: !0
|
|
48
|
+
}, combinedOptions = __assign(__assign({}, defaultOptions), options), tokens;
|
|
49
|
+
combinedOptions.inlineCharacterLimit === void 0 ? tokens = {
|
|
50
|
+
newLine: `
|
|
51
|
+
`,
|
|
52
|
+
newLineOrSpace: `
|
|
53
|
+
`,
|
|
54
|
+
pad,
|
|
55
|
+
indent: pad + combinedOptions.indent
|
|
56
|
+
} : tokens = {
|
|
57
|
+
newLine: "@@__PRETTY_PRINT_NEW_LINE__@@",
|
|
58
|
+
newLineOrSpace: "@@__PRETTY_PRINT_NEW_LINE_OR_SPACE__@@",
|
|
59
|
+
pad: "@@__PRETTY_PRINT_PAD__@@",
|
|
60
|
+
indent: "@@__PRETTY_PRINT_INDENT__@@"
|
|
61
|
+
};
|
|
62
|
+
var expandWhiteSpace = function(string) {
|
|
63
|
+
if (combinedOptions.inlineCharacterLimit === void 0)
|
|
64
|
+
return string;
|
|
65
|
+
var oneLined = string.replace(new RegExp(tokens.newLine, "g"), "").replace(new RegExp(tokens.newLineOrSpace, "g"), " ").replace(new RegExp(tokens.pad + "|" + tokens.indent, "g"), "");
|
|
66
|
+
return oneLined.length <= combinedOptions.inlineCharacterLimit ? oneLined : string.replace(new RegExp(tokens.newLine + "|" + tokens.newLineOrSpace, "g"), `
|
|
67
|
+
`).replace(new RegExp(tokens.pad, "g"), pad).replace(new RegExp(tokens.indent, "g"), pad + combinedOptions.indent);
|
|
68
|
+
};
|
|
69
|
+
if (seen.indexOf(input) !== -1)
|
|
70
|
+
return '"[Circular]"';
|
|
71
|
+
if (input == null || typeof input == "number" || typeof input == "boolean" || typeof input == "function" || typeof input == "symbol" || isRegexp(input))
|
|
72
|
+
return String(input);
|
|
73
|
+
if (input instanceof Date)
|
|
74
|
+
return "new Date('" + input.toISOString() + "')";
|
|
75
|
+
if (Array.isArray(input)) {
|
|
76
|
+
if (input.length === 0)
|
|
77
|
+
return "[]";
|
|
78
|
+
seen.push(input);
|
|
79
|
+
var ret = "[" + tokens.newLine + input.map(function(el, i) {
|
|
80
|
+
var eol = input.length - 1 === i ? tokens.newLine : "," + tokens.newLineOrSpace, value = prettyPrint2(el, combinedOptions, pad + combinedOptions.indent);
|
|
81
|
+
return combinedOptions.transform && (value = combinedOptions.transform(input, i, value)), tokens.indent + value + eol;
|
|
82
|
+
}).join("") + tokens.pad + "]";
|
|
83
|
+
return seen.pop(), expandWhiteSpace(ret);
|
|
84
|
+
}
|
|
85
|
+
if (isObj(input)) {
|
|
86
|
+
var objKeys_1 = __spreadArrays(Object.keys(input), getOwnEnumPropSymbols(input));
|
|
87
|
+
if (combinedOptions.filter && (objKeys_1 = objKeys_1.filter(function(el) {
|
|
88
|
+
return combinedOptions.filter && combinedOptions.filter(input, el);
|
|
89
|
+
})), objKeys_1.length === 0)
|
|
90
|
+
return "{}";
|
|
91
|
+
seen.push(input);
|
|
92
|
+
var ret = "{" + tokens.newLine + objKeys_1.map(function(el, i) {
|
|
93
|
+
var eol = objKeys_1.length - 1 === i ? tokens.newLine : "," + tokens.newLineOrSpace, isSymbol = typeof el == "symbol", isClassic = !isSymbol && /^[a-z$_][a-z$_0-9]*$/i.test(el.toString()), key = isSymbol || isClassic ? el : prettyPrint2(el, combinedOptions), value = prettyPrint2(input[el], combinedOptions, pad + combinedOptions.indent);
|
|
94
|
+
return combinedOptions.transform && (value = combinedOptions.transform(input, el, value)), tokens.indent + String(key) + ": " + value + eol;
|
|
95
|
+
}).join("") + tokens.pad + "}";
|
|
96
|
+
return seen.pop(), expandWhiteSpace(ret);
|
|
97
|
+
}
|
|
98
|
+
return input = String(input).replace(/[\r\n]/g, function(x) {
|
|
99
|
+
return x === `
|
|
100
|
+
` ? "\\n" : "\\r";
|
|
101
|
+
}), combinedOptions.singleQuotes ? (input = input.replace(/\\?'/g, "\\'"), "'" + input + "'") : (input = input.replace(/"/g, '\\"'), '"' + input + '"');
|
|
102
|
+
}
|
|
103
|
+
exports.prettyPrint = prettyPrint2;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// ../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.production.min.js
|
|
108
|
+
var require_react_is_production_min = __commonJS({
|
|
109
|
+
"../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
|
|
110
|
+
"use strict";
|
|
111
|
+
var b = /* @__PURE__ */ Symbol.for("react.element"), c = /* @__PURE__ */ Symbol.for("react.portal"), d = /* @__PURE__ */ Symbol.for("react.fragment"), e = /* @__PURE__ */ Symbol.for("react.strict_mode"), f = /* @__PURE__ */ Symbol.for("react.profiler"), g = /* @__PURE__ */ Symbol.for("react.provider"), h = /* @__PURE__ */ Symbol.for("react.context"), k = /* @__PURE__ */ Symbol.for("react.server_context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), m = /* @__PURE__ */ Symbol.for("react.suspense"), n = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), q = /* @__PURE__ */ Symbol.for("react.lazy"), t = /* @__PURE__ */ Symbol.for("react.offscreen"), u;
|
|
112
|
+
u = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
113
|
+
function v(a) {
|
|
114
|
+
if (typeof a == "object" && a !== null) {
|
|
115
|
+
var r = a.$$typeof;
|
|
116
|
+
switch (r) {
|
|
117
|
+
case b:
|
|
118
|
+
switch (a = a.type, a) {
|
|
119
|
+
case d:
|
|
120
|
+
case f:
|
|
121
|
+
case e:
|
|
122
|
+
case m:
|
|
123
|
+
case n:
|
|
124
|
+
return a;
|
|
125
|
+
default:
|
|
126
|
+
switch (a = a && a.$$typeof, a) {
|
|
127
|
+
case k:
|
|
128
|
+
case h:
|
|
129
|
+
case l:
|
|
130
|
+
case q:
|
|
131
|
+
case p:
|
|
132
|
+
case g:
|
|
133
|
+
return a;
|
|
134
|
+
default:
|
|
135
|
+
return r;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
case c:
|
|
139
|
+
return r;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.ContextConsumer = h;
|
|
144
|
+
exports.ContextProvider = g;
|
|
145
|
+
exports.Element = b;
|
|
146
|
+
exports.ForwardRef = l;
|
|
147
|
+
exports.Fragment = d;
|
|
148
|
+
exports.Lazy = q;
|
|
149
|
+
exports.Memo = p;
|
|
150
|
+
exports.Portal = c;
|
|
151
|
+
exports.Profiler = f;
|
|
152
|
+
exports.StrictMode = e;
|
|
153
|
+
exports.Suspense = m;
|
|
154
|
+
exports.SuspenseList = n;
|
|
155
|
+
exports.isAsyncMode = function() {
|
|
156
|
+
return !1;
|
|
157
|
+
};
|
|
158
|
+
exports.isConcurrentMode = function() {
|
|
159
|
+
return !1;
|
|
160
|
+
};
|
|
161
|
+
exports.isContextConsumer = function(a) {
|
|
162
|
+
return v(a) === h;
|
|
163
|
+
};
|
|
164
|
+
exports.isContextProvider = function(a) {
|
|
165
|
+
return v(a) === g;
|
|
166
|
+
};
|
|
167
|
+
exports.isElement = function(a) {
|
|
168
|
+
return typeof a == "object" && a !== null && a.$$typeof === b;
|
|
169
|
+
};
|
|
170
|
+
exports.isForwardRef = function(a) {
|
|
171
|
+
return v(a) === l;
|
|
172
|
+
};
|
|
173
|
+
exports.isFragment = function(a) {
|
|
174
|
+
return v(a) === d;
|
|
175
|
+
};
|
|
176
|
+
exports.isLazy = function(a) {
|
|
177
|
+
return v(a) === q;
|
|
178
|
+
};
|
|
179
|
+
exports.isMemo = function(a) {
|
|
180
|
+
return v(a) === p;
|
|
181
|
+
};
|
|
182
|
+
exports.isPortal = function(a) {
|
|
183
|
+
return v(a) === c;
|
|
184
|
+
};
|
|
185
|
+
exports.isProfiler = function(a) {
|
|
186
|
+
return v(a) === f;
|
|
187
|
+
};
|
|
188
|
+
exports.isStrictMode = function(a) {
|
|
189
|
+
return v(a) === e;
|
|
190
|
+
};
|
|
191
|
+
exports.isSuspense = function(a) {
|
|
192
|
+
return v(a) === m;
|
|
193
|
+
};
|
|
194
|
+
exports.isSuspenseList = function(a) {
|
|
195
|
+
return v(a) === n;
|
|
196
|
+
};
|
|
197
|
+
exports.isValidElementType = function(a) {
|
|
198
|
+
return typeof a == "string" || typeof a == "function" || a === d || a === f || a === e || a === m || a === n || a === t || typeof a == "object" && a !== null && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || a.getModuleId !== void 0);
|
|
199
|
+
};
|
|
200
|
+
exports.typeOf = v;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
// ../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.development.js
|
|
205
|
+
var require_react_is_development = __commonJS({
|
|
206
|
+
"../../node_modules/react-element-to-jsx-string/node_modules/react-is/cjs/react-is.development.js"(exports) {
|
|
207
|
+
"use strict";
|
|
208
|
+
process.env.NODE_ENV !== "production" && (function() {
|
|
209
|
+
"use strict";
|
|
210
|
+
var enableScopeAPI = !1, enableCacheElement = !1, enableTransitionTracing = !1, enableLegacyHidden = !1, enableDebugTracing = !1, REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_SERVER_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.server_context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen"), REACT_MODULE_REFERENCE;
|
|
211
|
+
REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
212
|
+
function isValidElementType(type) {
|
|
213
|
+
return !!(typeof type == "string" || typeof type == "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
214
|
+
// types supported by any Flight configuration anywhere since
|
|
215
|
+
// we don't know which Flight build this will end up being used
|
|
216
|
+
// with.
|
|
217
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0));
|
|
218
|
+
}
|
|
219
|
+
function typeOf(object) {
|
|
220
|
+
if (typeof object == "object" && object !== null) {
|
|
221
|
+
var $$typeof = object.$$typeof;
|
|
222
|
+
switch ($$typeof) {
|
|
223
|
+
case REACT_ELEMENT_TYPE:
|
|
224
|
+
var type = object.type;
|
|
225
|
+
switch (type) {
|
|
226
|
+
case REACT_FRAGMENT_TYPE:
|
|
227
|
+
case REACT_PROFILER_TYPE:
|
|
228
|
+
case REACT_STRICT_MODE_TYPE:
|
|
229
|
+
case REACT_SUSPENSE_TYPE:
|
|
230
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
231
|
+
return type;
|
|
232
|
+
default:
|
|
233
|
+
var $$typeofType = type && type.$$typeof;
|
|
234
|
+
switch ($$typeofType) {
|
|
235
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
236
|
+
case REACT_CONTEXT_TYPE:
|
|
237
|
+
case REACT_FORWARD_REF_TYPE:
|
|
238
|
+
case REACT_LAZY_TYPE:
|
|
239
|
+
case REACT_MEMO_TYPE:
|
|
240
|
+
case REACT_PROVIDER_TYPE:
|
|
241
|
+
return $$typeofType;
|
|
242
|
+
default:
|
|
243
|
+
return $$typeof;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
case REACT_PORTAL_TYPE:
|
|
247
|
+
return $$typeof;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
var ContextConsumer = REACT_CONTEXT_TYPE, ContextProvider = REACT_PROVIDER_TYPE, Element = REACT_ELEMENT_TYPE, ForwardRef2 = REACT_FORWARD_REF_TYPE, Fragment2 = REACT_FRAGMENT_TYPE, Lazy = REACT_LAZY_TYPE, Memo2 = REACT_MEMO_TYPE, Portal = REACT_PORTAL_TYPE, Profiler = REACT_PROFILER_TYPE, StrictMode = REACT_STRICT_MODE_TYPE, Suspense = REACT_SUSPENSE_TYPE, SuspenseList = REACT_SUSPENSE_LIST_TYPE, hasWarnedAboutDeprecatedIsAsyncMode = !1, hasWarnedAboutDeprecatedIsConcurrentMode = !1;
|
|
252
|
+
function isAsyncMode(object) {
|
|
253
|
+
return hasWarnedAboutDeprecatedIsAsyncMode || (hasWarnedAboutDeprecatedIsAsyncMode = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
254
|
+
}
|
|
255
|
+
function isConcurrentMode(object) {
|
|
256
|
+
return hasWarnedAboutDeprecatedIsConcurrentMode || (hasWarnedAboutDeprecatedIsConcurrentMode = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
257
|
+
}
|
|
258
|
+
function isContextConsumer2(object) {
|
|
259
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
260
|
+
}
|
|
261
|
+
function isContextProvider2(object) {
|
|
262
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
263
|
+
}
|
|
264
|
+
function isElement(object) {
|
|
265
|
+
return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
266
|
+
}
|
|
267
|
+
function isForwardRef3(object) {
|
|
268
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
269
|
+
}
|
|
270
|
+
function isFragment(object) {
|
|
271
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
272
|
+
}
|
|
273
|
+
function isLazy2(object) {
|
|
274
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
275
|
+
}
|
|
276
|
+
function isMemo3(object) {
|
|
277
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
278
|
+
}
|
|
279
|
+
function isPortal(object) {
|
|
280
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
281
|
+
}
|
|
282
|
+
function isProfiler2(object) {
|
|
283
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
284
|
+
}
|
|
285
|
+
function isStrictMode2(object) {
|
|
286
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
287
|
+
}
|
|
288
|
+
function isSuspense2(object) {
|
|
289
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
290
|
+
}
|
|
291
|
+
function isSuspenseList(object) {
|
|
292
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
293
|
+
}
|
|
294
|
+
exports.ContextConsumer = ContextConsumer, exports.ContextProvider = ContextProvider, exports.Element = Element, exports.ForwardRef = ForwardRef2, exports.Fragment = Fragment2, exports.Lazy = Lazy, exports.Memo = Memo2, exports.Portal = Portal, exports.Profiler = Profiler, exports.StrictMode = StrictMode, exports.Suspense = Suspense, exports.SuspenseList = SuspenseList, exports.isAsyncMode = isAsyncMode, exports.isConcurrentMode = isConcurrentMode, exports.isContextConsumer = isContextConsumer2, exports.isContextProvider = isContextProvider2, exports.isElement = isElement, exports.isForwardRef = isForwardRef3, exports.isFragment = isFragment, exports.isLazy = isLazy2, exports.isMemo = isMemo3, exports.isPortal = isPortal, exports.isProfiler = isProfiler2, exports.isStrictMode = isStrictMode2, exports.isSuspense = isSuspense2, exports.isSuspenseList = isSuspenseList, exports.isValidElementType = isValidElementType, exports.typeOf = typeOf;
|
|
295
|
+
})();
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
// ../../node_modules/react-element-to-jsx-string/node_modules/react-is/index.js
|
|
300
|
+
var require_react_is = __commonJS({
|
|
301
|
+
"../../node_modules/react-element-to-jsx-string/node_modules/react-is/index.js"(exports, module) {
|
|
302
|
+
"use strict";
|
|
303
|
+
process.env.NODE_ENV === "production" ? module.exports = require_react_is_production_min() : module.exports = require_react_is_development();
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
// src/react/entry-preview-docs.ts
|
|
308
|
+
var entry_preview_docs_exports = {};
|
|
309
|
+
__export(entry_preview_docs_exports, {
|
|
310
|
+
applyDecorators: () => applyDecorators2,
|
|
311
|
+
decorators: () => decorators,
|
|
312
|
+
parameters: () => parameters
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
// src/react/docs/jsxDecorator.tsx
|
|
316
|
+
import React2, { createElement, isValidElement as isValidElement3 } from "react";
|
|
317
|
+
import { logger } from "@aussieljk/forkbook/internal/client-logger";
|
|
318
|
+
import { SourceType, getDocgenSection } from "@aussieljk/forkbook/internal/docs-tools";
|
|
319
|
+
|
|
320
|
+
// ../../node_modules/is-plain-object/dist/is-plain-object.mjs
|
|
321
|
+
function isObject(o) {
|
|
322
|
+
return Object.prototype.toString.call(o) === "[object Object]";
|
|
323
|
+
}
|
|
324
|
+
function isPlainObject(o) {
|
|
325
|
+
var ctor, prot;
|
|
326
|
+
return isObject(o) === !1 ? !1 : (ctor = o.constructor, ctor === void 0 ? !0 : (prot = ctor.prototype, !(isObject(prot) === !1 || prot.hasOwnProperty("isPrototypeOf") === !1)));
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// ../../node_modules/react-element-to-jsx-string/dist/esm/index.js
|
|
330
|
+
var import_pretty_print_object = __toESM(require_dist()), import_react_is = __toESM(require_react_is());
|
|
331
|
+
import * as React from "react";
|
|
332
|
+
import React__default, { Fragment, isValidElement as isValidElement2 } from "react";
|
|
333
|
+
var spacer = (function(times, tabStop) {
|
|
334
|
+
return times === 0 ? "" : new Array(times * tabStop).fill(" ").join("");
|
|
335
|
+
});
|
|
336
|
+
function _arrayLikeToArray(r, a) {
|
|
337
|
+
(a == null || a > r.length) && (a = r.length);
|
|
338
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
339
|
+
return n;
|
|
340
|
+
}
|
|
341
|
+
function _arrayWithoutHoles(r) {
|
|
342
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
343
|
+
}
|
|
344
|
+
function _defineProperty(e, r, t) {
|
|
345
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
346
|
+
value: t,
|
|
347
|
+
enumerable: !0,
|
|
348
|
+
configurable: !0,
|
|
349
|
+
writable: !0
|
|
350
|
+
}) : e[r] = t, e;
|
|
351
|
+
}
|
|
352
|
+
function _iterableToArray(r) {
|
|
353
|
+
if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
|
|
354
|
+
}
|
|
355
|
+
function _nonIterableSpread() {
|
|
356
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
357
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
358
|
+
}
|
|
359
|
+
function ownKeys(e, r) {
|
|
360
|
+
var t = Object.keys(e);
|
|
361
|
+
if (Object.getOwnPropertySymbols) {
|
|
362
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
363
|
+
r && (o = o.filter(function(r2) {
|
|
364
|
+
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
365
|
+
})), t.push.apply(t, o);
|
|
366
|
+
}
|
|
367
|
+
return t;
|
|
368
|
+
}
|
|
369
|
+
function _objectSpread2(e) {
|
|
370
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
371
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
372
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r2) {
|
|
373
|
+
_defineProperty(e, r2, t[r2]);
|
|
374
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
375
|
+
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
return e;
|
|
379
|
+
}
|
|
380
|
+
function _toConsumableArray(r) {
|
|
381
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
382
|
+
}
|
|
383
|
+
function _toPrimitive(t, r) {
|
|
384
|
+
if (typeof t != "object" || !t) return t;
|
|
385
|
+
var e = t[Symbol.toPrimitive];
|
|
386
|
+
if (e !== void 0) {
|
|
387
|
+
var i = e.call(t, r || "default");
|
|
388
|
+
if (typeof i != "object") return i;
|
|
389
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
390
|
+
}
|
|
391
|
+
return (r === "string" ? String : Number)(t);
|
|
392
|
+
}
|
|
393
|
+
function _toPropertyKey(t) {
|
|
394
|
+
var i = _toPrimitive(t, "string");
|
|
395
|
+
return typeof i == "symbol" ? i : i + "";
|
|
396
|
+
}
|
|
397
|
+
function _typeof(o) {
|
|
398
|
+
"@babel/helpers - typeof";
|
|
399
|
+
return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o2) {
|
|
400
|
+
return typeof o2;
|
|
401
|
+
} : function(o2) {
|
|
402
|
+
return o2 && typeof Symbol == "function" && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
403
|
+
}, _typeof(o);
|
|
404
|
+
}
|
|
405
|
+
function _unsupportedIterableToArray(r, a) {
|
|
406
|
+
if (r) {
|
|
407
|
+
if (typeof r == "string") return _arrayLikeToArray(r, a);
|
|
408
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
409
|
+
return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
function safeSortObject(value, seen) {
|
|
413
|
+
if (value === null || _typeof(value) !== "object" || value instanceof Date || value instanceof RegExp)
|
|
414
|
+
return value;
|
|
415
|
+
if (React.isValidElement(value)) {
|
|
416
|
+
var copyObj = _objectSpread2({}, value);
|
|
417
|
+
return delete copyObj._owner, copyObj;
|
|
418
|
+
}
|
|
419
|
+
return seen.add(value), Array.isArray(value) ? value.map(function(v) {
|
|
420
|
+
return safeSortObject(v, seen);
|
|
421
|
+
}) : Object.keys(value).sort().reduce(function(result, key) {
|
|
422
|
+
return key === "current" || seen.has(value[key]) ? result[key] = "[Circular]" : result[key] = safeSortObject(value[key], seen), result;
|
|
423
|
+
}, {});
|
|
424
|
+
}
|
|
425
|
+
function sortObject(value) {
|
|
426
|
+
return safeSortObject(value, /* @__PURE__ */ new WeakSet());
|
|
427
|
+
}
|
|
428
|
+
var createStringTreeNode = function(value) {
|
|
429
|
+
return {
|
|
430
|
+
type: "string",
|
|
431
|
+
value
|
|
432
|
+
};
|
|
433
|
+
}, createNumberTreeNode = function(value) {
|
|
434
|
+
return {
|
|
435
|
+
type: "number",
|
|
436
|
+
value
|
|
437
|
+
};
|
|
438
|
+
}, createReactElementTreeNode = function(displayName, props, defaultProps, childrens) {
|
|
439
|
+
return {
|
|
440
|
+
type: "ReactElement",
|
|
441
|
+
displayName,
|
|
442
|
+
props,
|
|
443
|
+
defaultProps,
|
|
444
|
+
childrens
|
|
445
|
+
};
|
|
446
|
+
}, createReactFragmentTreeNode = function(key, childrens) {
|
|
447
|
+
return {
|
|
448
|
+
type: "ReactFragment",
|
|
449
|
+
key,
|
|
450
|
+
childrens
|
|
451
|
+
};
|
|
452
|
+
}, supportFragment = !!Fragment, getFunctionTypeName = function(functionType) {
|
|
453
|
+
return !functionType.name || functionType.name === "_default" ? "No Display Name" : functionType.name;
|
|
454
|
+
}, _getWrappedComponentDisplayName = function(Component) {
|
|
455
|
+
switch (!0) {
|
|
456
|
+
case !!Component.displayName:
|
|
457
|
+
return Component.displayName;
|
|
458
|
+
case Component.$$typeof === import_react_is.Memo:
|
|
459
|
+
return _getWrappedComponentDisplayName(Component.type);
|
|
460
|
+
case Component.$$typeof === import_react_is.ForwardRef:
|
|
461
|
+
return _getWrappedComponentDisplayName(Component.render);
|
|
462
|
+
default:
|
|
463
|
+
return getFunctionTypeName(Component);
|
|
464
|
+
}
|
|
465
|
+
}, getReactElementDisplayName = function(element) {
|
|
466
|
+
switch (!0) {
|
|
467
|
+
case typeof element.type == "string":
|
|
468
|
+
return element.type;
|
|
469
|
+
case typeof element.type == "function":
|
|
470
|
+
return element.type.displayName ? element.type.displayName : getFunctionTypeName(element.type);
|
|
471
|
+
case (0, import_react_is.isForwardRef)(element):
|
|
472
|
+
case (0, import_react_is.isMemo)(element):
|
|
473
|
+
return _getWrappedComponentDisplayName(element.type);
|
|
474
|
+
case (0, import_react_is.isContextConsumer)(element):
|
|
475
|
+
return "".concat(element.type._context.displayName || "Context", ".Consumer");
|
|
476
|
+
case (0, import_react_is.isContextProvider)(element):
|
|
477
|
+
return "".concat(element.type._context.displayName || "Context", ".Provider");
|
|
478
|
+
case (0, import_react_is.isLazy)(element):
|
|
479
|
+
return "Lazy";
|
|
480
|
+
case (0, import_react_is.isProfiler)(element):
|
|
481
|
+
return "Profiler";
|
|
482
|
+
case (0, import_react_is.isStrictMode)(element):
|
|
483
|
+
return "StrictMode";
|
|
484
|
+
case (0, import_react_is.isSuspense)(element):
|
|
485
|
+
return "Suspense";
|
|
486
|
+
default:
|
|
487
|
+
return "UnknownElementType";
|
|
488
|
+
}
|
|
489
|
+
}, noChildren = function(propsValue, propName) {
|
|
490
|
+
return propName !== "children";
|
|
491
|
+
}, onlyMeaningfulChildren = function(children) {
|
|
492
|
+
return children !== !0 && children !== !1 && children !== null && children !== "";
|
|
493
|
+
}, filterProps = function(originalProps, cb) {
|
|
494
|
+
var filteredProps = {};
|
|
495
|
+
return Object.keys(originalProps).filter(function(key) {
|
|
496
|
+
return cb(originalProps[key], key);
|
|
497
|
+
}).forEach(function(key) {
|
|
498
|
+
return filteredProps[key] = originalProps[key];
|
|
499
|
+
}), filteredProps;
|
|
500
|
+
}, _parseReactElement = function(element, options) {
|
|
501
|
+
var _options$displayName = options.displayName, displayNameFn = _options$displayName === void 0 ? getReactElementDisplayName : _options$displayName;
|
|
502
|
+
if (typeof element == "string")
|
|
503
|
+
return createStringTreeNode(element);
|
|
504
|
+
if (typeof element == "number")
|
|
505
|
+
return createNumberTreeNode(element);
|
|
506
|
+
if (!React__default.isValidElement(element))
|
|
507
|
+
throw new Error("react-element-to-jsx-string: Expected a React.Element, got `".concat(_typeof(element), "`"));
|
|
508
|
+
var displayName = displayNameFn(element), props = filterProps(element.props, noChildren);
|
|
509
|
+
element.ref !== null && (props.ref = element.ref);
|
|
510
|
+
var key = element.key;
|
|
511
|
+
typeof key == "string" && key.search(/^\./) && (props.key = key);
|
|
512
|
+
var defaultProps = filterProps(element.type.defaultProps || {}, noChildren), childrens = React__default.Children.toArray(element.props.children).filter(onlyMeaningfulChildren).map(function(child) {
|
|
513
|
+
return _parseReactElement(child, options);
|
|
514
|
+
});
|
|
515
|
+
return supportFragment && element.type === Fragment ? createReactFragmentTreeNode(key, childrens) : createReactElementTreeNode(displayName, props, defaultProps, childrens);
|
|
516
|
+
};
|
|
517
|
+
function noRefCheck() {
|
|
518
|
+
}
|
|
519
|
+
var inlineFunction = function(fn) {
|
|
520
|
+
return fn.toString().split(`
|
|
521
|
+
`).map(function(line) {
|
|
522
|
+
return line.trim();
|
|
523
|
+
}).join("");
|
|
524
|
+
};
|
|
525
|
+
var defaultFunctionValue = inlineFunction, formatFunction = (function(fn, options) {
|
|
526
|
+
var _options$functionValu = options.functionValue, functionValue = _options$functionValu === void 0 ? defaultFunctionValue : _options$functionValu, showFunctions = options.showFunctions;
|
|
527
|
+
return functionValue(!showFunctions && functionValue === defaultFunctionValue ? noRefCheck : fn);
|
|
528
|
+
}), formatComplexDataStructure = (function(value, inline, lvl, options) {
|
|
529
|
+
var normalizedValue = sortObject(value), stringifiedValue = (0, import_pretty_print_object.prettyPrint)(normalizedValue, {
|
|
530
|
+
transform: function(currentObj, prop, originalResult) {
|
|
531
|
+
var currentValue = currentObj[prop];
|
|
532
|
+
return currentValue && isValidElement2(currentValue) ? formatTreeNode(_parseReactElement(currentValue, options), !0, lvl, options) : typeof currentValue == "function" ? formatFunction(currentValue, options) : originalResult;
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
return inline ? stringifiedValue.replace(/\s+/g, " ").replace(/{ /g, "{").replace(/ }/g, "}").replace(/\[ /g, "[").replace(/ ]/g, "]") : stringifiedValue.replace(/\t/g, spacer(1, options.tabStop)).replace(/\n([^$])/g, `
|
|
536
|
+
`.concat(spacer(lvl + 1, options.tabStop), "$1"));
|
|
537
|
+
}), escape$1 = function(s) {
|
|
538
|
+
return s.replace(/"/g, """);
|
|
539
|
+
}, formatPropValue = function(propValue, inline, lvl, options) {
|
|
540
|
+
if (typeof propValue == "number")
|
|
541
|
+
return "{".concat(String(propValue), "}");
|
|
542
|
+
if (typeof propValue == "string")
|
|
543
|
+
return '"'.concat(escape$1(propValue), '"');
|
|
544
|
+
if (_typeof(propValue) === "symbol") {
|
|
545
|
+
var symbolDescription = propValue.valueOf().toString().replace(/Symbol\((.*)\)/, "$1");
|
|
546
|
+
return symbolDescription ? "{Symbol('".concat(symbolDescription, "')}") : "{Symbol()}";
|
|
547
|
+
}
|
|
548
|
+
return typeof propValue == "function" ? "{".concat(formatFunction(propValue, options), "}") : isValidElement2(propValue) ? "{".concat(formatTreeNode(_parseReactElement(propValue, options), !0, lvl, options), "}") : propValue instanceof Date ? isNaN(propValue.valueOf()) ? "{new Date(NaN)}" : '{new Date("'.concat(propValue.toISOString(), '")}') : isPlainObject(propValue) || Array.isArray(propValue) ? "{".concat(formatComplexDataStructure(propValue, inline, lvl, options), "}") : "{".concat(String(propValue), "}");
|
|
549
|
+
}, formatProp = (function(name, hasValue, value, hasDefaultValue, defaultValue, inline, lvl, options) {
|
|
550
|
+
if (!hasValue && !hasDefaultValue)
|
|
551
|
+
throw new Error('The prop "'.concat(name, '" has no value and no default: could not be formatted'));
|
|
552
|
+
var usedValue = hasValue ? value : defaultValue, useBooleanShorthandSyntax = options.useBooleanShorthandSyntax, tabStop = options.tabStop, formattedPropValue = formatPropValue(usedValue, inline, lvl, options), attributeFormattedInline = " ", attributeFormattedMultiline = `
|
|
553
|
+
`.concat(spacer(lvl + 1, tabStop)), isMultilineAttribute = formattedPropValue.includes(`
|
|
554
|
+
`);
|
|
555
|
+
return useBooleanShorthandSyntax && formattedPropValue === "{true}" ? (attributeFormattedInline += "".concat(name), attributeFormattedMultiline += "".concat(name)) : (attributeFormattedInline += "".concat(name, "=").concat(formattedPropValue), attributeFormattedMultiline += "".concat(name, "=").concat(formattedPropValue)), {
|
|
556
|
+
attributeFormattedInline,
|
|
557
|
+
attributeFormattedMultiline,
|
|
558
|
+
isMultilineAttribute
|
|
559
|
+
};
|
|
560
|
+
}), mergeSiblingPlainStringChildrenReducer = (function(previousNodes, currentNode) {
|
|
561
|
+
var nodes = previousNodes.slice(0, previousNodes.length > 0 ? previousNodes.length - 1 : 0), previousNode = previousNodes[previousNodes.length - 1];
|
|
562
|
+
return previousNode && (currentNode.type === "string" || currentNode.type === "number") && (previousNode.type === "string" || previousNode.type === "number") ? nodes.push(createStringTreeNode(String(previousNode.value) + String(currentNode.value))) : (previousNode && nodes.push(previousNode), nodes.push(currentNode)), nodes;
|
|
563
|
+
}), isKeyOrRefProps = function(propName) {
|
|
564
|
+
return ["key", "ref"].includes(propName);
|
|
565
|
+
}, sortPropsByNames = (function(shouldSortUserProps) {
|
|
566
|
+
return function(props) {
|
|
567
|
+
var haveKeyProp = props.includes("key"), haveRefProp = props.includes("ref"), userPropsOnly = props.filter(function(oneProp) {
|
|
568
|
+
return !isKeyOrRefProps(oneProp);
|
|
569
|
+
}), sortedProps = _toConsumableArray(shouldSortUserProps ? userPropsOnly.sort() : userPropsOnly);
|
|
570
|
+
return haveRefProp && sortedProps.unshift("ref"), haveKeyProp && sortedProps.unshift("key"), sortedProps;
|
|
571
|
+
};
|
|
572
|
+
});
|
|
573
|
+
function createPropFilter(props, filter) {
|
|
574
|
+
return Array.isArray(filter) ? function(key) {
|
|
575
|
+
return filter.indexOf(key) === -1;
|
|
576
|
+
} : function(key) {
|
|
577
|
+
return filter(props[key], key);
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
var compensateMultilineStringElementIndentation = function(element, formattedElement, inline, lvl, options) {
|
|
581
|
+
var tabStop = options.tabStop;
|
|
582
|
+
return element.type === "string" ? formattedElement.split(`
|
|
583
|
+
`).map(function(line, offset) {
|
|
584
|
+
return offset === 0 ? line : "".concat(spacer(lvl, tabStop)).concat(line);
|
|
585
|
+
}).join(`
|
|
586
|
+
`) : formattedElement;
|
|
587
|
+
}, formatOneChildren = function(inline, lvl, options) {
|
|
588
|
+
return function(element) {
|
|
589
|
+
return compensateMultilineStringElementIndentation(element, formatTreeNode(element, inline, lvl, options), inline, lvl, options);
|
|
590
|
+
};
|
|
591
|
+
}, onlyPropsWithOriginalValue = function(defaultProps, props) {
|
|
592
|
+
return function(propName) {
|
|
593
|
+
var haveDefaultValue = Object.keys(defaultProps).includes(propName);
|
|
594
|
+
return !haveDefaultValue || haveDefaultValue && defaultProps[propName] !== props[propName];
|
|
595
|
+
};
|
|
596
|
+
}, isInlineAttributeTooLong = function(attributes, inlineAttributeString, lvl, tabStop, maxInlineAttributesLineLength) {
|
|
597
|
+
return maxInlineAttributesLineLength ? spacer(lvl, tabStop).length + inlineAttributeString.length > maxInlineAttributesLineLength : attributes.length > 1;
|
|
598
|
+
}, shouldRenderMultilineAttr = function(attributes, inlineAttributeString, containsMultilineAttr, inline, lvl, tabStop, maxInlineAttributesLineLength) {
|
|
599
|
+
return (isInlineAttributeTooLong(attributes, inlineAttributeString, lvl, tabStop, maxInlineAttributesLineLength) || containsMultilineAttr) && !inline;
|
|
600
|
+
}, formatReactElementNode = (function(node, inline, lvl, options) {
|
|
601
|
+
var type = node.type, _node$displayName = node.displayName, displayName = _node$displayName === void 0 ? "" : _node$displayName, childrens = node.childrens, _node$props = node.props, props = _node$props === void 0 ? {} : _node$props, _node$defaultProps = node.defaultProps, defaultProps = _node$defaultProps === void 0 ? {} : _node$defaultProps;
|
|
602
|
+
if (type !== "ReactElement")
|
|
603
|
+
throw new Error('The "formatReactElementNode" function could only format node of type "ReactElement". Given: '.concat(type));
|
|
604
|
+
var filterProps3 = options.filterProps, maxInlineAttributesLineLength = options.maxInlineAttributesLineLength, showDefaultProps = options.showDefaultProps, sortProps = options.sortProps, tabStop = options.tabStop, out = "<".concat(displayName), outInlineAttr = out, outMultilineAttr = out, containsMultilineAttr = !1, visibleAttributeNames = [], propFilter = createPropFilter(props, filterProps3);
|
|
605
|
+
Object.keys(props).filter(propFilter).filter(onlyPropsWithOriginalValue(defaultProps, props)).forEach(function(propName) {
|
|
606
|
+
return visibleAttributeNames.push(propName);
|
|
607
|
+
}), Object.keys(defaultProps).filter(propFilter).filter(function() {
|
|
608
|
+
return showDefaultProps;
|
|
609
|
+
}).filter(function(defaultPropName) {
|
|
610
|
+
return !visibleAttributeNames.includes(defaultPropName);
|
|
611
|
+
}).forEach(function(defaultPropName) {
|
|
612
|
+
return visibleAttributeNames.push(defaultPropName);
|
|
613
|
+
});
|
|
614
|
+
var attributes = sortPropsByNames(sortProps)(visibleAttributeNames);
|
|
615
|
+
if (attributes.forEach(function(attributeName) {
|
|
616
|
+
var _formatProp = formatProp(attributeName, Object.keys(props).includes(attributeName), props[attributeName], Object.keys(defaultProps).includes(attributeName), defaultProps[attributeName], inline, lvl, options), attributeFormattedInline = _formatProp.attributeFormattedInline, attributeFormattedMultiline = _formatProp.attributeFormattedMultiline, isMultilineAttribute = _formatProp.isMultilineAttribute;
|
|
617
|
+
isMultilineAttribute && (containsMultilineAttr = !0), outInlineAttr += attributeFormattedInline, outMultilineAttr += attributeFormattedMultiline;
|
|
618
|
+
}), outMultilineAttr += `
|
|
619
|
+
`.concat(spacer(lvl, tabStop)), shouldRenderMultilineAttr(attributes, outInlineAttr, containsMultilineAttr, inline, lvl, tabStop, maxInlineAttributesLineLength) ? out = outMultilineAttr : out = outInlineAttr, childrens && childrens.length > 0) {
|
|
620
|
+
var newLvl = lvl + 1;
|
|
621
|
+
out += ">", inline || (out += `
|
|
622
|
+
`, out += spacer(newLvl, tabStop)), out += childrens.reduce(mergeSiblingPlainStringChildrenReducer, []).map(formatOneChildren(inline, newLvl, options)).join(inline ? "" : `
|
|
623
|
+
`.concat(spacer(newLvl, tabStop))), inline || (out += `
|
|
624
|
+
`, out += spacer(newLvl - 1, tabStop)), out += "</".concat(displayName, ">");
|
|
625
|
+
} else
|
|
626
|
+
isInlineAttributeTooLong(attributes, outInlineAttr, lvl, tabStop, maxInlineAttributesLineLength) || (out += " "), out += "/>";
|
|
627
|
+
return out;
|
|
628
|
+
}), REACT_FRAGMENT_TAG_NAME_SHORT_SYNTAX = "", REACT_FRAGMENT_TAG_NAME_EXPLICIT_SYNTAX = "React.Fragment", toReactElementTreeNode = function(displayName, key, childrens) {
|
|
629
|
+
var props = {};
|
|
630
|
+
return key && (props = {
|
|
631
|
+
key
|
|
632
|
+
}), {
|
|
633
|
+
type: "ReactElement",
|
|
634
|
+
displayName,
|
|
635
|
+
props,
|
|
636
|
+
defaultProps: {},
|
|
637
|
+
childrens
|
|
638
|
+
};
|
|
639
|
+
}, isKeyedFragment = function(_ref) {
|
|
640
|
+
var key = _ref.key;
|
|
641
|
+
return !!key;
|
|
642
|
+
}, hasNoChildren = function(_ref2) {
|
|
643
|
+
var childrens = _ref2.childrens;
|
|
644
|
+
return childrens.length === 0;
|
|
645
|
+
}, formatReactFragmentNode = (function(node, inline, lvl, options) {
|
|
646
|
+
var type = node.type, key = node.key, childrens = node.childrens;
|
|
647
|
+
if (type !== "ReactFragment")
|
|
648
|
+
throw new Error('The "formatReactFragmentNode" function could only format node of type "ReactFragment". Given: '.concat(type));
|
|
649
|
+
var useFragmentShortSyntax = options.useFragmentShortSyntax, displayName;
|
|
650
|
+
return useFragmentShortSyntax ? hasNoChildren(node) || isKeyedFragment(node) ? displayName = REACT_FRAGMENT_TAG_NAME_EXPLICIT_SYNTAX : displayName = REACT_FRAGMENT_TAG_NAME_SHORT_SYNTAX : displayName = REACT_FRAGMENT_TAG_NAME_EXPLICIT_SYNTAX, formatReactElementNode(toReactElementTreeNode(displayName, key, childrens), inline, lvl, options);
|
|
651
|
+
}), jsxStopChars = ["<", ">", "{", "}"], shouldBeEscaped = function(s) {
|
|
652
|
+
return jsxStopChars.some(function(jsxStopChar) {
|
|
653
|
+
return s.includes(jsxStopChar);
|
|
654
|
+
});
|
|
655
|
+
}, escape2 = function(s) {
|
|
656
|
+
return shouldBeEscaped(s) ? "{`".concat(s, "`}") : s;
|
|
657
|
+
}, preserveTrailingSpace = function(s) {
|
|
658
|
+
var result = s;
|
|
659
|
+
return result.endsWith(" ") && (result = result.replace(/^(.*?)(\s+)$/, "$1{'$2'}")), result.startsWith(" ") && (result = result.replace(/^(\s+)(.*)$/, "{'$1'}$2")), result;
|
|
660
|
+
}, formatTreeNode = (function(node, inline, lvl, options) {
|
|
661
|
+
if (node.type === "number")
|
|
662
|
+
return String(node.value);
|
|
663
|
+
if (node.type === "string")
|
|
664
|
+
return node.value ? "".concat(preserveTrailingSpace(escape2(String(node.value)))) : "";
|
|
665
|
+
if (node.type === "ReactElement")
|
|
666
|
+
return formatReactElementNode(node, inline, lvl, options);
|
|
667
|
+
if (node.type === "ReactFragment")
|
|
668
|
+
return formatReactFragmentNode(node, inline, lvl, options);
|
|
669
|
+
throw new TypeError('Unknow format type "'.concat(node.type, '"'));
|
|
670
|
+
}), formatTree = (function(node, options) {
|
|
671
|
+
return formatTreeNode(node, !1, 0, options);
|
|
672
|
+
}), reactElementToJsxString = function(element) {
|
|
673
|
+
var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref$filterProps = _ref.filterProps, filterProps3 = _ref$filterProps === void 0 ? [] : _ref$filterProps, _ref$showDefaultProps = _ref.showDefaultProps, showDefaultProps = _ref$showDefaultProps === void 0 ? !0 : _ref$showDefaultProps, _ref$showFunctions = _ref.showFunctions, showFunctions = _ref$showFunctions === void 0 ? !1 : _ref$showFunctions, functionValue = _ref.functionValue, _ref$tabStop = _ref.tabStop, tabStop = _ref$tabStop === void 0 ? 2 : _ref$tabStop, _ref$useBooleanShorth = _ref.useBooleanShorthandSyntax, useBooleanShorthandSyntax = _ref$useBooleanShorth === void 0 ? !0 : _ref$useBooleanShorth, _ref$useFragmentShort = _ref.useFragmentShortSyntax, useFragmentShortSyntax = _ref$useFragmentShort === void 0 ? !0 : _ref$useFragmentShort, _ref$sortProps = _ref.sortProps, sortProps = _ref$sortProps === void 0 ? !0 : _ref$sortProps, maxInlineAttributesLineLength = _ref.maxInlineAttributesLineLength, displayName = _ref.displayName;
|
|
674
|
+
if (!element)
|
|
675
|
+
throw new Error("react-element-to-jsx-string: Expected a ReactElement");
|
|
676
|
+
var options = {
|
|
677
|
+
filterProps: filterProps3,
|
|
678
|
+
showDefaultProps,
|
|
679
|
+
showFunctions,
|
|
680
|
+
functionValue,
|
|
681
|
+
tabStop,
|
|
682
|
+
useBooleanShorthandSyntax,
|
|
683
|
+
useFragmentShortSyntax,
|
|
684
|
+
sortProps,
|
|
685
|
+
maxInlineAttributesLineLength,
|
|
686
|
+
displayName
|
|
687
|
+
};
|
|
688
|
+
return formatTree(_parseReactElement(element, options), options);
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
// src/react/docs/jsxDecorator.tsx
|
|
692
|
+
import { emitTransformCode, useEffect, useRef } from "@aussieljk/forkbook/preview-api";
|
|
693
|
+
|
|
694
|
+
// src/react/docs/lib/componentTypes.ts
|
|
695
|
+
var isMemo2 = (component) => component.$$typeof === /* @__PURE__ */ Symbol.for("react.memo"), isForwardRef2 = (component) => component.$$typeof === /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
696
|
+
|
|
697
|
+
// src/react/docs/jsxDecorator.tsx
|
|
698
|
+
import { jsx } from "react/jsx-runtime";
|
|
699
|
+
var reactElementToJSXString = reactElementToJsxString, toPascalCase = (str) => str.charAt(0).toUpperCase() + str.slice(1), getReactSymbolName = (elementType) => (elementType.$$typeof || elementType).toString().replace(/^Symbol\((.*)\)$/, "$1").split(".").map((segment) => segment.split("_").map(toPascalCase).join("")).join(".");
|
|
700
|
+
function simplifyNodeForStringify(node) {
|
|
701
|
+
if (isValidElement3(node)) {
|
|
702
|
+
let props = Object.keys(node.props).reduce((acc, cur) => (acc[cur] = simplifyNodeForStringify(node.props[cur]), acc), {});
|
|
703
|
+
return {
|
|
704
|
+
...node,
|
|
705
|
+
props,
|
|
706
|
+
// @ts-expect-error (this is an internal or removed api)
|
|
707
|
+
_owner: null
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
return Array.isArray(node) ? node.map(simplifyNodeForStringify) : node;
|
|
711
|
+
}
|
|
712
|
+
var renderJsx = (code, options) => {
|
|
713
|
+
if (typeof code > "u")
|
|
714
|
+
return logger.warn("Too many skip or undefined component"), null;
|
|
715
|
+
let renderedJSX = code, Type = renderedJSX.type;
|
|
716
|
+
for (let i = 0; i < options?.skip; i += 1) {
|
|
717
|
+
if (typeof renderedJSX > "u")
|
|
718
|
+
return logger.warn("Cannot skip undefined element"), null;
|
|
719
|
+
if (React2.Children.count(renderedJSX) > 1)
|
|
720
|
+
return logger.warn("Trying to skip an array of elements"), null;
|
|
721
|
+
typeof renderedJSX.props.children > "u" ? (logger.warn("Not enough children to skip elements."), typeof renderedJSX.type == "function" && renderedJSX.type.name === "" && (renderedJSX = jsx(Type, { ...renderedJSX.props }))) : typeof renderedJSX.props.children == "function" ? renderedJSX = renderedJSX.props.children() : renderedJSX = renderedJSX.props.children;
|
|
722
|
+
}
|
|
723
|
+
let displayNameDefaults;
|
|
724
|
+
typeof options?.displayName == "string" ? displayNameDefaults = { showFunctions: !0, displayName: () => options.displayName } : displayNameDefaults = {
|
|
725
|
+
// To get exotic component names resolving properly
|
|
726
|
+
displayName: (el) => {
|
|
727
|
+
if (el.type.displayName)
|
|
728
|
+
return el.type.displayName;
|
|
729
|
+
if (getDocgenSection(el.type, "displayName"))
|
|
730
|
+
return getDocgenSection(el.type, "displayName");
|
|
731
|
+
if (el.type.render?.displayName)
|
|
732
|
+
return el.type.render.displayName;
|
|
733
|
+
if (typeof el.type == "symbol" || el.type.$$typeof && typeof el.type.$$typeof == "symbol")
|
|
734
|
+
return getReactSymbolName(el.type);
|
|
735
|
+
if (el.type.name && el.type.name !== "_default")
|
|
736
|
+
return el.type.name;
|
|
737
|
+
if (typeof el.type == "function") {
|
|
738
|
+
let parent = options?.parentComponent;
|
|
739
|
+
if (parent) {
|
|
740
|
+
for (let key of Object.keys(parent))
|
|
741
|
+
if (/^[A-Z]/.test(key) && parent[key] === el.type) {
|
|
742
|
+
let parentName = parent.displayName || parent.name || "";
|
|
743
|
+
return parentName ? `${parentName}.${key}` : key;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
return "No Display Name";
|
|
747
|
+
} else return isForwardRef2(el.type) ? el.type.render.name : isMemo2(el.type) ? el.type.type.name : el.type;
|
|
748
|
+
}
|
|
749
|
+
};
|
|
750
|
+
let opts = {
|
|
751
|
+
...displayNameDefaults,
|
|
752
|
+
...{
|
|
753
|
+
filterProps: (value, key) => value !== void 0
|
|
754
|
+
},
|
|
755
|
+
...options
|
|
756
|
+
};
|
|
757
|
+
return React2.Children.map(code, (c) => {
|
|
758
|
+
let child = typeof c == "number" ? c.toString() : c, string = (typeof reactElementToJSXString == "function" ? reactElementToJSXString : (
|
|
759
|
+
// @ts-expect-error (Converted from ts-ignore)
|
|
760
|
+
reactElementToJSXString.default
|
|
761
|
+
))(simplifyNodeForStringify(child), opts);
|
|
762
|
+
if (string.indexOf(""") > -1) {
|
|
763
|
+
let matches = string.match(/\S+=\\"([^"]*)\\"/g);
|
|
764
|
+
matches && matches.forEach((match) => {
|
|
765
|
+
string = string.replace(match, match.replace(/"/g, "'"));
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
return string;
|
|
769
|
+
}).join(`
|
|
770
|
+
`).replace(/function\s+noRefCheck\(\)\s*\{\}/g, "() => {}");
|
|
771
|
+
}, defaultOpts = {
|
|
772
|
+
skip: 0,
|
|
773
|
+
showFunctions: !1,
|
|
774
|
+
enableBeautify: !0,
|
|
775
|
+
showDefaultProps: !1
|
|
776
|
+
}, skipJsxRender = (context) => {
|
|
777
|
+
let sourceParams = context?.parameters.docs?.source, isArgsStory = context?.parameters.__isArgsStory;
|
|
778
|
+
return context?.parameters.__isPortableStory ? !0 : sourceParams?.type === SourceType.DYNAMIC ? !1 : !isArgsStory || sourceParams?.code || sourceParams?.type === SourceType.CODE;
|
|
779
|
+
}, isMdx = (node) => node.type?.displayName === "MDXCreateElement" && !!node.props?.mdxType, mdxToJsx = (node) => {
|
|
780
|
+
if (!isMdx(node))
|
|
781
|
+
return node;
|
|
782
|
+
let { mdxType, originalType, children, ...rest } = node.props, jsxChildren = [];
|
|
783
|
+
return children && (jsxChildren = (Array.isArray(children) ? children : [children]).map(mdxToJsx)), createElement(originalType, rest, ...jsxChildren);
|
|
784
|
+
}, jsxDecorator = (storyFn, context) => {
|
|
785
|
+
let jsx2 = useRef(void 0), story = storyFn(), skip = skipJsxRender(context), options = {
|
|
786
|
+
...defaultOpts,
|
|
787
|
+
...context?.parameters.jsx || {},
|
|
788
|
+
parentComponent: context?.component
|
|
789
|
+
}, storyJsx = context.originalStoryFn(context.args, context);
|
|
790
|
+
return useEffect(() => {
|
|
791
|
+
if (skip)
|
|
792
|
+
return;
|
|
793
|
+
let sourceJsx = mdxToJsx(storyJsx), rendered = renderJsx(sourceJsx, options);
|
|
794
|
+
rendered && jsx2.current !== rendered && (emitTransformCode(rendered, context), jsx2.current = rendered);
|
|
795
|
+
}), story;
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
// src/react/docs/applyDecorators.ts
|
|
799
|
+
var applyDecorators2 = (storyFn, decorators2) => {
|
|
800
|
+
let jsxIndex = decorators2.findIndex((d) => d.originalFn === jsxDecorator), reorderedDecorators = jsxIndex === -1 ? decorators2 : [...decorators2.splice(jsxIndex, 1), ...decorators2];
|
|
801
|
+
return applyDecorators(storyFn, reorderedDecorators);
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
// src/react/entry-preview-docs.ts
|
|
805
|
+
var useStaticServiceSnippets = "FEATURES" in globalThis && globalThis?.FEATURES?.docgenServer, useCompileTimeSnippets = "FEATURES" in globalThis && globalThis?.FEATURES?.experimentalCodeExamples, decorators = useStaticServiceSnippets || useCompileTimeSnippets ? [] : [jsxDecorator], parameters = {
|
|
806
|
+
docs: {
|
|
807
|
+
story: { inline: !0 }
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
export {
|
|
812
|
+
applyDecorators2 as applyDecorators,
|
|
813
|
+
decorators,
|
|
814
|
+
parameters,
|
|
815
|
+
entry_preview_docs_exports
|
|
816
|
+
};
|