decocms 4.113.3 → 4.113.4
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-C3yBEe62.js → AlertCircle-D3NSbtte.js} +1 -1
- package/dist/client/assets/{AreaChart-infhzD-o.js → AreaChart-CVVwbKz-.js} +1 -1
- package/dist/client/assets/{ArrowRight-csX1J00v.js → ArrowRight-ByO1s01w.js} +1 -1
- package/dist/client/assets/{ArrowUp-BMUqiZDH.js → ArrowUp-Cd7BXS0r.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-B0lTHBei.js → ArrowUpRight-OT_eUSGv.js} +1 -1
- package/dist/client/assets/{Check-BOCHVTek.js → Check-DexGeb34.js} +1 -1
- package/dist/client/assets/{CheckCircle-C06fMtNJ.js → CheckCircle-BHeeUcEs.js} +1 -1
- package/dist/client/assets/{ChevronDown-yHcuw3Yi.js → ChevronDown-CHuNudj6.js} +1 -1
- package/dist/client/assets/{ChevronRight-BvtCGcbv.js → ChevronRight-CMzdRCrr.js} +1 -1
- package/dist/client/assets/{ChevronUp-ClBbaiAV.js → ChevronUp-lRFXwe0H.js} +1 -1
- package/dist/client/assets/{Copy01-DjMityLv.js → Copy01-uMwlKnXA.js} +1 -1
- package/dist/client/assets/{DotsVertical-C4ZbABhl.js → DotsVertical-BYSP2N_n.js} +1 -1
- package/dist/client/assets/{Eye-Drm0H5R_.js → Eye-BctMyF-b.js} +1 -1
- package/dist/client/assets/{FilterLines-DqKeoryA.js → FilterLines-CN2zN3dy.js} +1 -1
- package/dist/client/assets/{Globe01-BQOw_Ub7.js → Globe01-CdsyprSD.js} +1 -1
- package/dist/client/assets/{Globe04-CGcQW0g-.js → Globe04-Bsu11XTy.js} +1 -1
- package/dist/client/assets/{HardDrive-CWWkxzA_.js → HardDrive-BbGoyEqj.js} +1 -1
- package/dist/client/assets/{Image01-DlFSq1lp.js → Image01-CEPIXDUJ.js} +1 -1
- package/dist/client/assets/{Key01-DrW6AdUh.js → Key01-I5rdl_Gb.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DcUppE8c.js → LayoutLeft-DUKr-FQx.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BboRX9pE.js → LinkExternal01-CerBDso7.js} +1 -1
- package/dist/client/assets/{LogOut01-BB-7O4XA.js → LogOut01-BQcYh9Ui.js} +1 -1
- package/dist/client/assets/{Monitor01-CcN96Otm.js → Monitor01-bBKqAlRi.js} +1 -1
- package/dist/client/assets/{Package-BzQD_Ty_.js → Package-C1L6WXbG.js} +1 -1
- package/dist/client/assets/{Palette-Blkp2e-R.js → Palette-DkA-m4II.js} +1 -1
- package/dist/client/assets/{Play-D8x6tbEi.js → Play-D5AlhRua.js} +1 -1
- package/dist/client/assets/{Plus-CzNYCMBF.js → Plus-B78kfbrH.js} +1 -1
- package/dist/client/assets/{SearchLg-ChhVm0Qf.js → SearchLg-HLi9z3k2.js} +1 -1
- package/dist/client/assets/{SearchMd-CTSIioHN.js → SearchMd-D9xCjcBT.js} +1 -1
- package/dist/client/assets/{Settings02-Cw_4rjJK.js → Settings02-D4D7dHyq.js} +1 -1
- package/dist/client/assets/{Shield01-DSa5H3Oo.js → Shield01-C0sINRXL.js} +1 -1
- package/dist/client/assets/{Star01-D85zX6Wg.js → Star01-Hh5rtrm_.js} +1 -1
- package/dist/client/assets/{Stars01-DTnCAiJN.js → Stars01-BIr-9im_.js} +1 -1
- package/dist/client/assets/{Stars02-BOwVjfZL.js → Stars02-x-FNLmKd.js} +1 -1
- package/dist/client/assets/{Sun-BgpgdJOh.js → Sun-CbURsFMr.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DdzfKexZ.js → SwitchHorizontal01-CI53Hh9k.js} +1 -1
- package/dist/client/assets/{Tool01-BHPElJg3.js → Tool01-CrK-zdU8.js} +1 -1
- package/dist/client/assets/{Tool02-B1WxUTRS.js → Tool02-BLqj76jE.js} +1 -1
- package/dist/client/assets/{Trash01-CQs4hG5x.js → Trash01-Df4dKmk-.js} +1 -1
- package/dist/client/assets/{TrendUp01-Cjtdx_Mr.js → TrendUp01-CDAx5KLE.js} +1 -1
- package/dist/client/assets/{Upload01-2aufxkFJ.js → Upload01-Dy7G4Vqj.js} +1 -1
- package/dist/client/assets/{User01-qg2q5EXG.js → User01-B00HeJ3v.js} +1 -1
- package/dist/client/assets/{Users01-DecEGc0z.js → Users01-demha86n.js} +1 -1
- package/dist/client/assets/{Users03-DvyrEhaR.js → Users03-CK3Zfb7D.js} +1 -1
- package/dist/client/assets/{X-ByT759cs.js → X-CehcuOdv.js} +1 -1
- package/dist/client/assets/{XCircle-bCCgCduZ.js → XCircle-BaIgTqjQ.js} +1 -1
- package/dist/client/assets/{XClose-CZnGWolh.js → XClose-Bf6_Xwqn.js} +1 -1
- package/dist/client/assets/{Zap-CqiaHzzF.js → Zap-CqCVe0AY.js} +1 -1
- package/dist/client/assets/{ZapSquare-c0rQSrXf.js → ZapSquare-UWBEBtze.js} +1 -1
- package/dist/client/assets/{ZoomOut-CrXsudJp.js → ZoomOut-kGLYh1vh.js} +1 -1
- package/dist/client/assets/{access-gate-v1EkWw_v.js → access-gate-Brf1uq7w.js} +1 -1
- package/dist/client/assets/{add-section-modal-CCmZDfGj.js → add-section-modal-hl41gB3e.js} +1 -1
- package/dist/client/assets/{agent-icon-BOnTghRl.js → agent-icon-C5hkjd9d.js} +1 -1
- package/dist/client/assets/{agents-list-Bh9Nz4Fw.js → agents-list-DUZLZiO7.js} +1 -1
- package/dist/client/assets/{ai-providers-B78j6u61.js → ai-providers-Ddtnde82.js} +1 -1
- package/dist/client/assets/{alert-D-rAiL9n.js → alert-C0nUQV3Z.js} +1 -1
- package/dist/client/assets/{alert-dialog-BV1C1gcm.js → alert-dialog-CoSPCPpg.js} +1 -1
- package/dist/client/assets/{app-editor-0kysJGlw.js → app-editor-C022NrTg.js} +1 -1
- package/dist/client/assets/{auth-DrixEdZV.js → auth-3hywqU0Z.js} +1 -1
- package/dist/client/assets/{auth-catchall-OgqNGUQu.js → auth-catchall-B4Hu45Ne.js} +1 -1
- package/dist/client/assets/{auth-entry-Bu-wAE4C.js → auth-entry-Bd0jbgb_.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BPjEQYcT.js → auth-split-layout-CY08Qy2Q.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-trH0piDT.js → authenticate-and-persist-oauth-C97UAKVm.js} +1 -1
- package/dist/client/assets/{automation-list-row-Hhbhn6Ve.js → automation-list-row-CzqgyFTo.js} +1 -1
- package/dist/client/assets/{automation-runs-Cl8NKzOf.js → automation-runs-BJXzFuc5.js} +1 -1
- package/dist/client/assets/{automations-C0XROIdQ.js → automations-BNgdqlWi.js} +1 -1
- package/dist/client/assets/{autosend-bk9SGLB7.js → autosend-DKunmHJC.js} +1 -1
- package/dist/client/assets/{avatar-TfVrzXcD.js → avatar-bZ-OyZ4C.js} +1 -1
- package/dist/client/assets/{badge-Dq8tKfND.js → badge-BEoEV_-s.js} +1 -1
- package/dist/client/assets/{block-document-CSSMbpaN.js → block-document-Bsh4SSZF.js} +1 -1
- package/dist/client/assets/{brand-context-BpSXT9j1.js → brand-context-DsI_N6jC.js} +1 -1
- package/dist/client/assets/{buckets-CSQzXH56.js → buckets-66qFPEUl.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BnemcYrz.js → bulk-category-panel-Cufz0WM3.js} +1 -1
- package/dist/client/assets/{calendar-C4A-LflQ.js → calendar-CtwiiKBb.js} +1 -1
- package/dist/client/assets/{capability-load-error-BVansliv.js → capability-load-error-BIVVxP4I.js} +1 -1
- package/dist/client/assets/{card-CYIXg6Tz.js → card-BzIUIhXj.js} +1 -1
- package/dist/client/assets/{category-editor-CQlm8YTD.js → category-editor-CvwKblO3.js} +1 -1
- package/dist/client/assets/{chat-context-C0qm1cNd.js → chat-context-Crb9rWHK.js} +1 -1
- package/dist/client/assets/{checkbox-CJlLtjz4.js → checkbox-B7FxhNJt.js} +1 -1
- package/dist/client/assets/{cli-auth-success-xyy-6T0v.js → cli-auth-success-B13-d7YS.js} +1 -1
- package/dist/client/assets/{collection-detail-Ber5gOC6.js → collection-detail-CEn6RIOn.js} +1 -1
- package/dist/client/assets/{collection-display-button-_9VLEjYD.js → collection-display-button-CzT8Gsvj.js} +1 -1
- package/dist/client/assets/{collection-search-DMVP7tq9.js → collection-search-CnQx2Rcs.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CfaNknkJ.js → collection-table-wrapper-1UMvZ3fa.js} +1 -1
- package/dist/client/assets/{collection-tabs-BYtcgqcY.js → collection-tabs-CBtRCQQL.js} +1 -1
- package/dist/client/assets/{command-55Q776qF.js → command-C5gxZS1R.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CwQohRCA.js → commerce-onboarding-CB-WZK2l.js} +1 -1
- package/dist/client/assets/{companions-core-BsogTMm0.js → companions-core-42eUIML2.js} +1 -1
- package/dist/client/assets/{connect-Dzubmbm6.js → connect-DrIqorJQ.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BRyqkebt.js → connect-desktop-dialog-BTzMpZn4.js} +1 -1
- package/dist/client/assets/{connection-card-CnHj36QW.js → connection-card-CBIOrMcr.js} +1 -1
- package/dist/client/assets/{connection-detail-DioIwvgq.js → connection-detail-CUFaaTIx.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C36oVpDa.js → connection-form-helpers-51wU-tA4.js} +1 -1
- package/dist/client/assets/{connections-CMhMeidX.js → connections-fJWiq9na.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DbXyz4b2.js → decopilot-sse-pool-JL7UXTva.js} +1 -1
- package/dist/client/assets/{dialog-Mssh4wvU.js → dialog-BopH09uO.js} +1 -1
- package/dist/client/assets/{domain-settings-D5jbLq0-.js → domain-settings-UBCepEd-.js} +1 -1
- package/dist/client/assets/{drawer-Df2dZjAh.js → drawer-4wGUz3NV.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BOgizJmB.js → dropdown-menu-CqUwPgCM.js} +1 -1
- package/dist/client/assets/{empty-state-CajaBMj9.js → empty-state-DMQGyp-2.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Bd7ZbKmz.js → extract-connection-data-Dg2OurD8.js} +1 -1
- package/dist/client/assets/{file-explorer-C0-F0HB8.js → file-explorer-Cr2rWfg3.js} +1 -1
- package/dist/client/assets/{file-type-icon-DeZBzLiN.js → file-type-icon-Dq1fYczo.js} +1 -1
- package/dist/client/assets/{files-DMRbcRYD.js → files-D11P-V12.js} +1 -1
- package/dist/client/assets/{form-a5EhWS__.js → form-DGbrQv7O.js} +1 -1
- package/dist/client/assets/{general-BXzwd9kr.js → general-ByuqDQPP.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BF2G7ylb.js → github-repo-picker-CsJtF4k1.js} +1 -1
- package/dist/client/assets/{hooks-BYKqudQZ.js → hooks-Bqa3-ZMc.js} +1 -1
- package/dist/client/assets/{index-CDAhksmq.js → index-2cPeCHTJ.js} +1 -1
- package/dist/client/assets/{index-D0XkAkng.js → index-BU5jOX-E.js} +1 -1
- package/dist/client/assets/{index-ChR3SC6w.js → index-BZ6EPALd.js} +1 -1
- package/dist/client/assets/{index-Dd318vVc.js → index-BsEzp8oj.js} +1 -1
- package/dist/client/assets/{index-D3QnFu3t.js → index-BzpPy3wE.js} +3 -3
- package/dist/client/assets/{index-D8_uS6ju.js → index-CYhwzBFB.js} +1 -1
- package/dist/client/assets/{index-BjFrw_Cz.js → index-Cfzztnsx.js} +1 -1
- package/dist/client/assets/{index-D6Qe38nY.js → index-D0ar0WVw.js} +1 -1
- package/dist/client/assets/{index-BzKhWus-.js → index-D3an6z2y.js} +1 -1
- package/dist/client/assets/{index-wa1mGSJt.js → index-DJOz2VN0.js} +5 -5
- package/dist/client/assets/{index-i4iJK1qu.js → index-DNl9xlj2.js} +3 -3
- package/dist/client/assets/{index-BvXIjHT6.js → index-JokIayzs.js} +1 -1
- package/dist/client/assets/{index-DKYptawH.js → index-MOQFWNpJ.js} +1 -1
- package/dist/client/assets/{index-redirect-DAwJl3u9.js → index-redirect-C8kzuGQD.js} +1 -1
- package/dist/client/assets/{input-DBTIXVeB.js → input-BgKPAcUy.js} +1 -1
- package/dist/client/assets/{integration-icon-Cws5p9F1.js → integration-icon-COAmfKM2.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-U14K8dLP.js → invite-member-dialog-D_2ikydr.js} +1 -1
- package/dist/client/assets/{label-hZbHKQe4.js → label-Bit-k39a.js} +1 -1
- package/dist/client/assets/{layout-BbmfwSeT.js → layout-bmMNsy2b.js} +1 -1
- package/dist/client/assets/{login-CYk7QqzO.js → login-Bme8dehk.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BBJ-dCGK.js → mcp-oauth-DtUJKJBX.js} +1 -1
- package/dist/client/assets/{members-Br5ZzfAU.js → members-BdjB5MAU.js} +1 -1
- package/dist/client/assets/{monaco-editor-B7XD9jse.js → monaco-editor-BrEGduvG.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CiB1VTGS.js → monitoring-stats-row-CNmPKGSb.js} +1 -1
- package/dist/client/assets/{multi-select-DtCSfvTi.js → multi-select-Bu-8nHIy.js} +1 -1
- package/dist/client/assets/{oauth-callback-CuoSY6yW.js → oauth-callback-DVtgM464.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DTd9RCl8.js → oauth-callback-ai-provider-D0dOkVqX.js} +1 -1
- package/dist/client/assets/{onboarding-VI53SQy5.js → onboarding-BT0PHxMW.js} +1 -1
- package/dist/client/assets/{org-install-BpRHfBoz.js → org-install-CVKBAdf6.js} +1 -1
- package/dist/client/assets/{org-layout-Ip0hYM6i.js → org-layout-Dv1Blc3Y.js} +1 -1
- package/dist/client/assets/{organization-choice-Ccir5zvX.js → organization-choice-B6BWp_1y.js} +1 -1
- package/dist/client/assets/{orgs-BK0nOPLw.js → orgs-Cy8dbVQf.js} +1 -1
- package/dist/client/assets/{page-seo-form-CBAWdwBB.js → page-seo-form-CBHtkQ-1.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BEV8Rj_2.js +1 -0
- package/dist/client/assets/{popover-WvXSsr2A.js → popover-Bk7l46es.js} +1 -1
- package/dist/client/assets/{post-editor-GEIG3Qbs.js → post-editor-BFFD4TxR.js} +1 -1
- package/dist/client/assets/{primitives-B4b9OMlU.js → primitives-BUqBmg2w.js} +1 -1
- package/dist/client/assets/{profile-BJOXihUj.js → profile-_UM8G-04.js} +1 -1
- package/dist/client/assets/project-app-view-d8NlTW9s.js +1 -0
- package/dist/client/assets/record-editor-D87inyPk.js +1 -0
- package/dist/client/assets/redirect-editor-B5p1mIS_.js +1 -0
- package/dist/client/assets/registry-Cgy8gH4Y.js +2 -0
- package/dist/client/assets/{registry-layout-CUSBCALf.js → registry-layout-DZTQ7Enm.js} +2 -2
- package/dist/client/assets/{reports-CJYmnCRR.js → reports-CogLmgwx.js} +2 -2
- package/dist/client/assets/{require-capability-BOqOfzCO.js → require-capability-DAXk0d5y.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C1iQaX9e.js → required-auth-layout-DVJ0P1R1.js} +1 -1
- package/dist/client/assets/{reset-password-ChmXlYVK.js → reset-password-Ba_pBAvO.js} +1 -1
- package/dist/client/assets/{roles-CuzTIzcA.js → roles-CXTr00hX.js} +1 -1
- package/dist/client/assets/{search-input-Di_KVfz5.js → search-input-C-UMJodP.js} +1 -1
- package/dist/client/assets/{secrets-Cwnb5SFR.js → secrets-D88X3IUQ.js} +1 -1
- package/dist/client/assets/{sections-editor-BnUP7eos.js → sections-editor-BFKZY_dP.js} +1 -1
- package/dist/client/assets/{select-CS3vGjLf.js → select-C-jyJoDt.js} +1 -1
- package/dist/client/assets/{select-model-CBkA3Qex.js → select-model-Dgd4xGjo.js} +1 -1
- package/dist/client/assets/{self-tool-result-olaCzjy8.js → self-tool-result-DPMrglQq.js} +1 -1
- package/dist/client/assets/{seo-editor-BS3PrYY5.js → seo-editor-BY6DSXGz.js} +1 -1
- package/dist/client/assets/{settings-layout-BWiwB1ve.js → settings-layout-CkDQpCLh.js} +1 -1
- package/dist/client/assets/{settings-section-B42r-p4q.js → settings-section-6MwJAdqF.js} +1 -1
- package/dist/client/assets/{shell-controls-CG47bgem.js → shell-controls-CnX0OdDH.js} +1 -1
- package/dist/client/assets/{shell-layout-C2jFubEc.js → shell-layout-CN7hhO1J.js} +1 -1
- package/dist/client/assets/{sidebar-DhNO0hbl.js → sidebar-C_iv7Nh9.js} +1 -1
- package/dist/client/assets/{skeleton-CkFFLL1Z.js → skeleton-DbS6ExIt.js} +1 -1
- package/dist/client/assets/{sso-DvIYBwsX.js → sso-B8CdFzAl.js} +1 -1
- package/dist/client/assets/{store-D2kZokQ2.js → store-Bnyy1WiV.js} +1 -1
- package/dist/client/assets/store-registry-BSo6cvku.js +2 -0
- package/dist/client/assets/{studio-tools-Dj_suUV-.js → studio-tools-IiJMHnzv.js} +1 -1
- package/dist/client/assets/{switch-CWGgmiWZ.js → switch-yqZ24tl_.js} +1 -1
- package/dist/client/assets/{table-B7Z84RDB.js → table-CmSWRFMQ.js} +1 -1
- package/dist/client/assets/{tabs-CSjEyx_g.js → tabs-7R3MGlLI.js} +1 -1
- package/dist/client/assets/{textarea-DNrJISFS.js → textarea-BE6VI2Sm.js} +1 -1
- package/dist/client/assets/{toggle-group-DngQXFC1.js → toggle-group-lTjODskL.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BPZ8JgHL.js → toolbar-icon-button-DysigV8P.js} +1 -1
- package/dist/client/assets/{toolbar-BJAhXpws.js → toolbar-mS39lMFz.js} +1 -1
- package/dist/client/assets/{tooltip-BoYfeb4r.js → tooltip-CQ993dHl.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B0uEL6GU.js → use-ai-providers-CcQLY3nb.js} +1 -1
- package/dist/client/assets/{use-api-keys-BUXdsmWE.js → use-api-keys-DJYutKrk.js} +1 -1
- package/dist/client/assets/{use-automations-BX-f2xPQ.js → use-automations-Dhj1E9Ph.js} +1 -1
- package/dist/client/assets/{use-autosave-D2xExJSi.js → use-autosave-C2xapmR1.js} +1 -1
- package/dist/client/assets/{use-capability-zn_dFQCr.js → use-capability-DyYemPOJ.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Daz3W4ZL.js → use-clock-tick-Cy_Qdrwk.js} +1 -1
- package/dist/client/assets/{use-connection-CI4KVjBL.js → use-connection-DgItAPXg.js} +1 -1
- package/dist/client/assets/{use-copy-BFe-yhR7.js → use-copy-Cl4f2mnT.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BruuOj8R.js → use-create-virtual-mcp-Cr2zciLP.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C18-WjK7.js → use-debounced-autosave-DacEdb47.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CgLjUKeF.js → use-debounced-value-COWnhTlx.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Cl6XjjTb.js → use-deco-credits-C258e8Gu.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Opg95yOG.js → use-decopilot-events-C8Qld7KH.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CkYrHV-n.js → use-delete-connection-D8xzfXPS.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CWMJlws-.js → use-deployment-admin-CUVPi201.js} +1 -1
- package/dist/client/assets/{use-file-configs-CU2Y0Emb.js → use-file-configs-BS9XBoPf.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-mXDq9sbk.js → use-infinite-scroll-CHbZVRlR.js} +1 -1
- package/dist/client/assets/{use-join-requests-zFCwv89L.js → use-join-requests-BnVp32Ft.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BoHM8OB0.js → use-mcp-auth-status-C_bc7znM.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DL89siIV.js → use-mcp-client-rUzkHeFC.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C4CClJFZ.js → use-mcp-tools-wZzusmBD.js} +1 -1
- package/dist/client/assets/{use-members-A3agoGMA.js → use-members-Bs4G8Gn6.js} +1 -1
- package/dist/client/assets/{use-mobile-BwfgD4pT.js → use-mobile-Dfk9gz4P.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bc0CpSD2.js → use-navigate-to-agent-D_ROb12r.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BTfVRkCO.js → use-org-auth-client-C2bpFjJB.js} +1 -1
- package/dist/client/assets/{use-org-sso-DYo24v3_.js → use-org-sso-o6qtDNhz.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DYKLAq-n.js → use-organization-roles-CIhMiXnm.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DoCpZun-.js → use-organization-settings-BN6Mbe3T.js} +1 -1
- package/dist/client/assets/{use-registry-app-nEihaLca.js → use-registry-app-CdXrR-uL.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DuneVuyO.js → use-registry-connections-DUTwru2C.js} +1 -1
- package/dist/client/assets/{use-secrets-CG9MzH4M.js → use-secrets-BGQjv51d.js} +1 -1
- package/dist/client/assets/{use-status-sounds-C-LWwT7t.js → use-status-sounds-DNfyHXSY.js} +1 -1
- package/dist/client/assets/{use-view-mode--BSnFAw6.js → use-view-mode-3AUQk446.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C6uu6xME.js → use-virtual-mcp-EXgj09hR.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BuJ4N0EZ.js +1 -0
- package/dist/client/assets/{useQueries-BT8q2MfJ.js → useQueries-BTxFVSBJ.js} +1 -1
- package/dist/client/assets/{useRouterState-BMgTcVFU.js → useRouterState-CSm1vh-t.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CnxU3y26.js +1 -0
- package/dist/client/assets/{users-BXaOYgw2.js → users-BUKZ3ENb.js} +1 -1
- package/dist/client/assets/{variant-calendar-C61DYxyp.js → variant-calendar-BkY_wbhM.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C8Ikqgl7.js → view-mode-toggle-cynxUaRv.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/report-og-fallback.png +0 -0
- package/dist/server/cli.js +656 -656
- package/dist/server/migrate.js +5 -5
- package/dist/server/node_modules/@resvg/resvg-js/LICENSE +373 -0
- package/dist/server/node_modules/@resvg/resvg-js/README.md +314 -0
- package/dist/server/node_modules/@resvg/resvg-js/index.js +23 -0
- package/dist/server/node_modules/@resvg/resvg-js/js-binding.js +1 -0
- package/dist/server/node_modules/@resvg/resvg-js/package.json +152 -0
- package/dist/server/node_modules/@shuding/opentype.js/LICENSE +20 -0
- package/dist/server/node_modules/@shuding/opentype.js/README.md +9 -0
- package/dist/server/node_modules/@shuding/opentype.js/RELEASES.md +272 -0
- package/dist/server/node_modules/@shuding/opentype.js/bin/ot +84 -0
- package/dist/server/node_modules/@shuding/opentype.js/bin/server.js +64 -0
- package/dist/server/node_modules/@shuding/opentype.js/bin/test-render +96 -0
- package/dist/server/node_modules/@shuding/opentype.js/dist/opentype.js +11655 -0
- package/dist/server/node_modules/@shuding/opentype.js/dist/opentype.min.js +2 -0
- package/dist/server/node_modules/@shuding/opentype.js/dist/opentype.module.js +11639 -0
- package/dist/server/node_modules/@shuding/opentype.js/package.json +73 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/bbox.js +158 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/bidi.js +243 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/char.js +43 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/check.js +16 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/encoding.js +1032 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/features/applySubstitution.js +74 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/arabicPresentationForms.js +83 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/arabicRequiredLigatures.js +41 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/contextCheck/arabicSentence.js +43 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/contextCheck/arabicWord.js +31 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/features/featureQuery.js +483 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/features/latn/contextCheck/latinWord.js +31 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/features/latn/latinLigatures.js +40 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/font.js +433 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/glyph.js +274 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/glyphset.js +150 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/hintingtt.js +3062 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/index.js +5 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/layout.js +357 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/opentype.js +375 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/parse.js +628 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/path.js +212 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/position.js +77 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/substitution.js +447 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/table.js +215 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/cff.js +1156 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/cmap.js +145 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/fvar.js +71 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/gdef.js +62 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/glyf.js +349 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/gpos.js +146 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/gsub.js +251 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/head.js +35 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/hhea.js +27 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/hmtx.js +51 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/kern.js +69 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/loca.js +31 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/ltag.js +33 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/maxp.js +32 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/meta.js +30 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/name.js +680 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/os2.js +65 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tables/post.js +41 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/tokenizer.js +522 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/types.js +976 -0
- package/dist/server/node_modules/@shuding/opentype.js/src/util.js +17 -0
- package/dist/server/node_modules/base64-js/.travis.yml +5 -0
- package/dist/server/node_modules/base64-js/LICENSE.MIT +21 -0
- package/dist/server/node_modules/base64-js/README.md +31 -0
- package/dist/server/node_modules/base64-js/bench/bench.js +19 -0
- package/dist/server/node_modules/base64-js/lib/b64.js +124 -0
- package/dist/server/node_modules/base64-js/package.json +34 -0
- package/dist/server/node_modules/base64-js/test/convert.js +51 -0
- package/dist/server/node_modules/base64-js/test/url-safe.js +18 -0
- package/dist/server/node_modules/camelize/.eslintrc +24 -0
- package/dist/server/node_modules/camelize/.github/FUNDING.yml +12 -0
- package/dist/server/node_modules/camelize/CHANGELOG.md +64 -0
- package/dist/server/node_modules/camelize/LICENSE +18 -0
- package/dist/server/node_modules/camelize/README.md +81 -0
- package/dist/server/node_modules/camelize/example/camel.js +12 -0
- package/dist/server/node_modules/camelize/index.js +61 -0
- package/dist/server/node_modules/camelize/package.json +84 -0
- package/dist/server/node_modules/camelize/test/camel.js +48 -0
- package/dist/server/node_modules/color-name/LICENSE +8 -0
- package/dist/server/node_modules/color-name/README.md +11 -0
- package/dist/server/node_modules/color-name/index.js +152 -0
- package/dist/server/node_modules/color-name/package.json +28 -0
- package/dist/server/node_modules/css-background-parser/LICENSE +22 -0
- package/dist/server/node_modules/css-background-parser/README.md +149 -0
- package/dist/server/node_modules/css-background-parser/index.js +162 -0
- package/dist/server/node_modules/css-background-parser/package.json +19 -0
- package/dist/server/node_modules/css-box-shadow/README.md +27 -0
- package/dist/server/node_modules/css-box-shadow/index.js +64 -0
- package/dist/server/node_modules/css-box-shadow/package.json +14 -0
- package/dist/server/node_modules/css-box-shadow/test.js +204 -0
- package/dist/server/node_modules/css-color-keywords/LICENSE +15 -0
- package/dist/server/node_modules/css-color-keywords/README.md +47 -0
- package/dist/server/node_modules/css-color-keywords/colors.json +148 -0
- package/dist/server/node_modules/css-color-keywords/index.js +3 -0
- package/dist/server/node_modules/css-color-keywords/package.json +27 -0
- package/dist/server/node_modules/css-gradient-parser/LICENSE +21 -0
- package/dist/server/node_modules/css-gradient-parser/README.md +75 -0
- package/dist/server/node_modules/css-gradient-parser/dist/index.cjs +2 -0
- package/dist/server/node_modules/css-gradient-parser/dist/index.js +2 -0
- package/dist/server/node_modules/css-gradient-parser/package.json +54 -0
- package/dist/server/node_modules/css-to-react-native/LICENSE.md +21 -0
- package/dist/server/node_modules/css-to-react-native/README.md +115 -0
- package/dist/server/node_modules/css-to-react-native/index.js +886 -0
- package/dist/server/node_modules/css-to-react-native/package.json +65 -0
- package/dist/server/node_modules/css-to-react-native/src/TokenStream.js +74 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/aspectRatio.js +23 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/border.js +85 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/borderColor.js +37 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/boxModel.js +136 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/boxShadow.js +83 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/colors.js +31 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/flex.js +122 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/flexFlow.js +22 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/font.js +117 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/fontFamily.js +43 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/fontVariant.js +15 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/fontWeight.js +8 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/index.js +204 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/placeContent.js +19 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/shadowOffsets.js +13 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/textDecoration.js +103 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/textDecorationLine.js +23 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/textShadow.js +30 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/transform.js +55 -0
- package/dist/server/node_modules/css-to-react-native/src/__tests__/units.js +132 -0
- package/dist/server/node_modules/css-to-react-native/src/devPropertiesWithoutUnitsRegExp.js +19 -0
- package/dist/server/node_modules/css-to-react-native/src/index.js +90 -0
- package/dist/server/node_modules/css-to-react-native/src/tokenTypes.js +75 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/aspectRatio.js +12 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/border.js +53 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/boxShadow.js +11 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/flex.js +65 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/flexFlow.js +37 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/font.js +63 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/fontFamily.js +20 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/fontVariant.js +14 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/index.js +77 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/placeContent.js +24 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/textDecoration.js +53 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/textDecorationLine.js +18 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/textShadow.js +10 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/transform.js +74 -0
- package/dist/server/node_modules/css-to-react-native/src/transforms/util.js +99 -0
- package/dist/server/node_modules/hex-rgb/index.js +47 -0
- package/dist/server/node_modules/hex-rgb/license +9 -0
- package/dist/server/node_modules/hex-rgb/package.json +39 -0
- package/dist/server/node_modules/hex-rgb/readme.md +86 -0
- package/dist/server/node_modules/linebreak/LICENSE +21 -0
- package/dist/server/node_modules/linebreak/dist/main.cjs +1369 -0
- package/dist/server/node_modules/linebreak/dist/module.mjs +1368 -0
- package/dist/server/node_modules/linebreak/package.json +57 -0
- package/dist/server/node_modules/linebreak/readme.md +62 -0
- package/dist/server/node_modules/parse-css-color/CHANGELOG.md +54 -0
- package/dist/server/node_modules/parse-css-color/LICENSE +21 -0
- package/dist/server/node_modules/parse-css-color/README.md +110 -0
- package/dist/server/node_modules/parse-css-color/dist/index.cjs.js +171 -0
- package/dist/server/node_modules/parse-css-color/dist/index.esm.js +167 -0
- package/dist/server/node_modules/parse-css-color/dist/index.umd.js +7 -0
- package/dist/server/node_modules/parse-css-color/package.json +55 -0
- package/dist/server/node_modules/postcss-value-parser/LICENSE +22 -0
- package/dist/server/node_modules/postcss-value-parser/README.md +263 -0
- package/dist/server/node_modules/postcss-value-parser/lib/index.js +28 -0
- package/dist/server/node_modules/postcss-value-parser/lib/parse.js +321 -0
- package/dist/server/node_modules/postcss-value-parser/lib/stringify.js +48 -0
- package/dist/server/node_modules/postcss-value-parser/lib/unit.js +120 -0
- package/dist/server/node_modules/postcss-value-parser/lib/walk.js +22 -0
- package/dist/server/node_modules/postcss-value-parser/package.json +58 -0
- package/dist/server/node_modules/satori/LICENSE +373 -0
- package/dist/server/node_modules/satori/README.md +516 -0
- package/dist/server/node_modules/satori/dist/index.cjs +8 -0
- package/dist/server/node_modules/satori/dist/index.cjs.LEGAL.txt +4 -0
- package/dist/server/node_modules/satori/dist/index.js +8 -0
- package/dist/server/node_modules/satori/dist/index.js.LEGAL.txt +4 -0
- package/dist/server/node_modules/satori/dist/jsx/index.cjs +2 -0
- package/dist/server/node_modules/satori/dist/jsx/index.cjs.LEGAL.txt +0 -0
- package/dist/server/node_modules/satori/dist/jsx/index.js +2 -0
- 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 +2 -0
- 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 +2 -0
- package/dist/server/node_modules/satori/dist/jsx/jsx-runtime.js.LEGAL.txt +0 -0
- package/dist/server/node_modules/satori/dist/standalone.cjs +8 -0
- package/dist/server/node_modules/satori/dist/standalone.cjs.LEGAL.txt +4 -0
- package/dist/server/node_modules/satori/dist/standalone.js +8 -0
- package/dist/server/node_modules/satori/dist/standalone.js.LEGAL.txt +4 -0
- package/dist/server/node_modules/satori/package.json +149 -0
- package/dist/server/node_modules/satori/yoga.wasm +0 -0
- package/dist/server/node_modules/tiny-inflate/LICENSE +21 -0
- package/dist/server/node_modules/tiny-inflate/index.js +375 -0
- package/dist/server/node_modules/tiny-inflate/package.json +28 -0
- package/dist/server/node_modules/tiny-inflate/readme.md +31 -0
- package/dist/server/node_modules/tiny-inflate/test/index.js +75 -0
- package/dist/server/node_modules/tiny-inflate/test/lorem.txt +199 -0
- package/dist/server/node_modules/unicode-trie/LICENSE +8 -0
- package/dist/server/node_modules/unicode-trie/README.md +77 -0
- package/dist/server/node_modules/unicode-trie/builder.js +966 -0
- package/dist/server/node_modules/unicode-trie/index.js +136 -0
- package/dist/server/node_modules/unicode-trie/package.json +27 -0
- package/dist/server/node_modules/unicode-trie/swap.js +25 -0
- package/dist/server/node_modules/unicode-trie/test/mocha.opts +1 -0
- package/dist/server/node_modules/unicode-trie/test/test.js +243 -0
- package/dist/server/server.js +640 -640
- package/package.json +3 -1
- package/dist/client/assets/page-seo-sheet-BVOTKmAi.js +0 -1
- package/dist/client/assets/project-app-view-BJPw6BEN.js +0 -1
- package/dist/client/assets/record-editor-DGNLZeof.js +0 -1
- package/dist/client/assets/redirect-editor-rNADegcF.js +0 -1
- package/dist/client/assets/registry-DSHcnwR4.js +0 -2
- package/dist/client/assets/store-registry-q7deglpz.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DVl8ILZo.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ClimnWE2.js +0 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// The `OS/2` table contains metrics required in OpenType fonts.
|
|
2
|
+
// https://www.microsoft.com/typography/OTSPEC/os2.htm
|
|
3
|
+
|
|
4
|
+
import parse from '../parse';
|
|
5
|
+
|
|
6
|
+
// Parse the OS/2 and Windows metrics `OS/2` table
|
|
7
|
+
function parseOS2Table(data, start) {
|
|
8
|
+
const os2 = {};
|
|
9
|
+
const p = new parse.Parser(data, start);
|
|
10
|
+
os2.version = p.parseUShort();
|
|
11
|
+
os2.xAvgCharWidth = p.parseShort();
|
|
12
|
+
os2.usWeightClass = p.parseUShort();
|
|
13
|
+
os2.usWidthClass = p.parseUShort();
|
|
14
|
+
os2.fsType = p.parseUShort();
|
|
15
|
+
os2.ySubscriptXSize = p.parseShort();
|
|
16
|
+
os2.ySubscriptYSize = p.parseShort();
|
|
17
|
+
os2.ySubscriptXOffset = p.parseShort();
|
|
18
|
+
os2.ySubscriptYOffset = p.parseShort();
|
|
19
|
+
os2.ySuperscriptXSize = p.parseShort();
|
|
20
|
+
os2.ySuperscriptYSize = p.parseShort();
|
|
21
|
+
os2.ySuperscriptXOffset = p.parseShort();
|
|
22
|
+
os2.ySuperscriptYOffset = p.parseShort();
|
|
23
|
+
os2.yStrikeoutSize = p.parseShort();
|
|
24
|
+
os2.yStrikeoutPosition = p.parseShort();
|
|
25
|
+
os2.sFamilyClass = p.parseShort();
|
|
26
|
+
os2.panose = [];
|
|
27
|
+
for (let i = 0; i < 10; i++) {
|
|
28
|
+
os2.panose[i] = p.parseByte();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
os2.ulUnicodeRange1 = p.parseULong();
|
|
32
|
+
os2.ulUnicodeRange2 = p.parseULong();
|
|
33
|
+
os2.ulUnicodeRange3 = p.parseULong();
|
|
34
|
+
os2.ulUnicodeRange4 = p.parseULong();
|
|
35
|
+
os2.achVendID = String.fromCharCode(
|
|
36
|
+
p.parseByte(),
|
|
37
|
+
p.parseByte(),
|
|
38
|
+
p.parseByte(),
|
|
39
|
+
p.parseByte()
|
|
40
|
+
);
|
|
41
|
+
os2.fsSelection = p.parseUShort();
|
|
42
|
+
os2.usFirstCharIndex = p.parseUShort();
|
|
43
|
+
os2.usLastCharIndex = p.parseUShort();
|
|
44
|
+
os2.sTypoAscender = p.parseShort();
|
|
45
|
+
os2.sTypoDescender = p.parseShort();
|
|
46
|
+
os2.sTypoLineGap = p.parseShort();
|
|
47
|
+
os2.usWinAscent = p.parseUShort();
|
|
48
|
+
os2.usWinDescent = p.parseUShort();
|
|
49
|
+
if (os2.version >= 1) {
|
|
50
|
+
os2.ulCodePageRange1 = p.parseULong();
|
|
51
|
+
os2.ulCodePageRange2 = p.parseULong();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (os2.version >= 2) {
|
|
55
|
+
os2.sxHeight = p.parseShort();
|
|
56
|
+
os2.sCapHeight = p.parseShort();
|
|
57
|
+
os2.usDefaultChar = p.parseUShort();
|
|
58
|
+
os2.usBreakChar = p.parseUShort();
|
|
59
|
+
os2.usMaxContent = p.parseUShort();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return os2;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default { parse: parseOS2Table };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// The `post` table stores additional PostScript information, such as glyph names.
|
|
2
|
+
// https://www.microsoft.com/typography/OTSPEC/post.htm
|
|
3
|
+
|
|
4
|
+
import parse from '../parse';
|
|
5
|
+
|
|
6
|
+
// Parse the PostScript `post` table
|
|
7
|
+
function parsePostTable(data, start) {
|
|
8
|
+
const post = {};
|
|
9
|
+
const p = new parse.Parser(data, start);
|
|
10
|
+
post.version = p.parseVersion();
|
|
11
|
+
post.italicAngle = p.parseFixed();
|
|
12
|
+
post.underlinePosition = p.parseShort();
|
|
13
|
+
post.underlineThickness = p.parseShort();
|
|
14
|
+
post.isFixedPitch = p.parseULong();
|
|
15
|
+
post.minMemType42 = p.parseULong();
|
|
16
|
+
post.maxMemType42 = p.parseULong();
|
|
17
|
+
post.minMemType1 = p.parseULong();
|
|
18
|
+
post.maxMemType1 = p.parseULong();
|
|
19
|
+
post.names = [];
|
|
20
|
+
switch (post.version) {
|
|
21
|
+
case 1:
|
|
22
|
+
break;
|
|
23
|
+
case 2:
|
|
24
|
+
post.numberOfGlyphs = p.parseUShort();
|
|
25
|
+
post.glyphNameIndex = new Array(post.numberOfGlyphs);
|
|
26
|
+
for (let i = 0; i < post.numberOfGlyphs; i++) {
|
|
27
|
+
post.glyphNameIndex[i] = p.parseUShort();
|
|
28
|
+
}
|
|
29
|
+
break;
|
|
30
|
+
case 2.5:
|
|
31
|
+
post.numberOfGlyphs = p.parseUShort();
|
|
32
|
+
post.offset = new Array(post.numberOfGlyphs);
|
|
33
|
+
for (let i = 0; i < post.numberOfGlyphs; i++) {
|
|
34
|
+
post.offset[i] = p.parseChar();
|
|
35
|
+
}
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
return post;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default { parse: parsePostTable };
|
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a string into a list of tokens.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Create a new token
|
|
7
|
+
* @param {string} char a single char
|
|
8
|
+
*/
|
|
9
|
+
function Token(char) {
|
|
10
|
+
this.char = char;
|
|
11
|
+
this.state = {};
|
|
12
|
+
this.activeState = null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Create a new context range
|
|
17
|
+
* @param {number} startIndex range start index
|
|
18
|
+
* @param {number} endOffset range end index offset
|
|
19
|
+
* @param {string} contextName owner context name
|
|
20
|
+
*/
|
|
21
|
+
function ContextRange(startIndex, endOffset, contextName) {
|
|
22
|
+
this.contextName = contextName;
|
|
23
|
+
this.startIndex = startIndex;
|
|
24
|
+
this.endOffset = endOffset;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Check context start and end
|
|
29
|
+
* @param {string} contextName a unique context name
|
|
30
|
+
* @param {function} checkStart a predicate function the indicates a context's start
|
|
31
|
+
* @param {function} checkEnd a predicate function the indicates a context's end
|
|
32
|
+
*/
|
|
33
|
+
function ContextChecker(contextName, checkStart, checkEnd) {
|
|
34
|
+
this.contextName = contextName;
|
|
35
|
+
this.openRange = null;
|
|
36
|
+
this.ranges = [];
|
|
37
|
+
this.checkStart = checkStart;
|
|
38
|
+
this.checkEnd = checkEnd;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @typedef ContextParams
|
|
43
|
+
* @type Object
|
|
44
|
+
* @property {array} context context items
|
|
45
|
+
* @property {number} currentIndex current item index
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Create a context params
|
|
50
|
+
* @param {array} context a list of items
|
|
51
|
+
* @param {number} currentIndex current item index
|
|
52
|
+
*/
|
|
53
|
+
function ContextParams(context, currentIndex) {
|
|
54
|
+
this.context = context;
|
|
55
|
+
this.index = currentIndex;
|
|
56
|
+
this.length = context.length;
|
|
57
|
+
this.current = context[currentIndex];
|
|
58
|
+
this.backtrack = context.slice(0, currentIndex);
|
|
59
|
+
this.lookahead = context.slice(currentIndex + 1);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Create an event instance
|
|
64
|
+
* @param {string} eventId event unique id
|
|
65
|
+
*/
|
|
66
|
+
function Event(eventId) {
|
|
67
|
+
this.eventId = eventId;
|
|
68
|
+
this.subscribers = [];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Initialize a core events and auto subscribe required event handlers
|
|
73
|
+
* @param {any} events an object that enlists core events handlers
|
|
74
|
+
*/
|
|
75
|
+
function initializeCoreEvents(events) {
|
|
76
|
+
const coreEvents = [
|
|
77
|
+
'start', 'end', 'next', 'newToken', 'contextStart',
|
|
78
|
+
'contextEnd', 'insertToken', 'removeToken', 'removeRange',
|
|
79
|
+
'replaceToken', 'replaceRange', 'composeRUD', 'updateContextsRanges'
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
coreEvents.forEach(eventId => {
|
|
83
|
+
Object.defineProperty(this.events, eventId, {
|
|
84
|
+
value: new Event(eventId)
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
if (!!events) {
|
|
89
|
+
coreEvents.forEach(eventId => {
|
|
90
|
+
const event = events[eventId];
|
|
91
|
+
if (typeof event === 'function') {
|
|
92
|
+
this.events[eventId].subscribe(event);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
const requiresContextUpdate = [
|
|
97
|
+
'insertToken', 'removeToken', 'removeRange',
|
|
98
|
+
'replaceToken', 'replaceRange', 'composeRUD'
|
|
99
|
+
];
|
|
100
|
+
requiresContextUpdate.forEach(eventId => {
|
|
101
|
+
this.events[eventId].subscribe(
|
|
102
|
+
this.updateContextsRanges
|
|
103
|
+
);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Converts a string into a list of tokens
|
|
109
|
+
* @param {any} events tokenizer core events
|
|
110
|
+
*/
|
|
111
|
+
function Tokenizer(events) {
|
|
112
|
+
this.tokens = [];
|
|
113
|
+
this.registeredContexts = {};
|
|
114
|
+
this.contextCheckers = [];
|
|
115
|
+
this.events = {};
|
|
116
|
+
this.registeredModifiers = [];
|
|
117
|
+
|
|
118
|
+
initializeCoreEvents.call(this, events);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Sets the state of a token, usually called by a state modifier.
|
|
123
|
+
* @param {string} key state item key
|
|
124
|
+
* @param {any} value state item value
|
|
125
|
+
*/
|
|
126
|
+
Token.prototype.setState = function(key, value) {
|
|
127
|
+
this.state[key] = value;
|
|
128
|
+
this.activeState = { key, value: this.state[key] };
|
|
129
|
+
return this.activeState;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
Token.prototype.getState = function (stateId) {
|
|
133
|
+
return this.state[stateId] || null;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Checks if an index exists in the tokens list.
|
|
138
|
+
* @param {number} index token index
|
|
139
|
+
*/
|
|
140
|
+
Tokenizer.prototype.inboundIndex = function(index) {
|
|
141
|
+
return index >= 0 && index < this.tokens.length;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Compose and apply a list of operations (replace, update, delete)
|
|
146
|
+
* @param {array} RUDs replace, update and delete operations
|
|
147
|
+
* TODO: Perf. Optimization (lengthBefore === lengthAfter ? dispatch once)
|
|
148
|
+
*/
|
|
149
|
+
Tokenizer.prototype.composeRUD = function (RUDs) {
|
|
150
|
+
const silent = true;
|
|
151
|
+
const state = RUDs.map(RUD => (
|
|
152
|
+
this[RUD[0]].apply(this, RUD.slice(1).concat(silent))
|
|
153
|
+
));
|
|
154
|
+
const hasFAILObject = obj => (
|
|
155
|
+
typeof obj === 'object' &&
|
|
156
|
+
obj.hasOwnProperty('FAIL')
|
|
157
|
+
);
|
|
158
|
+
if (state.every(hasFAILObject)) {
|
|
159
|
+
return {
|
|
160
|
+
FAIL: `composeRUD: one or more operations hasn't completed successfully`,
|
|
161
|
+
report: state.filter(hasFAILObject)
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
this.dispatch('composeRUD', [state.filter(op => !hasFAILObject(op))]);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Replace a range of tokens with a list of tokens
|
|
169
|
+
* @param {number} startIndex range start index
|
|
170
|
+
* @param {number} offset range offset
|
|
171
|
+
* @param {token} tokens a list of tokens to replace
|
|
172
|
+
* @param {boolean} silent dispatch events and update context ranges
|
|
173
|
+
*/
|
|
174
|
+
Tokenizer.prototype.replaceRange = function (startIndex, offset, tokens, silent) {
|
|
175
|
+
offset = offset !== null ? offset : this.tokens.length;
|
|
176
|
+
const isTokenType = tokens.every(token => token instanceof Token);
|
|
177
|
+
if (!isNaN(startIndex) && this.inboundIndex(startIndex) && isTokenType) {
|
|
178
|
+
const replaced = this.tokens.splice.apply(
|
|
179
|
+
this.tokens, [startIndex, offset].concat(tokens)
|
|
180
|
+
);
|
|
181
|
+
if (!silent) this.dispatch('replaceToken', [startIndex, offset, tokens]);
|
|
182
|
+
return [replaced, tokens];
|
|
183
|
+
} else {
|
|
184
|
+
return { FAIL: 'replaceRange: invalid tokens or startIndex.' };
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Replace a token with another token
|
|
190
|
+
* @param {number} index token index
|
|
191
|
+
* @param {token} token a token to replace
|
|
192
|
+
* @param {boolean} silent dispatch events and update context ranges
|
|
193
|
+
*/
|
|
194
|
+
Tokenizer.prototype.replaceToken = function (index, token, silent) {
|
|
195
|
+
if (!isNaN(index) && this.inboundIndex(index) && token instanceof Token) {
|
|
196
|
+
const replaced = this.tokens.splice(index, 1, token);
|
|
197
|
+
if (!silent) this.dispatch('replaceToken', [index, token]);
|
|
198
|
+
return [replaced[0], token];
|
|
199
|
+
} else {
|
|
200
|
+
return { FAIL: 'replaceToken: invalid token or index.' };
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Removes a range of tokens
|
|
206
|
+
* @param {number} startIndex range start index
|
|
207
|
+
* @param {number} offset range offset
|
|
208
|
+
* @param {boolean} silent dispatch events and update context ranges
|
|
209
|
+
*/
|
|
210
|
+
Tokenizer.prototype.removeRange = function(startIndex, offset, silent) {
|
|
211
|
+
offset = !isNaN(offset) ? offset : this.tokens.length;
|
|
212
|
+
const tokens = this.tokens.splice(startIndex, offset);
|
|
213
|
+
if (!silent) this.dispatch('removeRange', [tokens, startIndex, offset]);
|
|
214
|
+
return tokens;
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Remove a token at a certain index
|
|
219
|
+
* @param {number} index token index
|
|
220
|
+
* @param {boolean} silent dispatch events and update context ranges
|
|
221
|
+
*/
|
|
222
|
+
Tokenizer.prototype.removeToken = function(index, silent) {
|
|
223
|
+
if (!isNaN(index) && this.inboundIndex(index)) {
|
|
224
|
+
const token = this.tokens.splice(index, 1);
|
|
225
|
+
if (!silent) this.dispatch('removeToken', [token, index]);
|
|
226
|
+
return token;
|
|
227
|
+
} else {
|
|
228
|
+
return { FAIL: 'removeToken: invalid token index.' };
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Insert a list of tokens at a certain index
|
|
234
|
+
* @param {array} tokens a list of tokens to insert
|
|
235
|
+
* @param {number} index insert the list of tokens at index
|
|
236
|
+
* @param {boolean} silent dispatch events and update context ranges
|
|
237
|
+
*/
|
|
238
|
+
Tokenizer.prototype.insertToken = function (tokens, index, silent) {
|
|
239
|
+
const tokenType = tokens.every(
|
|
240
|
+
token => token instanceof Token
|
|
241
|
+
);
|
|
242
|
+
if (tokenType) {
|
|
243
|
+
this.tokens.splice.apply(
|
|
244
|
+
this.tokens, [index, 0].concat(tokens)
|
|
245
|
+
);
|
|
246
|
+
if (!silent) this.dispatch('insertToken', [tokens, index]);
|
|
247
|
+
return tokens;
|
|
248
|
+
} else {
|
|
249
|
+
return { FAIL: 'insertToken: invalid token(s).' };
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* A state modifier that is called on 'newToken' event
|
|
255
|
+
* @param {string} modifierId state modifier id
|
|
256
|
+
* @param {function} condition a predicate function that returns true or false
|
|
257
|
+
* @param {function} modifier a function to update token state
|
|
258
|
+
*/
|
|
259
|
+
Tokenizer.prototype.registerModifier = function(modifierId, condition, modifier) {
|
|
260
|
+
this.events.newToken.subscribe(function(token, contextParams) {
|
|
261
|
+
const conditionParams = [token, contextParams];
|
|
262
|
+
const canApplyModifier = (
|
|
263
|
+
condition === null ||
|
|
264
|
+
condition.apply(this, conditionParams) === true
|
|
265
|
+
);
|
|
266
|
+
const modifierParams = [token, contextParams];
|
|
267
|
+
if (canApplyModifier) {
|
|
268
|
+
let newStateValue = modifier.apply(this, modifierParams);
|
|
269
|
+
token.setState(modifierId, newStateValue);
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
this.registeredModifiers.push(modifierId);
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Subscribe a handler to an event
|
|
277
|
+
* @param {function} eventHandler an event handler function
|
|
278
|
+
*/
|
|
279
|
+
Event.prototype.subscribe = function (eventHandler) {
|
|
280
|
+
if (typeof eventHandler === 'function') {
|
|
281
|
+
return ((this.subscribers.push(eventHandler)) - 1);
|
|
282
|
+
} else {
|
|
283
|
+
return { FAIL: `invalid '${this.eventId}' event handler`};
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Unsubscribe an event handler
|
|
289
|
+
* @param {string} subsId subscription id
|
|
290
|
+
*/
|
|
291
|
+
Event.prototype.unsubscribe = function (subsId) {
|
|
292
|
+
this.subscribers.splice(subsId, 1);
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Sets context params current value index
|
|
297
|
+
* @param {number} index context params current value index
|
|
298
|
+
*/
|
|
299
|
+
ContextParams.prototype.setCurrentIndex = function(index) {
|
|
300
|
+
this.index = index;
|
|
301
|
+
this.current = this.context[index];
|
|
302
|
+
this.backtrack = this.context.slice(0, index);
|
|
303
|
+
this.lookahead = this.context.slice(index + 1);
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Get an item at an offset from the current value
|
|
308
|
+
* example (current value is 3):
|
|
309
|
+
* 1 2 [3] 4 5 | items values
|
|
310
|
+
* -2 -1 0 1 2 | offset values
|
|
311
|
+
* @param {number} offset an offset from current value index
|
|
312
|
+
*/
|
|
313
|
+
ContextParams.prototype.get = function (offset) {
|
|
314
|
+
switch (true) {
|
|
315
|
+
case (offset === 0):
|
|
316
|
+
return this.current;
|
|
317
|
+
case (offset < 0 && Math.abs(offset) <= this.backtrack.length):
|
|
318
|
+
return this.backtrack.slice(offset)[0];
|
|
319
|
+
case (offset > 0 && offset <= this.lookahead.length):
|
|
320
|
+
return this.lookahead[offset - 1];
|
|
321
|
+
default:
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Converts a context range into a string value
|
|
328
|
+
* @param {contextRange} range a context range
|
|
329
|
+
*/
|
|
330
|
+
Tokenizer.prototype.rangeToText = function (range) {
|
|
331
|
+
if (range instanceof ContextRange) {
|
|
332
|
+
return (
|
|
333
|
+
this.getRangeTokens(range)
|
|
334
|
+
.map(token => token.char).join('')
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Converts all tokens into a string
|
|
341
|
+
*/
|
|
342
|
+
Tokenizer.prototype.getText = function () {
|
|
343
|
+
return this.tokens.map(token => token.char).join('');
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Get a context by name
|
|
348
|
+
* @param {string} contextName context name to get
|
|
349
|
+
*/
|
|
350
|
+
Tokenizer.prototype.getContext = function (contextName) {
|
|
351
|
+
let context = this.registeredContexts[contextName];
|
|
352
|
+
return !!context ? context : null;
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Subscribes a new event handler to an event
|
|
357
|
+
* @param {string} eventName event name to subscribe to
|
|
358
|
+
* @param {function} eventHandler a function to be invoked on event
|
|
359
|
+
*/
|
|
360
|
+
Tokenizer.prototype.on = function(eventName, eventHandler) {
|
|
361
|
+
const event = this.events[eventName];
|
|
362
|
+
if (!!event) {
|
|
363
|
+
return event.subscribe(eventHandler);
|
|
364
|
+
} else {
|
|
365
|
+
return null;
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Dispatches an event
|
|
371
|
+
* @param {string} eventName event name
|
|
372
|
+
* @param {any} args event handler arguments
|
|
373
|
+
*/
|
|
374
|
+
Tokenizer.prototype.dispatch = function(eventName, args) {
|
|
375
|
+
const event = this.events[eventName];
|
|
376
|
+
if (event instanceof Event) {
|
|
377
|
+
event.subscribers.forEach(subscriber => {
|
|
378
|
+
subscriber.apply(this, args || []);
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Register a new context checker
|
|
385
|
+
* @param {string} contextName a unique context name
|
|
386
|
+
* @param {function} contextStartCheck a predicate function that returns true on context start
|
|
387
|
+
* @param {function} contextEndCheck a predicate function that returns true on context end
|
|
388
|
+
* TODO: call tokenize on registration to update context ranges with the new context.
|
|
389
|
+
*/
|
|
390
|
+
Tokenizer.prototype.registerContextChecker = function(contextName, contextStartCheck, contextEndCheck) {
|
|
391
|
+
if (!!this.getContext(contextName)) return {
|
|
392
|
+
FAIL:
|
|
393
|
+
`context name '${contextName}' is already registered.`
|
|
394
|
+
};
|
|
395
|
+
if (typeof contextStartCheck !== 'function') return {
|
|
396
|
+
FAIL:
|
|
397
|
+
`missing context start check.`
|
|
398
|
+
};
|
|
399
|
+
if (typeof contextEndCheck !== 'function') return {
|
|
400
|
+
FAIL:
|
|
401
|
+
`missing context end check.`
|
|
402
|
+
};
|
|
403
|
+
const contextCheckers = new ContextChecker(
|
|
404
|
+
contextName, contextStartCheck, contextEndCheck
|
|
405
|
+
);
|
|
406
|
+
this.registeredContexts[contextName] = contextCheckers;
|
|
407
|
+
this.contextCheckers.push(contextCheckers);
|
|
408
|
+
return contextCheckers;
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Gets a context range tokens
|
|
413
|
+
* @param {contextRange} range a context range
|
|
414
|
+
*/
|
|
415
|
+
Tokenizer.prototype.getRangeTokens = function(range) {
|
|
416
|
+
const endIndex = range.startIndex + range.endOffset;
|
|
417
|
+
return [].concat(
|
|
418
|
+
this.tokens
|
|
419
|
+
.slice(range.startIndex, endIndex)
|
|
420
|
+
);
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Gets the ranges of a context
|
|
425
|
+
* @param {string} contextName context name
|
|
426
|
+
*/
|
|
427
|
+
Tokenizer.prototype.getContextRanges = function(contextName) {
|
|
428
|
+
const context = this.getContext(contextName);
|
|
429
|
+
if (!!context) {
|
|
430
|
+
return context.ranges;
|
|
431
|
+
} else {
|
|
432
|
+
return { FAIL: `context checker '${contextName}' is not registered.` };
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Resets context ranges to run context update
|
|
438
|
+
*/
|
|
439
|
+
Tokenizer.prototype.resetContextsRanges = function () {
|
|
440
|
+
const registeredContexts = this.registeredContexts;
|
|
441
|
+
for (const contextName in registeredContexts) {
|
|
442
|
+
if (registeredContexts.hasOwnProperty(contextName)) {
|
|
443
|
+
const context = registeredContexts[contextName];
|
|
444
|
+
context.ranges = [];
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Updates context ranges
|
|
451
|
+
*/
|
|
452
|
+
Tokenizer.prototype.updateContextsRanges = function () {
|
|
453
|
+
this.resetContextsRanges();
|
|
454
|
+
const chars = this.tokens.map(token => token.char);
|
|
455
|
+
for (let i = 0; i < chars.length; i++) {
|
|
456
|
+
const contextParams = new ContextParams(chars, i);
|
|
457
|
+
this.runContextCheck(contextParams);
|
|
458
|
+
}
|
|
459
|
+
this.dispatch('updateContextsRanges', [this.registeredContexts]);
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Sets the end offset of an open range
|
|
464
|
+
* @param {number} offset range end offset
|
|
465
|
+
* @param {string} contextName context name
|
|
466
|
+
*/
|
|
467
|
+
Tokenizer.prototype.setEndOffset = function (offset, contextName) {
|
|
468
|
+
const startIndex = this.getContext(contextName).openRange.startIndex;
|
|
469
|
+
let range = new ContextRange(startIndex, offset, contextName);
|
|
470
|
+
const ranges = this.getContext(contextName).ranges;
|
|
471
|
+
range.rangeId = `${contextName}.${ranges.length}`;
|
|
472
|
+
ranges.push(range);
|
|
473
|
+
this.getContext(contextName).openRange = null;
|
|
474
|
+
return range;
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Runs a context check on the current context
|
|
479
|
+
* @param {contextParams} contextParams current context params
|
|
480
|
+
*/
|
|
481
|
+
Tokenizer.prototype.runContextCheck = function(contextParams) {
|
|
482
|
+
const index = contextParams.index;
|
|
483
|
+
this.contextCheckers.forEach(contextChecker => {
|
|
484
|
+
let contextName = contextChecker.contextName;
|
|
485
|
+
let openRange = this.getContext(contextName).openRange;
|
|
486
|
+
if (!openRange && contextChecker.checkStart(contextParams)) {
|
|
487
|
+
openRange = new ContextRange(index, null, contextName);
|
|
488
|
+
this.getContext(contextName).openRange = openRange;
|
|
489
|
+
this.dispatch('contextStart', [contextName, index]);
|
|
490
|
+
}
|
|
491
|
+
if (!!openRange && contextChecker.checkEnd(contextParams)) {
|
|
492
|
+
const offset = (index - openRange.startIndex) + 1;
|
|
493
|
+
const range = this.setEndOffset(offset, contextName);
|
|
494
|
+
this.dispatch('contextEnd', [contextName, range]);
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Converts a text into a list of tokens
|
|
501
|
+
* @param {string} text a text to tokenize
|
|
502
|
+
*/
|
|
503
|
+
Tokenizer.prototype.tokenize = function (text) {
|
|
504
|
+
this.tokens = [];
|
|
505
|
+
this.resetContextsRanges();
|
|
506
|
+
let chars = Array.from(text);
|
|
507
|
+
this.dispatch('start');
|
|
508
|
+
for (let i = 0; i < chars.length; i++) {
|
|
509
|
+
const char = chars[i];
|
|
510
|
+
const contextParams = new ContextParams(chars, i);
|
|
511
|
+
this.dispatch('next', [contextParams]);
|
|
512
|
+
this.runContextCheck(contextParams);
|
|
513
|
+
let token = new Token(char);
|
|
514
|
+
this.tokens.push(token);
|
|
515
|
+
this.dispatch('newToken', [token, contextParams]);
|
|
516
|
+
}
|
|
517
|
+
this.dispatch('end', [this.tokens]);
|
|
518
|
+
return this.tokens;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
export default Tokenizer;
|
|
522
|
+
export { Token, Event, ContextRange, ContextParams };
|