decocms 4.161.2 → 4.162.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DkjWcZD-.js → AlertCircle-LCxBCJ8n.js} +1 -1
- package/dist/client/assets/{AreaChart-BhkonnRg.js → AreaChart-CVlhdmdg.js} +1 -1
- package/dist/client/assets/{ArrowUp-DAA8boPY.js → ArrowUp-LFRKHLuQ.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-D8TPuRuJ.js → ArrowUpRight-CXMFqfGp.js} +1 -1
- package/dist/client/assets/{Check-De5xpJ0K.js → Check-BCFAcmIa.js} +1 -1
- package/dist/client/assets/{CheckCircle-DeJIdYYq.js → CheckCircle-DpOD9rH0.js} +1 -1
- package/dist/client/assets/{ChevronDown-grOM3xSX.js → ChevronDown-BOvaCVzg.js} +1 -1
- package/dist/client/assets/{ChevronRight-Cyogjxfm.js → ChevronRight-liTksB2U.js} +1 -1
- package/dist/client/assets/{ChevronUp-DIUedEx1.js → ChevronUp-BIqoKMUJ.js} +1 -1
- package/dist/client/assets/{Copy01-DEkTleE-.js → Copy01-ZIMiAxdP.js} +1 -1
- package/dist/client/assets/{CpuChip01-Dsk680MX.js → CpuChip01-ZsmfFXVO.js} +1 -1
- package/dist/client/assets/{DotsVertical-BaMvQPx5.js → DotsVertical-CtO9eku7.js} +1 -1
- package/dist/client/assets/{Eye-DdzBJpW0.js → Eye-BQWYf35S.js} +1 -1
- package/dist/client/assets/{FilterLines-1IFdHyBL.js → FilterLines-CaGojimS.js} +1 -1
- package/dist/client/assets/{HardDrive-CZF0RiCb.js → HardDrive-BRyCfhBH.js} +1 -1
- package/dist/client/assets/{Key01-qFWWm7I0.js → Key01-i8xg5eM3.js} +1 -1
- package/dist/client/assets/{LayoutLeft-D3dfvOJc.js → LayoutLeft-Co2_iLon.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BUH7ViZX.js → LinkExternal01-S8dAjzzi.js} +1 -1
- package/dist/client/assets/{LogOut01-GO407ARs.js → LogOut01-D75UBZCc.js} +1 -1
- package/dist/client/assets/{Monitor01-BBb-96JI.js → Monitor01-BAx1QWFz.js} +1 -1
- package/dist/client/assets/{Palette-G-qrN-IT.js → Palette-Bg3YC03V.js} +1 -1
- package/dist/client/assets/{Play-CkvF8PeT.js → Play-VIp82r5R.js} +1 -1
- package/dist/client/assets/{Plus-DolMQAo4.js → Plus-C9hAZmdY.js} +1 -1
- package/dist/client/assets/{SearchLg-CFQzg9fN.js → SearchLg-CqGEHAUM.js} +1 -1
- package/dist/client/assets/{SearchMd-DCX7P32_.js → SearchMd-oPsBet0y.js} +1 -1
- package/dist/client/assets/{Settings02-QFTejQVV.js → Settings02-DNMfHyCE.js} +1 -1
- package/dist/client/assets/{Shield01-BlitQe4N.js → Shield01-DD8XMdYI.js} +1 -1
- package/dist/client/assets/{Star01-D0qlrfqR.js → Star01-y2n-9wTn.js} +1 -1
- package/dist/client/assets/{Stars01-2TnupN6q.js → Stars01-CJ0QEEdc.js} +1 -1
- package/dist/client/assets/{Stars02-DbK2oBak.js → Stars02-B3TWh8au.js} +1 -1
- package/dist/client/assets/{Sun-DVajpqnC.js → Sun-BQEYQLhf.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DY4K5cqR.js → SwitchHorizontal01-Dsxsamxe.js} +1 -1
- package/dist/client/assets/{Tool01-CgtDQOgO.js → Tool01-Oew-Vovb.js} +1 -1
- package/dist/client/assets/{Tool02-MSwzSxke.js → Tool02-CJeM1QZT.js} +1 -1
- package/dist/client/assets/{Trash01-DSxLTY0P.js → Trash01-CLRqp8e5.js} +1 -1
- package/dist/client/assets/{TrendUp01-djHA1GEE.js → TrendUp01-Bm1SbHN0.js} +1 -1
- package/dist/client/assets/{Upload01-W82kShpH.js → Upload01-ZVOuhs4w.js} +1 -1
- package/dist/client/assets/{User01-CXTn_TP5.js → User01-BYLEai7_.js} +1 -1
- package/dist/client/assets/{Users01-DQVb_7oO.js → Users01-CS4W313X.js} +1 -1
- package/dist/client/assets/{Users03-DK2c0NaU.js → Users03-CbHaoSh0.js} +1 -1
- package/dist/client/assets/{X-DsGAzzV8.js → X-x99fWfG-.js} +1 -1
- package/dist/client/assets/{XCircle-DuADiFVm.js → XCircle-CeqmuHIK.js} +1 -1
- package/dist/client/assets/{XClose-BOYWq1vy.js → XClose-CCug5seG.js} +1 -1
- package/dist/client/assets/{Zap-Djw_FpdI.js → Zap-DHqCvvjt.js} +1 -1
- package/dist/client/assets/{ZapSquare-C3s49zNL.js → ZapSquare-BKWVL4uR.js} +1 -1
- package/dist/client/assets/{access-gate-BRcWAcEH.js → access-gate-C9PFWoZS.js} +1 -1
- package/dist/client/assets/{add-section-modal-DkaZh9cy.js → add-section-modal-DEjIe-XG.js} +1 -1
- package/dist/client/assets/{agent-icon-D0etPDkN.js → agent-icon-DR5LB4zY.js} +1 -1
- package/dist/client/assets/{agents-list-1nArnMzn.js → agents-list-BvXD__fr.js} +1 -1
- package/dist/client/assets/{ai-providers-XeksWCKW.js → ai-providers-DuMestUx.js} +1 -1
- package/dist/client/assets/{alert-I-_PUhRM.js → alert-DWAFMZWl.js} +1 -1
- package/dist/client/assets/{alert-dialog-B3JnEiZT.js → alert-dialog-DR9_FciR.js} +1 -1
- package/dist/client/assets/{app-editor-BbkYtqwi.js → app-editor-BC28cPFO.js} +1 -1
- package/dist/client/assets/{auth-BkcPrlSH.js → auth-BiMrtm96.js} +1 -1
- package/dist/client/assets/{auth-catchall-JZDu0xii.js → auth-catchall-BNPPREMt.js} +1 -1
- package/dist/client/assets/{auth-entry-D376ANc2.js → auth-entry-CVJjeL2L.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DULW70yu.js → auth-split-layout-CbPO57v5.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DZxhoF_0.js → authenticate-and-persist-oauth-B8SUVbil.js} +1 -1
- package/dist/client/assets/{automation-list-row-y5_hhf0p.js → automation-list-row-C5X09Iy0.js} +1 -1
- package/dist/client/assets/{automation-runs-DNqF8MQa.js → automation-runs-i1Rm2H_V.js} +1 -1
- package/dist/client/assets/{automations-BTGiuB5f.js → automations-C48IGjrC.js} +1 -1
- package/dist/client/assets/{avatar-ShBwmidu.js → avatar-CssB4IS0.js} +1 -1
- package/dist/client/assets/{badge-CLGDkcax.js → badge-B-S2iO6e.js} +1 -1
- package/dist/client/assets/{block-document-DKkHndgg.js → block-document-Dotg4_gG.js} +1 -1
- package/dist/client/assets/{brand-context-DidwD5g4.js → brand-context-C331P1EH.js} +1 -1
- package/dist/client/assets/{buckets-BXy6rRmD.js → buckets-zt_s5mti.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Pp9TOqgP.js → bulk-category-panel-DMe3EujP.js} +1 -1
- package/dist/client/assets/{calendar-BcaXLcUe.js → calendar-BO4sgiAT.js} +1 -1
- package/dist/client/assets/{capability-load-error-CqdQPRYW.js → capability-load-error-B2CpoAHd.js} +1 -1
- package/dist/client/assets/{card-C98b87L-.js → card-Dtd81GX2.js} +1 -1
- package/dist/client/assets/{category-editor-BnVhTkaR.js → category-editor-BxdNiDrW.js} +1 -1
- package/dist/client/assets/{chat-context-DAYV5YFw.js → chat-context-_ugV5jB0.js} +1 -1
- package/dist/client/assets/{checkbox-hx3qwtU4.js → checkbox-DyL6jqNP.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CSA4lo7W.js → cli-auth-success-CBllfpZy.js} +1 -1
- package/dist/client/assets/{collection-detail-Dnt_8ShC.js → collection-detail-CJ-IT8lZ.js} +1 -1
- package/dist/client/assets/{collection-display-button-D7ZFqgmc.js → collection-display-button-rIB9x9ex.js} +1 -1
- package/dist/client/assets/{collection-search-BujcF3uz.js → collection-search-DDaBoxpd.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dxzi1B76.js → collection-table-wrapper-DvDVvjdJ.js} +1 -1
- package/dist/client/assets/{collection-tabs-1Doa_k8q.js → collection-tabs-6ZZEGxA4.js} +1 -1
- package/dist/client/assets/{command-DTif1pCh.js → command-B0sPw5D_.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CkLAXxz7.js → commerce-onboarding-CA2gNg1f.js} +1 -1
- package/dist/client/assets/{companions-core-DyTSbEDy.js → companions-core-bB24Ott2.js} +1 -1
- package/dist/client/assets/{connect-BQJsmY0Z.js → connect-dTZGddot.js} +1 -1
- package/dist/client/assets/{connection-DT5hjP5L.js → connection-B2NXk64E.js} +1 -1
- package/dist/client/assets/{connection-card-BEnBoaJQ.js → connection-card-D4yqc7qp.js} +1 -1
- package/dist/client/assets/{connection-detail-3HClPo6D.js → connection-detail-BNv09xz3.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-D1M4SXKF.js → connection-form-helpers-Dp2JRmtQ.js} +1 -1
- package/dist/client/assets/{connections-ok4_lFFO.js → connections-Dkp0iGo0.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Z3wBsgik.js → decopilot-sse-pool-tfgrlddF.js} +1 -1
- package/dist/client/assets/{dialog-B1XOtEFa.js → dialog-DDV9hxrK.js} +1 -1
- package/dist/client/assets/{domain-settings-BX-8JSGW.js → domain-settings-Cj5IWEJw.js} +1 -1
- package/dist/client/assets/{drawer-Bindqbrh.js → drawer-CLLhxT0A.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B2utwqdh.js → dropdown-menu-DFyP7pd-.js} +1 -1
- package/dist/client/assets/{empty-state-ClLU6296.js → empty-state-C8MJdBfO.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DSg0AjMi.js → extract-connection-data-GzPEHPIn.js} +1 -1
- package/dist/client/assets/{file-explorer-5gFVDcag.js → file-explorer-DcVPQshc.js} +1 -1
- package/dist/client/assets/{form-ujVSU6EU.js → form-dL4WOA5T.js} +1 -1
- package/dist/client/assets/{general-BgWx-5sJ.js → general-6LKGbmPX.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CuyTuY6S.js → github-repo-picker-BYme-j8T.js} +1 -1
- package/dist/client/assets/{hooks-BSzBu2tD.js → hooks-B9cPFqGD.js} +1 -1
- package/dist/client/assets/{index-Cx7SoZn_.js → index-60s5nmmz.js} +1 -1
- package/dist/client/assets/{index-DLYm4Sa-.js → index-BBd4FRXS.js} +1 -1
- package/dist/client/assets/{index-BwQT5Hhi.js → index-By7P3hhU.js} +1 -1
- package/dist/client/assets/{index-Bhxc2Isb.js → index-D2YLDCkn.js} +1 -1
- package/dist/client/assets/{index-B6q32zYz.js → index-DeVgWfhn.js} +1 -1
- package/dist/client/assets/{index-CBD4gVZR.js → index-Y9ucfh4p.js} +1 -1
- package/dist/client/assets/{index-DvtCTmmx.js → index-ZADPN4om.js} +3 -3
- package/dist/client/assets/{index-DyrZQfe8.js → index-jG87093U.js} +1 -1
- package/dist/client/assets/{index-WEdfBcak.js → index-kfiIPtrP.js} +3 -3
- package/dist/client/assets/{index-PxBIb6oF.js → index-pBoO89BO.js} +1 -1
- package/dist/client/assets/{index-redirect-CzO62sP0.js → index-redirect-CfBCt2ky.js} +1 -1
- package/dist/client/assets/{index-DJEeCuky.js → index-u1ajTG-j.js} +5 -5
- package/dist/client/assets/{input-psV6HQEl.js → input-BjlpMnRZ.js} +1 -1
- package/dist/client/assets/{integration-icon-DjHXNUPP.js → integration-icon-CI602PfH.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CB5VBjiU.js → invite-member-dialog-phqD0XUF.js} +1 -1
- package/dist/client/assets/{label-6xyucx-s.js → label-CSNgMmTA.js} +1 -1
- package/dist/client/assets/{layout-CBOg45xC.js → layout-BBpcfaXL.js} +1 -1
- package/dist/client/assets/{login-Cxn9KXio.js → login-DE_463fT.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CKixkOtS.js → mcp-oauth-CxvR2V5h.js} +1 -1
- package/dist/client/assets/{members-CL8x8Krr.js → members-CeatJR1m.js} +1 -1
- package/dist/client/assets/{monaco-editor-DJpDPKHP.js → monaco-editor-zuz4s4Wv.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DPROMALt.js → monitoring-stats-row-krDWXB2t.js} +1 -1
- package/dist/client/assets/{multi-select-Bh_v-l_m.js → multi-select-CMyA49eR.js} +1 -1
- package/dist/client/assets/{oauth-callback-DutuJ6V_.js → oauth-callback-C9jDdjjs.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-C4S55pOq.js → oauth-callback-ai-provider-CY3QZi7E.js} +1 -1
- package/dist/client/assets/{onboarding-DuerzaiT.js → onboarding-C3hOUjMo.js} +1 -1
- package/dist/client/assets/{org-layout-of8A1jAC.js → org-layout-XwuOFG3d.js} +1 -1
- package/dist/client/assets/{organization-choice-B3rPtstm.js → organization-choice-BM-XKanD.js} +1 -1
- package/dist/client/assets/{orgs-3twuRrYh.js → orgs-DmL2XQRI.js} +1 -1
- package/dist/client/assets/{page-seo-form-BY3nYdel.js → page-seo-form-0xV6qNbu.js} +1 -1
- package/dist/client/assets/{popover-BGrrSZ8M.js → popover-EE72qx8A.js} +1 -1
- package/dist/client/assets/{post-editor-C4XyjEMt.js → post-editor-BuHJ7HnN.js} +1 -1
- package/dist/client/assets/{primitives-CbLkj1JF.js → primitives-ChQICk_y.js} +1 -1
- package/dist/client/assets/{profile-QV2jNue9.js → profile-B0SoUvj9.js} +1 -1
- package/dist/client/assets/project-app-view-YTx3iCq1.js +1 -0
- package/dist/client/assets/record-editor-M7bvrOuK.js +1 -0
- package/dist/client/assets/{redirect-editor-s6PMTrlX.js → redirect-editor-_6dVoePs.js} +1 -1
- package/dist/client/assets/registry-fNrz9Fbw.js +2 -0
- package/dist/client/assets/{registry-layout-DO-5mJZI.js → registry-layout-OS_nbWHC.js} +1 -1
- package/dist/client/assets/{reports-CwFf2f6b.js → reports-B3VBQs5Y.js} +1 -1
- package/dist/client/assets/{require-capability-BeOopecx.js → require-capability-CieeBdjs.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BFWyMRf5.js → required-auth-layout-BDIyJAhL.js} +1 -1
- package/dist/client/assets/{reset-password-C_-lQlSH.js → reset-password-CpG0cI8F.js} +1 -1
- package/dist/client/assets/{roles-D_oBaje3.js → roles-DlOhY5JD.js} +1 -1
- package/dist/client/assets/{search-input-Bfg6VxQW.js → search-input-cF6ciAVZ.js} +1 -1
- package/dist/client/assets/{secrets-k2GFZysm.js → secrets-Dh26lP0l.js} +1 -1
- package/dist/client/assets/{sections-editor-BujDptuZ.js → sections-editor-HbcASmu4.js} +1 -1
- package/dist/client/assets/{select-CWMyLghp.js → select-ceaThfRJ.js} +1 -1
- package/dist/client/assets/{select-model-CXvd3jI3.js → select-model-CDLnPEtQ.js} +1 -1
- package/dist/client/assets/{self-tool-result-BpCEaqPw.js → self-tool-result-CaPtQwDV.js} +1 -1
- package/dist/client/assets/{seo-editor-Cxh8JRxE.js → seo-editor-CoW5u7nN.js} +1 -1
- package/dist/client/assets/{settings-layout-D-wc3B9V.js → settings-layout-CM35yCas.js} +1 -1
- package/dist/client/assets/{settings-section-Z9R6HthO.js → settings-section-BJKYi71q.js} +1 -1
- package/dist/client/assets/{shell-controls-DJv-74jc.js → shell-controls-BLKKFd-i.js} +1 -1
- package/dist/client/assets/{shell-layout-C7_zhx2J.js → shell-layout-Cem8gTbL.js} +1 -1
- package/dist/client/assets/{sidebar-CGksZnes.js → sidebar-4JG4Ky1v.js} +1 -1
- package/dist/client/assets/{skeleton-BpfjGmFh.js → skeleton-QaXxQA1G.js} +1 -1
- package/dist/client/assets/{spinner-D0HY4fdO.js → spinner-CyUVcOie.js} +1 -1
- package/dist/client/assets/{sso-Bz5k2CGO.js → sso-CCHd62CO.js} +1 -1
- package/dist/client/assets/{store-DT_Iylxw.js → store-lf3dlAB1.js} +1 -1
- package/dist/client/assets/store-registry-BTA3Me55.js +2 -0
- package/dist/client/assets/{studio-tools-ChooDZCt.js → studio-tools-CUWFqlTh.js} +1 -1
- package/dist/client/assets/{switch-BmoPsk_L.js → switch-1Vfz3uSg.js} +1 -1
- package/dist/client/assets/{tab-id-DpWn0fbM.js → tab-id-CI2T4n3l.js} +1 -1
- package/dist/client/assets/{table-BluVU23Z.js → table-BQAbKOYa.js} +1 -1
- package/dist/client/assets/{tabs-C9Dri0XB.js → tabs-qagPrFeg.js} +1 -1
- package/dist/client/assets/{textarea-CMhJIDqb.js → textarea-C3WLqu3y.js} +1 -1
- package/dist/client/assets/{toggle-group-BK4yx2ic.js → toggle-group-NXghphbz.js} +1 -1
- package/dist/client/assets/{toolbar-CJN41Q0U.js → toolbar-ZE2CENTf.js} +1 -1
- package/dist/client/assets/{tooltip-DCC06XNr.js → tooltip-CiyZj9MW.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CTGRuhSY.js → use-ai-providers-B6AoVltc.js} +1 -1
- package/dist/client/assets/{use-automations-CTEnO1Zu.js → use-automations-CiQS3Pmq.js} +1 -1
- package/dist/client/assets/{use-autosave-CgHGIUlv.js → use-autosave-DE9X8qzD.js} +1 -1
- package/dist/client/assets/{use-capability-BTlnzwER.js → use-capability-DX60Hp0S.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Dg1-zfZ4.js → use-clock-tick-Q8CgV2VU.js} +1 -1
- package/dist/client/assets/{use-connection-BTIHIL2U.js → use-connection-c87Xz8U-.js} +1 -1
- package/dist/client/assets/{use-copy-Bkx7pWID.js → use-copy-BPhBM3Oi.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-ClJmipur.js → use-create-virtual-mcp-BnZL3DPb.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Dp_dA5sI.js → use-debounced-autosave-BmT6bwNL.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Dx_Znjq0.js → use-debounced-value-DViZw7k7.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CnnQh7bH.js → use-deco-credits-DJJXk8t9.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-B84Jbaf1.js → use-decopilot-events-DuMl-BWe.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Dd7d9SGg.js → use-delete-connection--jtVGLkv.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CElXlSvL.js → use-deployment-admin-Cr_7c4Yl.js} +1 -1
- package/dist/client/assets/{use-file-configs-DUlhqIgH.js → use-file-configs-CwjnQywn.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CRM4xUSx.js → use-infinite-scroll-8IyahDR0.js} +1 -1
- package/dist/client/assets/{use-join-requests-B0JwpKM9.js → use-join-requests-tHCwhSs3.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DH8oUnNS.js → use-mcp-auth-status-sjpR15R6.js} +1 -1
- package/dist/client/assets/{use-mcp-client-C78T1evw.js → use-mcp-client-BmnPrlCp.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-qcP_UOWU.js → use-mcp-tools-B9U_ZOEs.js} +1 -1
- package/dist/client/assets/{use-members-5U5mLxdD.js → use-members-BglXgqfG.js} +1 -1
- package/dist/client/assets/{use-mobile-BufL0gpx.js → use-mobile-ZF_jSfPp.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-bcvHJsmR.js → use-navigate-to-agent-DIeI8ULY.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B93vTKrZ.js → use-org-auth-client-C-GSCd--.js} +1 -1
- package/dist/client/assets/{use-org-sso-BpALHDeh.js → use-org-sso-BawqtY1O.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CHjz2_ga.js → use-organization-roles-BfAcHhLm.js} +1 -1
- package/dist/client/assets/{use-organization-settings-rcLpLxq6.js → use-organization-settings-DcixnwK-.js} +1 -1
- package/dist/client/assets/{use-registry-connections-XjUGFr5z.js → use-registry-connections-VIMCCdEN.js} +1 -1
- package/dist/client/assets/{use-secrets-DVGBRr0e.js → use-secrets-DN6xkhJI.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CNPY1kJ-.js → use-status-sounds-CVssdpKX.js} +1 -1
- package/dist/client/assets/{use-tags-d-ihZKch.js → use-tags-OVuXWbIz.js} +1 -1
- package/dist/client/assets/{use-view-mode-CxLEvfyI.js → use-view-mode-BdkdIEp5.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-tTUO8PD5.js → use-virtual-mcp-BIQdKSoy.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-QTu-xaep.js +1 -0
- package/dist/client/assets/{useQueries-CX-pbcRo.js → useQueries-D2CKhSr2.js} +1 -1
- package/dist/client/assets/{useRouterState-DM9ViZSm.js → useRouterState-B0tRZSRp.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-_f32It26.js +1 -0
- package/dist/client/assets/{users-hps1B13C.js → users-Xgmv3XAu.js} +1 -1
- package/dist/client/assets/{variant-calendar--g4p8stV.js → variant-calendar-CHbHmJQD.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Cn3ICdtv.js → view-mode-toggle-DTYJdfuz.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +766 -766
- package/dist/server/server.js +576 -576
- package/package.json +2 -4
- package/dist/client/assets/project-app-view-CZZgc1s8.js +0 -1
- package/dist/client/assets/record-editor-Bk_Re_fD.js +0 -1
- package/dist/client/assets/registry-BTKEcIS_.js +0 -2
- package/dist/client/assets/store-registry-DwAm5lvb.js +0 -2
- package/dist/client/assets/useInfiniteQuery-C1ye6sqf.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CiYM_Dv6.js +0 -1
- package/dist/server/node_modules/@resvg/resvg-js/LICENSE +0 -373
- package/dist/server/node_modules/@resvg/resvg-js/README.md +0 -314
- package/dist/server/node_modules/@resvg/resvg-js/index.js +0 -23
- package/dist/server/node_modules/@resvg/resvg-js/js-binding.js +0 -1
- package/dist/server/node_modules/@resvg/resvg-js/package.json +0 -152
- package/dist/server/node_modules/@shuding/opentype.js/LICENSE +0 -20
- package/dist/server/node_modules/@shuding/opentype.js/README.md +0 -9
- package/dist/server/node_modules/@shuding/opentype.js/RELEASES.md +0 -272
- package/dist/server/node_modules/@shuding/opentype.js/bin/ot +0 -84
- package/dist/server/node_modules/@shuding/opentype.js/bin/server.js +0 -64
- package/dist/server/node_modules/@shuding/opentype.js/bin/test-render +0 -96
- package/dist/server/node_modules/@shuding/opentype.js/dist/opentype.js +0 -11655
- package/dist/server/node_modules/@shuding/opentype.js/dist/opentype.min.js +0 -2
- package/dist/server/node_modules/@shuding/opentype.js/dist/opentype.module.js +0 -11639
- package/dist/server/node_modules/@shuding/opentype.js/package.json +0 -73
- package/dist/server/node_modules/@shuding/opentype.js/src/bbox.js +0 -158
- package/dist/server/node_modules/@shuding/opentype.js/src/bidi.js +0 -243
- package/dist/server/node_modules/@shuding/opentype.js/src/char.js +0 -43
- package/dist/server/node_modules/@shuding/opentype.js/src/check.js +0 -16
- package/dist/server/node_modules/@shuding/opentype.js/src/encoding.js +0 -1032
- package/dist/server/node_modules/@shuding/opentype.js/src/features/applySubstitution.js +0 -74
- package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/arabicPresentationForms.js +0 -83
- package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/arabicRequiredLigatures.js +0 -41
- package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/contextCheck/arabicSentence.js +0 -43
- package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/contextCheck/arabicWord.js +0 -31
- package/dist/server/node_modules/@shuding/opentype.js/src/features/featureQuery.js +0 -483
- package/dist/server/node_modules/@shuding/opentype.js/src/features/latn/contextCheck/latinWord.js +0 -31
- package/dist/server/node_modules/@shuding/opentype.js/src/features/latn/latinLigatures.js +0 -40
- package/dist/server/node_modules/@shuding/opentype.js/src/font.js +0 -433
- package/dist/server/node_modules/@shuding/opentype.js/src/glyph.js +0 -274
- package/dist/server/node_modules/@shuding/opentype.js/src/glyphset.js +0 -150
- package/dist/server/node_modules/@shuding/opentype.js/src/hintingtt.js +0 -3062
- package/dist/server/node_modules/@shuding/opentype.js/src/index.js +0 -5
- package/dist/server/node_modules/@shuding/opentype.js/src/layout.js +0 -357
- package/dist/server/node_modules/@shuding/opentype.js/src/opentype.js +0 -375
- package/dist/server/node_modules/@shuding/opentype.js/src/parse.js +0 -628
- package/dist/server/node_modules/@shuding/opentype.js/src/path.js +0 -212
- package/dist/server/node_modules/@shuding/opentype.js/src/position.js +0 -77
- package/dist/server/node_modules/@shuding/opentype.js/src/substitution.js +0 -447
- package/dist/server/node_modules/@shuding/opentype.js/src/table.js +0 -215
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/cff.js +0 -1156
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/cmap.js +0 -145
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/fvar.js +0 -71
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/gdef.js +0 -62
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/glyf.js +0 -349
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/gpos.js +0 -146
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/gsub.js +0 -251
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/head.js +0 -35
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/hhea.js +0 -27
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/hmtx.js +0 -51
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/kern.js +0 -69
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/loca.js +0 -31
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/ltag.js +0 -33
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/maxp.js +0 -32
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/meta.js +0 -30
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/name.js +0 -680
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/os2.js +0 -65
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/post.js +0 -41
- package/dist/server/node_modules/@shuding/opentype.js/src/tokenizer.js +0 -522
- package/dist/server/node_modules/@shuding/opentype.js/src/types.js +0 -976
- package/dist/server/node_modules/@shuding/opentype.js/src/util.js +0 -17
- package/dist/server/node_modules/base64-js/.travis.yml +0 -5
- package/dist/server/node_modules/base64-js/LICENSE.MIT +0 -21
- package/dist/server/node_modules/base64-js/README.md +0 -31
- package/dist/server/node_modules/base64-js/bench/bench.js +0 -19
- package/dist/server/node_modules/base64-js/lib/b64.js +0 -124
- package/dist/server/node_modules/base64-js/package.json +0 -34
- package/dist/server/node_modules/base64-js/test/convert.js +0 -51
- package/dist/server/node_modules/base64-js/test/url-safe.js +0 -18
- package/dist/server/node_modules/camelize/.eslintrc +0 -24
- package/dist/server/node_modules/camelize/.github/FUNDING.yml +0 -12
- package/dist/server/node_modules/camelize/CHANGELOG.md +0 -64
- package/dist/server/node_modules/camelize/LICENSE +0 -18
- package/dist/server/node_modules/camelize/README.md +0 -81
- package/dist/server/node_modules/camelize/example/camel.js +0 -12
- package/dist/server/node_modules/camelize/index.js +0 -61
- package/dist/server/node_modules/camelize/package.json +0 -84
- package/dist/server/node_modules/camelize/test/camel.js +0 -48
- package/dist/server/node_modules/color-name/LICENSE +0 -8
- package/dist/server/node_modules/color-name/README.md +0 -11
- package/dist/server/node_modules/color-name/index.js +0 -152
- package/dist/server/node_modules/color-name/package.json +0 -28
- package/dist/server/node_modules/css-background-parser/LICENSE +0 -22
- package/dist/server/node_modules/css-background-parser/README.md +0 -149
- package/dist/server/node_modules/css-background-parser/index.js +0 -162
- package/dist/server/node_modules/css-background-parser/package.json +0 -19
- package/dist/server/node_modules/css-box-shadow/README.md +0 -27
- package/dist/server/node_modules/css-box-shadow/index.js +0 -64
- package/dist/server/node_modules/css-box-shadow/package.json +0 -14
- package/dist/server/node_modules/css-box-shadow/test.js +0 -204
- package/dist/server/node_modules/css-color-keywords/LICENSE +0 -15
- package/dist/server/node_modules/css-color-keywords/README.md +0 -47
- package/dist/server/node_modules/css-color-keywords/colors.json +0 -148
- package/dist/server/node_modules/css-color-keywords/index.js +0 -3
- package/dist/server/node_modules/css-color-keywords/package.json +0 -27
- package/dist/server/node_modules/css-gradient-parser/LICENSE +0 -21
- package/dist/server/node_modules/css-gradient-parser/README.md +0 -75
- package/dist/server/node_modules/css-gradient-parser/dist/index.cjs +0 -2
- package/dist/server/node_modules/css-gradient-parser/dist/index.js +0 -2
- package/dist/server/node_modules/css-gradient-parser/package.json +0 -54
- package/dist/server/node_modules/css-to-react-native/LICENSE.md +0 -21
- package/dist/server/node_modules/css-to-react-native/README.md +0 -115
- package/dist/server/node_modules/css-to-react-native/index.js +0 -886
- package/dist/server/node_modules/css-to-react-native/package.json +0 -65
- package/dist/server/node_modules/css-to-react-native/src/TokenStream.js +0 -74
- package/dist/server/node_modules/css-to-react-native/src/__tests__/aspectRatio.js +0 -23
- package/dist/server/node_modules/css-to-react-native/src/__tests__/border.js +0 -85
- package/dist/server/node_modules/css-to-react-native/src/__tests__/borderColor.js +0 -37
- package/dist/server/node_modules/css-to-react-native/src/__tests__/boxModel.js +0 -136
- package/dist/server/node_modules/css-to-react-native/src/__tests__/boxShadow.js +0 -83
- package/dist/server/node_modules/css-to-react-native/src/__tests__/colors.js +0 -31
- package/dist/server/node_modules/css-to-react-native/src/__tests__/flex.js +0 -122
- package/dist/server/node_modules/css-to-react-native/src/__tests__/flexFlow.js +0 -22
- package/dist/server/node_modules/css-to-react-native/src/__tests__/font.js +0 -117
- package/dist/server/node_modules/css-to-react-native/src/__tests__/fontFamily.js +0 -43
- package/dist/server/node_modules/css-to-react-native/src/__tests__/fontVariant.js +0 -15
- package/dist/server/node_modules/css-to-react-native/src/__tests__/fontWeight.js +0 -8
- package/dist/server/node_modules/css-to-react-native/src/__tests__/index.js +0 -204
- package/dist/server/node_modules/css-to-react-native/src/__tests__/placeContent.js +0 -19
- package/dist/server/node_modules/css-to-react-native/src/__tests__/shadowOffsets.js +0 -13
- package/dist/server/node_modules/css-to-react-native/src/__tests__/textDecoration.js +0 -103
- package/dist/server/node_modules/css-to-react-native/src/__tests__/textDecorationLine.js +0 -23
- package/dist/server/node_modules/css-to-react-native/src/__tests__/textShadow.js +0 -30
- package/dist/server/node_modules/css-to-react-native/src/__tests__/transform.js +0 -55
- package/dist/server/node_modules/css-to-react-native/src/__tests__/units.js +0 -132
- package/dist/server/node_modules/css-to-react-native/src/devPropertiesWithoutUnitsRegExp.js +0 -19
- package/dist/server/node_modules/css-to-react-native/src/index.js +0 -90
- package/dist/server/node_modules/css-to-react-native/src/tokenTypes.js +0 -75
- package/dist/server/node_modules/css-to-react-native/src/transforms/aspectRatio.js +0 -12
- package/dist/server/node_modules/css-to-react-native/src/transforms/border.js +0 -53
- package/dist/server/node_modules/css-to-react-native/src/transforms/boxShadow.js +0 -11
- package/dist/server/node_modules/css-to-react-native/src/transforms/flex.js +0 -65
- package/dist/server/node_modules/css-to-react-native/src/transforms/flexFlow.js +0 -37
- package/dist/server/node_modules/css-to-react-native/src/transforms/font.js +0 -63
- package/dist/server/node_modules/css-to-react-native/src/transforms/fontFamily.js +0 -20
- package/dist/server/node_modules/css-to-react-native/src/transforms/fontVariant.js +0 -14
- package/dist/server/node_modules/css-to-react-native/src/transforms/index.js +0 -77
- package/dist/server/node_modules/css-to-react-native/src/transforms/placeContent.js +0 -24
- package/dist/server/node_modules/css-to-react-native/src/transforms/textDecoration.js +0 -53
- package/dist/server/node_modules/css-to-react-native/src/transforms/textDecorationLine.js +0 -18
- package/dist/server/node_modules/css-to-react-native/src/transforms/textShadow.js +0 -10
- package/dist/server/node_modules/css-to-react-native/src/transforms/transform.js +0 -74
- package/dist/server/node_modules/css-to-react-native/src/transforms/util.js +0 -99
- package/dist/server/node_modules/hex-rgb/index.js +0 -47
- package/dist/server/node_modules/hex-rgb/license +0 -9
- package/dist/server/node_modules/hex-rgb/package.json +0 -39
- package/dist/server/node_modules/hex-rgb/readme.md +0 -86
- package/dist/server/node_modules/linebreak/LICENSE +0 -21
- package/dist/server/node_modules/linebreak/dist/main.cjs +0 -1369
- package/dist/server/node_modules/linebreak/dist/module.mjs +0 -1368
- package/dist/server/node_modules/linebreak/package.json +0 -57
- package/dist/server/node_modules/linebreak/readme.md +0 -62
- package/dist/server/node_modules/parse-css-color/CHANGELOG.md +0 -54
- package/dist/server/node_modules/parse-css-color/LICENSE +0 -21
- package/dist/server/node_modules/parse-css-color/README.md +0 -110
- package/dist/server/node_modules/parse-css-color/dist/index.cjs.js +0 -171
- package/dist/server/node_modules/parse-css-color/dist/index.esm.js +0 -167
- package/dist/server/node_modules/parse-css-color/dist/index.umd.js +0 -7
- package/dist/server/node_modules/parse-css-color/package.json +0 -55
- package/dist/server/node_modules/postcss-value-parser/LICENSE +0 -22
- package/dist/server/node_modules/postcss-value-parser/README.md +0 -263
- package/dist/server/node_modules/postcss-value-parser/lib/index.js +0 -28
- package/dist/server/node_modules/postcss-value-parser/lib/parse.js +0 -321
- package/dist/server/node_modules/postcss-value-parser/lib/stringify.js +0 -48
- package/dist/server/node_modules/postcss-value-parser/lib/unit.js +0 -120
- package/dist/server/node_modules/postcss-value-parser/lib/walk.js +0 -22
- package/dist/server/node_modules/postcss-value-parser/package.json +0 -58
- package/dist/server/node_modules/satori/LICENSE +0 -373
- package/dist/server/node_modules/satori/README.md +0 -516
- package/dist/server/node_modules/satori/dist/index.cjs +0 -8
- package/dist/server/node_modules/satori/dist/index.cjs.LEGAL.txt +0 -4
- package/dist/server/node_modules/satori/dist/index.js +0 -8
- package/dist/server/node_modules/satori/dist/index.js.LEGAL.txt +0 -4
- package/dist/server/node_modules/satori/dist/jsx/index.cjs +0 -2
- package/dist/server/node_modules/satori/dist/jsx/index.cjs.LEGAL.txt +0 -0
- package/dist/server/node_modules/satori/dist/jsx/index.js +0 -2
- package/dist/server/node_modules/satori/dist/jsx/index.js.LEGAL.txt +0 -0
- package/dist/server/node_modules/satori/dist/jsx/jsx-runtime.cjs +0 -2
- package/dist/server/node_modules/satori/dist/jsx/jsx-runtime.cjs.LEGAL.txt +0 -0
- package/dist/server/node_modules/satori/dist/jsx/jsx-runtime.js +0 -2
- package/dist/server/node_modules/satori/dist/jsx/jsx-runtime.js.LEGAL.txt +0 -0
- package/dist/server/node_modules/satori/dist/standalone.cjs +0 -8
- package/dist/server/node_modules/satori/dist/standalone.cjs.LEGAL.txt +0 -4
- package/dist/server/node_modules/satori/dist/standalone.js +0 -8
- package/dist/server/node_modules/satori/dist/standalone.js.LEGAL.txt +0 -4
- package/dist/server/node_modules/satori/package.json +0 -149
- package/dist/server/node_modules/satori/yoga.wasm +0 -0
- package/dist/server/node_modules/tiny-inflate/LICENSE +0 -21
- package/dist/server/node_modules/tiny-inflate/index.js +0 -375
- package/dist/server/node_modules/tiny-inflate/package.json +0 -28
- package/dist/server/node_modules/tiny-inflate/readme.md +0 -31
- package/dist/server/node_modules/tiny-inflate/test/index.js +0 -75
- package/dist/server/node_modules/tiny-inflate/test/lorem.txt +0 -199
- package/dist/server/node_modules/unicode-trie/LICENSE +0 -8
- package/dist/server/node_modules/unicode-trie/README.md +0 -77
- package/dist/server/node_modules/unicode-trie/builder.js +0 -966
- package/dist/server/node_modules/unicode-trie/index.js +0 -136
- package/dist/server/node_modules/unicode-trie/package.json +0 -27
- package/dist/server/node_modules/unicode-trie/swap.js +0 -25
- package/dist/server/node_modules/unicode-trie/test/mocha.opts +0 -1
- package/dist/server/node_modules/unicode-trie/test/test.js +0 -243
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "linebreak",
|
|
3
|
-
"version": "1.1.0",
|
|
4
|
-
"description": "An implementation of the Unicode Line Breaking Algorithm (UAX #14)",
|
|
5
|
-
"source": "src/linebreaker.js",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "dist/main.cjs",
|
|
8
|
-
"module": "dist/module.mjs",
|
|
9
|
-
"exports": {
|
|
10
|
-
"require": "./dist/main.cjs",
|
|
11
|
-
"import": "./dist/module.mjs"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"dist"
|
|
15
|
-
],
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "https://github.com/devongovett/linebreaker.git"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"unicode",
|
|
22
|
-
"text",
|
|
23
|
-
"wrapping"
|
|
24
|
-
],
|
|
25
|
-
"author": "Devon Govett <devongovett@gmail.com>",
|
|
26
|
-
"license": "MIT",
|
|
27
|
-
"bugs": {
|
|
28
|
-
"url": "https://github.com/devongovett/linebreaker/issues"
|
|
29
|
-
},
|
|
30
|
-
"homepage": "https://github.com/devongovett/linebreaker",
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"base64-js": "0.0.8",
|
|
33
|
-
"unicode-trie": "^2.0.0"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"mocha": "^10.0.0",
|
|
37
|
-
"parcel": "^2.5.0",
|
|
38
|
-
"request": "^2.88.0"
|
|
39
|
-
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"test": "parcel build && mocha --reporter landing",
|
|
42
|
-
"build": "parcel build",
|
|
43
|
-
"prepublishOnly": "parcel build"
|
|
44
|
-
},
|
|
45
|
-
"targets": {
|
|
46
|
-
"main": {
|
|
47
|
-
"includeNodeModules": [
|
|
48
|
-
"fs"
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
"module": {
|
|
52
|
-
"includeNodeModules": [
|
|
53
|
-
"fs"
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# linebreak
|
|
2
|
-
An implementation of the Unicode Line Breaking Algorithm (UAX #14)
|
|
3
|
-
|
|
4
|
-
> Line breaking, also known as word wrapping, is the process of breaking a section of text into lines such that it will fit in the
|
|
5
|
-
> available width of a page, window or other display area. The Unicode Line Breaking Algorithm performs part of this process.
|
|
6
|
-
> Given an input text, it produces a set of positions called "break opportunities" that are appropriate points to begin a new line.
|
|
7
|
-
> The selection of actual line break positions from the set of break opportunities is not covered by the Unicode Line Breaking Algorithm,
|
|
8
|
-
> but is in the domain of higher level software with knowledge of the available width and the display size of the text.
|
|
9
|
-
|
|
10
|
-
This is a JavaScript implementation of the [Unicode Line Breaking Algorithm](http://www.unicode.org/reports/tr14/#SampleCode) for Node.js
|
|
11
|
-
(and browsers I guess). Currently supports Unicode version 13. It is used by [PDFKit](http://github.com/devongovett/pdfkit/) for
|
|
12
|
-
line wrapping text in PDF documents, but since the algorithm knows nothing about the actual visual appearance or layout of text,
|
|
13
|
-
it could be used for other things as well.
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
You can install via npm
|
|
18
|
-
|
|
19
|
-
npm install linebreak
|
|
20
|
-
|
|
21
|
-
## Example
|
|
22
|
-
|
|
23
|
-
```javascript
|
|
24
|
-
var LineBreaker = require('linebreak');
|
|
25
|
-
|
|
26
|
-
var lorem = 'lorem ipsum...';
|
|
27
|
-
var breaker = new LineBreaker(lorem);
|
|
28
|
-
var last = 0;
|
|
29
|
-
var bk;
|
|
30
|
-
|
|
31
|
-
while (bk = breaker.nextBreak()) {
|
|
32
|
-
// get the string between the last break and this one
|
|
33
|
-
var word = lorem.slice(last, bk.position);
|
|
34
|
-
console.log(word);
|
|
35
|
-
|
|
36
|
-
// you can also check bk.required to see if this was a required break...
|
|
37
|
-
if (bk.required) {
|
|
38
|
-
console.log('\n\n');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
last = bk.position;
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Development Notes
|
|
46
|
-
|
|
47
|
-
In order to use the library, you shouldn't need to know this, but if you're interested in
|
|
48
|
-
contributing or fixing bugs, these things might be of interest.
|
|
49
|
-
|
|
50
|
-
* The `src/classes.js` file is automatically generated from `LineBreak.txt` in the Unicode
|
|
51
|
-
database by `src/generate_data.js`. It should be rare that you need to run this, but
|
|
52
|
-
you may if, for instance, you want to change the Unicode version.
|
|
53
|
-
|
|
54
|
-
* You can run the tests using `npm test`. They are written using `mocha`, and generated from
|
|
55
|
-
`LineBreakTest.txt` from the Unicode database, which is included in the repository for performance
|
|
56
|
-
reasons while running them. About 50 of the over 7600 tests are currently skipped due to
|
|
57
|
-
implementation differences. It appears that some of the tests may be wrong or use different
|
|
58
|
-
tailoring from the spec.
|
|
59
|
-
|
|
60
|
-
## License
|
|
61
|
-
|
|
62
|
-
MIT
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [Unreleased]
|
|
4
|
-
|
|
5
|
-
## [0.2.1] - [#16](https://github.com/noeldelgado/parse-css-color/pull/16) - 2022-04-07
|
|
6
|
-
### Fixed
|
|
7
|
-
- index.d.ts [#15](https://github.com/noeldelgado/parse-css-color/pull/15)
|
|
8
|
-
|
|
9
|
-
### Added
|
|
10
|
-
- README: badges(librariesio, lgtm) [f36810e](https://github.com/noeldelgado/parse-css-color/commit/f36810ec81da9352e078a2ebe5dcdee4635e8735)
|
|
11
|
-
|
|
12
|
-
## [0.2.0] - [#12](https://github.com/noeldelgado/parse-css-color/pull/12) - 2022-03-16
|
|
13
|
-
### Added
|
|
14
|
-
- Type definitions [c0ec124](https://github.com/noeldelgado/parse-css-color/commit/c0ec124f398036f4a03d8ede41fd2d83e3e142c7)
|
|
15
|
-
|
|
16
|
-
## [0.1.2] - [#2](https://github.com/noeldelgado/parse-css-color/pull/2) - 2020-05-19
|
|
17
|
-
### Added
|
|
18
|
-
- unpkg CDN [bc542b9](https://github.com/noeldelgado/parse-css-color/commit/bc542b962c0eb04127c6d48fde5a2daec9f31589)
|
|
19
|
-
- jsDelivr CDN [5fb8022](https://github.com/noeldelgado/parse-css-color/commit/5fb8022aa323bc86298a32bd9fbb85c403885804)
|
|
20
|
-
- more input tests:
|
|
21
|
-
- empty, undefined, null [57e4b08](https://github.com/noeldelgado/parse-css-color/commit/57e4b088c8eaa2a7c59911ab599211f7e958e1c8)
|
|
22
|
-
- false, true, 0, 1 [f4b1032](https://github.com/noeldelgado/parse-css-color/commit/f4b103227c741b80ba7e1d9338f8ec422ce8d8f5)
|
|
23
|
-
|
|
24
|
-
### Fixed
|
|
25
|
-
- return null if input is not string [8c203de](https://github.com/noeldelgado/parse-css-color/commit/8c203ded32e1e287a2c8ba84b926f18722887ca7)
|
|
26
|
-
|
|
27
|
-
## [0.1.1] - [#1](https://github.com/noeldelgado/parse-css-color/pull/1) - 2020-05-19
|
|
28
|
-
### Added
|
|
29
|
-
- add related projects [9d229e6](https://github.com/noeldelgado/parse-css-color/commit/9d229e6dcd7b20801a522b30c7b419e4d3619352) [c81fe20](https://github.com/noeldelgado/parse-css-color/commit/c81fe2060bb2da0bb13a6091a5d7ec24d984184c)
|
|
30
|
-
- add CHANGELOG [29d92b4](https://github.com/noeldelgado/parse-css-color/commit/29d92b4ef93e6fd3a337afb20058eae24b5c7712)
|
|
31
|
-
- add currentColor and inherit fail tests [fd85e7b](https://github.com/noeldelgado/parse-css-color/commit/fd85e7b70ca425f06d364fe3350cfc418fa5874e)
|
|
32
|
-
|
|
33
|
-
### Changed
|
|
34
|
-
- move distributed files to dist folder instead of lib (for npm) [1af0a5d](https://github.com/noeldelgado/parse-css-color/commit/1af0a5d7b3c86620c6e3bd52df0b560099d23392)
|
|
35
|
-
- rename digit/number [5f75605](https://github.com/noeldelgado/parse-css-color/commit/5f75605c9c8135a8855e234dd1b28f052ce86f7c)
|
|
36
|
-
|
|
37
|
-
### Removed
|
|
38
|
-
- remove lib files from source code [d6591d3](https://github.com/noeldelgado/parse-css-color/commit/d6591d38824e68d0f3768cc61f8b4ba79384f35c)
|
|
39
|
-
|
|
40
|
-
## [0.1.0] - 2020-05-18
|
|
41
|
-
### Added
|
|
42
|
-
- support for:
|
|
43
|
-
- #RGB|A, #RRGGBB|AA
|
|
44
|
-
- RGB|A module level 3 and 4
|
|
45
|
-
- HSL|A module level 3 and 4
|
|
46
|
-
- color keywords
|
|
47
|
-
- transparent
|
|
48
|
-
|
|
49
|
-
[Unreleased]: https://github.com/noeldelgado/parse-css-color/compare/v0.2.1...HEAD
|
|
50
|
-
[0.2.1]: https://github.com/noeldelgado/parse-css-color/compare/v0.2.0...v0.2.1
|
|
51
|
-
[0.2.0]: https://github.com/noeldelgado/parse-css-color/compare/v0.1.2...v0.2.0
|
|
52
|
-
[0.1.2]: https://github.com/noeldelgado/parse-css-color/compare/v0.1.1...v0.1.2
|
|
53
|
-
[0.1.1]: https://github.com/noeldelgado/parse-css-color/compare/v0.1.0...v0.1.1
|
|
54
|
-
[0.1.0]: https://github.com/noeldelgado/parse-css-color/releases/tag/v0.1.0
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) Noel Delgado <pixelia.me@gmail.com> (pixelia.me)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# parse-css-color
|
|
2
|
-
[![NPM Version][npm-image]][npm-url]
|
|
3
|
-

|
|
4
|
-
[![License][license-img]][license-url]
|
|
5
|
-
[![Known Vulnerabilities][snyk-img]][snyk-url]
|
|
6
|
-
[![Libraries.io dependency status for latest release][librariesio-img]][librariesio-url]
|
|
7
|
-
[![Total alerts][lgtm-image]][lgtm-url]
|
|
8
|
-
[![Language grade: JavaScript][lgtm-grade-image]][lgtm-grade-url]
|
|
9
|
-
|
|
10
|
-
Parse a CSS color string.
|
|
11
|
-
|
|
12
|
-
### Supports
|
|
13
|
-
* \<color value\>
|
|
14
|
-
* Hexadecimal RGB value: #RGB #RRGGBB
|
|
15
|
-
* #RGBA #RRGGBBAA (4 and 8-digit hexadecimal RGBA notation)
|
|
16
|
-
* RGB/A color module level 3 and 4 (number, percentage)
|
|
17
|
-
* HSL/A color module level 3 and 4 (number, deg, rad, turn)
|
|
18
|
-
* \<color keyword\>
|
|
19
|
-
* One of the [pre-defined color keywords](https://www.w3.org/wiki/CSS/Properties/color/keywords).
|
|
20
|
-
* transparent
|
|
21
|
-
* Shorthand for transparent black, rgba(0,0,0,0).
|
|
22
|
-
|
|
23
|
-
### Does not support
|
|
24
|
-
* currentColor
|
|
25
|
-
* inherit
|
|
26
|
-
|
|
27
|
-
## Installation
|
|
28
|
-
|
|
29
|
-
**NPM**
|
|
30
|
-
|
|
31
|
-
```sh
|
|
32
|
-
npm i parse-css-color
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Or as a `<script>` tag from a CDN as `parseCssColor`:
|
|
36
|
-
|
|
37
|
-
**Unpkg CDN**
|
|
38
|
-
|
|
39
|
-
```html
|
|
40
|
-
<script src="https://unpkg.com/parse-css-color"></script>
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**jsDelivr CDN**
|
|
44
|
-
|
|
45
|
-
```html
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/parse-css-color"></script>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Usage
|
|
50
|
-
```js
|
|
51
|
-
import parse from 'parse-css-color'
|
|
52
|
-
|
|
53
|
-
// HEX/A
|
|
54
|
-
parse('#00f')
|
|
55
|
-
//> { type: 'rgb', values: [0, 0, 255], alpha: 1 }
|
|
56
|
-
parse('#00f8')
|
|
57
|
-
//> { type: 'rgb', values: [0, 0, 255], alpha: 0.5333333333333333 }
|
|
58
|
-
parse('#0000FF80')
|
|
59
|
-
//> { type: 'rgb', values: [0, 0, 255], alpha: 0.5019607843137255 }
|
|
60
|
-
parse('#00g')
|
|
61
|
-
//> null
|
|
62
|
-
|
|
63
|
-
// HSL/A
|
|
64
|
-
parse('hsl(270deg 60% 70% / 25%)')
|
|
65
|
-
//> { type: 'hsl', values: [270, 60, 70], alpha: 0.25 }
|
|
66
|
-
parse('hsl(4.71239rad 260% -70% / 0.5)') // clipped to
|
|
67
|
-
//> { type: 'hsl', values: [270, 100, 0], alpha: 0.5 }
|
|
68
|
-
parse('hsla(.75turn, 60%, 70%, 50%)')
|
|
69
|
-
//> { type: 'hsl', values: [270, 60, 70], alpha: 0.5 }
|
|
70
|
-
parse('hsla(100deg 0 0 / 0)') // error: missing percetanges
|
|
71
|
-
//> null
|
|
72
|
-
|
|
73
|
-
// RGB/A
|
|
74
|
-
parse('rgb(255 0 0 / 0.5)')
|
|
75
|
-
//> { type: 'rgb', values: [255, 0, 0], alpha: 0.5 }
|
|
76
|
-
parse('rgb(500 -100 0 / 200%)') // clipped to
|
|
77
|
-
//> { type: 'rgb', values: [255, 0, 0], alpha: 1 }
|
|
78
|
-
parse('rgba(255, 0, 255, 20%)')
|
|
79
|
-
//> { type: 'rgb', values: [255, 0, 255], alpha: 0.2 }
|
|
80
|
-
parse('rgba(100% 255 100% / 0)') // error: mixed percetange with integer
|
|
81
|
-
//> null
|
|
82
|
-
```
|
|
83
|
-
See [tests](https://github.com/noeldelgado/parse-css-color/tree/master/test) for more cases.
|
|
84
|
-
|
|
85
|
-
## Dev
|
|
86
|
-
```sh
|
|
87
|
-
npm install # install dependencies
|
|
88
|
-
npm test # run the tests (append `-- -w`) to watch
|
|
89
|
-
npm run dev # watch for changes and rebuild
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Related
|
|
93
|
-
- [mix-css-color](https://github.com/noeldelgado/mix-css-color) - Mix two CSS colors together in variable proportion. Opacity is included in the calculations.
|
|
94
|
-
- [values.js](https://github.com/noeldelgado/values.js) - Get the tints and shades of a CSS color.
|
|
95
|
-
|
|
96
|
-
## License
|
|
97
|
-
MIT © [Noel Delgado](http://pixelia.me/)
|
|
98
|
-
|
|
99
|
-
[npm-image]: https://img.shields.io/npm/v/parse-css-color.svg?logo=npm&label=NPM
|
|
100
|
-
[npm-url]: https://www.npmjs.com/package/parse-css-color
|
|
101
|
-
[license-img]: https://img.shields.io/npm/l/parse-css-color
|
|
102
|
-
[license-url]: https://github.com/noeldelgado/parse-css-color/blob/master/LICENSE
|
|
103
|
-
[snyk-img]: https://snyk.io/test/npm/parse-css-color/badge.svg
|
|
104
|
-
[snyk-url]: https://snyk.io/test/npm/parse-css-color
|
|
105
|
-
[librariesio-img]: https://img.shields.io/librariesio/release/npm/parse-css-color.svg?logo=librariesdotio
|
|
106
|
-
[librariesio-url]: https://libraries.io/npm/parse-css-color
|
|
107
|
-
[lgtm-image]: https://img.shields.io/lgtm/alerts/g/noeldelgado/parse-css-color.svg?logo=lgtm&logoWidth=18
|
|
108
|
-
[lgtm-url]: https://lgtm.com/projects/g/noeldelgado/parse-css-color/alerts/
|
|
109
|
-
[lgtm-grade-image]: https://img.shields.io/lgtm/grade/javascript/g/noeldelgado/parse-css-color.svg?logo=lgtm&logoWidth=18
|
|
110
|
-
[lgtm-grade-url]: https://lgtm.com/projects/g/noeldelgado/parse-css-color/context:javascript
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
-
|
|
5
|
-
var colorName = _interopDefault(require('color-name'));
|
|
6
|
-
var hex2Rgb = _interopDefault(require('hex-rgb'));
|
|
7
|
-
|
|
8
|
-
const pattern = /^#([a-f0-9]{3,4}|[a-f0-9]{4}(?:[a-f0-9]{2}){1,2})\b$/;
|
|
9
|
-
var hexRe = new RegExp(pattern, 'i');
|
|
10
|
-
|
|
11
|
-
const float = '-?\\d*(?:\\.\\d+)';
|
|
12
|
-
|
|
13
|
-
const number = `(${float}?)`;
|
|
14
|
-
const percentage = `(${float}?%)`;
|
|
15
|
-
const numberOrPercentage = `(${float}?%?)`;
|
|
16
|
-
|
|
17
|
-
const pattern$1 = `^
|
|
18
|
-
hsla?\\(
|
|
19
|
-
\\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*,
|
|
20
|
-
\\s*${percentage}\\s*,
|
|
21
|
-
\\s*${percentage}\\s*
|
|
22
|
-
(?:,\\s*${numberOrPercentage}\\s*)?
|
|
23
|
-
\\)
|
|
24
|
-
$
|
|
25
|
-
`.replace(/\n|\s/g, '');
|
|
26
|
-
|
|
27
|
-
var hsl3Re = new RegExp(pattern$1);
|
|
28
|
-
|
|
29
|
-
const pattern$2 = `^
|
|
30
|
-
hsla?\\(
|
|
31
|
-
\\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*
|
|
32
|
-
\\s+${percentage}
|
|
33
|
-
\\s+${percentage}
|
|
34
|
-
\\s*(?:\\s*\\/\\s*${numberOrPercentage}\\s*)?
|
|
35
|
-
\\)
|
|
36
|
-
$
|
|
37
|
-
`.replace(/\n|\s/g, '');
|
|
38
|
-
|
|
39
|
-
var hsl4Re = new RegExp(pattern$2);
|
|
40
|
-
|
|
41
|
-
const pattern$3 = `^
|
|
42
|
-
rgba?\\(
|
|
43
|
-
\\s*${number}\\s*,
|
|
44
|
-
\\s*${number}\\s*,
|
|
45
|
-
\\s*${number}\\s*
|
|
46
|
-
(?:,\\s*${numberOrPercentage}\\s*)?
|
|
47
|
-
\\)
|
|
48
|
-
$
|
|
49
|
-
`.replace(/\n|\s/g, '');
|
|
50
|
-
|
|
51
|
-
var rgb3NumberRe = new RegExp(pattern$3);
|
|
52
|
-
|
|
53
|
-
const pattern$4 = `^
|
|
54
|
-
rgba?\\(
|
|
55
|
-
\\s*${percentage}\\s*,
|
|
56
|
-
\\s*${percentage}\\s*,
|
|
57
|
-
\\s*${percentage}\\s*
|
|
58
|
-
(?:,\\s*${numberOrPercentage}\\s*)?
|
|
59
|
-
\\)
|
|
60
|
-
$
|
|
61
|
-
`.replace(/\n|\s/g, '');
|
|
62
|
-
|
|
63
|
-
var rgb3PercentageRe = new RegExp(pattern$4);
|
|
64
|
-
|
|
65
|
-
const pattern$5 = `^
|
|
66
|
-
rgba?\\(
|
|
67
|
-
\\s*${number}
|
|
68
|
-
\\s+${number}
|
|
69
|
-
\\s+${number}
|
|
70
|
-
\\s*(?:\\s*\\/\\s*${numberOrPercentage}\\s*)?
|
|
71
|
-
\\)
|
|
72
|
-
$
|
|
73
|
-
`.replace(/\n|\s/g, '');
|
|
74
|
-
|
|
75
|
-
var rgb4NumberRe = new RegExp(pattern$5);
|
|
76
|
-
|
|
77
|
-
const pattern$6 = `^
|
|
78
|
-
rgba?\\(
|
|
79
|
-
\\s*${percentage}
|
|
80
|
-
\\s+${percentage}
|
|
81
|
-
\\s+${percentage}
|
|
82
|
-
\\s*(?:\\s*\\/\\s*${numberOrPercentage}\\s*)?
|
|
83
|
-
\\)
|
|
84
|
-
$
|
|
85
|
-
`.replace(/\n|\s/g, '');
|
|
86
|
-
|
|
87
|
-
var rgb4PercentageRe = new RegExp(pattern$6);
|
|
88
|
-
|
|
89
|
-
const pattern$7 = /^transparent$/;
|
|
90
|
-
var transparentRe = new RegExp(pattern$7, 'i');
|
|
91
|
-
|
|
92
|
-
const clamp = (num, min, max) => Math.min(Math.max(min, num), max);
|
|
93
|
-
|
|
94
|
-
/* 500 => 255, -10 => 0, 128 => 128 */
|
|
95
|
-
const parseRGB = (num) => {
|
|
96
|
-
let n = num;
|
|
97
|
-
if (typeof n !== 'number') n = n.endsWith('%') ? (parseFloat(n) * 255) / 100 : parseFloat(n);
|
|
98
|
-
return clamp(Math.round(n), 0, 255);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/* 200 => 100, -100 => 0, 50 => 50 */
|
|
102
|
-
const parsePercentage = (percentage) => clamp(parseFloat(percentage), 0, 100);
|
|
103
|
-
|
|
104
|
-
/* '50%' => 5.0, 200 => 1, -10 => 0 */
|
|
105
|
-
function parseAlpha(alpha) {
|
|
106
|
-
let a = alpha;
|
|
107
|
-
if (typeof a !== 'number') a = a.endsWith('%') ? parseFloat(a) / 100 : parseFloat(a);
|
|
108
|
-
return clamp(a, 0, 1);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function getHEX(hex) {
|
|
112
|
-
const [r, g, b, a] = hex2Rgb(hex, { format: 'array' });
|
|
113
|
-
return getRGB([null, ...[r, g, b, a]]);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function getHSL([, h, s, l, a = 1]) {
|
|
117
|
-
let hh = h;
|
|
118
|
-
if (hh.endsWith('turn')) {
|
|
119
|
-
hh = (parseFloat(hh) * 360) / 1;
|
|
120
|
-
} else if (hh.endsWith('rad')) {
|
|
121
|
-
hh = Math.round((parseFloat(hh) * 180) / Math.PI);
|
|
122
|
-
} else {
|
|
123
|
-
hh = parseFloat(hh);
|
|
124
|
-
}
|
|
125
|
-
return {
|
|
126
|
-
type: 'hsl',
|
|
127
|
-
values: [hh, parsePercentage(s), parsePercentage(l)],
|
|
128
|
-
alpha: parseAlpha(a === null ? 1 : a)
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function getRGB([, r, g, b, a = 1]) {
|
|
133
|
-
return {
|
|
134
|
-
type: 'rgb',
|
|
135
|
-
values: [r, g, b].map(parseRGB),
|
|
136
|
-
alpha: parseAlpha(a === null ? 1 : a)
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* parse-css-color
|
|
142
|
-
* @version v0.2.1
|
|
143
|
-
* @link http://github.com/noeldelgado/parse-css-color/
|
|
144
|
-
* @license MIT
|
|
145
|
-
*/
|
|
146
|
-
|
|
147
|
-
const parseCSSColor = (str) => {
|
|
148
|
-
if (typeof str !== 'string') return null;
|
|
149
|
-
|
|
150
|
-
const hex = hexRe.exec(str);
|
|
151
|
-
if (hex) return getHEX(hex[0]);
|
|
152
|
-
|
|
153
|
-
const hsl = hsl4Re.exec(str) || hsl3Re.exec(str);
|
|
154
|
-
if (hsl) return getHSL(hsl);
|
|
155
|
-
|
|
156
|
-
const rgb =
|
|
157
|
-
rgb4NumberRe.exec(str) ||
|
|
158
|
-
rgb4PercentageRe.exec(str) ||
|
|
159
|
-
rgb3NumberRe.exec(str) ||
|
|
160
|
-
rgb3PercentageRe.exec(str);
|
|
161
|
-
if (rgb) return getRGB(rgb);
|
|
162
|
-
|
|
163
|
-
if (transparentRe.exec(str)) return getRGB([null, 0, 0, 0, 0]);
|
|
164
|
-
|
|
165
|
-
const cn = colorName[str.toLowerCase()];
|
|
166
|
-
if (cn) return getRGB([null, cn[0], cn[1], cn[2], 1]);
|
|
167
|
-
|
|
168
|
-
return null;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
module.exports = parseCSSColor;
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import colorName from 'color-name';
|
|
2
|
-
import hex2Rgb from 'hex-rgb';
|
|
3
|
-
|
|
4
|
-
const pattern = /^#([a-f0-9]{3,4}|[a-f0-9]{4}(?:[a-f0-9]{2}){1,2})\b$/;
|
|
5
|
-
var hexRe = new RegExp(pattern, 'i');
|
|
6
|
-
|
|
7
|
-
const float = '-?\\d*(?:\\.\\d+)';
|
|
8
|
-
|
|
9
|
-
const number = `(${float}?)`;
|
|
10
|
-
const percentage = `(${float}?%)`;
|
|
11
|
-
const numberOrPercentage = `(${float}?%?)`;
|
|
12
|
-
|
|
13
|
-
const pattern$1 = `^
|
|
14
|
-
hsla?\\(
|
|
15
|
-
\\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*,
|
|
16
|
-
\\s*${percentage}\\s*,
|
|
17
|
-
\\s*${percentage}\\s*
|
|
18
|
-
(?:,\\s*${numberOrPercentage}\\s*)?
|
|
19
|
-
\\)
|
|
20
|
-
$
|
|
21
|
-
`.replace(/\n|\s/g, '');
|
|
22
|
-
|
|
23
|
-
var hsl3Re = new RegExp(pattern$1);
|
|
24
|
-
|
|
25
|
-
const pattern$2 = `^
|
|
26
|
-
hsla?\\(
|
|
27
|
-
\\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*
|
|
28
|
-
\\s+${percentage}
|
|
29
|
-
\\s+${percentage}
|
|
30
|
-
\\s*(?:\\s*\\/\\s*${numberOrPercentage}\\s*)?
|
|
31
|
-
\\)
|
|
32
|
-
$
|
|
33
|
-
`.replace(/\n|\s/g, '');
|
|
34
|
-
|
|
35
|
-
var hsl4Re = new RegExp(pattern$2);
|
|
36
|
-
|
|
37
|
-
const pattern$3 = `^
|
|
38
|
-
rgba?\\(
|
|
39
|
-
\\s*${number}\\s*,
|
|
40
|
-
\\s*${number}\\s*,
|
|
41
|
-
\\s*${number}\\s*
|
|
42
|
-
(?:,\\s*${numberOrPercentage}\\s*)?
|
|
43
|
-
\\)
|
|
44
|
-
$
|
|
45
|
-
`.replace(/\n|\s/g, '');
|
|
46
|
-
|
|
47
|
-
var rgb3NumberRe = new RegExp(pattern$3);
|
|
48
|
-
|
|
49
|
-
const pattern$4 = `^
|
|
50
|
-
rgba?\\(
|
|
51
|
-
\\s*${percentage}\\s*,
|
|
52
|
-
\\s*${percentage}\\s*,
|
|
53
|
-
\\s*${percentage}\\s*
|
|
54
|
-
(?:,\\s*${numberOrPercentage}\\s*)?
|
|
55
|
-
\\)
|
|
56
|
-
$
|
|
57
|
-
`.replace(/\n|\s/g, '');
|
|
58
|
-
|
|
59
|
-
var rgb3PercentageRe = new RegExp(pattern$4);
|
|
60
|
-
|
|
61
|
-
const pattern$5 = `^
|
|
62
|
-
rgba?\\(
|
|
63
|
-
\\s*${number}
|
|
64
|
-
\\s+${number}
|
|
65
|
-
\\s+${number}
|
|
66
|
-
\\s*(?:\\s*\\/\\s*${numberOrPercentage}\\s*)?
|
|
67
|
-
\\)
|
|
68
|
-
$
|
|
69
|
-
`.replace(/\n|\s/g, '');
|
|
70
|
-
|
|
71
|
-
var rgb4NumberRe = new RegExp(pattern$5);
|
|
72
|
-
|
|
73
|
-
const pattern$6 = `^
|
|
74
|
-
rgba?\\(
|
|
75
|
-
\\s*${percentage}
|
|
76
|
-
\\s+${percentage}
|
|
77
|
-
\\s+${percentage}
|
|
78
|
-
\\s*(?:\\s*\\/\\s*${numberOrPercentage}\\s*)?
|
|
79
|
-
\\)
|
|
80
|
-
$
|
|
81
|
-
`.replace(/\n|\s/g, '');
|
|
82
|
-
|
|
83
|
-
var rgb4PercentageRe = new RegExp(pattern$6);
|
|
84
|
-
|
|
85
|
-
const pattern$7 = /^transparent$/;
|
|
86
|
-
var transparentRe = new RegExp(pattern$7, 'i');
|
|
87
|
-
|
|
88
|
-
const clamp = (num, min, max) => Math.min(Math.max(min, num), max);
|
|
89
|
-
|
|
90
|
-
/* 500 => 255, -10 => 0, 128 => 128 */
|
|
91
|
-
const parseRGB = (num) => {
|
|
92
|
-
let n = num;
|
|
93
|
-
if (typeof n !== 'number') n = n.endsWith('%') ? (parseFloat(n) * 255) / 100 : parseFloat(n);
|
|
94
|
-
return clamp(Math.round(n), 0, 255);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
/* 200 => 100, -100 => 0, 50 => 50 */
|
|
98
|
-
const parsePercentage = (percentage) => clamp(parseFloat(percentage), 0, 100);
|
|
99
|
-
|
|
100
|
-
/* '50%' => 5.0, 200 => 1, -10 => 0 */
|
|
101
|
-
function parseAlpha(alpha) {
|
|
102
|
-
let a = alpha;
|
|
103
|
-
if (typeof a !== 'number') a = a.endsWith('%') ? parseFloat(a) / 100 : parseFloat(a);
|
|
104
|
-
return clamp(a, 0, 1);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function getHEX(hex) {
|
|
108
|
-
const [r, g, b, a] = hex2Rgb(hex, { format: 'array' });
|
|
109
|
-
return getRGB([null, ...[r, g, b, a]]);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function getHSL([, h, s, l, a = 1]) {
|
|
113
|
-
let hh = h;
|
|
114
|
-
if (hh.endsWith('turn')) {
|
|
115
|
-
hh = (parseFloat(hh) * 360) / 1;
|
|
116
|
-
} else if (hh.endsWith('rad')) {
|
|
117
|
-
hh = Math.round((parseFloat(hh) * 180) / Math.PI);
|
|
118
|
-
} else {
|
|
119
|
-
hh = parseFloat(hh);
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
type: 'hsl',
|
|
123
|
-
values: [hh, parsePercentage(s), parsePercentage(l)],
|
|
124
|
-
alpha: parseAlpha(a === null ? 1 : a)
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function getRGB([, r, g, b, a = 1]) {
|
|
129
|
-
return {
|
|
130
|
-
type: 'rgb',
|
|
131
|
-
values: [r, g, b].map(parseRGB),
|
|
132
|
-
alpha: parseAlpha(a === null ? 1 : a)
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* parse-css-color
|
|
138
|
-
* @version v0.2.1
|
|
139
|
-
* @link http://github.com/noeldelgado/parse-css-color/
|
|
140
|
-
* @license MIT
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
const parseCSSColor = (str) => {
|
|
144
|
-
if (typeof str !== 'string') return null;
|
|
145
|
-
|
|
146
|
-
const hex = hexRe.exec(str);
|
|
147
|
-
if (hex) return getHEX(hex[0]);
|
|
148
|
-
|
|
149
|
-
const hsl = hsl4Re.exec(str) || hsl3Re.exec(str);
|
|
150
|
-
if (hsl) return getHSL(hsl);
|
|
151
|
-
|
|
152
|
-
const rgb =
|
|
153
|
-
rgb4NumberRe.exec(str) ||
|
|
154
|
-
rgb4PercentageRe.exec(str) ||
|
|
155
|
-
rgb3NumberRe.exec(str) ||
|
|
156
|
-
rgb3PercentageRe.exec(str);
|
|
157
|
-
if (rgb) return getRGB(rgb);
|
|
158
|
-
|
|
159
|
-
if (transparentRe.exec(str)) return getRGB([null, 0, 0, 0, 0]);
|
|
160
|
-
|
|
161
|
-
const cn = colorName[str.toLowerCase()];
|
|
162
|
-
if (cn) return getRGB([null, cn[0], cn[1], cn[2], 1]);
|
|
163
|
-
|
|
164
|
-
return null;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
export default parseCSSColor;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e=e||self).parseCssColor=r()}(this,(function(){"use strict";var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},r=new RegExp(/^#([a-f0-9]{3,4}|[a-f0-9]{4}(?:[a-f0-9]{2}){1,2})\b$/,"i"),n="-?\\d*(?:\\.\\d+)",a="("+n+"?)",l="("+n+"?%)",t=("^\n hsla?\\(\n \\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*,\n \\s*"+l+"\\s*,\n \\s*"+l+"\\s*\n (?:,\\s*"+"(-?\\d*(?:\\.\\d+)?%?)\\s*)?\n \\)\n $\n").replace(/\n|\s/g,""),s=new RegExp(t),i=("^\n hsla?\\(\n \\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*\n \\s+"+l+"\n \\s+"+l+"\n \\s*(?:\\s*\\/\\s*"+"(-?\\d*(?:\\.\\d+)?%?)\\s*)?\n \\)\n $\n").replace(/\n|\s/g,""),o=new RegExp(i),d=("^\n rgba?\\(\n \\s*"+a+"\\s*,\n \\s*"+a+"\\s*,\n \\s*"+a+"\\s*\n (?:,\\s*"+"(-?\\d*(?:\\.\\d+)?%?)\\s*)?\n \\)\n $\n").replace(/\n|\s/g,""),u=new RegExp(d),g=("^\n rgba?\\(\n \\s*"+l+"\\s*,\n \\s*"+l+"\\s*,\n \\s*"+l+"\\s*\n (?:,\\s*"+"(-?\\d*(?:\\.\\d+)?%?)\\s*)?\n \\)\n $\n").replace(/\n|\s/g,""),p=new RegExp(g),h=("^\n rgba?\\(\n \\s*"+a+"\n \\s+"+a+"\n \\s+"+a+"\n \\s*(?:\\s*\\/\\s*"+"(-?\\d*(?:\\.\\d+)?%?)\\s*)?\n \\)\n$\n").replace(/\n|\s/g,""),c=new RegExp(h),m=("^\n rgba?\\(\n \\s*"+l+"\n \\s+"+l+"\n \\s+"+l+"\n \\s*(?:\\s*\\/\\s*"+"(-?\\d*(?:\\.\\d+)?%?)\\s*)?\n \\)\n$\n").replace(/\n|\s/g,""),f=new RegExp(m),b=new RegExp(/^transparent$/,"i"),y=new RegExp("[^#a-f\\d]","gi"),w=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i"),k=function(e,r,n){return Math.min(Math.max(r,e),n)},v=function(e){var r=e;return"number"!=typeof r&&(r=r.endsWith("%")?255*parseFloat(r)/100:parseFloat(r)),k(Math.round(r),0,255)},x=function(e){return k(parseFloat(e),0,100)};function E(e){var r=e;return"number"!=typeof r&&(r=r.endsWith("%")?parseFloat(r)/100:parseFloat(r)),k(r,0,1)}function R(e){var r=function(e,r){if(void 0===r&&(r={}),"string"!=typeof e||y.test(e)||!w.test(e))throw new TypeError("Expected a valid hex string");var n=1;8===(e=e.replace(/^#/,"")).length&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),4===e.length&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var a=Number.parseInt(e,16),l=a>>16,t=a>>8&255,s=255&a,i="number"==typeof r.alpha?r.alpha:n;return"array"===r.format?[l,t,s,i]:"css"===r.format?"rgb("+l+" "+t+" "+s+(1===i?"":" / "+Number((100*i).toFixed(2))+"%")+")":{red:l,green:t,blue:s,alpha:i}}(e,{format:"array"});return $([null,r[0],r[1],r[2],r[3]])}function $(e){var r=e[1],n=e[2],a=e[3],l=e[4];return void 0===l&&(l=1),{type:"rgb",values:[r,n,a].map(v),alpha:E(null===l?1:l)}}
|
|
2
|
-
/**
|
|
3
|
-
* parse-css-color
|
|
4
|
-
* @version v0.2.1
|
|
5
|
-
* @link http://github.com/noeldelgado/parse-css-color/
|
|
6
|
-
* @license MIT
|
|
7
|
-
*/return function(n){if("string"!=typeof n)return null;var a=r.exec(n);if(a)return R(a[0]);var l=o.exec(n)||s.exec(n);if(l)return function(e){var r=e[1],n=e[2],a=e[3],l=e[4];void 0===l&&(l=1);var t=r;return{type:"hsl",values:[t=t.endsWith("turn")?360*parseFloat(t)/1:t.endsWith("rad")?Math.round(180*parseFloat(t)/Math.PI):parseFloat(t),x(n),x(a)],alpha:E(null===l?1:l)}}(l);var t=c.exec(n)||f.exec(n)||u.exec(n)||p.exec(n);if(t)return $(t);if(b.exec(n))return $([null,0,0,0,0]);var i=e[n.toLowerCase()];return i?$([null,i[0],i[1],i[2],1]):null}}));
|