@orangelogic/design-system 2.162.0 → 2.164.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/library/chunks/{AxisLabelRadial.lE2gKah-.js → AxisLabelRadial.fe7zjixN.js} +1 -1
- package/library/chunks/{BaseColumnSeries.B57B3iHh.js → BaseColumnSeries.8Mpxz385.js} +1 -1
- package/library/chunks/{CandlestickSeries.CmmI426l.js → CandlestickSeries.DuadaOTa.js} +19 -19
- package/library/chunks/{Circle.DAhHYhrc.js → Circle.6LomW0ej.js} +1 -1
- package/library/chunks/{ColumnSeries.DBgXk-b4.js → ColumnSeries.D1NLfRh5.js} +2 -2
- package/library/chunks/{EditableAxisLabel.C6H99qiS.js → EditableAxisLabel.Bi9vxLDV.js} +2 -2
- package/library/chunks/{EditableLabel.B7HB7Cu4.js → EditableLabel.CMR3O9E-.js} +1 -1
- package/library/chunks/{Gradient.DHhBnhFd.js → Gradient.CquE8_a4.js} +1 -1
- package/library/chunks/{LinearGradient.CGx00O8B.js → LinearGradient.CVN1VJp-.js} +9 -9
- package/library/chunks/{Picture.DYltTVSo.js → Picture.BYTZ_I8g.js} +1 -1
- package/library/chunks/{Polygon.BCrxKagx.js → Polygon.CU2sMltE.js} +1 -1
- package/library/chunks/{ProgressPie.CXksPJFv.js → ProgressPie.Dd74dbmm.js} +6 -6
- package/library/chunks/{RadialLabel.BYH69FGU.js → RadialLabel.7ka6ND-t.js} +1 -1
- package/library/chunks/{Scrollbar.DEv50o4R.js → Scrollbar.DqUnZReo.js} +1 -1
- package/library/chunks/Slice.BVI8rfHI.js +34 -0
- package/library/chunks/{Slider.BX8g2iGv.js → Slider.DtjYaJOw.js} +1 -1
- package/library/chunks/{SpriteResizer.CfIBMSp3.js → SpriteResizer.Ci2Wt2YJ.js} +11 -11
- package/library/chunks/{Triangle.CNY8-QfL.js → Triangle.C75emy3D.js} +1 -1
- package/library/chunks/{ZoomTools.6jZrzA7x.js → ZoomTools.CA9mtHI8.js} +2 -2
- package/library/chunks/_arrayEach.DU4X1H_a.js +8 -0
- package/library/chunks/_baseClone.BHNjfIdS.js +215 -0
- package/library/chunks/_baseEach.DQk0As2f.js +32 -0
- package/library/chunks/{_baseIteratee.BdKyHJ5i.js → _baseIteratee.sC2wLi2m.js} +3 -2
- package/library/chunks/{_baseUniq.je-HWbb3.js → _baseUniq.lwMgmtt2.js} +16 -15
- package/library/chunks/_baseXor.DixEm6JQ.js +35 -0
- package/library/chunks/_flatRest.D3ZVApI5.js +30 -0
- package/library/chunks/abnfDiagram-VRR7QNED.DKqYa5p7.js +89 -0
- package/library/chunks/{am-chart.CqdmTS0P.js → am-chart.Cr-vMjcY.js} +1577 -1727
- package/library/chunks/{animation.S74lUDDc.js → animation.BD-1xugN.js} +1 -1
- package/library/chunks/arc.xqNd6x9S.js +84 -0
- package/library/chunks/architectureDiagram-ZJ3FMSHR.CBIOk9Kp.js +4757 -0
- package/library/chunks/{asset-link-format.DLAzKfhk.js → asset-link-format.0q_MQOYh.js} +691 -635
- package/library/chunks/asset-link-format.ClaYu_v8.js +7 -0
- package/library/chunks/blockDiagram-677ZJIJ3.CeQxLPwj.js +2428 -0
- package/library/chunks/{button.8syoJXYs.js → button.DGyqdBou.js} +2 -2
- package/library/chunks/c4Diagram-LMCZKHZV.B73xdpNh.js +1580 -0
- package/library/chunks/{capitalize.BTYI3NfM.js → capitalize.CIBKBL10.js} +1 -1
- package/library/chunks/{cardinal.BCA_LB0u.js → cardinal.BXTAeOLk.js} +1 -0
- package/library/chunks/cardinalClosed.Mdce1x5M.js +59 -0
- package/library/chunks/channel.s_XjcUYI.js +5 -0
- package/library/chunks/chunk-2Q5K7J3B.Dy1Z-bMH.js +15 -0
- package/library/chunks/chunk-32BRIVSS.BbIrVi3j.js +71 -0
- package/library/chunks/chunk-5VM5RSS4.D0-lddDM.js +19 -0
- package/library/chunks/chunk-EX3LRPZG.L693y8d4.js +1412 -0
- package/library/chunks/chunk-JWPE2WC7.BV0i4LDu.js +8 -0
- package/library/chunks/chunk-MOJQB5TN.BZstBMYC.js +664 -0
- package/library/chunks/chunk-RYQCIY6F.BMsuG7ya.js +314 -0
- package/library/chunks/chunk-V7JOEXUC.DcJlyQO0.js +1537 -0
- package/library/chunks/chunk-VR4S4FIN.BpryBs7q.js +19 -0
- package/library/chunks/chunk-XXDRQBXY.CSOjab1V.js +11 -0
- package/library/chunks/classDiagram-OUVF2IWQ.Dvz7CNwe.js +18 -0
- package/library/chunks/classDiagram-v2-EOCWNBFH.Dvz7CNwe.js +18 -0
- package/library/chunks/cloneDeep.B-5z5SI3.js +51 -0
- package/library/chunks/{color-swatch-group.CLv1LSZy.js → color-swatch-group.ChP9amU9.js} +2576 -2723
- package/library/chunks/{color-swatch.DsWP2fd-.js → color-swatch.QsHoy_K1.js} +1 -1
- package/library/chunks/{colorPicker.GYgA76kc.js → colorPicker.Cg6Zxf8f.js} +5 -5
- package/library/chunks/{confirm-popover.C-eHPJaU.js → confirm-popover.D8mdy6KG.js} +2 -2
- package/library/chunks/constant.BQ4UJ-kW.js +12 -0
- package/library/chunks/cose-bilkent-JH36ORCC.cfzS2XsK.js +2612 -0
- package/library/chunks/cynefin-VYW2F7L2.c7H5z9nQ.js +23790 -0
- package/library/chunks/cynefinDiagram-TSTJHNR4.C8SgNXWI.js +299 -0
- package/library/chunks/cytoscape.esm.Cbrwqewp.js +18786 -0
- package/library/chunks/dagre-VKFMJZFB.D5B1cAri.js +343 -0
- package/library/chunks/debounce.Bv1rtE8D.js +55 -0
- package/library/chunks/defaultLocale.CPy_WVtp.js +171 -0
- package/library/chunks/descending.AD5n-tFs.js +10 -0
- package/library/chunks/diagram-FQU43EPY.DJukDcLl.js +466 -0
- package/library/chunks/diagram-G47NLZAW.BBOvcbcR.js +316 -0
- package/library/chunks/diagram-NH7WQ7WH.DOpRwmC2.js +142 -0
- package/library/chunks/diagram-OA4YK3LP.Dm5WJs91.js +350 -0
- package/library/chunks/diagram-WEI45ONY.COuzdmSR.js +217 -0
- package/library/chunks/{dialog.Bzf4-IgH.js → dialog.05FgdLBZ.js} +2 -2
- package/library/chunks/{document-viewer.CGyOG1yw.js → document-viewer.Cng07M-1.js} +7 -7
- package/library/chunks/{dot-pagination.BdZc-K0r.js → dot-pagination.Pg9O0nIh.js} +1 -1
- package/library/chunks/ebnfDiagram-CCIWWBDH.Dz-QBH6Y.js +111 -0
- package/library/chunks/erDiagram-Q63AITRT.sSw_w-2B.js +913 -0
- package/library/chunks/{exporting.DQhKH1BX.js → exporting.Djsoh75g.js} +11 -11
- package/library/chunks/flow.aZRVH3p1.js +1304 -0
- package/library/chunks/flowDiagram-23GEKE2U.CMMbuUHf.js +1642 -0
- package/library/chunks/{folder-select.BKAuh4GE.js → folder-select.Dw1ZKZAq.js} +160 -140
- package/library/chunks/{gantt.tu-w6fQ5.js → gantt.Bv6_3H9y.js} +22 -22
- package/library/chunks/ganttDiagram-NO4QXBWP.DZdwd0O4.js +2715 -0
- package/library/chunks/gitGraphDiagram-IHSO6WYX.F6mwS3uS.js +818 -0
- package/library/chunks/graph.XHMI5hta.js +653 -0
- package/library/chunks/{header.e1FLwywx.js → header.DDI0MfJA.js} +1 -1
- package/library/chunks/{hierarchy.CTnBzzmQ.js → hierarchy.C4LxmFxx.js} +836 -904
- package/library/chunks/{hub-connection.CA_wS_wh.js → hub-connection.BtevPWYb.js} +1 -1
- package/library/chunks/{icon-button.DbVIFgu7.js → icon-button.BwmMJ0bI.js} +1 -1
- package/library/chunks/{icon.mxNZ85k0.js → icon.D5iM9wXS.js} +1 -1
- package/library/chunks/{iframe.DcHjOcLG.js → iframe.Cc-xZIm_.js} +1 -1
- package/library/chunks/{image.5mhGPvMN.js → image.BgODrAzQ.js} +2 -2
- package/library/chunks/{image.QVlPFadX.js → image.Y5c_hFx8.js} +1 -1
- package/library/chunks/{index.BVDhdCk-.js → index.2SOQHTpX.js} +23 -23
- package/library/chunks/index.BDn1QW8J.js +167 -0
- package/library/chunks/{index.DcjJFMlq.js → index.CrhRU5m8.js} +284 -273
- package/library/chunks/index.thKLME8E.js +77 -0
- package/library/chunks/infoDiagram-FWYZ7A6U.BnktKL7i.js +24 -0
- package/library/chunks/init.DjUOC4st.js +16 -0
- package/library/chunks/{input.BcyLZUmv.js → input.DOorVTYZ.js} +2 -2
- package/library/chunks/isArrayLikeObject.D7afXo-f.js +86 -0
- package/library/chunks/isEmpty.DtTJTUcf.js +27 -0
- package/library/chunks/ishikawaDiagram-FXEZZL3T.CFp-9Kes.js +621 -0
- package/library/chunks/journeyDiagram-5HDEW3XC.BxO1aPu_.js +837 -0
- package/library/chunks/{json.D7WeFaJm.js → json.Dz5QFEi5.js} +3 -3
- package/library/chunks/kanban-definition-HUTT4EX6.Bk8vmLFK.js +724 -0
- package/library/chunks/katex.DoRnZ_sp.js +11682 -0
- package/library/chunks/layout.DZcMFKol.js +1446 -0
- package/library/chunks/line.DP-iSN_J.js +157 -0
- package/library/chunks/linear.TNHhsH1m.js +215 -0
- package/library/chunks/{map.BjtxEozr.js → map.CBcV0WVq.js} +100 -105
- package/library/chunks/map.DJnohTgl.js +18 -0
- package/library/chunks/markdown.I1AJG75v.js +4180 -0
- package/library/chunks/math.D2lKC7md.js +22 -0
- package/library/chunks/mermaid.core.Dspbw7Ig.js +13598 -0
- package/library/chunks/mindmap-definition-LN4V7U3C.DuCBBYwE.js +808 -0
- package/library/chunks/{number.CtCaI0T_.js → number.Cx2ncfJJ.js} +2 -2
- package/library/chunks/{option.qN3aaqVI.js → option.DyNR1vzy.js} +2 -2
- package/library/chunks/ordinal.bqVaUip-.js +61 -0
- package/library/chunks/{pagination.Cupa46TN.js → pagination.qFmncShC.js} +5 -5
- package/library/chunks/pegDiagram-2B236MQR.DQrkEdJr.js +97 -0
- package/library/chunks/{percent.D_CkaRGb.js → percent.D8mkiJ2G.js} +17 -17
- package/library/chunks/pieDiagram-ENE6RG2P.B6nPW8Pj.js +212 -0
- package/library/chunks/position-picker.DjnhxIKF.js +4 -0
- package/library/chunks/quadrantDiagram-ABIIQ3AL.BFy9moxz.js +1026 -0
- package/library/chunks/{radar.BMKaNvJH.js → radar.B3p5bRix.js} +78 -129
- package/library/chunks/railroadDiagram-RFXS5EU6.CSao8YZX.js +79 -0
- package/library/chunks/range.DdOGybNB.js +9 -0
- package/library/chunks/requirementDiagram-TGXJPOKE.CjpliZnF.js +882 -0
- package/library/chunks/sankey.BR94A-8L.js +294 -0
- package/library/chunks/sankeyDiagram-HTMAVEWB.D8aAxVGe.js +564 -0
- package/library/chunks/select.C6_sM3Pr.js +7 -0
- package/library/chunks/sequenceDiagram-DBY2YBRQ.Cu9MV3h-.js +2891 -0
- package/library/chunks/sizeCapture-X5ZJPWSS.BDByEFcW.js +46 -0
- package/library/chunks/{sliceGrouper.C-t5ZRrz.js → sliceGrouper.CcRqQhZX.js} +1 -1
- package/library/chunks/stateDiagram-2N3HPSRC.DvrAW9Ck.js +267 -0
- package/library/chunks/stateDiagram-v2-6OUMAXLB.CFfuaFM1.js +18 -0
- package/library/chunks/step.almIqwJ6.js +51 -0
- package/library/chunks/{stock.vF_pji1F.js → stock.CQbn6zW4.js} +9 -9
- package/library/chunks/swimlanes-5IMT3BWC.AtMD47q7.js +5332 -0
- package/library/chunks/swimlanesDiagram-G3AALYLV.26A1eX7s.js +15 -0
- package/library/chunks/{tab-group.kSg5_10g.js → tab-group.1Y71_aN8.js} +3 -3
- package/library/chunks/{time.DWfbnPnM.js → time.DYWuX2id.js} +1 -1
- package/library/chunks/timeline-definition-FHXFAJF6.CYSh6xl5.js +1058 -0
- package/library/chunks/{timeline.gWu0up6r.js → timeline.Czz_uBEd.js} +33 -32
- package/library/chunks/toNumber.MuDz8DgU.js +31 -0
- package/library/chunks/{toString.Dcbz5jVT.js → toString.B1zKIiZc.js} +1 -1
- package/library/chunks/{toast.TDU3wVhq.js → toast.CXEAfCvN.js} +1 -1
- package/library/chunks/transformation.8uLv6uwG.js +264 -0
- package/library/chunks/{tree.C2dPd6gt.js → tree.vn5sHbdt.js} +123 -117
- package/library/chunks/value.BXEGBVFV.js +44 -0
- package/library/chunks/{venn.BVBe-JXs.js → venn.B5Jl-c4i.js} +2 -2
- package/library/chunks/vennDiagram-L72KCM5P.CSk1WWlu.js +1581 -0
- package/library/chunks/wardleyDiagram-EHGQE667.C7UzXYG7.js +675 -0
- package/library/chunks/{watch.DOt4Mabe.js → watch.DJF5K-8U.js} +27 -27
- package/library/chunks/{wc.DTNpfIc1.js → wc.B2THb2Kk.js} +18 -18
- package/library/chunks/xy.BO6U5QrZ.js +294 -0
- package/library/chunks/xychartDiagram-FW5EYKEG.idiZWvYS.js +1383 -0
- package/library/components/alert.js +2 -2
- package/library/components/am-chart.js +3 -3
- package/library/components/animated-image.js +2 -2
- package/library/components/animation.js +2 -2
- package/library/components/array-line-clamp.js +1 -1
- package/library/components/asset-link-format.js +8 -7
- package/library/components/atoms.js +29 -29
- package/library/components/audio.js +3 -3
- package/library/components/avatar.js +2 -2
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb-item.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +3 -3
- package/library/components/checkbox.js +195 -18
- package/library/components/color-picker.js +4 -4
- package/library/components/color-swatch-group.js +5 -5
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +3 -3
- package/library/components/copy-button.js +2 -2
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/cropper.js +4 -4
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +2 -2
- package/library/components/dialog.js +3 -3
- package/library/components/diff.js +1 -1
- package/library/components/divider.js +1 -1
- package/library/components/document-viewer.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +3 -3
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +6 -6
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +350 -374
- package/library/components/folder-select.js +5 -5
- package/library/components/format-time.js +2 -2
- package/library/components/grid-item.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/hub-connection.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/icon.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +2 -2
- package/library/components/image.js +3 -3
- package/library/components/include.js +1 -1
- package/library/components/input.js +3 -3
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +11 -2704
- package/library/components/masonry.js +76 -73
- package/library/components/menu-item.js +2 -2
- package/library/components/molecules.js +3 -3
- package/library/components/mutation-observer.js +1 -1
- package/library/components/option.js +3 -3
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +6 -6
- package/library/components/position-picker.js +25 -25
- package/library/components/qr-code.js +1 -1
- package/library/components/radio-button.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio-group.js +1 -1
- package/library/components/radio.js +2 -2
- package/library/components/range.js +1 -1
- package/library/components/rating.js +2 -2
- package/library/components/resize-observer.js +1 -1
- package/library/components/select.js +3 -3
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +2 -2
- package/library/components/sidebar.js +3 -3
- package/library/components/size-input-group.js +3 -3
- package/library/components/split-panel.js +1 -1
- package/library/components/step.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/stepper.js +1 -1
- package/library/components/switch.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab-panel.js +1 -1
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +1 -1
- package/library/components/textarea.js +1 -1
- package/library/components/timecode.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +4 -4
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +122327 -120686
- package/library/components/video.js +2 -2
- package/library/package.json +2 -1
- package/library/packages/atoms/src/components/markdown/markdown.d.ts +41 -1
- package/library/packages/atoms/src/components/markdown/parser.d.ts +18 -3
- package/library/packages/atoms/src/components/markdown/styles.d.ts +17 -0
- package/library/packages/atoms/src/components/tree/tree.d.ts +7 -1
- package/library/packages/atoms/src/components/tree-item/tree-item.d.ts +11 -1
- package/library/packages/events/src/cx-folder-select-loading-change.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +1 -0
- package/library/packages/hybrid/table-core/src/table/styles/table-frozen.styles.d.ts +8 -0
- package/library/packages/hybrid/table-core/src/table/table.d.ts +9 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/FrozenColumns/FrozenColumns.d.ts +14 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/ResizeColumns/ResizeColumns.d.ts +18 -1
- package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +7 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +7 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/markdown-viewer/markdown-viewer.d.ts +124 -0
- package/library/packages/molecules/src/markdown-viewer/markdown-viewer.styles.d.ts +6 -0
- package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +30 -0
- package/library/packages/tools/src/tiptap/utils/md/editor-controller.d.ts +57 -0
- package/library/packages/tools/src/tiptap/utils/md/from-markdown.d.ts +11 -0
- package/library/packages/tools/src/tiptap/utils/md/input-rules.d.ts +15 -0
- package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +13 -0
- package/library/packages/tools/src/tiptap/utils/md/to-markdown.d.ts +14 -0
- package/library/packages/types/src/asset-link-format.d.ts +19 -0
- package/library/packages/types/src/markdown-viewer.d.ts +12 -0
- package/library/packages/types/src/tree-item.d.ts +12 -0
- package/library/react-web-component.d.ts +86 -8
- package/library/utils.js +64 -65
- package/package.json +2 -1
- package/library/chunks/Slice.C5lVu2g_.js +0 -120
- package/library/chunks/_baseXor.VohG8cOH.js +0 -116
- package/library/chunks/asset-link-format.QzzboHHE.js +0 -6
- package/library/chunks/checkbox.3i2j3PHc.js +0 -198
- package/library/chunks/content-builder.BU8X7I6V.js +0 -60
- package/library/chunks/debounce.C_J-9zJi.js +0 -82
- package/library/chunks/flow.hz0UDjCb.js +0 -1594
- package/library/chunks/index.DU0XUO4k.js +0 -176
- package/library/chunks/transformation.D1alV_s4.js +0 -189
- package/library/chunks/xy.BNgyrwGD.js +0 -333
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { _ as kd, a as Sa, b as Be, c as Je } from "../chunks/inheritsLoose.BuSn_CvZ.js";
|
|
2
2
|
import { c as ps, a as Bn } from "../chunks/_commonjsHelpers.DQNKXVTB.js";
|
|
3
3
|
import { r as Sb } from "../chunks/___vite-browser-external_commonjs-proxy.C2tf3HsQ.js";
|
|
4
|
-
import { C as Cb } from "../chunks/image.
|
|
4
|
+
import { C as Cb } from "../chunks/image.BgODrAzQ.js";
|
|
5
5
|
import Mb from "./resize-observer.js";
|
|
6
6
|
import { r as Db, R as Pb, a as Rp, b as Lb } from "../chunks/resizable-component.styles.CAfXABBc.js";
|
|
7
7
|
import { c as Rb } from "../chunks/component.styles.CRO4Odto.js";
|
|
8
8
|
import { b as Ib } from "../chunks/browser.BHOCIF_A.js";
|
|
9
9
|
import { c as Ob } from "../chunks/custom-element.L4WJXn1j.js";
|
|
10
10
|
import { L as kb } from "../chunks/i18n.Bchq8v1d.js";
|
|
11
|
-
import { w as Ki } from "../chunks/watch.
|
|
11
|
+
import { w as Ki } from "../chunks/watch.DJF5K-8U.js";
|
|
12
12
|
import { i as Bb, x as Qc } from "../chunks/lit-element.jLBm65_O.js";
|
|
13
13
|
import { n as Ri } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
14
14
|
import { r as yn } from "../chunks/state.CSDxrqLd.js";
|
package/library/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangelogic/design-system",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.164.0",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"types": "library/types.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"build": "vite build --config vite.config.ts && bun run build-worker && node ./scripts/remove-index-html-file.js && node ./scripts/copy-entry-file.js",
|
|
13
13
|
"build-sync": "bun run build && bun run sync-csharp",
|
|
14
14
|
"start": "vite",
|
|
15
|
+
"host": "bun run build && bunx serve dist --cors -l 4321",
|
|
15
16
|
"dev-build": "vite build --config vite.dev-build.config.ts",
|
|
16
17
|
"open": "npx playwright test --project=chromium --ui",
|
|
17
18
|
"playwright": "npx playwright test --project=chromium",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as CxIconButton } from '../icon-button/icon-button.ts';
|
|
1
2
|
import { default as CortexLightElement } from '../../../../base/src/cortex-light-element.ts';
|
|
2
3
|
import { TemplateResult } from 'lit';
|
|
3
4
|
import { RendererObject, TokenizerAndRendererExtension } from 'marked';
|
|
@@ -8,10 +9,36 @@ import { RendererObject, TokenizerAndRendererExtension } from 'marked';
|
|
|
8
9
|
* @description cx-markdown is a Light DOM element, so can be styled from outside the Shadow DOM.
|
|
9
10
|
* cx-markdown is powered by [MarkedJs](https://marked.js.org/).
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
+
* Fenced `mermaid` code blocks render as diagrams; Mermaid is imported lazily only when one is
|
|
13
|
+
* present. Output is sanitized with DOMPurify unless `live-script` is set.
|
|
14
|
+
*
|
|
15
|
+
* Leading YAML frontmatter renders as a collapsed disclosure instead of an `<hr>` plus heading, and
|
|
16
|
+
* is parsed onto the `frontmatter` property.
|
|
17
|
+
*
|
|
18
|
+
* Set `link-target="_blank"` to open links in a new tab — that is enough for the common case, so
|
|
19
|
+
* consumers should not need a custom `link` renderer.
|
|
20
|
+
*
|
|
21
|
+
* Fenced code blocks get a copy button, revealed on hover or keyboard focus.
|
|
22
|
+
*
|
|
23
|
+
* Clicks on interactive rendered content — links, the frontmatter disclosure, checkboxes, copy
|
|
24
|
+
* buttons, Mermaid nodes — do not bubble past the component. Clicks on inert content still do.
|
|
25
|
+
*
|
|
26
|
+
* @event cx-ready - Emitted when the markdown has been rendered, deferred until any Mermaid
|
|
27
|
+
* diagrams have been drawn.
|
|
12
28
|
*/
|
|
13
29
|
export default class CxMarkdown extends CortexLightElement {
|
|
14
30
|
#private;
|
|
31
|
+
static readonly styles: import('lit').CSSResult;
|
|
32
|
+
static readonly dependencies: {
|
|
33
|
+
'cx-icon-button': typeof CxIconButton;
|
|
34
|
+
};
|
|
35
|
+
private readonly localize;
|
|
36
|
+
/**
|
|
37
|
+
* YAML frontmatter parsed from `markdown`, empty when there is none. Derived output — assigning
|
|
38
|
+
* to it has no effect. Read it after `cx-ready`. Deliberately non-reactive: the disclosure is
|
|
39
|
+
* built in the same pass, so setting it during `update()` would only cost an extra render.
|
|
40
|
+
*/
|
|
41
|
+
frontmatter: Record<string, unknown>;
|
|
15
42
|
/**
|
|
16
43
|
* The class name to apply to the root element. As this is a light DOM element, it can be styled
|
|
17
44
|
* from outside the Shadow DOM.
|
|
@@ -19,8 +46,14 @@ export default class CxMarkdown extends CortexLightElement {
|
|
|
19
46
|
classname: string;
|
|
20
47
|
/**
|
|
21
48
|
* If true, re-adds script tags from inside the markdown to the body, wrapping them in IIFEs.
|
|
49
|
+
* Also skips sanitization, since DOMPurify would strip those script tags. Trusted content only.
|
|
22
50
|
*/
|
|
23
51
|
liveScript: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Target applied to every rendered link. Set to `_blank` to open links in a new tab, which also
|
|
54
|
+
* adds `rel="noopener noreferrer"`. Empty (the default) leaves anchors untouched.
|
|
55
|
+
*/
|
|
56
|
+
linkTarget: string;
|
|
24
57
|
/**
|
|
25
58
|
* The markdown to render.
|
|
26
59
|
*/
|
|
@@ -39,7 +72,14 @@ export default class CxMarkdown extends CortexLightElement {
|
|
|
39
72
|
*/
|
|
40
73
|
rendered: string;
|
|
41
74
|
connectedCallback(): void;
|
|
75
|
+
disconnectedCallback(): void;
|
|
42
76
|
updateRendered(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Light DOM means every click reaches ancestors, which commonly treat one as "start editing".
|
|
79
|
+
* Clicks the rendered markdown acts on itself stop here; inert content still bubbles. The
|
|
80
|
+
* containment check keeps an ancestor `<a>` or `<label>` around the component from matching.
|
|
81
|
+
*/
|
|
82
|
+
handleClick(event: MouseEvent): void;
|
|
43
83
|
handleRenderedWithNewMarkdown(): void;
|
|
44
84
|
render(): TemplateResult;
|
|
45
85
|
updated(): void;
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import { Marked } from 'marked';
|
|
1
|
+
import { Marked, Tokens } from 'marked';
|
|
2
2
|
|
|
3
|
+
/** Class name cx-markdown looks for when deciding whether to load Mermaid. */
|
|
4
|
+
export declare const MERMAID_CLASS_NAME = "mermaid";
|
|
5
|
+
/** Class name on the disclosure wrapping YAML frontmatter. */
|
|
6
|
+
export declare const FRONTMATTER_CLASS_NAME = "cx-frontmatter";
|
|
7
|
+
export type ExtractedFrontmatter = {
|
|
8
|
+
/** The markdown with the frontmatter block removed. */
|
|
9
|
+
body: string;
|
|
10
|
+
/** Parsed YAML mapping. Empty when absent, malformed, or not a mapping. */
|
|
11
|
+
data: Record<string, unknown>;
|
|
12
|
+
/** Raw YAML source, kept for display. */
|
|
13
|
+
raw: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function extractFrontmatter(source: string): ExtractedFrontmatter;
|
|
16
|
+
/** Collapsed disclosure shown in place of the frontmatter block. */
|
|
17
|
+
export declare function renderFrontmatterDetails(raw: string, label: string): string;
|
|
3
18
|
export declare const baseRenderer: {
|
|
4
|
-
code(
|
|
19
|
+
code(this: import('marked').Renderer<string, string>, { escaped, lang: infoString, text }: Tokens.Code): string;
|
|
5
20
|
};
|
|
6
21
|
/**
|
|
7
22
|
* https://marked.js.org/using_advanced in Marked instance section.
|
|
@@ -10,5 +25,5 @@ export declare const baseRenderer: {
|
|
|
10
25
|
*
|
|
11
26
|
* Change from Singleton to Factory pattern: returns a new isolated Marked parser.
|
|
12
27
|
*/
|
|
13
|
-
export declare function createParser(): Marked
|
|
28
|
+
export declare function createParser(): Marked<string, string>;
|
|
14
29
|
export type Parser = ReturnType<typeof createParser>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Baseline document typography, modelled on the VS Code markdown preview. Without this a bare
|
|
3
|
+
* cx-markdown inherits whatever the host page provides, which collapses tables and flattens the
|
|
4
|
+
* heading hierarchy. Apps that already style markdown (the docs site) override via a `classname`,
|
|
5
|
+
* since a class selector outranks these element selectors.
|
|
6
|
+
*/
|
|
7
|
+
export declare const documentStyles: import('lit').CSSResult;
|
|
8
|
+
/**
|
|
9
|
+
* Prism default theme. CortexLightElement injects these into `document.head` with `:host` rewritten
|
|
10
|
+
* to `cx-markdown`, so every selector needs the `:host` prefix or it styles the whole page.
|
|
11
|
+
*/
|
|
12
|
+
export declare const code: import('lit').CSSResult;
|
|
13
|
+
/**
|
|
14
|
+
* Single stylesheet for the component. CortexLightElement assigns `static styles` straight to
|
|
15
|
+
* `textContent`, so an array would stringify with a stray comma between the two sheets.
|
|
16
|
+
*/
|
|
17
|
+
export declare const styles: import('lit').CSSResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
|
|
2
2
|
import { TreeSelection } from '../../../../types/src/tree';
|
|
3
|
-
import { ExpandButtonPlacement } from '../../../../types/src/tree-item';
|
|
3
|
+
import { ExpandButtonPlacement, TreeItemVariant } from '../../../../types/src/tree-item';
|
|
4
4
|
import { CSSResultGroup, PropertyValues } from 'lit';
|
|
5
5
|
import { default as Sortable } from 'sortablejs';
|
|
6
6
|
import { default as CxTreeItem } from '../tree-item/tree-item';
|
|
@@ -58,6 +58,12 @@ export default class CxTree extends CortexElement {
|
|
|
58
58
|
* Whether to not forward the expand button placement to the children.
|
|
59
59
|
*/
|
|
60
60
|
noForwardExpandButtonPlacement: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The visual treatment forwarded to every tree item. Leave unset for the regular look. `text` removes
|
|
63
|
+
* the hover, active and selected backgrounds so the selection is conveyed by the checkbox alone, and
|
|
64
|
+
* colors the label on hover instead.
|
|
65
|
+
*/
|
|
66
|
+
variant?: TreeItemVariant;
|
|
61
67
|
/**
|
|
62
68
|
* When set to true, the `cx-selection-change` event will be emitted on every change of the value, even if the value is not changed.
|
|
63
69
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
|
|
2
|
-
import { ExpandButtonPlacement } from '../../../../types/src/tree-item';
|
|
2
|
+
import { ExpandButtonPlacement, TreeItemVariant } from '../../../../types/src/tree-item';
|
|
3
3
|
import { CSSResultGroup, PropertyValueMap, PropertyValues, TemplateResult } from 'lit';
|
|
4
4
|
import { default as Sortable } from 'sortablejs';
|
|
5
5
|
import { default as CxCheckbox } from '../checkbox/checkbox';
|
|
@@ -47,6 +47,7 @@ import { default as CxSpinner } from '../spinner/spinner';
|
|
|
47
47
|
* @cssproperty [--hover-background-color=var(--cx-menu-item-background-color-hover)] - The background color of the hovered tree item.
|
|
48
48
|
* @cssproperty [--active-background-color=var(--cx-color-neutral-200)] - The background color of the active tree item.
|
|
49
49
|
* @cssproperty [--item-padding=var(--cx-spacing-x-small) var(--cx-spacing-small)] - The padding of the tree item.
|
|
50
|
+
* @cssproperty [--hover-color=var(--cx-color-primary)] - The label color of the hovered tree item. Only applied when `variant` is `text`.
|
|
50
51
|
*
|
|
51
52
|
* When `max-lines` is set, the label is wrapped in a `cx-line-clamp` and the text is clamped with an ellipsis
|
|
52
53
|
* after the given number of lines. A tooltip with the full text is shown automatically when clamping is active.
|
|
@@ -132,6 +133,15 @@ export default class CxTreeItem extends CortexElement {
|
|
|
132
133
|
* Whether to not forward the expand button placement to the children.
|
|
133
134
|
*/
|
|
134
135
|
noForwardExpandButtonPlacement: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* The visual treatment of the row. Leave unset for the regular look. `text` removes the hover, active
|
|
138
|
+
* and selected backgrounds so the selection is conveyed by the checkbox alone, and colors the label on
|
|
139
|
+
* hover instead.
|
|
140
|
+
*
|
|
141
|
+
* Owned by the parent `cx-tree`: it forwards its own `variant` to every item, so setting this directly
|
|
142
|
+
* on an item inside a tree is overwritten. Set it on the tree instead.
|
|
143
|
+
*/
|
|
144
|
+
variant?: TreeItemVariant;
|
|
135
145
|
/**
|
|
136
146
|
* Indicates whether the tree checkboxes should be synced with the selected state of the tree items.
|
|
137
147
|
* For example, when select all children, the parent checkbox will be checked. When parent checkbox is checked, all children will be checked.
|
|
@@ -85,6 +85,7 @@ export * from './cx-find-and-replace';
|
|
|
85
85
|
export * from './cx-finish';
|
|
86
86
|
export * from './cx-focus';
|
|
87
87
|
export * from './cx-folder-select-children-loaded';
|
|
88
|
+
export * from './cx-folder-select-loading-change';
|
|
88
89
|
export * from './cx-folder-select-search-term-change';
|
|
89
90
|
export * from './cx-folder-select-selection-seeded';
|
|
90
91
|
export * from './cx-font-picker-change';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sticky can't pin frozen cells here — every wrapper up to the real horizontal scroller (the
|
|
3
|
+
* OverlayScrollbars viewport on `.tabulator`) is `width: max-content` and never scrolls — so
|
|
4
|
+
* `syncFrozenOffset` mirrors the viewport's scrollLeft into these vars instead. If horizontal
|
|
5
|
+
* scrolling ever moves back onto `.tabulator-tableholder`, delete this sheet.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: import('lit').CSSResult;
|
|
8
|
+
export default _default;
|
|
@@ -39,7 +39,7 @@ import { CxTableColumnEditor, CxTableFooter, CxTableHeaderMenu, CxTableRowAction
|
|
|
39
39
|
* @cssproperty [--row-even-background-color=var(--cx-color-neutral-100)] - The background color of the even table rows.
|
|
40
40
|
* @cssproperty [--row-hover-background-color=var(--cx-color-neutral-50)] - The background color of the table rows on hover.
|
|
41
41
|
* @cssproperty [--row-even-hover-background-color=var(--cx-color-neutral-100)] - The background color of the even table rows on hover.
|
|
42
|
-
* @cssproperty [--frozen-border-color=var(--cx-color-neutral-
|
|
42
|
+
* @cssproperty [--frozen-border-color=var(--cx-color-neutral-300)] - The color of the frozen table rows border.
|
|
43
43
|
* @cssproperty [--header-background-color=var(--cx-color-neutral-50)] - The background color of the table header.
|
|
44
44
|
* @cssproperty [--header-hover-background-color=var(--cx-color-neutral-200)] - The background color of the table header on hover.
|
|
45
45
|
* @cssproperty [--header-font-weight=var(--cx-font-weight-regular)] - The font weight of the table header.
|
|
@@ -102,6 +102,8 @@ export default class CxTable extends CortexElement {
|
|
|
102
102
|
};
|
|
103
103
|
private verticalOsInstance;
|
|
104
104
|
private horizontalOsInstance;
|
|
105
|
+
/** Removes the horizontal scrollbar's scroll listener (see syncFrozenOffset). */
|
|
106
|
+
private frozenScrollOff;
|
|
105
107
|
private resizeObserver;
|
|
106
108
|
private overflowObserver;
|
|
107
109
|
private readonly ajaxFacetsController;
|
|
@@ -910,6 +912,12 @@ export default class CxTable extends CortexElement {
|
|
|
910
912
|
disconnectedCallback(): void;
|
|
911
913
|
private initVerticalScrollbar;
|
|
912
914
|
private initHorizontalScrollbar;
|
|
915
|
+
/**
|
|
916
|
+
* Mirrors the horizontal scroller's offset into `--frozen-offset-start/end` so
|
|
917
|
+
* `table-frozen.styles.ts` can pin frozen columns. Deliberately not debounced: the offset must
|
|
918
|
+
* land in the same frame as the scroll, and it is only two custom-property writes.
|
|
919
|
+
*/
|
|
920
|
+
private syncFrozenOffset;
|
|
913
921
|
private readonly checkHorizontalOverflow;
|
|
914
922
|
private initOverflowObserver;
|
|
915
923
|
private registerEventListeners;
|
|
@@ -8,7 +8,6 @@ export default class FrozenColumns extends Module {
|
|
|
8
8
|
static moduleName: string;
|
|
9
9
|
leftColumns: IColumn[];
|
|
10
10
|
rightColumns: IColumn[];
|
|
11
|
-
initializationMode: 'left' | 'right';
|
|
12
11
|
active: boolean;
|
|
13
12
|
blocked: boolean;
|
|
14
13
|
constructor(table: any);
|
|
@@ -18,6 +17,20 @@ export default class FrozenColumns extends Module {
|
|
|
18
17
|
unblockLayout(): void;
|
|
19
18
|
layoutCell(cell: Cell): void;
|
|
20
19
|
reinitializeColumns(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Rebuilds both frozen lists from column order, so the outcome never depends on the order
|
|
22
|
+
* `column-init` events arrive in. They cannot be trusted: `Column._initialize` is async in this
|
|
23
|
+
* fork, so they land after `columns-loaded` and may resolve out of order.
|
|
24
|
+
*/
|
|
25
|
+
private rebuildFrozenLists;
|
|
26
|
+
/** Records which edge a frozen column belongs to and files it under the matching list. */
|
|
27
|
+
private pinColumn;
|
|
28
|
+
/**
|
|
29
|
+
* Runs once per frozen column, whenever that column initializes. `column-init` lands after
|
|
30
|
+
* `columns-loaded` in this fork (async `Column._initialize`), so this is what gets the margins
|
|
31
|
+
* and edge flags recomputed after that late wave — `layout()` guards itself on `active` and
|
|
32
|
+
* `blocked`, and non-frozen columns return before reaching it.
|
|
33
|
+
*/
|
|
21
34
|
initializeColumn(column: IColumn): void;
|
|
22
35
|
frozenCheck(column: IColumn): boolean;
|
|
23
36
|
layoutCalcRows(): void;
|
|
@@ -8,6 +8,7 @@ export default class ResizeColumns extends Module {
|
|
|
8
8
|
startColumn: Column | false;
|
|
9
9
|
startX: number | false;
|
|
10
10
|
startWidth: number | false;
|
|
11
|
+
startColumnPinnedEnd: boolean;
|
|
11
12
|
latestX: number | false;
|
|
12
13
|
handle: HTMLElement | null;
|
|
13
14
|
initialNextColumn: Column | null;
|
|
@@ -21,7 +22,23 @@ export default class ResizeColumns extends Module {
|
|
|
21
22
|
layoutColumnHeader(column: Column): void;
|
|
22
23
|
columnLayoutUpdated(column: Column): void;
|
|
23
24
|
columnWidthUpdated(column: Column): void;
|
|
24
|
-
|
|
25
|
+
/**
|
|
26
|
+
* An end-pinned column's only draggable edge is its left one (the freeze divider). Derived from
|
|
27
|
+
* `definition.frozen` + column order, not frozen-module state (event timing is unreliable), and
|
|
28
|
+
* walks `columns` because `columnsByIndex` is still empty when `column-rendered` creates handles.
|
|
29
|
+
*/
|
|
30
|
+
private isPinnedEnd;
|
|
31
|
+
/**
|
|
32
|
+
* The in-flow handle goes right after the element it resizes — except for an end-pinned column,
|
|
33
|
+
* whose right edge is the table edge: its handle goes before the element, onto the freeze
|
|
34
|
+
* divider (drag deltas invert to match, see `resize`). Callers resolve `isPinnedEnd` once.
|
|
35
|
+
*/
|
|
36
|
+
private attachHandle;
|
|
37
|
+
/**
|
|
38
|
+
* Re-inserts handles next to the element they resize. Upstream wrote `left`/`right` insets here
|
|
39
|
+
* for frozen columns, which added to the flow position and pushed handles a column width off;
|
|
40
|
+
* frozen handles travel via `table-frozen.styles.ts` instead (which also owns their z-index).
|
|
41
|
+
*/
|
|
25
42
|
reinitializeColumn(column: Column): void;
|
|
26
43
|
initializeColumn(type: string, component: any, column: Column, element: HTMLElement): void;
|
|
27
44
|
deInitializeColumn(column: Column): void;
|
|
@@ -40,6 +40,12 @@ export default class CxFolderSelectTree extends CortexElement {
|
|
|
40
40
|
data: Folder[];
|
|
41
41
|
hasMore: boolean;
|
|
42
42
|
loading: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* True while `preloadSelectedFolders` is fetching folders for selected IDs
|
|
45
|
+
* not yet rendered in the tree. Forwarded via `cx-folder-select-loading-change`
|
|
46
|
+
* so hosts (e.g. cx-folder-select) can show a loading indicator during preload.
|
|
47
|
+
*/
|
|
48
|
+
private preloading;
|
|
43
49
|
/**
|
|
44
50
|
* Folders fetched for selected IDs not yet rendered in the tree (e.g. nested
|
|
45
51
|
* under an unexpanded parent). Rendered as hidden tree items so cx-select can
|
|
@@ -65,6 +71,7 @@ export default class CxFolderSelectTree extends CortexElement {
|
|
|
65
71
|
createRenderRoot(): this;
|
|
66
72
|
private computeInitialLimit;
|
|
67
73
|
runFirstUpdated(): void;
|
|
74
|
+
handleLoadingStateChange(): void;
|
|
68
75
|
handleExtraFolderIdChange(): Promise<void>;
|
|
69
76
|
/**
|
|
70
77
|
* Update `currentRootIDsSet` from a tree-item's toggle. Per-folder
|
|
@@ -47,11 +47,18 @@ export default class CxFolderSelect extends CortexElement {
|
|
|
47
47
|
autoPageSize: boolean;
|
|
48
48
|
firstFetchCallback: ((data: Folder[]) => void) | null;
|
|
49
49
|
searchTerm: string;
|
|
50
|
+
/**
|
|
51
|
+
* Mirrors cx-folder-select-tree's combined fetch/preload loading state, so
|
|
52
|
+
* the Select variant can show a loading spinner on cx-select while folders
|
|
53
|
+
* (including preloaded selected folders) are being fetched.
|
|
54
|
+
*/
|
|
55
|
+
private treeLoading;
|
|
50
56
|
constructor();
|
|
51
57
|
updateWrappedApi(): void;
|
|
52
58
|
handleSearchTermChange(): void;
|
|
53
59
|
private handleSearchTermInputChange;
|
|
54
60
|
private handleSearchTermSelectChange;
|
|
61
|
+
private handleTreeLoadingChange;
|
|
55
62
|
private handleSelectClear;
|
|
56
63
|
/**
|
|
57
64
|
* cx-select's own `value` only reflects our `value` correctly the very
|
|
@@ -24,6 +24,7 @@ export { default as CxFontPicker } from './font-picker/font-picker';
|
|
|
24
24
|
export { default as CxGalleryItem } from './gallery-item/gallery-item';
|
|
25
25
|
export { default as CxGraphView } from './graph-view/graph-view';
|
|
26
26
|
export { default as CxIconPicker } from './icon-picker/icon-picker';
|
|
27
|
+
export { default as CxMarkdownViewer } from './markdown-viewer/markdown-viewer';
|
|
27
28
|
export { default as CxMasonry } from './masonry/masonry';
|
|
28
29
|
export { default as CxMentions } from './mentions/mentions';
|
|
29
30
|
export { default as CxMultiSelect } from './multi-select/multi-select';
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
2
|
+
import { MarkdownViewerViewMode } from '../../../types/src/markdown-viewer';
|
|
3
|
+
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @summary Renders markdown with a toggle between the rendered preview, the raw source, and — when
|
|
7
|
+
* `editable` — a plain-text editor and a rich editor.
|
|
8
|
+
*
|
|
9
|
+
* @description Wraps `cx-markdown` and adds a view switcher. The source view shows the markdown
|
|
10
|
+
* verbatim, frontmatter included, syntax highlighted with Prism.
|
|
11
|
+
*
|
|
12
|
+
* `editable` adds two editors. `edit` is a `cx-textarea` over the raw source: plain text only, and
|
|
13
|
+
* byte-exact — what is loaded is what is saved. `wysiwyg` is a ProseMirror editor over a document
|
|
14
|
+
* model, with formatting and table controls; it is **not** byte-exact, because blocks the user
|
|
15
|
+
* changes are regenerated. Constructs the model cannot represent, such as HTML blocks, keep their
|
|
16
|
+
* source and are written back untouched. Choose per document which editor a host offers, through
|
|
17
|
+
* `available-view-modes`.
|
|
18
|
+
*
|
|
19
|
+
* `markdown` is the source coming in, `value` the current text including unsaved edits. Preview and
|
|
20
|
+
* source both render `value`. Assigning `markdown` again resets `value`.
|
|
21
|
+
*
|
|
22
|
+
* The view switcher is omitted when only one mode is on offer, since there is nothing to switch to.
|
|
23
|
+
*
|
|
24
|
+
* `cx-markdown` is a Light DOM element whose stylesheet is injected into `document.head`, out of
|
|
25
|
+
* reach of this shadow root. It is therefore imported into this component's `styles` too, where its
|
|
26
|
+
* `:host`-prefixed rules give the preview its typography.
|
|
27
|
+
*
|
|
28
|
+
* @event cx-change - Emitted after editing settles. Read the new markdown from `value`.
|
|
29
|
+
*
|
|
30
|
+
* @csspart toolbar - The overlaid bar holding the view switcher.
|
|
31
|
+
* @csspart preview - The `cx-markdown` element rendering the markdown.
|
|
32
|
+
* @csspart source - The `pre` element showing the raw markdown.
|
|
33
|
+
* @csspart editor - The `cx-textarea` used by the edit view.
|
|
34
|
+
* @csspart rich-editor - The wrapper around the rich editor and its formatting toolbar.
|
|
35
|
+
* @csspart format-toolbar - The formatting toolbar shown in the rich view.
|
|
36
|
+
*
|
|
37
|
+
* @cssproperty [--cx-markdown-viewer-toolbar-gap=var(--cx-spacing-x-small)] - Gap between toolbar items.
|
|
38
|
+
* @cssproperty [--cx-markdown-viewer-toolbar-offset-block=var(--cx-spacing-medium)] - Toolbar inset from the top edge.
|
|
39
|
+
* @cssproperty [--cx-markdown-viewer-toolbar-offset-inline=var(--cx-spacing-medium)] - Toolbar inset from the end edge.
|
|
40
|
+
* @cssproperty [--cx-markdown-viewer-source-font-size=var(--cx-font-size-small)] - Font size of the source and edit views.
|
|
41
|
+
* @cssproperty [--cx-markdown-viewer-source-max-height=none] - Max height of the source view before it scrolls.
|
|
42
|
+
* @cssproperty [--cx-markdown-viewer-edit-min-height=auto] - Min height of the plain-text editor, overriding its row count. The rich editor uses it too, defaulting to 20lh.
|
|
43
|
+
* @cssproperty [--cx-markdown-viewer-view-switcher-width=12rem] - Space the rich view's toolbar reserves at its end so the overlaid view switcher never covers a control.
|
|
44
|
+
*/
|
|
45
|
+
export default class CxMarkdownViewer extends CortexElement {
|
|
46
|
+
static readonly styles: CSSResultGroup;
|
|
47
|
+
static readonly dependencies: Record<string, typeof CortexElement>;
|
|
48
|
+
private readonly localize;
|
|
49
|
+
private readonly richEditor;
|
|
50
|
+
private readonly richEditorHost?;
|
|
51
|
+
/** The modes the switcher offers, in this order. Empty offers all of them. */
|
|
52
|
+
availableViewModes: MarkdownViewerViewMode[];
|
|
53
|
+
/** The mode to open in. Omit to open on the preview. */
|
|
54
|
+
defaultViewMode?: MarkdownViewerViewMode;
|
|
55
|
+
/** Adds the edit view. While false no editor is created. */
|
|
56
|
+
editable: boolean;
|
|
57
|
+
/** Target applied to rendered links. `_blank` also adds `rel="noopener noreferrer"`. */
|
|
58
|
+
linkTarget: string;
|
|
59
|
+
/** The markdown to render. Assigning it resets `value`. */
|
|
60
|
+
markdown: string;
|
|
61
|
+
/** Drops the copy button the source view otherwise offers. */
|
|
62
|
+
noCopyButton: boolean;
|
|
63
|
+
/** Lets the toolbar scroll away with the content instead of pinning to the top. */
|
|
64
|
+
noStickyToolbar: boolean;
|
|
65
|
+
/** Drops the view switcher, fixing the component to the current view. */
|
|
66
|
+
noViewToggle: boolean;
|
|
67
|
+
/** The current markdown, including unsaved edits. What hosts read back. */
|
|
68
|
+
value: string;
|
|
69
|
+
/** Which view is showing. Falls back to the first offered mode. */
|
|
70
|
+
view: MarkdownViewerViewMode;
|
|
71
|
+
handleDefaultViewModeChange(): void;
|
|
72
|
+
/** A replacement source document discards any in-progress edit of the previous one. */
|
|
73
|
+
handleMarkdownChange(): void;
|
|
74
|
+
/**
|
|
75
|
+
* The editor is created after render, since its mount point only exists once the view is showing.
|
|
76
|
+
* Leaving the view tears it down rather than leaving a hidden editor holding a selection.
|
|
77
|
+
*
|
|
78
|
+
* Watched props are the ones `activeView` and `editorSource` are derived from. The await is what
|
|
79
|
+
* makes a watcher workable here — they run before render, when the mount point does not exist yet.
|
|
80
|
+
* Two watched props changing in the same cycle call this twice; harmless, since the first pass
|
|
81
|
+
* mounts and the second finds the editor already holding this markdown.
|
|
82
|
+
*/
|
|
83
|
+
handleRichEditorSync(): Promise<void>;
|
|
84
|
+
/** LF form of `value`: what both editors work in, since a textarea and marked both report LF. */
|
|
85
|
+
private get editorSource();
|
|
86
|
+
/**
|
|
87
|
+
* The view actually showing. `render()` derives the same thing; this exists for the editor-sync
|
|
88
|
+
* watcher, which runs outside the template and has no access to its locals.
|
|
89
|
+
*/
|
|
90
|
+
private get activeView();
|
|
91
|
+
/** The host's list narrowed to supported modes, falling back to all of them when empty. */
|
|
92
|
+
private get offeredViews();
|
|
93
|
+
private handleViewChange;
|
|
94
|
+
/** The host contract is `value` plus one `cx-change`, so the textarea's own events stop here. */
|
|
95
|
+
private handleEditorInput;
|
|
96
|
+
private handleEditorChange;
|
|
97
|
+
/**
|
|
98
|
+
* One handler for every formatting button: the action rides on the element as a data attribute, so
|
|
99
|
+
* the template needs no per-button closure.
|
|
100
|
+
*/
|
|
101
|
+
private handleFormatClick;
|
|
102
|
+
private handleInsertTableClick;
|
|
103
|
+
private handleUndoClick;
|
|
104
|
+
private handleRedoClick;
|
|
105
|
+
/** Same contract as the plain-text editor: `value` stays current, `cx-change` settles. */
|
|
106
|
+
private handleRichEditorChange;
|
|
107
|
+
/** Debounced: `value` is current on every keystroke, so hosts only need the settled edit. */
|
|
108
|
+
private emitChange;
|
|
109
|
+
/**
|
|
110
|
+
* A native `<textarea>` reports LF, so put back the ending the source used and keep the round trip
|
|
111
|
+
* byte-exact. One ending for the whole document: a mixed-ending source comes back uniformly CRLF.
|
|
112
|
+
*/
|
|
113
|
+
private restoreLineEndings;
|
|
114
|
+
/** Prism escapes its input, so the result is safe to pass to `unsafeHTML` unsanitized. */
|
|
115
|
+
private highlightSource;
|
|
116
|
+
/** Formatting and table controls for the rich view. */
|
|
117
|
+
private renderFormatToolbar;
|
|
118
|
+
render(): TemplateResult;
|
|
119
|
+
}
|
|
120
|
+
declare global {
|
|
121
|
+
interface HTMLElementTagNameMap {
|
|
122
|
+
'cx-markdown-viewer': CxMarkdownViewer;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -59,6 +59,11 @@ export default class CxMasonry extends CortexElement {
|
|
|
59
59
|
* The key to use for the id of the items in the masonry layout.
|
|
60
60
|
*/
|
|
61
61
|
idKey: keyof MasonryItem;
|
|
62
|
+
/**
|
|
63
|
+
* When true, forwards `no-crossorigin` to each inner `<cx-image>`, disabling CORS mode
|
|
64
|
+
* (e.g. in Site Builder contexts where CORS headers are absent).
|
|
65
|
+
*/
|
|
66
|
+
noCrossorigin: boolean;
|
|
62
67
|
private sortableInstance;
|
|
63
68
|
private previous;
|
|
64
69
|
/**
|
|
@@ -4,6 +4,7 @@ import { default as CxTypography } from '../../../atoms/src/components/typograph
|
|
|
4
4
|
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
5
5
|
import { default as CxCropper } from '../../../molecules/src/cropper/cropper.ts';
|
|
6
6
|
import { Asset, CropMode, FocusMode, Parameter, Proxy, Transformation, Unit } from '../../../types/src/asset-link-format';
|
|
7
|
+
import { PositionPickerValue } from '../../../types/src/position-picker';
|
|
7
8
|
import { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
8
9
|
import { default as CxAssetLinkFormatCrop } from './components/asset-link-format-crop/asset-link-format-crop';
|
|
9
10
|
import { default as CxAssetLinkFormatExtension } from './components/asset-link-format-extension/asset-link-format-extension';
|
|
@@ -209,6 +210,12 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
209
210
|
* when nothing has been applied yet.
|
|
210
211
|
*/
|
|
211
212
|
get lastAppliedCropFocusMode(): string;
|
|
213
|
+
/**
|
|
214
|
+
* The anchor position of the last applied crop transformation, for the no-asset case
|
|
215
|
+
* only. Reflects whatever position the last committed Crop transformation used, or
|
|
216
|
+
* top-left when nothing has been applied yet.
|
|
217
|
+
*/
|
|
218
|
+
get lastAppliedCropPosition(): PositionPickerValue;
|
|
212
219
|
/**
|
|
213
220
|
* Checks if the crop apply button should be disabled.
|
|
214
221
|
* This is determined by comparing the current crop size with the last crop size.
|
|
@@ -297,6 +304,7 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
297
304
|
keepAspectRatio?: boolean;
|
|
298
305
|
percentageHeight: number;
|
|
299
306
|
percentageWidth: number;
|
|
307
|
+
position: PositionPickerValue;
|
|
300
308
|
ratioHeight: number;
|
|
301
309
|
ratioWidth: number;
|
|
302
310
|
unit: Unit;
|
|
@@ -327,6 +335,7 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
327
335
|
private onProxyChange;
|
|
328
336
|
private onCropModeChange;
|
|
329
337
|
private onCropFocusModeChange;
|
|
338
|
+
private onCropPositionChange;
|
|
330
339
|
private onCropChange;
|
|
331
340
|
private onCropChanged;
|
|
332
341
|
private onCropApply;
|