allyhub 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/commands/frames/report.js +1 -1
- package/dist/commands/frames.js +11 -11
- package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/audio/dist/render.js +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/dist/media.js +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/dist/chart-file.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +3 -2
- package/dist/node_modules/@allyhub/chart/dist/chart.js +2 -1
- package/dist/node_modules/@allyhub/chart/dist/color.js +2 -0
- package/dist/node_modules/@allyhub/chart/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/svg.js +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/dist/call.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/records.d.ts +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/uploads.d.ts +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/uploads.js +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/dist/live.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/server.js +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/dist/data/deck-code.d.ts +130 -0
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/gen.d.ts +3 -1
- package/dist/node_modules/@allyhub/formats/dist/data/gen.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +512 -166
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +2523 -136
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +931 -87
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +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/package.json +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/media/dist/run.d.ts +6 -1
- package/dist/node_modules/@allyhub/media/dist/run.js +2 -2
- 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/dist/color.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/ext.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/transform.js +2 -0
- package/dist/node_modules/@allyhub/ooxml/package.json +5 -1
- package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +4 -4
- package/dist/node_modules/@allyhub/piece/dist/media.d.ts +2 -2
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/dist/part-keys.js +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +35 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +19 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +35 -20
- package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +3 -3
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +28 -2
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +73 -10
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +9 -9
- 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/report-extension/dist/cli/find.js +1 -1
- package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +3 -3
- package/dist/node_modules/@allyhub/report-extension/dist/cli/picture.js +29 -1
- package/dist/node_modules/@allyhub/report-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +11 -4
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.css +6 -2
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +1 -1
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/tokens.js +3 -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/dist/annotations.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/rules.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/arrange.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/data-tools.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/edit.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/fill.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/filter.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/rewrite.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/html.js +10 -10
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/outline.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/rich.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/rules.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/table-styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/runs.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +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/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +3 -3
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/check.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub/slides-core/dist/generated/table-styles.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/numbering.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/office.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/patterns.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/script.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/table-style.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/deck-pptx.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/workspace.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/audio-icon.js +2 -0
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +3 -3
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/script.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/chart.js +2 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/index.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/table.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/timing.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/table-styles.js +2 -0
- package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/theme.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/timing.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
- package/dist/node_modules/@allyhub/slides-runtime/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/ink.js +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +5 -5
- 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/dist/runtime.js +101 -49
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/dist/errors.js +2 -0
- package/dist/node_modules/@allyhub/telemetry/package.json +5 -1
- package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/inspect/timeline-text.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/package.json +3 -3
- 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/package.json +1 -1
- package/dist/package.json +12 -12
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-BKmMA6gn.js → abnfDiagram-WEYOIA3C-D70jg8mE.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-BEFBgb4k.js → architecture-WOLXFQ4H-CrXS3E8e.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-_u5YfCjY.js → architectureDiagram-ZHVYKT53-JrBljCOx.js} +1 -1
- package/editor-web/assets/arrow-down-DzZjFrBL.js +1 -0
- package/editor-web/assets/arrow-up-hdmh9LVD.js +1 -0
- package/editor-web/assets/{article-BUmD3xtR.js → article-BWrfVMRA.js} +6 -6
- package/editor-web/assets/article-hxHjqzV1.js +7 -0
- package/editor-web/assets/{audio-lines-CzuzsGjI.js → audio-lines-1s1eRs4Q.js} +1 -1
- package/editor-web/assets/{blockDiagram-RJAE7QA3-DybfaO3Z.js → blockDiagram-RJAE7QA3-BzfC1xTS.js} +1 -1
- package/editor-web/assets/{bookmark-Dsd3kHJJ.js → bookmark-Dfji3syX.js} +1 -1
- package/editor-web/assets/{button-eGxLxbv9.js → button-EftXSfev.js} +1 -1
- package/editor-web/assets/{c4Diagram-XDPPPE54-BfqLHB5i.js → c4Diagram-XDPPPE54-s2TpXKgH.js} +1 -1
- package/editor-web/assets/calc-worker-jImBXoeb.js +45 -0
- package/editor-web/assets/channel-BFbXY6R0.js +1 -0
- package/editor-web/assets/chart-BC3kUUDD.js +2 -0
- package/editor-web/assets/{chart-no-axes-column-BVkeF_Mr.js → chart-no-axes-column-CJmeYOSo.js} +1 -1
- package/editor-web/assets/{chunk-2E7WHVMD-BVp1I_d0.js → chunk-2E7WHVMD-DyE9v6UX.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-CTdgWEMr.js → chunk-4EMNKR2T-CCunMMcT.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-7pnsxeaP.js → chunk-55XCU76K-CZgJYrN4.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-Dc0Dvkq7.js → chunk-7S6XSTFO-B01FlTFf.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-VAILIsfx.js → chunk-AQDTSKZB-latWUvVu.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-CUDx1Rv5.js → chunk-DSNLSHJZ-BHFiQInN.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-DAoEe-dJ.js → chunk-HAGFOTED-C4hR36ab.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-g0akya12.js → chunk-HNE4Q36P-CNrxiD2Q.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-hTGjzXdJ.js → chunk-NQOKRVIF-DpyEHKEY.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-BgLV8BIJ.js → chunk-UHW7PFBP-SIEJdixh.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-Bw19OOSD.js → chunk-VQ5W62QI-CxWnQRxx.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-CMST9dyE.js → chunk-WQQL4CDK-CbRuCBm6.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-Bbpu36XF.js → chunk-YZO67HFG-Cgu-EQvs.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-C48Ri0Gs.js → chunk-ZAUX2LTX-pAl5CV3o.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-DN1g01Oe.js → chunk-ZCHMQSOR-Du5hY-FP.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-U6jbPr2d.js → classDiagram-v2-4MYWR3UA-CevU94T6.js} +1 -1
- package/editor-web/assets/{collaborator-B1u2td9m.js → collaborator-C6IJkcGR.js} +1 -1
- package/editor-web/assets/copy-DvOiv9Ra.js +1 -0
- package/editor-web/assets/{createLucideIcon-GFZ_fxLc.js → createLucideIcon-REX213UO.js} +1 -1
- package/editor-web/assets/{cynefin-EF2NZ3EQ-gzkai_7-.js → cynefin-EF2NZ3EQ-DBHwpMRJ.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-DtSekSr6.js → cynefinDiagram-WF24UDRP-CxUzpjvG.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-CiUwYVT6.js → dagre-NK4GIZVX-BAJNBDYO.js} +1 -1
- package/editor-web/assets/{diagram-CBK3MWTC-r9XHCV-k.js → diagram-CBK3MWTC-BQW9Fbw-.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-DxVsDZ34.js → diagram-I5XIIV2D-DQBROUfn.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-B0eNQoHV.js → diagram-ODIL2UCW-DEoK31qy.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-C7f2MfJT.js → diagram-PFBEJUXE-BTCa2We1.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-CSXcnvct.js → diagram-RJA3I4VV-DNM8qWC3.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-DXzOD_ii.js → diagram-TYUNFSNR-BcKpED4d.js} +1 -1
- package/editor-web/assets/dist-90dg0B0d.js +2 -0
- package/editor-web/assets/dist-BSPs7tZR.js +1 -0
- package/editor-web/assets/dist-CP9XwbBS.js +45 -0
- package/editor-web/assets/dist-CRxtC7DG.js +24 -0
- package/editor-web/assets/{dist-CC7OeU1e.js → dist-Cmnq14RO.js} +3 -3
- package/editor-web/assets/dist-CrZwqOm2.js +1 -0
- package/editor-web/assets/dist-CzUWTcvC.js +38 -0
- package/editor-web/assets/dist-D2a_y4AE.js +1 -0
- package/editor-web/assets/{dist-DDv_SbKw.js → dist-DMZ1VHPK.js} +1 -1
- package/editor-web/assets/dist-DYnXIW8F.js +16 -0
- package/editor-web/assets/{dist-BuWaZ3Y4.js → dist-Dpet39Yp.js} +30 -30
- package/editor-web/assets/dist-Dre4Cwpz.js +1 -0
- package/editor-web/assets/dist-RkxskWGK.js +5 -0
- package/editor-web/assets/dist-aANR6S2I.js +3 -0
- package/editor-web/assets/{dist-Gz6NDS0J.js → dist-qSuFWuVB.js} +3 -3
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-Cs4YRvDD.js → ebnfDiagram-V4P3TTPT-D-1x27Eh.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-Bh3LZ9WI.js → elk-QONTBCTQ-BJSCxiTH.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-C4vYTYXp.js → erDiagram-KYQIGQAA-C7Q357iD.js} +1 -1
- package/editor-web/assets/{eventmodeling-K75KTNOO-BN1kkHWS.js → eventmodeling-K75KTNOO-kXrQLSF5.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-GSC4btef.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-CA1LkkC5.js → ganttDiagram-R7GPNTJY-Bt3SRgK7.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-Dy5tA7dG.js → gitGraph-VSP46ZUC-DS4CkhfK.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-hJIB8EkH.js → gitGraphDiagram-PDYL7XHY-BgfmSVdI.js} +1 -1
- package/editor-web/assets/group-pebHQTdP.js +1 -0
- package/editor-web/assets/{hint-B8JpEypy.js → hint-BmRKl2nL.js} +1 -1
- package/editor-web/assets/index-D8qc_ipi.js +28 -0
- package/editor-web/assets/index-DDtZpLDF.css +2 -0
- package/editor-web/assets/{info-OHQRW6UA-DvzSf7rQ.js → info-OHQRW6UA-BZjctF3x.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-BjIMm4Af.js → infoDiagram-MVDRKAX5-BAp5oUXk.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-Bpz71S40.js → ishikawaDiagram-HPEHV2GE-DGL7ZfUu.js} +1 -1
- package/editor-web/assets/{italic-D10w8n6C.js → italic-CtlNOXN9.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-DAB-pZjD.js → journeyDiagram-BOSHW7O7-DOOoBGx-.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-cYeyh3P6.js → kanban-definition-FNSA4HC5-lbLuUiMW.js} +1 -1
- package/editor-web/assets/katex-UWCZofcd.js +257 -0
- package/editor-web/assets/{link-BC5xK1-1.js → link-CW2KxKT_.js} +1 -1
- package/editor-web/assets/{mermaid-parser.core-req5LE0X.js → mermaid-parser.core-RkCFmJcg.js} +3 -3
- package/editor-web/assets/{mermaid.core-zFwZug4C.js → mermaid.core-BVUl-afX.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-TStWb7DG.js → mindmap-definition-6OY57UG3-C3DC4T1J.js} +1 -1
- package/editor-web/assets/minus-D1tgAHbU.js +1 -0
- package/editor-web/assets/{packet-JDAUHWVQ-smFhVKcB.js → packet-JDAUHWVQ-Bkd6YpX8.js} +1 -1
- package/editor-web/assets/{palette-BIOudGkm.js → palette-INFK0Zsr.js} +1 -1
- package/editor-web/assets/{pegDiagram-ECIUJNBX-DvSNRv0-.js → pegDiagram-ECIUJNBX-B5Seh4Oe.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-qjaGsBZG.js → pie-XZMESJXO-BNbb4Q8k.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-Dd9P-Pdc.js → pieDiagram-GNMPY74T-_hnbUloZ.js} +1 -1
- package/editor-web/assets/play-DvMyq5xW.js +1 -0
- package/editor-web/assets/{progress-DE4C5_3x.js → progress-D6wSFdpY.js} +1 -1
- package/editor-web/assets/props-form-BfwEi6jW.js +1 -0
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-h2IIKUUA.js → quadrantDiagram-D57K4MC3-1rbqW-KO.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-DlVrSA1d.js → radar-ABXABTNO-BWSnhBSp.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-nFbuLAtc.js → railroad-I3PHUGI6-BNB-OKs1.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-Daj8h2iV.js → railroad-abnf-LNEFI6M7-BKgidf_B.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-eYJyl5PH.js → railroad-ebnf-DWYD2UWJ-CNCnxtHp.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-BTRhKZQq.js → railroad-peg-JR7BVNR7-CyBW6_0o.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-CeLGUjdp.js → railroadDiagram-Y72NRBL7-Cud3SJ7O.js} +1 -1
- package/editor-web/assets/{react-WA6wlt8S.js → react-Bk7NnOLX.js} +1 -1
- package/editor-web/assets/{repeat-2-VQP1EVOZ.js → repeat-2-DfPmKp4w.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-Dmk9XRM5.js → requirementDiagram-EQYSW5RA-BrSCcpqV.js} +1 -1
- package/editor-web/assets/{row-BRlEWRrK.js → row-VwyPfa1b.js} +1 -1
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-Yn4zlrAM.js → sankeyDiagram-SY24JHO5-rJV4dJFn.js} +1 -1
- package/editor-web/assets/scissors-D9WmgvNP.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-BTRnp_PW.js → sequenceDiagram-BLEHNHQU-CEUuD2n6.js} +1 -1
- package/editor-web/assets/{session-Do9AqS38.js → session-DE0fvAcs.js} +1 -1
- package/editor-web/assets/sigma-CY2Chbro.js +1 -0
- package/editor-web/assets/slides-BgacyjJW.js +1 -0
- package/editor-web/assets/{snapshots-BUGlKQIB.js → snapshots-D8TtZp1x.js} +1 -1
- package/editor-web/assets/{sound-Bj3o9_Fa.js → sound-DUCxe9eC.js} +1 -1
- package/editor-web/assets/split-Cx2MMnC_.js +3 -0
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-kstrRKv2.js → stateDiagram-v2-A6IESKWZ-BRE_C2he.js} +1 -1
- package/editor-web/assets/sticky-note-C5qUDHhC.js +1 -0
- package/editor-web/assets/{strikethrough-CfXx6IYH.js → strikethrough-DP-7tMz0.js} +1 -1
- package/editor-web/assets/svg-nJtFNJ-7.js +1 -0
- package/editor-web/assets/{swatch-WeJD41aW.js → swatch-lxK4C8fD.js} +1 -1
- package/editor-web/assets/{swimlanes-B3ENRKFQ-DaZsZkeP.js → swimlanes-B3ENRKFQ-BEPqWgVe.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-DAcNszZ6.js +8 -0
- package/editor-web/assets/{switch-N0G_sbqt.js → switch-DaG6OuAi.js} +1 -1
- package/editor-web/assets/{syntax-oWsKBWFw.js → syntax-9LD8MzGy.js} +1 -1
- package/editor-web/assets/{syntax-BVsgRJ4I.js → syntax-CLaCSmoi.js} +1 -1
- package/editor-web/assets/{table-B6hVZAMi.js → table-CTjNpE4W.js} +1 -1
- package/editor-web/assets/tabs-DjhzblAG.js +1 -0
- package/editor-web/assets/{textarea-tEWvBY9p.js → textarea-DBwRbOyF.js} +1 -1
- package/editor-web/assets/{timeline-definition-JXYKGLGB-CLCvY-Yf.js → timeline-definition-JXYKGLGB-p8Qeg4pS.js} +1 -1
- package/editor-web/assets/{trash-2-BP6nqpg2.js → trash-2-DrnRa91l.js} +1 -1
- package/editor-web/assets/{treeView-D4JQ5SDB-BmN0gwdC.js → treeView-D4JQ5SDB-C9FTdXKq.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-DN29G_E_.js → treemap-SAJKECNS-XAeLVOtI.js} +1 -1
- package/editor-web/assets/{undo-2-CHR0nvWL.js → undo-2-DUGGyBdX.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-DTRS54cB.js → usecaseDiagram-WPOLBNNX-BV3AMRuH.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-DAAc11Hx.js → vennDiagram-Q3Y3IDCW-CJdKcYyA.js} +1 -1
- package/editor-web/assets/{video-BlvmR8BK.js → video-He8p6dr6.js} +1 -1
- package/editor-web/assets/{wardley-7MLQ67FV-B-UYkmdB.js → wardley-7MLQ67FV-DZh6Mf22.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-BmbwCaky.js → wardleyDiagram-IVAIDKWA-XtvKSX-m.js} +1 -1
- package/editor-web/assets/{words-D_4T9Adq.js → words-CPHp_0tt.js} +1 -1
- package/editor-web/assets/{words-WgdEQdYP.js → words-CjW-1tZI.js} +1 -1
- package/editor-web/assets/{xychartDiagram-4URNHDU4-ChAfAq1U.js → xychartDiagram-4URNHDU4-CGkL42sz.js} +1 -1
- package/editor-web/assets/zoom-in-C4lxmIDE.js +1 -0
- package/editor-web/index.html +6 -6
- package/package.json +2 -2
- package/editor-web/assets/arrow-up-B5rJbBv0.js +0 -1
- package/editor-web/assets/article-DNioBb3p.js +0 -7
- package/editor-web/assets/calc-worker-D2pGis6e.js +0 -45
- package/editor-web/assets/channel-TNPgFDrw.js +0 -1
- package/editor-web/assets/chart-C37xvZT2.js +0 -1
- package/editor-web/assets/dist-BGRwhCQO.js +0 -1
- package/editor-web/assets/dist-BW4X7BrF.js +0 -1
- package/editor-web/assets/dist-BgDRE85b.js +0 -2
- package/editor-web/assets/dist-Blq5nJnU.js +0 -24
- package/editor-web/assets/dist-C1emZ9wX.js +0 -37
- package/editor-web/assets/dist-CX-fiPSn.js +0 -38
- package/editor-web/assets/dist-C_VvG-_9.js +0 -5
- package/editor-web/assets/dist-Ce7HrBxv.js +0 -3
- package/editor-web/assets/dist-D2k6w-_a.js +0 -1
- package/editor-web/assets/dist-DEoEO4zs.js +0 -1
- package/editor-web/assets/dist-DlDxxPIP.js +0 -16
- package/editor-web/assets/flowDiagram-IUGLLWBU-B04NGsyi.js +0 -1
- package/editor-web/assets/index-CgB5osVc.js +0 -28
- package/editor-web/assets/index-Daytem9N.css +0 -2
- package/editor-web/assets/katex-5Z2zF-9g.js +0 -257
- package/editor-web/assets/minus-DaWs5i8B.js +0 -1
- package/editor-web/assets/play-CrMmPghG.js +0 -1
- package/editor-web/assets/props-form-CsmDBqzy.js +0 -1
- package/editor-web/assets/schemas-VikZYZIK.js +0 -1
- package/editor-web/assets/slides-diTEQ3C5.js +0 -1
- package/editor-web/assets/split-CNU1RHcX.js +0 -3
- package/editor-web/assets/svg-Cx50MpxK.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CBZAujYY.js +0 -8
- package/editor-web/assets/tabs-DIFDqj-l.js +0 -1
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,d as n,h as r,o as i,p as a,s as o,y as s}from"./react-WA6wlt8S.js";import{Dt as c,Tt as l,_t as u,gt as d,t as f}from"./button-eGxLxbv9.js";import{et as p,rt as m,tt as h}from"./snapshots-BUGlKQIB.js";import{t as g}from"./session-Do9AqS38.js";import{t as _}from"./jsx-runtime-DePvh3-m.js";import{t as v}from"./createLucideIcon-GFZ_fxLc.js";import{n as ee,t as y}from"./italic-D10w8n6C.js";import{t as b}from"./bookmark-Dsd3kHJJ.js";import{C as x,D as te,a as ne,w as S,x as re}from"./dist-CC7OeU1e.js";import{D as ie,O as ae,k as oe}from"./dist-BgDRE85b.js";import{d as se,g as C,l as w,o as ce,r as le,t as T}from"./words-D_4T9Adq.js";import{a as ue,c as E,i as de,l as fe,n as pe,s as me,t as he}from"./split-CNU1RHcX.js";import{t as D}from"./link-BC5xK1-1.js";import{t as O}from"./minus-DaWs5i8B.js";import{t as k}from"./play-CrMmPghG.js";import{O as A,T as j,dt as M,ft as N,n as ge,nt as _e,o as P,pt as F,s as ve,t as ye,ut as be}from"./dist-DDv_SbKw.js";import{n as xe,t as Se}from"./undo-2-CHR0nvWL.js";import{D as Ce,et as we,g as Te,it as Ee,lt as De,m as Oe,p as ke,ut as Ae,v as I}from"./index-CgB5osVc.js";import{t as je}from"./collaborator-B1u2td9m.js";import{S as Me,h as Ne,i as Pe,n as Fe,p as Ie,r as Le,t as Re}from"./syntax-C0iPON60.js";import{a as ze,c as Be,i as Ve,n as He,o as Ue,s as We,t as Ge}from"./syntax-BVsgRJ4I.js";import{i as Ke,n as qe}from"./textarea-tEWvBY9p.js";import{c as Je,n as Ye,s as Xe,t as Ze}from"./dist-YW8hS4IM.js";var Qe=v(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),$e=v(`square-play`,[[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z`,key:`kmsa83`}]]),et=p({title:h().optional(),cover:m([h().min(1),p({file:h().min(1),alt:h().optional()})]).optional()}),tt=/^<br\s*\/?>$/iu,nt=/^https?:\/\/\S+$/u,rt={extensions:[N([`yaml`]),Fe(),Re(),Le(),Ge()],mdastExtensions:[be([`yaml`]),Ne(),Ie(),Pe(),He()]},it={extensions:[M([`yaml`])],bullet:`-`,emphasis:`*`,strong:`*`,rule:`-`,fences:!0},at=e=>`${e.bold===!0?`b`:``}${e.italic===!0?`i`:``}|${e.link??``}`;function L(e){let t=[];for(let n of e){if(n.text===``)continue;let e=t.at(-1);e&&at(e)===at(n)?t[t.length-1]={...e,text:e.text+n.text}:t.push(n)}return t}function R(e,t,n,r={}){let i=[];for(let a of e)switch(a.type){case`text`:i.push({...r,text:a.value.replace(/\n/gu,` `)});break;case`break`:i.push({...r,text:` `});break;case`strong`:i.push(...R(a.children,t,n,{...r,bold:!0}));break;case`emphasis`:i.push(...R(a.children,t,n,{...r,italic:!0}));break;case`delete`:t(a,`strikethrough, which LinkedIn's article editor does not have: its words are kept plain`),i.push(...R(a.children,t,n,r));break;case`link`:i.push(...R(a.children,t,n,{...r,link:a.url}));break;case`linkReference`:{let e=n.get(a.identifier.toLowerCase());i.push(...R(a.children,t,n,e===void 0?r:{...r,link:e}));break}case`footnoteReference`:t(a,`a footnote, which LinkedIn's blocks do not hold: write the source in the words, or as a link`);break;case`inlineCode`:t(a,`inline code, which LinkedIn's article editor does not style: write it as words, or as a code snippet`),i.push({...r,text:a.value});break;case`image`:t(a,`a picture inside a line: LinkedIn takes a picture as a block of its own, on a line of its own`);break;case`inlineMath`:t(a,`an equation, which LinkedIn's article editor does not have`),i.push({...r,text:a.value});break;case`html`:/^<!--[\s\S]*-->$/u.test(a.value.trim())||t(a,`HTML, which LinkedIn's blocks do not hold`);break;default:t(a,`${a.type}, which LinkedIn's blocks do not hold`)}return i}var ot=e=>e.map(e=>`value`in e?e.value:`children`in e?ot(e.children):``).join(``);function z(e){let t=[],n=(e,n)=>{t.push({rule:`article-markup`,line:e.position?.start.line,message:`${n[0]?.toUpperCase()??``}${n.slice(1)}.`})},r=Me(e,rt),i=new Map;for(let e of r.children)e.type===`definition`&&i.set(e.identifier.toLowerCase(),e.url);let a=``,o,s=[],c=e=>{switch(e.type){case`yaml`:{let n;try{n=qe(e.value)}catch(n){t.push({rule:`format`,line:e.position?.start.line,message:`Its front matter is not YAML: ${n.message.split(`
|
|
2
|
-
`)[0]??``}`});break}let r=et.safeParse(n??{});if(!r.success){t.push({rule:`format`,line:e.position?.start.line,message:`Its front matter takes a title and a cover (a file, or { file, alt }): ${r.error.issues.map(e=>e.message).join(`; `)}`});break}a=r.data.title??``;let i=r.data.cover;o=i===void 0?void 0:typeof i==`string`?{file:i}:{file:i.file,...i.alt===void 0?{}:{alt:i.alt}};break}case`paragraph`:{let t=e.children.filter(e=>e.type===`image`),r=e.children.filter(e=>e.type!==`image`&&e.type!==`break`&&(e.type!==`text`||e.value.trim()!==``));if(t.length>0&&r.length===0){for(let e of t)s.push({type:`image`,file:e.url,...e.alt?{alt:e.alt}:{},...e.title?{caption:e.title}:{}});break}let a=ot(e.children).trim();if(!a.includes(` `)&&nt.test(a)){s.push({type:`embed`,url:a});break}s.push({type:`paragraph`,runs:L(R(e.children,n,i))});break}case`heading`:e.depth>2&&n(e,`a heading of level ${String(e.depth)}: LinkedIn has a Heading (#) and a Subheading (##)`),s.push({type:e.depth===1?`h1`:`h2`,runs:L(R(e.children,n,i))});break;case`blockquote`:for(let t of e.children)t.type===`paragraph`?s.push({type:`quote`,runs:L(R(t.children,n,i))}):n(t,`${t.type} inside a quote, which LinkedIn's blocks do not hold`);break;case`list`:{let t=[],r=()=>{t.length>0&&s.push({type:e.ordered===!0?`ol`:`ul`,items:t}),t=[]};e.ordered===!0&&(e.start??1)!==1&&n(e,`a numbered list starting at ${String(e.start)}: LinkedIn numbers every list from 1`);for(let a of e.children){let[e,...o]=a.children;t.push(e?.type===`paragraph`?L(R(e.children,n,i)):[]),e!==void 0&&e.type!==`paragraph`&&o.unshift(e);for(let e of o)e.type===`list`?n(e,`a list inside a list: LinkedIn's lists are one level deep`):(r(),c(e))}r();break}case`thematicBreak`:s.push({type:`divider`});break;case`code`:s.push({type:`code`,code:e.value,...e.lang?{lang:e.lang}:{}});break;case`math`:n(e,`an equation, which LinkedIn's article editor does not have`);break;case`table`:n(e,`a table, which LinkedIn's article editor does not have: a picture of it, or a list`);break;case`html`:if(tt.test(e.value.trim())){s.push({type:`paragraph`,runs:[]});break}if(/^<!--[\s\S]*-->$/u.test(e.value.trim()))break;n(e,`HTML, which LinkedIn's blocks do not hold (an empty line is <br /> alone)`);break;case`definition`:break;case`footnoteDefinition`:n(e,`a footnote, which LinkedIn's blocks do not hold: write the source in the words, or as a link`);break;default:n(e,`${e.type}, which LinkedIn's blocks do not hold`)}},l=[],u;for(let e of r.children){let t=s.length;c(e);let n=e.position&&{from:e.position.start.line,to:e.position.end.line};if(n){e.type===`yaml`&&(u=n);for(let e=t;e<s.length;e++)l.push(n)}}return a.trim()===``&&t.push({rule:`article-title`,line:1,message:`It has no title: LinkedIn's article needs one (front matter: title: …).`}),{article:{title:a,...o?{cover:o}:{},blocks:s},issues:t,lines:l,head:u}}function B(e){return e.map(e=>{let t={type:`text`,value:e.text};return e.italic===!0&&(t={type:`emphasis`,children:[t]}),e.bold===!0&&(t={type:`strong`,children:[t]}),e.link!==void 0&&(t={type:`link`,url:e.link,children:[t]}),t})}function st(e){switch(e.type){case`paragraph`:return e.runs.every(e=>e.text===``)?[{type:`html`,value:`<br />`}]:[{type:`paragraph`,children:B(e.runs)}];case`h1`:case`h2`:return[{type:`heading`,depth:e.type===`h1`?1:2,children:B(e.runs)}];case`quote`:return[{type:`blockquote`,children:[{type:`paragraph`,children:B(e.runs)}]}];case`ul`:case`ol`:return[{type:`list`,ordered:e.type===`ol`,spread:!1,children:e.items.map(e=>({type:`listItem`,spread:!1,children:[{type:`paragraph`,children:B(e)}]}))}];case`image`:return[{type:`paragraph`,children:[{type:`image`,url:e.file,alt:e.alt??``,title:e.caption??null}]}];case`embed`:return[{type:`paragraph`,children:[{type:`text`,value:e.url}]}];case`divider`:return[{type:`thematicBreak`}];case`code`:return[{type:`code`,lang:e.lang??null,value:e.code}]}}function ct(e){let t={title:e.title};e.cover&&(t.cover=e.cover.alt===void 0?e.cover.file:{file:e.cover.file,alt:e.cover.alt});let n={type:`root`,children:[{type:`yaml`,value:Ke(t,{lineWidth:0}).trimEnd()},...e.blocks.flatMap(st)]};return Be(n,it)}var V=e=>e.replace(/&/gu,`&`).replace(/</gu,`<`).replace(/>/gu,`>`).replace(/"/gu,`"`);function H(e){return e.map(e=>{let t=V(e.text);return e.italic===!0&&(t=`<em>${t}</em>`),e.bold===!0&&(t=`<strong>${t}</strong>`),e.link!==void 0&&(t=`<a href="${V(e.link)}">${t}</a>`),t}).join(``)}function lt(e,t){switch(e.type){case`paragraph`:return e.runs.length===0?`<p><br></p>`:`<p>${H(e.runs)}</p>`;case`h1`:return`<h1>${H(e.runs)}</h1>`;case`h2`:return`<h2>${H(e.runs)}</h2>`;case`quote`:return`<blockquote><p>${H(e.runs)}</p></blockquote>`;case`ul`:case`ol`:return`<${e.type}>${e.items.map(e=>`<li>${H(e)}</li>`).join(``)}</${e.type}>`;case`code`:return`<pre><code>${V(e.code)}</code></pre>`;case`divider`:return`<hr>`;case`embed`:return`<p><a href="${V(e.url)}">${V(e.url)}</a></p>`;case`image`:{let n=t(e.file);return n===void 0?``:`<figure><img src="${V(n)}" alt="${V(e.alt??``)}">${e.caption===void 0?``:`<figcaption>${V(e.caption)}</figcaption>`}</figure>`}}}function ut(e,t=()=>void 0){return e.blocks.map(e=>lt(e,t)).filter(e=>e!==``).join(`
|
|
3
|
-
`)}function dt(e){return e.blocks.map(e=>{switch(e.type){case`ul`:return e.items.map(e=>`• ${e.map(e=>e.text).join(``)}`).join(`
|
|
4
|
-
`);case`ol`:return e.items.map((e,t)=>`${String(t+1)}. ${e.map(e=>e.text).join(``)}`).join(`
|
|
5
|
-
`);case`code`:return e.code;case`divider`:return`---`;case`embed`:return e.url;case`image`:return e.caption??``;default:return e.runs.map(e=>e.text).join(``)}}).join(`
|
|
6
|
-
|
|
7
|
-
`)}var U=_(),W=e(s(),1);function G({runs:e}){return(0,U.jsx)(U.Fragment,{children:e.map((e,t)=>{let n=e.text;return e.italic===!0&&(n=(0,U.jsx)(`em`,{children:n})),e.bold===!0&&(n=(0,U.jsx)(`strong`,{children:n})),e.link!==void 0&&(n=(0,U.jsx)(`span`,{className:`ak-li-a-link`,children:n})),(0,U.jsx)(`span`,{children:n},t)})})}function ft({url:e}){let t=e;try{t=new URL(e).hostname.replace(/^www\./u,``)}catch{}return(0,U.jsxs)(`div`,{className:`ak-li-embed`,children:[(0,U.jsx)(k,{"aria-hidden":`true`}),(0,U.jsxs)(`div`,{className:`ak-li-embed-text`,children:[(0,U.jsx)(`span`,{className:`ak-li-embed-site`,children:t}),(0,U.jsx)(`span`,{className:`ak-li-embed-url`,children:e})]})]})}function pt({file:e,alt:t,src:n,measure:r}){let i=(0,W.useContext)(se);if(n===void 0)return(0,U.jsx)(`div`,{className:`ak-li-made`,children:e});if(/\.mp4$/iu.test(e)){let t=r?.width!==void 0&&r.height!==void 0?{aspectRatio:`${String(r.width)} / ${String(r.height)}`}:void 0;return(0,U.jsxs)(`div`,{className:`ak-li-video`,style:t,children:[i({src:`${n}#t=0.1`,muted:!0,playsInline:!0},e),(0,U.jsx)(`span`,{className:`ak-li-play`,"aria-hidden":`true`})]})}return(0,U.jsx)(`img`,{src:n,alt:t??``})}function mt({block:e,source:t,measure:n}){switch(e.type){case`paragraph`:return(0,U.jsx)(`p`,{dir:`auto`,children:e.runs.length===0?(0,U.jsx)(`br`,{}):(0,U.jsx)(G,{runs:e.runs})});case`h1`:return(0,U.jsx)(`h2`,{dir:`auto`,children:(0,U.jsx)(G,{runs:e.runs})});case`h2`:return(0,U.jsx)(`h3`,{dir:`auto`,children:(0,U.jsx)(G,{runs:e.runs})});case`quote`:return(0,U.jsx)(`blockquote`,{dir:`auto`,children:(0,U.jsx)(G,{runs:e.runs})});case`ul`:case`ol`:{let t=e.type;return(0,U.jsx)(t,{children:e.items.map((e,t)=>(0,U.jsx)(`li`,{dir:`auto`,children:(0,U.jsx)(G,{runs:e})},t))})}case`code`:return(0,U.jsx)(`pre`,{children:(0,U.jsx)(`code`,{children:e.code})});case`divider`:return(0,U.jsx)(`hr`,{});case`embed`:return(0,U.jsx)(ft,{url:e.url});case`image`:return(0,U.jsxs)(`figure`,{children:[(0,U.jsx)(pt,{file:e.file,alt:e.alt,src:t(e.file),measure:n?.(e.file)}),e.caption===void 0?null:(0,U.jsx)(`figcaption`,{children:e.caption})]})}}function ht({article:e,source:t,measure:n}){return(0,U.jsx)(`div`,{className:`ak-li-a-body`,children:e.blocks.map((e,r)=>(0,U.jsx)(mt,{block:e,source:t,measure:n},r))})}function gt(){return(0,U.jsxs)(`div`,{className:`ak-li-a-by`,children:[(0,U.jsx)(`div`,{className:`ak-li-avatar`,style:{width:48,height:48},"aria-hidden":`true`,children:w.name.slice(0,1)}),(0,U.jsxs)(`div`,{className:`ak-li-who`,children:[(0,U.jsx)(`span`,{className:`ak-li-name`,children:w.name}),(0,U.jsx)(`span`,{className:`ak-li-headline`,children:w.headline})]}),(0,U.jsxs)(`span`,{className:`ak-li-a-tools`,"aria-hidden":`true`,children:[(0,U.jsx)(b,{}),(0,U.jsx)(Ee,{})]})]})}function _t({article:e,source:t,measure:n}){return(0,U.jsxs)(`article`,{className:`ak-li-article`,children:[e.cover?(0,U.jsx)(`div`,{className:`ak-li-a-cover`,children:(0,U.jsx)(pt,{file:e.cover.file,alt:e.cover.alt,src:t(e.cover.file),measure:n?.(e.cover.file)})}):null,(0,U.jsx)(`h1`,{className:`ak-li-a-title`,dir:`auto`,children:e.title}),(0,U.jsx)(gt,{}),(0,U.jsx)(ht,{article:e,source:t,measure:n})]})}var vt=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function yt(e,t){if(e.title!==t.title||!vt(e.cover,t.cover))return{head:!0};for(let n=0;n<t.blocks.length;n++)if(!vt(e.blocks[n],t.blocks[n]))return{block:n};if(e.blocks.length>t.blocks.length&&t.blocks.length>0)return{block:t.blocks.length-1}}function bt(e,t){let n=z(e),r=e=>e.from<=t.to&&t.from<=e.to;if(n.head&&r(n.head))return{head:!0};let i=n.lines.findIndex(r);return i<0?void 0:{block:i}}function xt(e,t){if(e.from!==void 0&&e.path===t.path)return bt(t.text,{from:e.from,to:e.to??e.from})}var K=new Je(`liArticleAgent`),St=j.create({name:`liArticleAgent`,addProseMirrorPlugins(){return[new Xe({key:K,state:{init:()=>null,apply:(e,t)=>{let n=e.getMeta(K);return n===void 0?t:n}},props:{decorations(e){let t=K.getState(e);if(!t)return null;let n;return e.doc.forEach((e,r,i)=>{i===t.block&&(n=Ze.node(r,r+e.nodeSize,{class:`ak-li-agent`,"data-agent":t.label,"data-testid":`linkedin-agent-block`}))}),n?Ye.create(e.doc,[n]):null}}})]}});function Ct(e,t){e.isDestroyed||e.view.dispatch(e.state.tr.setMeta(K,t))}var q={image:`liImage`,embed:`liEmbed`};function wt(e){let t=[];return e.bold===!0&&t.push({type:`bold`}),e.italic===!0&&t.push({type:`italic`}),e.link!==void 0&&t.push({type:`link`,attrs:{href:e.link}}),{type:`text`,text:e.text,...t.length>0?{marks:t}:{}}}var Tt=e=>({type:`paragraph`,...e.length>0?{content:e.filter(e=>e.text!==``).map(wt)}:{}});function Et(e){let t=e.map(e=>{switch(e.type){case`paragraph`:return Tt(e.runs);case`h1`:case`h2`:return{type:`heading`,attrs:{level:e.type===`h1`?1:2},...e.runs.length>0?{content:e.runs.map(wt)}:{}};case`quote`:return{type:`blockquote`,content:[Tt(e.runs)]};case`ul`:case`ol`:return{type:e.type===`ul`?`bulletList`:`orderedList`,content:e.items.map(e=>({type:`listItem`,content:[Tt(e)]}))};case`code`:return{type:`codeBlock`,attrs:{language:e.lang??null},...e.code===``?{}:{content:[{type:`text`,text:e.code}]}};case`image`:return{type:q.image,attrs:{file:e.file,alt:e.alt??``,caption:e.caption??``}};case`embed`:return{type:q.embed,attrs:{url:e.url}};case`divider`:return{type:`horizontalRule`}}});return{type:`doc`,content:t.length>0?t:[{type:`paragraph`}]}}function Dt(e){let t=e.marks??[],n=e=>t.some(t=>t.type===e),r=t.find(e=>e.type===`link`)?.attrs?.href;return{text:e.text??``,...n(`bold`)?{bold:!0}:{},...n(`italic`)?{italic:!0}:{},...r===void 0?{}:{link:r}}}var J=e=>(e?.content??[]).map(e=>e.type===`hardBreak`?{text:` `}:Dt(e)),Y=(e,t)=>{let n=e.attrs?.[t];return typeof n==`string`?n:``};function X(e){let t=[];for(let n of e.content??[])switch(n.type){case`paragraph`:t.push({type:`paragraph`,runs:J(n)});break;case`heading`:{let e=Number(n.attrs?.level??1);t.push({type:e<=1?`h1`:`h2`,runs:J(n)});break}case`blockquote`:for(let e of n.content??[])t.push({type:`quote`,runs:J(e)});break;case`bulletList`:case`orderedList`:t.push({type:n.type===`bulletList`?`ul`:`ol`,items:(n.content??[]).map(e=>(e.content??[]).flatMap(e=>J(e)))});break;case`codeBlock`:{let e=Y(n,`language`);t.push({type:`code`,code:(n.content??[]).map(e=>e.text??``).join(``),...e===``?{}:{lang:e}});break}case`horizontalRule`:t.push({type:`divider`});break;case q.image:{let e=Y(n,`alt`),r=Y(n,`caption`);t.push({type:`image`,file:Y(n,`file`),...e===``?{}:{alt:e},...r===``?{}:{caption:r}});break}case q.embed:t.push({type:`embed`,url:Y(n,`url`)})}let n=t[0];return t.length===1&&n?.type===`paragraph`&&n.runs.every(e=>e.text===``)?[]:t}var Ot=(0,W.createContext)(()=>void 0),Z=e=>typeof e==`string`?e:``;function kt({node:e,updateAttributes:t}){let n=T(),r=(0,W.useContext)(Ot),i=Z(e.attrs.file),a=r(i);return(0,U.jsxs)(ge,{as:`figure`,"data-li":`image`,className:`relative`,children:[(0,U.jsxs)(`div`,{className:`relative`,children:[a===void 0?(0,U.jsx)(`div`,{className:`ak-li-made`,children:i}):(0,U.jsx)(`img`,{src:a,alt:Z(e.attrs.alt)}),(0,U.jsx)(`div`,{className:`absolute bottom-2 left-2`,contentEditable:!1,children:(0,U.jsx)(E,{most:C.alt,alt:Z(e.attrs.alt),onAlt:e=>{t({alt:e})},trigger:(0,U.jsx)(f,{variant:`secondary`,size:`xs`,className:`bg-media/75 text-on-media font-bold`,children:n.alt})})})]}),(0,U.jsx)(`input`,{className:`mt-2 w-full bg-transparent text-center text-sm text-[var(--ak-li-muted)] outline-none`,value:Z(e.attrs.caption),placeholder:n.article.caption,"aria-label":n.article.caption,dir:`auto`,onChange:e=>{t({caption:e.target.value})}})]})}function At({node:e}){return(0,U.jsx)(ge,{"data-li":`embed`,children:(0,U.jsx)(ft,{url:Z(e.attrs.url)})})}function jt(e,t,n){return A.create({name:e,group:`block`,atom:!0,selectable:!0,draggable:!0,addAttributes(){return Object.fromEntries(t.map(e=>[e,{default:``}]))},parseHTML(){return[{tag:`div[data-node="${e}"]`}]},renderHTML({HTMLAttributes:t}){return[`div`,_e(t,{"data-node":e})]},addNodeView(){return P(n)}})}var Mt=[jt(q.image,[`file`,`alt`,`caption`],kt),jt(q.embed,[`url`],At)],Nt=3e4;function Q(e){let t=z(e).issues.find(e=>e.rule===`article-markup`||e.rule===`format`);if(t!==void 0)return t.line===void 0?t.message:`${String(t.line)}: ${t.message}`}var Pt=class{head;listeners=new Set;body;show;session;constructor(e){this.session=e;let{article:t}=z(e.text);this.head={title:t.title,cover:t.cover,state:e.state,held:Q(e.text)},e.attach({save:e=>{let t=this.article();if(t===void 0||Q(e)!==void 0)return;let n=ct(t);return n===ct(z(e).article)?void 0:n},take:(e,t,n)=>{let{article:r}=z(e),i=n?.kind===`agent`?yt(z(t).article,r):void 0;this.set({title:r.title,cover:r.cover,held:Q(e),...i===void 0?{}:{landed:{spot:i,at:Date.now()}}}),this.show?.(r)}}),e.onState(e=>{this.set({state:e})})}get read(){return z(this.session.text).article}bind(e,t){this.body=e,this.show=t}article(){if(this.body!==void 0)return{title:this.head.title,...this.head.cover?{cover:this.head.cover}:{},blocks:this.body()}}get(){return this.head}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}set(e){this.head={...this.head,...e};for(let e of this.listeners)e()}edited(e={}){Object.keys(e).length>0&&this.set(e),this.session.edited()}};function $(e){return(0,U.jsx)(f,{variant:`ghost`,size:`icon-sm`,"aria-label":e.label,title:e.label,"aria-pressed":e.on,disabled:e.disabled,className:d(e.on===!0&&`bg-here`),onMouseDown:e=>{e.preventDefault()},onClick:e.onClick,children:e.children})}function Ft(e){let t=T(),[n,r]=(0,W.useState)(!1),[i,a]=(0,W.useState)(``),o=i.trim()===``||/^https?:\/\/\S+$/u.test(i.trim())?void 0:t.article.notLink;return(0,U.jsxs)(re,{open:n,onOpenChange:e=>{r(e),e&&a(``)},children:[(0,U.jsx)(S,{asChild:!0,children:(0,U.jsx)(f,{variant:`ghost`,size:`icon-sm`,"aria-label":e.label,title:e.label,disabled:e.disabled,children:e.icon})}),(0,U.jsx)(x,{className:`w-80`,align:`start`,children:(0,U.jsxs)(`form`,{className:`flex flex-col gap-2`,onSubmit:t=>{t.preventDefault(),i.trim()!==``&&o===void 0&&(e.onAnswer(i.trim()),r(!1))},children:[(0,U.jsx)(ke,{autoFocus:!0,value:i,placeholder:e.hint,"aria-label":e.hint,onChange:e=>{a(e.target.value)}}),o===void 0?null:(0,U.jsx)(`p`,{className:`text-destructive text-xs`,children:o}),(0,U.jsx)(f,{type:`submit`,size:`sm`,className:`self-end`,disabled:i.trim()===``||o!==void 0,children:t.article.add})]})})]})}function It({editor:e}){let t=T().article,n=()=>e.chain().focus(),r=e.isActive(`heading`,{level:1})?t.heading:e.isActive(`heading`,{level:2})?t.subheading:t.normal;return(0,U.jsxs)(Oe,{children:[(0,U.jsx)(Ce,{asChild:!0,children:(0,U.jsxs)(f,{variant:`ghost`,size:`sm`,className:`w-28 justify-between gap-1 px-2`,"aria-label":t.style,onMouseDown:e=>{e.preventDefault()},children:[r,(0,U.jsx)(De,{})]})}),(0,U.jsxs)(Te,{align:`start`,className:`w-44`,children:[(0,U.jsx)(I,{className:`text-sm`,onSelect:()=>n().setParagraph().run(),children:t.normal}),(0,U.jsx)(I,{className:`text-base font-semibold`,onSelect:()=>n().setHeading({level:1}).run(),children:t.heading}),(0,U.jsx)(I,{className:`text-sm font-semibold`,onSelect:()=>n().setHeading({level:2}).run(),children:t.subheading})]})]})}function Lt({article:e}){let t=T().article,[n,r]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>{r(!1)},4e3);return()=>{clearTimeout(e)}},[n]),(0,U.jsxs)(f,{variant:`outline`,size:`sm`,className:`gap-1`,title:n?t.copied:t.copy,"data-testid":`linkedin-copy`,onClick:()=>{let t=e(),n=ut(t),i=dt(t);navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([n],{type:`text/html`}),"text/plain":new Blob([i],{type:`text/plain`})})]).then(()=>{r(!0)})},children:[n?(0,U.jsx)(Ae,{}):(0,U.jsx)(oe,{}),n?t.copied:t.copy]})}function Rt({editor:e,dir:t,entry:n}){let r=T(),i=r.article,[,a]=(0,W.useState)(0);(0,W.useEffect)(()=>{let t=()=>{a(e=>e+1)};return e.on(`transaction`,t),()=>{e.off(`transaction`,t)}},[e]);let[o,s]=(0,W.useState)(!1),c=()=>e.chain().focus(),l=(t,n)=>{let{$from:r}=e.state.selection;r.depth>1?c().insertContentAt(r.after(1),{type:t,attrs:n}).run():c().insertContent({type:t,attrs:n}).run()},d=e.getText().split(/\s+/u).filter(e=>e!==``).length;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)($,{label:r.undo,disabled:!e.can().undo(),onClick:()=>c().undo().run(),children:(0,U.jsx)(Se,{})}),(0,U.jsx)($,{label:r.redo,disabled:!e.can().redo(),onClick:()=>c().redo().run(),children:(0,U.jsx)(xe,{})}),(0,U.jsx)(`span`,{className:`bg-rule mx-1 h-5 w-px`,"aria-hidden":`true`}),(0,U.jsx)(It,{editor:e}),(0,U.jsx)($,{label:i.bold,on:e.isActive(`bold`),onClick:()=>c().toggleBold().run(),children:(0,U.jsx)(ee,{})}),(0,U.jsx)($,{label:i.italic,on:e.isActive(`italic`),onClick:()=>c().toggleItalic().run(),children:(0,U.jsx)(y,{})}),(0,U.jsx)($,{label:i.bullets,on:e.isActive(`bulletList`),onClick:()=>c().toggleBulletList().run(),children:(0,U.jsx)(ie,{})}),(0,U.jsx)($,{label:i.numbers,on:e.isActive(`orderedList`),onClick:()=>c().toggleOrderedList().run(),children:(0,U.jsx)(ae,{})}),(0,U.jsx)($,{label:i.quote,on:e.isActive(`blockquote`),onClick:()=>c().toggleBlockquote().run(),children:(0,U.jsx)(F,{})}),(0,U.jsx)($,{label:i.code,on:e.isActive(`codeBlock`),onClick:()=>c().toggleCodeBlock().run(),children:(0,U.jsx)(Qe,{})}),(0,U.jsx)($,{label:i.divider,onClick:()=>c().setHorizontalRule().run(),children:(0,U.jsx)(O,{})}),e.isActive(`link`)?(0,U.jsx)($,{label:i.removeLink,on:!0,onClick:()=>c().extendMarkRange(`link`).unsetLink().run(),children:(0,U.jsx)(u,{})}):(0,U.jsx)(Ft,{label:i.link,hint:i.linkHint,icon:(0,U.jsx)(D,{}),disabled:e.state.selection.empty,onAnswer:e=>{c().extendMarkRange(`link`).setLink({href:e}).run()}}),(0,U.jsx)(Ft,{label:i.embed,hint:i.embedHint,icon:(0,U.jsx)($e,{}),onAnswer:e=>{l(q.embed,{url:e})}}),(0,U.jsxs)(re,{open:o,onOpenChange:s,children:[(0,U.jsx)(S,{asChild:!0,children:(0,U.jsx)(f,{variant:`ghost`,size:`icon-sm`,"aria-label":i.image,title:i.image,children:(0,U.jsx)(we,{})})}),(0,U.jsx)(x,{className:`w-auto`,align:`start`,children:(0,U.jsx)(pe,{self:n,types:ce,testId:`linkedin-picker`,onPick:e=>{s(!1),l(q.image,{file:ue(t,e),alt:``,caption:``})}})})]}),(0,U.jsx)(`span`,{className:`text-muted-foreground ml-2 text-xs tabular-nums`,children:i.words(d)})]})}function zt({doc:e,dir:i,entry:s}){let d=T(),p=o(),m=a(),h=r(),g=(0,W.useSyncExternalStore)(t=>e.subscribe(t),()=>e.get()),_=m||h||g.held!==void 0,v=(0,W.useMemo)(()=>e.read,[e]),[ee,y]=(0,W.useState)(()=>v.blocks.flatMap(e=>e.type===`image`?[e.file]:[])),b=ve({textDirection:`auto`,editable:!_,immediatelyRender:!0,extensions:[Ve.configure({heading:{levels:[1,2]},listItem:!1,blockquote:!1,code:!1,strike:!1,underline:!1,hardBreak:!1,link:{openOnClick:!1,autolink:!0}}),ze.extend({content:`paragraph`}),Ue.extend({content:`paragraph`}),We.configure({placeholder:d.article.body}),St,...Mt],content:Et(v.blocks),onUpdate:({editor:t,transaction:n})=>{n.docChanged&&(y(X(t.getJSON()).flatMap(e=>e.type===`image`?[e.file]:[])),e.edited())}}),[ie,ae]=(0,W.useState)(()=>v.blocks);(0,W.useEffect)(()=>{e.bind(()=>X(b.getJSON()),e=>{b.commands.setContent(Et(e.blocks),{emitUpdate:!1}),y(e.blocks.flatMap(e=>e.type===`image`?[e.file]:[])),ae(e.blocks)})},[e,b]),(0,W.useEffect)(()=>{b.setEditable(!_)},[b,_]),(0,W.useEffect)(()=>{let e=()=>{ae(X(b.getJSON()))};return b.on(`update`,e),()=>{b.off(`update`,e)}},[b]);let oe=(0,W.useDeferredValue)(ie),{agent:C,following:w}=t(),ce=te(),E=(()=>{if(C?.doing===void 0)return;let t=g.landed,n=t!==void 0&&t.at>=C.at-Nt;return n&&C.source?.path===s?t.spot:(C.source?xt(C.source,{path:s,text:e.session.text}):void 0)??(n?t.spot:void 0)})(),D=E&&`block`in E?E.block:void 0,O=E!==void 0&&`head`in E,k=C?ce(C):``,A=(0,W.useRef)(null),j=(0,W.useRef)(null);(0,W.useEffect)(()=>{Ct(b,D===void 0?null:{block:D,label:k})},[b,D,k]),(0,W.useEffect)(()=>{let e=j.current;if(e){for(let t of e.querySelectorAll(`[data-agent]`))t.removeAttribute(`data-agent`);(O?e.querySelector(`.ak-li-a-title`):D===void 0?null:e.querySelector(`.ak-li-a-body`)?.children[D])?.setAttribute(`data-agent`,``)}},[D,O,oe,g.title]),(0,W.useEffect)(()=>{w&&E!==void 0&&((O?A.current?.querySelector(`.ak-li-a-title`):A.current?.querySelector(`[data-testid="linkedin-agent-block"]`))?.scrollIntoView({block:`nearest`}),j.current?.querySelector(`[data-agent]`)?.scrollIntoView({block:`nearest`}))},[w,E,O,g.landed]),n({hold:()=>Promise.resolve({key:`${s}@${String(e.session.text.length)}`,what:`The LinkedIn article ${s}`,source:{path:s}}),locate:t=>{let n=z(e.session.text),r=e=>{let t=e?.getBoundingClientRect();return t&&t.width>0&&t.height>0?{x:t.x,y:t.y,width:t.width,height:t.height}:void 0},i=l(t)[0],a=e=>e!==void 0&&i!==void 0&&i.x>=e.x&&i.x<=e.x+e.width&&i.y>=e.y&&i.y<=e.y+e.height,o=[{as:`where it is written`,head:[`.ak-li-a-cover`,`.ak-li-a-title`].map(e=>A.current?.querySelector(e)),blocks:[...A.current?.querySelector(`.ak-li-a-body .ProseMirror`)?.children??[]]},{as:`as LinkedIn will show it`,head:[`.ak-li-a-cover`,`.ak-li-a-title`].map(e=>j.current?.querySelector(e)),blocks:[...j.current?.querySelector(`.ak-li-a-body`)?.children??[]]}],u=e=>e===void 0?{}:{line:e.from,...e.to>e.from?{endLine:e.to}:{}},d=o.some(e=>e.head.some(e=>{let n=r(e);return n!==void 0&&c(t,n)})),f=new Set;for(let e of o)e.blocks.forEach((e,n)=>{let i=r(e);i&&c(t,i)&&f.add(n)});let p=[...d?[{name:`the article's head: its cover and title`,source:{path:s,...u(n.head)},...g.title===``?{}:{text:g.title}}]:[],...[...f].sort((e,t)=>e-t).map(e=>{let t=o.map(t=>t.blocks[e]?.textContent.trim()??``).find(e=>e!==``)??``;return{name:`block ${String(e+1)} of the article`,source:{path:s,...u(n.lines[e])},...t===``?{}:{text:t}}})],m=o.flatMap(e=>{if(e.head.some(e=>a(r(e))))return[`in the article's head, ${e.as}`];let t=e.blocks.findIndex(e=>a(r(e)));return t<0?[]:[`in block ${String(t+1)}, ${e.as}`]}).at(0);return Promise.resolve({elements:p,...m===void 0?{}:{where:m}})}});let M=de(i,[...g.cover?[g.cover.file]:[],...ee]),N=(0,W.useMemo)(()=>e=>M.get(e),[M]),[ge,_e]=(0,W.useState)(!1),P=g.cover===void 0?void 0:M.get(g.cover.file),F=p?.theme===`dark`,be=(0,U.jsxs)(re,{open:ge,onOpenChange:_e,children:[(0,U.jsx)(`div`,{className:`ak-li-a-cover ak-li-e-cover relative`,children:g.cover===void 0?_?null:(0,U.jsx)(S,{asChild:!0,children:(0,U.jsxs)(f,{variant:`ghost`,className:`size-full flex-col gap-2 rounded-none text-sm font-normal text-[var(--ak-li-muted)]`,children:[(0,U.jsx)(fe,{className:`size-6`}),d.article.addCover]})}):(0,U.jsxs)(U.Fragment,{children:[P===void 0?(0,U.jsx)(`div`,{className:`ak-li-made`,children:g.cover.file}):/\.mp4$/iu.test(g.cover.file)?(0,U.jsx)(`video`,{src:P,muted:!0,playsInline:!0,className:`w-full`}):(0,U.jsx)(`img`,{src:P,alt:g.cover.alt??``}),_?null:(0,U.jsxs)(`div`,{className:`absolute top-2 right-2 flex gap-1`,children:[(0,U.jsx)(S,{asChild:!0,children:(0,U.jsxs)(f,{variant:`secondary`,size:`sm`,className:`bg-media/75 text-on-media`,children:[(0,U.jsx)(fe,{}),d.article.changeCover]})}),(0,U.jsx)(f,{variant:`secondary`,size:`icon-sm`,className:`bg-media/75 text-on-media`,"aria-label":d.article.removeCover,title:d.article.removeCover,onClick:()=>{e.edited({cover:void 0})},children:(0,U.jsx)(u,{})})]})]})}),(0,U.jsx)(x,{className:`w-auto`,align:`center`,children:(0,U.jsx)(pe,{self:s,types:le,testId:`linkedin-picker`,onPick:t=>{_e(!1),e.edited({cover:{file:ue(i,t)}})}})})]}),xe=(0,U.jsxs)(`div`,{ref:A,className:`ak-li ak-li-editing min-h-full`,"data-theme":F?`dark`:`light`,children:[be,(0,U.jsxs)(`div`,{className:`ak-li-e-page`,children:[(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(`textarea`,{className:`ak-li-a-title block w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-[var(--ak-li-muted)]`,value:g.title,placeholder:d.article.title,"aria-label":d.article.title,readOnly:_,dir:`auto`,"data-testid":`linkedin-article-title`,onChange:t=>{_||e.edited({title:t.target.value.replace(/\n/gu,` `)})}}),C&&O?(0,U.jsx)(je,{"data-testid":`linkedin-agent-head`,label:k,className:`-inset-1`}):null]}),(0,U.jsx)(gt,{}),(0,U.jsx)(Ot.Provider,{value:N,children:(0,U.jsx)(`div`,{className:`ak-li-a-body`,"data-testid":`linkedin-article-body`,children:(0,U.jsx)(ye,{editor:b,className:`[&_.ProseMirror]:outline-none`})})})]})]}),Se=()=>({title:g.title,...g.cover?{cover:g.cover}:{},blocks:X(b.getJSON())}),Ce=(0,U.jsx)(`div`,{ref:j,className:`ak-li ak-li-page`,"data-theme":F?`dark`:`light`,children:(0,U.jsx)(_t,{article:{title:g.title,...g.cover?{cover:g.cover}:{},blocks:oe},source:N})});return(0,U.jsxs)(`div`,{className:`bg-background flex size-full flex-col`,"data-testid":`linkedin-article-editor`,children:[(0,U.jsx)(ne,{start:(0,U.jsxs)(U.Fragment,{children:[_?null:(0,U.jsx)(Rt,{editor:b,dir:i,entry:s}),(0,U.jsx)(`span`,{className:`ml-auto`}),(0,U.jsx)(Lt,{article:Se})]}),saved:{state:g.state},exports:{}}),g.held===void 0?null:(0,U.jsx)(`p`,{className:`text-lead border-b px-4 py-2 text-sm`,role:`status`,"data-testid":`linkedin-article-held`,children:d.article.held(g.held)}),(0,U.jsx)(se.Provider,{value:me,children:(0,U.jsx)(he,{edit:xe,preview:Ce,width:632,background:F?`#000000`:`#f4f2ee`,testId:`linkedin-preview`})})]})}function Bt(){let e=T(),t=i(),n=o(),r=n?.item.entry,a=n?.item.dir??``,[s,c]=(0,W.useState)(),[l,u]=(0,W.useState)();return(0,W.useEffect)(()=>{if(r===void 0)return;let e,n=!0;return g.open(t,r).then(t=>{n?(e=t,c(new Pt(t))):t.close()},e=>{n&&u(e instanceof Error?e.message:String(e))}),()=>{n=!1,e?.close()}},[t,r]),!s||r===void 0?(0,U.jsx)(`div`,{className:`text-muted-foreground flex size-full items-center justify-center text-sm`,"data-testid":`linkedin-article-editor`,"data-state":l===void 0?`loading`:`error`,children:l===void 0?e.article.loading:e.couldNotOpen(l)}):(0,U.jsx)(zt,{doc:s,dir:a,entry:r})}export{Bt as LinkedInArticleEditor,Bt as default,X as fromDoc,Et as toDoc};
|