@eluan/core 0.1.0 → 0.4.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 +34 -4
- package/dist/accordion-BzmUN-cN.js +28 -0
- package/dist/{accordion-BbMxlj3j.cjs → accordion-CwCYLCam.cjs} +1 -1
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +1 -1
- package/dist/action-popover-CCRZyXVl.cjs +1 -0
- package/dist/action-popover-DUJjIthU.js +25 -0
- package/dist/action-popover.cjs +1 -1
- package/dist/action-popover.js +1 -1
- package/dist/avatar-CS5f1irF.js +124 -0
- package/dist/avatar-Co-k8KqV.cjs +1 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +1 -1
- package/dist/{badge-BZli5zpU.js → badge-D9NYZFWH.js} +8 -8
- package/dist/badge-DXKWztL-.cjs +1 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/banner-COlEFRuK.cjs +1 -0
- package/dist/{banner-CqgXXNRv.js → banner-CyYFLZXw.js} +30 -30
- package/dist/banner.cjs +1 -1
- package/dist/banner.js +1 -1
- package/dist/{breadcrumb-BPB6FOAt.js → breadcrumb-Czu2XwgU.js} +7 -7
- package/dist/{breadcrumb-CUJua1hE.cjs → breadcrumb-D6_IoicI.cjs} +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/{button-nntae7sN.js → button-ANAPDrvs.js} +43 -33
- package/dist/button-Ny6OF8Un.cjs +1 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar-BUPsr0be.js +315 -0
- package/dist/calendar-Dd-Ud2zz.cjs +76 -0
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.js +1 -1
- package/dist/{card-80y0WWWV.js → card-BC_4C3ns.js} +7 -7
- package/dist/{card-D57HaBr_.cjs → card-C88--zB4.cjs} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel-BfL7oy_q.cjs +1 -0
- package/dist/carousel-DuP0hvF-.js +174 -0
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.js +1 -1
- package/dist/{checkbox-CR6mntVh.js → checkbox-Bi0Kmuut.js} +1 -1
- package/dist/{checkbox-Cx5qbEn4.cjs → checkbox-M8DmWKiC.cjs} +1 -1
- package/dist/checkbox-group-CQMEJnhD.js +86 -0
- package/dist/checkbox-group-KBwPhjmW.cjs +1 -0
- package/dist/checkbox-group.cjs +1 -1
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{code-block-BXOzo8zX.js → code-block-C9u140Ob.js} +404 -383
- package/dist/code-block-_dFw7Su1.cjs +2 -0
- package/dist/code-block.cjs +1 -1
- package/dist/code-block.js +1 -1
- package/dist/command-C3oAkkaa.cjs +9 -0
- package/dist/command-D1iTMmyh.js +132 -0
- package/dist/command.cjs +1 -1
- package/dist/command.js +1 -1
- package/dist/components/accordion.d.ts +4 -3
- package/dist/components/aspect-ratio.d.ts +1 -1
- package/dist/components/avatar.d.ts +11 -4
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/banner.d.ts +1 -1
- package/dist/components/breadcrumb.d.ts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/calendar.d.ts +1 -1
- package/dist/components/card.d.ts +2 -2
- package/dist/components/carousel.d.ts +11 -3
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/collapsible.d.ts +7 -3
- package/dist/components/command.d.ts +18 -5
- package/dist/components/context-menu.d.ts +16 -6
- package/dist/components/credit-card-input.d.ts +3 -3
- package/dist/components/date-picker.d.ts +2 -2
- package/dist/components/datetime-picker.d.ts +1 -1
- package/dist/components/decimal-input.d.ts +1 -1
- package/dist/components/dialog.d.ts +8 -4
- package/dist/components/drawer.d.ts +28 -12
- package/dist/components/dropdown-menu.d.ts +17 -6
- package/dist/components/fieldset.d.ts +2 -2
- package/dist/components/file-input.d.ts +1 -1
- package/dist/components/footer.d.ts +2 -0
- package/dist/components/form-label.d.ts +1 -0
- package/dist/components/header.d.ts +18 -1
- package/dist/components/hover-card.d.ts +2 -1
- package/dist/components/input-otp.d.ts +1 -1
- package/dist/components/menubar.d.ts +18 -8
- package/dist/components/multi-select.d.ts +3 -1
- package/dist/components/navigation-drawer.d.ts +4 -1
- package/dist/components/navigation-menu.d.ts +7 -6
- package/dist/components/number-input.d.ts +1 -1
- package/dist/components/pagination.d.ts +5 -5
- package/dist/components/phone-input.d.ts +1 -1
- package/dist/components/popover.d.ts +4 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/rich-text.d.ts +16 -2
- package/dist/components/scroll-area.d.ts +2 -2
- package/dist/components/search-input.d.ts +2 -2
- package/dist/components/segmented-control.d.ts +12 -0
- package/dist/components/select.d.ts +14 -4
- package/dist/components/separator.d.ts +3 -0
- package/dist/components/sheet.d.ts +9 -4
- package/dist/components/skeleton.d.ts +7 -1
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/table.d.ts +14 -4
- package/dist/components/tabs.d.ts +3 -3
- package/dist/components/time-input.d.ts +8 -2
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toggle-group.d.ts +5 -4
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/tooltip.d.ts +2 -1
- package/dist/components/typography.d.ts +37 -0
- package/dist/compose-refs-BjfKuXXE.cjs +1 -0
- package/dist/compose-refs-E-AHfjCW.js +13 -0
- package/dist/{context-menu-Da5JJFgE.js → context-menu-BFvleIE-.js} +13 -13
- package/dist/context-menu-BZobMAds.cjs +1 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/credit-card-input-CUqA9CX3.cjs +1 -0
- package/dist/{credit-card-input-YutN_krQ.js → credit-card-input-DN-8vaFj.js} +130 -85
- package/dist/credit-card-input.cjs +1 -1
- package/dist/credit-card-input.js +1 -1
- package/dist/date-picker-CISIHHyU.js +55 -0
- package/dist/date-picker-K5GcZ_Li.cjs +1 -0
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/datetime-picker-CP_fhCA-.cjs +1 -0
- package/dist/datetime-picker-zTrUj815.js +67 -0
- package/dist/datetime-picker.cjs +1 -1
- package/dist/datetime-picker.js +1 -1
- package/dist/decimal-input-BLmifKF2.cjs +1 -0
- package/dist/{decimal-input-BAGAfAp7.js → decimal-input-yTk35W_5.js} +41 -41
- package/dist/decimal-input.cjs +1 -1
- package/dist/decimal-input.js +1 -1
- package/dist/dialog-B8uNe51F.cjs +1 -0
- package/dist/dialog-BVe6-J_z.js +59 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/drawer-91wrQ_5e.js +171 -0
- package/dist/drawer-DP-v9j83.cjs +1 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.js +2 -3
- package/dist/dropdown-menu-BtU3Yhar.cjs +1 -0
- package/dist/{dropdown-menu-BRhqJFtK.js → dropdown-menu-CA2MpoMo.js} +24 -24
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/email-input-DFI4h_KN.cjs +1 -0
- package/dist/email-input-pX0hlYV3.js +29 -0
- package/dist/email-input.cjs +1 -1
- package/dist/email-input.js +1 -1
- package/dist/file-input-B_aBgxmT.js +189 -0
- package/dist/file-input-D62FEnKg.cjs +1 -0
- package/dist/file-input.cjs +1 -1
- package/dist/file-input.js +1 -1
- package/dist/footer-B3KUIwXW.js +137 -0
- package/dist/footer-DB0_-IwN.cjs +1 -0
- package/dist/footer.cjs +1 -1
- package/dist/footer.js +1 -1
- package/dist/form-label-Cqs0By3P.cjs +1 -0
- package/dist/form-label-DTxFDQDK.js +49 -0
- package/dist/form-label.cjs +1 -1
- package/dist/form-label.js +1 -1
- package/dist/header-BqNWcy93.js +101 -0
- package/dist/header-Dg6y6pKR.cjs +1 -0
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hover-card-BN7Ew2Y1.js +16 -0
- package/dist/hover-card-Dft-08Ha.cjs +1 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +3 -3
- package/dist/index.js +789 -461
- package/dist/inject-stylesheet-BK5pOlkI.js +9 -0
- package/dist/inject-stylesheet-j6SkUo-d.cjs +1 -0
- package/dist/input-BrGJn-D9.cjs +1 -0
- package/dist/{input-CFzV2DMn.js → input-Cccufiqn.js} +21 -21
- package/dist/input-otp-BWPRKJ4m.js +95 -0
- package/dist/input-otp-BYEy4XaO.cjs +1 -0
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/media-DBscX0uU.js +158 -0
- package/dist/media-YR5gOT0c.cjs +1 -0
- package/dist/media.cjs +1 -1
- package/dist/media.js +1 -1
- package/dist/menubar-B82Hp9r0.cjs +1 -0
- package/dist/{menubar-Du-kLZh6.js → menubar-DMZxna8-.js} +22 -22
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.js +1 -1
- package/dist/multi-select-BM4Zxa3I.js +76 -0
- package/dist/multi-select-FXNBRmwx.cjs +1 -0
- package/dist/multi-select.cjs +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/navigation-drawer-C99JVOby.js +171 -0
- package/dist/navigation-drawer-CVxS6X5J.cjs +1 -0
- package/dist/navigation-drawer.cjs +1 -1
- package/dist/navigation-drawer.js +1 -1
- package/dist/navigation-menu-BjA-PdMY.js +58 -0
- package/dist/navigation-menu-BtpLfxHN.cjs +5 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +1 -1
- package/dist/number-input-Bc7jUsu-.cjs +1 -0
- package/dist/number-input-vICbRc2y.js +66 -0
- package/dist/number-input.cjs +1 -1
- package/dist/number-input.js +1 -1
- package/dist/pagination-CVZk8eCM.cjs +1 -0
- package/dist/pagination-DhGezNeG.js +133 -0
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.js +1 -1
- package/dist/password-input-B9V45d3Q.js +90 -0
- package/dist/password-input-BwnlHPbX.cjs +1 -0
- package/dist/password-input.cjs +1 -1
- package/dist/password-input.js +1 -1
- package/dist/phone-input-COi21JIl.js +51 -0
- package/dist/phone-input-DXkhw_4A.cjs +1 -0
- package/dist/phone-input.cjs +1 -1
- package/dist/phone-input.js +1 -1
- package/dist/{popover-DQgrg789.js → popover-B_Kfx06V.js} +15 -15
- package/dist/popover-DJ5e6lwh.cjs +1 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +1 -1
- package/dist/providers/create-theme.d.ts +2 -2
- package/dist/providers/eluan-provider.d.ts +18 -4
- package/dist/radio-group-C--1neiq.cjs +1 -0
- package/dist/radio-group-CNMPZx_2.js +12 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-CuJJFeUV.js +198 -0
- package/dist/rich-text-uAtn5CZk.cjs +73 -0
- package/dist/rich-text.cjs +1 -1
- package/dist/rich-text.js +1 -1
- package/dist/scroll-area-C8W9ZfZU.cjs +1 -0
- package/dist/{scroll-area-CEjpWCN2.js → scroll-area-D5PVICPR.js} +1 -1
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.js +1 -1
- package/dist/search-input-BRf6r110.cjs +1 -0
- package/dist/search-input-DrO3-p4h.js +194 -0
- package/dist/search-input.cjs +1 -1
- package/dist/search-input.js +1 -1
- package/dist/{select-DikwRWF5.js → select-3GU6G3YF.js} +37 -37
- package/dist/select-CGLm4HTg.cjs +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{separator-DWK3Xd7q.cjs → separator-CBuhe8MC.cjs} +1 -1
- package/dist/{separator-DISe3E9K.js → separator-DSnHDXVK.js} +5 -3
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +1 -1
- package/dist/sheet-BX5CahuG.cjs +1 -0
- package/dist/{sheet-BQy30PDl.js → sheet-C8A5eehq.js} +9 -9
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/skeleton-CkBeschm.cjs +1 -0
- package/dist/skeleton-vHQIKF2a.js +41 -0
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/slider-CZQBAXup.js +16 -0
- package/dist/slider-DdEOapYP.cjs +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-BidrZmnV.js → spinner-Bw6sQrNk.js} +2 -2
- package/dist/spinner-Cp218GAN.cjs +1 -0
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.js +1 -1
- package/dist/{stepper-C7g_AewR.js → stepper-BtlKiHtd.js} +27 -27
- package/dist/stepper-D5nDwJUz.cjs +1 -0
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.js +1 -1
- package/dist/styles.css +376 -297
- package/dist/switch-C7EBLT5H.js +9 -0
- package/dist/{switch-Bi_OIsAH.cjs → switch-KzBijHMJ.cjs} +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +1 -1
- package/dist/tabs-Bpm29QTI.cjs +1 -0
- package/dist/{tabs-D-T4lTOx.js → tabs-DNkc9RO6.js} +4 -4
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/time-input-BPoFvoeM.js +195 -0
- package/dist/time-input-DR2snTgB.cjs +1 -0
- package/dist/time-input.cjs +1 -1
- package/dist/time-input.js +1 -1
- package/dist/{toggle-BUmAdWrJ.cjs → toggle-Bvh1v32T.cjs} +1 -1
- package/dist/{toggle--M_Xcph3.js → toggle-Dv1VZ5Le.js} +15 -15
- package/dist/{toggle-group-CSWEdWiB.js → toggle-group-DE8BPZih.js} +21 -28
- package/dist/toggle-group-SyHMwO90.cjs +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tree-view-B6pPS7dg.cjs +1 -0
- package/dist/tree-view-BE4eOyRw.js +92 -0
- package/dist/tree-view.cjs +1 -1
- package/dist/tree-view.js +1 -1
- package/dist/use-controllable-state-COlF-tdU.js +23 -0
- package/dist/use-controllable-state-D1HvlFwL.cjs +1 -0
- package/dist/utils/compose-refs.d.ts +15 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/inject-stylesheet.d.ts +7 -0
- package/dist/utils/use-controllable-state.d.ts +19 -0
- package/package.json +13 -15
- package/dist/accordion-CXia5iw_.js +0 -28
- package/dist/action-popover-Cbn19EbH.cjs +0 -1
- package/dist/action-popover-eGNn1j7S.js +0 -22
- package/dist/avatar-BsiJB5zR.js +0 -134
- package/dist/avatar-Caw6wXQN.cjs +0 -1
- package/dist/badge-CnJpMnon.cjs +0 -1
- package/dist/banner-D64jTKV8.cjs +0 -1
- package/dist/button-CT6_HUIx.cjs +0 -1
- package/dist/calendar-BzinprHi.js +0 -272
- package/dist/calendar-DyIe52PQ.cjs +0 -66
- package/dist/carousel-D8FSc_tM.cjs +0 -1
- package/dist/carousel-UUulZiGR.js +0 -125
- package/dist/checkbox-group-B-mimaCX.js +0 -81
- package/dist/checkbox-group-iKPfMVTu.cjs +0 -1
- package/dist/code-block-CH0gswm8.cjs +0 -2
- package/dist/command-BWY863DY.cjs +0 -1
- package/dist/command-ButF6joJ.js +0 -99
- package/dist/components/header-navigation.d.ts +0 -18
- package/dist/components/timeline.d.ts +0 -34
- package/dist/context-menu-DQh1EvFX.cjs +0 -1
- package/dist/credit-card-input-BRv7r_Z_.cjs +0 -1
- package/dist/date-picker-DYsE7_v0.cjs +0 -1
- package/dist/date-picker-ioqGlU1x.js +0 -55
- package/dist/datetime-picker-BGa-aOfq.cjs +0 -1
- package/dist/datetime-picker-CRVKsoKc.js +0 -98
- package/dist/decimal-input-CtAZp5ka.cjs +0 -1
- package/dist/dialog-DAY0non_.js +0 -59
- package/dist/dialog-DaO5_1FE.cjs +0 -1
- package/dist/drawer-ChIEo1Vx.js +0 -161
- package/dist/drawer-DMmAzv-6.cjs +0 -1
- package/dist/dropdown-menu-CxRQEecr.cjs +0 -1
- package/dist/email-input-CiqmwAYT.cjs +0 -1
- package/dist/email-input-ZRXJoKUn.js +0 -29
- package/dist/file-input-BGTrB0cs.cjs +0 -1
- package/dist/file-input-BLs5K_r2.js +0 -227
- package/dist/footer-OvNxNb2K.cjs +0 -1
- package/dist/footer-hjSI-aUh.js +0 -117
- package/dist/form-label-5f53LEry.cjs +0 -1
- package/dist/form-label-Yt_CRHVE.js +0 -42
- package/dist/header-navigation-Kx7h7lMv.cjs +0 -1
- package/dist/header-navigation-_klqI2OP.js +0 -145
- package/dist/header-navigation.cjs +0 -1
- package/dist/header-navigation.d.ts +0 -1
- package/dist/header-navigation.js +0 -5
- package/dist/hover-card-B1c-blFU.js +0 -15
- package/dist/hover-card-DIvfJrUP.cjs +0 -1
- package/dist/input-CtFmiB4z.cjs +0 -1
- package/dist/input-otp-DK9DLJkj.cjs +0 -1
- package/dist/input-otp-aX3qLlEW.js +0 -88
- package/dist/media-CNlM4uDT.cjs +0 -1
- package/dist/media-ChW2bsnq.js +0 -158
- package/dist/menubar-BYX0L59g.cjs +0 -1
- package/dist/multi-select-C3VuEz8X.js +0 -70
- package/dist/multi-select-_DYPhuhp.cjs +0 -1
- package/dist/navigation-drawer-D--FbZEd.js +0 -155
- package/dist/navigation-drawer-WGKTRBl_.cjs +0 -1
- package/dist/navigation-menu-Cp5Qt84b.cjs +0 -1
- package/dist/navigation-menu-yQHp8kq5.js +0 -49
- package/dist/number-input-BdkF_YEo.js +0 -66
- package/dist/number-input-emzdVMCg.cjs +0 -1
- package/dist/pagination-BiEchkN6.cjs +0 -1
- package/dist/pagination-CohVWKa8.js +0 -136
- package/dist/password-input-CnkiwWVo.cjs +0 -1
- package/dist/password-input-DCg5E__k.js +0 -86
- package/dist/phone-input-Brm07Ltw.cjs +0 -1
- package/dist/phone-input-DFq6toxM.js +0 -51
- package/dist/popover-5z1it-o9.cjs +0 -1
- package/dist/radio-group-DMocn_bO.cjs +0 -1
- package/dist/radio-group-dLbtpuHm.js +0 -12
- package/dist/rich-text-B6Ogqw5B.cjs +0 -73
- package/dist/rich-text-DjthjUyA.js +0 -192
- package/dist/scroll-area-DZbd7b5b.cjs +0 -1
- package/dist/search-input-Dme1Kg69.cjs +0 -1
- package/dist/search-input-Dy6kVsR6.js +0 -193
- package/dist/select-VTNCKmzK.cjs +0 -1
- package/dist/sheet-DSAi4Blo.cjs +0 -1
- package/dist/skeleton-BPOckSeF.js +0 -8
- package/dist/skeleton-yXCPli60.cjs +0 -1
- package/dist/slider-Bjxl7b91.cjs +0 -1
- package/dist/slider-DXZyL3ev.js +0 -16
- package/dist/spinner-_aMavekm.cjs +0 -1
- package/dist/stepper-BtepQViL.cjs +0 -1
- package/dist/switch-wMC6HqKA.js +0 -9
- package/dist/tabs-BLFvzL-o.cjs +0 -1
- package/dist/test/setup.d.ts +0 -1
- package/dist/time-input-Dhhuxwh1.cjs +0 -1
- package/dist/time-input-DpukiDy9.js +0 -148
- package/dist/timeline-1iqp4rUU.js +0 -215
- package/dist/timeline-Dpeps0L2.cjs +0 -1
- package/dist/timeline.cjs +0 -1
- package/dist/timeline.d.ts +0 -1
- package/dist/timeline.js +0 -16
- package/dist/toggle-group-CUL20lLE.cjs +0 -1
- package/dist/tree-view-BuhJmfCg.js +0 -84
- package/dist/tree-view-DsrzJV2W.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
2
|
+
import { jsxs as R, jsx as f, Fragment as N } from "react/jsx-runtime";
|
|
3
|
+
import * as T from "react";
|
|
4
|
+
import * as U from "@stylexjs/stylex";
|
|
5
5
|
import y from "prismjs";
|
|
6
|
-
import { Check as
|
|
6
|
+
import { Check as P, Copy as M } from "lucide-react";
|
|
7
7
|
Prism.languages.javascript = Prism.languages.extend("clike", {
|
|
8
8
|
"class-name": [
|
|
9
9
|
Prism.languages.clike["class-name"],
|
|
@@ -141,54 +141,58 @@ Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "java
|
|
|
141
141
|
"javascript"
|
|
142
142
|
));
|
|
143
143
|
Prism.languages.js = Prism.languages.javascript;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
144
|
+
var O = {}, w;
|
|
145
|
+
function B() {
|
|
146
|
+
return w || (w = 1, (function(e) {
|
|
147
|
+
e.languages.typescript = e.languages.extend("javascript", {
|
|
148
|
+
"class-name": {
|
|
149
|
+
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
|
|
150
|
+
lookbehind: !0,
|
|
151
|
+
greedy: !0,
|
|
152
|
+
inside: null
|
|
153
|
+
// see below
|
|
154
|
+
},
|
|
155
|
+
builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
|
|
156
|
+
}), e.languages.typescript.keyword.push(
|
|
157
|
+
/\b(?:abstract|declare|is|keyof|readonly|require)\b/,
|
|
158
|
+
// keywords that have to be followed by an identifier
|
|
159
|
+
/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,
|
|
160
|
+
// This is for `import type *, {}`
|
|
161
|
+
/\btype\b(?=\s*(?:[\{*]|$))/
|
|
162
|
+
), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
|
|
163
|
+
var n = e.languages.extend("typescript", {});
|
|
164
|
+
delete n["class-name"], e.languages.typescript["class-name"].inside = n, e.languages.insertBefore("typescript", "function", {
|
|
165
|
+
decorator: {
|
|
166
|
+
pattern: /@[$\w\xA0-\uFFFF]+/,
|
|
167
|
+
inside: {
|
|
168
|
+
at: {
|
|
169
|
+
pattern: /^@/,
|
|
170
|
+
alias: "operator"
|
|
171
|
+
},
|
|
172
|
+
function: /^[\s\S]+/
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"generic-function": {
|
|
176
|
+
// e.g. foo<T extends "bar" | "baz">( ...
|
|
177
|
+
pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
|
|
178
|
+
greedy: !0,
|
|
179
|
+
inside: {
|
|
180
|
+
function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
|
|
181
|
+
generic: {
|
|
182
|
+
pattern: /<[\s\S]+/,
|
|
183
|
+
// everything after the first <
|
|
184
|
+
alias: "class-name",
|
|
185
|
+
inside: n
|
|
186
|
+
}
|
|
184
187
|
}
|
|
185
188
|
}
|
|
186
|
-
}
|
|
187
|
-
}),
|
|
188
|
-
}
|
|
189
|
+
}), e.languages.ts = e.languages.typescript;
|
|
190
|
+
})(Prism)), O;
|
|
191
|
+
}
|
|
192
|
+
B();
|
|
189
193
|
(function(e) {
|
|
190
194
|
var n = e.util.clone(e.languages.javascript), s = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, o = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, p = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
|
|
191
|
-
function
|
|
195
|
+
function E(r, u) {
|
|
192
196
|
return r = r.replace(/<S>/g, function() {
|
|
193
197
|
return s;
|
|
194
198
|
}).replace(/<BRACES>/g, function() {
|
|
@@ -197,17 +201,17 @@ Prism.languages.js = Prism.languages.javascript;
|
|
|
197
201
|
return p;
|
|
198
202
|
}), RegExp(r, u);
|
|
199
203
|
}
|
|
200
|
-
p =
|
|
204
|
+
p = E(p).source, e.languages.jsx = e.languages.extend("markup", n), e.languages.jsx.tag.pattern = E(
|
|
201
205
|
/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source
|
|
202
206
|
), e.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, e.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, e.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, e.languages.jsx.tag.inside.comment = n.comment, e.languages.insertBefore("inside", "attr-name", {
|
|
203
207
|
spread: {
|
|
204
|
-
pattern:
|
|
208
|
+
pattern: E(/<SPREAD>/.source),
|
|
205
209
|
inside: e.languages.jsx
|
|
206
210
|
}
|
|
207
211
|
}, e.languages.jsx.tag), e.languages.insertBefore("inside", "special-attr", {
|
|
208
212
|
script: {
|
|
209
213
|
// Allow for two levels of nesting
|
|
210
|
-
pattern:
|
|
214
|
+
pattern: E(/=<BRACES>/.source),
|
|
211
215
|
alias: "language-javascript",
|
|
212
216
|
inside: {
|
|
213
217
|
"script-punctuation": {
|
|
@@ -220,21 +224,21 @@ Prism.languages.js = Prism.languages.javascript;
|
|
|
220
224
|
}, e.languages.jsx.tag);
|
|
221
225
|
var i = function(r) {
|
|
222
226
|
return r ? typeof r == "string" ? r : typeof r.content == "string" ? r.content : r.content.map(i).join("") : "";
|
|
223
|
-
},
|
|
227
|
+
}, h = function(r) {
|
|
224
228
|
for (var u = [], a = 0; a < r.length; a++) {
|
|
225
|
-
var t = r[a],
|
|
229
|
+
var t = r[a], d = !1;
|
|
226
230
|
if (typeof t != "string" && (t.type === "tag" && t.content[0] && t.content[0].type === "tag" ? t.content[0].content[0].content === "</" ? u.length > 0 && u[u.length - 1].tagName === i(t.content[0].content[1]) && u.pop() : t.content[t.content.length - 1].content === "/>" || u.push({
|
|
227
231
|
tagName: i(t.content[0].content[1]),
|
|
228
232
|
openedBraces: 0
|
|
229
|
-
}) : u.length > 0 && t.type === "punctuation" && t.content === "{" ? u[u.length - 1].openedBraces++ : u.length > 0 && u[u.length - 1].openedBraces > 0 && t.type === "punctuation" && t.content === "}" ? u[u.length - 1].openedBraces-- :
|
|
233
|
+
}) : u.length > 0 && t.type === "punctuation" && t.content === "{" ? u[u.length - 1].openedBraces++ : u.length > 0 && u[u.length - 1].openedBraces > 0 && t.type === "punctuation" && t.content === "}" ? u[u.length - 1].openedBraces-- : d = !0), (d || typeof t == "string") && u.length > 0 && u[u.length - 1].openedBraces === 0) {
|
|
230
234
|
var l = i(t);
|
|
231
235
|
a < r.length - 1 && (typeof r[a + 1] == "string" || r[a + 1].type === "plain-text") && (l += i(r[a + 1]), r.splice(a + 1, 1)), a > 0 && (typeof r[a - 1] == "string" || r[a - 1].type === "plain-text") && (l = i(r[a - 1]) + l, r.splice(a - 1, 1), a--), r[a] = new e.Token("plain-text", l, null, l);
|
|
232
236
|
}
|
|
233
|
-
t.content && typeof t.content != "string" &&
|
|
237
|
+
t.content && typeof t.content != "string" && h(t.content);
|
|
234
238
|
}
|
|
235
239
|
};
|
|
236
240
|
e.hooks.add("after-tokenize", function(r) {
|
|
237
|
-
r.language !== "jsx" && r.language !== "tsx" ||
|
|
241
|
+
r.language !== "jsx" && r.language !== "tsx" || h(r.tokens);
|
|
238
242
|
});
|
|
239
243
|
})(Prism);
|
|
240
244
|
(function(e) {
|
|
@@ -538,187 +542,193 @@ Prism.languages.webmanifest = Prism.languages.json;
|
|
|
538
542
|
"operator",
|
|
539
543
|
"punctuation",
|
|
540
544
|
"number"
|
|
541
|
-
],
|
|
542
|
-
|
|
545
|
+
], E = o.variable[1].inside, i = 0; i < p.length; i++)
|
|
546
|
+
E[p[i]] = e.languages.bash[p[i]];
|
|
543
547
|
e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
|
|
544
548
|
})(Prism);
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
},
|
|
551
|
-
"string-interpolation": {
|
|
552
|
-
pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
|
|
553
|
-
greedy: !0,
|
|
554
|
-
inside: {
|
|
555
|
-
interpolation: {
|
|
556
|
-
// "{" <expression> <optional "!s", "!r", or "!a"> <optional ":" format specifier> "}"
|
|
557
|
-
pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
|
|
558
|
-
lookbehind: !0,
|
|
559
|
-
inside: {
|
|
560
|
-
"format-spec": {
|
|
561
|
-
pattern: /(:)[^:(){}]+(?=\}$)/,
|
|
562
|
-
lookbehind: !0
|
|
563
|
-
},
|
|
564
|
-
"conversion-option": {
|
|
565
|
-
pattern: //,
|
|
566
|
-
alias: "punctuation"
|
|
567
|
-
},
|
|
568
|
-
rest: null
|
|
569
|
-
}
|
|
570
|
-
},
|
|
571
|
-
string: /[\s\S]+/
|
|
572
|
-
}
|
|
573
|
-
},
|
|
574
|
-
"triple-quoted-string": {
|
|
575
|
-
pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
|
|
576
|
-
greedy: !0,
|
|
577
|
-
alias: "string"
|
|
578
|
-
},
|
|
579
|
-
string: {
|
|
580
|
-
pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
|
|
581
|
-
greedy: !0
|
|
582
|
-
},
|
|
583
|
-
function: {
|
|
584
|
-
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
|
|
585
|
-
lookbehind: !0
|
|
586
|
-
},
|
|
587
|
-
"class-name": {
|
|
588
|
-
pattern: /(\bclass\s+)\w+/i,
|
|
589
|
-
lookbehind: !0
|
|
590
|
-
},
|
|
591
|
-
decorator: {
|
|
592
|
-
pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
|
|
593
|
-
lookbehind: !0,
|
|
594
|
-
alias: ["annotation", "punctuation"],
|
|
595
|
-
inside: {
|
|
596
|
-
punctuation: /\./
|
|
597
|
-
}
|
|
598
|
-
},
|
|
599
|
-
keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
|
|
600
|
-
builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
|
|
601
|
-
boolean: /\b(?:False|None|True)\b/,
|
|
602
|
-
number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
|
|
603
|
-
operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
|
|
604
|
-
punctuation: /[{}[\];(),.:]/
|
|
605
|
-
};
|
|
606
|
-
Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python;
|
|
607
|
-
Prism.languages.py = Prism.languages.python;
|
|
608
|
-
(function(e) {
|
|
609
|
-
var n = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, s = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, o = {
|
|
610
|
-
pattern: RegExp(/(^|[^\w.])/.source + s + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
611
|
-
lookbehind: !0,
|
|
612
|
-
inside: {
|
|
613
|
-
namespace: {
|
|
614
|
-
pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
|
|
615
|
-
inside: {
|
|
616
|
-
punctuation: /\./
|
|
617
|
-
}
|
|
618
|
-
},
|
|
619
|
-
punctuation: /\./
|
|
620
|
-
}
|
|
621
|
-
};
|
|
622
|
-
e.languages.java = e.languages.extend("clike", {
|
|
623
|
-
string: {
|
|
624
|
-
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
|
|
549
|
+
var k = {}, F;
|
|
550
|
+
function G() {
|
|
551
|
+
return F || (F = 1, Prism.languages.python = {
|
|
552
|
+
comment: {
|
|
553
|
+
pattern: /(^|[^\\])#.*/,
|
|
625
554
|
lookbehind: !0,
|
|
626
555
|
greedy: !0
|
|
627
556
|
},
|
|
628
|
-
"
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
pattern: /(::\s*)[a-z_]\w*/,
|
|
650
|
-
lookbehind: !0
|
|
557
|
+
"string-interpolation": {
|
|
558
|
+
pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
|
|
559
|
+
greedy: !0,
|
|
560
|
+
inside: {
|
|
561
|
+
interpolation: {
|
|
562
|
+
// "{" <expression> <optional "!s", "!r", or "!a"> <optional ":" format specifier> "}"
|
|
563
|
+
pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
|
|
564
|
+
lookbehind: !0,
|
|
565
|
+
inside: {
|
|
566
|
+
"format-spec": {
|
|
567
|
+
pattern: /(:)[^:(){}]+(?=\}$)/,
|
|
568
|
+
lookbehind: !0
|
|
569
|
+
},
|
|
570
|
+
"conversion-option": {
|
|
571
|
+
pattern: //,
|
|
572
|
+
alias: "punctuation"
|
|
573
|
+
},
|
|
574
|
+
rest: null
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
string: /[\s\S]+/
|
|
651
578
|
}
|
|
652
|
-
],
|
|
653
|
-
number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
|
|
654
|
-
operator: {
|
|
655
|
-
pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
|
|
656
|
-
lookbehind: !0
|
|
657
579
|
},
|
|
658
|
-
constant: /\b[A-Z][A-Z_\d]+\b/
|
|
659
|
-
}), e.languages.insertBefore("java", "string", {
|
|
660
580
|
"triple-quoted-string": {
|
|
661
|
-
|
|
662
|
-
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
|
|
581
|
+
pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
|
|
663
582
|
greedy: !0,
|
|
664
583
|
alias: "string"
|
|
665
584
|
},
|
|
666
|
-
|
|
667
|
-
pattern: /'(?:\\.|[
|
|
585
|
+
string: {
|
|
586
|
+
pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
|
|
668
587
|
greedy: !0
|
|
669
|
-
}
|
|
670
|
-
}), e.languages.insertBefore("java", "class-name", {
|
|
671
|
-
annotation: {
|
|
672
|
-
pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
|
|
673
|
-
lookbehind: !0,
|
|
674
|
-
alias: "punctuation"
|
|
675
588
|
},
|
|
676
|
-
|
|
677
|
-
pattern:
|
|
589
|
+
function: {
|
|
590
|
+
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
|
|
591
|
+
lookbehind: !0
|
|
592
|
+
},
|
|
593
|
+
"class-name": {
|
|
594
|
+
pattern: /(\bclass\s+)\w+/i,
|
|
595
|
+
lookbehind: !0
|
|
596
|
+
},
|
|
597
|
+
decorator: {
|
|
598
|
+
pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
|
|
599
|
+
lookbehind: !0,
|
|
600
|
+
alias: ["annotation", "punctuation"],
|
|
678
601
|
inside: {
|
|
679
|
-
|
|
680
|
-
keyword: n,
|
|
681
|
-
punctuation: /[<>(),.:]/,
|
|
682
|
-
operator: /[?&|]/
|
|
602
|
+
punctuation: /\./
|
|
683
603
|
}
|
|
684
604
|
},
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
605
|
+
keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
|
|
606
|
+
builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
|
|
607
|
+
boolean: /\b(?:False|None|True)\b/,
|
|
608
|
+
number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
|
|
609
|
+
operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
|
|
610
|
+
punctuation: /[{}[\];(),.:]/
|
|
611
|
+
}, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python), k;
|
|
612
|
+
}
|
|
613
|
+
G();
|
|
614
|
+
var L = {}, _;
|
|
615
|
+
function H() {
|
|
616
|
+
return _ || (_ = 1, (function(e) {
|
|
617
|
+
var n = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, s = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, o = {
|
|
618
|
+
pattern: RegExp(/(^|[^\w.])/.source + s + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
619
|
+
lookbehind: !0,
|
|
620
|
+
inside: {
|
|
621
|
+
namespace: {
|
|
622
|
+
pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
|
|
623
|
+
inside: {
|
|
624
|
+
punctuation: /\./
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
punctuation: /\./
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
e.languages.java = e.languages.extend("clike", {
|
|
631
|
+
string: {
|
|
632
|
+
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
|
|
688
633
|
lookbehind: !0,
|
|
634
|
+
greedy: !0
|
|
635
|
+
},
|
|
636
|
+
"class-name": [
|
|
637
|
+
o,
|
|
638
|
+
{
|
|
639
|
+
// variables, parameters, and constructor references
|
|
640
|
+
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
641
|
+
pattern: RegExp(/(^|[^\w.])/.source + s + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),
|
|
642
|
+
lookbehind: !0,
|
|
643
|
+
inside: o.inside
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
// class names based on keyword
|
|
647
|
+
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
648
|
+
pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + s + /[A-Z]\w*\b/.source),
|
|
649
|
+
lookbehind: !0,
|
|
650
|
+
inside: o.inside
|
|
651
|
+
}
|
|
652
|
+
],
|
|
653
|
+
keyword: n,
|
|
654
|
+
function: [
|
|
655
|
+
e.languages.clike.function,
|
|
656
|
+
{
|
|
657
|
+
pattern: /(::\s*)[a-z_]\w*/,
|
|
658
|
+
lookbehind: !0
|
|
659
|
+
}
|
|
660
|
+
],
|
|
661
|
+
number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
|
|
662
|
+
operator: {
|
|
663
|
+
pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
|
|
664
|
+
lookbehind: !0
|
|
665
|
+
},
|
|
666
|
+
constant: /\b[A-Z][A-Z_\d]+\b/
|
|
667
|
+
}), e.languages.insertBefore("java", "string", {
|
|
668
|
+
"triple-quoted-string": {
|
|
669
|
+
// http://openjdk.java.net/jeps/355#Description
|
|
670
|
+
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
|
|
671
|
+
greedy: !0,
|
|
672
|
+
alias: "string"
|
|
673
|
+
},
|
|
674
|
+
char: {
|
|
675
|
+
pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
|
|
676
|
+
greedy: !0
|
|
677
|
+
}
|
|
678
|
+
}), e.languages.insertBefore("java", "class-name", {
|
|
679
|
+
annotation: {
|
|
680
|
+
pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
|
|
681
|
+
lookbehind: !0,
|
|
682
|
+
alias: "punctuation"
|
|
683
|
+
},
|
|
684
|
+
generics: {
|
|
685
|
+
pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
|
|
689
686
|
inside: {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
687
|
+
"class-name": o,
|
|
688
|
+
keyword: n,
|
|
689
|
+
punctuation: /[<>(),.:]/,
|
|
690
|
+
operator: /[?&|]/
|
|
694
691
|
}
|
|
695
692
|
},
|
|
696
|
-
|
|
697
|
-
|
|
693
|
+
import: [
|
|
694
|
+
{
|
|
695
|
+
pattern: RegExp(/(\bimport\s+)/.source + s + /(?:[A-Z]\w*|\*)(?=\s*;)/.source),
|
|
696
|
+
lookbehind: !0,
|
|
697
|
+
inside: {
|
|
698
|
+
namespace: o.inside.namespace,
|
|
699
|
+
punctuation: /\./,
|
|
700
|
+
operator: /\*/,
|
|
701
|
+
"class-name": /\w+/
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
pattern: RegExp(/(\bimport\s+static\s+)/.source + s + /(?:\w+|\*)(?=\s*;)/.source),
|
|
706
|
+
lookbehind: !0,
|
|
707
|
+
alias: "static",
|
|
708
|
+
inside: {
|
|
709
|
+
namespace: o.inside.namespace,
|
|
710
|
+
static: /\b\w+$/,
|
|
711
|
+
punctuation: /\./,
|
|
712
|
+
operator: /\*/,
|
|
713
|
+
"class-name": /\w+/
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
],
|
|
717
|
+
namespace: {
|
|
718
|
+
pattern: RegExp(
|
|
719
|
+
/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function() {
|
|
720
|
+
return n.source;
|
|
721
|
+
})
|
|
722
|
+
),
|
|
698
723
|
lookbehind: !0,
|
|
699
|
-
alias: "static",
|
|
700
724
|
inside: {
|
|
701
|
-
|
|
702
|
-
static: /\b\w+$/,
|
|
703
|
-
punctuation: /\./,
|
|
704
|
-
operator: /\*/,
|
|
705
|
-
"class-name": /\w+/
|
|
725
|
+
punctuation: /\./
|
|
706
726
|
}
|
|
707
727
|
}
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
return n.source;
|
|
713
|
-
})
|
|
714
|
-
),
|
|
715
|
-
lookbehind: !0,
|
|
716
|
-
inside: {
|
|
717
|
-
punctuation: /\./
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
|
-
})(Prism);
|
|
728
|
+
});
|
|
729
|
+
})(Prism)), L;
|
|
730
|
+
}
|
|
731
|
+
H();
|
|
722
732
|
Prism.languages.go = Prism.languages.extend("clike", {
|
|
723
733
|
string: {
|
|
724
734
|
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,
|
|
@@ -745,122 +755,126 @@ Prism.languages.insertBefore("go", "string", {
|
|
|
745
755
|
}
|
|
746
756
|
});
|
|
747
757
|
delete Prism.languages.go["class-name"];
|
|
748
|
-
|
|
749
|
-
|
|
758
|
+
var v = {}, C;
|
|
759
|
+
function z() {
|
|
760
|
+
return C || (C = 1, (function(e) {
|
|
761
|
+
for (var n = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, s = 0; s < 2; s++)
|
|
762
|
+
n = n.replace(/<self>/g, function() {
|
|
763
|
+
return n;
|
|
764
|
+
});
|
|
750
765
|
n = n.replace(/<self>/g, function() {
|
|
751
|
-
return
|
|
752
|
-
})
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
766
|
+
return /[^\s\S]/.source;
|
|
767
|
+
}), e.languages.rust = {
|
|
768
|
+
comment: [
|
|
769
|
+
{
|
|
770
|
+
pattern: RegExp(/(^|[^\\])/.source + n),
|
|
771
|
+
lookbehind: !0,
|
|
772
|
+
greedy: !0
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
pattern: /(^|[^\\:])\/\/.*/,
|
|
776
|
+
lookbehind: !0,
|
|
777
|
+
greedy: !0
|
|
778
|
+
}
|
|
779
|
+
],
|
|
780
|
+
string: {
|
|
781
|
+
pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,
|
|
760
782
|
greedy: !0
|
|
761
783
|
},
|
|
762
|
-
{
|
|
763
|
-
pattern: /(
|
|
764
|
-
lookbehind: !0,
|
|
784
|
+
char: {
|
|
785
|
+
pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,
|
|
765
786
|
greedy: !0
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
// see below
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
"lifetime-annotation": {
|
|
800
|
-
pattern: /'\w+/,
|
|
801
|
-
alias: "symbol"
|
|
802
|
-
},
|
|
803
|
-
"fragment-specifier": {
|
|
804
|
-
pattern: /(\$\w+:)[a-z]+/,
|
|
805
|
-
lookbehind: !0,
|
|
806
|
-
alias: "punctuation"
|
|
807
|
-
},
|
|
808
|
-
variable: /\$\w+/,
|
|
809
|
-
"function-definition": {
|
|
810
|
-
pattern: /(\bfn\s+)\w+/,
|
|
811
|
-
lookbehind: !0,
|
|
812
|
-
alias: "function"
|
|
813
|
-
},
|
|
814
|
-
"type-definition": {
|
|
815
|
-
pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/,
|
|
816
|
-
lookbehind: !0,
|
|
817
|
-
alias: "class-name"
|
|
818
|
-
},
|
|
819
|
-
"module-declaration": [
|
|
820
|
-
{
|
|
821
|
-
pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,
|
|
787
|
+
},
|
|
788
|
+
attribute: {
|
|
789
|
+
pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,
|
|
790
|
+
greedy: !0,
|
|
791
|
+
alias: "attr-name",
|
|
792
|
+
inside: {
|
|
793
|
+
string: null
|
|
794
|
+
// see below
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
// Closure params should not be confused with bitwise OR |
|
|
798
|
+
"closure-params": {
|
|
799
|
+
pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,
|
|
800
|
+
lookbehind: !0,
|
|
801
|
+
greedy: !0,
|
|
802
|
+
inside: {
|
|
803
|
+
"closure-punctuation": {
|
|
804
|
+
pattern: /^\||\|$/,
|
|
805
|
+
alias: "punctuation"
|
|
806
|
+
},
|
|
807
|
+
rest: null
|
|
808
|
+
// see below
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
"lifetime-annotation": {
|
|
812
|
+
pattern: /'\w+/,
|
|
813
|
+
alias: "symbol"
|
|
814
|
+
},
|
|
815
|
+
"fragment-specifier": {
|
|
816
|
+
pattern: /(\$\w+:)[a-z]+/,
|
|
822
817
|
lookbehind: !0,
|
|
823
|
-
alias: "
|
|
818
|
+
alias: "punctuation"
|
|
824
819
|
},
|
|
825
|
-
|
|
826
|
-
|
|
820
|
+
variable: /\$\w+/,
|
|
821
|
+
"function-definition": {
|
|
822
|
+
pattern: /(\bfn\s+)\w+/,
|
|
827
823
|
lookbehind: !0,
|
|
828
|
-
alias: "
|
|
824
|
+
alias: "function"
|
|
825
|
+
},
|
|
826
|
+
"type-definition": {
|
|
827
|
+
pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/,
|
|
828
|
+
lookbehind: !0,
|
|
829
|
+
alias: "class-name"
|
|
830
|
+
},
|
|
831
|
+
"module-declaration": [
|
|
832
|
+
{
|
|
833
|
+
pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,
|
|
834
|
+
lookbehind: !0,
|
|
835
|
+
alias: "namespace"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,
|
|
839
|
+
lookbehind: !0,
|
|
840
|
+
alias: "namespace",
|
|
841
|
+
inside: {
|
|
842
|
+
punctuation: /::/
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
],
|
|
846
|
+
keyword: [
|
|
847
|
+
// https://github.com/rust-lang/reference/blob/master/src/keywords.md
|
|
848
|
+
/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,
|
|
849
|
+
// primitives and str
|
|
850
|
+
// https://doc.rust-lang.org/stable/rust-by-example/primitives.html
|
|
851
|
+
/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/
|
|
852
|
+
],
|
|
853
|
+
// functions can technically start with an upper-case letter, but this will introduce a lot of false positives
|
|
854
|
+
// and Rust's naming conventions recommend snake_case anyway.
|
|
855
|
+
// https://doc.rust-lang.org/1.0.0/style/style/naming/README.html
|
|
856
|
+
function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,
|
|
857
|
+
macro: {
|
|
858
|
+
pattern: /\b\w+!/,
|
|
859
|
+
alias: "property"
|
|
860
|
+
},
|
|
861
|
+
constant: /\b[A-Z_][A-Z_\d]+\b/,
|
|
862
|
+
"class-name": /\b[A-Z]\w*\b/,
|
|
863
|
+
namespace: {
|
|
864
|
+
pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,
|
|
829
865
|
inside: {
|
|
830
866
|
punctuation: /::/
|
|
831
867
|
}
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
// and Rust's naming conventions recommend snake_case anyway.
|
|
843
|
-
// https://doc.rust-lang.org/1.0.0/style/style/naming/README.html
|
|
844
|
-
function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,
|
|
845
|
-
macro: {
|
|
846
|
-
pattern: /\b\w+!/,
|
|
847
|
-
alias: "property"
|
|
848
|
-
},
|
|
849
|
-
constant: /\b[A-Z_][A-Z_\d]+\b/,
|
|
850
|
-
"class-name": /\b[A-Z]\w*\b/,
|
|
851
|
-
namespace: {
|
|
852
|
-
pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,
|
|
853
|
-
inside: {
|
|
854
|
-
punctuation: /::/
|
|
855
|
-
}
|
|
856
|
-
},
|
|
857
|
-
// Hex, oct, bin, dec numbers with visual separators and type suffix
|
|
858
|
-
number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,
|
|
859
|
-
boolean: /\b(?:false|true)\b/,
|
|
860
|
-
punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
|
|
861
|
-
operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
|
|
862
|
-
}, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
|
|
863
|
-
})(Prism);
|
|
868
|
+
},
|
|
869
|
+
// Hex, oct, bin, dec numbers with visual separators and type suffix
|
|
870
|
+
number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,
|
|
871
|
+
boolean: /\b(?:false|true)\b/,
|
|
872
|
+
punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
|
|
873
|
+
operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
|
|
874
|
+
}, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
|
|
875
|
+
})(Prism)), v;
|
|
876
|
+
}
|
|
877
|
+
z();
|
|
864
878
|
Prism.languages.sql = {
|
|
865
879
|
comment: {
|
|
866
880
|
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
|
|
@@ -903,7 +917,7 @@ Prism.languages.sql = {
|
|
|
903
917
|
}
|
|
904
918
|
var o = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, p = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
|
|
905
919
|
return o;
|
|
906
|
-
}),
|
|
920
|
+
}), E = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
|
|
907
921
|
e.languages.markdown = e.languages.extend("markup", {}), e.languages.insertBefore("markdown", "prolog", {
|
|
908
922
|
"front-matter-block": {
|
|
909
923
|
pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
|
|
@@ -924,10 +938,10 @@ Prism.languages.sql = {
|
|
|
924
938
|
alias: "punctuation"
|
|
925
939
|
},
|
|
926
940
|
table: {
|
|
927
|
-
pattern: RegExp("^" + p +
|
|
941
|
+
pattern: RegExp("^" + p + E + "(?:" + p + ")*", "m"),
|
|
928
942
|
inside: {
|
|
929
943
|
"table-data-rows": {
|
|
930
|
-
pattern: RegExp("^(" + p +
|
|
944
|
+
pattern: RegExp("^(" + p + E + ")(?:" + p + ")*$"),
|
|
931
945
|
lookbehind: !0,
|
|
932
946
|
inside: {
|
|
933
947
|
"table-data": {
|
|
@@ -938,7 +952,7 @@ Prism.languages.sql = {
|
|
|
938
952
|
}
|
|
939
953
|
},
|
|
940
954
|
"table-line": {
|
|
941
|
-
pattern: RegExp("^(" + p + ")" +
|
|
955
|
+
pattern: RegExp("^(" + p + ")" + E + "$"),
|
|
942
956
|
lookbehind: !0,
|
|
943
957
|
inside: {
|
|
944
958
|
punctuation: /\||:?-{3,}:?/
|
|
@@ -1135,46 +1149,46 @@ Prism.languages.sql = {
|
|
|
1135
1149
|
}), e.hooks.add("after-tokenize", function(a) {
|
|
1136
1150
|
if (a.language !== "markdown" && a.language !== "md")
|
|
1137
1151
|
return;
|
|
1138
|
-
function t(
|
|
1139
|
-
if (!(!
|
|
1140
|
-
for (var l = 0, m =
|
|
1141
|
-
var
|
|
1142
|
-
if (
|
|
1143
|
-
t(
|
|
1152
|
+
function t(d) {
|
|
1153
|
+
if (!(!d || typeof d == "string"))
|
|
1154
|
+
for (var l = 0, m = d.length; l < m; l++) {
|
|
1155
|
+
var g = d[l];
|
|
1156
|
+
if (g.type !== "code") {
|
|
1157
|
+
t(g.content);
|
|
1144
1158
|
continue;
|
|
1145
1159
|
}
|
|
1146
|
-
var
|
|
1147
|
-
if (
|
|
1148
|
-
var S =
|
|
1160
|
+
var b = g.content[1], c = g.content[3];
|
|
1161
|
+
if (b && c && b.type === "code-language" && c.type === "code-block" && typeof b.content == "string") {
|
|
1162
|
+
var S = b.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
|
|
1149
1163
|
S = (/[a-z][\w-]*/i.exec(S) || [""])[0].toLowerCase();
|
|
1150
1164
|
var I = "language-" + S;
|
|
1151
|
-
|
|
1165
|
+
c.alias ? typeof c.alias == "string" ? c.alias = [c.alias, I] : c.alias.push(I) : c.alias = [I];
|
|
1152
1166
|
}
|
|
1153
1167
|
}
|
|
1154
1168
|
}
|
|
1155
1169
|
t(a.tokens);
|
|
1156
1170
|
}), e.hooks.add("wrap", function(a) {
|
|
1157
1171
|
if (a.type === "code-block") {
|
|
1158
|
-
for (var t = "",
|
|
1159
|
-
var m = a.classes[
|
|
1160
|
-
if (
|
|
1161
|
-
t =
|
|
1172
|
+
for (var t = "", d = 0, l = a.classes.length; d < l; d++) {
|
|
1173
|
+
var m = a.classes[d], g = /language-(.+)/.exec(m);
|
|
1174
|
+
if (g) {
|
|
1175
|
+
t = g[1];
|
|
1162
1176
|
break;
|
|
1163
1177
|
}
|
|
1164
1178
|
}
|
|
1165
|
-
var
|
|
1166
|
-
if (
|
|
1167
|
-
a.content = e.highlight(u(a.content),
|
|
1179
|
+
var b = e.languages[t];
|
|
1180
|
+
if (b)
|
|
1181
|
+
a.content = e.highlight(u(a.content), b, t);
|
|
1168
1182
|
else if (t && t !== "none" && e.plugins.autoloader) {
|
|
1169
|
-
var
|
|
1170
|
-
a.attributes.id =
|
|
1171
|
-
var S = document.getElementById(
|
|
1183
|
+
var c = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16);
|
|
1184
|
+
a.attributes.id = c, e.plugins.autoloader.loadLanguages(t, function() {
|
|
1185
|
+
var S = document.getElementById(c);
|
|
1172
1186
|
S && (S.innerHTML = e.highlight(S.textContent, e.languages[t], t));
|
|
1173
1187
|
});
|
|
1174
1188
|
}
|
|
1175
1189
|
}
|
|
1176
1190
|
});
|
|
1177
|
-
var i = RegExp(e.languages.markup.tag.pattern.source, "gi"),
|
|
1191
|
+
var i = RegExp(e.languages.markup.tag.pattern.source, "gi"), h = {
|
|
1178
1192
|
amp: "&",
|
|
1179
1193
|
lt: "<",
|
|
1180
1194
|
gt: ">",
|
|
@@ -1182,13 +1196,13 @@ Prism.languages.sql = {
|
|
|
1182
1196
|
}, r = String.fromCodePoint || String.fromCharCode;
|
|
1183
1197
|
function u(a) {
|
|
1184
1198
|
var t = a.replace(i, "");
|
|
1185
|
-
return t = t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(
|
|
1199
|
+
return t = t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(d, l) {
|
|
1186
1200
|
if (l = l.toLowerCase(), l[0] === "#") {
|
|
1187
1201
|
var m;
|
|
1188
1202
|
return l[1] === "x" ? m = parseInt(l.slice(2), 16) : m = Number(l.slice(1)), r(m);
|
|
1189
1203
|
} else {
|
|
1190
|
-
var
|
|
1191
|
-
return
|
|
1204
|
+
var g = h[l];
|
|
1205
|
+
return g || d;
|
|
1192
1206
|
}
|
|
1193
1207
|
}), t;
|
|
1194
1208
|
}
|
|
@@ -1197,13 +1211,13 @@ Prism.languages.sql = {
|
|
|
1197
1211
|
(function(e) {
|
|
1198
1212
|
var n = /[*&][^\s[\]{},]+/, s = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, o = "(?:" + s.source + "(?:[ ]+" + n.source + ")?|" + n.source + "(?:[ ]+" + s.source + ")?)", p = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
|
|
1199
1213
|
return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
|
|
1200
|
-
}),
|
|
1201
|
-
function i(
|
|
1214
|
+
}), E = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
|
|
1215
|
+
function i(h, r) {
|
|
1202
1216
|
r = (r || "").replace(/m/g, "") + "m";
|
|
1203
1217
|
var u = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
|
|
1204
1218
|
return o;
|
|
1205
1219
|
}).replace(/<<value>>/g, function() {
|
|
1206
|
-
return
|
|
1220
|
+
return h;
|
|
1207
1221
|
});
|
|
1208
1222
|
return RegExp(u, r);
|
|
1209
1223
|
}
|
|
@@ -1220,7 +1234,7 @@ Prism.languages.sql = {
|
|
|
1220
1234
|
pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
|
|
1221
1235
|
return o;
|
|
1222
1236
|
}).replace(/<<key>>/g, function() {
|
|
1223
|
-
return "(?:" + p + "|" +
|
|
1237
|
+
return "(?:" + p + "|" + E + ")";
|
|
1224
1238
|
})),
|
|
1225
1239
|
lookbehind: !0,
|
|
1226
1240
|
greedy: !0,
|
|
@@ -1247,7 +1261,7 @@ Prism.languages.sql = {
|
|
|
1247
1261
|
alias: "important"
|
|
1248
1262
|
},
|
|
1249
1263
|
string: {
|
|
1250
|
-
pattern: i(
|
|
1264
|
+
pattern: i(E),
|
|
1251
1265
|
lookbehind: !0,
|
|
1252
1266
|
greedy: !0
|
|
1253
1267
|
},
|
|
@@ -1260,69 +1274,76 @@ Prism.languages.sql = {
|
|
|
1260
1274
|
punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
|
|
1261
1275
|
}, e.languages.yml = e.languages.yaml;
|
|
1262
1276
|
})(Prism);
|
|
1263
|
-
const
|
|
1277
|
+
const j = T.forwardRef(({
|
|
1264
1278
|
code: e,
|
|
1265
1279
|
language: n = "text",
|
|
1266
1280
|
showLineNumbers: s = !1,
|
|
1267
1281
|
showCopyButton: o = !0,
|
|
1268
1282
|
filename: p,
|
|
1269
|
-
highlightLines:
|
|
1283
|
+
highlightLines: E = [],
|
|
1270
1284
|
languages: i,
|
|
1271
|
-
...
|
|
1285
|
+
...h
|
|
1272
1286
|
}, r) => {
|
|
1273
|
-
const [u, a] =
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1287
|
+
const [u, a] = T.useState(!1), [t, d] = T.useState(""), [l, m] = T.useState(0), g = T.useRef(null);
|
|
1288
|
+
T.useEffect(() => () => {
|
|
1289
|
+
g.current && clearTimeout(g.current);
|
|
1290
|
+
}, []);
|
|
1291
|
+
const b = i ? i[l].code : e, c = i ? i[l].language : n;
|
|
1292
|
+
T.useEffect(() => {
|
|
1293
|
+
if (c !== "text") {
|
|
1294
|
+
const A = y.languages[c];
|
|
1295
|
+
d(A ? y.highlight(b, A, c) : D(b));
|
|
1278
1296
|
} else
|
|
1279
|
-
|
|
1280
|
-
}, [
|
|
1281
|
-
const
|
|
1282
|
-
await navigator.clipboard.writeText(
|
|
1283
|
-
},
|
|
1284
|
-
`),
|
|
1285
|
-
return /* @__PURE__ */
|
|
1286
|
-
|
|
1287
|
-
/* @__PURE__ */
|
|
1297
|
+
d(D(b));
|
|
1298
|
+
}, [b, c]);
|
|
1299
|
+
const S = async () => {
|
|
1300
|
+
await navigator.clipboard.writeText(b), a(!0), g.current && clearTimeout(g.current), g.current = setTimeout(() => a(!1), 2e3);
|
|
1301
|
+
}, I = t.split(`
|
|
1302
|
+
`), $ = p || o || i && i.length > 1;
|
|
1303
|
+
return /* @__PURE__ */ R("div", { ref: r, ...h, className: "x1cqd74s xsdfdjn x9nsp9x x1y0btm7 xmkeg23 xa18zv3 x1eqnyfr x1n2onr6", children: [
|
|
1304
|
+
$ && /* @__PURE__ */ R("div", { className: "x6s0dn4 x1dyd9yc x1q0q8m5 xso031l x78zum5 xpfqfdi x1qughib xrtip4p x16pzmsl", children: [
|
|
1305
|
+
/* @__PURE__ */ R("div", { className: "x6s0dn4 x78zum5 xpfqfdi xw2csxc", children: [
|
|
1288
1306
|
p && /* @__PURE__ */ f("span", { className: "xwa5xuj x2lah0s x51wmvv", children: p }),
|
|
1289
|
-
i && i.length > 1 && /* @__PURE__ */ f("div", { className: "x6s0dn4 xtpsrvy x1brvnfc x78zum5 x1o29ju6 x2k5h2x", children: i.map((
|
|
1307
|
+
i && i.length > 1 && /* @__PURE__ */ f("div", { className: "x6s0dn4 xtpsrvy x1brvnfc x78zum5 x1o29ju6 x2k5h2x", children: i.map((A, x) => /* @__PURE__ */ f("button", { type: "button", onClick: () => m(x), ...{
|
|
1290
1308
|
0: {
|
|
1291
1309
|
className: "xc342km x1kcekj6 x1ypdohk x51wmvv xk50ysn x14aypoh x1wu0y3b xx6bhzk x1yyhn7k xwji4o3 xjbqb8w x1uuraw0 x1leyzdx"
|
|
1292
1310
|
},
|
|
1293
1311
|
1: {
|
|
1294
1312
|
className: "xc342km x1kcekj6 x1ypdohk x51wmvv xk50ysn x14aypoh x1wu0y3b xx6bhzk x1yyhn7k xwji4o3 x11tn5dx xv186zg x1vmo3ik"
|
|
1295
1313
|
}
|
|
1296
|
-
}[(x === l) << 0], children:
|
|
1314
|
+
}[(x === l) << 0], children: A.label ?? A.language }, A.language + x)) })
|
|
1297
1315
|
] }),
|
|
1298
|
-
o && /* @__PURE__ */ f("button", { type: "button", onClick:
|
|
1299
|
-
/* @__PURE__ */ f(
|
|
1316
|
+
o && /* @__PURE__ */ f("button", { type: "button", onClick: S, className: "x6s0dn4 xjbqb8w x1kcekj6 xc342km x1uuraw0 x1ypdohk x78zum5 x2lah0s x51wmvv x1o29ju6 x8x9d4c x136oad8 x1wu0y3b x3wwfir x1leyzdx", children: u ? /* @__PURE__ */ R(N, { children: [
|
|
1317
|
+
/* @__PURE__ */ f(P, { "aria-hidden": "true", className: "x1kpxq89 xsmyaan" }),
|
|
1300
1318
|
"Copied"
|
|
1301
|
-
] }) : /* @__PURE__ */
|
|
1302
|
-
/* @__PURE__ */ f(
|
|
1319
|
+
] }) : /* @__PURE__ */ R(N, { children: [
|
|
1320
|
+
/* @__PURE__ */ f(M, { "aria-hidden": "true", className: "x1kpxq89 xsmyaan" }),
|
|
1303
1321
|
"Copy"
|
|
1304
1322
|
] }) })
|
|
1305
1323
|
] }),
|
|
1306
|
-
/* @__PURE__ */ f("div", { className: "xw2csxc x11omchh", children: /* @__PURE__ */ f("pre", { className: `${
|
|
1324
|
+
/* @__PURE__ */ f("div", { className: "xw2csxc x11omchh", children: /* @__PURE__ */ f("pre", { className: `${Y(q.pre)} language-${c}`, children: /* @__PURE__ */ f("code", { className: `language-${c}`, children: I.map((A, x) => /* @__PURE__ */ R("div", { ...{
|
|
1307
1325
|
0: {
|
|
1308
1326
|
className: "x17mssa0"
|
|
1309
1327
|
},
|
|
1310
1328
|
1: {
|
|
1311
1329
|
className: "x17mssa0 xy8psvg xxucxnl x16pzmsl"
|
|
1312
1330
|
}
|
|
1313
|
-
}[!!
|
|
1331
|
+
}[!!E.includes(x + 1) << 0], children: [
|
|
1314
1332
|
s && /* @__PURE__ */ f("span", { className: "xwa5xuj x1rg5ohu xdmqks8 x1hr2gdg x87ps6o xooyq8t", children: x + 1 }),
|
|
1315
1333
|
/* @__PURE__ */ f("span", { dangerouslySetInnerHTML: {
|
|
1316
|
-
__html:
|
|
1334
|
+
__html: A || " "
|
|
1317
1335
|
} })
|
|
1318
1336
|
] }, x)) }) }) })
|
|
1319
1337
|
] });
|
|
1320
1338
|
});
|
|
1321
|
-
|
|
1322
|
-
function
|
|
1323
|
-
return
|
|
1339
|
+
j.displayName = "CodeBlock";
|
|
1340
|
+
function Y(...e) {
|
|
1341
|
+
return U.props(...e).className ?? "";
|
|
1342
|
+
}
|
|
1343
|
+
function D(e) {
|
|
1344
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1324
1345
|
}
|
|
1325
|
-
const
|
|
1346
|
+
const q = {
|
|
1326
1347
|
pre: {
|
|
1327
1348
|
kMv6JI: "xpw0y0u",
|
|
1328
1349
|
kGuDYH: "x1eqnyfr",
|
|
@@ -1331,5 +1352,5 @@ const _ = {
|
|
|
1331
1352
|
}
|
|
1332
1353
|
};
|
|
1333
1354
|
export {
|
|
1334
|
-
|
|
1355
|
+
j as C
|
|
1335
1356
|
};
|