allyhub 0.15.1 → 0.15.2
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/CHANGELOG.md +6 -0
- package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/browser/package.json +1 -1
- package/dist/node_modules/@allyhub/build/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/check/package.json +1 -1
- package/dist/node_modules/@allyhub/cloud/package.json +1 -1
- package/dist/node_modules/@allyhub/components/package.json +1 -1
- package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/doc/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
- package/dist/node_modules/@allyhub/export/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
- package/dist/node_modules/@allyhub/image-render/package.json +1 -1
- package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/jobs/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-view/dist/index.js +2 -1
- package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/media/package.json +1 -1
- package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/model/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/registry/package.json +1 -1
- package/dist/node_modules/@allyhub/render/package.json +1 -1
- package/dist/node_modules/@allyhub/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/chart.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/stage/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/package.json +1 -1
- package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/website/package.json +1 -1
- package/dist/node_modules/@allyhub/website-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/x-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/x-model/package.json +1 -1
- package/dist/node_modules/@allyhub/x-view/dist/index.js +262 -1
- package/dist/node_modules/@allyhub/x-view/package.json +1 -1
- package/dist/package.json +12 -12
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-BHI0AbUY.js → abnfDiagram-WEYOIA3C-9z0ZEYUq.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-BMQS-OKZ.js → architecture-WOLXFQ4H-ELMO_PA6.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-DZp9CM6P.js → architectureDiagram-ZHVYKT53-C0yuCWU3.js} +1 -1
- package/editor-web/assets/article-DHFgHYjv.js +3 -0
- package/editor-web/assets/article-Dt9id9Y9.js +7 -0
- package/editor-web/assets/{blockDiagram-RJAE7QA3-h6LWaev4.js → blockDiagram-RJAE7QA3-vi6JOg4o.js} +1 -1
- package/editor-web/assets/{c4Diagram-XDPPPE54-BvSMs7J4.js → c4Diagram-XDPPPE54-Agf_H8uS.js} +1 -1
- package/editor-web/assets/channel-Dkg198L0.js +1 -0
- package/editor-web/assets/{chunk-2E7WHVMD-0EJTAmDF.js → chunk-2E7WHVMD-XalaZaha.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-BeYB4AEY.js → chunk-4EMNKR2T-DUlRZkCS.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-BPFOPTBe.js → chunk-55XCU76K-DTa7whGr.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-CZ2C7ULu.js → chunk-7S6XSTFO-85zCPzj0.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-B5RtsZkj.js → chunk-AQDTSKZB-CWBseIyh.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-_3G4hddj.js → chunk-DSNLSHJZ-BFnyvrWg.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-DO5b4ll2.js → chunk-HAGFOTED-DFWda2Rk.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-C6XNI71Q.js → chunk-HNE4Q36P-aXibFitC.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-nDCX29rQ.js → chunk-NQOKRVIF-CtJUuFdN.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-CRCOiitq.js → chunk-UHW7PFBP-B6QKSKWE.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-hNPKKjCN.js → chunk-VQ5W62QI-CF6Al55P.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-KlnVtIDc.js → chunk-WQQL4CDK-w2TKLkyw.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-B76hDUrM.js → chunk-YZO67HFG-DVGOATM3.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-D9m1N0wI.js → chunk-ZAUX2LTX-Cq7MMjDP.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-443euxzo.js → chunk-ZCHMQSOR-GMW_lBh4.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-Bbw-8Ons.js → classDiagram-v2-4MYWR3UA-C7AK5Bkj.js} +1 -1
- package/editor-web/assets/code-BID_OoRp.js +1 -0
- package/editor-web/assets/{cynefin-EF2NZ3EQ-C4E7TlUr.js → cynefin-EF2NZ3EQ-ZnDieQsN.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-PBPGa_HS.js → cynefinDiagram-WF24UDRP-BrukKIBF.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-DwXdEtQG.js → dagre-NK4GIZVX-DfO0S2p_.js} +1 -1
- package/editor-web/assets/{diagram-CBK3MWTC-BE3FwdX7.js → diagram-CBK3MWTC-D43RLesi.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-BPl2ZY33.js → diagram-I5XIIV2D-bA1B1QQG.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-BLVPYSzw.js → diagram-ODIL2UCW-DAdXBD2K.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-BVZk62FO.js → diagram-PFBEJUXE-C_KyEaws.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-Z75LSbxH.js → diagram-RJA3I4VV-oXTtENF7.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-BynGqDAg.js → diagram-TYUNFSNR-Czupe6mO.js} +1 -1
- package/editor-web/assets/dist-2lNSE-G_.js +82 -0
- package/editor-web/assets/{dist-D_xVYGnk.js → dist-5HNrQ9AU.js} +3 -3
- package/editor-web/assets/dist-BPecIPz6.js +530 -0
- package/editor-web/assets/dist-BXJKASX4.js +24 -0
- package/editor-web/assets/{dist-CIQUbiAd.js → dist-BeDRTqQ8.js} +11 -11
- package/editor-web/assets/{dist-CxlIyluY.js → dist-BlL-4sl3.js} +1 -1
- package/editor-web/assets/dist-BtRMClDw.js +40 -0
- package/editor-web/assets/{dist-Ch34PllS.js → dist-BuqBg8k8.js} +1 -1
- package/editor-web/assets/{dist-cUeSwqws.js → dist-BwW08gSh.js} +1 -1
- package/editor-web/assets/{dist-VP4ECMOk.js → dist-C30Thvb3.js} +1 -1
- package/editor-web/assets/dist-Cj5AmpVb.js +5 -0
- package/editor-web/assets/dist-CjjnDOa8.js +3 -0
- package/editor-web/assets/dist-D7ur8721.js +6 -0
- package/editor-web/assets/{dist-Nc_h0Jye.js → dist-DOHhp09C.js} +1 -1
- package/editor-web/assets/{dist-UG2TIZxP.js → dist-LhFEYZza.js} +1 -1
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-SwhqbeK4.js → ebnfDiagram-V4P3TTPT-BOhNZmtp.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-Bb1GSt2Z.js → elk-QONTBCTQ-DoZH3OoE.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-qUy0NDKn.js → erDiagram-KYQIGQAA-Bv0KDJi4.js} +1 -1
- package/editor-web/assets/{eventmodeling-K75KTNOO-BYBYso_j.js → eventmodeling-K75KTNOO-C-_xzqfj.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-C7ZmHJZW.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-Cw-BkZT8.js → ganttDiagram-R7GPNTJY-CAuJlaZX.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-CTXzWPq_.js → gitGraph-VSP46ZUC-Dx2xLi5C.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-Jd9HU3WA.js → gitGraphDiagram-PDYL7XHY-DHsk_UOT.js} +1 -1
- package/editor-web/assets/{index-CglHrLRS.js → index-BGAXezRR.js} +2 -2
- package/editor-web/assets/{info-OHQRW6UA-C4oj5BpF.js → info-OHQRW6UA-CnKQHx5m.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-D09aYJ28.js → infoDiagram-MVDRKAX5-ibAVFw_2.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-BEdXoXb2.js → ishikawaDiagram-HPEHV2GE-C1OCHt3y.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-DE-_0aww.js → journeyDiagram-BOSHW7O7-BDdqMOM1.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-Cn3_bvPS.js → kanban-definition-FNSA4HC5-CSAS_zGn.js} +1 -1
- package/editor-web/assets/lib-KOEbW83T.js +3 -0
- package/editor-web/assets/{mermaid-parser.core-BK52JMZH.js → mermaid-parser.core-DTLyYXbn.js} +3 -3
- package/editor-web/assets/{mermaid.core-CmfBU89G.js → mermaid.core-B8478wZ1.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-CtUhkv9I.js → mindmap-definition-6OY57UG3-DSWHcglH.js} +1 -1
- package/editor-web/assets/{packet-JDAUHWVQ-C7nciBNp.js → packet-JDAUHWVQ-_k1BF29s.js} +1 -1
- package/editor-web/assets/{pegDiagram-ECIUJNBX-DUkbAcTs.js → pegDiagram-ECIUJNBX-B22YyWAa.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-BIGyKhav.js → pie-XZMESJXO-CSwV32hj.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-DrYj-JeG.js → pieDiagram-GNMPY74T-rSFNeWnq.js} +1 -1
- package/editor-web/assets/{props-form-DrZYDmSM.js → props-form-B6mYjTgZ.js} +1 -1
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-qkBoh1ep.js → quadrantDiagram-D57K4MC3-Xrntfg4j.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-BkJmvR6a.js → radar-ABXABTNO-Dwq5qiNw.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-BFH-ip4B.js → railroad-I3PHUGI6-sIUGWcZh.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-BBlzHL6Z.js → railroad-abnf-LNEFI6M7-1rWlT9BX.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-CCVsG0ui.js → railroad-ebnf-DWYD2UWJ-DWdkzEHc.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-Puo7BFPl.js → railroad-peg-JR7BVNR7-CME0JBbV.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-DCwfkv35.js → railroadDiagram-Y72NRBL7-Ch4BpP22.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-DSTcDj32.js → requirementDiagram-EQYSW5RA-CgE-x3wN.js} +1 -1
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-Kqq4fCvG.js → sankeyDiagram-SY24JHO5-DBf4G6n3.js} +1 -1
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-B1uodEgL.js → sequenceDiagram-BLEHNHQU-Bz07CoUS.js} +1 -1
- package/editor-web/assets/{split-Cu0fidVK.js → split-mDSkdQkd.js} +1 -1
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-B6gG3vUm.js → stateDiagram-v2-A6IESKWZ-DuqAmDPP.js} +1 -1
- package/editor-web/assets/{swimlanes-B3ENRKFQ-CZayRtvU.js → swimlanes-B3ENRKFQ-C7sOL6rB.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CQ2aWYP-.js +8 -0
- package/editor-web/assets/syntax-BIEjjMZL.js +27 -0
- package/editor-web/assets/{tabs-B_K0Db1I.js → tabs-C0AHyuE5.js} +1 -1
- package/editor-web/assets/{timeline-definition-JXYKGLGB-5YoY8Xhw.js → timeline-definition-JXYKGLGB-CaLYz9mc.js} +1 -1
- package/editor-web/assets/{treeView-D4JQ5SDB-Brd_NUPx.js → treeView-D4JQ5SDB-D1P1Kyxc.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-DmfdnlWl.js → treemap-SAJKECNS-2YaFL53t.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-lcAkMviI.js → usecaseDiagram-WPOLBNNX-uYdbUhUS.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-DY_n48hQ.js → vennDiagram-Q3Y3IDCW-DHepmX4t.js} +1 -1
- package/editor-web/assets/{video-Bv3rETBU.js → video-Xl-OaXRc.js} +1 -1
- package/editor-web/assets/{wardley-7MLQ67FV-DzIFSBQz.js → wardley-7MLQ67FV-Dx0MOPV1.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-CsXNajIg.js → wardleyDiagram-IVAIDKWA-BX8ElwDW.js} +1 -1
- package/editor-web/assets/words-B2FXYyeZ.js +263 -0
- package/editor-web/assets/words-DFIhHhHF.js +3 -0
- package/editor-web/assets/{xychartDiagram-4URNHDU4-DDpGFEum.js → xychartDiagram-4URNHDU4-DoWQRJUS.js} +1 -1
- package/editor-web/index.html +1 -1
- package/package.json +2 -2
- package/editor-web/assets/article-C_mBG5a1.js +0 -8
- package/editor-web/assets/article-DWBxNvX0.js +0 -7
- package/editor-web/assets/bookmark-Dfji3syX.js +0 -1
- package/editor-web/assets/channel-BFHB0S0f.js +0 -1
- package/editor-web/assets/dist--ijXGgvi.js +0 -5
- package/editor-web/assets/dist-C-yi9AAi.js +0 -274
- package/editor-web/assets/dist-D9N4Fxqr.js +0 -84
- package/editor-web/assets/dist-DWKEqAou.js +0 -6
- package/editor-web/assets/dist-DX0VLTRV.js +0 -3
- package/editor-web/assets/dist-xpAaABxb.js +0 -24
- package/editor-web/assets/flowDiagram-IUGLLWBU-BSCBBtP3.js +0 -1
- package/editor-web/assets/katex-UWCZofcd.js +0 -257
- package/editor-web/assets/play-DvMyq5xW.js +0 -1
- package/editor-web/assets/repeat-2-DfPmKp4w.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B9tLTrym.js +0 -8
- package/editor-web/assets/syntax-PERQ2szW.js +0 -66
- package/editor-web/assets/words-BTRrBFUo.js +0 -2
- package/editor-web/assets/words-ll_94CD2.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Feature highlights from each AllyHub release.
|
|
4
4
|
|
|
5
|
+
## 0.15.2
|
|
6
|
+
|
|
7
|
+
- **The agent hands work over in its editor.** It makes each piece in AllyHub, shows it open in its editor for you to look at and mark up, and exports a PowerPoint, Word or Excel file when you say it is final.
|
|
8
|
+
- **A new project in Studio is ready for code.** It starts with AllyHub in place, so the agent installs nothing before writing a video or a scenery.
|
|
9
|
+
- **Waking a cloud computer says how far it is**, also when you make a new project, and a wake that installs a new version is no longer given up too early.
|
|
10
|
+
|
|
5
11
|
## 0.15.1
|
|
6
12
|
|
|
7
13
|
- **A much smaller install.** A new project installs a fraction of what it did. Fonts, diagrams and the tools only some work uses are downloaded the first time a project needs them, once for the computer, and kept for every project.
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
|
|
2
|
+
import{jsx as n,Fragment as Z,jsxs as v}from"react/jsx-runtime";import{useContext as G}from"react";import{forwardRef as J,createElement as Q}from"react";var A=(...e)=>e.filter((a,t,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===t).join(" ").trim(),X=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ee=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,t,i)=>i?i.toUpperCase():t.toLowerCase()),b=e=>{const a=ee(e);return a.charAt(0).toUpperCase()+a.slice(1)};import{forwardRef as ae,createElement as H}from"react";var te={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ie=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},re=ae(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:i,className:l="",children:o,iconNode:c,...s},u)=>H("svg",{ref:u,...te,width:a,height:a,stroke:e,strokeWidth:i?Number(t)*24/Number(a):t,className:A("lucide",l),...!o&&!ie(s)&&{"aria-hidden":"true"},...s},[...c.map(([m,h])=>H(m,h)),...Array.isArray(o)?o:[o]])),p=(e,a)=>{const t=J(({className:i,...l},o)=>Q(re,{ref:o,iconNode:a,className:A(`lucide-${X(b(e))}`,`lucide-${e}`,i),...l}));return t.displayName=b(e),t},ne=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],le=p("bookmark",ne),se=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],oe=p("ellipsis",se),ce=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],de=p("external-link",ce),he=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ue=p("file-text",he),me=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],pe=p("globe",me),fe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],ve=p("message-square-text",fe),ke=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],ye=p("play",ke),Ne=[["path",{d:"m2 9 3-3 3 3",key:"1ltn5i"}],["path",{d:"M13 18H7a2 2 0 0 1-2-2V6",key:"1r6tfw"}],["path",{d:"m22 15-3 3-3-3",key:"4rnwn2"}],["path",{d:"M11 6h6a2 2 0 0 1 2 2v10",key:"2f72bc"}]],ge=p("repeat-2",Ne),we=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],xe=p("send",we),_e=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]],Me=p("thumbs-up",_e),Se=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ce=p("users",Se);import{jsx as r,jsxs as d}from"react/jsx-runtime";import{createContext as Ee,useContext as Ae,useEffect as j,useMemo as be,useState as He}from"react";import{entitySpans as je}from"@allyhub/linkedin-model";var Le=new Intl.Segmenter(void 0,{granularity:"grapheme"}),L=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,$e="… more";function Ie(e,a,t){const i=[];let l=0;for(const o of e.split(`
|
|
3
|
+
`)){let c=l,s="",u=-1;for(const{segment:m}of Le.segment(o)){const h=/\s/u.test(m);L.test(m)&&(u=s.length);const f=s+m;if(h||t(f.trimEnd(),c)<=a){s=f,h&&(u=s.length);continue}const k=u>0?u:s.length;i.push({start:c,text:s.slice(0,k)}),c+=k,s=s.slice(k)+m,u=L.test(m)?s.length-m.length:-1}i.push({start:c,text:s}),l+=o.length+1}return i}function Re(e,a,t,i){const l=Ie(e,t,i);if(l.length<=a)return{folded:!1,shown:e,lines:l.length};const o=t-i($e,-1);let c;if(l.slice(0,a).forEach((s,u)=>{for(const m of s.text.matchAll(/\S+/gu)){const h=m.index+m[0].length;i(s.text.slice(0,h),s.start)<o&&(c={line:u,end:s.start+h})}}),c===void 0){const s=l[a-1];return{folded:!0,shown:e.slice(0,(s?.start??0)+(s?.text.length??0)).trimEnd(),lines:a}}return{folded:!0,shown:e.slice(0,c.end),lines:c.line+1}}var $='14px "Inter Variable", Inter, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans SC", "Noto Color Emoji", sans-serif';function I(e,a,t,i=$){const l=new OffscreenCanvas(1,1).getContext("2d");if(l===null)return{folded:!1,shown:e,lines:0};const o=i,c=`600 ${i}`,s=je(e),u=(h,f)=>(l.font=f,l.measureText(h).width);return Re(e,a,t,(h,f)=>{if(f<0)return u(h,o);let k=0,y=0;for(const E of s){const w=Math.max(E.from-f,0),x=Math.min(E.to-f,h.length);x<=y||w>=h.length||(w>y&&(k+=u(h.slice(y,w),o)),k+=u(h.slice(Math.max(w,y),x),c),y=x)}return k+(y<h.length?u(h.slice(y),o):0)})}import{jsx as R,Fragment as Ve}from"react/jsx-runtime";import{entitySpans as Te}from"@allyhub/linkedin-model";function V(e){const a=[];let t=0;for(const i of Te(e))i.from<t||(i.from>t&&a.push({text:e.slice(t,i.from)}),a.push({text:e.slice(i.from,i.to),link:!0}),t=i.to);return t<e.length&&a.push({text:e.slice(t)}),a}function T({text:e}){return R(Ve,{children:V(e).map((a,t)=>a.link===!0?R("span",{className:"ak-li-link",children:a.text},t):a.text)})}var _=552,De=390,M=e=>e-2-24,Oe=3,N={name:"AllyHub",headline:"The content creation system for people and AI"},S=Ee(e=>r("video",{...e}));function qe(e){return{ONE_DAY:"1d left",THREE_DAYS:"3d left",SEVEN_DAYS:"1w left",FOURTEEN_DAYS:"2w left"}[e??"SEVEN_DAYS"]??"1w left"}function D(e){const a=Math.round(e),t=Math.floor(a/3600),i=Math.floor(a%3600/60),l=o=>String(o).padStart(2,"0");return t>0?`${String(t)}:${l(i)}:${l(a%60)}`:`${String(i)}:${l(a%60)}`}function O({visibility:e,avatar:a=48}){return d("header",{className:"ak-li-author",children:[r("div",{className:"ak-li-avatar",style:{width:a,height:a},"aria-hidden":"true",children:N.name.slice(0,1)}),d("div",{className:"ak-li-who",children:[r("span",{className:"ak-li-name",children:N.name}),r("span",{className:"ak-li-headline",children:N.headline}),d("span",{className:"ak-li-when",children:["Now •"," ",e==="CONNECTIONS"?r(Ce,{"aria-label":"Connections only"}):r(pe,{"aria-label":"Anyone"})]})]})]})}function q({text:e,lines:a,onFolded:t,width:i=M(_)}){const[l,o]=He(0);j(()=>{let s=!0;return document.fonts.ready.then(()=>{s&&o(u=>u+1)}),()=>{s=!1}},[]);const c=be(()=>{if(a===void 0||l<0)return;const s=I(e,a,i);return s.folded?s.shown:void 0},[e,a,i,l]);return j(()=>{t?.(c!==void 0)},[c,t]),d("div",{className:"ak-li-words",dir:"auto","data-fold":a,"data-text":e,children:[r(T,{text:c??e}),c===void 0?null:r("span",{className:"ak-li-more",children:"… more"})]})}function ze({label:e}){return r("div",{className:"ak-li-made",children:e})}function C({m:e}){return e.kind==="made"||e.src===void 0?r(ze,{label:e.label??e.file}):r("img",{src:e.src,alt:e.alt??""})}function Pe({m:e}){const a=Ae(S),t=e.width!==void 0&&e.height!==void 0&&e.height>0?{aspectRatio:`${String(e.width)} / ${String(e.height)}`}:void 0;return d("div",{className:"ak-li-video",style:t,children:[e.src===void 0?null:a({src:`${e.src}#t=0.1`,muted:!0,playsInline:!0,preload:"auto"},e.file),r("span",{className:"ak-li-play","aria-hidden":"true"}),e.seconds===void 0?null:r("span",{className:"ak-li-clock",children:D(e.seconds)})]})}function We({m:e,title:a}){return d("div",{className:"ak-li-document",children:[r("div",{className:"ak-li-doc-bar",children:r("span",{className:"ak-li-doc-title",children:a??e.label??e.file??""})}),e.src===void 0?d("div",{className:"ak-li-doc-page",children:[r(ue,{"aria-hidden":"true"}),r("span",{children:e.label??e.file})]}):r("img",{src:e.src,alt:e.alt??""})]})}var Fe=e=>e?.width!==void 0&&e.height!==void 0&&e.width>e.height;function z({images:e,onMedium:a}){if(e.length===0)return null;const t=e.length>4?4:e.length,i=e.length-t;return r("div",{className:"ak-li-grid","data-count":t,"data-wide":Fe(e[0])?"":void 0,children:e.slice(0,t).map((l,o)=>d("div",{className:"ak-li-cell",children:[r(C,{m:l}),o===t-1&&i>0?d("span",{className:"ak-li-hidden",children:["+",i]}):null,a?.(o)]},o))})}function Ue({c:e}){let a=e.source;try{a=new URL(e.source).hostname.replace(/^www\./u,"")}catch{}return d("div",{className:"ak-li-card",children:[e.thumbnail?r("div",{className:"ak-li-card-picture",children:r(C,{m:e.thumbnail})}):null,d("div",{className:"ak-li-card-text",children:[r("span",{className:"ak-li-card-title",children:e.title??e.source}),d("span",{className:"ak-li-card-site",children:[a,r(de,{"aria-hidden":"true"})]})]})]})}function Be({c:e}){return d("div",{className:"ak-li-poll",children:[r("div",{className:"ak-li-poll-question",dir:"auto",children:e.question}),r("div",{className:"ak-li-poll-hint",children:"The author can see how you vote."}),e.options.map((a,t)=>r("div",{className:"ak-li-option",dir:"auto",children:a},t)),d("div",{className:"ak-li-poll-foot",children:["0 votes • ",qe(e.duration)]})]})}function P({content:e,onMedium:a}){if(e===void 0)return null;switch(e.type){case"media":{const t=e.medium;return d("div",{className:"ak-li-content",children:[t.kind==="video"?r(Pe,{m:t}):t.kind==="document"||t.kind==="made"&&e.title!==void 0?r(We,{m:t,title:e.title}):r("div",{className:"ak-li-single",children:r(C,{m:t})}),a?.(0)]})}case"multiImage":return r("div",{className:"ak-li-content",children:r(z,{images:e.images,onMedium:a})});case"poll":return r(Be,{c:e});case"article":return d("div",{className:"ak-li-content",children:[r(Ue,{c:e}),a?.(0)]})}}function W(){return d("div",{className:"ak-li-actions","aria-hidden":"true",children:[r(Me,{}),r(ve,{}),r(ge,{}),r(xe,{})]})}function Ye({post:e,lines:a,slots:t={},onFolded:i,width:l=_}){return d("article",{className:"ak-li-post",children:[r(O,{visibility:e.visibility}),t.words??(e.commentary===""?null:r(q,{text:e.commentary,lines:a,onFolded:i,width:M(l)})),t.content??r(P,{content:e.content,onMedium:t.onMedium}),t.after,r(W,{})]})}var Ke=632;function g({runs:e}){return n(Z,{children:e.map((a,t)=>{let i=a.text;return a.italic===!0&&(i=n("em",{children:i})),a.bold===!0&&(i=n("strong",{children:i})),a.link!==void 0&&(i=n("span",{className:"ak-li-a-link",children:i})),n("span",{children:i},t)})})}function F({url:e}){let a=e;try{a=new URL(e).hostname.replace(/^www\./u,"")}catch{}return v("div",{className:"ak-li-embed",children:[n(ye,{"aria-hidden":"true"}),v("div",{className:"ak-li-embed-text",children:[n("span",{className:"ak-li-embed-site",children:a}),n("span",{className:"ak-li-embed-url",children:e})]})]})}function U({file:e,alt:a,src:t,measure:i}){const l=G(S);if(t===void 0)return n("div",{className:"ak-li-made",children:e});if(/\.mp4$/iu.test(e)){const o=i?.width!==void 0&&i.height!==void 0?{aspectRatio:`${String(i.width)} / ${String(i.height)}`}:void 0;return v("div",{className:"ak-li-video",style:o,children:[l({src:`${t}#t=0.1`,muted:!0,playsInline:!0},e),n("span",{className:"ak-li-play","aria-hidden":"true"})]})}return n("img",{src:t,alt:a??""})}function B({block:e,source:a,measure:t}){switch(e.type){case"paragraph":return n("p",{dir:"auto",children:e.runs.length===0?n("br",{}):n(g,{runs:e.runs})});case"h1":return n("h2",{dir:"auto",children:n(g,{runs:e.runs})});case"h2":return n("h3",{dir:"auto",children:n(g,{runs:e.runs})});case"quote":return n("blockquote",{dir:"auto",children:n(g,{runs:e.runs})});case"ul":case"ol":{const i=e.type;return n(i,{children:e.items.map((l,o)=>n("li",{dir:"auto",children:n(g,{runs:l})},o))})}case"code":return n("pre",{children:n("code",{children:e.code})});case"divider":return n("hr",{});case"embed":return n(F,{url:e.url});case"image":return v("figure",{children:[n(U,{file:e.file,alt:e.alt,src:a(e.file),measure:t?.(e.file)}),e.caption===void 0?null:n("figcaption",{children:e.caption})]})}}function Y({article:e,source:a,measure:t}){return n("div",{className:"ak-li-a-body",children:e.blocks.map((i,l)=>n(B,{block:i,source:a,measure:t},l))})}function K(){return v("div",{className:"ak-li-a-by",children:[n("div",{className:"ak-li-avatar",style:{width:48,height:48},"aria-hidden":"true",children:N.name.slice(0,1)}),v("div",{className:"ak-li-who",children:[n("span",{className:"ak-li-name",children:N.name}),n("span",{className:"ak-li-headline",children:N.headline})]}),v("span",{className:"ak-li-a-tools","aria-hidden":"true",children:[n(le,{}),n(oe,{})]})]})}function Ze({article:e,source:a,measure:t}){return v("article",{className:"ak-li-article",children:[e.cover?n("div",{className:"ak-li-a-cover",children:n(U,{file:e.cover.file,alt:e.cover.alt,src:a(e.cover.file),measure:t?.(e.cover.file)})}):null,n("h1",{className:"ak-li-a-title",dir:"auto",children:e.title}),n(K,{}),n(Y,{article:e,source:a,measure:t})]})}export{Ke as ARTICLE_WIDTH,W as Actions,B as ArticleBlockView,Y as ArticleBody,Ze as ArticleView,O as Author,K as Byline,P as Content,F as EmbedCard,_ as FEED_WIDTH,Oe as FOLD_LINES,De as PHONE_WIDTH,N as PLACEHOLDER,z as PictureGrid,Ye as Post,q as PostWords,g as RunsView,S as VideoElement,$ as WORDS_FONT,T as Words,D as clock,I as foldMeasured,V as runsOf,M as wordsWidth};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{as as
|
|
3
|
-
`),size:r[0]?.all("a:r")[0]?.one("a:rPr")?.attr("sz")}}function ce(n,a,r=!0){for(const T of Ke)n.one(T)?.skip("an axis's id, place, ticks, crossing and label alignment: the deck draws its own");const s=n.one("c:scaling"),o=s?.one("c:min")?.attr("val"),P=s?.one("c:max")?.attr("val"),m=n.one("c:majorUnit")?.attr("val"),D=n.one("c:numFmt"),g=D?.attr("formatCode"),V=D?.attr("sourceLinked"),_=l(n.one("c:delete"))===!0,C=(T,N=!0)=>{const w=T?.one("a:ln"),E=w?.attr("w");return!_&&E!==void 0&&Math.abs(E-Te.gridWidth*je)>64&&c(a,"approximated","c:spPr/a:ln@w",`an axis's or its gridlines' width is the deck's own, ${String(Te.gridWidth)} pt`),w?.one("a:noFill")&&!_&&N&&c(a,"cannot-hold","c:spPr/a:ln/a:noFill","an axis or its gridlines with no line: a deck draws them"),w?.one("a:round")?.skip("a chart line's join"),I(w?.one("a:solidFill"),a,"c:spPr")?.color},F=n.one("c:majorGridlines"),$=C(F?.one("c:spPr")),p=C(n.one("c:spPr"),r),k=n.one("c:title"),{text:M}=De(k);return k?.one("c:overlay")?.attr("val"),k?.one("c:layout")?.skip("an axis title's own place"),k&&M===""&&c(a,"cannot-hold","c:title","an axis's automatic title: a deck's axis title is words of its own"),{...M===""?{}:{title:M},...o===void 0?{}:{minimum_scale:o},...P===void 0?{}:{maximum_scale:P},...m===void 0?{}:{major_unit:m},has_major_gridlines:F!==void 0,..._?{visible:!1}:{},...g===void 0||g==="General"||V===!0?{}:{number_format:g},...s?.one("c:orientation")?.attr("val")==="maxMin"?{reverse_order:!0}:{},...$===void 0?{}:{gridline_color:$},...p===void 0?{}:{line_color:p}}}export function chartOf(n,a){const r=a.read.pkg,s=r.open(n);if(!s)return"its part is not in the file";const o={...a,part:n};s.one("c:date1904")?.attr("val"),s.one("c:lang")?.skip("a chart's language"),s.one("c:style")?.skip("a chart's style number: its colours are read where it sets them"),s.one("c:roundedCorners")?.attr("val")===!0&&c(o,"cannot-hold","c:roundedCorners","a chart's rounded corners"),s.one("c:printSettings")?.skip("a chart's print settings");const P=s.one("c:externalData");if(P){const e=r.rel(n,P.attr("r:id"));e&&!e.external&&r.leave(e.target,"a chart's workbook: the deck writes one from its numbers"),P.one("c:autoUpdate")?.attr("val")}const m=s.one("c:chart"),D=l(m?.one("c:autoTitleDeleted"));m?.one("c:plotVisOnly")?.attr("val"),m?.one("c:showDLblsOverMax")?.skip("labels over a chart's maximum"),m?.one("c:dispBlanksAs")?.skip("how a chart draws a blank value");const g=m?.one("c:plotArea");g?.one("c:layout")?.skip("a chart's plot area's own layout");const V=e=>e?.kids().find(t=>t.key==="c:spPr");for(const e of[V(s),V(g)]){const t=e?.kids()??[];t.some(i=>i.key==="a:noFill")&&t.every(i=>i.key==="a:noFill"||i.key==="a:ln"&&i.kids().length===1&&i.kids()[0]?.key==="a:noFill")&&e?.consume()}const _=(g?.kids()??[]).filter(e=>e.key.endsWith("Chart")),C=e=>(s.consume(),e);if(_.length===0)return C("it has no plot");const F=e=>e.all("c:ser"),$=e=>{const t=e.key,h=F(e),i=e.one("c:grouping")?.attr("val"),y=i==="percentStacked"?"-stacked-100":i==="stacked"?"-stacked":"",u=h.map(x=>x.one("c:marker")?.one("c:symbol")?.attr("val")).some(x=>x!=="none");if(e.one("c:marker"),t==="c:barChart")return`${e.one("c:barDir")?.attr("val")==="bar"?"bar":"column"}${y===""?"-clustered":y}`;if(t==="c:lineChart")return y===""?u?"line-markers":"line":void 0;if(t==="c:areaChart")return`area${y}`;if(t==="c:pieChart")return"pie";if(t==="c:doughnutChart")return"doughnut";if(t==="c:scatterChart"){Me(e).one("c:scatterStyle")?.attr("val");const x=h.every(z=>z.one("c:spPr")?.one("a:ln")?.el.children.some(H=>H.local==="noFill")),K=h.every(z=>l(z.one("c:smooth"))===!0);return x?"scatter":K&&!u?"scatter-smooth":"scatter-lines"}};for(const e of _){e.use();for(const t of e.all("c:axId"))t.attr("val")}const p=g?.all("c:valAx")??[],k=g?.all("c:catAx")??[],M=e=>e.all("c:axId").map(t=>t.attr("val")),T=e=>e.one("c:axId")?.attr("val"),N=e=>t=>M(e).includes(T(t)??-1),w=_.length>1,E=e=>w&&p.some(t=>N(e)(t)&&t.one("c:axPos")?.attr("val")==="r"),L=_.map(e=>({plot:e,type:$(e),secondary:E(e)}));if(w&&L.some(e=>e.type===void 0||!Ue(e.type)))return C("it combines several kinds of chart, not columns, lines and areas");const ie=e=>Math.min(...F(e).map((t,h)=>t.one("c:order")?.attr("val")??h),1/0),J=L.filter(e=>!e.secondary).sort((e,t)=>ie(e.plot)-ie(t.plot))[0]??L[0];if(!J)return C("it has no plot");const f=J.plot,le=f.key,j=J.type;if(!j)return C(`a deck has no ${le.slice(2)} chart`);const de=L.flatMap(e=>F(e.plot).map(t=>({ser:t,of:e}))).map((e,t)=>({...e,order:e.ser.one("c:order")?.attr("val")??t})).sort((e,t)=>e.order-t.order),Q=de.map(e=>e.ser),ue=[];if(Q.length===0)return C("it has no series");const S=le==="c:scatterChart",[fe]=Q,he=S?void 0:fe?.one("c:cat"),Y=X(se(he?.one("c:strRef"))??q(he?.one("c:numRef"))),Ve=de.map(({ser:e,of:t})=>{const h=t.plot.key;if(e.one("c:idx")?.attr("val"),e.one("c:order")?.attr("val"),e!==fe&&!S){const b=e.one("c:cat");se(b?.one("c:strRef"))?.consume(),q(b?.one("c:numRef"))?.consume()}const i=Me(e),y=q((S?i.one("c:yVal"):e.one("c:val"))?.one("c:numRef")),u=y?.one("c:formatCode")?.text()??"",x=X(y),K=S?q(i.one("c:xVal")?.one("c:numRef")):void 0;K?.one("c:formatCode");const z=S?X(K):void 0,H=z?Math.max(z.length,x.length):Y.length,R=e.one("c:spPr"),Ae=I(R?.one("a:solidFill"),o,"c:spPr")?.color??I(R?.one("a:ln")?.one("a:solidFill"),o,"c:spPr")?.color,ze=l(e.one("c:smooth")),Ne=R?.one("a:ln")?.attr("w");R?.one("a:ln")?.one("a:noFill"),R?.one("a:ln")?.one("a:round")?.skip("a chart line's join"),We(j)&&R?.one("a:ln")?.consume();const Fe=e.one("c:marker"),Le=Fe?.one("c:size")?.attr("val");Fe?.one("c:spPr")?.consume(),l(e.one("c:invertIfNegative"))&&c(o,"cannot-hold","c:invertIfNegative","a bar of a negative value drawn in the inverse of its colour");const Re=[];for(const b of e.all("c:dPt")){const O=b.one("c:idx")?.attr("val"),v=b.one("c:spPr"),Ie=I(v?.one("a:solidFill"),o,"c:spPr")?.color;O===void 0||Ie===void 0||(Re[O]=Ie,l(b.one("c:invertIfNegative"))&&c(o,"cannot-hold","c:dPt/c:invertIfNegative","a bar of a negative value drawn in the inverse of its colour"),b.one("c:bubble3D")?.attr("val"),We(j)&&v?.one("a:ln")?.consume())}ue.push(Re);const Oe=e.one("c:tx");return{name:Ge(X(se(Oe?.one("c:strRef")))[0]??Oe?.one("c:v")?.text(),`Series ${String(Q.indexOf(e)+1)}`),values:Array.from({length:H},(b,O)=>{const v=x[O];return v===void 0||v===""?null:Number(v)}),...z?{x:Array.from({length:H},(b,O)=>{const v=z[O];return v===void 0||v===""?null:Number(v)})}:{},...u===""||u==="General"?{}:{number_format:u},...Ae===void 0?{}:{color:Ae},...ze===!0?{smooth:ze}:{},...Ne===void 0||h!=="c:lineChart"&&!S?{}:{line_width:Ne/je},...Le===void 0?{}:{marker_size:Le},...t.type!==void 0&&t.type!==j?{type:t.type}:{},...t.secondary?{secondary:!0}:{}}}),U=m?.one("c:title"),{text:Z,size:me}=De(U);U&&Z===""&&D!==!0&&c(o,"cannot-hold","c:title","a chart's automatic title (its series' name): a deck's chart title is words of its own"),l(U?.one("c:overlay"))===!0&&c(o,"cannot-hold","c:title/c:overlay","a chart's title drawn over its plot"),U?.one("c:layout")?.skip("a chart title's own place");const W=m?.one("c:legend"),B=W?.one("c:legendPos")?.attr("val");l(W?.one("c:overlay"))===!0&&c(o,"cannot-hold","c:legend/c:overlay","a chart's legend drawn over its plot"),W?.one("c:layout")?.skip("a legend's own place");const pe=re(W?.one("c:txPr"))?.attr("sz"),$e={b:"bottom",t:"top",l:"left",r:"right"}[B==="b"||B==="t"||B==="l"?B:"r"],A=f.one("c:dLbls"),d=e=>l(A?.one(e))===!0;l(A?.one("c:showLegendKey"))===!0&&c(o,"cannot-hold","c:showLegendKey","a chart's labels with their legend keys"),A?.one("c:showBubbleSize")?.attr("val"),l(A?.one("c:showLeaderLines"))===!0&&(d("c:showVal")||d("c:showPercent")||d("c:showCatName")||d("c:showSerName"))&&c(o,"cannot-hold","c:showLeaderLines","lines from a chart's labels to their points");const ve=A?.one("c:numFmt")?.attr("formatCode"),ge=A?.one("c:dLblPos")?.attr("val"),ke=re(A?.one("c:txPr")),we=ke?.attr("sz"),ye=I(ke?.one("a:solidFill"),o,"c:dLbls")?.color,ee=f.one("c:gapWidth")?.attr("val"),te=f.one("c:overlap")?.attr("val"),xe=f.one("c:holeSize")?.attr("val"),be=l(f.one("c:varyColors"));f.one("c:varyColors")?.attr("val");const ne=f.one("c:firstSliceAng")?.attr("val");ne!==void 0&&ne!==0&&c(o,"cannot-hold","c:firstSliceAng",`a round chart's first slice turned ${String(ne)}°`);const Pe=re(s.one("c:txPr")),oe=Pe?.attr("sz");pe!==void 0&&pe!==oe&&c(o,"cannot-hold","c:legend/c:txPr","a legend's own text size: a chart's text is one size");const _e=I(Pe?.one("a:solidFill"),o,"c:txPr")?.color;for(const{plot:e}of L){if(e===f)continue;const t=u=>e.one(u)?.attr("val");t("c:gapWidth")!==void 0&&t("c:gapWidth")!==ee&&c(o,"cannot-hold","c:gapWidth","a combination chart's plot's own gap width: its plots share the first's"),t("c:overlap")!==void 0&&t("c:overlap")!==te&&c(o,"cannot-hold","c:overlap","a combination chart's plot's own overlap: its plots share the first's"),e.one("c:varyColors")?.attr("val"),e.one("c:barDir")?.attr("val"),e.one("c:grouping")?.attr("val");const h=e.one("c:dLbls"),i=u=>l(h?.one(u))===!0,y=["c:showVal","c:showPercent","c:showCatName","c:showSerName"].some(u=>i(u)!==d(u));h?.consume(),y&&c(o,"cannot-hold","c:dLbls","a combination chart's plot's own data labels: its plots share the first's")}const Ce=S?p[1]:w?p.find(N(f))??p[0]:p[0],ae=S?p[0]:w?k.find(N(f))??k[0]:k[0],G=L.find(e=>e.secondary)?.plot,Se=G?p.find(e=>N(G)(e)&&e.one("c:axPos")?.attr("val")==="r"):void 0;for(const e of k)e===ae||!G||!N(G)(e)||(l(e.one("c:delete"))!==!0&&c(o,"cannot-hold","c:catAx","a second category axis that shows: a deck's second value axis crosses a hidden one"),e.consume());return{type:j,categories:Y,series:Ve,...Z===""?{}:{title:Z},...W?{legend:$e}:{},...A&&(d("c:showVal")||d("c:showPercent")||d("c:showCatName")||d("c:showSerName"))?{labels:{show_value:d("c:showVal"),show_percentage:d("c:showPercent"),show_category_name:d("c:showCatName"),show_series_name:d("c:showSerName"),...ve===void 0?{}:{number_format:ve},...ge===void 0?{}:{position:ge},...we===void 0?{}:{size:we/100},...ye===void 0?{}:{color:ye}}}:{},...ee===void 0?{}:{gap_width:Number(ee)},...te===void 0?{}:{overlap:Number(te)},...xe===void 0?{}:{hole_size:Number(xe)},...be===void 0?{}:{vary_by_categories:be},...Be(ue,Y.length),...Ce?{value_axis:ce(Ce,o,!1)}:{},...ae?{category_axis:ce(ae,o)}:{},...Se?{secondary_axis:ce(Se,o,!1)}:{},...oe===void 0?{}:{font_size:oe/100},...me===void 0?{}:{title_size:me/100},..._e===void 0?{}:{font_color:_e}}}
|
|
2
|
+
import{as as Ie}from"@allyhub/ooxml";import{accentOf as Ue,CHART_DEFAULTS as Me,EMU_PER_PT as Re,isCombinable as Be,isRound as Te}from"@allyhub/slides-core";import{colorAt as M,say as c}from"./common.js";function Ge(t,a){const s=t.find(r=>r.some(o=>o!==void 0));return s?{category_colors:Array.from({length:Math.max(a,s.length)},(r,o)=>s[o]??Ue(o))}:{}}const Ke=(t,a)=>t===void 0||t===""?a:t,l=t=>t===void 0?void 0:t.attr("val")??!0,X=t=>{t?.one("c:ptCount")?.attr("val");const a=[];for(const s of t?.all("c:pt")??[])a[s.attr("idx")??a.length]=s.one("c:v")?.text()??"";return Array.from(a,s=>s??"")};function je(t){return t?.one("c:f")?.skip("a series' formula into its workbook: the deck writes its own"),t?.one("c:strCache")}function We(t){return t?.one("c:f")?.skip("a series' formula into its workbook: the deck writes its own"),t?.one("c:numCache")}function ae(t){return je(t?.one("c:strRef"))??We(t?.one("c:numRef"))??t?.one("c:strLit")??t?.one("c:numLit")}function He(t){return We(t?.one("c:numRef"))??t?.one("c:numLit")}const Xe=["c:axId","c:crossAx","c:axPos","c:crosses","c:crossesAt","c:crossBetween","c:auto","c:lblAlgn","c:lblOffset","c:noMultiLvlLbl","c:majorTickMark","c:minorTickMark","c:tickLblPos","c:txPr"];function re(t){t?.one("a:bodyPr")?.skip("a chart text's body: the deck sets its own"),t?.one("a:lstStyle")?.skip("a chart text's list style");const a=t?.all("a:p")[0];return a?.one("a:endParaRPr")?.skip("the font of a paragraph's end"),a?.one("a:pPr")?.one("a:defRPr")}function De(t){const a=t?.one("c:tx")?.one("c:rich");a?.one("a:bodyPr")?.skip("a chart title's text body"),a?.one("a:lstStyle");const s=a?.all("a:p")??[];return{text:s.map(o=>o.all("a:r").map(b=>b.one("a:t")?.text()??"").join("")).join(`
|
|
3
|
+
`),size:s[0]?.all("a:r")[0]?.one("a:rPr")?.attr("sz")}}function se(t,a,s=!0){for(const T of Xe)t.one(T)?.skip("an axis's id, place, ticks, crossing and label alignment: the deck draws its own");const r=t.one("c:scaling"),o=r?.one("c:min")?.attr("val"),b=r?.one("c:max")?.attr("val"),m=t.one("c:majorUnit")?.attr("val"),D=t.one("c:numFmt"),g=D?.attr("formatCode"),V=D?.attr("sourceLinked"),P=l(t.one("c:delete"))===!0,_=(T,z=!0)=>{const w=T?.one("a:ln"),E=w?.attr("w");return!P&&E!==void 0&&Math.abs(E-Me.gridWidth*Re)>64&&c(a,"approximated","c:spPr/a:ln@w",`an axis's or its gridlines' width is the deck's own, ${String(Me.gridWidth)} pt`),w?.one("a:noFill")&&!P&&z&&c(a,"cannot-hold","c:spPr/a:ln/a:noFill","an axis or its gridlines with no line: a deck draws them"),w?.one("a:round")?.skip("a chart line's join"),M(w?.one("a:solidFill"),a,"c:spPr")?.color},L=t.one("c:majorGridlines"),$=_(L?.one("c:spPr")),p=_(t.one("c:spPr"),s),k=t.one("c:title"),{text:R}=De(k);return k?.one("c:overlay")?.attr("val"),k?.one("c:layout")?.skip("an axis title's own place"),k&&R===""&&c(a,"cannot-hold","c:title","an axis's automatic title: a deck's axis title is words of its own"),{...R===""?{}:{title:R},...o===void 0?{}:{minimum_scale:o},...b===void 0?{}:{maximum_scale:b},...m===void 0?{}:{major_unit:m},has_major_gridlines:L!==void 0,...P?{visible:!1}:{},...g===void 0||g==="General"||V===!0?{}:{number_format:g},...r?.one("c:orientation")?.attr("val")==="maxMin"?{reverse_order:!0}:{},...$===void 0?{}:{gridline_color:$},...p===void 0?{}:{line_color:p}}}export function chartOf(t,a){const s=a.read.pkg,r=s.open(t);if(!r)return"its part is not in the file";const o={...a,part:t};r.one("c:date1904")?.attr("val"),r.one("c:lang")?.skip("a chart's language"),r.one("c:style")?.skip("a chart's style number: its colours are read where it sets them"),r.one("c:roundedCorners")?.attr("val")===!0&&c(o,"cannot-hold","c:roundedCorners","a chart's rounded corners"),r.one("c:printSettings")?.skip("a chart's print settings");const b=r.one("c:externalData");if(b){const e=s.rel(t,b.attr("r:id"));e&&!e.external&&s.leave(e.target,"a chart's workbook: the deck writes one from its numbers"),b.one("c:autoUpdate")?.attr("val")}const m=r.one("c:chart"),D=l(m?.one("c:autoTitleDeleted"));m?.one("c:plotVisOnly")?.attr("val"),m?.one("c:showDLblsOverMax")?.skip("labels over a chart's maximum"),m?.one("c:dispBlanksAs")?.skip("how a chart draws a blank value");const g=m?.one("c:plotArea");g?.one("c:layout")?.skip("a chart's plot area's own layout");const V=e=>e?.kids().find(n=>n.key==="c:spPr");for(const e of[V(r),V(g)]){const n=e?.kids()??[];n.some(i=>i.key==="a:noFill")&&n.every(i=>i.key==="a:noFill"||i.key==="a:ln"&&i.kids().length===1&&i.kids()[0]?.key==="a:noFill")&&e?.consume()}const P=(g?.kids()??[]).filter(e=>e.key.endsWith("Chart")),_=e=>(r.consume(),e);if(P.length===0)return _("it has no plot");const L=e=>e.all("c:ser"),$=e=>{const n=e.key,h=L(e),i=e.one("c:grouping")?.attr("val"),y=i==="percentStacked"?"-stacked-100":i==="stacked"?"-stacked":"",u=h.map(x=>x.one("c:marker")?.one("c:symbol")?.attr("val")).some(x=>x!=="none");if(e.one("c:marker"),n==="c:barChart")return`${e.one("c:barDir")?.attr("val")==="bar"?"bar":"column"}${y===""?"-clustered":y}`;if(n==="c:lineChart")return y===""?u?"line-markers":"line":void 0;if(n==="c:areaChart")return`area${y}`;if(n==="c:pieChart")return"pie";if(n==="c:doughnutChart")return"doughnut";if(n==="c:scatterChart"){Ie(e).one("c:scatterStyle")?.attr("val");const x=h.every(A=>A.one("c:spPr")?.one("a:ln")?.el.children.some(H=>H.local==="noFill")),K=h.every(A=>l(A.one("c:smooth"))===!0);return x?"scatter":K&&!u?"scatter-smooth":"scatter-lines"}};for(const e of P){e.use();for(const n of e.all("c:axId"))n.attr("val")}const p=g?.all("c:valAx")??[],k=g?.all("c:catAx")??[],R=e=>e.all("c:axId").map(n=>n.attr("val")),T=e=>e.one("c:axId")?.attr("val"),z=e=>n=>R(e).includes(T(n)??-1),w=P.length>1,E=e=>w&&p.some(n=>z(e)(n)&&n.one("c:axPos")?.attr("val")==="r"),N=P.map(e=>({plot:e,type:$(e),secondary:E(e)}));if(w&&N.some(e=>e.type===void 0||!Be(e.type)))return _("it combines several kinds of chart, not columns, lines and areas");const ce=e=>Math.min(...L(e).map((n,h)=>n.one("c:order")?.attr("val")??h),1/0),q=N.filter(e=>!e.secondary).sort((e,n)=>ce(e.plot)-ce(n.plot))[0]??N[0];if(!q)return _("it has no plot");const f=q.plot,ie=f.key,j=q.type;if(!j)return _(`a deck has no ${ie.slice(2)} chart`);const le=N.flatMap(e=>L(e.plot).map(n=>({ser:n,of:e}))).map((e,n)=>({...e,order:e.ser.one("c:order")?.attr("val")??n})).sort((e,n)=>e.order-n.order),J=le.map(e=>e.ser),de=[];if(J.length===0)return _("it has no series");const C=ie==="c:scatterChart",[ue]=J,Ve=C?void 0:ue?.one("c:cat"),Q=X(ae(Ve)),$e=le.map(({ser:e,of:n})=>{const h=n.plot.key;e.one("c:idx")?.attr("val"),e.one("c:order")?.attr("val"),e!==ue&&!C&&ae(e.one("c:cat"))?.consume();const i=Ie(e),y=He(C?i.one("c:yVal"):e.one("c:val")),u=y?.one("c:formatCode")?.text()??"",x=X(y),K=C?ae(i.one("c:xVal")):void 0;K?.one("c:formatCode");const A=C?X(K):void 0,H=A?Math.max(A.length,x.length):Q.length,F=e.one("c:spPr"),Ce=M(F?.one("a:solidFill"),o,"c:spPr")?.color??M(F?.one("a:ln")?.one("a:solidFill"),o,"c:spPr")?.color,Se=l(e.one("c:smooth")),Ae=F?.one("a:ln")?.attr("w");F?.one("a:ln")?.one("a:noFill"),F?.one("a:ln")?.one("a:round")?.skip("a chart line's join"),Te(j)&&F?.one("a:ln")?.consume();const ze=e.one("c:marker"),Le=ze?.one("c:size")?.attr("val");ze?.one("c:spPr")?.consume(),l(e.one("c:invertIfNegative"))&&c(o,"cannot-hold","c:invertIfNegative","a bar of a negative value drawn in the inverse of its colour");const Ne=[];for(const O of e.all("c:dPt")){const I=O.one("c:idx")?.attr("val"),v=O.one("c:spPr"),Oe=M(v?.one("a:solidFill"),o,"c:spPr")?.color;I===void 0||Oe===void 0||(Ne[I]=Oe,l(O.one("c:invertIfNegative"))&&c(o,"cannot-hold","c:dPt/c:invertIfNegative","a bar of a negative value drawn in the inverse of its colour"),O.one("c:bubble3D")?.attr("val"),Te(j)&&v?.one("a:ln")?.consume())}de.push(Ne);const Fe=e.one("c:tx");return{name:Ke(X(je(Fe?.one("c:strRef")))[0]??Fe?.one("c:v")?.text(),`Series ${String(J.indexOf(e)+1)}`),values:Array.from({length:H},(O,I)=>{const v=x[I];return v===void 0||v===""?null:Number(v)}),...A?{x:Array.from({length:H},(O,I)=>{const v=A[I];return v===void 0||v===""?null:Number(v)})}:{},...u===""||u==="General"?{}:{number_format:u},...Ce===void 0?{}:{color:Ce},...Se===!0?{smooth:Se}:{},...Ae===void 0||h!=="c:lineChart"&&!C?{}:{line_width:Ae/Re},...Le===void 0?{}:{marker_size:Le},...n.type!==void 0&&n.type!==j?{type:n.type}:{},...n.secondary?{secondary:!0}:{}}}),U=m?.one("c:title"),{text:Y,size:fe}=De(U);U&&Y===""&&D!==!0&&c(o,"cannot-hold","c:title","a chart's automatic title (its series' name): a deck's chart title is words of its own"),l(U?.one("c:overlay"))===!0&&c(o,"cannot-hold","c:title/c:overlay","a chart's title drawn over its plot"),U?.one("c:layout")?.skip("a chart title's own place");const W=m?.one("c:legend"),B=W?.one("c:legendPos")?.attr("val");l(W?.one("c:overlay"))===!0&&c(o,"cannot-hold","c:legend/c:overlay","a chart's legend drawn over its plot"),W?.one("c:layout")?.skip("a legend's own place");const he=re(W?.one("c:txPr"))?.attr("sz"),Ee={b:"bottom",t:"top",l:"left",r:"right"}[B==="b"||B==="t"||B==="l"?B:"r"],S=f.one("c:dLbls"),d=e=>l(S?.one(e))===!0;l(S?.one("c:showLegendKey"))===!0&&c(o,"cannot-hold","c:showLegendKey","a chart's labels with their legend keys"),S?.one("c:showBubbleSize")?.attr("val"),l(S?.one("c:showLeaderLines"))===!0&&(d("c:showVal")||d("c:showPercent")||d("c:showCatName")||d("c:showSerName"))&&c(o,"cannot-hold","c:showLeaderLines","lines from a chart's labels to their points");const me=S?.one("c:numFmt")?.attr("formatCode"),pe=S?.one("c:dLblPos")?.attr("val"),ve=re(S?.one("c:txPr")),ge=ve?.attr("sz"),ke=M(ve?.one("a:solidFill"),o,"c:dLbls")?.color,Z=f.one("c:gapWidth")?.attr("val"),ee=f.one("c:overlap")?.attr("val"),we=f.one("c:holeSize")?.attr("val"),ye=l(f.one("c:varyColors"));f.one("c:varyColors")?.attr("val");const te=f.one("c:firstSliceAng")?.attr("val");te!==void 0&&te!==0&&c(o,"cannot-hold","c:firstSliceAng",`a round chart's first slice turned ${String(te)}°`);const xe=re(r.one("c:txPr")),ne=xe?.attr("sz");he!==void 0&&he!==ne&&c(o,"cannot-hold","c:legend/c:txPr","a legend's own text size: a chart's text is one size");const be=M(xe?.one("a:solidFill"),o,"c:txPr")?.color;for(const{plot:e}of N){if(e===f)continue;const n=u=>e.one(u)?.attr("val");n("c:gapWidth")!==void 0&&n("c:gapWidth")!==Z&&c(o,"cannot-hold","c:gapWidth","a combination chart's plot's own gap width: its plots share the first's"),n("c:overlap")!==void 0&&n("c:overlap")!==ee&&c(o,"cannot-hold","c:overlap","a combination chart's plot's own overlap: its plots share the first's"),e.one("c:varyColors")?.attr("val"),e.one("c:barDir")?.attr("val"),e.one("c:grouping")?.attr("val");const h=e.one("c:dLbls"),i=u=>l(h?.one(u))===!0,y=["c:showVal","c:showPercent","c:showCatName","c:showSerName"].some(u=>i(u)!==d(u));h?.consume(),y&&c(o,"cannot-hold","c:dLbls","a combination chart's plot's own data labels: its plots share the first's")}const Pe=C?p[1]:w?p.find(z(f))??p[0]:p[0],oe=C?p[0]:w?k.find(z(f))??k[0]:k[0],G=N.find(e=>e.secondary)?.plot,_e=G?p.find(e=>z(G)(e)&&e.one("c:axPos")?.attr("val")==="r"):void 0;for(const e of k)e===oe||!G||!z(G)(e)||(l(e.one("c:delete"))!==!0&&c(o,"cannot-hold","c:catAx","a second category axis that shows: a deck's second value axis crosses a hidden one"),e.consume());return{type:j,categories:Q,series:$e,...Y===""?{}:{title:Y},...W?{legend:Ee}:{},...S&&(d("c:showVal")||d("c:showPercent")||d("c:showCatName")||d("c:showSerName"))?{labels:{show_value:d("c:showVal"),show_percentage:d("c:showPercent"),show_category_name:d("c:showCatName"),show_series_name:d("c:showSerName"),...me===void 0?{}:{number_format:me},...pe===void 0?{}:{position:pe},...ge===void 0?{}:{size:ge/100},...ke===void 0?{}:{color:ke}}}:{},...Z===void 0?{}:{gap_width:Number(Z)},...ee===void 0?{}:{overlap:Number(ee)},...we===void 0?{}:{hole_size:Number(we)},...ye===void 0?{}:{vary_by_categories:ye},...Ge(de,Q.length),...Pe?{value_axis:se(Pe,o,!1)}:{},...oe?{category_axis:se(oe,o)}:{},..._e?{secondary_axis:se(_e,o,!1)}:{},...ne===void 0?{}:{font_size:ne/100},...fe===void 0?{}:{title_size:fe/100},...be===void 0?{}:{font_color:be}}}
|