@aussieljk/forkbook 0.0.1-2 → 0.0.1-20
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 +1 -1
- package/README.md +35 -53
- package/assets/addon-vitest/templates/vitest.config.4.template.ts +2 -2
- package/assets/browser/favicon-wrapper.svg +4 -4
- package/assets/browser/favicon.svg +1 -1
- package/assets/browser/inter-LICENSE.txt +92 -0
- package/assets/browser/inter-variable-italic.woff2 +0 -0
- package/assets/browser/inter-variable.woff2 +0 -0
- package/assets/browser/mirror-ball.png +0 -0
- package/assets/builder-vite/iframe.html +8 -24
- package/assets/create/rendererAssets/common/Configure.mdx +100 -100
- package/assets/create/rendererAssets/common/button.css +7 -7
- package/assets/create/rendererAssets/common/header.css +6 -6
- package/assets/create/rendererAssets/common/page.css +12 -12
- package/assets/create/templates/react-native/index.expo.js +4 -4
- package/assets/create/templates/react-native/index.js +5 -5
- package/assets/server/base-preview-body.html +32 -32
- package/assets/server/base-preview-head.html +86 -86
- package/assets/server/template.ejs +31 -26
- package/dist/_browser-chunks/{Color-PCLE2J36.js → Color-KALNKPOV.js} +8 -8
- package/dist/_browser-chunks/{DocsRenderer-JXND3PVQ.js → DocsRenderer-DKXSW2OY.js} +2 -2
- package/dist/_browser-chunks/WithTooltip-66AWY4VQ.js +199 -0
- package/dist/_browser-chunks/{chunk-RBCHTR7C.js → chunk-2ELGJRFZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-PFRNG3UC.js → chunk-2WZWS7GJ.js} +5 -5
- package/dist/_browser-chunks/{chunk-52CW7FF7.js → chunk-3QNZOMD7.js} +8 -3
- package/dist/_browser-chunks/{chunk-LV5PIKV4.js → chunk-3QPZOXB7.js} +6 -8
- package/dist/_browser-chunks/{chunk-ODVJ3XZJ.js → chunk-4BOJAE7P.js} +14 -10
- package/dist/_browser-chunks/{chunk-2MEPHP35.js → chunk-4KIQBRD2.js} +1 -1
- package/dist/_browser-chunks/chunk-4ZGQ4YQ2.js +20 -0
- package/dist/_browser-chunks/chunk-6AKCRYVX.js +6 -0
- package/dist/_browser-chunks/{chunk-W5M6NPS3.js → chunk-6SL45YM3.js} +15 -18
- package/dist/_browser-chunks/{chunk-2SCZVUKW.js → chunk-AN2LJG5I.js} +1 -1
- package/dist/_browser-chunks/{chunk-P6PK47TQ.js → chunk-BLCZ3C5M.js} +48 -83
- package/dist/_browser-chunks/{chunk-RSPAQWVJ.js → chunk-BNP234B4.js} +1 -1
- package/dist/_browser-chunks/{chunk-JYVGARBG.js → chunk-CX37N6FG.js} +770 -720
- package/dist/_browser-chunks/{chunk-JSBKXXXF.js → chunk-DHTLVXAL.js} +38 -45
- package/dist/_browser-chunks/{chunk-GNZY6LOW.js → chunk-DISGPOF4.js} +54 -51
- package/dist/_browser-chunks/chunk-DNJ3OSLB.js +6021 -0
- package/dist/_browser-chunks/{chunk-6SXYJQST.js → chunk-E6QKKKLO.js} +21 -6
- package/dist/_browser-chunks/{chunk-FJGWSWL5.js → chunk-EBSOKHFG.js} +10 -4
- package/dist/_browser-chunks/{chunk-CFAOWGL7.js → chunk-ECMVTOVD.js} +1 -1
- package/dist/_browser-chunks/{chunk-CFWWCCZV.js → chunk-ENHFQXYS.js} +9 -7
- package/dist/_browser-chunks/{chunk-YTIT5NA5.js → chunk-EW2M3URL.js} +91 -84
- package/dist/_browser-chunks/{chunk-MFMDGWP6.js → chunk-FCULT3AE.js} +3 -3
- package/dist/_browser-chunks/{chunk-46Z7NGAS.js → chunk-HX443LKV.js} +1 -1
- package/dist/_browser-chunks/chunk-HZFHNYRC.js +53 -0
- package/dist/_browser-chunks/chunk-IFADVEQE.js +669 -0
- package/dist/_browser-chunks/{chunk-OQWFVDIN.js → chunk-KQJ4T6JL.js} +31 -25
- package/dist/_browser-chunks/{chunk-RNTIV5CE.js → chunk-LYYXDWR2.js} +9 -9
- package/dist/_browser-chunks/{chunk-V5M7Q4HT.js → chunk-MJIDTL3X.js} +4 -14
- package/dist/_browser-chunks/{chunk-V2G23FV7.js → chunk-N5WQGLI7.js} +1 -1
- package/dist/_browser-chunks/{chunk-EIYAKDGP.js → chunk-NA4ITZTK.js} +127 -105
- package/dist/_browser-chunks/{chunk-RMYQ3QN3.js → chunk-NK5SGJNG.js} +22 -17
- package/dist/_browser-chunks/chunk-NPNIBOPF.js +18 -0
- package/dist/_browser-chunks/{chunk-YEKO6BHJ.js → chunk-ONTSNQON.js} +1 -1
- package/dist/_browser-chunks/chunk-OOETBSA7.js +502 -0
- package/dist/_browser-chunks/{chunk-KQ7CRO2B.js → chunk-OWWV6YG7.js} +12 -12
- package/dist/_browser-chunks/chunk-PFYL47RM.js +45 -0
- package/dist/_browser-chunks/{chunk-OD6IBQCC.js → chunk-PQRPDA4U.js} +5 -5
- package/dist/_browser-chunks/{chunk-2JDQ35OA.js → chunk-PU7D2WDP.js} +0 -11
- package/dist/_browser-chunks/chunk-PZQRXPVR.js +21 -0
- package/dist/_browser-chunks/{chunk-5WMXI5GW.js → chunk-QFO2B4X2.js} +31 -28
- package/dist/_browser-chunks/{chunk-2JT76G3E.js → chunk-SBOQ4QPY.js} +15 -15
- package/dist/_browser-chunks/{chunk-C3D4HEFY.js → chunk-TRXLBGLS.js} +344 -166
- package/dist/_browser-chunks/{chunk-ZTQ5MEJ5.js → chunk-UMGDO2ZM.js} +3 -37
- package/dist/_browser-chunks/{chunk-5I7E4GMO.js → chunk-WY2LUGOH.js} +1 -1
- package/dist/_browser-chunks/chunk-XKTORVEQ.js +255 -0
- package/dist/_browser-chunks/chunk-XSVERCGB.js +91 -0
- package/dist/_browser-chunks/{chunk-FVSEPWWX.js → chunk-XTQCLWVH.js} +325 -1635
- package/dist/_browser-chunks/{chunk-MDOL7KML.js → chunk-YJO5BK52.js} +7 -3
- package/dist/_browser-chunks/{chunk-66OCZ54D.js → chunk-ZF37BMDS.js} +6 -2
- package/dist/_browser-chunks/{matchers-YLBYSYAF.js → matchers-2HVLNCVO.js} +4 -4
- package/dist/_browser-chunks/{react-dom-client-4OHE3QDV.js → react-dom-client-SLBUX3U3.js} +1 -1
- package/dist/_node-chunks/{attached-runtime-I2G4WLJI.js → attached-runtime-YD6HKC4B.js} +33 -31
- package/dist/_node-chunks/builder-manager-UNJGYVTD.js +1176 -0
- package/dist/_node-chunks/chunk-25A7444H.js +47 -0
- package/dist/_node-chunks/{chunk-U5W53R2J.js → chunk-2CNN3CRI.js} +506 -494
- package/dist/_node-chunks/{chunk-VLOXOXXE.js → chunk-2GA4VQCS.js} +9 -9
- package/dist/_node-chunks/{chunk-YZFWBA5L.js → chunk-2VJHCGAK.js} +368 -321
- package/dist/_node-chunks/{chunk-FK7KGTV7.js → chunk-33I6AQU7.js} +7 -7
- package/dist/_node-chunks/{chunk-6YKBRP72.js → chunk-3CQI3JH5.js} +6 -6
- package/dist/_node-chunks/{chunk-IK4FGZLR.js → chunk-3ZOSFS7G.js} +6 -6
- package/dist/_node-chunks/{chunk-DUR55DJJ.js → chunk-4BE3LRIQ.js} +86 -67
- package/dist/_node-chunks/{chunk-Q7QNUM5H.js → chunk-5LFJQCYN.js} +6 -6
- package/dist/_node-chunks/{chunk-3Y6AAY5H.js → chunk-65X3MXFT.js} +8 -8
- package/dist/_node-chunks/chunk-6FWJWEAG.js +52 -0
- package/dist/_node-chunks/{chunk-UVINFLGY.js → chunk-6NLQCV6A.js} +7 -7
- package/dist/_node-chunks/{chunk-KISMCCP5.js → chunk-6OQKMJJA.js} +474 -479
- package/dist/_node-chunks/{chunk-XLP2ZKXV.js → chunk-6RYD6ENB.js} +7 -7
- package/dist/_node-chunks/{chunk-V2DY426G.js → chunk-75TTPKEA.js} +283 -306
- package/dist/_node-chunks/{chunk-3W7F2B7P.js → chunk-7CWDZLIZ.js} +6 -6
- package/dist/_node-chunks/{chunk-FPZB5OI7.js → chunk-7M3TOE4F.js} +6 -6
- package/dist/_node-chunks/{chunk-DC7DKR5K.js → chunk-AGLGQNTY.js} +6 -6
- package/dist/_node-chunks/{chunk-NIBT7XDZ.js → chunk-AOYLA323.js} +9 -6
- package/dist/_node-chunks/{chunk-RRN2V55B.js → chunk-AP4HJ3I3.js} +7 -7
- package/dist/_node-chunks/chunk-AVHJZUTH.js +2613 -0
- package/dist/_node-chunks/{chunk-H32DYT6P.js → chunk-B2EEX2SZ.js} +6 -6
- package/dist/_node-chunks/chunk-CGVVOUBC.js +18 -0
- package/dist/_node-chunks/{chunk-B5J7Q7J4.js → chunk-CJDYU653.js} +6 -6
- package/dist/_node-chunks/{chunk-XHL2LVBM.js → chunk-CPDP5SQS.js} +14 -16
- package/dist/_node-chunks/{chunk-LO56I6E2.js → chunk-DAYTIH6Z.js} +10 -10
- package/dist/_node-chunks/{chunk-FW2HQUBQ.js → chunk-DO3CPQAZ.js} +6 -6
- package/dist/_node-chunks/chunk-DQEUNKLX.js +347 -0
- package/dist/_node-chunks/{chunk-BS2WMZMR.js → chunk-EFCBUWOB.js} +7 -7
- package/dist/_node-chunks/{chunk-OWNFOGTA.js → chunk-EG2WLN5V.js} +7 -7
- package/dist/_node-chunks/{chunk-LCK4ZQKG.js → chunk-EKYNX5NX.js} +9 -9
- package/dist/_node-chunks/{chunk-TNJIXE37.js → chunk-F762PHMI.js} +6 -6
- package/dist/_node-chunks/{chunk-ET7PWEO7.js → chunk-FC3V4KZO.js} +14 -13
- package/dist/_node-chunks/chunk-FXW52X4U.js +281 -0
- package/dist/_node-chunks/{chunk-TD5PLLQG.js → chunk-GEJBTN76.js} +62 -7
- package/dist/_node-chunks/chunk-GFEH7IBP.js +620 -0
- package/dist/_node-chunks/{chunk-TWI4GVH7.js → chunk-GWT4HQZU.js} +6 -6
- package/dist/_node-chunks/{chunk-4FEANXWU.js → chunk-HHM5X5RQ.js} +140 -118
- package/dist/_node-chunks/{chunk-MA24JW6C.js → chunk-IBLUURAJ.js} +25 -8
- package/dist/_node-chunks/{chunk-2BUPBPFB.js → chunk-IENHXJVB.js} +7 -7
- package/dist/_node-chunks/{chunk-EWOX7HPJ.js → chunk-IIGBIVK3.js} +6 -6
- package/dist/_node-chunks/{chunk-XGIUVY52.js → chunk-J6FGP2VM.js} +7 -7
- package/dist/_node-chunks/chunk-JOX7OETB.js +534 -0
- package/dist/_node-chunks/{chunk-RXNJDRGO.js → chunk-JR7ZCQ77.js} +21 -25
- package/dist/_node-chunks/{chunk-OISX4AGQ.js → chunk-JXZONVHW.js} +37 -31
- package/dist/_node-chunks/{chunk-34EO2PUT.js → chunk-KAALBGRE.js} +6 -6
- package/dist/_node-chunks/{chunk-SLWQNBGO.js → chunk-L52VGA36.js} +34 -949
- package/dist/_node-chunks/chunk-LAJIVWUF.js +497 -0
- package/dist/_node-chunks/{chunk-JGGFYIG5.js → chunk-LCNF6BLP.js} +7 -7
- package/dist/_node-chunks/chunk-LGHTKFSF.js +405 -0
- package/dist/_node-chunks/{chunk-WCULS5TP.js → chunk-LNGSV5UI.js} +7 -7
- package/dist/_node-chunks/{chunk-HMP2G23X.js → chunk-MC4BFUVH.js} +6 -6
- package/dist/_node-chunks/{chunk-SWO5CDYU.js → chunk-MWKSSYPG.js} +8 -8
- package/dist/_node-chunks/{chunk-2DSIDINN.js → chunk-N25CZ3RC.js} +650 -9
- package/dist/_node-chunks/{chunk-WZJF2OUH.js → chunk-N4LNGTYL.js} +7 -7
- package/dist/_node-chunks/{chunk-XI6B6P47.js → chunk-N5WU4BEY.js} +6 -6
- package/dist/_node-chunks/{chunk-TINO74G5.js → chunk-NRXCMSAI.js} +6 -6
- package/dist/_node-chunks/{chunk-E6YESGLX.js → chunk-NZWK62R5.js} +542 -1049
- package/dist/_node-chunks/{chunk-DHJFTB4K.js → chunk-OBPVOYJA.js} +7 -7
- package/dist/_node-chunks/{chunk-6KEHV53S.js → chunk-OMMQME7G.js} +33 -41
- package/dist/_node-chunks/chunk-PJRPETSU.js +62 -0
- package/dist/_node-chunks/{chunk-7GUDZVRQ.js → chunk-QDVIQG3B.js} +6 -6
- package/dist/_node-chunks/{chunk-OUW6R7C3.js → chunk-QEYWG5C7.js} +6 -6
- package/dist/_node-chunks/{chunk-GRBLDJCR.js → chunk-QQNRWEHL.js} +132 -149
- package/dist/_node-chunks/{chunk-EHUNOMDD.js → chunk-RAIWLNFA.js} +29849 -51588
- package/dist/_node-chunks/{chunk-JZOO7GGC.js → chunk-S7RGKBGT.js} +6 -6
- package/dist/_node-chunks/{chunk-GEFQN7K3.js → chunk-SFXFL4TP.js} +8 -8
- package/dist/_node-chunks/{chunk-JDXXX6LB.js → chunk-SPAHK37C.js} +6 -6
- package/dist/_node-chunks/chunk-SUQ4OM7Y.js +49 -0
- package/dist/_node-chunks/chunk-U54Q3F7E.js +20 -0
- package/dist/_node-chunks/{chunk-RWFIFGO5.js → chunk-UZH2V3WY.js} +8 -8
- package/dist/_node-chunks/{chunk-SVTBJ7Q3.js → chunk-VIMGLCNZ.js} +6 -6
- package/dist/_node-chunks/{chunk-BSKFCWQD.js → chunk-VNZF62KE.js} +7 -7
- package/dist/_node-chunks/{chunk-CCOTJ4FC.js → chunk-VPFU5CEP.js} +10 -10
- package/dist/_node-chunks/{chunk-RZMQ7S3L.js → chunk-VYCVBW5Q.js} +8 -8
- package/dist/_node-chunks/{chunk-ICPBH3E7.js → chunk-WDANLGYN.js} +7 -7
- package/dist/_node-chunks/{chunk-UMUBKI6E.js → chunk-WMZJ2WK4.js} +96 -177
- package/dist/_node-chunks/{chunk-LXBD4UL4.js → chunk-WTPHQ2NG.js} +8 -8
- package/dist/_node-chunks/chunk-WYCITRIE.js +11 -0
- package/dist/_node-chunks/chunk-WYRBOMQF.js +137 -0
- package/dist/_node-chunks/{chunk-ZWBCQ4MJ.js → chunk-WZBMPROH.js} +9 -17
- package/dist/_node-chunks/{chunk-CXRU72ET.js → chunk-X2GGQZIN.js} +6 -6
- package/dist/_node-chunks/chunk-X6OGIC2G.js +28 -0
- package/dist/_node-chunks/{chunk-42UWAGPW.js → chunk-XF7H5GZM.js} +52 -22
- package/dist/_node-chunks/{chunk-WNZ2UMFM.js → chunk-XUZB4FIX.js} +15 -9
- package/dist/_node-chunks/{chunk-3SDUYDXH.js → chunk-XVSUIOZA.js} +7 -7
- package/dist/_node-chunks/{chunk-TFEWM4E3.js → chunk-Z665R6AF.js} +75 -75
- package/dist/_node-chunks/{chunk-H4PPVMP5.js → chunk-ZEYZWDOS.js} +6 -6
- package/dist/_node-chunks/{chunk-UBOGWBEA.js → chunk-ZHRCL7PG.js} +10 -10
- package/dist/_node-chunks/chunk-ZLC4JSBV.js +25 -0
- package/dist/_node-chunks/{chunk-F3ZFKBHY.js → chunk-ZN6YOIB2.js} +8 -8
- package/dist/_node-chunks/{chunk-YCMRA6RX.js → chunk-ZX32M4O7.js} +7 -7
- package/dist/_node-chunks/{chunk-NDWKJ4CL.js → chunk-ZZ5XMIGW.js} +97 -111
- package/dist/_node-chunks/dist-HBFOS25E.js +16 -0
- package/dist/_node-chunks/dist-Q2XNFC24.js +27 -0
- package/dist/_node-chunks/{local-runtime-NTKIN2QT.js → local-runtime-4ETW6QTI.js} +19 -20
- package/dist/_node-chunks/{mdx-plugin-MWISDWDQ.js → mdx-plugin-OOYTYMVU.js} +2263 -130
- package/dist/_node-chunks/{monorepo-LIRFMQXE.js → monorepo-3AWUYNFD.js} +12 -12
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-CPDW4XTW.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-ORY3BAP5.js} +12 -12
- package/dist/_node-chunks/optimized-tests-DOKSUJAM.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-EKHIUAU2.js → pattern-copy-play-AY4DE7ME.js} +12 -12
- package/dist/_node-chunks/postinstallAddon-L46G75CD.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-BUN3HUCO.js → rehype-external-links-FGVC633L.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-PLADX223.js → rehype-slug-2AZLMC5G.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-GBHW6KIQ.js → relaxed-limits-QI3YR6CU.js} +12 -12
- package/dist/_node-chunks/{run-NL66VTNR.js → run-QJJ4FOF3.js} +281 -19
- package/dist/_node-chunks/{run-KDTIZNSY.js → run-WFJZYNZN.js} +18 -18
- package/dist/_node-chunks/{setup-MGC7BQO6.js → setup-V5CRAJMV.js} +9 -9
- package/dist/_node-chunks/{vitest.config.4.template-JH2THZFG.js → vitest.config.4.template-LECBBF3L.js} +9 -9
- package/dist/actions/decorator.js +18 -22
- package/dist/actions/index.d.ts +4 -4
- package/dist/actions/index.js +3 -2
- package/dist/addon-a11y/index.d.ts +3 -3
- package/dist/addon-a11y/index.js +3 -2
- package/dist/addon-a11y/manager.js +41 -38
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.d.ts +8 -2
- package/dist/addon-a11y/preview.js +3 -2
- package/dist/addon-comments/manager.js +353 -0
- package/dist/addon-comments/preset.js +52 -0
- package/dist/addon-comments/preview.js +101 -0
- package/dist/addon-docs/blocks.d.ts +123 -85
- package/dist/addon-docs/blocks.js +159 -85
- package/dist/addon-docs/index.d.ts +21 -21
- package/dist/addon-docs/index.js +3 -3
- package/dist/addon-docs/manager.js +6 -6
- package/dist/addon-docs/preset.js +12 -12
- package/dist/addon-docs/preview.d.ts +3 -1
- package/dist/addon-docs/preview.js +1 -1
- package/dist/addon-links/index.d.ts +2 -1
- package/dist/addon-links/index.js +5 -2
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-links/preview.js +5 -2
- package/dist/addon-links/react/index.js +4 -1
- package/dist/addon-mcp/preset.js +176 -57
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +70 -70
- package/dist/addon-ondevice-actions/index.js +5 -1
- package/dist/addon-ondevice-actions/register.js +5 -1
- package/dist/addon-ondevice-controls/index.js +1 -1
- package/dist/addon-ondevice-controls/register.js +1 -1
- package/dist/addon-pseudo-states/index.d.ts +1 -1
- package/dist/addon-pseudo-states/index.js +1 -1
- package/dist/addon-pseudo-states/manager.js +2 -2
- package/dist/addon-pseudo-states/preview.d.ts +1 -1
- package/dist/addon-pseudo-states/preview.js +1 -1
- package/dist/addon-themes/index.d.ts +7 -6
- package/dist/addon-themes/index.js +2 -2
- package/dist/addon-themes/manager.js +4 -4
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-themes/preview.js +2 -2
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +32 -23
- package/dist/addon-vitest/node/coverage-reporter.js +11 -11
- package/dist/addon-vitest/node/vitest.js +35 -35
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +22 -22
- package/dist/addon-vitest/vitest-plugin/global-setup.js +22 -22
- package/dist/addon-vitest/vitest-plugin/index.js +78 -68
- package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +3 -3
- package/dist/addon-vitest/vitest-plugin/setup-file.js +1 -1
- package/dist/babel/index.d.ts +241 -995
- package/dist/babel/index.js +13 -19
- package/dist/backgrounds/index.d.ts +1 -1
- package/dist/bin/core.js +118 -95
- package/dist/bin/dispatcher.js +18 -16
- package/dist/bin/loader.js +17 -16
- package/dist/builder-next/index.d.ts +59 -0
- package/dist/builder-next/index.js +201 -0
- package/dist/builder-vite/index.d.ts +8 -3
- package/dist/builder-vite/index.js +80 -25
- package/dist/builder-vite/preset.js +13 -13
- package/dist/channels/index.d.ts +3 -2
- package/dist/channels/index.js +97 -24
- package/dist/{chunk-Dr3R0DXk.d.ts → chunk-B-NVyPqN.d.ts} +2 -2
- package/dist/{chunk-DoIGKY33.d.ts → chunk-BLZXEm1K.d.ts} +6 -8
- package/dist/chunk-BcYKnZln.d.ts +10 -0
- package/dist/{chunk-DEVFdzxR.d.ts → chunk-BsO65uOb.d.ts} +4 -4
- package/dist/{chunk-BCoJQE-f.d.ts → chunk-BtKww7r1.d.ts} +6 -4
- package/dist/{chunk-Bpi2tz-6.d.ts → chunk-Bubi-WAs.d.ts} +20 -17
- package/dist/chunk-CDMZhRke.d.ts +30 -0
- package/dist/chunk-CFhJCPSB.d.ts +48 -0
- package/dist/{chunk-DtHByo32.d.ts → chunk-CFk6djyM.d.ts} +5 -5
- package/dist/{chunk-CMeX4WRe.d.ts → chunk-CT2iXaHz.d.ts} +1 -1
- package/dist/{chunk-pcFXCimE.d.ts → chunk-CmV7WZzR.d.ts} +124 -2
- package/dist/{chunk-B2t1tGRh.d.ts → chunk-D2CQlXaR.d.ts} +13 -15
- package/dist/{chunk-BGkgZp-H.d.ts → chunk-D3uSIa6H.d.ts} +9 -1
- package/dist/{chunk-DzuY9DXg.d.ts → chunk-DDd8BhTY.d.ts} +2 -2
- package/dist/{chunk-Dw1z1Pki.d.ts → chunk-DNCU78oW.d.ts} +160 -323
- package/dist/chunk-DVIvUVkS.d.ts +195 -0
- package/dist/{chunk-gCX81nOr.d.ts → chunk-DgzPaTw9.d.ts} +3 -3
- package/dist/{chunk-Kt1tW-D1.d.ts → chunk-Dm-iHJ-s.d.ts} +3 -3
- package/dist/{chunk-C-bavsOH.d.ts → chunk-Dw_4ad2Y.d.ts} +6 -6
- package/dist/{chunk-CwQKNaYL.d.ts → chunk-OksNJcvJ.d.ts} +2 -2
- package/dist/chunk-Susgfkap.d.ts +20 -0
- package/dist/{chunk-C2p5r3Vt.d.ts → chunk-ge-rSPy0.d.ts} +818 -701
- package/dist/{chunk-BXLImeLy.d.ts → chunk-r-Vjut9o.d.ts} +52 -11
- package/dist/cli/index.d.ts +14 -867
- package/dist/cli/index.js +47 -4962
- package/dist/cli/skills/content/index.d.ts +2 -2
- package/dist/cli/skills/content/index.js +2 -2
- package/dist/cli/tools/sdk/child-host.d.ts +1 -1
- package/dist/cli/tools/sdk/child-host.js +17 -17
- package/dist/cli/tools/sdk/index.d.ts +3 -3
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/client-logger/index.d.ts +20 -21
- package/dist/client-logger/index.js +5 -2
- package/dist/common/index.d.ts +27 -39
- package/dist/common/index.js +35 -42
- package/dist/components/index.d.ts +86 -272
- package/dist/components/index.js +2759 -8547
- package/dist/core-events/index.d.ts +6 -4
- package/dist/core-events/index.js +5 -1
- package/dist/core-server/index.d.ts +58 -17
- package/dist/core-server/index.js +1500 -382
- package/dist/core-server/presets/common-manager.js +836 -1334
- package/dist/core-server/presets/common-override-preset.js +12 -10
- package/dist/core-server/presets/common-preset.js +100 -282
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/csf-utils.d.ts +1 -1
- package/dist/csf/index.d.ts +6 -6
- package/dist/csf/index.js +86 -154
- package/dist/csf-tools/index.d.ts +66 -54
- package/dist/csf-tools/index.js +18 -16
- package/dist/docs-tools/index.d.ts +332 -16
- package/dist/docs-tools/index.js +3 -3
- package/dist/highlight/index.d.ts +1 -1
- package/dist/instrumenter/index.d.ts +5 -5
- package/dist/instrumenter/index.js +31 -19
- package/dist/manager/_manager-chunks/{globals-runtime-BvM-NY2g.js → globals-runtime-B4NRbNSS.js} +638 -1731
- package/dist/{preview/_chunks/runtime-CqHxptiK.js → manager/_manager-chunks/globals-runtime-BC43T1rL.js} +3413 -173
- package/dist/manager/_manager-chunks/{globals-runtime-sGpNlIJ1.js → globals-runtime-BDkYPr00.js} +715 -620
- package/dist/manager/_manager-chunks/{globals-runtime-eLPTIfX-.js → globals-runtime-BnQ7i5wq.js} +232 -370
- package/dist/manager/_manager-chunks/{globals-runtime-Rp_zjGnh.js → globals-runtime-BnWjPJUH.js} +2 -2
- package/dist/manager/_manager-chunks/globals-runtime-BtduS2C2.js +10601 -0
- package/dist/manager/_manager-chunks/{globals-runtime-C02fvgcd.js → globals-runtime-Bv2PBsx6.js} +411 -379
- package/dist/manager/_manager-chunks/globals-runtime-BzuYs3dZ.js +1971 -0
- package/dist/manager/_manager-chunks/globals-runtime-CBviMKtt.js +446 -0
- package/dist/manager/_manager-chunks/globals-runtime-CS41oTca.js +1808 -0
- package/dist/manager/_manager-chunks/globals-runtime-CoTrrHG3.js +1163 -0
- package/dist/manager/_manager-chunks/{globals-runtime-qKvCZHFY.js → globals-runtime-D6tkG2NO.js} +1033 -621
- package/dist/manager/_manager-chunks/{globals-runtime-BmphMP6z.js → globals-runtime-D9zzVzSP.js} +11 -11
- package/dist/manager/_manager-chunks/{globals-runtime-FC201B7s.js → globals-runtime-DCmvKMN5.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-DpNYC-qi.js → globals-runtime-DafcXCKU.js} +1013 -778
- package/dist/manager/_manager-chunks/globals-runtime-DgO0hT2p.js +32 -0
- package/dist/manager/_manager-chunks/globals-runtime-Me9Bl-sx.js +156 -0
- package/dist/manager/_manager-chunks/globals-runtime-nQMRiA0J.js +19 -0
- package/dist/manager/_manager-chunks/globals-runtime-oRjPg2jY.js +8935 -0
- package/dist/manager/_manager-chunks/{runtime-EITvVbkG.js → runtime-BdGkqNEt.js} +1 -2
- package/dist/manager/_manager-chunks/runtime-BhfRBP4G.js +294 -0
- package/dist/manager/_manager-chunks/runtime-BuPcYKCO.js +737 -0
- package/dist/manager/_manager-chunks/{runtime-eDVAYF7N.js → runtime-CGaGp83p.js} +57 -76
- package/dist/manager/_manager-chunks/{runtime-BhkT2CXl.js → runtime-CXROgt6G.js} +220 -406
- package/dist/manager/_manager-chunks/{runtime-i-PDAHLR.js → runtime-Cn5PJT3-.js} +741 -698
- package/dist/manager/_manager-chunks/{runtime-cp5pazY2.js → runtime-DJlTd1qE.js} +1717 -1536
- package/dist/manager/_manager-chunks/{runtime-D0UOWx0U.js → runtime-DTUm5K9J.js} +232 -158
- package/dist/manager/_manager-chunks/{runtime-D94Vq3oR.js → runtime-Dc6lf19c.js} +8 -534
- package/dist/manager/_manager-chunks/runtime-DmpQacrn.js +553 -0
- package/dist/manager/_manager-chunks/runtime-P663lpsR.js +528 -0
- package/dist/manager/_manager-chunks/runtime-mjv_40eH.js +201 -0
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/globals.d.ts +12 -12
- package/dist/manager/globals.js +12 -12
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +537 -527
- package/dist/manager-errors.d.ts +1 -1
- package/dist/manager-errors.js +2 -2
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +9 -9
- package/dist/mocking-utils/index.d.ts +7 -5
- package/dist/mocking-utils/index.js +34 -34
- package/dist/mocking-utils/mocker-runtime.js +2 -2
- package/dist/next/index.d.ts +231 -0
- package/dist/next/index.js +398 -0
- package/dist/nextjs-vite/export-mocks/headers/index.js +3 -1
- package/dist/nextjs-vite/export-mocks/link/index.d.ts +4 -1
- package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +9 -1
- package/dist/nextjs-vite/export-mocks/router/index.js +13 -7
- package/dist/nextjs-vite/index.d.ts +4 -4
- package/dist/nextjs-vite/index.js +10 -5
- package/dist/nextjs-vite/node/index.d.ts +2 -2
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/node-stand-ins/index.d.ts +68 -0
- package/dist/nextjs-vite/node-stand-ins/index.js +145 -0
- package/dist/nextjs-vite/preset.js +117 -15
- package/dist/nextjs-vite/preview.d.ts +2 -1
- package/dist/nextjs-vite/preview.js +1 -1
- package/dist/nextjs-vite/vite-plugin/index.d.ts +2 -2
- package/dist/nextjs-vite/vite-plugin/index.js +9 -9
- package/dist/nextjs-vite-plugin/index.d.ts +2 -3
- package/dist/nextjs-vite-plugin/index.js +24 -49
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +2 -2
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +2 -2
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +10 -6
- package/dist/node-logger/index.d.ts +83 -90
- package/dist/node-logger/index.js +11 -12
- package/dist/oxc-parser/index.js +15 -14
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/{manager/_manager-chunks/globals-runtime-8HkdnU2F.js → preview/_chunks/runtime-BYRCSYBN.js} +4440 -179
- package/dist/preview/_chunks/{runtime-CsV4HZPV.js → runtime-BiYuZt-X.js} +392 -173
- package/dist/preview/_chunks/{runtime-BZSnICCg.js → runtime-Bvh_rfnQ.js} +29 -64
- package/dist/preview/_chunks/{runtime-iXdo8CR8.js → runtime-C88AzFBv.js} +772 -418
- package/dist/preview/_chunks/{runtime-DrTjJkPY.js → runtime-Cpzxe5eK.js} +447 -151
- package/dist/preview/_chunks/{runtime-q3wt0e_N.js → runtime-D2MPrqbU.js} +2 -2
- package/dist/preview/_chunks/{runtime-BIzIdDbb.js → runtime-DS0s7U3c.js} +482 -334
- package/dist/preview/_chunks/{runtime-CxZK_Ln3.js → runtime-MYVHRAoo.js} +3 -3
- package/dist/preview/globals.d.ts +10 -10
- package/dist/preview/globals.js +10 -10
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +3 -3
- package/dist/preview-api/index.js +12 -10
- package/dist/preview-errors.d.ts +1 -1
- package/dist/preview-errors.js +2 -2
- package/dist/react/docgen/docgen-worker.js +11 -12
- package/dist/react/entry-preview-argtypes.js +1 -1
- package/dist/react/entry-preview-docs.js +1 -1
- package/dist/react/entry-preview.js +2 -1
- package/dist/react/index.d.ts +9 -11
- package/dist/react/index.js +8 -6
- package/dist/react/preset.js +13 -14
- package/dist/react/preview.d.ts +1 -1
- package/dist/react/preview.js +5 -4
- package/dist/react-native/bin/get-stories.js +12 -12
- package/dist/react-native/index.d.ts +48 -47
- package/dist/react-native/index.js +64 -249
- package/dist/react-native/metro/node.d.ts +3 -3
- package/dist/react-native/metro/node.js +10 -9
- package/dist/react-native/metro/{withStorybook.d.ts → withForkbook.d.ts} +18 -18
- package/dist/react-native/metro/{withStorybook.js → withForkbook.js} +27 -26
- package/dist/react-native/preview.js +4 -1
- package/dist/react-native/scripts/generate.d.ts +1 -1
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-native/stub.js +1 -1
- package/dist/react-native-theming/index.d.ts +2 -58
- package/dist/react-native-theming/index.js +63 -2338
- package/dist/react-native-ui/index.d.ts +14 -14
- package/dist/react-native-ui/index.js +8 -15
- package/dist/react-native-ui-common/index.d.ts +32 -12
- package/dist/react-native-ui-common/index.js +26 -31
- package/dist/react-vite/index.d.ts +2 -2
- package/dist/react-vite/node/index.d.ts +3 -3
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.d.ts +3 -1
- package/dist/react-vite/preset.js +16 -9
- package/dist/router/index.d.ts +80 -3
- package/dist/router/index.js +66 -12
- package/dist/server-errors.d.ts +1 -1
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/index.d.ts +3 -3
- package/dist/shared/open-service/index.js +2 -2
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/shared/open-service/toolsets/docs/public.d.ts +28 -28
- package/dist/telemetry/index.d.ts +38 -274
- package/dist/telemetry/index.js +11 -68
- package/dist/test/index.d.ts +2 -2
- package/dist/test/index.js +765 -511
- package/dist/theming/create.d.ts +1 -1
- package/dist/theming/create.js +2 -1
- package/dist/theming/index.d.ts +6 -6
- package/dist/theming/index.js +41 -16
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +5 -5
- package/dist/viewport/index.d.ts +1 -1
- package/package.json +69 -69
- package/skills/setup/SKILL.md +14 -0
- package/skills/stories/SKILL.md +21 -0
- package/skills/write-story/SKILL.md +14 -0
- package/template/nextjs-vite/cli/js/Button.jsx +2 -2
- package/template/nextjs-vite/cli/js/Button.stories.js +6 -6
- package/template/nextjs-vite/cli/js/Configure.mdx +100 -100
- package/template/nextjs-vite/cli/js/Header.jsx +1 -1
- package/template/nextjs-vite/cli/js/Header.stories.js +2 -2
- package/template/nextjs-vite/cli/js/Page.jsx +3 -3
- package/template/nextjs-vite/cli/js/Page.stories.js +2 -2
- package/template/nextjs-vite/cli/ts/Button.stories.ts +6 -6
- package/template/nextjs-vite/cli/ts/Button.tsx +2 -2
- package/template/nextjs-vite/cli/ts/Configure.mdx +84 -84
- package/template/nextjs-vite/cli/ts/Header.stories.ts +2 -2
- package/template/nextjs-vite/cli/ts/Header.tsx +1 -1
- package/template/nextjs-vite/cli/ts/Page.stories.ts +2 -2
- package/template/nextjs-vite/cli/ts/Page.tsx +3 -3
- package/template/react/cli/js/Button.jsx +2 -2
- package/template/react/cli/js/Button.stories.js +6 -6
- package/template/react/cli/js/Header.jsx +1 -1
- package/template/react/cli/js/Header.stories.js +2 -2
- package/template/react/cli/js/Page.jsx +3 -3
- package/template/react/cli/js/Page.stories.js +2 -2
- package/template/react/cli/ts/Button.stories.ts +6 -6
- package/template/react/cli/ts/Button.tsx +2 -2
- package/template/react/cli/ts/Header.stories.ts +2 -2
- package/template/react/cli/ts/Header.tsx +1 -1
- package/template/react/cli/ts/Page.stories.ts +2 -2
- package/template/react/cli/ts/Page.tsx +3 -3
- package/template/react-vite/cli/js/Button.jsx +2 -2
- package/template/react-vite/cli/js/Button.stories.js +6 -6
- package/template/react-vite/cli/js/Header.jsx +1 -1
- package/template/react-vite/cli/js/Header.stories.js +2 -2
- package/template/react-vite/cli/js/Page.jsx +3 -3
- package/template/react-vite/cli/js/Page.stories.js +2 -2
- package/template/react-vite/cli/ts/Button.stories.ts +6 -6
- package/template/react-vite/cli/ts/Button.tsx +2 -2
- package/template/react-vite/cli/ts/Header.stories.ts +2 -2
- package/template/react-vite/cli/ts/Header.tsx +1 -1
- package/template/react-vite/cli/ts/Page.stories.ts +2 -2
- package/template/react-vite/cli/ts/Page.tsx +3 -3
- 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/dist/_browser-chunks/WithTooltip-XSQFTBMB.js +0 -1619
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +0 -20
- package/dist/_browser-chunks/chunk-JMC7AIKT.js +0 -108
- package/dist/_node-chunks/builder-manager-VVHYQXCH.js +0 -1661
- package/dist/_node-chunks/chunk-2RU7BKEW.js +0 -23
- package/dist/_node-chunks/chunk-3BKIBF5S.js +0 -3008
- package/dist/_node-chunks/chunk-3T4ZSNPH.js +0 -662
- package/dist/_node-chunks/chunk-5DQFEZEA.js +0 -40
- package/dist/_node-chunks/chunk-6LMWA44H.js +0 -3837
- package/dist/_node-chunks/chunk-BXVYT7SB.js +0 -36
- package/dist/_node-chunks/chunk-CQKMLL5J.js +0 -33
- package/dist/_node-chunks/chunk-FY6UXW6G.js +0 -11
- package/dist/_node-chunks/chunk-IDEL2J23.js +0 -23
- package/dist/_node-chunks/chunk-JPAZLYJ3.js +0 -29
- package/dist/_node-chunks/chunk-MK2KYAI6.js +0 -5414
- package/dist/_node-chunks/chunk-NPO45IMH.js +0 -33
- package/dist/_node-chunks/chunk-QEQLR22M.js +0 -1877
- package/dist/_node-chunks/chunk-SIEXZVCR.js +0 -51
- package/dist/_node-chunks/chunk-TEQGGSP7.js +0 -33
- package/dist/_node-chunks/chunk-TFCEV2XX.js +0 -155
- package/dist/_node-chunks/chunk-W4OMYLSP.js +0 -1297
- package/dist/_node-chunks/chunk-WAXVSN3O.js +0 -18
- package/dist/_node-chunks/chunk-ZMAMXQKP.js +0 -4731
- package/dist/_node-chunks/dist-VTSTZKUB.js +0 -16
- package/dist/_node-chunks/globby-OEMHPBFY.js +0 -2884
- package/dist/_node-chunks/jiti-NFX6UU74.js +0 -3848
- package/dist/_node-chunks/lib-MDVARD7W.js +0 -366
- package/dist/_node-chunks/optimized-tests-HDOLR3EY.js +0 -22
- package/dist/_node-chunks/postinstallAddon-GYGMWDL6.js +0 -20
- package/dist/_node-chunks/session-id-KIIVOQLR.js +0 -23
- package/dist/chunk-BTVrWliM.d.ts +0 -115
- package/dist/chunk-BfBzpgct.d.ts +0 -916
- package/dist/chunk-BxWufQms.d.ts +0 -142
- package/dist/chunk-DaVb55-_.d.ts +0 -124
- package/dist/core-server/presets/common-manager.css +0 -170
- package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +0 -3389
- package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +0 -9766
- package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +0 -5357
- package/dist/manager/_manager-chunks/globals-runtime-ZHrQFa3-.js +0 -10463
- package/dist/manager/_manager-chunks/runtime-B1L9TH89.js +0 -452
- package/dist/manager/_manager-chunks/runtime-BK0zF7FN.js +0 -22
- package/dist/manager/_manager-chunks/runtime-Bly6WJLN.js +0 -998
- package/dist/manager/_manager-chunks/runtime-DMig8mT7.js +0 -77
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +0 -1102
- package/dist/preview/_chunks/runtime-BwSxqk3t.js +0 -63
- package/dist/preview/_chunks/runtime-DZToXfvO.js +0 -9767
- package/dist/preview/_chunks/runtime-DuHdxMFA.js +0 -387
|
@@ -0,0 +1,1971 @@
|
|
|
1
|
+
import { n as __esmMin, t as __commonJSMin } from "./globals-runtime-BdGkqNEt.js";
|
|
2
|
+
import { a as _assertThisInitialized, i as init_inheritsLoose, n as init_wrapNativeSuper, r as _inheritsLoose, s as _extends, t as _wrapNativeSuper } from "./globals-runtime-DwFqpqya.js";
|
|
3
|
+
//#region ../../node_modules/picocolors/picocolors.browser.js
|
|
4
|
+
var require_picocolors_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
|
+
var x = String;
|
|
6
|
+
var create = function() {
|
|
7
|
+
return {
|
|
8
|
+
isColorSupported: false,
|
|
9
|
+
reset: x,
|
|
10
|
+
bold: x,
|
|
11
|
+
dim: x,
|
|
12
|
+
italic: x,
|
|
13
|
+
underline: x,
|
|
14
|
+
inverse: x,
|
|
15
|
+
hidden: x,
|
|
16
|
+
strikethrough: x,
|
|
17
|
+
black: x,
|
|
18
|
+
red: x,
|
|
19
|
+
green: x,
|
|
20
|
+
yellow: x,
|
|
21
|
+
blue: x,
|
|
22
|
+
magenta: x,
|
|
23
|
+
cyan: x,
|
|
24
|
+
white: x,
|
|
25
|
+
gray: x,
|
|
26
|
+
bgBlack: x,
|
|
27
|
+
bgRed: x,
|
|
28
|
+
bgGreen: x,
|
|
29
|
+
bgYellow: x,
|
|
30
|
+
bgBlue: x,
|
|
31
|
+
bgMagenta: x,
|
|
32
|
+
bgCyan: x,
|
|
33
|
+
bgWhite: x,
|
|
34
|
+
blackBright: x,
|
|
35
|
+
redBright: x,
|
|
36
|
+
greenBright: x,
|
|
37
|
+
yellowBright: x,
|
|
38
|
+
blueBright: x,
|
|
39
|
+
magentaBright: x,
|
|
40
|
+
cyanBright: x,
|
|
41
|
+
whiteBright: x,
|
|
42
|
+
bgBlackBright: x,
|
|
43
|
+
bgRedBright: x,
|
|
44
|
+
bgGreenBright: x,
|
|
45
|
+
bgYellowBright: x,
|
|
46
|
+
bgBlueBright: x,
|
|
47
|
+
bgMagentaBright: x,
|
|
48
|
+
bgCyanBright: x,
|
|
49
|
+
bgWhiteBright: x
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
module.exports = create();
|
|
53
|
+
module.exports.createColors = create;
|
|
54
|
+
}));
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region ../../node_modules/picoquery/lib/string-util.js
|
|
57
|
+
/**
|
|
58
|
+
* @param {string} str
|
|
59
|
+
* @returns {string}
|
|
60
|
+
*/
|
|
61
|
+
function encodeString(str) {
|
|
62
|
+
const len = str.length;
|
|
63
|
+
if (len === 0) return "";
|
|
64
|
+
let out = "";
|
|
65
|
+
let lastPos = 0;
|
|
66
|
+
let i = 0;
|
|
67
|
+
outer: for (; i < len; i++) {
|
|
68
|
+
let c = str.charCodeAt(i);
|
|
69
|
+
while (c < 128) {
|
|
70
|
+
if (noEscape[c] !== 1) {
|
|
71
|
+
if (lastPos < i) out += str.slice(lastPos, i);
|
|
72
|
+
lastPos = i + 1;
|
|
73
|
+
out += hexTable[c];
|
|
74
|
+
}
|
|
75
|
+
if (++i === len) break outer;
|
|
76
|
+
c = str.charCodeAt(i);
|
|
77
|
+
}
|
|
78
|
+
if (lastPos < i) out += str.slice(lastPos, i);
|
|
79
|
+
if (c < 2048) {
|
|
80
|
+
lastPos = i + 1;
|
|
81
|
+
out += hexTable[192 | c >> 6] + hexTable[128 | c & 63];
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (c < 55296 || c >= 57344) {
|
|
85
|
+
lastPos = i + 1;
|
|
86
|
+
out += hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
++i;
|
|
90
|
+
if (i >= len) throw new Error("URI malformed");
|
|
91
|
+
const c2 = str.charCodeAt(i) & 1023;
|
|
92
|
+
lastPos = i + 1;
|
|
93
|
+
c = 65536 + ((c & 1023) << 10 | c2);
|
|
94
|
+
out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
95
|
+
}
|
|
96
|
+
if (lastPos === 0) return str;
|
|
97
|
+
if (lastPos < len) return out + str.slice(lastPos);
|
|
98
|
+
return out;
|
|
99
|
+
}
|
|
100
|
+
var hexTable, noEscape;
|
|
101
|
+
function init_string_util() {
|
|
102
|
+
return (init_string_util = __esmMin((() => {
|
|
103
|
+
hexTable = Array.from({ length: 256 }, (_, i) => "%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
|
|
104
|
+
noEscape = new Int8Array([
|
|
105
|
+
0,
|
|
106
|
+
0,
|
|
107
|
+
0,
|
|
108
|
+
0,
|
|
109
|
+
0,
|
|
110
|
+
0,
|
|
111
|
+
0,
|
|
112
|
+
0,
|
|
113
|
+
0,
|
|
114
|
+
0,
|
|
115
|
+
0,
|
|
116
|
+
0,
|
|
117
|
+
0,
|
|
118
|
+
0,
|
|
119
|
+
0,
|
|
120
|
+
0,
|
|
121
|
+
0,
|
|
122
|
+
0,
|
|
123
|
+
0,
|
|
124
|
+
0,
|
|
125
|
+
0,
|
|
126
|
+
0,
|
|
127
|
+
0,
|
|
128
|
+
0,
|
|
129
|
+
0,
|
|
130
|
+
0,
|
|
131
|
+
0,
|
|
132
|
+
0,
|
|
133
|
+
0,
|
|
134
|
+
0,
|
|
135
|
+
0,
|
|
136
|
+
0,
|
|
137
|
+
0,
|
|
138
|
+
1,
|
|
139
|
+
0,
|
|
140
|
+
0,
|
|
141
|
+
0,
|
|
142
|
+
0,
|
|
143
|
+
0,
|
|
144
|
+
1,
|
|
145
|
+
1,
|
|
146
|
+
1,
|
|
147
|
+
1,
|
|
148
|
+
0,
|
|
149
|
+
0,
|
|
150
|
+
1,
|
|
151
|
+
1,
|
|
152
|
+
0,
|
|
153
|
+
1,
|
|
154
|
+
1,
|
|
155
|
+
1,
|
|
156
|
+
1,
|
|
157
|
+
1,
|
|
158
|
+
1,
|
|
159
|
+
1,
|
|
160
|
+
1,
|
|
161
|
+
1,
|
|
162
|
+
1,
|
|
163
|
+
0,
|
|
164
|
+
0,
|
|
165
|
+
0,
|
|
166
|
+
0,
|
|
167
|
+
0,
|
|
168
|
+
0,
|
|
169
|
+
0,
|
|
170
|
+
1,
|
|
171
|
+
1,
|
|
172
|
+
1,
|
|
173
|
+
1,
|
|
174
|
+
1,
|
|
175
|
+
1,
|
|
176
|
+
1,
|
|
177
|
+
1,
|
|
178
|
+
1,
|
|
179
|
+
1,
|
|
180
|
+
1,
|
|
181
|
+
1,
|
|
182
|
+
1,
|
|
183
|
+
1,
|
|
184
|
+
1,
|
|
185
|
+
1,
|
|
186
|
+
1,
|
|
187
|
+
1,
|
|
188
|
+
1,
|
|
189
|
+
1,
|
|
190
|
+
1,
|
|
191
|
+
1,
|
|
192
|
+
1,
|
|
193
|
+
1,
|
|
194
|
+
1,
|
|
195
|
+
1,
|
|
196
|
+
0,
|
|
197
|
+
0,
|
|
198
|
+
0,
|
|
199
|
+
0,
|
|
200
|
+
1,
|
|
201
|
+
0,
|
|
202
|
+
1,
|
|
203
|
+
1,
|
|
204
|
+
1,
|
|
205
|
+
1,
|
|
206
|
+
1,
|
|
207
|
+
1,
|
|
208
|
+
1,
|
|
209
|
+
1,
|
|
210
|
+
1,
|
|
211
|
+
1,
|
|
212
|
+
1,
|
|
213
|
+
1,
|
|
214
|
+
1,
|
|
215
|
+
1,
|
|
216
|
+
1,
|
|
217
|
+
1,
|
|
218
|
+
1,
|
|
219
|
+
1,
|
|
220
|
+
1,
|
|
221
|
+
1,
|
|
222
|
+
1,
|
|
223
|
+
1,
|
|
224
|
+
1,
|
|
225
|
+
1,
|
|
226
|
+
1,
|
|
227
|
+
1,
|
|
228
|
+
0,
|
|
229
|
+
0,
|
|
230
|
+
0,
|
|
231
|
+
1,
|
|
232
|
+
0
|
|
233
|
+
]);
|
|
234
|
+
})))();
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region ../../node_modules/picoquery/lib/shared.js
|
|
238
|
+
var defaultValueSerializer, defaultShouldSerializeObject, identityFunc, defaultOptions;
|
|
239
|
+
function init_shared() {
|
|
240
|
+
return (init_shared = __esmMin((() => {
|
|
241
|
+
init_string_util();
|
|
242
|
+
defaultValueSerializer = (value) => {
|
|
243
|
+
switch (typeof value) {
|
|
244
|
+
case "string": return encodeString(value);
|
|
245
|
+
case "bigint":
|
|
246
|
+
case "boolean": return "" + value;
|
|
247
|
+
case "number": if (Number.isFinite(value)) return value < 1e21 ? "" + value : encodeString("" + value);
|
|
248
|
+
}
|
|
249
|
+
if (value instanceof Date) return encodeString(value.toISOString());
|
|
250
|
+
return "";
|
|
251
|
+
};
|
|
252
|
+
defaultShouldSerializeObject = (val) => {
|
|
253
|
+
return val instanceof Date;
|
|
254
|
+
};
|
|
255
|
+
identityFunc = (v) => v;
|
|
256
|
+
defaultOptions = {
|
|
257
|
+
nesting: true,
|
|
258
|
+
nestingSyntax: "dot",
|
|
259
|
+
arrayRepeat: false,
|
|
260
|
+
arrayRepeatSyntax: "repeat",
|
|
261
|
+
delimiter: 38,
|
|
262
|
+
valueDeserializer: identityFunc,
|
|
263
|
+
valueSerializer: defaultValueSerializer,
|
|
264
|
+
keyDeserializer: identityFunc,
|
|
265
|
+
shouldSerializeObject: defaultShouldSerializeObject
|
|
266
|
+
};
|
|
267
|
+
})))();
|
|
268
|
+
}
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region ../../node_modules/picoquery/lib/object-util.js
|
|
271
|
+
function isPrototypeKey(value) {
|
|
272
|
+
return value === "__proto__" || value === "constructor" || value === "prototype";
|
|
273
|
+
}
|
|
274
|
+
function getDeepObject(obj, key, nextKey, forceObject, forceArray) {
|
|
275
|
+
if (isPrototypeKey(key)) return obj;
|
|
276
|
+
const currObj = obj[key];
|
|
277
|
+
if (typeof currObj === "object" && currObj !== null) return currObj;
|
|
278
|
+
if (!forceObject && (forceArray || typeof nextKey === "number" || typeof nextKey === "string" && nextKey * 0 === 0 && nextKey.indexOf(".") === -1)) return obj[key] = [];
|
|
279
|
+
return obj[key] = {};
|
|
280
|
+
}
|
|
281
|
+
function stringifyObject(obj, options, depth = 0, parentKey, isProbableArray) {
|
|
282
|
+
const { nestingSyntax = defaultOptions.nestingSyntax, arrayRepeat = defaultOptions.arrayRepeat, arrayRepeatSyntax = defaultOptions.arrayRepeatSyntax, nesting = defaultOptions.nesting, delimiter = defaultOptions.delimiter, valueSerializer = defaultOptions.valueSerializer, shouldSerializeObject = defaultOptions.shouldSerializeObject } = options;
|
|
283
|
+
const strDelimiter = typeof delimiter === "number" ? String.fromCharCode(delimiter) : delimiter;
|
|
284
|
+
const useArrayRepeatKey = isProbableArray === true && arrayRepeat;
|
|
285
|
+
const shouldUseDot = nestingSyntax === "dot" || nestingSyntax === "js" && !isProbableArray;
|
|
286
|
+
if (depth > MAX_DEPTH) return "";
|
|
287
|
+
let result = "";
|
|
288
|
+
let firstKey = true;
|
|
289
|
+
let valueIsProbableArray = false;
|
|
290
|
+
for (const key in obj) {
|
|
291
|
+
const value = obj[key];
|
|
292
|
+
if (value === void 0) continue;
|
|
293
|
+
let path;
|
|
294
|
+
if (parentKey) {
|
|
295
|
+
path = parentKey;
|
|
296
|
+
if (useArrayRepeatKey) {
|
|
297
|
+
if (arrayRepeatSyntax === "bracket") path += strBracketPair;
|
|
298
|
+
} else if (shouldUseDot) {
|
|
299
|
+
path += strDot;
|
|
300
|
+
path += key;
|
|
301
|
+
} else {
|
|
302
|
+
path += strBracketLeft;
|
|
303
|
+
path += key;
|
|
304
|
+
path += strBracketRight;
|
|
305
|
+
}
|
|
306
|
+
} else path = key;
|
|
307
|
+
if (!firstKey) result += strDelimiter;
|
|
308
|
+
if (typeof value === "object" && value !== null && !shouldSerializeObject(value)) {
|
|
309
|
+
valueIsProbableArray = value.pop !== void 0;
|
|
310
|
+
if (nesting || arrayRepeat && valueIsProbableArray) result += stringifyObject(value, options, depth + 1, path, valueIsProbableArray);
|
|
311
|
+
} else {
|
|
312
|
+
result += encodeString(path);
|
|
313
|
+
result += "=";
|
|
314
|
+
result += valueSerializer(value, key);
|
|
315
|
+
}
|
|
316
|
+
if (firstKey) firstKey = false;
|
|
317
|
+
}
|
|
318
|
+
return result;
|
|
319
|
+
}
|
|
320
|
+
var MAX_DEPTH, strBracketPair, strBracketLeft, strBracketRight, strDot;
|
|
321
|
+
function init_object_util() {
|
|
322
|
+
return (init_object_util = __esmMin((() => {
|
|
323
|
+
init_shared();
|
|
324
|
+
init_string_util();
|
|
325
|
+
MAX_DEPTH = 20;
|
|
326
|
+
strBracketPair = "[]";
|
|
327
|
+
strBracketLeft = "[";
|
|
328
|
+
strBracketRight = "]";
|
|
329
|
+
strDot = ".";
|
|
330
|
+
})))();
|
|
331
|
+
}
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region ../../node_modules/picoquery/lib/decode-uri-component.js
|
|
334
|
+
function decodeURIComponent(uri) {
|
|
335
|
+
let percentPosition = uri.indexOf("%");
|
|
336
|
+
if (percentPosition === -1) return uri;
|
|
337
|
+
const length = uri.length;
|
|
338
|
+
let decoded = "";
|
|
339
|
+
let last = 0;
|
|
340
|
+
let codepoint = 0;
|
|
341
|
+
let startOfOctets = percentPosition;
|
|
342
|
+
let state = UTF8_ACCEPT;
|
|
343
|
+
while (percentPosition > -1 && percentPosition < length) {
|
|
344
|
+
const byte = hexCodeToInt(uri[percentPosition + 1], 4) | hexCodeToInt(uri[percentPosition + 2], 0);
|
|
345
|
+
const type = UTF8_DATA[byte];
|
|
346
|
+
state = UTF8_DATA[256 + state + type];
|
|
347
|
+
codepoint = codepoint << 6 | byte & UTF8_DATA[364 + type];
|
|
348
|
+
if (state === UTF8_ACCEPT) {
|
|
349
|
+
decoded += uri.slice(last, startOfOctets);
|
|
350
|
+
decoded += codepoint <= 65535 ? String.fromCharCode(codepoint) : String.fromCharCode(55232 + (codepoint >> 10), 56320 + (codepoint & 1023));
|
|
351
|
+
codepoint = 0;
|
|
352
|
+
last = percentPosition + 3;
|
|
353
|
+
percentPosition = startOfOctets = uri.indexOf("%", last);
|
|
354
|
+
} else if (state === UTF8_REJECT) return null;
|
|
355
|
+
else {
|
|
356
|
+
percentPosition += 3;
|
|
357
|
+
if (percentPosition < length && uri.charCodeAt(percentPosition) === 37) continue;
|
|
358
|
+
return null;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return decoded + uri.slice(last);
|
|
362
|
+
}
|
|
363
|
+
function hexCodeToInt(c, shift) {
|
|
364
|
+
const i = HEX[c];
|
|
365
|
+
return i === void 0 ? 255 : i << shift;
|
|
366
|
+
}
|
|
367
|
+
var UTF8_ACCEPT, UTF8_REJECT, UTF8_DATA, HEX;
|
|
368
|
+
function init_decode_uri_component() {
|
|
369
|
+
return (init_decode_uri_component = __esmMin((() => {
|
|
370
|
+
UTF8_ACCEPT = 12;
|
|
371
|
+
UTF8_REJECT = 0;
|
|
372
|
+
UTF8_DATA = [
|
|
373
|
+
0,
|
|
374
|
+
0,
|
|
375
|
+
0,
|
|
376
|
+
0,
|
|
377
|
+
0,
|
|
378
|
+
0,
|
|
379
|
+
0,
|
|
380
|
+
0,
|
|
381
|
+
0,
|
|
382
|
+
0,
|
|
383
|
+
0,
|
|
384
|
+
0,
|
|
385
|
+
0,
|
|
386
|
+
0,
|
|
387
|
+
0,
|
|
388
|
+
0,
|
|
389
|
+
0,
|
|
390
|
+
0,
|
|
391
|
+
0,
|
|
392
|
+
0,
|
|
393
|
+
0,
|
|
394
|
+
0,
|
|
395
|
+
0,
|
|
396
|
+
0,
|
|
397
|
+
0,
|
|
398
|
+
0,
|
|
399
|
+
0,
|
|
400
|
+
0,
|
|
401
|
+
0,
|
|
402
|
+
0,
|
|
403
|
+
0,
|
|
404
|
+
0,
|
|
405
|
+
0,
|
|
406
|
+
0,
|
|
407
|
+
0,
|
|
408
|
+
0,
|
|
409
|
+
0,
|
|
410
|
+
0,
|
|
411
|
+
0,
|
|
412
|
+
0,
|
|
413
|
+
0,
|
|
414
|
+
0,
|
|
415
|
+
0,
|
|
416
|
+
0,
|
|
417
|
+
0,
|
|
418
|
+
0,
|
|
419
|
+
0,
|
|
420
|
+
0,
|
|
421
|
+
0,
|
|
422
|
+
0,
|
|
423
|
+
0,
|
|
424
|
+
0,
|
|
425
|
+
0,
|
|
426
|
+
0,
|
|
427
|
+
0,
|
|
428
|
+
0,
|
|
429
|
+
0,
|
|
430
|
+
0,
|
|
431
|
+
0,
|
|
432
|
+
0,
|
|
433
|
+
0,
|
|
434
|
+
0,
|
|
435
|
+
0,
|
|
436
|
+
0,
|
|
437
|
+
0,
|
|
438
|
+
0,
|
|
439
|
+
0,
|
|
440
|
+
0,
|
|
441
|
+
0,
|
|
442
|
+
0,
|
|
443
|
+
0,
|
|
444
|
+
0,
|
|
445
|
+
0,
|
|
446
|
+
0,
|
|
447
|
+
0,
|
|
448
|
+
0,
|
|
449
|
+
0,
|
|
450
|
+
0,
|
|
451
|
+
0,
|
|
452
|
+
0,
|
|
453
|
+
0,
|
|
454
|
+
0,
|
|
455
|
+
0,
|
|
456
|
+
0,
|
|
457
|
+
0,
|
|
458
|
+
0,
|
|
459
|
+
0,
|
|
460
|
+
0,
|
|
461
|
+
0,
|
|
462
|
+
0,
|
|
463
|
+
0,
|
|
464
|
+
0,
|
|
465
|
+
0,
|
|
466
|
+
0,
|
|
467
|
+
0,
|
|
468
|
+
0,
|
|
469
|
+
0,
|
|
470
|
+
0,
|
|
471
|
+
0,
|
|
472
|
+
0,
|
|
473
|
+
0,
|
|
474
|
+
0,
|
|
475
|
+
0,
|
|
476
|
+
0,
|
|
477
|
+
0,
|
|
478
|
+
0,
|
|
479
|
+
0,
|
|
480
|
+
0,
|
|
481
|
+
0,
|
|
482
|
+
0,
|
|
483
|
+
0,
|
|
484
|
+
0,
|
|
485
|
+
0,
|
|
486
|
+
0,
|
|
487
|
+
0,
|
|
488
|
+
0,
|
|
489
|
+
0,
|
|
490
|
+
0,
|
|
491
|
+
0,
|
|
492
|
+
0,
|
|
493
|
+
0,
|
|
494
|
+
0,
|
|
495
|
+
0,
|
|
496
|
+
0,
|
|
497
|
+
0,
|
|
498
|
+
0,
|
|
499
|
+
0,
|
|
500
|
+
0,
|
|
501
|
+
1,
|
|
502
|
+
1,
|
|
503
|
+
1,
|
|
504
|
+
1,
|
|
505
|
+
1,
|
|
506
|
+
1,
|
|
507
|
+
1,
|
|
508
|
+
1,
|
|
509
|
+
1,
|
|
510
|
+
1,
|
|
511
|
+
1,
|
|
512
|
+
1,
|
|
513
|
+
1,
|
|
514
|
+
1,
|
|
515
|
+
1,
|
|
516
|
+
1,
|
|
517
|
+
2,
|
|
518
|
+
2,
|
|
519
|
+
2,
|
|
520
|
+
2,
|
|
521
|
+
2,
|
|
522
|
+
2,
|
|
523
|
+
2,
|
|
524
|
+
2,
|
|
525
|
+
2,
|
|
526
|
+
2,
|
|
527
|
+
2,
|
|
528
|
+
2,
|
|
529
|
+
2,
|
|
530
|
+
2,
|
|
531
|
+
2,
|
|
532
|
+
2,
|
|
533
|
+
3,
|
|
534
|
+
3,
|
|
535
|
+
3,
|
|
536
|
+
3,
|
|
537
|
+
3,
|
|
538
|
+
3,
|
|
539
|
+
3,
|
|
540
|
+
3,
|
|
541
|
+
3,
|
|
542
|
+
3,
|
|
543
|
+
3,
|
|
544
|
+
3,
|
|
545
|
+
3,
|
|
546
|
+
3,
|
|
547
|
+
3,
|
|
548
|
+
3,
|
|
549
|
+
3,
|
|
550
|
+
3,
|
|
551
|
+
3,
|
|
552
|
+
3,
|
|
553
|
+
3,
|
|
554
|
+
3,
|
|
555
|
+
3,
|
|
556
|
+
3,
|
|
557
|
+
3,
|
|
558
|
+
3,
|
|
559
|
+
3,
|
|
560
|
+
3,
|
|
561
|
+
3,
|
|
562
|
+
3,
|
|
563
|
+
3,
|
|
564
|
+
3,
|
|
565
|
+
4,
|
|
566
|
+
4,
|
|
567
|
+
5,
|
|
568
|
+
5,
|
|
569
|
+
5,
|
|
570
|
+
5,
|
|
571
|
+
5,
|
|
572
|
+
5,
|
|
573
|
+
5,
|
|
574
|
+
5,
|
|
575
|
+
5,
|
|
576
|
+
5,
|
|
577
|
+
5,
|
|
578
|
+
5,
|
|
579
|
+
5,
|
|
580
|
+
5,
|
|
581
|
+
5,
|
|
582
|
+
5,
|
|
583
|
+
5,
|
|
584
|
+
5,
|
|
585
|
+
5,
|
|
586
|
+
5,
|
|
587
|
+
5,
|
|
588
|
+
5,
|
|
589
|
+
5,
|
|
590
|
+
5,
|
|
591
|
+
5,
|
|
592
|
+
5,
|
|
593
|
+
5,
|
|
594
|
+
5,
|
|
595
|
+
5,
|
|
596
|
+
5,
|
|
597
|
+
6,
|
|
598
|
+
7,
|
|
599
|
+
7,
|
|
600
|
+
7,
|
|
601
|
+
7,
|
|
602
|
+
7,
|
|
603
|
+
7,
|
|
604
|
+
7,
|
|
605
|
+
7,
|
|
606
|
+
7,
|
|
607
|
+
7,
|
|
608
|
+
7,
|
|
609
|
+
7,
|
|
610
|
+
8,
|
|
611
|
+
7,
|
|
612
|
+
7,
|
|
613
|
+
10,
|
|
614
|
+
9,
|
|
615
|
+
9,
|
|
616
|
+
9,
|
|
617
|
+
11,
|
|
618
|
+
4,
|
|
619
|
+
4,
|
|
620
|
+
4,
|
|
621
|
+
4,
|
|
622
|
+
4,
|
|
623
|
+
4,
|
|
624
|
+
4,
|
|
625
|
+
4,
|
|
626
|
+
4,
|
|
627
|
+
4,
|
|
628
|
+
4,
|
|
629
|
+
0,
|
|
630
|
+
0,
|
|
631
|
+
0,
|
|
632
|
+
0,
|
|
633
|
+
0,
|
|
634
|
+
0,
|
|
635
|
+
0,
|
|
636
|
+
0,
|
|
637
|
+
0,
|
|
638
|
+
0,
|
|
639
|
+
0,
|
|
640
|
+
0,
|
|
641
|
+
12,
|
|
642
|
+
0,
|
|
643
|
+
0,
|
|
644
|
+
0,
|
|
645
|
+
0,
|
|
646
|
+
24,
|
|
647
|
+
36,
|
|
648
|
+
48,
|
|
649
|
+
60,
|
|
650
|
+
72,
|
|
651
|
+
84,
|
|
652
|
+
96,
|
|
653
|
+
0,
|
|
654
|
+
12,
|
|
655
|
+
12,
|
|
656
|
+
12,
|
|
657
|
+
0,
|
|
658
|
+
0,
|
|
659
|
+
0,
|
|
660
|
+
0,
|
|
661
|
+
0,
|
|
662
|
+
0,
|
|
663
|
+
0,
|
|
664
|
+
0,
|
|
665
|
+
0,
|
|
666
|
+
0,
|
|
667
|
+
0,
|
|
668
|
+
24,
|
|
669
|
+
0,
|
|
670
|
+
0,
|
|
671
|
+
0,
|
|
672
|
+
0,
|
|
673
|
+
0,
|
|
674
|
+
0,
|
|
675
|
+
0,
|
|
676
|
+
0,
|
|
677
|
+
0,
|
|
678
|
+
24,
|
|
679
|
+
24,
|
|
680
|
+
24,
|
|
681
|
+
0,
|
|
682
|
+
0,
|
|
683
|
+
0,
|
|
684
|
+
0,
|
|
685
|
+
0,
|
|
686
|
+
0,
|
|
687
|
+
0,
|
|
688
|
+
0,
|
|
689
|
+
0,
|
|
690
|
+
24,
|
|
691
|
+
24,
|
|
692
|
+
0,
|
|
693
|
+
0,
|
|
694
|
+
0,
|
|
695
|
+
0,
|
|
696
|
+
0,
|
|
697
|
+
0,
|
|
698
|
+
0,
|
|
699
|
+
0,
|
|
700
|
+
0,
|
|
701
|
+
0,
|
|
702
|
+
48,
|
|
703
|
+
48,
|
|
704
|
+
48,
|
|
705
|
+
0,
|
|
706
|
+
0,
|
|
707
|
+
0,
|
|
708
|
+
0,
|
|
709
|
+
0,
|
|
710
|
+
0,
|
|
711
|
+
0,
|
|
712
|
+
0,
|
|
713
|
+
0,
|
|
714
|
+
0,
|
|
715
|
+
48,
|
|
716
|
+
48,
|
|
717
|
+
0,
|
|
718
|
+
0,
|
|
719
|
+
0,
|
|
720
|
+
0,
|
|
721
|
+
0,
|
|
722
|
+
0,
|
|
723
|
+
0,
|
|
724
|
+
0,
|
|
725
|
+
0,
|
|
726
|
+
48,
|
|
727
|
+
0,
|
|
728
|
+
0,
|
|
729
|
+
0,
|
|
730
|
+
0,
|
|
731
|
+
0,
|
|
732
|
+
0,
|
|
733
|
+
0,
|
|
734
|
+
0,
|
|
735
|
+
0,
|
|
736
|
+
0,
|
|
737
|
+
127,
|
|
738
|
+
63,
|
|
739
|
+
63,
|
|
740
|
+
63,
|
|
741
|
+
0,
|
|
742
|
+
31,
|
|
743
|
+
15,
|
|
744
|
+
15,
|
|
745
|
+
15,
|
|
746
|
+
7,
|
|
747
|
+
7,
|
|
748
|
+
7
|
|
749
|
+
];
|
|
750
|
+
HEX = {
|
|
751
|
+
"0": 0,
|
|
752
|
+
"1": 1,
|
|
753
|
+
"2": 2,
|
|
754
|
+
"3": 3,
|
|
755
|
+
"4": 4,
|
|
756
|
+
"5": 5,
|
|
757
|
+
"6": 6,
|
|
758
|
+
"7": 7,
|
|
759
|
+
"8": 8,
|
|
760
|
+
"9": 9,
|
|
761
|
+
a: 10,
|
|
762
|
+
A: 10,
|
|
763
|
+
b: 11,
|
|
764
|
+
B: 11,
|
|
765
|
+
c: 12,
|
|
766
|
+
C: 12,
|
|
767
|
+
d: 13,
|
|
768
|
+
D: 13,
|
|
769
|
+
e: 14,
|
|
770
|
+
E: 14,
|
|
771
|
+
f: 15,
|
|
772
|
+
F: 15
|
|
773
|
+
};
|
|
774
|
+
})))();
|
|
775
|
+
}
|
|
776
|
+
//#endregion
|
|
777
|
+
//#region ../../node_modules/picoquery/lib/parse.js
|
|
778
|
+
function computeKeySlice(input, startIndex, endIndex, keyHasPlus, shouldDecodeKey) {
|
|
779
|
+
let chunk = input.substring(startIndex, endIndex);
|
|
780
|
+
if (keyHasPlus) chunk = chunk.replace(regexPlus, " ");
|
|
781
|
+
if (shouldDecodeKey) chunk = decodeURIComponent(chunk) || chunk;
|
|
782
|
+
return chunk;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Parses a query string into an object
|
|
786
|
+
* @param {string} input
|
|
787
|
+
* @param {ParseOptions=} options
|
|
788
|
+
*/
|
|
789
|
+
function parse(input, options) {
|
|
790
|
+
const { valueDeserializer = defaultOptions.valueDeserializer, keyDeserializer = defaultOptions.keyDeserializer, arrayRepeatSyntax = defaultOptions.arrayRepeatSyntax, nesting = defaultOptions.nesting, arrayRepeat = defaultOptions.arrayRepeat, nestingSyntax = defaultOptions.nestingSyntax, delimiter = defaultOptions.delimiter } = options ?? {};
|
|
791
|
+
const charDelimiter = typeof delimiter === "string" ? delimiter.charCodeAt(0) : delimiter;
|
|
792
|
+
const isJsNestingSyntax = nestingSyntax === "js";
|
|
793
|
+
const result = new Empty();
|
|
794
|
+
if (typeof input !== "string") return result;
|
|
795
|
+
const inputLength = input.length;
|
|
796
|
+
let value = "";
|
|
797
|
+
let startingIndex = -1;
|
|
798
|
+
let equalityIndex = -1;
|
|
799
|
+
let keySeparatorIndex = -1;
|
|
800
|
+
let currentObj = result;
|
|
801
|
+
let lastKey = void 0;
|
|
802
|
+
let currentKey = "";
|
|
803
|
+
let keyChunk = "";
|
|
804
|
+
let shouldDecodeKey = false;
|
|
805
|
+
let shouldDecodeValue = false;
|
|
806
|
+
let keyHasPlus = false;
|
|
807
|
+
let valueHasPlus = false;
|
|
808
|
+
let keyIsDot = false;
|
|
809
|
+
let hasBothKeyValuePair = false;
|
|
810
|
+
let c = 0;
|
|
811
|
+
let arrayRepeatBracketIndex = -1;
|
|
812
|
+
let prevIndex = -1;
|
|
813
|
+
let prevChar = -1;
|
|
814
|
+
for (let i = 0; i < inputLength + 1; i++) {
|
|
815
|
+
c = i !== inputLength ? input.charCodeAt(i) : charDelimiter;
|
|
816
|
+
if (c === charDelimiter) {
|
|
817
|
+
hasBothKeyValuePair = equalityIndex > startingIndex;
|
|
818
|
+
if (!hasBothKeyValuePair) equalityIndex = i;
|
|
819
|
+
if (keySeparatorIndex !== equalityIndex - 1) {
|
|
820
|
+
keyChunk = computeKeySlice(input, keySeparatorIndex + 1, arrayRepeatBracketIndex > -1 ? arrayRepeatBracketIndex : equalityIndex, keyHasPlus, shouldDecodeKey);
|
|
821
|
+
currentKey = keyDeserializer(keyChunk);
|
|
822
|
+
if (lastKey !== void 0) currentObj = getDeepObject(currentObj, lastKey, currentKey, isJsNestingSyntax && keyIsDot, void 0);
|
|
823
|
+
}
|
|
824
|
+
if (hasBothKeyValuePair || currentKey !== "") {
|
|
825
|
+
if (hasBothKeyValuePair) {
|
|
826
|
+
value = input.slice(equalityIndex + 1, i);
|
|
827
|
+
if (valueHasPlus) value = value.replace(regexPlus, " ");
|
|
828
|
+
if (shouldDecodeValue) value = decodeURIComponent(value) || value;
|
|
829
|
+
}
|
|
830
|
+
const newValue = valueDeserializer(value, currentKey);
|
|
831
|
+
if (arrayRepeat) {
|
|
832
|
+
const currentValue = currentObj[currentKey];
|
|
833
|
+
if (currentValue === void 0) {
|
|
834
|
+
if (arrayRepeatBracketIndex > -1) currentObj[currentKey] = [newValue];
|
|
835
|
+
else currentObj[currentKey] = newValue;
|
|
836
|
+
} else if (currentValue.pop) currentValue.push(newValue);
|
|
837
|
+
else currentObj[currentKey] = [currentValue, newValue];
|
|
838
|
+
} else currentObj[currentKey] = newValue;
|
|
839
|
+
}
|
|
840
|
+
value = "";
|
|
841
|
+
startingIndex = i;
|
|
842
|
+
equalityIndex = i;
|
|
843
|
+
shouldDecodeKey = false;
|
|
844
|
+
shouldDecodeValue = false;
|
|
845
|
+
keyHasPlus = false;
|
|
846
|
+
valueHasPlus = false;
|
|
847
|
+
keyIsDot = false;
|
|
848
|
+
arrayRepeatBracketIndex = -1;
|
|
849
|
+
keySeparatorIndex = i;
|
|
850
|
+
currentObj = result;
|
|
851
|
+
lastKey = void 0;
|
|
852
|
+
currentKey = "";
|
|
853
|
+
} else if (c === 93) {
|
|
854
|
+
if (arrayRepeat && arrayRepeatSyntax === "bracket") {
|
|
855
|
+
if (prevChar === 91) arrayRepeatBracketIndex = prevIndex;
|
|
856
|
+
}
|
|
857
|
+
if (nesting && (nestingSyntax === "index" || isJsNestingSyntax) && equalityIndex <= startingIndex) {
|
|
858
|
+
if (keySeparatorIndex !== prevIndex) {
|
|
859
|
+
keyChunk = computeKeySlice(input, keySeparatorIndex + 1, i, keyHasPlus, shouldDecodeKey);
|
|
860
|
+
currentKey = keyDeserializer(keyChunk);
|
|
861
|
+
if (lastKey !== void 0) currentObj = getDeepObject(currentObj, lastKey, currentKey, void 0, void 0);
|
|
862
|
+
lastKey = currentKey;
|
|
863
|
+
keyHasPlus = false;
|
|
864
|
+
shouldDecodeKey = false;
|
|
865
|
+
}
|
|
866
|
+
keySeparatorIndex = i;
|
|
867
|
+
keyIsDot = false;
|
|
868
|
+
}
|
|
869
|
+
} else if (c === 46) {
|
|
870
|
+
if (nesting && (nestingSyntax === "dot" || isJsNestingSyntax) && equalityIndex <= startingIndex) {
|
|
871
|
+
if (keySeparatorIndex !== prevIndex) {
|
|
872
|
+
keyChunk = computeKeySlice(input, keySeparatorIndex + 1, i, keyHasPlus, shouldDecodeKey);
|
|
873
|
+
currentKey = keyDeserializer(keyChunk);
|
|
874
|
+
if (lastKey !== void 0) currentObj = getDeepObject(currentObj, lastKey, currentKey, isJsNestingSyntax);
|
|
875
|
+
lastKey = currentKey;
|
|
876
|
+
keyHasPlus = false;
|
|
877
|
+
shouldDecodeKey = false;
|
|
878
|
+
}
|
|
879
|
+
keyIsDot = true;
|
|
880
|
+
keySeparatorIndex = i;
|
|
881
|
+
}
|
|
882
|
+
} else if (c === 91) {
|
|
883
|
+
if (nesting && (nestingSyntax === "index" || isJsNestingSyntax) && equalityIndex <= startingIndex) {
|
|
884
|
+
if (keySeparatorIndex !== prevIndex) {
|
|
885
|
+
keyChunk = computeKeySlice(input, keySeparatorIndex + 1, i, keyHasPlus, shouldDecodeKey);
|
|
886
|
+
currentKey = keyDeserializer(keyChunk);
|
|
887
|
+
if (isJsNestingSyntax && lastKey !== void 0) currentObj = getDeepObject(currentObj, lastKey, currentKey, isJsNestingSyntax);
|
|
888
|
+
lastKey = currentKey;
|
|
889
|
+
keyHasPlus = false;
|
|
890
|
+
shouldDecodeKey = false;
|
|
891
|
+
keyIsDot = false;
|
|
892
|
+
}
|
|
893
|
+
keySeparatorIndex = i;
|
|
894
|
+
}
|
|
895
|
+
} else if (c === 61) {
|
|
896
|
+
if (equalityIndex <= startingIndex) equalityIndex = i;
|
|
897
|
+
else shouldDecodeValue = true;
|
|
898
|
+
} else if (c === 43) {
|
|
899
|
+
if (equalityIndex > startingIndex) valueHasPlus = true;
|
|
900
|
+
else keyHasPlus = true;
|
|
901
|
+
} else if (c === 37) {
|
|
902
|
+
if (equalityIndex > startingIndex) shouldDecodeValue = true;
|
|
903
|
+
else shouldDecodeKey = true;
|
|
904
|
+
}
|
|
905
|
+
prevIndex = i;
|
|
906
|
+
prevChar = c;
|
|
907
|
+
}
|
|
908
|
+
return result;
|
|
909
|
+
}
|
|
910
|
+
var regexPlus, Empty;
|
|
911
|
+
function init_parse() {
|
|
912
|
+
return (init_parse = __esmMin((() => {
|
|
913
|
+
init_object_util();
|
|
914
|
+
init_shared();
|
|
915
|
+
init_decode_uri_component();
|
|
916
|
+
regexPlus = /\+/g;
|
|
917
|
+
Empty = function() {};
|
|
918
|
+
Empty.prototype = Object.create(null);
|
|
919
|
+
})))();
|
|
920
|
+
}
|
|
921
|
+
//#endregion
|
|
922
|
+
//#region ../../node_modules/picoquery/lib/stringify.js
|
|
923
|
+
/**
|
|
924
|
+
* @param {unknown} input Object to stringify
|
|
925
|
+
* @param {StringifyOptions=} options Stringify options
|
|
926
|
+
* @returns {string}
|
|
927
|
+
*/
|
|
928
|
+
function stringify(input, options) {
|
|
929
|
+
if (input === null || typeof input !== "object") return "";
|
|
930
|
+
return stringifyObject(input, options ?? {});
|
|
931
|
+
}
|
|
932
|
+
function init_stringify() {
|
|
933
|
+
return (init_stringify = __esmMin((() => {
|
|
934
|
+
init_object_util();
|
|
935
|
+
})))();
|
|
936
|
+
}
|
|
937
|
+
//#endregion
|
|
938
|
+
//#region ../../node_modules/picoquery/lib/main.js
|
|
939
|
+
function init_main() {
|
|
940
|
+
return (init_main = __esmMin((() => {
|
|
941
|
+
init_parse();
|
|
942
|
+
init_stringify();
|
|
943
|
+
init_shared();
|
|
944
|
+
})))();
|
|
945
|
+
}
|
|
946
|
+
//#endregion
|
|
947
|
+
//#region ../../node_modules/polished/dist/polished.esm.js
|
|
948
|
+
/**
|
|
949
|
+
* Check if a string ends with something
|
|
950
|
+
* @private
|
|
951
|
+
*/
|
|
952
|
+
function endsWith(string, suffix) {
|
|
953
|
+
return string.substr(-suffix.length) === suffix;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* Returns a given CSS value minus its unit of measure.
|
|
957
|
+
*
|
|
958
|
+
* @example
|
|
959
|
+
* // Styles as object usage
|
|
960
|
+
* const styles = {
|
|
961
|
+
* '--dimension': stripUnit('100px')
|
|
962
|
+
* }
|
|
963
|
+
*
|
|
964
|
+
* // styled-components usage
|
|
965
|
+
* const div = styled.div`
|
|
966
|
+
* --dimension: ${stripUnit('100px')};
|
|
967
|
+
* `
|
|
968
|
+
*
|
|
969
|
+
* // CSS in JS Output
|
|
970
|
+
*
|
|
971
|
+
* element {
|
|
972
|
+
* '--dimension': 100
|
|
973
|
+
* }
|
|
974
|
+
*/
|
|
975
|
+
function stripUnit(value) {
|
|
976
|
+
if (typeof value !== "string") return value;
|
|
977
|
+
return value.match(cssRegex$1) ? parseFloat(value) : value;
|
|
978
|
+
}
|
|
979
|
+
function colorToInt(color) {
|
|
980
|
+
return Math.round(color * 255);
|
|
981
|
+
}
|
|
982
|
+
function convertToInt(red, green, blue) {
|
|
983
|
+
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
984
|
+
}
|
|
985
|
+
function hslToRgb(hue, saturation, lightness, convert) {
|
|
986
|
+
if (convert === void 0) convert = convertToInt;
|
|
987
|
+
if (saturation === 0) return convert(lightness, lightness, lightness);
|
|
988
|
+
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
989
|
+
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
990
|
+
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
991
|
+
var red = 0;
|
|
992
|
+
var green = 0;
|
|
993
|
+
var blue = 0;
|
|
994
|
+
if (huePrime >= 0 && huePrime < 1) {
|
|
995
|
+
red = chroma;
|
|
996
|
+
green = secondComponent;
|
|
997
|
+
} else if (huePrime >= 1 && huePrime < 2) {
|
|
998
|
+
red = secondComponent;
|
|
999
|
+
green = chroma;
|
|
1000
|
+
} else if (huePrime >= 2 && huePrime < 3) {
|
|
1001
|
+
green = chroma;
|
|
1002
|
+
blue = secondComponent;
|
|
1003
|
+
} else if (huePrime >= 3 && huePrime < 4) {
|
|
1004
|
+
green = secondComponent;
|
|
1005
|
+
blue = chroma;
|
|
1006
|
+
} else if (huePrime >= 4 && huePrime < 5) {
|
|
1007
|
+
red = secondComponent;
|
|
1008
|
+
blue = chroma;
|
|
1009
|
+
} else if (huePrime >= 5 && huePrime < 6) {
|
|
1010
|
+
red = chroma;
|
|
1011
|
+
blue = secondComponent;
|
|
1012
|
+
}
|
|
1013
|
+
var lightnessModification = lightness - chroma / 2;
|
|
1014
|
+
var finalRed = red + lightnessModification;
|
|
1015
|
+
var finalGreen = green + lightnessModification;
|
|
1016
|
+
var finalBlue = blue + lightnessModification;
|
|
1017
|
+
return convert(finalRed, finalGreen, finalBlue);
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
1021
|
+
* @private
|
|
1022
|
+
*/
|
|
1023
|
+
function nameToHex(color) {
|
|
1024
|
+
if (typeof color !== "string") return color;
|
|
1025
|
+
var normalizedColorName = color.toLowerCase();
|
|
1026
|
+
return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
1030
|
+
* if want to extract a color component. With the color util `toColorString` you
|
|
1031
|
+
* can convert a RgbColor or RgbaColor object back to a string.
|
|
1032
|
+
*
|
|
1033
|
+
* @example
|
|
1034
|
+
* // Assigns `{ red: 255, green: 0, blue: 0 }` to color1
|
|
1035
|
+
* const color1 = parseToRgb('rgb(255, 0, 0)');
|
|
1036
|
+
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
1037
|
+
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
1038
|
+
*/
|
|
1039
|
+
function parseToRgb(color) {
|
|
1040
|
+
if (typeof color !== "string") throw new PolishedError(3);
|
|
1041
|
+
var normalizedColor = nameToHex(color);
|
|
1042
|
+
if (normalizedColor.match(hexRegex)) return {
|
|
1043
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
1044
|
+
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
1045
|
+
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
1046
|
+
};
|
|
1047
|
+
if (normalizedColor.match(hexRgbaRegex)) {
|
|
1048
|
+
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
1049
|
+
return {
|
|
1050
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
1051
|
+
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
1052
|
+
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16),
|
|
1053
|
+
alpha
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
if (normalizedColor.match(reducedHexRegex)) return {
|
|
1057
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
1058
|
+
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
1059
|
+
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
1060
|
+
};
|
|
1061
|
+
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
1062
|
+
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
1063
|
+
return {
|
|
1064
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
1065
|
+
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
1066
|
+
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16),
|
|
1067
|
+
alpha: _alpha
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
1071
|
+
if (rgbMatched) return {
|
|
1072
|
+
red: parseInt("" + rgbMatched[1], 10),
|
|
1073
|
+
green: parseInt("" + rgbMatched[2], 10),
|
|
1074
|
+
blue: parseInt("" + rgbMatched[3], 10)
|
|
1075
|
+
};
|
|
1076
|
+
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
1077
|
+
if (rgbaMatched) return {
|
|
1078
|
+
red: parseInt("" + rgbaMatched[1], 10),
|
|
1079
|
+
green: parseInt("" + rgbaMatched[2], 10),
|
|
1080
|
+
blue: parseInt("" + rgbaMatched[3], 10),
|
|
1081
|
+
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
1082
|
+
};
|
|
1083
|
+
var hslMatched = hslRegex.exec(normalizedColor);
|
|
1084
|
+
if (hslMatched) {
|
|
1085
|
+
var rgbColorString = "rgb(" + hslToRgb(parseInt("" + hslMatched[1], 10), parseInt("" + hslMatched[2], 10) / 100, parseInt("" + hslMatched[3], 10) / 100) + ")";
|
|
1086
|
+
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
1087
|
+
if (!hslRgbMatched) throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
1088
|
+
return {
|
|
1089
|
+
red: parseInt("" + hslRgbMatched[1], 10),
|
|
1090
|
+
green: parseInt("" + hslRgbMatched[2], 10),
|
|
1091
|
+
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1094
|
+
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
1095
|
+
if (hslaMatched) {
|
|
1096
|
+
var _rgbColorString = "rgb(" + hslToRgb(parseInt("" + hslaMatched[1], 10), parseInt("" + hslaMatched[2], 10) / 100, parseInt("" + hslaMatched[3], 10) / 100) + ")";
|
|
1097
|
+
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
1098
|
+
if (!_hslRgbMatched) throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
1099
|
+
return {
|
|
1100
|
+
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
1101
|
+
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
1102
|
+
blue: parseInt("" + _hslRgbMatched[3], 10),
|
|
1103
|
+
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
throw new PolishedError(5);
|
|
1107
|
+
}
|
|
1108
|
+
function rgbToHsl(color) {
|
|
1109
|
+
var red = color.red / 255;
|
|
1110
|
+
var green = color.green / 255;
|
|
1111
|
+
var blue = color.blue / 255;
|
|
1112
|
+
var max = Math.max(red, green, blue);
|
|
1113
|
+
var min = Math.min(red, green, blue);
|
|
1114
|
+
var lightness = (max + min) / 2;
|
|
1115
|
+
if (max === min) {
|
|
1116
|
+
if (color.alpha !== void 0) return {
|
|
1117
|
+
hue: 0,
|
|
1118
|
+
saturation: 0,
|
|
1119
|
+
lightness,
|
|
1120
|
+
alpha: color.alpha
|
|
1121
|
+
};
|
|
1122
|
+
else return {
|
|
1123
|
+
hue: 0,
|
|
1124
|
+
saturation: 0,
|
|
1125
|
+
lightness
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
var hue;
|
|
1129
|
+
var delta = max - min;
|
|
1130
|
+
var saturation = lightness > .5 ? delta / (2 - max - min) : delta / (max + min);
|
|
1131
|
+
switch (max) {
|
|
1132
|
+
case red:
|
|
1133
|
+
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
1134
|
+
break;
|
|
1135
|
+
case green:
|
|
1136
|
+
hue = (blue - red) / delta + 2;
|
|
1137
|
+
break;
|
|
1138
|
+
default: hue = (red - green) / delta + 4;
|
|
1139
|
+
}
|
|
1140
|
+
hue *= 60;
|
|
1141
|
+
if (color.alpha !== void 0) return {
|
|
1142
|
+
hue,
|
|
1143
|
+
saturation,
|
|
1144
|
+
lightness,
|
|
1145
|
+
alpha: color.alpha
|
|
1146
|
+
};
|
|
1147
|
+
return {
|
|
1148
|
+
hue,
|
|
1149
|
+
saturation,
|
|
1150
|
+
lightness
|
|
1151
|
+
};
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* Returns an HslColor or HslaColor object. This utility function is only useful
|
|
1155
|
+
* if want to extract a color component. With the color util `toColorString` you
|
|
1156
|
+
* can convert a HslColor or HslaColor object back to a string.
|
|
1157
|
+
*
|
|
1158
|
+
* @example
|
|
1159
|
+
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
|
|
1160
|
+
* const color1 = parseToHsl('rgb(255, 0, 0)');
|
|
1161
|
+
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
|
|
1162
|
+
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
|
|
1163
|
+
*/
|
|
1164
|
+
function parseToHsl(color) {
|
|
1165
|
+
return rgbToHsl(parseToRgb(color));
|
|
1166
|
+
}
|
|
1167
|
+
function numberToHex(value) {
|
|
1168
|
+
var hex = value.toString(16);
|
|
1169
|
+
return hex.length === 1 ? "0" + hex : hex;
|
|
1170
|
+
}
|
|
1171
|
+
function colorToHex(color) {
|
|
1172
|
+
return numberToHex(Math.round(color * 255));
|
|
1173
|
+
}
|
|
1174
|
+
function convertToHex(red, green, blue) {
|
|
1175
|
+
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
1176
|
+
}
|
|
1177
|
+
function hslToHex(hue, saturation, lightness) {
|
|
1178
|
+
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
1179
|
+
}
|
|
1180
|
+
/**
|
|
1181
|
+
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
1182
|
+
*
|
|
1183
|
+
* @example
|
|
1184
|
+
* // Styles as object usage
|
|
1185
|
+
* const styles = {
|
|
1186
|
+
* background: hsl(359, 0.75, 0.4),
|
|
1187
|
+
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
|
|
1188
|
+
* }
|
|
1189
|
+
*
|
|
1190
|
+
* // styled-components usage
|
|
1191
|
+
* const div = styled.div`
|
|
1192
|
+
* background: ${hsl(359, 0.75, 0.4)};
|
|
1193
|
+
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
|
|
1194
|
+
* `
|
|
1195
|
+
*
|
|
1196
|
+
* // CSS in JS Output
|
|
1197
|
+
*
|
|
1198
|
+
* element {
|
|
1199
|
+
* background: "#b3191c";
|
|
1200
|
+
* background: "#b3191c";
|
|
1201
|
+
* }
|
|
1202
|
+
*/
|
|
1203
|
+
function hsl(value, saturation, lightness) {
|
|
1204
|
+
if (typeof value === "number" && typeof saturation === "number" && typeof lightness === "number") return hslToHex(value, saturation, lightness);
|
|
1205
|
+
else if (typeof value === "object" && saturation === void 0 && lightness === void 0) return hslToHex(value.hue, value.saturation, value.lightness);
|
|
1206
|
+
throw new PolishedError(1);
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
1210
|
+
*
|
|
1211
|
+
* @example
|
|
1212
|
+
* // Styles as object usage
|
|
1213
|
+
* const styles = {
|
|
1214
|
+
* background: hsla(359, 0.75, 0.4, 0.7),
|
|
1215
|
+
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
|
|
1216
|
+
* background: hsla(359, 0.75, 0.4, 1),
|
|
1217
|
+
* }
|
|
1218
|
+
*
|
|
1219
|
+
* // styled-components usage
|
|
1220
|
+
* const div = styled.div`
|
|
1221
|
+
* background: ${hsla(359, 0.75, 0.4, 0.7)};
|
|
1222
|
+
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
|
|
1223
|
+
* background: ${hsla(359, 0.75, 0.4, 1)};
|
|
1224
|
+
* `
|
|
1225
|
+
*
|
|
1226
|
+
* // CSS in JS Output
|
|
1227
|
+
*
|
|
1228
|
+
* element {
|
|
1229
|
+
* background: "rgba(179,25,28,0.7)";
|
|
1230
|
+
* background: "rgba(179,25,28,0.7)";
|
|
1231
|
+
* background: "#b3191c";
|
|
1232
|
+
* }
|
|
1233
|
+
*/
|
|
1234
|
+
function hsla(value, saturation, lightness, alpha) {
|
|
1235
|
+
if (typeof value === "number" && typeof saturation === "number" && typeof lightness === "number" && typeof alpha === "number") return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
1236
|
+
else if (typeof value === "object" && saturation === void 0 && lightness === void 0 && alpha === void 0) return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
1237
|
+
throw new PolishedError(2);
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
1241
|
+
*
|
|
1242
|
+
* @example
|
|
1243
|
+
* // Styles as object usage
|
|
1244
|
+
* const styles = {
|
|
1245
|
+
* background: rgb(255, 205, 100),
|
|
1246
|
+
* background: rgb({ red: 255, green: 205, blue: 100 }),
|
|
1247
|
+
* }
|
|
1248
|
+
*
|
|
1249
|
+
* // styled-components usage
|
|
1250
|
+
* const div = styled.div`
|
|
1251
|
+
* background: ${rgb(255, 205, 100)};
|
|
1252
|
+
* background: ${rgb({ red: 255, green: 205, blue: 100 })};
|
|
1253
|
+
* `
|
|
1254
|
+
*
|
|
1255
|
+
* // CSS in JS Output
|
|
1256
|
+
*
|
|
1257
|
+
* element {
|
|
1258
|
+
* background: "#ffcd64";
|
|
1259
|
+
* background: "#ffcd64";
|
|
1260
|
+
* }
|
|
1261
|
+
*/
|
|
1262
|
+
function rgb(value, green, blue) {
|
|
1263
|
+
if (typeof value === "number" && typeof green === "number" && typeof blue === "number") return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
|
|
1264
|
+
else if (typeof value === "object" && green === void 0 && blue === void 0) return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
1265
|
+
throw new PolishedError(6);
|
|
1266
|
+
}
|
|
1267
|
+
/**
|
|
1268
|
+
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
1269
|
+
*
|
|
1270
|
+
* Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.
|
|
1271
|
+
*
|
|
1272
|
+
* @example
|
|
1273
|
+
* // Styles as object usage
|
|
1274
|
+
* const styles = {
|
|
1275
|
+
* background: rgba(255, 205, 100, 0.7),
|
|
1276
|
+
* background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),
|
|
1277
|
+
* background: rgba(255, 205, 100, 1),
|
|
1278
|
+
* background: rgba('#ffffff', 0.4),
|
|
1279
|
+
* background: rgba('black', 0.7),
|
|
1280
|
+
* }
|
|
1281
|
+
*
|
|
1282
|
+
* // styled-components usage
|
|
1283
|
+
* const div = styled.div`
|
|
1284
|
+
* background: ${rgba(255, 205, 100, 0.7)};
|
|
1285
|
+
* background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};
|
|
1286
|
+
* background: ${rgba(255, 205, 100, 1)};
|
|
1287
|
+
* background: ${rgba('#ffffff', 0.4)};
|
|
1288
|
+
* background: ${rgba('black', 0.7)};
|
|
1289
|
+
* `
|
|
1290
|
+
*
|
|
1291
|
+
* // CSS in JS Output
|
|
1292
|
+
*
|
|
1293
|
+
* element {
|
|
1294
|
+
* background: "rgba(255,205,100,0.7)";
|
|
1295
|
+
* background: "rgba(255,205,100,0.7)";
|
|
1296
|
+
* background: "#ffcd64";
|
|
1297
|
+
* background: "rgba(255,255,255,0.4)";
|
|
1298
|
+
* background: "rgba(0,0,0,0.7)";
|
|
1299
|
+
* }
|
|
1300
|
+
*/
|
|
1301
|
+
function rgba(firstValue, secondValue, thirdValue, fourthValue) {
|
|
1302
|
+
if (typeof firstValue === "string" && typeof secondValue === "number") {
|
|
1303
|
+
var rgbValue = parseToRgb(firstValue);
|
|
1304
|
+
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
1305
|
+
} else if (typeof firstValue === "number" && typeof secondValue === "number" && typeof thirdValue === "number" && typeof fourthValue === "number") return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
1306
|
+
else if (typeof firstValue === "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
1307
|
+
throw new PolishedError(7);
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
|
|
1311
|
+
* This util is useful in case you only know on runtime which color object is
|
|
1312
|
+
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
|
|
1313
|
+
*
|
|
1314
|
+
* @example
|
|
1315
|
+
* // Styles as object usage
|
|
1316
|
+
* const styles = {
|
|
1317
|
+
* background: toColorString({ red: 255, green: 205, blue: 100 }),
|
|
1318
|
+
* background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
|
|
1319
|
+
* background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
|
|
1320
|
+
* background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
|
|
1321
|
+
* }
|
|
1322
|
+
*
|
|
1323
|
+
* // styled-components usage
|
|
1324
|
+
* const div = styled.div`
|
|
1325
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
|
|
1326
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
|
|
1327
|
+
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
|
|
1328
|
+
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
|
|
1329
|
+
* `
|
|
1330
|
+
*
|
|
1331
|
+
* // CSS in JS Output
|
|
1332
|
+
* element {
|
|
1333
|
+
* background: "#ffcd64";
|
|
1334
|
+
* background: "rgba(255,205,100,0.72)";
|
|
1335
|
+
* background: "#00f";
|
|
1336
|
+
* background: "rgba(179,25,25,0.72)";
|
|
1337
|
+
* }
|
|
1338
|
+
*/
|
|
1339
|
+
function toColorString(color) {
|
|
1340
|
+
if (typeof color !== "object") throw new PolishedError(8);
|
|
1341
|
+
if (isRgba(color)) return rgba(color);
|
|
1342
|
+
if (isRgb(color)) return rgb(color);
|
|
1343
|
+
if (isHsla(color)) return hsla(color);
|
|
1344
|
+
if (isHsl(color)) return hsl(color);
|
|
1345
|
+
throw new PolishedError(8);
|
|
1346
|
+
}
|
|
1347
|
+
function curried(f, length, acc) {
|
|
1348
|
+
return function fn() {
|
|
1349
|
+
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
1350
|
+
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1353
|
+
function curry(f) {
|
|
1354
|
+
return curried(f, f.length, []);
|
|
1355
|
+
}
|
|
1356
|
+
/**
|
|
1357
|
+
* Changes the hue of the color. Hue is a number between 0 to 360. The first
|
|
1358
|
+
* argument for adjustHue is the amount of degrees the color is rotated around
|
|
1359
|
+
* the color wheel, always producing a positive hue value.
|
|
1360
|
+
*
|
|
1361
|
+
* @example
|
|
1362
|
+
* // Styles as object usage
|
|
1363
|
+
* const styles = {
|
|
1364
|
+
* background: adjustHue(180, '#448'),
|
|
1365
|
+
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
|
|
1366
|
+
* }
|
|
1367
|
+
*
|
|
1368
|
+
* // styled-components usage
|
|
1369
|
+
* const div = styled.div`
|
|
1370
|
+
* background: ${adjustHue(180, '#448')};
|
|
1371
|
+
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
|
|
1372
|
+
* `
|
|
1373
|
+
*
|
|
1374
|
+
* // CSS in JS Output
|
|
1375
|
+
* element {
|
|
1376
|
+
* background: "#888844";
|
|
1377
|
+
* background: "rgba(136,136,68,0.7)";
|
|
1378
|
+
* }
|
|
1379
|
+
*/
|
|
1380
|
+
function adjustHue(degree, color) {
|
|
1381
|
+
if (color === "transparent") return color;
|
|
1382
|
+
var hslColor = parseToHsl(color);
|
|
1383
|
+
return toColorString(_extends({}, hslColor, { hue: hslColor.hue + parseFloat(degree) }));
|
|
1384
|
+
}
|
|
1385
|
+
function guard(lowerBoundary, upperBoundary, value) {
|
|
1386
|
+
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* Returns a string value for the darkened color.
|
|
1390
|
+
*
|
|
1391
|
+
* @example
|
|
1392
|
+
* // Styles as object usage
|
|
1393
|
+
* const styles = {
|
|
1394
|
+
* background: darken(0.2, '#FFCD64'),
|
|
1395
|
+
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
|
|
1396
|
+
* }
|
|
1397
|
+
*
|
|
1398
|
+
* // styled-components usage
|
|
1399
|
+
* const div = styled.div`
|
|
1400
|
+
* background: ${darken(0.2, '#FFCD64')};
|
|
1401
|
+
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
|
|
1402
|
+
* `
|
|
1403
|
+
*
|
|
1404
|
+
* // CSS in JS Output
|
|
1405
|
+
*
|
|
1406
|
+
* element {
|
|
1407
|
+
* background: "#ffbd31";
|
|
1408
|
+
* background: "rgba(255,189,49,0.7)";
|
|
1409
|
+
* }
|
|
1410
|
+
*/
|
|
1411
|
+
function darken(amount, color) {
|
|
1412
|
+
if (color === "transparent") return color;
|
|
1413
|
+
var hslColor = parseToHsl(color);
|
|
1414
|
+
return toColorString(_extends({}, hslColor, { lightness: guard(0, 1, hslColor.lightness - parseFloat(amount)) }));
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Decreases the intensity of a color. Its range is between 0 to 1. The first
|
|
1418
|
+
* argument of the desaturate function is the amount by how much the color
|
|
1419
|
+
* intensity should be decreased.
|
|
1420
|
+
*
|
|
1421
|
+
* @example
|
|
1422
|
+
* // Styles as object usage
|
|
1423
|
+
* const styles = {
|
|
1424
|
+
* background: desaturate(0.2, '#CCCD64'),
|
|
1425
|
+
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
1426
|
+
* }
|
|
1427
|
+
*
|
|
1428
|
+
* // styled-components usage
|
|
1429
|
+
* const div = styled.div`
|
|
1430
|
+
* background: ${desaturate(0.2, '#CCCD64')};
|
|
1431
|
+
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
1432
|
+
* `
|
|
1433
|
+
*
|
|
1434
|
+
* // CSS in JS Output
|
|
1435
|
+
* element {
|
|
1436
|
+
* background: "#b8b979";
|
|
1437
|
+
* background: "rgba(184,185,121,0.7)";
|
|
1438
|
+
* }
|
|
1439
|
+
*/
|
|
1440
|
+
function desaturate(amount, color) {
|
|
1441
|
+
if (color === "transparent") return color;
|
|
1442
|
+
var hslColor = parseToHsl(color);
|
|
1443
|
+
return toColorString(_extends({}, hslColor, { saturation: guard(0, 1, hslColor.saturation - parseFloat(amount)) }));
|
|
1444
|
+
}
|
|
1445
|
+
/**
|
|
1446
|
+
* Returns a string value for the lightened color.
|
|
1447
|
+
*
|
|
1448
|
+
* @example
|
|
1449
|
+
* // Styles as object usage
|
|
1450
|
+
* const styles = {
|
|
1451
|
+
* background: lighten(0.2, '#CCCD64'),
|
|
1452
|
+
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
|
|
1453
|
+
* }
|
|
1454
|
+
*
|
|
1455
|
+
* // styled-components usage
|
|
1456
|
+
* const div = styled.div`
|
|
1457
|
+
* background: ${lighten(0.2, '#FFCD64')};
|
|
1458
|
+
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
|
|
1459
|
+
* `
|
|
1460
|
+
*
|
|
1461
|
+
* // CSS in JS Output
|
|
1462
|
+
*
|
|
1463
|
+
* element {
|
|
1464
|
+
* background: "#e5e6b1";
|
|
1465
|
+
* background: "rgba(229,230,177,0.7)";
|
|
1466
|
+
* }
|
|
1467
|
+
*/
|
|
1468
|
+
function lighten(amount, color) {
|
|
1469
|
+
if (color === "transparent") return color;
|
|
1470
|
+
var hslColor = parseToHsl(color);
|
|
1471
|
+
return toColorString(_extends({}, hslColor, { lightness: guard(0, 1, hslColor.lightness + parseFloat(amount)) }));
|
|
1472
|
+
}
|
|
1473
|
+
/**
|
|
1474
|
+
* Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.
|
|
1475
|
+
*
|
|
1476
|
+
* @example
|
|
1477
|
+
* // Styles as object usage
|
|
1478
|
+
* const styles = {
|
|
1479
|
+
* background: mix(0.5, '#f00', '#00f')
|
|
1480
|
+
* background: mix(0.25, '#f00', '#00f')
|
|
1481
|
+
* background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')
|
|
1482
|
+
* }
|
|
1483
|
+
*
|
|
1484
|
+
* // styled-components usage
|
|
1485
|
+
* const div = styled.div`
|
|
1486
|
+
* background: ${mix(0.5, '#f00', '#00f')};
|
|
1487
|
+
* background: ${mix(0.25, '#f00', '#00f')};
|
|
1488
|
+
* background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};
|
|
1489
|
+
* `
|
|
1490
|
+
*
|
|
1491
|
+
* // CSS in JS Output
|
|
1492
|
+
*
|
|
1493
|
+
* element {
|
|
1494
|
+
* background: "#7f007f";
|
|
1495
|
+
* background: "#3f00bf";
|
|
1496
|
+
* background: "rgba(63, 0, 191, 0.75)";
|
|
1497
|
+
* }
|
|
1498
|
+
*/
|
|
1499
|
+
function mix(weight, color, otherColor) {
|
|
1500
|
+
if (color === "transparent") return otherColor;
|
|
1501
|
+
if (otherColor === "transparent") return color;
|
|
1502
|
+
if (weight === 0) return otherColor;
|
|
1503
|
+
var parsedColor1 = parseToRgb(color);
|
|
1504
|
+
var color1 = _extends({}, parsedColor1, { alpha: typeof parsedColor1.alpha === "number" ? parsedColor1.alpha : 1 });
|
|
1505
|
+
var parsedColor2 = parseToRgb(otherColor);
|
|
1506
|
+
var color2 = _extends({}, parsedColor2, { alpha: typeof parsedColor2.alpha === "number" ? parsedColor2.alpha : 1 });
|
|
1507
|
+
var alphaDelta = color1.alpha - color2.alpha;
|
|
1508
|
+
var x = parseFloat(weight) * 2 - 1;
|
|
1509
|
+
var weight1 = ((x * alphaDelta === -1 ? x : x + alphaDelta) / (1 + x * alphaDelta) + 1) / 2;
|
|
1510
|
+
var weight2 = 1 - weight1;
|
|
1511
|
+
return rgba({
|
|
1512
|
+
red: Math.floor(color1.red * weight1 + color2.red * weight2),
|
|
1513
|
+
green: Math.floor(color1.green * weight1 + color2.green * weight2),
|
|
1514
|
+
blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),
|
|
1515
|
+
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
1516
|
+
});
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
1520
|
+
*
|
|
1521
|
+
*
|
|
1522
|
+
* @example
|
|
1523
|
+
* // Styles as object usage
|
|
1524
|
+
* const styles = {
|
|
1525
|
+
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
|
|
1526
|
+
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
|
|
1527
|
+
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
|
|
1528
|
+
* }
|
|
1529
|
+
*
|
|
1530
|
+
* // styled-components usage
|
|
1531
|
+
* const div = styled.div`
|
|
1532
|
+
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
|
|
1533
|
+
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
|
|
1534
|
+
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
|
|
1535
|
+
* `
|
|
1536
|
+
*
|
|
1537
|
+
* // CSS in JS Output
|
|
1538
|
+
*
|
|
1539
|
+
* element {
|
|
1540
|
+
* background: "#fff";
|
|
1541
|
+
* background: "rgba(255,255,255,0.7)";
|
|
1542
|
+
* background: "rgba(255,0,0,0.7)";
|
|
1543
|
+
* }
|
|
1544
|
+
*/
|
|
1545
|
+
function opacify(amount, color) {
|
|
1546
|
+
if (color === "transparent") return color;
|
|
1547
|
+
var parsedColor = parseToRgb(color);
|
|
1548
|
+
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
1549
|
+
return rgba(_extends({}, parsedColor, { alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100) }));
|
|
1550
|
+
}
|
|
1551
|
+
/**
|
|
1552
|
+
* Increases the intensity of a color. Its range is between 0 to 1. The first
|
|
1553
|
+
* argument of the saturate function is the amount by how much the color
|
|
1554
|
+
* intensity should be increased.
|
|
1555
|
+
*
|
|
1556
|
+
* @example
|
|
1557
|
+
* // Styles as object usage
|
|
1558
|
+
* const styles = {
|
|
1559
|
+
* background: saturate(0.2, '#CCCD64'),
|
|
1560
|
+
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
1561
|
+
* }
|
|
1562
|
+
*
|
|
1563
|
+
* // styled-components usage
|
|
1564
|
+
* const div = styled.div`
|
|
1565
|
+
* background: ${saturate(0.2, '#FFCD64')};
|
|
1566
|
+
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
1567
|
+
* `
|
|
1568
|
+
*
|
|
1569
|
+
* // CSS in JS Output
|
|
1570
|
+
*
|
|
1571
|
+
* element {
|
|
1572
|
+
* background: "#e0e250";
|
|
1573
|
+
* background: "rgba(224,226,80,0.7)";
|
|
1574
|
+
* }
|
|
1575
|
+
*/
|
|
1576
|
+
function saturate(amount, color) {
|
|
1577
|
+
if (color === "transparent") return color;
|
|
1578
|
+
var hslColor = parseToHsl(color);
|
|
1579
|
+
return toColorString(_extends({}, hslColor, { saturation: guard(0, 1, hslColor.saturation + parseFloat(amount)) }));
|
|
1580
|
+
}
|
|
1581
|
+
/**
|
|
1582
|
+
* Sets the hue of a color to the provided value. The hue range can be
|
|
1583
|
+
* from 0 and 359.
|
|
1584
|
+
*
|
|
1585
|
+
* @example
|
|
1586
|
+
* // Styles as object usage
|
|
1587
|
+
* const styles = {
|
|
1588
|
+
* background: setHue(42, '#CCCD64'),
|
|
1589
|
+
* background: setHue('244', 'rgba(204,205,100,0.7)'),
|
|
1590
|
+
* }
|
|
1591
|
+
*
|
|
1592
|
+
* // styled-components usage
|
|
1593
|
+
* const div = styled.div`
|
|
1594
|
+
* background: ${setHue(42, '#CCCD64')};
|
|
1595
|
+
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
|
|
1596
|
+
* `
|
|
1597
|
+
*
|
|
1598
|
+
* // CSS in JS Output
|
|
1599
|
+
* element {
|
|
1600
|
+
* background: "#cdae64";
|
|
1601
|
+
* background: "rgba(107,100,205,0.7)";
|
|
1602
|
+
* }
|
|
1603
|
+
*/
|
|
1604
|
+
function setHue(hue, color) {
|
|
1605
|
+
if (color === "transparent") return color;
|
|
1606
|
+
return toColorString(_extends({}, parseToHsl(color), { hue: parseFloat(hue) }));
|
|
1607
|
+
}
|
|
1608
|
+
/**
|
|
1609
|
+
* Sets the lightness of a color to the provided value. The lightness range can be
|
|
1610
|
+
* from 0 and 1.
|
|
1611
|
+
*
|
|
1612
|
+
* @example
|
|
1613
|
+
* // Styles as object usage
|
|
1614
|
+
* const styles = {
|
|
1615
|
+
* background: setLightness(0.2, '#CCCD64'),
|
|
1616
|
+
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
|
|
1617
|
+
* }
|
|
1618
|
+
*
|
|
1619
|
+
* // styled-components usage
|
|
1620
|
+
* const div = styled.div`
|
|
1621
|
+
* background: ${setLightness(0.2, '#CCCD64')};
|
|
1622
|
+
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
|
|
1623
|
+
* `
|
|
1624
|
+
*
|
|
1625
|
+
* // CSS in JS Output
|
|
1626
|
+
* element {
|
|
1627
|
+
* background: "#4d4d19";
|
|
1628
|
+
* background: "rgba(223,224,159,0.7)";
|
|
1629
|
+
* }
|
|
1630
|
+
*/
|
|
1631
|
+
function setLightness(lightness, color) {
|
|
1632
|
+
if (color === "transparent") return color;
|
|
1633
|
+
return toColorString(_extends({}, parseToHsl(color), { lightness: parseFloat(lightness) }));
|
|
1634
|
+
}
|
|
1635
|
+
/**
|
|
1636
|
+
* Sets the saturation of a color to the provided value. The saturation range can be
|
|
1637
|
+
* from 0 and 1.
|
|
1638
|
+
*
|
|
1639
|
+
* @example
|
|
1640
|
+
* // Styles as object usage
|
|
1641
|
+
* const styles = {
|
|
1642
|
+
* background: setSaturation(0.2, '#CCCD64'),
|
|
1643
|
+
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
|
|
1644
|
+
* }
|
|
1645
|
+
*
|
|
1646
|
+
* // styled-components usage
|
|
1647
|
+
* const div = styled.div`
|
|
1648
|
+
* background: ${setSaturation(0.2, '#CCCD64')};
|
|
1649
|
+
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
|
|
1650
|
+
* `
|
|
1651
|
+
*
|
|
1652
|
+
* // CSS in JS Output
|
|
1653
|
+
* element {
|
|
1654
|
+
* background: "#adad84";
|
|
1655
|
+
* background: "rgba(228,229,76,0.7)";
|
|
1656
|
+
* }
|
|
1657
|
+
*/
|
|
1658
|
+
function setSaturation(saturation, color) {
|
|
1659
|
+
if (color === "transparent") return color;
|
|
1660
|
+
return toColorString(_extends({}, parseToHsl(color), { saturation: parseFloat(saturation) }));
|
|
1661
|
+
}
|
|
1662
|
+
/**
|
|
1663
|
+
* Shades a color by mixing it with black. `shade` can produce
|
|
1664
|
+
* hue shifts, where as `darken` manipulates the luminance channel and therefore
|
|
1665
|
+
* doesn't produce hue shifts.
|
|
1666
|
+
*
|
|
1667
|
+
* @example
|
|
1668
|
+
* // Styles as object usage
|
|
1669
|
+
* const styles = {
|
|
1670
|
+
* background: shade(0.25, '#00f')
|
|
1671
|
+
* }
|
|
1672
|
+
*
|
|
1673
|
+
* // styled-components usage
|
|
1674
|
+
* const div = styled.div`
|
|
1675
|
+
* background: ${shade(0.25, '#00f')};
|
|
1676
|
+
* `
|
|
1677
|
+
*
|
|
1678
|
+
* // CSS in JS Output
|
|
1679
|
+
*
|
|
1680
|
+
* element {
|
|
1681
|
+
* background: "#00003f";
|
|
1682
|
+
* }
|
|
1683
|
+
*/
|
|
1684
|
+
function shade(percentage, color) {
|
|
1685
|
+
if (color === "transparent") return color;
|
|
1686
|
+
return mix$1(parseFloat(percentage), "rgb(0, 0, 0)", color);
|
|
1687
|
+
}
|
|
1688
|
+
/**
|
|
1689
|
+
* Tints a color by mixing it with white. `tint` can produce
|
|
1690
|
+
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
|
|
1691
|
+
* doesn't produce hue shifts.
|
|
1692
|
+
*
|
|
1693
|
+
* @example
|
|
1694
|
+
* // Styles as object usage
|
|
1695
|
+
* const styles = {
|
|
1696
|
+
* background: tint(0.25, '#00f')
|
|
1697
|
+
* }
|
|
1698
|
+
*
|
|
1699
|
+
* // styled-components usage
|
|
1700
|
+
* const div = styled.div`
|
|
1701
|
+
* background: ${tint(0.25, '#00f')};
|
|
1702
|
+
* `
|
|
1703
|
+
*
|
|
1704
|
+
* // CSS in JS Output
|
|
1705
|
+
*
|
|
1706
|
+
* element {
|
|
1707
|
+
* background: "#bfbfff";
|
|
1708
|
+
* }
|
|
1709
|
+
*/
|
|
1710
|
+
function tint(percentage, color) {
|
|
1711
|
+
if (color === "transparent") return color;
|
|
1712
|
+
return mix$1(parseFloat(percentage), "rgb(255, 255, 255)", color);
|
|
1713
|
+
}
|
|
1714
|
+
/**
|
|
1715
|
+
* Decreases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
1716
|
+
*
|
|
1717
|
+
*
|
|
1718
|
+
* @example
|
|
1719
|
+
* // Styles as object usage
|
|
1720
|
+
* const styles = {
|
|
1721
|
+
* background: transparentize(0.1, '#fff'),
|
|
1722
|
+
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
|
|
1723
|
+
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
|
|
1724
|
+
* }
|
|
1725
|
+
*
|
|
1726
|
+
* // styled-components usage
|
|
1727
|
+
* const div = styled.div`
|
|
1728
|
+
* background: ${transparentize(0.1, '#fff')};
|
|
1729
|
+
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
|
|
1730
|
+
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
|
|
1731
|
+
* `
|
|
1732
|
+
*
|
|
1733
|
+
* // CSS in JS Output
|
|
1734
|
+
*
|
|
1735
|
+
* element {
|
|
1736
|
+
* background: "rgba(255,255,255,0.9)";
|
|
1737
|
+
* background: "rgba(255,255,255,0.8)";
|
|
1738
|
+
* background: "rgba(255,0,0,0.3)";
|
|
1739
|
+
* }
|
|
1740
|
+
*/
|
|
1741
|
+
function transparentize(amount, color) {
|
|
1742
|
+
if (color === "transparent") return color;
|
|
1743
|
+
var parsedColor = parseToRgb(color);
|
|
1744
|
+
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
1745
|
+
return rgba(_extends({}, parsedColor, { alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100) }));
|
|
1746
|
+
}
|
|
1747
|
+
var PolishedError, cssRegex$1, pixelsto, namedColorMap, hexRegex, hexRgbaRegex, reducedHexRegex, reducedRgbaHexRegex, rgbRegex, rgbaRegex, hslRegex, hslaRegex, reduceHexValue$1, isRgb, isRgba, isHsl, isHsla, curriedDarken$1, curriedLighten$1, mix$1, curriedOpacify$1;
|
|
1748
|
+
function init_polished_esm() {
|
|
1749
|
+
return (init_polished_esm = __esmMin((() => {
|
|
1750
|
+
init_inheritsLoose();
|
|
1751
|
+
init_wrapNativeSuper();
|
|
1752
|
+
PolishedError = /*#__PURE__*/ function(_Error) {
|
|
1753
|
+
_inheritsLoose(PolishedError, _Error);
|
|
1754
|
+
function PolishedError(code) {
|
|
1755
|
+
var _this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
|
|
1756
|
+
return _assertThisInitialized(_this);
|
|
1757
|
+
}
|
|
1758
|
+
return PolishedError;
|
|
1759
|
+
}(/*#__PURE__*/ _wrapNativeSuper(Error));
|
|
1760
|
+
cssRegex$1 = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
|
|
1761
|
+
pixelsto = function pxtoFactory(to) {
|
|
1762
|
+
return function(pxval, base) {
|
|
1763
|
+
if (base === void 0) base = "16px";
|
|
1764
|
+
var newPxval = pxval;
|
|
1765
|
+
var newBase = base;
|
|
1766
|
+
if (typeof pxval === "string") {
|
|
1767
|
+
if (!endsWith(pxval, "px")) throw new PolishedError(69, to, pxval);
|
|
1768
|
+
newPxval = stripUnit(pxval);
|
|
1769
|
+
}
|
|
1770
|
+
if (typeof base === "string") {
|
|
1771
|
+
if (!endsWith(base, "px")) throw new PolishedError(70, to, base);
|
|
1772
|
+
newBase = stripUnit(base);
|
|
1773
|
+
}
|
|
1774
|
+
if (typeof newPxval === "string") throw new PolishedError(71, pxval, to);
|
|
1775
|
+
if (typeof newBase === "string") throw new PolishedError(72, base, to);
|
|
1776
|
+
return "" + newPxval / newBase + to;
|
|
1777
|
+
};
|
|
1778
|
+
};
|
|
1779
|
+
pixelsto("em");
|
|
1780
|
+
pixelsto("rem");
|
|
1781
|
+
namedColorMap = {
|
|
1782
|
+
aliceblue: "f0f8ff",
|
|
1783
|
+
antiquewhite: "faebd7",
|
|
1784
|
+
aqua: "00ffff",
|
|
1785
|
+
aquamarine: "7fffd4",
|
|
1786
|
+
azure: "f0ffff",
|
|
1787
|
+
beige: "f5f5dc",
|
|
1788
|
+
bisque: "ffe4c4",
|
|
1789
|
+
black: "000",
|
|
1790
|
+
blanchedalmond: "ffebcd",
|
|
1791
|
+
blue: "0000ff",
|
|
1792
|
+
blueviolet: "8a2be2",
|
|
1793
|
+
brown: "a52a2a",
|
|
1794
|
+
burlywood: "deb887",
|
|
1795
|
+
cadetblue: "5f9ea0",
|
|
1796
|
+
chartreuse: "7fff00",
|
|
1797
|
+
chocolate: "d2691e",
|
|
1798
|
+
coral: "ff7f50",
|
|
1799
|
+
cornflowerblue: "6495ed",
|
|
1800
|
+
cornsilk: "fff8dc",
|
|
1801
|
+
crimson: "dc143c",
|
|
1802
|
+
cyan: "00ffff",
|
|
1803
|
+
darkblue: "00008b",
|
|
1804
|
+
darkcyan: "008b8b",
|
|
1805
|
+
darkgoldenrod: "b8860b",
|
|
1806
|
+
darkgray: "a9a9a9",
|
|
1807
|
+
darkgreen: "006400",
|
|
1808
|
+
darkgrey: "a9a9a9",
|
|
1809
|
+
darkkhaki: "bdb76b",
|
|
1810
|
+
darkmagenta: "8b008b",
|
|
1811
|
+
darkolivegreen: "556b2f",
|
|
1812
|
+
darkorange: "ff8c00",
|
|
1813
|
+
darkorchid: "9932cc",
|
|
1814
|
+
darkred: "8b0000",
|
|
1815
|
+
darksalmon: "e9967a",
|
|
1816
|
+
darkseagreen: "8fbc8f",
|
|
1817
|
+
darkslateblue: "483d8b",
|
|
1818
|
+
darkslategray: "2f4f4f",
|
|
1819
|
+
darkslategrey: "2f4f4f",
|
|
1820
|
+
darkturquoise: "00ced1",
|
|
1821
|
+
darkviolet: "9400d3",
|
|
1822
|
+
deeppink: "ff1493",
|
|
1823
|
+
deepskyblue: "00bfff",
|
|
1824
|
+
dimgray: "696969",
|
|
1825
|
+
dimgrey: "696969",
|
|
1826
|
+
dodgerblue: "1e90ff",
|
|
1827
|
+
firebrick: "b22222",
|
|
1828
|
+
floralwhite: "fffaf0",
|
|
1829
|
+
forestgreen: "228b22",
|
|
1830
|
+
fuchsia: "ff00ff",
|
|
1831
|
+
gainsboro: "dcdcdc",
|
|
1832
|
+
ghostwhite: "f8f8ff",
|
|
1833
|
+
gold: "ffd700",
|
|
1834
|
+
goldenrod: "daa520",
|
|
1835
|
+
gray: "808080",
|
|
1836
|
+
green: "008000",
|
|
1837
|
+
greenyellow: "adff2f",
|
|
1838
|
+
grey: "808080",
|
|
1839
|
+
honeydew: "f0fff0",
|
|
1840
|
+
hotpink: "ff69b4",
|
|
1841
|
+
indianred: "cd5c5c",
|
|
1842
|
+
indigo: "4b0082",
|
|
1843
|
+
ivory: "fffff0",
|
|
1844
|
+
khaki: "f0e68c",
|
|
1845
|
+
lavender: "e6e6fa",
|
|
1846
|
+
lavenderblush: "fff0f5",
|
|
1847
|
+
lawngreen: "7cfc00",
|
|
1848
|
+
lemonchiffon: "fffacd",
|
|
1849
|
+
lightblue: "add8e6",
|
|
1850
|
+
lightcoral: "f08080",
|
|
1851
|
+
lightcyan: "e0ffff",
|
|
1852
|
+
lightgoldenrodyellow: "fafad2",
|
|
1853
|
+
lightgray: "d3d3d3",
|
|
1854
|
+
lightgreen: "90ee90",
|
|
1855
|
+
lightgrey: "d3d3d3",
|
|
1856
|
+
lightpink: "ffb6c1",
|
|
1857
|
+
lightsalmon: "ffa07a",
|
|
1858
|
+
lightseagreen: "20b2aa",
|
|
1859
|
+
lightskyblue: "87cefa",
|
|
1860
|
+
lightslategray: "789",
|
|
1861
|
+
lightslategrey: "789",
|
|
1862
|
+
lightsteelblue: "b0c4de",
|
|
1863
|
+
lightyellow: "ffffe0",
|
|
1864
|
+
lime: "0f0",
|
|
1865
|
+
limegreen: "32cd32",
|
|
1866
|
+
linen: "faf0e6",
|
|
1867
|
+
magenta: "f0f",
|
|
1868
|
+
maroon: "800000",
|
|
1869
|
+
mediumaquamarine: "66cdaa",
|
|
1870
|
+
mediumblue: "0000cd",
|
|
1871
|
+
mediumorchid: "ba55d3",
|
|
1872
|
+
mediumpurple: "9370db",
|
|
1873
|
+
mediumseagreen: "3cb371",
|
|
1874
|
+
mediumslateblue: "7b68ee",
|
|
1875
|
+
mediumspringgreen: "00fa9a",
|
|
1876
|
+
mediumturquoise: "48d1cc",
|
|
1877
|
+
mediumvioletred: "c71585",
|
|
1878
|
+
midnightblue: "191970",
|
|
1879
|
+
mintcream: "f5fffa",
|
|
1880
|
+
mistyrose: "ffe4e1",
|
|
1881
|
+
moccasin: "ffe4b5",
|
|
1882
|
+
navajowhite: "ffdead",
|
|
1883
|
+
navy: "000080",
|
|
1884
|
+
oldlace: "fdf5e6",
|
|
1885
|
+
olive: "808000",
|
|
1886
|
+
olivedrab: "6b8e23",
|
|
1887
|
+
orange: "ffa500",
|
|
1888
|
+
orangered: "ff4500",
|
|
1889
|
+
orchid: "da70d6",
|
|
1890
|
+
palegoldenrod: "eee8aa",
|
|
1891
|
+
palegreen: "98fb98",
|
|
1892
|
+
paleturquoise: "afeeee",
|
|
1893
|
+
palevioletred: "db7093",
|
|
1894
|
+
papayawhip: "ffefd5",
|
|
1895
|
+
peachpuff: "ffdab9",
|
|
1896
|
+
peru: "cd853f",
|
|
1897
|
+
pink: "ffc0cb",
|
|
1898
|
+
plum: "dda0dd",
|
|
1899
|
+
powderblue: "b0e0e6",
|
|
1900
|
+
purple: "800080",
|
|
1901
|
+
rebeccapurple: "639",
|
|
1902
|
+
red: "f00",
|
|
1903
|
+
rosybrown: "bc8f8f",
|
|
1904
|
+
royalblue: "4169e1",
|
|
1905
|
+
saddlebrown: "8b4513",
|
|
1906
|
+
salmon: "fa8072",
|
|
1907
|
+
sandybrown: "f4a460",
|
|
1908
|
+
seagreen: "2e8b57",
|
|
1909
|
+
seashell: "fff5ee",
|
|
1910
|
+
sienna: "a0522d",
|
|
1911
|
+
silver: "c0c0c0",
|
|
1912
|
+
skyblue: "87ceeb",
|
|
1913
|
+
slateblue: "6a5acd",
|
|
1914
|
+
slategray: "708090",
|
|
1915
|
+
slategrey: "708090",
|
|
1916
|
+
snow: "fffafa",
|
|
1917
|
+
springgreen: "00ff7f",
|
|
1918
|
+
steelblue: "4682b4",
|
|
1919
|
+
tan: "d2b48c",
|
|
1920
|
+
teal: "008080",
|
|
1921
|
+
thistle: "d8bfd8",
|
|
1922
|
+
tomato: "ff6347",
|
|
1923
|
+
turquoise: "40e0d0",
|
|
1924
|
+
violet: "ee82ee",
|
|
1925
|
+
wheat: "f5deb3",
|
|
1926
|
+
white: "fff",
|
|
1927
|
+
whitesmoke: "f5f5f5",
|
|
1928
|
+
yellow: "ff0",
|
|
1929
|
+
yellowgreen: "9acd32"
|
|
1930
|
+
};
|
|
1931
|
+
hexRegex = /^#[a-fA-F0-9]{6}$/;
|
|
1932
|
+
hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
|
|
1933
|
+
reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
|
|
1934
|
+
reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
|
|
1935
|
+
rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
|
|
1936
|
+
rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
1937
|
+
hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
1938
|
+
hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
1939
|
+
reduceHexValue$1 = function reduceHexValue(value) {
|
|
1940
|
+
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) return "#" + value[1] + value[3] + value[5];
|
|
1941
|
+
return value;
|
|
1942
|
+
};
|
|
1943
|
+
isRgb = function isRgb(color) {
|
|
1944
|
+
return typeof color.red === "number" && typeof color.green === "number" && typeof color.blue === "number" && (typeof color.alpha !== "number" || typeof color.alpha === "undefined");
|
|
1945
|
+
};
|
|
1946
|
+
isRgba = function isRgba(color) {
|
|
1947
|
+
return typeof color.red === "number" && typeof color.green === "number" && typeof color.blue === "number" && typeof color.alpha === "number";
|
|
1948
|
+
};
|
|
1949
|
+
isHsl = function isHsl(color) {
|
|
1950
|
+
return typeof color.hue === "number" && typeof color.saturation === "number" && typeof color.lightness === "number" && (typeof color.alpha !== "number" || typeof color.alpha === "undefined");
|
|
1951
|
+
};
|
|
1952
|
+
isHsla = function isHsla(color) {
|
|
1953
|
+
return typeof color.hue === "number" && typeof color.saturation === "number" && typeof color.lightness === "number" && typeof color.alpha === "number";
|
|
1954
|
+
};
|
|
1955
|
+
curry(adjustHue);
|
|
1956
|
+
curriedDarken$1 = curry(darken);
|
|
1957
|
+
curry(desaturate);
|
|
1958
|
+
curriedLighten$1 = curry(lighten);
|
|
1959
|
+
mix$1 = curry(mix);
|
|
1960
|
+
curriedOpacify$1 = curry(opacify);
|
|
1961
|
+
curry(saturate);
|
|
1962
|
+
curry(setHue);
|
|
1963
|
+
curry(setLightness);
|
|
1964
|
+
curry(setSaturation);
|
|
1965
|
+
curry(shade);
|
|
1966
|
+
curry(tint);
|
|
1967
|
+
curry(transparentize);
|
|
1968
|
+
})))();
|
|
1969
|
+
}
|
|
1970
|
+
//#endregion
|
|
1971
|
+
export { rgba as a, stringify as c, require_picocolors_browser as d, init_polished_esm as i, init_parse as l, curriedLighten$1 as n, init_main as o, curriedOpacify$1 as r, init_stringify as s, curriedDarken$1 as t, parse as u };
|