@layers-app/editor 0.7.22 → 0.7.24-beta.1
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/README.md +14 -4
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +7 -79
- package/dist/index.js +9 -15
- package/dist/{layers.C0sxZBLw.js → layers.-58OrB2h.js} +1 -1
- package/dist/{layers.BbT07pFE.js → layers.-qmjZJBI.js} +1 -1
- package/dist/layers.1s4BbICk.js +1 -0
- package/dist/{layers.D_9L9En0.js → layers.53hChJFF.js} +6 -6
- package/dist/{layers.DILauC71.js → layers.5R_vfSOI.js} +1 -1
- package/dist/{layers.DSPLbnxr.js → layers.5U6DsNQ8.js} +6 -9
- package/dist/{layers.omsWLm-Q.js → layers.6Og6_hox.js} +1 -1
- package/dist/{layers.tNKhjknm.js → layers.8HXImnXe.js} +7 -7
- package/dist/{layers.Dy17RWkL.js → layers.90LiGxII.js} +5 -8
- package/dist/{layers.DGJrLV1f.js → layers.A6MvZ2Sd.js} +4 -4
- package/dist/{layers.DnqaDEpY.js → layers.Aw65tqqV.js} +1 -1
- package/dist/{layers.CKCeBJl2.js → layers.B-Ftwt7z.js} +1 -1
- package/dist/{layers.T_j1JZx9.js → layers.B0gBsd1G.js} +15 -18
- package/dist/{layers.ATUKD_BI.js → layers.B1l2IEoW.js} +1 -1
- package/dist/{layers.CZ1xRd88.js → layers.B2SmhxzW.js} +1 -1
- package/dist/{layers.CMg7vW-1.js → layers.B2nS5rBS.js} +1 -1
- package/dist/{layers.D3wy5jRa.js → layers.B4ZRP4dv.js} +1 -1
- package/dist/{layers.BJyLQOQS.js → layers.B5V9R6dS.js} +89 -92
- package/dist/{layers.C1okoy6i.js → layers.B6C5kDa3.js} +1 -1
- package/dist/{layers.oPB5T7to.js → layers.B8qo87mf.js} +1 -1
- package/dist/{layers.LsEXTrAq.js → layers.BB-2khdc.js} +4 -4
- package/dist/{layers.M3XVvqPC.js → layers.BBgqB-dj.js} +1 -1
- package/dist/{layers.B1IU_BSg.js → layers.BCDRxkn5.js} +84 -86
- package/dist/{layers.BDpBgAg4.js → layers.BDuP7QP1.js} +7 -7
- package/dist/{layers.BQSS6CJA.js → layers.BE_-JA1T.js} +1 -1
- package/dist/{layers.B0RUwJTk.js → layers.BFDXAxa6.js} +1 -1
- package/dist/{layers.CDOyPtNG.js → layers.BFclfxlH.js} +3 -3
- package/dist/{layers.CkU72snY.js → layers.BG9jBVsg.js} +1 -1
- package/dist/{layers.DGJKne5J.js → layers.BGGuOo27.js} +1 -1
- package/dist/{layers.85PnUEQD.js → layers.BI0TTMdG.js} +1 -1
- package/dist/{layers.Deq4fJN9.js → layers.BJOmz-8E.js} +1 -1
- package/dist/{layers.CfqnmFKc.js → layers.BKOg8e2U.js} +1 -1
- package/dist/{layers.DP-V5pYW.js → layers.BKWiI_4a.js} +1 -1
- package/dist/{layers.CLbLK5YL.js → layers.BLERpK_S.js} +1 -1
- package/dist/layers.BLvWGmxZ.js +304 -0
- package/dist/{layers.CFraNT2z.js → layers.BNxa_eCc.js} +1 -1
- package/dist/{layers.DTqg2WB1.js → layers.BOWoLhye.js} +3 -3
- package/dist/layers.BPXa6Xko.js +8 -0
- package/dist/{layers.D9WumTIW.js → layers.BSwRsFvu.js} +7 -7
- package/dist/layers.BUT_cQlY.js +1 -0
- package/dist/{layers.9XMpcIZ9.js → layers.BV2fpDYI.js} +1 -1
- package/dist/{layers.B9BdRXvM.js → layers.BVHCv5uJ.js} +4 -7
- package/dist/{layers.QYg115Mm.js → layers.BVSO7aWV.js} +1 -1
- package/dist/{layers.ePOQF8e8.js → layers.BW593_YD.js} +1 -1
- package/dist/{layers.DWOH8CbI.js → layers.BY9o3NTY.js} +1 -1
- package/dist/layers.BZMHF27f.js +6 -0
- package/dist/{layers.DlRBRLjO.js → layers.BZv7cxTR.js} +89 -92
- package/dist/{layers.DSdKCBZf.js → layers.BbDBKF7d.js} +1 -1
- package/dist/{layers.BKzseRiQ.js → layers.BdiCSpJ4.js} +1 -1
- package/dist/{layers.CPDiZfGC.js → layers.Bdzg4UkM.js} +1 -1
- package/dist/{layers.BEh_I7Ko.js → layers.BfK7Zksy.js} +1 -1
- package/dist/layers.Bfcc7TOH.js +1 -0
- package/dist/{layers.CDdbCJ4f.js → layers.BhOCkx36.js} +1 -1
- package/dist/{layers.CDJdTdcH.js → layers.Bi8uSmnl.js} +1 -1
- package/dist/{layers.YkeebHWf.js → layers.BiD-9uwr.js} +1 -1
- package/dist/layers.BjtEPALX.js +19 -0
- package/dist/layers.BlT1aHiA.js +1 -0
- package/dist/{layers.C8K3KFv6.js → layers.Bq3WRO3x.js} +1 -1
- package/dist/{layers.Cxwxb-ou.js → layers.BqikkqHY.js} +1 -1
- package/dist/{layers.D0KbkemK.js → layers.BqkB6bfG.js} +1 -1
- package/dist/{layers.WUbN3xnX.js → layers.BqxiZwrm.js} +1 -1
- package/dist/layers.Br5DTynl.js +74 -0
- package/dist/{layers.D1Xm-cVB.js → layers.BrUMsy26.js} +1 -1
- package/dist/{layers.CNSeKh2O.js → layers.BsV8AKqE.js} +6 -9
- package/dist/{layers.DcNjOEl2.js → layers.BuGAznjj.js} +4 -4
- package/dist/{layers.DwQuRz1C.js → layers.Bv1xDmd0.js} +1 -1
- package/dist/{layers.DT6W3wE6.js → layers.Bvra5UGQ.js} +1 -1
- package/dist/{layers.zOE8EvLe.js → layers.BwHEZWKu.js} +1 -1
- package/dist/{layers.CSijlSb-.js → layers.BwtMeyCj.js} +3 -3
- package/dist/{layers.BHXk5Ze9.js → layers.BxX_THjw.js} +1 -1
- package/dist/{layers.DpwSiWnO.js → layers.Bzrkz_Q7.js} +1 -1
- package/dist/{layers.BX3xQIic.js → layers.C-UCCxZT.js} +1 -1
- package/dist/{layers.BYYYcLif.js → layers.C0BLZbdT.js} +1 -1
- package/dist/{layers.CbM9Od8R.js → layers.C2-P7-v8.js} +1 -1
- package/dist/{layers.DyMGgheL.js → layers.C20Qi890.js} +1 -1
- package/dist/{layers.ChwlmwnN.js → layers.C47JbXwl.js} +1 -1
- package/dist/{layers.NLReCDrk.js → layers.C5JgdF76.js} +1 -1
- package/dist/{layers.-sKjLq6z.js → layers.CA5feGxW.js} +1 -1
- package/dist/{layers.CZ1aWrxy.js → layers.CCqe9zp9.js} +1 -1
- package/dist/{layers.C1OOIctL.js → layers.CDPIcOqa.js} +1 -1
- package/dist/{layers.Dc3hkiQA.js → layers.CDexQZa_.js} +5 -8
- package/dist/{layers.Dzv7ES09.js → layers.CFSfvSsm.js} +1 -1
- package/dist/{layers.Dz-fN-C3.js → layers.CH4plVEu.js} +3 -3
- package/dist/{layers.CcRwtGAz.js → layers.CHa9lFoT.js} +1 -1
- package/dist/{layers.DiOzy2q5.js → layers.CLT1Xhw2.js} +1 -1
- package/dist/{layers.B1h0MW5q.js → layers.CP3EufOe.js} +1 -1
- package/dist/{layers.BlnTtwWX.js → layers.CPIxu6GO.js} +5 -8
- package/dist/{layers.DdIz9W3y.js → layers.CQMssu5A.js} +1 -1
- package/dist/layers.CQR0Nl7I.js +1 -0
- package/dist/{layers.C6ZckCLg.js → layers.CR8SQeln.js} +224 -227
- package/dist/{layers.DYlvPHyK.js → layers.CRKCl3-s.js} +1 -1
- package/dist/{layers.BIVaypZ9.js → layers.CSi2XRJ2.js} +1 -1
- package/dist/{layers.CdsMuLQ2.js → layers.CUV1fBKt.js} +12 -15
- package/dist/{layers.BXqWbLJP.js → layers.CV3PBAi0.js} +1 -1
- package/dist/{layers.Cdxbq8yY.js → layers.CXPJGJnh.js} +1 -1
- package/dist/{layers.DW0ALsvK.js → layers.CXp0yiA_.js} +1 -1
- package/dist/{layers.BEw4WWE6.js → layers.CYMmJIgK.js} +4 -7
- package/dist/{layers.CVMFNkZ-.js → layers.Ca_hxCzh.js} +1 -1
- package/dist/{layers.K5zYNONk.js → layers.CadrukAB.js} +1 -1
- package/dist/{layers.p5TWJb9U.js → layers.Cc1VRWwn.js} +1 -1
- package/dist/{layers.CWn-b06G.js → layers.CeuPBpSS.js} +1 -1
- package/dist/{layers.CB6aOBPQ.js → layers.Cf85CE4j.js} +1 -1
- package/dist/{layers.sDYhNtKj.js → layers.CfJUJqdv.js} +1 -1
- package/dist/layers.CgDb5aPr.js +2 -0
- package/dist/{layers.69poS5uT.js → layers.CiFtNCp_.js} +1 -1
- package/dist/{layers.Cz23vls_.js → layers.CkEhuwys.js} +8 -11
- package/dist/{layers.SQPkq6pl.js → layers.CmWWurhR.js} +1 -1
- package/dist/layers.CmxZ8EKk.js +1 -0
- package/dist/{layers.COOXOXlx.js → layers.Co1X8jDP.js} +1 -1
- package/dist/{layers.D7vIZoIJ.js → layers.CoCdUjOH.js} +1 -1
- package/dist/layers.Cp63Ydn2.js +50707 -0
- package/dist/{layers.BjyzTgzi.js → layers.CqggRfmv.js} +1 -1
- package/dist/layers.CtCTIWni.js +1 -0
- package/dist/layers.Ctzw3Xb5.js +1 -0
- package/dist/{layers.Bm6ppiiu.js → layers.CvU_g0Ek.js} +1 -1
- package/dist/layers.Cw5bBQfp.js +118 -0
- package/dist/{layers.DBdYgYgm.js → layers.Cynva3D_.js} +1 -1
- package/dist/{layers.BppMheh0.js → layers.Czdt779o.js} +1 -1
- package/dist/{layers.DnO4Bwu-.js → layers.D-iLQKYz.js} +1 -1
- package/dist/layers.D0GEGoV_.js +373 -0
- package/dist/{layers.BfBAqsXe.js → layers.D0ptqEmo.js} +1 -1
- package/dist/{layers.BKJ6cMCq.js → layers.D33lu-eC.js} +1 -1
- package/dist/{layers.B11DrHi8.js → layers.D4VJ5B0e.js} +1 -1
- package/dist/layers.D5DNThwz.js +208 -0
- package/dist/{layers.CNpc9pzS.js → layers.D6XgZ8Az.js} +1 -1
- package/dist/layers.D71D_04V.js +1359 -0
- package/dist/{layers.Cgwi9-xM.js → layers.D8vSQAh0.js} +8 -8
- package/dist/{layers.DyVrSiq0.js → layers.D9yXBIuK.js} +1 -1
- package/dist/{layers.CGL9kzs1.js → layers.DAF65Eyh.js} +1 -1
- package/dist/{layers.CTOpQDtz.js → layers.DD5DttRP.js} +1 -1
- package/dist/{layers.DxcJ-YvM.js → layers.DH-cj5fE.js} +2 -2
- package/dist/{layers.B5fyfR1a.js → layers.DJ7ZL_sW.js} +6 -9
- package/dist/layers.DJnnhy8m.js +96 -0
- package/dist/{layers.B0JGG_9g.js → layers.DM9hpazD.js} +1 -1
- package/dist/{layers.CQX-76qF.js → layers.DNJEfwiQ.js} +1 -1
- package/dist/{layers.DEJsAg1I.js → layers.DNOD_LF5.js} +1 -1
- package/dist/{layers.Cu3RZunA.js → layers.DO1NcRAM.js} +1 -1
- package/dist/{layers.BtNQvF6x.js → layers.DPP6_cbD.js} +6 -9
- package/dist/{layers.9gauUIpf.js → layers.DQIT2lCm.js} +1 -1
- package/dist/{layers.BIlyrdg5.js → layers.DRZylWPP.js} +1 -1
- package/dist/{layers.CYn0DBvN.js → layers.DU7EZINs.js} +1 -1
- package/dist/{layers.B2tF03Bk.js → layers.DXyBsBF5.js} +1 -1
- package/dist/{layers.Bw8u-R4P.js → layers.D_XM1OQx.js} +3 -3
- package/dist/{layers.C63K7c81.js → layers.DcKjvxHE.js} +1 -1
- package/dist/{layers.Ddbj0qNm.js → layers.DenZLHkn.js} +1 -1
- package/dist/{layers.DMFyYEYH.js → layers.Df79MJjN.js} +3 -3
- package/dist/{layers.DKJ5ut-c.js → layers.DfgtWeVl.js} +1 -1
- package/dist/layers.DgCaJXYg.js +257 -0
- package/dist/{layers.9RuxuEAt.js → layers.DjGdrDC1.js} +1 -1
- package/dist/{layers.BFALBiRk.js → layers.DmEW632Y.js} +2 -2
- package/dist/{layers.CXhsLwZS.js → layers.DnvUnO-4.js} +1 -1
- package/dist/{layers.B1Q0uZOQ.js → layers.DpAWXloN.js} +7 -10
- package/dist/{layers.D7AlsOqY.js → layers.Dq9b1xqh.js} +1 -1
- package/dist/{layers.CwqPTh-H.js → layers.DrZAE5o5.js} +1 -1
- package/dist/{layers.Cu8xKU3M.js → layers.DrprvZC4.js} +1 -1
- package/dist/{layers.CbQ5fsGd.js → layers.DvNvJZss.js} +1 -1
- package/dist/layers.Dvl1mlTI.js +1 -0
- package/dist/{layers.d6T2yRJL.js → layers.DyvnTlHi.js} +1 -1
- package/dist/layers.DzDR_oG4.js +8 -0
- package/dist/{layers.CE0CC2rn.js → layers.DzghPRf3.js} +3812 -3229
- package/dist/{layers.DW1ln8cY.js → layers.EXQpfQWq.js} +1 -1
- package/dist/{layers.DV6teh5L.js → layers.FBzg3C04.js} +50 -50
- package/dist/{layers.BVnHh01y.js → layers.FlOgidCp.js} +1 -1
- package/dist/{layers.WQkguDel.js → layers.I85BW5o2.js} +1 -1
- package/dist/{layers.DMmni-9s.js → layers.IPxhkSfj.js} +1 -1
- package/dist/{layers.Ch54Wgyg.js → layers.Lc29kAuz.js} +1 -1
- package/dist/{layers.Qdr-rOUJ.js → layers.MHEFRzDP.js} +5 -8
- package/dist/{layers.D-ilg3qv.js → layers.MNW-ShKu.js} +11 -14
- package/dist/{layers.MnBKEvzr.js → layers.Me9S-22r.js} +7 -10
- package/dist/{layers.DCMeXR9q.js → layers.Q-xFVVwC.js} +1 -1
- package/dist/layers.Qn6nodoY.js +2 -0
- package/dist/{layers.DYn8wXn8.js → layers.RpoUh8kq.js} +1 -1
- package/dist/{layers.kGgK3mG1.js → layers.SsSYgMGG.js} +1 -1
- package/dist/{layers.CLru3wV8.js → layers.V-9Fvifr.js} +1 -1
- package/dist/{layers.w6PyrOsf.js → layers.W66NF2U9.js} +1 -1
- package/dist/{layers.DP0ftNf3.js → layers.WwL-1p8w.js} +1 -1
- package/dist/{layers.DHQyEtT7.js → layers.X0J3BhYy.js} +4 -7
- package/dist/{layers.DO59dO9u.js → layers.XS2AIvBG.js} +1 -1
- package/dist/{layers.DwV00nIz.js → layers.XZft6Ook.js} +1 -1
- package/dist/{layers.CEjLSMtg.js → layers.adnwY8ML.js} +1 -1
- package/dist/{layers.DfGnP3N-.js → layers.cf3uaysm.js} +1 -1
- package/dist/{layers.BxpUavOR.js → layers.d9OooXQC.js} +1 -1
- package/dist/{layers.ysq8juSc.js → layers.eNGl-u4H.js} +1 -1
- package/dist/{layers.CA9tHYYa.js → layers.eaKLR5Q2.js} +1 -1
- package/dist/{layers.BUvDbsT8.js → layers.edPrT81i.js} +1 -1
- package/dist/{layers.wRXTDitv.js → layers.ekCtLRbA.js} +1 -1
- package/dist/{layers.C5wEoeIw.js → layers.fiMaf-_a.js} +3 -3
- package/dist/{layers.2dQaaZM8.js → layers.gnAUWHV-.js} +1 -1
- package/dist/{layers.DJQgAiHP.js → layers.h4L4Mc41.js} +1 -1
- package/dist/{layers.BZY1Z60O.js → layers.iyoop3cH.js} +3 -3
- package/dist/{layers.DhCxU2t-.js → layers.jTaJiZzk.js} +1 -1
- package/dist/{layers.Db_SbrLQ.js → layers.jZvrWKJt.js} +1 -1
- package/dist/{layers.B6VLqSY9.js → layers.l-ywSwa2.js} +1 -1
- package/dist/{layers.DFN3OZjz.js → layers.lG7Mase1.js} +1 -1
- package/dist/{layers.glmnZc_L.js → layers.mgh4Cwfx.js} +1 -1
- package/dist/{layers.D8M33F6D.js → layers.mnoq184J.js} +1 -1
- package/dist/{layers.BNpqSd2O.js → layers.nFMauJSN.js} +1 -1
- package/dist/{layers.M0jGWFVq.js → layers.nNlLwZ_E.js} +1 -1
- package/dist/{layers.Bp-haNVv.js → layers.oJ61CNkw.js} +1 -1
- package/dist/{layers.NM66VLKB.js → layers.rzToPUAK.js} +1 -1
- package/dist/{layers.I6cMac9r.js → layers.soJefnD3.js} +1 -1
- package/dist/{layers.Cs9q1ieA.js → layers.waYEJRmN.js} +1 -1
- package/dist/{layers.Bm7z1ybT.js → layers.y0ia1Vp6.js} +1 -1
- package/dist/{layers.Bfi-WsGj.js → layers.zDfwTCmT.js} +1 -1
- package/package.json +9 -4
- package/dist/layers.7E0LDas9.js +0 -1
- package/dist/layers.BBYMiUwt.js +0 -1
- package/dist/layers.BGYq-uKX.js +0 -1
- package/dist/layers.BH-P88Q4.js +0 -1
- package/dist/layers.BR-yhCjy.js +0 -118
- package/dist/layers.BqvLb8Wo.js +0 -8
- package/dist/layers.C2m254z5.js +0 -96
- package/dist/layers.CFdgKOwC.js +0 -6
- package/dist/layers.CPhBzUr-.js +0 -1
- package/dist/layers.CszLrplc.js +0 -129
- package/dist/layers.CwZeMjWE.js +0 -2
- package/dist/layers.D6I9Oyh_.js +0 -1
- package/dist/layers.D6W82O5l.js +0 -1
- package/dist/layers.DRsXzF18.js +0 -22
- package/dist/layers.Db1FTzcw.js +0 -26942
- package/dist/layers.DiKwQH88.js +0 -1
- package/dist/layers.DlMjGfvD.js +0 -2
- package/dist/layers.Dpg7Nh0b.js +0 -1225
- package/dist/layers.DqskSQ63.js +0 -257
- package/dist/layers.Rk74KFr2.js +0 -213
- package/dist/layers.UUgs3TTr.js +0 -76
- package/dist/layers.msw_Uj2e.js +0 -271
- package/dist/layers.pvX8zojL.js +0 -8
- package/dist/layers.tbEz_ZKe.js +0 -1
package/dist/layers.msw_Uj2e.js
DELETED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as p, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as b, useState as S, useCallback as M, useEffect as F, Suspense as $ } from "react";
|
|
3
|
-
import { useLexicalComposerContext as Y } from "@lexical/react/LexicalComposerContext";
|
|
4
|
-
import { LexicalErrorBoundary as K } from "@lexical/react/LexicalErrorBoundary";
|
|
5
|
-
import { LexicalNestedComposer as U } from "@lexical/react/LexicalNestedComposer";
|
|
6
|
-
import { RichTextPlugin as j } from "@lexical/react/LexicalRichTextPlugin";
|
|
7
|
-
import { useLexicalNodeSelection as G } from "@lexical/react/useLexicalNodeSelection";
|
|
8
|
-
import { mergeRegister as z } from "@lexical/utils";
|
|
9
|
-
import { $isNodeSelection as A, $getSelection as v, $getNodeByKey as w, $setSelection as O, SELECTION_CHANGE_COMMAND as H, COMMAND_PRIORITY_LOW as g, CLICK_COMMAND as W, DRAGSTART_COMMAND as q, KEY_DELETE_COMMAND as J, KEY_BACKSPACE_COMMAND as Q, KEY_ENTER_COMMAND as V, KEY_ESCAPE_COMMAND as X } from "lexical";
|
|
10
|
-
import { k as Z, l as ee, L as te, F as ne, n as oe, B as re } from "./layers.Db1FTzcw.js";
|
|
11
|
-
import { TextInput as ae } from "@mantine/core";
|
|
12
|
-
function le({
|
|
13
|
-
children: t,
|
|
14
|
-
className: a
|
|
15
|
-
}) {
|
|
16
|
-
return /* @__PURE__ */ e("div", { className: a || "Placeholder__root", children: t });
|
|
17
|
-
}
|
|
18
|
-
function ie({
|
|
19
|
-
label: t,
|
|
20
|
-
value: a,
|
|
21
|
-
onChange: n,
|
|
22
|
-
placeholder: f = "",
|
|
23
|
-
"data-test-id": l,
|
|
24
|
-
type: c = "text"
|
|
25
|
-
}) {
|
|
26
|
-
return /* @__PURE__ */ e(
|
|
27
|
-
ae,
|
|
28
|
-
{
|
|
29
|
-
type: c,
|
|
30
|
-
placeholder: f,
|
|
31
|
-
value: a,
|
|
32
|
-
onChange: (i) => {
|
|
33
|
-
n(i.target.value);
|
|
34
|
-
},
|
|
35
|
-
label: t,
|
|
36
|
-
"data-test-id": l,
|
|
37
|
-
mb: 10
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
const P = /* @__PURE__ */ new Set();
|
|
42
|
-
function se(t) {
|
|
43
|
-
if (!P.has(t))
|
|
44
|
-
throw new Promise((a) => {
|
|
45
|
-
const n = new Image();
|
|
46
|
-
n.src = t, n.onload = () => {
|
|
47
|
-
P.add(t), a(null);
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function ce({
|
|
52
|
-
altText: t,
|
|
53
|
-
className: a,
|
|
54
|
-
imageRef: n,
|
|
55
|
-
src: f,
|
|
56
|
-
width: l,
|
|
57
|
-
height: c,
|
|
58
|
-
position: i
|
|
59
|
-
}) {
|
|
60
|
-
return se(f), /* @__PURE__ */ e(
|
|
61
|
-
"img",
|
|
62
|
-
{
|
|
63
|
-
className: a || void 0,
|
|
64
|
-
src: f,
|
|
65
|
-
alt: t,
|
|
66
|
-
ref: n,
|
|
67
|
-
"data-position": i,
|
|
68
|
-
style: {
|
|
69
|
-
display: "block",
|
|
70
|
-
height: c,
|
|
71
|
-
width: l
|
|
72
|
-
},
|
|
73
|
-
draggable: "false"
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
function ue({
|
|
78
|
-
activeEditor: t,
|
|
79
|
-
nodeKey: a,
|
|
80
|
-
onClose: n
|
|
81
|
-
}) {
|
|
82
|
-
const l = t.getEditorState().read(
|
|
83
|
-
() => w(a)
|
|
84
|
-
), [c, i] = S(l.getAltText()), [h, I] = S(l.getShowCaption()), [_, E] = S(l.getPosition()), C = (d) => {
|
|
85
|
-
I(d.target.checked);
|
|
86
|
-
}, u = () => {
|
|
87
|
-
const d = { altText: c, position: _, showCaption: h };
|
|
88
|
-
l && t.update(() => {
|
|
89
|
-
l.update(d);
|
|
90
|
-
}), n();
|
|
91
|
-
};
|
|
92
|
-
return /* @__PURE__ */ p(k, { children: [
|
|
93
|
-
/* @__PURE__ */ e("div", { style: { marginBottom: "1em" }, children: /* @__PURE__ */ e(
|
|
94
|
-
ie,
|
|
95
|
-
{
|
|
96
|
-
label: "Alt-текст",
|
|
97
|
-
placeholder: "Альтернативный текст",
|
|
98
|
-
onChange: i,
|
|
99
|
-
value: c,
|
|
100
|
-
"data-test-id": "image-modal-alt-text-input"
|
|
101
|
-
}
|
|
102
|
-
) }),
|
|
103
|
-
/* @__PURE__ */ p("div", { className: "Input__wrapper", children: [
|
|
104
|
-
/* @__PURE__ */ e(
|
|
105
|
-
"input",
|
|
106
|
-
{
|
|
107
|
-
id: "caption",
|
|
108
|
-
type: "checkbox",
|
|
109
|
-
checked: h,
|
|
110
|
-
onChange: C
|
|
111
|
-
}
|
|
112
|
-
),
|
|
113
|
-
/* @__PURE__ */ e("label", { htmlFor: "caption", children: "Show Caption" })
|
|
114
|
-
] }),
|
|
115
|
-
/* @__PURE__ */ e(
|
|
116
|
-
re,
|
|
117
|
-
{
|
|
118
|
-
"data-test-id": "image-modal-file-upload-btn",
|
|
119
|
-
onClick: () => u(),
|
|
120
|
-
children: "Применить"
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
] });
|
|
124
|
-
}
|
|
125
|
-
function xe({
|
|
126
|
-
src: t,
|
|
127
|
-
altText: a,
|
|
128
|
-
nodeKey: n,
|
|
129
|
-
width: f,
|
|
130
|
-
height: l,
|
|
131
|
-
showCaption: c,
|
|
132
|
-
caption: i,
|
|
133
|
-
position: h
|
|
134
|
-
}) {
|
|
135
|
-
const [I, _] = Z(), E = b(null), C = b(null), [u, d, D] = G(n), [r] = Y(), [y, B] = S(null), T = b(null), x = M(
|
|
136
|
-
(s) => {
|
|
137
|
-
if (u && A(v())) {
|
|
138
|
-
s.preventDefault();
|
|
139
|
-
const o = w(n);
|
|
140
|
-
ee(o) && o.remove();
|
|
141
|
-
}
|
|
142
|
-
return !1;
|
|
143
|
-
},
|
|
144
|
-
[u, n]
|
|
145
|
-
), L = M(
|
|
146
|
-
(s) => {
|
|
147
|
-
const m = v(), o = C.current;
|
|
148
|
-
if (u && A(m) && m.getNodes().length === 1) {
|
|
149
|
-
if (c)
|
|
150
|
-
return O(null), s.preventDefault(), i.focus(), !0;
|
|
151
|
-
if (o !== null && o !== document.activeElement)
|
|
152
|
-
return s.preventDefault(), o.focus(), !0;
|
|
153
|
-
}
|
|
154
|
-
return !1;
|
|
155
|
-
},
|
|
156
|
-
[i, u, c]
|
|
157
|
-
), R = M(
|
|
158
|
-
(s) => T.current === i || C.current === s.target ? (O(null), r.update(() => {
|
|
159
|
-
d(!0);
|
|
160
|
-
const m = r.getRootElement();
|
|
161
|
-
m !== null && m.focus();
|
|
162
|
-
}), !0) : !1,
|
|
163
|
-
[i, r, d]
|
|
164
|
-
);
|
|
165
|
-
return F(() => {
|
|
166
|
-
let s = !0;
|
|
167
|
-
const m = z(
|
|
168
|
-
r.registerUpdateListener(({ editorState: o }) => {
|
|
169
|
-
s && B(o.read(() => v()));
|
|
170
|
-
}),
|
|
171
|
-
r.registerCommand(
|
|
172
|
-
H,
|
|
173
|
-
(o, N) => (T.current = N, !1),
|
|
174
|
-
g
|
|
175
|
-
),
|
|
176
|
-
r.registerCommand(
|
|
177
|
-
W,
|
|
178
|
-
(o) => {
|
|
179
|
-
const N = o;
|
|
180
|
-
return N.target === E.current ? (N.shiftKey ? d(!u) : (D(), d(!0)), !0) : !1;
|
|
181
|
-
},
|
|
182
|
-
g
|
|
183
|
-
),
|
|
184
|
-
r.registerCommand(
|
|
185
|
-
q,
|
|
186
|
-
(o) => o.target === E.current ? (o.preventDefault(), !0) : !1,
|
|
187
|
-
g
|
|
188
|
-
),
|
|
189
|
-
r.registerCommand(
|
|
190
|
-
J,
|
|
191
|
-
x,
|
|
192
|
-
g
|
|
193
|
-
),
|
|
194
|
-
r.registerCommand(
|
|
195
|
-
Q,
|
|
196
|
-
x,
|
|
197
|
-
g
|
|
198
|
-
),
|
|
199
|
-
r.registerCommand(V, L, g),
|
|
200
|
-
r.registerCommand(
|
|
201
|
-
X,
|
|
202
|
-
R,
|
|
203
|
-
g
|
|
204
|
-
)
|
|
205
|
-
);
|
|
206
|
-
return () => {
|
|
207
|
-
s = !1, m();
|
|
208
|
-
};
|
|
209
|
-
}, [
|
|
210
|
-
D,
|
|
211
|
-
r,
|
|
212
|
-
u,
|
|
213
|
-
n,
|
|
214
|
-
x,
|
|
215
|
-
L,
|
|
216
|
-
R,
|
|
217
|
-
d
|
|
218
|
-
]), /* @__PURE__ */ p($, { fallback: null, children: [
|
|
219
|
-
/* @__PURE__ */ p(k, { children: [
|
|
220
|
-
/* @__PURE__ */ p("div", { draggable: !1, children: [
|
|
221
|
-
/* @__PURE__ */ e(
|
|
222
|
-
"button",
|
|
223
|
-
{
|
|
224
|
-
className: "image-edit-button",
|
|
225
|
-
ref: C,
|
|
226
|
-
onClick: () => {
|
|
227
|
-
_("Update Inline Image", (s) => /* @__PURE__ */ e(
|
|
228
|
-
ue,
|
|
229
|
-
{
|
|
230
|
-
activeEditor: r,
|
|
231
|
-
nodeKey: n,
|
|
232
|
-
onClose: s
|
|
233
|
-
}
|
|
234
|
-
));
|
|
235
|
-
},
|
|
236
|
-
children: "Edit"
|
|
237
|
-
}
|
|
238
|
-
),
|
|
239
|
-
/* @__PURE__ */ e(
|
|
240
|
-
ce,
|
|
241
|
-
{
|
|
242
|
-
className: u ? `focused ${A(y) ? "draggable" : ""}` : null,
|
|
243
|
-
src: t,
|
|
244
|
-
altText: a,
|
|
245
|
-
imageRef: E,
|
|
246
|
-
width: f,
|
|
247
|
-
height: l,
|
|
248
|
-
position: h
|
|
249
|
-
}
|
|
250
|
-
)
|
|
251
|
-
] }),
|
|
252
|
-
c && /* @__PURE__ */ e("div", { className: "image-caption-container", children: /* @__PURE__ */ p(U, { initialEditor: i, children: [
|
|
253
|
-
/* @__PURE__ */ e(te, {}),
|
|
254
|
-
/* @__PURE__ */ e(ne, {}),
|
|
255
|
-
/* @__PURE__ */ e(
|
|
256
|
-
j,
|
|
257
|
-
{
|
|
258
|
-
contentEditable: /* @__PURE__ */ e(oe, { className: "InlineImageNode__contentEditable" }),
|
|
259
|
-
placeholder: /* @__PURE__ */ e(le, { className: "InlineImageNode__placeholder", children: "Enter a caption..." }),
|
|
260
|
-
ErrorBoundary: K
|
|
261
|
-
}
|
|
262
|
-
)
|
|
263
|
-
] }) })
|
|
264
|
-
] }),
|
|
265
|
-
I
|
|
266
|
-
] });
|
|
267
|
-
}
|
|
268
|
-
export {
|
|
269
|
-
ue as UpdateInlineImageDialog,
|
|
270
|
-
xe as default
|
|
271
|
-
};
|
package/dist/layers.pvX8zojL.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./layers.C2m254z5.js");require("./layers.tNKhjknm.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const pt=require("./layers.B19hGmey.js"),mt=require("./layers.BIeVwYKL.js");function rt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function ft(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function Z(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function kt(t){return t.target.depth}function _t(t){return t.depth}function xt(t,n){return n-1-t.height}function yt(t,n){return t.sourceLinks.length?t.depth:n-1}function vt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ft(t.sourceLinks,kt)-1:0}function G(t){return function(){return t}}function ot(t,n){return Y(t.source,n.source)||t.index-n.index}function lt(t,n){return Y(t.target,n.target)||t.index-n.index}function Y(t,n){return t.y0-n.y0}function J(t){return t.value}function bt(t){return t.index}function wt(t){return t.nodes}function St(t){return t.links}function at(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function ct({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Lt(){let t=0,n=0,s=1,a=1,u=24,_=8,g,p=bt,i=yt,o,c,m=wt,b=St,y=6;function x(){const e={nodes:m.apply(null,arguments),links:b.apply(null,arguments)};return A(e),E(e),T(e),C(e),S(e),ct(e),e}x.update=function(e){return ct(e),e},x.nodeId=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:G(e),x):i},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(_=g=+e,x):_},x.nodes=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,s=+e[0],a=+e[1],x):[s-t,a-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],n=+e[0][1],a=+e[1][1],x):[[t,n],[s,a]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function A({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const l=new Map(e.map((h,r)=>[p(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:k,target:v}=r;typeof k!="object"&&(k=r.source=at(l,k)),typeof v!="object"&&(v=r.target=at(l,v)),k.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function E({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function T({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.depth=r;for(const{target:v}of k.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function C({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.height=r;for(const{source:v}of k.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function O({nodes:e}){const f=rt(e,r=>r.depth)+1,l=(s-t-u)/(f-1),h=new Array(f);for(const r of e){const k=Math.max(0,Math.min(f-1,Math.floor(i.call(null,r,f))));r.layer=k,r.x0=t+k*l,r.x1=r.x0+u,h[k]?h[k].push(r):h[k]=[r]}if(o)for(const r of h)r.sort(o);return h}function j(e){const f=ft(e,l=>(a-n-(l.length-1)*g)/Z(l,J));for(const l of e){let h=n;for(const r of l){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const k of r.sourceLinks)k.width=k.value*f}h=(a-h+g)/(l.length+1);for(let r=0;r<l.length;++r){const k=l[r];k.y0+=h*(r+1),k.y1+=h*(r+1)}$(l)}}function S(e){const f=O(e);g=Math.min(_,(a-n)/(rt(f,l=>l.length)-1)),j(f);for(let l=0;l<y;++l){const h=Math.pow(.99,l),r=Math.max(1-h,(l+1)/y);D(f,h,r),N(f,h,r)}}function N(e,f,l){for(let h=1,r=e.length;h<r;++h){const k=e[h];for(const v of k){let R=0,z=0;for(const{source:W,value:K}of v.targetLinks){let F=K*(v.layer-W.layer);R+=M(W,v)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function D(e,f,l){for(let h=e.length,r=h-2;r>=0;--r){const k=e[r];for(const v of k){let R=0,z=0;for(const{target:W,value:K}of v.sourceLinks){let F=K*(W.layer-v.layer);R+=V(v,W)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function P(e,f){const l=e.length>>1,h=e[l];d(e,h.y0-g,l-1,f),I(e,h.y1+g,l+1,f),d(e,a,e.length-1,f),I(e,n,0,f)}function I(e,f,l,h){for(;l<e.length;++l){const r=e[l],k=(f-r.y0)*h;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+g}}function d(e,f,l,h){for(;l>=0;--l){const r=e[l],k=(r.y1-f)*h;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:l}}of f)l.sort(lt);for(const{target:{targetLinks:l}}of e)l.sort(ot)}}function $(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:l}of e)f.sort(lt),l.sort(ot)}function M(e,f){let l=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l-=r}return l}function V(e,f){let l=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l-=r}return l}return x}var tt=Math.PI,et=2*tt,B=1e-6,Et=et-B;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dt(){return new nt}nt.prototype=dt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,_){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+_)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var _=this._x1,g=this._y1,p=s-t,i=a-n,o=_-t,c=g-n,m=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>B)if(!(Math.abs(c*p-i*o)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=s-_,y=a-g,x=p*p+i*i,A=b*b+y*y,E=Math.sqrt(x),T=Math.sqrt(m),C=u*Math.tan((tt-Math.acos((x+m-A)/(2*E*T)))/2),O=C/T,j=C/E;Math.abs(O-1)>B&&(this._+="L"+(t+O*o)+","+(n+O*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+j*p)+","+(this._y1=n+j*i)}},arc:function(t,n,s,a,u,_){t=+t,n=+n,s=+s,_=!!_;var g=s*Math.cos(a),p=s*Math.sin(a),i=t+g,o=n+p,c=1^_,m=_?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+o:(Math.abs(this._x1-i)>B||Math.abs(this._y1-o)>B)&&(this._+="L"+i+","+o),s&&(m<0&&(m=m%et+et),m>Et?this._+="A"+s+","+s+",0,1,"+c+","+(t-g)+","+(n-p)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=o):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=tt)+","+c+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function ut(t){return function(){return t}}function At(t){return t[0]}function Tt(t){return t[1]}var Mt=Array.prototype.slice;function Nt(t){return t.source}function Ct(t){return t.target}function Pt(t){var n=Nt,s=Ct,a=At,u=Tt,_=null;function g(){var p,i=Mt.call(arguments),o=n.apply(this,i),c=s.apply(this,i);if(_||(_=p=dt()),t(_,+a.apply(this,(i[0]=o,i)),+u.apply(this,i),+a.apply(this,(i[0]=c,i)),+u.apply(this,i)),p)return _=null,p+""||null}return g.source=function(p){return arguments.length?(n=p,g):n},g.target=function(p){return arguments.length?(s=p,g):s},g.x=function(p){return arguments.length?(a=typeof p=="function"?p:ut(+p),g):a},g.y=function(p){return arguments.length?(u=typeof p=="function"?p:ut(+p),g):u},g.context=function(p){return arguments.length?(_=p??null,g):_},g}function It(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ot(){return Pt(It)}function $t(t){return[t.source.x1,t.y0]}function Dt(t){return[t.target.x0,t.y1]}function jt(){return Ot().source($t).target(Dt)}var it=(function(){var t=function(p,i,o,c){for(o=o||{},c=p.length;c--;o[p[c]]=i);return o},n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(i,o,c,m,b,y,x){var A=y.length-1;switch(b){case 7:const E=m.findOrCreateNode(y[A-4].trim().replaceAll('""','"')),T=m.findOrCreateNode(y[A-2].trim().replaceAll('""','"')),C=parseFloat(y[A].trim());m.addLink(E,T,C);break;case 8:case 9:case 11:this.$=y[A];break;case 10:this.$=y[A-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,o){if(o.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=o,c}},parse:function(i){var o=this,c=[0],m=[],b=[null],y=[],x=this.table,A="",E=0,T=0,C=2,O=1,j=y.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var P=S.yylloc;y.push(P);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=m.pop()||S.lex()||O,typeof v!="number"&&(v instanceof Array&&(m=v,v=m.pop()),v=o.symbols_[v]||v),v}for(var w,$,M,V,e={},f,l,h,r;;){if($=c[c.length-1],this.defaultActions[$]?M=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),M=x[$]&&x[$][w]),typeof M>"u"||!M.length||!M[0]){var k="";r=[];for(f in x[$])this.terminals_[f]&&f>C&&r.push("'"+this.terminals_[f]+"'");S.showPosition?k="Parse error on line "+(E+1)+`:
|
|
2
|
-
`+S.showPosition()+`
|
|
3
|
-
Expecting `+r.join(", ")+", got '"+(this.terminals_[w]||w)+"'":k="Parse error on line "+(E+1)+": Unexpected "+(w==O?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(k,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:P,expected:r})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+w);switch(M[0]){case 1:c.push(w),b.push(S.yytext),y.push(S.yylloc),c.push(M[1]),w=null,T=S.yyleng,A=S.yytext,E=S.yylineno,P=S.yylloc;break;case 2:if(l=this.productions_[M[1]][1],e.$=b[b.length-l],e._$={first_line:y[y.length-(l||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(l||1)].first_column,last_column:y[y.length-1].last_column},I&&(e._$.range=[y[y.length-(l||1)].range[0],y[y.length-1].range[1]]),V=this.performAction.apply(e,[A,T,E,N.yy,M[1],b,y].concat(j)),typeof V<"u")return V;l&&(c=c.slice(0,-1*l*2),b=b.slice(0,-1*l),y=y.slice(0,-1*l)),c.push(this.productions_[M[1]][0]),b.push(e.$),y.push(e._$),h=x[c[c.length-2]][c[c.length-1]],c.push(h);break;case 3:return!0}}return!0}},_=(function(){var p={EOF:1,parseError:function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},setInput:function(i,o){return this.yy=o||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var o=i.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var o=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var b=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===m.length?this.yylloc.first_column:0)+m[m.length-c.length].length-c[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
-
`+o+"^"},test_match:function(i,o){var c,m,b;if(this.options.backtrack_lexer&&(b={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(b.yylloc.range=this.yylloc.range.slice(0))),m=i[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var y in b)this[y]=b[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,c,m;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),y=0;y<b.length;y++)if(c=this._input.match(this.rules[b[y]]),c&&(!o||c[0].length>o[0].length)){if(o=c,m=y,this.options.backtrack_lexer){if(i=this.test_match(c,b[y]),i!==!1)return i;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(i=this.test_match(o,b[m]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,c,m,b){switch(m){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return p})();u.lexer=_;function g(){this.yy={}}return g.prototype=u,u.Parser=g,new g})();it.parser=it;const H=it;let X=[],Q=[],q={};const zt=()=>{X=[],Q=[],q={},L.clear()};class Bt{constructor(n,s,a=0){this.source=n,this.target=s,this.value=a}}const qt=(t,n,s)=>{X.push(new Bt(t,n,s))};class Vt{constructor(n){this.ID=n}}const Rt=t=>(t=L.common$1.sanitizeText(t,L.getConfig()),q[t]||(q[t]=new Vt(t),Q.push(q[t])),q[t]),Ut=()=>Q,Wt=()=>X,Ft=()=>({nodes:Q.map(t=>({id:t.ID})),links:X.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),Gt={nodesMap:q,getConfig:()=>L.getConfig().sankey,getNodes:Ut,getLinks:Wt,getGraph:Ft,addLink:qt,findOrCreateNode:Rt,getAccTitle:L.getAccTitle,setAccTitle:L.setAccTitle,getAccDescription:L.getAccDescription,setAccDescription:L.setAccDescription,getDiagramTitle:L.getDiagramTitle,setDiagramTitle:L.setDiagramTitle,clear:zt},gt=class st{static next(n){return new st(n+ ++st.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}};gt.count=0;let ht=gt;const Yt={left:_t,right:xt,center:vt,justify:yt},Ht=function(t,n,s,a){const{securityLevel:u,sankey:_}=L.getConfig(),g=L.defaultConfig.sankey;let p;u==="sandbox"&&(p=L.select("#i"+n));const i=u==="sandbox"?L.select(p.nodes()[0].contentDocument.body):L.select("body"),o=u==="sandbox"?i.select(`[id="${n}"]`):L.select(`[id="${n}"]`),c=(_==null?void 0:_.width)??g.width,m=(_==null?void 0:_.height)??g.width,b=(_==null?void 0:_.useMaxWidth)??g.useMaxWidth,y=(_==null?void 0:_.nodeAlignment)??g.nodeAlignment,x=(_==null?void 0:_.prefix)??g.prefix,A=(_==null?void 0:_.suffix)??g.suffix,E=(_==null?void 0:_.showValues)??g.showValues,T=a.db.getGraph(),C=Yt[y];Lt().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(E?15:0)).nodeAlign(C).extent([[0,0],[c,m]])(T);const S=pt.ordinal(mt.schemeTableau10);o.append("g").attr("class","nodes").selectAll(".node").data(T.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=ht.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const N=({id:d,value:w})=>E?`${d}
|
|
7
|
-
${x}${Math.round(w*100)/100}${A}`:d;o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(T.nodes).join("text").attr("x",d=>d.x0<c/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<c/2?"start":"end").text(N);const D=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(T.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),P=(_==null?void 0:_.linkColor)||"gradient";if(P==="gradient"){const d=D.append("linearGradient").attr("id",w=>(w.uid=ht.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",w=>S(w.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",w=>S(w.target.id))}let I;switch(P){case"gradient":I=d=>d.uid;break;case"source":I=d=>S(d.source.id);break;case"target":I=d=>S(d.target.id);break;default:I=P}D.append("path").attr("d",jt()).attr("stroke",I).attr("stroke-width",d=>Math.max(1,d.width)),L.setupGraphViewbox$1(void 0,o,0,b)},Xt={draw:Ht},Qt=t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
-
`).trim(),Kt=H.parse.bind(H);H.parse=t=>Kt(Qt(t));const Zt={parser:H,db:Gt,renderer:Xt};exports.diagram=Zt;
|
package/dist/layers.tbEz_ZKe.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),n=require("react"),V=require("react-i18next"),Y=require("@lexical/react/LexicalComposerContext"),J=require("@mantine/core"),S=require("lexical"),Q=require("@layers-app/shared"),o=require("./layers.CszLrplc.js"),_=t=>{const{width:c,height:r,isLoading:g,isError:w,src:f,id:m,altText:p,imageRef:x,maxWidth:h}=t;return u.jsxs("div",{className:"media-wrapper",style:{width:c,height:r,display:"inline-flex",position:"relative"},children:[u.jsx(J.LoadingOverlay,{visible:g,zIndex:1e3,overlayProps:{backgroundOpacity:.5},loaderProps:{size:24,color:"black"}}),u.jsx(X,{className:null,src:f,altText:p,imageRef:x,width:"inherit",height:"inherit",maxWidth:h||"auto",id:m})]})};function X({altText:t,className:c,imageRef:r,src:g,width:w,height:f,maxWidth:m,id:p}){const[x,h]=n.useState(!1);return u.jsx("img",{className:`${c||void 0} ${x?"":"loading"}`,src:g,alt:t,ref:r,style:{height:f,maxWidth:m,width:w},onLoad:()=>{g.includes("splash")?setTimeout(()=>{h(!0)},100):h(!0)},draggable:"false","data-id":p})}function Z({src:t,altText:c,nodeKey:r,width:g,height:w,maxWidth:f,showCaption:m,caption:p,id:x,create:h,alignment:k}){var q,U;const $=n.useRef(null),[N,I]=n.useState(!0),[l]=Y.useLexicalComposerContext(),[C,L]=n.useState(!0),[d,M]=n.useState({width:0,height:0}),{start:B,cancel:D}=o.useCancelUpload(),[H,j]=n.useState(0),{fetchUploadMedia:W,fetchDeleteMedia:O,maxFileSize:ee}=n.useContext(o.Context),E=o.mediaMap.has(t)&&(((q=o.mediaMap.get(t))==null?void 0:q.mediaNodeKeys.length)===0||((U=o.mediaMap.get(t))==null?void 0:U.mediaNodeKeys.length)===void 0||t.trim()===""),{t:v}=V.useTranslation(),[te,T]=n.useState(0);n.useEffect(()=>l.registerDecoratorListener(()=>{T(e=>e+1)}),[E]),n.useEffect(()=>{if(!t||t.startsWith("data:image/")||!t.trim()){I(!1);return}const e=new Image;e.src=t,e.onload=()=>I(!1),e.onerror=()=>{I(!1)}},[t,E]);const F=(e,s)=>{l.update(()=>{S.$setSelection(null);const i=S.$getNodeByKey(r);o.$isImageNode(i)&&i.setWidthAndHeight(e,s)})},{historyState:P}=o.useSharedHistoryContext(),{settings:{showNestedEditorTreeView:R}}=o.useSettings(),[b,y]=n.useState(!1);function G(e){return e.endsWith(".svg")||e.includes("image/svg+xml")}function K(e){return new Promise((s,i)=>{if(G(e)){s(0);return}const a=new Image;a.src=e,a.onload=()=>{s(a.width)},a.onerror=()=>{i(new Error("Failed to load image"))}})}n.useEffect(()=>{h&&y(!0)},[h]),n.useEffect(()=>{let e=g,s=w,i=100;(t.includes("unsplash")?t.trim():!E&&t.trim()||t.includes("upload-src-editor"))&&t!=="upload"&&K(t).then(a=>{typeof e=="number"&&e<i&&a<i?(L(!0),M({width:e,height:s})):a<i?(L(!0),M({width:"auto",height:"auto"})):(M({width:a,height:a}),L(!1))}).catch(a=>{console.warn("Ошибка при загрузке изображения:",a.message)})},[t,E]),n.useEffect(()=>{d.width&&d.height&&C&&l.update(()=>{const e=S.$getNodeByKey(r);o.$isImageNode(e)&&e.setWidthAndHeight(d.width,d.height)})},[d.width,d.height,C]),n.useEffect(()=>{const e=document.documentElement;o.toggleLockScroll(b,e)},[b]),n.useEffect(()=>l.registerCommand(o.UPLOAD_IMAGE_COMMAND,e=>(t==="upload"&&A(e),!1),S.COMMAND_PRIORITY_LOW),[t,N]);const z=(e,s)=>{I(!1),l.update(()=>{const i=S.$getNodeByKey(r);o.$isImageNode(i)&&(i.setSrc(e),i.setId(s))})},A=e=>{I(!0);const s=B();W&&W(e[0],(i,a)=>{z(i,a),j(0)},i=>{i&&Q.showErrorNotification({message:v("editor.gallery.errorFile")}),j(0),z("","")},s,i=>{j(i)})};return!t||t==="upload"?u.jsx(o.ImagePicker,{uploading:!1,onUpload:e=>{!W||!e.length||(A(e),y(!1))},popoverProps:{opened:b,position:"bottom",onChange:y},onChange:e=>{y(!1),l.update(()=>{const s=S.$getNodeByKey(r);o.$isImageNode(s)&&s.setSrc(e)})},children:u.jsx(o.EmptyNodeButton,{title:v("editor.image.add_photo"),icon:"photo",onClick:()=>y(!b),isLoading:N,progress:H,onAfterCancel:()=>{D(),I(!1)}})}):C?u.jsx(_,{width:d.width,height:d.height,isLoading:N,isError:!1,isIcon:C,src:t,id:x,editor:l,nodeKey:r,fetchDeleteMedia:O,altText:c,imageRef:$,maxWidth:f,showCaption:m,caption:p,isCollabActive:!1,historyState:P,showNestedEditorTreeView:R,t:v}):u.jsx(o.ResizableContainer,{editor:l,isIcon:C,width:o.parseContainerSize(g),height:o.parseContainerSize(w),initialWidth:d.width||"",initialHeight:d.height||"",onResizeEnd:F,alignment:k,children:u.jsx(_,{width:"inherit",height:"inherit",isLoading:N,isError:!1,isIcon:C,src:t,id:x,editor:l,nodeKey:r,fetchDeleteMedia:O,altText:c,imageRef:$,maxWidth:f,showCaption:m,caption:p,isCollabActive:!1,historyState:P,showNestedEditorTreeView:R,t:v})})}exports.default=Z;
|