@aussieljk/forkbook 0.0.1-11 → 0.0.1-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/assets/create/rendererAssets/common/button.css +6 -6
- package/assets/create/rendererAssets/common/header.css +5 -5
- package/assets/create/rendererAssets/common/page.css +10 -10
- package/dist/_browser-chunks/{Color-QLZNXLSV.js → Color-2EUQ6NXV.js} +2 -2
- package/dist/_browser-chunks/{DocsRenderer-JXND3PVQ.js → DocsRenderer-DKXSW2OY.js} +2 -2
- package/dist/_browser-chunks/{WithTooltip-GNLRTZDF.js → WithTooltip-QCFTNB6P.js} +5 -4
- package/dist/_browser-chunks/{chunk-RBCHTR7C.js → chunk-2ELGJRFZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-6ELMKWKX.js → chunk-2WZWS7GJ.js} +1 -1
- package/dist/_browser-chunks/{chunk-FRAOQJDI.js → chunk-3QPZOXB7.js} +1 -5
- package/dist/_browser-chunks/{chunk-GRO2ZYEJ.js → chunk-4BOJAE7P.js} +12 -8
- package/dist/_browser-chunks/{chunk-ZHKZKFY4.js → chunk-6SL45YM3.js} +9 -13
- package/dist/_browser-chunks/{chunk-DS2WQZGO.js → chunk-BLCZ3C5M.js} +41 -62
- package/dist/_browser-chunks/{chunk-7DQREF4S.js → chunk-DHTLVXAL.js} +37 -44
- package/dist/_browser-chunks/{chunk-GNZY6LOW.js → chunk-DISGPOF4.js} +54 -51
- package/dist/_browser-chunks/{chunk-76222HQR.js → chunk-E6QKKKLO.js} +20 -5
- package/dist/_browser-chunks/{chunk-DYNTDJ3O.js → chunk-EBSOKHFG.js} +8 -2
- package/dist/_browser-chunks/{chunk-3M5T7BW4.js → chunk-ECMVTOVD.js} +1 -1
- package/dist/_browser-chunks/{chunk-EQKMUQF3.js → chunk-ENHFQXYS.js} +5 -4
- package/dist/_browser-chunks/{chunk-KYSD26D6.js → chunk-EW2M3URL.js} +90 -83
- package/dist/_browser-chunks/{chunk-I4ATZPNZ.js → chunk-FCULT3AE.js} +3 -3
- package/dist/_browser-chunks/{chunk-46Z7NGAS.js → chunk-HX443LKV.js} +1 -1
- package/dist/_browser-chunks/{chunk-NGMQJMCY.js → chunk-HZFHNYRC.js} +1 -1
- package/dist/_browser-chunks/{chunk-5H4KFI44.js → chunk-KQJ4T6JL.js} +30 -24
- package/dist/_browser-chunks/{chunk-RMYQ3QN3.js → chunk-NK5SGJNG.js} +22 -17
- package/dist/_browser-chunks/{chunk-N3NRW5XX.js → chunk-PQRPDA4U.js} +3 -3
- package/dist/_browser-chunks/{chunk-2JDQ35OA.js → chunk-PU7D2WDP.js} +0 -11
- package/dist/_browser-chunks/{chunk-5WMXI5GW.js → chunk-QFO2B4X2.js} +31 -28
- package/dist/_browser-chunks/{chunk-TTBPZQ24.js → chunk-S7N7Z5TY.js} +47 -43
- package/dist/_browser-chunks/{chunk-2JT76G3E.js → chunk-SBOQ4QPY.js} +15 -15
- package/dist/_browser-chunks/{chunk-WBLVFDJT.js → chunk-UH3XTEOQ.js} +716 -658
- package/dist/_browser-chunks/{chunk-5I7E4GMO.js → chunk-WY2LUGOH.js} +1 -1
- package/dist/_browser-chunks/{chunk-O24AZJZ7.js → chunk-YJO5BK52.js} +7 -3
- package/dist/_browser-chunks/{chunk-3HM3VWJS.js → chunk-ZF37BMDS.js} +6 -2
- package/dist/_browser-chunks/{chunk-QU4RB2WU.js → chunk-ZF5SPY56.js} +4 -4
- 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-J2AKT5WI.js → attached-runtime-7IRDQUTZ.js} +28 -29
- package/dist/_node-chunks/{builder-manager-Z4RWF4ZH.js → builder-manager-YTALSWKQ.js} +39 -28
- package/dist/_node-chunks/{chunk-2WVLC5M2.js → chunk-26ERGIQH.js} +6 -6
- package/dist/_node-chunks/{chunk-VZG3OKFO.js → chunk-33T4HNF2.js} +6 -6
- package/dist/_node-chunks/{chunk-ZEYODVQT.js → chunk-3F3673RQ.js} +7 -7
- package/dist/_node-chunks/{chunk-Y4W4B3E7.js → chunk-3FLRYZLJ.js} +6 -6
- package/dist/_node-chunks/{chunk-AVL7GUOZ.js → chunk-3L2QRDKH.js} +522 -1045
- package/dist/_node-chunks/{chunk-XO54HM4P.js → chunk-3NH7IHUS.js} +6 -6
- package/dist/_node-chunks/{chunk-GMKLTDKN.js → chunk-3ZAENV5A.js} +6 -6
- package/dist/_node-chunks/{chunk-3IIQSDCO.js → chunk-4B52HLKK.js} +53 -55
- package/dist/_node-chunks/chunk-4CZJ4SFH.js +281 -0
- package/dist/_node-chunks/{chunk-BBU2FUPC.js → chunk-4IIWFG7O.js} +13 -11
- package/dist/_node-chunks/{chunk-2U5J7YTA.js → chunk-4YWZLOAF.js} +6 -6
- package/dist/_node-chunks/{chunk-XVOIYGTJ.js → chunk-5A5XOSRM.js} +6 -6
- package/dist/_node-chunks/chunk-5T6Q7HT3.js +11 -0
- package/dist/_node-chunks/{chunk-MI7WBXWX.js → chunk-6DRDJF2Q.js} +6 -6
- package/dist/_node-chunks/{chunk-WBCKO5LP.js → chunk-6JSZY5TJ.js} +6 -6
- package/dist/_node-chunks/{chunk-3EBGFRAH.js → chunk-7SPDKMDQ.js} +32 -40
- package/dist/_node-chunks/{chunk-IRPQQARO.js → chunk-7YLKDHLZ.js} +7 -7
- package/dist/_node-chunks/{chunk-BSQB5B57.js → chunk-7YQIVUEK.js} +6 -6
- package/dist/_node-chunks/{chunk-PYVGF5F2.js → chunk-ADCQYK3Z.js} +6 -6
- package/dist/_node-chunks/{chunk-7YQTID2W.js → chunk-ALHQVE5R.js} +6 -6
- package/dist/_node-chunks/{chunk-MW4OAPPD.js → chunk-B4XAZ2OC.js} +8 -8
- package/dist/_node-chunks/{chunk-GGCOG7OV.js → chunk-BFQJF3ID.js} +283 -306
- package/dist/_node-chunks/{chunk-5GOXN5M4.js → chunk-BSXI35KM.js} +7 -7
- package/dist/_node-chunks/{chunk-TAMTPVYZ.js → chunk-BZQF5KUE.js} +7 -7
- package/dist/_node-chunks/{chunk-5JLVSH44.js → chunk-CEIESR4U.js} +8 -8
- package/dist/_node-chunks/{chunk-OJWUUSA4.js → chunk-CESXIP3N.js} +6 -6
- package/dist/_node-chunks/{chunk-CEYSYQLV.js → chunk-DAEUTT3I.js} +6 -6
- package/dist/_node-chunks/{chunk-FB2BOL6I.js → chunk-DIC4T2UO.js} +6 -6
- package/dist/_node-chunks/{chunk-LKITAODU.js → chunk-DPOWAA4P.js} +37 -31
- package/dist/_node-chunks/{chunk-W3KFVTWV.js → chunk-DTNEHO4J.js} +10 -10
- package/dist/_node-chunks/{chunk-C5OFHB3N.js → chunk-DY7F7B6V.js} +7 -7
- package/dist/_node-chunks/{chunk-FUG5LYKS.js → chunk-E56UKDJR.js} +8 -8
- package/dist/_node-chunks/{chunk-A7GEBS3Q.js → chunk-EFX2VA4Q.js} +6 -6
- package/dist/_node-chunks/{chunk-PQTEFQIJ.js → chunk-EM6AYELK.js} +10 -12
- package/dist/_node-chunks/{chunk-32FLWHUC.js → chunk-F2AFT3P7.js} +497 -475
- package/dist/_node-chunks/{chunk-OXT6T4AS.js → chunk-GC7NA2Y7.js} +7 -7
- package/dist/_node-chunks/{chunk-55S3GGGC.js → chunk-GIKCT5KG.js} +7 -7
- package/dist/_node-chunks/{chunk-PXOD36TR.js → chunk-GLNHSUKT.js} +20 -20
- package/dist/_node-chunks/{chunk-BKND5XP2.js → chunk-GQZZQB4K.js} +7 -7
- package/dist/_node-chunks/{chunk-GTXZNA2L.js → chunk-GRN6WQC3.js} +10 -10
- package/dist/_node-chunks/{chunk-6UASHVMR.js → chunk-HCMHVV7N.js} +8 -8
- package/dist/_node-chunks/{chunk-IVAOJWPF.js → chunk-HJVZQS65.js} +7 -7
- package/dist/_node-chunks/{chunk-ER3X3AQ7.js → chunk-I26RGEVQ.js} +7 -7
- package/dist/_node-chunks/{chunk-LAIED5XU.js → chunk-I36FPWMO.js} +6 -6
- package/dist/_node-chunks/{chunk-W7HY3ELZ.js → chunk-IDPQ3CVN.js} +474 -479
- package/dist/_node-chunks/{chunk-36LPBTLF.js → chunk-JUVUVVHI.js} +6 -6
- package/dist/_node-chunks/{chunk-DGWKJQ6G.js → chunk-K6TEIAKH.js} +62 -7
- package/dist/_node-chunks/{chunk-7IOSIYW2.js → chunk-KEXQ3BON.js} +7 -7
- package/dist/_node-chunks/{chunk-NLNAIU4I.js → chunk-KUZSE7ZD.js} +9 -9
- package/dist/_node-chunks/chunk-LJ5JRR5Q.js +18 -0
- package/dist/_node-chunks/{chunk-YBG7HVP7.js → chunk-LMGI47HP.js} +8 -8
- package/dist/_node-chunks/{chunk-6E34W4UX.js → chunk-LPIPPSMS.js} +6 -6
- package/dist/_node-chunks/{chunk-XICRXTTE.js → chunk-LR4W5G37.js} +6 -6
- package/dist/_node-chunks/{chunk-VKRGTLQJ.js → chunk-M4MRBEJI.js} +27 -23
- package/dist/_node-chunks/{chunk-REIDJUVJ.js → chunk-M7BVABR2.js} +20 -16
- package/dist/_node-chunks/{chunk-XCJ2ZIQ4.js → chunk-MK2RPLWT.js} +7 -7
- package/dist/_node-chunks/{chunk-LHNHFYK3.js → chunk-MKSEM5C2.js} +6 -6
- package/dist/_node-chunks/{chunk-RNRGXAFV.js → chunk-MWQIBOUB.js} +6 -6
- package/dist/_node-chunks/{chunk-NFDQT7UW.js → chunk-NAXIA2JI.js} +320 -316
- package/dist/_node-chunks/{chunk-GYFR2JLS.js → chunk-NDVIMCIX.js} +7 -7
- package/dist/_node-chunks/{chunk-D5ADPGA4.js → chunk-NIOVXWQZ.js} +6 -6
- package/dist/_node-chunks/{chunk-54EHKXV7.js → chunk-NRP4FGRT.js} +15 -9
- package/dist/_node-chunks/{chunk-NIQSBBT2.js → chunk-NSNBFXVB.js} +7 -7
- package/dist/_node-chunks/{chunk-Z2ZTDQDY.js → chunk-NTUTJAD4.js} +8 -8
- package/dist/_node-chunks/{chunk-XH5CXH53.js → chunk-O46DZ2KC.js} +8 -8
- package/dist/_node-chunks/{chunk-S3NDLFYL.js → chunk-OH5M2YER.js} +7 -7
- package/dist/_node-chunks/{chunk-FTYDKQCO.js → chunk-OSIENBU6.js} +6 -6
- package/dist/_node-chunks/{chunk-76KKKLEE.js → chunk-OVJZBW54.js} +7 -7
- package/dist/_node-chunks/{chunk-WO4UEQI6.js → chunk-PGIDRLZ5.js} +22 -22
- package/dist/_node-chunks/{chunk-J3SM62J3.js → chunk-PJCSZR4T.js} +8 -8
- package/dist/_node-chunks/{chunk-OPT5A55S.js → chunk-PQXP5FZ2.js} +8 -8
- package/dist/_node-chunks/{chunk-5P4N734V.js → chunk-PU33WSBW.js} +34 -52
- package/dist/_node-chunks/{chunk-APPFF22V.js → chunk-PUBZLLNL.js} +7 -7
- package/dist/_node-chunks/{chunk-ALGQMFMN.js → chunk-QWZZX2HN.js} +6 -6
- package/dist/_node-chunks/{chunk-NLLM4MDK.js → chunk-RMUBUNBY.js} +6 -6
- package/dist/_node-chunks/{chunk-SJXLINHV.js → chunk-S33FEPQ3.js} +6 -6
- package/dist/_node-chunks/{chunk-FEC5PGJO.js → chunk-SHP6447T.js} +7 -7
- package/dist/_node-chunks/{chunk-MBIVTOJK.js → chunk-ST3KB36E.js} +6 -6
- package/dist/_node-chunks/{chunk-AKMPPLT5.js → chunk-SXX75O2D.js} +7 -7
- package/dist/_node-chunks/{chunk-6UAJLEIO.js → chunk-TQ5YAQ4Y.js} +6 -6
- package/dist/_node-chunks/{chunk-R7VDUSKY.js → chunk-TSJ3JCNN.js} +16 -10
- package/dist/_node-chunks/{chunk-TKMXEHM4.js → chunk-UYEX6LW6.js} +7 -7
- package/dist/_node-chunks/{chunk-46Y5H6X5.js → chunk-VJLLEKWR.js} +138 -116
- package/dist/_node-chunks/{chunk-IFAV3CER.js → chunk-WWJKLYU5.js} +10 -10
- package/dist/_node-chunks/{chunk-MXLHIEXC.js → chunk-XC7K4QEX.js} +6 -6
- package/dist/_node-chunks/{chunk-GO3YSBPE.js → chunk-Y64FM6U7.js} +8 -8
- package/dist/_node-chunks/{chunk-T6P2EJD2.js → chunk-YDM7NH4T.js} +6 -6
- package/dist/_node-chunks/{chunk-XSVOMORJ.js → chunk-ZHVOUP6D.js} +6 -6
- package/dist/_node-chunks/dist-CFCU4PZG.js +27 -0
- package/dist/_node-chunks/dist-PFMT5YJK.js +16 -0
- package/dist/_node-chunks/{local-runtime-YDAW5RJV.js → local-runtime-BKID5MBG.js} +19 -20
- package/dist/_node-chunks/{mdx-plugin-XLDET5LV.js → mdx-plugin-7BOUDCZB.js} +13 -13
- package/dist/_node-chunks/{monorepo-NWMAHGOM.js → monorepo-FRHSAJB7.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-4B6IZ7JD.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-7BHSAJP4.js} +11 -11
- package/dist/_node-chunks/optimized-tests-F5LCOTXH.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-PJC4PO6A.js → pattern-copy-play-6TGV6WS4.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-4RININ5C.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-4CWXZ35U.js → rehype-external-links-EE2HT4QP.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-QZ2PWSJH.js → rehype-slug-ZKRW2V6Z.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-ZQR4ER7L.js → relaxed-limits-6Q7VRQC5.js} +11 -11
- package/dist/_node-chunks/{run-U63AXEKZ.js → run-6Y3ZTASZ.js} +23 -21
- package/dist/_node-chunks/{run-BMXB2BW2.js → run-EBHIAT35.js} +18 -18
- package/dist/_node-chunks/{setup-NCUTUBNN.js → setup-6XIF77JT.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-4XHF7XPS.js → vitest.config.4.template-GMQNQ4UW.js} +7 -7
- package/dist/actions/decorator.js +16 -21
- package/dist/actions/index.d.ts +3 -3
- package/dist/actions/index.js +1 -1
- package/dist/addon-a11y/index.js +2 -2
- package/dist/addon-a11y/manager.js +11 -11
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.d.ts +8 -2
- package/dist/addon-a11y/preview.js +2 -2
- package/dist/addon-docs/blocks.d.ts +104 -85
- package/dist/addon-docs/blocks.js +30 -32
- package/dist/addon-docs/index.d.ts +2 -2
- package/dist/addon-docs/index.js +3 -3
- package/dist/addon-docs/manager.js +4 -4
- 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/preview.d.ts +1 -1
- package/dist/addon-mcp/preset.js +11 -11
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +16 -16
- package/dist/addon-ondevice-controls/index.js +1 -1
- package/dist/addon-ondevice-controls/register.js +1 -1
- package/dist/addon-pseudo-states/index.js +1 -1
- 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 +6 -5
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +18 -9
- package/dist/addon-vitest/node/coverage-reporter.js +11 -11
- package/dist/addon-vitest/node/vitest.js +34 -34
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +21 -20
- package/dist/addon-vitest/vitest-plugin/global-setup.js +22 -22
- package/dist/addon-vitest/vitest-plugin/index.js +69 -59
- package/dist/babel/index.d.ts +209 -212
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +110 -89
- package/dist/bin/dispatcher.js +10 -10
- package/dist/bin/loader.js +8 -8
- package/dist/builder-vite/index.d.ts +1 -1
- package/dist/builder-vite/index.js +18 -18
- package/dist/builder-vite/preset.js +13 -13
- package/dist/channels/index.d.ts +1 -1
- package/dist/channels/index.js +2 -2
- package/dist/{chunk-Dr3R0DXk.d.ts → chunk-B-NVyPqN.d.ts} +2 -2
- package/dist/{chunk-Fg1Fm__9.d.ts → chunk-BCG2ui5q.d.ts} +671 -674
- package/dist/{chunk-DoIGKY33.d.ts → chunk-BLZXEm1K.d.ts} +6 -8
- package/dist/{chunk-CYuvV2sR.d.ts → chunk-BNRZY6Jq.d.ts} +3 -3
- package/dist/{chunk-CNqjcOmK.d.ts → chunk-BV_hETtB.d.ts} +2 -2
- package/dist/chunk-BcYKnZln.d.ts +10 -0
- 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-pcFXCimE.d.ts → chunk-CmV7WZzR.d.ts} +124 -2
- package/dist/{chunk-BGkgZp-H.d.ts → chunk-D3uSIa6H.d.ts} +9 -1
- package/dist/{chunk-DROZ9oel.d.ts → chunk-DNCU78oW.d.ts} +110 -9
- package/dist/{chunk-D0NUmzXp.d.ts → chunk-LWwxlbee.d.ts} +4 -4
- package/dist/{chunk-BXLImeLy.d.ts → chunk-u_gGuTrz.d.ts} +23 -8
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +25 -30
- package/dist/cli/skills/content/index.d.ts +1 -1
- 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 +2 -1
- package/dist/common/index.d.ts +13 -13
- package/dist/common/index.js +34 -35
- package/dist/components/index.d.ts +46 -35
- package/dist/components/index.js +194 -205
- package/dist/core-events/index.d.ts +2 -2
- package/dist/core-server/index.d.ts +15 -10
- package/dist/core-server/index.js +706 -165
- package/dist/core-server/presets/common-manager.js +254 -336
- package/dist/core-server/presets/common-override-preset.js +10 -10
- package/dist/core-server/presets/common-preset.js +83 -275
- 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 +3 -3
- package/dist/csf/index.js +40 -43
- package/dist/csf-tools/index.d.ts +52 -44
- package/dist/csf-tools/index.js +13 -13
- package/dist/docs-tools/index.d.ts +332 -16
- package/dist/docs-tools/index.js +3 -3
- package/dist/instrumenter/index.d.ts +5 -5
- package/dist/instrumenter/index.js +25 -15
- package/dist/manager/_manager-chunks/{globals-runtime-DvV_TF3-.js → globals-runtime-B4NRbNSS.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-wjkxyMn0.js → globals-runtime-BC43T1rL.js} +4150 -50
- package/dist/manager/_manager-chunks/{globals-runtime-BSj0mCjE.js → globals-runtime-BgWmCsA7.js} +114 -110
- package/dist/manager/_manager-chunks/{globals-runtime-CA8AuIRT.js → globals-runtime-BnQ7i5wq.js} +232 -228
- package/dist/manager/_manager-chunks/globals-runtime-BtduS2C2.js +10601 -0
- package/dist/manager/_manager-chunks/globals-runtime-BzuYs3dZ.js +1971 -0
- package/dist/manager/_manager-chunks/{globals-runtime-C5gK7HhH.js → globals-runtime-C59T0h-j.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-CCTA-XPa.js → globals-runtime-CCZrdft6.js} +5 -4
- package/dist/manager/_manager-chunks/{globals-runtime-BY3epqww.js → globals-runtime-CS41oTca.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-Bu9eGDTe.js → globals-runtime-Cccwtspx.js} +288 -420
- package/dist/manager/_manager-chunks/globals-runtime-CoTrrHG3.js +1163 -0
- package/dist/manager/_manager-chunks/{globals-runtime-BweHuXkK.js → globals-runtime-DCmvKMN5.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-C92M_Vnq.js → globals-runtime-Ddp2jFET.js} +5 -5
- 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-CHjExYMv.js → globals-runtime-UFDJQlo-.js} +741 -540
- package/dist/manager/_manager-chunks/globals-runtime-nQMRiA0J.js +19 -0
- package/dist/manager/_manager-chunks/{globals-runtime-Bj5KDUJi.js → globals-runtime-oRjPg2jY.js} +1 -1
- package/dist/manager/_manager-chunks/runtime-4wMiTjjZ.js +552 -0
- package/dist/manager/_manager-chunks/{runtime--hR2NZFd.js → runtime-AvqHE9rM.js} +112 -109
- package/dist/manager/_manager-chunks/{runtime-EPerAEAs.js → runtime-CZtDJIYj.js} +3 -3
- package/dist/manager/_manager-chunks/{runtime-B6NL14pz.js → runtime-D8QxTQiI.js} +6 -6
- package/dist/manager/_manager-chunks/{runtime-BAsOe1C_.js → runtime-DC3oEVlM.js} +49 -49
- package/dist/manager/_manager-chunks/{runtime-CJQZFUUj.js → runtime-DCOIOn4T.js} +46 -56
- package/dist/manager/_manager-chunks/{runtime-DvB1axgp.js → runtime-D_FDSHFG.js} +13 -13
- package/dist/manager/_manager-chunks/{runtime-Dtbhxq5m.js → runtime-Db8fJ2MP.js} +67 -500
- package/dist/manager/_manager-chunks/{runtime-CgRqs_SK.js → runtime-lPbyY_f5.js} +882 -869
- package/dist/manager/_manager-chunks/{runtime-Dem2xJbS.js → runtime-td6oYfU6.js} +739 -554
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +479 -464
- package/dist/manager-errors.d.ts +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +9 -9
- package/dist/mocking-utils/index.d.ts +5 -3
- package/dist/mocking-utils/index.js +21 -26
- 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 +2 -2
- package/dist/nextjs-vite/index.js +9 -5
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/preset.js +12 -12
- 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.js +17 -27
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +10 -6
- package/dist/node-logger/index.d.ts +18 -18
- package/dist/node-logger/index.js +9 -9
- package/dist/oxc-parser/index.js +14 -11
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/preview/_chunks/{runtime-Bcv1hJky.js → runtime-BYRCSYBN.js} +4148 -48
- package/dist/preview/_chunks/{runtime-WapFVPAh.js → runtime-Bvh_rfnQ.js} +2 -37
- package/dist/preview/_chunks/{runtime-BZ4pNS3g.js → runtime-CdZ1yk7m.js} +3 -3
- package/dist/preview/_chunks/{runtime-BhSZ1Mwt.js → runtime-CsO4apr9.js} +38 -42
- package/dist/preview/_chunks/{runtime-BUnOhg9h.js → runtime-D2MPrqbU.js} +2 -2
- package/dist/preview/_chunks/{runtime-BPwAnlRx.js → runtime-DS0s7U3c.js} +1 -1
- package/dist/preview/_chunks/{runtime-BgPhfM5P.js → runtime-U1Ycy25F.js} +736 -428
- package/dist/preview/_chunks/{runtime-BJwGQok8.js → runtime-tyJLgv6h.js} +221 -60
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +3 -3
- package/dist/preview-api/index.js +8 -8
- package/dist/preview-errors.d.ts +1 -1
- package/dist/react/docgen/docgen-worker.js +11 -11
- package/dist/react/entry-preview-argtypes.js +1 -1
- package/dist/react/entry-preview-docs.js +1 -1
- package/dist/react/entry-preview.js +1 -1
- package/dist/react/index.d.ts +5 -7
- package/dist/react/index.js +5 -5
- package/dist/react/preset.js +13 -13
- package/dist/react/preview.js +4 -4
- package/dist/react-native/bin/get-stories.js +8 -8
- package/dist/react-native/index.d.ts +37 -36
- package/dist/react-native/index.js +38 -38
- package/dist/react-native/metro/node.d.ts +1 -1
- package/dist/react-native/metro/node.js +10 -10
- package/dist/react-native/metro/withForkbook.d.ts +7 -7
- package/dist/react-native/metro/withForkbook.js +16 -16
- package/dist/react-native/preview.js +4 -1
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-native/stub.js +1 -1
- package/dist/react-native-ui/index.d.ts +8 -7
- package/dist/react-native-ui/index.js +1 -8
- package/dist/react-native-ui-common/index.d.ts +30 -9
- package/dist/react-native-ui-common/index.js +26 -31
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +7 -7
- package/dist/router/index.d.ts +2 -2
- package/dist/router/index.js +4 -2
- 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 +1 -1
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/shared/open-service/toolsets/docs/public.d.ts +7 -7
- package/dist/telemetry/index.d.ts +38 -274
- package/dist/telemetry/index.js +11 -66
- package/dist/test/index.d.ts +2 -2
- package/dist/test/index.js +139 -120
- package/dist/theming/create.d.ts +1 -1
- package/dist/theming/index.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +2 -2
- package/package.json +16 -16
- package/template/nextjs-vite/cli/js/Button.jsx +2 -2
- package/template/nextjs-vite/cli/js/Header.jsx +1 -1
- package/template/nextjs-vite/cli/js/Page.jsx +1 -1
- package/template/nextjs-vite/cli/ts/Button.tsx +2 -2
- package/template/nextjs-vite/cli/ts/Header.tsx +1 -1
- package/template/nextjs-vite/cli/ts/Page.tsx +1 -1
- package/template/react/cli/js/Button.jsx +2 -2
- package/template/react/cli/js/Header.jsx +1 -1
- package/template/react/cli/js/Page.jsx +1 -1
- package/template/react/cli/ts/Button.tsx +2 -2
- package/template/react/cli/ts/Header.tsx +1 -1
- package/template/react/cli/ts/Page.tsx +1 -1
- package/template/react-vite/cli/js/Button.jsx +2 -2
- package/template/react-vite/cli/js/Header.jsx +1 -1
- package/template/react-vite/cli/js/Page.jsx +1 -1
- package/template/react-vite/cli/ts/Button.tsx +2 -2
- package/template/react-vite/cli/ts/Header.tsx +1 -1
- package/template/react-vite/cli/ts/Page.tsx +1 -1
- package/dist/_node-chunks/chunk-2YNXKY72.js +0 -40
- package/dist/_node-chunks/chunk-3NST2GUZ.js +0 -33
- package/dist/_node-chunks/chunk-4D325SMT.js +0 -1359
- package/dist/_node-chunks/chunk-APXRPW7A.js +0 -11
- package/dist/_node-chunks/chunk-QHBQRPDP.js +0 -155
- package/dist/_node-chunks/chunk-SMBAR4G6.js +0 -18
- package/dist/_node-chunks/chunk-SRDKK3SG.js +0 -33
- package/dist/_node-chunks/chunk-V5IMPC3J.js +0 -33
- package/dist/_node-chunks/chunk-YIAUHGY2.js +0 -69
- package/dist/_node-chunks/dist-C5QIQD3G.js +0 -27
- package/dist/_node-chunks/dist-NBRPZCHX.js +0 -16
- package/dist/_node-chunks/optimized-tests-EIPJR7HA.js +0 -22
- package/dist/_node-chunks/postinstallAddon-EOAAURMG.js +0 -20
- package/dist/_node-chunks/session-id-HEW5JUNB.js +0 -23
- package/dist/chunk-BGhyFTJO.d.ts +0 -115
- package/dist/chunk-DaVb55-_.d.ts +0 -124
- package/dist/manager/_manager-chunks/globals-runtime-Bs75QQ_I.js +0 -9987
- package/dist/manager/_manager-chunks/globals-runtime-WZKaeKm9.js +0 -4091
- package/dist/manager/_manager-chunks/runtime-5o_11Jae.js +0 -78
- package/dist/preview/_chunks/runtime-BsMjBzuq.js +0 -53
- package/dist/preview/_chunks/runtime-C1jgT6tJ.js +0 -4091
- package/dist/preview/_chunks/runtime-CkOhMcXf.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 };
|